![]() |
GEIS
2.0
Gesture Engine Interface Support
|
#include <geis/geisimpl.h>Data Structures | |
| class | GeisWinInfo |
| struct | GeisInputFuncs |
| Callback functions used to handle changes in the available input devices. More... | |
| struct | GeisGestureAttr |
| An individual gesture attribute. More... | |
| struct | GeisGestureFuncs |
| The set of callback functions invoked for various gesture-related events. More... | |
Macros | |
| #define | GEIS_VERSION_1_0 |
| GEIS version macros. More... | |
| #define | GEIS_VERSION_2_0 |
| #define | GEIS_FALSE |
| #define | GEIS_TRUE |
| #define | GEIS_GESTURE_DRAG |
| #define | GEIS_GESTURE_PINCH |
| #define | GEIS_GESTURE_ROTATE |
| #define | GEIS_GESTURE_TAP |
| #define | GEIS_GESTURE_TOUCH |
| #define | GEIS_GESTURE_FLICK |
| #define | GEIS_GESTURE_PRIMITIVE_DRAG |
| #define | GEIS_GESTURE_PRIMITIVE_PINCH |
| #define | GEIS_GESTURE_PRIMITIVE_ROTATE |
| #define | GEIS_GESTURE_PRIMITIVE_TAP |
| #define | GEIS_GESTURE_PRIMITIVE_TOUCH |
| #define | GEIS_GESTURE_ID_FLICK |
| #define | GEIS_GESTURE_TYPE_DRAG1 |
| #define | GEIS_GESTURE_TYPE_DRAG2 |
| #define | GEIS_GESTURE_TYPE_DRAG3 |
| #define | GEIS_GESTURE_TYPE_DRAG4 |
| #define | GEIS_GESTURE_TYPE_DRAG5 |
| #define | GEIS_GESTURE_TYPE_PINCH1 |
| #define | GEIS_GESTURE_TYPE_PINCH2 |
| #define | GEIS_GESTURE_TYPE_PINCH3 |
| #define | GEIS_GESTURE_TYPE_PINCH4 |
| #define | GEIS_GESTURE_TYPE_PINCH5 |
| #define | GEIS_GESTURE_TYPE_ROTATE1 |
| #define | GEIS_GESTURE_TYPE_ROTATE2 |
| #define | GEIS_GESTURE_TYPE_ROTATE3 |
| #define | GEIS_GESTURE_TYPE_ROTATE4 |
| #define | GEIS_GESTURE_TYPE_ROTATE5 |
| #define | GEIS_GESTURE_TYPE_TAP1 |
| #define | GEIS_GESTURE_TYPE_TAP2 |
| #define | GEIS_GESTURE_TYPE_TAP3 |
| #define | GEIS_GESTURE_TYPE_TAP4 |
| #define | GEIS_GESTURE_TYPE_TAP5 |
| #define | GEIS_GESTURE_TYPE_TOUCH1 |
| #define | GEIS_GESTURE_TYPE_TOUCH2 |
| #define | GEIS_GESTURE_TYPE_TOUCH3 |
| #define | GEIS_GESTURE_TYPE_TOUCH4 |
| #define | GEIS_GESTURE_TYPE_TOUCH5 |
| #define | GEIS_GESTURE_TYPE_SYSTEM |
| A special gesture type than enabled system-wide gesture priority. More... | |
| #define | GEIS_GESTURE_TYPE_FLICK1 |
| #define | GEIS_GESTURE_TYPE_FLICK2 |
| #define | GEIS_GESTURE_TYPE_FLICK3 |
| #define | GEIS_GESTURE_TYPE_FLICK4 |
| #define | GEIS_GESTURE_TYPE_FLICK5 |
Standard Initialization Arguments | |
| |
| #define | GEIS_INIT_SERVICE_PROVIDER |
| #define | GEIS_INIT_TRACK_DEVICES |
| #define | GEIS_INIT_TRACK_GESTURE_CLASSES |
| #define | GEIS_INIT_SYNCHRONOUS_START |
Required Configuration Items | |
| |
| #define | GEIS_CONFIGURATION_FD |
Device Event Attributes | |
| #define | GEIS_EVENT_ATTRIBUTE_DEVICE |
Gesture Class Event Attributes | |
| #define | GEIS_EVENT_ATTRIBUTE_CLASS |
Region Attributes | |
| |
| #define | GEIS_REGION_ATTRIBUTE_WINDOWID |
Gesture Frame Event Attributes | |
For example: If four fingers are being simultaneously moved over a touchpad or touchscreen surface, Geis could start generating gesture events containing two groups: One group having a single frame from a four-fingers gesture of some class and a second group having two frames, each from a different two-fingers gesture (like one from a Rotate and the other from a Pinch gesture). This means that geis could interpret the movements of those four touch points as both a single four-fingers gesture and as two separate two-fingers gestures. There can be only a single frame per gesture in a gesture event. I.e. no two frames will return the same GeisGestureId in the same gesture event. | |
| #define | GEIS_EVENT_ATTRIBUTE_GROUPSET |
| #define | GEIS_EVENT_ATTRIBUTE_TOUCHSET |
| #define | GEIS_EVENT_ATTRIBUTE_CONSTRUCTION_FINISHED |
Typedefs | |
| typedef enum GeisStatus | GeisStatus |
| Errors returned from calls. More... | |
| typedef enum GeisAttrType | GeisAttrType |
| Attribute data types. More... | |
Enumerations | |
| enum | GeisStatus { GEIS_STATUS_SUCCESS, GEIS_STATUS_CONTINUE, GEIS_STATUS_EMPTY, GEIS_STATUS_NOT_SUPPORTED, GEIS_BAD_ARGUMENT, GEIS_UNKNOWN_ERROR, GEIS_STATUS_BAD_ARGUMENT, GEIS_STATUS_UNKNOWN_ERROR } |
| Errors returned from calls. More... | |
| enum | GeisAttrType { GEIS_ATTR_TYPE_UNKNOWN, GEIS_ATTR_TYPE_BOOLEAN, GEIS_ATTR_TYPE_FLOAT, GEIS_ATTR_TYPE_INTEGER, GEIS_ATTR_TYPE_POINTER, GEIS_ATTR_TYPE_STRING } |
| Attribute data types. More... | |
Standard fundamental gesture attributes | |
| #define | GEIS_GESTURE_ATTRIBUTE_ANGLE |
| #define | GEIS_GESTURE_ATTRIBUTE_ANGLE_DELTA |
| #define | GEIS_GESTURE_ATTRIBUTE_ANGULAR_VELOCITY |
| #define | GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_X1 |
| #define | GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_Y1 |
| #define | GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_X2 |
| #define | GEIS_GESTURE_ATTRIBUTE_BOUNDINGBOX_Y2 |
| #define | GEIS_GESTURE_ATTRIBUTE_CHILD_WINDOW_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_CENTROID_X |
| #define | GEIS_GESTURE_ATTRIBUTE_CENTROID_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_DELTA_X |
| #define | GEIS_GESTURE_ATTRIBUTE_DELTA_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_DEVICE_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_EVENT_WINDOW_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_FOCUS_X |
| #define | GEIS_GESTURE_ATTRIBUTE_FOCUS_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_GESTURE_NAME |
| #define | GEIS_GESTURE_ATTRIBUTE_POSITION_X |
| #define | GEIS_GESTURE_ATTRIBUTE_POSITION_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_RADIAL_VELOCITY |
| #define | GEIS_GESTURE_ATTRIBUTE_RADIUS_DELTA |
| #define | GEIS_GESTURE_ATTRIBUTE_RADIUS |
| #define | GEIS_GESTURE_ATTRIBUTE_ROOT_WINDOW_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_TAP_TIME |
| #define | GEIS_GESTURE_ATTRIBUTE_TIMESTAMP |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCHES |
| #define | GEIS_GESTURE_ATTRIBUTE_VELOCITY_X |
| #define | GEIS_GESTURE_ATTRIBUTE_VELOCITY_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_0_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_0_X |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_0_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_1_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_1_X |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_1_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_2_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_2_X |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_2_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_3_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_3_X |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_3_Y |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_4_ID |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_4_X |
| #define | GEIS_GESTURE_ATTRIBUTE_TOUCH_4_Y |
| #define | GEIS_CONFIG_UNIX_FD |
| Gets the Unix file descriptor for GEIS events. More... | |
| typedef struct GeisWinInfo | GeisWinInfo |
| GeisStatus | geis_configuration_supported (GeisInstance geis_instance, int configuration_item) |
| Indicates if a particular feaure is supported. More... | |
| GeisStatus | geis_configuration_get_value (GeisInstance geis_instance, int configuration_item, void *value) |
| Gets a feature configuration value. More... | |
| GeisStatus | geis_configuration_set_value (GeisInstance geis_instance, int configuration_item, void *value) |
| Sets a feature configuration value. More... | |
| GeisStatus | geis_event_dispatch (GeisInstance geis_instance) |
| Dispatches geis events until there are no further events available. More... | |
Vendor-defined Initialization Arguments | |
| |
| #define | GEIS_INIT_DBUS_BACKEND |
| #define | GEIS_INIT_GRAIL_BACKEND |
| #define | GEIS_INIT_XCB_BACKEND |
| #define | GEIS_INIT_NO_ATOMIC_GESTURES |
| #define | GEIS_INIT_SEND_TENTATIVE_EVENTS |
| #define | GEIS_INIT_SEND_SYNCHRONOS_EVENTS |
| GeisSize | geis_error_count (Geis geis) |
| Gets the number of status codes in the error stack. More... | |
| GeisStatus | geis_error_code (Geis geis, GeisSize index) |
| Gets the indicated status code from the error stack. More... | |
| GeisString | geis_error_message (Geis geis, GeisSize index) |
| Gets the localized error message, if any, associated with the indicated error. More... | |
Vendor-defined Configuration Items | |
| |
| #define | GEIS_CONFIG_MAX_EVENTS |
| #define | GEIS_CONFIG_ATOMIC_GESTURES |
| #define | GEIS_CONFIG_SEND_TENTATIVE_EVENTS |
| #define | GEIS_CONFIG_SEND_SYNCHRONOS_EVENTS |
| #define | GEIS_CONFIG_DRAG_THRESHOLD |
| #define | GEIS_CONFIG_DRAG_TIMEOUT |
| #define | GEIS_CONFIG_PINCH_THRESHOLD |
| #define | GEIS_CONFIG_PINCH_TIMEOUT |
| #define | GEIS_CONFIG_ROTATE_THRESHOLD |
| #define | GEIS_CONFIG_ROTATE_TIMEOUT |
| #define | GEIS_CONFIG_TAP_THRESHOLD |
| #define | GEIS_CONFIG_TAP_TIMEOUT |
| #define | GEIS_CONFIG_NUM_ACTIVE_SUBSCRIPTIONS |
| #define | GEIS_ALL_INPUT_DEVICES |
| #define | GEIS_ALL_GESTURES |
| Selects ALL input devices. More... | |
| #define | GEIS_NO_GESTURE_ID |
| #define | GEIS_DEFAULT_EVENT_CALLBACK |
| A special constant indicating the use of the default event callback. More... | |
| enum | _GeisEventType { GEIS_EVENT_DEVICE_AVAILABLE, GEIS_EVENT_DEVICE_UNAVAILABLE, GEIS_EVENT_CLASS_AVAILABLE, GEIS_EVENT_CLASS_CHANGED, GEIS_EVENT_CLASS_UNAVAILABLE, GEIS_EVENT_GESTURE_BEGIN, GEIS_EVENT_GESTURE_UPDATE, GEIS_EVENT_GESTURE_END, GEIS_EVENT_TENTATIVE_BEGIN, GEIS_EVENT_TENTATIVE_UPDATE, GEIS_EVENT_TENTATIVE_END, GEIS_EVENT_INIT_COMPLETE, GEIS_EVENT_USER_DEFINED, GEIS_EVENT_ERROR } |
| typedef unsigned int | GeisInputDeviceId |
| typedef void(* | GeisInputCallback) (void *cookie, GeisInputDeviceId device_id, void *attrs) |
| Prototype for input device callback functions. More... | |
| typedef struct GeisInputFuncs | GeisInputFuncs |
| Callback functions used to handle changes in the available input devices. More... | |
| typedef unsigned int | GeisGestureType |
| typedef unsigned int | GeisGestureId |
| typedef struct GeisGestureAttr | GeisGestureAttr |
| An individual gesture attribute. More... | |
| typedef void(* | GeisGestureCallback) (void *cookie, GeisGestureType gesture_type, GeisGestureId gesture_id, GeisSize attr_count, GeisGestureAttr *attrs) |
| A callback used for different gesture events. More... | |
| typedef struct GeisGestureFuncs | GeisGestureFuncs |
| The set of callback functions invoked for various gesture-related events. More... | |
| typedef enum _GeisEventType | GeisEventType |
| typedef void(* | GeisEventCallback) (Geis geis, GeisEvent event, void *context) |
| The application callback type for the event dispatcher. More... | |
| GeisStatus | geis_get_configuration (Geis geis, GeisString configuration_item_name, void *configuration_item_value) |
| Gets a feature configuration value. More... | |
| GeisStatus | geis_set_configuration (Geis geis, GeisString configuration_item_name, void *configuration_item_value) |
| Sets a feature configuration value. More... | |
| GeisStatus | geis_input_devices (GeisInstance geis_instance, GeisInputFuncs *func, void *cookie) |
| Registers a callback to receive information on input devices. More... | |
| GeisStatus | geis_subscribe (GeisInstance geis_instance, GeisInputDeviceId *input_list, const char **gesture_list, GeisGestureFuncs *funcs, void *cookie) |
| Registers a callback to receive gesture events. More... | |
| GeisStatus | geis_unsubscribe (GeisInstance geis_instance, GeisGestureType *gesture_list) |
| Unsubscribes to one or more gestures. More... | |
| GeisString | geis_attr_name (GeisAttr attr) |
| An opaque type that encapsulates a GEIS attribute. More... | |
| GeisAttrType | geis_attr_type (GeisAttr attr) |
| Gets the type of an attribute value. More... | |
| GeisBoolean | geis_attr_value_to_boolean (GeisAttr attr) |
| Gets the value of an attribute as a GeisBoolean. More... | |
| GeisFloat | geis_attr_value_to_float (GeisAttr attr) |
| Gets the value of an attribute as a GeisFloat. More... | |
| GeisInteger | geis_attr_value_to_integer (GeisAttr attr) |
| Gets the value of an attribute as a GeisInteger. More... | |
| GeisPointer | geis_attr_value_to_pointer (GeisAttr attr) |
| Gets the value of an attribute as a GeisPointer. More... | |
| GeisString | geis_attr_value_to_string (GeisAttr attr) |
| Gets the value of an attribute as a GeisString. More... | |
| void | geis_register_event_callback (Geis geis, GeisEventCallback event_callback, void *context) |
| Registers an event-handler callback. More... | |
| GeisStatus | geis_dispatch_events (Geis geis) |
| Pumps the GEIS event loop. More... | |
| GeisStatus | geis_next_event (Geis geis, GeisEvent *event) |
| Retrieves the next queued GEIS event. More... | |
Device Attributes | |
| #define | GEIS_DEVICE_ATTRIBUTE_NAME |
| #define | GEIS_DEVICE_ATTRIBUTE_ID |
| #define | GEIS_DEVICE_ATTRIBUTE_TOUCHES |
| #define | GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH |
| #define | GEIS_DEVICE_ATTRIBUTE_INDEPENDENT_TOUCH |
| #define | GEIS_DEVICE_ATTRIBUTE_MIN_X |
| #define | GEIS_DEVICE_ATTRIBUTE_MAX_X |
| #define | GEIS_DEVICE_ATTRIBUTE_RES_X |
| #define | GEIS_DEVICE_ATTRIBUTE_MIN_Y |
| #define | GEIS_DEVICE_ATTRIBUTE_MAX_Y |
| #define | GEIS_DEVICE_ATTRIBUTE_RES_Y |
| void | geis_register_device_callback (Geis geis, GeisEventCallback event_callback, void *context) |
| GeisDevice | geis_get_device (Geis geis, GeisInteger device_id) |
| Gets a cached device description for an identified device. More... | |
Gesture Class Attributes | |
| #define | GEIS_CLASS_ATTRIBUTE_NAME |
| #define | GEIS_CLASS_ATTRIBUTE_ID |
| void | geis_register_class_callback (Geis geis, GeisEventCallback event_callback, void *context) |
| Registers a callback to receive gesture class change notifications. More... | |
Region Initialization Arguments | |
| |
| #define | GEIS_REGION_X11_ROOT |
| #define | GEIS_REGION_X11_WINDOWID |
| enum | _GeisFilterFacility { GEIS_FILTER_DEVICE, GEIS_FILTER_CLASS, GEIS_FILTER_REGION, GEIS_FILTER_SPECIAL } |
| Indicates the type of filter. More... | |
| enum | _GeisFilterOperation { GEIS_FILTER_OP_EQ, GEIS_FILTER_OP_NE, GEIS_FILTER_OP_GT, GEIS_FILTER_OP_GE, GEIS_FILTER_OP_LT, GEIS_FILTER_OP_LE } |
| Indicates the type of filter operation. More... | |
| enum | { GEIS_SUBSCRIPTION_NONE, GEIS_SUBSCRIPTION_GRAB, GEIS_SUBSCRIPTION_CONT } |
| typedef enum _GeisFilterFacility | GeisFilterFacility |
| Indicates the type of filter. More... | |
| typedef enum _GeisFilterOperation | GeisFilterOperation |
| Indicates the type of filter operation. More... | |
| typedef int | GeisSubscriptionFlags |
| GeisStatus | geis_subscription_get_configuration (GeisSubscription subscription, GeisString config_item_name, GeisPointer config_item_value) |
| Gets a subscription-level configuration item. More... | |
| GeisStatus | geis_subscription_set_configuration (GeisSubscription subscription, GeisString config_item_name, GeisPointer config_item_value) |
| Sets a subscription-level configuration item. More... | |
Touch Attributes | |
If the touch comes from a direct device (see GEIS_DEVICE_ATTRIBUTE_DIRECT_TOUCH) its position (x and y attributes) will be in window coordinates, otherwise it will be in the input device's own coordinate system. | |
| #define | GEIS_TOUCH_ATTRIBUTE_ID |
| #define | GEIS_TOUCH_ATTRIBUTE_X |
| #define | GEIS_TOUCH_ATTRIBUTE_Y |
| GeisStatus | geis_gesture_accept (Geis geis, GeisGroup group, GeisGestureId gesture_id) |
| Marks a gesture as accepted. More... | |
| GeisStatus | geis_gesture_reject (Geis geis, GeisGroup group, GeisGestureId gesture_id) |
| Marks a gesture as rejected. More... | |
This is the public interface for the GEIS gesture API.
Copyright 2010-2013 Canonical Ltd.
This library is free software; you can redistribute it and/or modify it under the terms of version 3 of the GNU Lesser General Public License as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US
| #define GEIS_VERSION_1_0 |
GEIS version macros.
These macros can be tested at compile time to query for support of various features.