diff options
Diffstat (limited to 'include/X11')
-rw-r--r-- | include/X11/extensions/XInput2.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/include/X11/extensions/XInput2.h b/include/X11/extensions/XInput2.h index e6c7b30..651b459 100644 --- a/include/X11/extensions/XInput2.h +++ b/include/X11/extensions/XInput2.h @@ -27,6 +27,8 @@ #ifndef _XINPUT2_H_ #define _XINPUT2_H_ +#include <stdint.h> + #include <X11/Xlib.h> #include <X11/extensions/XI2.h> #include <X11/extensions/Xge.h> @@ -135,6 +137,35 @@ typedef struct typedef struct { + uint32_t touchid; + uint32_t tool; + double x; + double y; + double touch_major; + double touch_minor; + double tool_major; + double tool_minor; + unsigned int orientation; +} XITouchInfo; + +typedef struct +{ + int type; + int sourceid; + int mode; + double min_x; + double max_x; + double min_y; + double max_y; + double min_touch_width; + double max_touch_width; + unsigned int num_touches; + unsigned int max_touches; + XITouchInfo *touches; +} XITouchClassInfo; + +typedef struct +{ int deviceid; char *name; int use; @@ -292,6 +323,55 @@ typedef struct { int what; } XIPropertyEvent; +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed */ + Bool send_event; /* true if this came from SendEvent */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; /* XI_TouchBegin or XI_TouchEnd */ + Time time; + int deviceid; /* id of delivery device */ + int sourceid; /* id of originating device */ + Window root; /* root window for delivery */ + Window event; /* window event delivered to */ + Window child; /* window event occured in */ + unsigned long touchid; /* unique ID for this touch */ + unsigned long tool; /* identifier of physical tool */ +} XITouchStateEvent; + +typedef XITouchStateEvent XITouchBeginEvent; +typedef XITouchStateEvent XITouchEndEvent; + +typedef struct { + int type; /* GenericEvent */ + unsigned long serial; /* # of last request processed */ + Bool send_event; /* true if this came from SendEvent */ + Display *display; /* Display the event was read from */ + int extension; /* XI extension offset */ + int evtype; /* XI_TouchStateNotify */ + Time time; /* time event was received */ + int deviceid; /* id of delivery device */ + int sourceid; /* id of originating device */ + int mask; /* fields present in this event */ + Window root; /* root window for delivery */ + Window event; /* window event delivered to */ + Window child; /* window event occured in */ + unsigned long touchid; /* unique ID for this touch */ + unsigned long tool; /* identifier of physical tool */ + double root_x; /* X in screen co-ords */ + double root_y; /* Y in screen co-ords */ + double event_x; /* X relative to event window */ + double event_y; /* Y relative to event window */ + double x; /* unscaled X */ + double y; /* unscaled Y */ + double touch_width_major; /* major axis of contact area */ + double touch_width_minor; /* minor axis of contact area */ + double tool_width_major; /* major axis of proximate tool */ + double tool_width_minor; /* minor axis of proximate tool */ + unsigned int orientation; /* orientation of tool, in degrees */ +} XITouchMotionEvent; + _XFUNCPROTOBEGIN extern Bool XIQueryPointer( @@ -415,6 +495,14 @@ extern Status XIAllowEvents( Time time ); +extern Status XIAllowTouchEvents( + Display* display, + int deviceid, + int event_mode, + Time time, + uint32_t detail +); + extern int XIGrabButton( Display* display, int deviceid, @@ -466,6 +554,18 @@ extern int XIGrabFocusIn( int num_modifiers, XIGrabModifiers *modifiers_inout ); + +extern int XIGrabTouchBegin( + Display* display, + int deviceid, + Window grab_window, + int grab_mode, + int owner_events, + XIEventMask *mask, + int num_modifiers, + XIGrabModifiers *modifiers_inout +); + extern Status XIUngrabButton( Display* display, int deviceid, @@ -500,6 +600,14 @@ extern Status XIUngrabFocusIn( XIGrabModifiers *modifiers ); +extern Status XIUngrabTouchBegin( + Display* display, + int deviceid, + Window grab_window, + int num_modifiers, + XIGrabModifiers *modifiers +); + extern Atom *XIListProperties( Display* display, |