]> gitweb.factorcode.org Git - factor.git/commitdiff
x11.xlib: add a few things for xinput2
authorNiklas.Waern <ceninan@gmail.com>
Fri, 21 May 2010 22:05:34 +0000 (00:05 +0200)
committerNiklas.Waern <ceninan@gmail.com>
Fri, 21 May 2010 22:12:51 +0000 (00:12 +0200)
basis/x11/xlib/xlib.factor

index ac9e5591dc30544d2e9bbdf3287bc1c920ec8f1d..7914c7cf1a9206509a8eaba97955e9f4a7e7d6de 100644 (file)
@@ -1013,6 +1013,34 @@ STRUCT: XKeymapEvent
 { window Window }
 { pad int[8] } ;
 
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! Newer things, needed for XInput2 support. Not in the book.
+
+! GenericEvent is the standard event for all newer extensions.
+STRUCT: XGenericEvent
+{ type int }
+{ serial ulong }
+{ send_event Bool }
+{ display Display* }
+{ extension int }
+{ evtype int } ;
+
+STRUCT: XGenericEventCookie
+{ type int }
+{ serial ulong }
+{ send_event Bool }
+{ display Display* }
+{ extension int }
+{ evtype int }
+{ cookie uint }
+{ data void* } ;
+
+X-FUNCTION: Bool XGetEventData ( Display* dpy, XGenericEventCookie* cookie ) ;
+X-FUNCTION: void XFreeEventData ( Display* dpy, XGenericEventCookie* cookie ) ;
+
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
 UNION-STRUCT: XEvent
 { int int }
 { XAnyEvent XAnyEvent }
@@ -1046,6 +1074,8 @@ UNION-STRUCT: XEvent
 { XMappingEvent XMappingEvent }
 { XErrorEvent XErrorEvent }
 { XKeymapEvent XKeymapEvent }
+{ XGenericEvent XGenericEvent }
+{ XGenericEventCookie XGenericEventCookie }
 { padding long[24] } ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1218,6 +1248,16 @@ X-FUNCTION: Pixmap XCreateBitmapFromData (
     uint width,
     uint height ) ;
 
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Appendix C - Extensions
+! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+X-FUNCTION: Bool XQueryExtension (
+        Display* display,
+        c-string name,
+        int* major_opcode_return,
+        int* first_event_return,
+        int* first_error_return ) ;
+
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 ! Appendix D - Compatibility Functions
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!