These functions are used to dispatch events generated from the various other GEIS components.
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
} |
|
These functions are used to dispatch events generated from the various other GEIS components.
Applications must invoke geis_dispatch_events() from time to time to generate input device, gesture type, and gesture events. The GEIS events are then retrieved either from the internal event queue using the geis_next_event() call or through an application-supplied callback set through the geis_register_event_callback() call.
#define GEIS_DEFAULT_EVENT_CALLBACK |
A special constant indicating the use of the default event callback.
typedef void(* GeisEventCallback) (Geis geis, GeisEvent event, void *context) |
The application callback type for the event dispatcher.
- Parameters
-
[in] | geis | the GEIS API instance |
[in] | event | the opaque event pointer |
[in] | context | the application-supplied context value |
Pumps the GEIS event loop.
- Parameters
-
[in] | geis | The GEIS API instance. |
Processes input events until there are no more input events to process and generates zero or more gesture events, reporting them via the user-supplied callback or pushing them on the internal event queue for retrieval via the geis_next_event() call.
- Return values
-
GEIS_STATUS_SUCCESS | The event loop was successfully pumped and no further events remain to be processed at this time. |
GEIS_STATUS_CONTINUE | The event loop was successfully pumped but the system detected there are events still remaining to be processed. |
GEIS_STATUS_UNKNOWN_ERROR | Some error occurred |
GeisAttr geis_event_attr |
( |
GeisEvent |
event, |
|
|
GeisSize |
index |
|
) |
| |
Gets an indicated attribute from the event.
- Parameters
-
[in] | event | The GeisEvent. |
[in] | index | Indicates the attribute to retrieve. |
GeisAttr geis_event_attr_by_name |
( |
GeisEvent |
event, |
|
|
GeisString |
attr_name |
|
) |
| |
Gets a named attribute from the event.
- Parameters
-
[in] | event | The GeisEvent. |
[in] | attr_name | The name of the attribute to retrieve. |
GeisSize geis_event_attr_count |
( |
GeisEvent |
event | ) |
|
Gets the number of attributes in the event.
- Parameters
-
GeisEventType geis_event_type |
( |
GeisEvent |
event | ) |
|
Gets the type of the event.
- Parameters
-
Retrieves the next queued GEIS event.
- Parameters
-
[in] | geis | The GEIS API instance. |
[out] | event | The GeisEvent retrieved, if any. |
Pulls the next available GeisEvent from the internal event queue, if any, and indicates whether there are more events left.
- Return values
-
GEIS_STATUS_SUCCESS | An event was successfully pulled from the queue and the queue is now empty. |
GEIS_STATUS_CONTINUE | An event was successfully pulled from the queue and one or more events remain in the queue. |
GEIS_STATUS_EMPTY | No event was pulled from the queue because it is empty. The value of *event remains unchanged. |
GEIS_STATUS_UNKNOWN_ERROR | Some error occurred |
Registers an event-handler callback.
- Parameters
-
[in] | geis | the GEIS API instance |
[in] | event_callback | the callback to register |
[in] | context | the caller context |
This function registers the callback to be executed whenever a new GeisEvent is generated. The default function pushes the GeisEvent onto an internal queue to be picked up by a call to geis_next_event().
Calling geis_register_event_callback() with a callback of GEIS_DEFAULT_EVENT_CALLBACK replaces any registered function wit hthe default function.
The callback is executed in the same thread context as the one geis_dispatch_events() is called from.