xcb.vapi 81.3 KB
Newer Older
1 2 3
/* xcb.vapi
 *
 * Copyright (C) 2009  Jürg Billeter
4
 * Copyright (C) 2013  Sergio Costas
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
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")]
27 28
namespace Xcb {
	[Compact]
29
	[CCode (cname = "xcb_connection_t", cprefix = "xcb_", ref_function = "", unref_function = "xcb_disconnect")]
30
	public class Connection {
31 32
		[CCode (cname = "xcb_connect")]
		public Connection (string? display = null, out int screen = null);
33 34
		[CCode (cname = "xcb_connection_has_error")]
		public int has_error ();
35

36 37 38
		public void flush ();
		public uint32 generate_id ();
		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 48 49 50 51 52 53 54 55

		public VoidCookie destroy_window_checked (Window window);
		public VoidCookie destroy_window (Window window);

		public VoidCookie destroy_subwindows_checked (Window window);
		public VoidCookie destroy_subwindows (Window window);

		public VoidCookie change_save_set_checked (SetMode mode, Window window);
		public VoidCookie change_save_set (SetMode mode, Window window);

56
		public VoidCookie map_window (Window wid);
57
		public VoidCookie map_window_checked (Window wid);
58 59 60 61

		public VoidCookie map_subwindows_checked (Window window);
		public VoidCookie map_subwindows (Window window);

62 63
		public VoidCookie unmap_window (Window wid);
		public VoidCookie unmap_window_checked (Window wid);
64 65 66 67 68 69 70

		public VoidCookie unmap_subwindows_checked (Window window);
		public VoidCookie unmap_subwindows (Window window);

		public VoidCookie circulate_window_checked (Circulate direction, Window window);
		public VoidCookie circulate_window (Circulate direction, Window window);

71 72
		public GetWindowAttributesCookie get_window_attributes (Window wid);
		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 86
		public InternAtomCookie intern_atom (bool only_if_exists, string name) {
			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 92
		public InternAtomCookie intern_atom_unchecked (bool only_if_exists, string name) {
			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 97 98
		public GetAtomNameCookie get_atom_name (AtomT atom);
		public GetAtomNameCookie get_atom_name_unchecked (AtomT atom);
		public GetAtomNameReply? get_atom_name_reply (GetAtomNameCookie cookie, out GenericError? e = 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 104
		public VoidCookie change_property_uint8 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint8 *data) {
			return this.vala_change_property (mode, window, property, type, 8, len, (void *)data);
105
		}
106 107
		public VoidCookie change_property_uint16 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint16 *data) {
			return this.vala_change_property (mode, window, property, type, 16, len, (void *)data);
108
		}
109 110
		public VoidCookie change_property_uint32 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint32 *data) {
			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
111
		}
112 113
		public VoidCookie change_property_atom (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, AtomT *data) {
			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
114
		}
115 116
		public VoidCookie change_property_string (PropMode mode, Window window, AtomT property, AtomT type, string data) {
			return this.vala_change_property (mode, window, property, type, 8, data.length, (void *)data.data);
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 123
		public VoidCookie change_property_checked_uint8 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint8 *data) {
			return this.vala_change_property (mode, window, property, type, 8, len, (void *)data);
124
		}
125 126
		public VoidCookie change_property_checked_uint16 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint16 *data) {
			return this.vala_change_property (mode, window, property, type, 16, len, (void *)data);
127
		}
128 129
		public VoidCookie change_property_checked_uint32 (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, uint32 *data) {
			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
130
		}
131 132
		public VoidCookie change_property_checked_atom (PropMode mode, Window window, AtomT property, AtomT type, uint32 len, AtomT *data) {
			return this.vala_change_property (mode, window, property, type, 32, len, (void *)data);
133
		}
134 135
		public VoidCookie change_property_checked_string (PropMode mode, Window window, AtomT property, AtomT type, string data) {
			return this.vala_change_property (mode, window, property, type, 8, data.length, (void *)data.data);
136
		}
137 138 139 140

		public VoidCookie delete_property_checked (Window window, AtomT property);
		public VoidCookie delete_property (Window window, AtomT property);

141 142 143
		public GetPropertyCookie get_property (bool _delete, Window window, AtomT property, AtomT type, uint32 long_offset, uint32 long_length);
		public GetPropertyCookie get_property_unchecked (bool _delete, Window window, AtomT property, AtomT type, uint32 long_offset, uint32 long_length);
		public GetPropertyReply? get_property_reply (GetPropertyCookie cookie, out GenericError? e = null);
144

145 146
		public ListPropertiesCookie list_properties (Window window);
		public ListPropertiesCookie list_properties_unchecked (Window window);
147
		public ListPropertiesReply? list_properties_reply (ListPropertiesCookie cookie, out GenericError? e = null);
148

149 150
		public VoidCookie configure_window (Window window, uint16 value_mask, uint32 *value_list);
		public VoidCookie configure_window_checked (Window window, uint16 value_mask, uint32 *value_list);
151
		
152 153
		public VoidCookie reparent_window (Window window, Window parent, uint16 x, uint16 y);
		public VoidCookie reparent_window_checked (Window window, Window parent, uint16 x, uint16 y);
Sergio Costas's avatar
Sergio Costas committed
154

155 156 157
		public GetGeometryCookie get_geometry (Drawable drawable);
		public GetGeometryCookie get_geometry_unchecked (Drawable drawable);
		public GetGeometryReply? get_geometry_reply (GetGeometryCookie cookie, out GenericError ? e);
158

159 160 161 162 163
		public VoidCookie set_selection_owner_checked (Window owner, AtomT selection, Timestamp time);
		public VoidCookie set_selection_owner (Window owner, AtomT selection, Timestamp time);

		public GetSelectionOwnerCookie get_selection_owner (AtomT selection);
		public GetSelectionOwnerCookie get_selection_owner_unchecked (AtomT selection);
164
		public GetSelectionOwnerReply? get_selection_owner_reply (GetSelectionOwnerCookie cookie, out GenericError? e = null);
165 166 167 168 169 170 171 172

		public VoidCookie convert_selection_checked (Window requestor, AtomT selection, AtomT target, AtomT property, Timestamp time);
		public VoidCookie convert_selection (Window requestor, AtomT selection, AtomT target, AtomT property, Timestamp time);

		//send_event

		public GrabPointerCookie grab_pointer (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, Timestamp time);
		public GrabPointerCookie grab_pointer_unchecked (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, Timestamp time);
173
		public GrabPointerReply? grab_pointer_reply (GrabPointerCookie cookie, out GenericError? e = null);
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188

		public VoidCookie ungrab_pointer_checked (Timestamp time);
		public VoidCookie ungrab_pointer (Timestamp time);

		public VoidCookie grab_button_checked (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, uint8 button, uint16 modifiers);
		public VoidCookie grab_button (bool owner_events, Window grab_window, uint16 event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, Window confine_to, Cursor cursor, uint8 button, uint16 modifiers);

		public VoidCookie ungrab_button_checked (uint8 button, Window grab_window, uint16 modifiers);
		public VoidCookie ungrab_button (uint8 button, Window grab_window, uint16 modifiers);

		public VoidCookie change_active_pointer_grab_checked (Cursor cursor, Timestamp time, uint16 event_mask);
		public VoidCookie change_active_pointer_grab (Cursor cursor, Timestamp time, uint16 event_mask);

		public GrabKeyboardCookie grab_keyboard (bool owner_events, Window grab_window, Timestamp time, GrabMode pointer_mode, GrabMode keyboard_mode);
		public GrabKeyboardCookie grab_keyboard_unchecked (bool owner_events, Window grab_window, Timestamp time, GrabMode pointer_mode, GrabMode keyboard_mode);
189
		public GrabKeyboardReply? grab_keyboard_reply (GrabKeyboardCookie cookie, out GenericError? e = null);
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209

		public VoidCookie ungrab_keyboard_checked (Timestamp time);
		public VoidCookie ungrab_keyboard (Timestamp time);

		public VoidCookie grab_key_checked (bool owner_events, Window grab_window, uint16 modifiers, Keycode key, GrabMode pointer_mode, GrabMode keyboard_mode);
		public VoidCookie grab_key (bool owner_events, Window grab_window, uint16 modifiers, Keycode key, GrabMode pointer_mode, GrabMode keyboard_mode);

		public VoidCookie ungrab_key_checked (Keycode key, Window grab_window, uint16 modifiers);
		public VoidCookie ungrab_key (Keycode key, Window grab_window, uint16 modifiers);

		//allow_events

		public VoidCookie grab_server_checked ();
		public VoidCookie grab_server ();

		public VoidCookie ungrab_server_checked ();
		public VoidCookie ungrab_server ();

		public QueryPointerCookie query_pointer (Window window);
		public QueryPointerCookie query_pointer_unchecked (Window window);
210
		public QueryPointerReply? query_pointer_reply (QueryPointerCookie cookie, out GenericError? e = null);
211 212 213

		public GetMotionEventsCookie get_motion_events (Window window, Timestamp start, Timestamp stop);
		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 217

		public TranslateCoordinatesCookie translate_coordinates (Window src_window, Window dst_window, int16 src_x, int16 src_y);
		public TranslateCoordinatesCookie translate_coordinates_unchecked (Window src_window, Window dst_window, int16 src_x, int16 src_y);
218
		public TranslateCoordinatesReply? translate_coordinates_reply (TranslateCoordinatesCookie cookie, out GenericError? e = null);
219 220 221 222 223 224 225 226 227

		public VoidCookie warp_pointer_checked (Window src_window, Window dst_window, int16 src_x, int16 src_y, uint16 src_width, uint16 src_height, int16 dst_x, int16 dst_y);
		public VoidCookie warp_pointer (Window src_window, Window dst_window, int16 src_x, int16 src_y, uint16 src_width, uint16 src_height, int16 dst_x, int16 dst_y);

		public VoidCookie set_input_focus_checked (InputFocus revert_to, Window focus, Timestamp time);
		public VoidCookie set_input_focus (InputFocus revert_to, Window focus, Timestamp time);

		public GetInputFocusCookie get_input_focus ();
		public GetInputFocusCookie get_input_focus_unchecked ();
228
		public GetInputFocusReply? get_input_focus_reply (GetInputFocusCookie cookie, out GenericError? e = null);
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249

		//query_keymap

		[CCode (cname = "xcb_open_font_checked")]
		private VoidCookie vala_open_font_checked (Font fid, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_open_font_checked")]
		public VoidCookie open_font_checked (Font fid, string name) {
			return this.vala_open_font_checked (fid, (uint16) name.length, name);
		}
		[CCode (cname = "xcb_open_font")]
		private VoidCookie vala_open_font (Font fid, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_open_font")]
		public VoidCookie open_font (Font fid, string name) {
			return this.vala_open_font (fid, (uint16) name.length, name);
		}

		public VoidCookie close_font_checked (Font fid);
		public VoidCookie close_font (Font fid);

		public QueryFontCookie query_font (Fontable font);
		public QueryFontCookie query_font_unchecked (Fontable font);
250
		public QueryFontReply? query_font_reply (QueryFontCookie cookie, out GenericError? e = null);
251 252 253 254 255 256 257 258 259 260 261 262 263

		/*[CCode (cname = "xcb_query_text_extents")]
		private QueryTextExtentsCookie vala_query_text_extents (Fontable font, uint32 string_len, Char2b* s);
		[CCode (cname = "vala_xcb_query_text_extents")]
		public QueryTextExtentsCookie query_text_extents (Fontable font, uint16[] s) {
			this.vala_query_text_extents (font, s.length, s);
		}
		[CCode (cname = "xcb_query_text_extents_unchecked")]
		private QueryTextExtentsCookie vala_query_text_extents_unchecked (Fontable font, uint32 string_len, Char2b* s);
		[CCode (cname = "vala_xcb_query_text_extents_unchecked")]
		public QueryTextExtentsCookie query_text_extents_unchecked (Fontable font, uint16[] s) { // FIXME: How to handle Char2b?
			this.vala_query_text_extents_unchecked (font, s.length, s);
		}
264
		public QueryTextExtentsReply? query_text_extents_reply (QueryTextExtentsCookie cookie, out GenericError? e = null);*/
265 266 267 268 269 270 271 272 273 274 275 276 277

		[CCode (cname = "xcb_list_fonts")]
		private ListFontsCookie vala_list_fonts (uint16 max_names, uint16 pattern_len, string pattern);
		[CCode (cname = "vala_xcb_list_fonts")]
		public ListFontsCookie list_fonts (uint16 max_names, string pattern) {
			return this.vala_list_fonts (max_names, (uint16) pattern.length, pattern);
		}
		[CCode (cname = "xcb_list_fonts_unchecked")]
		private ListFontsCookie vala_list_fonts_unchecked (uint16 max_names, uint16 pattern_len, string pattern);
		[CCode (cname = "vala_xcb_list_fonts_unchecked")]
		public ListFontsCookie list_fonts_unchecked (uint16 max_names, string pattern) {
			return this.vala_list_fonts_unchecked (max_names, (uint16) pattern.length, pattern);
		}
278
		public ListFontsReply? list_fonts_reply (ListFontsCookie cookie, out GenericError? e = null);
279 280 281 282 283 284 285 286 287 288 289 290 291

		[CCode (cname = "xcb_list_fonts_with_info")]
		private ListFontsWithInfoCookie vala_list_fonts_with_info (uint16 max_names, uint16 pattern_len, string pattern);
		[CCode (cname = "vala_xcb_list_fonts_with_info")]
		public ListFontsWithInfoCookie list_fonts_with_info (uint16 max_names, string pattern) {
			return this.vala_list_fonts_with_info (max_names, (uint16) pattern.length, pattern);
		}
		[CCode (cname = "xcb_list_fonts_with_info_unchecked")]
		private ListFontsWithInfoCookie vala_list_fonts_with_info_unchecked (uint16 max_names, uint16 pattern_len, string pattern);
		[CCode (cname = "vala_xcb_list_fonts_with_info_unchecked")]
		public ListFontsWithInfoCookie list_fonts_with_info_unchecked (uint16 max_names, string pattern) {
			return this.vala_list_fonts_with_info_unchecked (max_names, (uint16) pattern.length, pattern);
		}
292
		public ListFontsWithInfoReply? list_fonts_with_info_reply (ListFontsWithInfoCookie cookie, out GenericError? e = null);
293 294 295 296 297

		//set_font_path

		public GetFontPathCookie get_font_path ();
		public GetFontPathCookie get_font_path_unchecked ();
298
		public GetFontPathReply? get_font_path_reply (GetFontPathCookie cookie, out GenericError? e = null);
299

300 301
		public VoidCookie create_pixmap_checked (uint8 depth, Pixmap pid, Drawable drawable, uint16 width, uint16 height);
		public VoidCookie create_pixmap (uint8 depth, Pixmap pid, Drawable drawable, uint16 width, uint16 height);
302

303 304
		public VoidCookie free_pixmap_checked (Pixmap pid);
		public VoidCookie free_pixmap (Pixmap pid);
Robert Ancell's avatar
Robert Ancell committed
305 306 307

		public VoidCookie create_gc_checked (GContext cid, Drawable drawable, uint32 value_mask = 0, [CCode (array_length = false)] uint32[]? value_list = null);
		public VoidCookie create_gc (GContext cid, Drawable drawable, uint32 value_mask = 0, [CCode (array_length = false)] uint32[]? value_list = null);
308

Robert Ancell's avatar
Robert Ancell committed
309 310
		public VoidCookie change_gc_checked (GContext gc, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
		public VoidCookie change_gc (GContext gc, uint32 value_mask, [CCode (array_length = false)] uint32[]? value_list);
311

Robert Ancell's avatar
Robert Ancell committed
312 313
		public VoidCookie copy_gc_checked (GContext src_gc, GContext dst_gc, uint32 value_mask);
		public VoidCookie copy_gc (GContext src_gc, GContext dst_gc, uint32 value_mask);
314 315 316 317 318 319 320

		public VoidCookie set_dashes_checked (GContext gc, uint16 dash_offset, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] dashes);
		public VoidCookie set_dashes (GContext gc, uint16 dash_offset, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] dashes);

		public VoidCookie set_clip_rectangles_checked (ClipOrdering ordering, GContext gc, int16 clip_x_origin, int16 clip_y_origin, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
		public VoidCookie set_clip_rectangles (ClipOrdering ordering, GContext gc, int16 clip_x_origin, int16 clip_y_origin, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Rectangle[] rectangles);

Robert Ancell's avatar
Robert Ancell committed
321 322 323
		public VoidCookie free_gc_checked (GContext gc);
		public VoidCookie free_gc (GContext gc);

324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
		public VoidCookie clear_area_checked (uint8 exposures, Window window, int16 x, int16 y, uint16 width, uint16 height);
		public VoidCookie clear_area (uint8 exposures, Window window, int16 x, int16 y, uint16 width, uint16 height);

		public VoidCookie copy_area_checked (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height);
		public VoidCookie copy_area (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height);

		public VoidCookie copy_plane_checked (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height, uint32 bit_plane);
		public VoidCookie copy_plane (Drawable src_drawable, Drawable dst_drawable, GContext gc, int16 src_x, int16 src_y, int16 dst_x, int16 dst_y, uint16 width, uint16 height, uint32 bit_plane);

		public VoidCookie poly_point_checked (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);
		public VoidCookie poly_point (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);

		public VoidCookie poly_line_checked (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length = false)] Point[] points);
		public VoidCookie poly_line (CoordMode coordinate_mode, Drawable drawable, GContext gc, [CCode (array_length_pos = 3.9, array_length_type = "uint32_t")] Point[] points);

		public VoidCookie poly_segment_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Segment[] segments);
		public VoidCookie poly_segment (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Segment[] segments);

		public VoidCookie poly_rectangle_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
		public VoidCookie poly_rectangle (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);

		public VoidCookie poly_arc_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);
		public VoidCookie poly_arc (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);

		public VoidCookie fill_poly_checked (Drawable drawable, GContext gc, PolyShape shape, CoordMode coordinate_mode, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Point[] points);
		public VoidCookie fill_poly (Drawable drawable, GContext gc, PolyShape shape, CoordMode coordinate_mode, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] Point[] points);

		public VoidCookie poly_fill_rectangle_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);
		public VoidCookie poly_fill_rectangle (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Rectangle[] rectangles);

		public VoidCookie poly_fill_arc_checked (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);
		public VoidCookie poly_fill_arc (Drawable drawable, GContext gc, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] Arc[] arcs);

		public VoidCookie put_image_checked (ImageFormat format, Drawable drawable, GContext gc, uint16 width, uint16 height, int16 dst_x, int16 dst_y, uint8 left_pad, uint8 depth, [CCode (array_length_pos = 9.9, array_length_type = "uint32_t")] uint8[] data);
		public VoidCookie put_image (ImageFormat format, Drawable drawable, GContext gc, uint16 width, uint16 height, int16 dst_x, int16 dst_y, uint8 left_pad, uint8 depth, [CCode (array_length_pos = 9.9, array_length_type = "uint32_t")] uint8[] data);

		public GetImageCookie get_image (ImageFormat format, Drawable drawable, int16 x, int16 y, uint16 width, uint16 height, uint32 plane_mask);
		public GetImageCookie get_image_unchecked (ImageFormat format, Drawable drawable, int16 x, int16 y, uint16 width, uint16 height, uint32 plane_mask);
362
		public GetImageReply? get_image_reply (GetImageCookie cookie, out GenericError? e = null);
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401

		public VoidCookie poly_text_8_checked (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
		public VoidCookie poly_text_8 (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);

		public VoidCookie poly_text_16_checked (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);
		public VoidCookie poly_text_16 (Drawable drawable, GContext gc, int16 x, int16 y, [CCode (array_length_pos = 4.9, array_length_type = "uint32_t")] uint8[] items);

		[CCode (cname = "xcb_image_text_8_checked")]
		private VoidCookie vala_image_text_8_checked (uint8 string_len, Drawable drawable, GContext gc, int16 x, int16 y, string text);
		[CCode (cname = "vala_xcb_image_text8_checked")]
		public VoidCookie image_text_8_checked (Drawable drawable, GContext gc, int16 x, int16 y, string text) {
			this.vala_image_text_8_checked ((uint8) text.length, drawable, gc, x, y, text);
		}
		[CCode (cname = "xcb_image_text_8")]
		private VoidCookie vala_image_text_8 (uint8 string_len, Drawable drawable, GContext gc, int16 x, int16 y, string text);
		[CCode (cname = "vala_xcb_image_text8")]
		public VoidCookie image_text_8 (Drawable drawable, GContext gc, int16 x, int16 y, string text) {
			this.vala_image_text_8 ((uint8) text.length, drawable, gc, x, y, text);
		}

		//image_text_16

		public VoidCookie create_colormap_checked (bool alloc, Colormap mid, Window window, VisualID visual);
		public VoidCookie create_colormap (bool alloc, Colormap mid, Window window, VisualID visual);

		public VoidCookie free_colormap_checked (Colormap cmap);
		public VoidCookie free_colormap (Colormap cmap);

		public VoidCookie copy_colormap_and_free_checked (Colormap mid, Colormap src_cmap);
		public VoidCookie copy_colormap_and_free (Colormap mid, Colormap src_cmap);

		public VoidCookie install_colormap_checked (Colormap cmap);
		public VoidCookie install_colormap (Colormap cmap);

		public VoidCookie uninstall_colormap_checked (Colormap cmap);
		public VoidCookie uninstall_colormap (Colormap cmap);

		public ListInstalledColormapsCookie list_installed_colormaps (Window window);
		public ListInstalledColormapsCookie list_installed_colormaps_unchecked (Window window);
402
		public ListInstalledColormapsReply? list_installed_colormaps_reply (ListInstalledColormapsCookie cookie, out GenericError? e = null);
403 404 405

		public AllocColorCookie alloc_color (Colormap cmap, uint16 red, uint16 green, uint16 blue);
		public AllocColorCookie alloc_color_unchecked (Colormap cmap, uint16 red, uint16 green, uint16 blue);
406
		public AllocColorReply? alloc_color_reply (AllocColorCookie cookie, out GenericError? e = null);
407 408 409 410 411 412 413 414 415 416 417 418 419

		[CCode (cname = "xcb_alloc_named_color")]
		private AllocNamedColorCookie vala_alloc_named_color (Colormap cmap, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_alloc_named_color")]
		public AllocNamedColorCookie alloc_named_color (Colormap cmap, string name) {
			this.vala_alloc_named_color (cmap, (uint16) name.length, name);
		}
		[CCode (cname = "xcb_alloc_named_color_unchecked")]
		private AllocNamedColorCookie vala_alloc_named_color_unchecked (Colormap cmap, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_alloc_named_color_unchecked")]
		public AllocNamedColorCookie alloc_named_color_unchecked (Colormap cmap, string name) {
			this.vala_alloc_named_color_unchecked (cmap, (uint16) name.length, name);
		}
420
		public AllocNamedColorReply? alloc_named_color_reply (AllocNamedColorCookie cookie, out GenericError? e = null);
421 422 423

		public AllocColorCellsCookie alloc_color_cells (bool contiguous, Colormap cmap, uint16 colors, uint16 planes);
		public AllocColorCellsCookie alloc_color_cells_unchecked (bool contiguous, Colormap cmap, uint16 colors, uint16 planes);
424
		public AllocColorCellsReply? alloc_color_cells_reply (AllocColorCellsCookie cookie, out GenericError? e = null);
425 426 427

		public AllocColorPlanesCookie alloc_color_planes (bool contiguous, Colormap cmap, uint16 colors, uint16 reds, uint16 greens, uint16 blues);
		public AllocColorPlanesCookie alloc_color_planes_unchecked (bool contiguous, Colormap cmap, uint16 colors, uint16 reds, uint16 greens, uint16 blues);
428
		public AllocColorPlanesReply? alloc_color_planes_reply (AllocColorPlanesCookie cookie, out GenericError? e = null);
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450

		public VoidCookie free_colors_checked (Colormap cmap, uint32 plane_mask, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] uint32[] pixels);
		public VoidCookie free_colors (Colormap cmap, uint32 plane_mask, [CCode (array_length_pos = 2.9, array_length_type = "uint32_t")] uint32[] pixels);

		public VoidCookie store_colors_checked (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] Coloritem[] items);
		public VoidCookie store_colors (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] Coloritem[] items);

		[CCode (cname = "xcb_store_named_color_checked")]
		private VoidCookie vala_store_named_color_checked (ColorFlag flags, Colormap cmap, uint32 pixel, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_store_named_color_checked")]
		public VoidCookie store_named_color_checked (ColorFlag flags, Colormap cmap, uint32 pixel, string name) {
			this.vala_store_named_color_checked (flags, cmap, pixel, (uint16) name.length, name);
		}
		[CCode (cname = "xcb_store_named_color")]
		private VoidCookie vala_store_named_color (ColorFlag flags, Colormap cmap, uint32 pixel, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_store_named_color")]
		public VoidCookie store_named_color (ColorFlag flags, Colormap cmap, uint32 pixel, string name) {
			this.vala_store_named_color (flags, cmap, pixel, (uint16) name.length, name);
		}

		public QueryColorsCookie query_colors (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] uint32[] pixels);
		public QueryColorsCookie query_colors_unchecked (Colormap cmap, [CCode (array_length_pos = 1.9, array_length_type = "uint32_t")] uint32[] pixels);
451
		public QueryColorsReply? query_colors_reply (QueryColorsCookie cookie, out GenericError? e = null);
452 453 454 455 456 457 458 459 460 461 462 463 464

		[CCode (cname = "xcb_lookup_color")]
		private LookupColorCookie vala_lookup_color (Colormap cmap, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_lookup_color")]
		public LookupColorCookie lookup_color (Colormap cmap, string name) {
			this.vala_lookup_color (cmap, (uint16) name.length, name);
		}
		[CCode (cname = "xcb_lookup_color_unchecked")]
		private LookupColorCookie vala_lookup_color_unchecked (Colormap cmap, uint16 name_len, string name);
		[CCode (cname = "vala_xcb_lookup_color_unchecked")]
		public LookupColorCookie lookup_color_unchecked (Colormap cmap, string name) {
			this.vala_lookup_color_unchecked (cmap, (uint16) name.length, name);
		}
465
		public LookupColorReply? lookup_color_reply (LookupColorCookie cookie, out GenericError? e = null);
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480

		public VoidCookie create_cursor_checked (Cursor cid, Pixmap source, Pixmap mask, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue, uint16 x, uint16 y);
		public VoidCookie create_cursor (Cursor cid, Pixmap source, Pixmap mask, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue, uint16 x, uint16 y);

		public VoidCookie create_glyph_cursor_checked (Cursor cid, Font source_font, Font mask_font, uint16 source_char, uint16 mask_char, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
		public VoidCookie create_glyph_cursor (Cursor cid, Font source_font, Font mask_font, uint16 source_char, uint16 mask_char, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);

		public VoidCookie free_cursor_checked (Cursor cursor);
		public VoidCookie free_cursor (Cursor cursor);

		public VoidCookie recolor_cursor_checked (Cursor cursor, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);
		public VoidCookie recolor_cursor (Cursor cursor, uint16 fore_red, uint16 fore_green, uint16 fore_blue, uint16 back_red, uint16 back_green, uint16 back_blue);

		public QueryBestSizeCookie query_best_size (uint8 _class, Drawable drawable, uint16 width, uint16 height); // FIXME: Is there an enum for class?
		public QueryBestSizeCookie query_best_size_unchecked (uint8 _class, Drawable drawable, uint16 width, uint16 height);
481
		public QueryBestSizeReply? query_best_size_reply (QueryBestSizeCookie cookie, out GenericError? e = null);
482 483 484 485 486 487 488 489 490 491 492 493 494

		[CCode (cname = "xcb_query_extension")]
		private QueryExtensionCookie vala_query_extension (uint16 name_len, string name);
		[CCode (cname = "vala_xcb_query_extension")]
		public QueryExtensionCookie query_extension (string name) {
			return this.vala_query_extension ((uint16) name.length, name);
		}
		[CCode (cname = "xcb_query_extension_unchecked")]
		private QueryExtensionCookie vala_query_extension_unchecked (uint16 name_len, string name);
		[CCode (cname = "vala_xcb_query_extension_unchecked")]
		public QueryExtensionCookie query_extension_unchecked (string name) {
			return this.vala_query_extension_unchecked ((uint16) name.length, name);
		}
495
		public QueryExtensionReply? query_extension_reply (QueryExtensionCookie cookie, out GenericError? e = null);
496 497 498

		public ListExtensionsCookie list_extensions ();
		public ListExtensionsCookie list_extensions_unchecked ();
499
		public ListExtensionsReply? list_extensions_reply (ListExtensionsCookie cookie, out GenericError? e = null);
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520

		//change_keyboard_mapping

		//get_keyboard_mapping

		//change_keyboard_control

		//get_keyboard_control

		public VoidCookie bell_checked (int8 percent);
		public VoidCookie bell (int8 percent);

		//change_pointer_control

		//get_pointer_control

		public VoidCookie set_screen_saver_checked (int16 timeout, int16 interval, uint8 prefer_blanking, uint8 allow_exposures);
		public VoidCookie set_screen_saver (int16 timeout, int16 interval, uint8 prefer_blanking, uint8 allow_exposures);

		public GetScreenSaverCookie get_screen_saver ();
		public GetScreenSaverCookie get_screen_saver_unchecked ();
521
		public GetScreenSaverReply? get_screen_saver_reply (GetScreenSaverCookie cookie, out GenericError? e = null);
522 523 524 525 526 527

		public VoidCookie change_hosts_checked (HostMode mode, Family family, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] address);
		public VoidCookie change_hosts (HostMode mode, Family family, [CCode (array_length_pos = 2.9, array_length_type = "uint16_t")] uint8[] address);

		public ListHostsCookie list_hosts ();
		public ListHostsCookie list_hosts_unchecked ();
528
		public ListHostsReply? list_hosts_reply (ListHostsCookie cookie, out GenericError? e = null);
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667

		public VoidCookie set_access_control_checked (AccessControl mode);
		public VoidCookie set_access_control (AccessControl mode);

		public VoidCookie set_close_down_mode_checked (CloseDown mode);
		public VoidCookie set_close_down_mode (CloseDown mode);

		public VoidCookie kill_client_checked (uint32 resource);
		public VoidCookie kill_client (uint32 resource);

		public VoidCookie rotate_properties_checked (Window window, int16 delta, [CCode (array_length_pos = 1.9, array_length_type = "uint16_t")] AtomT[] atoms);
		public VoidCookie rotate_properties (Window window, int16 delta, [CCode (array_length_pos = 1.9, array_length_type = "uint16_t")] AtomT[] atoms);

		public VoidCookie force_screen_saver_checked (ScreenSaver mode);
		public VoidCookie force_screen_saver (ScreenSaver mode);

		//set_pointer_mapping

		//get_pointer_mapping

		//set_modifier_mapping

		//get_modifier_mapping

		public VoidCookie no_operation_checked ();
		public VoidCookie no_operation ();
	}

	[CCode (cprefix = "XCB_CONN_", cname = "int", has_type_id = false)]
	public enum ConnectionError
	{
		ERROR,
		CLOSED_EXT_NOTSUPPORTED,
		CLOSED_MEM_INSUFFICIENT,
		CLOSED_REQ_LEN_EXCEED,
		CLOSED_PARSE_ERR,
		CLOSED_INVALID_SCREEN,
		CLOSED_FDPASSING_FAILED,
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_geometry_cookie_t", has_type_id = false)]
	public struct GetGeometryCookie {
	}

	[CCode (cname = "xcb_get_geometry_reply_t", ref_function = "", unref_function = "free")]
	public class GetGeometryReply {
		public uint8      response_type;
		public uint8      depth;
		public uint16     sequence;
		public uint32     length;
		public Window     root;
		public int16      x;
		public int16      y;
		public uint16     width;
		public uint16     height;
		public uint16     border_width;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_window_attributes_cookie_t", has_type_id = false)]
	public struct GetWindowAttributesCookie {
	}

	[Compact]
	[CCode (cname = "xcb_get_window_attributes_reply_t", ref_function = "", unref_function = "")]
	public class GetWindowAttributesReply {
		public uint8        response_type;
		public uint8        backing_store;
		public uint16       sequence;
		public uint32       length;
		public VisualID     visual;
		public uint16       _class;
		public uint8        bit_gravity;
		public uint8        win_gravity;
		public uint32       backing_planes;
		public uint32       backing_pixel;
		public uint8        save_under;
		public uint8        map_is_installed;
		public uint8        map_state;
		public uint8        override_redirect;
		public Colormap     colormap;
		public uint32       all_event_masks;
		public uint32       your_event_mask;
		public uint16       do_not_propagate_mask;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_property_cookie_t", has_type_id = false)]
	public struct GetPropertyCookie {
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_intern_atom_cookie_t", has_type_id = false)]
	public struct InternAtomCookie {
	}

	[Compact]
	[CCode (cname = "xcb_intern_atom_reply_t", ref_function = "", unref_function = "free")]
	public class InternAtomReply {
		private uint8    response_type;
		private uint16   sequence;
		public  uint32   length;
		public  AtomT    atom;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_atom_name_cookie_t", has_type_id = false)]
	public struct GetAtomNameCookie {
	}

	[Compact]
	[CCode (cname = "xcb_get_atom_name_reply_t", ref_function = "", unref_function = "free")]
	public class GetAtomNameReply {
		private uint8 response_type;
		private uint16 sequence;
		public uint32 length;
		public uint16 name_len;
		[CCode (cname = "xcb_get_atom_name_name")]
		private unowned string vala_name ();
		public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_list_properties_cookie_t", has_type_id = false)]
	public struct ListPropertiesCookie {
	}

	[Compact]
	[CCode (cname = "xcb_list_properties_reply_t", ref_function = "", unref_function = "free")]
	public class ListPropertiesReply {
		private uint16 atoms_len;
		[CCode (cname = "xcb_list_properties_atoms")]
668
		private Atom* vala_atoms ();
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129
		public Atom[] atoms
		{
			get
			{
				unowned Atom[] res = (Atom[]) vala_atoms ();
				res.length = atoms_len;
				return res;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_selection_owner_cookie_t", has_type_id = false)]
	public struct GetSelectionOwnerCookie {
	}

	[Compact]
	[CCode (cname = "xcb_get_selection_owner_reply_t", ref_function = "", unref_function = "free")]
	public class GetSelectionOwnerReply {
		public Window owner;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_grab_pointer_cookie_t", has_type_id = false)]
	public struct GrabPointerCookie {
	}

	[Compact]
	[CCode (cname = "xcb_grab_pointer_reply_t", ref_function = "", unref_function = "free")]
	public class GrabPointerReply {
		public GrabStatus status;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_grab_keyboard_cookie_t", has_type_id = false)]
	public struct GrabKeyboardCookie {
	}

	[Compact]
	[CCode (cname = "xcb_grab_keyboard_reply_t", ref_function = "", unref_function = "free")]
	public class GrabKeyboardReply {
		public GrabStatus status;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_query_pointer_cookie_t", has_type_id = false)]
	public struct QueryPointerCookie {
	}

	[Compact]
	[CCode (cname = "xcb_query_pointer_reply_t", ref_function = "", unref_function = "free")]
	public class QueryPointerReply {
		public uint8 same_screen;
		public Window root;
		public Window child;
		public int16 root_x;
		public int16 root_y;
		public int16 win_x;
		public int16 win_y;
		public uint16 mask;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_motion_events_cookie_t", has_type_id = false)]
	public struct GetMotionEventsCookie {
	}

	[Compact]
	[CCode (cname = "xcb_get_motion_events_reply_t", ref_function = "", unref_function = "free")]
	public class GetMotionEventsReply {
		private uint32 events_len;
		[CCode (cname = "xcb_get_motion_events_events")]
		private Timecoord* vala_events ();
		public Timecoord[] events
		{
			get
			{
				unowned Timecoord[] res = (Timecoord[]) vala_events ();
				res.length = (int) events_len;
				return res;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_image_cookie_t", has_type_id = false)]
	public struct GetImageCookie {
	}

	[Compact]
	[CCode (cname = "xcb_get_image_reply_t", ref_function = "", unref_function = "")]
	public class GetImageReply {
		public uint8 depth;
		public VisualID visual;
		private uint32 length;
		[CCode (cname = "xcb_get_image_data")]
		public uint8* vala_data ();
		public uint8[] data
		{
			get
			{
				unowned uint8[] res = (uint8[]) vala_data ();
				res.length = (int) length;
				return res;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_list_installed_colormaps_cookie_t", has_type_id = false)]
	public struct ListInstalledColormapsCookie {
	}

	[Compact]
	[CCode (cname = "xcb_list_installed_colormaps_reply_t", ref_function = "", unref_function = "free")]
	public class ListInstalledColormapsReply {
		private uint16 cmaps_len;
		[CCode (cname = "xcb_list_installed_colormaps_cmaps")]
		private Colormap* vala_cmaps ();
		public Colormap[] cmaps
		{
			get
			{
				unowned Colormap[] res = (Colormap[]) vala_cmaps ();
				res.length = (int) cmaps_len;
				return res;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_alloc_color_cookie_t", has_type_id = false)]
	public struct AllocColorCookie {
	}

	[Compact]
	[CCode (cname = "xcb_alloc_color_reply_t", ref_function = "", unref_function = "free")]
	public class AllocColorReply {
		public uint16 red;
		public uint16 green;
		public uint16 blue;
		public uint32 pixel;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_alloc_named_color_cookie_t", has_type_id = false)]
	public struct AllocNamedColorCookie {
	}

	[Compact]
	[CCode (cname = "xcb_alloc_named_color_reply_t", ref_function = "", unref_function = "free")]
	public class AllocNamedColorReply {
		public uint32 pixel;
		public uint16 exact_red;
		public uint16 exact_green;
		public uint16 exact_blue;
		public uint16 visual_red;
		public uint16 visual_green;
		public uint16 visual_blue;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_alloc_color_cells_cookie_t", has_type_id = false)]
	public struct AllocColorCellsCookie {
	}

	[Compact]
	[CCode (cname = "xcb_alloc_color_cells_reply_t", ref_function = "", unref_function = "free")]
	public class AllocColorCellsReply {
		private uint16 pixels_len;
		[CCode (cname = "xcb_alloc_color_cells_pixels")]
		private uint32* vala_pixels ();
		public uint32[] pixels
		{
			get {
				unowned uint32[] res = (uint32[]) vala_pixels ();
				res.length = (int) pixels_len;
				return res;
			}
		}
		private uint16 masks_len;
		[CCode (cname = "xcb_alloc_color_cells_masks")]
		private uint32* vala_masks ();
		public uint32[] masks
		{
			get {
				unowned uint32[] res = (uint32[]) vala_masks ();
				res.length = (int) masks_len;
				return res;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_alloc_color_planes_cookie_t", has_type_id = false)]
	public struct AllocColorPlanesCookie {
	}

	[Compact]
	[CCode (cname = "xcb_alloc_color_planes_reply_t", ref_function = "", unref_function = "free")]
	public class AllocColorPlanesReply {
		public uint32 red_mask;
		public uint32 green_mask;
		public uint32 blue_mask;
		private uint16 pixels_len;
		[CCode (cname = "xcb_alloc_color_planes_pixels")]
		private uint32* vala_pixels ();
		public uint32[] pixels
		{
			get {
				unowned uint32[] res = (uint32[]) vala_pixels ();
				res.length = (int) pixels_len;
				return res;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_query_colors_cookie_t", has_type_id = false)]
	public struct QueryColorsCookie {
	}

	[Compact]
	[CCode (cname = "xcb_query_colors_reply_t", ref_function = "", unref_function = "free")]
	public class QueryColorsReply {
		private uint16 colors_len;
		[CCode (cname = "xcb_query_colors_colors")]
		private RGB* vala_colors ();
		public RGB[] colors
		{
			get {
				unowned RGB[] res = (RGB[]) vala_colors ();
				res.length = (int) colors_len;
				return res;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_lookup_color_cookie_t", has_type_id = false)]
	public struct LookupColorCookie {
	}

	[Compact]
	[CCode (cname = "xcb_lookup_color_reply_t", ref_function = "", unref_function = "free")]
	public class LookupColorReply {
		public uint16 exact_red;
		public uint16 exact_green;
		public uint16 exact_blue;
		public uint16 visual_red;
		public uint16 visual_green;
		public uint16 visual_blue;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_query_best_size_cookie_t", has_type_id = false)]
	public struct QueryBestSizeCookie {
	}

	[Compact]
	[CCode (cname = "xcb_query_best_size_reply_t", ref_function = "", unref_function = "free")]
	public class QueryBestSizeReply {
		public uint16 width;
		public uint16 height;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_query_extension_cookie_t", has_type_id = false)]
	public struct QueryExtensionCookie {
	}

	[Compact]
	[CCode (cname = "xcb_query_extension_reply_t", ref_function = "", unref_function = "free")]
	public class QueryExtensionReply {
		public bool present;
		public uint8 major_opcode;
		public uint8 first_event;
		public uint8 first_error;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_list_extensions_cookie_t", has_type_id = false)]
	public struct ListExtensionsCookie {
	}

	[Compact]
	[CCode (cname = "xcb_list_extensions_reply_t", ref_function = "", unref_function = "free")]
	public class ListExtensionsReply {
		private uint8 names_len;
		[CCode (cname = "xcb_list_extensions_names_iterator")]
		private StrIterator names_iterator ();
		public string[] names
		{
			owned get
			{
				var value = new string[names_len];
				var iter = names_iterator ();
				for (var i = 0; i < value.length; i++)
				{
					value[i] = iter.data.name;
					StrIterator.next (ref iter);
				}
				return value;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_keyboard_mapping_cookie_t", has_type_id = false)]
	public struct GetKeyboardMappingCookie {
	}

	//[Compact]
	//[CCode (cname = "xcb_get_keyboard_mapping_reply_t", ref_function = "", unref_function = "free")]
	//public class GetKeyboardMappingReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_keyboard_control_cookie_t", has_type_id = false)]
	public struct GetKeyboardControlCookie {
	}

	//[Compact]
	//[CCode (cname = "xcb_get_keyboard_control_reply_t", ref_function = "", unref_function = "free")]
	//public class GetKeyboardControlReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_pointer_control_cookie_t", has_type_id = false)]
	public struct GetPointerControlCookie {
	}

	//[Compact]
	//[CCode (cname = "xcb_get_pointer_control_reply_t", ref_function = "", unref_function = "free")]
	//public class GetPointerControlReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_screen_saver_cookie_t", has_type_id = false)]
	public struct GetScreenSaverCookie {
	}

	[Compact]
	[CCode (cname = "xcb_get_screen_saver_reply_t", ref_function = "", unref_function = "free")]
	public class GetScreenSaverReply {
		public uint16 timeout;
		public uint16 interval;
		public uint8 prefer_blanking;
		public uint8 allow_exposures;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_list_hosts_cookie_t", has_type_id = false)]
	public struct ListHostsCookie {
	}

	[Compact]
	[CCode (cname = "xcb_list_hosts_reply_t", ref_function = "", unref_function = "free")]
	public class ListHostsReply {
		private uint16 hosts_len;
		[CCode (cname = "xcb_list_hosts_hosts_iterator")]
		private HostIterator hosts_iterator ();
		public Host[] hosts {
			owned get
			{
				var value = new Host[hosts_len];
				var iter = hosts_iterator ();
				for (var i = 0; i < value.length; i++)
				{
					value[i] = iter.data;
					HostIterator.next (ref iter);
				}
				return value;
			}
		}
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_set_pointer_mapping_cookie_t", has_type_id = false)]
	public struct SetPointerMappingCookie {
	}

	//[Compact]
	//[CCode (cname = "xcb_set_pointer_mapping_reply_t", ref_function = "", unref_function = "free")]
	//public class SetPointerMappingReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_pointer_mapping_cookie_t", has_type_id = false)]
	public struct GetPointerMappingCookie {
	}

	//[Compact]
	//[CCode (cname = "xcb_get_pointer_mapping_reply_t", ref_function = "", unref_function = "free")]
	//public class GetPointerMappingReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_set_modifier_mapping_cookie_t", has_type_id = false)]
	public struct SetModifierMappingCookie {
	}

	//[Compact]
	//[CCode (cname = "xcb_set_modifier_mapping_reply_t", ref_function = "", unref_function = "free")]
	//public class SetModifierMappingReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_modifier_mapping_cookie_t", has_type_id = false)]
	public struct GetModifierMappingCookie {
	}

	//[Compact]
	//[CCode (cname = "xcb_get_modifier_mapping_reply_t", ref_function = "", unref_function = "free")]
	//public class GetModifierMappingReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_translate_coordinates_cookie_t", has_type_id = false)]
	public struct TranslateCoordinatesCookie {
	}

	[Compact]
	[CCode (cname = "xcb_translate_coordinates_reply_t", ref_function = "", unref_function = "free")]
	public class TranslateCoordinatesReply {
		public uint8 same_screen;
		public Window child;
		public int16 dst_x;
		public int16 dst_y;
	}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_get_input_focus_cookie_t", has_type_id = false)]
	public struct GetInputFocusCookie {
Sergio Costas's avatar
Sergio Costas committed
1130
	}
1131

1132 1133 1134 1135 1136
	[Compact]
	[CCode (cname = "xcb_get_input_focus_reply_t", ref_function = "", unref_function = "free")]
	public class GetInputFocusReply {
		public InputFocus revert_to;
		public Window focus;
1137 1138
	}

Sergio Costas's avatar
Sergio Costas committed
1139 1140
	[SimpleType]
	[IntegerType (rank = 9)]
1141 1142
	[CCode (cname = "xcb_query_keymap_cookie_t", has_type_id = false)]
	public struct QueryKeymapCookie {
Sergio Costas's avatar
Sergio Costas committed
1143 1144
	}

1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193
	//[Compact]
	//[CCode (cname = "xcb_query_keymap_reply_t", ref_function = "", unref_function = "free")]
	//public class QueryKeymapReply {
	//}

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_query_font_cookie_t", has_type_id = false)]
	public struct QueryFontCookie {
	}

	[Compact]
	[CCode (cname = "xcb_query_font_reply_t", ref_function = "", unref_function = "free")]
	public class QueryFontReply {
		public Charinfo min_bounds;
		public Charinfo max_bounds;
		public uint16 min_char_or_byte2;
		public uint16 max_char_or_byte2;
		public uint16 default_char;
		public uint8 draw_direction;
		public uint8 min_byte1;
		public uint8 max_byte1;
		public uint8 all_chars_exist;
		public int16 font_ascent;
		public int16 font_descent;
		private uint16 properties_len;
		[CCode (cname = "xcb_query_font_properties")]
		private Fontprop* vala_properties ();
		public Fontprop[] properties
		{
			get
			{
				unowned Fontprop[] res = (Fontprop[]) vala_properties ();
				res.length = properties_len;
				return res;
			}
		}
		private uint32 char_infos_len;
		[CCode (cname = "xcb_query_font_char_infos")]
		private Charinfo* vala_char_infos ();
		public Charinfo[] char_infos
		{
			get
			{
				unowned Charinfo[] res = (Charinfo[]) vala_char_infos ();
				res.length = (int) char_infos_len;
				return res;
			}
		}
1194 1195 1196 1197
	}

	[SimpleType]
	[IntegerType (rank = 9)]
1198 1199
	[CCode (cname = "xcb_query_text_extents_cookie_t", has_type_id = false)]
	public struct QueryTextExtentsCookie {
1200 1201 1202
	}

	[Compact]
1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213
	[CCode (cname = "xcb_query_text_extents_reply_t", ref_function = "", unref_function = "free")]
	public class QueryTextExtentsReply {
		public FontDraw draw_direction;
		public int16 font_ascent;
		public int16 font_descent;
		public int16 overall_ascent;
		public int16 overall_descent;
		public int16 overall_width;
		public int16 overall_height;
		public int16 overall_left;
		public int16 overall_right;
1214 1215 1216 1217
	}

	[SimpleType]
	[IntegerType (rank = 9)]
1218 1219
	[CCode (cname = "xcb_list_fonts_cookie_t", has_type_id = false)]
	public struct ListFontsCookie {
1220 1221
	}

1222
	[Compact]
1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241
	[CCode (cname = "xcb_list_fonts_reply_t", ref_function = "", unref_function = "free")]
	public class ListFontsReply {
		private uint16 names_len;
		[CCode (cname = "xcb_list_fonts_names_iterator")]
		private StrIterator names_iterator ();
		public string[] names
		{
			owned get
			{
				var value = new string[names_len];
				var iter = names_iterator ();
				for (var i = 0; i < value.length; i++)
				{
					value[i] = iter.data.name;
					StrIterator.next (ref iter);
				}
				return value;
			}
		}
1242 1243
	}

1244
	[Compact]
1245 1246
	[CCode (cname = "xcb_get_property_reply_t", ref_function = "", unref_function = "free")]
	public class GetPropertyReply {
1247
		public AtomT type;
1248
		public uint8 format;
1249 1250 1251 1252
		public uint32 bytes_after;
		private uint32 value_len;
		[CCode (cname = "xcb_get_property_value")]
		public unowned void *value ();
1253 1254
		[CCode (cname = "xcb_get_property_value_length")]
		public int32 value_length ();
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278
		public string value_as_string () {
			GLib.assert (format == 8);
			return "%.*s".printf (value_len, value ());
		}
		public unowned uint8[] value_as_uint8_array () {
			GLib.assert (format == 8);
			unowned uint8[] res = (uint8[]) value ();
			res.length = (int) value_len;
			return res;
		}
		public unowned uint16[] value_as_uint16_array () {
			GLib.assert (format == 16);
			unowned uint16[] res = (uint16[]) value ();
			res.length = (int) value_len;
			return res;
		}
		public unowned uint32[] value_as_uint32_array () {
			GLib.assert (format == 32);
			unowned uint32[] res = (uint32[]) value ();
			res.length = (int) value_len;
			return res;
		}
	}

1279 1280
	[SimpleType]
	[IntegerType (rank = 9)]
1281 1282
	[CCode (cname = "xcb_list_fonts_with_info_cookie_t", has_type_id = false)]
	public struct ListFontsWithInfoCookie {
1283 1284
	}

1285
	[Compact]
1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315
	[CCode (cname = "xcb_list_fonts_with_info_reply_t", ref_function = "", unref_function = "free")]
	public class ListFontsWithInfoReply {
		public Charinfo min_bounds;
		public Charinfo max_bounds;
		public uint16 min_char_or_byte2;
		public uint16 max_char_or_byte2;
		public uint16 default_char;
		public uint8 draw_direction;
		public uint8 min_byte1;
		public uint8 max_byte1;
		public uint8 all_chars_exist;
		public int16 font_ascent;
		public int16 font_descent;
		public uint32 replies_hint;
		private uint16 properties_len;
		[CCode (cname = "xcb_list_fonts_with_info_properties")]
		private Fontprop* vala_properties ();
		public Fontprop[] properties
		{
			get
			{
				unowned Fontprop[] res = (Fontprop[]) vala_properties ();
				res.length = properties_len;
				return res;
			}
		}
		private uint8 name_len;
		[CCode (cname = "xcb_list_fonts_with_info_name")]
		private unowned string vala_name ();
		public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
1316
	}
1317 1318 1319

	[SimpleType]
	[IntegerType (rank = 9)]
1320 1321
	[CCode (cname = "xcb_get_font_path_cookie_t", has_type_id = false)]
	public struct GetFontPathCookie {
1322 1323 1324
	}

	[Compact]
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349
	[CCode (cname = "xcb_get_font_path_reply_t", ref_function = "", unref_function = "free")]
	public class GetFontPathReply {
		private uint16 path_len;
		[CCode (cname = "xcb_get_font_path_path_iterator")]
		private StrIterator path_iterator ();
		public string[] path
		{
			owned get
			{
				var value = new string[path_len];
				var iter = path_iterator ();
				for (var i = 0; i < value.length; i++)
				{
					value[i] = iter.data.name;
					StrIterator.next (ref iter);
				}
				return value;
			}
		}
	}

	[CCode (cname = "xcb_circulate_t", has_type_id = false)]
	public enum Circulate {
		RAISE_LOWEST,
		LOWER_HIGHEST
1350
	}
1351

1352 1353 1354 1355 1356
	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_atom_t", has_type_id = false)]
	public struct AtomT {
	}
1357 1358 1359 1360 1361 1362 1363

	[SimpleType]
	[IntegerType (rank = 9)]
	[CCode (cname = "xcb_fontable_t", has_type_id = false)]
	public struct Fontable {
	}

1364 1365 1366 1367 1368 1369
	[CCode (cname = "xcb_prop_mode_t", has_type_id = false)]
	public enum PropMode {
		REPLACE,
		PREPEND,
		APPEND
	}
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403

	[CCode (cname = "xcb_grab_mode_t", has_type_id = false)]
	public enum GrabMode {
		SYNC,
		ASYNC
	}

	[CCode (cname = "xcb_grab_status_t", has_type_id = false)]
	public enum GrabStatus {
		SUCCESS,
		ALREADY_GRABBED,
		INVALID_TIME,
		NOT_VIEWABLE,
		FROZEN
	}

	[SimpleType]
	[CCode (cname = "xcb_timecoord_t", has_type_id = false)]
	public struct Timecoord {
		public Timestamp time;
		public int16 x;
		public int16 y;
	}

	[SimpleType]
	[CCode (cname = "xcb_timecoord_iterator_t", has_type_id = false)]
	private struct TimecoordIterator {
		public unowned Timecoord data;
		public int rem;
		public int index;
		[CCode (cname = "xcb_timecoord_next")]
		public static void next (ref TimecoordIterator iter);
	}

1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476
	[CCode (cname = "xcb_atom_enum_t", has_type_id = false)]
	public enum Atom {
		NONE,
		ANY,
		PRIMARY,
		SECONDARY,
		ARC,
		ATOM,
		BITMAP,
		CARDINAL,
		COLORMAP,
		CURSOR,
		CUT_BUFFER0,
		CUT_BUFFER1,
		CUT_BUFFER2,
		CUT_BUFFER3,
		CUT_BUFFER4,
		CUT_BUFFER5,
		CUT_BUFFER6,
		CUT_BUFFER7,
		DRAWABLE,
		FONT,
		INTEGER,
		PIXMAP,
		POINT,
		RECTANGLE,
		RESOURCE_MANAGER,
		RGB_COLOR_MAP,
		RGB_BEST_MAP,
		RGB_BLUE_MAP,
		RGB_DEFAULT_MAP,
		RGB_GRAY_MAP,
		RGB_GREEN_MAP,
		RGB_RED_MAP,
		STRING,
		VISUALID,
		WINDOW,
		WM_COMMAND,
		WM_HINTS,
		WM_CLIENT_MACHINE,
		WM_ICON_NAME,
		WM_ICON_SIZE,
		WM_NAME,
		WM_NORMAL_HINTS,
		WM_SIZE_HINTS,
		WM_ZOOM_HINTS,
		MIN_SPACE,
		NORM_SPACE,
		MAX_SPACE,
		END_SPACE,
		SUPERSCRIPT_X,
		SUPERSCRIPT_Y,
		SUBSCRIPT_X,
		SUBSCRIPT_Y,
		UNDERLINE_POSITION,
		UNDERLINE_THICKNESS,
		STRIKEOUT_ASCENT,
		STRIKEOUT_DESCENT,
		ITALIC_ANGLE,
		X_HEIGHT,
		QUAD_WIDTH,
		WEIGHT,
		POINT_SIZE,
		RESOLUTION,
		COPYRIGHT,
		NOTICE,
		FONT_NAME,
		FAMILY_NAME,
		FULL_NAME,
		CAP_HEIGHT,
		WM_CLASS,
		WM_TRANSIENT_FOR
	}
1477

1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510
	public const uint8 KEY_PRESS;
	public const uint8 KEY_RELEASE;
	public const uint8 BUTTON_PRESS;
	public const uint8 BUTTON_RELEASE;
	public const uint8 MOTION_NOTIFY;
	public const uint8 ENTER_NOTIFY;
	public const uint8 LEAVE_NOTIFY;
	public const uint8 FOCUS_IN;
	public const uint8 FOCUS_OUT;
	public const uint8 KEYMAP_NOTIFY;
	public const uint8 EXPOSE;
	public const uint8 GRAPHICS_EXPOSURE;
	public const uint8 NO_EXPOSURE;
	public const uint8 VISIBILITY_NOTIFY;
	public const uint8 CREATE_NOTIFY;
	public const uint8 DESTROY_NOTIFY;
	public const uint8 UNMAP_NOTIFY;
	public const uint8 MAP_NOTIFY;
	public const uint8 MAP_REQUEST;
	public const uint8 REPARENT_NOTIFY;
	public const uint8 CONFIGURE_NOTIFY;
	public const uint8 CONFIGURE_REQUEST;
	public const uint8 GRAVITY_NOTIFY;
	public const uint8 RESIZE_REQUEST;
	public const uint8 CIRCULATE_NOTIFY;
	public const uint8 CIRCULATE_REQUEST;
	public const uint8 PROPERTY_NOTIFY;
	public const uint8 SELECTION_CLEAR;
	public const uint8 SELECTION_REQUEST;
	public const uint8 SELECTION_NOTIFY;
	public const uint8 COLORMAP_NOTIFY;
	public const uint8 CLIENT_MESSAGE;
	public const uint8 MAPPING_NOTIFY;
1511 1512

	[CCode (cname = "xcb_config_window_t", has_type_id = false)]
1513 1514 1515 1516 1517 1518 1519 1520 1521
	public enum ConfigWindow {
		X,
		Y,
		WIDTH,
		HEIGHT,
		BORDER_WIDTH,
		SIBLING,
		STACK_MODE
	}
1522 1523 1524 1525 1526 1527

	[CCode (cname = "xcb_image_order_t", has_type_id = false)]
	public enum ImageOrder {
		LSB_FIRST,
		MSB_FIRST
	}
1528

1529 1530 1531
	[Compact]
	[CCode (cname = "xcb_setup_t", ref_function = "", unref_function = "")]
	public class Setup {
1532 1533 1534 1535 1536 1537 1538
		public uint8 status;
		public uint16 protocol_major_version;
		public uint16 protocol_minor_version;
		public uint32 release_number;
		public uint32 resource_id_base;
		public uint32 resource_id_mask;
		public uint32 motion_buffer_size;
1539 1540 1541 1542
		private uint16 vendor_len;
		[CCode (cname = "xcb_setup_vendor")]
		private unowned string vala_vendor ();
		public string vendor { owned get { return "%.*s".printf (vendor_len, vala_vendor ()); } }
1543 1544 1545 1546 1547 1548 1549
		public uint32 maximum_request_length;
		public uint8 image_byte_order;
		public uint8 bitmap_format_bit_order;
		public uint8 bitmap_format_scanline_unit;
		public uint8 bitmap_format_scanline_pad;
		public Keycode min_keycode;
		public Keycode max_keycode;
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562
		private uint8 pixmap_formats_len;
		[CCode (cname = "xcb_setup_pixmap_formats")]
		private Format* vala_pixmap_formats ();
		public Format[] pixmap_formats
		{
			get
			{
				unowned Format[] res = (Format[]) vala_pixmap_formats ();
				res.length = pixmap_formats_len;
				return res;
			}
		}
		private uint8 roots_len;
1563
		[Version (deprecated_since = "vala-0.26", replacement = "Xcb.Setup.screens")]
1564
		public int roots_length ();
1565
		public ScreenIterator roots_iterator ();
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578
		public Screen[] screens {
			owned get
			{
				var value = new Screen[roots_len];
				var iter = roots_iterator ();
				for (var i = 0; i < value.length; i++)
				{
					value[i] = iter.data;
					ScreenIterator.next (ref iter);
				}
				return value;
			}
		}
1579 1580 1581 1582
	}

	public const char COPY_FROM_PARENT;

1583
	[CCode (cname = "xcb_window_class_t", has_type_id = false)]
1584 1585 1586 1587 1588 1589 1590 1591 1592 1593
	public enum WindowClass {
		COPY_FROM_PARENT,
		INPUT_OUTPUT,
		INPUT_ONLY
	}

	[Compact]
	[CCode (cname = "xcb_generic_event_t", ref_function = "", unref_function = "")]
	public class GenericEvent {
		public uint8 response_type;
1594 1595 1596 1597 1598
		public uint8 extension;
		public uint16 sequence;
		public uint32 length;
		public uint16 event_type;
		public uint32 full_sequence;
1599
	}
1600

1601 1602 1603 1604 1605 1606 1607 1608 1609
	[SimpleType]
	[CCode (cname = "xcb_timestamp_t", has_type_id = false)]
	public struct Timestamp : uint32 {
	}

	[SimpleType]
	[CCode (cname = "xcb_keycode_t", has_type_id = false)]
	public struct Keycode : uint8 {
	}
1610

1611 1612 1613 1614 1615 1616 1617 1618
	[SimpleType]
	[CCode (cname = "xcb_colormap_t", has_type_id = false)]
	public struct Colormap : uint32 {
	}

	[Compact]
	[CCode (cname = "xcb_key_press_event_t", ref_function = "", unref_function = "")]
	public class KeyPressEvent : GenericEvent {
1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630
		public Keycode detail;
		public uint16 sequence;
		public Timestamp time;
		public Window root;
		public Window event;
		public Window child;
		public uint16 root_x;
		public uint16 root_y;
		public uint16 event_x;
		public uint16 event_y;
		public uint16 state;
		public uint8 same_screen;
1631 1632 1633 1634 1635
	}

	[Compact]
	[CCode (cname = "xcb_key_release_event_t", ref_function = "", unref_function = "")]
	public class KeyReleaseEvent : GenericEvent {
1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647
		public Keycode detail;
		public uint16 sequence;
		public Timestamp time;
		public Window root;
		public Window event;
		public Window child;
		public uint16 root_x;
		public uint16 root_y;
		public uint16 event_x;
		public uint16 event_y;
		public uint16 state;
		public uint8 same_screen;
1648
	}
1649

1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660
	[Compact]
	[CCode (cname = "xcb_generic_error_t", ref_function = "", unref_function = "")]
	public class GenericError {
		public uint8 response_type;
		public uint8 error_code;
		public uint16 sequence;
		public uint32 resource_id;
		public uint16 minor_code;
		public uint8 major_code;
	}

1661
	[Compact]
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673
	[CCode (cname = "xcb_button_press_event_t", ref_function = "", unref_function = "")]
	public class ButtonPressEvent : GenericEvent {
		public Button detail;
		public Window root;
		public Window event;
		public Window child;
		public uint16 root_x;
		public uint16 root_y;
		public uint16 event_x;
		public uint16 event_y;
	}

1674
	[Compact]
1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686
	[CCode (cname = "xcb_button_release_event_t", ref_function = "", unref_function = "")]
	public class ButtonReleaseEvent : GenericEvent {
		public Button detail;
		public Window root;
		public Window event;
		public Window child;
		public uint16 root_x;
		public uint16 root_y;
		public uint16 event_x;
		public uint16 event_y;
	}

1687
	[Compact]
1688 1689
	[CCode (cname = "xcb_motion_notify_event_t", ref_function = "", unref_function = "")]
	public class MotionNotifyEvent : GenericEvent {
1690 1691 1692
		public uint8 detail;
		public uint16 sequence;
		public Timestamp time;
1693 1694 1695 1696 1697 1698 1699
		public Window root;
		public Window event;
		public Window child;
		public uint16 root_x;
		public uint16 root_y;
		public uint16 event_x;
		public uint16 event_y;
1700 1701
		public uint16 state;
		public uint8 same_screen;
1702 1703
	}

1704
	[Compact]
1705 1706
	[CCode (cname = "xcb_expose_event_t", ref_function = "", unref_function = "")]
	public class ExposeEvent : GenericEvent {
1707
		public uint16 sequence;
1708 1709 1710 1711 1712
		public Window window;
		public uint16 x;
		public uint16 y;
		public uint16 width;
		public uint16 height;
1713 1714 1715
		public uint16 count;
	}

1716 1717 1718
	[Compact]
	[CCode (cname = "xcb_enter_notify_event_t", ref_function = "", unref_function = "")]
	public class EnterNotifyEvent : GenericEvent {
1719 1720 1721
		public uint8 detail;
		public uint16 sequence;
		public Timestamp time;
1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736
		public Window root;
		public Window event;
		public Window child;
		public uint16 root_x;
		public uint16 root_y;
		public uint16 event_x;
		public uint16 event_y;
		public uint16 state;
		public uint8 mode;
		public uint8 same_screen_focus;
	}

	[Compact]
	[CCode (cname = "xcb_leave_notify_event_t", ref_function = "", unref_function = "")]
	public class LeaveNotifyEvent : GenericEvent {
1737 1738 1739
		public uint8 detail;
		public uint16 sequence;
		public Timestamp time;
1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754
		public Window root;
		public Window event;
		public Window child;
		public uint16 root_x;
		public uint16 root_y;
		public uint16 event_x;
		public uint16 event_y;
		public uint16 state;
		public uint8 mode;
		public uint8 same_screen_focus;
	}

	[Compact]
	[CCode (cname = "xcb_keymap_notify_event_t", ref_function = "", unref_function = "")]
	public class KeymapNotifyEvent : GenericEvent {
1755
		public uint8[] keys;
1756 1757 1758 1759 1760 1761 1762 1763 1764 1765
	}

	[Compact]
	[CCode (cname = "xcb_visibility_notify_event_t", ref_function = "", unref_function = "")]
	public class VisibilityNotifyEvent : GenericEvent {
		uint16 sequence;
		public Window window;
		public uint8 state;
	}

1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818
	[Compact]
	[CCode (cname = "xcb_create_notify_event_t", ref_function = "", unref_function = "")]
	public class CreateNotifyEvent {
		public uint8 response_type;
		public uint16 sequence;
		public Window parent;
		public Window window;
		public int16 x;
		public int16 y;
		public uint16 width;
		public uint16 height;
		public uint16 border_width;
		public uint8 override_redirect;
	}

	[Compact]
	[CCode (cname = "xcb_destroy_notify_event_t", ref_function = "", unref_function = "")]
	public class DestroyNotifyEvent {
		public uint8 response_type;
		public uint16 sequence;
		public Window event;
		public Window window;
	}

	[Compact]
	[CCode (cname = "xcb_unmap_notify_event_t", ref_function = "", unref_function = "")]
	public class UnmapNotifyEvent {
		public uint8 response_type;
		public uint16 sequence;
		public Window event;
		public Window window;
		public uint8 from_configure;
	}

	[Compact]
	[CCode (cname = "xcb_map_notify_event_t", ref_function = "", unref_function = "")]
	public class MapNotifyEvent {
		public uint8 response_type;
		public uint16 sequence;
		public Window event;
		public Window window;
		public uint8 override_redirect;
	}

	[Compact]
	[CCode (cname = "xcb_map_request_event_t", ref_function = "", unref_function = "")]
	public class MapRequestEvent {
		public uint8 response_type;
		public uint16 sequence;
		public Window parent;
		public Window window;
	}

1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830
	[Compact]
	[CCode (cname = "xcb_reparent_notify_event_t", ref_function = "", unref_function = "")]
	public class ReparentNotifyEvent : GenericEvent {
		uint16 sequence;
		public Window event;
		public Window window;
		public Window parent;
		public int16 x;
		public int16 y;
		public uint8 override_redirect;
	}

1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845
	[Compact]
	[CCode (cname = "xcb_configure_request_event_t", ref_function = "", unref_function = "")]
	public class ConfigureRequestEvent {
		public uint8 response_type;
		public uint8 stack_mode;
		public uint16 sequence;
		public Window parent;
		public Window window;
		public Window sibling;
		public int16 x;
		public int16 y;
		public uint16 width;
		public uint16 height;
		public uint16 border_width;
		public uint16 value_mask;
1846 1847
	}

Sergio Costas's avatar
Sergio Costas committed
1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863
	[Compact]
	[CCode (cname = "xcb_configure_notify_event_t", ref_function = "", unref_function = "")]
	public class ConfigureNotifyEvent {
		public uint8      response_type;
		public uint16     sequence;
		public Window     event;
		public Window     window;
		public Window     above_sibling;
		public int16      x;
		public int16      y;
		public uint16     width;
		public uint16     height;
		public uint16     border_width;
		public uint8      override_redirect;
	}

1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887
	[Compact]
	[CCode (cname = "xcb_gravity_notify_event_t", ref_function = "", unref_function = "")]
	public class GravityNotifyEvent : GenericEvent {
		uint16 sequence;
		public Window event;
		public Window window;
		public int16 x;
		public int16 y;
	}

	[Compact]
	[CCode (cname = "xcb_circulate_notify_event_t", ref_function = "", unref_function = "")]
	public class CirculateNotifyEvent : GenericEvent {
		uint16 sequence;
		public Window event;
		public Window window;
		public uint8 place;
	}

	[Compact]
	[CCode (cname = "xcb_property_notify_event_t", ref_function = "", unref_function = "")]
	public class PropertyNotifyEvent : GenericEvent {
		uint16 sequence;
		public Window window;
1888
		public AtomT atom;
1889 1890 1891 1892 1893 1894 1895 1896 1897 1898
		public Timestamp time;
		public uint8 state;
	}

	[Compact]
	[CCode (cname = "xcb_selection_notify_event_t", ref_function = "", unref_function = "")]
	public class SelectionNotifyEvent : GenericEvent {
		uint16 sequence;
		public Timestamp time;
		public Window requestor;
1899 1900 1901
		public AtomT selection;
		public AtomT target;
		public AtomT property;
1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922
	}

	[Compact]
	[CCode (cname = "xcb_colormap_notify_event_t", ref_function = "", unref_function = "")]
	public class ColormapNotifyEvent : GenericEvent {
		uint16 sequence;
		public Window window;
		public Colormap colormap;
		public uint8 _new;
		public uint8 state;
	}

	[Compact]
	[CCode (cname = "xcb_mapping_notify_event_t", ref_function = "", unref_function = "")]
	public class MappingNotifyEvent : GenericEvent {
		uint16 sequence;
		public uint8 request;
		public Keycode first_keycode;
		public uint8 count;
	}

1923
	[CCode (cname = "xcb_cw_t", has_type_id = false)]
1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941
	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
	}

1942
	[CCode (cname = "xcb_event_mask_t", has_type_id = false)]
1943 1944 1945 1946 1947 1948 1949 1950 1951 1952
	public enum EventMask {
		NO_EVENT,
		KEY_PRESS,
		KEY_RELEASE,
		BUTTON_PRESS,
		BUTTON_RELEASE,
		ENTER_WINDOW,
		LEAVE_WINDOW,
		POINTER_MOTION,
		POINTER_MOTION_HINT,
1953 1954 1955 1956 1957
		BUTTON_1_MOTION,
		BUTTON_2_MOTION,
		BUTTON_3_MOTION,
		BUTTON_4_MOTION,
		BUTTON_5_MOTION,
1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971
		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
	}

1972
	[SimpleType]
1973 1974
	[CCode (cname = "xcb_format_t", has_type_id = false)]
	public struct Format {
1975 1976 1977 1978 1979 1980 1981
		public uint8 depth;
		public uint8 bits_per_pixel;
		public uint8 scanline_pad;
	}

	[SimpleType]
	[CCode (cname = "xcb_format_iterator_t", has_type_id = false)]
1982
	private struct FormatIterator {
1983 1984 1985 1986 1987 1988 1989
		public unowned Format data;
		public int rem;
		public int index;
		[CCode (cname = "xcb_format_next")]
		public static void next (ref FormatIterator iter);
	}

1990 1991 1992 1993
	[Compact]
	[CCode (cname = "xcb_screen_t", ref_function = "", unref_function = "")]
	public class Screen {
		public Window root;
1994
		public Colormap default_colormap;
1995 1996
		public uint32 white_pixel;
		public uint32 black_pixel;
1997
		public uint32 current_input_masks;
1998 1999 2000 2001
		public uint16 width_in_pixels;
		public uint16 height_in_pixels;
		public uint16 width_in_millimeters;
		public uint16 height_in_millimeters;
2002 2003
		public uint16 min_installed_maps;
		public uint16 max_installed_maps;
2004
		public VisualID root_visual;
2005 2006 2007
		public uint8 backing_stores;
		public uint8 save_unders;
		public uint8 root_depth;
2008
		private uint8 allowed_depths_len;
2009
		public DepthIterator allowed_depths_iterator ();
2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023
		public Depth[] allowed_depths
		{
			owned get
			{
				var value = new Depth[allowed_depths_len];
				var iter = allowed_depths_iterator ();
				for (var i = 0; i < value.length; i++)
				{
					value[i] = iter.data;
					DepthIterator.next (ref iter);
				}
				return value;
			}
		}
2024 2025
	}

2026
	[SimpleType]
2027
	[CCode (cname = "xcb_screen_iterator_t", has_type_id = false)]
2028 2029 2030
	public struct ScreenIterator {
		public unowned Screen data;
		public int rem;
2031
		public int index;
2032
		[CCode (cname = "xcb_screen_next")]
2033
		public static void next (ref ScreenIterator iter);
2034 2035 2036 2037 2038 2039
	}

	[Compact]
	[CCode (cname = "xcb_depth_t", ref_function = "", unref_function = "")]
	public class Depth {
		public uint8 depth;
2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050
		private uint16 visuals_len;
		[CCode (cname = "xcb_depth_visuals")]
		private VisualType* vala_visuals ();
		public VisualType[] visuals
		{
			get {
				unowned VisualType[] res = (VisualType[]) vala_visuals ();
				res.length = (int) visuals_len;
				return res;
			}
		}
2051
		[Version (deprecated_since = "vala-0.26", replacement = "Xcb.Depth.visuals")]
2052 2053 2054
		public VisualTypeIterator visuals_iterator ();
	}

2055 2056 2057 2058 2059 2060 2061
	[Compact]
	[CCode (cname = "xcb_query_tree_reply_t", ref_function = "", unref_function = "")]
	public class QueryTreeReply {
		public Window root;
		public Window parent;
		public uint16 children_len;
		[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 2068 2069 2070
	public struct DepthIterator {
		public unowned Depth data;
		public int rem;
		[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 2078 2079 2080
	public struct VisualTypeIterator {
		public unowned VisualType data;
		public int rem;
		[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 2087 2088
	public struct VoidCookie {
	}

2089
	[SimpleType]
2090
	[CCode (cname = "xcb_query_tree_cookie_t", has_type_id = false)]
2091 2092 2093
	public struct QueryTreeCookie {
	}

2094 2095 2096 2097 2098 2099
	[CCode (cname = "xcb_point_t", has_type_id = false)]
	public struct Point {
		public int16 x;
		public int16 y;
	}

2100
	[CCode (cname = "xcb_rectangle_t", has_type_id = false)]
2101 2102 2103 2104 2105 2106 2107
	public struct Rectangle {
		public int16 x;
		public int16 y;
		public uint16 width;
		public uint16 height;
	}

2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125
	[CCode (cname = "xcb_arc_t", has_type_id = false)]
	public struct Arc {
		public int16 x;
		public int16 y;
		public uint16 width;
		public uint16 height;
		public int16 angle1;
		public int16 angle2;
	}

	[CCode (cname = "xcb_segment_t", has_type_id = false)]
	public struct Segment {
		public int16 x1;
		public int16 y1;
		public int16 x2;
		public int16 y2;
	}

Sergio Costas's avatar
Sergio Costas committed
2126
	[SimpleType]
2127
	[CCode (cname = "xcb_visualid_t", has_type_id = false)]
2128 2129 2130
	public struct VisualID : uint32 {
	}

Sergio Costas's avatar
Sergio Costas committed
2131
	[SimpleType]
2132
	[CCode (cname = "xcb_button_t", has_type_id = false)]
2133 2134 2135
	public struct Button : uint8 {
	}

Robert Ancell's avatar
Robert Ancell committed
2136 2137 2138 2139 2140
	[SimpleType]
	[CCode (cname = "xcb_gcontext_t", has_type_id = false)]
	public struct GContext : uint32 {
	}

2141
	[SimpleType]
2142
	[CCode (cname = "xcb_drawable_t", has_type_id = false)]
2143 2144 2145
	public struct Drawable : uint32 {
	}

2146 2147 2148 2149 2150
	[SimpleType]
	[CCode (cname = "xcb_pixmap_t", has_type_id = false)]
	public struct Pixmap : uint32 {
	}

2151 2152 2153 2154 2155 2156 2157 2158 2159 2160
	[SimpleType]
	[CCode (cname = "xcb_cursor_t", has_type_id = false)]
	public struct Cursor : uint32 {
	}

	[SimpleType]
	[CCode (cname = "xcb_font_t", has_type_id = false)]
	public struct Font : uint32 {
	}

2161
	[SimpleType]
2162 2163
	[CCode (cname = "xcb_window_t", has_type_id = false)]
	public struct Window : uint32 {
2164 2165
	}

2166 2167 2168 2169 2170 2171 2172 2173 2174 2175
	[CCode (cname = "xcb_visual_class_t", has_type_id = false)]
	public enum VisualClass {
		STATIC_GRAY,
		GRAY_SCALE,
		STATIC_COLOR,
		PSEUDO_COLOR,
		TRUE_COLOR,
		DIRECT_COLOR
	}

2176 2177 2178
	[SimpleType]
	[CCode (cname = "xcb_visualtype_t", has_type_id = false)]
	public struct VisualType {
2179 2180 2181
		public VisualID visual_id;
		public uint8 _class;
		public uint8 bits_per_rgb_value;
2182 2183 2184 2185
		public uint16 colormap_entries;
		public uint32 red_mask;
		public uint32 green_mask;
		public uint32 blue_mask;
2186
	}
Robert Ancell's avatar
Robert Ancell committed
2187

2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201
	[CCode (cname = "xcb_input_focus_t", has_type_id = false)]
	public enum InputFocus {
		NONE,
		POINTER_ROOT,
		PARENT,
		FOLLOW_KEYBOARD
	}

	[CCode (cname = "xcb_font_draw_t", has_type_id = false)]
	public enum FontDraw {
		LEFT_TO_RIGHT,
		RIGHT_TO_LEFT
	}

Robert Ancell's avatar
Robert Ancell committed
2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304
	[CCode (cname = "xcb_gc_t", has_type_id = false)]
	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", has_type_id = false)]
	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", has_type_id = false)]
	public enum LineStyle
	{
		SOLID,
		ON_OFF_DASH,
		DOUBLE_DASH
	}

	[CCode (cname = "xcb_cap_style_t", has_type_id = false)]
	public enum CapStyle
	{
		NOT_LAST,
		BUTT,
		ROUND,
		PROJECTING
	}

	[CCode (cname = "xcb_join_style_t", has_type_id = false)]
	public enum JoinStyle
	{
		MITER,
		ROUND,
		BEVEL
	}

	[CCode (cname = "xcb_fill_style_t", has_type_id = false)]
	public enum FillStyle
	{
		SOLID,
		TILED,
		STIPPLED,
		OPAQUE_STIPPLED
	}

	[CCode (cname = "xcb_fill_rule_t", has_type_id = false)]
	public enum FillRuleStyle
	{
		EVEN_ODD,
		WINDING
	}

	[CCode (cname = "xcb_subwindow_mode_t", has_type_id = false)]
	public enum SubwindowMode
	{
		CLIP_BY_CHILDREN,
		INCLUDE_INFERIORS
	}

	[CCode (cname = "xcb_arc_mode_t", has_type_id = false)]
	public enum ArcMode
	{
		CHORD,
		PIE_SLICE
	}
2305

2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484
	[CCode (cname = "xcb_clip_ordering_t", has_type_id = false)]
	public enum ClipOrdering
	{
		UNSORTED,
		Y_SORTED,
		YX_SORTED,
		YX_BANDED
	}

	[CCode (cname = "xcb_coord_mode_t", has_type_id = false)]
	public enum CoordMode
	{
		ORIGIN,
		PREVIOUS
	}

	[CCode (cname = "xcb_poly_shape_t", has_type_id = false)]
	public enum PolyShape
	{
		COMPLEX,
		NONCONVEX,
		CONVEX
	}

	[CCode (cname = "xcb_image_format_t", has_type_id = false)]
	public enum ImageFormat
	{
		XY_BITMAP,
		XY_PIXMAP,
		Z_PIXMAP
	}

	[CCode (cname = "xcb_color_flag_t", has_type_id = false)]
	public enum ColorFlag
	{
		RED,
		GREEN,
		BLUE
	}

	[SimpleType]
	[CCode (cname = "xcb_coloritem_t", has_type_id = false)]
	public struct Coloritem {
		public uint32 pixel;
		public uint16 red;
		public uint16 green;
		public uint16 blue;
		public ColorFlag flags;
	}

	[SimpleType]
	[CCode (cname = "xcb_rgb_t", has_type_id = false)]
	public struct RGB {
		public uint16 red;
		public uint16 green;
		public uint16 blue;
	}

	[CCode (cname = "xcb_set_mode_t", has_type_id = false)]
	public enum SetMode
	{
		INSERT,
		DELETE
	}

	[CCode (cname = "xcb_host_mode_t", has_type_id = false)]
	public enum HostMode
	{
		INSERT,
		DELETE
	}

	[CCode (cname = "xcb_family_t", has_type_id = false)]
	public enum Family
	{
		INTERNET,
		DECNET,
		CHAOS,
		SERVER_INTERPRETED,
		INTERNET_6
	}

	[CCode (cname = "xcb_access_control_t", has_type_id = false)]
	public enum AccessControl
	{
		DISABLE,
		ENABLE
	}

	[CCode (cname = "xcb_close_down_t", has_type_id = false)]
	public enum CloseDown
	{
		DESTROY_ALL,
		RETAIN_PERMANENT,
		RETAIN_TEMPORARY
	}

	[CCode (cname = "xcb_screen_saver_t", has_type_id = false)]
	public enum ScreenSaver
	{
		RESET,
		ACTIVE
	}

	[Compact]
	[CCode (cname = "xcb_str_t", ref_function = "", unref_function = "")]
	private class Str {
		private uint8 name_len;
		[CCode (cname = "xcb_str_name")]
		private unowned string vala_name ();
		public string name { owned get { return "%.*s".printf (name_len, vala_name ()); } }
	}

	[SimpleType]
	[CCode (cname = "xcb_str_iterator_t", has_type_id = false)]
	private struct StrIterator {
		public unowned Str data;
		public int rem;
		public int index;
		[CCode (cname = "xcb_str_next")]
		public static void next (ref StrIterator iter);
	}

	[Compact]
	[CCode (cname = "xcb_host_t", ref_function = "", unref_function = "")]
	public class Host {
		public Family family;
		private uint16 address_len;
		[CCode (cname = "xcb_host_address")]
		public unowned uint8* vala_address ();
		public uint8[] address
		{
			get
			{
				unowned uint8[] res = (uint8[]) vala_address ();
				res.length = address_len;
				return res;
			}
		}
	}

	[SimpleType]
	[CCode (cname = "xcb_host_iterator_t", has_type_id = false)]
	private struct HostIterator {
		public unowned Host data;
		public int rem;
		public int index;
		[CCode (cname = "xcb_host_next")]
		public static void next (ref HostIterator iter);
	}

	[SimpleType]
	[CCode (cname = "xcb_fontprop_t", has_type_id = false)]
	public struct Fontprop {
		public AtomT name;
		public uint32 value;
	}

	[Compact]
	[CCode (cname = "xcb_fontprop_t", ref_function = "", unref_function = "")]
	public class Charinfo {
		public int16 left_side_bearing;
		public int16 right_side_bearing;
		public int16 character_width;
		public int16 ascent;
		public int16 descent;
		public uint16 attributes;
	}

	[SimpleType]
	[CCode (cname = "xcb_fontprop_iterator_t", has_type_id = false)]
	private struct FontpropIterator {
		public unowned Fontprop data;
		public int rem;
		public int index;
		[CCode (cname = "xcb_fontprop_next")]
		public static void next (ref FontpropIterator iter);
	}
}