1/* xcb.vapi
2 *
3 * Copyright (C) 2009  Jürg Billeter
4 * Copyright (C) 2013  Sergio Costas
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
19 *
20 * Authors:
21 * 	Jürg Billeter <j@bitron.ch>
22 *  Sergio Costas <raster@rastersoft.com>
23 */
24
25[Version (deprecated_since = "vala-0.26", replacement = "bindings distributed with vala-extra-vapis")]
26[CCode (lower_case_cprefix = "xcb_", cheader_filename = "xcb/xcb.h,xcb/xproto.h")]
27namespace Xcb {
28	[Compact]
29	[CCode (cname = "xcb_connection_t", cprefix = "xcb_", ref_function = "", unref_function = "xcb_disconnect")]
30	public class Connection {
31		[CCode (cname = "xcb_connect")]
32		public Connection (string? display = null, out int screen = null);
33		[CCode (cname = "xcb_connection_has_error")]
34		public int has_error ();
35
36		public void flush ();
37		public uint32 generate_id ();
38		public Setup get_setup ();
39		public GenericEvent wait_for_event ();
40		public GenericEvent poll_for_event ();
41		public int get_file_descriptor ();
42		public Xcb.GenericError? request_check (Xcb.VoidCookie cookie);
43
44		public VoidCookie create_window (uint8 depth, Window wid, Window parent, int16 x, int16 y, uint16 width, uint16 height, uint16 border_width, uint16 _class, VisualID visual, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
45		public VoidCookie create_window_checked (uint8 depth, Window wid, Window parent, int16 x, int16 y, uint16 width, uint16 height, uint16 border_width, uint16 _class, VisualID visual, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
46
47		public VoidCookie destroy_window_checked (Window window);
48		public VoidCookie destroy_window (Window window);
49
50		public VoidCookie destroy_subwindows_checked (Window window);
51		public VoidCookie destroy_subwindows (Window window);
52
53		public VoidCookie change_save_set_checked (SetMode mode, Window window);
54		public VoidCookie change_save_set (SetMode mode, Window window);
55
56		public VoidCookie map_window (Window wid);
57		public VoidCookie map_window_checked (Window wid);
58
59		public VoidCookie map_subwindows_checked (Window window);
60		public VoidCookie map_subwindows (Window window);
61
62		public VoidCookie unmap_window (Window wid);
63		public VoidCookie unmap_window_checked (Window wid);
64
65		public VoidCookie unmap_subwindows_checked (Window window);
66		public VoidCookie unmap_subwindows (Window window);
67
68		public VoidCookie circulate_window_checked (Circulate direction, Window window);
69		public VoidCookie circulate_window (Circulate direction, Window window);
70
71		public GetWindowAttributesCookie get_window_attributes (Window wid);
72		public GetWindowAttributesCookie get_window_attributes_unchecked (Window wid);
73		public GetWindowAttributesReply? get_window_attributes_reply (GetWindowAttributesCookie cookie, out GenericError? e = null);
74
75		public VoidCookie change_window_attributes (Window wid, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
76		public VoidCookie change_window_attributes_checked (Window wid, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
77
78		public QueryTreeCookie query_tree (Window wid);
79		public QueryTreeCookie query_tree_unchecked (Window wid);
80		public QueryTreeReply? query_tree_reply (QueryTreeCookie cookie, out GenericError? e = null);
81
82		[CCode (cname = "xcb_intern_atom")]
83		private InternAtomCookie vala_intern_atom (bool only_if_exists, uint16 len, string name);
84		[CCode (cname = "vala_xcb_intern_atom")]
85		public InternAtomCookie intern_atom (bool only_if_exists, string name) {
86			return this.vala_intern_atom (only_if_exists, (uint16) name.length, name);
87		}
88		[CCode (cname = "xcb_intern_atom_unchecked")]
89		private InternAtomCookie vala_intern_atom_unchecked (bool only_if_exists, uint16 len, string name);
90		[CCode (cname = "vala_xcb_intern_atom_unchecked")]
91		public InternAtomCookie intern_atom_unchecked (bool only_if_exists, string name) {
92			return this.vala_intern_atom (only_if_exists, (uint16) name.length, name);
93		}
94		public InternAtomReply? intern_atom_reply (InternAtomCookie cookie, out GenericError? e = null);
95
96		public GetAtomNameCookie get_atom_name (AtomT atom);
97		public GetAtomNameCookie get_atom_name_unchecked (AtomT atom);
98		public GetAtomNameReply? get_atom_name_reply (GetAtomNameCookie cookie, out GenericError? e = null);
99
100		[CCode (cname = "xcb_change_property")]
101		private VoidCookie vala_change_property (PropMode mode, Window window, AtomT property, AtomT type, uint8 format, uint32 len, void *data);
102		[CCode (cname = "vala_xcb_change_property")]
103		public VoidCookie change_property_uint8 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint8 *data) {
104			return this.vala_change_property (mode, window, property, type, 8, len, (void *)data);
105		}
106		public VoidCookie change_property_uint16 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint16 *data) {
107			return this.vala_change_property (mode, window, property, type, 16, len, (void *)data);
108		}
109		public VoidCookie change_property_uint32 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint32 *data) {
110			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
111		}
112		public VoidCookie change_property_atom (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, AtomT *data) {
113			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
114		}
115		public VoidCookie change_property_string (PropMode mode, Window window, AtomT property, AtomT type, string data) {
116			return this.vala_change_property (mode, window, property, type, 8, data.length, (void *)data.data);
117		}
118
119		[CCode (cname = "xcb_change_property_checked")]
120		private VoidCookie vala_change_property_checked (PropMode mode, Window window, AtomT property, AtomT type, uint8 format, uint32 len, void *data);
121		[CCode (cname = "vala_xcb_change_property_checked")]
122		public VoidCookie change_property_checked_uint8 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint8 *data) {
123			return this.vala_change_property (mode, window, property, type, 8, len, (void *)data);
124		}
125		public VoidCookie change_property_checked_uint16 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint16 *data) {
126			return this.vala_change_property (mode, window, property, type, 16, len, (void *)data);
127		}
128		public VoidCookie change_property_checked_uint32 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint32 *data) {
129			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
130		}
131		public VoidCookie change_property_checked_atom (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, AtomT *data) {
132			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
133		}
134		public VoidCookie change_property_checked_string (PropMode mode, Window window, AtomT property, AtomT type, string data) {
135			return this.vala_change_property (mode, window, property, type, 8, data.length, (void *)data.data);
136		}
137
138		public VoidCookie delete_property_checked (Window window, AtomT property);
139		public VoidCookie delete_property (Window window, AtomT property);
140
141		public GetPropertyCookie get_property (bool _delete, Window window, AtomT property, AtomT type, uint32 long_offset, uint32 long_length);
142		public GetPropertyCookie get_property_unchecked (bool _delete, Window window, AtomT property, AtomT type, uint32 long_offset, uint32 long_length);
143		public GetPropertyReply? get_property_reply (GetPropertyCookie cookie, out GenericError? e = null);
144
145		public ListPropertiesCookie list_properties (Window window);
146		public ListPropertiesCookie list_properties_unchecked (Window window);
147		public ListPropertiesReply? list_properties_reply (ListPropertiesCookie cookie, out GenericError? e = null);
148
149		public VoidCookie configure_window (Window window, uint16 value_mask, uint32 *value_list);
150		public VoidCookie configure_window_checked (Window window, uint16 value_mask, uint32 *value_list);
151
152		public VoidCookie reparent_window (Window window, Window parent, uint16 x, uint16 y);
153		public VoidCookie reparent_window_checked (Window window, Window parent, uint16 x, uint16 y);
154
155		public GetGeometryCookie get_geometry (Drawable drawable);
156		public GetGeometryCookie get_geometry_unchecked (Drawable drawable);
157		public GetGeometryReply? get_geometry_reply (GetGeometryCookie cookie, out GenericError ? e);
158
159		public VoidCookie set_selection_owner_checked (Window owner, AtomT selection, Timestamp time);
160		public VoidCookie set_selection_owner (Window owner, AtomT selection, Timestamp time);
161
162		public GetSelectionOwnerCookie get_selection_owner (AtomT selection);
163		public GetSelectionOwnerCookie get_selection_owner_unchecked (AtomT selection);
164		public GetSelectionOwnerReply? get_selection_owner_reply (GetSelectionOwnerCookie cookie, out GenericError? e = null);
165
166		public VoidCookie convert_selection_checked (Window requestor, AtomT selection, AtomT target, AtomT property, Timestamp time);
167		public VoidCookie convert_selection (Window requestor, AtomT selection, AtomT target, AtomT property, Timestamp time);
168
169		//send_event
170
171		public GrabPointerCookie grab_pointer (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, Timestamp time);
172		public GrabPointerCookie grab_pointer_unchecked (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, Timestamp time);
173		public GrabPointerReply? grab_pointer_reply (GrabPointerCookie cookie, out GenericError? e = null);
174
175		public VoidCookie ungrab_pointer_checked (Timestamp time);
176		public VoidCookie ungrab_pointer (Timestamp time);
177
178		public VoidCookie grab_button_checked (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, uint8 button, uint16 modifiers);
179		public VoidCookie grab_button (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, uint8 button, uint16 modifiers);
180
181		public VoidCookie ungrab_button_checked (uint8 button, Window grab_window, uint16 modifiers);
182		public VoidCookie ungrab_button (uint8 button, Window grab_window, uint16 modifiers);
183
184		public VoidCookie change_active_pointer_grab_checked (Cursor cursor, Timestamp time, uint16 event_mask);
185		public VoidCookie change_active_pointer_grab (Cursor cursor, Timestamp time, uint16 event_mask);
186
187		public GrabKeyboardCookie grab_keyboard (bool owner_events, Window grab_window, Timestamp time, GrabMode pointer_mode, GrabMode keyboard_mode);
188		public GrabKeyboardCookie grab_keyboard_unchecked (bool owner_events, Window grab_window, Timestamp time, GrabMode pointer_mode, GrabMode keyboard_mode);
189		public GrabKeyboardReply? grab_keyboard_reply (GrabKeyboardCookie cookie, out GenericError? e = null);
190
191		public VoidCookie ungrab_keyboard_checked (Timestamp time);
192		public VoidCookie ungrab_keyboard (Timestamp time);
193
194		public VoidCookie grab_key_checked (bool owner_events, Window grab_window, uint16 modifiers, Keycode key, GrabMode pointer_mode, GrabMode keyboard_mode);
195		public VoidCookie grab_key (bool owner_events, Window grab_window, uint16 modifiers, Keycode key, GrabMode pointer_mode, GrabMode keyboard_mode);
196
197		public VoidCookie ungrab_key_checked (Keycode key, Window grab_window, uint16 modifiers);
198		public VoidCookie ungrab_key (Keycode key, Window grab_window, uint16 modifiers);
199
200		//allow_events
201
202		public VoidCookie grab_server_checked ();
203		public VoidCookie grab_server ();
204
205		public VoidCookie ungrab_server_checked ();
206		public VoidCookie ungrab_server ();
207
208		public QueryPointerCookie query_pointer (Window window);
209		public QueryPointerCookie query_pointer_unchecked (Window window);
210		public QueryPointerReply? query_pointer_reply (QueryPointerCookie cookie, out GenericError? e = null);
211
212		public GetMotionEventsCookie get_motion_events (Window window, Timestamp start, Timestamp stop);
213		public GetMotionEventsCookie get_motion_events_unchecked (Window window, Timestamp start, Timestamp stop);
214		public GetMotionEventsReply? get_motion_events_reply (GetMotionEventsCookie cookie, out GenericError? e = null);
215
216		public TranslateCoordinatesCookie translate_coordinates (Window src_window, Window dst_window, int16 src_x, int16 src_y);
217		public TranslateCoordinatesCookie translate_coordinates_unchecked (Window src_window, Window dst_window, int16 src_x, int16 src_y);
218		public TranslateCoordinatesReply? translate_coordinates_reply (TranslateCoordinatesCookie cookie, out GenericError? e = null);
219
220		public VoidCookie warp_pointer_checked (Window src_window, Window dst_window, int16 src_x, int16 src_y, uint16 src_width, uint16 src_height, int16 dst_x, int16 dst_y);
221		public VoidCookie warp_pointer (Window src_window, Window dst_window, int16 src_x, int16 src_y, uint16 src_width, uint16 src_height, int16 dst_x, int16 dst_y);
222
223		public VoidCookie set_input_focus_checked (InputFocus revert_to, Window focus, Timestamp time);
224		public VoidCookie set_input_focus (InputFocus revert_to, Window focus, Timestamp time);
225
226		public GetInputFocusCookie get_input_focus ();
227		public GetInputFocusCookie get_input_focus_unchecked ();
228		public GetInputFocusReply? get_input_focus_reply (GetInputFocusCookie cookie, out GenericError? e = null);
229
230		//query_keymap
231
232		[CCode (cname = "xcb_open_font_checked")]
233		private VoidCookie vala_open_font_checked (Font fid, uint16 name_len, string name);
234		[CCode (cname = "vala_xcb_open_font_checked")]
235		public VoidCookie open_font_checked (Font fid, string name) {
236			return this.vala_open_font_checked (fid, (uint16) name.length, name);
237		}
238		[CCode (cname = "xcb_open_font")]
239		private VoidCookie vala_open_font (Font fid, uint16 name_len, string name);
240		[CCode (cname = "vala_xcb_open_font")]
241		public VoidCookie open_font (Font fid, string name) {
242			return this.vala_open_font (fid, (uint16) name.length, name);
243		}
244
245		public VoidCookie close_font_checked (Font fid);
246		public VoidCookie close_font (Font fid);
247
248		public QueryFontCookie query_font (Fontable font);
249		public QueryFontCookie query_font_unchecked (Fontable font);
250		public QueryFontReply? query_font_reply (QueryFontCookie cookie, out GenericError? e = null);
251
252		/*[CCode (cname = "xcb_query_text_extents")]
253		private QueryTextExtentsCookie vala_query_text_extents (Fontable font, uint32 string_len, Char2b* s);
254		[CCode (cname = "vala_xcb_query_text_extents")]
255		public QueryTextExtentsCookie query_text_extents (Fontable font, uint16[] s) {
256			this.vala_query_text_extents (font, s.length, s);
257		}
258		[CCode (cname = "xcb_query_text_extents_unchecked")]
259		private QueryTextExtentsCookie vala_query_text_extents_unchecked (Fontable font, uint32 string_len, Char2b* s);
260		[CCode (cname = "vala_xcb_query_text_extents_unchecked")]
261		public QueryTextExtentsCookie query_text_extents_unchecked (Fontable font, uint16[] s) { // FIXME: How to handle Char2b?
262			this.vala_query_text_extents_unchecked (font, s.length, s);
263		}
264		public QueryTextExtentsReply? query_text_extents_reply (QueryTextExtentsCookie cookie, out GenericError? e = null);*/
265
266		[CCode (cname = "xcb_list_fonts")]
267		private ListFontsCookie vala_list_fonts (uint16 max_names, uint16 pattern_len, string pattern);
268		[CCode (cname = "vala_xcb_list_fonts")]
269		public ListFontsCookie list_fonts (uint16 max_names, string pattern) {
270			return this.vala_list_fonts (max_names, (uint16) pattern.length, pattern);
271		}
272		[CCode (cname = "xcb_list_fonts_unchecked")]
273		private ListFontsCookie vala_list_fonts_unchecked (uint16 max_names, uint16 pattern_len, string pattern);
274		[CCode (cname = "vala_xcb_list_fonts_unchecked")]
275		public ListFontsCookie list_fonts_unchecked (uint16 max_names, string pattern) {
276			return this.vala_list_fonts_unchecked (max_names, (uint16) pattern.length, pattern);
277		}
278		public ListFontsReply? list_fonts_reply (ListFontsCookie cookie, out GenericError? e = null);
279
280		[CCode (cname = "xcb_list_fonts_with_info")]
281		private ListFontsWithInfoCookie vala_list_fonts_with_info (uint16 max_names, uint16 pattern_len, string pattern);
282		[CCode (cname = "vala_xcb_list_fonts_with_info")]
283		public ListFontsWithInfoCookie list_fonts_with_info (uint16 max_names, string pattern) {
284			return this.vala_list_fonts_with_info (max_names, (uint16) pattern.length, pattern);
285		}
286		[CCode (cname = "xcb_list_fonts_with_info_unchecked")]
287		private ListFontsWithInfoCookie vala_list_fonts_with_info_unchecked (uint16 max_names, uint16 pattern_len, string pattern);
288		[CCode (cname = "vala_xcb_list_fonts_with_info_unchecked")]
289		public ListFontsWithInfoCookie list_fonts_with_info_unchecked (uint16 max_names, string pattern) {
290			return this.vala_list_fonts_with_info_unchecked (max_names, (uint16) pattern.length, pattern);
291		}
292		public ListFontsWithInfoReply? list_fonts_with_info_reply (ListFontsWithInfoCookie cookie, out GenericError? e = null);
293
294		//set_font_path
295
296		public GetFontPathCookie get_font_path ();
297		public GetFontPathCookie get_font_path_unchecked ();
298		public GetFontPathReply? get_font_path_reply (GetFontPathCookie cookie, out GenericError? e = null);
299
300		public VoidCookie create_pixmap_checked (uint8 depth, Pixmap pid, Drawable drawable, uint16 width, uint16 height);
301		public VoidCookie create_pixmap (uint8 depth, Pixmap pid, Drawable drawable, uint16 width, uint16 height);
302
303		public VoidCookie free_pixmap_checked (Pixmap pid);
304		public VoidCookie free_pixmap (Pixmap pid);
305
306		public VoidCookie create_gc_checked (GContext cid, Drawable drawable, uint32 value_mask = 0, [CCode (array_length = false)] uint32[]? value_list = null);
307		public VoidCookie create_gc (GContext cid, Drawable drawable, uint32 value_mask = 0, [CCode (array_length = false)] uint32[]? value_list = null);
308
309		public VoidCookie change_gc_checked (GContext gc, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
310		public VoidCookie change_gc (GContext gc, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
311
312		public VoidCookie copy_gc_checked (GContext src_gc, GContext dst_gc, uint32 value_mask);
313		public VoidCookie copy_gc (GContext src_gc, GContext dst_gc, uint32 value_mask);
314
315		public VoidCookie set_dashes_checked (GContext gc, uint16 dash_offset, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] dashes);
316		public VoidCookie set_dashes (GContext gc, uint16 dash_offset, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] dashes);
317
318		public VoidCookie set_clip_rectangles_checked (ClipOrdering ordering, GContext gc, int16 clip_x_origin, int16 clip_y_origin, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
319		public VoidCookie set_clip_rectangles (ClipOrdering ordering, GContext gc, int16 clip_x_origin, int16 clip_y_origin, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
320
321		public VoidCookie free_gc_checked (GContext gc);
322		public VoidCookie free_gc (GContext gc);
323
324		public VoidCookie clear_area_checked (uint8 exposures, Window window, int16 x, int16 y, uint16 width, uint16 height);
325		public VoidCookie clear_area (uint8 exposures, Window window, int16 x, int16 y, uint16 width, uint16 height);
326
327		public VoidCookie copy_area_checked (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height);
328		public VoidCookie copy_area (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height);
329
330		public VoidCookie copy_plane_checked (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height, uint32 bit_plane);
331		public VoidCookie copy_plane (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height, uint32 bit_plane);
332
333		public VoidCookie poly_point_checked (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);
334		public VoidCookie poly_point (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);
335
336		public VoidCookie poly_line_checked (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length = false)] Point[] points);
337		public VoidCookie poly_line (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);
338
339		public VoidCookie poly_segment_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Segment[] segments);
340		public VoidCookie poly_segment (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Segment[] segments);
341
342		public VoidCookie poly_rectangle_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
343		public VoidCookie poly_rectangle (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
344
345		public VoidCookie poly_arc_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);
346		public VoidCookie poly_arc (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);
347
348		public VoidCookie fill_poly_checked (Drawable drawable, GContext gc, PolyShape shape, CoordMode coordinate_mode, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Point[] points);
349		public VoidCookie fill_poly (Drawable drawable, GContext gc, PolyShape shape, CoordMode coordinate_mode, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Point[] points);
350
351		public VoidCookie poly_fill_rectangle_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
352		public VoidCookie poly_fill_rectangle (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
353
354		public VoidCookie poly_fill_arc_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);
355		public VoidCookie poly_fill_arc (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);
356
357		public VoidCookie put_image_checked (ImageFormat format, Drawable drawable, GContext gc, uint16 width, uint16 height, int16 dst_x, int16 dst_y, uint8 left_pad, uint8 depth, [CCode (array_length_pos = 9.9, array_length_type = "uint32_t")] uint8[] data);
358		public VoidCookie put_image (ImageFormat format, Drawable drawable, GContext gc, uint16 width, uint16 height, int16 dst_x, int16 dst_y, uint8 left_pad, uint8 depth, [CCode (array_length_pos = 9.9, array_length_type = "uint32_t")] uint8[] data);
359
360		public GetImageCookie get_image (ImageFormat format, Drawable drawable, int16 x, int16 y, uint16 width, uint16 height, uint32 plane_mask);
361		public GetImageCookie get_image_unchecked (ImageFormat format, Drawable drawable, int16 x, int16 y, uint16 width, uint16 height, uint32 plane_mask);
362		public GetImageReply? get_image_reply (GetImageCookie cookie, out GenericError? e = null);
363
364		public VoidCookie poly_text_8_checked (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
365		public VoidCookie poly_text_8 (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
366
367		public VoidCookie poly_text_16_checked (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
368		public VoidCookie poly_text_16 (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
369
370		[CCode (cname = "xcb_image_text_8_checked")]
371		private VoidCookie vala_image_text_8_checked (uint8 string_len, Drawable drawable, GContext gc, int16 x, int16 y, string text);
372		[CCode (cname = "vala_xcb_image_text8_checked")]
373		public VoidCookie image_text_8_checked (Drawable drawable, GContext gc, int16 x, int16 y, string text) {
374			return this.vala_image_text_8_checked ((uint8) text.length, drawable, gc, x, y, text);
375		}
376		[CCode (cname = "xcb_image_text_8")]
377		private VoidCookie vala_image_text_8 (uint8 string_len, Drawable drawable, GContext gc, int16 x, int16 y, string text);
378		[CCode (cname = "vala_xcb_image_text8")]
379		public VoidCookie image_text_8 (Drawable drawable, GContext gc, int16 x, int16 y, string text) {
380			return this.vala_image_text_8 ((uint8) text.length, drawable, gc, x, y, text);
381		}
382
383		//image_text_16
384
385		public VoidCookie create_colormap_checked (bool alloc, Colormap mid, Window window, VisualID visual);
386		public VoidCookie create_colormap (bool alloc, Colormap mid, Window window, VisualID visual);
387
388		public VoidCookie free_colormap_checked (Colormap cmap);
389		public VoidCookie free_colormap (Colormap cmap);
390
391		public VoidCookie copy_colormap_and_free_checked (Colormap mid, Colormap src_cmap);
392		public VoidCookie copy_colormap_and_free (Colormap mid, Colormap src_cmap);
393
394		public VoidCookie install_colormap_checked (Colormap cmap);
395		public VoidCookie install_colormap (Colormap cmap);
396
397		public VoidCookie uninstall_colormap_checked (Colormap cmap);
398		public VoidCookie uninstall_colormap (Colormap cmap);
399
400		public ListInstalledColormapsCookie list_installed_colormaps (Window window);
401		public ListInstalledColormapsCookie list_installed_colormaps_unchecked (Window window);
402		public ListInstalledColormapsReply? list_installed_colormaps_reply (ListInstalledColormapsCookie cookie, out GenericError? e = null);
403
404		public AllocColorCookie alloc_color (Colormap cmap, uint16 red, uint16 green, uint16 blue);
405		public AllocColorCookie alloc_color_unchecked (Colormap cmap, uint16 red, uint16 green, uint16 blue);
406		public AllocColorReply? alloc_color_reply (AllocColorCookie cookie, out GenericError? e = null);
407
408		[CCode (cname = "xcb_alloc_named_color")]
409		private AllocNamedColorCookie vala_alloc_named_color (Colormap cmap, uint16 name_len, string name);
410		[CCode (cname = "vala_xcb_alloc_named_color")]
411		public AllocNamedColorCookie alloc_named_color (Colormap cmap, string name) {
412			return this.vala_alloc_named_color (cmap, (uint16) name.length, name);
413		}
414		[CCode (cname = "xcb_alloc_named_color_unchecked")]
415		private AllocNamedColorCookie vala_alloc_named_color_unchecked (Colormap cmap, uint16 name_len, string name);
416		[CCode (cname = "vala_xcb_alloc_named_color_unchecked")]
417		public AllocNamedColorCookie alloc_named_color_unchecked (Colormap cmap, string name) {
418			return this.vala_alloc_named_color_unchecked (cmap, (uint16) name.length, name);
419		}
420		public AllocNamedColorReply? alloc_named_color_reply (AllocNamedColorCookie cookie, out GenericError? e = null);
421
422		public AllocColorCellsCookie alloc_color_cells (bool contiguous, Colormap cmap, uint16 colors, uint16 planes);
423		public AllocColorCellsCookie alloc_color_cells_unchecked (bool contiguous, Colormap cmap, uint16 colors, uint16 planes);
424		public AllocColorCellsReply? alloc_color_cells_reply (AllocColorCellsCookie cookie, out GenericError? e = null);
425
426		public AllocColorPlanesCookie alloc_color_planes (bool contiguous, Colormap cmap, uint16 colors, uint16 reds, uint16 greens, uint16 blues);
427		public AllocColorPlanesCookie alloc_color_planes_unchecked (bool contiguous, Colormap cmap, uint16 colors, uint16 reds, uint16 greens, uint16 blues);
428		public AllocColorPlanesReply? alloc_color_planes_reply (AllocColorPlanesCookie cookie, out GenericError? e = null);
429
430		public VoidCookie free_colors_checked (Colormap cmap, uint32 plane_mask, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] uint32[] pixels);
431		public VoidCookie free_colors (Colormap cmap, uint32 plane_mask, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] uint32[] pixels);
432
433		public VoidCookie store_colors_checked (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] Coloritem[] items);
434		public VoidCookie store_colors (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] Coloritem[] items);
435
436		[CCode (cname = "xcb_store_named_color_checked")]
437		private VoidCookie vala_store_named_color_checked (ColorFlag flags, Colormap cmap, uint32 pixel, uint16 name_len, string name);
438		[CCode (cname = "vala_xcb_store_named_color_checked")]
439		public VoidCookie store_named_color_checked (ColorFlag flags, Colormap cmap, uint32 pixel, string name) {
440			return this.vala_store_named_color_checked (flags, cmap, pixel, (uint16) name.length, name);
441		}
442		[CCode (cname = "xcb_store_named_color")]
443		private VoidCookie vala_store_named_color (ColorFlag flags, Colormap cmap, uint32 pixel, uint16 name_len, string name);
444		[CCode (cname = "vala_xcb_store_named_color")]
445		public VoidCookie store_named_color (ColorFlag flags, Colormap cmap, uint32 pixel, string name) {
446			return this.vala_store_named_color (flags, cmap, pixel, (uint16) name.length, name);
447		}
448
449		public QueryColorsCookie query_colors (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] uint32[] pixels);
450		public QueryColorsCookie query_colors_unchecked (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] uint32[] pixels);
451		public QueryColorsReply? query_colors_reply (QueryColorsCookie cookie, out GenericError? e = null);
452
453		[CCode (cname = "xcb_lookup_color")]
454		private LookupColorCookie vala_lookup_color (Colormap cmap, uint16 name_len, string name);
455		[CCode (cname = "vala_xcb_lookup_color")]
456		public LookupColorCookie lookup_color (Colormap cmap, string name) {
457			return this.vala_lookup_color (cmap, (uint16) name.length, name);
458		}
459		[CCode (cname = "xcb_lookup_color_unchecked")]
460		private LookupColorCookie vala_lookup_color_unchecked (Colormap cmap, uint16 name_len, string name);
461		[CCode (cname = "vala_xcb_lookup_color_unchecked")]
462		public LookupColorCookie lookup_color_unchecked (Colormap cmap, string name) {
463			return this.vala_lookup_color_unchecked (cmap, (uint16) name.length, name);
464		}
465		public LookupColorReply? lookup_color_reply (LookupColorCookie cookie, out GenericError? e = null);
466
467		public VoidCookie create_cursor_checked (Cursor cid, Pixmap source, Pixmap mask, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue, uint16 x, uint16 y);
468		public VoidCookie create_cursor (Cursor cid, Pixmap source, Pixmap mask, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue, uint16 x, uint16 y);
469
470		public VoidCookie create_glyph_cursor_checked (Cursor cid, Font source_font, Font mask_font, uint16 source_char, uint16 mask_char, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
471		public VoidCookie create_glyph_cursor (Cursor cid, Font source_font, Font mask_font, uint16 source_char, uint16 mask_char, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
472
473		public VoidCookie free_cursor_checked (Cursor cursor);
474		public VoidCookie free_cursor (Cursor cursor);
475
476		public VoidCookie recolor_cursor_checked (Cursor cursor, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
477		public VoidCookie recolor_cursor (Cursor cursor, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
478
479		public QueryBestSizeCookie query_best_size (uint8 _class, Drawable drawable, uint16 width, uint16 height); // FIXME: Is there an enum for class?
480		public QueryBestSizeCookie query_best_size_unchecked (uint8 _class, Drawable drawable, uint16 width, uint16 height);
481		public QueryBestSizeReply? query_best_size_reply (QueryBestSizeCookie cookie, out GenericError? e = null);
482
483		[CCode (cname = "xcb_query_extension")]
484		private QueryExtensionCookie vala_query_extension (uint16 name_len, string name);
485		[CCode (cname = "vala_xcb_query_extension")]
486		public QueryExtensionCookie query_extension (string name) {
487			return this.vala_query_extension ((uint16) name.length, name);
488		}
489		[CCode (cname = "xcb_query_extension_unchecked")]
490		private QueryExtensionCookie vala_query_extension_unchecked (uint16 name_len, string name);
491		[CCode (cname = "vala_xcb_query_extension_unchecked")]
492		public QueryExtensionCookie query_extension_unchecked (string name) {
493			return this.vala_query_extension_unchecked ((uint16) name.length, name);
494		}
495		public QueryExtensionReply? query_extension_reply (QueryExtensionCookie cookie, out GenericError? e = null);
496
497		public ListExtensionsCookie list_extensions ();
498		public ListExtensionsCookie list_extensions_unchecked ();
499		public ListExtensionsReply? list_extensions_reply (ListExtensionsCookie cookie, out GenericError? e = null);
500
501		//change_keyboard_mapping
502
503		//get_keyboard_mapping
504
505		//change_keyboard_control
506
507		//get_keyboard_control
508
509		public VoidCookie bell_checked (int8 percent);
510		public VoidCookie bell (int8 percent);
511
512		//change_pointer_control
513
514		//get_pointer_control
515
516		public VoidCookie set_screen_saver_checked (int16 timeout, int16 interval, uint8 prefer_blanking, uint8 allow_exposures);
517		public VoidCookie set_screen_saver (int16 timeout, int16 interval, uint8 prefer_blanking, uint8 allow_exposures);
518
519		public GetScreenSaverCookie get_screen_saver ();
520		public GetScreenSaverCookie get_screen_saver_unchecked ();
521		public GetScreenSaverReply? get_screen_saver_reply (GetScreenSaverCookie cookie, out GenericError? e = null);
522
523		public VoidCookie change_hosts_checked (HostMode mode, Family family, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] address);
524		public VoidCookie change_hosts (HostMode mode, Family family, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] address);
525
526		public ListHostsCookie list_hosts ();
527		public ListHostsCookie list_hosts_unchecked ();
528		public ListHostsReply? list_hosts_reply (ListHostsCookie cookie, out GenericError? e = null);
529
530		public VoidCookie set_access_control_checked (AccessControl mode);
531		public VoidCookie set_access_control (AccessControl mode);
532
533		public VoidCookie set_close_down_mode_checked (CloseDown mode);
534		public VoidCookie set_close_down_mode (CloseDown mode);
535
536		public VoidCookie kill_client_checked (uint32 resource);
537		public VoidCookie kill_client (uint32 resource);
538
539		public VoidCookie rotate_properties_checked (Window window, int16 delta, [CCode (array_length_pos = 1.9, array_length_type = "uint16_t")] AtomT[] atoms);
540		public VoidCookie rotate_properties (Window window, int16 delta, [CCode (array_length_pos = 1.9, array_length_type = "uint16_t")] AtomT[] atoms);
541
542		public VoidCookie force_screen_saver_checked (ScreenSaver mode);
543		public VoidCookie force_screen_saver (ScreenSaver mode);
544
545		//set_pointer_mapping
546
547		//get_pointer_mapping
548
549		//set_modifier_mapping
550
551		//get_modifier_mapping
552
553		public VoidCookie no_operation_checked ();
554		public VoidCookie no_operation ();
555	}
556
557	[CCode (cprefix = "XCB_CONN_", cname = "int", has_type_id = false)]
558	public enum ConnectionError
559	{
560		ERROR,
561		CLOSED_EXT_NOTSUPPORTED,
562		CLOSED_MEM_INSUFFICIENT,
563		CLOSED_REQ_LEN_EXCEED,
564		CLOSED_PARSE_ERR,
565		CLOSED_INVALID_SCREEN,
566		CLOSED_FDPASSING_FAILED,
567	}
568
569	[SimpleType]
570	[IntegerType (rank = 9)]
571	[CCode (cname = "xcb_get_geometry_cookie_t", has_type_id = false)]
572	public struct GetGeometryCookie {
573	}
574
575	[CCode (cname = "xcb_get_geometry_reply_t", ref_function = "", unref_function = "free")]
576	public class GetGeometryReply {
577		public uint8      response_type;
578		public uint8      depth;
579		public uint16     sequence;
580		public uint32     length;
581		public Window     root;
582		public int16      x;
583		public int16      y;
584		public uint16     width;
585		public uint16     height;
586		public uint16     border_width;
587	}
588
589	[SimpleType]
590	[IntegerType (rank = 9)]
591	[CCode (cname = "xcb_get_window_attributes_cookie_t", has_type_id = false)]
592	public struct GetWindowAttributesCookie {
593	}
594
595	[Compact]
596	[CCode (cname = "xcb_get_window_attributes_reply_t", ref_function = "", unref_function = "")]
597	public class GetWindowAttributesReply {
598		public uint8        response_type;
599		public uint8        backing_store;
600		public uint16       sequence;
601		public uint32       length;
602		public VisualID     visual;
603		public uint16       _class;
604		public uint8        bit_gravity;
605		public uint8        win_gravity;
606		public uint32       backing_planes;
607		public uint32       backing_pixel;
608		public uint8        save_under;
609		public uint8        map_is_installed;
610		public uint8        map_state;
611		public uint8        override_redirect;
612		public Colormap     colormap;
613		public uint32       all_event_masks;
614		public uint32       your_event_mask;
615		public uint16       do_not_propagate_mask;
616	}
617
618	[SimpleType]
619	[IntegerType (rank = 9)]
620	[CCode (cname = "xcb_get_property_cookie_t", has_type_id = false)]
621	public struct GetPropertyCookie {
622	}
623
624	[SimpleType]
625	[IntegerType (rank = 9)]
626	[CCode (cname = "xcb_intern_atom_cookie_t", has_type_id = false)]
627	public struct InternAtomCookie {
628	}
629
630	[Compact]
631	[CCode (cname = "xcb_intern_atom_reply_t", ref_function = "", unref_function = "free")]
632	public class InternAtomReply {
633		private uint8    response_type;
634		private uint16   sequence;
635		public  uint32   length;
636		public  AtomT    atom;
637	}
638
639	[SimpleType]
640	[IntegerType (rank = 9)]
641	[CCode (cname = "xcb_get_atom_name_cookie_t", has_type_id = false)]
642	public struct GetAtomNameCookie {
643	}
644
645	[Compact]
646	[CCode (cname = "xcb_get_atom_name_reply_t", ref_function = "", unref_function = "free")]
647	public class GetAtomNameReply {
648		private uint8 response_type;
649		private uint16 sequence;
650		public uint32 length;
651		public uint16 name_len;
652		[CCode (cname = "xcb_get_atom_name_name")]
653		private unowned string vala_name ();
654		public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
655	}
656
657	[SimpleType]
658	[IntegerType (rank = 9)]
659	[CCode (cname = "xcb_list_properties_cookie_t", has_type_id = false)]
660	public struct ListPropertiesCookie {
661	}
662
663	[Compact]
664	[CCode (cname = "xcb_list_properties_reply_t", ref_function = "", unref_function = "free")]
665	public class ListPropertiesReply {
666		private uint16 atoms_len;
667		[CCode (cname = "xcb_list_properties_atoms")]
668		private Atom* vala_atoms ();
669		public Atom[] atoms
670		{
671			get
672			{
673				unowned Atom[] res = (Atom[]) vala_atoms ();
674				res.length = atoms_len;
675				return res;
676			}
677		}
678	}
679
680	[SimpleType]
681	[IntegerType (rank = 9)]
682	[CCode (cname = "xcb_get_selection_owner_cookie_t", has_type_id = false)]
683	public struct GetSelectionOwnerCookie {
684	}
685
686	[Compact]
687	[CCode (cname = "xcb_get_selection_owner_reply_t", ref_function = "", unref_function = "free")]
688	public class GetSelectionOwnerReply {
689		public Window owner;
690	}
691
692	[SimpleType]
693	[IntegerType (rank = 9)]
694	[CCode (cname = "xcb_grab_pointer_cookie_t", has_type_id = false)]
695	public struct GrabPointerCookie {
696	}
697
698	[Compact]
699	[CCode (cname = "xcb_grab_pointer_reply_t", ref_function = "", unref_function = "free")]
700	public class GrabPointerReply {
701		public GrabStatus status;
702	}
703
704	[SimpleType]
705	[IntegerType (rank = 9)]
706	[CCode (cname = "xcb_grab_keyboard_cookie_t", has_type_id = false)]
707	public struct GrabKeyboardCookie {
708	}
709
710	[Compact]
711	[CCode (cname = "xcb_grab_keyboard_reply_t", ref_function = "", unref_function = "free")]
712	public class GrabKeyboardReply {
713		public GrabStatus status;
714	}
715
716	[SimpleType]
717	[IntegerType (rank = 9)]
718	[CCode (cname = "xcb_query_pointer_cookie_t", has_type_id = false)]
719	public struct QueryPointerCookie {
720	}
721
722	[Compact]
723	[CCode (cname = "xcb_query_pointer_reply_t", ref_function = "", unref_function = "free")]
724	public class QueryPointerReply {
725		public uint8 same_screen;
726		public Window root;
727		public Window child;
728		public int16 root_x;
729		public int16 root_y;
730		public int16 win_x;
731		public int16 win_y;
732		public uint16 mask;
733	}
734
735	[SimpleType]
736	[IntegerType (rank = 9)]
737	[CCode (cname = "xcb_get_motion_events_cookie_t", has_type_id = false)]
738	public struct GetMotionEventsCookie {
739	}
740
741	[Compact]
742	[CCode (cname = "xcb_get_motion_events_reply_t", ref_function = "", unref_function = "free")]
743	public class GetMotionEventsReply {
744		private uint32 events_len;
745		[CCode (cname = "xcb_get_motion_events_events")]
746		private Timecoord* vala_events ();
747		public Timecoord[] events
748		{
749			get
750			{
751				unowned Timecoord[] res = (Timecoord[]) vala_events ();
752				res.length = (int) events_len;
753				return res;
754			}
755		}
756	}
757
758	[SimpleType]
759	[IntegerType (rank = 9)]
760	[CCode (cname = "xcb_get_image_cookie_t", has_type_id = false)]
761	public struct GetImageCookie {
762	}
763
764	[Compact]
765	[CCode (cname = "xcb_get_image_reply_t", ref_function = "", unref_function = "")]
766	public class GetImageReply {
767		public uint8 depth;
768		public VisualID visual;
769		private uint32 length;
770		[CCode (cname = "xcb_get_image_data")]
771		public uint8* vala_data ();
772		public uint8[] data
773		{
774			get
775			{
776				unowned uint8[] res = (uint8[]) vala_data ();
777				res.length = (int) length;
778				return res;
779			}
780		}
781	}
782
783	[SimpleType]
784	[IntegerType (rank = 9)]
785	[CCode (cname = "xcb_list_installed_colormaps_cookie_t", has_type_id = false)]
786	public struct ListInstalledColormapsCookie {
787	}
788
789	[Compact]
790	[CCode (cname = "xcb_list_installed_colormaps_reply_t", ref_function = "", unref_function = "free")]
791	public class ListInstalledColormapsReply {
792		private uint16 cmaps_len;
793		[CCode (cname = "xcb_list_installed_colormaps_cmaps")]
794		private Colormap* vala_cmaps ();
795		public Colormap[] cmaps
796		{
797			get
798			{
799				unowned Colormap[] res = (Colormap[]) vala_cmaps ();
800				res.length = (int) cmaps_len;
801				return res;
802			}
803		}
804	}
805
806	[SimpleType]
807	[IntegerType (rank = 9)]
808	[CCode (cname = "xcb_alloc_color_cookie_t", has_type_id = false)]
809	public struct AllocColorCookie {
810	}
811
812	[Compact]
813	[CCode (cname = "xcb_alloc_color_reply_t", ref_function = "", unref_function = "free")]
814	public class AllocColorReply {
815		public uint16 red;
816		public uint16 green;
817		public uint16 blue;
818		public uint32 pixel;
819	}
820
821	[SimpleType]
822	[IntegerType (rank = 9)]
823	[CCode (cname = "xcb_alloc_named_color_cookie_t", has_type_id = false)]
824	public struct AllocNamedColorCookie {
825	}
826
827	[Compact]
828	[CCode (cname = "xcb_alloc_named_color_reply_t", ref_function = "", unref_function = "free")]
829	public class AllocNamedColorReply {
830		public uint32 pixel;
831		public uint16 exact_red;
832		public uint16 exact_green;
833		public uint16 exact_blue;
834		public uint16 visual_red;
835		public uint16 visual_green;
836		public uint16 visual_blue;
837	}
838
839	[SimpleType]
840	[IntegerType (rank = 9)]
841	[CCode (cname = "xcb_alloc_color_cells_cookie_t", has_type_id = false)]
842	public struct AllocColorCellsCookie {
843	}
844
845	[Compact]
846	[CCode (cname = "xcb_alloc_color_cells_reply_t", ref_function = "", unref_function = "free")]
847	public class AllocColorCellsReply {
848		private uint16 pixels_len;
849		[CCode (cname = "xcb_alloc_color_cells_pixels")]
850		private uint32* vala_pixels ();
851		public uint32[] pixels
852		{
853			get {
854				unowned uint32[] res = (uint32[]) vala_pixels ();
855				res.length = (int) pixels_len;
856				return res;
857			}
858		}
859		private uint16 masks_len;
860		[CCode (cname = "xcb_alloc_color_cells_masks")]
861		private uint32* vala_masks ();
862		public uint32[] masks
863		{
864			get {
865				unowned uint32[] res = (uint32[]) vala_masks ();
866				res.length = (int) masks_len;
867				return res;
868			}
869		}
870	}
871
872	[SimpleType]
873	[IntegerType (rank = 9)]
874	[CCode (cname = "xcb_alloc_color_planes_cookie_t", has_type_id = false)]
875	public struct AllocColorPlanesCookie {
876	}
877
878	[Compact]
879	[CCode (cname = "xcb_alloc_color_planes_reply_t", ref_function = "", unref_function = "free")]
880	public class AllocColorPlanesReply {
881		public uint32 red_mask;
882		public uint32 green_mask;
883		public uint32 blue_mask;
884		private uint16 pixels_len;
885		[CCode (cname = "xcb_alloc_color_planes_pixels")]
886		private uint32* vala_pixels ();
887		public uint32[] pixels
888		{
889			get {
890				unowned uint32[] res = (uint32[]) vala_pixels ();
891				res.length = (int) pixels_len;
892				return res;
893			}
894		}
895	}
896
897	[SimpleType]
898	[IntegerType (rank = 9)]
899	[CCode (cname = "xcb_query_colors_cookie_t", has_type_id = false)]
900	public struct QueryColorsCookie {
901	}
902
903	[Compact]
904	[CCode (cname = "xcb_query_colors_reply_t", ref_function = "", unref_function = "free")]
905	public class QueryColorsReply {
906		private uint16 colors_len;
907		[CCode (cname = "xcb_query_colors_colors")]
908		private RGB* vala_colors ();
909		public RGB[] colors
910		{
911			get {
912				unowned RGB[] res = (RGB[]) vala_colors ();
913				res.length = (int) colors_len;
914				return res;
915			}
916		}
917	}
918
919	[SimpleType]
920	[IntegerType (rank = 9)]
921	[CCode (cname = "xcb_lookup_color_cookie_t", has_type_id = false)]
922	public struct LookupColorCookie {
923	}
924
925	[Compact]
926	[CCode (cname = "xcb_lookup_color_reply_t", ref_function = "", unref_function = "free")]
927	public class LookupColorReply {
928		public uint16 exact_red;
929		public uint16 exact_green;
930		public uint16 exact_blue;
931		public uint16 visual_red;
932		public uint16 visual_green;
933		public uint16 visual_blue;
934	}
935
936	[SimpleType]
937	[IntegerType (rank = 9)]
938	[CCode (cname = "xcb_query_best_size_cookie_t", has_type_id = false)]
939	public struct QueryBestSizeCookie {
940	}
941
942	[Compact]
943	[CCode (cname = "xcb_query_best_size_reply_t", ref_function = "", unref_function = "free")]
944	public class QueryBestSizeReply {
945		public uint16 width;
946		public uint16 height;
947	}
948
949	[SimpleType]
950	[IntegerType (rank = 9)]
951	[CCode (cname = "xcb_query_extension_cookie_t", has_type_id = false)]
952	public struct QueryExtensionCookie {
953	}
954
955	[Compact]
956	[CCode (cname = "xcb_query_extension_reply_t", ref_function = "", unref_function = "free")]
957	public class QueryExtensionReply {
958		public bool present;
959		public uint8 major_opcode;
960		public uint8 first_event;
961		public uint8 first_error;
962	}
963
964	[SimpleType]
965	[IntegerType (rank = 9)]
966	[CCode (cname = "xcb_list_extensions_cookie_t", has_type_id = false)]
967	public struct ListExtensionsCookie {
968	}
969
970	[Compact]
971	[CCode (cname = "xcb_list_extensions_reply_t", ref_function = "", unref_function = "free")]
972	public class ListExtensionsReply {
973		private uint8 names_len;
974		[CCode (cname = "xcb_list_extensions_names_iterator")]
975		private StrIterator names_iterator ();
976		public string[] names
977		{
978			owned get
979			{
980				var value = new string[names_len];
981				var iter = names_iterator ();
982				for (var i = 0; i < value.length; i++)
983				{
984					value[i] = iter.data.name;
985					StrIterator.next (ref iter);
986				}
987				return value;
988			}
989		}
990	}
991
992	[SimpleType]
993	[IntegerType (rank = 9)]
994	[CCode (cname = "xcb_get_keyboard_mapping_cookie_t", has_type_id = false)]
995	public struct GetKeyboardMappingCookie {
996	}
997
998	//[Compact]
999	//[CCode (cname = "xcb_get_keyboard_mapping_reply_t", ref_function = "", unref_function = "free")]
1000	//public class GetKeyboardMappingReply {
1001	//}
1002
1003	[SimpleType]
1004	[IntegerType (rank = 9)]
1005	[CCode (cname = "xcb_get_keyboard_control_cookie_t", has_type_id = false)]
1006	public struct GetKeyboardControlCookie {
1007	}
1008
1009	//[Compact]
1010	//[CCode (cname = "xcb_get_keyboard_control_reply_t", ref_function = "", unref_function = "free")]
1011	//public class GetKeyboardControlReply {
1012	//}
1013
1014	[SimpleType]
1015	[IntegerType (rank = 9)]
1016	[CCode (cname = "xcb_get_pointer_control_cookie_t", has_type_id = false)]
1017	public struct GetPointerControlCookie {
1018	}
1019
1020	//[Compact]
1021	//[CCode (cname = "xcb_get_pointer_control_reply_t", ref_function = "", unref_function = "free")]
1022	//public class GetPointerControlReply {
1023	//}
1024
1025	[SimpleType]
1026	[IntegerType (rank = 9)]
1027	[CCode (cname = "xcb_get_screen_saver_cookie_t", has_type_id = false)]
1028	public struct GetScreenSaverCookie {
1029	}
1030
1031	[Compact]
1032	[CCode (cname = "xcb_get_screen_saver_reply_t", ref_function = "", unref_function = "free")]
1033	public class GetScreenSaverReply {
1034		public uint16 timeout;
1035		public uint16 interval;
1036		public uint8 prefer_blanking;
1037		public uint8 allow_exposures;
1038	}
1039
1040	[SimpleType]
1041	[IntegerType (rank = 9)]
1042	[CCode (cname = "xcb_list_hosts_cookie_t", has_type_id = false)]
1043	public struct ListHostsCookie {
1044	}
1045
1046	[Compact]
1047	[CCode (cname = "xcb_list_hosts_reply_t", ref_function = "", unref_function = "free")]
1048	public class ListHostsReply {
1049		private uint16 hosts_len;
1050		[CCode (cname = "xcb_list_hosts_hosts_iterator")]
1051		private HostIterator hosts_iterator ();
1052		public Host[] hosts {
1053			owned get
1054			{
1055				var value = new Host[hosts_len];
1056				var iter = hosts_iterator ();
1057				for (var i = 0; i < value.length; i++)
1058				{
1059					value[i] = iter.data;
1060					HostIterator.next (ref iter);
1061				}
1062				return value;
1063			}
1064		}
1065	}
1066
1067	[SimpleType]
1068	[IntegerType (rank = 9)]
1069	[CCode (cname = "xcb_set_pointer_mapping_cookie_t", has_type_id = false)]
1070	public struct SetPointerMappingCookie {
1071	}
1072
1073	//[Compact]
1074	//[CCode (cname = "xcb_set_pointer_mapping_reply_t", ref_function = "", unref_function = "free")]
1075	//public class SetPointerMappingReply {
1076	//}
1077
1078	[SimpleType]
1079	[IntegerType (rank = 9)]
1080	[CCode (cname = "xcb_get_pointer_mapping_cookie_t", has_type_id = false)]
1081	public struct GetPointerMappingCookie {
1082	}
1083
1084	//[Compact]
1085	//[CCode (cname = "xcb_get_pointer_mapping_reply_t", ref_function = "", unref_function = "free")]
1086	//public class GetPointerMappingReply {
1087	//}
1088
1089	[SimpleType]
1090	[IntegerType (rank = 9)]
1091	[CCode (cname = "xcb_set_modifier_mapping_cookie_t", has_type_id = false)]
1092	public struct SetModifierMappingCookie {
1093	}
1094
1095	//[Compact]
1096	//[CCode (cname = "xcb_set_modifier_mapping_reply_t", ref_function = "", unref_function = "free")]
1097	//public class SetModifierMappingReply {
1098	//}
1099
1100	[SimpleType]
1101	[IntegerType (rank = 9)]
1102	[CCode (cname = "xcb_get_modifier_mapping_cookie_t", has_type_id = false)]
1103	public struct GetModifierMappingCookie {
1104	}
1105
1106	//[Compact]
1107	//[CCode (cname = "xcb_get_modifier_mapping_reply_t", ref_function = "", unref_function = "free")]
1108	//public class GetModifierMappingReply {
1109	//}
1110
1111	[SimpleType]
1112	[IntegerType (rank = 9)]
1113	[CCode (cname = "xcb_translate_coordinates_cookie_t", has_type_id = false)]
1114	public struct TranslateCoordinatesCookie {
1115	}
1116
1117	[Compact]
1118	[CCode (cname = "xcb_translate_coordinates_reply_t", ref_function = "", unref_function = "free")]
1119	public class TranslateCoordinatesReply {
1120		public uint8 same_screen;
1121		public Window child;
1122		public int16 dst_x;
1123		public int16 dst_y;
1124	}
1125
1126	[SimpleType]
1127	[IntegerType (rank = 9)]
1128	[CCode (cname = "xcb_get_input_focus_cookie_t", has_type_id = false)]
1129	public struct GetInputFocusCookie {
1130	}
1131
1132	[Compact]
1133	[CCode (cname = "xcb_get_input_focus_reply_t", ref_function = "", unref_function = "free")]
1134	public class GetInputFocusReply {
1135		public InputFocus revert_to;
1136		public Window focus;
1137	}
1138
1139	[SimpleType]
1140	[IntegerType (rank = 9)]
1141	[CCode (cname = "xcb_query_keymap_cookie_t", has_type_id = false)]
1142	public struct QueryKeymapCookie {
1143	}
1144
1145	//[Compact]
1146	//[CCode (cname = "xcb_query_keymap_reply_t", ref_function = "", unref_function = "free")]
1147	//public class QueryKeymapReply {
1148	//}
1149
1150	[SimpleType]
1151	[IntegerType (rank = 9)]
1152	[CCode (cname = "xcb_query_font_cookie_t", has_type_id = false)]
1153	public struct QueryFontCookie {
1154	}
1155
1156	[Compact]
1157	[CCode (cname = "xcb_query_font_reply_t", ref_function = "", unref_function = "free")]
1158	public class QueryFontReply {
1159		public Charinfo min_bounds;
1160		public Charinfo max_bounds;
1161		public uint16 min_char_or_byte2;
1162		public uint16 max_char_or_byte2;
1163		public uint16 default_char;
1164		public uint8 draw_direction;
1165		public uint8 min_byte1;
1166		public uint8 max_byte1;
1167		public uint8 all_chars_exist;
1168		public int16 font_ascent;
1169		public int16 font_descent;
1170		private uint16 properties_len;
1171		[CCode (cname = "xcb_query_font_properties")]
1172		private Fontprop* vala_properties ();
1173		public Fontprop[] properties
1174		{
1175			get
1176			{
1177				unowned Fontprop[] res = (Fontprop[]) vala_properties ();
1178				res.length = properties_len;
1179				return res;
1180			}
1181		}
1182		private uint32 char_infos_len;
1183		[CCode (cname = "xcb_query_font_char_infos")]
1184		private Charinfo* vala_char_infos ();
1185		public Charinfo[] char_infos
1186		{
1187			get
1188			{
1189				unowned Charinfo[] res = (Charinfo[]) vala_char_infos ();
1190				res.length = (int) char_infos_len;
1191				return res;
1192			}
1193		}
1194	}
1195
1196	[SimpleType]
1197	[IntegerType (rank = 9)]
1198	[CCode (cname = "xcb_query_text_extents_cookie_t", has_type_id = false)]
1199	public struct QueryTextExtentsCookie {
1200	}
1201
1202	[Compact]
1203	[CCode (cname = "xcb_query_text_extents_reply_t", ref_function = "", unref_function = "free")]
1204	public class QueryTextExtentsReply {
1205		public FontDraw draw_direction;
1206		public int16 font_ascent;
1207		public int16 font_descent;
1208		public int16 overall_ascent;
1209		public int16 overall_descent;
1210		public int16 overall_width;
1211		public int16 overall_height;
1212		public int16 overall_left;
1213		public int16 overall_right;
1214	}
1215
1216	[SimpleType]
1217	[IntegerType (rank = 9)]
1218	[CCode (cname = "xcb_list_fonts_cookie_t", has_type_id = false)]
1219	public struct ListFontsCookie {
1220	}
1221
1222	[Compact]
1223	[CCode (cname = "xcb_list_fonts_reply_t", ref_function = "", unref_function = "free")]
1224	public class ListFontsReply {
1225		private uint16 names_len;
1226		[CCode (cname = "xcb_list_fonts_names_iterator")]
1227		private StrIterator names_iterator ();
1228		public string[] names
1229		{
1230			owned get
1231			{
1232				var value = new string[names_len];
1233				var iter = names_iterator ();
1234				for (var i = 0; i < value.length; i++)
1235				{
1236					value[i] = iter.data.name;
1237					StrIterator.next (ref iter);
1238				}
1239				return value;
1240			}
1241		}
1242	}
1243
1244	[Compact]
1245	[CCode (cname = "xcb_get_property_reply_t", ref_function = "", unref_function = "free")]
1246	public class GetPropertyReply {
1247		public AtomT type;
1248		public uint8 format;
1249		public uint32 bytes_after;
1250		private uint32 value_len;
1251		[CCode (cname = "xcb_get_property_value")]
1252		public unowned void *value ();
1253		[CCode (cname = "xcb_get_property_value_length")]
1254		public int32 value_length ();
1255		public string value_as_string () {
1256			GLib.assert (format == 8);
1257			return "%.*s".printf (value_len, value ());
1258		}
1259		public unowned uint8[] value_as_uint8_array () {
1260			GLib.assert (format == 8);
1261			unowned uint8[] res = (uint8[]) value ();
1262			res.length = (int) value_len;
1263			return res;
1264		}
1265		public unowned uint16[] value_as_uint16_array () {
1266			GLib.assert (format == 16);
1267			unowned uint16[] res = (uint16[]) value ();
1268			res.length = (int) value_len;
1269			return res;
1270		}
1271		public unowned uint32[] value_as_uint32_array () {
1272			GLib.assert (format == 32);
1273			unowned uint32[] res = (uint32[]) value ();
1274			res.length = (int) value_len;
1275			return res;
1276		}
1277	}
1278
1279	[SimpleType]
1280	[IntegerType (rank = 9)]
1281	[CCode (cname = "xcb_list_fonts_with_info_cookie_t", has_type_id = false)]
1282	public struct ListFontsWithInfoCookie {
1283	}
1284
1285	[Compact]
1286	[CCode (cname = "xcb_list_fonts_with_info_reply_t", ref_function = "", unref_function = "free")]
1287	public class ListFontsWithInfoReply {
1288		public Charinfo min_bounds;
1289		public Charinfo max_bounds;
1290		public uint16 min_char_or_byte2;
1291		public uint16 max_char_or_byte2;
1292		public uint16 default_char;
1293		public uint8 draw_direction;
1294		public uint8 min_byte1;
1295		public uint8 max_byte1;
1296		public uint8 all_chars_exist;
1297		public int16 font_ascent;
1298		public int16 font_descent;
1299		public uint32 replies_hint;
1300		private uint16 properties_len;
1301		[CCode (cname = "xcb_list_fonts_with_info_properties")]
1302		private Fontprop* vala_properties ();
1303		public Fontprop[] properties
1304		{
1305			get
1306			{
1307				unowned Fontprop[] res = (Fontprop[]) vala_properties ();
1308				res.length = properties_len;
1309				return res;
1310			}
1311		}
1312		private uint8 name_len;
1313		[CCode (cname = "xcb_list_fonts_with_info_name")]
1314		private unowned string vala_name ();
1315		public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
1316	}
1317
1318	[SimpleType]
1319	[IntegerType (rank = 9)]
1320	[CCode (cname = "xcb_get_font_path_cookie_t", has_type_id = false)]
1321	public struct GetFontPathCookie {
1322	}
1323
1324	[Compact]
1325	[CCode (cname = "xcb_get_font_path_reply_t", ref_function = "", unref_function = "free")]
1326	public class GetFontPathReply {
1327		private uint16 path_len;
1328		[CCode (cname = "xcb_get_font_path_path_iterator")]
1329		private StrIterator path_iterator ();
1330		public string[] path
1331		{
1332			owned get
1333			{
1334				var value = new string[path_len];
1335				var iter = path_iterator ();
1336				for (var i = 0; i < value.length; i++)
1337				{
1338					value[i] = iter.data.name;
1339					StrIterator.next (ref iter);
1340				}
1341				return value;
1342			}
1343		}
1344	}
1345
1346	[CCode (cname = "xcb_circulate_t", has_type_id = false)]
1347	public enum Circulate {
1348		RAISE_LOWEST,
1349		LOWER_HIGHEST
1350	}
1351
1352	[SimpleType]
1353	[IntegerType (rank = 9)]
1354	[CCode (cname = "xcb_atom_t", has_type_id = false)]
1355	public struct AtomT {
1356	}
1357
1358	[SimpleType]
1359	[IntegerType (rank = 9)]
1360	[CCode (cname = "xcb_fontable_t", has_type_id = false)]
1361	public struct Fontable {
1362	}
1363
1364	[CCode (cname = "xcb_prop_mode_t", has_type_id = false)]
1365	public enum PropMode {
1366		REPLACE,
1367		PREPEND,
1368		APPEND
1369	}
1370
1371	[CCode (cname = "xcb_grab_mode_t", has_type_id = false)]
1372	public enum GrabMode {
1373		SYNC,
1374		ASYNC
1375	}
1376
1377	[CCode (cname = "xcb_grab_status_t", has_type_id = false)]
1378	public enum GrabStatus {
1379		SUCCESS,
1380		ALREADY_GRABBED,
1381		INVALID_TIME,
1382		NOT_VIEWABLE,
1383		FROZEN
1384	}
1385
1386	[SimpleType]
1387	[CCode (cname = "xcb_timecoord_t", has_type_id = false)]
1388	public struct Timecoord {
1389		public Timestamp time;
1390		public int16 x;
1391		public int16 y;
1392	}
1393
1394	[SimpleType]
1395	[CCode (cname = "xcb_timecoord_iterator_t", has_type_id = false)]
1396	private struct TimecoordIterator {
1397		public unowned Timecoord data;
1398		public int rem;
1399		public int index;
1400		[CCode (cname = "xcb_timecoord_next")]
1401		public static void next (ref TimecoordIterator iter);
1402	}
1403
1404	[CCode (cname = "xcb_atom_enum_t", has_type_id = false)]
1405	public enum Atom {
1406		NONE,
1407		ANY,
1408		PRIMARY,
1409		SECONDARY,
1410		ARC,
1411		ATOM,
1412		BITMAP,
1413		CARDINAL,
1414		COLORMAP,
1415		CURSOR,
1416		CUT_BUFFER0,
1417		CUT_BUFFER1,
1418		CUT_BUFFER2,
1419		CUT_BUFFER3,
1420		CUT_BUFFER4,
1421		CUT_BUFFER5,
1422		CUT_BUFFER6,
1423		CUT_BUFFER7,
1424		DRAWABLE,
1425		FONT,
1426		INTEGER,
1427		PIXMAP,
1428		POINT,
1429		RECTANGLE,
1430		RESOURCE_MANAGER,
1431		RGB_COLOR_MAP,
1432		RGB_BEST_MAP,
1433		RGB_BLUE_MAP,
1434		RGB_DEFAULT_MAP,
1435		RGB_GRAY_MAP,
1436		RGB_GREEN_MAP,
1437		RGB_RED_MAP,
1438		STRING,
1439		VISUALID,
1440		WINDOW,
1441		WM_COMMAND,
1442		WM_HINTS,
1443		WM_CLIENT_MACHINE,
1444		WM_ICON_NAME,
1445		WM_ICON_SIZE,
1446		WM_NAME,
1447		WM_NORMAL_HINTS,
1448		WM_SIZE_HINTS,
1449		WM_ZOOM_HINTS,
1450		MIN_SPACE,
1451		NORM_SPACE,
1452		MAX_SPACE,
1453		END_SPACE,
1454		SUPERSCRIPT_X,
1455		SUPERSCRIPT_Y,
1456		SUBSCRIPT_X,
1457		SUBSCRIPT_Y,
1458		UNDERLINE_POSITION,
1459		UNDERLINE_THICKNESS,
1460		STRIKEOUT_ASCENT,
1461		STRIKEOUT_DESCENT,
1462		ITALIC_ANGLE,
1463		X_HEIGHT,
1464		QUAD_WIDTH,
1465		WEIGHT,
1466		POINT_SIZE,
1467		RESOLUTION,
1468		COPYRIGHT,
1469		NOTICE,
1470		FONT_NAME,
1471		FAMILY_NAME,
1472		FULL_NAME,
1473		CAP_HEIGHT,
1474		WM_CLASS,
1475		WM_TRANSIENT_FOR
1476	}
1477
1478	public const uint8 KEY_PRESS;
1479	public const uint8 KEY_RELEASE;
1480	public const uint8 BUTTON_PRESS;
1481	public const uint8 BUTTON_RELEASE;
1482	public const uint8 MOTION_NOTIFY;
1483	public const uint8 ENTER_NOTIFY;
1484	public const uint8 LEAVE_NOTIFY;
1485	public const uint8 FOCUS_IN;
1486	public const uint8 FOCUS_OUT;
1487	public const uint8 KEYMAP_NOTIFY;
1488	public const uint8 EXPOSE;
1489	public const uint8 GRAPHICS_EXPOSURE;
1490	public const uint8 NO_EXPOSURE;
1491	public const uint8 VISIBILITY_NOTIFY;
1492	public const uint8 CREATE_NOTIFY;
1493	public const uint8 DESTROY_NOTIFY;
1494	public const uint8 UNMAP_NOTIFY;
1495	public const uint8 MAP_NOTIFY;
1496	public const uint8 MAP_REQUEST;
1497	public const uint8 REPARENT_NOTIFY;
1498	public const uint8 CONFIGURE_NOTIFY;
1499	public const uint8 CONFIGURE_REQUEST;
1500	public const uint8 GRAVITY_NOTIFY;
1501	public const uint8 RESIZE_REQUEST;
1502	public const uint8 CIRCULATE_NOTIFY;
1503	public const uint8 CIRCULATE_REQUEST;
1504	public const uint8 PROPERTY_NOTIFY;
1505	public const uint8 SELECTION_CLEAR;
1506	public const uint8 SELECTION_REQUEST;
1507	public const uint8 SELECTION_NOTIFY;
1508	public const uint8 COLORMAP_NOTIFY;
1509	public const uint8 CLIENT_MESSAGE;
1510	public const uint8 MAPPING_NOTIFY;
1511
1512	[CCode (cname = "xcb_config_window_t", has_type_id = false)]
1513	public enum ConfigWindow {
1514		X,
1515		Y,
1516		WIDTH,
1517		HEIGHT,
1518		BORDER_WIDTH,
1519		SIBLING,
1520		STACK_MODE
1521	}
1522
1523	[CCode (cname = "xcb_image_order_t", has_type_id = false)]
1524	public enum ImageOrder {
1525		LSB_FIRST,
1526		MSB_FIRST
1527	}
1528
1529	[Compact]
1530	[CCode (cname = "xcb_setup_t", ref_function = "", unref_function = "")]
1531	public class Setup {
1532		public uint8 status;
1533		public uint16 protocol_major_version;
1534		public uint16 protocol_minor_version;
1535		public uint32 release_number;
1536		public uint32 resource_id_base;
1537		public uint32 resource_id_mask;
1538		public uint32 motion_buffer_size;
1539		private uint16 vendor_len;
1540		[CCode (cname = "xcb_setup_vendor")]
1541		private unowned string vala_vendor ();
1542		public string vendor { owned get { return "%.*s".printf (vendor_len, vala_vendor ()); } }
1543		public uint32 maximum_request_length;
1544		public uint8 image_byte_order;
1545		public uint8 bitmap_format_bit_order;
1546		public uint8 bitmap_format_scanline_unit;
1547		public uint8 bitmap_format_scanline_pad;
1548		public Keycode min_keycode;
1549		public Keycode max_keycode;
1550		private uint8 pixmap_formats_len;
1551		[CCode (cname = "xcb_setup_pixmap_formats")]
1552		private Format* vala_pixmap_formats ();
1553		public Format[] pixmap_formats
1554		{
1555			get
1556			{
1557				unowned Format[] res = (Format[]) vala_pixmap_formats ();
1558				res.length = pixmap_formats_len;
1559				return res;
1560			}
1561		}
1562		private uint8 roots_len;
1563		[Version (deprecated_since = "vala-0.26", replacement = "Xcb.Setup.screens")]
1564		public int roots_length ();
1565		public ScreenIterator roots_iterator ();
1566		public Screen[] screens {
1567			owned get
1568			{
1569				var value = new Screen[roots_len];
1570				var iter = roots_iterator ();
1571				for (var i = 0; i < value.length; i++)
1572				{
1573					value[i] = iter.data;
1574					ScreenIterator.next (ref iter);
1575				}
1576				return value;
1577			}
1578		}
1579	}
1580
1581	public const char COPY_FROM_PARENT;
1582
1583	[CCode (cname = "xcb_window_class_t", has_type_id = false)]
1584	public enum WindowClass {
1585		COPY_FROM_PARENT,
1586		INPUT_OUTPUT,
1587		INPUT_ONLY
1588	}
1589
1590	[Compact]
1591	[CCode (cname = "xcb_generic_event_t", ref_function = "", unref_function = "")]
1592	public class GenericEvent {
1593		public uint8 response_type;
1594		public uint8 extension;
1595		public uint16 sequence;
1596		public uint32 length;
1597		public uint16 event_type;
1598		public uint32 full_sequence;
1599	}
1600
1601	[SimpleType]
1602	[CCode (cname = "xcb_timestamp_t", has_type_id = false)]
1603	public struct Timestamp : uint32 {
1604	}
1605
1606	[SimpleType]
1607	[CCode (cname = "xcb_keycode_t", has_type_id = false)]
1608	public struct Keycode : uint8 {
1609	}
1610
1611	[SimpleType]
1612	[CCode (cname = "xcb_colormap_t", has_type_id = false)]
1613	public struct Colormap : uint32 {
1614	}
1615
1616	[Compact]
1617	[CCode (cname = "xcb_key_press_event_t", ref_function = "", unref_function = "")]
1618	public class KeyPressEvent : GenericEvent {
1619		public Keycode detail;
1620		public uint16 sequence;
1621		public Timestamp time;
1622		public Window root;
1623		public Window event;
1624		public Window child;
1625		public uint16 root_x;
1626		public uint16 root_y;
1627		public uint16 event_x;
1628		public uint16 event_y;
1629		public uint16 state;
1630		public uint8 same_screen;
1631	}
1632
1633	[Compact]
1634	[CCode (cname = "xcb_key_release_event_t", ref_function = "", unref_function = "")]
1635	public class KeyReleaseEvent : GenericEvent {
1636		public Keycode detail;
1637		public uint16 sequence;
1638		public Timestamp time;
1639		public Window root;
1640		public Window event;
1641		public Window child;
1642		public uint16 root_x;
1643		public uint16 root_y;
1644		public uint16 event_x;
1645		public uint16 event_y;
1646		public uint16 state;
1647		public uint8 same_screen;
1648	}
1649
1650	[Compact]
1651	[CCode (cname = "xcb_generic_error_t", ref_function = "", unref_function = "")]
1652	public class GenericError {
1653		public uint8 response_type;
1654		public uint8 error_code;
1655		public uint16 sequence;
1656		public uint32 resource_id;
1657		public uint16 minor_code;
1658		public uint8 major_code;
1659	}
1660
1661	[Compact]
1662	[CCode (cname = "xcb_button_press_event_t", ref_function = "", unref_function = "")]
1663	public class ButtonPressEvent : GenericEvent {
1664		public Button detail;
1665		public Window root;
1666		public Window event;
1667		public Window child;
1668		public uint16 root_x;
1669		public uint16 root_y;
1670		public uint16 event_x;
1671		public uint16 event_y;
1672	}
1673
1674	[Compact]
1675	[CCode (cname = "xcb_button_release_event_t", ref_function = "", unref_function = "")]
1676	public class ButtonReleaseEvent : GenericEvent {
1677		public Button detail;
1678		public Window root;
1679		public Window event;
1680		public Window child;
1681		public uint16 root_x;
1682		public uint16 root_y;
1683		public uint16 event_x;
1684		public uint16 event_y;
1685	}
1686
1687	[Compact]
1688	[CCode (cname = "xcb_motion_notify_event_t", ref_function = "", unref_function = "")]
1689	public class MotionNotifyEvent : GenericEvent {
1690		public uint8 detail;
1691		public uint16 sequence;
1692		public Timestamp time;
1693		public Window root;
1694		public Window event;
1695		public Window child;
1696		public uint16 root_x;
1697		public uint16 root_y;
1698		public uint16 event_x;
1699		public uint16 event_y;
1700		public uint16 state;
1701		public uint8 same_screen;
1702	}
1703
1704	[Compact]
1705	[CCode (cname = "xcb_expose_event_t", ref_function = "", unref_function = "")]
1706	public class ExposeEvent : GenericEvent {
1707		public uint16 sequence;
1708		public Window window;
1709		public uint16 x;
1710		public uint16 y;
1711		public uint16 width;
1712		public uint16 height;
1713		public uint16 count;
1714	}
1715
1716	[Compact]
1717	[CCode (cname = "xcb_enter_notify_event_t", ref_function = "", unref_function = "")]
1718	public class EnterNotifyEvent : GenericEvent {
1719		public uint8 detail;
1720		public uint16 sequence;
1721		public Timestamp time;
1722		public Window root;
1723		public Window event;
1724		public Window child;
1725		public uint16 root_x;
1726		public uint16 root_y;
1727		public uint16 event_x;
1728		public uint16 event_y;
1729		public uint16 state;
1730		public uint8 mode;
1731		public uint8 same_screen_focus;
1732	}
1733
1734	[Compact]
1735	[CCode (cname = "xcb_leave_notify_event_t", ref_function = "", unref_function = "")]
1736	public class LeaveNotifyEvent : GenericEvent {
1737		public uint8 detail;
1738		public uint16 sequence;
1739		public Timestamp time;
1740		public Window root;
1741		public Window event;
1742		public Window child;
1743		public uint16 root_x;
1744		public uint16 root_y;
1745		public uint16 event_x;
1746		public uint16 event_y;
1747		public uint16 state;
1748		public uint8 mode;
1749		public uint8 same_screen_focus;
1750	}
1751
1752	[Compact]
1753	[CCode (cname = "xcb_keymap_notify_event_t", ref_function = "", unref_function = "")]
1754	public class KeymapNotifyEvent : GenericEvent {
1755		public uint8[] keys;
1756	}
1757
1758	[Compact]
1759	[CCode (cname = "xcb_visibility_notify_event_t", ref_function = "", unref_function = "")]
1760	public class VisibilityNotifyEvent : GenericEvent {
1761		uint16 sequence;
1762		public Window window;
1763		public uint8 state;
1764	}
1765
1766	[Compact]
1767	[CCode (cname = "xcb_create_notify_event_t", ref_function = "", unref_function = "")]
1768	public class CreateNotifyEvent {
1769		public uint8 response_type;
1770		public uint16 sequence;
1771		public Window parent;
1772		public Window window;
1773		public int16 x;
1774		public int16 y;
1775		public uint16 width;
1776		public uint16 height;
1777		public uint16 border_width;
1778		public uint8 override_redirect;
1779	}
1780
1781	[Compact]
1782	[CCode (cname = "xcb_destroy_notify_event_t", ref_function = "", unref_function = "")]
1783	public class DestroyNotifyEvent {
1784		public uint8 response_type;
1785		public uint16 sequence;
1786		public Window event;
1787		public Window window;
1788	}
1789
1790	[Compact]
1791	[CCode (cname = "xcb_unmap_notify_event_t", ref_function = "", unref_function = "")]
1792	public class UnmapNotifyEvent {
1793		public uint8 response_type;
1794		public uint16 sequence;
1795		public Window event;
1796		public Window window;
1797		public uint8 from_configure;
1798	}
1799
1800	[Compact]
1801	[CCode (cname = "xcb_map_notify_event_t", ref_function = "", unref_function = "")]
1802	public class MapNotifyEvent {
1803		public uint8 response_type;
1804		public uint16 sequence;
1805		public Window event;
1806		public Window window;
1807		public uint8 override_redirect;
1808	}
1809
1810	[Compact]
1811	[CCode (cname = "xcb_map_request_event_t", ref_function = "", unref_function = "")]
1812	public class MapRequestEvent {
1813		public uint8 response_type;
1814		public uint16 sequence;
1815		public Window parent;
1816		public Window window;
1817	}
1818
1819	[Compact]
1820	[CCode (cname = "xcb_reparent_notify_event_t", ref_function = "", unref_function = "")]
1821	public class ReparentNotifyEvent : GenericEvent {
1822		uint16 sequence;
1823		public Window event;
1824		public Window window;
1825		public Window parent;
1826		public int16 x;
1827		public int16 y;
1828		public uint8 override_redirect;
1829	}
1830
1831	[Compact]
1832	[CCode (cname = "xcb_configure_request_event_t", ref_function = "", unref_function = "")]
1833	public class ConfigureRequestEvent {
1834		public uint8 response_type;
1835		public uint8 stack_mode;
1836		public uint16 sequence;
1837		public Window parent;
1838		public Window window;
1839		public Window sibling;
1840		public int16 x;
1841		public int16 y;
1842		public uint16 width;
1843		public uint16 height;
1844		public uint16 border_width;
1845		public uint16 value_mask;
1846	}
1847
1848	[Compact]
1849	[CCode (cname = "xcb_configure_notify_event_t", ref_function = "", unref_function = "")]
1850	public class ConfigureNotifyEvent {
1851		public uint8      response_type;
1852		public uint16     sequence;
1853		public Window     event;
1854		public Window     window;
1855		public Window     above_sibling;
1856		public int16      x;
1857		public int16      y;
1858		public uint16     width;
1859		public uint16     height;
1860		public uint16     border_width;
1861		public uint8      override_redirect;
1862	}
1863
1864	[Compact]
1865	[CCode (cname = "xcb_gravity_notify_event_t", ref_function = "", unref_function = "")]
1866	public class GravityNotifyEvent : GenericEvent {
1867		uint16 sequence;
1868		public Window event;
1869		public Window window;
1870		public int16 x;
1871		public int16 y;
1872	}
1873
1874	[Compact]
1875	[CCode (cname = "xcb_circulate_notify_event_t", ref_function = "", unref_function = "")]
1876	public class CirculateNotifyEvent : GenericEvent {
1877		uint16 sequence;
1878		public Window event;
1879		public Window window;
1880		public uint8 place;
1881	}
1882
1883	[Compact]
1884	[CCode (cname = "xcb_property_notify_event_t", ref_function = "", unref_function = "")]
1885	public class PropertyNotifyEvent : GenericEvent {
1886		uint16 sequence;
1887		public Window window;
1888		public AtomT atom;
1889		public Timestamp time;
1890		public uint8 state;
1891	}
1892
1893	[Compact]
1894	[CCode (cname = "xcb_selection_notify_event_t", ref_function = "", unref_function = "")]
1895	public class SelectionNotifyEvent : GenericEvent {
1896		uint16 sequence;
1897		public Timestamp time;
1898		public Window requestor;
1899		public AtomT selection;
1900		public AtomT target;
1901		public AtomT property;
1902	}
1903
1904	[Compact]
1905	[CCode (cname = "xcb_colormap_notify_event_t", ref_function = "", unref_function = "")]
1906	public class ColormapNotifyEvent : GenericEvent {
1907		uint16 sequence;
1908		public Window window;
1909		public Colormap colormap;
1910		public uint8 _new;
1911		public uint8 state;
1912	}
1913
1914	[Compact]
1915	[CCode (cname = "xcb_mapping_notify_event_t", ref_function = "", unref_function = "")]
1916	public class MappingNotifyEvent : GenericEvent {
1917		uint16 sequence;
1918		public uint8 request;
1919		public Keycode first_keycode;
1920		public uint8 count;
1921	}
1922
1923	[CCode (cname = "xcb_cw_t", has_type_id = false)]
1924	public enum CW {
1925		BACK_PIXMAP,
1926		BACK_PIXEL,
1927		BORDER_PIXMAP,
1928		BORDER_PIXEL,
1929		BIT_GRAVITY,
1930		WIN_GRAVITY,
1931		BACKING_STORE,
1932		BACKING_PLANES,
1933		BACKING_PIXEL,
1934		OVERRIDE_REDIRECT,
1935		SAVE_UNDER,
1936		EVENT_MASK,
1937		DONT_PROPAGATE,
1938		COLORMAP,
1939		CURSOR
1940	}
1941
1942	[CCode (cname = "xcb_event_mask_t", has_type_id = false)]
1943	public enum EventMask {
1944		NO_EVENT,
1945		KEY_PRESS,
1946		KEY_RELEASE,
1947		BUTTON_PRESS,
1948		BUTTON_RELEASE,
1949		ENTER_WINDOW,
1950		LEAVE_WINDOW,
1951		POINTER_MOTION,
1952		POINTER_MOTION_HINT,
1953		BUTTON_1_MOTION,
1954		BUTTON_2_MOTION,
1955		BUTTON_3_MOTION,
1956		BUTTON_4_MOTION,
1957		BUTTON_5_MOTION,
1958		BUTTON_MOTION,
1959		KEYMAP_STATE,
1960		EXPOSURE,
1961		VISIBILITY_CHANGE,
1962		STRUCTURE_NOTIFY,
1963		RESIZE_REDIRECT,
1964		SUBSTRUCTURE_NOTIFY,
1965		SUBSTRUCTURE_REDIRECT,
1966		FOCUS_CHANGE,
1967		PROPERTY_CHANGE,
1968		COLOR_MAP_CHANGE,
1969		OWNER_GRAB_BUTTON
1970	}
1971
1972	[SimpleType]
1973	[CCode (cname = "xcb_format_t", has_type_id = false)]
1974	public struct Format {
1975		public uint8 depth;
1976		public uint8 bits_per_pixel;
1977		public uint8 scanline_pad;
1978	}
1979
1980	[SimpleType]
1981	[CCode (cname = "xcb_format_iterator_t", has_type_id = false)]
1982	private struct FormatIterator {
1983		public unowned Format data;
1984		public int rem;
1985		public int index;
1986		[CCode (cname = "xcb_format_next")]
1987		public static void next (ref FormatIterator iter);
1988	}
1989
1990	[Compact]
1991	[CCode (cname = "xcb_screen_t", ref_function = "", unref_function = "")]
1992	public class Screen {
1993		public Window root;
1994		public Colormap default_colormap;
1995		public uint32 white_pixel;
1996		public uint32 black_pixel;
1997		public uint32 current_input_masks;
1998		public uint16 width_in_pixels;
1999		public uint16 height_in_pixels;
2000		public uint16 width_in_millimeters;
2001		public uint16 height_in_millimeters;
2002		public uint16 min_installed_maps;
2003		public uint16 max_installed_maps;
2004		public VisualID root_visual;
2005		public uint8 backing_stores;
2006		public uint8 save_unders;
2007		public uint8 root_depth;
2008		private uint8 allowed_depths_len;
2009		public DepthIterator allowed_depths_iterator ();
2010		public Depth[] allowed_depths
2011		{
2012			owned get
2013			{
2014				var value = new Depth[allowed_depths_len];
2015				var iter = allowed_depths_iterator ();
2016				for (var i = 0; i < value.length; i++)
2017				{
2018					value[i] = iter.data;
2019					DepthIterator.next (ref iter);
2020				}
2021				return value;
2022			}
2023		}
2024	}
2025
2026	[SimpleType]
2027	[CCode (cname = "xcb_screen_iterator_t", has_type_id = false)]
2028	public struct ScreenIterator {
2029		public unowned Screen data;
2030		public int rem;
2031		public int index;
2032		[CCode (cname = "xcb_screen_next")]
2033		public static void next (ref ScreenIterator iter);
2034	}
2035
2036	[Compact]
2037	[CCode (cname = "xcb_depth_t", ref_function = "", unref_function = "")]
2038	public class Depth {
2039		public uint8 depth;
2040		private uint16 visuals_len;
2041		[CCode (cname = "xcb_depth_visuals")]
2042		private VisualType* vala_visuals ();
2043		public VisualType[] visuals
2044		{
2045			get {
2046				unowned VisualType[] res = (VisualType[]) vala_visuals ();
2047				res.length = (int) visuals_len;
2048				return res;
2049			}
2050		}
2051		[Version (deprecated_since = "vala-0.26", replacement = "Xcb.Depth.visuals")]
2052		public VisualTypeIterator visuals_iterator ();
2053	}
2054
2055	[Compact]
2056	[CCode (cname = "xcb_query_tree_reply_t", ref_function = "", unref_function = "")]
2057	public class QueryTreeReply {
2058		public Window root;
2059		public Window parent;
2060		public uint16 children_len;
2061		[CCode (cname = "xcb_query_tree_children", array_length = false)]
2062		public Window* children ();
2063	}
2064
2065	[SimpleType]
2066	[CCode (cname = "xcb_depth_iterator_t", has_type_id = false)]
2067	public struct DepthIterator {
2068		public unowned Depth data;
2069		public int rem;
2070		[CCode (cname = "xcb_depth_next")]
2071		public static void next (ref DepthIterator iter);
2072	}
2073
2074	[Version (deprecated_since = "vala-0.26", replacement = "Xcb.Depth.visuals")]
2075	[SimpleType]
2076	[CCode (cname = "xcb_visualtype_iterator_t", has_type_id = false)]
2077	public struct VisualTypeIterator {
2078		public unowned VisualType data;
2079		public int rem;
2080		[CCode (cname = "xcb_visualtype_next")]
2081		public static void next (ref VisualTypeIterator iter);
2082	}
2083
2084	[SimpleType]
2085	[CCode (cname = "xcb_void_cookie_t", has_type_id = false)]
2086	public struct VoidCookie {
2087	}
2088
2089	[SimpleType]
2090	[CCode (cname = "xcb_query_tree_cookie_t", has_type_id = false)]
2091	public struct QueryTreeCookie {
2092	}
2093
2094	[CCode (cname = "xcb_point_t", has_type_id = false)]
2095	public struct Point {
2096		public int16 x;
2097		public int16 y;
2098	}
2099
2100	[CCode (cname = "xcb_rectangle_t", has_type_id = false)]
2101	public struct Rectangle {
2102		public int16 x;
2103		public int16 y;
2104		public uint16 width;
2105		public uint16 height;
2106	}
2107
2108	[CCode (cname = "xcb_arc_t", has_type_id = false)]
2109	public struct Arc {
2110		public int16 x;
2111		public int16 y;
2112		public uint16 width;
2113		public uint16 height;
2114		public int16 angle1;
2115		public int16 angle2;
2116	}
2117
2118	[CCode (cname = "xcb_segment_t", has_type_id = false)]
2119	public struct Segment {
2120		public int16 x1;
2121		public int16 y1;
2122		public int16 x2;
2123		public int16 y2;
2124	}
2125
2126	[SimpleType]
2127	[CCode (cname = "xcb_visualid_t", has_type_id = false)]
2128	public struct VisualID : uint32 {
2129	}
2130
2131	[SimpleType]
2132	[CCode (cname = "xcb_button_t", has_type_id = false)]
2133	public struct Button : uint8 {
2134	}
2135
2136	[SimpleType]
2137	[CCode (cname = "xcb_gcontext_t", has_type_id = false)]
2138	public struct GContext : uint32 {
2139	}
2140
2141	[SimpleType]
2142	[CCode (cname = "xcb_drawable_t", has_type_id = false)]
2143	public struct Drawable : uint32 {
2144	}
2145
2146	[SimpleType]
2147	[CCode (cname = "xcb_pixmap_t", has_type_id = false)]
2148	public struct Pixmap : uint32 {
2149	}
2150
2151	[SimpleType]
2152	[CCode (cname = "xcb_cursor_t", has_type_id = false)]
2153	public struct Cursor : uint32 {
2154	}
2155
2156	[SimpleType]
2157	[CCode (cname = "xcb_font_t", has_type_id = false)]
2158	public struct Font : uint32 {
2159	}
2160
2161	[SimpleType]
2162	[CCode (cname = "xcb_window_t", has_type_id = false)]
2163	public struct Window : uint32 {
2164	}
2165
2166	[CCode (cname = "xcb_visual_class_t", has_type_id = false)]
2167	public enum VisualClass {
2168		STATIC_GRAY,
2169		GRAY_SCALE,
2170		STATIC_COLOR,
2171		PSEUDO_COLOR,
2172		TRUE_COLOR,
2173		DIRECT_COLOR
2174	}
2175
2176	[SimpleType]
2177	[CCode (cname = "xcb_visualtype_t", has_type_id = false)]
2178	public struct VisualType {
2179		public VisualID visual_id;
2180		public uint8 _class;
2181		public uint8 bits_per_rgb_value;
2182		public uint16 colormap_entries;
2183		public uint32 red_mask;
2184		public uint32 green_mask;
2185		public uint32 blue_mask;
2186	}
2187
2188	[CCode (cname = "xcb_input_focus_t", has_type_id = false)]
2189	public enum InputFocus {
2190		NONE,
2191		POINTER_ROOT,
2192		PARENT,
2193		FOLLOW_KEYBOARD
2194	}
2195
2196	[CCode (cname = "xcb_font_draw_t", has_type_id = false)]
2197	public enum FontDraw {
2198		LEFT_TO_RIGHT,
2199		RIGHT_TO_LEFT
2200	}
2201
2202	[CCode (cname = "xcb_gc_t", has_type_id = false)]
2203	public enum GC
2204	{
2205		FUNCTION,
2206		PLANE_MASK,
2207		FOREGROUND,
2208		BACKGROUND,
2209		LINE_WIDTH,
2210		LINE_STYLE,
2211		CAP_STYLE,
2212		JOIN_STYLE,
2213		FILL_STYLE,
2214		FILL_RULE,
2215		TILE,
2216		STIPPLE,
2217		TILE_STIPPLE_ORIGIN_X,
2218		TILE_STIPPLE_ORIGIN_Y,
2219		FONT,
2220		SUBWINDOW_MODE,
2221		GRAPHICS_EXPOSURES,
2222		CLIP_ORIGIN_X,
2223		CLIP_ORIGIN_Y,
2224		CLIP_MASK,
2225		DASH_OFFSET,
2226		DASH_LIST,
2227		ARC_MODE
2228	}
2229
2230	[CCode (cname = "xcb_gx_t", has_type_id = false)]
2231	public enum GX
2232	{
2233		CLEAR,
2234		AND,
2235		AND_REVERSE,
2236		COPY,
2237		AND_INVERTED,
2238		NOOP,
2239		XOR,
2240		OR,
2241		NOR,
2242		EQUIV,
2243		INVERT,
2244		OR_REVERSE,
2245		COPY_INVERTED,
2246		OR_INVERTED,
2247		NAND,
2248		SET
2249	}
2250
2251	[CCode (cname = "xcb_line_style_t", has_type_id = false)]
2252	public enum LineStyle
2253	{
2254		SOLID,
2255		ON_OFF_DASH,
2256		DOUBLE_DASH
2257	}
2258
2259	[CCode (cname = "xcb_cap_style_t", has_type_id = false)]
2260	public enum CapStyle
2261	{
2262		NOT_LAST,
2263		BUTT,
2264		ROUND,
2265		PROJECTING
2266	}
2267
2268	[CCode (cname = "xcb_join_style_t", has_type_id = false)]
2269	public enum JoinStyle
2270	{
2271		MITER,
2272		ROUND,
2273		BEVEL
2274	}
2275
2276	[CCode (cname = "xcb_fill_style_t", has_type_id = false)]
2277	public enum FillStyle
2278	{
2279		SOLID,
2280		TILED,
2281		STIPPLED,
2282		OPAQUE_STIPPLED
2283	}
2284
2285	[CCode (cname = "xcb_fill_rule_t", has_type_id = false)]
2286	public enum FillRuleStyle
2287	{
2288		EVEN_ODD,
2289		WINDING
2290	}
2291
2292	[CCode (cname = "xcb_subwindow_mode_t", has_type_id = false)]
2293	public enum SubwindowMode
2294	{
2295		CLIP_BY_CHILDREN,
2296		INCLUDE_INFERIORS
2297	}
2298
2299	[CCode (cname = "xcb_arc_mode_t", has_type_id = false)]
2300	public enum ArcMode
2301	{
2302		CHORD,
2303		PIE_SLICE
2304	}
2305
2306	[CCode (cname = "xcb_clip_ordering_t", has_type_id = false)]
2307	public enum ClipOrdering
2308	{
2309		UNSORTED,
2310		Y_SORTED,
2311		YX_SORTED,
2312		YX_BANDED
2313	}
2314
2315	[CCode (cname = "xcb_coord_mode_t", has_type_id = false)]
2316	public enum CoordMode
2317	{
2318		ORIGIN,
2319		PREVIOUS
2320	}
2321
2322	[CCode (cname = "xcb_poly_shape_t", has_type_id = false)]
2323	public enum PolyShape
2324	{
2325		COMPLEX,
2326		NONCONVEX,
2327		CONVEX
2328	}
2329
2330	[CCode (cname = "xcb_image_format_t", has_type_id = false)]
2331	public enum ImageFormat
2332	{
2333		XY_BITMAP,
2334		XY_PIXMAP,
2335		Z_PIXMAP
2336	}
2337
2338	[CCode (cname = "xcb_color_flag_t", has_type_id = false)]
2339	public enum ColorFlag
2340	{
2341		RED,
2342		GREEN,
2343		BLUE
2344	}
2345
2346	[SimpleType]
2347	[CCode (cname = "xcb_coloritem_t", has_type_id = false)]
2348	public struct Coloritem {
2349		public uint32 pixel;
2350		public uint16 red;
2351		public uint16 green;
2352		public uint16 blue;
2353		public ColorFlag flags;
2354	}
2355
2356	[SimpleType]
2357	[CCode (cname = "xcb_rgb_t", has_type_id = false)]
2358	public struct RGB {
2359		public uint16 red;
2360		public uint16 green;
2361		public uint16 blue;
2362	}
2363
2364	[CCode (cname = "xcb_set_mode_t", has_type_id = false)]
2365	public enum SetMode
2366	{
2367		INSERT,
2368		DELETE
2369	}
2370
2371	[CCode (cname = "xcb_host_mode_t", has_type_id = false)]
2372	public enum HostMode
2373	{
2374		INSERT,
2375		DELETE
2376	}
2377
2378	[CCode (cname = "xcb_family_t", has_type_id = false)]
2379	public enum Family
2380	{
2381		INTERNET,
2382		DECNET,
2383		CHAOS,
2384		SERVER_INTERPRETED,
2385		INTERNET_6
2386	}
2387
2388	[CCode (cname = "xcb_access_control_t", has_type_id = false)]
2389	public enum AccessControl
2390	{
2391		DISABLE,
2392		ENABLE
2393	}
2394
2395	[CCode (cname = "xcb_close_down_t", has_type_id = false)]
2396	public enum CloseDown
2397	{
2398		DESTROY_ALL,
2399		RETAIN_PERMANENT,
2400		RETAIN_TEMPORARY
2401	}
2402
2403	[CCode (cname = "xcb_screen_saver_t", has_type_id = false)]
2404	public enum ScreenSaver
2405	{
2406		RESET,
2407		ACTIVE
2408	}
2409
2410	[Compact]
2411	[CCode (cname = "xcb_str_t", ref_function = "", unref_function = "")]
2412	private class Str {
2413		private uint8 name_len;
2414		[CCode (cname = "xcb_str_name")]
2415		private unowned string vala_name ();
2416		public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
2417	}
2418
2419	[SimpleType]
2420	[CCode (cname = "xcb_str_iterator_t", has_type_id = false)]
2421	private struct StrIterator {
2422		public unowned Str data;
2423		public int rem;
2424		public int index;
2425		[CCode (cname = "xcb_str_next")]
2426		public static void next (ref StrIterator iter);
2427	}
2428
2429	[Compact]
2430	[CCode (cname = "xcb_host_t", ref_function = "", unref_function = "")]
2431	public class Host {
2432		public Family family;
2433		private uint16 address_len;
2434		[CCode (cname = "xcb_host_address")]
2435		public unowned uint8* vala_address ();
2436		public uint8[] address
2437		{
2438			get
2439			{
2440				unowned uint8[] res = (uint8[]) vala_address ();
2441				res.length = address_len;
2442				return res;
2443			}
2444		}
2445	}
2446
2447	[SimpleType]
2448	[CCode (cname = "xcb_host_iterator_t", has_type_id = false)]
2449	private struct HostIterator {
2450		public unowned Host data;
2451		public int rem;
2452		public int index;
2453		[CCode (cname = "xcb_host_next")]
2454		public static void next (ref HostIterator iter);
2455	}
2456
2457	[SimpleType]
2458	[CCode (cname = "xcb_fontprop_t", has_type_id = false)]
2459	public struct Fontprop {
2460		public AtomT name;
2461		public uint32 value;
2462	}
2463
2464	[Compact]
2465	[CCode (cname = "xcb_fontprop_t", ref_function = "", unref_function = "")]
2466	public class Charinfo {
2467		public int16 left_side_bearing;
2468		public int16 right_side_bearing;
2469		public int16 character_width;
2470		public int16 ascent;
2471		public int16 descent;
2472		public uint16 attributes;
2473	}
2474
2475	[SimpleType]
2476	[CCode (cname = "xcb_fontprop_iterator_t", has_type_id = false)]
2477	private struct FontpropIterator {
2478		public unowned Fontprop data;
2479		public int rem;
2480		public int index;
2481		[CCode (cname = "xcb_fontprop_next")]
2482		public static void next (ref FontpropIterator iter);
2483	}
2484}
2485