Loading...
Searching...
No Matches
Gesture Subscription
The Simplified GEIS Interface » Gesture Types » Gesture Primitives » Standard Gesture Types » Vendor Extension Gesture Types » Initialization and Cleanup » Configuration and Control | The Advanced GEIS Interface » The Geis API Object » Error Reporting » Configuration » Input Devices

## Topics

| Attributes
| Attributes are named values associated with various GEIS entities, including input devices, gesture types, and gesture events.

## Data Structures

struct | GeisGestureAttr
| An individual gesture attribute. More...
struct | GeisGestureFuncs
| The set of callback functions invoked for various gesture-related events. More...

## Vendor-defined Configuration Items

  These configuration items are not a part of the GEIS specification and may change.

typedef unsigned int | GeisGestureType
typedef unsigned int | GeisGestureId
typedef struct GeisGestureAttr | GeisGestureAttr
| An individual gesture attribute.
typedef void(* | GeisGestureCallback) (void *cookie, GeisGestureType gesture_type, GeisGestureId gesture_id, GeisSize attr_count, GeisGestureAttr *attrs)
| A callback used for different gesture events.
typedef struct GeisGestureFuncs | GeisGestureFuncs
| The set of callback functions invoked for various gesture-related events.
GeisStatus | geis_subscribe (GeisInstance geis_instance, GeisInputDeviceId *input_list, const char **gesture_list, GeisGestureFuncs *funcs, void *cookie)
| Registers a callback to receive gesture events.
GeisStatus | geis_unsubscribe (GeisInstance geis_instance, GeisGestureType *gesture_list)
| Unsubscribes to one or more gestures.
#define | GEIS_ALL_GESTURES
| Selects ALL input devices.
#define | GEIS_NO_GESTURE_ID

## Detailed Description

## Macro Definition Documentation

## GEIS_ALL_GESTURES

#define GEIS_ALL_GESTURES

Selects ALL input devices.

## Typedef Documentation

## GeisGestureAttr

typedef struct GeisGestureAttr GeisGestureAttr

An individual gesture attribute.

Gesture events are associated with a list of attributes, each of which is a (name, type, value) tuple. These attribute reveal a little piece of information about a gesture.

## GeisGestureCallback

typedef void(* GeisGestureCallback) (void *cookie, GeisGestureType gesture_type, GeisGestureId gesture_id, GeisSize attr_count, GeisGestureAttr *attrs)

A callback used for different gesture events.

Parameters

  [in] | cookie | an application-specific value to be passed to the callback.
  [in] | gesture_type | a gesture type
  [in] | gesture_id | a unique gesture identifier
  [in] | attrs | parameters

## GeisGestureFuncs

typedef struct GeisGestureFuncs GeisGestureFuncs

The set of callback functions invoked for various gesture-related events.

An application must define callback functions to handle the various gesture events. These callbacks are provided in a table passed to geis_subscribe for each window on which gesture events may occur.

## Function Documentation

## geis_subscribe()

GeisStatus geis_subscribe | ( | GeisInstance | geis_instance,
|  | GeisInputDeviceId * | input_list,
|  | const char ** | gesture_list,
|  | GeisGestureFuncs * | funcs,
|  | void * | cookie )

Registers a callback to receive gesture events.

Parameters

  [in] | geis_instance | an opaque pointer to a geis gesture subscription instance
  [in] | input_list | a null-terminated list of input device IDs
  [in] | gesture_list | a null-terminated list of C-style strings naming gestures for subscription
  [in] | funcs | a pointer to a GeisGestureFuncs structure
  [in] | cookie | an application specific value to be passed to the callback

Return values

  GEIS_BAD_ARGUMENT | an invalid argument value was passed
  GEIS_STATUS_SUCCESS | normal successful completion

## geis_unsubscribe()

GeisStatus geis_unsubscribe | ( | GeisInstance | geis_instance,
|  | GeisGestureType * | gesture_list )

Unsubscribes to one or more gestures.

Parameters

  [in] | geis_instance | an opaque pointer to a geis gesture subscription instance
  [in] | gesture_list | a null-terminated list of gesture types