vx11 / methods.v
2132 lines · 1715 sloc · 103.26 KB · 6de7c1113616d30335010eea79fd03d19722b474
Raw
1// Generated from the installed X11 headers.
2module vx11
3
4// XLoadQueryFont, borrowing this connection. Other ownership follows the raw call.
5pub fn (c &Connection) load_query_font(name string) !&XFontStruct {
6 if name.contains('\x00') { return error('name contains NUL') }
7 return load_query_font(c.raw()!, &char(name.str))
8}
9
10// XQueryFont, borrowing this connection. Other ownership follows the raw call.
11pub fn (c &Connection) query_font(font_id XID) !&XFontStruct {
12 return query_font(c.raw()!, font_id)
13}
14
15// XGetMotionEvents, borrowing this connection. Other ownership follows the raw call.
16pub fn (c &Connection) get_motion_events(w Window, start Time, stop Time, nevents_return &i32) !&XTimeCoord {
17 return get_motion_events(c.raw()!, w, start, stop, nevents_return)
18}
19
20// XGetModifierMapping, borrowing this connection. Other ownership follows the raw call.
21pub fn (c &Connection) get_modifier_mapping() !&XModifierKeymap {
22 return get_modifier_mapping(c.raw()!)
23}
24
25// XCreateImage, borrowing this connection. Other ownership follows the raw call.
26pub fn (c &Connection) create_image(visual &Visual, depth u32, format i32, offset i32, data &char, width u32, height u32, bitmap_pad i32, bytes_per_line i32) !&XImage {
27 return create_image(c.raw()!, visual, depth, format, offset, data, width, height, bitmap_pad, bytes_per_line)
28}
29
30// XGetImage, borrowing this connection. Other ownership follows the raw call.
31pub fn (c &Connection) get_image(d Drawable, x i32, y i32, width u32, height u32, plane_mask CULong, format i32) !&XImage {
32 return get_image(c.raw()!, d, x, y, width, height, plane_mask, format)
33}
34
35// XGetSubImage, borrowing this connection. Other ownership follows the raw call.
36pub fn (c &Connection) get_sub_image(d Drawable, x i32, y i32, width u32, height u32, plane_mask CULong, format i32, dest_image &XImage, dest_x i32, dest_y i32) !&XImage {
37 return get_sub_image(c.raw()!, d, x, y, width, height, plane_mask, format, dest_image, dest_x, dest_y)
38}
39
40// XFetchBytes, borrowing this connection. Other ownership follows the raw call.
41pub fn (c &Connection) fetch_bytes(nbytes_return &i32) !&char {
42 return fetch_bytes(c.raw()!, nbytes_return)
43}
44
45// XFetchBuffer, borrowing this connection. Other ownership follows the raw call.
46pub fn (c &Connection) fetch_buffer(nbytes_return &i32, buffer i32) !&char {
47 return fetch_buffer(c.raw()!, nbytes_return, buffer)
48}
49
50// XGetAtomName, borrowing this connection. Other ownership follows the raw call.
51pub fn (c &Connection) get_atom_name(atom Atom) !&char {
52 return get_atom_name(c.raw()!, atom)
53}
54
55// XGetAtomNames, borrowing this connection. Other ownership follows the raw call.
56pub fn (c &Connection) get_atom_names(atoms &Atom, count i32, names_return &&char) !i32 {
57 return get_atom_names(c.raw()!, atoms, count, names_return)
58}
59
60// XGetDefault, borrowing this connection. Other ownership follows the raw call.
61pub fn (c &Connection) get_default(program string, option string) !&char {
62 if program.contains('\x00') { return error('program contains NUL') }
63 if option.contains('\x00') { return error('option contains NUL') }
64 return get_default(c.raw()!, &char(program.str), &char(option.str))
65}
66
67// XInternAtom, borrowing this connection. Other ownership follows the raw call.
68pub fn (c &Connection) intern_atom(atom_name string, only_if_exists i32) !Atom {
69 if atom_name.contains('\x00') { return error('atom_name contains NUL') }
70 return intern_atom(c.raw()!, &char(atom_name.str), only_if_exists)
71}
72
73// XInternAtoms, borrowing this connection. Other ownership follows the raw call.
74pub fn (c &Connection) intern_atoms(names &&char, count i32, only_if_exists i32, atoms_return &Atom) !i32 {
75 return intern_atoms(c.raw()!, names, count, only_if_exists, atoms_return)
76}
77
78// XCopyColormapAndFree, borrowing this connection. Other ownership follows the raw call.
79pub fn (c &Connection) copy_colormap_and_free(colormap Colormap) !Colormap {
80 return copy_colormap_and_free(c.raw()!, colormap)
81}
82
83// XCreateColormap, borrowing this connection. Other ownership follows the raw call.
84pub fn (c &Connection) create_colormap(w Window, visual &Visual, alloc i32) !Colormap {
85 return create_colormap(c.raw()!, w, visual, alloc)
86}
87
88// XCreatePixmapCursor, borrowing this connection. Other ownership follows the raw call.
89pub fn (c &Connection) create_pixmap_cursor(source Pixmap, mask Pixmap, foreground_color &XColor, background_color &XColor, x u32, y u32) !Cursor {
90 return create_pixmap_cursor(c.raw()!, source, mask, foreground_color, background_color, x, y)
91}
92
93// XCreateGlyphCursor, borrowing this connection. Other ownership follows the raw call.
94pub fn (c &Connection) create_glyph_cursor(source_font Font, mask_font Font, source_char u32, mask_char u32, foreground_color &XColor, background_color &XColor) !Cursor {
95 return create_glyph_cursor(c.raw()!, source_font, mask_font, source_char, mask_char, foreground_color, background_color)
96}
97
98// XCreateFontCursor, borrowing this connection. Other ownership follows the raw call.
99pub fn (c &Connection) create_font_cursor(shape u32) !Cursor {
100 return create_font_cursor(c.raw()!, shape)
101}
102
103// XLoadFont, borrowing this connection. Other ownership follows the raw call.
104pub fn (c &Connection) load_font(name string) !Font {
105 if name.contains('\x00') { return error('name contains NUL') }
106 return load_font(c.raw()!, &char(name.str))
107}
108
109// XCreateGC, borrowing this connection. Other ownership follows the raw call.
110pub fn (c &Connection) create_gc(d Drawable, valuemask CULong, values &XGCValues) !GC {
111 return create_gc(c.raw()!, d, valuemask, values)
112}
113
114// XFlushGC, borrowing this connection. Other ownership follows the raw call.
115pub fn (c &Connection) flush_gc(gc GC) ! {
116 flush_gc(c.raw()!, gc)
117}
118
119// XCreatePixmap, borrowing this connection. Other ownership follows the raw call.
120pub fn (c &Connection) create_pixmap(d Drawable, width u32, height u32, depth u32) !Pixmap {
121 return create_pixmap(c.raw()!, d, width, height, depth)
122}
123
124// XCreateBitmapFromData, borrowing this connection. Other ownership follows the raw call.
125pub fn (c &Connection) create_bitmap_from_data(d Drawable, data string, width u32, height u32) !Pixmap {
126 if data.contains('\x00') { return error('data contains NUL') }
127 return create_bitmap_from_data(c.raw()!, d, &char(data.str), width, height)
128}
129
130// XCreatePixmapFromBitmapData, borrowing this connection. Other ownership follows the raw call.
131pub fn (c &Connection) create_pixmap_from_bitmap_data(d Drawable, data &char, width u32, height u32, fg CULong, bg CULong, depth u32) !Pixmap {
132 return create_pixmap_from_bitmap_data(c.raw()!, d, data, width, height, fg, bg, depth)
133}
134
135// XCreateSimpleWindow, borrowing this connection. Other ownership follows the raw call.
136pub fn (c &Connection) create_simple_window(parent Window, x i32, y i32, width u32, height u32, border_width u32, border CULong, background CULong) !Window {
137 return create_simple_window(c.raw()!, parent, x, y, width, height, border_width, border, background)
138}
139
140// XGetSelectionOwner, borrowing this connection. Other ownership follows the raw call.
141pub fn (c &Connection) get_selection_owner(selection Atom) !Window {
142 return get_selection_owner(c.raw()!, selection)
143}
144
145// XCreateWindow, borrowing this connection. Other ownership follows the raw call.
146pub fn (c &Connection) create_window(parent Window, x i32, y i32, width u32, height u32, border_width u32, depth i32, class u32, visual &Visual, valuemask CULong, attributes &XSetWindowAttributes) !Window {
147 return create_window(c.raw()!, parent, x, y, width, height, border_width, depth, class, visual, valuemask, attributes)
148}
149
150// XListInstalledColormaps, borrowing this connection. Other ownership follows the raw call.
151pub fn (c &Connection) list_installed_colormaps(w Window, num_return &i32) !&Colormap {
152 return list_installed_colormaps(c.raw()!, w, num_return)
153}
154
155// XListFonts, borrowing this connection. Other ownership follows the raw call.
156pub fn (c &Connection) list_fonts(pattern string, maxnames i32, actual_count_return &i32) !&&char {
157 if pattern.contains('\x00') { return error('pattern contains NUL') }
158 return list_fonts(c.raw()!, &char(pattern.str), maxnames, actual_count_return)
159}
160
161// XListFontsWithInfo, borrowing this connection. Other ownership follows the raw call.
162pub fn (c &Connection) list_fonts_with_info(pattern string, maxnames i32, count_return &i32, info_return &&XFontStruct) !&&char {
163 if pattern.contains('\x00') { return error('pattern contains NUL') }
164 return list_fonts_with_info(c.raw()!, &char(pattern.str), maxnames, count_return, info_return)
165}
166
167// XGetFontPath, borrowing this connection. Other ownership follows the raw call.
168pub fn (c &Connection) get_font_path(npaths_return &i32) !&&char {
169 return get_font_path(c.raw()!, npaths_return)
170}
171
172// XListExtensions, borrowing this connection. Other ownership follows the raw call.
173pub fn (c &Connection) list_extensions(nextensions_return &i32) !&&char {
174 return list_extensions(c.raw()!, nextensions_return)
175}
176
177// XListProperties, borrowing this connection. Other ownership follows the raw call.
178pub fn (c &Connection) list_properties(w Window, num_prop_return &i32) !&Atom {
179 return list_properties(c.raw()!, w, num_prop_return)
180}
181
182// XListHosts, borrowing this connection. Other ownership follows the raw call.
183pub fn (c &Connection) list_hosts(nhosts_return &i32, state_return &i32) !&XHostAddress {
184 return list_hosts(c.raw()!, nhosts_return, state_return)
185}
186
187// XKeycodeToKeysym, borrowing this connection. Other ownership follows the raw call.
188pub fn (c &Connection) keycode_to_keysym(keycode KeyCode, index i32) !KeySym {
189 return keycode_to_keysym(c.raw()!, keycode, index)
190}
191
192// XGetKeyboardMapping, borrowing this connection. Other ownership follows the raw call.
193pub fn (c &Connection) get_keyboard_mapping(first_keycode KeyCode, keycode_count i32, keysyms_per_keycode_return &i32) !&KeySym {
194 return get_keyboard_mapping(c.raw()!, first_keycode, keycode_count, keysyms_per_keycode_return)
195}
196
197// XMaxRequestSize, borrowing this connection. Other ownership follows the raw call.
198pub fn (c &Connection) max_request_size() !CLong {
199 return max_request_size(c.raw()!)
200}
201
202// XExtendedMaxRequestSize, borrowing this connection. Other ownership follows the raw call.
203pub fn (c &Connection) extended_max_request_size() !CLong {
204 return extended_max_request_size(c.raw()!)
205}
206
207// XResourceManagerString, borrowing this connection. Other ownership follows the raw call.
208pub fn (c &Connection) resource_manager_string() !&char {
209 return resource_manager_string(c.raw()!)
210}
211
212// XDisplayMotionBufferSize, borrowing this connection. Other ownership follows the raw call.
213pub fn (c &Connection) display_motion_buffer_size() !CULong {
214 return display_motion_buffer_size(c.raw()!)
215}
216
217// XLockDisplay, borrowing this connection. Other ownership follows the raw call.
218pub fn (c &Connection) lock_display() ! {
219 lock_display(c.raw()!)
220}
221
222// XUnlockDisplay, borrowing this connection. Other ownership follows the raw call.
223pub fn (c &Connection) unlock_display() ! {
224 unlock_display(c.raw()!)
225}
226
227// XInitExtension, borrowing this connection. Other ownership follows the raw call.
228pub fn (c &Connection) init_extension(name string) !&XExtCodes {
229 if name.contains('\x00') { return error('name contains NUL') }
230 return init_extension(c.raw()!, &char(name.str))
231}
232
233// XAddExtension, borrowing this connection. Other ownership follows the raw call.
234pub fn (c &Connection) add_extension() !&XExtCodes {
235 return add_extension(c.raw()!)
236}
237
238// XRootWindow, borrowing this connection. Other ownership follows the raw call.
239pub fn (c &Connection) root_window(screen_number i32) !Window {
240 return root_window(c.raw()!, screen_number)
241}
242
243// XDefaultRootWindow, borrowing this connection. Other ownership follows the raw call.
244pub fn (c &Connection) default_root_window() !Window {
245 return default_root_window(c.raw()!)
246}
247
248// XDefaultVisual, borrowing this connection. Other ownership follows the raw call.
249pub fn (c &Connection) default_visual(screen_number i32) !&Visual {
250 return default_visual(c.raw()!, screen_number)
251}
252
253// XDefaultGC, borrowing this connection. Other ownership follows the raw call.
254pub fn (c &Connection) default_gc(screen_number i32) !GC {
255 return default_gc(c.raw()!, screen_number)
256}
257
258// XNextRequest, borrowing this connection. Other ownership follows the raw call.
259pub fn (c &Connection) next_request() !CULong {
260 return next_request(c.raw()!)
261}
262
263// XLastKnownRequestProcessed, borrowing this connection. Other ownership follows the raw call.
264pub fn (c &Connection) last_known_request_processed() !CULong {
265 return last_known_request_processed(c.raw()!)
266}
267
268// XServerVendor, borrowing this connection. Other ownership follows the raw call.
269pub fn (c &Connection) server_vendor() !&char {
270 return server_vendor(c.raw()!)
271}
272
273// XDisplayString, borrowing this connection. Other ownership follows the raw call.
274pub fn (c &Connection) display_string() !&char {
275 return display_string(c.raw()!)
276}
277
278// XDefaultColormap, borrowing this connection. Other ownership follows the raw call.
279pub fn (c &Connection) default_colormap(screen_number i32) !Colormap {
280 return default_colormap(c.raw()!, screen_number)
281}
282
283// XScreenOfDisplay, borrowing this connection. Other ownership follows the raw call.
284pub fn (c &Connection) screen_of_display(screen_number i32) !&Screen {
285 return screen_of_display(c.raw()!, screen_number)
286}
287
288// XDefaultScreenOfDisplay, borrowing this connection. Other ownership follows the raw call.
289pub fn (c &Connection) default_screen_of_display() !&Screen {
290 return default_screen_of_display(c.raw()!)
291}
292
293// XSetIOErrorExitHandler, borrowing this connection. Other ownership follows the raw call.
294pub fn (c &Connection) set_io_error_exit_handler(display XIOErrorExitHandler, user_data voidptr) ! {
295 set_io_error_exit_handler(c.raw()!, display, user_data)
296}
297
298// XListPixmapFormats, borrowing this connection. Other ownership follows the raw call.
299pub fn (c &Connection) list_pixmap_formats(count_return &i32) !&XPixmapFormatValues {
300 return list_pixmap_formats(c.raw()!, count_return)
301}
302
303// XListDepths, borrowing this connection. Other ownership follows the raw call.
304pub fn (c &Connection) list_depths(screen_number i32, count_return &i32) !&i32 {
305 return list_depths(c.raw()!, screen_number, count_return)
306}
307
308// XReconfigureWMWindow, borrowing this connection. Other ownership follows the raw call.
309pub fn (c &Connection) reconfigure_wm_window(w Window, screen_number i32, mask u32, changes &XWindowChanges) !i32 {
310 return reconfigure_wm_window(c.raw()!, w, screen_number, mask, changes)
311}
312
313// XGetWMProtocols, borrowing this connection. Other ownership follows the raw call.
314pub fn (c &Connection) get_wm_protocols(w Window, protocols_return &&Atom, count_return &i32) !i32 {
315 return get_wm_protocols(c.raw()!, w, protocols_return, count_return)
316}
317
318// XSetWMProtocols, borrowing this connection. Other ownership follows the raw call.
319pub fn (c &Connection) set_wm_protocols(w Window, protocols &Atom, count i32) !i32 {
320 return set_wm_protocols(c.raw()!, w, protocols, count)
321}
322
323// XIconifyWindow, borrowing this connection. Other ownership follows the raw call.
324pub fn (c &Connection) iconify_window(w Window, screen_number i32) !i32 {
325 return iconify_window(c.raw()!, w, screen_number)
326}
327
328// XWithdrawWindow, borrowing this connection. Other ownership follows the raw call.
329pub fn (c &Connection) withdraw_window(w Window, screen_number i32) !i32 {
330 return withdraw_window(c.raw()!, w, screen_number)
331}
332
333// XGetCommand, borrowing this connection. Other ownership follows the raw call.
334pub fn (c &Connection) get_command(w Window, argv_return &&&char, argc_return &i32) !i32 {
335 return get_command(c.raw()!, w, argv_return, argc_return)
336}
337
338// XGetWMColormapWindows, borrowing this connection. Other ownership follows the raw call.
339pub fn (c &Connection) get_wm_colormap_windows(w Window, windows_return &&Window, count_return &i32) !i32 {
340 return get_wm_colormap_windows(c.raw()!, w, windows_return, count_return)
341}
342
343// XSetWMColormapWindows, borrowing this connection. Other ownership follows the raw call.
344pub fn (c &Connection) set_wm_colormap_windows(w Window, colormap_windows &Window, count i32) !i32 {
345 return set_wm_colormap_windows(c.raw()!, w, colormap_windows, count)
346}
347
348// XSetTransientForHint, borrowing this connection. Other ownership follows the raw call.
349pub fn (c &Connection) set_transient_for_hint(w Window, prop_window Window) !i32 {
350 return set_transient_for_hint(c.raw()!, w, prop_window)
351}
352
353// XActivateScreenSaver, borrowing this connection. Other ownership follows the raw call.
354pub fn (c &Connection) activate_screen_saver() !i32 {
355 return activate_screen_saver(c.raw()!)
356}
357
358// XAddHost, borrowing this connection. Other ownership follows the raw call.
359pub fn (c &Connection) add_host(host &XHostAddress) !i32 {
360 return add_host(c.raw()!, host)
361}
362
363// XAddHosts, borrowing this connection. Other ownership follows the raw call.
364pub fn (c &Connection) add_hosts(hosts &XHostAddress, num_hosts i32) !i32 {
365 return add_hosts(c.raw()!, hosts, num_hosts)
366}
367
368// XAddToSaveSet, borrowing this connection. Other ownership follows the raw call.
369pub fn (c &Connection) add_to_save_set(w Window) !i32 {
370 return add_to_save_set(c.raw()!, w)
371}
372
373// XAllocColor, borrowing this connection. Other ownership follows the raw call.
374pub fn (c &Connection) alloc_color(colormap Colormap, screen_in_out &XColor) !i32 {
375 return alloc_color(c.raw()!, colormap, screen_in_out)
376}
377
378// XAllocColorCells, borrowing this connection. Other ownership follows the raw call.
379pub fn (c &Connection) alloc_color_cells(colormap Colormap, contig i32, plane_masks_return &CULong, nplanes u32, pixels_return &CULong, npixels u32) !i32 {
380 return alloc_color_cells(c.raw()!, colormap, contig, plane_masks_return, nplanes, pixels_return, npixels)
381}
382
383// XAllocColorPlanes, borrowing this connection. Other ownership follows the raw call.
384pub fn (c &Connection) alloc_color_planes(colormap Colormap, contig i32, pixels_return &CULong, ncolors i32, nreds i32, ngreens i32, nblues i32, rmask_return &CULong, gmask_return &CULong, bmask_return &CULong) !i32 {
385 return alloc_color_planes(c.raw()!, colormap, contig, pixels_return, ncolors, nreds, ngreens, nblues, rmask_return, gmask_return, bmask_return)
386}
387
388// XAllocNamedColor, borrowing this connection. Other ownership follows the raw call.
389pub fn (c &Connection) alloc_named_color(colormap Colormap, color_name string, screen_def_return &XColor, exact_def_return &XColor) !i32 {
390 if color_name.contains('\x00') { return error('color_name contains NUL') }
391 return alloc_named_color(c.raw()!, colormap, &char(color_name.str), screen_def_return, exact_def_return)
392}
393
394// XAllowEvents, borrowing this connection. Other ownership follows the raw call.
395pub fn (c &Connection) allow_events(event_mode i32, time Time) !i32 {
396 return allow_events(c.raw()!, event_mode, time)
397}
398
399// XAutoRepeatOff, borrowing this connection. Other ownership follows the raw call.
400pub fn (c &Connection) auto_repeat_off() !i32 {
401 return auto_repeat_off(c.raw()!)
402}
403
404// XAutoRepeatOn, borrowing this connection. Other ownership follows the raw call.
405pub fn (c &Connection) auto_repeat_on() !i32 {
406 return auto_repeat_on(c.raw()!)
407}
408
409// XBell, borrowing this connection. Other ownership follows the raw call.
410pub fn (c &Connection) bell(percent i32) !i32 {
411 return bell(c.raw()!, percent)
412}
413
414// XBitmapBitOrder, borrowing this connection. Other ownership follows the raw call.
415pub fn (c &Connection) bitmap_bit_order() !i32 {
416 return bitmap_bit_order(c.raw()!)
417}
418
419// XBitmapPad, borrowing this connection. Other ownership follows the raw call.
420pub fn (c &Connection) bitmap_pad() !i32 {
421 return bitmap_pad(c.raw()!)
422}
423
424// XBitmapUnit, borrowing this connection. Other ownership follows the raw call.
425pub fn (c &Connection) bitmap_unit() !i32 {
426 return bitmap_unit(c.raw()!)
427}
428
429// XChangeActivePointerGrab, borrowing this connection. Other ownership follows the raw call.
430pub fn (c &Connection) change_active_pointer_grab(event_mask u32, cursor Cursor, time Time) !i32 {
431 return change_active_pointer_grab(c.raw()!, event_mask, cursor, time)
432}
433
434// XChangeGC, borrowing this connection. Other ownership follows the raw call.
435pub fn (c &Connection) change_gc(gc GC, valuemask CULong, values &XGCValues) !i32 {
436 return change_gc(c.raw()!, gc, valuemask, values)
437}
438
439// XChangeKeyboardControl, borrowing this connection. Other ownership follows the raw call.
440pub fn (c &Connection) change_keyboard_control(value_mask CULong, values &XKeyboardControl) !i32 {
441 return change_keyboard_control(c.raw()!, value_mask, values)
442}
443
444// XChangeKeyboardMapping, borrowing this connection. Other ownership follows the raw call.
445pub fn (c &Connection) change_keyboard_mapping(first_keycode i32, keysyms_per_keycode i32, keysyms &KeySym, num_codes i32) !i32 {
446 return change_keyboard_mapping(c.raw()!, first_keycode, keysyms_per_keycode, keysyms, num_codes)
447}
448
449// XChangePointerControl, borrowing this connection. Other ownership follows the raw call.
450pub fn (c &Connection) change_pointer_control(do_accel i32, do_threshold i32, accel_numerator i32, accel_denominator i32, threshold i32) !i32 {
451 return change_pointer_control(c.raw()!, do_accel, do_threshold, accel_numerator, accel_denominator, threshold)
452}
453
454// XChangeProperty, borrowing this connection. Other ownership follows the raw call.
455pub fn (c &Connection) change_property(w Window, property Atom, @type Atom, format i32, mode i32, data &u8, nelements i32) !i32 {
456 return change_property(c.raw()!, w, property, @type, format, mode, data, nelements)
457}
458
459// XChangeSaveSet, borrowing this connection. Other ownership follows the raw call.
460pub fn (c &Connection) change_save_set(w Window, change_mode i32) !i32 {
461 return change_save_set(c.raw()!, w, change_mode)
462}
463
464// XChangeWindowAttributes, borrowing this connection. Other ownership follows the raw call.
465pub fn (c &Connection) change_window_attributes(w Window, valuemask CULong, attributes &XSetWindowAttributes) !i32 {
466 return change_window_attributes(c.raw()!, w, valuemask, attributes)
467}
468
469// XCheckIfEvent, borrowing this connection. Other ownership follows the raw call.
470pub fn (c &Connection) check_if_event(event_return &XEvent, arg2 fn (&Display, &XEvent, XPointer) i32, arg XPointer) !i32 {
471 return check_if_event(c.raw()!, event_return, arg2, arg)
472}
473
474// XCheckMaskEvent, borrowing this connection. Other ownership follows the raw call.
475pub fn (c &Connection) check_mask_event(event_mask CLong, event_return &XEvent) !i32 {
476 return check_mask_event(c.raw()!, event_mask, event_return)
477}
478
479// XCheckTypedEvent, borrowing this connection. Other ownership follows the raw call.
480pub fn (c &Connection) check_typed_event(event_type i32, event_return &XEvent) !i32 {
481 return check_typed_event(c.raw()!, event_type, event_return)
482}
483
484// XCheckTypedWindowEvent, borrowing this connection. Other ownership follows the raw call.
485pub fn (c &Connection) check_typed_window_event(w Window, event_type i32, event_return &XEvent) !i32 {
486 return check_typed_window_event(c.raw()!, w, event_type, event_return)
487}
488
489// XCheckWindowEvent, borrowing this connection. Other ownership follows the raw call.
490pub fn (c &Connection) check_window_event(w Window, event_mask CLong, event_return &XEvent) !i32 {
491 return check_window_event(c.raw()!, w, event_mask, event_return)
492}
493
494// XCirculateSubwindows, borrowing this connection. Other ownership follows the raw call.
495pub fn (c &Connection) circulate_subwindows(w Window, direction i32) !i32 {
496 return circulate_subwindows(c.raw()!, w, direction)
497}
498
499// XCirculateSubwindowsDown, borrowing this connection. Other ownership follows the raw call.
500pub fn (c &Connection) circulate_subwindows_down(w Window) !i32 {
501 return circulate_subwindows_down(c.raw()!, w)
502}
503
504// XCirculateSubwindowsUp, borrowing this connection. Other ownership follows the raw call.
505pub fn (c &Connection) circulate_subwindows_up(w Window) !i32 {
506 return circulate_subwindows_up(c.raw()!, w)
507}
508
509// XClearArea, borrowing this connection. Other ownership follows the raw call.
510pub fn (c &Connection) clear_area(w Window, x i32, y i32, width u32, height u32, exposures i32) !i32 {
511 return clear_area(c.raw()!, w, x, y, width, height, exposures)
512}
513
514// XClearWindow, borrowing this connection. Other ownership follows the raw call.
515pub fn (c &Connection) clear_window(w Window) !i32 {
516 return clear_window(c.raw()!, w)
517}
518
519// XConfigureWindow, borrowing this connection. Other ownership follows the raw call.
520pub fn (c &Connection) configure_window(w Window, value_mask u32, values &XWindowChanges) !i32 {
521 return configure_window(c.raw()!, w, value_mask, values)
522}
523
524// XConnectionNumber, borrowing this connection. Other ownership follows the raw call.
525pub fn (c &Connection) connection_number() !i32 {
526 return connection_number(c.raw()!)
527}
528
529// XConvertSelection, borrowing this connection. Other ownership follows the raw call.
530pub fn (c &Connection) convert_selection(selection Atom, target Atom, property Atom, requestor Window, time Time) !i32 {
531 return convert_selection(c.raw()!, selection, target, property, requestor, time)
532}
533
534// XCopyArea, borrowing this connection. Other ownership follows the raw call.
535pub fn (c &Connection) copy_area(src Drawable, dest Drawable, gc GC, src_x i32, src_y i32, width u32, height u32, dest_x i32, dest_y i32) !i32 {
536 return copy_area(c.raw()!, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y)
537}
538
539// XCopyGC, borrowing this connection. Other ownership follows the raw call.
540pub fn (c &Connection) copy_gc(src GC, valuemask CULong, dest GC) !i32 {
541 return copy_gc(c.raw()!, src, valuemask, dest)
542}
543
544// XCopyPlane, borrowing this connection. Other ownership follows the raw call.
545pub fn (c &Connection) copy_plane(src Drawable, dest Drawable, gc GC, src_x i32, src_y i32, width u32, height u32, dest_x i32, dest_y i32, plane CULong) !i32 {
546 return copy_plane(c.raw()!, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y, plane)
547}
548
549// XDefaultDepth, borrowing this connection. Other ownership follows the raw call.
550pub fn (c &Connection) default_depth(screen_number i32) !i32 {
551 return default_depth(c.raw()!, screen_number)
552}
553
554// XDefaultScreen, borrowing this connection. Other ownership follows the raw call.
555pub fn (c &Connection) default_screen() !i32 {
556 return default_screen(c.raw()!)
557}
558
559// XDefineCursor, borrowing this connection. Other ownership follows the raw call.
560pub fn (c &Connection) define_cursor(w Window, cursor Cursor) !i32 {
561 return define_cursor(c.raw()!, w, cursor)
562}
563
564// XDeleteProperty, borrowing this connection. Other ownership follows the raw call.
565pub fn (c &Connection) delete_property(w Window, property Atom) !i32 {
566 return delete_property(c.raw()!, w, property)
567}
568
569// XDestroyWindow, borrowing this connection. Other ownership follows the raw call.
570pub fn (c &Connection) destroy_window(w Window) !i32 {
571 return destroy_window(c.raw()!, w)
572}
573
574// XDestroySubwindows, borrowing this connection. Other ownership follows the raw call.
575pub fn (c &Connection) destroy_subwindows(w Window) !i32 {
576 return destroy_subwindows(c.raw()!, w)
577}
578
579// XDisableAccessControl, borrowing this connection. Other ownership follows the raw call.
580pub fn (c &Connection) disable_access_control() !i32 {
581 return disable_access_control(c.raw()!)
582}
583
584// XDisplayCells, borrowing this connection. Other ownership follows the raw call.
585pub fn (c &Connection) display_cells(screen_number i32) !i32 {
586 return display_cells(c.raw()!, screen_number)
587}
588
589// XDisplayHeight, borrowing this connection. Other ownership follows the raw call.
590pub fn (c &Connection) display_height(screen_number i32) !i32 {
591 return display_height(c.raw()!, screen_number)
592}
593
594// XDisplayHeightMM, borrowing this connection. Other ownership follows the raw call.
595pub fn (c &Connection) display_height_mm(screen_number i32) !i32 {
596 return display_height_mm(c.raw()!, screen_number)
597}
598
599// XDisplayKeycodes, borrowing this connection. Other ownership follows the raw call.
600pub fn (c &Connection) display_keycodes(min_keycodes_return &i32, max_keycodes_return &i32) !i32 {
601 return display_keycodes(c.raw()!, min_keycodes_return, max_keycodes_return)
602}
603
604// XDisplayPlanes, borrowing this connection. Other ownership follows the raw call.
605pub fn (c &Connection) display_planes(screen_number i32) !i32 {
606 return display_planes(c.raw()!, screen_number)
607}
608
609// XDisplayWidth, borrowing this connection. Other ownership follows the raw call.
610pub fn (c &Connection) display_width(screen_number i32) !i32 {
611 return display_width(c.raw()!, screen_number)
612}
613
614// XDisplayWidthMM, borrowing this connection. Other ownership follows the raw call.
615pub fn (c &Connection) display_width_mm(screen_number i32) !i32 {
616 return display_width_mm(c.raw()!, screen_number)
617}
618
619// XDrawArc, borrowing this connection. Other ownership follows the raw call.
620pub fn (c &Connection) draw_arc(d Drawable, gc GC, x i32, y i32, width u32, height u32, angle1 i32, angle2 i32) !i32 {
621 return draw_arc(c.raw()!, d, gc, x, y, width, height, angle1, angle2)
622}
623
624// XDrawArcs, borrowing this connection. Other ownership follows the raw call.
625pub fn (c &Connection) draw_arcs(d Drawable, gc GC, arcs &XArc, narcs i32) !i32 {
626 return draw_arcs(c.raw()!, d, gc, arcs, narcs)
627}
628
629// XDrawImageString, borrowing this connection. Other ownership follows the raw call.
630pub fn (c &Connection) draw_image_string(d Drawable, gc GC, x i32, y i32, string_arg string, length i32) !i32 {
631 if string_arg.contains('\x00') { return error('string_arg contains NUL') }
632 return draw_image_string(c.raw()!, d, gc, x, y, &char(string_arg.str), length)
633}
634
635// XDrawImageString16, borrowing this connection. Other ownership follows the raw call.
636pub fn (c &Connection) draw_image_string16(d Drawable, gc GC, x i32, y i32, string_arg &XChar2b, length i32) !i32 {
637 return draw_image_string16(c.raw()!, d, gc, x, y, string_arg, length)
638}
639
640// XDrawLine, borrowing this connection. Other ownership follows the raw call.
641pub fn (c &Connection) draw_line(d Drawable, gc GC, x1 i32, y1 i32, x2 i32, y2 i32) !i32 {
642 return draw_line(c.raw()!, d, gc, x1, y1, x2, y2)
643}
644
645// XDrawLines, borrowing this connection. Other ownership follows the raw call.
646pub fn (c &Connection) draw_lines(d Drawable, gc GC, points &XPoint, npoints i32, mode i32) !i32 {
647 return draw_lines(c.raw()!, d, gc, points, npoints, mode)
648}
649
650// XDrawPoint, borrowing this connection. Other ownership follows the raw call.
651pub fn (c &Connection) draw_point(d Drawable, gc GC, x i32, y i32) !i32 {
652 return draw_point(c.raw()!, d, gc, x, y)
653}
654
655// XDrawPoints, borrowing this connection. Other ownership follows the raw call.
656pub fn (c &Connection) draw_points(d Drawable, gc GC, points &XPoint, npoints i32, mode i32) !i32 {
657 return draw_points(c.raw()!, d, gc, points, npoints, mode)
658}
659
660// XDrawRectangle, borrowing this connection. Other ownership follows the raw call.
661pub fn (c &Connection) draw_rectangle(d Drawable, gc GC, x i32, y i32, width u32, height u32) !i32 {
662 return draw_rectangle(c.raw()!, d, gc, x, y, width, height)
663}
664
665// XDrawRectangles, borrowing this connection. Other ownership follows the raw call.
666pub fn (c &Connection) draw_rectangles(d Drawable, gc GC, rectangles &XRectangle, nrectangles i32) !i32 {
667 return draw_rectangles(c.raw()!, d, gc, rectangles, nrectangles)
668}
669
670// XDrawSegments, borrowing this connection. Other ownership follows the raw call.
671pub fn (c &Connection) draw_segments(d Drawable, gc GC, segments &XSegment, nsegments i32) !i32 {
672 return draw_segments(c.raw()!, d, gc, segments, nsegments)
673}
674
675// XDrawString, borrowing this connection. Other ownership follows the raw call.
676pub fn (c &Connection) draw_string(d Drawable, gc GC, x i32, y i32, string_arg string, length i32) !i32 {
677 if string_arg.contains('\x00') { return error('string_arg contains NUL') }
678 return draw_string(c.raw()!, d, gc, x, y, &char(string_arg.str), length)
679}
680
681// XDrawString16, borrowing this connection. Other ownership follows the raw call.
682pub fn (c &Connection) draw_string16(d Drawable, gc GC, x i32, y i32, string_arg &XChar2b, length i32) !i32 {
683 return draw_string16(c.raw()!, d, gc, x, y, string_arg, length)
684}
685
686// XDrawText, borrowing this connection. Other ownership follows the raw call.
687pub fn (c &Connection) draw_text(d Drawable, gc GC, x i32, y i32, items &XTextItem, nitems i32) !i32 {
688 return draw_text(c.raw()!, d, gc, x, y, items, nitems)
689}
690
691// XDrawText16, borrowing this connection. Other ownership follows the raw call.
692pub fn (c &Connection) draw_text16(d Drawable, gc GC, x i32, y i32, items &XTextItem16, nitems i32) !i32 {
693 return draw_text16(c.raw()!, d, gc, x, y, items, nitems)
694}
695
696// XEnableAccessControl, borrowing this connection. Other ownership follows the raw call.
697pub fn (c &Connection) enable_access_control() !i32 {
698 return enable_access_control(c.raw()!)
699}
700
701// XEventsQueued, borrowing this connection. Other ownership follows the raw call.
702pub fn (c &Connection) events_queued(mode i32) !i32 {
703 return events_queued(c.raw()!, mode)
704}
705
706// XFetchName, borrowing this connection. Other ownership follows the raw call.
707pub fn (c &Connection) fetch_name(w Window, window_name_return &&char) !i32 {
708 return fetch_name(c.raw()!, w, window_name_return)
709}
710
711// XFillArc, borrowing this connection. Other ownership follows the raw call.
712pub fn (c &Connection) fill_arc(d Drawable, gc GC, x i32, y i32, width u32, height u32, angle1 i32, angle2 i32) !i32 {
713 return fill_arc(c.raw()!, d, gc, x, y, width, height, angle1, angle2)
714}
715
716// XFillArcs, borrowing this connection. Other ownership follows the raw call.
717pub fn (c &Connection) fill_arcs(d Drawable, gc GC, arcs &XArc, narcs i32) !i32 {
718 return fill_arcs(c.raw()!, d, gc, arcs, narcs)
719}
720
721// XFillPolygon, borrowing this connection. Other ownership follows the raw call.
722pub fn (c &Connection) fill_polygon(d Drawable, gc GC, points &XPoint, npoints i32, shape i32, mode i32) !i32 {
723 return fill_polygon(c.raw()!, d, gc, points, npoints, shape, mode)
724}
725
726// XFillRectangle, borrowing this connection. Other ownership follows the raw call.
727pub fn (c &Connection) fill_rectangle(d Drawable, gc GC, x i32, y i32, width u32, height u32) !i32 {
728 return fill_rectangle(c.raw()!, d, gc, x, y, width, height)
729}
730
731// XFillRectangles, borrowing this connection. Other ownership follows the raw call.
732pub fn (c &Connection) fill_rectangles(d Drawable, gc GC, rectangles &XRectangle, nrectangles i32) !i32 {
733 return fill_rectangles(c.raw()!, d, gc, rectangles, nrectangles)
734}
735
736// XForceScreenSaver, borrowing this connection. Other ownership follows the raw call.
737pub fn (c &Connection) force_screen_saver(mode i32) !i32 {
738 return force_screen_saver(c.raw()!, mode)
739}
740
741// XFreeColormap, borrowing this connection. Other ownership follows the raw call.
742pub fn (c &Connection) free_colormap(colormap Colormap) !i32 {
743 return free_colormap(c.raw()!, colormap)
744}
745
746// XFreeColors, borrowing this connection. Other ownership follows the raw call.
747pub fn (c &Connection) free_colors(colormap Colormap, pixels &CULong, npixels i32, planes CULong) !i32 {
748 return free_colors(c.raw()!, colormap, pixels, npixels, planes)
749}
750
751// XFreeCursor, borrowing this connection. Other ownership follows the raw call.
752pub fn (c &Connection) free_cursor(cursor Cursor) !i32 {
753 return free_cursor(c.raw()!, cursor)
754}
755
756// XFreeFont, borrowing this connection. Other ownership follows the raw call.
757pub fn (c &Connection) free_font(font_struct &XFontStruct) !i32 {
758 return free_font(c.raw()!, font_struct)
759}
760
761// XFreeGC, borrowing this connection. Other ownership follows the raw call.
762pub fn (c &Connection) free_gc(gc GC) !i32 {
763 return free_gc(c.raw()!, gc)
764}
765
766// XFreePixmap, borrowing this connection. Other ownership follows the raw call.
767pub fn (c &Connection) free_pixmap(pixmap Pixmap) !i32 {
768 return free_pixmap(c.raw()!, pixmap)
769}
770
771// XGeometry, borrowing this connection. Other ownership follows the raw call.
772pub fn (c &Connection) geometry(screen i32, position string, default_position string, bwidth u32, fwidth u32, fheight u32, xadder i32, yadder i32, x_return &i32, y_return &i32, width_return &i32, height_return &i32) !i32 {
773 if position.contains('\x00') { return error('position contains NUL') }
774 if default_position.contains('\x00') { return error('default_position contains NUL') }
775 return geometry(c.raw()!, screen, &char(position.str), &char(default_position.str), bwidth, fwidth, fheight, xadder, yadder, x_return, y_return, width_return, height_return)
776}
777
778// XGetErrorDatabaseText, borrowing this connection. Other ownership follows the raw call.
779pub fn (c &Connection) get_error_database_text(name string, message string, default_string string, buffer_return &char, length i32) !i32 {
780 if name.contains('\x00') { return error('name contains NUL') }
781 if message.contains('\x00') { return error('message contains NUL') }
782 if default_string.contains('\x00') { return error('default_string contains NUL') }
783 return get_error_database_text(c.raw()!, &char(name.str), &char(message.str), &char(default_string.str), buffer_return, length)
784}
785
786// XGetErrorText, borrowing this connection. Other ownership follows the raw call.
787pub fn (c &Connection) get_error_text(code i32, buffer_return &char, length i32) !i32 {
788 return get_error_text(c.raw()!, code, buffer_return, length)
789}
790
791// XGetGCValues, borrowing this connection. Other ownership follows the raw call.
792pub fn (c &Connection) get_gc_values(gc GC, valuemask CULong, values_return &XGCValues) !i32 {
793 return get_gc_values(c.raw()!, gc, valuemask, values_return)
794}
795
796// XGetGeometry, borrowing this connection. Other ownership follows the raw call.
797pub fn (c &Connection) get_geometry(d Drawable, root_return &Window, x_return &i32, y_return &i32, width_return &u32, height_return &u32, border_width_return &u32, depth_return &u32) !i32 {
798 return get_geometry(c.raw()!, d, root_return, x_return, y_return, width_return, height_return, border_width_return, depth_return)
799}
800
801// XGetIconName, borrowing this connection. Other ownership follows the raw call.
802pub fn (c &Connection) get_icon_name(w Window, icon_name_return &&char) !i32 {
803 return get_icon_name(c.raw()!, w, icon_name_return)
804}
805
806// XGetInputFocus, borrowing this connection. Other ownership follows the raw call.
807pub fn (c &Connection) get_input_focus(focus_return &Window, revert_to_return &i32) !i32 {
808 return get_input_focus(c.raw()!, focus_return, revert_to_return)
809}
810
811// XGetKeyboardControl, borrowing this connection. Other ownership follows the raw call.
812pub fn (c &Connection) get_keyboard_control(values_return &XKeyboardState) !i32 {
813 return get_keyboard_control(c.raw()!, values_return)
814}
815
816// XGetPointerControl, borrowing this connection. Other ownership follows the raw call.
817pub fn (c &Connection) get_pointer_control(accel_numerator_return &i32, accel_denominator_return &i32, threshold_return &i32) !i32 {
818 return get_pointer_control(c.raw()!, accel_numerator_return, accel_denominator_return, threshold_return)
819}
820
821// XGetPointerMapping, borrowing this connection. Other ownership follows the raw call.
822pub fn (c &Connection) get_pointer_mapping(map_return &u8, nmap i32) !i32 {
823 return get_pointer_mapping(c.raw()!, map_return, nmap)
824}
825
826// XGetScreenSaver, borrowing this connection. Other ownership follows the raw call.
827pub fn (c &Connection) get_screen_saver(timeout_return &i32, interval_return &i32, prefer_blanking_return &i32, allow_exposures_return &i32) !i32 {
828 return get_screen_saver(c.raw()!, timeout_return, interval_return, prefer_blanking_return, allow_exposures_return)
829}
830
831// XGetTransientForHint, borrowing this connection. Other ownership follows the raw call.
832pub fn (c &Connection) get_transient_for_hint(w Window, prop_window_return &Window) !i32 {
833 return get_transient_for_hint(c.raw()!, w, prop_window_return)
834}
835
836// XGetWindowProperty, borrowing this connection. Other ownership follows the raw call.
837pub fn (c &Connection) get_window_property(w Window, property Atom, long_offset CLong, long_length CLong, delete i32, req_type Atom, actual_type_return &Atom, actual_format_return &i32, nitems_return &CULong, bytes_after_return &CULong, prop_return &&u8) !i32 {
838 return get_window_property(c.raw()!, w, property, long_offset, long_length, delete, req_type, actual_type_return, actual_format_return, nitems_return, bytes_after_return, prop_return)
839}
840
841// XGetWindowAttributes, borrowing this connection. Other ownership follows the raw call.
842pub fn (c &Connection) get_window_attributes(w Window, window_attributes_return &XWindowAttributes) !i32 {
843 return get_window_attributes(c.raw()!, w, window_attributes_return)
844}
845
846// XGrabButton, borrowing this connection. Other ownership follows the raw call.
847pub fn (c &Connection) grab_button(button u32, modifiers u32, grab_window Window, owner_events i32, event_mask u32, pointer_mode i32, keyboard_mode i32, confine_to Window, cursor Cursor) !i32 {
848 return grab_button(c.raw()!, button, modifiers, grab_window, owner_events, event_mask, pointer_mode, keyboard_mode, confine_to, cursor)
849}
850
851// XGrabKey, borrowing this connection. Other ownership follows the raw call.
852pub fn (c &Connection) grab_key(keycode i32, modifiers u32, grab_window Window, owner_events i32, pointer_mode i32, keyboard_mode i32) !i32 {
853 return grab_key(c.raw()!, keycode, modifiers, grab_window, owner_events, pointer_mode, keyboard_mode)
854}
855
856// XGrabKeyboard, borrowing this connection. Other ownership follows the raw call.
857pub fn (c &Connection) grab_keyboard(grab_window Window, owner_events i32, pointer_mode i32, keyboard_mode i32, time Time) !i32 {
858 return grab_keyboard(c.raw()!, grab_window, owner_events, pointer_mode, keyboard_mode, time)
859}
860
861// XGrabPointer, borrowing this connection. Other ownership follows the raw call.
862pub fn (c &Connection) grab_pointer(grab_window Window, owner_events i32, event_mask u32, pointer_mode i32, keyboard_mode i32, confine_to Window, cursor Cursor, time Time) !i32 {
863 return grab_pointer(c.raw()!, grab_window, owner_events, event_mask, pointer_mode, keyboard_mode, confine_to, cursor, time)
864}
865
866// XGrabServer, borrowing this connection. Other ownership follows the raw call.
867pub fn (c &Connection) grab_server() !i32 {
868 return grab_server(c.raw()!)
869}
870
871// XIfEvent, borrowing this connection. Other ownership follows the raw call.
872pub fn (c &Connection) if_event(event_return &XEvent, arg2 fn (&Display, &XEvent, XPointer) i32, arg XPointer) !i32 {
873 return if_event(c.raw()!, event_return, arg2, arg)
874}
875
876// XImageByteOrder, borrowing this connection. Other ownership follows the raw call.
877pub fn (c &Connection) image_byte_order() !i32 {
878 return image_byte_order(c.raw()!)
879}
880
881// XInstallColormap, borrowing this connection. Other ownership follows the raw call.
882pub fn (c &Connection) install_colormap(colormap Colormap) !i32 {
883 return install_colormap(c.raw()!, colormap)
884}
885
886// XKeysymToKeycode, borrowing this connection. Other ownership follows the raw call.
887pub fn (c &Connection) keysym_to_keycode(keysym KeySym) !KeyCode {
888 return keysym_to_keycode(c.raw()!, keysym)
889}
890
891// XKillClient, borrowing this connection. Other ownership follows the raw call.
892pub fn (c &Connection) kill_client(resource XID) !i32 {
893 return kill_client(c.raw()!, resource)
894}
895
896// XLookupColor, borrowing this connection. Other ownership follows the raw call.
897pub fn (c &Connection) lookup_color(colormap Colormap, color_name string, exact_def_return &XColor, screen_def_return &XColor) !i32 {
898 if color_name.contains('\x00') { return error('color_name contains NUL') }
899 return lookup_color(c.raw()!, colormap, &char(color_name.str), exact_def_return, screen_def_return)
900}
901
902// XLowerWindow, borrowing this connection. Other ownership follows the raw call.
903pub fn (c &Connection) lower_window(w Window) !i32 {
904 return lower_window(c.raw()!, w)
905}
906
907// XMapRaised, borrowing this connection. Other ownership follows the raw call.
908pub fn (c &Connection) map_raised(w Window) !i32 {
909 return map_raised(c.raw()!, w)
910}
911
912// XMapSubwindows, borrowing this connection. Other ownership follows the raw call.
913pub fn (c &Connection) map_subwindows(w Window) !i32 {
914 return map_subwindows(c.raw()!, w)
915}
916
917// XMapWindow, borrowing this connection. Other ownership follows the raw call.
918pub fn (c &Connection) map_window(w Window) !i32 {
919 return map_window(c.raw()!, w)
920}
921
922// XMaskEvent, borrowing this connection. Other ownership follows the raw call.
923pub fn (c &Connection) mask_event(event_mask CLong, event_return &XEvent) !i32 {
924 return mask_event(c.raw()!, event_mask, event_return)
925}
926
927// XMoveResizeWindow, borrowing this connection. Other ownership follows the raw call.
928pub fn (c &Connection) move_resize_window(w Window, x i32, y i32, width u32, height u32) !i32 {
929 return move_resize_window(c.raw()!, w, x, y, width, height)
930}
931
932// XMoveWindow, borrowing this connection. Other ownership follows the raw call.
933pub fn (c &Connection) move_window(w Window, x i32, y i32) !i32 {
934 return move_window(c.raw()!, w, x, y)
935}
936
937// XNoOp, borrowing this connection. Other ownership follows the raw call.
938pub fn (c &Connection) no_op() !i32 {
939 return no_op(c.raw()!)
940}
941
942// XParseColor, borrowing this connection. Other ownership follows the raw call.
943pub fn (c &Connection) parse_color(colormap Colormap, spec string, exact_def_return &XColor) !i32 {
944 if spec.contains('\x00') { return error('spec contains NUL') }
945 return parse_color(c.raw()!, colormap, &char(spec.str), exact_def_return)
946}
947
948// XPeekEvent, borrowing this connection. Other ownership follows the raw call.
949pub fn (c &Connection) peek_event(event_return &XEvent) !i32 {
950 return peek_event(c.raw()!, event_return)
951}
952
953// XPeekIfEvent, borrowing this connection. Other ownership follows the raw call.
954pub fn (c &Connection) peek_if_event(event_return &XEvent, arg2 fn (&Display, &XEvent, XPointer) i32, arg XPointer) !i32 {
955 return peek_if_event(c.raw()!, event_return, arg2, arg)
956}
957
958// XProtocolRevision, borrowing this connection. Other ownership follows the raw call.
959pub fn (c &Connection) protocol_revision() !i32 {
960 return protocol_revision(c.raw()!)
961}
962
963// XProtocolVersion, borrowing this connection. Other ownership follows the raw call.
964pub fn (c &Connection) protocol_version() !i32 {
965 return protocol_version(c.raw()!)
966}
967
968// XPutBackEvent, borrowing this connection. Other ownership follows the raw call.
969pub fn (c &Connection) put_back_event(event &XEvent) !i32 {
970 return put_back_event(c.raw()!, event)
971}
972
973// XPutImage, borrowing this connection. Other ownership follows the raw call.
974pub fn (c &Connection) put_image(d Drawable, gc GC, image &XImage, src_x i32, src_y i32, dest_x i32, dest_y i32, width u32, height u32) !i32 {
975 return put_image(c.raw()!, d, gc, image, src_x, src_y, dest_x, dest_y, width, height)
976}
977
978// XQLength, borrowing this connection. Other ownership follows the raw call.
979pub fn (c &Connection) q_length() !i32 {
980 return q_length(c.raw()!)
981}
982
983// XQueryBestCursor, borrowing this connection. Other ownership follows the raw call.
984pub fn (c &Connection) query_best_cursor(d Drawable, width u32, height u32, width_return &u32, height_return &u32) !i32 {
985 return query_best_cursor(c.raw()!, d, width, height, width_return, height_return)
986}
987
988// XQueryBestSize, borrowing this connection. Other ownership follows the raw call.
989pub fn (c &Connection) query_best_size(class i32, which_screen Drawable, width u32, height u32, width_return &u32, height_return &u32) !i32 {
990 return query_best_size(c.raw()!, class, which_screen, width, height, width_return, height_return)
991}
992
993// XQueryBestStipple, borrowing this connection. Other ownership follows the raw call.
994pub fn (c &Connection) query_best_stipple(which_screen Drawable, width u32, height u32, width_return &u32, height_return &u32) !i32 {
995 return query_best_stipple(c.raw()!, which_screen, width, height, width_return, height_return)
996}
997
998// XQueryBestTile, borrowing this connection. Other ownership follows the raw call.
999pub fn (c &Connection) query_best_tile(which_screen Drawable, width u32, height u32, width_return &u32, height_return &u32) !i32 {
1000 return query_best_tile(c.raw()!, which_screen, width, height, width_return, height_return)
1001}
1002
1003// XQueryColor, borrowing this connection. Other ownership follows the raw call.
1004pub fn (c &Connection) query_color(colormap Colormap, def_in_out &XColor) !i32 {
1005 return query_color(c.raw()!, colormap, def_in_out)
1006}
1007
1008// XQueryColors, borrowing this connection. Other ownership follows the raw call.
1009pub fn (c &Connection) query_colors(colormap Colormap, defs_in_out &XColor, ncolors i32) !i32 {
1010 return query_colors(c.raw()!, colormap, defs_in_out, ncolors)
1011}
1012
1013// XQueryExtension, borrowing this connection. Other ownership follows the raw call.
1014pub fn (c &Connection) query_extension(name string, major_opcode_return &i32, first_event_return &i32, first_error_return &i32) !i32 {
1015 if name.contains('\x00') { return error('name contains NUL') }
1016 return query_extension(c.raw()!, &char(name.str), major_opcode_return, first_event_return, first_error_return)
1017}
1018
1019// XQueryKeymap, borrowing this connection. Other ownership follows the raw call.
1020pub fn (c &Connection) query_keymap(arg1 &char) !i32 {
1021 return query_keymap(c.raw()!, arg1)
1022}
1023
1024// XQueryPointer, borrowing this connection. Other ownership follows the raw call.
1025pub fn (c &Connection) query_pointer(w Window, root_return &Window, child_return &Window, root_x_return &i32, root_y_return &i32, win_x_return &i32, win_y_return &i32, mask_return &u32) !i32 {
1026 return query_pointer(c.raw()!, w, root_return, child_return, root_x_return, root_y_return, win_x_return, win_y_return, mask_return)
1027}
1028
1029// XQueryTextExtents, borrowing this connection. Other ownership follows the raw call.
1030pub fn (c &Connection) query_text_extents(font_id XID, string_arg string, nchars i32, direction_return &i32, font_ascent_return &i32, font_descent_return &i32, overall_return &XCharStruct) !i32 {
1031 if string_arg.contains('\x00') { return error('string_arg contains NUL') }
1032 return query_text_extents(c.raw()!, font_id, &char(string_arg.str), nchars, direction_return, font_ascent_return, font_descent_return, overall_return)
1033}
1034
1035// XQueryTextExtents16, borrowing this connection. Other ownership follows the raw call.
1036pub fn (c &Connection) query_text_extents16(font_id XID, string_arg &XChar2b, nchars i32, direction_return &i32, font_ascent_return &i32, font_descent_return &i32, overall_return &XCharStruct) !i32 {
1037 return query_text_extents16(c.raw()!, font_id, string_arg, nchars, direction_return, font_ascent_return, font_descent_return, overall_return)
1038}
1039
1040// XQueryTree, borrowing this connection. Other ownership follows the raw call.
1041pub fn (c &Connection) query_tree(w Window, root_return &Window, parent_return &Window, children_return &&Window, nchildren_return &u32) !i32 {
1042 return query_tree(c.raw()!, w, root_return, parent_return, children_return, nchildren_return)
1043}
1044
1045// XRaiseWindow, borrowing this connection. Other ownership follows the raw call.
1046pub fn (c &Connection) raise_window(w Window) !i32 {
1047 return raise_window(c.raw()!, w)
1048}
1049
1050// XReadBitmapFile, borrowing this connection. Other ownership follows the raw call.
1051pub fn (c &Connection) read_bitmap_file(d Drawable, filename string, width_return &u32, height_return &u32, bitmap_return &Pixmap, x_hot_return &i32, y_hot_return &i32) !i32 {
1052 if filename.contains('\x00') { return error('filename contains NUL') }
1053 return read_bitmap_file(c.raw()!, d, &char(filename.str), width_return, height_return, bitmap_return, x_hot_return, y_hot_return)
1054}
1055
1056// XRebindKeysym, borrowing this connection. Other ownership follows the raw call.
1057pub fn (c &Connection) rebind_keysym(keysym KeySym, list &KeySym, mod_count i32, string_arg &u8, bytes_string i32) !i32 {
1058 return rebind_keysym(c.raw()!, keysym, list, mod_count, string_arg, bytes_string)
1059}
1060
1061// XRecolorCursor, borrowing this connection. Other ownership follows the raw call.
1062pub fn (c &Connection) recolor_cursor(cursor Cursor, foreground_color &XColor, background_color &XColor) !i32 {
1063 return recolor_cursor(c.raw()!, cursor, foreground_color, background_color)
1064}
1065
1066// XRemoveFromSaveSet, borrowing this connection. Other ownership follows the raw call.
1067pub fn (c &Connection) remove_from_save_set(w Window) !i32 {
1068 return remove_from_save_set(c.raw()!, w)
1069}
1070
1071// XRemoveHost, borrowing this connection. Other ownership follows the raw call.
1072pub fn (c &Connection) remove_host(host &XHostAddress) !i32 {
1073 return remove_host(c.raw()!, host)
1074}
1075
1076// XRemoveHosts, borrowing this connection. Other ownership follows the raw call.
1077pub fn (c &Connection) remove_hosts(hosts &XHostAddress, num_hosts i32) !i32 {
1078 return remove_hosts(c.raw()!, hosts, num_hosts)
1079}
1080
1081// XReparentWindow, borrowing this connection. Other ownership follows the raw call.
1082pub fn (c &Connection) reparent_window(w Window, parent Window, x i32, y i32) !i32 {
1083 return reparent_window(c.raw()!, w, parent, x, y)
1084}
1085
1086// XResetScreenSaver, borrowing this connection. Other ownership follows the raw call.
1087pub fn (c &Connection) reset_screen_saver() !i32 {
1088 return reset_screen_saver(c.raw()!)
1089}
1090
1091// XResizeWindow, borrowing this connection. Other ownership follows the raw call.
1092pub fn (c &Connection) resize_window(w Window, width u32, height u32) !i32 {
1093 return resize_window(c.raw()!, w, width, height)
1094}
1095
1096// XRestackWindows, borrowing this connection. Other ownership follows the raw call.
1097pub fn (c &Connection) restack_windows(windows &Window, nwindows i32) !i32 {
1098 return restack_windows(c.raw()!, windows, nwindows)
1099}
1100
1101// XRotateBuffers, borrowing this connection. Other ownership follows the raw call.
1102pub fn (c &Connection) rotate_buffers(rotate i32) !i32 {
1103 return rotate_buffers(c.raw()!, rotate)
1104}
1105
1106// XRotateWindowProperties, borrowing this connection. Other ownership follows the raw call.
1107pub fn (c &Connection) rotate_window_properties(w Window, properties &Atom, num_prop i32, npositions i32) !i32 {
1108 return rotate_window_properties(c.raw()!, w, properties, num_prop, npositions)
1109}
1110
1111// XScreenCount, borrowing this connection. Other ownership follows the raw call.
1112pub fn (c &Connection) screen_count() !i32 {
1113 return screen_count(c.raw()!)
1114}
1115
1116// XSelectInput, borrowing this connection. Other ownership follows the raw call.
1117pub fn (c &Connection) select_input(w Window, event_mask CLong) !i32 {
1118 return select_input(c.raw()!, w, event_mask)
1119}
1120
1121// XSendEvent, borrowing this connection. Other ownership follows the raw call.
1122pub fn (c &Connection) send_event(w Window, propagate i32, event_mask CLong, event_send &XEvent) !i32 {
1123 return send_event(c.raw()!, w, propagate, event_mask, event_send)
1124}
1125
1126// XSetAccessControl, borrowing this connection. Other ownership follows the raw call.
1127pub fn (c &Connection) set_access_control(mode i32) !i32 {
1128 return set_access_control(c.raw()!, mode)
1129}
1130
1131// XSetArcMode, borrowing this connection. Other ownership follows the raw call.
1132pub fn (c &Connection) set_arc_mode(gc GC, arc_mode i32) !i32 {
1133 return set_arc_mode(c.raw()!, gc, arc_mode)
1134}
1135
1136// XSetBackground, borrowing this connection. Other ownership follows the raw call.
1137pub fn (c &Connection) set_background(gc GC, background CULong) !i32 {
1138 return set_background(c.raw()!, gc, background)
1139}
1140
1141// XSetClipMask, borrowing this connection. Other ownership follows the raw call.
1142pub fn (c &Connection) set_clip_mask(gc GC, pixmap Pixmap) !i32 {
1143 return set_clip_mask(c.raw()!, gc, pixmap)
1144}
1145
1146// XSetClipOrigin, borrowing this connection. Other ownership follows the raw call.
1147pub fn (c &Connection) set_clip_origin(gc GC, clip_x_origin i32, clip_y_origin i32) !i32 {
1148 return set_clip_origin(c.raw()!, gc, clip_x_origin, clip_y_origin)
1149}
1150
1151// XSetClipRectangles, borrowing this connection. Other ownership follows the raw call.
1152pub fn (c &Connection) set_clip_rectangles(gc GC, clip_x_origin i32, clip_y_origin i32, rectangles &XRectangle, n i32, ordering i32) !i32 {
1153 return set_clip_rectangles(c.raw()!, gc, clip_x_origin, clip_y_origin, rectangles, n, ordering)
1154}
1155
1156// XSetCloseDownMode, borrowing this connection. Other ownership follows the raw call.
1157pub fn (c &Connection) set_close_down_mode(close_mode i32) !i32 {
1158 return set_close_down_mode(c.raw()!, close_mode)
1159}
1160
1161// XSetCommand, borrowing this connection. Other ownership follows the raw call.
1162pub fn (c &Connection) set_command(w Window, argv &&char, argc i32) !i32 {
1163 return set_command(c.raw()!, w, argv, argc)
1164}
1165
1166// XSetDashes, borrowing this connection. Other ownership follows the raw call.
1167pub fn (c &Connection) set_dashes(gc GC, dash_offset i32, dash_list string, n i32) !i32 {
1168 if dash_list.contains('\x00') { return error('dash_list contains NUL') }
1169 return set_dashes(c.raw()!, gc, dash_offset, &char(dash_list.str), n)
1170}
1171
1172// XSetFillRule, borrowing this connection. Other ownership follows the raw call.
1173pub fn (c &Connection) set_fill_rule(gc GC, fill_rule i32) !i32 {
1174 return set_fill_rule(c.raw()!, gc, fill_rule)
1175}
1176
1177// XSetFillStyle, borrowing this connection. Other ownership follows the raw call.
1178pub fn (c &Connection) set_fill_style(gc GC, fill_style i32) !i32 {
1179 return set_fill_style(c.raw()!, gc, fill_style)
1180}
1181
1182// XSetFont, borrowing this connection. Other ownership follows the raw call.
1183pub fn (c &Connection) set_font(gc GC, font Font) !i32 {
1184 return set_font(c.raw()!, gc, font)
1185}
1186
1187// XSetFontPath, borrowing this connection. Other ownership follows the raw call.
1188pub fn (c &Connection) set_font_path(directories &&char, ndirs i32) !i32 {
1189 return set_font_path(c.raw()!, directories, ndirs)
1190}
1191
1192// XSetForeground, borrowing this connection. Other ownership follows the raw call.
1193pub fn (c &Connection) set_foreground(gc GC, foreground CULong) !i32 {
1194 return set_foreground(c.raw()!, gc, foreground)
1195}
1196
1197// XSetFunction, borrowing this connection. Other ownership follows the raw call.
1198pub fn (c &Connection) set_function(gc GC, function i32) !i32 {
1199 return set_function(c.raw()!, gc, function)
1200}
1201
1202// XSetGraphicsExposures, borrowing this connection. Other ownership follows the raw call.
1203pub fn (c &Connection) set_graphics_exposures(gc GC, graphics_exposures i32) !i32 {
1204 return set_graphics_exposures(c.raw()!, gc, graphics_exposures)
1205}
1206
1207// XSetIconName, borrowing this connection. Other ownership follows the raw call.
1208pub fn (c &Connection) set_icon_name(w Window, icon_name string) !i32 {
1209 if icon_name.contains('\x00') { return error('icon_name contains NUL') }
1210 return set_icon_name(c.raw()!, w, &char(icon_name.str))
1211}
1212
1213// XSetInputFocus, borrowing this connection. Other ownership follows the raw call.
1214pub fn (c &Connection) set_input_focus(focus Window, revert_to i32, time Time) !i32 {
1215 return set_input_focus(c.raw()!, focus, revert_to, time)
1216}
1217
1218// XSetLineAttributes, borrowing this connection. Other ownership follows the raw call.
1219pub fn (c &Connection) set_line_attributes(gc GC, line_width u32, line_style i32, cap_style i32, join_style i32) !i32 {
1220 return set_line_attributes(c.raw()!, gc, line_width, line_style, cap_style, join_style)
1221}
1222
1223// XSetModifierMapping, borrowing this connection. Other ownership follows the raw call.
1224pub fn (c &Connection) set_modifier_mapping(modmap &XModifierKeymap) !i32 {
1225 return set_modifier_mapping(c.raw()!, modmap)
1226}
1227
1228// XSetPlaneMask, borrowing this connection. Other ownership follows the raw call.
1229pub fn (c &Connection) set_plane_mask(gc GC, plane_mask CULong) !i32 {
1230 return set_plane_mask(c.raw()!, gc, plane_mask)
1231}
1232
1233// XSetPointerMapping, borrowing this connection. Other ownership follows the raw call.
1234pub fn (c &Connection) set_pointer_mapping(map_arg &u8, nmap i32) !i32 {
1235 return set_pointer_mapping(c.raw()!, map_arg, nmap)
1236}
1237
1238// XSetScreenSaver, borrowing this connection. Other ownership follows the raw call.
1239pub fn (c &Connection) set_screen_saver(timeout i32, interval i32, prefer_blanking i32, allow_exposures i32) !i32 {
1240 return set_screen_saver(c.raw()!, timeout, interval, prefer_blanking, allow_exposures)
1241}
1242
1243// XSetSelectionOwner, borrowing this connection. Other ownership follows the raw call.
1244pub fn (c &Connection) set_selection_owner(selection Atom, owner Window, time Time) !i32 {
1245 return set_selection_owner(c.raw()!, selection, owner, time)
1246}
1247
1248// XSetState, borrowing this connection. Other ownership follows the raw call.
1249pub fn (c &Connection) set_state(gc GC, foreground CULong, background CULong, function i32, plane_mask CULong) !i32 {
1250 return set_state(c.raw()!, gc, foreground, background, function, plane_mask)
1251}
1252
1253// XSetStipple, borrowing this connection. Other ownership follows the raw call.
1254pub fn (c &Connection) set_stipple(gc GC, stipple Pixmap) !i32 {
1255 return set_stipple(c.raw()!, gc, stipple)
1256}
1257
1258// XSetSubwindowMode, borrowing this connection. Other ownership follows the raw call.
1259pub fn (c &Connection) set_subwindow_mode(gc GC, subwindow_mode i32) !i32 {
1260 return set_subwindow_mode(c.raw()!, gc, subwindow_mode)
1261}
1262
1263// XSetTSOrigin, borrowing this connection. Other ownership follows the raw call.
1264pub fn (c &Connection) set_ts_origin(gc GC, ts_x_origin i32, ts_y_origin i32) !i32 {
1265 return set_ts_origin(c.raw()!, gc, ts_x_origin, ts_y_origin)
1266}
1267
1268// XSetTile, borrowing this connection. Other ownership follows the raw call.
1269pub fn (c &Connection) set_tile(gc GC, tile Pixmap) !i32 {
1270 return set_tile(c.raw()!, gc, tile)
1271}
1272
1273// XSetWindowBackground, borrowing this connection. Other ownership follows the raw call.
1274pub fn (c &Connection) set_window_background(w Window, background_pixel CULong) !i32 {
1275 return set_window_background(c.raw()!, w, background_pixel)
1276}
1277
1278// XSetWindowBackgroundPixmap, borrowing this connection. Other ownership follows the raw call.
1279pub fn (c &Connection) set_window_background_pixmap(w Window, background_pixmap Pixmap) !i32 {
1280 return set_window_background_pixmap(c.raw()!, w, background_pixmap)
1281}
1282
1283// XSetWindowBorder, borrowing this connection. Other ownership follows the raw call.
1284pub fn (c &Connection) set_window_border(w Window, border_pixel CULong) !i32 {
1285 return set_window_border(c.raw()!, w, border_pixel)
1286}
1287
1288// XSetWindowBorderPixmap, borrowing this connection. Other ownership follows the raw call.
1289pub fn (c &Connection) set_window_border_pixmap(w Window, border_pixmap Pixmap) !i32 {
1290 return set_window_border_pixmap(c.raw()!, w, border_pixmap)
1291}
1292
1293// XSetWindowBorderWidth, borrowing this connection. Other ownership follows the raw call.
1294pub fn (c &Connection) set_window_border_width(w Window, width u32) !i32 {
1295 return set_window_border_width(c.raw()!, w, width)
1296}
1297
1298// XSetWindowColormap, borrowing this connection. Other ownership follows the raw call.
1299pub fn (c &Connection) set_window_colormap(w Window, colormap Colormap) !i32 {
1300 return set_window_colormap(c.raw()!, w, colormap)
1301}
1302
1303// XStoreBuffer, borrowing this connection. Other ownership follows the raw call.
1304pub fn (c &Connection) store_buffer(bytes string, nbytes i32, buffer i32) !i32 {
1305 if bytes.contains('\x00') { return error('bytes contains NUL') }
1306 return store_buffer(c.raw()!, &char(bytes.str), nbytes, buffer)
1307}
1308
1309// XStoreBytes, borrowing this connection. Other ownership follows the raw call.
1310pub fn (c &Connection) store_bytes(bytes string, nbytes i32) !i32 {
1311 if bytes.contains('\x00') { return error('bytes contains NUL') }
1312 return store_bytes(c.raw()!, &char(bytes.str), nbytes)
1313}
1314
1315// XStoreColor, borrowing this connection. Other ownership follows the raw call.
1316pub fn (c &Connection) store_color(colormap Colormap, color &XColor) !i32 {
1317 return store_color(c.raw()!, colormap, color)
1318}
1319
1320// XStoreColors, borrowing this connection. Other ownership follows the raw call.
1321pub fn (c &Connection) store_colors(colormap Colormap, color &XColor, ncolors i32) !i32 {
1322 return store_colors(c.raw()!, colormap, color, ncolors)
1323}
1324
1325// XStoreName, borrowing this connection. Other ownership follows the raw call.
1326pub fn (c &Connection) store_name(w Window, window_name string) !i32 {
1327 if window_name.contains('\x00') { return error('window_name contains NUL') }
1328 return store_name(c.raw()!, w, &char(window_name.str))
1329}
1330
1331// XStoreNamedColor, borrowing this connection. Other ownership follows the raw call.
1332pub fn (c &Connection) store_named_color(colormap Colormap, color string, pixel CULong, flags i32) !i32 {
1333 if color.contains('\x00') { return error('color contains NUL') }
1334 return store_named_color(c.raw()!, colormap, &char(color.str), pixel, flags)
1335}
1336
1337// XTranslateCoordinates, borrowing this connection. Other ownership follows the raw call.
1338pub fn (c &Connection) translate_coordinates(src_w Window, dest_w Window, src_x i32, src_y i32, dest_x_return &i32, dest_y_return &i32, child_return &Window) !i32 {
1339 return translate_coordinates(c.raw()!, src_w, dest_w, src_x, src_y, dest_x_return, dest_y_return, child_return)
1340}
1341
1342// XUndefineCursor, borrowing this connection. Other ownership follows the raw call.
1343pub fn (c &Connection) undefine_cursor(w Window) !i32 {
1344 return undefine_cursor(c.raw()!, w)
1345}
1346
1347// XUngrabButton, borrowing this connection. Other ownership follows the raw call.
1348pub fn (c &Connection) ungrab_button(button u32, modifiers u32, grab_window Window) !i32 {
1349 return ungrab_button(c.raw()!, button, modifiers, grab_window)
1350}
1351
1352// XUngrabKey, borrowing this connection. Other ownership follows the raw call.
1353pub fn (c &Connection) ungrab_key(keycode i32, modifiers u32, grab_window Window) !i32 {
1354 return ungrab_key(c.raw()!, keycode, modifiers, grab_window)
1355}
1356
1357// XUngrabKeyboard, borrowing this connection. Other ownership follows the raw call.
1358pub fn (c &Connection) ungrab_keyboard(time Time) !i32 {
1359 return ungrab_keyboard(c.raw()!, time)
1360}
1361
1362// XUngrabPointer, borrowing this connection. Other ownership follows the raw call.
1363pub fn (c &Connection) ungrab_pointer(time Time) !i32 {
1364 return ungrab_pointer(c.raw()!, time)
1365}
1366
1367// XUngrabServer, borrowing this connection. Other ownership follows the raw call.
1368pub fn (c &Connection) ungrab_server() !i32 {
1369 return ungrab_server(c.raw()!)
1370}
1371
1372// XUninstallColormap, borrowing this connection. Other ownership follows the raw call.
1373pub fn (c &Connection) uninstall_colormap(colormap Colormap) !i32 {
1374 return uninstall_colormap(c.raw()!, colormap)
1375}
1376
1377// XUnloadFont, borrowing this connection. Other ownership follows the raw call.
1378pub fn (c &Connection) unload_font(font Font) !i32 {
1379 return unload_font(c.raw()!, font)
1380}
1381
1382// XUnmapSubwindows, borrowing this connection. Other ownership follows the raw call.
1383pub fn (c &Connection) unmap_subwindows(w Window) !i32 {
1384 return unmap_subwindows(c.raw()!, w)
1385}
1386
1387// XUnmapWindow, borrowing this connection. Other ownership follows the raw call.
1388pub fn (c &Connection) unmap_window(w Window) !i32 {
1389 return unmap_window(c.raw()!, w)
1390}
1391
1392// XVendorRelease, borrowing this connection. Other ownership follows the raw call.
1393pub fn (c &Connection) vendor_release() !i32 {
1394 return vendor_release(c.raw()!)
1395}
1396
1397// XWarpPointer, borrowing this connection. Other ownership follows the raw call.
1398pub fn (c &Connection) warp_pointer(src_w Window, dest_w Window, src_x i32, src_y i32, src_width u32, src_height u32, dest_x i32, dest_y i32) !i32 {
1399 return warp_pointer(c.raw()!, src_w, dest_w, src_x, src_y, src_width, src_height, dest_x, dest_y)
1400}
1401
1402// XWindowEvent, borrowing this connection. Other ownership follows the raw call.
1403pub fn (c &Connection) window_event(w Window, event_mask CLong, event_return &XEvent) !i32 {
1404 return window_event(c.raw()!, w, event_mask, event_return)
1405}
1406
1407// XWriteBitmapFile, borrowing this connection. Other ownership follows the raw call.
1408pub fn (c &Connection) write_bitmap_file(filename string, bitmap Pixmap, width u32, height u32, x_hot i32, y_hot i32) !i32 {
1409 if filename.contains('\x00') { return error('filename contains NUL') }
1410 return write_bitmap_file(c.raw()!, &char(filename.str), bitmap, width, height, x_hot, y_hot)
1411}
1412
1413// XOpenOM, borrowing this connection. Other ownership follows the raw call.
1414pub fn (c &Connection) open_om(rdb voidptr, res_name string, res_class string) !XOM {
1415 if res_name.contains('\x00') { return error('res_name contains NUL') }
1416 if res_class.contains('\x00') { return error('res_class contains NUL') }
1417 return open_om(c.raw()!, rdb, &char(res_name.str), &char(res_class.str))
1418}
1419
1420// XCreateFontSet, borrowing this connection. Other ownership follows the raw call.
1421pub fn (c &Connection) create_font_set(base_font_name_list string, missing_charset_list &&&char, missing_charset_count &i32, def_string &&char) !XFontSet {
1422 if base_font_name_list.contains('\x00') { return error('base_font_name_list contains NUL') }
1423 return create_font_set(c.raw()!, &char(base_font_name_list.str), missing_charset_list, missing_charset_count, def_string)
1424}
1425
1426// XFreeFontSet, borrowing this connection. Other ownership follows the raw call.
1427pub fn (c &Connection) free_font_set(font_set XFontSet) ! {
1428 free_font_set(c.raw()!, font_set)
1429}
1430
1431// XmbDrawText, borrowing this connection. Other ownership follows the raw call.
1432pub fn (c &Connection) mb_draw_text(d Drawable, gc GC, x i32, y i32, text_items &XmbTextItem, nitems i32) ! {
1433 mb_draw_text(c.raw()!, d, gc, x, y, text_items, nitems)
1434}
1435
1436// XwcDrawText, borrowing this connection. Other ownership follows the raw call.
1437pub fn (c &Connection) wc_draw_text(d Drawable, gc GC, x i32, y i32, text_items &XwcTextItem, nitems i32) ! {
1438 wc_draw_text(c.raw()!, d, gc, x, y, text_items, nitems)
1439}
1440
1441// Xutf8DrawText, borrowing this connection. Other ownership follows the raw call.
1442pub fn (c &Connection) utf8_draw_text(d Drawable, gc GC, x i32, y i32, text_items &XmbTextItem, nitems i32) ! {
1443 utf8_draw_text(c.raw()!, d, gc, x, y, text_items, nitems)
1444}
1445
1446// XmbDrawString, borrowing this connection. Other ownership follows the raw call.
1447pub fn (c &Connection) mb_draw_string(d Drawable, font_set XFontSet, gc GC, x i32, y i32, text string, bytes_text i32) ! {
1448 if text.contains('\x00') { return error('text contains NUL') }
1449 mb_draw_string(c.raw()!, d, font_set, gc, x, y, &char(text.str), bytes_text)
1450}
1451
1452// XwcDrawString, borrowing this connection. Other ownership follows the raw call.
1453pub fn (c &Connection) wc_draw_string(d Drawable, font_set XFontSet, gc GC, x i32, y i32, text &i32, num_wchars i32) ! {
1454 wc_draw_string(c.raw()!, d, font_set, gc, x, y, text, num_wchars)
1455}
1456
1457// Xutf8DrawString, borrowing this connection. Other ownership follows the raw call.
1458pub fn (c &Connection) utf8_draw_string(d Drawable, font_set XFontSet, gc GC, x i32, y i32, text string, bytes_text i32) ! {
1459 if text.contains('\x00') { return error('text contains NUL') }
1460 utf8_draw_string(c.raw()!, d, font_set, gc, x, y, &char(text.str), bytes_text)
1461}
1462
1463// XmbDrawImageString, borrowing this connection. Other ownership follows the raw call.
1464pub fn (c &Connection) mb_draw_image_string(d Drawable, font_set XFontSet, gc GC, x i32, y i32, text string, bytes_text i32) ! {
1465 if text.contains('\x00') { return error('text contains NUL') }
1466 mb_draw_image_string(c.raw()!, d, font_set, gc, x, y, &char(text.str), bytes_text)
1467}
1468
1469// XwcDrawImageString, borrowing this connection. Other ownership follows the raw call.
1470pub fn (c &Connection) wc_draw_image_string(d Drawable, font_set XFontSet, gc GC, x i32, y i32, text &i32, num_wchars i32) ! {
1471 wc_draw_image_string(c.raw()!, d, font_set, gc, x, y, text, num_wchars)
1472}
1473
1474// Xutf8DrawImageString, borrowing this connection. Other ownership follows the raw call.
1475pub fn (c &Connection) utf8_draw_image_string(d Drawable, font_set XFontSet, gc GC, x i32, y i32, text string, bytes_text i32) ! {
1476 if text.contains('\x00') { return error('text contains NUL') }
1477 utf8_draw_image_string(c.raw()!, d, font_set, gc, x, y, &char(text.str), bytes_text)
1478}
1479
1480// XOpenIM, borrowing this connection. Other ownership follows the raw call.
1481pub fn (c &Connection) open_im(rdb voidptr, res_name &char, res_class &char) !XIM {
1482 return open_im(c.raw()!, rdb, res_name, res_class)
1483}
1484
1485// XRegisterIMInstantiateCallback, borrowing this connection. Other ownership follows the raw call.
1486pub fn (c &Connection) register_im_instantiate_callback(rdb voidptr, res_name &char, res_class &char, callback XIDProc, client_data XPointer) !i32 {
1487 return register_im_instantiate_callback(c.raw()!, rdb, res_name, res_class, callback, client_data)
1488}
1489
1490// XUnregisterIMInstantiateCallback, borrowing this connection. Other ownership follows the raw call.
1491pub fn (c &Connection) unregister_im_instantiate_callback(rdb voidptr, res_name &char, res_class &char, callback XIDProc, client_data XPointer) !i32 {
1492 return unregister_im_instantiate_callback(c.raw()!, rdb, res_name, res_class, callback, client_data)
1493}
1494
1495// XInternalConnectionNumbers, borrowing this connection. Other ownership follows the raw call.
1496pub fn (c &Connection) internal_connection_numbers(fd_return &&i32, count_return &i32) !i32 {
1497 return internal_connection_numbers(c.raw()!, fd_return, count_return)
1498}
1499
1500// XProcessInternalConnection, borrowing this connection. Other ownership follows the raw call.
1501pub fn (c &Connection) process_internal_connection(fd i32) ! {
1502 process_internal_connection(c.raw()!, fd)
1503}
1504
1505// XAddConnectionWatch, borrowing this connection. Other ownership follows the raw call.
1506pub fn (c &Connection) add_connection_watch(callback XConnectionWatchProc, client_data XPointer) !i32 {
1507 return add_connection_watch(c.raw()!, callback, client_data)
1508}
1509
1510// XRemoveConnectionWatch, borrowing this connection. Other ownership follows the raw call.
1511pub fn (c &Connection) remove_connection_watch(callback XConnectionWatchProc, client_data XPointer) ! {
1512 remove_connection_watch(c.raw()!, callback, client_data)
1513}
1514
1515// XGetEventData, borrowing this connection. Other ownership follows the raw call.
1516pub fn (c &Connection) get_event_data(cookie &XGenericEventCookie) !i32 {
1517 return get_event_data(c.raw()!, cookie)
1518}
1519
1520// XFreeEventData, borrowing this connection. Other ownership follows the raw call.
1521pub fn (c &Connection) free_event_data(cookie &XGenericEventCookie) ! {
1522 free_event_data(c.raw()!, cookie)
1523}
1524
1525// XrmSetDatabase, borrowing this connection. Other ownership follows the raw call.
1526pub fn (c &Connection) xrm_set_database(database XrmDatabase) ! {
1527 xrm_set_database(c.raw()!, database)
1528}
1529
1530// XrmGetDatabase, borrowing this connection. Other ownership follows the raw call.
1531pub fn (c &Connection) xrm_get_database() !XrmDatabase {
1532 return xrm_get_database(c.raw()!)
1533}
1534
1535// XDeleteContext, borrowing this connection. Other ownership follows the raw call.
1536pub fn (c &Connection) delete_context(rid XID, context XContext) !i32 {
1537 return delete_context(c.raw()!, rid, context)
1538}
1539
1540// XFindContext, borrowing this connection. Other ownership follows the raw call.
1541pub fn (c &Connection) find_context(rid XID, context XContext, data_return &XPointer) !i32 {
1542 return find_context(c.raw()!, rid, context, data_return)
1543}
1544
1545// XGetClassHint, borrowing this connection. Other ownership follows the raw call.
1546pub fn (c &Connection) get_class_hint(w Window, class_hints_return &XClassHint) !i32 {
1547 return get_class_hint(c.raw()!, w, class_hints_return)
1548}
1549
1550// XGetIconSizes, borrowing this connection. Other ownership follows the raw call.
1551pub fn (c &Connection) get_icon_sizes(w Window, size_list_return &&XIconSize, count_return &i32) !i32 {
1552 return get_icon_sizes(c.raw()!, w, size_list_return, count_return)
1553}
1554
1555// XGetNormalHints, borrowing this connection. Other ownership follows the raw call.
1556pub fn (c &Connection) get_normal_hints(w Window, hints_return &XSizeHints) !i32 {
1557 return get_normal_hints(c.raw()!, w, hints_return)
1558}
1559
1560// XGetRGBColormaps, borrowing this connection. Other ownership follows the raw call.
1561pub fn (c &Connection) get_rgb_colormaps(w Window, stdcmap_return &&XStandardColormap, count_return &i32, property Atom) !i32 {
1562 return get_rgb_colormaps(c.raw()!, w, stdcmap_return, count_return, property)
1563}
1564
1565// XGetSizeHints, borrowing this connection. Other ownership follows the raw call.
1566pub fn (c &Connection) get_size_hints(w Window, hints_return &XSizeHints, property Atom) !i32 {
1567 return get_size_hints(c.raw()!, w, hints_return, property)
1568}
1569
1570// XGetStandardColormap, borrowing this connection. Other ownership follows the raw call.
1571pub fn (c &Connection) get_standard_colormap(w Window, colormap_return &XStandardColormap, property Atom) !i32 {
1572 return get_standard_colormap(c.raw()!, w, colormap_return, property)
1573}
1574
1575// XGetTextProperty, borrowing this connection. Other ownership follows the raw call.
1576pub fn (c &Connection) get_text_property(window Window, text_prop_return &XTextProperty, property Atom) !i32 {
1577 return get_text_property(c.raw()!, window, text_prop_return, property)
1578}
1579
1580// XGetVisualInfo, borrowing this connection. Other ownership follows the raw call.
1581pub fn (c &Connection) get_visual_info(vinfo_mask CLong, vinfo_template &XVisualInfo, nitems_return &i32) !&XVisualInfo {
1582 return get_visual_info(c.raw()!, vinfo_mask, vinfo_template, nitems_return)
1583}
1584
1585// XGetWMClientMachine, borrowing this connection. Other ownership follows the raw call.
1586pub fn (c &Connection) get_wm_client_machine(w Window, text_prop_return &XTextProperty) !i32 {
1587 return get_wm_client_machine(c.raw()!, w, text_prop_return)
1588}
1589
1590// XGetWMHints, borrowing this connection. Other ownership follows the raw call.
1591pub fn (c &Connection) get_wm_hints(w Window) !&XWMHints {
1592 return get_wm_hints(c.raw()!, w)
1593}
1594
1595// XGetWMIconName, borrowing this connection. Other ownership follows the raw call.
1596pub fn (c &Connection) get_wm_icon_name(w Window, text_prop_return &XTextProperty) !i32 {
1597 return get_wm_icon_name(c.raw()!, w, text_prop_return)
1598}
1599
1600// XGetWMName, borrowing this connection. Other ownership follows the raw call.
1601pub fn (c &Connection) get_wm_name(w Window, text_prop_return &XTextProperty) !i32 {
1602 return get_wm_name(c.raw()!, w, text_prop_return)
1603}
1604
1605// XGetWMNormalHints, borrowing this connection. Other ownership follows the raw call.
1606pub fn (c &Connection) get_wm_normal_hints(w Window, hints_return &XSizeHints, supplied_return &CLong) !i32 {
1607 return get_wm_normal_hints(c.raw()!, w, hints_return, supplied_return)
1608}
1609
1610// XGetWMSizeHints, borrowing this connection. Other ownership follows the raw call.
1611pub fn (c &Connection) get_wm_size_hints(w Window, hints_return &XSizeHints, supplied_return &CLong, property Atom) !i32 {
1612 return get_wm_size_hints(c.raw()!, w, hints_return, supplied_return, property)
1613}
1614
1615// XGetZoomHints, borrowing this connection. Other ownership follows the raw call.
1616pub fn (c &Connection) get_zoom_hints(w Window, zhints_return &XSizeHints) !i32 {
1617 return get_zoom_hints(c.raw()!, w, zhints_return)
1618}
1619
1620// XMatchVisualInfo, borrowing this connection. Other ownership follows the raw call.
1621pub fn (c &Connection) match_visual_info(screen i32, depth i32, class i32, vinfo_return &XVisualInfo) !i32 {
1622 return match_visual_info(c.raw()!, screen, depth, class, vinfo_return)
1623}
1624
1625// XSaveContext, borrowing this connection. Other ownership follows the raw call.
1626pub fn (c &Connection) save_context(rid XID, context XContext, data string) !i32 {
1627 if data.contains('\x00') { return error('data contains NUL') }
1628 return save_context(c.raw()!, rid, context, &char(data.str))
1629}
1630
1631// XSetClassHint, borrowing this connection. Other ownership follows the raw call.
1632pub fn (c &Connection) set_class_hint(w Window, class_hints &XClassHint) !i32 {
1633 return set_class_hint(c.raw()!, w, class_hints)
1634}
1635
1636// XSetIconSizes, borrowing this connection. Other ownership follows the raw call.
1637pub fn (c &Connection) set_icon_sizes(w Window, size_list &XIconSize, count i32) !i32 {
1638 return set_icon_sizes(c.raw()!, w, size_list, count)
1639}
1640
1641// XSetNormalHints, borrowing this connection. Other ownership follows the raw call.
1642pub fn (c &Connection) set_normal_hints(w Window, hints &XSizeHints) !i32 {
1643 return set_normal_hints(c.raw()!, w, hints)
1644}
1645
1646// XSetRGBColormaps, borrowing this connection. Other ownership follows the raw call.
1647pub fn (c &Connection) set_rgb_colormaps(w Window, stdcmaps &XStandardColormap, count i32, property Atom) ! {
1648 set_rgb_colormaps(c.raw()!, w, stdcmaps, count, property)
1649}
1650
1651// XSetSizeHints, borrowing this connection. Other ownership follows the raw call.
1652pub fn (c &Connection) set_size_hints(w Window, hints &XSizeHints, property Atom) !i32 {
1653 return set_size_hints(c.raw()!, w, hints, property)
1654}
1655
1656// XSetStandardProperties, borrowing this connection. Other ownership follows the raw call.
1657pub fn (c &Connection) set_standard_properties(w Window, window_name string, icon_name string, icon_pixmap Pixmap, argv &&char, argc i32, hints &XSizeHints) !i32 {
1658 if window_name.contains('\x00') { return error('window_name contains NUL') }
1659 if icon_name.contains('\x00') { return error('icon_name contains NUL') }
1660 return set_standard_properties(c.raw()!, w, &char(window_name.str), &char(icon_name.str), icon_pixmap, argv, argc, hints)
1661}
1662
1663// XSetTextProperty, borrowing this connection. Other ownership follows the raw call.
1664pub fn (c &Connection) set_text_property(w Window, text_prop &XTextProperty, property Atom) ! {
1665 set_text_property(c.raw()!, w, text_prop, property)
1666}
1667
1668// XSetWMClientMachine, borrowing this connection. Other ownership follows the raw call.
1669pub fn (c &Connection) set_wm_client_machine(w Window, text_prop &XTextProperty) ! {
1670 set_wm_client_machine(c.raw()!, w, text_prop)
1671}
1672
1673// XSetWMHints, borrowing this connection. Other ownership follows the raw call.
1674pub fn (c &Connection) set_wm_hints(w Window, wm_hints &XWMHints) !i32 {
1675 return set_wm_hints(c.raw()!, w, wm_hints)
1676}
1677
1678// XSetWMIconName, borrowing this connection. Other ownership follows the raw call.
1679pub fn (c &Connection) set_wm_icon_name(w Window, text_prop &XTextProperty) ! {
1680 set_wm_icon_name(c.raw()!, w, text_prop)
1681}
1682
1683// XSetWMName, borrowing this connection. Other ownership follows the raw call.
1684pub fn (c &Connection) set_wm_name(w Window, text_prop &XTextProperty) ! {
1685 set_wm_name(c.raw()!, w, text_prop)
1686}
1687
1688// XSetWMNormalHints, borrowing this connection. Other ownership follows the raw call.
1689pub fn (c &Connection) set_wm_normal_hints(w Window, hints &XSizeHints) ! {
1690 set_wm_normal_hints(c.raw()!, w, hints)
1691}
1692
1693// XSetWMProperties, borrowing this connection. Other ownership follows the raw call.
1694pub fn (c &Connection) set_wm_properties(w Window, window_name &XTextProperty, icon_name &XTextProperty, argv &&char, argc i32, normal_hints &XSizeHints, wm_hints &XWMHints, class_hints &XClassHint) ! {
1695 set_wm_properties(c.raw()!, w, window_name, icon_name, argv, argc, normal_hints, wm_hints, class_hints)
1696}
1697
1698// XmbSetWMProperties, borrowing this connection. Other ownership follows the raw call.
1699pub fn (c &Connection) mb_set_wm_properties(w Window, window_name string, icon_name string, argv &&char, argc i32, normal_hints &XSizeHints, wm_hints &XWMHints, class_hints &XClassHint) ! {
1700 if window_name.contains('\x00') { return error('window_name contains NUL') }
1701 if icon_name.contains('\x00') { return error('icon_name contains NUL') }
1702 mb_set_wm_properties(c.raw()!, w, &char(window_name.str), &char(icon_name.str), argv, argc, normal_hints, wm_hints, class_hints)
1703}
1704
1705// Xutf8SetWMProperties, borrowing this connection. Other ownership follows the raw call.
1706pub fn (c &Connection) utf8_set_wm_properties(w Window, window_name string, icon_name string, argv &&char, argc i32, normal_hints &XSizeHints, wm_hints &XWMHints, class_hints &XClassHint) ! {
1707 if window_name.contains('\x00') { return error('window_name contains NUL') }
1708 if icon_name.contains('\x00') { return error('icon_name contains NUL') }
1709 utf8_set_wm_properties(c.raw()!, w, &char(window_name.str), &char(icon_name.str), argv, argc, normal_hints, wm_hints, class_hints)
1710}
1711
1712// XSetWMSizeHints, borrowing this connection. Other ownership follows the raw call.
1713pub fn (c &Connection) set_wm_size_hints(w Window, hints &XSizeHints, property Atom) ! {
1714 set_wm_size_hints(c.raw()!, w, hints, property)
1715}
1716
1717// XSetRegion, borrowing this connection. Other ownership follows the raw call.
1718pub fn (c &Connection) set_region(gc GC, r Region) !i32 {
1719 return set_region(c.raw()!, gc, r)
1720}
1721
1722// XSetStandardColormap, borrowing this connection. Other ownership follows the raw call.
1723pub fn (c &Connection) set_standard_colormap(w Window, colormap &XStandardColormap, property Atom) ! {
1724 set_standard_colormap(c.raw()!, w, colormap, property)
1725}
1726
1727// XSetZoomHints, borrowing this connection. Other ownership follows the raw call.
1728pub fn (c &Connection) set_zoom_hints(w Window, zhints &XSizeHints) !i32 {
1729 return set_zoom_hints(c.raw()!, w, zhints)
1730}
1731
1732// XmbTextListToTextProperty, borrowing this connection. Other ownership follows the raw call.
1733pub fn (c &Connection) mb_text_list_to_text_property(list &&char, count i32, style XICCEncodingStyle, text_prop_return &XTextProperty) !i32 {
1734 return mb_text_list_to_text_property(c.raw()!, list, count, style, text_prop_return)
1735}
1736
1737// XwcTextListToTextProperty, borrowing this connection. Other ownership follows the raw call.
1738pub fn (c &Connection) wc_text_list_to_text_property(list &&i32, count i32, style XICCEncodingStyle, text_prop_return &XTextProperty) !i32 {
1739 return wc_text_list_to_text_property(c.raw()!, list, count, style, text_prop_return)
1740}
1741
1742// Xutf8TextListToTextProperty, borrowing this connection. Other ownership follows the raw call.
1743pub fn (c &Connection) utf8_text_list_to_text_property(list &&char, count i32, style XICCEncodingStyle, text_prop_return &XTextProperty) !i32 {
1744 return utf8_text_list_to_text_property(c.raw()!, list, count, style, text_prop_return)
1745}
1746
1747// XmbTextPropertyToTextList, borrowing this connection. Other ownership follows the raw call.
1748pub fn (c &Connection) mb_text_property_to_text_list(text_prop &XTextProperty, list_return &&&char, count_return &i32) !i32 {
1749 return mb_text_property_to_text_list(c.raw()!, text_prop, list_return, count_return)
1750}
1751
1752// XwcTextPropertyToTextList, borrowing this connection. Other ownership follows the raw call.
1753pub fn (c &Connection) wc_text_property_to_text_list(text_prop &XTextProperty, list_return &&&i32, count_return &i32) !i32 {
1754 return wc_text_property_to_text_list(c.raw()!, text_prop, list_return, count_return)
1755}
1756
1757// Xutf8TextPropertyToTextList, borrowing this connection. Other ownership follows the raw call.
1758pub fn (c &Connection) utf8_text_property_to_text_list(text_prop &XTextProperty, list_return &&&char, count_return &i32) !i32 {
1759 return utf8_text_property_to_text_list(c.raw()!, text_prop, list_return, count_return)
1760}
1761
1762// XWMGeometry, borrowing this connection. Other ownership follows the raw call.
1763pub fn (c &Connection) wm_geometry(screen_number i32, user_geometry string, default_geometry string, border_width u32, hints &XSizeHints, x_return &i32, y_return &i32, width_return &i32, height_return &i32, gravity_return &i32) !i32 {
1764 if user_geometry.contains('\x00') { return error('user_geometry contains NUL') }
1765 if default_geometry.contains('\x00') { return error('default_geometry contains NUL') }
1766 return wm_geometry(c.raw()!, screen_number, &char(user_geometry.str), &char(default_geometry.str), border_width, hints, x_return, y_return, width_return, height_return, gravity_return)
1767}
1768
1769// XkbQueryExtension, borrowing this connection. Other ownership follows the raw call.
1770pub fn (c &Connection) xkb_query_extension(opcode_return &i32, event_base_return &i32, error_base_return &i32, major_rtrn &i32, minor_rtrn &i32) !i32 {
1771 return xkb_query_extension(c.raw()!, opcode_return, event_base_return, error_base_return, major_rtrn, minor_rtrn)
1772}
1773
1774// XkbUseExtension, borrowing this connection. Other ownership follows the raw call.
1775pub fn (c &Connection) xkb_use_extension(major_rtrn &i32, minor_rtrn &i32) !i32 {
1776 return xkb_use_extension(c.raw()!, major_rtrn, minor_rtrn)
1777}
1778
1779// XkbSetXlibControls, borrowing this connection. Other ownership follows the raw call.
1780pub fn (c &Connection) xkb_set_xlib_controls(affect u32, values u32) !u32 {
1781 return xkb_set_xlib_controls(c.raw()!, affect, values)
1782}
1783
1784// XkbGetXlibControls, borrowing this connection. Other ownership follows the raw call.
1785pub fn (c &Connection) xkb_get_xlib_controls() !u32 {
1786 return xkb_get_xlib_controls(c.raw()!)
1787}
1788
1789// XkbKeycodeToKeysym, borrowing this connection. Other ownership follows the raw call.
1790pub fn (c &Connection) xkb_keycode_to_keysym(kc KeyCode, group i32, level i32) !KeySym {
1791 return xkb_keycode_to_keysym(c.raw()!, kc, group, level)
1792}
1793
1794// XkbKeysymToModifiers, borrowing this connection. Other ownership follows the raw call.
1795pub fn (c &Connection) xkb_keysym_to_modifiers(ks KeySym) !u32 {
1796 return xkb_keysym_to_modifiers(c.raw()!, ks)
1797}
1798
1799// XkbLookupKeySym, borrowing this connection. Other ownership follows the raw call.
1800pub fn (c &Connection) xkb_lookup_key_sym(keycode KeyCode, modifiers u32, modifiers_return &u32, keysym_return &KeySym) !i32 {
1801 return xkb_lookup_key_sym(c.raw()!, keycode, modifiers, modifiers_return, keysym_return)
1802}
1803
1804// XkbLookupKeyBinding, borrowing this connection. Other ownership follows the raw call.
1805pub fn (c &Connection) xkb_lookup_key_binding(sym_rtrn KeySym, mods u32, buffer &char, nbytes i32, extra_rtrn &i32) !i32 {
1806 return xkb_lookup_key_binding(c.raw()!, sym_rtrn, mods, buffer, nbytes, extra_rtrn)
1807}
1808
1809// XkbTranslateKeySym, borrowing this connection. Other ownership follows the raw call.
1810pub fn (c &Connection) xkb_translate_key_sym(sym_return &KeySym, modifiers u32, buffer &char, nbytes i32, extra_rtrn &i32) !i32 {
1811 return xkb_translate_key_sym(c.raw()!, sym_return, modifiers, buffer, nbytes, extra_rtrn)
1812}
1813
1814// XkbSetAutoRepeatRate, borrowing this connection. Other ownership follows the raw call.
1815pub fn (c &Connection) xkb_set_auto_repeat_rate(device_spec u32, delay u32, interval u32) !i32 {
1816 return xkb_set_auto_repeat_rate(c.raw()!, device_spec, delay, interval)
1817}
1818
1819// XkbGetAutoRepeatRate, borrowing this connection. Other ownership follows the raw call.
1820pub fn (c &Connection) xkb_get_auto_repeat_rate(device_spec u32, delay_rtrn &u32, interval_rtrn &u32) !i32 {
1821 return xkb_get_auto_repeat_rate(c.raw()!, device_spec, delay_rtrn, interval_rtrn)
1822}
1823
1824// XkbChangeEnabledControls, borrowing this connection. Other ownership follows the raw call.
1825pub fn (c &Connection) xkb_change_enabled_controls(device_spec u32, affect u32, values u32) !i32 {
1826 return xkb_change_enabled_controls(c.raw()!, device_spec, affect, values)
1827}
1828
1829// XkbDeviceBell, borrowing this connection. Other ownership follows the raw call.
1830pub fn (c &Connection) xkb_device_bell(win Window, device_spec i32, bell_class i32, bell_id i32, percent i32, name Atom) !i32 {
1831 return xkb_device_bell(c.raw()!, win, device_spec, bell_class, bell_id, percent, name)
1832}
1833
1834// XkbForceDeviceBell, borrowing this connection. Other ownership follows the raw call.
1835pub fn (c &Connection) xkb_force_device_bell(device_spec i32, bell_class i32, bell_id i32, percent i32) !i32 {
1836 return xkb_force_device_bell(c.raw()!, device_spec, bell_class, bell_id, percent)
1837}
1838
1839// XkbDeviceBellEvent, borrowing this connection. Other ownership follows the raw call.
1840pub fn (c &Connection) xkb_device_bell_event(win Window, device_spec i32, bell_class i32, bell_id i32, percent i32, name Atom) !i32 {
1841 return xkb_device_bell_event(c.raw()!, win, device_spec, bell_class, bell_id, percent, name)
1842}
1843
1844// XkbBell, borrowing this connection. Other ownership follows the raw call.
1845pub fn (c &Connection) xkb_bell(win Window, percent i32, name Atom) !i32 {
1846 return xkb_bell(c.raw()!, win, percent, name)
1847}
1848
1849// XkbForceBell, borrowing this connection. Other ownership follows the raw call.
1850pub fn (c &Connection) xkb_force_bell(percent i32) !i32 {
1851 return xkb_force_bell(c.raw()!, percent)
1852}
1853
1854// XkbBellEvent, borrowing this connection. Other ownership follows the raw call.
1855pub fn (c &Connection) xkb_bell_event(win Window, percent i32, name Atom) !i32 {
1856 return xkb_bell_event(c.raw()!, win, percent, name)
1857}
1858
1859// XkbSelectEvents, borrowing this connection. Other ownership follows the raw call.
1860pub fn (c &Connection) xkb_select_events(device_id u32, affect u32, values u32) !i32 {
1861 return xkb_select_events(c.raw()!, device_id, affect, values)
1862}
1863
1864// XkbSelectEventDetails, borrowing this connection. Other ownership follows the raw call.
1865pub fn (c &Connection) xkb_select_event_details(device_id u32, event_type u32, affect CULong, details CULong) !i32 {
1866 return xkb_select_event_details(c.raw()!, device_id, event_type, affect, details)
1867}
1868
1869// XkbGetIndicatorState, borrowing this connection. Other ownership follows the raw call.
1870pub fn (c &Connection) xkb_get_indicator_state(device_spec u32, p_state_rtrn &u32) !i32 {
1871 return xkb_get_indicator_state(c.raw()!, device_spec, p_state_rtrn)
1872}
1873
1874// XkbGetDeviceIndicatorState, borrowing this connection. Other ownership follows the raw call.
1875pub fn (c &Connection) xkb_get_device_indicator_state(device_spec u32, led_class u32, led_id u32, p_state_rtrn &u32) !i32 {
1876 return xkb_get_device_indicator_state(c.raw()!, device_spec, led_class, led_id, p_state_rtrn)
1877}
1878
1879// XkbGetIndicatorMap, borrowing this connection. Other ownership follows the raw call.
1880pub fn (c &Connection) xkb_get_indicator_map(which CULong, desc XkbDescPtr) !i32 {
1881 return xkb_get_indicator_map(c.raw()!, which, desc)
1882}
1883
1884// XkbSetIndicatorMap, borrowing this connection. Other ownership follows the raw call.
1885pub fn (c &Connection) xkb_set_indicator_map(which CULong, desc XkbDescPtr) !i32 {
1886 return xkb_set_indicator_map(c.raw()!, which, desc)
1887}
1888
1889// XkbGetNamedIndicator, borrowing this connection. Other ownership follows the raw call.
1890pub fn (c &Connection) xkb_get_named_indicator(name Atom, p_ndx_rtrn &i32, p_state_rtrn &i32, p_map_rtrn XkbIndicatorMapPtr, p_real_rtrn &i32) !i32 {
1891 return xkb_get_named_indicator(c.raw()!, name, p_ndx_rtrn, p_state_rtrn, p_map_rtrn, p_real_rtrn)
1892}
1893
1894// XkbGetNamedDeviceIndicator, borrowing this connection. Other ownership follows the raw call.
1895pub fn (c &Connection) xkb_get_named_device_indicator(device_spec u32, led_class u32, led_id u32, name Atom, p_ndx_rtrn &i32, p_state_rtrn &i32, p_map_rtrn XkbIndicatorMapPtr, p_real_rtrn &i32) !i32 {
1896 return xkb_get_named_device_indicator(c.raw()!, device_spec, led_class, led_id, name, p_ndx_rtrn, p_state_rtrn, p_map_rtrn, p_real_rtrn)
1897}
1898
1899// XkbSetNamedIndicator, borrowing this connection. Other ownership follows the raw call.
1900pub fn (c &Connection) xkb_set_named_indicator(name Atom, change_state i32, state i32, create_new_map i32, p_map XkbIndicatorMapPtr) !i32 {
1901 return xkb_set_named_indicator(c.raw()!, name, change_state, state, create_new_map, p_map)
1902}
1903
1904// XkbSetNamedDeviceIndicator, borrowing this connection. Other ownership follows the raw call.
1905pub fn (c &Connection) xkb_set_named_device_indicator(device_spec u32, led_class u32, led_id u32, name Atom, change_state i32, state i32, create_new_map i32, p_map XkbIndicatorMapPtr) !i32 {
1906 return xkb_set_named_device_indicator(c.raw()!, device_spec, led_class, led_id, name, change_state, state, create_new_map, p_map)
1907}
1908
1909// XkbLockModifiers, borrowing this connection. Other ownership follows the raw call.
1910pub fn (c &Connection) xkb_lock_modifiers(device_spec u32, affect u32, values u32) !i32 {
1911 return xkb_lock_modifiers(c.raw()!, device_spec, affect, values)
1912}
1913
1914// XkbLatchModifiers, borrowing this connection. Other ownership follows the raw call.
1915pub fn (c &Connection) xkb_latch_modifiers(device_spec u32, affect u32, values u32) !i32 {
1916 return xkb_latch_modifiers(c.raw()!, device_spec, affect, values)
1917}
1918
1919// XkbLockGroup, borrowing this connection. Other ownership follows the raw call.
1920pub fn (c &Connection) xkb_lock_group(device_spec u32, group u32) !i32 {
1921 return xkb_lock_group(c.raw()!, device_spec, group)
1922}
1923
1924// XkbLatchGroup, borrowing this connection. Other ownership follows the raw call.
1925pub fn (c &Connection) xkb_latch_group(device_spec u32, group u32) !i32 {
1926 return xkb_latch_group(c.raw()!, device_spec, group)
1927}
1928
1929// XkbSetServerInternalMods, borrowing this connection. Other ownership follows the raw call.
1930pub fn (c &Connection) xkb_set_server_internal_mods(device_spec u32, affect_real u32, real_values u32, affect_virtual u32, virtual_values u32) !i32 {
1931 return xkb_set_server_internal_mods(c.raw()!, device_spec, affect_real, real_values, affect_virtual, virtual_values)
1932}
1933
1934// XkbSetIgnoreLockMods, borrowing this connection. Other ownership follows the raw call.
1935pub fn (c &Connection) xkb_set_ignore_lock_mods(device_spec u32, affect_real u32, real_values u32, affect_virtual u32, virtual_values u32) !i32 {
1936 return xkb_set_ignore_lock_mods(c.raw()!, device_spec, affect_real, real_values, affect_virtual, virtual_values)
1937}
1938
1939// XkbGetMap, borrowing this connection. Other ownership follows the raw call.
1940pub fn (c &Connection) xkb_get_map(which u32, device_spec u32) !XkbDescPtr {
1941 return xkb_get_map(c.raw()!, which, device_spec)
1942}
1943
1944// XkbGetUpdatedMap, borrowing this connection. Other ownership follows the raw call.
1945pub fn (c &Connection) xkb_get_updated_map(which u32, desc XkbDescPtr) !i32 {
1946 return xkb_get_updated_map(c.raw()!, which, desc)
1947}
1948
1949// XkbGetMapChanges, borrowing this connection. Other ownership follows the raw call.
1950pub fn (c &Connection) xkb_get_map_changes(xkb XkbDescPtr, changes XkbMapChangesPtr) !i32 {
1951 return xkb_get_map_changes(c.raw()!, xkb, changes)
1952}
1953
1954// XkbGetKeyTypes, borrowing this connection. Other ownership follows the raw call.
1955pub fn (c &Connection) xkb_get_key_types(first u32, num u32, xkb XkbDescPtr) !i32 {
1956 return xkb_get_key_types(c.raw()!, first, num, xkb)
1957}
1958
1959// XkbGetKeySyms, borrowing this connection. Other ownership follows the raw call.
1960pub fn (c &Connection) xkb_get_key_syms(first u32, num u32, xkb XkbDescPtr) !i32 {
1961 return xkb_get_key_syms(c.raw()!, first, num, xkb)
1962}
1963
1964// XkbGetKeyActions, borrowing this connection. Other ownership follows the raw call.
1965pub fn (c &Connection) xkb_get_key_actions(first u32, num u32, xkb XkbDescPtr) !i32 {
1966 return xkb_get_key_actions(c.raw()!, first, num, xkb)
1967}
1968
1969// XkbGetKeyBehaviors, borrowing this connection. Other ownership follows the raw call.
1970pub fn (c &Connection) xkb_get_key_behaviors(first_key u32, n_keys u32, desc XkbDescPtr) !i32 {
1971 return xkb_get_key_behaviors(c.raw()!, first_key, n_keys, desc)
1972}
1973
1974// XkbGetVirtualMods, borrowing this connection. Other ownership follows the raw call.
1975pub fn (c &Connection) xkb_get_virtual_mods(which u32, desc XkbDescPtr) !i32 {
1976 return xkb_get_virtual_mods(c.raw()!, which, desc)
1977}
1978
1979// XkbGetKeyExplicitComponents, borrowing this connection. Other ownership follows the raw call.
1980pub fn (c &Connection) xkb_get_key_explicit_components(first_key u32, n_keys u32, desc XkbDescPtr) !i32 {
1981 return xkb_get_key_explicit_components(c.raw()!, first_key, n_keys, desc)
1982}
1983
1984// XkbGetKeyModifierMap, borrowing this connection. Other ownership follows the raw call.
1985pub fn (c &Connection) xkb_get_key_modifier_map(first_key u32, n_keys u32, desc XkbDescPtr) !i32 {
1986 return xkb_get_key_modifier_map(c.raw()!, first_key, n_keys, desc)
1987}
1988
1989// XkbGetKeyVirtualModMap, borrowing this connection. Other ownership follows the raw call.
1990pub fn (c &Connection) xkb_get_key_virtual_mod_map(first u32, num u32, xkb XkbDescPtr) !i32 {
1991 return xkb_get_key_virtual_mod_map(c.raw()!, first, num, xkb)
1992}
1993
1994// XkbGetControls, borrowing this connection. Other ownership follows the raw call.
1995pub fn (c &Connection) xkb_get_controls(which CULong, desc XkbDescPtr) !i32 {
1996 return xkb_get_controls(c.raw()!, which, desc)
1997}
1998
1999// XkbSetControls, borrowing this connection. Other ownership follows the raw call.
2000pub fn (c &Connection) xkb_set_controls(which CULong, desc XkbDescPtr) !i32 {
2001 return xkb_set_controls(c.raw()!, which, desc)
2002}
2003
2004// XkbGetCompatMap, borrowing this connection. Other ownership follows the raw call.
2005pub fn (c &Connection) xkb_get_compat_map(which u32, xkb XkbDescPtr) !i32 {
2006 return xkb_get_compat_map(c.raw()!, which, xkb)
2007}
2008
2009// XkbSetCompatMap, borrowing this connection. Other ownership follows the raw call.
2010pub fn (c &Connection) xkb_set_compat_map(which u32, xkb XkbDescPtr, update_actions i32) !i32 {
2011 return xkb_set_compat_map(c.raw()!, which, xkb, update_actions)
2012}
2013
2014// XkbGetNames, borrowing this connection. Other ownership follows the raw call.
2015pub fn (c &Connection) xkb_get_names(which u32, desc XkbDescPtr) !i32 {
2016 return xkb_get_names(c.raw()!, which, desc)
2017}
2018
2019// XkbSetNames, borrowing this connection. Other ownership follows the raw call.
2020pub fn (c &Connection) xkb_set_names(which u32, first_type u32, n_types u32, desc XkbDescPtr) !i32 {
2021 return xkb_set_names(c.raw()!, which, first_type, n_types, desc)
2022}
2023
2024// XkbChangeNames, borrowing this connection. Other ownership follows the raw call.
2025pub fn (c &Connection) xkb_change_names(xkb XkbDescPtr, changes XkbNameChangesPtr) !i32 {
2026 return xkb_change_names(c.raw()!, xkb, changes)
2027}
2028
2029// XkbGetState, borrowing this connection. Other ownership follows the raw call.
2030pub fn (c &Connection) xkb_get_state(device_spec u32, rtrn_state XkbStatePtr) !i32 {
2031 return xkb_get_state(c.raw()!, device_spec, rtrn_state)
2032}
2033
2034// XkbSetMap, borrowing this connection. Other ownership follows the raw call.
2035pub fn (c &Connection) xkb_set_map(which u32, desc XkbDescPtr) !i32 {
2036 return xkb_set_map(c.raw()!, which, desc)
2037}
2038
2039// XkbChangeMap, borrowing this connection. Other ownership follows the raw call.
2040pub fn (c &Connection) xkb_change_map(desc XkbDescPtr, changes XkbMapChangesPtr) !i32 {
2041 return xkb_change_map(c.raw()!, desc, changes)
2042}
2043
2044// XkbSetDetectableAutoRepeat, borrowing this connection. Other ownership follows the raw call.
2045pub fn (c &Connection) xkb_set_detectable_auto_repeat(detectable i32, supported &i32) !i32 {
2046 return xkb_set_detectable_auto_repeat(c.raw()!, detectable, supported)
2047}
2048
2049// XkbGetDetectableAutoRepeat, borrowing this connection. Other ownership follows the raw call.
2050pub fn (c &Connection) xkb_get_detectable_auto_repeat(supported &i32) !i32 {
2051 return xkb_get_detectable_auto_repeat(c.raw()!, supported)
2052}
2053
2054// XkbSetAutoResetControls, borrowing this connection. Other ownership follows the raw call.
2055pub fn (c &Connection) xkb_set_auto_reset_controls(changes u32, auto_ctrls &u32, auto_values &u32) !i32 {
2056 return xkb_set_auto_reset_controls(c.raw()!, changes, auto_ctrls, auto_values)
2057}
2058
2059// XkbGetAutoResetControls, borrowing this connection. Other ownership follows the raw call.
2060pub fn (c &Connection) xkb_get_auto_reset_controls(auto_ctrls &u32, auto_ctrl_values &u32) !i32 {
2061 return xkb_get_auto_reset_controls(c.raw()!, auto_ctrls, auto_ctrl_values)
2062}
2063
2064// XkbSetPerClientControls, borrowing this connection. Other ownership follows the raw call.
2065pub fn (c &Connection) xkb_set_per_client_controls(change u32, values &u32) !i32 {
2066 return xkb_set_per_client_controls(c.raw()!, change, values)
2067}
2068
2069// XkbGetPerClientControls, borrowing this connection. Other ownership follows the raw call.
2070pub fn (c &Connection) xkb_get_per_client_controls(ctrls &u32) !i32 {
2071 return xkb_get_per_client_controls(c.raw()!, ctrls)
2072}
2073
2074// XkbListComponents, borrowing this connection. Other ownership follows the raw call.
2075pub fn (c &Connection) xkb_list_components(device_spec u32, ptrns XkbComponentNamesPtr, max_inout &i32) !XkbComponentListPtr {
2076 return xkb_list_components(c.raw()!, device_spec, ptrns, max_inout)
2077}
2078
2079// XkbGetKeyboard, borrowing this connection. Other ownership follows the raw call.
2080pub fn (c &Connection) xkb_get_keyboard(which u32, device_spec u32) !XkbDescPtr {
2081 return xkb_get_keyboard(c.raw()!, which, device_spec)
2082}
2083
2084// XkbGetKeyboardByName, borrowing this connection. Other ownership follows the raw call.
2085pub fn (c &Connection) xkb_get_keyboard_by_name(device_spec u32, names XkbComponentNamesPtr, want u32, need u32, load i32) !XkbDescPtr {
2086 return xkb_get_keyboard_by_name(c.raw()!, device_spec, names, want, need, load)
2087}
2088
2089// XkbGetDeviceInfo, borrowing this connection. Other ownership follows the raw call.
2090pub fn (c &Connection) xkb_get_device_info(which u32, device_spec u32, led_class u32, led_id u32) !XkbDeviceInfoPtr {
2091 return xkb_get_device_info(c.raw()!, which, device_spec, led_class, led_id)
2092}
2093
2094// XkbGetDeviceInfoChanges, borrowing this connection. Other ownership follows the raw call.
2095pub fn (c &Connection) xkb_get_device_info_changes(devi XkbDeviceInfoPtr, changes XkbDeviceChangesPtr) !i32 {
2096 return xkb_get_device_info_changes(c.raw()!, devi, changes)
2097}
2098
2099// XkbGetDeviceButtonActions, borrowing this connection. Other ownership follows the raw call.
2100pub fn (c &Connection) xkb_get_device_button_actions(devi XkbDeviceInfoPtr, all i32, first u32, n_btns u32) !i32 {
2101 return xkb_get_device_button_actions(c.raw()!, devi, all, first, n_btns)
2102}
2103
2104// XkbGetDeviceLedInfo, borrowing this connection. Other ownership follows the raw call.
2105pub fn (c &Connection) xkb_get_device_led_info(devi XkbDeviceInfoPtr, arg2 u32, arg3 u32, arg4 u32) !i32 {
2106 return xkb_get_device_led_info(c.raw()!, devi, arg2, arg3, arg4)
2107}
2108
2109// XkbSetDeviceInfo, borrowing this connection. Other ownership follows the raw call.
2110pub fn (c &Connection) xkb_set_device_info(which u32, devi XkbDeviceInfoPtr) !i32 {
2111 return xkb_set_device_info(c.raw()!, which, devi)
2112}
2113
2114// XkbChangeDeviceInfo, borrowing this connection. Other ownership follows the raw call.
2115pub fn (c &Connection) xkb_change_device_info(desc XkbDeviceInfoPtr, changes XkbDeviceChangesPtr) !i32 {
2116 return xkb_change_device_info(c.raw()!, desc, changes)
2117}
2118
2119// XkbSetDeviceLedInfo, borrowing this connection. Other ownership follows the raw call.
2120pub fn (c &Connection) xkb_set_device_led_info(devi XkbDeviceInfoPtr, led_class u32, led_id u32, which u32) !i32 {
2121 return xkb_set_device_led_info(c.raw()!, devi, led_class, led_id, which)
2122}
2123
2124// XkbSetDeviceButtonActions, borrowing this connection. Other ownership follows the raw call.
2125pub fn (c &Connection) xkb_set_device_button_actions(devi XkbDeviceInfoPtr, first u32, n_btns u32) !i32 {
2126 return xkb_set_device_button_actions(c.raw()!, devi, first, n_btns)
2127}
2128
2129// XkbSetDebuggingFlags, borrowing this connection. Other ownership follows the raw call.
2130pub fn (c &Connection) xkb_set_debugging_flags(mask u32, flags u32, msg &char, ctrls_mask u32, ctrls u32, rtrn_flags &u32, rtrn_ctrls &u32) !i32 {
2131 return xkb_set_debugging_flags(c.raw()!, mask, flags, msg, ctrls_mask, ctrls, rtrn_flags, rtrn_ctrls)
2132}
2133