GripGestureManager

GripGestureManager

Synopsis

struct              GripGestureManager;
struct              GripGestureManagerClass;
GripGestureManager * grip_gesture_manager_get           (void);

void                (*GripGestureCallback)              (GtkWidget *widget,
                                                         GripTimeType time,
                                                         GripGestureEvent *gesture,
                                                         gpointer user_data);
void                grip_gesture_manager_register_window
                                                        (GripGestureManager *manager,
                                                         GtkWidget *widget,
                                                         GripGestureType gesture_type,
                                                         GripDeviceType device_type,
                                                         gint touch_points,
                                                         GripGestureCallback callback,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);
void                grip_gesture_manager_unregister_window
                                                        (GripGestureManager *manager,
                                                         GtkWidget *widget);

Object Hierarchy

  GObject
   +----GripGestureManager

Signals

  "device-available"                               : Run Last
  "device-unavailable"                             : Run Last

Description

The Grip gesture managre is a singleton object that connections to the gesture recognition engine and manages gesture subscriptions for GTK widgets.

Details

struct GripGestureManager

struct GripGestureManager;

A singleton manager into which a window may be registered to receive multitouch gesture events.


struct GripGestureManagerClass

struct GripGestureManagerClass {
  GObjectClass parent_class;
};

The class object for a GripGestureManager.

GObjectClass parent_class;

the base GObjectClass

grip_gesture_manager_get ()

GripGestureManager * grip_gesture_manager_get           (void);

Retrieves a GripGestureManager pointer.

Returns :

A GripGestureManager. [transfer none]

GripGestureCallback ()

void                (*GripGestureCallback)              (GtkWidget *widget,
                                                         GripTimeType time,
                                                         GripGestureEvent *gesture,
                                                         gpointer user_data);

The gesture callback function is registered by the grip_gesture_manager_register_window() function and gets called whenever a new gesture event has been received. The same function may be registered for more than one gesture type.

The GripGestureCallback function is the main customization point for application response to gestural input.

widget :

A GtkWidget pointer. [in]

time :

A GripTimeType

gesture :

A GripGestureEvent pointer. [in]

user_data :

user data. [transfer none]

grip_gesture_manager_register_window ()

void                grip_gesture_manager_register_window
                                                        (GripGestureManager *manager,
                                                         GtkWidget *widget,
                                                         GripGestureType gesture_type,
                                                         GripDeviceType device_type,
                                                         gint touch_points,
                                                         GripGestureCallback callback,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);

manager :

self

widget :

A GtkWidget on which to register the gesture

gesture_type :

Gesture type

device_type :

Type of the device producing the gesture.

touch_points :

Number of touch points

callback :

Callback

user_data :

User data. [transfer none]

destroy :

Destroy. [transfer none][scope async]

grip_gesture_manager_unregister_window ()

void                grip_gesture_manager_unregister_window
                                                        (GripGestureManager *manager,
                                                         GtkWidget *widget);

Signal Details

The "device-available" signal

void                user_function                      (GripGestureManager *gesture_manager,
                                                        GripInputDevice    *input_device,
                                                        gpointer            user_data)            : Run Last

Signals the availability of a new gesture-capable input device.

gesture_manager :

the GripGestureManager sending the signal

input_device :

the new GripInputDevice just added.

user_data :

user data set when the signal handler was connected.

The "device-unavailable" signal

void                user_function                      (GripGestureManager *gesture_manager,
                                                        GripInputDevice    *input_device,
                                                        gpointer            user_data)            : Run Last

Signals the unavailability of a gesture-capable input device.

gesture_manager :

the GripGestureManager sending the signal

input_device :

the new GripInputDevice just added.

user_data :

user data set when the signal handler was connected.