63 #ifndef GUI_IAL_CUSTOM_H
64 #define GUI_IAL_CUSTOM_H
66 #define IAL_MOUSE_LEFTBUTTON (1 << 0)
67 #define IAL_MOUSE_RIGHTBUTTON (1 << 1)
68 #define IAL_MOUSE_MIDDLEBUTTON (1 << 2)
85 #define IAL_EVENT_MOUSE (1 << 0)
86 #define IAL_MOUSEEVENT IAL_EVENT_MOUSE
87 #define IAL_EVENT_KEY (1 << 1)
88 #define IAL_KEYEVENT IAL_EVENT_KEY
90 #define IAL_EVENT_EXTRA (1 << 2)
93 #ifndef AXIS_SCROLL_INVALID
94 #define AXIS_SCROLL_INVALID 0
95 #define AXIS_SCROLL_VERTICAL 1
96 #define AXIS_SCROLL_HORIZONTAL 2
98 #define AXIS_SOURCE_INVALID 0
99 #define AXIS_SOURCE_WHEEL 1
100 #define AXIS_SOURCE_FINGER 2
101 #define AXIS_SOURCE_CONTINUOUS 3
102 #define AXIS_SOURCE_WHEEL_TILT 4
105 #define IAL_EVENT_AXIS 0x0070
106 #define IAL_EVENT_BUTTONDOWN 0x0071
107 #define IAL_EVENT_BUTTONUP 0x0072
109 #define IAL_EVENT_TOUCH_DOWN 0x0073
110 #define IAL_EVENT_TOUCH_UP 0x0074
111 #define IAL_EVENT_TOUCH_MOTION 0x0075
112 #define IAL_EVENT_TOUCH_CANCEL 0x0076
113 #define IAL_EVENT_TOUCH_FRAME 0x0077
115 #ifndef SWITCH_INVALID
116 #define SWITCH_INVALID 0
118 #define SWITCH_TABLET_MODE 2
120 #define SWITCH_STATE_INVALID 0
121 #define SWITCH_STATE_ON 1
122 #define SWITCH_STATE_OFF 2
125 #define IAL_EVENT_SWITCH_TOGGLE 0x007A
127 #define IAL_EVENT_GESTURE_SWIPE_BEGIN 0x0080
128 #define IAL_EVENT_GESTURE_SWIPE_UPDATE 0x0081
129 #define IAL_EVENT_GESTURE_SWIPE_END 0x0082
130 #define IAL_EVENT_GESTURE_PINCH_BEGIN 0x0083
131 #define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
132 #define IAL_EVENT_GESTURE_PINCH_END 0x0085
134 #ifndef TABLET_TOOL_X
135 #define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
136 #define TABLET_TOOL_PROXIMITY_STATE_OUT 1
137 #define TABLET_TOOL_PROXIMITY_STATE_IN 2
139 #define TABLET_TOOL_TIP_INVALID 0
140 #define TABLET_TOOL_TIP_UP 1
141 #define TABLET_TOOL_TIP_DOWN 2
143 #define TABLET_BUTTON_STATE_INVALID 0
144 #define TABLET_BUTTON_STATE_RELEASED 1
145 #define TABLET_BUTTON_STATE_PRESSED 2
147 #define TABLET_PAD_RING_SOURCE_UNKNOWN 0
148 #define TABLET_PAD_RING_SOURCE_FINGER 1
150 #define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
151 #define TABLET_PAD_STRIP_SOURCE_FINGER 1
153 #define TABLET_TOOL_CHANGED_X (1 << 0)
154 #define TABLET_TOOL_CHANGED_Y (1 << 1)
155 #define TABLET_TOOL_CHANGED_PRESSURE (1 << 2)
156 #define TABLET_TOOL_CHANGED_DISTANCE (1 << 3)
157 #define TABLET_TOOL_CHANGED_TILT_X (1 << 4)
158 #define TABLET_TOOL_CHANGED_TILT_Y (1 << 5)
159 #define TABLET_TOOL_CHANGED_ROTATION (1 << 6)
160 #define TABLET_TOOL_CHANGED_SLIDER (1 << 7)
161 #define TABLET_TOOL_CHANGED_SIZE_MAJOR (1 << 8)
162 #define TABLET_TOOL_CHANGED_SIZE_MINOR (1 << 9)
163 #define TABLET_TOOL_CHANGED_WHEEL (1 << 10)
165 #define TABLET_TOOL_X 0
166 #define TABLET_TOOL_Y 1
167 #define TABLET_TOOL_PRESSURE 2
168 #define TABLET_TOOL_DISTANCE 3
169 #define TABLET_TOOL_TILT_X 4
170 #define TABLET_TOOL_TILT_Y 5
171 #define TABLET_TOOL_ROTATION 6
172 #define TABLET_TOOL_SLIDER 7
173 #define TABLET_TOOL_SIZE_MAJOR 8
174 #define TABLET_TOOL_SIZE_MINOR 9
175 #define TABLET_TOOL_WHEEL 10
179 #define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
180 #define IAL_EVENT_TABLET_TOOL_PROXIMITY 0x0091
181 #define IAL_EVENT_TABLET_TOOL_TIP 0x0092
182 #define IAL_EVENT_TABLET_TOOL_BUTTON 0x0093
184 #define IAL_EVENT_TABLET_PAD_BUTTON 0x0094
185 #define IAL_EVENT_TABLET_PAD_RING 0x0095
186 #define IAL_EVENT_TABLET_PAD_STRIP 0x0096
188 #define IAL_EVENT_USER_BEGIN 0x009A
189 #define IAL_EVENT_USER_UPDATE 0x009B
190 #define IAL_EVENT_USER_END 0x009C
192 #define NR_PACKED_SUB_EVENTS 16
194 typedef struct _EXTRA_INPUT_EVENT {
200 unsigned int params_mask;
201 WPARAM wparams[NR_PACKED_SUB_EVENTS];
202 LPARAM lparams[NR_PACKED_SUB_EVENTS];
205 #define IAL_LEN_MDEV 127
207 typedef struct tagINPUT {
211 BOOL (*init_input) (
struct tagINPUT *input,
const char* mdev,
const char* mtype);
212 void (*term_input) (void);
215 int (*update_mouse) (void);
216 void (*get_mouse_xy) (
int* x,
int* y);
217 void (*set_mouse_xy) (
int x,
int y);
218 int (*get_mouse_button) (void);
219 void (*set_mouse_range) (
int minx,
int miny,
int maxx,
int maxy);
220 void (*suspend_mouse) (void);
221 int (*resume_mouse) (void);
224 int (*update_keyboard) (void);
225 const char* (*get_keyboard_state) (void);
226 void (*suspend_keyboard) (void);
227 int (*resume_keyboard) (void);
228 void (*set_leds) (
unsigned int leds);
231 int (*wait_event) (
int which,
int maxfd, fd_set *in, fd_set *out,
232 fd_set *except,
struct timeval *timeout);
235 int (*wait_event_ex) (
int maxfd, fd_set *in, fd_set *out,
236 fd_set *except,
struct timeval *timeout, EXTRA_INPUT_EVENT* extra);
247 extern BOOL InitCustomInput (INPUT* input,
const char* mdev,
const char* mtype);
248 extern void TermCustomInput (
void);