Release 0.41.92
[vala-gnome.git] / vapi / x11.vapi
blobb0448033f20ae720eed1158629dd5dc64e50f570
1 /* x11.vapi
2  *
3  * Copyright (C) 2009  Jürg Billeter
4  * Copyright (C) 2011  Alexander Kurtz
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
19  *
20  * Authors:
21  *      Jürg Billeter <j@bitron.ch>
22  *      Alexander Kurtz <kurtz.alex@googlemail.com>
23  */
25 [CCode (gir_namespace = "xlib", gir_version = "2.0", cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h,X11/Xregion.h")]
26 namespace X {
27         // Note: must be called before opening a display or calling any other Xlib function,
28         // see http://tronche.com/gui/x/xlib/display/XInitThreads.html
29         [CCode (cname = "XInitThreads")]
30         public Status init_threads ();
32         [Compact]
33         [CCode (cname = "Display", free_function = "XCloseDisplay")]
34         public class Display {
35                 [CCode (cname = "XOpenDisplay")]
36                 public Display (string? name = null);
38                 [CCode (cname = "XAllPlanes")]
39                 public static ulong get_all_planes ();
41                 [CCode (cname = "XActivateScreenSaver")]
42                 public void activate_screensaver ();
44                 [CCode (cname = "XAddToSaveSet")]
45                 public int add_to_save_set (Window w);
47                 [CCode (cname = "XAllowEvents")]
48                 public int allow_events (int event_mode, int time);
50                 [CCode (cname = "XBitmapBitOrder")]
51                 public int bitmap_bit_order ();
53                 [CCode (cname = "XBitmapUnit")]
54                 public int bitmap_scanline_unit ();
56                 [CCode (cname = "XBitmapPad")]
57                 public int bitmap_scanline_padding ();
59                 [CCode (cname = "XChangeProperty")]
60                 public int change_property (Window w, Atom property, Atom type, int format, int mode, [CCode (array_length = false)] uchar[] data, int nelements);
62                 [CCode (cname = "XChangeWindowAttributes")]
63                 public int change_window_attributes (Window w, ulong valuemask, SetWindowAttributes attributes);
65                 [CCode (cname = "XConfigureWindow")]
66                 public int configure_window (Window w, uint value_mask, WindowChanges values);
68                 [CCode (cname = "ConnectionNumber")]
69                 public int connection_number ();
71                 [CCode (cname = "DefaultRootWindow")]
72                 public Window default_root_window ();
74                 [CCode (cname = "XDefaultScreenOfDisplay")]
75                 public unowned Screen default_screen ();
77                 [CCode (cname = "XScreenOfDisplay")]
78                 public unowned Screen screen_by_id (int screen_number);
80                 [CCode (cname = "DisplayString")]
81                 public unowned string display_string ();
83                 [CCode (cname = "XQLength")]
84                 public int event_queue_length ();
86                 [CCode (cname = "XFlush")]
87                 public int flush ();
89                 [CCode (cname = "XForceScreenSaver")]
90                 public void force_screensaver (int mode);
92                 [CCode (cname = "XGetKeyboardMapping", array_length = false)]
93                 public ulong[] get_keyboard_mapping (uchar first_keycode, int keycode_count, ref int keysyms_per_keycode_return);
95                 [CCode (cname = "XGetModifierMapping")]
96                 public ModifierKeymap get_modifier_mapping ();
98                 [CCode (cname = "XGetScreenSaver")]
99                 public void get_screensaver (out int timeout, out int interval, out int prefer_blanking, out int allow_exposures);
101                 [CCode (cname = "XGetSelectionOwner")]
102                 public Window get_selection_owner (Atom selection);
104                 [CCode (cname = "XGetInputFocus")]
105                 public void get_input_focus (out Window focus_return, out int revert_to_return);
107                 [CCode (cname = "XGetWindowAttributes")]
108                 public void get_window_attributes (Window w, out WindowAttributes window_attributes_return);
110                 [CCode (cname = "XGetWindowProperty")]
111                 public int get_window_property (Window w, Atom property, long long_offset, long long_length, bool delete, Atom req_type, out Atom actual_type_return, out int actual_format_return, out ulong nitems_return, out ulong bytes_after_return, [CCode (type = "unsigned char **")] out void* prop_return);
113                 [CCode (cname = "XGrabButton")]
114                 public int grab_button (uint button, uint modifiers, Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor);
116                 [CCode (cname = "XGrabKey")]
117                 public int grab_key (int keycode, uint modifiers, Window grab_window, bool owner_events, int pointer_mode, int keyboard_mode);
119                 [CCode (cname = "XGrabPointer")]
120                 public int grab_pointer (Window grab_window, bool owner_events, uint event_mask, int pointer_mode, int keyboard_mode, Window confine_to, uint cursor, int time);
122                 [CCode (cname = "XGrabServer")]
123                 public int grab_server ();
125                 [CCode (cname = "XImageByteOrder")]
126                 public int image_byte_order ();
128                 [CCode (cname = "XInternAtom")]
129                 public Atom intern_atom (string atom_name, bool only_if_exists);
131                 [CCode (cname = "XInternAtoms")]
132                 public void intern_atoms (string[] names, bool only_if_exists, [CCode (array_length = false)] Atom[] atoms_return);
134                 [CCode (cname = "XGetAtomName")]
135                 public string get_atom_name (X.Atom atom);
137                 [CCode (cname = "XGetAtomNames")]
138                 public string get_atom_names (Atom[] atoms, [CCode (array_length = false)] out string[] names);
140                 [CCode (cname = "XDeleteProperty")]
141                 public int delete_property (Window w, X.Atom property);
143                 [CCode (cname = "XGetGeometry")]
144                 public void get_geometry (Drawable d, out Window root_return, out int x_return, out int y_return, out uint width_return, out uint height_return, out uint border_width_return, out uint depth_return);
146                 [CCode (cname = "XInternalConnectionNumbers")]
147                 public Status internal_connection_numbers (ref int[] fd_return);
149                 [CCode (cname = "XDisplayKeycodes")]
150                 public int keycodes (ref int min_keycodes_return, ref int max_keycodes_return);
152                 [CCode (cname = "XKeysymToKeycode")]
153                 public uchar keysym_to_keycode (ulong keysym);
155                 [CCode (cname = "XKeycodeToKeysym")]
156                 public ulong keycode_to_keysym (uchar keycode, int index);
158                 [CCode (cname = "XLastKnownRequestProcessed")]
159                 public ulong last_known_request_processed ();
161                 [CCode (cname = "XLockDisplay")]
162                 public void lock_display ();
164                 [CCode (cname = "XMapWindow")]
165                 public int map_window (Window w);
167                 [CCode (cname = "XMapRaised")]
168                 public int map_raised (Window w);
170                 [CCode (cname = "XMaxRequestSize")]
171                 public long max_request_size ();
173                 [CCode (cname = "XExtendedMaxRequestSize")]
174                 public long max_extended_request_size ();
176                 [CCode (cname = "XEventsQueued")]
177                 public int events_queued (int mode);
179                 [CCode (cname = "XNextEvent")]
180                 public int next_event (ref Event event_return);
182                 [CCode (cname = "XNextRequest")]
183                 public ulong next_request ();
185                 [CCode (cname = "XNoOp")]
186                 public void no_operation ();
188                 [CCode (cname = "XScreenCount")]
189                 public int number_of_screens ();
191                 [CCode (cname = "XPending")]
192                 public int pending ();
194                 [CCode (cname = "XProcessInternalConnection")]
195                 public void process_internal_connection (int fd);
197                 [CCode (cname = "XProtocolVersion")]
198                 public int protocol_version ();
200                 [CCode (cname = "XProtocolRevision")]
201                 public int protocol_revision ();
203                 [CCode (cname = "XIconifyWindow")]
204                 public Status iconify_window (Window w, int screen_number);
206                 [CCode (cname = "XWithdrawWindow")]
207                 public Status withdraw_window (Window w, int screen_number);
209                 [CCode (cname = "XLowerWindow")]
210                 public int lower_window (Window w);
212                 [CCode (cname = "XRaiseWindow")]
213                 public int raise_window (Window w);
215                 [CCode (cname = "XReparentWindow")]
216                 public int reparent_window (Window w, Window parent, int x, int y);
218                 [CCode (cname = "XResetScreenSaver")]
219                 public void reset_screensaver ();
221                 [CCode (cname = "XResizeWindow")]
222                 public int resize_window (Window w, uint width, uint height);
224                 [CCode (cname = "XRootWindow")]
225                 public Window root_window (int screen_number);
227                 [CCode (cname = "ScreenCount")]
228                 public int screen_count ();
230                 [CCode (cname = "XScreenOfDisplay")]
231                 public unowned Screen screen_of_display (int screen_number);
233                 [CCode (cname = "XSelectInput")]
234                 public int select_input (Window w, long event_mask);
236                 [CCode (cname = "XSendEvent")]
237                 public void send_event (Window w, bool propagate, long event_mask, ref Event event_send);
239                 [CCode (cname = "XSetCloseDownMode")]
240                 public void set_close_down_mode (int close_mode);
242                 [CCode (cname = "XSetScreenSaver")]
243                 public void set_screensaver (int timeout, int interval, int prefer_blanking, int allow_exposures);
245                 [CCode (cname = "XSetSelectionOwner")]
246                 public Window set_selection_owner (Atom selection, Window owner, int time);
248                 [CCode (cname = "XSetInputFocus")]
249                 public int set_input_focus (Window focus, int revert_to, int time);
251                 [CCode (cname = "XUngrabButton")]
252                 public int ungrab_button (uint button, uint modifiers, Window grab_window);
254                 [CCode (cname = "XUngrabKey")]
255                 public int ungrab_key (int keycode, uint modifiers, Window grab_window);
257                 [CCode (cname = "XUngrabPointer")]
258                 public int ungrab_pointer (int time);
260                 [CCode (cname = "XUngrabServer")]
261                 public int ungrab_server ();
263                 [CCode (cname = "XUnlockDisplay")]
264                 public void unlock_display ();
266                 [CCode (cname = "XUnmapWindow")]
267                 public int unmap_window (Window w);
269                 [CCode (cname = "XQueryTree")]
270                 public void query_tree (Window w, out Window root_return, out Window parent_return, out Window[] children_return);
272                 [CCode (cname = "XTranslateCoordinates")]
273                 public bool translate_coordinates (Window src_w, Window dest_w, int src_x, int src_y, out int dest_x_return, out int dest_y_return, out Window child_return);
275                 [CCode (cname = "XQueryPointer")]
276                 public bool query_pointer (Window w, out Window root_retur, out Window child_retur, out int root_x_return, out int root_y_return, out int win_x_return, out int win_y_return, out uint mask_return);
278                 [CCode (cname = "XSetWMNormalHints")]
279                 public void set_wm_normal_hints (Window w, SizeHints hints);
281                 [CCode (cname = "XSetWMProtocols")]
282                 public void set_wm_protocols (Window w, Atom[] protocols);
284                 [CCode (cname = "XSetWMProtocols")]
285                 public void set_wm_protocols_n (Window w, Atom[] protocols);
287                 [CCode (cname = "XSetTransientForHint")]
288                 public int set_transient_for_hint (Window w, Window prop_window);
290                 [CCode (cname = "XGetTransientForHint")]
291                 public int get_transient_for_hint (Window w, out Window prop_window);
293                 [CCode (cname = "XGetWMProtocols")]
294                 public void get_wm_protocols (Window w, out Atom[] protocols);
296                 [CCode (cname = "XMoveResizeWindow")]
297                 public void move_resize_window (Window window, int x, int y, uint width, uint height);
299                 [CCode (cname = "XWindowEvent")]
300                 public int window_event (Window w, EventMask event_mask, out Event event_return);
302                 [CCode (cname = "XServerVendor")]
303                 public string xserver_vendor_name ();
305                 [CCode (cname = "XVendorRelease")]
306                 public string xserver_vendor_release ();
308                 [CCode (cname = "XMoveWindow")]
309                 public void move_window (Window window, int x, int y);
311                 [CCode (cname = "XQueryExtension")]
312                 public bool query_extension(string name, out int major_opcode, out int first_event_return, out int first_error_return);
314                 [CCode (cname = "XListProperties")]
315                 public X.Atom[] list_properties (Window w);
317                 [CCode (cname = "XGetVisualInfo")]
318                 public X.VisualInfo? get_visual_info (long vinfo_mask, X.VisualInfo template, out int nitems_return);
320                 [CCode (cname = "XMatchVisualInfo")]
321                 public X.Status match_visual_info (int screen, int depth, int @class, out X.VisualInfo vinfo_return);
322         }
324         [Compact]
325         [CCode (cname = "XModifierKeymap", free_function = "XFreeModifiermap")]
326         public class ModifierKeymap {
327                 // The server's max # of keys per modifier
328                 public int max_keypermod;
329                 // An 8 by max_keypermod array of modifiers
330                 [CCode (array_length = false)]
331                 public uchar[] modifiermap;
332         }
334         public const ulong AllPlanes;
336         [SimpleType]
337         [CCode (cname = "XPointer", has_type_id = false)]
338         public struct Pointer {
339         }
341         [SimpleType]
342         [IntegerType (rank = 9)]
343         [CCode (cname = "Atom", type_id = "G_TYPE_LONG",
344                 marshaller_type_name = "LONG",
345                 get_value_function = "g_value_get_long",
346                 set_value_function = "g_value_set_long", has_type_id = false)]
347         public struct Atom {
348         }
350         [SimpleType]
351         [IntegerType (rank = 9)]
352         [CCode (cname = "Colormap", has_type_id = false)]
353         public struct Colormap {
354         }
356         [SimpleType]
357         [CCode (cname = "GC", has_type_id = false)]
358         public struct GC {
359         }
361         [SimpleType]
362         [IntegerType (rank = 9)]
363         [CCode (cname = "Status", has_type_id = false)]
364         public struct Status {
365         }
367         [GIR (name = "XID")]
368         [SimpleType]
369         [IntegerType (rank = 9)]
370         [CCode (cname = "XID", type_id = "G_TYPE_INT",
371                 marshaller_type_name = "INT",
372                 get_value_function = "g_value_get_int",
373                 set_value_function = "g_value_set_int", default_value = "0",
374                 type_signature = "i", has_type_id = false)]
375         public struct ID {
376         }
378         [SimpleType]
379         [IntegerType (rank = 9)]
380         [CCode (cname = "Drawable", type_id = "G_TYPE_INT",
381                 marshaller_type_name = "INT",
382                 get_value_function = "g_value_get_int",
383                 set_value_function = "g_value_set_int", default_value = "0",
384                 type_signature = "i", has_type_id = false)]
385         public struct Drawable : ID
386         {
387         }
389         [SimpleType]
390         [IntegerType (rank = 9)]
391         [CCode (cname = "Window", type_id = "G_TYPE_INT",
392                 marshaller_type_name = "INT",
393                 get_value_function = "g_value_get_int",
394                 set_value_function = "g_value_set_int", default_value = "0",
395                 type_signature = "i", has_type_id = false)]
396         public struct Window : Drawable {
397         }
400         [SimpleType]
401         [IntegerType (rank = 9)]
402         [CCode (cname = "Pixmap", type_id = "G_TYPE_INT",
403                 marshaller_type_name = "INT",
404                 get_value_function = "g_value_get_int",
405                 set_value_function = "g_value_set_int", default_value = "0",
406                 type_signature = "i", has_type_id = false)]
407         public struct Pixmap : Drawable {
408         }
410         [SimpleType]
411         [IntegerType (rank = 9)]
412         [CCode (cname = "Mask", has_type_id = false)]
413         public struct Mask {
414         }
416         [SimpleType]
417         [IntegerType (rank = 9)]
418         [CCode (cname = "VisualID", has_type_id = false)]
419         public struct VisualID {
420         }
422         [GIR (name = "XVisualInfo")]
423         [CCode (cname = "XVisualInfo", has_type_id = false)]
424         public struct VisualInfo {
425                 public unowned X.Visual visual;
426                 public X.VisualID visualid;
427                 public int screen;
428                 public int depth;
429                 public int @class;
430                 public ulong red_mask;
431                 public ulong green_mask;
432                 public ulong blue_mask;
433                 public int colormap_size;
434                 public int bits_per_rgb;
435         }
438         [SimpleType]
439         [IntegerType (rank = 9)]
440         [CCode (cname = "Time", has_type_id = false)]
441         public struct Time {
442         }
444         [SimpleType]
445         [IntegerType (rank = 9)]
446         [CCode (cname = "Cursor", has_type_id = false)]
447         public struct Cursor {
448         }
450         [SimpleType]
451         [IntegerType (rank = 9)]
452         [CCode (cname = "GContext", has_type_id = false)]
453         public struct GContext {
454         }
456         [SimpleType]
457         [IntegerType (rank = 9)]
458         [CCode (cname = "KeySym", has_type_id = false)]
459         public struct KeySym {
460         }
462         [SimpleType]
463         [IntegerType (rank = 9)]
464         [CCode (cname = "KeyCode", has_type_id = false)]
465         public struct KeyCode {
466         }
468         [Compact]
469         [CCode (cname = "XImage", free_function = "XDestroyImage")]
470         public class Image {
471                 public int width;
472                 public int height;
473                 public int xoffset;
474                 public int format;
475                 public char *data;
476                 public int byte_order;
477                 public int bitmap_unit;
478                 public int bitmap_bit_order;
479                 public int bitmap_pad;
480                 public int depth;
481                 public int bytes_per_line;
482                 public int bits_per_pixel;
483                 public ulong red_mask;
484                 public ulong green_mask;
485                 public ulong blue_mask;
486                 public Pointer obdata;
487         }
489         [CCode (ref_function = "", unref_function = "")]
490         [Compact]
491         public class Visual {
492                 public VisualID get_visual_id ();
493         }
495         public struct WindowChanges {
496                 public int x;
497                 public int y;
498                 public int width;
499                 public int height;
500                 public int border_width;
501                 public Window sibling;
502                 public int stack_mode;
503         }
504         public struct SizeHints {
505                 public long @flags;
506                 public int x;
507                 public int y;
508                 public int width;
509                 public int height;
510         }
512         [CCode (cprefix = "", cname = "int", has_type_id = false)]
513         public enum ImageFormat {
514                 XYBitmap,
515                 XYPixmap,
516                 ZPixmap;
517         }
519         [CCode (cname = "XCreateWindow")]
520         public Window create_window (Display display, Window parent, int x, int y, uint width, uint height, uint border_width, int depth, uint @class, Visual? visual, X.CW valuemask, ref SetWindowAttributes attributes);
522         [CCode (cname = "XClearWindow")]
523         public int clear_window (X.Display display, X.Window w);
525         [CCode (cname = "XCreatePixmap")]
526         public X.Pixmap create_pixmap (X.Display display, X.Drawable d, uint width, uint height, uint depth);
528         [CCode (cname = "XCreateImage")]
529         public unowned Image create_image (Display display, Visual u, uint depth, int format, int offset, char *data, uint width, uint height, int bitmap_pad, int bytes_per_line);
531         [CCode (cname = "XInitImage")]
532         public Status init_image (Image img);
534         [CCode (cname = "XGetImage")]
535         public Image get_image (Display display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format);
537         [CCode (cname = "XGetSubImage")]
538         public Image get_sub_image (Display display, Drawable d, int x, int y, uint width, uint height, ulong plane_mask, int format, Image img, int dest_x, int dest_y);
540         [CCode (cname = "XPutImage")]
541         public int put_image (Display display, Drawable d, GC gc, Image img, int src_x, int src_y, int dest_x, int dest_y, uint width, uint height);
543         [CCode (cname = "XGetPixel")]
544         public ulong get_pixel (Image img, int x, int y);
546         [CCode (cname = "XPutPixel")]
547         public int put_pixel (Image img, int x, int y, ulong pixel);
549         [CCode (cname = "XSubImage")]
550         public Image sub_image (Image img, int x, int y, uint width, uint height);
552         [CCode (cname = "XAddPixel")]
553         public int add_pixel (Image img, long @value);
555         [CCode (cname = "XSetWindowAttributes", has_type_id = false)]
556         public struct SetWindowAttributes {
557                 public Pixmap background_pixmap;        /* background or None or ParentRelative */
558                 public ulong background_pixel;  /* background pixel */
559                 public Pixmap border_pixmap;    /* border of the window */
560                 public ulong border_pixel;      /* border pixel value */
561                 public int bit_gravity;         /* one of bit gravity values */
562                 public int win_gravity;         /* one of the window gravity values */
563                 public int backing_store;               /* NotUseful, WhenMapped, Always */
564                 public ulong backing_planes;/* planes to be preseved if possible */
565                 public ulong backing_pixel;/* value to use in restoring planes */
566                 public bool save_under;         /* should bits under be saved? (popups) */
567                 public long event_mask;         /* set of events that should be saved */
568                 public long do_not_propagate_mask;      /* set of events that should not propagate */
569                 public bool override_redirect;  /* boolean value for override-redirect */
570                 public Colormap colormap;               /* color map to be associated with window */
571                 public Cursor cursor;           /* cursor to be displayed (or None) */
572         }
574         [CCode (cname = "XSetWindowBackgroundPixmap")]
575         public int set_window_background_pixmap (X.Display display, X.Window w, X.Pixmap background_pixmap);
577         [CCode (cname = "XWindowAttributes", has_destroy_function = false, cheader_filename = "X11/Xlib.h,X11/Xatom.h,X11/Xutil.h", has_type_id = false)]
578         public struct WindowAttributes {
579                 public int x;
580                 public int y;                   /* location of window */
581                 public int width;
582                 public int height;              /* width and height of window */
583                 public int border_width;                /* border width of window */
584                 public int depth;               /* depth of window */
585                 public Visual visual;           /* the associated visual structure */
586                 public Window root;             /* root of screen containing window */
587                 public int @class;                      /* InputOutput, InputOnly*/
588                 public int bit_gravity;         /* one of bit gravity values */
589                 public int win_gravity;         /* one of the window gravity values */
590                 public int backing_store;               /* NotUseful, WhenMapped, Always */
591                 public ulong backing_planes;/* planes to be preserved if possible */
592                 public ulong backing_pixel;/* value to be used when restoring planes */
593                 public bool save_under;         /* boolean, should bits under be saved? */
594                 public Colormap colormap;               /* color map to be associated with window */
595                 public bool map_installed;              /* boolean, is color map currently installed*/
596                 public int map_state;           /* IsUnmapped, IsUnviewable, IsViewable */
597                 public long all_event_masks;    /* set of events all people have interest in*/
598                 public long your_event_mask;    /* my event mask */
599                 public long do_not_propagate_mask; /* set of events that should not propagate */
600                 public bool override_redirect;  /* boolean value for override-redirect */
601                 public unowned Screen screen;   /* back pointer to correct screen */
602         }
604         [CCode (cname = "ParentRelative")]
605         public const ulong PARENT_RELATIVE;
607         [CCode (cname = "CopyFromParent")]
608         public const ulong COPY_FROM_PARENT;
610         [CCode (cname = "PointerWindow")]
611         public const ulong POINTER_WINDOW;
613         [CCode (cname = "InputFocus")]
614         public const ulong INPUT_FOCUS;
616         [CCode (cname = "PointerRoot")]
617         public const ulong POINTER_ROOT;
619         [CCode (cname = "AnyPropertyType")]
620         public const ulong ANY_PROPERTY_TYPE;
622         [CCode (cname = "AnyKey")]
623         public const ulong ANY_KEY;
625         [CCode (cname = "AnyButton")]
626         public const ulong ANY_BUTTON;
628         [CCode (cname = "AllTemporary")]
629         public const ulong ALL_TEMPORARY;
631         [CCode (cname = "CurrentTime")]
632         public const ulong CURRENT_TIME;
634         [CCode (cname = "NoSymbol")]
635         public const ulong NO_SYMBOL;
637         [CCode (cname = "Success")]
638         public int Success;
640         [CCode (cname = "XFree")]
641         public int free (void* data);
643         [CCode (cprefix = "", cname = "int", has_type_id = false)]
644         public enum ErrorCode {
645                 [CCode (cname = "Success")]
646                 SUCCESS,
647                 [CCode (cname = "BadRequest")]
648                 BAD_REQUEST,
649                 [CCode (cname = "BadValue")]
650                 BAD_VALUE,
651                 [CCode (cname = "BadWindow")]
652                 BAD_WINDOW,
653                 [CCode (cname = "BadPixmap")]
654                 BAD_PIXMAP,
655                 [CCode (cname = "BadAtom")]
656                 BAD_ATOM,
657                 [CCode (cname = "BadCursor")]
658                 BAD_CURSOR,
659                 [CCode (cname = "BadFont")]
660                 BAD_FONT,
661                 [CCode (cname = "BadMatch")]
662                 BAD_MATCH,
663                 [CCode (cname = "BadDrawable")]
664                 BAD_DRAWABLE,
665                 [CCode (cname = "BadAccess")]
666                 BAD_ACCESS,
667                 [CCode (cname = "BadAlloc")]
668                 BAD_ALLOC,
669                 [CCode (cname = "BadColor")]
670                 BAD_COLOR,
671                 [CCode (cname = "BadGC")]
672                 BAD_GC,
673                 [CCode (cname = "BadIDChoice")]
674                 BAD_ID_CHOICE,
675                 [CCode (cname = "BadName")]
676                 BAD_NAME,
677                 [CCode (cname = "BadLength")]
678                 BAD_LENGTH,
679                 [CCode (cname = "BadImplementation")]
680                 BAD_IMPLEMENTATION,
681                 [CCode (cname = "FirstExtensionError")]
682                 FIRST_EXTENSION_ERROR,
683                 [CCode (cname = "LastExtensionError")]
684                 LAST_EXTENSION_ERROR
685         }
687         [CCode (cprefix = "", cname = "int", has_type_id = false)]
688         public enum WindowClass {
689                 [CCode (cname = "InputOutput")]
690                 INPUT_OUTPUT,
691                 [CCode (cname = "InputOnly")]
692                 INPUT_ONLY
693         }
695         [CCode (cprefix = "CW", cname = "int")]
696         [Flags]
697         public enum CW {
698                 BackPixmap,
699                 BackPixel,
700                 BackingStore,
701                 BackingPlanes,
702                 BackingPixel,
703                 BitGravity,
704                 BorderPixmap,
705                 BorderPixel,
706                 BorderWidth,
707                 Colormap,
708                 Cursor,
709                 DontPropagate,
710                 EventMask,
711                 Height,
712                 OverrideRedirect,
713                 SaveUnder,
714                 Sibling,
715                 StackMode,
716                 X,
717                 Y,
718                 Width,
719                 WinGravity
720         }
722         [CCode (cprefix = "GrabMode", has_type_id = false)]
723         public enum GrabMode {
724                 Sync,
725                 Async
726         }
728         [CCode (cprefix = "")]
729         public enum CloseMode {
730                 DestroyAll,
731                 RetainPermanent,
732                 RetainTemporary
733         }
735         [CCode (cprefix = "")]
736         [Flags]
737         public enum EventMask {
738                 NoEventMask,
739                 KeyPressMask,
740                 KeyReleaseMask,
741                 ButtonPressMask,
742                 ButtonReleaseMask,
743                 EnterWindowMask,
744                 LeaveWindowMask,
745                 PointerMotionMask,
746                 PointerMotionHintMask,
747                 Button1MotionMask,
748                 Button2MotionMask,
749                 Button3MotionMask,
750                 Button4MotionMask,
751                 Button5MotionMask,
752                 ButtonMotionMask,
753                 KeymapStateMask,
754                 ExposureMask,
755                 VisibilityChangeMask,
756                 StructureNotifyMask,
757                 ResizeRedirectMask,
758                 SubstructureNotifyMask,
759                 SubstructureRedirectMask,
760                 FocusChangeMask,
761                 PropertyChangeMask,
762                 ColormapChangeMask,
763                 OwnerGrabButtonMask
764         }
766         [CCode (cprefix = "")]
767         [Flags]
768         public enum KeyMask {
769                 ShiftMask,
770                 LockMask,
771                 ControlMask,
772                 Mod1Mask,
773                 Mod2Mask,
774                 Mod3Mask,
775                 Mod4Mask,
776                 Mod5Mask
777         }
779         [CCode (cprefix = "", has_type_id = false)]
780         public enum EventType {
781                 KeyPress,
782                 KeyRelease,
783                 ButtonPress,
784                 ButtonRelease,
785                 MotionNotify,
786                 EnterNotify,
787                 LeaveNotify,
788                 FocusIn,
789                 FocusOut,
790                 KeymapNotify,
791                 Expose,
792                 GraphicsExpose,
793                 NoExpose,
794                 VisibilityNotify,
795                 CreateNotify,
796                 DestroyNotify,
797                 UnmapNotify,
798                 MapNotify,
799                 MapRequest,
800                 ReparentNotify,
801                 ConfigureNotify,
802                 ConfigureRequest,
803                 GravityNotify,
804                 ResizeRequest,
805                 CirculateNotify,
806                 CirculateRequest,
807                 PropertyNotify,
808                 SelectionClear,
809                 SelectionRequest,
810                 SelectionNotify,
811                 ColormapNotify,
812                 ClientMessage,
813                 MappingNotify,
814                 GenericEvent
815         }
817         // union
818         [GIR (name = "XEvent")]
819         [CCode (cname = "XEvent", has_type_id = false)]
820         public struct Event {
821                 public int type;
822                 public AnyEvent xany;
823                 public KeyEvent xkey;
824                 public ButtonEvent xbutton;
825                 public MotionEvent xmotion;
826                 public CrossingEvent xcrossing;
827                 public FocusChangeEvent xfocus;
828                 public ExposeEvent xexpose;
829                 public GraphicsExposeEvent xgraphicsexpose;
830                 public NoExposeEvent xnoexpose;
831                 public VisibilityEvent xvisibility;
832                 public CreateWindowEvent xcreatewindow;
833                 public DestroyWindowEvent xdestroywindow;
834                 public UnmapEvent xunmap;
835                 public MapEvent xmap;
836                 public MapRequestEvent xmaprequest;
837                 public ReparentEvent xreparent;
838                 public ConfigureEvent xconfigure;
839                 public GravityEvent xgravity;
840                 public ResizeRequestEvent xresizerequest;
841                 public ConfigureRequestEvent xconfigurerequest;
842                 public CirculateEvent xcirculate;
843                 public CirculateRequestEvent xcirculaterequest;
844                 public PropertyEvent xproperty;
845                 public SelectionClearEvent xselectionclear;
846                 public SelectionRequestEvent xselectionrequest;
847                 public SelectionEvent xselection;
848                 public ColormapEvent xcolormap;
849                 public ClientMessageEvent xclient;
850                 public MappingEvent xmapping;
851                 public ErrorEvent xerror;
852                 public KeymapEvent xkeymap;
853                 public GenericEvent xgeneric;
854                 public GenericEventCookie xcookie;
855         }
857         [CCode (cname = "XAnyEvent", has_type_id = false)]
858         public struct AnyEvent {
859                 public int type;
860                 public ulong serial;
861                 public bool send_event;
862                 public unowned Display display;
863                 public Window window;
864         }
866         [CCode (cname = "XKeyEvent", has_type_id = false)]
867         public struct KeyEvent {
868                 public int type;
869                 public ulong serial;
870                 public bool send_event;
871                 public unowned Display display;
872                 public Window window;
873                 public Window root;
874                 public Window subwindow;
875                 public ulong time;
876                 public int x;
877                 public int y;
878                 public int x_root;
879                 public int y_root;
880                 public uint state;
881                 public uint keycode;
882                 public bool same_screen;
883         }
885         [CCode (cname = "XButtonEvent", has_type_id = false)]
886         public struct ButtonEvent {
887                 public int type;
888                 public ulong serial;
889                 public bool send_event;
890                 public unowned Display display;
891                 public Window window;
892                 public Window subwindow;
893                 public ulong time;
894                 public int x;
895                 public int y;
896                 public int x_root;
897                 public int y_root;
898                 public uint state;
899                 public uint button;
900                 public bool same_screen;
901         }
903         [CCode (cname = "XMotionEvent", has_type_id = false)]
904         public struct MotionEvent {
905                 public int type;
906                 public ulong serial;
907                 public bool send_event;
908                 public unowned Display display;
909                 public Window window;
910                 public Window subwindow;
911                 public ulong time;
912                 public int x;
913                 public int y;
914                 public int x_root;
915                 public int y_root;
916                 public uint state;
917                 public char is_hint;
918                 public bool same_screen;
919         }
921         [CCode (cname = "XCrossingEvent", has_type_id = false)]
922         public struct CrossingEvent {
923                 public int type;
924                 public ulong serial;
925                 public bool send_event;
926                 public unowned Display display;
927                 public Window window;
928                 public Window root;
929                 public Window subwindow;
930                 public ulong time;
931                 public int x;
932                 public int y;
933                 public int x_root;
934                 public int y_root;
935                 public int mode;
936                 public int detail;
937                 public bool same_screen;
938                 public bool focus;
939                 public uint state;
940         }
942         [CCode (cname = "XFocusChangeEvent", has_type_id = false)]
943         public struct FocusChangeEvent {
944                 public int type;
945                 public ulong serial;
946                 public bool send_event;
947                 public unowned Display display;
948                 public Window window;
949                 public int mode;
950                 public int detail;
951         }
953         [CCode (cname = "XExposeEvent", has_type_id = false)]
954         public struct ExposeEvent {
955                 public int type;
956                 public ulong serial;
957                 public bool send_event;
958                 public unowned Display display;
959                 public Window window;
960                 public int x;
961                 public int y;
962                 public int width;
963                 public int height;
964                 public int count;
965         }
967         [CCode (cname = "XGraphicsExposeEvent", has_type_id = false)]
968         public struct GraphicsExposeEvent {
969                 public int type;
970                 public ulong serial;
971                 public bool send_event;
972                 public unowned Display display;
973                 public Window window;
974                 public int x;
975                 public int y;
976                 public int width;
977                 public int height;
978                 public int count;
979                 public int major_code;
980                 public int minor_code;
981         }
983         [CCode (cname = "XNoExposeEvent", has_type_id = false)]
984         public struct NoExposeEvent {
985                 public int type;
986                 public ulong serial;
987                 public bool send_event;
988                 public unowned Display display;
989                 public Window window;
990                 public int state;
991         }
993         [CCode (cname = "XVisibilityEvent", has_type_id = false)]
994         public struct VisibilityEvent {
995                 public int type;
996                 public ulong serial;
997                 public bool send_event;
998                 public unowned Display display;
999                 public Window window;
1000                 public int state;
1001         }
1003         [CCode (cname = "XCreateWindowEvent", has_type_id = false)]
1004         public struct CreateWindowEvent {
1005                 public int type;
1006                 public ulong serial;
1007                 public bool send_event;
1008                 public unowned Display display;
1009                 public Window parent;
1010                 public Window window;
1011                 public int x;
1012                 public int y;
1013                 public int width;
1014                 public int height;
1015                 public int border_width;
1016                 public bool override_redirect;
1017         }
1019         [CCode (cname = "XDestroyWindowEvent", has_type_id = false)]
1020         public struct DestroyWindowEvent {
1021                 public int type;
1022                 public ulong serial;
1023                 public bool send_event;
1024                 public unowned Display display;
1025                 public Window event;
1026                 public Window window;
1027         }
1029         [CCode (cname = "XUnmapEvent", has_type_id = false)]
1030         public struct UnmapEvent {
1031                 public int type;
1032                 public ulong serial;
1033                 public bool send_event;
1034                 public unowned Display display;
1035                 public Window event;
1036                 public Window window;
1037                 public bool from_configure;
1038         }
1040         [CCode (cname = "XMapEvent", has_type_id = false)]
1041         public struct MapEvent {
1042                 public int type;
1043                 public ulong serial;
1044                 public bool send_event;
1045                 public unowned Display display;
1046                 public Window event;
1047                 public Window window;
1048                 public bool override_redirect;
1049         }
1051         [CCode (cname = "XMapRequestEvent", has_type_id = false)]
1052         public struct MapRequestEvent {
1053                 public int type;
1054                 public ulong serial;
1055                 public bool send_event;
1056                 public unowned Display display;
1057                 public Window parent;
1058                 public Window window;
1059         }
1061         [CCode (cname = "XReparentEvent", has_type_id = false)]
1062         public struct ReparentEvent {
1063                 public int type;
1064                 public ulong serial;
1065                 public bool send_event;
1066                 public unowned Display display;
1067                 public Window event;
1068                 public Window window;
1069                 public Window parent;
1070                 public int x;
1071                 public int y;
1072                 public bool override_redirect;
1073         }
1075         [CCode (cname = "XConfigureEvent", has_type_id = false)]
1076         public struct ConfigureEvent {
1077                 public int type;
1078                 public ulong serial;
1079                 public bool send_event;
1080                 public unowned Display display;
1081                 public Window event;
1082                 public Window window;
1083                 public int x;
1084                 public int y;
1085                 public int width;
1086                 public int height;
1087                 public int border_width;
1088                 public Window above;
1089                 public bool override_redirect;
1090         }
1092         [CCode (cname = "XGravityEvent", has_type_id = false)]
1093         public struct GravityEvent {
1094                 public int type;
1095                 public ulong serial;
1096                 public bool send_event;
1097                 public unowned Display display;
1098                 public Window event;
1099                 public Window window;
1100                 public int x;
1101                 public int y;
1102         }
1104         [CCode (cname = "XResizeRequestEvent", has_type_id = false)]
1105         public struct ResizeRequestEvent {
1106                 public int type;
1107                 public ulong serial;
1108                 public bool send_event;
1109                 public unowned Display display;
1110                 public Window window;
1111                 public int width;
1112                 public int height;
1113         }
1115         [CCode (cname = "XConfigureRequestEvent", has_type_id = false)]
1116         public struct ConfigureRequestEvent {
1117                 public int type;
1118                 public ulong serial;
1119                 public bool send_event;
1120                 public unowned Display display;
1121                 public Window parent;
1122                 public Window window;
1123                 public int x;
1124                 public int y;
1125                 public int width;
1126                 public int height;
1127                 public int border_width;
1128                 public Window above;
1129                 public int detail;
1130                 public ulong value_mask;
1131         }
1133         [CCode (cname = "XCirculateEvent", has_type_id = false)]
1134         public struct CirculateEvent {
1135                 public int type;
1136                 public ulong serial;
1137                 public bool send_event;
1138                 public unowned Display display;
1139                 public Window event;
1140                 public Window window;
1141                 public int place;
1142         }
1144         [CCode (cname = "XCirculateRequestEvent", has_type_id = false)]
1145         public struct CirculateRequestEvent {
1146                 public int type;
1147                 public ulong serial;
1148                 public bool send_event;
1149                 public unowned Display display;
1150                 public Window parent;
1151                 public Window window;
1152                 public int place;
1153         }
1155         [CCode (cname = "XPropertyEvent", has_type_id = false)]
1156         public struct PropertyEvent {
1157                 public int type;
1158                 public ulong serial;
1159                 public bool send_event;
1160                 public unowned Display display;
1161                 public Window window;
1162                 public Atom atom;
1163                 public ulong time;
1164                 public int state;
1165         }
1167         [CCode (cname = "XSelectionClearEvent", has_type_id = false)]
1168         public struct SelectionClearEvent {
1169                 public int type;
1170                 public ulong serial;
1171                 public bool send_event;
1172                 public unowned Display display;
1173                 public Window window;
1174                 public Atom selection;
1175                 public ulong time;
1176         }
1178         [CCode (cname = "XSelectionRequestEvent", has_type_id = false)]
1179         public struct SelectionRequestEvent {
1180                 public int type;
1181                 public ulong serial;
1182                 public bool send_event;
1183                 public unowned Display display;
1184                 public Window owner;
1185                 public Window requestor;
1186                 public Atom selection;
1187                 public Atom target;
1188                 public Atom property;
1189                 public ulong time;
1190         }
1192         [CCode (cname = "XSelectionEvent", has_type_id = false)]
1193         public struct SelectionEvent {
1194                 public int type;
1195                 public ulong serial;
1196                 public bool send_event;
1197                 public unowned Display display;
1198                 public Window requestor;
1199                 public Atom selection;
1200                 public Atom target;
1201                 public Atom property;
1202                 public ulong time;
1203         }
1205         [CCode (cname = "XColormapEvent", has_type_id = false)]
1206         public struct ColormapEvent {
1207                 public int type;
1208                 public ulong serial;
1209                 public bool send_event;
1210                 public unowned Display display;
1211                 public Window window;
1212                 public Colormap colormap;
1213                 public bool @new;
1214                 public int state;
1215         }
1217         [CCode (cname = "XClientMessageEvent", has_type_id = false)]
1218         public struct ClientMessageEvent {
1219                 public int type;
1220                 public ulong serial;    /* # of last request processed by server */
1221                 public bool send_event; /* true if this came from a SendEvent request */
1222                 public unowned Display display; /* Display the event was read from */
1223                 public Window window;
1224                 public Atom message_type;
1225                 public int format;
1226                 public ClientMessageEventData data;
1227         }
1229         [CCode (cname = "XMappingEvent", has_type_id = false)]
1230         public struct MappingEvent {
1231                 public int type;
1232                 public ulong serial;
1233                 public bool send_event;
1234                 public unowned Display display;
1235                 public Window window;
1236                 public int request;
1237                 public int first_keycode;
1238                 public int count;
1239         }
1241         [CCode (cname = "XErrorEvent", has_type_id = false)]
1242         public struct ErrorEvent {
1243                 public int type;
1244                 public unowned Display display;
1245                 public ID resourceid;
1246                 public ulong serial;
1247                 public uchar error_code;
1248                 public uchar request_code;
1249                 public uchar minor_code;
1250         }
1252         [CCode (cname = "XKeymapEvent", has_type_id = false)]
1253         public struct KeymapEvent {
1254                 public int type;
1255                 public ulong serial;
1256                 public bool send_event;
1257                 public unowned Display display;
1258                 public Window window;
1259                 public unowned char[] key_vector;
1260         }
1262         [CCode (cname = "XGenericEvent", has_type_id = false)]
1263         public struct GenericEvent {
1264                 public int type;
1265                 public ulong serial;
1266                 public bool send_event;
1267                 public unowned Display display;
1268                 public int extension;
1269                 public int evtype;
1270         }
1272         [CCode (cname = "XGenericEventCookie", has_type_id = false)]
1273         public struct GenericEventCookie {
1274                 public int type;
1275                 public ulong serial;
1276                 public bool send_event;
1277                 public unowned Display display;
1278                 public int extension;
1279                 public int evtype;
1280                 public uint cookie;
1281                 public void *data;
1282         }
1284         [CCode (cname = "RECTANGLE", has_type_id = false, has_type_id = false)]
1285         public struct Rectangle {
1286                 public short x;
1287                 public short y;
1288                 public short width;
1289                 public short height;
1290         }
1292         // union
1293         public struct ClientMessageEventData {
1294                 public unowned char[] b;
1295                 public unowned short[] s;
1296                 public unowned long[] l;
1297         }
1299         [CCode (cprefix = "Queued", has_type_id = false)]
1300         public enum QueuedMode {
1301                 Already,
1302                 AfterFlush,
1303                 AfterReading
1304         }
1306         [CCode (cprefix = "PropMode", has_type_id = false)]
1307         public enum PropMode {
1308                 Replace,
1309                 Prepend,
1310                 Append
1311         }
1313         [CCode (cprefix = "", has_type_id = false)]
1314         public enum AllowEventsMode {
1315                 AsyncPointer,
1316                 SyncPointer,
1317                 ReplayPointer,
1318                 AsyncKeyboard,
1319                 SyncKeyboard,
1320                 ReplayKeyboard,
1321                 AsyncBoth,
1322                 SyncBoth
1323         }
1325         [CCode (cprefix = "", has_type_id = false)]
1326         public enum MapState {
1327                 IsUnmapped,
1328                 IsUnviewable,
1329                 IsViewable
1330         }
1332         [CCode (cprefix = "RevertTo", has_type_id = false)]
1333         public enum RevertTo {
1334                 None,
1335                 PointerRoot,
1336                 Parent
1337         }
1339         [Compact]
1340         [CCode (cname = "Screen")]
1341         public class Screen {
1342                 public Display display;
1343                 public Window root;
1344                 public int width;
1345                 public int height;
1347                 [CCode (cname = "ScreenOfDisplay")]
1348                 public static unowned Screen get_screen (Display disp, int screen_number);
1350                 [CCode (cname = "BlackPixelOfScreen")]
1351                 public ulong black_pixel_of_screen ();
1353                 [CCode (cname = "CellsOfScreen")]
1354                 public int cells_of_screen ();
1356                 [CCode (cname = "DefaultColormapOfScreen")]
1357                 public Colormap default_colormap_of_screen ();
1359                 [CCode (cname = "DefaultDepthOfScreen")]
1360                 public int default_depth_of_screen ();
1362                 [CCode (cname = "DefaultGCOfScreen")]
1363                 public GC default_gc_of_screen ();
1365                 [CCode (cname = "DefaultVisualOfScreen")]
1366                 public Visual default_visual_of_screen ();
1368                 [CCode (cname = "DisplayOfScreen")]
1369                 public unowned Display display_of_screen ();
1371                 [CCode (cname = "DoesBackingStore")]
1372                 public int does_backing_store ();
1374                 [CCode (cname = "DoesSaveUnders")]
1375                 public bool does_save_unders ();
1377                 [CCode (cname = "EventMaskOfScreen")]
1378                 public long event_mask_of_Screen ();
1380                 [CCode (cname = "HeightMMOfScreen")]
1381                 public int height_in_mm_of_screen ();
1383                 [CCode (cname = "HeightOfScreen")]
1384                 public int height_of_screen ();
1386                 [CCode (cname = "MaxCmapsOfScreen")]
1387                 public int max_colormaps_of_screen ();
1389                 [CCode (cname = "MinCmapsOfScreen")]
1390                 public int min_colormaps_of_screen ();
1392                 [CCode (cname = "PlanesOfScreen")]
1393                 public int planes_of_screen ();
1395                 [CCode (cname = "RootWindowOfScreen")]
1396                 public Window root_window_of_screen ();
1398                 [CCode (cname = "ScreenNumberOfScreen")]
1399                 public int screen_number_of_screen ();
1401                 [CCode (cname = "WhitePixelOfScreen")]
1402                 public ulong white_pixel_of_screen ();
1404                 [CCode (cname = "WidthMMOfScreen")]
1405                 public int width_in_mm_of_screen ();
1407                 [CCode (cname = "WidthOfScreen")]
1408                 public int width_of_screen ();
1409         }
1411         public const X.ID None;
1413         public const X.Atom XA_PRIMARY;
1414         public const X.Atom XA_SECONDARY;
1415         public const X.Atom XA_ARC;
1416         public const X.Atom XA_ATOM;
1417         public const X.Atom XA_BITMAP;
1418         public const X.Atom XA_CARDINAL;
1419         public const X.Atom XA_COLORMAP;
1420         public const X.Atom XA_CURSOR;
1421         public const X.Atom XA_CUT_BUFFER0;
1422         public const X.Atom XA_CUT_BUFFER1;
1423         public const X.Atom XA_CUT_BUFFER2;
1424         public const X.Atom XA_CUT_BUFFER3;
1425         public const X.Atom XA_CUT_BUFFER4;
1426         public const X.Atom XA_CUT_BUFFER5;
1427         public const X.Atom XA_CUT_BUFFER6;
1428         public const X.Atom XA_CUT_BUFFER7;
1429         public const X.Atom XA_DRAWABLE;
1430         public const X.Atom XA_FONT;
1431         public const X.Atom XA_INTEGER;
1432         public const X.Atom XA_PIXMAP;
1433         public const X.Atom XA_POINT;
1434         public const X.Atom XA_RECTANGLE;
1435         public const X.Atom XA_RESOURCE_MANAGER;
1436         public const X.Atom XA_RGB_COLOR_MAP;
1437         public const X.Atom XA_RGB_BEST_MAP;
1438         public const X.Atom XA_RGB_BLUE_MAP;
1439         public const X.Atom XA_RGB_DEFAULT_MAP;
1440         public const X.Atom XA_RGB_GRAY_MAP;
1441         public const X.Atom XA_RGB_GREEN_MAP;
1442         public const X.Atom XA_RGB_RED_MAP;
1443         public const X.Atom XA_STRING;
1444         public const X.Atom XA_VISUALID;
1445         public const X.Atom XA_WINDOW;
1446         public const X.Atom XA_WM_COMMAND;
1447         public const X.Atom XA_WM_HINTS;
1448         public const X.Atom XA_WM_CLIENT_MACHINE;
1449         public const X.Atom XA_WM_ICON_NAME;
1450         public const X.Atom XA_WM_ICON_SIZE;
1451         public const X.Atom XA_WM_NAME;
1452         public const X.Atom XA_WM_NORMAL_HINTS;
1453         public const X.Atom XA_WM_SIZE_HINTS;
1454         public const X.Atom XA_WM_ZOOM_HINTS;
1455         public const X.Atom XA_MIN_SPACE;
1456         public const X.Atom XA_NORM_SPACE;
1457         public const X.Atom XA_MAX_SPACE;
1458         public const X.Atom XA_END_SPACE;
1459         public const X.Atom XA_SUPERSCRIPT_X;
1460         public const X.Atom XA_SUPERSCRIPT_Y;
1461         public const X.Atom XA_SUBSCRIPT_X;
1462         public const X.Atom XA_SUBSCRIPT_Y;
1463         public const X.Atom XA_UNDERLINE_POSITION;
1464         public const X.Atom XA_UNDERLINE_THICKNESS;
1465         public const X.Atom XA_STRIKEOUT_ASCENT;
1466         public const X.Atom XA_STRIKEOUT_DESCENT;
1467         public const X.Atom XA_ITALIC_ANGLE;
1468         public const X.Atom XA_X_HEIGHT;
1469         public const X.Atom XA_QUAD_WIDTH;
1470         public const X.Atom XA_WEIGHT;
1471         public const X.Atom XA_POINT_SIZE;
1472         public const X.Atom XA_RESOLUTION;
1473         public const X.Atom XA_COPYRIGHT;
1474         public const X.Atom XA_NOTICE;
1475         public const X.Atom XA_FONT_NAME;
1476         public const X.Atom XA_FAMILY_NAME;
1477         public const X.Atom XA_FULL_NAME;
1478         public const X.Atom XA_CAP_HEIGHT;
1479         public const X.Atom XA_WM_CLASS;
1480         public const X.Atom XA_WM_TRANSIENT_FOR;
1482         public const uint XK_Num_Lock;
1483         public const uint XK_Scroll_Lock;
1484         public const uint XK_Super_L;
1485         public const uint XK_Super_R;
1487         [CCode (cname = "XStringToKeysym")]
1488         public ulong string_to_keysym (string key);
1490         [CCode (cname = "XKeysymToString")]
1491         public unowned string keysym_to_string (ulong keysym);
1493         [CCode (cname = "XConvertCase")]
1494         public void convert_case (ulong keysym, out ulong lower_return, out ulong upper_return);