Index: vapi/xcb.vapi
===================================================================
--- vapi/xcb.vapi	(revision 0)
+++ vapi/xcb.vapi	(revision 0)
@@ -0,0 +1,4314 @@
+#Only to make a mixins
+namespace XLib {
+    [CCode (cname = "Display", cheader_filename = "X11/Xlib.h")]
+    public class Display {
+        [CCode (cname = "XSetEventQueueOwner")]
+        set_event_queue_owner (EventQueueOwner owner);
+    };
+    
+    [CCode (cname = "XEventQueueOwner", cheader_filename = "X11/Xlib-xcb.h")]
+    public enum EventQueueOwner {
+        [CCode (cname = "XlibOwnsEventQueue")]
+        XLIB,
+        [CCode (cname = "XCBOwnsEventQueue")]
+        XCB
+    }
+}
+
+namespace Xcb {
+    [CCode (cheader_filename = "xcb/xcb.h")]
+    public static class Protocol {
+        [CCode (cname = "X_PROTOCOL") ]
+        public const uint VERSION;
+        [CCode (cname = "X_PROTOCOL_REVISION", cheader_filename
+        public const uint REVISION;
+    }
+    
+    [CCode (cname = "X_TCP_PORT", cheader_filename = "xcb/xcb.h")]
+    public const uint16 TCP_PORT;
+    
+    [CCode (cname = "xcb_generic_iterator_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Iterator<T> {
+        public T data;
+        [CCode (cname = "rem")]
+        public int remaining;
+        public int index;
+    }
+    
+    [CCode (cname = "xcb_generic_reply_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Reply {
+        public uint8 response_type;
+        public uint16 sequence;
+        public uint32 length;
+    }
+    
+    [CCode (cname = "xcb_generic_event_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Event {
+        public uint8 response_type;
+        public uint16 sequence;
+        public uint32 full_sequence;
+    }
+    
+    [CCode (cname = "xcb_generic_error_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Error {
+        public uint8 response_type;
+        public uint8 error_code;
+        public uint32 full_sequence;
+    }
+    
+    [CCode (cname = "void")]
+    public class Request { }
+    
+    [CCode (cname = "xcb_void_cookie_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Cookie {
+        public uint sequence;
+        [CCode (cname = "xcb_request_check", instance_pos = 1.5)]
+        public Error check_request (Connection connection);
+    }
+    
+    [CCode (cname = "XCB_NONE", cheader_filename = "xcb/xcb.h")]
+    public const long NONE;
+    
+    [CCode (cname = "XCB_COPY_FROM_PARENT", cheader_filename = "xcb/xcb.h")]
+    public const long COPY_FROM_PARENT;
+    
+    [CCode (cname = "XCB_CURRENT_TIME", cheader_filename = "xcb/xcb.h")]
+    public const long CURRENT_TIME;
+    
+    [CCode (cname = "XCB_NO_SYMBOL", cheader_filename = "xcb/xcb.h")]
+    public const long NO_SYMBOL;
+    
+    [CCode (cname = "xcb_auth_info_t", cheader_filename = "xcb/xcb.h")]
+    public struct AuthInfo {
+        [CCode (cname = "namelen")]
+        public int name_length;
+        public string name;
+        [CCode (cname = "datalen")]
+        public int data_length;
+        public pointer data;
+    }
+    
+    [CCode (cname = "xcb_connection_t", cheader_filename = "xcb/xcb.h,xcb/xcbxlib.h", free_function = "xcb_disconnect")]
+    public class Connection {
+        [CCode (cname = "xcb_flush")]
+        public int flush ();
+        [CCode (cname = "xcb_get_maximum_request_length")]
+        public uint32 get_maximum_request_length ();
+        [CCode (cname = "xcb_prefetch_maximum_request_length")]
+        public void prefetch_maximum_request_length ();
+        [CCode (cname = "xcb_wait_for_event")]
+        public Event wait_for_event ();
+        [CCode (cname = "xcb_pool_for_event")]
+        public Event pool_for_event ();
+        [CCode (cname = "xcb_get_setup")]
+        public const Setup get_setup ();
+        [CCode (cname = "xcb_get_file_descriptor")]
+        public int get_fd ();
+        [CCode (cname = "xcb_connection_has_error")]
+        public bool has_error();
+        [CCode (cname = "xcb_connect_to_fd")]
+        public Connection.to_fd (int fd, AuthInfo *auth_info);
+        [CCode (cname = "xcb_connect")]
+        public Connection (const string displayname, int *screenp);
+        [CCode (cname = "xcb_connect_to_display_with_auth_info")]
+        public Connection.to_display_with_auth_info (const string display, AuthInfo *auth_info, int *screen);
+        [CCode (cname = "xcb_generate_id")]
+        public Xid generate_xid();
+        [CCode (cname = "xcb_get_request_sent")
+        public Request get_request_sent();
+        [CCode (cname = "xcb_xlib_lock")]
+        public void xlib_lock();
+        [CCode (cname = "xcb_xlib_unlock")]
+        public void xlib_unlock();
+        [CCode (cname = "xcb_wait_for_reply", cheader_filename = "xcb/xcbext.h", instance_pos = 1.5)]
+        public Reply wait_for_reply (Connection conn, out Error err);
+        [CCode (cname = "xcb_poll_for_reply", cheader_filename = "xcb/xcbext.h", instance_pos = 1.5)]
+        public bool pool_for_reply (Connection conn, out Reply reply, out Error err);
+        [CCode (cname = "XGetXCBConnection", cheader_filename = "X11/Xlib-xcb.h")]
+        public Connection.from_display (XLib.Display display);
+    }
+    
+    [CCode (cname = "xcb_extension_t", cheader_filename = "xcb/xcb.h,xcb/xcbext.h", free_function = "g_free")]
+    public class Extenstion {
+        public const string name;
+        public int global_id;
+        [CCode (cname = "xcb_get_extension_data", instance_pos = -1)]
+        public QueryExtensionReply get_data (Connection conn);
+        [CCode (cname = "xcb_prefetch_extension_data", instance_pos = -1)]
+        public void prefetch_data (Connection conn);
+    }
+    
+    [CCode (cname = "xcb_parse_display", cheader_filename = "xcb/xcb.h")]
+    public bool parse_display(const string name, string *host, int *display, int *screen);
+
+    [CCode (cname = "xcb_protocol_request_t", cheader_filename = "xcb/xcbext.h")]
+    public class ProtocolRequest {
+        public size_t count;
+        public Extenstion extension;
+        public uint8 opcode;
+        [CCode (cname = "isvoid")]
+        public uint8 is_void;
+        [CCode (cname = "xcb_send_request", instance_pos = -1)]
+        public Request send (Connection conn, SendRequestFlags flags, pointer /*struct iovec*/ vect);
+    }
+    
+    [CCode (cname = "enum xcb_send_request_flags_t", cheader_filename = "xcb/xcbext.h", cprefix = "XCB_REQUEST_")]
+    public enum SendRequestFlags {
+        CHECKED,
+        RAW,
+        DISCARD_REPLY
+    }
+    
+    [CCode (cname = "xcb_popcount", cheader_filename = "xcb/xcbext.h")]
+    public int popcount(uint32 mask);
+
+    [CCode (cname = 'xcb_window_t', cheader_filename='xcb/xproto.h)]
+    public struct Window : Drawable {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Window();
+    }
+
+    [CCode (cname = 'xcb_pixmap_t', cheader_filename='xcb/xproto.h)]
+    public struct Pixmap : Drawable {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Pixmap();
+    }
+
+    [CCode (cname = 'xcb_cursor_t', cheader_filename='xcb/xproto.h)]
+    public struct Cursor : Xid {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Cursor();
+    }
+
+    [CCode (cname = 'xcb_font_t', cheader_filename='xcb/xproto.h)]
+    public struct Font : Fontable {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Font();
+    }
+
+    [CCode (cname = 'xcb_gcontext_t', cheader_filename='xcb/xproto.h)]
+    public struct GC : Fontable {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public GC();
+    }
+
+    [CCode (cname = 'xcb_colormap_t', cheader_filename='xcb/xproto.h)]
+    public struct Colormap : Xid {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Colormap();
+    }
+
+    [CCode (cname = 'xcb_atom_t', cheader_filename='xcb/xproto.h)]
+    public struct Atom : Xid {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Atom();
+    }
+
+    [CCode (cname = 'xcb_drawable_t', cheader_filename='xcb/xproto.h)]
+    public struct Drawable : Xid {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Drawable();
+    }
+
+    [CCode (cname = 'xcb_fontable_t', cheader_filename='xcb/xproto.h)]
+    public struct Fontable : Xid {
+        [CCode (cname = "xcb_generate_id", cheader_filename='xcb/xcb.h')]
+        public Fontable();
+    }
+
+    [CCode (cname = 'xcb_visual_class_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_VISUAL_CLASS_')]
+    public enum VisualClass {
+        STATIC_GRAY,
+        GRAY_SCALE,
+        STATIC_COLOR,
+        PSEUDO_COLOR,
+        TRUE_COLOR,
+        DIRECT_COLOR
+    }
+
+    [CCode (cname = 'xcb_image_order_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_IMAGE_ORDER_')]
+    public enum ImageOrder {
+        L_SBFIRST,
+        M_SBFIRST
+    }
+
+    [CCode (cname = 'xcb_mod_mask_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_MOD_MASK_')]
+    public enum ModMask {
+        SHIFT,
+        LOCK,
+        CONTROL,
+        MOD_1,
+        MOD_2,
+        MOD_3,
+        MOD_4,
+        MOD_5
+    }
+
+    [CCode (cname = 'xcb_button_mask_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_BUTTON_MASK_')]
+    public enum ButtonMask {
+        BUTTON_1,
+        BUTTON_2,
+        BUTTON_3,
+        BUTTON_4,
+        BUTTON_5,
+        ANY
+    }
+
+    [CCode (cname = 'xcb_motion_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_MOTION_')]
+    public enum Motion {
+        NORMAL,
+        HINT
+    }
+
+    [CCode (cname = 'xcb_notify_detail_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_NOTIFY_DETAIL_')]
+    public enum NotifyDetail {
+        ANCESTOR,
+        VIRTUAL,
+        INFERIOR,
+        NONLINEAR,
+        NONLINEAR_VIRTUAL,
+        POINTER,
+        POINTER_ROOT,
+        NONE
+    }
+
+    [CCode (cname = 'xcb_notify_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_NOTIFY_MODE_')]
+    public enum NotifyMode {
+        NORMAL,
+        GRAB,
+        UNGRAB,
+        WHILE_GRABBED
+    }
+
+    [CCode (cname = 'xcb_visibility_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_VISIBILITY_')]
+    public enum Visibility {
+        UNOBSCURED,
+        PARTIALLY_OBSCURED,
+        FULLY_OBSCURED
+    }
+
+    [CCode (cname = 'xcb_place_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_PLACE_')]
+    public enum Place {
+        ON_TOP,
+        ON_BOTTOM
+    }
+
+    [CCode (cname = 'xcb_property_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_PROPERTY_')]
+    public enum Property {
+        NEW_VALUE,
+        DELETE
+    }
+
+    [CCode (cname = 'xcb_colormap_state_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_COLORMAP_STATE_')]
+    public enum ColormapState {
+        UNINSTALLED,
+        INSTALLED
+    }
+
+    [CCode (cname = 'xcb_mapping_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_MAPPING_')]
+    public enum Mapping {
+        MODIFIER,
+        KEYBOARD,
+        POINTER
+    }
+
+    [CCode (cname = 'xcb_window_class_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_WINDOW_CLASS_')]
+    public enum WindowClass {
+        COPY_FROM_PARENT,
+        INPUT_OUTPUT,
+        INPUT_ONLY
+    }
+
+    [CCode (cname = 'xcb_cw_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_C_W_')]
+    public enum Cw {
+        BACK_PIXMAP,
+        BACK_PIXEL,
+        BORDER_PIXMAP,
+        BORDER_PIXEL,
+        BIT_GRAVITY,
+        WIN_GRAVITY,
+        BACKING_STORE,
+        BACKING_PLANES,
+        BACKING_PIXEL,
+        OVERRIDE_REDIRECT,
+        SAVE_UNDER,
+        EVENT_MASK,
+        DONT_PROPAGATE,
+        COLORMAP,
+        CURSOR
+    }
+
+    [CCode (cname = 'xcb_back_pixmap_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_BACK_PIXMAP_')]
+    public enum BackPixmap {
+        NONE,
+        PARENT_RELATIVE
+    }
+
+    [CCode (cname = 'xcb_gravity_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_GRAVITY_')]
+    public enum Gravity {
+        BIT_FORGET,
+        WIN_UNMAP,
+        NORTH_WEST,
+        NORTH,
+        NORTH_EAST,
+        WEST,
+        CENTER,
+        EAST,
+        SOUTH_WEST,
+        SOUTH,
+        SOUTH_EAST,
+        STATIC
+    }
+
+    [CCode (cname = 'xcb_backing_store_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_BACKING_STORE_')]
+    public enum BackingStore {
+        NOT_USEFUL,
+        WHEN_MAPPED,
+        ALWAYS
+    }
+
+    [CCode (cname = 'xcb_event_mask_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_EVENT_MASK_')]
+    public enum EventMask {
+        NO_EVENT,
+        KEY_PRESS,
+        KEY_RELEASE,
+        BUTTON_PRESS,
+        BUTTON_RELEASE,
+        ENTER_WINDOW,
+        LEAVE_WINDOW,
+        POINTER_MOTION,
+        POINTER_MOTION_HINT,
+        BUTTON_1MOTION,
+        BUTTON_2MOTION,
+        BUTTON_3MOTION,
+        BUTTON_4MOTION,
+        BUTTON_5MOTION,
+        BUTTON_MOTION,
+        KEYMAP_STATE,
+        EXPOSURE,
+        VISIBILITY_CHANGE,
+        STRUCTURE_NOTIFY,
+        RESIZE_REDIRECT,
+        SUBSTRUCTURE_NOTIFY,
+        SUBSTRUCTURE_REDIRECT,
+        FOCUS_CHANGE,
+        PROPERTY_CHANGE,
+        COLOR_MAP_CHANGE,
+        OWNER_GRAB_BUTTON
+    }
+
+    [CCode (cname = 'xcb_map_state_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_MAP_STATE_')]
+    public enum MapState {
+        UNMAPPED,
+        UNVIEWABLE,
+        VIEWABLE
+    }
+
+    [CCode (cname = 'xcb_set_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_SET_MODE_')]
+    public enum SetMode {
+        INSERT,
+        DELETE
+    }
+
+    [CCode (cname = 'xcb_config_window_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_CONFIG_WINDOW_')]
+    public enum ConfigWindow {
+        X,
+        Y,
+        WIDTH,
+        HEIGHT,
+        BORDER_WIDTH,
+        SIBLING,
+        STACK_MODE
+    }
+
+    [CCode (cname = 'xcb_stack_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_STACK_MODE_')]
+    public enum StackMode {
+        ABOVE,
+        BELOW,
+        TOP_IF,
+        BOTTOM_IF,
+        OPPOSITE
+    }
+
+    [CCode (cname = 'xcb_circulate_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_CIRCULATE_')]
+    public enum Circulate {
+        RAISE_LOWEST,
+        LOWER_HIGHEST
+    }
+
+    [CCode (cname = 'xcb_prop_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_PROP_MODE_')]
+    public enum PropMode {
+        REPLACE,
+        PREPEND,
+        APPEND
+    }
+
+    [CCode (cname = 'xcb_get_property_type_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_GET_PROPERTY_TYPE_')]
+    public enum GetPropertyType {
+        ANY
+    }
+
+    [CCode (cname = 'xcb_send_event_dest_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_SEND_EVENT_DEST_')]
+    public enum SendEventDest {
+        POINTER_WINDOW,
+        ITEM_FOCUS
+    }
+
+    [CCode (cname = 'xcb_grab_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_GRAB_MODE_')]
+    public enum GrabMode {
+        SYNC,
+        ASYNC
+    }
+
+    [CCode (cname = 'xcb_grab_status_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_GRAB_STATUS_')]
+    public enum GrabStatus {
+        SUCCESS,
+        ALREADY_GRABBED,
+        INVALID_TIME,
+        NOT_VIEWABLE,
+        FROZEN
+    }
+
+    [CCode (cname = 'xcb_button_index_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_BUTTON_INDEX_')]
+    public enum ButtonIndex {
+        ANY,
+        BUTTON_1,
+        BUTTON_2,
+        BUTTON_3,
+        BUTTON_4,
+        BUTTON_5
+    }
+
+    [CCode (cname = 'xcb_grab_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_GRAB_')]
+    public enum Grab {
+        ANY
+    }
+
+    [CCode (cname = 'xcb_allow_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_ALLOW_')]
+    public enum Allow {
+        ASYNC_POINTER,
+        SYNC_POINTER,
+        REPLAY_POINTER,
+        ASYNC_KEYBOARD,
+        SYNC_KEYBOARD,
+        REPLAY_KEYBOARD,
+        ASYNC_BOTH,
+        SYNC_BOTH
+    }
+
+    [CCode (cname = 'xcb_input_focus_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_INPUT_FOCUS_')]
+    public enum InputFocus {
+        NONE,
+        POINTER_ROOT,
+        PARENT
+    }
+
+    [CCode (cname = 'xcb_font_draw_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_FONT_DRAW_')]
+    public enum FontDraw {
+        LEFT_TO_RIGHT,
+        RIGHT_TO_LEFT
+    }
+
+    [CCode (cname = 'xcb_gc_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_G_C_')]
+    public enum Gc {
+        FUNCTION,
+        PLANE_MASK,
+        FOREGROUND,
+        BACKGROUND,
+        LINE_WIDTH,
+        LINE_STYLE,
+        CAP_STYLE,
+        JOIN_STYLE,
+        FILL_STYLE,
+        FILL_RULE,
+        TILE,
+        STIPPLE,
+        TILE_STIPPLE_ORIGIN_X,
+        TILE_STIPPLE_ORIGIN_Y,
+        FONT,
+        SUBWINDOW_MODE,
+        GRAPHICS_EXPOSURES,
+        CLIP_ORIGIN_X,
+        CLIP_ORIGIN_Y,
+        CLIP_MASK,
+        DASH_OFFSET,
+        DASH_LIST,
+        ARC_MODE
+    }
+
+    [CCode (cname = 'xcb_gx_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_G_X_')]
+    public enum Gx {
+        CLEAR,
+        AND,
+        AND_REVERSE,
+        COPY,
+        AND_INVERTED,
+        NOOP,
+        XOR,
+        OR,
+        NOR,
+        EQUIV,
+        INVERT,
+        OR_REVERSE,
+        COPY_INVERTED,
+        OR_INVERTED,
+        NAND,
+        SET
+    }
+
+    [CCode (cname = 'xcb_line_style_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_LINE_STYLE_')]
+    public enum LineStyle {
+        SOLID,
+        ON_OFF_DASH,
+        DOUBLE_DASH
+    }
+
+    [CCode (cname = 'xcb_cap_style_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_CAP_STYLE_')]
+    public enum CapStyle {
+        NOT_LAST,
+        BUTT,
+        ROUND,
+        PROJECTING
+    }
+
+    [CCode (cname = 'xcb_join_style_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_JOIN_STYLE_')]
+    public enum JoinStyle {
+        MITRE,
+        ROUND,
+        BEVEL
+    }
+
+    [CCode (cname = 'xcb_fill_style_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_FILL_STYLE_')]
+    public enum FillStyle {
+        SOLID,
+        TILED,
+        STIPPLED,
+        OPAQUE_STIPPLED
+    }
+
+    [CCode (cname = 'xcb_fill_rule_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_FILL_RULE_')]
+    public enum FillRule {
+        EVEN_ODD,
+        WINDING
+    }
+
+    [CCode (cname = 'xcb_subwindow_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_SUBWINDOW_MODE_')]
+    public enum SubwindowMode {
+        CLIP_BY_CHILDREN,
+        INCLUDE_INFERIORS
+    }
+
+    [CCode (cname = 'xcb_arc_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_ARC_MODE_')]
+    public enum ArcMode {
+        CHORD,
+        PIE_SLICE
+    }
+
+    [CCode (cname = 'xcb_clip_ordering_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_CLIP_ORDERING_')]
+    public enum ClipOrdering {
+        UNSORTED,
+        Y_SORTED,
+        Y_XSORTED,
+        Y_XBANDED
+    }
+
+    [CCode (cname = 'xcb_coord_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_COORD_MODE_')]
+    public enum CoordMode {
+        ORIGIN,
+        PREVIOUS
+    }
+
+    [CCode (cname = 'xcb_poly_shape_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_POLY_SHAPE_')]
+    public enum PolyShape {
+        COMPLEX,
+        NONCONVEX,
+        CONVEX
+    }
+
+    [CCode (cname = 'xcb_image_format_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_IMAGE_FORMAT_')]
+    public enum ImageFormat {
+        X_YBITMAP,
+        X_YPIXMAP,
+        Z_PIXMAP
+    }
+
+    [CCode (cname = 'xcb_colormap_alloc_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_COLORMAP_ALLOC_')]
+    public enum ColormapAlloc {
+        NONE,
+        ALL
+    }
+
+    [CCode (cname = 'xcb_color_flag_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_COLOR_FLAG_')]
+    public enum ColorFlag {
+        RED,
+        GREEN,
+        BLUE
+    }
+
+    [CCode (cname = 'xcb_query_shape_of_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_QUERY_SHAPE_OF_')]
+    public enum QueryShapeOf {
+        LARGEST_CURSOR,
+        FASTEST_TILE,
+        FASTEST_STIPPLE
+    }
+
+    [CCode (cname = 'xcb_kb_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_K_B_')]
+    public enum KB {
+        KEY_CLICK_PERCENT,
+        BELL_PERCENT,
+        BELL_PITCH,
+        BELL_DURATION,
+        LED,
+        LED_MODE,
+        KEY,
+        AUTO_REPEAT_MODE
+    }
+
+    [CCode (cname = 'xcb_led_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_LED_MODE_')]
+    public enum LedMode {
+        OFF,
+        ON
+    }
+
+    [CCode (cname = 'xcb_auto_repeat_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_AUTO_REPEAT_MODE_')]
+    public enum AutoRepeatMode {
+        OFF,
+        ON,
+        DEFAULT
+    }
+
+    [CCode (cname = 'xcb_blanking_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_BLANKING_')]
+    public enum Blanking {
+        NOT_PREFERRED,
+        PREFERRED,
+        DEFAULT
+    }
+
+    [CCode (cname = 'xcb_exposures_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_EXPOSURES_')]
+    public enum Exposures {
+        NOT_ALLOWED,
+        ALLOWED,
+        DEFAULT
+    }
+
+    [CCode (cname = 'xcb_host_mode_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_HOST_MODE_')]
+    public enum HostMode {
+        INSERT,
+        DELETE
+    }
+
+    [CCode (cname = 'xcb_family_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_FAMILY_')]
+    public enum Family {
+        INTERNET,
+        D_ECNET,
+        CHAOS,
+        SERVER_INTERPRETED,
+        INTERNET_6
+    }
+
+    [CCode (cname = 'xcb_access_control_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_ACCESS_CONTROL_')]
+    public enum AccessControl {
+        DISABLE,
+        ENABLE
+    }
+
+    [CCode (cname = 'xcb_close_down_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_CLOSE_DOWN_')]
+    public enum CloseDown {
+        DESTROY_ALL,
+        RETAIN_PERMANENT,
+        RETAIN_TEMPORARY
+    }
+
+    [CCode (cname = 'xcb_kill_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_KILL_')]
+    public enum Kill {
+        ALL_TEMPORARY
+    }
+
+    [CCode (cname = 'xcb_screen_saver_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_SCREEN_SAVER_')]
+    public enum ScreenSaver {
+        RESET,
+        ACTIVE
+    }
+
+    [CCode (cname = 'xcb_mapping_status_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_MAPPING_STATUS_')]
+    public enum MappingStatus {
+        SUCCESS,
+        BUSY,
+        FAILURE
+    }
+
+    [CCode (cname = 'xcb_map_index_t', cheader_filename = 'xcb/xproto.h', cprefix = 'XCB_MAP_INDEX_')]
+    public enum MapIndex {
+        SHIFT,
+        LOCK,
+        CONTROL,
+        INDEX_1,
+        INDEX_2,
+        INDEX_3,
+        INDEX_4,
+        INDEX_5
+    }
+
+    [CCode (cname = 'xcb_c_h_a_r2_b_t', cheader_filename='xcb/xproto.h)]
+    public struct Char2b {
+        [CCode (cname='byte1')]
+        public uint8 byte1;
+        [CCode (cname='byte2')]
+        public uint8 byte2;
+    }
+
+    [CCode (cname = 'xcb_point_t', cheader_filename='xcb/xproto.h)]
+    public struct Point {
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+    }
+
+    [CCode (cname = 'xcb_rectangle_t', cheader_filename='xcb/xproto.h)]
+    public struct Rectangle {
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+    }
+
+    [CCode (cname = 'xcb_arc_t', cheader_filename='xcb/xproto.h)]
+    public struct Arc {
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='angle1')]
+        public int16 angle1;
+        [CCode (cname='angle2')]
+        public int16 angle2;
+    }
+
+    [CCode (cname = 'xcb_format_t', cheader_filename='xcb/xproto.h)]
+    public struct Format {
+        [CCode (cname='depth')]
+        public uint8 depth;
+        [CCode (cname='bits_per_pixel')]
+        public uint8 bits_per_pixel;
+        [CCode (cname='scanline_pad')]
+        public uint8 scanline_pad;
+    }
+
+    [CCode (cname = 'xcb_visualtype_t', cheader_filename='xcb/xproto.h)]
+    public struct Visualtype {
+        [CCode (cname='visual_id')]
+        public VisualID visual_id;
+        [CCode (cname='class')]
+        public uint8 class;
+        [CCode (cname='bits_per_rgb_value')]
+        public uint8 bits_per_rgb_value;
+        [CCode (cname='colormap_entries')]
+        public uint16 colormap_entries;
+        [CCode (cname='red_mask')]
+        public uint32 red_mask;
+        [CCode (cname='green_mask')]
+        public uint32 green_mask;
+        [CCode (cname='blue_mask')]
+        public uint32 blue_mask;
+    }
+
+    [CCode (cname = 'xcb_depth_t', cheader_filename='xcb/xproto.h)]
+    public struct Depth {
+        [CCode (cname='depth')]
+        public uint8 depth;
+        [CCode (cname='visuals_len')]
+        public uint16 visuals_len;
+        [CCode (cname='xcb_depth_tvisuals)]
+        public Visualtype[] visuals();
+        [CCode (cname='xcb_depth_tvisuals_length)]
+        public int visuals_length();
+    }
+
+    [CCode (cname = 'xcb_screen_t', cheader_filename='xcb/xproto.h)]
+    public struct Screen {
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='default_colormap')]
+        public Colormap default_colormap;
+        [CCode (cname='white_pixel')]
+        public uint32 white_pixel;
+        [CCode (cname='black_pixel')]
+        public uint32 black_pixel;
+        [CCode (cname='current_input_masks')]
+        public uint32 current_input_masks;
+        [CCode (cname='width_in_pixels')]
+        public uint16 width_in_pixels;
+        [CCode (cname='height_in_pixels')]
+        public uint16 height_in_pixels;
+        [CCode (cname='width_in_millimeters')]
+        public uint16 width_in_millimeters;
+        [CCode (cname='height_in_millimeters')]
+        public uint16 height_in_millimeters;
+        [CCode (cname='min_installed_maps')]
+        public uint16 min_installed_maps;
+        [CCode (cname='max_installed_maps')]
+        public uint16 max_installed_maps;
+        [CCode (cname='root_visual')]
+        public VisualID root_visual;
+        [CCode (cname='backing_stores')]
+        public uint8 backing_stores;
+        [CCode (cname='save_unders')]
+        public bool save_unders;
+        [CCode (cname='root_depth')]
+        public uint8 root_depth;
+        [CCode (cname='allowed_depths_len')]
+        public uint8 allowed_depths_len;
+        [CCode (cname='xcb_screen_tallowed_depths)]
+        public Depth[] allowed_depths();
+        [CCode (cname='xcb_screen_tallowed_depths_length)]
+        public int allowed_depths_length();
+    }
+
+    [CCode (cname = 'xcb_setup_request_t', cheader_filename='xcb/xproto.h)]
+    public struct SetupRequest {
+        [CCode (cname='byte_order')]
+        public uint8 byte_order;
+        [CCode (cname='protocol_major_version')]
+        public uint16 protocol_major_version;
+        [CCode (cname='protocol_minor_version')]
+        public uint16 protocol_minor_version;
+        [CCode (cname='authorization_protocol_name_len')]
+        public uint16 authorization_protocol_name_len;
+        [CCode (cname='authorization_protocol_data_len')]
+        public uint16 authorization_protocol_data_len;
+        [CCode (cname='xcb_setup_request_tauthorization_protocol_name)]
+        public char[] authorization_protocol_name();
+        [CCode (cname='xcb_setup_request_tauthorization_protocol_name_length)]
+        public int authorization_protocol_name_length();
+        [CCode (cname='xcb_setup_request_tauthorization_protocol_data)]
+        public char[] authorization_protocol_data();
+        [CCode (cname='xcb_setup_request_tauthorization_protocol_data_length)]
+        public int authorization_protocol_data_length();
+    }
+
+    [CCode (cname = 'xcb_setup_failed_t', cheader_filename='xcb/xproto.h)]
+    public struct SetupFailed {
+        [CCode (cname='status')]
+        public uint8 status;
+        [CCode (cname='reason_len')]
+        public uint8 reason_len;
+        [CCode (cname='protocol_major_version')]
+        public uint16 protocol_major_version;
+        [CCode (cname='protocol_minor_version')]
+        public uint16 protocol_minor_version;
+        [CCode (cname='length')]
+        public uint16 length;
+        [CCode (cname='xcb_setup_failed_treason)]
+        public char[] reason();
+        [CCode (cname='xcb_setup_failed_treason_length)]
+        public int reason_length();
+    }
+
+    [CCode (cname = 'xcb_setup_authenticate_t', cheader_filename='xcb/xproto.h)]
+    public struct SetupAuthenticate {
+        [CCode (cname='status')]
+        public uint8 status;
+        [CCode (cname='length')]
+        public uint16 length;
+        [CCode (cname='xcb_setup_authenticate_treason)]
+        public char[] reason();
+        [CCode (cname='xcb_setup_authenticate_treason_length)]
+        public int reason_length();
+    }
+
+    [CCode (cname = 'xcb_setup_t', cheader_filename='xcb/xproto.h)]
+    public struct Setup {
+        [CCode (cname='status')]
+        public uint8 status;
+        [CCode (cname='protocol_major_version')]
+        public uint16 protocol_major_version;
+        [CCode (cname='protocol_minor_version')]
+        public uint16 protocol_minor_version;
+        [CCode (cname='length')]
+        public uint16 length;
+        [CCode (cname='release_number')]
+        public uint32 release_number;
+        [CCode (cname='resource_id_base')]
+        public uint32 resource_id_base;
+        [CCode (cname='resource_id_mask')]
+        public uint32 resource_id_mask;
+        [CCode (cname='motion_buffer_size')]
+        public uint32 motion_buffer_size;
+        [CCode (cname='vendor_len')]
+        public uint16 vendor_len;
+        [CCode (cname='maximum_request_length')]
+        public uint16 maximum_request_length;
+        [CCode (cname='roots_len')]
+        public uint8 roots_len;
+        [CCode (cname='pixmap_formats_len')]
+        public uint8 pixmap_formats_len;
+        [CCode (cname='image_byte_order')]
+        public uint8 image_byte_order;
+        [CCode (cname='bitmap_format_bit_order')]
+        public uint8 bitmap_format_bit_order;
+        [CCode (cname='bitmap_format_scanline_unit')]
+        public uint8 bitmap_format_scanline_unit;
+        [CCode (cname='bitmap_format_scanline_pad')]
+        public uint8 bitmap_format_scanline_pad;
+        [CCode (cname='min_keycode')]
+        public Keycode min_keycode;
+        [CCode (cname='max_keycode')]
+        public Keycode max_keycode;
+        [CCode (cname='xcb_setup_tvendor)]
+        public char[] vendor();
+        [CCode (cname='xcb_setup_tvendor_length)]
+        public int vendor_length();
+        [CCode (cname='xcb_setup_tpixmap_formats)]
+        public Format[] pixmap_formats();
+        [CCode (cname='xcb_setup_tpixmap_formats_length)]
+        public int pixmap_formats_length();
+        [CCode (cname='xcb_setup_troots)]
+        public Screen[] roots();
+        [CCode (cname='xcb_setup_troots_length)]
+        public int roots_length();
+    }
+
+    [CCode (cname = 'xcb_timecoord_t', cheader_filename='xcb/xproto.h)]
+    public struct Timecoord {
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+    }
+
+    [CCode (cname = 'xcb_fontprop_t', cheader_filename='xcb/xproto.h)]
+    public struct Fontprop {
+        [CCode (cname='name')]
+        public Atom name;
+        [CCode (cname='value')]
+        public uint32 value;
+    }
+
+    [CCode (cname = 'xcb_charinfo_t', cheader_filename='xcb/xproto.h)]
+    public struct Charinfo {
+        [CCode (cname='left_side_bearing')]
+        public int16 left_side_bearing;
+        [CCode (cname='right_side_bearing')]
+        public int16 right_side_bearing;
+        [CCode (cname='character_width')]
+        public int16 character_width;
+        [CCode (cname='ascent')]
+        public int16 ascent;
+        [CCode (cname='descent')]
+        public int16 descent;
+        [CCode (cname='attributes')]
+        public uint16 attributes;
+    }
+
+    [CCode (cname = 'xcb_str_t', cheader_filename='xcb/xproto.h)]
+    public struct Str {
+        [CCode (cname='name_len')]
+        public uint8 name_len;
+        [CCode (cname='xcb_str_tname)]
+        public char[] name();
+        [CCode (cname='xcb_str_tname_length)]
+        public int name_length();
+    }
+
+    [CCode (cname = 'xcb_segment_t', cheader_filename='xcb/xproto.h)]
+    public struct Segment {
+        [CCode (cname='x1')]
+        public int16 x1;
+        [CCode (cname='y1')]
+        public int16 y1;
+        [CCode (cname='x2')]
+        public int16 x2;
+        [CCode (cname='y2')]
+        public int16 y2;
+    }
+
+    [CCode (cname = 'xcb_coloritem_t', cheader_filename='xcb/xproto.h)]
+    public struct Coloritem {
+        [CCode (cname='pixel')]
+        public uint32 pixel;
+        [CCode (cname='red')]
+        public uint16 red;
+        [CCode (cname='green')]
+        public uint16 green;
+        [CCode (cname='blue')]
+        public uint16 blue;
+        [CCode (cname='flags')]
+        public uint8 flags;
+    }
+
+    [CCode (cname = 'xcb_rgb_t', cheader_filename='xcb/xproto.h)]
+    public struct Rgb {
+        [CCode (cname='red')]
+        public uint16 red;
+        [CCode (cname='green')]
+        public uint16 green;
+        [CCode (cname='blue')]
+        public uint16 blue;
+    }
+
+    [CCode (cname = 'xcb_host_t', cheader_filename='xcb/xproto.h)]
+    public struct Host {
+        [CCode (cname='family')]
+        public uint8 family;
+        [CCode (cname='address_len')]
+        public uint16 address_len;
+        [CCode (cname='xcb_host_taddress)]
+        public uint8[] address();
+        [CCode (cname='xcb_host_taddress_length)]
+        public int address_length();
+    }
+
+    [CCode (cname = 'xcb_client_message_data_t', cheader_filename='xcb/xproto.h)]
+    public struct ClientMessageData {
+        [CCode (cname='data8')]
+        public uint8[] data8;
+        [CCode (cname='data16')]
+        public uint16[] data16;
+        [CCode (cname='data32')]
+        public uint32[] data32;
+    }
+
+    [CCode (cname = 'xcb_request_error_t', cheader_filename='xcb/xproto.h)]
+    public struct RequestError : Xcb.Error {
+        [CCode (cname='XCB_REQUEST')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_value_error_t', cheader_filename='xcb/xproto.h)]
+    public struct ValueError : Xcb.Error {
+        [CCode (cname='XCB_VALUE')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_window_error_t', cheader_filename='xcb/xproto.h)]
+    public struct WindowError : Xcb.Error {
+        [CCode (cname='XCB_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_pixmap_error_t', cheader_filename='xcb/xproto.h)]
+    public struct PixmapError : Xcb.Error {
+        [CCode (cname='XCB_PIXMAP')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_atom_error_t', cheader_filename='xcb/xproto.h)]
+    public struct AtomError : Xcb.Error {
+        [CCode (cname='XCB_ATOM')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_cursor_error_t', cheader_filename='xcb/xproto.h)]
+    public struct CursorError : Xcb.Error {
+        [CCode (cname='XCB_CURSOR')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_font_error_t', cheader_filename='xcb/xproto.h)]
+    public struct FontError : Xcb.Error {
+        [CCode (cname='XCB_FONT')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_match_error_t', cheader_filename='xcb/xproto.h)]
+    public struct MatchError : Xcb.Error {
+        [CCode (cname='XCB_MATCH')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_drawable_error_t', cheader_filename='xcb/xproto.h)]
+    public struct DrawableError : Xcb.Error {
+        [CCode (cname='XCB_DRAWABLE')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_access_error_t', cheader_filename='xcb/xproto.h)]
+    public struct AccessError : Xcb.Error {
+        [CCode (cname='XCB_ACCESS')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_alloc_error_t', cheader_filename='xcb/xproto.h)]
+    public struct AllocError : Xcb.Error {
+        [CCode (cname='XCB_ALLOC')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_colormap_error_t', cheader_filename='xcb/xproto.h)]
+    public struct ColormapError : Xcb.Error {
+        [CCode (cname='XCB_COLORMAP')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_g_context_error_t', cheader_filename='xcb/xproto.h)]
+    public struct GContextError : Xcb.Error {
+        [CCode (cname='XCB_GCONTEXT')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_i_d_choice_error_t', cheader_filename='xcb/xproto.h)]
+    public struct IDChoiceError : Xcb.Error {
+        [CCode (cname='XCB_IDCHOICE')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_name_error_t', cheader_filename='xcb/xproto.h)]
+    public struct NameError : Xcb.Error {
+        [CCode (cname='XCB_NAME')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_length_error_t', cheader_filename='xcb/xproto.h)]
+    public struct LengthError : Xcb.Error {
+        [CCode (cname='XCB_LENGTH')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_implementation_error_t', cheader_filename='xcb/xproto.h)]
+    public struct ImplementationError : Xcb.Error {
+        [CCode (cname='XCB_IMPLEMENTATION')]
+        public const int OPCODE;
+        [CCode (cname='bad_value')]
+        public uint32 bad_value;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_key_press_event_t', cheader_filename='xcb/xproto.h)]
+    public struct KeyPressEvent : Xcb.Event {
+        [CCode (cname='XCB_KEY_PRESS')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public Keycode detail;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='event_x')]
+        public int16 event_x;
+        [CCode (cname='event_y')]
+        public int16 event_y;
+        [CCode (cname='state')]
+        public uint16 state;
+        [CCode (cname='same_screen')]
+        public bool same_screen;
+    }
+
+    [CCode (cname = 'xcb_button_press_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ButtonPressEvent : Xcb.Event {
+        [CCode (cname='XCB_BUTTON_PRESS')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public Button detail;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='event_x')]
+        public int16 event_x;
+        [CCode (cname='event_y')]
+        public int16 event_y;
+        [CCode (cname='state')]
+        public uint16 state;
+        [CCode (cname='same_screen')]
+        public bool same_screen;
+    }
+
+    [CCode (cname = 'xcb_motion_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct MotionNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_MOTION_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public uint8 detail;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='event_x')]
+        public int16 event_x;
+        [CCode (cname='event_y')]
+        public int16 event_y;
+        [CCode (cname='state')]
+        public uint16 state;
+        [CCode (cname='same_screen')]
+        public bool same_screen;
+    }
+
+    [CCode (cname = 'xcb_enter_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct EnterNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_ENTER_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public uint8 detail;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='event_x')]
+        public int16 event_x;
+        [CCode (cname='event_y')]
+        public int16 event_y;
+        [CCode (cname='state')]
+        public uint16 state;
+        [CCode (cname='mode')]
+        public uint8 mode;
+        [CCode (cname='same_screen_focus')]
+        public uint8 same_screen_focus;
+    }
+
+    [CCode (cname = 'xcb_focus_in_event_t', cheader_filename='xcb/xproto.h)]
+    public struct FocusInEvent : Xcb.Event {
+        [CCode (cname='XCB_FOCUS_IN')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public uint8 detail;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='mode')]
+        public uint8 mode;
+    }
+
+    [CCode (cname = 'xcb_keymap_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct KeymapNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_KEYMAP_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='keys')]
+        public uint8[] keys;
+    }
+
+    [CCode (cname = 'xcb_expose_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ExposeEvent : Xcb.Event {
+        [CCode (cname='XCB_EXPOSE')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='x')]
+        public uint16 x;
+        [CCode (cname='y')]
+        public uint16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='count')]
+        public uint16 count;
+    }
+
+    [CCode (cname = 'xcb_graphics_exposure_event_t', cheader_filename='xcb/xproto.h)]
+    public struct GraphicsExposureEvent : Xcb.Event {
+        [CCode (cname='XCB_GRAPHICS_EXPOSURE')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='x')]
+        public uint16 x;
+        [CCode (cname='y')]
+        public uint16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='count')]
+        public uint16 count;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_no_exposure_event_t', cheader_filename='xcb/xproto.h)]
+    public struct NoExposureEvent : Xcb.Event {
+        [CCode (cname='XCB_NO_EXPOSURE')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='minor_opcode')]
+        public uint16 minor_opcode;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+    }
+
+    [CCode (cname = 'xcb_visibility_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct VisibilityNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_VISIBILITY_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='state')]
+        public uint8 state;
+    }
+
+    [CCode (cname = 'xcb_create_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct CreateNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_CREATE_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='parent')]
+        public Window parent;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='border_width')]
+        public uint16 border_width;
+        [CCode (cname='override_redirect')]
+        public bool override_redirect;
+    }
+
+    [CCode (cname = 'xcb_destroy_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct DestroyNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_DESTROY_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_unmap_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct UnmapNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_UNMAP_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='from_configure')]
+        public bool from_configure;
+    }
+
+    [CCode (cname = 'xcb_map_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct MapNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_MAP_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='override_redirect')]
+        public bool override_redirect;
+    }
+
+    [CCode (cname = 'xcb_map_request_event_t', cheader_filename='xcb/xproto.h)]
+    public struct MapRequestEvent : Xcb.Event {
+        [CCode (cname='XCB_MAP_REQUEST')]
+        public const int OPCODE;
+        [CCode (cname='parent')]
+        public Window parent;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_reparent_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ReparentNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_REPARENT_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='parent')]
+        public Window parent;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='override_redirect')]
+        public bool override_redirect;
+    }
+
+    [CCode (cname = 'xcb_configure_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ConfigureNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_CONFIGURE_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='above_sibling')]
+        public Window above_sibling;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='border_width')]
+        public uint16 border_width;
+        [CCode (cname='override_redirect')]
+        public bool override_redirect;
+    }
+
+    [CCode (cname = 'xcb_configure_request_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ConfigureRequestEvent : Xcb.Event {
+        [CCode (cname='XCB_CONFIGURE_REQUEST')]
+        public const int OPCODE;
+        [CCode (cname='stack_mode')]
+        public uint8 stack_mode;
+        [CCode (cname='parent')]
+        public Window parent;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='sibling')]
+        public Window sibling;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='border_width')]
+        public uint16 border_width;
+        [CCode (cname='value_mask')]
+        public uint16 value_mask;
+    }
+
+    [CCode (cname = 'xcb_gravity_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct GravityNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_GRAVITY_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+    }
+
+    [CCode (cname = 'xcb_resize_request_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ResizeRequestEvent : Xcb.Event {
+        [CCode (cname='XCB_RESIZE_REQUEST')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+    }
+
+    [CCode (cname = 'xcb_circulate_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct CirculateNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_CIRCULATE_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='place')]
+        public uint8 place;
+    }
+
+    [CCode (cname = 'xcb_property_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct PropertyNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_PROPERTY_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='atom')]
+        public Atom atom;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='state')]
+        public uint8 state;
+    }
+
+    [CCode (cname = 'xcb_selection_clear_event_t', cheader_filename='xcb/xproto.h)]
+    public struct SelectionClearEvent : Xcb.Event {
+        [CCode (cname='XCB_SELECTION_CLEAR')]
+        public const int OPCODE;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='owner')]
+        public Window owner;
+        [CCode (cname='selection')]
+        public Atom selection;
+    }
+
+    [CCode (cname = 'xcb_selection_request_event_t', cheader_filename='xcb/xproto.h)]
+    public struct SelectionRequestEvent : Xcb.Event {
+        [CCode (cname='XCB_SELECTION_REQUEST')]
+        public const int OPCODE;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='owner')]
+        public Window owner;
+        [CCode (cname='requestor')]
+        public Window requestor;
+        [CCode (cname='selection')]
+        public Atom selection;
+        [CCode (cname='target')]
+        public Atom target;
+        [CCode (cname='property')]
+        public Atom property;
+    }
+
+    [CCode (cname = 'xcb_selection_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct SelectionNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_SELECTION_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='requestor')]
+        public Window requestor;
+        [CCode (cname='selection')]
+        public Atom selection;
+        [CCode (cname='target')]
+        public Atom target;
+        [CCode (cname='property')]
+        public Atom property;
+    }
+
+    [CCode (cname = 'xcb_colormap_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ColormapNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_COLORMAP_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='colormap')]
+        public Colormap colormap;
+        [CCode (cname='new')]
+        public bool new;
+        [CCode (cname='state')]
+        public uint8 state;
+    }
+
+    [CCode (cname = 'xcb_client_message_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ClientMessageEvent : Xcb.Event {
+        [CCode (cname='XCB_CLIENT_MESSAGE')]
+        public const int OPCODE;
+        [CCode (cname='format')]
+        public uint8 format;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='type')]
+        public Atom type;
+        [CCode (cname='data')]
+        public ClientMessageData data;
+    }
+
+    [CCode (cname = 'xcb_mapping_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct MappingNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_MAPPING_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='request')]
+        public uint8 request;
+        [CCode (cname='first_keycode')]
+        public Keycode first_keycode;
+        [CCode (cname='count')]
+        public uint8 count;
+    }
+
+    [CCode (cname = 'xcb_key_release_event_t', cheader_filename='xcb/xproto.h)]
+    public struct KeyReleaseEvent : Xcb.Event {
+        [CCode (cname='XCB_KEY_RELEASE')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public Keycode detail;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='event_x')]
+        public int16 event_x;
+        [CCode (cname='event_y')]
+        public int16 event_y;
+        [CCode (cname='state')]
+        public uint16 state;
+        [CCode (cname='same_screen')]
+        public bool same_screen;
+    }
+
+    [CCode (cname = 'xcb_button_release_event_t', cheader_filename='xcb/xproto.h)]
+    public struct ButtonReleaseEvent : Xcb.Event {
+        [CCode (cname='XCB_BUTTON_RELEASE')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public Button detail;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='event_x')]
+        public int16 event_x;
+        [CCode (cname='event_y')]
+        public int16 event_y;
+        [CCode (cname='state')]
+        public uint16 state;
+        [CCode (cname='same_screen')]
+        public bool same_screen;
+    }
+
+    [CCode (cname = 'xcb_leave_notify_event_t', cheader_filename='xcb/xproto.h)]
+    public struct LeaveNotifyEvent : Xcb.Event {
+        [CCode (cname='XCB_LEAVE_NOTIFY')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public uint8 detail;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='event_x')]
+        public int16 event_x;
+        [CCode (cname='event_y')]
+        public int16 event_y;
+        [CCode (cname='state')]
+        public uint16 state;
+        [CCode (cname='mode')]
+        public uint8 mode;
+        [CCode (cname='same_screen_focus')]
+        public uint8 same_screen_focus;
+    }
+
+    [CCode (cname = 'xcb_focus_out_event_t', cheader_filename='xcb/xproto.h)]
+    public struct FocusOutEvent : Xcb.Event {
+        [CCode (cname='XCB_FOCUS_OUT')]
+        public const int OPCODE;
+        [CCode (cname='detail')]
+        public uint8 detail;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='mode')]
+        public uint8 mode;
+    }
+
+    [CCode (cname = 'xcb_circulate_request_event_t', cheader_filename='xcb/xproto.h)]
+    public struct CirculateRequestEvent : Xcb.Event {
+        [CCode (cname='XCB_CIRCULATE_REQUEST')]
+        public const int OPCODE;
+        [CCode (cname='event')]
+        public Window event;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='place')]
+        public uint8 place;
+    }
+
+    [CCode (cname = 'xcb_create_window_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CreateWindowRequest : Xcb.Request {
+        [CCode (cname='XCB_CREATE_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='depth')]
+        public uint8 depth;
+        [CCode (cname='wid')]
+        public Window wid;
+        [CCode (cname='parent')]
+        public Window parent;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='border_width')]
+        public uint16 border_width;
+        [CCode (cname='class')]
+        public uint16 class;
+        [CCode (cname='visual')]
+        public VisualID visual;
+        [CCode (cname='value_mask')]
+        public uint32 value_mask;
+    }
+
+    [CCode (cname = 'xcb_change_window_attributes_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangeWindowAttributesRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_WINDOW_ATTRIBUTES')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='value_mask')]
+        public uint32 value_mask;
+    }
+
+    [CCode (cname = 'xcb_get_window_attributes_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetWindowAttributesRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_WINDOW_ATTRIBUTES')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_get_window_attributes_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetWindowAttributesReply : Xcb.Reply {
+        [CCode (cname='backing_store')]
+        public uint8 backing_store;
+        [CCode (cname='visual')]
+        public VisualID visual;
+        [CCode (cname='class')]
+        public uint16 class;
+        [CCode (cname='bit_gravity')]
+        public uint8 bit_gravity;
+        [CCode (cname='win_gravity')]
+        public uint8 win_gravity;
+        [CCode (cname='backing_planes')]
+        public uint32 backing_planes;
+        [CCode (cname='backing_pixel')]
+        public uint32 backing_pixel;
+        [CCode (cname='save_under')]
+        public bool save_under;
+        [CCode (cname='map_is_installed')]
+        public bool map_is_installed;
+        [CCode (cname='map_state')]
+        public uint8 map_state;
+        [CCode (cname='override_redirect')]
+        public bool override_redirect;
+        [CCode (cname='colormap')]
+        public Colormap colormap;
+        [CCode (cname='all_event_masks')]
+        public uint32 all_event_masks;
+        [CCode (cname='your_event_mask')]
+        public uint32 your_event_mask;
+        [CCode (cname='do_not_propagate_mask')]
+        public uint16 do_not_propagate_mask;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_window_attributes_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetWindowAttributesCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetWindowAttributesCookie (Connection conn, Window window);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetWindowAttributesCookie (Connection conn, Window window);
+    }
+
+    [CCode (cname = 'xcb_destroy_window_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class DestroyWindowRequest : Xcb.Request {
+        [CCode (cname='XCB_DESTROY_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_destroy_subwindows_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class DestroySubwindowsRequest : Xcb.Request {
+        [CCode (cname='XCB_DESTROY_SUBWINDOWS')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_change_save_set_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangeSaveSetRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_SAVE_SET')]
+        public const int OPCODE;
+        [CCode (cname='mode')]
+        public uint8 mode;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_reparent_window_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ReparentWindowRequest : Xcb.Request {
+        [CCode (cname='XCB_REPARENT_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='parent')]
+        public Window parent;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+    }
+
+    [CCode (cname = 'xcb_map_window_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class MapWindowRequest : Xcb.Request {
+        [CCode (cname='XCB_MAP_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_map_subwindows_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class MapSubwindowsRequest : Xcb.Request {
+        [CCode (cname='XCB_MAP_SUBWINDOWS')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_unmap_window_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UnmapWindowRequest : Xcb.Request {
+        [CCode (cname='XCB_UNMAP_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_unmap_subwindows_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UnmapSubwindowsRequest : Xcb.Request {
+        [CCode (cname='XCB_UNMAP_SUBWINDOWS')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_configure_window_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ConfigureWindowRequest : Xcb.Request {
+        [CCode (cname='XCB_CONFIGURE_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='value_mask')]
+        public uint16 value_mask;
+    }
+
+    [CCode (cname = 'xcb_circulate_window_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CirculateWindowRequest : Xcb.Request {
+        [CCode (cname='XCB_CIRCULATE_WINDOW')]
+        public const int OPCODE;
+        [CCode (cname='direction')]
+        public uint8 direction;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_get_geometry_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetGeometryRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_GEOMETRY')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+    }
+
+    [CCode (cname = 'xcb_get_geometry_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetGeometryReply : Xcb.Reply {
+        [CCode (cname='depth')]
+        public uint8 depth;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='border_width')]
+        public uint16 border_width;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_geometry_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetGeometryCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetGeometryCookie (Connection conn, Drawable drawable);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetGeometryCookie (Connection conn, Drawable drawable);
+    }
+
+    [CCode (cname = 'xcb_query_tree_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryTreeRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_TREE')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_query_tree_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryTreeReply : Xcb.Reply {
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='parent')]
+        public Window parent;
+        [CCode (cname='children_len')]
+        public uint16 children_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_tree_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryTreeCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryTreeCookie (Connection conn, Window window);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryTreeCookie (Connection conn, Window window);
+    }
+
+    [CCode (cname = 'xcb_intern_atom_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class InternAtomRequest : Xcb.Request {
+        [CCode (cname='XCB_INTERN_ATOM')]
+        public const int OPCODE;
+        [CCode (cname='only_if_exists')]
+        public bool only_if_exists;
+        [CCode (cname='name_len')]
+        public uint16 name_len;
+        [CCode (cname='xcb_intern_atom_tname)]
+        public char[] name();
+        [CCode (cname='xcb_intern_atom_tname_length)]
+        public int name_length();
+    }
+
+    [CCode (cname = 'xcb_intern_atom_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class InternAtomReply : Xcb.Reply {
+        [CCode (cname='atom')]
+        public Atom atom;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_intern_atom_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct InternAtomCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public InternAtomCookie (Connection conn, bool only_if_exists, uint16 name_len, char[] name);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public InternAtomCookie (Connection conn, bool only_if_exists, uint16 name_len, char[] name);
+    }
+
+    [CCode (cname = 'xcb_get_atom_name_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetAtomNameRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_ATOM_NAME')]
+        public const int OPCODE;
+        [CCode (cname='atom')]
+        public Atom atom;
+    }
+
+    [CCode (cname = 'xcb_get_atom_name_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetAtomNameReply : Xcb.Reply {
+        [CCode (cname='name_len')]
+        public uint16 name_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_atom_name_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetAtomNameCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetAtomNameCookie (Connection conn, Atom atom);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetAtomNameCookie (Connection conn, Atom atom);
+    }
+
+    [CCode (cname = 'xcb_change_property_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangePropertyRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_PROPERTY')]
+        public const int OPCODE;
+        [CCode (cname='mode')]
+        public uint8 mode;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='property')]
+        public Atom property;
+        [CCode (cname='type')]
+        public Atom type;
+        [CCode (cname='format')]
+        public uint8 format;
+        [CCode (cname='data_len')]
+        public uint32 data_len;
+        [CCode (cname='xcb_change_property_tdata)]
+        public void[] data();
+        [CCode (cname='xcb_change_property_tdata_length)]
+        public int data_length();
+    }
+
+    [CCode (cname = 'xcb_delete_property_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class DeletePropertyRequest : Xcb.Request {
+        [CCode (cname='XCB_DELETE_PROPERTY')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='property')]
+        public Atom property;
+    }
+
+    [CCode (cname = 'xcb_get_property_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetPropertyRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_PROPERTY')]
+        public const int OPCODE;
+        [CCode (cname='delete')]
+        public bool delete;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='property')]
+        public Atom property;
+        [CCode (cname='type')]
+        public Atom type;
+        [CCode (cname='long_offset')]
+        public uint32 long_offset;
+        [CCode (cname='long_length')]
+        public uint32 long_length;
+    }
+
+    [CCode (cname = 'xcb_get_property_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetPropertyReply : Xcb.Reply {
+        [CCode (cname='format')]
+        public uint8 format;
+        [CCode (cname='type')]
+        public Atom type;
+        [CCode (cname='bytes_after')]
+        public uint32 bytes_after;
+        [CCode (cname='value_len')]
+        public uint32 value_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_property_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetPropertyCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetPropertyCookie (Connection conn, bool delete, Window window, Atom property, Atom type, uint32 long_offset, uint32 long_length);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetPropertyCookie (Connection conn, bool delete, Window window, Atom property, Atom type, uint32 long_offset, uint32 long_length);
+    }
+
+    [CCode (cname = 'xcb_list_properties_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListPropertiesRequest : Xcb.Request {
+        [CCode (cname='XCB_LIST_PROPERTIES')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_list_properties_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListPropertiesReply : Xcb.Reply {
+        [CCode (cname='atoms_len')]
+        public uint16 atoms_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_list_properties_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct ListPropertiesCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public ListPropertiesCookie (Connection conn, Window window);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public ListPropertiesCookie (Connection conn, Window window);
+    }
+
+    [CCode (cname = 'xcb_set_selection_owner_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetSelectionOwnerRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_SELECTION_OWNER')]
+        public const int OPCODE;
+        [CCode (cname='owner')]
+        public Window owner;
+        [CCode (cname='selection')]
+        public Atom selection;
+        [CCode (cname='time')]
+        public Timestamp time;
+    }
+
+    [CCode (cname = 'xcb_get_selection_owner_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetSelectionOwnerRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_SELECTION_OWNER')]
+        public const int OPCODE;
+        [CCode (cname='selection')]
+        public Atom selection;
+    }
+
+    [CCode (cname = 'xcb_get_selection_owner_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetSelectionOwnerReply : Xcb.Reply {
+        [CCode (cname='owner')]
+        public Window owner;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_selection_owner_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetSelectionOwnerCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetSelectionOwnerCookie (Connection conn, Atom selection);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetSelectionOwnerCookie (Connection conn, Atom selection);
+    }
+
+    [CCode (cname = 'xcb_convert_selection_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ConvertSelectionRequest : Xcb.Request {
+        [CCode (cname='XCB_CONVERT_SELECTION')]
+        public const int OPCODE;
+        [CCode (cname='requestor')]
+        public Window requestor;
+        [CCode (cname='selection')]
+        public Atom selection;
+        [CCode (cname='target')]
+        public Atom target;
+        [CCode (cname='property')]
+        public Atom property;
+        [CCode (cname='time')]
+        public Timestamp time;
+    }
+
+    [CCode (cname = 'xcb_send_event_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SendEventRequest : Xcb.Request {
+        [CCode (cname='XCB_SEND_EVENT')]
+        public const int OPCODE;
+        [CCode (cname='propagate')]
+        public bool propagate;
+        [CCode (cname='destination')]
+        public Window destination;
+        [CCode (cname='event_mask')]
+        public uint32 event_mask;
+        [CCode (cname='event')]
+        public char[] event;
+    }
+
+    [CCode (cname = 'xcb_grab_pointer_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GrabPointerRequest : Xcb.Request {
+        [CCode (cname='XCB_GRAB_POINTER')]
+        public const int OPCODE;
+        [CCode (cname='owner_events')]
+        public bool owner_events;
+        [CCode (cname='grab_window')]
+        public Window grab_window;
+        [CCode (cname='event_mask')]
+        public uint16 event_mask;
+        [CCode (cname='pointer_mode')]
+        public uint8 pointer_mode;
+        [CCode (cname='keyboard_mode')]
+        public uint8 keyboard_mode;
+        [CCode (cname='confine_to')]
+        public Window confine_to;
+        [CCode (cname='cursor')]
+        public Cursor cursor;
+        [CCode (cname='time')]
+        public Timestamp time;
+    }
+
+    [CCode (cname = 'xcb_grab_pointer_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GrabPointerReply : Xcb.Reply {
+        [CCode (cname='status')]
+        public uint8 status;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_grab_pointer_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GrabPointerCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GrabPointerCookie (Connection conn, bool owner_events, Window grab_window, uint16 event_mask, uint8 pointer_mode, uint8 keyboard_mode, Window confine_to, Cursor cursor, Timestamp time);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GrabPointerCookie (Connection conn, bool owner_events, Window grab_window, uint16 event_mask, uint8 pointer_mode, uint8 keyboard_mode, Window confine_to, Cursor cursor, Timestamp time);
+    }
+
+    [CCode (cname = 'xcb_ungrab_pointer_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UngrabPointerRequest : Xcb.Request {
+        [CCode (cname='XCB_UNGRAB_POINTER')]
+        public const int OPCODE;
+        [CCode (cname='time')]
+        public Timestamp time;
+    }
+
+    [CCode (cname = 'xcb_grab_button_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GrabButtonRequest : Xcb.Request {
+        [CCode (cname='XCB_GRAB_BUTTON')]
+        public const int OPCODE;
+        [CCode (cname='owner_events')]
+        public bool owner_events;
+        [CCode (cname='grab_window')]
+        public Window grab_window;
+        [CCode (cname='event_mask')]
+        public uint16 event_mask;
+        [CCode (cname='pointer_mode')]
+        public uint8 pointer_mode;
+        [CCode (cname='keyboard_mode')]
+        public uint8 keyboard_mode;
+        [CCode (cname='confine_to')]
+        public Window confine_to;
+        [CCode (cname='cursor')]
+        public Cursor cursor;
+        [CCode (cname='button')]
+        public uint8 button;
+        [CCode (cname='modifiers')]
+        public uint16 modifiers;
+    }
+
+    [CCode (cname = 'xcb_ungrab_button_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UngrabButtonRequest : Xcb.Request {
+        [CCode (cname='XCB_UNGRAB_BUTTON')]
+        public const int OPCODE;
+        [CCode (cname='button')]
+        public uint8 button;
+        [CCode (cname='grab_window')]
+        public Window grab_window;
+        [CCode (cname='modifiers')]
+        public uint16 modifiers;
+    }
+
+    [CCode (cname = 'xcb_change_active_pointer_grab_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangeActivePointerGrabRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_ACTIVE_POINTER_GRAB')]
+        public const int OPCODE;
+        [CCode (cname='cursor')]
+        public Cursor cursor;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='event_mask')]
+        public uint16 event_mask;
+    }
+
+    [CCode (cname = 'xcb_grab_keyboard_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GrabKeyboardRequest : Xcb.Request {
+        [CCode (cname='XCB_GRAB_KEYBOARD')]
+        public const int OPCODE;
+        [CCode (cname='owner_events')]
+        public bool owner_events;
+        [CCode (cname='grab_window')]
+        public Window grab_window;
+        [CCode (cname='time')]
+        public Timestamp time;
+        [CCode (cname='pointer_mode')]
+        public uint8 pointer_mode;
+        [CCode (cname='keyboard_mode')]
+        public uint8 keyboard_mode;
+    }
+
+    [CCode (cname = 'xcb_grab_keyboard_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GrabKeyboardReply : Xcb.Reply {
+        [CCode (cname='status')]
+        public uint8 status;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_grab_keyboard_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GrabKeyboardCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GrabKeyboardCookie (Connection conn, bool owner_events, Window grab_window, Timestamp time, uint8 pointer_mode, uint8 keyboard_mode);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GrabKeyboardCookie (Connection conn, bool owner_events, Window grab_window, Timestamp time, uint8 pointer_mode, uint8 keyboard_mode);
+    }
+
+    [CCode (cname = 'xcb_ungrab_keyboard_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UngrabKeyboardRequest : Xcb.Request {
+        [CCode (cname='XCB_UNGRAB_KEYBOARD')]
+        public const int OPCODE;
+        [CCode (cname='time')]
+        public Timestamp time;
+    }
+
+    [CCode (cname = 'xcb_grab_key_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GrabKeyRequest : Xcb.Request {
+        [CCode (cname='XCB_GRAB_KEY')]
+        public const int OPCODE;
+        [CCode (cname='owner_events')]
+        public bool owner_events;
+        [CCode (cname='grab_window')]
+        public Window grab_window;
+        [CCode (cname='modifiers')]
+        public uint16 modifiers;
+        [CCode (cname='key')]
+        public Keycode key;
+        [CCode (cname='pointer_mode')]
+        public uint8 pointer_mode;
+        [CCode (cname='keyboard_mode')]
+        public uint8 keyboard_mode;
+    }
+
+    [CCode (cname = 'xcb_ungrab_key_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UngrabKeyRequest : Xcb.Request {
+        [CCode (cname='XCB_UNGRAB_KEY')]
+        public const int OPCODE;
+        [CCode (cname='key')]
+        public Keycode key;
+        [CCode (cname='grab_window')]
+        public Window grab_window;
+        [CCode (cname='modifiers')]
+        public uint16 modifiers;
+    }
+
+    [CCode (cname = 'xcb_allow_events_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllowEventsRequest : Xcb.Request {
+        [CCode (cname='XCB_ALLOW_EVENTS')]
+        public const int OPCODE;
+        [CCode (cname='mode')]
+        public uint8 mode;
+        [CCode (cname='time')]
+        public Timestamp time;
+    }
+
+    [CCode (cname = 'xcb_grab_server_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GrabServerRequest : Xcb.Request {
+        [CCode (cname='XCB_GRAB_SERVER')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_ungrab_server_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UngrabServerRequest : Xcb.Request {
+        [CCode (cname='XCB_UNGRAB_SERVER')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_query_pointer_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryPointerRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_POINTER')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_query_pointer_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryPointerReply : Xcb.Reply {
+        [CCode (cname='same_screen')]
+        public bool same_screen;
+        [CCode (cname='root')]
+        public Window root;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='root_x')]
+        public int16 root_x;
+        [CCode (cname='root_y')]
+        public int16 root_y;
+        [CCode (cname='win_x')]
+        public int16 win_x;
+        [CCode (cname='win_y')]
+        public int16 win_y;
+        [CCode (cname='mask')]
+        public uint16 mask;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_pointer_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryPointerCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryPointerCookie (Connection conn, Window window);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryPointerCookie (Connection conn, Window window);
+    }
+
+    [CCode (cname = 'xcb_get_motion_events_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetMotionEventsRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_MOTION_EVENTS')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='start')]
+        public Timestamp start;
+        [CCode (cname='stop')]
+        public Timestamp stop;
+    }
+
+    [CCode (cname = 'xcb_get_motion_events_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetMotionEventsReply : Xcb.Reply {
+        [CCode (cname='events_len')]
+        public uint32 events_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_motion_events_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetMotionEventsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetMotionEventsCookie (Connection conn, Window window, Timestamp start, Timestamp stop);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetMotionEventsCookie (Connection conn, Window window, Timestamp start, Timestamp stop);
+    }
+
+    [CCode (cname = 'xcb_translate_coordinates_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class TranslateCoordinatesRequest : Xcb.Request {
+        [CCode (cname='XCB_TRANSLATE_COORDINATES')]
+        public const int OPCODE;
+        [CCode (cname='src_window')]
+        public Window src_window;
+        [CCode (cname='dst_window')]
+        public Window dst_window;
+        [CCode (cname='src_x')]
+        public int16 src_x;
+        [CCode (cname='src_y')]
+        public int16 src_y;
+    }
+
+    [CCode (cname = 'xcb_translate_coordinates_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class TranslateCoordinatesReply : Xcb.Reply {
+        [CCode (cname='same_screen')]
+        public bool same_screen;
+        [CCode (cname='child')]
+        public Window child;
+        [CCode (cname='dst_x')]
+        public uint16 dst_x;
+        [CCode (cname='dst_y')]
+        public uint16 dst_y;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_translate_coordinates_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct TranslateCoordinatesCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public TranslateCoordinatesCookie (Connection conn, Window src_window, Window dst_window, int16 src_x, int16 src_y);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public TranslateCoordinatesCookie (Connection conn, Window src_window, Window dst_window, int16 src_x, int16 src_y);
+    }
+
+    [CCode (cname = 'xcb_warp_pointer_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class WarpPointerRequest : Xcb.Request {
+        [CCode (cname='XCB_WARP_POINTER')]
+        public const int OPCODE;
+        [CCode (cname='src_window')]
+        public Window src_window;
+        [CCode (cname='dst_window')]
+        public Window dst_window;
+        [CCode (cname='src_x')]
+        public int16 src_x;
+        [CCode (cname='src_y')]
+        public int16 src_y;
+        [CCode (cname='src_width')]
+        public uint16 src_width;
+        [CCode (cname='src_height')]
+        public uint16 src_height;
+        [CCode (cname='dst_x')]
+        public int16 dst_x;
+        [CCode (cname='dst_y')]
+        public int16 dst_y;
+    }
+
+    [CCode (cname = 'xcb_set_input_focus_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetInputFocusRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_INPUT_FOCUS')]
+        public const int OPCODE;
+        [CCode (cname='revert_to')]
+        public uint8 revert_to;
+        [CCode (cname='focus')]
+        public Window focus;
+        [CCode (cname='time')]
+        public Timestamp time;
+    }
+
+    [CCode (cname = 'xcb_get_input_focus_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetInputFocusRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_INPUT_FOCUS')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_get_input_focus_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetInputFocusReply : Xcb.Reply {
+        [CCode (cname='revert_to')]
+        public uint8 revert_to;
+        [CCode (cname='focus')]
+        public Window focus;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_input_focus_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetInputFocusCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetInputFocusCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetInputFocusCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_query_keymap_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryKeymapRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_KEYMAP')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_query_keymap_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryKeymapReply : Xcb.Reply {
+        [CCode (cname='keys')]
+        public uint8[] keys;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_keymap_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryKeymapCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryKeymapCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryKeymapCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_open_font_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class OpenFontRequest : Xcb.Request {
+        [CCode (cname='XCB_OPEN_FONT')]
+        public const int OPCODE;
+        [CCode (cname='fid')]
+        public Font fid;
+        [CCode (cname='name_len')]
+        public uint16 name_len;
+        [CCode (cname='xcb_open_font_tname)]
+        public char[] name();
+        [CCode (cname='xcb_open_font_tname_length)]
+        public int name_length();
+    }
+
+    [CCode (cname = 'xcb_close_font_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CloseFontRequest : Xcb.Request {
+        [CCode (cname='XCB_CLOSE_FONT')]
+        public const int OPCODE;
+        [CCode (cname='font')]
+        public Font font;
+    }
+
+    [CCode (cname = 'xcb_query_font_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryFontRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_FONT')]
+        public const int OPCODE;
+        [CCode (cname='font')]
+        public Fontable font;
+    }
+
+    [CCode (cname = 'xcb_query_font_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryFontReply : Xcb.Reply {
+        [CCode (cname='min_bounds')]
+        public Charinfo min_bounds;
+        [CCode (cname='max_bounds')]
+        public Charinfo max_bounds;
+        [CCode (cname='min_char_or_byte2')]
+        public uint16 min_char_or_byte2;
+        [CCode (cname='max_char_or_byte2')]
+        public uint16 max_char_or_byte2;
+        [CCode (cname='default_char')]
+        public uint16 default_char;
+        [CCode (cname='properties_len')]
+        public uint16 properties_len;
+        [CCode (cname='draw_direction')]
+        public uint8 draw_direction;
+        [CCode (cname='min_byte1')]
+        public uint8 min_byte1;
+        [CCode (cname='max_byte1')]
+        public uint8 max_byte1;
+        [CCode (cname='all_chars_exist')]
+        public bool all_chars_exist;
+        [CCode (cname='font_ascent')]
+        public int16 font_ascent;
+        [CCode (cname='font_descent')]
+        public int16 font_descent;
+        [CCode (cname='char_infos_len')]
+        public uint32 char_infos_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_font_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryFontCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryFontCookie (Connection conn, Fontable font);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryFontCookie (Connection conn, Fontable font);
+    }
+
+    [CCode (cname = 'xcb_query_text_extents_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryTextExtentsRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_TEXT_EXTENTS')]
+        public const int OPCODE;
+        [CCode (cname='odd_length')]
+        public bool odd_length;
+        [CCode (cname='font')]
+        public Fontable font;
+        [CCode (cname='xcb_query_text_extents_tstring)]
+        public Char2b[] string();
+        [CCode (cname='xcb_query_text_extents_tstring_length)]
+        public int string_length();
+    }
+
+    [CCode (cname = 'xcb_query_text_extents_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryTextExtentsReply : Xcb.Reply {
+        [CCode (cname='draw_direction')]
+        public uint8 draw_direction;
+        [CCode (cname='font_ascent')]
+        public int16 font_ascent;
+        [CCode (cname='font_descent')]
+        public int16 font_descent;
+        [CCode (cname='overall_ascent')]
+        public int16 overall_ascent;
+        [CCode (cname='overall_descent')]
+        public int16 overall_descent;
+        [CCode (cname='overall_width')]
+        public int32 overall_width;
+        [CCode (cname='overall_left')]
+        public int32 overall_left;
+        [CCode (cname='overall_right')]
+        public int32 overall_right;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_text_extents_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryTextExtentsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryTextExtentsCookie (Connection conn, Fontable font, Char2b[] string);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryTextExtentsCookie (Connection conn, Fontable font, Char2b[] string);
+    }
+
+    [CCode (cname = 'xcb_list_fonts_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListFontsRequest : Xcb.Request {
+        [CCode (cname='XCB_LIST_FONTS')]
+        public const int OPCODE;
+        [CCode (cname='max_names')]
+        public uint16 max_names;
+        [CCode (cname='pattern_len')]
+        public uint16 pattern_len;
+        [CCode (cname='xcb_list_fonts_tpattern)]
+        public char[] pattern();
+        [CCode (cname='xcb_list_fonts_tpattern_length)]
+        public int pattern_length();
+    }
+
+    [CCode (cname = 'xcb_list_fonts_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListFontsReply : Xcb.Reply {
+        [CCode (cname='names_len')]
+        public uint16 names_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_list_fonts_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct ListFontsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public ListFontsCookie (Connection conn, uint16 max_names, uint16 pattern_len, char[] pattern);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public ListFontsCookie (Connection conn, uint16 max_names, uint16 pattern_len, char[] pattern);
+    }
+
+    [CCode (cname = 'xcb_list_fonts_with_info_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListFontsWithInfoRequest : Xcb.Request {
+        [CCode (cname='XCB_LIST_FONTS_WITH_INFO')]
+        public const int OPCODE;
+        [CCode (cname='max_names')]
+        public uint16 max_names;
+        [CCode (cname='pattern_len')]
+        public uint16 pattern_len;
+        [CCode (cname='xcb_list_fonts_with_info_tpattern)]
+        public char[] pattern();
+        [CCode (cname='xcb_list_fonts_with_info_tpattern_length)]
+        public int pattern_length();
+    }
+
+    [CCode (cname = 'xcb_list_fonts_with_info_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListFontsWithInfoReply : Xcb.Reply {
+        [CCode (cname='name_len')]
+        public uint8 name_len;
+        [CCode (cname='min_bounds')]
+        public Charinfo min_bounds;
+        [CCode (cname='max_bounds')]
+        public Charinfo max_bounds;
+        [CCode (cname='min_char_or_byte2')]
+        public uint16 min_char_or_byte2;
+        [CCode (cname='max_char_or_byte2')]
+        public uint16 max_char_or_byte2;
+        [CCode (cname='default_char')]
+        public uint16 default_char;
+        [CCode (cname='properties_len')]
+        public uint16 properties_len;
+        [CCode (cname='draw_direction')]
+        public uint8 draw_direction;
+        [CCode (cname='min_byte1')]
+        public uint8 min_byte1;
+        [CCode (cname='max_byte1')]
+        public uint8 max_byte1;
+        [CCode (cname='all_chars_exist')]
+        public bool all_chars_exist;
+        [CCode (cname='font_ascent')]
+        public int16 font_ascent;
+        [CCode (cname='font_descent')]
+        public int16 font_descent;
+        [CCode (cname='replies_hint')]
+        public uint32 replies_hint;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_list_fonts_with_info_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct ListFontsWithInfoCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public ListFontsWithInfoCookie (Connection conn, uint16 max_names, uint16 pattern_len, char[] pattern);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public ListFontsWithInfoCookie (Connection conn, uint16 max_names, uint16 pattern_len, char[] pattern);
+    }
+
+    [CCode (cname = 'xcb_set_font_path_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetFontPathRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_FONT_PATH')]
+        public const int OPCODE;
+        [CCode (cname='font_qty')]
+        public uint16 font_qty;
+        [CCode (cname='xcb_set_font_path_tpath)]
+        public char[] path();
+        [CCode (cname='xcb_set_font_path_tpath_length)]
+        public int path_length();
+    }
+
+    [CCode (cname = 'xcb_get_font_path_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetFontPathRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_FONT_PATH')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_get_font_path_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetFontPathReply : Xcb.Reply {
+        [CCode (cname='path_len')]
+        public uint16 path_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_font_path_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetFontPathCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetFontPathCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetFontPathCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_create_pixmap_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CreatePixmapRequest : Xcb.Request {
+        [CCode (cname='XCB_CREATE_PIXMAP')]
+        public const int OPCODE;
+        [CCode (cname='depth')]
+        public uint8 depth;
+        [CCode (cname='pid')]
+        public Pixmap pid;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+    }
+
+    [CCode (cname = 'xcb_free_pixmap_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class FreePixmapRequest : Xcb.Request {
+        [CCode (cname='XCB_FREE_PIXMAP')]
+        public const int OPCODE;
+        [CCode (cname='pixmap')]
+        public Pixmap pixmap;
+    }
+
+    [CCode (cname = 'xcb_create_g_c_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CreateGCRequest : Xcb.Request {
+        [CCode (cname='XCB_CREATE_GC')]
+        public const int OPCODE;
+        [CCode (cname='cid')]
+        public GC cid;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='value_mask')]
+        public uint32 value_mask;
+    }
+
+    [CCode (cname = 'xcb_change_g_c_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangeGCRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_GC')]
+        public const int OPCODE;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='value_mask')]
+        public uint32 value_mask;
+    }
+
+    [CCode (cname = 'xcb_copy_g_c_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CopyGCRequest : Xcb.Request {
+        [CCode (cname='XCB_COPY_GC')]
+        public const int OPCODE;
+        [CCode (cname='src_gc')]
+        public GC src_gc;
+        [CCode (cname='dst_gc')]
+        public GC dst_gc;
+        [CCode (cname='value_mask')]
+        public uint32 value_mask;
+    }
+
+    [CCode (cname = 'xcb_set_dashes_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetDashesRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_DASHES')]
+        public const int OPCODE;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='dash_offset')]
+        public uint16 dash_offset;
+        [CCode (cname='dashes_len')]
+        public uint16 dashes_len;
+        [CCode (cname='xcb_set_dashes_tdashes)]
+        public uint8[] dashes();
+        [CCode (cname='xcb_set_dashes_tdashes_length)]
+        public int dashes_length();
+    }
+
+    [CCode (cname = 'xcb_set_clip_rectangles_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetClipRectanglesRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_CLIP_RECTANGLES')]
+        public const int OPCODE;
+        [CCode (cname='ordering')]
+        public uint8 ordering;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='clip_x_origin')]
+        public int16 clip_x_origin;
+        [CCode (cname='clip_y_origin')]
+        public int16 clip_y_origin;
+        [CCode (cname='xcb_set_clip_rectangles_trectangles)]
+        public Rectangle[] rectangles();
+        [CCode (cname='xcb_set_clip_rectangles_trectangles_length)]
+        public int rectangles_length();
+    }
+
+    [CCode (cname = 'xcb_free_g_c_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class FreeGCRequest : Xcb.Request {
+        [CCode (cname='XCB_FREE_GC')]
+        public const int OPCODE;
+        [CCode (cname='gc')]
+        public GC gc;
+    }
+
+    [CCode (cname = 'xcb_clear_area_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ClearAreaRequest : Xcb.Request {
+        [CCode (cname='XCB_CLEAR_AREA')]
+        public const int OPCODE;
+        [CCode (cname='exposures')]
+        public bool exposures;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+    }
+
+    [CCode (cname = 'xcb_copy_area_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CopyAreaRequest : Xcb.Request {
+        [CCode (cname='XCB_COPY_AREA')]
+        public const int OPCODE;
+        [CCode (cname='src_drawable')]
+        public Drawable src_drawable;
+        [CCode (cname='dst_drawable')]
+        public Drawable dst_drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='src_x')]
+        public int16 src_x;
+        [CCode (cname='src_y')]
+        public int16 src_y;
+        [CCode (cname='dst_x')]
+        public int16 dst_x;
+        [CCode (cname='dst_y')]
+        public int16 dst_y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+    }
+
+    [CCode (cname = 'xcb_copy_plane_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CopyPlaneRequest : Xcb.Request {
+        [CCode (cname='XCB_COPY_PLANE')]
+        public const int OPCODE;
+        [CCode (cname='src_drawable')]
+        public Drawable src_drawable;
+        [CCode (cname='dst_drawable')]
+        public Drawable dst_drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='src_x')]
+        public int16 src_x;
+        [CCode (cname='src_y')]
+        public int16 src_y;
+        [CCode (cname='dst_x')]
+        public int16 dst_x;
+        [CCode (cname='dst_y')]
+        public int16 dst_y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='bit_plane')]
+        public uint32 bit_plane;
+    }
+
+    [CCode (cname = 'xcb_poly_point_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyPointRequest : Xcb.Request {
+        [CCode (cname='XCB_POLY_POINT')]
+        public const int OPCODE;
+        [CCode (cname='coordinate_mode')]
+        public uint8 coordinate_mode;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='xcb_poly_point_tpoints)]
+        public Point[] points();
+        [CCode (cname='xcb_poly_point_tpoints_length)]
+        public int points_length();
+    }
+
+    [CCode (cname = 'xcb_poly_line_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyLineRequest : Xcb.Request {
+        [CCode (cname='XCB_POLY_LINE')]
+        public const int OPCODE;
+        [CCode (cname='coordinate_mode')]
+        public uint8 coordinate_mode;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='xcb_poly_line_tpoints)]
+        public Point[] points();
+        [CCode (cname='xcb_poly_line_tpoints_length)]
+        public int points_length();
+    }
+
+    [CCode (cname = 'xcb_poly_segment_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolySegmentRequest : Xcb.Request {
+        [CCode (cname='XCB_POLY_SEGMENT')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='xcb_poly_segment_tsegments)]
+        public Segment[] segments();
+        [CCode (cname='xcb_poly_segment_tsegments_length)]
+        public int segments_length();
+    }
+
+    [CCode (cname = 'xcb_poly_rectangle_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyRectangleRequest : Xcb.Request {
+        [CCode (cname='XCB_POLY_RECTANGLE')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='xcb_poly_rectangle_trectangles)]
+        public Rectangle[] rectangles();
+        [CCode (cname='xcb_poly_rectangle_trectangles_length)]
+        public int rectangles_length();
+    }
+
+    [CCode (cname = 'xcb_poly_arc_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyArcRequest : Xcb.Request {
+        [CCode (cname='XCB_POLY_ARC')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='xcb_poly_arc_tarcs)]
+        public Arc[] arcs();
+        [CCode (cname='xcb_poly_arc_tarcs_length)]
+        public int arcs_length();
+    }
+
+    [CCode (cname = 'xcb_fill_poly_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class FillPolyRequest : Xcb.Request {
+        [CCode (cname='XCB_FILL_POLY')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='shape')]
+        public uint8 shape;
+        [CCode (cname='coordinate_mode')]
+        public uint8 coordinate_mode;
+        [CCode (cname='xcb_fill_poly_tpoints)]
+        public Point[] points();
+        [CCode (cname='xcb_fill_poly_tpoints_length)]
+        public int points_length();
+    }
+
+    [CCode (cname = 'xcb_poly_fill_rectangle_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyFillRectangleRequest : Xcb.Request {
+        [CCode (cname='XCB_POLY_FILL_RECTANGLE')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='xcb_poly_fill_rectangle_trectangles)]
+        public Rectangle[] rectangles();
+        [CCode (cname='xcb_poly_fill_rectangle_trectangles_length)]
+        public int rectangles_length();
+    }
+
+    [CCode (cname = 'xcb_poly_fill_arc_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyFillArcRequest : Xcb.Request {
+        [CCode (cname='XCB_POLY_FILL_ARC')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='xcb_poly_fill_arc_tarcs)]
+        public Arc[] arcs();
+        [CCode (cname='xcb_poly_fill_arc_tarcs_length)]
+        public int arcs_length();
+    }
+
+    [CCode (cname = 'xcb_put_image_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PutImageRequest : Xcb.Request {
+        [CCode (cname='XCB_PUT_IMAGE')]
+        public const int OPCODE;
+        [CCode (cname='format')]
+        public uint8 format;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='dst_x')]
+        public int16 dst_x;
+        [CCode (cname='dst_y')]
+        public int16 dst_y;
+        [CCode (cname='left_pad')]
+        public uint8 left_pad;
+        [CCode (cname='depth')]
+        public uint8 depth;
+        [CCode (cname='xcb_put_image_tdata)]
+        public uint8[] data();
+        [CCode (cname='xcb_put_image_tdata_length)]
+        public int data_length();
+    }
+
+    [CCode (cname = 'xcb_get_image_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetImageRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_IMAGE')]
+        public const int OPCODE;
+        [CCode (cname='format')]
+        public uint8 format;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='plane_mask')]
+        public uint32 plane_mask;
+    }
+
+    [CCode (cname = 'xcb_get_image_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetImageReply : Xcb.Reply {
+        [CCode (cname='depth')]
+        public uint8 depth;
+        [CCode (cname='visual')]
+        public VisualID visual;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_image_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetImageCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetImageCookie (Connection conn, uint8 format, Drawable drawable, int16 x, int16 y, uint16 width, uint16 height, uint32 plane_mask);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetImageCookie (Connection conn, uint8 format, Drawable drawable, int16 x, int16 y, uint16 width, uint16 height, uint32 plane_mask);
+    }
+
+    [CCode (cname = 'xcb_poly_text8_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyText8Request : Xcb.Request {
+        [CCode (cname='XCB_POLY_TEXT_8')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='xcb_poly_text_8_titems)]
+        public uint8[] items();
+        [CCode (cname='xcb_poly_text_8_titems_length)]
+        public int items_length();
+    }
+
+    [CCode (cname = 'xcb_poly_text16_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class PolyText16Request : Xcb.Request {
+        [CCode (cname='XCB_POLY_TEXT_16')]
+        public const int OPCODE;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='xcb_poly_text_16_titems)]
+        public uint8[] items();
+        [CCode (cname='xcb_poly_text_16_titems_length)]
+        public int items_length();
+    }
+
+    [CCode (cname = 'xcb_image_text8_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ImageText8Request : Xcb.Request {
+        [CCode (cname='XCB_IMAGE_TEXT_8')]
+        public const int OPCODE;
+        [CCode (cname='string_len')]
+        public uint8 string_len;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='xcb_image_text_8_tstring)]
+        public char[] string();
+        [CCode (cname='xcb_image_text_8_tstring_length)]
+        public int string_length();
+    }
+
+    [CCode (cname = 'xcb_image_text16_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ImageText16Request : Xcb.Request {
+        [CCode (cname='XCB_IMAGE_TEXT_16')]
+        public const int OPCODE;
+        [CCode (cname='string_len')]
+        public uint8 string_len;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='gc')]
+        public GC gc;
+        [CCode (cname='x')]
+        public int16 x;
+        [CCode (cname='y')]
+        public int16 y;
+        [CCode (cname='xcb_image_text_16_tstring)]
+        public Char2b[] string();
+        [CCode (cname='xcb_image_text_16_tstring_length)]
+        public int string_length();
+    }
+
+    [CCode (cname = 'xcb_create_colormap_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CreateColormapRequest : Xcb.Request {
+        [CCode (cname='XCB_CREATE_COLORMAP')]
+        public const int OPCODE;
+        [CCode (cname='alloc')]
+        public uint8 alloc;
+        [CCode (cname='mid')]
+        public Colormap mid;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='visual')]
+        public VisualID visual;
+    }
+
+    [CCode (cname = 'xcb_free_colormap_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class FreeColormapRequest : Xcb.Request {
+        [CCode (cname='XCB_FREE_COLORMAP')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+    }
+
+    [CCode (cname = 'xcb_copy_colormap_and_free_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CopyColormapAndFreeRequest : Xcb.Request {
+        [CCode (cname='XCB_COPY_COLORMAP_AND_FREE')]
+        public const int OPCODE;
+        [CCode (cname='mid')]
+        public Colormap mid;
+        [CCode (cname='src_cmap')]
+        public Colormap src_cmap;
+    }
+
+    [CCode (cname = 'xcb_install_colormap_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class InstallColormapRequest : Xcb.Request {
+        [CCode (cname='XCB_INSTALL_COLORMAP')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+    }
+
+    [CCode (cname = 'xcb_uninstall_colormap_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class UninstallColormapRequest : Xcb.Request {
+        [CCode (cname='XCB_UNINSTALL_COLORMAP')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+    }
+
+    [CCode (cname = 'xcb_list_installed_colormaps_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListInstalledColormapsRequest : Xcb.Request {
+        [CCode (cname='XCB_LIST_INSTALLED_COLORMAPS')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+    }
+
+    [CCode (cname = 'xcb_list_installed_colormaps_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListInstalledColormapsReply : Xcb.Reply {
+        [CCode (cname='cmaps_len')]
+        public uint16 cmaps_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_list_installed_colormaps_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct ListInstalledColormapsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public ListInstalledColormapsCookie (Connection conn, Window window);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public ListInstalledColormapsCookie (Connection conn, Window window);
+    }
+
+    [CCode (cname = 'xcb_alloc_color_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocColorRequest : Xcb.Request {
+        [CCode (cname='XCB_ALLOC_COLOR')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='red')]
+        public uint16 red;
+        [CCode (cname='green')]
+        public uint16 green;
+        [CCode (cname='blue')]
+        public uint16 blue;
+    }
+
+    [CCode (cname = 'xcb_alloc_color_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocColorReply : Xcb.Reply {
+        [CCode (cname='red')]
+        public uint16 red;
+        [CCode (cname='green')]
+        public uint16 green;
+        [CCode (cname='blue')]
+        public uint16 blue;
+        [CCode (cname='pixel')]
+        public uint32 pixel;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_alloc_color_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct AllocColorCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public AllocColorCookie (Connection conn, Colormap cmap, uint16 red, uint16 green, uint16 blue);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public AllocColorCookie (Connection conn, Colormap cmap, uint16 red, uint16 green, uint16 blue);
+    }
+
+    [CCode (cname = 'xcb_alloc_named_color_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocNamedColorRequest : Xcb.Request {
+        [CCode (cname='XCB_ALLOC_NAMED_COLOR')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='name_len')]
+        public uint16 name_len;
+        [CCode (cname='xcb_alloc_named_color_tname)]
+        public char[] name();
+        [CCode (cname='xcb_alloc_named_color_tname_length)]
+        public int name_length();
+    }
+
+    [CCode (cname = 'xcb_alloc_named_color_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocNamedColorReply : Xcb.Reply {
+        [CCode (cname='pixel')]
+        public uint32 pixel;
+        [CCode (cname='exact_red')]
+        public uint16 exact_red;
+        [CCode (cname='exact_green')]
+        public uint16 exact_green;
+        [CCode (cname='exact_blue')]
+        public uint16 exact_blue;
+        [CCode (cname='visual_red')]
+        public uint16 visual_red;
+        [CCode (cname='visual_green')]
+        public uint16 visual_green;
+        [CCode (cname='visual_blue')]
+        public uint16 visual_blue;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_alloc_named_color_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct AllocNamedColorCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public AllocNamedColorCookie (Connection conn, Colormap cmap, uint16 name_len, char[] name);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public AllocNamedColorCookie (Connection conn, Colormap cmap, uint16 name_len, char[] name);
+    }
+
+    [CCode (cname = 'xcb_alloc_color_cells_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocColorCellsRequest : Xcb.Request {
+        [CCode (cname='XCB_ALLOC_COLOR_CELLS')]
+        public const int OPCODE;
+        [CCode (cname='contiguous')]
+        public bool contiguous;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='colors')]
+        public uint16 colors;
+        [CCode (cname='planes')]
+        public uint16 planes;
+    }
+
+    [CCode (cname = 'xcb_alloc_color_cells_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocColorCellsReply : Xcb.Reply {
+        [CCode (cname='pixels_len')]
+        public uint16 pixels_len;
+        [CCode (cname='masks_len')]
+        public uint16 masks_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_alloc_color_cells_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct AllocColorCellsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public AllocColorCellsCookie (Connection conn, bool contiguous, Colormap cmap, uint16 colors, uint16 planes);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public AllocColorCellsCookie (Connection conn, bool contiguous, Colormap cmap, uint16 colors, uint16 planes);
+    }
+
+    [CCode (cname = 'xcb_alloc_color_planes_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocColorPlanesRequest : Xcb.Request {
+        [CCode (cname='XCB_ALLOC_COLOR_PLANES')]
+        public const int OPCODE;
+        [CCode (cname='contiguous')]
+        public bool contiguous;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='colors')]
+        public uint16 colors;
+        [CCode (cname='reds')]
+        public uint16 reds;
+        [CCode (cname='greens')]
+        public uint16 greens;
+        [CCode (cname='blues')]
+        public uint16 blues;
+    }
+
+    [CCode (cname = 'xcb_alloc_color_planes_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class AllocColorPlanesReply : Xcb.Reply {
+        [CCode (cname='pixels_len')]
+        public uint16 pixels_len;
+        [CCode (cname='red_mask')]
+        public uint32 red_mask;
+        [CCode (cname='green_mask')]
+        public uint32 green_mask;
+        [CCode (cname='blue_mask')]
+        public uint32 blue_mask;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_alloc_color_planes_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct AllocColorPlanesCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public AllocColorPlanesCookie (Connection conn, bool contiguous, Colormap cmap, uint16 colors, uint16 reds, uint16 greens, uint16 blues);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public AllocColorPlanesCookie (Connection conn, bool contiguous, Colormap cmap, uint16 colors, uint16 reds, uint16 greens, uint16 blues);
+    }
+
+    [CCode (cname = 'xcb_free_colors_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class FreeColorsRequest : Xcb.Request {
+        [CCode (cname='XCB_FREE_COLORS')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='plane_mask')]
+        public uint32 plane_mask;
+        [CCode (cname='xcb_free_colors_tpixels)]
+        public uint32[] pixels();
+        [CCode (cname='xcb_free_colors_tpixels_length)]
+        public int pixels_length();
+    }
+
+    [CCode (cname = 'xcb_store_colors_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class StoreColorsRequest : Xcb.Request {
+        [CCode (cname='XCB_STORE_COLORS')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='xcb_store_colors_titems)]
+        public Coloritem[] items();
+        [CCode (cname='xcb_store_colors_titems_length)]
+        public int items_length();
+    }
+
+    [CCode (cname = 'xcb_store_named_color_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class StoreNamedColorRequest : Xcb.Request {
+        [CCode (cname='XCB_STORE_NAMED_COLOR')]
+        public const int OPCODE;
+        [CCode (cname='flags')]
+        public uint8 flags;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='pixel')]
+        public uint32 pixel;
+        [CCode (cname='name_len')]
+        public uint16 name_len;
+        [CCode (cname='xcb_store_named_color_tname)]
+        public char[] name();
+        [CCode (cname='xcb_store_named_color_tname_length)]
+        public int name_length();
+    }
+
+    [CCode (cname = 'xcb_query_colors_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryColorsRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_COLORS')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='xcb_query_colors_tpixels)]
+        public uint32[] pixels();
+        [CCode (cname='xcb_query_colors_tpixels_length)]
+        public int pixels_length();
+    }
+
+    [CCode (cname = 'xcb_query_colors_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryColorsReply : Xcb.Reply {
+        [CCode (cname='colors_len')]
+        public uint16 colors_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_colors_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryColorsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryColorsCookie (Connection conn, Colormap cmap, uint32[] pixels);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryColorsCookie (Connection conn, Colormap cmap, uint32[] pixels);
+    }
+
+    [CCode (cname = 'xcb_lookup_color_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class LookupColorRequest : Xcb.Request {
+        [CCode (cname='XCB_LOOKUP_COLOR')]
+        public const int OPCODE;
+        [CCode (cname='cmap')]
+        public Colormap cmap;
+        [CCode (cname='name_len')]
+        public uint16 name_len;
+        [CCode (cname='xcb_lookup_color_tname)]
+        public char[] name();
+        [CCode (cname='xcb_lookup_color_tname_length)]
+        public int name_length();
+    }
+
+    [CCode (cname = 'xcb_lookup_color_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class LookupColorReply : Xcb.Reply {
+        [CCode (cname='exact_red')]
+        public uint16 exact_red;
+        [CCode (cname='exact_green')]
+        public uint16 exact_green;
+        [CCode (cname='exact_blue')]
+        public uint16 exact_blue;
+        [CCode (cname='visual_red')]
+        public uint16 visual_red;
+        [CCode (cname='visual_green')]
+        public uint16 visual_green;
+        [CCode (cname='visual_blue')]
+        public uint16 visual_blue;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_lookup_color_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct LookupColorCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public LookupColorCookie (Connection conn, Colormap cmap, uint16 name_len, char[] name);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public LookupColorCookie (Connection conn, Colormap cmap, uint16 name_len, char[] name);
+    }
+
+    [CCode (cname = 'xcb_create_cursor_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CreateCursorRequest : Xcb.Request {
+        [CCode (cname='XCB_CREATE_CURSOR')]
+        public const int OPCODE;
+        [CCode (cname='cid')]
+        public Cursor cid;
+        [CCode (cname='source')]
+        public Pixmap source;
+        [CCode (cname='mask')]
+        public Pixmap mask;
+        [CCode (cname='fore_red')]
+        public uint16 fore_red;
+        [CCode (cname='fore_green')]
+        public uint16 fore_green;
+        [CCode (cname='fore_blue')]
+        public uint16 fore_blue;
+        [CCode (cname='back_red')]
+        public uint16 back_red;
+        [CCode (cname='back_green')]
+        public uint16 back_green;
+        [CCode (cname='back_blue')]
+        public uint16 back_blue;
+        [CCode (cname='x')]
+        public uint16 x;
+        [CCode (cname='y')]
+        public uint16 y;
+    }
+
+    [CCode (cname = 'xcb_create_glyph_cursor_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class CreateGlyphCursorRequest : Xcb.Request {
+        [CCode (cname='XCB_CREATE_GLYPH_CURSOR')]
+        public const int OPCODE;
+        [CCode (cname='cid')]
+        public Cursor cid;
+        [CCode (cname='source_font')]
+        public Font source_font;
+        [CCode (cname='mask_font')]
+        public Font mask_font;
+        [CCode (cname='source_char')]
+        public uint16 source_char;
+        [CCode (cname='mask_char')]
+        public uint16 mask_char;
+        [CCode (cname='fore_red')]
+        public uint16 fore_red;
+        [CCode (cname='fore_green')]
+        public uint16 fore_green;
+        [CCode (cname='fore_blue')]
+        public uint16 fore_blue;
+        [CCode (cname='back_red')]
+        public uint16 back_red;
+        [CCode (cname='back_green')]
+        public uint16 back_green;
+        [CCode (cname='back_blue')]
+        public uint16 back_blue;
+    }
+
+    [CCode (cname = 'xcb_free_cursor_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class FreeCursorRequest : Xcb.Request {
+        [CCode (cname='XCB_FREE_CURSOR')]
+        public const int OPCODE;
+        [CCode (cname='cursor')]
+        public Cursor cursor;
+    }
+
+    [CCode (cname = 'xcb_recolor_cursor_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class RecolorCursorRequest : Xcb.Request {
+        [CCode (cname='XCB_RECOLOR_CURSOR')]
+        public const int OPCODE;
+        [CCode (cname='cursor')]
+        public Cursor cursor;
+        [CCode (cname='fore_red')]
+        public uint16 fore_red;
+        [CCode (cname='fore_green')]
+        public uint16 fore_green;
+        [CCode (cname='fore_blue')]
+        public uint16 fore_blue;
+        [CCode (cname='back_red')]
+        public uint16 back_red;
+        [CCode (cname='back_green')]
+        public uint16 back_green;
+        [CCode (cname='back_blue')]
+        public uint16 back_blue;
+    }
+
+    [CCode (cname = 'xcb_query_best_size_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryBestSizeRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_BEST_SIZE')]
+        public const int OPCODE;
+        [CCode (cname='class')]
+        public uint8 class;
+        [CCode (cname='drawable')]
+        public Drawable drawable;
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+    }
+
+    [CCode (cname = 'xcb_query_best_size_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryBestSizeReply : Xcb.Reply {
+        [CCode (cname='width')]
+        public uint16 width;
+        [CCode (cname='height')]
+        public uint16 height;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_best_size_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryBestSizeCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryBestSizeCookie (Connection conn, uint8 class, Drawable drawable, uint16 width, uint16 height);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryBestSizeCookie (Connection conn, uint8 class, Drawable drawable, uint16 width, uint16 height);
+    }
+
+    [CCode (cname = 'xcb_query_extension_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryExtensionRequest : Xcb.Request {
+        [CCode (cname='XCB_QUERY_EXTENSION')]
+        public const int OPCODE;
+        [CCode (cname='name_len')]
+        public uint16 name_len;
+        [CCode (cname='xcb_query_extension_tname)]
+        public char[] name();
+        [CCode (cname='xcb_query_extension_tname_length)]
+        public int name_length();
+    }
+
+    [CCode (cname = 'xcb_query_extension_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class QueryExtensionReply : Xcb.Reply {
+        [CCode (cname='present')]
+        public bool present;
+        [CCode (cname='major_opcode')]
+        public uint8 major_opcode;
+        [CCode (cname='first_event')]
+        public uint8 first_event;
+        [CCode (cname='first_error')]
+        public uint8 first_error;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_query_extension_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct QueryExtensionCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public QueryExtensionCookie (Connection conn, uint16 name_len, char[] name);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public QueryExtensionCookie (Connection conn, uint16 name_len, char[] name);
+    }
+
+    [CCode (cname = 'xcb_list_extensions_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListExtensionsRequest : Xcb.Request {
+        [CCode (cname='XCB_LIST_EXTENSIONS')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_list_extensions_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListExtensionsReply : Xcb.Reply {
+        [CCode (cname='names_len')]
+        public uint8 names_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_list_extensions_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct ListExtensionsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public ListExtensionsCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public ListExtensionsCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_change_keyboard_mapping_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangeKeyboardMappingRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_KEYBOARD_MAPPING')]
+        public const int OPCODE;
+        [CCode (cname='keycode_count')]
+        public uint8 keycode_count;
+        [CCode (cname='first_keycode')]
+        public Keycode first_keycode;
+        [CCode (cname='keysyms_per_keycode')]
+        public uint8 keysyms_per_keycode;
+        [CCode (cname='xcb_change_keyboard_mapping_tkeysyms)]
+        public Keysym[] keysyms();
+        [CCode (cname='xcb_change_keyboard_mapping_tkeysyms_length)]
+        public int keysyms_length();
+    }
+
+    [CCode (cname = 'xcb_get_keyboard_mapping_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetKeyboardMappingRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_KEYBOARD_MAPPING')]
+        public const int OPCODE;
+        [CCode (cname='first_keycode')]
+        public Keycode first_keycode;
+        [CCode (cname='count')]
+        public uint8 count;
+    }
+
+    [CCode (cname = 'xcb_get_keyboard_mapping_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetKeyboardMappingReply : Xcb.Reply {
+        [CCode (cname='keysyms_per_keycode')]
+        public uint8 keysyms_per_keycode;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_keyboard_mapping_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetKeyboardMappingCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetKeyboardMappingCookie (Connection conn, Keycode first_keycode, uint8 count);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetKeyboardMappingCookie (Connection conn, Keycode first_keycode, uint8 count);
+    }
+
+    [CCode (cname = 'xcb_change_keyboard_control_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangeKeyboardControlRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_KEYBOARD_CONTROL')]
+        public const int OPCODE;
+        [CCode (cname='value_mask')]
+        public uint32 value_mask;
+    }
+
+    [CCode (cname = 'xcb_get_keyboard_control_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetKeyboardControlRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_KEYBOARD_CONTROL')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_get_keyboard_control_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetKeyboardControlReply : Xcb.Reply {
+        [CCode (cname='global_auto_repeat')]
+        public uint8 global_auto_repeat;
+        [CCode (cname='led_mask')]
+        public uint32 led_mask;
+        [CCode (cname='key_click_percent')]
+        public uint8 key_click_percent;
+        [CCode (cname='bell_percent')]
+        public uint8 bell_percent;
+        [CCode (cname='bell_pitch')]
+        public uint16 bell_pitch;
+        [CCode (cname='bell_duration')]
+        public uint16 bell_duration;
+        [CCode (cname='auto_repeats')]
+        public uint8[] auto_repeats;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_keyboard_control_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetKeyboardControlCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetKeyboardControlCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetKeyboardControlCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_bell_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class BellRequest : Xcb.Request {
+        [CCode (cname='XCB_BELL')]
+        public const int OPCODE;
+        [CCode (cname='percent')]
+        public int8 percent;
+    }
+
+    [CCode (cname = 'xcb_change_pointer_control_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangePointerControlRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_POINTER_CONTROL')]
+        public const int OPCODE;
+        [CCode (cname='acceleration_numerator')]
+        public int16 acceleration_numerator;
+        [CCode (cname='acceleration_denominator')]
+        public int16 acceleration_denominator;
+        [CCode (cname='threshold')]
+        public int16 threshold;
+        [CCode (cname='do_acceleration')]
+        public bool do_acceleration;
+        [CCode (cname='do_threshold')]
+        public bool do_threshold;
+    }
+
+    [CCode (cname = 'xcb_get_pointer_control_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetPointerControlRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_POINTER_CONTROL')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_get_pointer_control_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetPointerControlReply : Xcb.Reply {
+        [CCode (cname='acceleration_numerator')]
+        public uint16 acceleration_numerator;
+        [CCode (cname='acceleration_denominator')]
+        public uint16 acceleration_denominator;
+        [CCode (cname='threshold')]
+        public uint16 threshold;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_pointer_control_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetPointerControlCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetPointerControlCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetPointerControlCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_set_screen_saver_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetScreenSaverRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_SCREEN_SAVER')]
+        public const int OPCODE;
+        [CCode (cname='timeout')]
+        public int16 timeout;
+        [CCode (cname='interval')]
+        public int16 interval;
+        [CCode (cname='prefer_blanking')]
+        public uint8 prefer_blanking;
+        [CCode (cname='allow_exposures')]
+        public uint8 allow_exposures;
+    }
+
+    [CCode (cname = 'xcb_get_screen_saver_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetScreenSaverRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_SCREEN_SAVER')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_get_screen_saver_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetScreenSaverReply : Xcb.Reply {
+        [CCode (cname='timeout')]
+        public uint16 timeout;
+        [CCode (cname='interval')]
+        public uint16 interval;
+        [CCode (cname='prefer_blanking')]
+        public uint8 prefer_blanking;
+        [CCode (cname='allow_exposures')]
+        public uint8 allow_exposures;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_screen_saver_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetScreenSaverCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetScreenSaverCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetScreenSaverCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_change_hosts_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ChangeHostsRequest : Xcb.Request {
+        [CCode (cname='XCB_CHANGE_HOSTS')]
+        public const int OPCODE;
+        [CCode (cname='mode')]
+        public uint8 mode;
+        [CCode (cname='family')]
+        public uint8 family;
+        [CCode (cname='address_len')]
+        public uint16 address_len;
+        [CCode (cname='xcb_change_hosts_taddress)]
+        public char[] address();
+        [CCode (cname='xcb_change_hosts_taddress_length)]
+        public int address_length();
+    }
+
+    [CCode (cname = 'xcb_list_hosts_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListHostsRequest : Xcb.Request {
+        [CCode (cname='XCB_LIST_HOSTS')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_list_hosts_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ListHostsReply : Xcb.Reply {
+        [CCode (cname='mode')]
+        public uint8 mode;
+        [CCode (cname='hosts_len')]
+        public uint16 hosts_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_list_hosts_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct ListHostsCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public ListHostsCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public ListHostsCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_set_access_control_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetAccessControlRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_ACCESS_CONTROL')]
+        public const int OPCODE;
+        [CCode (cname='mode')]
+        public uint8 mode;
+    }
+
+    [CCode (cname = 'xcb_set_close_down_mode_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetCloseDownModeRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_CLOSE_DOWN_MODE')]
+        public const int OPCODE;
+        [CCode (cname='mode')]
+        public uint8 mode;
+    }
+
+    [CCode (cname = 'xcb_kill_client_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class KillClientRequest : Xcb.Request {
+        [CCode (cname='XCB_KILL_CLIENT')]
+        public const int OPCODE;
+        [CCode (cname='resource')]
+        public uint32 resource;
+    }
+
+    [CCode (cname = 'xcb_rotate_properties_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class RotatePropertiesRequest : Xcb.Request {
+        [CCode (cname='XCB_ROTATE_PROPERTIES')]
+        public const int OPCODE;
+        [CCode (cname='window')]
+        public Window window;
+        [CCode (cname='atoms_len')]
+        public uint16 atoms_len;
+        [CCode (cname='delta')]
+        public int16 delta;
+        [CCode (cname='xcb_rotate_properties_tatoms)]
+        public Atom[] atoms();
+        [CCode (cname='xcb_rotate_properties_tatoms_length)]
+        public int atoms_length();
+    }
+
+    [CCode (cname = 'xcb_force_screen_saver_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class ForceScreenSaverRequest : Xcb.Request {
+        [CCode (cname='XCB_FORCE_SCREEN_SAVER')]
+        public const int OPCODE;
+        [CCode (cname='mode')]
+        public uint8 mode;
+    }
+
+    [CCode (cname = 'xcb_set_pointer_mapping_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetPointerMappingRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_POINTER_MAPPING')]
+        public const int OPCODE;
+        [CCode (cname='map_len')]
+        public uint8 map_len;
+        [CCode (cname='xcb_set_pointer_mapping_tmap)]
+        public uint8[] map();
+        [CCode (cname='xcb_set_pointer_mapping_tmap_length)]
+        public int map_length();
+    }
+
+    [CCode (cname = 'xcb_set_pointer_mapping_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetPointerMappingReply : Xcb.Reply {
+        [CCode (cname='status')]
+        public uint8 status;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_set_pointer_mapping_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct SetPointerMappingCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public SetPointerMappingCookie (Connection conn, uint8 map_len, uint8[] map);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public SetPointerMappingCookie (Connection conn, uint8 map_len, uint8[] map);
+    }
+
+    [CCode (cname = 'xcb_get_pointer_mapping_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetPointerMappingRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_POINTER_MAPPING')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_get_pointer_mapping_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetPointerMappingReply : Xcb.Reply {
+        [CCode (cname='map_len')]
+        public uint8 map_len;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_pointer_mapping_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetPointerMappingCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetPointerMappingCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetPointerMappingCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_set_modifier_mapping_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetModifierMappingRequest : Xcb.Request {
+        [CCode (cname='XCB_SET_MODIFIER_MAPPING')]
+        public const int OPCODE;
+        [CCode (cname='keycodes_per_modifier')]
+        public uint8 keycodes_per_modifier;
+        [CCode (cname='xcb_set_modifier_mapping_tkeycodes)]
+        public Keycode[] keycodes();
+        [CCode (cname='xcb_set_modifier_mapping_tkeycodes_length)]
+        public int keycodes_length();
+    }
+
+    [CCode (cname = 'xcb_set_modifier_mapping_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class SetModifierMappingReply : Xcb.Reply {
+        [CCode (cname='status')]
+        public uint8 status;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_set_modifier_mapping_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct SetModifierMappingCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public SetModifierMappingCookie (Connection conn, uint8 keycodes_per_modifier, Keycode[] keycodes);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public SetModifierMappingCookie (Connection conn, uint8 keycodes_per_modifier, Keycode[] keycodes);
+    }
+
+    [CCode (cname = 'xcb_get_modifier_mapping_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetModifierMappingRequest : Xcb.Request {
+        [CCode (cname='XCB_GET_MODIFIER_MAPPING')]
+        public const int OPCODE;
+    }
+
+    [CCode (cname = 'xcb_get_modifier_mapping_reply_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class GetModifierMappingReply : Xcb.Reply {
+        [CCode (cname='keycodes_per_modifier')]
+        public uint8 keycodes_per_modifier;
+        [CCode (cname='reply')]
+        public Reply(Connection conn, Cookie cookie, out Xcb.Error *error);
+    }
+
+    [CCode (cname = 'xcb_get_modifier_mapping_cookie_t', cheader_filename='xcb/xproto.h)]
+    public struct GetModifierMappingCookie : Xcb.Cookie {
+        [CCode (cname='0')]
+        [NoArrayLength]
+        public GetModifierMappingCookie (Connection conn);
+        [CCode (cname='')]
+        [NoArrayLength]
+        public GetModifierMappingCookie (Connection conn);
+    }
+
+    [CCode (cname = 'xcb_no_operation_request_t', cheader_filename='xcb/xproto.h, free_function='g_free')]
+    public class NoOperationRequest : Xcb.Request {
+        [CCode (cname='XCB_NO_OPERATION')]
+        public const int OPCODE;
+    }
+
+}
\ No newline at end of file
Index: vapi/packages/xcb/vala-client.xsl
===================================================================
--- vapi/packages/xcb/vala-client.xsl	(revision 0)
+++ vapi/packages/xcb/vala-client.xsl	(revision 0)
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+TODO: Add iterators
+-->
+<xsl:transform extension-element-prefixes="c func help vala"
+	       version="1.0"
+	       xmlns:c="urn:c"
+	       xmlns:func="http://exslt.org/functions"
+	       xmlns:help="urn:help"
+	       xmlns:vala="urn:vala"
+	       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="text" />
+  <xsl:variable name="cheader_filename"
+		select="concat('xcb/', /xcb/@header, '.h')" />
+  <xsl:template match="xcb">
+    <xsl:apply-templates select="xidtype" />
+    <xsl:apply-templates select="xidunion" />
+    <xsl:apply-templates select="enum" />
+    <xsl:apply-templates select="struct" />
+    <xsl:apply-templates select="union" />
+    <xsl:apply-templates select="error" />
+    <xsl:apply-templates select="errorcopy" />
+    <xsl:apply-templates select="event" />
+    <xsl:apply-templates select="eventcopy" />
+    <xsl:apply-templates select="request" />
+  </xsl:template>
+  <xsl:template match="xidtype">
+    <xsl:call-template name="xid" />
+  </xsl:template>
+  <xsl:template match="xidunion">
+    <xsl:call-template name="xid" />
+  </xsl:template>
+  <xsl:template match="enum">
+    <xsl:text>    [CCode (cname = '</xsl:text>
+    <xsl:value-of select="c:type(@name)" />
+    <xsl:text>', cheader_filename = '</xsl:text>
+    <xsl:value-of select="$cheader_filename" />
+    <xsl:text>', cprefix = '</xsl:text>
+    <xsl:value-of select="c:enum-prefix(@name)" />
+    <xsl:text>')]&#10;</xsl:text>
+    <xsl:text>    public enum </xsl:text>
+    <xsl:value-of select="vala:type(@name)" />
+    <xsl:text> {&#10;</xsl:text>
+    <xsl:apply-templates select="item" />
+    <xsl:text>&#10;    }&#10;&#10;</xsl:text>
+  </xsl:template>
+  <xsl:template match="item">
+    <xsl:param name="enum" select="../@name" />
+    <xsl:text>        </xsl:text>
+    <xsl:value-of select="vala:item($enum, @name)" />
+    <xsl:text>,&#10;</xsl:text>
+  </xsl:template>
+  <xsl:template match="item[last()]">
+    <xsl:param name="enum" select="../@name" />
+    <xsl:text>        </xsl:text>
+    <xsl:value-of select="vala:item($enum, @name)" />
+  </xsl:template>
+  <xsl:template match="struct">
+    <xsl:call-template name="struct-head" />
+    <xsl:apply-templates select="*" mode="struct" />
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template match="union">
+    <xsl:call-template name="struct-head" />
+    <xsl:apply-templates select="*" mode="struct" />
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template match="error">
+    <xsl:call-template name="struct-head">
+      <xsl:with-param name="name" select="concat(@name, 'Error')" />
+      <xsl:with-param name="parent" select="'Xcb.Error'" />
+      <xsl:with-param name="class" select="true" />
+    </xsl:call-template>
+    <xsl:call-template name="opcode" />
+    <xsl:apply-templates select="*" mode="struct" />
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template match="errorcopy">
+    <xsl:call-template name="struct-head">
+      <xsl:with-param name="name" select="concat(@name, 'Error')" />
+      <xsl:with-param name="parent" select="'Xcb.Error'" />
+      <xsl:with-param name="class" select="true" />
+    </xsl:call-template>
+    <xsl:call-template name="opcode" />
+    <xsl:variable name="ref" select="@ref" />
+    <xsl:apply-templates select="/xcb/error[@name=$ref]/*" mode="struct">
+      <xsl:with-param name="parent-type" select="@name" />
+    </xsl:apply-templates>
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template match="event">
+    <xsl:call-template name="struct-head">
+      <xsl:with-param name="name" select="concat(@name, 'Event')" />
+      <xsl:with-param name="parent" select="'Xcb.Event'" />
+      <xsl:with-param name="class" select="true" />
+    </xsl:call-template>    
+    <xsl:call-template name="opcode" />
+    <xsl:apply-templates select="*" mode="struct" />
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template match="eventcopy">
+    <xsl:call-template name="struct-head">
+      <xsl:with-param name="name" select="concat(@name, 'Event')" />
+      <xsl:with-param name="parent" select="'Xcb.Event'" />
+      <xsl:with-param name="class" select="true" />
+    </xsl:call-template>
+    <xsl:variable name="ref" select="@ref" />
+    <xsl:call-template name="opcode" />
+    <xsl:apply-templates select="/xcb/event[@name=$ref]/*" mode="struct">
+      <xsl:with-param name="parent-type" select="@name" />
+    </xsl:apply-templates>
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template match="request">
+    <xsl:call-template name="struct-head">
+      <xsl:with-param name="name" select="concat(@name, 'Request')" />
+      <xsl:with-param name="parent" select="'Xcb.Request'" />
+      <xsl:with-param name="class" select="true()" />
+    </xsl:call-template>
+    <xsl:call-template name="opcode" />
+    <xsl:apply-templates select="*" mode="struct" />
+    <xsl:call-template name="struct-tail" />
+    <xsl:if test="boolean(./reply)">
+      <xsl:apply-templates select="reply" />
+      <xsl:call-template name="cookie" />
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="reply">
+    <xsl:call-template name="struct-head">
+      <xsl:with-param name="name" select="concat(../@name, 'Reply')" />
+      <xsl:with-param name="parent" select="'Xcb.Reply'" />
+      <xsl:with-param name="class" select="true()" />
+    </xsl:call-template>
+    <xsl:apply-templates select="*" mode="struct">
+      <xsl:with-param name="include-functions" select="false()" />
+    </xsl:apply-templates>
+    <xsl:text>        [CCode (cname='</xsl:text>
+    <xsl:value-of select="c:method(@name, 'reply')" />
+    <xsl:text>')]&#10;</xsl:text>
+    <xsl:text>        public </xsl:text>
+    <xsl:value-of select="vala:type(concat(@name, 'Reply'))" />
+    <xsl:text>(Connection conn, </xsl:text>
+    <xsl:value-of select="vala:type(concat(@name, 'Cookie'))" />
+    <xsl:text> cookie, out Xcb.Error *error);&#10;</xsl:text>
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <!-- Helper: cookie -->
+  <xsl:template name="cookie">
+    <xsl:call-template name="struct-head">
+      <xsl:with-param name="name" select="concat(@name, 'Cookie')" />
+      <xsl:with-param name="parent" select="'Xcb.Cookie'" />
+    </xsl:call-template>
+    <xsl:call-template name="cookie-cst" />
+    <xsl:call-template name="cookie-cst">
+      <xsl:with-param name="ext" select="unchecked" />
+    </xsl:call-template>
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template name="cookie-cst">
+    <xsl:param name="name" select="concat(@name, 'Cookie')" />
+    <xsl:param name="ext" select="false()" />
+    <xsl:text>        [CCode (cname='</xsl:text>
+    <xsl:value-of select="c:method(../@name, $ext)" />
+    <xsl:text>')]&#10;</xsl:text>
+    <!-- TODO: More advance handling array length -->
+    <xsl:text>        [NoArrayLength]&#10;</xsl:text>
+    <xsl:text>        public </xsl:text>
+    <xsl:value-of select="vala:type($name)" />
+    <xsl:if test="$ext">
+      <xsl.text>.</xsl.text>
+      <xsl:value-of select="$ext" />
+    </xsl:if>
+    <xsl:text> (Connection conn</xsl:text>
+    <xsl:apply-templates select="*" mode="function" />
+    <xsl:text>);&#10;</xsl:text>    
+  </xsl:template>
+  <!-- Mode: function -->
+  <xsl:template match="field" mode="function">
+    <xsl:param name="name" select="@name" />
+    <xsl:param name="type" select="@type" />
+    <xsl:param name="vtype" select="vala:type($type)" />
+    <xsl:param name="vname" select="vala:field($type, $name)" />
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$vtype" />
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$vname" />
+  </xsl:template>
+  <xsl:template match="pad" mode="function" />
+  <xsl:template match="list" mode="function">
+    <xsl:param name="name" select="@name" />
+    <xsl:param name="type" select="@type" />
+    <xsl:param name="vtype" select="vala:type($type)" />
+    <xsl:param name="vname" select="vala:field($type, $name)" />
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="$vtype" />
+    <xsl:text>[] </xsl:text>
+    <xsl:value-of select="$vname" />
+  </xsl:template>
+  <xsl:template match="exprfield" mode="function" />
+  <xsl:template match="valueparam" mode="function">
+    <xsl:value-of select="@value-mask-type" />
+    <xsl:text>, </xsl:text>
+    <xsl:value-of select="@value-mask-name" />
+    <xsl:text>, </xsl:text>
+    <xsl:text>uint32[] </xsl:text>
+    <xsl:value-of select="@value-list-name" />
+  </xsl:template>
+  <xsl:template match="reply" mode="function" />
+  <!-- Mode: struct -->
+  <xsl:template name="field" match="field" mode="struct">
+    <xsl:param name="name" select="@name" />
+    <xsl:param name="type" select="@type" />
+    <xsl:param name="cname" select="c:field($name)" />
+    <xsl:param name="vtype" select="vala:type($type)" />
+    <xsl:param name="vname" select="vala:field($type, $name)" />
+    <xsl:text>        [CCode (cname='</xsl:text>
+    <xsl:value-of select="$cname" />
+    <xsl:text>')]&#10;</xsl:text>
+    <xsl:text>        public </xsl:text>
+    <xsl:value-of select="$vtype" />
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$vname" />
+    <xsl:text>;&#10;</xsl:text>
+  </xsl:template>
+  <xsl:template match="pad" mode="struct" />
+  <xsl:template match="list" mode="struct">
+    <xsl:param name="parent-type" select="../@name" />
+    <xsl:param name="parent-ctype" select="c:type($parent-type)" />
+    <xsl:param name="parent-vtype" select="vala:type($parent-type)" />
+    <xsl:param name="include-functions" select="true()" />
+    <xsl:choose>
+      <xsl:when test="value">
+	<xsl:text>        [CCode (cname='</xsl:text>
+	<xsl:value-of select="c:field(@name)" />
+	<xsl:text>')]&#10;</xsl:text>
+	<xsl:text>        public </xsl:text>
+	<xsl:value-of select="vala:type(@type)" />
+	<xsl:text>[] </xsl:text>
+	<xsl:value-of select="vala:field(@type, @name)" />
+	<xsl:text>;&#10;</xsl:text>
+      </xsl:when>
+      <xsl:otherwise> <!-- bit or fieldref -->
+	<xsl:if test="$include-functions">
+	  <xsl:text>        [CCode (cname='</xsl:text>
+	  <xsl:value-of select="c:method($parent-ctype, @name)" />
+	  <xsl:text>)]&#10;</xsl:text>
+	  <xsl:text>        public </xsl:text>
+	  <xsl:value-of select="vala:type(@type)" />
+	  <xsl:text>[] </xsl:text>
+	  <xsl:value-of select="vala:method($parent-vtype, @name)" />
+	  <xsl:text>();&#10;</xsl:text>
+	  <xsl:text>        [CCode (cname='</xsl:text>
+	  <xsl:value-of
+	      select="c:method($parent-ctype, concat(@name, '_length'))" />
+	  <xsl:text>)]&#10;</xsl:text>
+	  <xsl:text>        public int </xsl:text>
+	  <xsl:value-of
+	      select="vala:method($parent-vtype, concat(@name, '_length'))" />
+	  <xsl:text>();&#10;</xsl:text>
+	</xsl:if>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="exprfield" mode="struct">
+    <xsl:call-template name="field" />
+  </xsl:template>
+  <xsl:template match="valueparam" mode="struct">
+    <xsl:call-template name="field">
+      <xsl:with-param name="name" select="@value-mask-name" />
+      <xsl:with-param name="type" select="@value-mask-type" />
+    </xsl:call-template>
+  </xsl:template>
+  <xsl:template match="reply" mode="struct" />
+  <!-- Helper templates -->
+  <xsl:template name="xid">
+    <xsl:variable name="name" select="@name" />
+    <xsl:call-template name="struct-head">
+      <xsl:with-param
+	  name="parent"
+	  select="help:or(vala:type(/xcb/xidunion[type/text()=$name]/@name),
+		          'Xid')" />
+    </xsl:call-template>
+    <xsl:text>        [CCode (cname = "xcb_generate_id", </xsl:text>
+    <xsl:text>cheader_filename='xcb/xcb.h')]&#10;</xsl:text>
+    <xsl:text>        public </xsl:text>
+    <xsl:value-of select="vala:type(@name)" />
+    <xsl:text>();&#10;</xsl:text>
+    <xsl:call-template name="struct-tail" />
+  </xsl:template>
+  <xsl:template name="struct-head">
+    <xsl:param name="name" select="@name" />
+    <xsl:param name="cname" select="c:type($name)" />
+    <xsl:param name="vname" select="vala:type($name)" />
+    <xsl:param name="class" select="false()" />
+    <xsl:param name="parent" select="false()" />
+    <xsl:text>    [CCode (cname = '</xsl:text>
+    <xsl:value-of select="$cname" />
+    <xsl:text>', cheader_filename='</xsl:text>
+    <xsl:value-of select="$cheader_filename" />
+    <xsl:if test="$class">
+      <xsl:text>, free_function='g_free'</xsl:text>
+    </xsl:if>
+    <xsl:text>)]&#10;</xsl:text>
+    <xsl:text>    public </xsl:text>
+    <xsl:choose>
+      <xsl:when test="$class">
+	<xsl:text>class </xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+	<xsl:text>struct </xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:value-of select="$vname" />
+    <xsl:if test="$parent">
+      <xsl:text> : </xsl:text>
+      <xsl:value-of select="$parent" />
+    </xsl:if>
+    <xsl:text> {&#10;</xsl:text>
+  </xsl:template>
+  <xsl:template name="opcode">
+    <xsl:param name="cmacro" select="c:type-macro(@name)" />
+    <xsl:text>        [CCode (cname='</xsl:text>
+    <xsl:value-of select="$cmacro" />
+    <xsl:text>')]&#10;</xsl:text>
+    <xsl:text>        public const int OPCODE;&#10;</xsl:text>
+  </xsl:template>
+  <xsl:template name="struct-tail">
+    <xsl:text>    }&#10;&#10;</xsl:text>
+  </xsl:template>
+  <!-- Help functions - those which are suppose to be in standard -->
+  <func:function name="help:or">
+    <xsl:param name="a" />
+    <xsl:param name="b" />
+    <xsl:choose>
+      <xsl:when test="$a">
+	<func:result><xsl:value-of select="$a" /></func:result>
+      </xsl:when>
+      <xsl:otherwise>
+	<func:result><xsl:value-of select="$b" /></func:result>
+      </xsl:otherwise>
+    </xsl:choose>
+  </func:function>
+</xsl:transform>
Index: vapi/packages/xcb/xcbproc.sh
===================================================================
--- vapi/packages/xcb/xcbproc.sh	(revision 0)
+++ vapi/packages/xcb/xcbproc.sh	(revision 0)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+(cd `dirname $0` && perl xcbproc.pl $@ > ../../xcb.vapi)
Index: vapi/packages/xcb/xcb.xsd
===================================================================
--- vapi/packages/xcb/xcb.xsd	(revision 0)
+++ vapi/packages/xcb/xcb.xsd	(revision 0)
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2004 Josh Triplett.  All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the names of the authors or their
+institutions shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from the authors.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+  <!-- The root element -->
+  <xsd:element name="xcb">
+    <xsd:complexType>
+      <xsd:group ref="macro" minOccurs="0" maxOccurs="unbounded" />
+      <xsd:attribute name="header" type="xsd:string" use="required" />
+      <xsd:attribute name="extension-xname" type="xsd:string" use="optional" />
+      <xsd:attribute name="extension-name"  type="xsd:string" use="optional" />
+      <xsd:attribute name="extension-multiword" type="xsd:boolean" use="optional" default="false" />
+      <xsd:attribute name="major-version"   type="xsd:integer" use="optional" />
+      <xsd:attribute name="minor-version"   type="xsd:integer" use="optional" />
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- Padding -->
+  <xsd:element name="pad">
+    <xsd:complexType>
+      <xsd:attribute name="bytes" type="xsd:integer" use="required" />
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- Type for fields or parameters with attributes "name" and "type" -->
+  <xsd:complexType name="var">
+    <xsd:attribute name="name" type="xsd:string" use="required" />
+    <xsd:attribute name="type" type="xsd:string" use="required" />
+  </xsd:complexType>
+
+  <!-- field replaces FIELD, PARAM, and REPLY. -->
+  <xsd:element name="field" type="var" />
+
+  <!-- list replaces ARRAYFIELD, LISTPARAM, and ARRAYREPLY.  The name and type
+       are specified as attributes.  The content is an expression giving the
+       length. -->
+  <xsd:element name="list">
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="var">
+          <xsd:group ref="expression" minOccurs="0" maxOccurs="1" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- Expressions -->
+  <xsd:group name="expression">
+    <xsd:choice>
+      <xsd:element name="op">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:group ref="expression" />
+            <xsd:group ref="expression" />
+          </xsd:sequence>
+          <xsd:attribute name="op" use="required">
+            <xsd:simpleType>
+              <xsd:restriction base="xsd:string">
+                <xsd:pattern value="\+|-|\*|/|&amp;|&lt;&lt;" />
+              </xsd:restriction>
+            </xsd:simpleType>
+          </xsd:attribute>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="fieldref" type="xsd:string" />
+      <xsd:element name="value" type="dec-or-hex-integer" />
+      <xsd:element name="bit" type="xsd:integer" />
+    </xsd:choice>
+  </xsd:group>
+  
+  <!-- Fields in requests that are calculated from other information, not
+       supplied by the caller. -->
+  <xsd:element name="exprfield" >
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="var">
+          <xsd:group ref="expression" />
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <!-- BITMASK/LISTofVALUE parameter pairs. -->
+  <xsd:element name="valueparam">
+    <xsd:complexType>
+      <xsd:attribute name="value-mask-type" type="xsd:string" use="required" />
+      <xsd:attribute name="value-mask-name" type="xsd:string" use="required" />
+      <xsd:attribute name="value-list-name" type="xsd:string" use="required" />
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:group name="fields">
+    <xsd:choice>
+      <xsd:element ref="pad" />
+      <xsd:element ref="field" />
+      <xsd:element ref="list" />
+    </xsd:choice>
+  </xsd:group>
+
+  <!-- Type for a structure -->
+  <xsd:complexType name="struct">
+    <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
+    <xsd:attribute name="name" type="xsd:string" use="required" />
+  </xsd:complexType>
+
+  <!-- Type for a packet structure -->
+  <xsd:complexType name="packet-struct">
+    <xsd:group ref="fields" minOccurs="0" maxOccurs="unbounded" />
+    <xsd:attribute name="name" type="xsd:string" use="required" />
+    <xsd:attribute name="number" type="xsd:integer" use="required" />
+  </xsd:complexType>
+
+  <!-- Type for a packet structure copy -->
+  <xsd:complexType name="packet-struct-copy">
+    <xsd:attribute name="name" type="xsd:string" use="required" />
+    <xsd:attribute name="number" type="xsd:integer" use="required" />
+    <xsd:attribute name="ref" type="xsd:string" use="required" />
+  </xsd:complexType>
+
+  <!-- Type for hex integers -->
+  <xsd:simpleType name="hex-integer">
+    <xsd:restriction base="xsd:string">
+      <xsd:pattern value="0x[0-9a-fA-F]+" />
+    </xsd:restriction>
+  </xsd:simpleType>
+
+  <!-- Type for integers in either decimal or hex -->
+  <xsd:simpleType name="dec-or-hex-integer">
+    <xsd:union memberTypes="xsd:integer hex-integer" />
+  </xsd:simpleType>
+
+  <xsd:group name="macro">
+    <xsd:choice>
+      <xsd:element name="request">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:choice minOccurs="0" maxOccurs="unbounded">
+              <xsd:group ref="fields" />
+              <xsd:element ref="exprfield" />
+              <xsd:element ref="valueparam" />
+            </xsd:choice>
+            <xsd:element name="reply" minOccurs="0" maxOccurs="1">
+              <xsd:complexType>
+                <xsd:choice minOccurs="1" maxOccurs="unbounded">
+                  <xsd:group ref="fields" />
+                  <xsd:element ref="valueparam" />
+                </xsd:choice>
+              </xsd:complexType>
+            </xsd:element>
+          </xsd:sequence>
+          <xsd:attribute name="name" type="xsd:string" use="required" />
+          <xsd:attribute name="opcode" type="xsd:integer" use="required" />
+          <xsd:attribute name="combine-adjacent" type="xsd:boolean"
+                         use="optional"/>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="event">
+        <xsd:complexType>
+          <xsd:complexContent>
+            <xsd:extension base="packet-struct">
+              <xsd:attribute name="no-sequence-number" type="xsd:boolean"
+                             use="optional" />
+            </xsd:extension>
+          </xsd:complexContent>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="eventcopy" type="packet-struct-copy" />
+      <xsd:element name="error" type="packet-struct" />
+      <xsd:element name="errorcopy" type="packet-struct-copy" />
+      <xsd:element name="struct" type="struct" />
+      <xsd:element name="union" type="struct" />
+      <xsd:element name="xidtype">
+        <xsd:complexType>
+          <xsd:attribute name="name" type="xsd:string" use="required" />
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="xidunion">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="type" type="xsd:string"
+                         minOccurs="1" maxOccurs="unbounded" />
+          </xsd:sequence>
+          <xsd:attribute name="name" type="xsd:string" use="required" />
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="enum">
+        <xsd:complexType>
+          <xsd:sequence minOccurs="1" maxOccurs="unbounded">
+            <xsd:element name="item">
+              <xsd:complexType>
+                <xsd:group ref="expression" minOccurs="0" maxOccurs="1" />
+                <xsd:attribute name="name" type="xsd:string" use="required" />
+              </xsd:complexType>
+            </xsd:element>
+          </xsd:sequence>
+          <xsd:attribute name="name" type="xsd:string" use="required" />
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="typedef">
+        <xsd:complexType>
+          <xsd:attribute name="oldname" type="xsd:string" use="required" />
+          <xsd:attribute name="newname" type="xsd:string" use="required" />
+        </xsd:complexType>
+      </xsd:element>
+      <!-- The import element allows a protocol description to reference the
+           declarations of another protocol description. -->
+      <xsd:element name="import" type="xsd:string" />
+    </xsd:choice>
+  </xsd:group>
+</xsd:schema>
Index: vapi/packages/xcb/xcb.head.vapi
===================================================================
--- vapi/packages/xcb/xcb.head.vapi	(revision 0)
+++ vapi/packages/xcb/xcb.head.vapi	(revision 0)
@@ -0,0 +1,164 @@
+#Only to make a mixins
+namespace XLib {
+    [CCode (cname = "Display", cheader_filename = "X11/Xlib.h")]
+    public class Display {
+        [CCode (cname = "XSetEventQueueOwner")]
+        set_event_queue_owner (EventQueueOwner owner);
+    };
+    
+    [CCode (cname = "XEventQueueOwner", cheader_filename = "X11/Xlib-xcb.h")]
+    public enum EventQueueOwner {
+        [CCode (cname = "XlibOwnsEventQueue")]
+        XLIB,
+        [CCode (cname = "XCBOwnsEventQueue")]
+        XCB
+    }
+}
+
+namespace Xcb {
+    [CCode (cheader_filename = "xcb/xcb.h")]
+    public static class Protocol {
+        [CCode (cname = "X_PROTOCOL") ]
+        public const uint VERSION;
+        [CCode (cname = "X_PROTOCOL_REVISION", cheader_filename
+        public const uint REVISION;
+    }
+    
+    [CCode (cname = "X_TCP_PORT", cheader_filename = "xcb/xcb.h")]
+    public const uint16 TCP_PORT;
+    
+    [CCode (cname = "xcb_generic_iterator_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Iterator<T> {
+        public T data;
+        [CCode (cname = "rem")]
+        public int remaining;
+        public int index;
+    }
+    
+    [CCode (cname = "xcb_generic_reply_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Reply {
+        public uint8 response_type;
+        public uint16 sequence;
+        public uint32 length;
+    }
+    
+    [CCode (cname = "xcb_generic_event_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Event {
+        public uint8 response_type;
+        public uint16 sequence;
+        public uint32 full_sequence;
+    }
+    
+    [CCode (cname = "xcb_generic_error_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Error {
+        public uint8 response_type;
+        public uint8 error_code;
+        public uint32 full_sequence;
+    }
+    
+    [CCode (cname = "void")]
+    public class Request { }
+    
+    [CCode (cname = "xcb_void_cookie_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Cookie {
+        public uint sequence;
+        [CCode (cname = "xcb_request_check", instance_pos = 1.5)]
+        public Error check_request (Connection connection);
+    }
+    
+    [CCode (cname = "XCB_NONE", cheader_filename = "xcb/xcb.h")]
+    public const long NONE;
+    
+    [CCode (cname = "XCB_COPY_FROM_PARENT", cheader_filename = "xcb/xcb.h")]
+    public const long COPY_FROM_PARENT;
+    
+    [CCode (cname = "XCB_CURRENT_TIME", cheader_filename = "xcb/xcb.h")]
+    public const long CURRENT_TIME;
+    
+    [CCode (cname = "XCB_NO_SYMBOL", cheader_filename = "xcb/xcb.h")]
+    public const long NO_SYMBOL;
+    
+    [CCode (cname = "xcb_auth_info_t", cheader_filename = "xcb/xcb.h")]
+    public struct AuthInfo {
+        [CCode (cname = "namelen")]
+        public int name_length;
+        public string name;
+        [CCode (cname = "datalen")]
+        public int data_length;
+        public pointer data;
+    }
+    
+    [CCode (cname = "xcb_connection_t", cheader_filename = "xcb/xcb.h,xcb/xcbxlib.h", free_function = "xcb_disconnect")]
+    public class Connection {
+        [CCode (cname = "xcb_flush")]
+        public int flush ();
+        [CCode (cname = "xcb_get_maximum_request_length")]
+        public uint32 get_maximum_request_length ();
+        [CCode (cname = "xcb_prefetch_maximum_request_length")]
+        public void prefetch_maximum_request_length ();
+        [CCode (cname = "xcb_wait_for_event")]
+        public Event wait_for_event ();
+        [CCode (cname = "xcb_pool_for_event")]
+        public Event pool_for_event ();
+        [CCode (cname = "xcb_get_setup")]
+        public const Setup get_setup ();
+        [CCode (cname = "xcb_get_file_descriptor")]
+        public int get_fd ();
+        [CCode (cname = "xcb_connection_has_error")]
+        public bool has_error();
+        [CCode (cname = "xcb_connect_to_fd")]
+        public Connection.to_fd (int fd, AuthInfo *auth_info);
+        [CCode (cname = "xcb_connect")]
+        public Connection (const string displayname, int *screenp);
+        [CCode (cname = "xcb_connect_to_display_with_auth_info")]
+        public Connection.to_display_with_auth_info (const string display, AuthInfo *auth_info, int *screen);
+        [CCode (cname = "xcb_generate_id")]
+        public Xid generate_xid();
+        [CCode (cname = "xcb_get_request_sent")
+        public Request get_request_sent();
+        [CCode (cname = "xcb_xlib_lock")]
+        public void xlib_lock();
+        [CCode (cname = "xcb_xlib_unlock")]
+        public void xlib_unlock();
+        [CCode (cname = "xcb_wait_for_reply", cheader_filename = "xcb/xcbext.h", instance_pos = 1.5)]
+        public Reply wait_for_reply (Connection conn, out Error err);
+        [CCode (cname = "xcb_poll_for_reply", cheader_filename = "xcb/xcbext.h", instance_pos = 1.5)]
+        public bool pool_for_reply (Connection conn, out Reply reply, out Error err);
+        [CCode (cname = "XGetXCBConnection", cheader_filename = "X11/Xlib-xcb.h")]
+        public Connection.from_display (XLib.Display display);
+    }
+    
+    [CCode (cname = "xcb_extension_t", cheader_filename = "xcb/xcb.h,xcb/xcbext.h", free_function = "g_free")]
+    public class Extenstion {
+        public const string name;
+        public int global_id;
+        [CCode (cname = "xcb_get_extension_data", instance_pos = -1)]
+        public QueryExtensionReply get_data (Connection conn);
+        [CCode (cname = "xcb_prefetch_extension_data", instance_pos = -1)]
+        public void prefetch_data (Connection conn);
+    }
+    
+    [CCode (cname = "xcb_parse_display", cheader_filename = "xcb/xcb.h")]
+    public bool parse_display(const string name, string *host, int *display, int *screen);
+
+    [CCode (cname = "xcb_protocol_request_t", cheader_filename = "xcb/xcbext.h")]
+    public class ProtocolRequest {
+        public size_t count;
+        public Extenstion extension;
+        public uint8 opcode;
+        [CCode (cname = "isvoid")]
+        public uint8 is_void;
+        [CCode (cname = "xcb_send_request", instance_pos = -1)]
+        public Request send (Connection conn, SendRequestFlags flags, pointer /*struct iovec*/ vect);
+    }
+    
+    [CCode (cname = "enum xcb_send_request_flags_t", cheader_filename = "xcb/xcbext.h", cprefix = "XCB_REQUEST_")]
+    public enum SendRequestFlags {
+        CHECKED,
+        RAW,
+        DISCARD_REPLY
+    }
+    
+    [CCode (cname = "xcb_popcount", cheader_filename = "xcb/xcbext.h")]
+    public int popcount(uint32 mask);
+
Index: vapi/packages/xcb/xcbproc.pl
===================================================================
--- vapi/packages/xcb/xcbproc.pl	(revision 0)
+++ vapi/packages/xcb/xcbproc.pl	(revision 0)
@@ -0,0 +1,139 @@
+#!/usr/bin/env perl
+
+use XML::LibXSLT;
+use XML::LibXML;
+
+$XML::LibXSLT::USE_LIBXML_DATA_TYPES = true;
+
+my $parser = XML::LibXML->new();
+my $xslt = XML::LibXSLT->new();
+
+my %vala_types = (
+    'BOOL' => 'bool', 'BYTE' => 'uint8',
+    'CARD8' => 'uint8', 'CARD16' =>'uint16', 'CARD32' =>'uint32',
+    'INT8' => 'int8', 'INT16' => 'int16', 'INT32' => 'int32',
+    'char' => 'char', 'void' => 'void',
+    'float' => 'float', 'double' => 'double',
+    'GCONTEXT' => 'GC', 'VISUALID' => 'VisualID', 'KB' => 'KB'
+    );
+
+my %vala_fields = ();
+my %vala_items = (
+    'ModMask' => {'1' => 'MOD_1', '2' => 'MOD_2', '3' => 'MOD_3',
+		  '4' => 'MOD_4', '5' => 'MOD_5'},
+    'ButtonMask' => {'1' => 'BUTTON_1', '2' => 'BUTTON_2', '3' => 'BUTTON_3',
+		     '4' => 'BUTTON_4', '5' => 'BUTTON_5'},
+    'MapIndex' => {'1' => 'INDEX_1','2' =>'INDEX_2', '3'=> 'INDEX_3',
+		   '4' => 'INDEX_4','5' =>'INDEX_5'},
+    'ButtonIndex' => {'1' => 'BUTTON_1', '2' => 'BUTTON_2', '3' => 'BUTTON_3',
+		      '4' => 'BUTTON_4', '5' => 'BUTTON_5'}
+    );
+my %vala_methods = ();
+
+$vala_type = sub {
+    my $name = shift;
+    if($vala_types{$name}) {
+	return $vala_types{$name};
+    } elsif($name =~ /^[A-Z]([A-Z0-9])*$/) {
+	$name =~ s/^([A-Z])([A-Z0-9]*)$/$1\L$2\E/g;
+	return $name;
+    } else {
+	return $name;
+    }
+};
+
+$vala_field = sub {
+    my $type = shift;
+    my $name = shift;
+    if($vala_types{$type} && $vala_types{$type}{$name}) {
+	return $vala_types{$type}{$name};
+    } else {
+	return $name;
+    }
+};
+
+$vala_item = sub {
+    my $enum = shift;
+    my $name = shift;
+    if($vala_items{$enum} && $vala_items{$enum}{$name}) {
+	return $vala_items{$enum}{$name};
+    } else {
+	$name =~ s/(.)([A-Z0-9]+)/$1_$2/g;
+	$name =~ s/^(.*)$/\U$1\E/g;
+	return $name;
+    }
+};
+
+$vala_method = sub {
+    my $type = shift;
+    my $name = shift;
+    if($vala_methods{$type} && $vala_methods{$type}{$name}) {
+	return $vala_methods{$type}{$name};
+    } else {
+	return $name;
+    }
+};
+
+XML::LibXSLT->register_function("urn:vala", "type", $vala_type);
+XML::LibXSLT->register_function("urn:vala", "field", $vala_field);
+XML::LibXSLT->register_function("urn:vala", "item", $vala_item);
+XML::LibXSLT->register_function("urn:vala", "method", $vala_method);
+
+$c_type = sub {
+    my $type = shift;
+    if($type =~ /^[A-Z]([A-Z]*)$/) {
+	$type =~ s/^([A-Z]+)/\L$1\E/g;
+	return 'xcb_' . $type . '_t';
+    } else {
+	$type =~ s/([A-Z])/_\L$1\E/g;
+	return 'xcb' . $type . '_t';
+    }
+};
+
+$c_type_macro = sub {
+    my $type = shift;
+    $type =~ s/([A-Z0-9]+)/_$1/g;
+    $type =~ s/^(.*)$/\U$1\E/g;
+    return 'XCB' . $type;
+};
+
+$c_enum_prefix = sub {
+    my $type = shift;
+    $type =~ s/([A-Z])/_$1/g;
+    $type =~ s/^(.*)$/\U$1\E/g;
+    return 'XCB' . $type . '_';
+};
+
+$c_field = sub {
+    my $name = shift;
+    return $name;
+};
+
+$c_method = sub {
+    my $type = shift;
+    my $name = shift;
+    $type =~ s/([A-Z0-9]+)/_$1/g;
+    $type =~ s/^(.*)$/\L$1\E/g;
+    return $type . $name;
+};
+
+XML::LibXSLT->register_function("urn:c", "type", $c_type);
+XML::LibXSLT->register_function("urn:c", "type-macro", $c_type_macro);
+XML::LibXSLT->register_function("urn:c", "enum-prefix", $c_enum_prefix);
+XML::LibXSLT->register_function("urn:c", "field", $c_field);
+XML::LibXSLT->register_function("urn:c", "method", $c_method);
+
+my $stylesheet = $xslt->parse_stylesheet_file('vala-client.xsl');
+
+open(my $in, "<", "xcb.head.vapi");
+while(<$in>) {
+    print $_;
+}
+close($in);
+
+foreach(@ARGV) {
+    my $result = $stylesheet->transform_file($_);
+    print $stylesheet->output_string($result);
+}
+
+print "}";
Index: vapi/packages/xcb/xcb.vapi
===================================================================
--- vapi/packages/xcb/xcb.vapi	(revision 0)
+++ vapi/packages/xcb/xcb.vapi	(revision 0)
@@ -0,0 +1,144 @@
+namespace Xcb {
+    [CCode (cheader_filename = "xcb/xcb.h")]
+    public static class Protocol {
+        [CCode (cname = "X_PROTOCOL") ]
+        public const uint VERSION;
+        [CCode (cname = "X_PROTOCOL_REVISION", cheader_filename
+        public const uint REVISION;
+    }
+    
+    [CCode (cheader_filename = "xcb/xcb.h")]
+    public const uint16 TCP_PORT;
+    
+    [CCode (cname = "xcb_generic_iterator_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Iterator<T> {
+        public T data;
+        [CCode (cname = "rem")]
+        public int remaining;
+        public int index;
+    }
+    
+    [CCode (cname = "xcb_generic_reply_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Reply {
+        public uint8 response_type;
+        public uint16 sequence;
+        public uint32 length;
+    }
+    
+    [CCode (cname = "xcb_generic_error_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Error {
+        public uint8 response_type;
+        public uint8 error_code;
+        public uint32 full_sequence;
+    }
+    
+    public class Request {
+        [CCode (cname = "major_opcode")]
+        public uint8 opcode;
+        public uint16 length;
+    }
+    
+    [CCode (cname = "xcb_void_cookie_t", cheader_filename = "xcb/xcb.h", free_function = "g_free")]
+    public class Cookie {
+        public uint sequence;
+        [CCode (cname = "xcb_request_check", instance_pos = 1.5)]
+        public Error check_request (Connection connection);
+    }
+    
+    [CCode (cname = "XCB_NONE", cheader_filename = "xcb/xcb.h")]
+    public const long NONE;
+    
+    [CCode (cname = "XCB_COPY_FROM_PARENT", cheader_filename = "xcb/xcb.h")]
+    public const long COPY_FROM_PARENT;
+    
+    [CCode (cname = "XCB_CURRENT_TIME", cheader_filename = "xcb/xcb.h")]
+    public const long CURRENT_TIME;
+    
+    [CCode (cname = "XCB_NO_SYMBOL", cheader_filename = "xcb/xcb.h")]
+    public const long NO_SYMBOL;
+    
+    [CCode (cname = "xcb_auth_info_t", cheader_filename = "xcb/xcb.h")]
+    public struct AuthInfo {
+        [CCode (cname = "namelen")]
+        public int name_length;
+        public string name;
+        [CCode (cname = "datalen")]
+        public int data_length;
+        public pointer data;
+    }
+    
+    [CCode (cname = "xcb_connection_t", cheader_filename = "xcb/xcb.h,xcb/xcbxlib.h", free_function = "xcb_disconnect")]
+    public class Connection {
+        [CCode (cname = "xcb_flush")]
+        public int flush ();
+        [CCode (cname = "xcb_get_maximum_request_length")]
+        public uint32 get_maximum_request_length ();
+        [CCode (cname = "xcb_prefetch_maximum_request_length")]
+        public void prefetch_maximum_request_length ();
+        [CCode (cname = "xcb_wait_for_event")]
+        public Event wait_for_event ();
+        [CCode (cname = "xcb_pool_for_event")]
+        public Event pool_for_event ();
+        [CCode (cname = "xcb_get_setup")]
+        public const Setup get_setup ();
+        [CCode (cname = "xcb_get_file_descriptor")]
+        public int get_fd ();
+        [CCode (cname = "xcb_connection_has_error")]
+        public bool has_error();
+        [CCode (cname = "xcb_connect_to_fd")]
+        public Connection.to_fd (int fd, AuthInfo *auth_info);
+        [CCode (cname = "xcb_connect")]
+        public Connection (const string displayname, int *screenp);
+        [CCode (cname = "xcb_connect_to_display_with_auth_info")]
+        public Connection.to_display_with_auth_info (const string display, AuthInfo *auth_info, int *screen);
+        [CCode (cname = "xcb_generate_id")]
+        public Xid generate_xid();
+        [CCode (cname = "xcb_get_request_sent")
+        public Request get_request_sent();
+        [CCode (cname = "xcb_xlib_lock")]
+        public void xlib_lock();
+        [CCode (cname = "xcb_xlib_unlock")]
+        public void xlib_unlock();
+    }
+    
+    [CCode (cname = "xcb_extension_t", cheader_filename = "xcb/xcb.h,xcb/xcbext.h", free_function = "g_free")]
+    public class Extenstion {
+        public const string name;
+        public int global_id;
+        [CCode (cname = "xcb_get_extension_data", instance_pos = -1)]
+        public QueryExtensionReply get_data (Connection conn);
+        [CCode (cname = "xcb_prefetch_extension_data", instance_pos = -1)]
+        public void prefetch_data (Connection conn);
+    }
+    
+    [CCode (cname = "xcb_parse_display", cheader_filename = "xcb/xcb.h")]
+    public bool parse_display(const string name, string *host, int *display, int *screen);
+
+    [CCode (cname = "xcb_protocol_request_t", cheader_filename = "xcb/xcbext.h")]
+    public class ProtocolRequest {
+        public size_t count;
+        public Extenstion extension;
+        public uint8 opcode;
+        [CCode (cname = "isvoid")]
+        public uint8 is_void;
+        [CCode (cname = "xcb_send_request", instance_pos = -1)]
+        public Request send (Connection conn, SendRequestFlags flags, pointer /*struct iovec*/ vect);
+    }
+    
+    public struct Request : uint {
+        [CCode (cname = "xcb_wait_for_reply", cheader_filename = "xcb/xcbext.h", instance_pos = 1.5)]
+        public wait_for_reply (Connection conn, out Error err);
+        [CCode (cname = "xcb_poll_for_reply", cheader_filename = "xcb/xcbext.h", instance_pos = 1.5)]
+        public pool_for_reply (Connection conn, out 
+    };
+    
+    [CCode (cname = "enum xcb_send_request_flags_t", cheader_filename = "xcb/xcbext.h", cprefix = "XCB_REQUEST_")]
+    public enum SendRequestFlags {
+        CHECKED,
+        RAW,
+        DISCARD_REPLY
+    }
+    
+    [CCode (cname = "xcb_popcount", cheader_filename = "xcb/xcbext.h")]
+    public int popcount(uint32 mask);
+}
Index: vapi/packages/xcb/xcb-test.xsl
===================================================================
--- vapi/packages/xcb/xcb-test.xsl	(revision 0)
+++ vapi/packages/xcb/xcb-test.xsl	(revision 0)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:transform extension-element-prefixes="c vala"
+	       version="1.0"
+	       xmlns:c="http://www.vala-project.org/xcb/c"
+	       xmlns:vala="http://www.vala-project.org/xcb/vala"
+	       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:output method="text" />
+  <xsl:template match="xcb">
+    <xsl:value-of select="vala:type('WINDOW')" />,
+    <xsl:value-of select="vala:type('WindowEvent')" />,
+    <xsl:value-of select="vala:item('Test1', 'ItemTest')" />
+  </xsl:template>
+</xsl:transform>
