webOS Userland
Native system APIs for webOS
lgnc_openapi_types.h
1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #include <linux/input.h>
8 
9 typedef enum LGNC_STATUS_T {
10  LGNC_OK = 0,
11  LGNC_HANDLED = 0,
12  LGNC_NOT_HANDLED = -1,
13  LGNC_ERROR = -1,
14  LGNC_BLOCKED = -2,
15  LGNC_INVALID_PARAMS = -3,
16  LGNC_NOT_ENOUGH_MEMORY = -4,
17  LGNC_TIMEOUT = -5,
18  LGNC_NOT_SUPPORTED = -6,
19  LGNC_BUFFER_FULL = -7,
20  LGNC_HOST_NOT_CONNECTED = -8,
21  LGNC_VERSION_MISMATCH = -9,
22  LGNC_ALREADY_REGISTERED = -10,
23  LGNC_LAST = -10,
24  LGNC_NOT_INITIALIZED = -11,
25 } LGNC_STATUS_T;
26 
27 typedef enum LGNC_MSG_TYPE_T {
28  LGNC_MSG_NONE = 0,
29  LGNC_MSG_FOCUS_IN = 1,
30  LGNC_MSG_FOCUS_OUT = 2,
31  LGNC_MSG_TERMINATE = 3,
32  LGNC_MSG_HOST_EVENT = 4,
33  LGNC_MSG_PAUSE = 5,
34  LGNC_MSG_RESUME = 6,
35  LGNC_MSG_LAST = -1
36 } LGNC_MSG_TYPE_T;
37 
38 typedef enum LGNC_KEY_COND_T {
39  LGNC_KEY_PRESS = 0,
40  LGNC_KEY_RELEASE = 1,
41  LGNC_KEY_REPEAT = 2,
42  LGNC_KEY_DRAG = 3,
43  LGNC_KEY_POWER = 4,
44  LGNC_KEY_GESTURE = 5,
45  LGNC_KEY_COND_LAST = 6,
46 } LGNC_KEY_COND_T;
47 
48 typedef enum LGNC_INPUT_DEV_TYPE_T {
49  LGNC_INPUT_TYPE_NONE = 0,
50  LGNC_INPUT_TYPE_KEYBOARD = 1,
51  LGNC_INPUT_TYPE_MOUSE = 2,
52  LGNC_INPUT_TYPE_JOYSTICK = 4,
53  LGNC_INPUT_TYPE_REMOTE = 8,
54  LGNC_INPUT_TYPE_VIRTUAL = 16,
55  LGNC_INPUT_TYPE_KEY_RETURN = 32,
56  LGNC_INPUT_TYPE_CURSOR_RETURN = 64,
57  LGNC_INPUT_LGE = 128,
58  LGNC_INPUT_TYPE_NLP = 1024,
59  LGNC_INPUT_TYPE_SMARTREMOTE = 2048,
60  LGNC_INPUT_TYPE_XPAD = 4096,
61  LGNC_INPUT_TYPE_HIDPAD = 8192,
62  LGNC_INPUT_TYPE_WIDI = 16384,
63  LGNC_INPUT_TYPE_PS3 = 32768,
64  LGNC_INPUT_TYPE_ALL = 65023,
65 } LGNC_INPUT_DEV_TYPE_T;
66 
68  struct input_event event;
69  int deviceID;
70  LGNC_INPUT_DEV_TYPE_T deviceType;
72 
73 typedef struct LGNC_CALLBACKS_T {
74  LGNC_STATUS_T (*msgHandler)(LGNC_MSG_TYPE_T msg, unsigned int submsg, char *pData, unsigned short dataSize);
75 
76  unsigned int (*keyEventCallback)(unsigned int key, LGNC_KEY_COND_T keyCond, LGNC_ADDITIONAL_INPUT_INFO_T *keyInput);
77 
78  unsigned int (*mouseEventCallback)(int posX, int posY, unsigned int key, LGNC_KEY_COND_T keyCond,
80 
81  void (*joystickEventCallback)(LGNC_ADDITIONAL_INPUT_INFO_T *e);
83 
84 #ifdef __cplusplus
85 }
86 #endif
Definition: lgnc_openapi_types.h:67
Definition: lgnc_openapi_types.h:73