omniGlass
|
interface with touchpad drivers More...
Go to the source code of this file.
Classes | |
struct | touch_point |
struct | extended_touch_parameter |
struct | multitouch_report |
struct | touchpad_params |
Typedefs | |
typedef struct touch_point | touch_point |
typedef enum touchParameter | touch_parameter |
typedef unsigned int | touch_pressure |
typedef unsigned int | touch_area |
typedef unsigned int | touch_distance_to_surface |
typedef struct extended_touch_parameter | extended_touch_parameter |
typedef struct multitouch_report | multitouch_report |
typedef struct touchpad_params | touchpad_params |
Enumerations | |
enum | touchParameter { PRESSURE , AREA , DISTANCE_TO_SURFACE } |
Functions | |
omniglass_init_result | platform_init (struct platform **platform, lua_State *vm) |
int | multitouch_next_report (struct multitouch_report *report) |
void | get_touchpad_parameters (struct omniglass *handle, struct touchpad_params *destination) |
int | platform_parse_events (lua_State *vm) |
int | platform_get_last_report (lua_State *vm) |
interface with touchpad drivers
Touchpad enumeration, selection and multitouch report generation are implemented by the platform layer.
Initialization of this subsystem happens on the C-side, however most functions here are expected to be called from the lua-side, be it directly or through userdata metatable indexing.
typedef struct extended_touch_parameter extended_touch_parameter |
an extended parameter associated with a touch point. parameters must be associated to their parent points. raw data associated to a parameter must be casted to its corresponding type.
typedef struct multitouch_report multitouch_report |
central data structure for touch tracking. this data structure contains position data associated to each point. NOTE: Exact number of touches on every multitouch report is per-session, computed at initialization time.
typedef enum touchParameter touch_parameter |
type identification for extended parameters of a touch contact (might eventually include crazy stuff like material type, distance to actual surface, etc) @
typedef struct touch_point touch_point |
Touch point in left-to-right x and bottom-to-top y. Touch points include a touch ID;
typedef struct touchpad_params touchpad_params |
internal touchpad parameters straight from the drivers. do not mistake this for the public touchpad specification from the API, which has normalized dimensions!
enum touchParameter |
type identification for extended parameters of a touch contact (might eventually include crazy stuff like material type, distance to actual surface, etc) @
int platform_get_last_report | ( | lua_State * | vm | ) |
(LUA-FACING) called by the lua VM to get the last touch report generated.
(LUA-FACING) push latest report from the platform into lua
omniglass_init_result platform_init | ( | struct platform ** | handle, |
lua_State * | vm | ||
) |
initialize the platform. you MUST call the platform init before using any other platform function. you MUST ensure any lua state passed into the other functions has been passed to this function first.
platform | a pointer to a pointer of a platform. |
vm | the lua state that will use platform functions. |
this function pushes the entire platform internal API and state into a lua table
handle | a pointer to a pointer of a handle to create. |
vm | an already-initialized lua state to be injected with the internal platform API |
int platform_parse_events | ( | lua_State * | vm | ) |
(LUA-FACING) called by the lua VM to convert the latest events into a touch report.
(LUA-FACING) this function is where the linux touchpad implementation gets its touch points from the evdev interface