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

Registers a widget to receive gesture events.

The callback parameters provided will be called by the GripGestureManager whenever the user initiates a gesture on the specified window.

Parameters

manager

A GripGestureManager instance.

 

widget

A GtkWidget to register the gesture event for.

 

gesture_type

The type of gesture event to register.

 

device_type

The type of the device use to create the gesture.

 

touch_points

Number of touch points for this gesture.

 

callback

Called when a gesture starts, updates, or ends.

 

user_data

User data

 

destroy

Destroy callback for user data.

 

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