[vala] xcb: Add more methods and use Vala types for accessing data



commit c8dd3ab90100b81825a65a9a9f9d9aee81cd1da0
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon May 19 11:54:10 2014 +1200

    xcb: Add more methods and use Vala types for accessing data
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730218

 vapi/xcb.vapi | 1535 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 1466 insertions(+), 69 deletions(-)
---
diff --git a/vapi/xcb.vapi b/vapi/xcb.vapi
index c48feb6..6466d82 100644
--- a/vapi/xcb.vapi
+++ b/vapi/xcb.vapi
@@ -38,17 +38,42 @@ namespace Xcb {
                public GenericEvent wait_for_event ();
                public GenericEvent poll_for_event();
                public int get_file_descriptor ();
+               public Xcb.GenericError request_check (Xcb.VoidCookie cookie);
+
                public VoidCookie create_window (uint8 depth, Window wid, Window parent, int16 x, int16 y, 
uint16 width, uint16 height, uint16 border_width, uint16 _class, VisualID visual, uint32 value_mask, [CCode 
(array_length = false)] uint32[]? value_list);
                public VoidCookie create_window_checked (uint8 depth, Window wid, Window parent, int16 x, 
int16 y, uint16 width, uint16 height, uint16 border_width, uint16 _class, VisualID visual, uint32 value_mask, 
[CCode (array_length = false)] uint32[]? value_list);
+
+               public VoidCookie destroy_window_checked (Window window);
+               public VoidCookie destroy_window (Window window);
+
+               public VoidCookie destroy_subwindows_checked (Window window);
+               public VoidCookie destroy_subwindows (Window window);
+
+               public VoidCookie change_save_set_checked (SetMode mode, Window window);
+               public VoidCookie change_save_set (SetMode mode, Window window);
+
                public VoidCookie map_window (Window wid);
                public VoidCookie map_window_checked (Window wid);
+
+               public VoidCookie map_subwindows_checked (Window window);
+               public VoidCookie map_subwindows (Window window);
+
                public VoidCookie unmap_window (Window wid);
                public VoidCookie unmap_window_checked (Window wid);
+
+               public VoidCookie unmap_subwindows_checked (Window window);
+               public VoidCookie unmap_subwindows (Window window);
+
+               public VoidCookie circulate_window_checked (Circulate direction, Window window);
+               public VoidCookie circulate_window (Circulate direction, Window window);
+
                public GetWindowAttributesCookie get_window_attributes (Window wid);
                public GetWindowAttributesCookie get_window_attributes_unchecked (Window wid);
                public GetWindowAttributesReply get_window_attributes_reply(GetWindowAttributesCookie cookie, 
out GenericError? e);
+
                public VoidCookie change_window_attributes (Window wid, uint32 value_mask, [CCode 
(array_length = false)] uint32[]? value_list);
                public VoidCookie change_window_attributes_checked (Window wid, uint32 value_mask, [CCode 
(array_length = false)] uint32[]? value_list);
+
                public QueryTreeCookie query_tree (Window wid);
                public QueryTreeCookie query_tree_unchecked (Window wid);
                public QueryTreeReply query_tree_reply (QueryTreeCookie cookie, out GenericError? e);
@@ -67,10 +92,10 @@ namespace Xcb {
                }
                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 GetAtomNameCookie get_atom_name(AtomT atom);
+               public GetAtomNameCookie get_atom_name_unchecked(AtomT 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);
                [CCode (cname = "vala_xcb_change_property")]
@@ -89,7 +114,7 @@ namespace Xcb {
                public VoidCookie change_property_string(PropMode mode, Window window, AtomT property, AtomT 
type, string data) {
                        return this.vala_change_property(mode,window,property,type, 8, data.length, (void 
*)data.data);
                }
-               
+
                [CCode (cname = "xcb_change_property_checked")]
                private VoidCookie vala_change_property_checked(PropMode mode, Window window, AtomT property, 
AtomT type, uint8 format, uint32 len, void *data);
                [CCode (cname = "vala_xcb_change_property_checked")]
@@ -108,12 +133,20 @@ namespace Xcb {
                public VoidCookie change_property_checked_string(PropMode mode, Window window, AtomT 
property, AtomT type, string data) {
                        return this.vala_change_property(mode,window,property,type, 8, data.length, (void 
*)data.data);
                }
-               
+
+               public VoidCookie delete_property_checked (Window window, AtomT property);
+               public VoidCookie delete_property (Window window, AtomT property);
+
                public GetPropertyCookie get_property(bool _delete, Window window, AtomT property, AtomT 
type, uint32 long_offset, uint32 long_length);
                public GetPropertyCookie get_property_unchecked(bool _delete, Window window, AtomT property, 
AtomT type, uint32 long_offset, uint32 long_length);
                public GetPropertyReply ? get_property_reply(GetPropertyCookie cookie, out GenericError? e);
 
+               public ListPropertiesCookie list_properties (Window window);
+               public ListPropertiesCookie list_properties_unchecked (Window window);
+               public ListPropertiesReply? list_properties_reply (ListPropertiesCookie cookie, out 
GenericError? e);
+
                public VoidCookie configure_window(Window window, uint16 value_mask, uint32 *value_list);
+               public VoidCookie configure_window_checked(Window window, uint16 value_mask, uint32 
*value_list);
                
                public VoidCookie reparent_window(Window window, Window parent, uint16 x, uint16 y);
                public VoidCookie reparent_window_checked(Window window, Window parent, uint16 x, uint16 y);
@@ -122,26 +155,402 @@ namespace Xcb {
                public GetGeometryCookie get_geometry_unchecked(Drawable drawable);
                public GetGeometryReply ? get_geometry_reply(GetGeometryCookie cookie, out GenericError ? e);
 
+               public VoidCookie set_selection_owner_checked (Window owner, AtomT selection, Timestamp time);
+               public VoidCookie set_selection_owner (Window owner, AtomT selection, Timestamp time);
+
+               public GetSelectionOwnerCookie get_selection_owner (AtomT selection);
+               public GetSelectionOwnerCookie get_selection_owner_unchecked (AtomT selection);
+               public GetSelectionOwnerReply get_selection_owner_reply (GetSelectionOwnerCookie cookie, out 
GenericError? e);
+
+               public VoidCookie convert_selection_checked (Window requestor, AtomT selection, AtomT target, 
AtomT property, Timestamp time);
+               public VoidCookie convert_selection (Window requestor, AtomT selection, AtomT target, AtomT 
property, Timestamp time);
+
+               //send_event
+
+               public GrabPointerCookie grab_pointer (bool owner_events, Window grab_window, uint16 
event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, Timestamp time);
+               public GrabPointerCookie grab_pointer_unchecked (bool owner_events, Window grab_window, 
uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, Timestamp 
time);
+               public GrabPointerReply grab_pointer_reply (GrabPointerCookie cookie, out GenericError? e);
+
+               public VoidCookie ungrab_pointer_checked (Timestamp time);
+               public VoidCookie ungrab_pointer (Timestamp time);
+
+               public VoidCookie grab_button_checked (bool owner_events, Window grab_window, uint16 
event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, uint8 button, 
uint16 modifiers);
+               public VoidCookie grab_button (bool owner_events, Window grab_window, uint16 event_mask, 
GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, uint8 button, uint16 
modifiers);
+
+               public VoidCookie ungrab_button_checked (uint8 button, Window grab_window, uint16 modifiers);
+               public VoidCookie ungrab_button (uint8 button, Window grab_window, uint16 modifiers);
+
+               public VoidCookie change_active_pointer_grab_checked (Cursor cursor, Timestamp time, uint16 
event_mask);
+               public VoidCookie change_active_pointer_grab (Cursor cursor, Timestamp time, uint16 
event_mask);
+
+               public GrabKeyboardCookie grab_keyboard (bool owner_events, Window grab_window, Timestamp 
time, GrabMode pointer_mode, GrabMode keyboard_mode);
+               public GrabKeyboardCookie grab_keyboard_unchecked (bool owner_events, Window grab_window, 
Timestamp time, GrabMode pointer_mode, GrabMode keyboard_mode);
+               public GrabKeyboardReply grab_keyboard_reply (GrabKeyboardCookie cookie, out GenericError? e);
+
+               public VoidCookie ungrab_keyboard_checked (Timestamp time);
+               public VoidCookie ungrab_keyboard (Timestamp time);
+
+               public VoidCookie grab_key_checked (bool owner_events, Window grab_window, uint16 modifiers, 
Keycode key, GrabMode pointer_mode, GrabMode keyboard_mode);
+               public VoidCookie grab_key (bool owner_events, Window grab_window, uint16 modifiers, Keycode 
key, GrabMode pointer_mode, GrabMode keyboard_mode);
+
+               public VoidCookie ungrab_key_checked (Keycode key, Window grab_window, uint16 modifiers);
+               public VoidCookie ungrab_key (Keycode key, Window grab_window, uint16 modifiers);
+
+               //allow_events
+
+               public VoidCookie grab_server_checked ();
+               public VoidCookie grab_server ();
+
+               public VoidCookie ungrab_server_checked ();
+               public VoidCookie ungrab_server ();
+
+               public QueryPointerCookie query_pointer (Window window);
+               public QueryPointerCookie query_pointer_unchecked (Window window);
+               public QueryPointerReply query_pointer_reply (QueryPointerCookie cookie, out GenericError? e);
+
+               public GetMotionEventsCookie get_motion_events (Window window, Timestamp start, Timestamp 
stop);
+               public GetMotionEventsCookie get_motion_events_unchecked (Window window, Timestamp start, 
Timestamp stop);
+               public GetMotionEventsReply get_motion_events_reply (GetMotionEventsCookie cookie, out 
GenericError? e);
+
+               public TranslateCoordinatesCookie translate_coordinates (Window src_window, Window 
dst_window, int16 src_x, int16 src_y);
+               public TranslateCoordinatesCookie translate_coordinates_unchecked (Window src_window, Window 
dst_window, int16 src_x, int16 src_y);
+               public TranslateCoordinatesReply translate_coordinates_reply (TranslateCoordinatesCookie 
cookie, out GenericError? e);
+
+               public VoidCookie warp_pointer_checked (Window src_window, Window dst_window, int16 src_x, 
int16 src_y, uint16 src_width, uint16 src_height, int16 dst_x, int16 dst_y);
+               public VoidCookie warp_pointer (Window src_window, Window dst_window, int16 src_x, int16 
src_y, uint16 src_width, uint16 src_height, int16 dst_x, int16 dst_y);
+
+               public VoidCookie set_input_focus_checked (InputFocus revert_to, Window focus, Timestamp 
time);
+               public VoidCookie set_input_focus (InputFocus revert_to, Window focus, Timestamp time);
+
+               public GetInputFocusCookie get_input_focus ();
+               public GetInputFocusCookie get_input_focus_unchecked ();
+               public GetInputFocusReply get_input_focus_reply (GetInputFocusCookie cookie, out 
GenericError? e);
+
+               //query_keymap
+
+               [CCode (cname = "xcb_open_font_checked")]
+               private VoidCookie vala_open_font_checked (Font fid, uint16 name_len, string name);
+               [CCode (cname = "vala_xcb_open_font_checked")]
+               public VoidCookie open_font_checked (Font fid, string name) {
+                       return this.vala_open_font_checked (fid, (uint16) name.length, name);
+               }
+               [CCode (cname = "xcb_open_font")]
+               private VoidCookie vala_open_font (Font fid, uint16 name_len, string name);
+               [CCode (cname = "vala_xcb_open_font")]
+               public VoidCookie open_font (Font fid, string name) {
+                       return this.vala_open_font (fid, (uint16) name.length, name);
+               }
+
+               public VoidCookie close_font_checked (Font fid);
+               public VoidCookie close_font (Font fid);
+
+               public QueryFontCookie query_font (Fontable font);
+               public QueryFontCookie query_font_unchecked (Fontable font);
+               public QueryFontReply query_font_reply (QueryFontCookie cookie, out GenericError? e);
+
+               /*[CCode (cname = "xcb_query_text_extents")]
+               private QueryTextExtentsCookie vala_query_text_extents (Fontable font, uint32 string_len, 
Char2b* s);
+               [CCode (cname = "vala_xcb_query_text_extents")]
+               public QueryTextExtentsCookie query_text_extents (Fontable font, uint16[] s) {
+                       this.vala_query_text_extents (font, s.length, s);
+               }
+               [CCode (cname = "xcb_query_text_extents_unchecked")]
+               private QueryTextExtentsCookie vala_query_text_extents_unchecked (Fontable font, uint32 
string_len, Char2b* s);
+               [CCode (cname = "vala_xcb_query_text_extents_unchecked")]
+               public QueryTextExtentsCookie query_text_extents_unchecked (Fontable font, uint16[] s) { // 
FIXME: How to handle Char2b?
+                       this.vala_query_text_extents_unchecked (font, s.length, s);
+               }
+               public QueryTextExtentsReply query_text_extents_reply (QueryTextExtentsCookie cookie, out 
GenericError? e);*/
+
+               [CCode (cname = "xcb_list_fonts")]
+               private ListFontsCookie vala_list_fonts (uint16 max_names, uint16 pattern_len, string 
pattern);
+               [CCode (cname = "vala_xcb_list_fonts")]
+               public ListFontsCookie list_fonts (uint16 max_names, string pattern) {
+                       return this.vala_list_fonts (max_names, (uint16) pattern.length, pattern);
+               }
+               [CCode (cname = "xcb_list_fonts_unchecked")]
+               private ListFontsCookie vala_list_fonts_unchecked (uint16 max_names, uint16 pattern_len, 
string pattern);
+               [CCode (cname = "vala_xcb_list_fonts_unchecked")]
+               public ListFontsCookie list_fonts_unchecked (uint16 max_names, string pattern) {
+                       return this.vala_list_fonts_unchecked (max_names, (uint16) pattern.length, pattern);
+               }
+               public ListFontsReply list_fonts_reply (ListFontsCookie cookie, out GenericError? e);
+
+               [CCode (cname = "xcb_list_fonts_with_info")]
+               private ListFontsWithInfoCookie vala_list_fonts_with_info (uint16 max_names, uint16 
pattern_len, string pattern);
+               [CCode (cname = "vala_xcb_list_fonts_with_info")]
+               public ListFontsWithInfoCookie list_fonts_with_info (uint16 max_names, string pattern) {
+                       return this.vala_list_fonts_with_info (max_names, (uint16) pattern.length, pattern);
+               }
+               [CCode (cname = "xcb_list_fonts_with_info_unchecked")]
+               private ListFontsWithInfoCookie vala_list_fonts_with_info_unchecked (uint16 max_names, uint16 
pattern_len, string pattern);
+               [CCode (cname = "vala_xcb_list_fonts_with_info_unchecked")]
+               public ListFontsWithInfoCookie list_fonts_with_info_unchecked (uint16 max_names, string 
pattern) {
+                       return this.vala_list_fonts_with_info_unchecked (max_names, (uint16) pattern.length, 
pattern);
+               }
+               public ListFontsWithInfoReply list_fonts_with_info_reply (ListFontsWithInfoCookie cookie, out 
GenericError? e);
+
+               //set_font_path
+
+               public GetFontPathCookie get_font_path ();
+               public GetFontPathCookie get_font_path_unchecked ();
+               public GetFontPathReply get_font_path_reply (GetFontPathCookie cookie, out GenericError? e);
+
                public VoidCookie create_pixmap_checked (uint8 depth, Pixmap pid, Drawable drawable, uint16 
width, uint16 height);
                public VoidCookie create_pixmap (uint8 depth, Pixmap pid, Drawable drawable, uint16 width, 
uint16 height);
+
                public VoidCookie free_pixmap_checked (Pixmap pid);
                public VoidCookie free_pixmap (Pixmap pid);
 
                public VoidCookie create_gc_checked (GContext cid, Drawable drawable, uint32 value_mask = 0, 
[CCode (array_length = false)] uint32[]? value_list = null);
                public VoidCookie create_gc (GContext cid, Drawable drawable, uint32 value_mask = 0, [CCode 
(array_length = false)] uint32[]? value_list = null);
+
                public VoidCookie change_gc_checked (GContext gc, uint32 value_mask, [CCode (array_length = 
false)] uint32[]? value_list);
                public VoidCookie change_gc (GContext gc, uint32 value_mask, [CCode (array_length = false)] 
uint32[]? value_list);
+
                public VoidCookie copy_gc_checked (GContext src_gc, GContext dst_gc, uint32 value_mask);
                public VoidCookie copy_gc (GContext src_gc, GContext dst_gc, uint32 value_mask);
+
+               public VoidCookie set_dashes_checked (GContext gc, uint16 dash_offset, [CCode 
(array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] dashes);
+               public VoidCookie set_dashes (GContext gc, uint16 dash_offset, [CCode (array_length_pos = 
2.9, array_length_type = "uint16_t")] uint8[] dashes);
+
+               public VoidCookie set_clip_rectangles_checked (ClipOrdering ordering, GContext gc, int16 
clip_x_origin, int16 clip_y_origin, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] 
Rectangle[] rectangles);
+               public VoidCookie set_clip_rectangles (ClipOrdering ordering, GContext gc, int16 
clip_x_origin, int16 clip_y_origin, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] 
Rectangle[] rectangles);
+
                public VoidCookie free_gc_checked (GContext gc);
                public VoidCookie free_gc (GContext gc);
 
                public VoidCookie clear_area_checked (uint8 exposures, Window window, int16 x, int16 y, 
uint16 width, uint16 height);
                public VoidCookie clear_area (uint8 exposures, Window window, int16 x, int16 y, uint16 width, 
uint16 height);
+
                public VoidCookie copy_area_checked (Drawable src_drawable, Drawable dst_drawable, GContext 
gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height);
                public VoidCookie copy_area (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 
src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height);
+
                public VoidCookie copy_plane_checked (Drawable src_drawable, Drawable dst_drawable, GContext 
gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height, uint32 bit_plane);
                public VoidCookie copy_plane (Drawable src_drawable, Drawable dst_drawable, GContext gc, 
int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height, uint32 bit_plane);
+
+               public VoidCookie poly_point_checked (CoordMode coordinate_mode, Drawable drawable, GContext 
gc, [CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);
+               public VoidCookie poly_point (CoordMode coordinate_mode, Drawable drawable, GContext gc, 
[CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);
+
+               public VoidCookie poly_line_checked (CoordMode coordinate_mode, Drawable drawable, GContext 
gc, [CCode (array_length = false)] Point[] points);
+               public VoidCookie poly_line (CoordMode coordinate_mode, Drawable drawable, GContext gc, 
[CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);
+
+               public VoidCookie poly_segment_checked (Drawable drawable, GContext gc, [CCode 
(array_length_pos = 2.9, array_length_type = "uint32_t")] Segment[] segments);
+               public VoidCookie poly_segment (Drawable drawable, GContext gc, [CCode (array_length_pos = 
2.9, array_length_type = "uint32_t")] Segment[] segments);
+
+               public VoidCookie poly_rectangle_checked (Drawable drawable, GContext gc, [CCode 
(array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
+               public VoidCookie poly_rectangle (Drawable drawable, GContext gc, [CCode (array_length_pos = 
2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
+
+               public VoidCookie poly_arc_checked (Drawable drawable, GContext gc, [CCode (array_length_pos 
= 2.9, array_length_type = "uint32_t")] Arc[] arcs);
+               public VoidCookie poly_arc (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, 
array_length_type = "uint32_t")] Arc[] arcs);
+
+               public VoidCookie fill_poly_checked (Drawable drawable, GContext gc, PolyShape shape, 
CoordMode coordinate_mode, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Point[] points);
+               public VoidCookie fill_poly (Drawable drawable, GContext gc, PolyShape shape, CoordMode 
coordinate_mode, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Point[] points);
+
+               public VoidCookie poly_fill_rectangle_checked (Drawable drawable, GContext gc, [CCode 
(array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
+               public VoidCookie poly_fill_rectangle (Drawable drawable, GContext gc, [CCode 
(array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
+
+               public VoidCookie poly_fill_arc_checked (Drawable drawable, GContext gc, [CCode 
(array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);
+               public VoidCookie poly_fill_arc (Drawable drawable, GContext gc, [CCode (array_length_pos = 
2.9, array_length_type = "uint32_t")] Arc[] arcs);
+
+               public VoidCookie put_image_checked (ImageFormat format, Drawable drawable, GContext gc, 
uint16 width, uint16 height, int16 dst_x, int16 dst_y, uint8 left_pad, uint8 depth, [CCode (array_length_pos 
= 9.9, array_length_type = "uint32_t")] uint8[] data);
+               public VoidCookie put_image (ImageFormat format, Drawable drawable, GContext gc, uint16 
width, uint16 height, int16 dst_x, int16 dst_y, uint8 left_pad, uint8 depth, [CCode (array_length_pos = 9.9, 
array_length_type = "uint32_t")] uint8[] data);
+
+               public GetImageCookie get_image (ImageFormat format, Drawable drawable, int16 x, int16 y, 
uint16 width, uint16 height, uint32 plane_mask);
+               public GetImageCookie get_image_unchecked (ImageFormat format, Drawable drawable, int16 x, 
int16 y, uint16 width, uint16 height, uint32 plane_mask);
+               public GetImageReply get_image_reply (GetImageCookie cookie, out GenericError? e);
+
+               public VoidCookie poly_text_8_checked (Drawable drawable, GContext gc, int16 x, int16 y, 
[CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
+               public VoidCookie poly_text_8 (Drawable drawable, GContext gc, int16 x, int16 y, [CCode 
(array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
+
+               public VoidCookie poly_text_16_checked (Drawable drawable, GContext gc, int16 x, int16 y, 
[CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
+               public VoidCookie poly_text_16 (Drawable drawable, GContext gc, int16 x, int16 y, [CCode 
(array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
+
+               [CCode (cname = "xcb_image_text_8_checked")]
+               private VoidCookie vala_image_text_8_checked (uint8 string_len, Drawable drawable, GContext 
gc, int16 x, int16 y, string text);
+               [CCode (cname = "vala_xcb_image_text8_checked")]
+               public VoidCookie image_text_8_checked (Drawable drawable, GContext gc, int16 x, int16 y, 
string text) {
+                       this.vala_image_text_8_checked ((uint8) text.length, drawable, gc, x, y, text);
+               }
+               [CCode (cname = "xcb_image_text_8")]
+               private VoidCookie vala_image_text_8 (uint8 string_len, Drawable drawable, GContext gc, int16 
x, int16 y, string text);
+               [CCode (cname = "vala_xcb_image_text8")]
+               public VoidCookie image_text_8 (Drawable drawable, GContext gc, int16 x, int16 y, string 
text) {
+                       this.vala_image_text_8 ((uint8) text.length, drawable, gc, x, y, text);
+               }
+
+               //image_text_16
+
+               public VoidCookie create_colormap_checked (bool alloc, Colormap mid, Window window, VisualID 
visual);
+               public VoidCookie create_colormap (bool alloc, Colormap mid, Window window, VisualID visual);
+
+               public VoidCookie free_colormap_checked (Colormap cmap);
+               public VoidCookie free_colormap (Colormap cmap);
+
+               public VoidCookie copy_colormap_and_free_checked (Colormap mid, Colormap src_cmap);
+               public VoidCookie copy_colormap_and_free (Colormap mid, Colormap src_cmap);
+
+               public VoidCookie install_colormap_checked (Colormap cmap);
+               public VoidCookie install_colormap (Colormap cmap);
+
+               public VoidCookie uninstall_colormap_checked (Colormap cmap);
+               public VoidCookie uninstall_colormap (Colormap cmap);
+
+               public ListInstalledColormapsCookie list_installed_colormaps (Window window);
+               public ListInstalledColormapsCookie list_installed_colormaps_unchecked (Window window);
+               public ListInstalledColormapsReply list_installed_colormaps_reply 
(ListInstalledColormapsCookie cookie, out GenericError? e);
+
+               public AllocColorCookie alloc_color (Colormap cmap, uint16 red, uint16 green, uint16 blue);
+               public AllocColorCookie alloc_color_unchecked (Colormap cmap, uint16 red, uint16 green, 
uint16 blue);
+               public AllocColorReply alloc_color_reply (AllocColorCookie cookie, out GenericError? e);
+
+               [CCode (cname = "xcb_alloc_named_color")]
+               private AllocNamedColorCookie vala_alloc_named_color (Colormap cmap, uint16 name_len, string 
name);
+               [CCode (cname = "vala_xcb_alloc_named_color")]
+               public AllocNamedColorCookie alloc_named_color (Colormap cmap, string name) {
+                       this.vala_alloc_named_color (cmap, (uint16) name.length, name);
+               }
+               [CCode (cname = "xcb_alloc_named_color_unchecked")]
+               private AllocNamedColorCookie vala_alloc_named_color_unchecked (Colormap cmap, uint16 
name_len, string name);
+               [CCode (cname = "vala_xcb_alloc_named_color_unchecked")]
+               public AllocNamedColorCookie alloc_named_color_unchecked (Colormap cmap, string name) {
+                       this.vala_alloc_named_color_unchecked (cmap, (uint16) name.length, name);
+               }
+               public AllocNamedColorReply alloc_named_color_reply (AllocNamedColorCookie cookie, out 
GenericError? e);
+
+               public AllocColorCellsCookie alloc_color_cells (bool contiguous, Colormap cmap, uint16 
colors, uint16 planes);
+               public AllocColorCellsCookie alloc_color_cells_unchecked (bool contiguous, Colormap cmap, 
uint16 colors, uint16 planes);
+               public AllocColorCellsReply alloc_color_cells_reply (AllocColorCellsCookie cookie, out 
GenericError? e);
+
+               public AllocColorPlanesCookie alloc_color_planes (bool contiguous, Colormap cmap, uint16 
colors, uint16 reds, uint16 greens, uint16 blues);
+               public AllocColorPlanesCookie alloc_color_planes_unchecked (bool contiguous, Colormap cmap, 
uint16 colors, uint16 reds, uint16 greens, uint16 blues);
+               public AllocColorPlanesReply alloc_color_planes_reply (AllocColorPlanesCookie cookie, out 
GenericError? e);
+
+               public VoidCookie free_colors_checked (Colormap cmap, uint32 plane_mask, [CCode 
(array_length_pos = 2.9, array_length_type = "uint32_t")] uint32[] pixels);
+               public VoidCookie free_colors (Colormap cmap, uint32 plane_mask, [CCode (array_length_pos = 
2.9, array_length_type = "uint32_t")] uint32[] pixels);
+
+               public VoidCookie store_colors_checked (Colormap cmap, [CCode (array_length_pos = 1.9, 
array_length_type = "uint32_t")] Coloritem[] items);
+               public VoidCookie store_colors (Colormap cmap, [CCode (array_length_pos = 1.9, 
array_length_type = "uint32_t")] Coloritem[] items);
+
+               [CCode (cname = "xcb_store_named_color_checked")]
+               private VoidCookie vala_store_named_color_checked (ColorFlag flags, Colormap cmap, uint32 
pixel, uint16 name_len, string name);
+               [CCode (cname = "vala_xcb_store_named_color_checked")]
+               public VoidCookie store_named_color_checked (ColorFlag flags, Colormap cmap, uint32 pixel, 
string name) {
+                       this.vala_store_named_color_checked (flags, cmap, pixel, (uint16) name.length, name);
+               }
+               [CCode (cname = "xcb_store_named_color")]
+               private VoidCookie vala_store_named_color (ColorFlag flags, Colormap cmap, uint32 pixel, 
uint16 name_len, string name);
+               [CCode (cname = "vala_xcb_store_named_color")]
+               public VoidCookie store_named_color (ColorFlag flags, Colormap cmap, uint32 pixel, string 
name) {
+                       this.vala_store_named_color (flags, cmap, pixel, (uint16) name.length, name);
+               }
+
+               public QueryColorsCookie query_colors (Colormap cmap, [CCode (array_length_pos = 1.9, 
array_length_type = "uint32_t")] uint32[] pixels);
+               public QueryColorsCookie query_colors_unchecked (Colormap cmap, [CCode (array_length_pos = 
1.9, array_length_type = "uint32_t")] uint32[] pixels);
+               public QueryColorsReply query_colors_reply (QueryColorsCookie cookie, out GenericError? e);
+
+               [CCode (cname = "xcb_lookup_color")]
+               private LookupColorCookie vala_lookup_color (Colormap cmap, uint16 name_len, string name);
+               [CCode (cname = "vala_xcb_lookup_color")]
+               public LookupColorCookie lookup_color (Colormap cmap, string name) {
+                       this.vala_lookup_color (cmap, (uint16) name.length, name);
+               }
+               [CCode (cname = "xcb_lookup_color_unchecked")]
+               private LookupColorCookie vala_lookup_color_unchecked (Colormap cmap, uint16 name_len, string 
name);
+               [CCode (cname = "vala_xcb_lookup_color_unchecked")]
+               public LookupColorCookie lookup_color_unchecked (Colormap cmap, string name) {
+                       this.vala_lookup_color_unchecked (cmap, (uint16) name.length, name);
+               }
+               public LookupColorReply lookup_color_reply (LookupColorCookie cookie, out GenericError? e);
+
+               public VoidCookie create_cursor_checked (Cursor cid, Pixmap source, Pixmap mask, uint16 
fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue, uint16 
x, uint16 y);
+               public VoidCookie create_cursor (Cursor cid, Pixmap source, Pixmap mask, uint16 fore_red, 
uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue, uint16 x, uint16 
y);
+
+               public VoidCookie create_glyph_cursor_checked (Cursor cid, Font source_font, Font mask_font, 
uint16 source_char, uint16 mask_char, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, 
uint16 back_green, uint16 back_blue);
+               public VoidCookie create_glyph_cursor (Cursor cid, Font source_font, Font mask_font, uint16 
source_char, uint16 mask_char, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 
back_green, uint16 back_blue);
+
+               public VoidCookie free_cursor_checked (Cursor cursor);
+               public VoidCookie free_cursor (Cursor cursor);
+
+               public VoidCookie recolor_cursor_checked (Cursor cursor, uint16 fore_red, uint16 fore_green, 
uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
+               public VoidCookie recolor_cursor (Cursor cursor, uint16 fore_red, uint16 fore_green, uint16 
fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
+
+               public QueryBestSizeCookie query_best_size (uint8 _class, Drawable drawable, uint16 width, 
uint16 height); // FIXME: Is there an enum for class?
+               public QueryBestSizeCookie query_best_size_unchecked (uint8 _class, Drawable drawable, uint16 
width, uint16 height);
+               public QueryBestSizeReply query_best_size_reply (QueryBestSizeCookie cookie, out 
GenericError? e);
+
+               [CCode (cname = "xcb_query_extension")]
+               private QueryExtensionCookie vala_query_extension (uint16 name_len, string name);
+               [CCode (cname = "vala_xcb_query_extension")]
+               public QueryExtensionCookie query_extension (string name) {
+                       return this.vala_query_extension ((uint16) name.length, name);
+               }
+               [CCode (cname = "xcb_query_extension_unchecked")]
+               private QueryExtensionCookie vala_query_extension_unchecked (uint16 name_len, string name);
+               [CCode (cname = "vala_xcb_query_extension_unchecked")]
+               public QueryExtensionCookie query_extension_unchecked (string name) {
+                       return this.vala_query_extension_unchecked ((uint16) name.length, name);
+               }
+               public QueryExtensionReply query_extension_reply (QueryExtensionCookie cookie, out 
GenericError? e);
+
+               public ListExtensionsCookie list_extensions ();
+               public ListExtensionsCookie list_extensions_unchecked ();
+               public ListExtensionsReply list_extensions_reply (ListExtensionsCookie cookie, out 
GenericError? e);
+
+               //change_keyboard_mapping
+
+               //get_keyboard_mapping
+
+               //change_keyboard_control
+
+               //get_keyboard_control
+
+               public VoidCookie bell_checked (int8 percent);
+               public VoidCookie bell (int8 percent);
+
+               //change_pointer_control
+
+               //get_pointer_control
+
+               public VoidCookie set_screen_saver_checked (int16 timeout, int16 interval, uint8 
prefer_blanking, uint8 allow_exposures);
+               public VoidCookie set_screen_saver (int16 timeout, int16 interval, uint8 prefer_blanking, 
uint8 allow_exposures);
+
+               public GetScreenSaverCookie get_screen_saver ();
+               public GetScreenSaverCookie get_screen_saver_unchecked ();
+               public GetScreenSaverReply get_screen_saver_reply (GetScreenSaverCookie cookie, out 
GenericError? e);
+
+               public VoidCookie change_hosts_checked (HostMode mode, Family family, [CCode 
(array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] address);
+               public VoidCookie change_hosts (HostMode mode, Family family, [CCode (array_length_pos = 2.9, 
array_length_type = "uint16_t")] uint8[] address);
+
+               public ListHostsCookie list_hosts ();
+               public ListHostsCookie list_hosts_unchecked ();
+               public ListHostsReply list_hosts_reply (ListHostsCookie cookie, out GenericError? e);
+
+               public VoidCookie set_access_control_checked (AccessControl mode);
+               public VoidCookie set_access_control (AccessControl mode);
+
+               public VoidCookie set_close_down_mode_checked (CloseDown mode);
+               public VoidCookie set_close_down_mode (CloseDown mode);
+
+               public VoidCookie kill_client_checked (uint32 resource);
+               public VoidCookie kill_client (uint32 resource);
+
+               public VoidCookie rotate_properties_checked (Window window, int16 delta, [CCode 
(array_length_pos = 1.9, array_length_type = "uint16_t")] AtomT[] atoms);
+               public VoidCookie rotate_properties (Window window, int16 delta, [CCode (array_length_pos = 
1.9, array_length_type = "uint16_t")] AtomT[] atoms);
+
+               public VoidCookie force_screen_saver_checked (ScreenSaver mode);
+               public VoidCookie force_screen_saver (ScreenSaver mode);
+
+               //set_pointer_mapping
+
+               //get_pointer_mapping
+
+               //set_modifier_mapping
+
+               //get_modifier_mapping
+
+               public VoidCookie no_operation_checked ();
+               public VoidCookie no_operation ();
        }
 
        [CCode (cprefix = "XCB_CONN_", cname = "int", has_type_id = false)]
@@ -215,7 +624,7 @@ namespace Xcb {
        [CCode (cname = "xcb_get_property_reply_t", ref_function = "", unref_function = "free")]
        public class GetPropertyReply {
                public uint8 format;
-               public Atom type;
+               public AtomT type;
                [CCode (cname = "xcb_get_property_value_length")]
                public int32 value_length();
                [CCode (cname = "xcb_get_property_value")]
@@ -246,27 +655,727 @@ namespace Xcb {
        [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;
+               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 ();
+               private unowned string vala_name ();
+               public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
        }
-       
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_list_properties_cookie_t", has_type_id = false)]
+       public struct ListPropertiesCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_list_properties_reply_t", ref_function = "", unref_function = "free")]
+       public class ListPropertiesReply {
+               private uint16 atoms_len;
+               [CCode (cname = "xcb_list_properties_atoms")]
+               private Atom* vala_atoms();
+               public Atom[] atoms
+               {
+                       get
+                       {
+                               unowned Atom[] res = (Atom[]) vala_atoms ();
+                               res.length = atoms_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_selection_owner_cookie_t", has_type_id = false)]
+       public struct GetSelectionOwnerCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_get_selection_owner_reply_t", ref_function = "", unref_function = "free")]
+       public class GetSelectionOwnerReply {
+               public Window owner;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_grab_pointer_cookie_t", has_type_id = false)]
+       public struct GrabPointerCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_grab_pointer_reply_t", ref_function = "", unref_function = "free")]
+       public class GrabPointerReply {
+               public GrabStatus status;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_grab_keyboard_cookie_t", has_type_id = false)]
+       public struct GrabKeyboardCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_grab_keyboard_reply_t", ref_function = "", unref_function = "free")]
+       public class GrabKeyboardReply {
+               public GrabStatus status;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_query_pointer_cookie_t", has_type_id = false)]
+       public struct QueryPointerCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_query_pointer_reply_t", ref_function = "", unref_function = "free")]
+       public class QueryPointerReply {
+               public uint8 same_screen;
+               public Window root;
+               public Window child;
+               public int16 root_x;
+               public int16 root_y;
+               public int16 win_x;
+               public int16 win_y;
+               public uint16 mask;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_motion_events_cookie_t", has_type_id = false)]
+       public struct GetMotionEventsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_get_motion_events_reply_t", ref_function = "", unref_function = "free")]
+       public class GetMotionEventsReply {
+               private uint32 events_len;
+               [CCode (cname = "xcb_get_motion_events_events")]
+               private Timecoord* vala_events ();
+               public Timecoord[] events
+               {
+                       get
+                       {
+                               unowned Timecoord[] res = (Timecoord[]) vala_events ();
+                               res.length = (int) events_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_image_cookie_t", has_type_id = false)]
+       public struct GetImageCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_get_image_reply_t", ref_function = "", unref_function = "")]
+       public class GetImageReply {
+               public uint8 depth;
+               public VisualID visual;
+               private uint32 length;
+               [CCode (cname = "xcb_get_image_data")]
+               public uint8* vala_data ();
+               public uint8[] data
+               {
+                       get
+                       {
+                               unowned uint8[] res = (uint8[]) vala_data ();
+                               res.length = (int) length;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_list_installed_colormaps_cookie_t", has_type_id = false)]
+       public struct ListInstalledColormapsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_list_installed_colormaps_reply_t", ref_function = "", unref_function = "free")]
+       public class ListInstalledColormapsReply {
+               private uint16 cmaps_len;
+               [CCode (cname = "xcb_list_installed_colormaps_cmaps")]
+               private Colormap* vala_cmaps ();
+               public Colormap[] cmaps
+               {
+                       get
+                       {
+                               unowned Colormap[] res = (Colormap[]) vala_cmaps ();
+                               res.length = (int) cmaps_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_alloc_color_cookie_t", has_type_id = false)]
+       public struct AllocColorCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_alloc_color_reply_t", ref_function = "", unref_function = "free")]
+       public class AllocColorReply {
+               public uint16 red;
+               public uint16 green;
+               public uint16 blue;
+               public uint32 pixel;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_alloc_named_color_cookie_t", has_type_id = false)]
+       public struct AllocNamedColorCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_alloc_named_color_reply_t", ref_function = "", unref_function = "free")]
+       public class AllocNamedColorReply {
+               public uint32 pixel;
+               public uint16 exact_red;
+               public uint16 exact_green;
+               public uint16 exact_blue;
+               public uint16 visual_red;
+               public uint16 visual_green;
+               public uint16 visual_blue;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_alloc_color_cells_cookie_t", has_type_id = false)]
+       public struct AllocColorCellsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_alloc_color_cells_reply_t", ref_function = "", unref_function = "free")]
+       public class AllocColorCellsReply {
+               private uint16 pixels_len;
+               [CCode (cname = "xcb_alloc_color_cells_pixels")]
+               private uint32* vala_pixels ();
+               public uint32[] pixels
+               {
+                       get {
+                               unowned uint32[] res = (uint32[]) vala_pixels ();
+                               res.length = (int) pixels_len;
+                               return res;
+                       }
+               }
+               private uint16 masks_len;
+               [CCode (cname = "xcb_alloc_color_cells_masks")]
+               private uint32* vala_masks ();
+               public uint32[] masks
+               {
+                       get {
+                               unowned uint32[] res = (uint32[]) vala_masks ();
+                               res.length = (int) masks_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_alloc_color_planes_cookie_t", has_type_id = false)]
+       public struct AllocColorPlanesCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_alloc_color_planes_reply_t", ref_function = "", unref_function = "free")]
+       public class AllocColorPlanesReply {
+               public uint32 red_mask;
+               public uint32 green_mask;
+               public uint32 blue_mask;
+               private uint16 pixels_len;
+               [CCode (cname = "xcb_alloc_color_planes_pixels")]
+               private uint32* vala_pixels ();
+               public uint32[] pixels
+               {
+                       get {
+                               unowned uint32[] res = (uint32[]) vala_pixels ();
+                               res.length = (int) pixels_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_query_colors_cookie_t", has_type_id = false)]
+       public struct QueryColorsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_query_colors_reply_t", ref_function = "", unref_function = "free")]
+       public class QueryColorsReply {
+               private uint16 colors_len;
+               [CCode (cname = "xcb_query_colors_colors")]
+               private RGB* vala_colors ();
+               public RGB[] colors
+               {
+                       get {
+                               unowned RGB[] res = (RGB[]) vala_colors ();
+                               res.length = (int) colors_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_lookup_color_cookie_t", has_type_id = false)]
+       public struct LookupColorCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_lookup_color_reply_t", ref_function = "", unref_function = "free")]
+       public class LookupColorReply {
+               public uint16 exact_red;
+               public uint16 exact_green;
+               public uint16 exact_blue;
+               public uint16 visual_red;
+               public uint16 visual_green;
+               public uint16 visual_blue;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_query_best_size_cookie_t", has_type_id = false)]
+       public struct QueryBestSizeCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_query_best_size_reply_t", ref_function = "", unref_function = "free")]
+       public class QueryBestSizeReply {
+               public uint16 width;
+               public uint16 height;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_query_extension_cookie_t", has_type_id = false)]
+       public struct QueryExtensionCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_query_extension_reply_t", ref_function = "", unref_function = "free")]
+       public class QueryExtensionReply {
+               public bool present;
+               public uint8 major_opcode;
+               public uint8 first_event;
+               public uint8 first_error;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_list_extensions_cookie_t", has_type_id = false)]
+       public struct ListExtensionsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_list_extensions_reply_t", ref_function = "", unref_function = "free")]
+       public class ListExtensionsReply {
+               private uint8 names_len;
+               [CCode (cname = "xcb_list_extensions_names_iterator")]
+               private StrIterator names_iterator ();
+               public string[] names
+               {
+                       owned get
+                       {
+                               var value = new string[names_len];
+                               var iter = names_iterator ();
+                               for (var i = 0; i < value.length; i++)
+                               {
+                                       value[i] = iter.data.name;
+                                       StrIterator.next (ref iter);
+                               }
+                               return value;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_keyboard_mapping_cookie_t", has_type_id = false)]
+       public struct GetKeyboardMappingCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_get_keyboard_mapping_reply_t", ref_function = "", unref_function = "free")]
+       //public class GetKeyboardMappingReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_keyboard_control_cookie_t", has_type_id = false)]
+       public struct GetKeyboardControlCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_get_keyboard_control_reply_t", ref_function = "", unref_function = "free")]
+       //public class GetKeyboardControlReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_pointer_control_cookie_t", has_type_id = false)]
+       public struct GetPointerControlCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_get_pointer_control_reply_t", ref_function = "", unref_function = "free")]
+       //public class GetPointerControlReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_screen_saver_cookie_t", has_type_id = false)]
+       public struct GetScreenSaverCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_get_screen_saver_reply_t", ref_function = "", unref_function = "free")]
+       public class GetScreenSaverReply {
+               public uint16 timeout;
+               public uint16 interval;
+               public uint8 prefer_blanking;
+               public uint8 allow_exposures;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_list_hosts_cookie_t", has_type_id = false)]
+       public struct ListHostsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_list_hosts_reply_t", ref_function = "", unref_function = "free")]
+       public class ListHostsReply {
+               private uint16 hosts_len;
+               [CCode (cname = "xcb_list_hosts_hosts_iterator")]
+               private HostIterator hosts_iterator ();
+               public Host[] hosts {
+                       owned get
+                       {
+                               var value = new Host[hosts_len];
+                               var iter = hosts_iterator ();
+                               for (var i = 0; i < value.length; i++)
+                               {
+                                       value[i] = iter.data;
+                                       HostIterator.next (ref iter);
+                               }
+                               return value;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_set_pointer_mapping_cookie_t", has_type_id = false)]
+       public struct SetPointerMappingCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_set_pointer_mapping_reply_t", ref_function = "", unref_function = "free")]
+       //public class SetPointerMappingReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_pointer_mapping_cookie_t", has_type_id = false)]
+       public struct GetPointerMappingCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_get_pointer_mapping_reply_t", ref_function = "", unref_function = "free")]
+       //public class GetPointerMappingReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_set_modifier_mapping_cookie_t", has_type_id = false)]
+       public struct SetModifierMappingCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_set_modifier_mapping_reply_t", ref_function = "", unref_function = "free")]
+       //public class SetModifierMappingReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_modifier_mapping_cookie_t", has_type_id = false)]
+       public struct GetModifierMappingCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_get_modifier_mapping_reply_t", ref_function = "", unref_function = "free")]
+       //public class GetModifierMappingReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_translate_coordinates_cookie_t", has_type_id = false)]
+       public struct TranslateCoordinatesCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_translate_coordinates_reply_t", ref_function = "", unref_function = "free")]
+       public class TranslateCoordinatesReply {
+               public uint8 same_screen;
+               public Window child;
+               public int16 dst_x;
+               public int16 dst_y;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_input_focus_cookie_t", has_type_id = false)]
+       public struct GetInputFocusCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_get_input_focus_reply_t", ref_function = "", unref_function = "free")]
+       public class GetInputFocusReply {
+               public InputFocus revert_to;
+               public Window focus;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_query_keymap_cookie_t", has_type_id = false)]
+       public struct QueryKeymapCookie {
+       }
+
+       //[Compact]
+       //[CCode (cname = "xcb_query_keymap_reply_t", ref_function = "", unref_function = "free")]
+       //public class QueryKeymapReply {
+       //}
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_query_font_cookie_t", has_type_id = false)]
+       public struct QueryFontCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_query_font_reply_t", ref_function = "", unref_function = "free")]
+       public class QueryFontReply {
+               public Charinfo min_bounds;
+               public Charinfo max_bounds;
+               public uint16 min_char_or_byte2;
+               public uint16 max_char_or_byte2;
+               public uint16 default_char;
+               public uint8 draw_direction;
+               public uint8 min_byte1;
+               public uint8 max_byte1;
+               public uint8 all_chars_exist;
+               public int16 font_ascent;
+               public int16 font_descent;
+               private uint16 properties_len;
+               [CCode (cname = "xcb_query_font_properties")]
+               private Fontprop* vala_properties ();
+               public Fontprop[] properties
+               {
+                       get
+                       {
+                               unowned Fontprop[] res = (Fontprop[]) vala_properties ();
+                               res.length = properties_len;
+                               return res;
+                       }
+               }
+               private uint32 char_infos_len;
+               [CCode (cname = "xcb_query_font_char_infos")]
+               private Charinfo* vala_char_infos ();
+               public Charinfo[] char_infos
+               {
+                       get
+                       {
+                               unowned Charinfo[] res = (Charinfo[]) vala_char_infos ();
+                               res.length = (int) char_infos_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_query_text_extents_cookie_t", has_type_id = false)]
+       public struct QueryTextExtentsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_query_text_extents_reply_t", ref_function = "", unref_function = "free")]
+       public class QueryTextExtentsReply {
+               public FontDraw draw_direction;
+               public int16 font_ascent;
+               public int16 font_descent;
+               public int16 overall_ascent;
+               public int16 overall_descent;
+               public int16 overall_width;
+               public int16 overall_height;
+               public int16 overall_left;
+               public int16 overall_right;
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_list_fonts_cookie_t", has_type_id = false)]
+       public struct ListFontsCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_list_fonts_reply_t", ref_function = "", unref_function = "free")]
+       public class ListFontsReply {
+               private uint16 names_len;
+               [CCode (cname = "xcb_list_fonts_names_iterator")]
+               private StrIterator names_iterator ();
+               public string[] names
+               {
+                       owned get
+                       {
+                               var value = new string[names_len];
+                               var iter = names_iterator ();
+                               for (var i = 0; i < value.length; i++)
+                               {
+                                       value[i] = iter.data.name;
+                                       StrIterator.next (ref iter);
+                               }
+                               return value;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_list_fonts_with_info_cookie_t", has_type_id = false)]
+       public struct ListFontsWithInfoCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_list_fonts_with_info_reply_t", ref_function = "", unref_function = "free")]
+       public class ListFontsWithInfoReply {
+               public Charinfo min_bounds;
+               public Charinfo max_bounds;
+               public uint16 min_char_or_byte2;
+               public uint16 max_char_or_byte2;
+               public uint16 default_char;
+               public uint8 draw_direction;
+               public uint8 min_byte1;
+               public uint8 max_byte1;
+               public uint8 all_chars_exist;
+               public int16 font_ascent;
+               public int16 font_descent;
+               public uint32 replies_hint;
+               private uint16 properties_len;
+               [CCode (cname = "xcb_list_fonts_with_info_properties")]
+               private Fontprop* vala_properties ();
+               public Fontprop[] properties
+               {
+                       get
+                       {
+                               unowned Fontprop[] res = (Fontprop[]) vala_properties ();
+                               res.length = properties_len;
+                               return res;
+                       }
+               }
+               private uint8 name_len;
+               [CCode (cname = "xcb_list_fonts_with_info_name")]
+               private unowned string vala_name ();
+               public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
+       }
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_get_font_path_cookie_t", has_type_id = false)]
+       public struct GetFontPathCookie {
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_get_font_path_reply_t", ref_function = "", unref_function = "free")]
+       public class GetFontPathReply {
+               private uint16 path_len;
+               [CCode (cname = "xcb_get_font_path_path_iterator")]
+               private StrIterator path_iterator ();
+               public string[] path
+               {
+                       owned get
+                       {
+                               var value = new string[path_len];
+                               var iter = path_iterator ();
+                               for (var i = 0; i < value.length; i++)
+                               {
+                                       value[i] = iter.data.name;
+                                       StrIterator.next (ref iter);
+                               }
+                               return value;
+                       }
+               }
+       }
+
+       [CCode (cname = "xcb_circulate_t", has_type_id = false)]
+       public enum Circulate {
+               RAISE_LOWEST,
+               LOWER_HIGHEST
+       }
+
        [SimpleType]
        [IntegerType (rank = 9)]
        [CCode (cname = "xcb_atom_t", has_type_id = false)]
        public struct AtomT {
        }
-       
+
+       [SimpleType]
+       [IntegerType (rank = 9)]
+       [CCode (cname = "xcb_fontable_t", has_type_id = false)]
+       public struct Fontable {
+       }
+
        [CCode (cname = "xcb_prop_mode_t", has_type_id = false)]
        public enum PropMode {
                REPLACE,
                PREPEND,
                APPEND
        }
-       
+
+       [CCode (cname = "xcb_grab_mode_t", has_type_id = false)]
+       public enum GrabMode {
+               SYNC,
+               ASYNC
+       }
+
+       [CCode (cname = "xcb_grab_status_t", has_type_id = false)]
+       public enum GrabStatus {
+               SUCCESS,
+               ALREADY_GRABBED,
+               INVALID_TIME,
+               NOT_VIEWABLE,
+               FROZEN
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_timecoord_t", has_type_id = false)]
+       public struct Timecoord {
+               public Timestamp time;
+               public int16 x;
+               public int16 y;
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_timecoord_iterator_t", has_type_id = false)]
+       private struct TimecoordIterator {
+               public unowned Timecoord data;
+               public int rem;
+               public int index;
+               [CCode (cname = "xcb_timecoord_next")]
+               public static void next (ref TimecoordIterator iter);
+       }
+
        [CCode (cname = "xcb_atom_enum_t", has_type_id = false)]
        public enum Atom {
                NONE,
@@ -340,7 +1449,7 @@ namespace Xcb {
                WM_CLASS,
                WM_TRANSIENT_FOR
        }
-       
+
        public const uint8 KEY_PRESS;
        public const uint8 KEY_RELEASE;
        public const uint8 BUTTON_PRESS;
@@ -374,7 +1483,8 @@ namespace Xcb {
        public const uint8 COLORMAP_NOTIFY;
        public const uint8 CLIENT_MESSAGE;
        public const uint8 MAPPING_NOTIFY;
-       
+
+       [CCode (cname = "xcb_config_window_t", has_type_id = false)]
        public enum ConfigWindow {
                X,
                Y,
@@ -390,7 +1500,7 @@ namespace Xcb {
                LSB_FIRST,
                MSB_FIRST
        }
-       
+
        [Compact]
        [CCode (cname = "xcb_setup_t", ref_function = "", unref_function = "")]
        public class Setup {
@@ -401,6 +1511,10 @@ namespace Xcb {
                public uint32 resource_id_base;
                public uint32 resource_id_mask;
                public uint32 motion_buffer_size;
+               private uint16 vendor_len;
+               [CCode (cname = "xcb_setup_vendor")]
+               private unowned string vala_vendor ();
+               public string vendor { owned get { return "%.*s".printf (vendor_len, vala_vendor ()); } }
                public uint32 maximum_request_length;
                public uint8 image_byte_order;
                public uint8 bitmap_format_bit_order;
@@ -408,10 +1522,35 @@ namespace Xcb {
                public uint8 bitmap_format_scanline_pad;
                public Keycode min_keycode;
                public Keycode max_keycode;
-               public int pixmap_formats_length ();
-               public FormatIterator pixmap_formats_iterator ();
+               private uint8 pixmap_formats_len;
+               [CCode (cname = "xcb_setup_pixmap_formats")]
+               private Format* vala_pixmap_formats ();
+               public Format[] pixmap_formats
+               {
+                       get
+                       {
+                               unowned Format[] res = (Format[]) vala_pixmap_formats ();
+                               res.length = pixmap_formats_len;
+                               return res;
+                       }
+               }
+               private uint8 roots_len;
+               [Deprecated (since = "vala-0.26", replacement = "Xcb.Setup.screens")]
                public int roots_length ();
                public ScreenIterator roots_iterator ();
+               public Screen[] screens {
+                       owned get
+                       {
+                               var value = new Screen[roots_len];
+                               var iter = roots_iterator ();
+                               for (var i = 0; i < value.length; i++)
+                               {
+                                       value[i] = iter.data;
+                                       ScreenIterator.next (ref iter);
+                               }
+                               return value;
+                       }
+               }
        }
 
        public const char COPY_FROM_PARENT;
@@ -427,8 +1566,13 @@ namespace Xcb {
        [CCode (cname = "xcb_generic_event_t", ref_function = "", unref_function = "")]
        public class GenericEvent {
                public uint8 response_type;
+               public uint8 extension;
+               public uint16 sequence;
+               public uint32 length;
+               public uint16 event_type;
+               public uint32 full_sequence;
        }
-       
+
        [SimpleType]
        [CCode (cname = "xcb_timestamp_t", has_type_id = false)]
        public struct Timestamp : uint32 {
@@ -438,7 +1582,7 @@ namespace Xcb {
        [CCode (cname = "xcb_keycode_t", has_type_id = false)]
        public struct Keycode : uint8 {
        }
-       
+
        [SimpleType]
        [CCode (cname = "xcb_colormap_t", has_type_id = false)]
        public struct Colormap : uint32 {
@@ -447,35 +1591,35 @@ namespace Xcb {
        [Compact]
        [CCode (cname = "xcb_key_press_event_t", ref_function = "", unref_function = "")]
        public class KeyPressEvent : GenericEvent {
-               Keycode detail;
-               uint16 sequence;
-               Timestamp time;
-               Window root;
-               Window event;
-               Window child;
-               uint16 root_x;
-               uint16 root_y;
-               uint16 event_x;
-               uint16 event_y;
-               uint16 state;
-               uint8 same_screen;
+               public Keycode detail;
+               public uint16 sequence;
+               public Timestamp time;
+               public Window root;
+               public Window event;
+               public Window child;
+               public uint16 root_x;
+               public uint16 root_y;
+               public uint16 event_x;
+               public uint16 event_y;
+               public uint16 state;
+               public uint8 same_screen;
        }
 
        [Compact]
        [CCode (cname = "xcb_key_release_event_t", ref_function = "", unref_function = "")]
        public class KeyReleaseEvent : GenericEvent {
-               Keycode detail;
-               uint16 sequence;
-               Timestamp time;
-               Window root;
-               Window event;
-               Window child;
-               uint16 root_x;
-               uint16 root_y;
-               uint16 event_x;
-               uint16 event_y;
-               uint16 state;
-               uint8 same_screen;
+               public Keycode detail;
+               public uint16 sequence;
+               public Timestamp time;
+               public Window root;
+               public Window event;
+               public Window child;
+               public uint16 root_x;
+               public uint16 root_y;
+               public uint16 event_x;
+               public uint16 event_y;
+               public uint16 state;
+               public uint8 same_screen;
        }
 
        [Compact]
@@ -518,9 +1662,9 @@ namespace Xcb {
        [Compact]
        [CCode (cname = "xcb_motion_notify_event_t", ref_function = "", unref_function = "")]
        public class MotionNotifyEvent : GenericEvent {
-               uint8 detail;
-               uint16 sequence;
-               Timestamp time;
+               public uint8 detail;
+               public uint16 sequence;
+               public Timestamp time;
                public Window root;
                public Window event;
                public Window child;
@@ -547,9 +1691,9 @@ namespace Xcb {
        [Compact]
        [CCode (cname = "xcb_enter_notify_event_t", ref_function = "", unref_function = "")]
        public class EnterNotifyEvent : GenericEvent {
-               uint8 detail;
-               uint16 sequence;
-               Timestamp time;
+               public uint8 detail;
+               public uint16 sequence;
+               public Timestamp time;
                public Window root;
                public Window event;
                public Window child;
@@ -565,9 +1709,9 @@ namespace Xcb {
        [Compact]
        [CCode (cname = "xcb_leave_notify_event_t", ref_function = "", unref_function = "")]
        public class LeaveNotifyEvent : GenericEvent {
-               uint8 detail;
-               uint16 sequence;
-               Timestamp time;
+               public uint8 detail;
+               public uint16 sequence;
+               public Timestamp time;
                public Window root;
                public Window event;
                public Window child;
@@ -583,7 +1727,7 @@ namespace Xcb {
        [Compact]
        [CCode (cname = "xcb_keymap_notify_event_t", ref_function = "", unref_function = "")]
        public class KeymapNotifyEvent : GenericEvent {
-               uint8[] keys;
+               public uint8[] keys;
        }
 
        [Compact]
@@ -716,7 +1860,7 @@ namespace Xcb {
        public class PropertyNotifyEvent : GenericEvent {
                uint16 sequence;
                public Window window;
-               public Atom atom;
+               public AtomT atom;
                public Timestamp time;
                public uint8 state;
        }
@@ -727,9 +1871,9 @@ namespace Xcb {
                uint16 sequence;
                public Timestamp time;
                public Window requestor;
-               public Atom selection;
-               public Atom target;
-               public Atom property;
+               public AtomT selection;
+               public AtomT target;
+               public AtomT property;
        }
 
        [Compact]
@@ -800,9 +1944,9 @@ namespace Xcb {
                OWNER_GRAB_BUTTON
        }
 
-       [Compact]
-       [CCode (cname = "xcb_format_t", ref_function = "", unref_function = "")]
-       public class Format {
+       [Simple]
+       [CCode (cname = "xcb_format_t", has_type_id = false)]
+       public struct Format {
                public uint8 depth;
                public uint8 bits_per_pixel;
                public uint8 scanline_pad;
@@ -810,7 +1954,7 @@ namespace Xcb {
 
        [SimpleType]
        [CCode (cname = "xcb_format_iterator_t", has_type_id = false)]
-       public struct FormatIterator {
+       private struct FormatIterator {
                public unowned Format data;
                public int rem;
                public int index;
@@ -836,8 +1980,22 @@ namespace Xcb {
                public uint8 backing_stores;
                public uint8 save_unders;
                public uint8 root_depth;
-               public int allowed_depths_length ();
+               private uint8 allowed_depths_len;
                public DepthIterator allowed_depths_iterator ();
+               public Depth[] allowed_depths
+               {
+                       owned get
+                       {
+                               var value = new Depth[allowed_depths_len];
+                               var iter = allowed_depths_iterator ();
+                               for (var i = 0; i < value.length; i++)
+                               {
+                                       value[i] = iter.data;
+                                       DepthIterator.next (ref iter);
+                               }
+                               return value;
+                       }
+               }
        }
 
        [SimpleType]
@@ -854,7 +2012,18 @@ namespace Xcb {
        [CCode (cname = "xcb_depth_t", ref_function = "", unref_function = "")]
        public class Depth {
                public uint8 depth;
-               public int visuals_length ();
+               private uint16 visuals_len;
+               [CCode (cname = "xcb_depth_visuals")]
+               private VisualType* vala_visuals ();
+               public VisualType[] visuals
+               {
+                       get {
+                               unowned VisualType[] res = (VisualType[]) vala_visuals ();
+                               res.length = (int) visuals_len;
+                               return res;
+                       }
+               }
+               [Deprecated (since = "vala-0.26", replacement = "Xcb.Depth.visuals")]
                public VisualTypeIterator visuals_iterator ();
        }
 
@@ -868,6 +2037,7 @@ namespace Xcb {
                public Window* children();
        }
 
+       [SimpleType]
        [CCode (cname = "xcb_depth_iterator_t", has_type_id = false)]
        public struct DepthIterator {
                public unowned Depth data;
@@ -876,6 +2046,7 @@ namespace Xcb {
                public static void next (ref DepthIterator iter);
        }
 
+       [Deprecated (since = "vala-0.26", replacement = "Xcb.Depth.visuals")]
        [SimpleType]
        [CCode (cname = "xcb_visualtype_iterator_t", has_type_id = false)]
        public struct VisualTypeIterator {
@@ -902,6 +2073,12 @@ namespace Xcb {
        public struct QueryTreeCookie {
        }
 
+       [CCode (cname = "xcb_point_t", has_type_id = false)]
+       public struct Point {
+               public int16 x;
+               public int16 y;
+       }
+
        [CCode (cname = "xcb_rectangle_t", has_type_id = false)]
        public struct Rectangle {
                public int16 x;
@@ -910,6 +2087,24 @@ namespace Xcb {
                public uint16 height;
        }
 
+       [CCode (cname = "xcb_arc_t", has_type_id = false)]
+       public struct Arc {
+               public int16 x;
+               public int16 y;
+               public uint16 width;
+               public uint16 height;
+               public int16 angle1;
+               public int16 angle2;
+       }
+
+       [CCode (cname = "xcb_segment_t", has_type_id = false)]
+       public struct Segment {
+               public int16 x1;
+               public int16 y1;
+               public int16 x2;
+               public int16 y2;
+       }
+
        [SimpleType]
        [CCode (cname = "xcb_visualid_t", has_type_id = false)]
        public struct VisualID : uint32 {
@@ -936,6 +2131,16 @@ namespace Xcb {
        }
 
        [SimpleType]
+       [CCode (cname = "xcb_cursor_t", has_type_id = false)]
+       public struct Cursor : uint32 {
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_font_t", has_type_id = false)]
+       public struct Font : uint32 {
+       }
+
+       [SimpleType]
        [CCode (cname = "xcb_window_t", has_type_id = false)]
        public struct Window : uint32 {
        }
@@ -950,9 +2155,9 @@ namespace Xcb {
                DIRECT_COLOR
        }
 
-       [Compact]
-       [CCode (cname = "xcb_visualtype_t", ref_function = "", unref_function = "")]
-       public class VisualType {
+       [SimpleType]
+       [CCode (cname = "xcb_visualtype_t", has_type_id = false)]
+       public struct VisualType {
                public VisualID visual_id;
                public uint8 _class;
                public uint8 bits_per_rgb_value;
@@ -962,6 +2167,20 @@ namespace Xcb {
                public uint32 blue_mask;
        }
 
+       [CCode (cname = "xcb_input_focus_t", has_type_id = false)]
+       public enum InputFocus {
+               NONE,
+               POINTER_ROOT,
+               PARENT,
+               FOLLOW_KEYBOARD
+       }
+
+       [CCode (cname = "xcb_font_draw_t", has_type_id = false)]
+       public enum FontDraw {
+               LEFT_TO_RIGHT,
+               RIGHT_TO_LEFT
+       }
+
        [CCode (cname = "xcb_gc_t", has_type_id = false)]
        public enum GC
        {
@@ -1065,5 +2284,183 @@ namespace Xcb {
                CHORD,
                PIE_SLICE
        }
-}
 
+       [CCode (cname = "xcb_clip_ordering_t", has_type_id = false)]
+       public enum ClipOrdering
+       {
+               UNSORTED,
+               Y_SORTED,
+               YX_SORTED,
+               YX_BANDED
+       }
+
+       [CCode (cname = "xcb_coord_mode_t", has_type_id = false)]
+       public enum CoordMode
+       {
+               ORIGIN,
+               PREVIOUS
+       }
+
+       [CCode (cname = "xcb_poly_shape_t", has_type_id = false)]
+       public enum PolyShape
+       {
+               COMPLEX,
+               NONCONVEX,
+               CONVEX
+       }
+
+       [CCode (cname = "xcb_image_format_t", has_type_id = false)]
+       public enum ImageFormat
+       {
+               XY_BITMAP,
+               XY_PIXMAP,
+               Z_PIXMAP
+       }
+
+       [CCode (cname = "xcb_color_flag_t", has_type_id = false)]
+       public enum ColorFlag
+       {
+               RED,
+               GREEN,
+               BLUE
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_coloritem_t", has_type_id = false)]
+       public struct Coloritem {
+               public uint32 pixel;
+               public uint16 red;
+               public uint16 green;
+               public uint16 blue;
+               public ColorFlag flags;
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_rgb_t", has_type_id = false)]
+       public struct RGB {
+               public uint16 red;
+               public uint16 green;
+               public uint16 blue;
+       }
+
+       [CCode (cname = "xcb_set_mode_t", has_type_id = false)]
+       public enum SetMode
+       {
+               INSERT,
+               DELETE
+       }
+
+       [CCode (cname = "xcb_host_mode_t", has_type_id = false)]
+       public enum HostMode
+       {
+               INSERT,
+               DELETE
+       }
+
+       [CCode (cname = "xcb_family_t", has_type_id = false)]
+       public enum Family
+       {
+               INTERNET,
+               DECNET,
+               CHAOS,
+               SERVER_INTERPRETED,
+               INTERNET_6
+       }
+
+       [CCode (cname = "xcb_access_control_t", has_type_id = false)]
+       public enum AccessControl
+       {
+               DISABLE,
+               ENABLE
+       }
+
+       [CCode (cname = "xcb_close_down_t", has_type_id = false)]
+       public enum CloseDown
+       {
+               DESTROY_ALL,
+               RETAIN_PERMANENT,
+               RETAIN_TEMPORARY
+       }
+
+       [CCode (cname = "xcb_screen_saver_t", has_type_id = false)]
+       public enum ScreenSaver
+       {
+               RESET,
+               ACTIVE
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_str_t", ref_function = "", unref_function = "")]
+       private class Str {
+               private uint8 name_len;
+               [CCode (cname = "xcb_str_name")]
+               private unowned string vala_name ();
+               public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_str_iterator_t", has_type_id = false)]
+       private struct StrIterator {
+               public unowned Str data;
+               public int rem;
+               public int index;
+               [CCode (cname = "xcb_str_next")]
+               public static void next (ref StrIterator iter);
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_host_t", ref_function = "", unref_function = "")]
+       public class Host {
+               public Family family;
+               private uint16 address_len;
+               [CCode (cname = "xcb_host_address")]
+               public unowned uint8* vala_address ();
+               public uint8[] address
+               {
+                       get
+                       {
+                               unowned uint8[] res = (uint8[]) vala_address ();
+                               res.length = address_len;
+                               return res;
+                       }
+               }
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_host_iterator_t", has_type_id = false)]
+       private struct HostIterator {
+               public unowned Host data;
+               public int rem;
+               public int index;
+               [CCode (cname = "xcb_host_next")]
+               public static void next (ref HostIterator iter);
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_fontprop_t", has_type_id = false)]
+       public struct Fontprop {
+               public AtomT name;
+               public uint32 value;
+       }
+
+       [Compact]
+       [CCode (cname = "xcb_fontprop_t", ref_function = "", unref_function = "")]
+       public class Charinfo {
+               public int16 left_side_bearing;
+               public int16 right_side_bearing;
+               public int16 character_width;
+               public int16 ascent;
+               public int16 descent;
+               public uint16 attributes;
+       }
+
+       [SimpleType]
+       [CCode (cname = "xcb_fontprop_iterator_t", has_type_id = false)]
+       private struct FontpropIterator {
+               public unowned Fontprop data;
+               public int rem;
+               public int index;
+               [CCode (cname = "xcb_fontprop_next")]
+               public static void next (ref FontpropIterator iter);
+       }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]