omniGlass
|
linux-evdev implementation for the omniglass touchpad platform More...
#include <asm-generic/errno-base.h>
#include <linux/input-event-codes.h>
#include <omniGlass/constants.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include "platform.h"
#include <linux/input.h>
#include "libevdev/libevdev.h"
#include <dirent.h>
Classes | |
struct | platform |
Macros | |
#define | PLATFORM_CLASS_NAME_META "platform_meta" |
#define | PLATFORM_CLASS_NAME_GLOBAL "platform" |
#define | PLATFORM_DEFAULT_DEVICE_DIRECTORY "/dev/input" |
Enumerations | |
enum | omniglass_platform_status { OMNIGLASS_PLATFORM_NO_CONFIG = -2 , OMNIGLASS_PLATFORM_EVDEV_INIT_FAILED = -1 , OMNIGLASS_PLATFORM_EVDEV_INIT_SUCCESS = 0 } |
Functions | |
void | _push_new_touch_point (lua_State *vm, touch_point *point) |
int | platform_evdev_init (lua_State *vm) |
int | platform_parse_events (lua_State *vm) |
int | platform_get_last_report (lua_State *vm) |
int | platform_get_touchpad_boundaries (lua_State *vm) |
omniglass_init_result | platform_init (struct platform **handle, lua_State *vm) |
linux-evdev implementation for the omniglass touchpad platform
int platform_evdev_init | ( | lua_State * | vm | ) |
(LUA-FACING) initialization function that detects a touchpad and sets up datastructures and functions needed by the lua VM.
start evdev
diagnostics: check if selected device does have touchpad-like event reporting
int platform_get_last_report | ( | lua_State * | vm | ) |
(LUA-FACING) push latest report from the platform into lua
int platform_get_touchpad_boundaries | ( | lua_State * | vm | ) |
(LUA-FACING) push coordinates of top-right corner into the virtual machine as a point
omniglass_init_result platform_init | ( | struct platform ** | handle, |
lua_State * | vm | ||
) |
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) this function is where the linux touchpad implementation gets its touch points from the evdev interface