24 #ifndef _GINPUT_MOUSE_H
25 #define _GINPUT_MOUSE_H
27 #if GINPUT_NEED_MOUSE || defined(__DOXYGEN__)
34 typedef struct GEventMouse_t {
40 #define GINPUT_MOUSE_BTN_MASK 0x000F
41 #define GINPUT_MOUSE_BTN_LEFT 0x0001
42 #define GINPUT_MOUSE_BTN_RIGHT 0x0002
43 #define GINPUT_MOUSE_BTN_MIDDLE 0x0004
44 #define GINPUT_MOUSE_BTN_4 0x0008
45 #define GINPUT_TOUCH_PRESSED 0x0001
47 #define GMETA_MASK 0x00F0
48 #define GMETA_NONE 0x0000
49 #define GMETA_MOUSE_DOWN 0x0010
50 #define GMETA_MOUSE_UP 0x0020
51 #define GMETA_MOUSE_CLICK 0x0040
52 #define GMETA_MOUSE_CXTCLICK 0x0080
54 #define GINPUT_MISSED_MOUSE_EVENT 0x8000
60 #define GLISTEN_MOUSEMETA 0x0001
61 #define GLISTEN_MOUSEDOWNMOVES 0x0002
62 #define GLISTEN_MOUSEUPMOVES 0x0004
63 #define GLISTEN_MOUSENOFILTER 0x0008
64 #define GLISTEN_TOUCHMETA GLISTEN_MOUSEMETA
65 #define GLISTEN_TOUCHDOWNMOVES GLISTEN_MOUSEDOWNMOVES
66 #define GLISTEN_TOUCHUPMOVES GLISTEN_MOUSEUPMOVES
67 #define GLISTEN_TOUCHNOFILTER GLISTEN_MOUSENOFILTER
70 #define GEVENT_MOUSE (GEVENT_GINPUT_FIRST+0)
71 #define GEVENT_TOUCH (GEVENT_GINPUT_FIRST+1)
74 #define GMOUSE_ALL_INSTANCES ((unsigned)-1)
gI16 gCoord
The type for a coordinate or length on the screen.
GDisplay * ginputGetMouseDisplay(unsigned instance)
Get the display currently associated with the mouse.
gBool ginputGetMouseStatus(unsigned instance, GEventMouse *pmouse)
Get the current mouse position and button status.
gBool SaveMouseCalibration(unsigned instance, const void *data, gMemSize sz)
Save a set of mouse calibration data.
void ginputSetMouseDisplay(unsigned instance, GDisplay *g)
Assign the display associated with the mouse.
gBool LoadMouseCalibration(unsigned instance, void *data, gMemSize sz)
Load a set of mouse calibration data.
GSourceHandle ginputGetMouse(unsigned instance)
Get the Source handler for a mouse using the instance number.
void ginputSetFingerMode(unsigned instance, gBool on)
Should this device be in Pen mode or Finger mode.
gU32 ginputCalibrateMouse(unsigned instance)
Performs a calibration.