17 #ifndef _LLD_GINPUT_MOUSE_H
18 #define _LLD_GINPUT_MOUSE_H
23 #include "../gdriver/gdriver.h"
25 typedef struct GMouseReading {
30 #if !GINPUT_TOUCH_NOCALIBRATE
31 typedef struct GMouseCalibration {
41 typedef struct GMouse {
45 #define GMOUSE_FLG_CLICK_TIMER 0x0001
46 #define GMOUSE_FLG_INDELTA 0x0002
47 #define GMOUSE_FLG_CLIP 0x0004
48 #define GMOUSE_FLG_CALIBRATE 0x0008
49 #define GMOUSE_FLG_IN_CAL 0x0010
50 #define GMOUSE_FLG_FINGERMODE 0x0020
51 #define GMOUSE_FLG_NEEDREAD 0x0040
52 #define GMOUSE_FLG_DRIVER_FIRST 0x0100
56 #if !GINPUT_TOUCH_NOCALIBRATE
57 GMouseCalibration caldata;
62 typedef struct GMouseJitter {
68 typedef struct GMouseVMT {
70 #define GMOUSE_VFLG_TOUCH 0x0001
71 #define GMOUSE_VFLG_NOPOLL 0x0002
72 #define GMOUSE_VFLG_SELFROTATION 0x0004
73 #define GMOUSE_VFLG_DEFAULTFINGER 0x0008
74 #define GMOUSE_VFLG_CALIBRATE 0x0010
75 #define GMOUSE_VFLG_CAL_EXTREMES 0x0020
76 #define GMOUSE_VFLG_CAL_TEST 0x0040
77 #define GMOUSE_VFLG_ONLY_DOWN 0x0100
78 #define GMOUSE_VFLG_POORUPDOWN 0x0200
79 #define GMOUSE_VFLG_DYNAMICONLY 0x8000
85 GMouseJitter pen_jitter;
86 GMouseJitter finger_jitter;
88 gBool (*init)(GMouse *m,
unsigned driverinstance);
89 void (*deinit)(GMouse *m);
90 gBool (*get)(GMouse *m, GMouseReading *prd);
91 void (*calsave)(GMouse *m,
const void *buf, gMemSize sz);
92 gBool (*calload)(GMouse *m,
void *buf, gMemSize sz);
95 #define gmvmt(m) ((const GMouseVMT const *)((m)->d.vmt))
102 #if !defined(GINPUT_MOUSE_DRIVER_LIST)
103 #undef GMOUSE_DRIVER_VMT
104 #define GMOUSE_DRIVER_VMT GMOUSEVMT_OnlyOne
124 gBool _gmouseInitDriver(
GDriver *g,
void *display,
unsigned driverinstance,
unsigned systeminstance);
135 void _gmousePostInitDriver(
GDriver *g);
146 void _gmouseDeInitDriver(
GDriver *g);
155 void _gmouseWakeup(GMouse *m);
165 void _gmouseWakeupI(GMouse *m);
gI16 gCoord
The type for a coordinate or length on the screen.
All runtime driver structures start with this structure.
All driver VMT's start with this structure.
Type for a 2D point on the screen.