Sfoglia il codice sorgente

+ added data structures and functions for the X11 generic events extension

git-svn-id: trunk@33645 -
nickysn 9 anni fa
parent
commit
94e890a2cd
1 ha cambiato i file con 40 aggiunte e 1 eliminazioni
  1. 40 1
      packages/x11/src/xlib.pp

+ 40 - 1
packages/x11/src/xlib.pp

@@ -802,6 +802,33 @@ type
         window : TWindow;
         window : TWindow;
      end;
      end;
 
 
+   (***************************************************************
+    *
+    * GenericEvent.  This event is the standard event for all newer extensions.
+    *)
+
+   PXGenericEvent = ^TXGenericEvent;
+   TXGenericEvent = record
+        _type: cint;                 { of event. Always GenericEvent }
+        serial: culong;              { # of last request processed }
+        send_event: TBool;           { true if from SendEvent request }
+        display: PDisplay;           { Display the event was read from }
+        extension: cint;             { major opcode of extension that caused the event }
+        evtype: cint;                { actual event type. }
+     end;
+
+   PXGenericEventCookie = ^TXGenericEventCookie;
+   TXGenericEventCookie = record
+        _type: cint;                 { of event. Always GenericEvent }
+        serial: culong;              { # of last request processed }
+        send_event: TBool;           { true if from SendEvent request }
+        display: PDisplay;           { Display the event was read from }
+        extension: cint;             { major opcode of extension that caused the event }
+        evtype: cint;                { actual event type. }
+        cookie: cuint;
+        data: pointer;
+     end;
+
    PXEvent = ^TXEvent;
    PXEvent = ^TXEvent;
    TXEvent = record
    TXEvent = record
        case longint of
        case longint of
@@ -837,7 +864,9 @@ type
           29 : ( xmapping : TXMappingEvent );
           29 : ( xmapping : TXMappingEvent );
           30 : ( xerror : TXErrorEvent );
           30 : ( xerror : TXErrorEvent );
           31 : ( xkeymap : TXKeymapEvent );
           31 : ( xkeymap : TXKeymapEvent );
-          32 : ( pad : array[0..23] of clong );
+          32 : ( xgeneric : TXGenericEvent );
+          33 : ( xcookie : TXGenericEventCookie );
+          34 : ( pad : array[0..23] of clong );
        end;
        end;
 
 
 type
 type
@@ -1767,6 +1796,16 @@ procedure XSetAuthorization(para1:Pchar; para2:cint; para3:Pchar; para4:cint);cd
   _Xwctomb?
   _Xwctomb?
 }
 }
 
 
+function XGetEventData(
+    dpy: PDisplay;
+    cookie: PXGenericEventCookie
+): TBoolResult;cdecl;external libX11;
+
+procedure XFreeEventData(
+    dpy: PDisplay;
+    cookie: PXGenericEventCookie
+);cdecl;external libX11;
+
 {$ifdef MACROS}
 {$ifdef MACROS}
 function ConnectionNumber(dpy : PDisplay) : cint;
 function ConnectionNumber(dpy : PDisplay) : cint;
 function RootWindow(dpy : PDisplay; scr : cint) : TWindow;
 function RootWindow(dpy : PDisplay; scr : cint) : TWindow;