     c-string data,
     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

{ XMappingEvent XMappingEvent }
{ XErrorEvent XErrorEvent }
{ XKeymapEvent XKeymapEvent }
{ padding long[24] } ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

{ 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 }
