![]() |
![]() |
![]() |
libgrip Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
enum GripGestureType; enum GripDeviceType; #define GRIP_DEVICE_ALL enum GripTimeType; union GripGestureEvent; struct GripEventGestureAny; struct GripEventGestureDrag; struct GripEventGesturePinch; struct GripEventGestureRotate; struct GripEventGestureTap; GripGestureEvent * grip_gesture_event_new (GripGestureType gesture_type
); void grip_gesture_event_free (GripGestureEvent *event
); GripGestureEvent * grip_gesture_event_copy (const GripGestureEvent *event
);
A series of one or more events are passed to the gesture callback. Each event conveys information specific to the type of gesture occurring.
typedef enum { GRIP_GESTURE_DRAG = 0, GRIP_GESTURE_PINCH = 1, GRIP_GESTURE_ROTATE = 2, GRIP_GESTURE_TAP = 15 } GripGestureType;
Indicates the type of gesture for which a gesture event is being received.
typedef enum { GRIP_DEVICE_TOUCHSCREEN = 1, GRIP_DEVICE_TOUCHPAD = 2, GRIP_DEVICE_INDEPENDENT = 4, } GripDeviceType;
Describes certain properties of a gesture input device.
#define GRIP_DEVICE_ALL (GRIP_DEVICE_TOUCHSCREEN | GRIP_DEVICE_TOUCHPAD | GRIP_DEVICE_INDEPENDENT)
typedef enum { GRIP_TIME_START, GRIP_TIME_UPDATE, GRIP_TIME_END } GripTimeType;
Indicates the part of the gesture stream ocuuring during the gesture event.
union _GripGestureEvent { GripGestureType type; GripEventGestureAny any; GripEventGestureDrag drag; GripEventGesturePinch pinch; GripEventGestureRotate rotate; GripEventGestureTap tap; };
This is a boxed type.
GripGestureType |
the GripGestureType, selects the variant record |
GripEventGestureAny |
(not used) |
GripEventGestureDrag |
the event contains a drag gesture record |
GripEventGesturePinch |
the event contains a pinch gesture record |
GripEventGestureRotate |
the event contains a rotate gesture record |
GripEventGestureTap |
the event contains a tap gesture record |
struct GripEventGestureAny { GdkEventType type; GdkWindow *window; };
This struct is not used.
struct GripEventGestureDrag { GripGestureType type; guint id; GdkWindow *window; GdkWindow *root; GdkWindow *child; guint32 timestamp; gint fingers; gdouble focus_x; gdouble focus_y; gint delta_x; gint delta_y; gdouble velocity_x; gdouble velocity_y; gdouble position_x; gdouble position_y; GripInputDevice *input_device; };
Data associated with a drag event. A drag is a lateral motion.
GripGestureType |
the GripGestureType of the gesture |
identifies the gesture | |
the GdkWindow in which the gesture occurred | |
the root GdkWindow | |
the child GdkWindow | |
the time the gesture event occurred | |
the number of touches making up the gesture | |
the X coordinate of the focus point of the gesture start | |
the Y coordinate of the focus point of the gesture start | |
the change in the X coordinate since the last gesture event | |
the change in the Y coordinate since the last gesture event | |
the rate of change of the X coordinate | |
the rate of change of the Y coordinate | |
the current X coordinate of the centroid poistion of the touches | |
the current Y coordinate of the centroid poistion of the touches | |
GripInputDevice * |
the GripInputDevice used to make the gesture |
struct GripEventGesturePinch { GripGestureType type; guint id; GdkWindow *window; GdkWindow *root; GdkWindow *child; guint32 timestamp; guint fingers; gdouble focus_x; gdouble focus_y; gdouble radius_delta; gdouble radial_velocity; gdouble radius; gfloat position_x; gfloat position_y; GripInputDevice *input_device; };
Data associated with a pinch event. A pinch is an expand or contract motion.
GripGestureType |
the GripGestureType of the gesture |
identifies the gesture | |
the GdkWindow in which the gesture occurred | |
the root GdkWindow | |
the child GdkWindow | |
the time the gesture event occurred | |
the number of touches making up the gesture | |
the X coordinate of the focus point of the gesture start | |
the Y coordinate of the focus point of the gesture start | |
the change in the radius (in screen coordinates) | |
the rate of change of the radius | |
the current radius (in screen coordinates) | |
the current X coordinate of the centroid poistion of the touches | |
the current Y coordinate of the centroid poistion of the touches | |
GripInputDevice * |
the GripInputDevice used to make the gesture |
struct GripEventGestureRotate { GripGestureType type; guint id; GdkWindow *window; GdkWindow *root; GdkWindow *child; guint32 timestamp; guint fingers; gdouble focus_x; gdouble focus_y; gdouble angle_delta; gdouble angular_velocity; gdouble angle; gfloat position_x; gfloat position_y; GripInputDevice *input_device; };
Data associated with a rotate gesture event.
GripGestureType |
the GripGestureType of the gesture |
identifies the gesture | |
the GdkWindow in which the gesture occurred | |
the root GdkWindow | |
the child GdkWindow | |
the time the gesture event occurred | |
the number of touches making up the gesture | |
the X coordinate of the focus point of the gesture start | |
the Y coordinate of the focus point of the gesture start | |
the change in the rotation angle (in radians) | |
the rate of change in the rotation angle | |
the current rotation angle | |
the current X coordinate of the centroid poistion of the touches | |
the current Y coordinate of the centroid poistion of the touches | |
GripInputDevice * |
the GripInputDevice used to make the gesture |
struct GripEventGestureTap { GripGestureType type; guint id; GdkWindow *window; GdkWindow *root; GdkWindow *child; guint32 timestamp; guint fingers; guint32 tap_time; gfloat focus_x; gfloat focus_y; gfloat position_x; gfloat position_y; GripInputDevice *input_device; };
Data associated with a tap gesture.
GripGestureType |
the GripGestureType of the gesture |
identifies the gesture | |
the GdkWindow in which the gesture occurred | |
the root GdkWindow | |
the child GdkWindow | |
the time the gesture event occurred | |
the number of touches making up the gesture | |
the duration of the tap | |
the X coordinate of the focus point of the gesture start | |
the Y coordinate of the focus point of the gesture start | |
the current X coordinate of the centroid poistion of the touches | |
the current Y coordinate of the centroid poistion of the touches | |
GripInputDevice * |
the GripInputDevice used to make the gesture |
GripGestureEvent * grip_gesture_event_new (GripGestureType gesture_type
);
Creates a new Grip gesture event.
|
the type of the gesture |
Returns : |
a new GripGestureEvent |
void grip_gesture_event_free (GripGestureEvent *event
);
Frees the resources allocated for a GripGestureEvent.
|
a GripGestureEvent |
GripGestureEvent * grip_gesture_event_copy (const GripGestureEvent *event
);
Creates a new GripGestureEvent instance using a deep copy of and existing event.
|
an existing GripGestureEvent |
Returns : |
a new GripGestureEvent |