]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
xcb: Add Xcb.Connection.get_atom_name
authorRobert Ancell <robert.ancell@canonical.com>
Wed, 14 May 2014 02:05:08 +0000 (14:05 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Wed, 14 May 2014 04:08:02 +0000 (16:08 +1200)
https://bugzilla.gnome.org/show_bug.cgi?id=730099

vapi/xcb.vapi

index a1c5a558a88bef8b5b4dd900466bd86d17710d88..d84290abe1994408e1130b733f47660030146315 100644 (file)
@@ -66,6 +66,10 @@ namespace Xcb {
                        return this.vala_intern_atom(only_if_exists,(uint16)name.length,name);
                }
                public InternAtomReply intern_atom_reply(InternAtomCookie cookie, out GenericError? e);
+
+               public GetAtomNameCookie get_atom_name(Atom atom);
+               public GetAtomNameCookie get_atom_name_unchecked(Atom atom);
+               public GetAtomNameReply get_atom_name_reply(GetAtomNameCookie cookie, out GenericError? e);
                
                [CCode (cname = "xcb_change_property")]
                private VoidCookie vala_change_property(PropMode mode, Window window, AtomT property, AtomT type, uint8 format, uint32 len, void *data);
@@ -151,12 +155,6 @@ namespace Xcb {
                public uint16     border_width;
        }
 
-       [SimpleType]
-       [IntegerType (rank = 9)]
-       [CCode (cname = "xcb_intern_atom_cookie_t", has_type_id = false)]
-       public struct InternAtomCookie {
-       }
-
        [SimpleType]
        [IntegerType (rank = 9)]
        [CCode (cname = "xcb_get_window_attributes_cookie_t", has_type_id = false)]
@@ -203,6 +201,12 @@ namespace Xcb {
                public unowned void *value();
        }
 
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_intern_atom_cookie_t", has_type_id = false)]
+       public struct InternAtomCookie {
+       }
+
        [Compact]
        [CCode (cname = "xcb_intern_atom_reply_t", ref_function = "", unref_function = "free")]
        public class InternAtomReply {
@@ -211,6 +215,23 @@ namespace Xcb {
                public  uint32   length;
                public  AtomT    atom;
        }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_atom_name_cookie_t", has_type_id = false)]
+       public struct GetAtomNameCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_get_atom_name_reply_t", ref_function = "", unref_function = "free")]
+       public class GetAtomNameReply {
+               private uint8    response_type;
+               private uint16   sequence;
+               public  uint32   length;
+               public  uint16   name_len;
+               [CCode (cname = "xcb_get_atom_name_name")]
+               public unowned string name ();
+       }
        
        [SimpleType]
        [IntegerType (rank = 9)]