omniGlass
|
the omniglass public API definition. More...
Go to the source code of this file.
Classes | |
struct | omniglass_raw_touchpoint |
struct | omniglass_raw_report |
struct | omniglass_raw_specifications |
Typedefs | |
typedef struct omniglass_raw_touchpoint | omniglass_raw_touchpoint |
typedef struct omniglass_raw_report | omniglass_raw_report |
typedef struct omniglass_raw_specifications | omniglass_raw_specifications |
typedef void(* | omniglass_callback_touches_changed) (omniglass_raw_report *, void *) |
typedef void(* | omniglass_callback_slide) (double, double, void *) |
typedef void(* | omniglass_callback_pressed) (int) |
typedef void(* | omniglass_callback_released) (int) |
typedef void(* | omniglass_callback_edge) (double, void *) |
Functions | |
omniglass_operation_results | omniglass_init (struct omniglass **handle) |
int | omniglass_step (struct omniglass *handle) |
omniglass_operation_results | omniglass_get_raw_report (struct omniglass *handle, omniglass_raw_report **report) |
omniglass_operation_results | omniglass_get_touchpad_specifications (struct omniglass *handle, omniglass_raw_specifications **specs) |
int | omniglass_register_callback (struct omniglass *handle, void(*callback)(), omniglass_touchpad_edge edge) |
omniglass_operation_results | omniglass_listen_gesture_touches_changed (struct omniglass *handle, omniglass_callback_touches_changed callback, void *passthrough) |
omniglass_gesture_operation_result | omniglass_listen_gesture_slide (struct omniglass *handle, omniglass_callback_slide callback, void *passthrough) |
void | omniglass_disable_gesture_slide (struct omniglass *handle) |
omniglass_gesture_operation_result | omniglass_listen_gesture_edge (struct omniglass *handle, omniglass_callback_edge callback, omniglass_touchpad_edge edge, void *passthrough) |
void | omniglass_disable_gesture_edge (struct omniglass *handle) |
omniglass_gesture_operation_result | omniglass_listen_gesture_edge_left (struct omniglass *handle, omniglass_callback_edge callback, void *passthrough) |
omniglass_gesture_operation_result | omniglass_listen_gesture_edge_right (struct omniglass *handle, omniglass_callback_edge callback, void *passthrough) |
omniglass_gesture_operation_result | omniglass_listen_gesture_edge_top (struct omniglass *handle, omniglass_callback_edge callback, void *passthrough) |
omniglass_gesture_operation_result | omniglass_listen_gesture_edge_bottom (struct omniglass *handle, omniglass_callback_edge callback, void *passthrough) |
omniglass_gesture_operation_result | omniglass_enable_parameter_swipe (struct omniglass *handle, double *swipe_x, double *swipe_y) |
the omniglass public API definition.
the omniglass API gives applications means to detect and probe for gesture events on touchpad devices.
typedef struct omniglass_raw_report omniglass_raw_report |
a report of contact points, barely filtered from the latest input events acquired from the platform
typedef struct omniglass_raw_specifications omniglass_raw_specifications |
a representation of the touchpad's capabilities relevant to gesture detection.
typedef struct omniglass_raw_touchpoint omniglass_raw_touchpoint |
representation of a potential contact point between a finger and the touchpad.
void omniglass_disable_gesture_edge | ( | struct omniglass * | handle | ) |
disable all edge scroll detection callbacks.
[in] | handle | the omniglass handle. |
void omniglass_disable_gesture_slide | ( | struct omniglass * | handle | ) |
remove the listener for touch slide gestures.
[in] | handle | a handle to omniglass. |
omniglass_operation_results omniglass_get_raw_report | ( | struct omniglass * | handle, |
omniglass_raw_report ** | report | ||
) |
get the address of the report for raw touch points get the address of the memory region where the touch report from the active touchpad is located.
[in] | handle | the handle to omniglass |
[out] | report | (output) after executing this function, the content of report will be a pointer to the raw multitouch report of the active touchpad. |
omniglass_operation_results omniglass_get_touchpad_specifications | ( | struct omniglass * | handle, |
omniglass_raw_specifications ** | specs | ||
) |
get address of touchpad specifications. get the address of the memory region where the width, height and other parameters from the active touchpad are defined.
[in] | handle | the handle to omniglass. |
[out] | specs | (output) after executing this function the content of specs will be a pointer to the raw specifications of the active touchpad. |
omniglass_operation_results omniglass_init | ( | struct omniglass ** | handle | ) |
make sure to call this initializer before anything else
[in] | handle | a pointer to a pointer of an omniglass handle. |
omniglass_gesture_operation_result omniglass_listen_gesture_edge | ( | struct omniglass * | handle, |
omniglass_callback_edge | callback, | ||
omniglass_touchpad_edge | edge, | ||
void * | passthrough | ||
) |
schedule a function to be called whenever fingers have dragged accross a certain edge.
[in] | handle | the omniglass handle. |
[in] | callback | this function is called upon edge scroll |
[in] | edge | one of the touchpad's 4 edges where the dragging will be scanned for |
[in,out] | passthrough | this arbitrary data is forwarded to the callback function. |
omniglass_gesture_operation_result omniglass_listen_gesture_slide | ( | struct omniglass * | handle, |
omniglass_callback_slide | callback, | ||
void * | passthrough | ||
) |
set a callback function for finger slide. whenever at least one finger has been in contact accross the surface and its contact position has moved since the last call to omniglass_step(), this callback is triggered.
[in] | handle | the handle to omniGlass. |
[in,out] | callback | the function that will be called when a slide has happen |
register a listener for touch slide gestures.
handle | a handle to omniglass. |
callback | this function will be called whenever a slide gesture is detected. |
passthrough | an optional pointer containing data that can be used by the callback. |
omniglass_operation_results omniglass_listen_gesture_touches_changed | ( | struct omniglass * | handle, |
omniglass_callback_touches_changed | callback, | ||
void * | passthrough | ||
) |
set a callback function for points touched. if the number of appendages contacting the surface changes, this callback is triggered. the callback function is called.
[in] | handle | the omniglass handle. |
[in] | callback | the callback for the event. |
[in,out] | passthrough | whatever pointer is placed here will be forwarded unchanged to the callback. |
(PUBLIC) register callback for touch started
int omniglass_step | ( | struct omniglass * | handle | ) |
this function must be called at ~100hz in the application's main loop in non-blocking mode, or as soon as possible in a separate thread.
[in] | handle | the handle to omniglass |
step function. user code must schedule to call this at ~100hz or more for responsiveness