29
* @defgroup geis_common Common Types and Definitions
31
* These types and values are common to both the simplified and advanced GEIS
36
* @defgroup geis_v1 The Simplified GEIS Interface
38
* The simplified GEIS interface is the original (GEIS v1) API. It provides a
39
* way to specify a list of gesture names and input devices for which gestures
40
* will be recognized on a given window.
42
* See @ref using_geis_v1.
46
* @defgroup geis_v2 The Advanced GEIS Interface
48
* The advanced GEIS interface (GEIS v2) was developed to give a more nuanced
49
* control over the types of gestures and input devices for which gestures will
52
* See @ref using_geis_v2.
58
* These macros can be tested at compile time to query for support of various
28
61
#define GEIS_VERSION_1_0 1
29
62
#define GEIS_VERSION_2_0 20101122
31
64
#include <geis/geisimpl.h>
67
* Errors returned from calls.
68
* @ingroup geis_common
70
* Most GEIS API calls return a status code indicating success or, in the event
71
* of a lack of success, the reson for failure.
73
typedef enum GeisStatus
75
GEIS_STATUS_SUCCESS = 0, /**< normal successful completion */
76
GEIS_STATUS_CONTINUE = 20, /**< normal successful completion
77
with data still remaining */
78
GEIS_STATUS_EMPTY = 21, /**< normal successful completion
79
with no data retrieved */
80
GEIS_STATUS_NOT_SUPPORTED = 10, /**< a requested feature is not supported */
81
GEIS_BAD_ARGUMENT = 1000, /**< a bad argument value was passed */
82
GEIS_UNKNOWN_ERROR = 9999, /**< any other error condition */
83
GEIS_STATUS_BAD_ARGUMENT = -100, /**< a bad argument value was passed */
84
GEIS_STATUS_UNKNOWN_ERROR = -999 /**< any other error condition */
88
* Attribute data types.
89
* @ingroup geis_common
91
typedef enum GeisAttrType
93
GEIS_ATTR_TYPE_UNKNOWN, /**< Attr is an unknown type. */
94
GEIS_ATTR_TYPE_BOOLEAN, /**< Attr is truth-valued . */
95
GEIS_ATTR_TYPE_FLOAT, /**< Attr is real-valued. */
96
GEIS_ATTR_TYPE_INTEGER, /**< Attr is a counting number. */
97
GEIS_ATTR_TYPE_POINTER, /**< Attr is a pointer to a data structure. */
98
GEIS_ATTR_TYPE_STRING /**< Attr is a null-terminated UTF-8 string. */
33
105
/* Standard fundamental gestures */
34
106
#define GEIS_GESTURE_DRAG "Drag"
35
107
#define GEIS_GESTURE_PINCH "Pinch"
124
209
#define GEIS_GESTURE_ATTRIBUTE_TOUCH_4_X "touch 4 x"
125
210
#define GEIS_GESTURE_ATTRIBUTE_TOUCH_4_Y "touch 4 y"
127
#define GEIS_TOUCH_ATTRIBUTE_ID "touch id"
128
#define GEIS_TOUCH_ATTRIBUTE_X "touch x"
129
#define GEIS_TOUCH_ATTRIBUTE_Y "touch y"
131
#define GEIS_REGION_ATTRIBUTE_WINDOWID "windowid"
138
* @defgroup geis_status Status and Errors
140
* Most GEIS API calls return a status code indicating success or, in the event
141
* of a lack of success, the reson for failure.
147
* Errors returned from calls.
149
typedef enum GeisStatus
151
GEIS_STATUS_SUCCESS = 0, /**< normal successful completion */
152
GEIS_STATUS_CONTINUE = 20, /**< normal successful completion
153
with data still remaining */
154
GEIS_STATUS_EMPTY = 21, /**< normal successful completion
155
with no data retrieved */
156
GEIS_STATUS_NOT_SUPPORTED = 10, /**< a requested feature is not supported */
157
GEIS_BAD_ARGUMENT = 1000, /**< a bad argument value was passed */
158
GEIS_UNKNOWN_ERROR = 9999, /**< any other error condition */
159
GEIS_STATUS_BAD_ARGUMENT = -100, /**< a bad argument value was passed */
160
GEIS_STATUS_UNKNOWN_ERROR = -999 /**< any other error condition */
166
214
* @defgroup geis_meta Initialization and Cleanup
168
217
* Each instance of a gesture subscription must be created using the geis_init()
169
218
* call and destroyed using the geis_finish() call.
226
* @defgroup geis_2_geis The Geis API Object (GEIS v2.0)
232
* @defgroup geis_2_geis_init_args Specified Initialization Arguments
234
* These initialization arguments are defined by the GEIS specification.
280
* @defgroup geis_v1_config Configuration and Control
286
* Gets the Unix file descriptor for GEIS events.
288
* Applications or toolkits can use this file descriptor to intgerate geis event
289
* handling into their main event dispatch loop. When a GEIS event is available
290
* for processing, the fd will have a read-available state indicated in
291
* select(), poll(), epoll(), etc.
293
#define GEIS_CONFIG_UNIX_FD 10001
296
* Indicates if a particular feaure is supported.
298
* @param[in] geis_instance An opaque pointer to a geis gesture subscription
300
* @param[in] configuration_item Indicates which configuration item will be
301
* checked for support.
303
* @retval GEIS_BAD_ARGUMENT an invalid argument value was passed
304
* @retval GEIS_STATUS_SUCCESS normal successful completion
306
GEIS_API GeisStatus geis_configuration_supported(GeisInstance geis_instance,
307
int configuration_item);
310
* Gets a feature configuration value.
312
* @param[in] geis_instance An opaque pointer to a geis gesture subscription
314
* @param[in] configuration_item Indicates which configuration item will be
316
* @param[in] value A pointer to where the retrieved value will be
319
* @retval GEIS_BAD_ARGUMENT an invalid argument value was passed
320
* @retval GEIS_STATUS_SUCCESS normal successful completion
322
GEIS_API GeisStatus geis_configuration_get_value(GeisInstance geis_instance,
323
int configuration_item,
327
* Sets a feature configuration value.
329
* @param[in] geis_instance An opaque pointer to a geis gesture subscription
331
* @param[in] configuration_item Indicates which configuration item will be
333
* @param[in] value A pointer to where the value to be set will be
336
* @retval GEIS_BAD_ARGUMENT an invalid argument value was passed
337
* @retval GEIS_STATUS_SUCCESS normal successful completion
339
GEIS_API GeisStatus geis_configuration_set_value(GeisInstance geis_instance,
340
int configuration_item,
344
* Dispatches geis events until there are no further events available.
346
* @param[in] geis_instance an opaque pointer to a geis gesture subscription
349
* This function is used to integrate geis even dispatch into the main event
350
* loop of an application or toolkit.
352
* @retval GEIS_BAD_ARGUMENT an invalid GeisInstance was passed
353
* @retval GEIS_STATUS_SUCCESS normal successful completion
355
GEIS_API GeisStatus geis_event_dispatch(GeisInstance geis_instance);
360
* @defgroup geis_v2_geis The Geis API Object
368
* Represents an instance of the gestire recognition engine
371
typedef struct _Geis *Geis;
375
* @name Standard Initialization Arguments
378
* These initialization arguments are defined by the GEIS v2 specification.
382
* @def GEIS_INIT_SERVICE_PROVIDER
240
383
* Enables GEIS to provide a networked service.
384
* This initialization argument takes no parameters.
386
* @def GEIS_INIT_TRACK_DEVICES
387
* Tells GEIS to send input device events.
388
* This initialization argument takes no parameters.
390
* @def GEIS_INIT_TRACK_GESTURE_CLASSES
391
* Tells GEIS to send gesture class events.
242
392
* This initialization argument takes no parameters.
244
395
#define GEIS_INIT_SERVICE_PROVIDER "org.libgeis.init.server"
247
* Tells GEIS to send input device events.
249
* This initialization argument takes no parameters.
251
396
#define GEIS_INIT_TRACK_DEVICES "org.libgeis.init.track-devices"
254
* Tells GEIS to send gesture class events.
256
* This initialization argument takes no parameters.
258
397
#define GEIS_INIT_TRACK_GESTURE_CLASSES "org.libgeis.init.track-gesture-classes"
263
* @defgroup geis_2_geis_init_vendor Vendor-defined Initialization Arguments
402
* @name Vendor-defined Initialization Arguments
265
405
* These initialization arguments are not a part of te GEIS specification and
410
* @def GEIS_INIT_UTOUCH_MOCK_ENGINE
412
* @def GEIS_INIT_UTOUCH_XCB
271
415
#define GEIS_INIT_UTOUCH_MOCK_ENGINE "com.canonical.utouch.mock.engine"
277
typedef struct _Geis *Geis;
280
422
* Initializes an instance of the GEIS v2.0 API.
282
* @param[in] name A name for the API instance (used for diagnostics).
283
* @param[in] ... A set of zero or more initialization arguments.
423
* @ingroup geis_v2_geis
426
* @param[in] init_arg_name The name of an initializaer argument.
427
* @param[in] ... The remaining initializaer arguments.
429
* A NULL-terminated list of zero or more initialization arguments is passed to
430
* this function to create and initialize a connection to a gesture recognition
433
* If no initialization arguments are passed, the parameter list consists of a
434
* single NULL argument.
285
436
GEIS_API Geis geis_new(GeisString init_arg_name, ...);
288
439
* Cleans up an instance of the GEIS v2.0 API.
440
* @ingroup geis_v2_geis
290
443
* @param[in] geis An instance of the GEIS v2.0 API.
346
* @defgroup geis1_config Configuration and Control (GEIS v1.0)
350
#define GEIS_CONFIG_UNIX_FD 10001
353
* Indicates if a particular feaure is supported.
355
* @param[in] geis_instance an opaque pointer to a geis gesture subscription
358
* @retval GEIS_BAD_ARGUMENT an invalid argument value was passed
359
* @retval GEIS_STATUS_SUCCESS normal successful completion
361
GEIS_API GeisStatus geis_configuration_supported(GeisInstance geis_instance,
362
int configuration_item);
365
* Gets a feature configuration value.
367
* @param[in] geis_instance an opaque pointer to a geis gesture subscription
370
* @retval GEIS_BAD_ARGUMENT an invalid argument value was passed
371
* @retval GEIS_STATUS_SUCCESS normal successful completion
373
GEIS_API GeisStatus geis_configuration_get_value(GeisInstance geis_instance,
374
int configuration_item,
378
* Sets a feature configuration value.
380
* @param[in] geis_instance an opaque pointer to a geis gesture subscription
383
* @retval GEIS_BAD_ARGUMENT an invalid argument value was passed
384
* @retval GEIS_STATUS_SUCCESS normal successful completion
386
GEIS_API GeisStatus geis_configuration_set_value(GeisInstance geis_instance,
387
int configuration_item,
391
* Dispatches geis events until there are no further events available.
393
* @param[in] geis_instance an opaque pointer to a geis gesture subscription
396
* This function is used to integrate geis even dispatch into the main event
397
* loop of an application or toolkit.
399
* @retval GEIS_BAD_ARGUMENT an invalid GeisInstance was passed
400
* @retval GEIS_STATUS_SUCCESS normal successful completion
402
GEIS_API GeisStatus geis_event_dispatch(GeisInstance geis_instance);
407
* @defgroup geis2_config Configuration (GEIS v2.0)
412
* @defgroup geis2_config_spec Required Configuration Items
500
* @defgroup geis_v2_config Configuration
506
* @name Required Configuration Items
414
509
* These configuration items are defined by the GEIS specification.
513
* @def GEIS_CONFIGURATION_FD
514
* Gets a Unix file descriptor that will signal the availablility of GEIS events
419
518
#define GEIS_CONFIGURATION_FD "org.libgeis.configuration.fd"
476
* @defgroup geis2_attrs Attributes
478
* Attributes are named values associated with various GEIS entities, including
479
* input devices, gesture types, and gesture events.
483
typedef enum GeisAttrType
485
GEIS_ATTR_TYPE_UNKNOWN,
486
GEIS_ATTR_TYPE_BOOLEAN,
487
GEIS_ATTR_TYPE_FLOAT,
488
GEIS_ATTR_TYPE_INTEGER,
489
GEIS_ATTR_TYPE_POINTER,
490
GEIS_ATTR_TYPE_STRING
494
* An opaque type that encapsulates a GEIS attribute.
496
* GeisAttr objects may not be created or destroyed by the application, they may
497
* only have their data examined or extracted.
499
typedef struct _GeisAttr *GeisAttr;
502
* Gets the name of an attribute.
504
* @param[in] attr Identifies the attribute.
506
GEIS_API GeisString geis_attr_name(GeisAttr attr);
509
* Gets the type of an attribute value.
511
* @param[in] attr Identifies the attribute.
513
GEIS_API GeisAttrType geis_attr_type(GeisAttr attr);
516
* Gets the value of an attribute as a GeisBoolean.
518
* @param[in] attr Identifies the attribute.
520
GEIS_API GeisBoolean geis_attr_value_to_boolean(GeisAttr attr);
523
* Gets the value of an attribute as a GeisFloat.
525
* @param[in] attr Identifies the attribute.
527
GEIS_API GeisFloat geis_attr_value_to_float(GeisAttr attr);
530
* Gets the value of an attribute as a GeisInteger.
532
* @param[in] attr Identifies the attribute.
534
GEIS_API GeisInteger geis_attr_value_to_integer(GeisAttr attr);
537
* Gets the value of an attribute as a GeisPointer.
539
* @param[in] attr Identifies the attribute.
541
GEIS_API GeisPointer geis_attr_value_to_pointer(GeisAttr attr);
544
* Gets the value of an attribute as a GeisString.
546
* @param[in] attr Identifies the attribute.
548
GEIS_API GeisString geis_attr_value_to_string(GeisAttr attr);
553
* @defgroup geis_input Input Devices
577
* @defgroup geis_v1_input Input Devices
604
* @defgroup geis1_subscription Gesture Subscription (GEIS v1.0)
629
* @defgroup geis_v1_subscription Gesture Subscription
607
633
typedef unsigned int GeisGestureType;
608
634
typedef unsigned int GeisGestureId;
636
/** Selects ALL input devices. */
610
637
#define GEIS_ALL_GESTURES ((GeisGestureType)0)
611
639
#define GEIS_NO_GESTURE_ID ((GeisGestureId)0)
642
* An individual gesture attribute.
644
* Gesture events are associated with a list of attributes, each of which is a
645
* (name, type, value) tuple. These attribute reveal a little piece of
646
* information about a gesture.
616
648
typedef struct GeisGestureAttr
650
/** The name of the gesture attribute. */
652
/** The data type of the gesture attribute. */
619
653
GeisAttrType type;
654
/** The value of the attributes. */
622
657
GeisBoolean boolean_val;
642
677
GeisGestureAttr *attrs);
645
* A structure of callback functions.
680
* The set of callback functions invoked for various gesture-related events.
682
* An application must define callback functions to handle the various gesture
683
* events. These callbacks are provided in a table passed to geis_subscribe for
684
* each window on which gesture events may occur.
647
686
typedef struct GeisGestureFuncs
688
/** Invoked when a new gesture type has been defined. */
649
689
GeisGestureCallback added;
690
/** Invoked when a defined gesture type is no longer available. */
650
691
GeisGestureCallback removed;
692
/** Invoked when a new gesture starts. */
651
693
GeisGestureCallback start;
694
/** Invoked when a gesture has changed values. */
652
695
GeisGestureCallback update;
696
/** Invoked when a gesture finishes. */
653
697
GeisGestureCallback finish;
654
698
} GeisGestureFuncs;
691
* @defgroup geis2_event_control Event Control (GEIS v2.0)
735
* @defgroup geis_v2_attrs Attributes
738
* Attributes are named values associated with various GEIS entities, including
739
* input devices, gesture types, and gesture events.
745
* An opaque type that encapsulates a GEIS attribute.
747
* GeisAttr objects may not be created or destroyed by the application, they may
748
* only have their data examined or extracted.
751
typedef struct _GeisAttr *GeisAttr;
755
* Gets the name of an attribute.
757
* @param[in] attr Identifies the attribute.
759
GEIS_API GeisString geis_attr_name(GeisAttr attr);
762
* Gets the type of an attribute value.
764
* @param[in] attr Identifies the attribute.
766
GEIS_API GeisAttrType geis_attr_type(GeisAttr attr);
769
* Gets the value of an attribute as a GeisBoolean.
771
* @param[in] attr Identifies the attribute.
773
GEIS_API GeisBoolean geis_attr_value_to_boolean(GeisAttr attr);
776
* Gets the value of an attribute as a GeisFloat.
778
* @param[in] attr Identifies the attribute.
780
GEIS_API GeisFloat geis_attr_value_to_float(GeisAttr attr);
783
* Gets the value of an attribute as a GeisInteger.
785
* @param[in] attr Identifies the attribute.
787
GEIS_API GeisInteger geis_attr_value_to_integer(GeisAttr attr);
790
* Gets the value of an attribute as a GeisPointer.
792
* @param[in] attr Identifies the attribute.
794
GEIS_API GeisPointer geis_attr_value_to_pointer(GeisAttr attr);
797
* Gets the value of an attribute as a GeisString.
799
* @param[in] attr Identifies the attribute.
801
GEIS_API GeisString geis_attr_value_to_string(GeisAttr attr);
806
* @defgroup geis_v2_event_control Event Control
693
809
* These functions are used to dispatch events generated from the various other
694
810
* GEIS components.
721
* Opaque pointer to a generic GEIS event.
838
* A generic GEIS event.
723
840
* Applications must determine the type of the actual event and convert the
724
841
* opaque pointer to a concrete event pointer, if required.
726
843
* Events are created by the GEIS API but must be destroyed by the application.
728
846
typedef struct _GeisEvent *GeisEvent;
731
850
* Destroys a GeisEvent.
851
* @memberof GeisEvent
733
* @param[in] geis The GeisEvent to destroy.
853
* @param[in] event The GeisEvent to destroy.
735
855
GEIS_API void geis_event_delete(GeisEvent event);
738
858
* Gets the type of the event.
859
* @memberof GeisEvent
740
* @param[in] geis The GeisEvent to destroy.
861
* @param[in] event The GeisEvent to destroy.
742
863
GEIS_API GeisEventType geis_event_type(GeisEvent event);
745
866
* Gets the number of attributes in the event.
867
* @memberof GeisEvent
747
* @param[in] geis The GeisEvent.
869
* @param[in] event The GeisEvent.
749
871
GEIS_API GeisSize geis_event_attr_count(GeisEvent event);
752
874
* Gets an indicated attribute from the event.
875
* @memberof GeisEvent
754
* @param[in] geis The GeisEvent.
755
* @param[in] index Indicates the attribute to retrieve.
877
* @param[in] event The GeisEvent.
878
* @param[in] index Indicates the attribute to retrieve.
757
880
GEIS_API GeisAttr geis_event_attr(GeisEvent event, GeisSize index);
760
883
* Gets a named attribute from the event.
884
* @memberof GeisEvent
762
* @param[in] geis The GeisEvent.
886
* @param[in] event The GeisEvent.
763
887
* @param[in] attr_name The name of the attribute to retrieve.
765
889
GEIS_API GeisAttr geis_event_attr_by_name(GeisEvent event, GeisString attr_name);
853
* @defgroup geis2_device Gesture Input Devices (GEIS v2.0)
976
* @defgroup geis_v2_device Input Devices
982
* @name Device Event Attributes
985
* @def GEIS_EVENT_ATTRIBUTE_DEVICE
986
* The event attribute containing a pointer to a GeisDevice.
988
* The GEIS_EVENT_DEVICE_AVAILABLE and GEIS_EVENT_DEVICE_UNAVAILABLE events
989
* should have a GEIS_ATTR_TYPE_POINTER attribute with this name. It
990
* should contain a pointer to a GeisDevice describing the device made available
856
993
#define GEIS_EVENT_ATTRIBUTE_DEVICE "device"
998
* @name Device Attributes
859
1001
* @def GEIS_DEVICE_ATTRIBUTE_NAME
860
1002
* The name of the input device. Not guaranteed unique.
866
1008
* @def GEIS_DEVICE_ATTRIBUTE_TOUCHES
867
* The simultaneous number of touches the device claims to be able to detect if
868
* it is a multi-touch device. A value of zero indicates the maximum number of
869
* touches can not be determined.
1009
* The maximum number of touches a device is capable of reporting.
1010
* This integer is the number if simultaneous touches the device claims to be
1011
* able to detect if it is a multi-touch device. A value of zero indicates the
1012
* maximum number of touches can not be determined.
871
1014
* @def GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH
872
* Indicates if this is a direct touch device (eg. touchscreen).
1015
* Indicates the device is a direct touch device.
1016
* The present of this boolean attribute with a value of GEIS_TRUE indicates the
1017
* device is a direct touch multi-touch device (for example, a touchscreen),
1018
* otherwise it is an indirect touch device (such as a touchpad) or not a touch
874
1021
* @def GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH
875
* Indicates if this is an independent touch device (eg. Apple MagicMouse).
1022
* Indicates the device is an independent touch device.
1023
* The presence of this boolean attribute with a value of GEIS_TRUE indicates
1024
* the device is an independent touch device (for example, an Apple MagicMouse).
1025
* Other multi-touch devices should report GEIS_FALSE.
877
1027
#define GEIS_DEVICE_ATTRIBUTE_NAME "device name"
878
1028
#define GEIS_DEVICE_ATTRIBUTE_ID "device id"
948
1101
* @memberof GeisDevice
950
1103
* @param[in] device The device.
1104
* @param[in] index Indicates which attr to retrieve.
952
1106
GEIS_API GeisAttr geis_device_attr(GeisDevice device, GeisSize index);
957
* @defgroup geis2_class Gesture Classes (GEIS v2.0)
1111
* @defgroup geis_v2_class Gesture Classes
962
* An opaque pointer type representing a gesture-capable input device.
1117
* @class GeisGestureClass
1118
* A defined gesture classifier.
964
* GeisDevice objects are created by the GEIS API and are reference counted. An
965
* application needs to increment and decrement the reference count of a gesture
966
* class object to control its persistence.
1120
* GeisGestureClass objects are created by the GEIS API and are reference
1121
* counted. An application needs to increment and decrement the reference
1122
* count of a gesture class object to control its persistence.
1124
/** @cond typedef */
968
1125
typedef struct _GeisGestureClass *GeisGestureClass;
1129
* @name Gesture Class Event Attributes
1132
* @def GEIS_EVENT_ATTRIBUTE_CLASS
1133
* The event attribute containing a pointer to a GeisGestureClass.
1135
* The GEIS_EVENT_CLASS_AVAILABLE and GEIS_EVENT_CLASS_UNAVAILABLE events
1136
* should have a GEIS_ATTR_TYPE_POINTER attribute with this name. It
1137
* should contain a pointer to a GeisGestureClass describing the gesture class
1138
* made available or unavailable.
1140
#define GEIS_EVENT_ATTRIBUTE_CLASS "gesture class"
1145
* @name Gesture Class Attributes
1148
* @def GEIS_CLASS_ATTRIBUTE_NAME
1149
* The name of the gesture class.
1151
* @def GEIS_CLASS_ATTRIBUTE_ID
1152
* The unique integer ID of the gesture class.
970
1154
#define GEIS_CLASS_ATTRIBUTE_NAME "class name"
971
1155
#define GEIS_CLASS_ATTRIBUTE_ID "class id"
973
#define GEIS_EVENT_ATTRIBUTE_CLASS "gesture class"
976
1160
* Registers a callback to receive gesture class change notifications.
1048
* @defgroup geis2_region Gesture Regions (GEIS v2.0)
1238
* @defgroup geis_v2_region Gesture Regions
1245
* Defines a region over which gestures may take place.
1247
/** @cond typedef */
1052
1248
typedef struct _GeisRegion *GeisRegion;
1055
* @defgroup geis2_region_init_args Gesture Region Initialization Arguments
1252
* @name Region Attributes
1255
* These attributes can be used to construct filter terms to restrict a
1256
* gesture subscription to a particular region.
1260
* @def GEIS_REGION_ATTRIBUTE_WINDOWID
1261
* The X11 windowid in which a gesture occurred. Used for filter matching.
1263
#define GEIS_REGION_ATTRIBUTE_WINDOWID "windowid"
1268
* @name Region Initialization Arguments
1057
1271
* Gesture regions are created to describe a particular display/feedback region.
1058
1272
* The type of the region can not be changed after creation (just create a new
1059
1273
* region for that). The types of regions are platform specific and each type
1060
1274
* may require addition arguments.
1062
1277
* The following region initialization argument names are required by the
1063
1278
* GEIS v2.0 specification.
1282
* @def GEIS_REGION_X11_ROOT
1283
* Selects the X11 root window as a region.
1285
* @def GEIS_REGION_X11_WINDOWID
1286
* Selects an X11 window as a region.
1287
* Requires the window_id as an argument.
1067
1289
#define GEIS_REGION_X11_ROOT "org.libgeis.region.x11.root"
1068
1291
#define GEIS_REGION_X11_WINDOWID "org.libgeis.region.x11.windowid"
1073
1296
* Creates a new GEIS v2.0 region.
1297
* @memberof GeisRegion
1075
1299
* @param[in] geis The GEIS API instance.
1076
1300
* @param[in] name A name. Used for diagnostics.
1106
* @defgroup geis2_filter Gesture Filter (GEIS v2.0)
1332
* @defgroup geis_v2_filter Gesture Filter
1339
* Selects a subset of possible gestures in a subscription.
1341
* A GeisFilter is a collection of filter terms, each of which defines a
1342
* criterion for selection of gestures returned on a subscription.
1344
* All filter terms are effectively ANDed together in a filter.
1346
/** @cond typedef */
1110
1347
typedef struct _GeisFilter *GeisFilter;
1351
* Indicates the type of filter.
1112
1353
typedef enum _GeisFilterFacility
1114
GEIS_FILTER_DEVICE = 1000,
1115
GEIS_FILTER_CLASS = 2000,
1116
GEIS_FILTER_REGION = 3000
1355
GEIS_FILTER_DEVICE = 1000, /**< Filters on device attributes. */
1356
GEIS_FILTER_CLASS = 2000, /**< Filters on gesture attributes. */
1357
GEIS_FILTER_REGION = 3000 /**< Filters on region attributes. */
1117
1358
} GeisFilterFacility;
1361
* Indicates the type of filter operation.
1119
1363
typedef enum _GeisFilterOperation
1365
GEIS_FILTER_OP_EQ, /**< Compares for equality. */
1366
GEIS_FILTER_OP_NE, /**< Compares for inequality */
1367
GEIS_FILTER_OP_GT, /**< Compares for greater-than. */
1368
GEIS_FILTER_OP_GE, /**< Compares for greater-than-or-equal. */
1369
GEIS_FILTER_OP_LT, /**< Compares for less-than. */
1370
GEIS_FILTER_OP_LE /**< Compares for less-tha-or-equal. */
1127
1371
} GeisFilterOperation;
1131
1375
* Creates a new, empty filter.
1376
* @memberof GeisFilter
1133
1378
* @param[in] geis The GEIS API instance.
1134
1379
* @param[in] name A name.
1183
* @defgroup geis2_subscription Gesture Subscription (GEIS v2.0)
1434
* @defgroup geis_v2_subscription Gesture Subscription
1440
* @class GeisSubscription
1441
* A gesture recognition subscription.
1443
/** @cond typedef */
1187
1444
typedef struct _GeisSubscription *GeisSubscription;
1190
* Flags to refine the behaviour of the gesture subscription.
1448
* @enum GeisSubscriptionFlags
1450
* These flags are used when creating a new subscription and affect the nature
1451
* of the gestures recognized by the subscription. They may ORed together.
1453
* @var GeisSubscriptionFlags::GEIS_SUBSCRIPTION_NONE
1454
* No special subscription processing: this is the default.
1456
* @var GeisSubscriptionFlags::GEIS_SUBSCRIPTION_GRAB
1457
* The subscription will "grab" all filtered gestures from subwindows.
1459
* @var GeisSubscriptionFlags::GEIS_SUBSCRIPTION_CONT
1460
* The gesture engine will return <em>gesture continuations</em>, in which the
1461
* class of a recognized gestire may change over the lifetime of the gesture.
1462
* If this flag is not set, a new gesture will be identified for each change in
1192
typedef enum _GeisSubscriptionFlags
1465
typedef enum GeisSubscriptionFlags
1194
1467
GEIS_SUBSCRIPTION_NONE = 0x0000,
1195
1468
GEIS_SUBSCRIPTION_GRAB = 0x0001,
1296
* @defgroup geis2_gesture Gesture Frames (GEIS v2.0)
1578
* @defgroup geis_v2_gesture Gesture Frames
1580
* Gesture state information.
1582
* Gesture frames, and their associated groups and touches, convey information
1583
* about the current state of recognized gestures.
1590
* A collection of gesture frames.
1592
* @class GeisGroupSet
1593
* A collection of GeisGroups.
1596
* An instance of a touch.
1598
* @class GeisTouchId
1599
* Relates a touch in a frame to a touch object in a set.
1601
* @class GeisTouchSet
1602
* A collection of GeisTouch
1605
* A collection of information describing the state of a gesture.
1607
/** @cond typedef */
1300
1608
typedef struct _GeisGroup *GeisGroup;
1301
1609
typedef struct _GeisGroupSet *GeisGroupSet;
1302
1610
typedef GeisSize GeisTouchId;
1303
1611
typedef struct _GeisTouch *GeisTouch;
1304
1612
typedef struct _GeisTouchSet *GeisTouchSet;
1305
1613
typedef struct _GeisFrame *GeisFrame;
1617
* @name Gesture Frame Event Attributes
1620
* A gesture event (GEIS_EVENT_GESTURE_BEGIN, GEIS_EVENT_GESTURE_UPDATE,
1621
* GEIS_EVENT_GESTURE_END) should have two GEIS_ATTR_TYPE_POINTER attributes,
1622
* one containing a GeisGroupSet and one containing a GeisTouchSet.
1626
* @def GEIS_EVENT_ATTRIBUTE_GROUPSET
1627
* The event attribute containing a pointer to a GeisGroupSet.
1629
* @def GEIS_EVENT_ATTRIBUTE_TOUCHSET
1630
* The event attribute containing a pointer to a GeisTouchSet.
1307
1632
#define GEIS_EVENT_ATTRIBUTE_GROUPSET "group set"
1308
1633
#define GEIS_EVENT_ATTRIBUTE_TOUCHSET "touch set"
1638
* @name Touch Attributes
1641
* Each touch has zero or more attributes associated with it. Differing hardware
1642
* is capable of reporting differing sets of touch attributes, so there is no
1643
* guarantee that any or all of the defined touch attributes will bre present.
1647
* @def GEIS_TOUCH_ATTRIBUTE_ID
1648
* Identifies the touch.
1650
* @def GEIS_TOUCH_ATTRIBUTE_X
1651
* The X coordinate of the touch.
1653
* @def GEIS_TOUCH_ATTRIBUTE_Y
1654
* The Y coordinate of the touch.
1656
#define GEIS_TOUCH_ATTRIBUTE_ID "touch id"
1657
#define GEIS_TOUCH_ATTRIBUTE_X "touch x"
1658
#define GEIS_TOUCH_ATTRIBUTE_Y "touch y"
1311
1663
* Gets the number of gesture groups in a groupset.
1664
* @memberof GeisGroupSet
1313
1666
* @param[in] groupset The groupset.