GripGestureManager

GripGestureManager

Functions

Signals

void device-available Run Last
void device-unavailable Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GripGestureManager

Description

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

Functions

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.

Parameters

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);

Parameters

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);

Types and Values

struct GripGestureManager

struct GripGestureManager;

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

Members


struct GripGestureManagerClass

struct GripGestureManagerClass {
  GObjectClass parent_class;
};

The class object for a GripGestureManager.

Members

GObjectClass parent_class;

the base GObjectClass

 

Signal Details

The “device-available” signal

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

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

Parameters

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.

 

Flags: Run Last


The “device-unavailable” signal

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

Signals the unavailability of a gesture-capable input device.

Parameters

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.

 

Flags: Run Last