]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
x11: Add GenericEvent bindings
authorDaiki Ueno <ueno@unixuser.org>
Tue, 4 Sep 2012 21:27:28 +0000 (14:27 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Tue, 4 Sep 2012 21:27:28 +0000 (14:27 -0700)
Fixes bug 683310.

vapi/x11.vapi

index 5eae3c159b31345ed3969440f4d63c5d58580121..0044de2eaf7598c7e05e5ac815f29e96a093ef8a 100644 (file)
@@ -307,6 +307,9 @@ namespace X {
 
                [CCode (cname = "XMoveWindow")]
                public void move_window (Window window, int x, int y);
+
+               [CCode (cname = "XQueryExtension")]
+               public bool query_extension(string name, out int major_opcode, out int first_event_return, out int first_error_return);
        }
 
        [Compact]
@@ -736,7 +739,8 @@ namespace X {
                SelectionNotify,
                ColormapNotify,
                ClientMessage,
-               MappingNotify
+               MappingNotify,
+               GenericEvent
        }
 
        // union
@@ -762,6 +766,8 @@ namespace X {
                public PropertyEvent xproperty;
                public SelectionEvent xselection;
                public ClientMessageEvent xclient;
+               public GenericEvent xgeneric;
+               public GenericEventCookie xcookie;
        }
 
        [CCode (cname = "XAnyEvent")]
@@ -1027,6 +1033,27 @@ namespace X {
                public ClientMessageEventData data;
        }
 
+       [CCode (cname = "XGenericEvent")]
+       public struct GenericEvent {
+               public int type;
+               public ulong serial;
+               public bool send_event;
+               public unowned Display display;
+               public int extension;
+               public int evtype;
+       }
+
+       [CCode (cname = "XGenericEventCookie")]
+       public struct GenericEventCookie {
+               public int type;
+               public ulong serial;
+               public bool send_event;
+               public unowned Display display;
+               public int extension;
+               public uint cookie;
+               public void *data;
+       }
+
        [CCode (cname = "RECTANGLE", has_type_id = false)]
        public struct Rectangle {
                public short x;