]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
x11: Add drawable, pixmap and RECTANGLE structs.
authorNicolas Bruguier <nicolas.bruguier@supersonicimagine.fr>
Mon, 16 Nov 2009 20:49:26 +0000 (12:49 -0800)
committerEvan Nemerson <evan@coeus-group.com>
Mon, 16 Nov 2009 20:50:27 +0000 (12:50 -0800)
Fixes bug 598174.

vapi/x11.vapi

index 062e50c13b92af2477295747c7a0eaa4d72381bb..a47d5db330cbcb5c7a50527138de9831f9cde9d6 100644 (file)
@@ -20,7 +20,7 @@
  *     Jürg Billeter <j@bitron.ch>
  */
 
-[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h")]
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h,X11/Xregion.h")]
 namespace X {
        // Note: must be called before opening a display or calling any other Xlib function,
        // see http://tronche.com/gui/x/xlib/display/XInitThreads.html
@@ -141,6 +141,9 @@ namespace X {
                [CCode (cname = "XExtendedMaxRequestSize")]
                public long max_extended_request_size ();
 
+               [CCode (cname = "XEventsQueued")]
+               public int events_queued (int mode);
+
                [CCode (cname = "XNextEvent")]
                public int next_event (ref Event event_return);
 
@@ -261,6 +264,27 @@ namespace X {
        public struct Status {
        }
 
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "XID", type_id = "G_TYPE_INT",
+               marshaller_type_name = "INT",
+               get_value_function = "g_value_get_int",
+               set_value_function = "g_value_set_int", default_value = "0",
+               type_signature = "i")]
+       public struct ID {
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "Drawable", type_id = "G_TYPE_INT",
+               marshaller_type_name = "INT",
+               get_value_function = "g_value_get_int",
+               set_value_function = "g_value_set_int", default_value = "0",
+               type_signature = "i")]
+       public struct Drawable : ID
+       {
+       }
+
        [SimpleType]
        [IntegerType (rank = 9)]
        [CCode (cname = "Window", type_id = "G_TYPE_INT",
@@ -268,7 +292,18 @@ namespace X {
                get_value_function = "g_value_get_int",
                set_value_function = "g_value_set_int", default_value = "0",
                type_signature = "i")]
-       public struct Window {
+       public struct Window : Drawable {
+       }
+
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "Pixmap", type_id = "G_TYPE_INT",
+               marshaller_type_name = "INT",
+               get_value_function = "g_value_get_int",
+               set_value_function = "g_value_set_int", default_value = "0",
+               type_signature = "i")]
+       public struct Pixmap : Drawable {
        }
 
        public struct Visual {
@@ -752,6 +787,14 @@ namespace X {
                public ClientMessageEventData data;
        }
 
+       [CCode (cname = "RECTANGLE", has_type_id = "false")]
+       public struct Rectangle {
+               public short x;
+               public short y;
+               public short width;
+               public short height;
+       }
+
        // union
        public struct ClientMessageEventData {
                public unowned char[] b;
@@ -759,6 +802,13 @@ namespace X {
                public unowned long[] l;
        }
 
+       [CCode (cprefix = "Queued")]
+       public enum QueuedMode {
+               Already,
+               AfterFlush,
+               AfterReading
+       }
+
        [CCode (cprefix = "PropMode")]
        public enum PropMode {
                Replace,
@@ -864,6 +914,8 @@ namespace X {
                public int width_of_screen ();
        }
 
+       public const X.ID None;
+
        public const X.Atom XA_ATOM;
        public const X.Atom XA_CARDINAL;
        public const X.Atom XA_WINDOW;