Mx support.
[girtod.git] / gtk2 / gdk2.d
blobf275fed1c2b2439f76aa3b12bee40c6a33a91b2c
1 // *** DO NOT EDIT ***
2 // Automatically generated from "/usr/share/gir-1.0/Gdk-2.0.gir"
4 module Gdk2;
5 public import gtk2.glib2;
6 alias gtk2.glib2 GLib2;
7 public import gtk2.gmodule2;
8 alias gtk2.gmodule2 GModule2;
9 public import gtk2.gobject2;
10 alias gtk2.gobject2 GObject2;
11 public import gtk2.gdkpixbuf2;
12 alias gtk2.gdkpixbuf2 GdkPixbuf2;
13 public import gtk2.gio2;
14 alias gtk2.gio2 Gio2;
15 public import gtk2.pango;
16 alias gtk2.pango Pango;
17 public import gtk2.cairo;
18 alias gtk2.cairo cairo;
20 // c:symbol-prefixes: ["gdk"]
21 // c:identifier-prefixes: ["Gdk"]
23 // module Gdk2;
25 alias uint NativeWindow;
26 alias Atom Selection;
27 alias Atom SelectionType;
28 alias Atom Target;
29 alias uint WChar;
30 alias void* XEvent;
31 struct AppLaunchContext /* : Gio.AppLaunchContext */ {
32 alias parent_instance this;
33 alias parent_instance super_;
34 alias parent_instance applaunchcontext;
35 Gio2.AppLaunchContext parent_instance;
36 AppLaunchContextPrivate* priv;
39 // VERSION: 2.14
40 // Creates a new #GdkAppLaunchContext.
41 // RETURNS: a new #GdkAppLaunchContext
42 static AppLaunchContext* /*new*/ new_()() {
43 return gdk_app_launch_context_new();
46 // VERSION: 2.14
47 // Sets the workspace on which applications will be launched when
48 // using this context when running under a window manager that
49 // supports multiple workspaces, as described in the
50 // <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
51 // Window Manager Hints</ulink>.
52 // When the workspace is not specified or @desktop is set to -1,
53 // it is up to the window manager to pick one, typically it will
54 // be the current workspace.
55 // <desktop>: the number of a workspace, or -1
56 void set_desktop()(int desktop) {
57 gdk_app_launch_context_set_desktop(&this, desktop);
60 // VERSION: 2.14
61 // Sets the display on which applications will be launched when
62 // using this context. See also gdk_app_launch_context_set_screen().
63 // <display>: a #GdkDisplay
64 void set_display()(Display* display) {
65 gdk_app_launch_context_set_display(&this, display);
68 // VERSION: 2.14
69 // Sets the icon for applications that are launched with this
70 // context.
71 // Window Managers can use this information when displaying startup
72 // notification.
73 // See also gdk_app_launch_context_set_icon_name().
74 // <icon>: a #GIcon, or %NULL
75 void set_icon()(Gio2.Icon* icon=null) {
76 gdk_app_launch_context_set_icon(&this, icon);
79 // VERSION: 2.14
80 // Sets the icon for applications that are launched with this context.
81 // The @icon_name will be interpreted in the same way as the Icon field
82 // in desktop files. See also gdk_app_launch_context_set_icon().
83 // If both @icon and @icon_name are set, the @icon_name takes priority.
84 // If neither @icon or @icon_name is set, the icon is taken from either
85 // the file that is passed to launched application or from the #GAppInfo
86 // for the launched application itself.
87 // <icon_name>: an icon name, or %NULL
88 void set_icon_name()(char* icon_name=null) {
89 gdk_app_launch_context_set_icon_name(&this, icon_name);
92 // VERSION: 2.14
93 // Sets the screen on which applications will be launched when
94 // using this context. See also gdk_app_launch_context_set_display().
95 // If both @screen and @display are set, the @screen takes priority.
96 // If neither @screen or @display are set, the default screen and
97 // display are used.
98 // <screen>: a #GdkScreen
99 void set_screen()(Screen* screen) {
100 gdk_app_launch_context_set_screen(&this, screen);
103 // VERSION: 2.14
104 // Sets the timestamp of @context. The timestamp should ideally
105 // be taken from the event that triggered the launch.
106 // Window managers can use this information to avoid moving the
107 // focus to the newly launched application when the user is busy
108 // typing in another window. This is also known as 'focus stealing
109 // prevention'.
110 // <timestamp>: a timestamp
111 void set_timestamp()(uint timestamp) {
112 gdk_app_launch_context_set_timestamp(&this, timestamp);
116 struct AppLaunchContextClass {
117 Gio2.AppLaunchContextClass parent_class;
120 struct AppLaunchContextPrivate {
123 struct Atom {
126 enum AxisUse {
127 IGNORE = 0,
128 X = 1,
129 Y = 2,
130 PRESSURE = 3,
131 XTILT = 4,
132 YTILT = 5,
133 WHEEL = 6,
134 LAST = 7
136 struct Bitmap {
139 enum ByteOrder {
140 LSB_FIRST = 0,
141 MSB_FIRST = 1
143 enum int CURRENT_TIME = 0;
144 enum CapStyle {
145 NOT_LAST = 0,
146 BUTT = 1,
147 ROUND = 2,
148 PROJECTING = 3
150 struct Color {
151 uint pixel;
152 ushort red, green, blue;
155 // Makes a copy of a color structure. The result
156 // must be freed using gdk_color_free().
157 // RETURNS: a copy of @color.
158 Color* /*new*/ copy()() {
159 return gdk_color_copy(&this);
162 // Compares two colors.
163 // RETURNS: %TRUE if the two colors compare equal
164 // <colorb>: another #GdkColor.
165 int equal()(Color* colorb) {
166 return gdk_color_equal(&this, colorb);
169 // Frees a color structure created with
170 // gdk_color_copy().
171 void free()() {
172 gdk_color_free(&this);
175 // A hash function suitable for using for a hash
176 // table that stores #GdkColor's.
177 // RETURNS: The hash function applied to @colora
178 uint hash()() {
179 return gdk_color_hash(&this);
182 // VERSION: 2.12
183 // Returns a textual specification of @color in the hexadecimal form
184 // <literal>&num;rrrrggggbbbb</literal>, where <literal>r</literal>,
185 // <literal>g</literal> and <literal>b</literal> are hex digits
186 // representing the red, green and blue components respectively.
187 // RETURNS: a newly-allocated text string
188 char* /*new*/ to_string()() {
189 return gdk_color_to_string(&this);
193 struct Colormap /* : GObject.Object */ {
194 alias parent_instance this;
195 alias parent_instance super_;
196 alias parent_instance object;
197 GObject2.Object parent_instance;
198 int size;
199 Color* colors;
200 private Visual* visual;
201 private void* windowing_data;
204 // Creates a new colormap for the given visual.
205 // RETURNS: the new #GdkColormap.
206 // <visual>: a #GdkVisual.
207 // <allocate>: if %TRUE, the newly created colormap will be a private colormap, and all colors in it will be allocated for the applications use.
208 static Colormap* /*new*/ new_()(Visual* visual, int allocate) {
209 return gdk_colormap_new(visual, allocate);
212 // Unintrospectable function: get_system() / gdk_colormap_get_system()
213 // Gets the system's default colormap for the default screen. (See
214 // gdk_colormap_get_system_for_screen ())
215 // RETURNS: the default colormap.
216 static Colormap* get_system()() {
217 return gdk_colormap_get_system();
220 // Returns the size of the system's default colormap.
221 // (See the description of struct #GdkColormap for an
222 // explanation of the size of a colormap.)
223 // RETURNS: the size of the system's default colormap.
224 static int get_system_size()() {
225 return gdk_colormap_get_system_size();
228 // Allocates a single color from a colormap.
229 // RETURNS: %TRUE if the allocation succeeded.
230 // <color>: the color to allocate. On return the <structfield>pixel</structfield> field will be filled in if allocation succeeds.
231 // <writeable>: If %TRUE, the color is allocated writeable (their values can later be changed using gdk_color_change()). Writeable colors cannot be shared between applications.
232 // <best_match>: If %TRUE, GDK will attempt to do matching against existing colors if the color cannot be allocated as requested.
233 int alloc_color()(Color* color, int writeable, int best_match) {
234 return gdk_colormap_alloc_color(&this, color, writeable, best_match);
237 // Allocates colors from a colormap.
238 // allocated.
239 // RETURNS: The number of colors that were not successfully
240 // <colors>: The color values to allocate. On return, the pixel values for allocated colors will be filled in.
241 // <n_colors>: The number of colors in @colors.
242 // <writeable>: If %TRUE, the colors are allocated writeable (their values can later be changed using gdk_color_change()). Writeable colors cannot be shared between applications.
243 // <best_match>: If %TRUE, GDK will attempt to do matching against existing colors if the colors cannot be allocated as requested.
244 // <success>: An array of length @ncolors. On return, this indicates whether the corresponding color in @colors was successfully allocated or not.
245 int alloc_colors()(Color* colors, int n_colors, int writeable, int best_match, int* success) {
246 return gdk_colormap_alloc_colors(&this, colors, n_colors, writeable, best_match, success);
249 // Changes the value of the first @ncolors in a private colormap
250 // to match the values in the <structfield>colors</structfield>
251 // array in the colormap. This function is obsolete and
252 // should not be used. See gdk_color_change().
253 // <ncolors>: the number of colors to change.
254 void change()(int ncolors) {
255 gdk_colormap_change(&this, ncolors);
258 // Frees previously allocated colors.
259 // <colors>: the colors to free.
260 // <n_colors>: the number of colors in @colors.
261 void free_colors()(Color* colors, int n_colors) {
262 gdk_colormap_free_colors(&this, colors, n_colors);
265 // Unintrospectable method: get_screen() / gdk_colormap_get_screen()
266 // VERSION: 2.2
267 // Gets the screen for which this colormap was created.
268 // RETURNS: the screen for which this colormap was created.
269 Screen* get_screen()() {
270 return gdk_colormap_get_screen(&this);
273 // Unintrospectable method: get_visual() / gdk_colormap_get_visual()
274 // Returns the visual for which a given colormap was created.
275 // RETURNS: the visual of the colormap.
276 Visual* get_visual()() {
277 return gdk_colormap_get_visual(&this);
280 // Locates the RGB color in @colormap corresponding to the given
281 // hardware pixel @pixel. @pixel must be a valid pixel in the
282 // colormap; it's a programmer error to call this function with a
283 // pixel which is not in the colormap. Hardware pixels are normally
284 // obtained from gdk_colormap_alloc_colors(), or from a #GdkImage. (A
285 // #GdkImage contains image data in hardware format, a #GdkPixbuf
286 // contains image data in a canonical 24-bit RGB format.)
287 // This function is rarely useful; it's used for example to
288 // implement the eyedropper feature in #GtkColorSelection.
289 // <pixel>: pixel value in hardware display format
290 // <result>: #GdkColor with red, green, blue fields initialized
291 void query_color()(c_ulong pixel, Color* result) {
292 gdk_colormap_query_color(&this, pixel, result);
295 // Unintrospectable method: ref() / gdk_colormap_ref()
296 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
297 // Deprecated function; use g_object_ref() instead.
298 // RETURNS: the colormap
299 Colormap* ref_()() {
300 return gdk_colormap_ref(&this);
303 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
304 // Deprecated function; use g_object_unref() instead.
305 void unref()() {
306 gdk_colormap_unref(&this);
310 struct ColormapClass {
311 GObject2.ObjectClass parent_class;
314 enum CrossingMode {
315 NORMAL = 0,
316 GRAB = 1,
317 UNGRAB = 2,
318 GTK_GRAB = 3,
319 GTK_UNGRAB = 4,
320 STATE_CHANGED = 5
322 struct Cursor {
323 CursorType type;
324 private uint ref_count;
327 // Creates a new cursor from the set of builtin cursors for the default display.
328 // See gdk_cursor_new_for_display().
329 // To make the cursor invisible, use %GDK_BLANK_CURSOR.
330 // RETURNS: a new #GdkCursor
331 // <cursor_type>: cursor to create
332 static Cursor* /*new*/ new_()(CursorType cursor_type) {
333 return gdk_cursor_new(cursor_type);
336 // VERSION: 2.2
337 // Creates a new cursor from the set of builtin cursors.
338 // Some useful ones are:
339 // <itemizedlist>
340 // <listitem><para>
341 // <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic> #GDK_RIGHT_PTR (right-facing arrow)
342 // </para></listitem>
343 // <listitem><para>
344 // <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic> #GDK_CROSSHAIR (crosshair)
345 // </para></listitem>
346 // <listitem><para>
347 // <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic> #GDK_XTERM (I-beam)
348 // </para></listitem>
349 // <listitem><para>
350 // <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic> #GDK_WATCH (busy)
351 // </para></listitem>
352 // <listitem><para>
353 // <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic> #GDK_FLEUR (for moving objects)
354 // </para></listitem>
355 // <listitem><para>
356 // <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic> #GDK_HAND1 (a right-pointing hand)
357 // </para></listitem>
358 // <listitem><para>
359 // <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic> #GDK_HAND2 (a left-pointing hand)
360 // </para></listitem>
361 // <listitem><para>
362 // <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic> #GDK_LEFT_SIDE (resize left side)
363 // </para></listitem>
364 // <listitem><para>
365 // <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic> #GDK_RIGHT_SIDE (resize right side)
366 // </para></listitem>
367 // <listitem><para>
368 // <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic> #GDK_TOP_LEFT_CORNER (resize northwest corner)
369 // </para></listitem>
370 // <listitem><para>
371 // <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic> #GDK_TOP_RIGHT_CORNER (resize northeast corner)
372 // </para></listitem>
373 // <listitem><para>
374 // <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic> #GDK_BOTTOM_LEFT_CORNER (resize southwest corner)
375 // </para></listitem>
376 // <listitem><para>
377 // <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic> #GDK_BOTTOM_RIGHT_CORNER (resize southeast corner)
378 // </para></listitem>
379 // <listitem><para>
380 // <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic> #GDK_TOP_SIDE (resize top side)
381 // </para></listitem>
382 // <listitem><para>
383 // <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic> #GDK_BOTTOM_SIDE (resize bottom side)
384 // </para></listitem>
385 // <listitem><para>
386 // <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic> #GDK_SB_H_DOUBLE_ARROW (move vertical splitter)
387 // </para></listitem>
388 // <listitem><para>
389 // <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic> #GDK_SB_V_DOUBLE_ARROW (move horizontal splitter)
390 // </para></listitem>
391 // <listitem><para>
392 // #GDK_BLANK_CURSOR (Blank cursor). Since 2.16
393 // </para></listitem>
394 // </itemizedlist>
395 // RETURNS: a new #GdkCursor
396 // <display>: the #GdkDisplay for which the cursor will be created
397 // <cursor_type>: cursor to create
398 static Cursor* /*new*/ new_for_display()(Display* display, CursorType cursor_type) {
399 return gdk_cursor_new_for_display(display, cursor_type);
402 // VERSION: 2.8
403 // Creates a new cursor by looking up @name in the current cursor
404 // theme.
405 // the given name
406 // RETURNS: a new #GdkCursor, or %NULL if there is no cursor with
407 // <display>: the #GdkDisplay for which the cursor will be created
408 // <name>: the name of the cursor
409 static Cursor* /*new*/ new_from_name()(Display* display, char* name) {
410 return gdk_cursor_new_from_name(display, name);
413 // VERSION: 2.4
414 // Creates a new cursor from a pixbuf.
415 // Not all GDK backends support RGBA cursors. If they are not
416 // supported, a monochrome approximation will be displayed.
417 // The functions gdk_display_supports_cursor_alpha() and
418 // gdk_display_supports_cursor_color() can be used to determine
419 // whether RGBA cursors are supported;
420 // gdk_display_get_default_cursor_size() and
421 // gdk_display_get_maximal_cursor_size() give information about
422 // cursor sizes.
423 // If @x or @y are <literal>-1</literal>, the pixbuf must have
424 // options named "x_hot" and "y_hot", resp., containing
425 // integer values between %0 and the width resp. height of
426 // On the X backend, support for RGBA cursors requires a
427 // sufficently new version of the X Render extension.
428 // RETURNS: a new #GdkCursor.
429 // <display>: the #GdkDisplay for which the cursor will be created
430 // <pixbuf>: the #GdkPixbuf containing the cursor image
431 // <x>: the horizontal offset of the 'hotspot' of the cursor.
432 // <y>: the vertical offset of the 'hotspot' of the cursor.
433 static Cursor* /*new*/ new_from_pixbuf()(Display* display, GdkPixbuf2.Pixbuf* pixbuf, int x, int y) {
434 return gdk_cursor_new_from_pixbuf(display, pixbuf, x, y);
437 // Creates a new cursor from a given pixmap and mask. Both the pixmap and mask
438 // must have a depth of 1 (i.e. each pixel has only 2 values - on or off).
439 // The standard cursor size is 16 by 16 pixels. You can create a bitmap
440 // from inline data as in the below example.
441 // <example><title>Creating a custom cursor</title>
442 // <programlisting>
443 // /<!-- -->* This data is in X bitmap format, and can be created with the 'bitmap'
444 // utility. *<!-- -->/
445 // &num;define cursor1_width 16
446 // &num;define cursor1_height 16
447 // static unsigned char cursor1_bits[] = {
448 // 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
449 // 0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
450 // 0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01};
451 // static unsigned char cursor1mask_bits[] = {
452 // 0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31,
453 // 0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18,
454 // 0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01};
455 // GdkCursor *cursor;
456 // GdkPixmap *source, *mask;
457 // GdkColor fg = { 0, 65535, 0, 0 }; /<!-- -->* Red. *<!-- -->/
458 // GdkColor bg = { 0, 0, 0, 65535 }; /<!-- -->* Blue. *<!-- -->/
459 // source = gdk_bitmap_create_from_data (NULL, cursor1_bits,
460 // cursor1_width, cursor1_height);
461 // mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
462 // cursor1_width, cursor1_height);
463 // cursor = gdk_cursor_new_from_pixmap (source, mask, &amp;fg, &amp;bg, 8, 8);
464 // g_object_unref (source);
465 // g_object_unref (mask);
466 // gdk_window_set_cursor (widget->window, cursor);
467 // </programlisting>
468 // </example>
469 // RETURNS: a new #GdkCursor.
470 // <source>: the pixmap specifying the cursor.
471 // <mask>: the pixmap specifying the mask, which must be the same size as
472 // <fg>: the foreground color, used for the bits in the source which are 1. The color does not have to be allocated first.
473 // <bg>: the background color, used for the bits in the source which are 0. The color does not have to be allocated first.
474 // <x>: the horizontal offset of the 'hotspot' of the cursor.
475 // <y>: the vertical offset of the 'hotspot' of the cursor.
476 static Cursor* /*new*/ new_from_pixmap()(Pixmap* source, Pixmap* mask, Color* fg, Color* bg, int x, int y) {
477 return gdk_cursor_new_from_pixmap(source, mask, fg, bg, x, y);
480 // VERSION: 2.22
481 // Returns the cursor type for this cursor.
482 // RETURNS: a #GdkCursorType
483 CursorType get_cursor_type()() {
484 return gdk_cursor_get_cursor_type(&this);
487 // Unintrospectable method: get_display() / gdk_cursor_get_display()
488 // VERSION: 2.2
489 // Returns the display on which the #GdkCursor is defined.
490 // RETURNS: the #GdkDisplay associated to @cursor
491 Display* get_display()() {
492 return gdk_cursor_get_display(&this);
495 // Unintrospectable method: get_image() / gdk_cursor_get_image()
496 // VERSION: 2.8
497 // Returns a #GdkPixbuf with the image used to display the cursor.
498 // Note that depending on the capabilities of the windowing system and
499 // on the cursor, GDK may not be able to obtain the image data. In this
500 // case, %NULL is returned.
501 // RETURNS: a #GdkPixbuf representing @cursor, or %NULL
502 GdkPixbuf2.Pixbuf* get_image()() {
503 return gdk_cursor_get_image(&this);
506 // Adds a reference to @cursor.
507 // RETURNS: Same @cursor that was passed in
508 Cursor* /*new*/ ref_()() {
509 return gdk_cursor_ref(&this);
512 // Removes a reference from @cursor, deallocating the cursor
513 // if no references remain.
514 void unref()() {
515 gdk_cursor_unref(&this);
519 enum CursorType {
520 X_CURSOR = 0,
521 ARROW = 2,
522 BASED_ARROW_DOWN = 4,
523 BASED_ARROW_UP = 6,
524 BOAT = 8,
525 BOGOSITY = 10,
526 BOTTOM_LEFT_CORNER = 12,
527 BOTTOM_RIGHT_CORNER = 14,
528 BOTTOM_SIDE = 16,
529 BOTTOM_TEE = 18,
530 BOX_SPIRAL = 20,
531 CENTER_PTR = 22,
532 CIRCLE = 24,
533 CLOCK = 26,
534 COFFEE_MUG = 28,
535 CROSS = 30,
536 CROSS_REVERSE = 32,
537 CROSSHAIR = 34,
538 DIAMOND_CROSS = 36,
539 DOT = 38,
540 DOTBOX = 40,
541 DOUBLE_ARROW = 42,
542 DRAFT_LARGE = 44,
543 DRAFT_SMALL = 46,
544 DRAPED_BOX = 48,
545 EXCHANGE = 50,
546 FLEUR = 52,
547 GOBBLER = 54,
548 GUMBY = 56,
549 HAND1 = 58,
550 HAND2 = 60,
551 HEART = 62,
552 ICON = 64,
553 IRON_CROSS = 66,
554 LEFT_PTR = 68,
555 LEFT_SIDE = 70,
556 LEFT_TEE = 72,
557 LEFTBUTTON = 74,
558 LL_ANGLE = 76,
559 LR_ANGLE = 78,
560 MAN = 80,
561 MIDDLEBUTTON = 82,
562 MOUSE = 84,
563 PENCIL = 86,
564 PIRATE = 88,
565 PLUS = 90,
566 QUESTION_ARROW = 92,
567 RIGHT_PTR = 94,
568 RIGHT_SIDE = 96,
569 RIGHT_TEE = 98,
570 RIGHTBUTTON = 100,
571 RTL_LOGO = 102,
572 SAILBOAT = 104,
573 SB_DOWN_ARROW = 106,
574 SB_H_DOUBLE_ARROW = 108,
575 SB_LEFT_ARROW = 110,
576 SB_RIGHT_ARROW = 112,
577 SB_UP_ARROW = 114,
578 SB_V_DOUBLE_ARROW = 116,
579 SHUTTLE = 118,
580 SIZING = 120,
581 SPIDER = 122,
582 SPRAYCAN = 124,
583 STAR = 126,
584 TARGET = 128,
585 TCROSS = 130,
586 TOP_LEFT_ARROW = 132,
587 TOP_LEFT_CORNER = 134,
588 TOP_RIGHT_CORNER = 136,
589 TOP_SIDE = 138,
590 TOP_TEE = 140,
591 TREK = 142,
592 UL_ANGLE = 144,
593 UMBRELLA = 146,
594 UR_ANGLE = 148,
595 WATCH = 150,
596 XTERM = 152,
597 LAST_CURSOR = 153,
598 BLANK_CURSOR = -2,
599 CURSOR_IS_PIXMAP = -1
601 extern (C) alias void function (void* data) DestroyNotify;
603 struct Device /* : GObject.Object */ {
604 alias parent_instance this;
605 alias parent_instance super_;
606 alias parent_instance object;
607 GObject2.Object parent_instance;
608 char* name;
609 InputSource source;
610 InputMode mode;
611 int has_cursor;
612 int num_axes;
613 DeviceAxis* axes;
614 int num_keys;
615 DeviceKey* keys;
618 // Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
619 // <events>: an array of #GdkTimeCoord.
620 // <n_events>: the length of the array.
621 static void free_history()(/*inout*/ TimeCoord** events, int n_events) {
622 gdk_device_free_history(events, n_events);
625 // Unintrospectable function: get_core_pointer() / gdk_device_get_core_pointer()
626 // Returns the core pointer device for the default display.
627 // display and should not be freed.
628 // RETURNS: the core pointer device; this is owned by the
629 static Device* get_core_pointer()() {
630 return gdk_device_get_core_pointer();
633 // Interprets an array of double as axis values for a given device,
634 // and locates the value in the array for a given axis use.
635 // RETURNS: %TRUE if the given axis use was found, otherwise %FALSE
636 // <axes>: pointer to an array of axes
637 // <use>: the use to look for
638 // <value>: location to store the found value.
639 int get_axis()(double* axes, AxisUse use, double* value) {
640 return gdk_device_get_axis(&this, axes, use, value);
643 // VERSION: 2.22
644 // Returns the axis use for @index.
645 // RETURNS: a #GdkAxisUse specifying how the axis is used.
646 // <index>: the index of the axis.
647 AxisUse get_axis_use()(uint index) {
648 return gdk_device_get_axis_use(&this, index);
651 // VERSION: 2.22
652 // Determines whether the pointer follows device motion.
653 // RETURNS: %TRUE if the pointer follows device motion
654 int get_has_cursor()() {
655 return gdk_device_get_has_cursor(&this);
658 // Obtains the motion history for a device; given a starting and
659 // ending timestamp, return all events in the motion history for
660 // the device in the given range of time. Some windowing systems
661 // do not support motion history, in which case, %FALSE will
662 // be returned. (This is not distinguishable from the case where
663 // motion history is supported and no events were found.)
664 // at least one event was found.
665 // RETURNS: %TRUE if the windowing system supports motion history and
666 // <window>: the window with respect to which which the event coordinates will be reported
667 // <start>: starting timestamp for range of events to return
668 // <stop>: ending timestamp for the range of events to return
669 // <events>: location to store a newly-allocated array of #GdkTimeCoord, or %NULL
670 // <n_events>: location to store the length of @events, or %NULL
671 int get_history()(Window* window, uint start, uint stop, /*out*/ TimeCoord*** events, /*out*/ int* n_events) {
672 return gdk_device_get_history(&this, window, start, stop, events, n_events);
675 // VERSION: 2.22
676 // If @index has a valid keyval, this function will
677 // fill in @keyval and @modifiers with the keyval settings.
678 // <index>: the index of the macro button to get.
679 // <keyval>: return value for the keyval.
680 // <modifiers>: return value for modifiers.
681 void get_key()(uint index, uint* keyval, ModifierType* modifiers) {
682 gdk_device_get_key(&this, index, keyval, modifiers);
685 // VERSION: 2.22
686 // Determines the mode of the device.
687 // RETURNS: a #GdkInputSource
688 InputMode get_mode()() {
689 return gdk_device_get_mode(&this);
692 // VERSION: 2.22
693 // Gets the number of axes of a device.
694 // RETURNS: the number of axes of @device
695 int get_n_axes()() {
696 return gdk_device_get_n_axes(&this);
699 // VERSION: 2.24
700 // Gets the number of keys of a device.
701 // RETURNS: the number of keys of @device
702 int get_n_keys()() {
703 return gdk_device_get_n_keys(&this);
706 // VERSION: 2.22
707 // Determines the name of the device.
708 // RETURNS: a name
709 char* get_name()() {
710 return gdk_device_get_name(&this);
713 // VERSION: 2.22
714 // Determines the type of the device.
715 // RETURNS: a #GdkInputSource
716 InputSource get_source()() {
717 return gdk_device_get_source(&this);
719 void get_state()(Window* window, double* axes, ModifierType* mask) {
720 gdk_device_get_state(&this, window, axes, mask);
722 void set_axis_use()(uint index_, AxisUse use) {
723 gdk_device_set_axis_use(&this, index_, use);
725 void set_key()(uint index_, uint keyval, ModifierType modifiers) {
726 gdk_device_set_key(&this, index_, keyval, modifiers);
728 int set_mode()(InputMode mode) {
729 return gdk_device_set_mode(&this, mode);
731 void set_source()(InputSource source) {
732 gdk_device_set_source(&this, source);
736 struct DeviceAxis {
737 AxisUse use;
738 double min, max;
741 struct DeviceClass {
744 struct DeviceKey {
745 uint keyval;
746 ModifierType modifiers;
749 struct Display /* : GObject.Object */ {
750 alias parent_instance this;
751 alias parent_instance super_;
752 alias parent_instance object;
753 GObject2.Object parent_instance;
754 private GLib2.List* queued_events, queued_tail;
755 private uint[2] button_click_time;
756 private Window*[2] button_window;
757 private int[2] button_number;
758 private uint double_click_time;
759 private Device* core_pointer;
760 private DisplayPointerHooks* pointer_hooks;
761 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
762 uint, "closed_", 1,
763 uint, "ignore_core_events", 1,
764 uint, "__dummy32A", 30));
765 private uint double_click_distance;
766 private int[2] button_x, button_y;
767 private GLib2.List* pointer_grabs;
768 private KeyboardGrabInfo keyboard_grab;
769 private PointerWindowInfo pointer_info;
770 private uint last_event_time;
773 // VERSION: 2.2
774 // Gets the default #GdkDisplay. This is a convenience
775 // function for
776 // <literal>gdk_display_manager_get_default_display (gdk_display_manager_get ())</literal>.
777 // display.
778 // RETURNS: a #GdkDisplay, or %NULL if there is no default
779 static Display* get_default()() {
780 return gdk_display_get_default();
783 // Unintrospectable function: open() / gdk_display_open()
784 // VERSION: 2.2
785 // Opens a display.
786 // RETURNS: a #GdkDisplay, or %NULL if the display could not be opened.
787 // <display_name>: the name of the display to open
788 static Display* open()(char* display_name) {
789 return gdk_display_open(display_name);
792 // Unintrospectable function: open_default_libgtk_only() / gdk_display_open_default_libgtk_only()
793 // Opens the default display specified by command line arguments or
794 // environment variables, sets it as the default display, and returns
795 // it. gdk_parse_args must have been called first. If the default
796 // display has previously been set, simply returns that. An internal
797 // function that should not be used by applications.
798 // otherwise %NULL.
799 // RETURNS: the default display, if it could be opened,
800 static Display* open_default_libgtk_only()() {
801 return gdk_display_open_default_libgtk_only();
803 // Unintrospectable method: add_client_message_filter() / gdk_display_add_client_message_filter()
804 void add_client_message_filter()(Atom message_type, FilterFunc func, void* data) {
805 gdk_display_add_client_message_filter(&this, message_type, func, data);
808 // VERSION: 2.2
809 // Emits a short beep on @display
810 void beep()() {
811 gdk_display_beep(&this);
814 // VERSION: 2.2
815 // Closes the connection to the windowing system for the given display,
816 // and cleans up associated resources.
817 void close()() {
818 gdk_display_close(&this);
821 // VERSION: 2.4
822 // Flushes any requests queued for the windowing system; this happens automatically
823 // when the main loop blocks waiting for new events, but if your application
824 // is drawing without returning control to the main loop, you may need
825 // to call this function explicitely. A common case where this function
826 // needs to be called is when an application is executing drawing commands
827 // from a thread other than the thread where the main loop is running.
828 // This is most useful for X11. On windowing systems where requests are
829 // handled synchronously, this function will do nothing.
830 void flush()() {
831 gdk_display_flush(&this);
834 // Unintrospectable method: get_core_pointer() / gdk_display_get_core_pointer()
835 // VERSION: 2.2
836 // Returns the core pointer device for the given display
837 // display and should not be freed.
838 // RETURNS: the core pointer device; this is owned by the
839 Device* get_core_pointer()() {
840 return gdk_display_get_core_pointer(&this);
843 // VERSION: 2.4
844 // Returns the default size to use for cursors on @display.
845 // RETURNS: the default cursor size.
846 uint get_default_cursor_size()() {
847 return gdk_display_get_default_cursor_size(&this);
850 // Unintrospectable method: get_default_group() / gdk_display_get_default_group()
851 // VERSION: 2.4
852 // Returns the default group leader window for all toplevel windows
853 // on @display. This window is implicitly created by GDK.
854 // See gdk_window_set_group().
855 // RETURNS: The default group leader window for @display
856 Window* get_default_group()() {
857 return gdk_display_get_default_group(&this);
860 // Unintrospectable method: get_default_screen() / gdk_display_get_default_screen()
861 // VERSION: 2.2
862 // Get the default #GdkScreen for @display.
863 // RETURNS: the default #GdkScreen object for @display
864 Screen* get_default_screen()() {
865 return gdk_display_get_default_screen(&this);
868 // VERSION: 2.2
869 // Gets the next #GdkEvent to be processed for @display, fetching events from the
870 // windowing system if necessary.
871 // are pending. The returned #GdkEvent should be freed with gdk_event_free().
872 // RETURNS: the next #GdkEvent to be processed, or %NULL if no events
873 Event* /*new*/ get_event()() {
874 return gdk_display_get_event(&this);
877 // VERSION: 2.4
878 // Gets the maximal size to use for cursors on @display.
879 // <width>: the return location for the maximal cursor width
880 // <height>: the return location for the maximal cursor height
881 void get_maximal_cursor_size()(/*out*/ uint* width, /*out*/ uint* height) {
882 gdk_display_get_maximal_cursor_size(&this, width, height);
885 // VERSION: 2.2
886 // Gets the number of screen managed by the @display.
887 // RETURNS: number of screens.
888 int get_n_screens()() {
889 return gdk_display_get_n_screens(&this);
892 // VERSION: 2.2
893 // Gets the name of the display.
894 // by GDK and should not be modified or freed.
895 // RETURNS: a string representing the display name. This string is owned
896 char* get_name()() {
897 return gdk_display_get_name(&this);
900 // VERSION: 2.2
901 // Gets the current location of the pointer and the current modifier
902 // mask for a given display.
903 // <screen>: location to store the screen that the cursor is on, or %NULL.
904 // <x>: location to store root window X coordinate of pointer, or %NULL.
905 // <y>: location to store root window Y coordinate of pointer, or %NULL.
906 // <mask>: location to store current modifier mask, or %NULL
907 void get_pointer()(/*out*/ Screen** screen=null, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) {
908 gdk_display_get_pointer(&this, screen, x, y, mask);
911 // Unintrospectable method: get_screen() / gdk_display_get_screen()
912 // VERSION: 2.2
913 // Returns a screen object for one of the screens of the display.
914 // RETURNS: the #GdkScreen object
915 // <screen_num>: the screen number
916 Screen* get_screen()(int screen_num) {
917 return gdk_display_get_screen(&this, screen_num);
920 // VERSION: 2.2
921 // Obtains the window underneath the mouse pointer, returning the location
922 // of the pointer in that window in @win_x, @win_y for @screen. Returns %NULL
923 // if the window under the mouse pointer is not known to GDK (for example,
924 // belongs to another application).
925 // RETURNS: the window under the mouse pointer, or %NULL
926 // <win_x>: return location for x coordinate of the pointer location relative to the window origin, or %NULL
927 // <win_y>: return location for y coordinate of the pointer location relative
928 Window* get_window_at_pointer()(/*out*/ int* win_x=null, /*out*/ int* win_y=null) {
929 return gdk_display_get_window_at_pointer(&this, win_x, win_y);
932 // VERSION: 2.22
933 // Finds out if the display has been closed.
934 // RETURNS: %TRUE if the display is closed.
935 int is_closed()() {
936 return gdk_display_is_closed(&this);
939 // VERSION: 2.2
940 // Release any keyboard grab
941 // <time_>: a timestap (e.g #GDK_CURRENT_TIME).
942 void keyboard_ungrab()(uint time_) {
943 gdk_display_keyboard_ungrab(&this, time_);
946 // Unintrospectable method: list_devices() / gdk_display_list_devices()
947 // VERSION: 2.2
948 // Returns the list of available input devices attached to @display.
949 // The list is statically allocated and should not be freed.
950 // RETURNS: a list of #GdkDevice
951 GLib2.List* list_devices()() {
952 return gdk_display_list_devices(&this);
955 // VERSION: 2.2
956 // Gets a copy of the first #GdkEvent in the @display's event queue, without
957 // removing the event from the queue. (Note that this function will
958 // not get more events from the windowing system. It only checks the events
959 // that have already been moved to the GDK event queue.)
960 // if no events are in the queue. The returned #GdkEvent should be freed with
961 // gdk_event_free().
962 // RETURNS: a copy of the first #GdkEvent on the event queue, or %NULL
963 Event* /*new*/ peek_event()() {
964 return gdk_display_peek_event(&this);
967 // VERSION: 2.2
968 // Test if the pointer is grabbed.
969 // RETURNS: %TRUE if an active X pointer grab is in effect
970 int pointer_is_grabbed()() {
971 return gdk_display_pointer_is_grabbed(&this);
974 // VERSION: 2.2
975 // Release any pointer grab.
976 // <time_>: a timestap (e.g. %GDK_CURRENT_TIME).
977 void pointer_ungrab()(uint time_) {
978 gdk_display_pointer_ungrab(&this, time_);
981 // VERSION: 2.2
982 // Appends a copy of the given event onto the front of the event
983 // queue for @display.
984 // <event>: a #GdkEvent.
985 void put_event()(Event* event) {
986 gdk_display_put_event(&this, event);
989 // VERSION: 2.6
990 // Request #GdkEventOwnerChange events for ownership changes
991 // of the selection named by the given atom.
992 // be sent.
993 // RETURNS: whether #GdkEventOwnerChange events will
994 // <selection>: the #GdkAtom naming the selection for which ownership change notification is requested
995 int request_selection_notification()(Atom selection) {
996 return gdk_display_request_selection_notification(&this, selection);
999 // VERSION: 2.4
1000 // Sets the double click distance (two clicks within this distance
1001 // count as a double click and result in a #GDK_2BUTTON_PRESS event).
1002 // See also gdk_display_set_double_click_time().
1003 // Applications should <emphasis>not</emphasis> set this, it is a global
1004 // user-configured setting.
1005 // <distance>: distance in pixels
1006 void set_double_click_distance()(uint distance) {
1007 gdk_display_set_double_click_distance(&this, distance);
1010 // VERSION: 2.2
1011 // Sets the double click time (two clicks within this time interval
1012 // count as a double click and result in a #GDK_2BUTTON_PRESS event).
1013 // Applications should <emphasis>not</emphasis> set this, it is a global
1014 // user-configured setting.
1015 // <msec>: double click time in milliseconds (thousandths of a second)
1016 void set_double_click_time()(uint msec) {
1017 gdk_display_set_double_click_time(&this, msec);
1020 // Unintrospectable method: set_pointer_hooks() / gdk_display_set_pointer_hooks()
1021 // VERSION: 2.2
1022 // DEPRECATED (v2.24) method: set_pointer_hooks - This function will go away in GTK 3 for lack of use cases.
1023 // This function allows for hooking into the operation
1024 // of getting the current location of the pointer on a particular
1025 // display. This is only useful for such low-level tools as an
1026 // event recorder. Applications should never have any
1027 // reason to use this facility.
1028 // RETURNS: the previous pointer hook table
1029 // <new_hooks>: a table of pointers to functions for getting quantities related to the current pointer position, or %NULL to restore the default table.
1030 DisplayPointerHooks* set_pointer_hooks()(DisplayPointerHooks* new_hooks) {
1031 return gdk_display_set_pointer_hooks(&this, new_hooks);
1034 // VERSION: 2.6
1035 // Issues a request to the clipboard manager to store the
1036 // clipboard data. On X11, this is a special program that works
1037 // according to the freedesktop clipboard specification, available at
1038 // <ulink url="http://www.freedesktop.org/Standards/clipboard-manager-spec">
1039 // http://www.freedesktop.org/Standards/clipboard-manager-spec</ulink>.
1040 // <clipboard_window>: a #GdkWindow belonging to the clipboard owner
1041 // <time_>: a timestamp if all available targets should be saved.
1042 // <n_targets>: length of the @targets array
1043 void store_clipboard()(Window* clipboard_window, uint time_, Atom* targets, int n_targets) {
1044 gdk_display_store_clipboard(&this, clipboard_window, time_, targets, n_targets);
1047 // VERSION: 2.6
1048 // Returns whether the speicifed display supports clipboard
1049 // persistance; i.e. if it's possible to store the clipboard data after an
1050 // application has quit. On X11 this checks if a clipboard daemon is
1051 // running.
1052 // RETURNS: %TRUE if the display supports clipboard persistance.
1053 int supports_clipboard_persistence()() {
1054 return gdk_display_supports_clipboard_persistence(&this);
1057 // VERSION: 2.12
1058 // Returns %TRUE if gdk_window_set_composited() can be used
1059 // to redirect drawing on the window using compositing.
1060 // Currently this only works on X11 with XComposite and
1061 // XDamage extensions available.
1062 // RETURNS: %TRUE if windows may be composited.
1063 int supports_composite()() {
1064 return gdk_display_supports_composite(&this);
1067 // VERSION: 2.4
1068 // Returns %TRUE if cursors can use an 8bit alpha channel
1069 // on @display. Otherwise, cursors are restricted to bilevel
1070 // alpha (i.e. a mask).
1071 // RETURNS: whether cursors can have alpha channels.
1072 int supports_cursor_alpha()() {
1073 return gdk_display_supports_cursor_alpha(&this);
1076 // VERSION: 2.4
1077 // Returns %TRUE if multicolored cursors are supported
1078 // on @display. Otherwise, cursors have only a forground
1079 // and a background color.
1080 // RETURNS: whether cursors can have multiple colors.
1081 int supports_cursor_color()() {
1082 return gdk_display_supports_cursor_color(&this);
1085 // VERSION: 2.10
1086 // Returns %TRUE if gdk_window_input_shape_combine_mask() can
1087 // be used to modify the input shape of windows on @display.
1088 // RETURNS: %TRUE if windows with modified input shape are supported
1089 int supports_input_shapes()() {
1090 return gdk_display_supports_input_shapes(&this);
1093 // VERSION: 2.6
1094 // Returns whether #GdkEventOwnerChange events will be
1095 // sent when the owner of a selection changes.
1096 // be sent.
1097 // RETURNS: whether #GdkEventOwnerChange events will
1098 int supports_selection_notification()() {
1099 return gdk_display_supports_selection_notification(&this);
1102 // VERSION: 2.10
1103 // Returns %TRUE if gdk_window_shape_combine_mask() can
1104 // be used to create shaped windows on @display.
1105 // RETURNS: %TRUE if shaped windows are supported
1106 int supports_shapes()() {
1107 return gdk_display_supports_shapes(&this);
1110 // VERSION: 2.2
1111 // Flushes any requests queued for the windowing system and waits until all
1112 // requests have been handled. This is often used for making sure that the
1113 // display is synchronized with the current state of the program. Calling
1114 // gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors
1115 // generated from earlier requests are handled before the error trap is
1116 // removed.
1117 // This is most useful for X11. On windowing systems where requests are
1118 // handled synchronously, this function will do nothing.
1119 void sync()() {
1120 gdk_display_sync(&this);
1123 // VERSION: 2.8
1124 // Warps the pointer of @display to the point @x,@y on
1125 // the screen @screen, unless the pointer is confined
1126 // to a window by a grab, in which case it will be moved
1127 // as far as allowed by the grab. Warping the pointer
1128 // creates events as if the user had moved the mouse
1129 // instantaneously to the destination.
1130 // Note that the pointer should normally be under the
1131 // control of the user. This function was added to cover
1132 // some rare use cases like keyboard navigation support
1133 // for the color picker in the #GtkColorSelectionDialog.
1134 // <screen>: the screen of @display to warp the pointer to
1135 // <x>: the x coordinate of the destination
1136 // <y>: the y coordinate of the destination
1137 void warp_pointer()(Screen* screen, int x, int y) {
1138 gdk_display_warp_pointer(&this, screen, x, y);
1141 // VERSION: 2.2
1142 // The ::closed signal is emitted when the connection to the windowing
1143 // system for @display is closed.
1144 // <is_error>: %TRUE if the display was closed due to an error
1145 extern (C) alias static void function (Display* this_, c_int is_error, void* user_data=null) signal_closed;
1147 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1148 return super_.signal_connect!name(cb, data, cf);
1151 ulong signal_connect(string name:"closed", CB:signal_closed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1152 return signal_connect_data!()(&this, cast(char*)"closed",
1153 cast(GObject2.Callback)cb, data, null, cf);
1157 struct DisplayClass {
1158 GObject2.ObjectClass parent_class;
1159 extern (C) char* function (Display* display) get_display_name;
1160 // RETURNS: number of screens.
1161 extern (C) int function (Display* display) get_n_screens;
1163 // Unintrospectable functionp: get_screen() / ()
1165 // RETURNS: the #GdkScreen object
1166 // <screen_num>: the screen number
1167 extern (C) Screen* function (Display* display, int screen_num) get_screen;
1169 // Unintrospectable functionp: get_default_screen() / ()
1171 // RETURNS: the default #GdkScreen object for @display
1172 extern (C) Screen* function (Display* display) get_default_screen;
1173 extern (C) void function (Display* display, int is_error) closed;
1176 struct DisplayManager /* : GObject.Object */ {
1177 alias method_parent this;
1178 alias method_parent super_;
1179 alias method_parent object;
1180 GObject2.Object method_parent;
1183 // VERSION: 2.2
1184 // Gets the singleton #GdkDisplayManager object.
1185 // gdk_init(), or gdk_init_check() must have been called first.
1186 // RETURNS: The global #GdkDisplayManager singleton; gdk_parse_pargs(),
1187 static DisplayManager* get()() {
1188 return gdk_display_manager_get();
1191 // VERSION: 2.2
1192 // Gets the default #GdkDisplay.
1193 // display.
1194 // RETURNS: a #GdkDisplay, or %NULL if there is no default
1195 Display* get_default_display()() {
1196 return gdk_display_manager_get_default_display(&this);
1199 // VERSION: 2.2
1200 // List all currently open displays.
1201 // #GSList of #GdkDisplay objects. Free this list with g_slist_free() when you
1202 // are done with it.
1203 // RETURNS: a newly allocated
1204 GLib2.SList* /*new container*/ list_displays()() {
1205 return gdk_display_manager_list_displays(&this);
1208 // VERSION: 2.2
1209 // Sets @display as the default display.
1210 // <display>: a #GdkDisplay
1211 void set_default_display()(Display* display) {
1212 gdk_display_manager_set_default_display(&this, display);
1215 // VERSION: 2.2
1216 // The ::display_opened signal is emitted when a display is opened.
1217 // <display>: the opened display
1218 extern (C) alias static void function (DisplayManager* this_, Display* display, void* user_data=null) signal_display_opened;
1220 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1221 return super_.signal_connect!name(cb, data, cf);
1224 ulong signal_connect(string name:"display-opened", CB:signal_display_opened)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1225 return signal_connect_data!()(&this, cast(char*)"display-opened",
1226 cast(GObject2.Callback)cb, data, null, cf);
1230 struct DisplayManagerClass {
1231 GObject2.ObjectClass parent_class;
1232 extern (C) void function (DisplayManager* display_manager, Display* display) display_opened;
1235 struct DisplayPointerHooks {
1236 extern (C) void function (Display* display, Screen** screen, int* x, int* y, ModifierType* mask) get_pointer;
1237 // Unintrospectable functionp: window_get_pointer() / ()
1238 extern (C) Window* function (Display* display, Window* window, int* x, int* y, ModifierType* mask) window_get_pointer;
1239 // Unintrospectable functionp: window_at_pointer() / ()
1240 extern (C) Window* function (Display* display, int* win_x, int* win_y) window_at_pointer;
1243 enum DragAction {
1244 DEFAULT = 1,
1245 COPY = 2,
1246 MOVE = 4,
1247 LINK = 8,
1248 PRIVATE = 16,
1249 ASK = 32
1251 struct DragContext /* : GObject.Object */ {
1252 alias parent_instance this;
1253 alias parent_instance super_;
1254 alias parent_instance object;
1255 GObject2.Object parent_instance;
1256 DragProtocol protocol;
1257 int is_source;
1258 Window* source_window, dest_window;
1259 GLib2.List* targets;
1260 DragAction actions, suggested_action, action;
1261 uint start_time;
1262 private void* windowing_data;
1265 // DEPRECATED (v2.24) constructor: new - This function is not useful, you always
1266 // Creates a new #GdkDragContext.
1267 // obtain drag contexts by gdk_drag_begin() or similar.
1268 // RETURNS: the newly created #GdkDragContext.
1269 static DragContext* /*new*/ new_()() {
1270 return gdk_drag_context_new();
1273 // VERSION: 2.22
1274 // Determines the bitmask of actions proposed by the source if
1275 // gdk_drag_context_suggested_action() returns GDK_ACTION_ASK.
1276 // RETURNS: the #GdkDragAction flags
1277 DragAction get_actions()() {
1278 return gdk_drag_context_get_actions(&this);
1281 // VERSION: 2.24
1282 // Returns the destination windw for the DND operation.
1283 // RETURNS: a #GdkWindow
1284 Window* get_dest_window()() {
1285 return gdk_drag_context_get_dest_window(&this);
1288 // VERSION: 2.24
1289 // Returns the drag protocol thats used by this context.
1290 // RETURNS: the drag protocol
1291 DragProtocol get_protocol()() {
1292 return gdk_drag_context_get_protocol(&this);
1295 // VERSION: 2.22
1296 // Determines the action chosen by the drag destination.
1297 // RETURNS: a #GdkDragAction value
1298 DragAction get_selected_action()() {
1299 return gdk_drag_context_get_selected_action(&this);
1302 // VERSION: 2.22
1303 // Returns the #GdkWindow where the DND operation started.
1304 // RETURNS: a #GdkWindow
1305 Window* get_source_window()() {
1306 return gdk_drag_context_get_source_window(&this);
1309 // VERSION: 2.22
1310 // Determines the suggested drag action of the context.
1311 // RETURNS: a #GdkDragAction value
1312 DragAction get_suggested_action()() {
1313 return gdk_drag_context_get_suggested_action(&this);
1316 // VERSION: 2.22
1317 // Retrieves the list of targets of the context.
1318 // RETURNS: a #GList of targets
1319 GLib2.List* list_targets()() {
1320 return gdk_drag_context_list_targets(&this);
1323 // DEPRECATED (v2.2) method: ref - Use g_object_ref() instead.
1324 // Deprecated function; use g_object_ref() instead.
1325 void ref_()() {
1326 gdk_drag_context_ref(&this);
1329 // DEPRECATED (v2.2) method: unref - Use g_object_unref() instead.
1330 // Deprecated function; use g_object_unref() instead.
1331 void unref()() {
1332 gdk_drag_context_unref(&this);
1336 struct DragContextClass {
1337 GObject2.ObjectClass parent_class;
1340 enum DragProtocol {
1341 MOTIF = 0,
1342 XDND = 1,
1343 ROOTWIN = 2,
1344 NONE = 3,
1345 WIN32_DROPFILES = 4,
1346 OLE2 = 5,
1347 LOCAL = 6
1349 struct Drawable /* : GObject.Object */ {
1350 alias parent_instance this;
1351 alias parent_instance super_;
1352 alias parent_instance object;
1353 GObject2.Object parent_instance;
1356 // Unintrospectable method: copy_to_image() / gdk_drawable_copy_to_image()
1357 // VERSION: 2.4
1358 // DEPRECATED (v2.22) method: copy_to_image - Use @drawable as the source and draw to a Cairo image
1359 // Copies a portion of @drawable into the client side image structure
1360 // and copies into that. See gdk_drawable_get_image() for further details.
1361 // of @drawable
1362 // surface if you want to download contents to the client.
1363 // RETURNS: @image, or a new a #GdkImage containing the contents
1364 // <image>: a #GdkDrawable, or %NULL if a new @image should be created.
1365 // <src_x>: x coordinate on @drawable
1366 // <src_y>: y coordinate on @drawable
1367 // <dest_x>: x coordinate within @image. Must be 0 if @image is %NULL
1368 // <dest_y>: y coordinate within @image. Must be 0 if @image is %NULL
1369 // <width>: width of region to get
1370 // <height>: height or region to get
1371 Image* copy_to_image()(Image* image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
1372 return gdk_drawable_copy_to_image(&this, image, src_x, src_y, dest_x, dest_y, width, height);
1375 // Unintrospectable method: get_clip_region() / gdk_drawable_get_clip_region()
1376 // Computes the region of a drawable that potentially can be written
1377 // to by drawing primitives. This region will not take into account
1378 // the clip region for the GC, and may also not take into account
1379 // other factors such as if the window is obscured by other windows,
1380 // but no area outside of this region will be affected by drawing
1381 // primitives.
1382 // when you are done.
1383 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1384 Region* get_clip_region()() {
1385 return gdk_drawable_get_clip_region(&this);
1388 // Unintrospectable method: get_colormap() / gdk_drawable_get_colormap()
1389 // Gets the colormap for @drawable, if one is set; returns
1390 // %NULL otherwise.
1391 // RETURNS: the colormap, or %NULL
1392 Colormap* get_colormap()() {
1393 return gdk_drawable_get_colormap(&this);
1396 // Unintrospectable method: get_data() / gdk_drawable_get_data()
1397 // Equivalent to g_object_get_data(); the #GObject variant should be
1398 // used instead.
1399 // RETURNS: the data stored at @key
1400 // <key>: name the data was stored under
1401 void* get_data()(char* key) {
1402 return gdk_drawable_get_data(&this, key);
1405 // Obtains the bit depth of the drawable, that is, the number of bits
1406 // that make up a pixel in the drawable's visual. Examples are 8 bits
1407 // per pixel, 24 bits per pixel, etc.
1408 // RETURNS: number of bits per pixel
1409 int get_depth()() {
1410 return gdk_drawable_get_depth(&this);
1413 // Unintrospectable method: get_display() / gdk_drawable_get_display()
1414 // VERSION: 2.2
1415 // DEPRECATED (v2.24) method: get_display - Use gdk_window_get_display() instead
1416 // Gets the #GdkDisplay associated with a #GdkDrawable.
1417 // RETURNS: the #GdkDisplay associated with @drawable
1418 Display* get_display()() {
1419 return gdk_drawable_get_display(&this);
1422 // Unintrospectable method: get_image() / gdk_drawable_get_image()
1423 // DEPRECATED (v2.22) method: get_image - Use @drawable as the source and draw to a Cairo image
1424 // A #GdkImage stores client-side image data (pixels). In contrast,
1425 // #GdkPixmap and #GdkWindow are server-side
1426 // objects. gdk_drawable_get_image() obtains the pixels from a
1427 // server-side drawable as a client-side #GdkImage. The format of a
1428 // #GdkImage depends on the #GdkVisual of the current display, which
1429 // makes manipulating #GdkImage extremely difficult; therefore, in
1430 // most cases you should use gdk_pixbuf_get_from_drawable() instead of
1431 // this lower-level function. A #GdkPixbuf contains image data in a
1432 // canonicalized RGB format, rather than a display-dependent format.
1433 // Of course, there's a convenience vs. speed tradeoff here, so you'll
1434 // want to think about what makes sense for your application.
1435 // obtain as an image.
1436 // You would usually copy image data to the client side if you intend
1437 // to examine the values of individual pixels, for example to darken
1438 // an image or add a red tint. It would be prohibitively slow to
1439 // make a round-trip request to the windowing system for each pixel,
1440 // so instead you get all of them at once, modify them, then copy
1441 // them all back at once.
1442 // If the X server or other windowing system backend is on the local
1443 // machine, this function may use shared memory to avoid copying
1444 // the image data.
1445 // If the source drawable is a #GdkWindow and partially offscreen
1446 // or obscured, then the obscured portions of the returned image
1447 // will contain undefined data.
1448 // surface if you want to download contents to the client.
1449 // RETURNS: a #GdkImage containing the contents of @drawable
1450 // <x>: x coordinate on @drawable
1451 // <y>: y coordinate on @drawable
1452 // <width>: width of region to get
1453 // <height>: height or region to get
1454 Image* get_image()(int x, int y, int width, int height) {
1455 return gdk_drawable_get_image(&this, x, y, width, height);
1458 // Unintrospectable method: get_screen() / gdk_drawable_get_screen()
1459 // VERSION: 2.2
1460 // DEPRECATED (v2.24) method: get_screen - Use gdk_window_get_screen() instead
1461 // Gets the #GdkScreen associated with a #GdkDrawable.
1462 // RETURNS: the #GdkScreen associated with @drawable
1463 Screen* get_screen()() {
1464 return gdk_drawable_get_screen(&this);
1467 // DEPRECATED (v2.24) method: get_size - Use gdk_window_get_width() and gdk_window_get_height() for
1468 // Fills *@width and *@height with the size of @drawable.
1469 // On the X11 platform, if @drawable is a #GdkWindow, the returned
1470 // size is the size reported in the most-recently-processed configure
1471 // event, rather than the current size on the X server.
1472 // #GdkWindows. Use gdk_pixmap_get_size() for #GdkPixmaps.
1473 // <width>: location to store drawable's width, or %NULL
1474 // <height>: location to store drawable's height, or %NULL
1475 void get_size()(/*out*/ int* width=null, /*out*/ int* height=null) {
1476 gdk_drawable_get_size(&this, width, height);
1479 // Unintrospectable method: get_visible_region() / gdk_drawable_get_visible_region()
1480 // Computes the region of a drawable that is potentially visible.
1481 // This does not necessarily take into account if the window is
1482 // obscured by other windows, but no area outside of this region
1483 // is visible.
1484 // when you are done.
1485 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1486 Region* get_visible_region()() {
1487 return gdk_drawable_get_visible_region(&this);
1490 // Unintrospectable method: get_visual() / gdk_drawable_get_visual()
1491 // DEPRECATED (v2.24) method: get_visual - Use gdk_window_get_visual()
1492 // Gets the #GdkVisual describing the pixel format of @drawable.
1493 // RETURNS: a #GdkVisual
1494 Visual* get_visual()() {
1495 return gdk_drawable_get_visual(&this);
1498 // Unintrospectable method: ref() / gdk_drawable_ref()
1499 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
1500 // Deprecated equivalent of calling g_object_ref() on @drawable.
1501 // (Drawables were not objects in previous versions of GDK.)
1502 // RETURNS: the same @drawable passed in
1503 Drawable* ref_()() {
1504 return gdk_drawable_ref(&this);
1507 // Sets the colormap associated with @drawable. Normally this will
1508 // happen automatically when the drawable is created; you only need to
1509 // use this function if the drawable-creating function did not have a
1510 // way to determine the colormap, and you then use drawable operations
1511 // that require a colormap. The colormap for all drawables and
1512 // graphics contexts you intend to use together should match. i.e.
1513 // when using a #GdkGC to draw to a drawable, or copying one drawable
1514 // to another, the colormaps should match.
1515 // <colormap>: a #GdkColormap
1516 void set_colormap()(Colormap* colormap) {
1517 gdk_drawable_set_colormap(&this, colormap);
1520 // This function is equivalent to g_object_set_data(),
1521 // the #GObject variant should be used instead.
1522 // <key>: name to store the data under
1523 // <data>: arbitrary data
1524 // <destroy_func>: function to free @data, or %NULL
1525 void set_data()(char* key, void* data, GLib2.DestroyNotify destroy_func=null) {
1526 gdk_drawable_set_data(&this, key, data, destroy_func);
1529 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
1530 // Deprecated equivalent of calling g_object_unref() on @drawable.
1531 void unref()() {
1532 gdk_drawable_unref(&this);
1536 struct DrawableClass {
1537 GObject2.ObjectClass parent_class;
1538 // Unintrospectable functionp: create_gc() / ()
1539 extern (C) GC* function (Drawable* drawable, GCValues* values, GCValuesMask mask) create_gc;
1540 extern (C) void function (Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height) draw_rectangle;
1541 extern (C) void function (Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2) draw_arc;
1542 extern (C) void function (Drawable* drawable, GC* gc, int filled, Point* points, int npoints) draw_polygon;
1543 extern (C) void function (Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length) draw_text;
1544 extern (C) void function (Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length) draw_text_wc;
1545 extern (C) void function (Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) draw_drawable;
1546 extern (C) void function (Drawable* drawable, GC* gc, Point* points, int npoints) draw_points;
1547 extern (C) void function (Drawable* drawable, GC* gc, Segment* segs, int nsegs) draw_segments;
1548 extern (C) void function (Drawable* drawable, GC* gc, Point* points, int npoints) draw_lines;
1549 extern (C) void function (Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) draw_glyphs;
1550 extern (C) void function (Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) draw_image;
1551 // RETURNS: number of bits per pixel
1552 extern (C) int function (Drawable* drawable) get_depth;
1554 // <width>: location to store drawable's width, or %NULL
1555 // <height>: location to store drawable's height, or %NULL
1556 extern (C) void function (Drawable* drawable, /*out*/ int* width=null, /*out*/ int* height=null) get_size;
1557 extern (C) void function (Drawable* drawable, Colormap* cmap) set_colormap;
1559 // Unintrospectable functionp: get_colormap() / ()
1561 // RETURNS: the colormap, or %NULL
1562 extern (C) Colormap* function (Drawable* drawable) get_colormap;
1564 // Unintrospectable functionp: get_visual() / ()
1566 // RETURNS: a #GdkVisual
1567 extern (C) Visual* function (Drawable* drawable) get_visual;
1569 // Unintrospectable functionp: get_screen() / ()
1571 // RETURNS: the #GdkScreen associated with @drawable
1572 extern (C) Screen* function (Drawable* drawable) get_screen;
1574 // Unintrospectable functionp: get_image() / ()
1576 // RETURNS: a #GdkImage containing the contents of @drawable
1577 // <x>: x coordinate on @drawable
1578 // <y>: y coordinate on @drawable
1579 // <width>: width of region to get
1580 // <height>: height or region to get
1581 extern (C) Image* function (Drawable* drawable, int x, int y, int width, int height) get_image;
1583 // Unintrospectable functionp: get_clip_region() / ()
1585 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1586 extern (C) Region* function (Drawable* drawable) get_clip_region;
1588 // Unintrospectable functionp: get_visible_region() / ()
1590 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1591 extern (C) Region* function (Drawable* drawable) get_visible_region;
1592 // Unintrospectable functionp: get_composite_drawable() / ()
1593 extern (C) Drawable* function (Drawable* drawable, int x, int y, int width, int height, int* composite_x_offset, int* composite_y_offset) get_composite_drawable;
1594 extern (C) void function (Drawable* drawable, GC* gc, GdkPixbuf2.Pixbuf* pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither) draw_pixbuf;
1595 // Unintrospectable functionp: _copy_to_image() / ()
1596 extern (C) Image* function (Drawable* drawable, Image* image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) _copy_to_image;
1597 extern (C) void function (Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) draw_glyphs_transformed;
1598 extern (C) void function (Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids) draw_trapezoids;
1599 extern (C) cairo.Surface* /*new*/ function (Drawable* drawable) ref_cairo_surface;
1600 // Unintrospectable functionp: get_source_drawable() / ()
1601 extern (C) Drawable* function (Drawable* drawable) get_source_drawable;
1602 extern (C) void function (Drawable* drawable, cairo.Context* cr) set_cairo_clip;
1603 extern (C) cairo.Surface* /*new*/ function (Drawable* drawable, int width, int height) create_cairo_surface;
1604 extern (C) void function (Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height, Drawable* original_src) draw_drawable_with_src;
1605 extern (C) void function () _gdk_reserved7;
1606 extern (C) void function () _gdk_reserved9;
1607 extern (C) void function () _gdk_reserved10;
1608 extern (C) void function () _gdk_reserved11;
1609 extern (C) void function () _gdk_reserved12;
1610 extern (C) void function () _gdk_reserved13;
1611 extern (C) void function () _gdk_reserved14;
1612 extern (C) void function () _gdk_reserved15;
1615 union Event {
1616 EventType type;
1617 EventAny any;
1618 EventExpose expose;
1619 EventNoExpose no_expose;
1620 EventVisibility visibility;
1621 EventMotion motion;
1622 EventButton button;
1623 EventScroll scroll;
1624 EventKey key;
1625 EventCrossing crossing;
1626 EventFocus focus_change;
1627 EventConfigure configure;
1628 EventProperty property;
1629 EventSelection selection;
1630 EventOwnerChange owner_change;
1631 EventProximity proximity;
1632 EventClient client;
1633 EventDND dnd;
1634 EventWindowState window_state;
1635 EventSetting setting;
1636 EventGrabBroken grab_broken;
1639 // VERSION: 2.2
1640 // Creates a new event of the given type. All fields are set to 0.
1641 // should be freed with gdk_event_free().
1642 // RETURNS: a newly-allocated #GdkEvent. The returned #GdkEvent
1643 // <type>: a #GdkEventType
1644 static Event* /*new*/ new_()(EventType type) {
1645 return gdk_event_new(type);
1648 // Copies a #GdkEvent, copying or incrementing the reference count of the
1649 // resources associated with it (e.g. #GdkWindow's and strings).
1650 // gdk_event_free().
1651 // RETURNS: a copy of @event. The returned #GdkEvent should be freed with
1652 Event* /*new*/ copy()() {
1653 return gdk_event_copy(&this);
1656 // Frees a #GdkEvent, freeing or decrementing any resources associated with it.
1657 // Note that this function should only be called with events returned from
1658 // functions such as gdk_event_peek(), gdk_event_get(),
1659 // gdk_event_get_graphics_expose() and gdk_event_copy() and gdk_event_new().
1660 void free()() {
1661 gdk_event_free(&this);
1664 // Extract the axis value for a particular axis use from
1665 // an event structure.
1666 // RETURNS: %TRUE if the specified axis was found, otherwise %FALSE
1667 // <axis_use>: the axis use to look for
1668 // <value>: location to store the value found
1669 int get_axis()(AxisUse axis_use, /*out*/ double* value) {
1670 return gdk_event_get_axis(&this, axis_use, value);
1673 // Extract the event window relative x/y coordinates from an event.
1674 // RETURNS: %TRUE if the event delivered event window coordinates
1675 // <x_win>: location to put event window x coordinate
1676 // <y_win>: location to put event window y coordinate
1677 int get_coords()(/*out*/ double* x_win, /*out*/ double* y_win) {
1678 return gdk_event_get_coords(&this, x_win, y_win);
1681 // Extract the root window relative x/y coordinates from an event.
1682 // RETURNS: %TRUE if the event delivered root window coordinates
1683 // <x_root>: location to put root window x coordinate
1684 // <y_root>: location to put root window y coordinate
1685 int get_root_coords()(/*out*/ double* x_root, /*out*/ double* y_root) {
1686 return gdk_event_get_root_coords(&this, x_root, y_root);
1689 // Unintrospectable method: get_screen() / gdk_event_get_screen()
1690 // VERSION: 2.2
1691 // Returns the screen for the event. The screen is
1692 // typically the screen for <literal>event->any.window</literal>, but
1693 // for events such as mouse events, it is the screen
1694 // where the pointer was when the event occurs -
1695 // that is, the screen which has the root window
1696 // to which <literal>event->motion.x_root</literal> and
1697 // <literal>event->motion.y_root</literal> are relative.
1698 // RETURNS: the screen for the event
1699 Screen* get_screen()() {
1700 return gdk_event_get_screen(&this);
1703 // If the event contains a "state" field, puts that field in @state. Otherwise
1704 // stores an empty state (0). Returns %TRUE if there was a state field
1705 // in the event. @event may be %NULL, in which case it's treated
1706 // as if the event had no state field.
1707 // RETURNS: %TRUE if there was a state field in the event
1708 // <state>: return location for state
1709 int get_state()(/*out*/ ModifierType* state) {
1710 return gdk_event_get_state(&this, state);
1713 // Returns the time stamp from @event, if there is one; otherwise
1714 // returns #GDK_CURRENT_TIME. If @event is %NULL, returns #GDK_CURRENT_TIME.
1715 // RETURNS: time stamp field from @event
1716 uint get_time()() {
1717 return gdk_event_get_time(&this);
1720 // Appends a copy of the given event onto the front of the event
1721 // queue for event->any.window's display, or the default event
1722 // queue if event->any.window is %NULL. See gdk_display_put_event().
1723 void put()() {
1724 gdk_event_put(&this);
1727 // Sends an X ClientMessage event to a given window (which must be
1728 // on the default #GdkDisplay.)
1729 // This could be used for communicating between different applications,
1730 // though the amount of data is limited to 20 bytes.
1731 // RETURNS: non-zero on success.
1732 // <winid>: the window to send the X ClientMessage event to.
1733 int send_client_message()(NativeWindow winid) {
1734 return gdk_event_send_client_message(&this, winid);
1737 // Sends an X ClientMessage event to all toplevel windows on the default
1738 // #GdkScreen.
1739 // Toplevel windows are determined by checking for the WM_STATE property, as
1740 // described in the Inter-Client Communication Conventions Manual (ICCCM).
1741 // If no windows are found with the WM_STATE property set, the message is sent
1742 // to all children of the root window.
1743 void send_clientmessage_toall()() {
1744 gdk_event_send_clientmessage_toall(&this);
1747 // VERSION: 2.2
1748 // Sets the screen for @event to @screen. The event must
1749 // have been allocated by GTK+, for instance, by
1750 // gdk_event_copy().
1751 // <screen>: a #GdkScreen
1752 void set_screen()(Screen* screen) {
1753 gdk_event_set_screen(&this, screen);
1756 // --- mixin/Gdk2_Event.d --->
1758 void toString(FT)(scope void delegate(const(char)[]) sink, FT fmt) {
1759 import std.format;
1760 with (EventType)
1761 switch (type) {
1762 case EXPOSE: formatValue(sink, expose, fmt); return;
1763 case MOTION_NOTIFY: formatValue(sink, motion, fmt); return;
1764 case BUTTON_PRESS, _2BUTTON_PRESS, _3BUTTON_PRESS, BUTTON_RELEASE:
1765 formatValue(sink, button, fmt); return; // XXX check, GIR has this as just Event.
1766 case KEY_PRESS, KEY_RELEASE: formatValue(sink, key, fmt); return;
1767 case ENTER_NOTIFY, LEAVE_NOTIFY: formatValue(sink, crossing, fmt); return;
1768 case FOCUS_CHANGE: formatValue(sink, focus_change, fmt); return;
1769 case CONFIGURE: formatValue(sink, configure, fmt); return;
1770 case PROPERTY_NOTIFY: formatValue(sink, property, fmt); return;
1771 case SELECTION_CLEAR, SELECTION_REQUEST, SELECTION_NOTIFY:
1772 formatValue(sink, selection, fmt); return;
1773 case PROXIMITY_IN, PROXIMITY_OUT:
1774 formatValue(sink, proximity, fmt); return;
1775 case VISIBILITY_NOTIFY: formatValue(sink, visibility, fmt); return;
1776 case SCROLL: formatValue(sink, scroll, fmt); return;
1778 case WINDOW_STATE: formatValue(sink, window_state, fmt); return;
1779 any: case DELETE, DESTROY, MAP, UNMAP:
1780 formatValue(sink, any, fmt); return;
1781 default: sink("/*FIXME*/"); goto any;
1785 // <--- mixin/Gdk2_Event.d ---
1788 struct EventAny {
1789 EventType type;
1790 Window* window;
1791 byte send_event;
1794 struct EventButton {
1795 EventType type;
1796 Window* window;
1797 byte send_event;
1798 uint time;
1799 double x, y;
1800 double* axes;
1801 uint state, button;
1802 Device* device;
1803 double x_root, y_root;
1806 struct EventClient {
1807 EventType type;
1808 Window* window;
1809 byte send_event;
1810 Atom message_type;
1811 ushort data_format;
1813 union data {
1814 char[20] b;
1815 short[10] s;
1816 c_long[5] l;
1820 struct EventConfigure {
1821 EventType type;
1822 Window* window;
1823 byte send_event;
1824 int x, y, width, height;
1827 struct EventCrossing {
1828 EventType type;
1829 Window* window;
1830 byte send_event;
1831 Window* subwindow;
1832 uint time;
1833 double x, y, x_root, y_root;
1834 CrossingMode mode;
1835 NotifyType detail;
1836 int focus;
1837 uint state;
1840 struct EventDND {
1841 EventType type;
1842 Window* window;
1843 byte send_event;
1844 DragContext* context;
1845 uint time;
1846 short x_root, y_root;
1849 struct EventExpose {
1850 EventType type;
1851 Window* window;
1852 byte send_event;
1853 Rectangle area;
1854 Region* region;
1855 int count;
1858 struct EventFocus {
1859 EventType type;
1860 Window* window;
1861 byte send_event;
1862 short in_;
1865 extern (C) alias void function (Event* event, void* data) EventFunc;
1867 struct EventGrabBroken {
1868 EventType type;
1869 Window* window;
1870 byte send_event;
1871 int keyboard, implicit;
1872 Window* grab_window;
1875 struct EventKey {
1876 EventType type;
1877 Window* window;
1878 byte send_event;
1879 uint time;
1880 uint state, keyval;
1881 int length;
1882 char* string_;
1883 ushort hardware_keycode;
1884 ubyte group;
1885 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
1886 uint, "is_modifier", 1,
1887 uint, "__dummy32A", 31));
1890 enum EventMask {
1891 EXPOSURE_MASK = 2,
1892 POINTER_MOTION_MASK = 4,
1893 POINTER_MOTION_HINT_MASK = 8,
1894 BUTTON_MOTION_MASK = 16,
1895 BUTTON1_MOTION_MASK = 32,
1896 BUTTON2_MOTION_MASK = 64,
1897 BUTTON3_MOTION_MASK = 128,
1898 BUTTON_PRESS_MASK = 256,
1899 BUTTON_RELEASE_MASK = 512,
1900 KEY_PRESS_MASK = 1024,
1901 KEY_RELEASE_MASK = 2048,
1902 ENTER_NOTIFY_MASK = 4096,
1903 LEAVE_NOTIFY_MASK = 8192,
1904 FOCUS_CHANGE_MASK = 16384,
1905 STRUCTURE_MASK = 32768,
1906 PROPERTY_CHANGE_MASK = 65536,
1907 VISIBILITY_NOTIFY_MASK = 131072,
1908 PROXIMITY_IN_MASK = 262144,
1909 PROXIMITY_OUT_MASK = 524288,
1910 SUBSTRUCTURE_MASK = 1048576,
1911 SCROLL_MASK = 2097152,
1912 ALL_EVENTS_MASK = 4194302
1914 struct EventMotion {
1915 EventType type;
1916 Window* window;
1917 byte send_event;
1918 uint time;
1919 double x, y;
1920 double* axes;
1921 uint state;
1922 short is_hint;
1923 Device* device;
1924 double x_root, y_root;
1927 struct EventNoExpose {
1928 EventType type;
1929 Window* window;
1930 byte send_event;
1933 struct EventOwnerChange {
1934 EventType type;
1935 Window* window;
1936 byte send_event;
1937 NativeWindow owner;
1938 OwnerChange reason;
1939 Atom selection;
1940 uint time, selection_time;
1943 struct EventProperty {
1944 EventType type;
1945 Window* window;
1946 byte send_event;
1947 Atom atom;
1948 uint time;
1949 uint state;
1952 struct EventProximity {
1953 EventType type;
1954 Window* window;
1955 byte send_event;
1956 uint time;
1957 Device* device;
1960 struct EventScroll {
1961 EventType type;
1962 Window* window;
1963 byte send_event;
1964 uint time;
1965 double x, y;
1966 uint state;
1967 ScrollDirection direction;
1968 Device* device;
1969 double x_root, y_root;
1972 struct EventSelection {
1973 EventType type;
1974 Window* window;
1975 byte send_event;
1976 Atom selection, target, property;
1977 uint time;
1978 NativeWindow requestor;
1981 struct EventSetting {
1982 EventType type;
1983 Window* window;
1984 byte send_event;
1985 SettingAction action;
1986 char* name;
1989 enum EventType {
1990 NOTHING = -1,
1991 DELETE = 0,
1992 DESTROY = 1,
1993 EXPOSE = 2,
1994 MOTION_NOTIFY = 3,
1995 BUTTON_PRESS = 4,
1996 _2BUTTON_PRESS = 5,
1997 _3BUTTON_PRESS = 6,
1998 BUTTON_RELEASE = 7,
1999 KEY_PRESS = 8,
2000 KEY_RELEASE = 9,
2001 ENTER_NOTIFY = 10,
2002 LEAVE_NOTIFY = 11,
2003 FOCUS_CHANGE = 12,
2004 CONFIGURE = 13,
2005 MAP = 14,
2006 UNMAP = 15,
2007 PROPERTY_NOTIFY = 16,
2008 SELECTION_CLEAR = 17,
2009 SELECTION_REQUEST = 18,
2010 SELECTION_NOTIFY = 19,
2011 PROXIMITY_IN = 20,
2012 PROXIMITY_OUT = 21,
2013 DRAG_ENTER = 22,
2014 DRAG_LEAVE = 23,
2015 DRAG_MOTION = 24,
2016 DRAG_STATUS = 25,
2017 DROP_START = 26,
2018 DROP_FINISHED = 27,
2019 CLIENT_EVENT = 28,
2020 VISIBILITY_NOTIFY = 29,
2021 NO_EXPOSE = 30,
2022 SCROLL = 31,
2023 WINDOW_STATE = 32,
2024 SETTING = 33,
2025 OWNER_CHANGE = 34,
2026 GRAB_BROKEN = 35,
2027 DAMAGE = 36,
2028 EVENT_LAST = 37
2030 struct EventVisibility {
2031 EventType type;
2032 Window* window;
2033 byte send_event;
2034 VisibilityState state;
2037 struct EventWindowState {
2038 EventType type;
2039 Window* window;
2040 byte send_event;
2041 WindowState changed_mask, new_window_state;
2044 enum ExtensionMode {
2045 NONE = 0,
2046 ALL = 1,
2047 CURSOR = 2
2049 enum Fill {
2050 SOLID = 0,
2051 TILED = 1,
2052 STIPPLED = 2,
2053 OPAQUE_STIPPLED = 3
2055 enum FillRule {
2056 EVEN_ODD_RULE = 0,
2057 WINDING_RULE = 1
2059 extern (C) alias FilterReturn function (XEvent* xevent, Event* event, void* data) FilterFunc;
2061 enum FilterReturn {
2062 CONTINUE = 0,
2063 TRANSLATE = 1,
2064 REMOVE = 2
2066 struct Font {
2067 FontType type;
2068 int ascent, descent;
2070 int equal()(Font* fontb) {
2071 return gdk_font_equal(&this, fontb);
2073 // Unintrospectable method: get_display() / gdk_font_get_display()
2074 Display* get_display()() {
2075 return gdk_font_get_display(&this);
2077 int id()() {
2078 return gdk_font_id(&this);
2081 // Increases the reference count of a font by one.
2082 // RETURNS: @font
2083 Font* /*new*/ ref_()() {
2084 return gdk_font_ref(&this);
2087 // Decreases the reference count of a font by one.
2088 // If the result is zero, destroys the font.
2089 void unref()() {
2090 gdk_font_unref(&this);
2094 enum FontType {
2095 FONT = 0,
2096 FONTSET = 1
2098 enum Function {
2099 COPY = 0,
2100 INVERT = 1,
2101 XOR = 2,
2102 CLEAR = 3,
2103 AND = 4,
2104 AND_REVERSE = 5,
2105 AND_INVERT = 6,
2106 NOOP = 7,
2107 OR = 8,
2108 EQUIV = 9,
2109 OR_REVERSE = 10,
2110 COPY_INVERT = 11,
2111 OR_INVERT = 12,
2112 NAND = 13,
2113 NOR = 14,
2114 SET = 15
2116 struct GC /* : GObject.Object */ {
2117 alias parent_instance this;
2118 alias parent_instance super_;
2119 alias parent_instance object;
2120 GObject2.Object parent_instance;
2121 int clip_x_origin, clip_y_origin, ts_x_origin, ts_y_origin;
2122 Colormap* colormap;
2125 // DEPRECATED (v2.22) constructor: new - Use Cairo for rendering.
2126 // Create a new graphics context with default values.
2127 // RETURNS: the new graphics context.
2128 // <drawable>: a #GdkDrawable. The created GC must always be used with drawables of the same depth as this one.
2129 static GC* /*new*/ new_()(Drawable* drawable) {
2130 return gdk_gc_new(drawable);
2133 // DEPRECATED (v2.22) constructor: new_with_values - Use Cairo for rendering.
2134 // Create a new GC with the given initial values.
2135 // RETURNS: the new graphics context.
2136 // <drawable>: a #GdkDrawable. The created GC must always be used with drawables of the same depth as this one.
2137 // <values>: a structure containing initial values for the GC.
2138 // <values_mask>: a bit mask indicating which fields in @values are set.
2139 static GC* /*new*/ new_with_values()(Drawable* drawable, GCValues* values, GCValuesMask values_mask) {
2140 return gdk_gc_new_with_values(drawable, values, values_mask);
2143 // DEPRECATED (v2.22) method: copy - Use Cairo for drawing. cairo_save() and cairo_restore()
2144 // Copy the set of values from one graphics context
2145 // onto another graphics context.
2146 // can be helpful in cases where you'd have copied a #GdkGC.
2147 // <src_gc>: the source graphics context.
2148 void copy()(GC* src_gc) {
2149 gdk_gc_copy(&this, src_gc);
2152 // Unintrospectable method: get_colormap() / gdk_gc_get_colormap()
2153 // DEPRECATED (v2.22) method: get_colormap - There is no replacement. Cairo handles colormaps
2154 // Retrieves the colormap for a given GC, if it exists.
2155 // A GC will have a colormap if the drawable for which it was created
2156 // has a colormap, or if a colormap was set explicitely with
2157 // gdk_gc_set_colormap.
2158 // automatically, so there is no need to care about them.
2159 // RETURNS: the colormap of @gc, or %NULL if @gc doesn't have one.
2160 Colormap* get_colormap()() {
2161 return gdk_gc_get_colormap(&this);
2164 // Unintrospectable method: get_screen() / gdk_gc_get_screen()
2165 // VERSION: 2.2
2166 // Gets the #GdkScreen for which @gc was created
2167 // RETURNS: the #GdkScreen for @gc.
2168 Screen* get_screen()() {
2169 return gdk_gc_get_screen(&this);
2172 // DEPRECATED (v2.22) method: get_values - Use Cairo for rendering.
2173 // Retrieves the current values from a graphics context. Note that
2174 // only the pixel values of the @values->foreground and @values->background
2175 // are filled, use gdk_colormap_query_color() to obtain the rgb values
2176 // if you need them.
2177 // <values>: the #GdkGCValues structure in which to store the results.
2178 void get_values()(GCValues* values) {
2179 gdk_gc_get_values(&this, values);
2182 // DEPRECATED (v2.22) method: offset - There is no direct replacement, as this is just a
2183 // Offset attributes such as the clip and tile-stipple origins
2184 // of the GC so that drawing at x - x_offset, y - y_offset with
2185 // the offset GC has the same effect as drawing at x, y with the original
2186 // GC.
2187 // convenience function for gdk_gc_set_ts_origin and gdk_gc_set_clip_origin().
2188 // <x_offset>: amount by which to offset the GC in the X direction
2189 // <y_offset>: amount by which to offset the GC in the Y direction
2190 void offset()(int x_offset, int y_offset) {
2191 gdk_gc_offset(&this, x_offset, y_offset);
2194 // Unintrospectable method: ref() / gdk_gc_ref()
2195 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
2196 // Deprecated function; use g_object_ref() instead.
2197 // RETURNS: the gc.
2198 GC* ref_()() {
2199 return gdk_gc_ref(&this);
2202 // DEPRECATED (v2.22) method: set_background - Use gdk_cairo_set_source_color() to use a #GdkColor
2203 // Sets the background color for a graphics context.
2204 // Note that this function uses @color->pixel, use
2205 // gdk_gc_set_rgb_bg_color() to specify the background
2206 // color as red, green, blue components.
2207 // as the source in Cairo. Note that if you want to draw a background and a
2208 // foreground in Cairo, you need to call drawing functions (like cairo_fill())
2209 // twice.
2210 // <color>: the new background color.
2211 void set_background()(Color* color) {
2212 gdk_gc_set_background(&this, color);
2215 // DEPRECATED (v2.22) method: set_clip_mask - Use cairo_mask() instead.
2216 // Sets the clip mask for a graphics context from a bitmap.
2217 // The clip mask is interpreted relative to the clip
2218 // origin. (See gdk_gc_set_clip_origin()).
2219 // <mask>: a bitmap.
2220 void set_clip_mask()(Bitmap* mask) {
2221 gdk_gc_set_clip_mask(&this, mask);
2224 // DEPRECATED (v2.22) method: set_clip_origin - Use cairo_translate() before applying the clip path in
2225 // Sets the origin of the clip mask. The coordinates are
2226 // interpreted relative to the upper-left corner of
2227 // the destination drawable of the current operation.
2228 // Cairo.
2229 // <x>: the x-coordinate of the origin.
2230 // <y>: the y-coordinate of the origin.
2231 void set_clip_origin()(int x, int y) {
2232 gdk_gc_set_clip_origin(&this, x, y);
2235 // DEPRECATED (v2.22) method: set_clip_rectangle - Use cairo_rectangle() and cairo_clip() in Cairo.
2236 // Sets the clip mask for a graphics context from a
2237 // rectangle. The clip mask is interpreted relative to the clip
2238 // origin. (See gdk_gc_set_clip_origin()).
2239 // <rectangle>: the rectangle to clip to.
2240 void set_clip_rectangle()(Rectangle* rectangle) {
2241 gdk_gc_set_clip_rectangle(&this, rectangle);
2244 // DEPRECATED (v2.22) method: set_clip_region - Use gdk_cairo_region() and cairo_clip() in Cairo.
2245 // Sets the clip mask for a graphics context from a region structure.
2246 // The clip mask is interpreted relative to the clip origin. (See
2247 // gdk_gc_set_clip_origin()).
2248 // <region>: the #GdkRegion.
2249 void set_clip_region()(Region* region) {
2250 gdk_gc_set_clip_region(&this, region);
2253 // DEPRECATED (v2.22) method: set_colormap - There is no replacement. Cairo handles colormaps
2254 // Sets the colormap for the GC to the given colormap. The depth
2255 // of the colormap's visual must match the depth of the drawable
2256 // for which the GC was created.
2257 // automatically, so there is no need to care about them.
2258 // <colormap>: a #GdkColormap
2259 void set_colormap()(Colormap* colormap) {
2260 gdk_gc_set_colormap(&this, colormap);
2263 // DEPRECATED (v2.22) method: set_dashes - Use cairo_set_dash() to set the dash in Cairo.
2264 // Sets the way dashed-lines are drawn. Lines will be
2265 // drawn with alternating on and off segments of the
2266 // lengths specified in @dash_list. The manner in
2267 // which the on and off segments are drawn is determined
2268 // by the @line_style value of the GC. (This can
2269 // be changed with gdk_gc_set_line_attributes().)
2270 // The @dash_offset defines the phase of the pattern,
2271 // specifying how many pixels into the dash-list the pattern
2272 // should actually begin.
2273 // <dash_offset>: the phase of the dash pattern.
2274 // <dash_list>: an array of dash lengths.
2275 // <n>: the number of elements in @dash_list.
2276 void set_dashes()(int dash_offset, byte dash_list, int n) {
2277 gdk_gc_set_dashes(&this, dash_offset, dash_list, n);
2280 // DEPRECATED (v2.22) method: set_exposures - There is no replacement. If you need to control
2281 // Sets whether copying non-visible portions of a drawable
2282 // using this graphics context generate exposure events
2283 // for the corresponding regions of the destination
2284 // drawable. (See gdk_draw_drawable()).
2285 // exposures, you must use drawing operations of the underlying window
2286 // system or use gdk_window_invalidate_rect(). Cairo will never
2287 // generate exposures.
2288 // <exposures>: if %TRUE, exposure events will be generated.
2289 void set_exposures()(int exposures) {
2290 gdk_gc_set_exposures(&this, exposures);
2293 // DEPRECATED (v2.22) method: set_fill - You can achieve tiling in Cairo by using
2294 // Set the fill mode for a graphics context.
2295 // cairo_pattern_set_extend() on the source. For stippling, see the
2296 // deprecation comments on gdk_gc_set_stipple().
2297 // <fill>: the new fill mode.
2298 void set_fill()(Fill fill) {
2299 gdk_gc_set_fill(&this, fill);
2302 // Sets the font for a graphics context. (Note that
2303 // all text-drawing functions in GDK take a @font
2304 // argument; the value set here is used when that
2305 // argument is %NULL.)
2306 // <font>: the new font.
2307 void set_font()(Font* font) {
2308 gdk_gc_set_font(&this, font);
2311 // DEPRECATED (v2.22) method: set_foreground - Use gdk_cairo_set_source_color() to use a #GdkColor
2312 // Sets the foreground color for a graphics context.
2313 // Note that this function uses @color->pixel, use
2314 // gdk_gc_set_rgb_fg_color() to specify the foreground
2315 // color as red, green, blue components.
2316 // as the source in Cairo.
2317 // <color>: the new foreground color.
2318 void set_foreground()(Color* color) {
2319 gdk_gc_set_foreground(&this, color);
2322 // DEPRECATED (v2.22) method: set_function - Use cairo_set_operator() with Cairo.
2323 // Determines how the current pixel values and the
2324 // pixel values being drawn are combined to produce
2325 // the final pixel values.
2326 // <function>: the #GdkFunction to use
2327 void set_function()(Function function_) {
2328 gdk_gc_set_function(&this, function_);
2331 // DEPRECATED (v2.22) method: set_line_attributes - Use the Cairo functions cairo_set_line_width(),
2332 // Sets various attributes of how lines are drawn. See
2333 // the corresponding members of #GdkGCValues for full
2334 // explanations of the arguments.
2335 // cairo_set_line_join(), cairo_set_line_cap() and cairo_set_dash()
2336 // to affect the stroking behavior in Cairo. Keep in mind that the default
2337 // attributes of a #cairo_t are different from the default attributes of
2338 // a #GdkGC.
2339 // <line_width>: the width of lines.
2340 // <line_style>: the dash-style for lines.
2341 // <cap_style>: the manner in which the ends of lines are drawn.
2342 // <join_style>: the in which lines are joined together.
2343 void set_line_attributes()(int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style) {
2344 gdk_gc_set_line_attributes(&this, line_width, line_style, cap_style, join_style);
2347 // DEPRECATED (v2.22) method: set_rgb_bg_color - Use gdk_cairo_set_source_color() instead.
2348 // Set the background color of a GC using an unallocated color. The
2349 // pixel value for the color will be determined using GdkRGB. If the
2350 // colormap for the GC has not previously been initialized for GdkRGB,
2351 // then for pseudo-color colormaps (colormaps with a small modifiable
2352 // number of colors), a colorcube will be allocated in the colormap.
2353 // Calling this function for a GC without a colormap is an error.
2354 // <color>: an unallocated #GdkColor.
2355 void set_rgb_bg_color()(Color* color) {
2356 gdk_gc_set_rgb_bg_color(&this, color);
2359 // DEPRECATED (v2.22) method: set_rgb_fg_color - Use gdk_cairo_set_source_color() instead.
2360 // Set the foreground color of a GC using an unallocated color. The
2361 // pixel value for the color will be determined using GdkRGB. If the
2362 // colormap for the GC has not previously been initialized for GdkRGB,
2363 // then for pseudo-color colormaps (colormaps with a small modifiable
2364 // number of colors), a colorcube will be allocated in the colormap.
2365 // Calling this function for a GC without a colormap is an error.
2366 // <color>: an unallocated #GdkColor.
2367 void set_rgb_fg_color()(Color* color) {
2368 gdk_gc_set_rgb_fg_color(&this, color);
2371 // DEPRECATED (v2.22) method: set_stipple - Stippling has no direct replacement in Cairo. If you
2372 // Set the stipple bitmap for a graphics context. The
2373 // stipple will only be used if the fill mode is
2374 // %GDK_STIPPLED or %GDK_OPAQUE_STIPPLED.
2375 // want to achieve an identical look, you can use the stipple bitmap as a
2376 // mask. Most likely, this involves rendering the source to an intermediate
2377 // surface using cairo_push_group() first, so that you can then use
2378 // cairo_mask() to achieve the stippled look.
2379 // <stipple>: the new stipple bitmap.
2380 void set_stipple()(Pixmap* stipple) {
2381 gdk_gc_set_stipple(&this, stipple);
2384 // DEPRECATED (v2.22) method: set_subwindow - There is no replacement. If you need to control
2385 // Sets how drawing with this GC on a window will affect child
2386 // windows of that window.
2387 // subwindows, you must use drawing operations of the underlying window
2388 // system manually. Cairo will always use %GDK_INCLUDE_INFERIORS on sources
2389 // and masks and %GDK_CLIP_BY_CHILDREN on targets.
2390 // <mode>: the subwindow mode.
2391 void set_subwindow()(SubwindowMode mode) {
2392 gdk_gc_set_subwindow(&this, mode);
2395 // DEPRECATED (v2.22) method: set_tile - The following code snippet sets a tiling #GdkPixmap
2396 // Set a tile pixmap for a graphics context.
2397 // This will only be used if the fill mode
2398 // is %GDK_TILED.
2399 // as the source in Cairo:
2400 // |[gdk_cairo_set_source_pixmap (cr, tile, ts_origin_x, ts_origin_y);
2401 // cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);]|
2402 // <tile>: the new tile pixmap.
2403 void set_tile()(Pixmap* tile) {
2404 gdk_gc_set_tile(&this, tile);
2407 // DEPRECATED (v2.22) method: set_ts_origin - You can set the origin for tiles and stipples in Cairo
2408 // Set the origin when using tiles or stipples with
2409 // the GC. The tile or stipple will be aligned such
2410 // that the upper left corner of the tile or stipple
2411 // will coincide with this point.
2412 // by changing the source's matrix using cairo_pattern_set_matrix(). Or you
2413 // can specify it with gdk_cairo_set_source_pixmap() as shown in the example
2414 // for gdk_gc_set_tile().
2415 // <x>: the x-coordinate of the origin.
2416 // <y>: the y-coordinate of the origin.
2417 void set_ts_origin()(int x, int y) {
2418 gdk_gc_set_ts_origin(&this, x, y);
2421 // DEPRECATED (v2.22) method: set_values - Use Cairo for rendering.
2422 // Sets attributes of a graphics context in bulk. For each flag set in
2423 // set as the new value for @gc. If you're only setting a few values
2424 // on @gc, calling individual "setter" functions is likely more
2425 // convenient.
2426 // <values>: struct containing the new values
2427 // <values_mask>: mask indicating which struct fields are to be used
2428 void set_values()(GCValues* values, GCValuesMask values_mask) {
2429 gdk_gc_set_values(&this, values, values_mask);
2432 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
2433 // Decrement the reference count of @gc.
2434 void unref()() {
2435 gdk_gc_unref(&this);
2439 struct GCClass {
2440 GObject2.ObjectClass parent_class;
2441 // <values>: the #GdkGCValues structure in which to store the results.
2442 extern (C) void function (GC* gc, GCValues* values) get_values;
2443 // <values>: struct containing the new values
2444 extern (C) void function (GC* gc, GCValues* values, GCValuesMask mask) set_values;
2446 // <dash_offset>: the phase of the dash pattern.
2447 // <dash_list>: an array of dash lengths.
2448 // <n>: the number of elements in @dash_list.
2449 extern (C) void function (GC* gc, int dash_offset, byte dash_list, int n) set_dashes;
2450 extern (C) void function () _gdk_reserved1;
2451 extern (C) void function () _gdk_reserved2;
2452 extern (C) void function () _gdk_reserved3;
2453 extern (C) void function () _gdk_reserved4;
2456 struct GCValues {
2457 Color foreground, background;
2458 Font* font;
2459 Function function_;
2460 Fill fill;
2461 Pixmap* tile, stipple, clip_mask;
2462 SubwindowMode subwindow_mode;
2463 int ts_x_origin, ts_y_origin, clip_x_origin, clip_y_origin, graphics_exposures, line_width;
2464 LineStyle line_style;
2465 CapStyle cap_style;
2466 JoinStyle join_style;
2469 enum GCValuesMask {
2470 FOREGROUND = 1,
2471 BACKGROUND = 2,
2472 FONT = 4,
2473 FUNCTION = 8,
2474 FILL = 16,
2475 TILE = 32,
2476 STIPPLE = 64,
2477 CLIP_MASK = 128,
2478 SUBWINDOW = 256,
2479 TS_X_ORIGIN = 512,
2480 TS_Y_ORIGIN = 1024,
2481 CLIP_X_ORIGIN = 2048,
2482 CLIP_Y_ORIGIN = 4096,
2483 EXPOSURES = 8192,
2484 LINE_WIDTH = 16384,
2485 LINE_STYLE = 32768,
2486 CAP_STYLE = 65536,
2487 JOIN_STYLE = 131072
2489 struct Geometry {
2490 int min_width, min_height, max_width, max_height, base_width, base_height, width_inc, height_inc;
2491 double min_aspect, max_aspect;
2492 Gravity win_gravity;
2495 enum GrabStatus {
2496 SUCCESS = 0,
2497 ALREADY_GRABBED = 1,
2498 INVALID_TIME = 2,
2499 NOT_VIEWABLE = 3,
2500 FROZEN = 4
2502 enum Gravity {
2503 NORTH_WEST = 1,
2504 NORTH = 2,
2505 NORTH_EAST = 3,
2506 WEST = 4,
2507 CENTER = 5,
2508 EAST = 6,
2509 SOUTH_WEST = 7,
2510 SOUTH = 8,
2511 SOUTH_EAST = 9,
2512 STATIC = 10
2514 struct Image /* : GObject.Object */ {
2515 alias parent_instance this;
2516 alias parent_instance super_;
2517 alias parent_instance object;
2518 GObject2.Object parent_instance;
2519 ImageType type;
2520 Visual* visual;
2521 ByteOrder byte_order;
2522 int width, height;
2523 ushort depth, bpp, bpl, bits_per_pixel;
2524 void* mem;
2525 Colormap* colormap;
2526 private void* windowing_data;
2528 static Image* /*new*/ new_()(ImageType type, Visual* visual, int width, int height) {
2529 return gdk_image_new(type, visual, width, height);
2532 // Unintrospectable function: get() / gdk_image_get()
2533 // This is a deprecated wrapper for gdk_drawable_get_image();
2534 // most cases gdk_pixbuf_get_from_drawable() is the most convenient
2535 // choice.
2536 // RETURNS: a new #GdkImage or %NULL
2537 // <drawable>: a #GdkDrawable
2538 // <x>: x coordinate in @window
2539 // <y>: y coordinate in @window
2540 // <width>: width of area in @window
2541 // <height>: height of area in @window
2542 static Image* get()(Drawable* drawable, int x, int y, int width, int height) {
2543 return gdk_image_get(drawable, x, y, width, height);
2546 // VERSION: 2.22
2547 // DEPRECATED (v2.22) method: get_bits_per_pixel - #GdkImage should not be used anymore.
2548 // Determines the number of bits per pixel of the image.
2549 // RETURNS: the bits per pixel
2550 ushort get_bits_per_pixel()() {
2551 return gdk_image_get_bits_per_pixel(&this);
2554 // VERSION: 2.22
2555 // DEPRECATED (v2.22) method: get_byte_order - #GdkImage should not be used anymore.
2556 // Determines the byte order of the image.
2557 // RETURNS: a #GdkVisual
2558 ByteOrder get_byte_order()() {
2559 return gdk_image_get_byte_order(&this);
2562 // VERSION: 2.22
2563 // DEPRECATED (v2.22) method: get_bytes_per_line - #GdkImage should not be used anymore.
2564 // Determines the number of bytes per line of the image.
2565 // RETURNS: the bytes per line
2566 ushort get_bytes_per_line()() {
2567 return gdk_image_get_bytes_per_line(&this);
2570 // VERSION: 2.22
2571 // DEPRECATED (v2.22) method: get_bytes_per_pixel - #GdkImage should not be used anymore.
2572 // Determines the number of bytes per pixel of the image.
2573 // RETURNS: the bytes per pixel
2574 ushort get_bytes_per_pixel()() {
2575 return gdk_image_get_bytes_per_pixel(&this);
2578 // Unintrospectable method: get_colormap() / gdk_image_get_colormap()
2579 // DEPRECATED (v2.22) method: get_colormap - #GdkImage should not be used anymore.
2580 // Retrieves the colormap for a given image, if it exists. An image
2581 // will have a colormap if the drawable from which it was created has
2582 // a colormap, or if a colormap was set explicitely with
2583 // gdk_image_set_colormap().
2584 // RETURNS: colormap for the image
2585 Colormap* get_colormap()() {
2586 return gdk_image_get_colormap(&this);
2589 // VERSION: 2.22
2590 // DEPRECATED (v2.22) method: get_depth - #GdkImage should not be used anymore.
2591 // Determines the depth of the image.
2592 // RETURNS: the depth
2593 ushort get_depth()() {
2594 return gdk_image_get_depth(&this);
2597 // VERSION: 2.22
2598 // DEPRECATED (v2.22) method: get_height - #GdkImage should not be used anymore.
2599 // Determines the height of the image.
2600 // RETURNS: the height
2601 int get_height()() {
2602 return gdk_image_get_height(&this);
2605 // VERSION: 2.22
2606 // DEPRECATED (v2.22) method: get_image_type - #GdkImage should not be used anymore.
2607 // Determines the type of a given image.
2608 // RETURNS: the #GdkImageType of the image
2609 ImageType get_image_type()() {
2610 return gdk_image_get_image_type(&this);
2612 uint get_pixel()(int x, int y) {
2613 return gdk_image_get_pixel(&this, x, y);
2616 // Unintrospectable method: get_pixels() / gdk_image_get_pixels()
2617 // VERSION: 2.22
2618 // DEPRECATED (v2.22) method: get_pixels - #GdkImage should not be used anymore.
2619 // Returns a pointer to the pixel data of the image.
2620 // RETURNS: the pixel data of the image
2621 void* get_pixels()() {
2622 return gdk_image_get_pixels(&this);
2625 // Unintrospectable method: get_visual() / gdk_image_get_visual()
2626 // VERSION: 2.22
2627 // DEPRECATED (v2.22) method: get_visual - #GdkImage should not be used anymore.
2628 // Determines the visual that was used to create the image.
2629 // RETURNS: a #GdkVisual
2630 Visual* get_visual()() {
2631 return gdk_image_get_visual(&this);
2634 // VERSION: 2.22
2635 // DEPRECATED (v2.22) method: get_width - #GdkImage should not be used anymore.
2636 // Determines the width of the image.
2637 // RETURNS: the width
2638 int get_width()() {
2639 return gdk_image_get_width(&this);
2641 void put_pixel()(int x, int y, uint pixel) {
2642 gdk_image_put_pixel(&this, x, y, pixel);
2645 // Unintrospectable method: ref() / gdk_image_ref()
2646 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
2647 // Deprecated function; use g_object_ref() instead.
2648 // RETURNS: the image
2649 Image* ref_()() {
2650 return gdk_image_ref(&this);
2653 // DEPRECATED (v2.22) method: set_colormap - #GdkImage should not be used anymore.
2654 // Sets the colormap for the image to the given colormap. Normally
2655 // there's no need to use this function, images are created with the
2656 // correct colormap if you get the image from a drawable. If you
2657 // create the image from scratch, use the colormap of the drawable you
2658 // intend to render the image to.
2659 // <colormap>: a #GdkColormap
2660 void set_colormap()(Colormap* colormap) {
2661 gdk_image_set_colormap(&this, colormap);
2664 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
2665 // Deprecated function; use g_object_unref() instead.
2666 void unref()() {
2667 gdk_image_unref(&this);
2671 struct ImageClass {
2672 GObject2.ObjectClass parent_class;
2675 enum ImageType {
2676 NORMAL = 0,
2677 SHARED = 1,
2678 FASTEST = 2
2680 enum InputCondition {
2681 READ = 1,
2682 WRITE = 2,
2683 EXCEPTION = 4
2685 extern (C) alias void function (void* data, int source, InputCondition condition) InputFunction;
2687 enum InputMode {
2688 DISABLED = 0,
2689 SCREEN = 1,
2690 WINDOW = 2
2692 enum InputSource {
2693 MOUSE = 0,
2694 PEN = 1,
2695 ERASER = 2,
2696 CURSOR = 3
2698 enum JoinStyle {
2699 MITER = 0,
2700 ROUND = 1,
2701 BEVEL = 2
2703 enum int KEY_0 = 48;
2704 enum int KEY_1 = 49;
2705 enum int KEY_2 = 50;
2706 enum int KEY_3 = 51;
2707 enum int KEY_3270_AltCursor = 64784;
2708 enum int KEY_3270_Attn = 64782;
2709 enum int KEY_3270_BackTab = 64773;
2710 enum int KEY_3270_ChangeScreen = 64793;
2711 enum int KEY_3270_Copy = 64789;
2712 enum int KEY_3270_CursorBlink = 64783;
2713 enum int KEY_3270_CursorSelect = 64796;
2714 enum int KEY_3270_DeleteWord = 64794;
2715 enum int KEY_3270_Duplicate = 64769;
2716 enum int KEY_3270_Enter = 64798;
2717 enum int KEY_3270_EraseEOF = 64774;
2718 enum int KEY_3270_EraseInput = 64775;
2719 enum int KEY_3270_ExSelect = 64795;
2720 enum int KEY_3270_FieldMark = 64770;
2721 enum int KEY_3270_Ident = 64787;
2722 enum int KEY_3270_Jump = 64786;
2723 enum int KEY_3270_KeyClick = 64785;
2724 enum int KEY_3270_Left2 = 64772;
2725 enum int KEY_3270_PA1 = 64778;
2726 enum int KEY_3270_PA2 = 64779;
2727 enum int KEY_3270_PA3 = 64780;
2728 enum int KEY_3270_Play = 64790;
2729 enum int KEY_3270_PrintScreen = 64797;
2730 enum int KEY_3270_Quit = 64777;
2731 enum int KEY_3270_Record = 64792;
2732 enum int KEY_3270_Reset = 64776;
2733 enum int KEY_3270_Right2 = 64771;
2734 enum int KEY_3270_Rule = 64788;
2735 enum int KEY_3270_Setup = 64791;
2736 enum int KEY_3270_Test = 64781;
2737 enum int KEY_4 = 52;
2738 enum int KEY_5 = 53;
2739 enum int KEY_6 = 54;
2740 enum int KEY_7 = 55;
2741 enum int KEY_8 = 56;
2742 enum int KEY_9 = 57;
2743 enum int KEY_A = 65;
2744 enum int KEY_AE = 198;
2745 enum int KEY_Aacute = 193;
2746 enum int KEY_Abelowdot = 16785056;
2747 enum int KEY_Abreve = 451;
2748 enum int KEY_Abreveacute = 16785070;
2749 enum int KEY_Abrevebelowdot = 16785078;
2750 enum int KEY_Abrevegrave = 16785072;
2751 enum int KEY_Abrevehook = 16785074;
2752 enum int KEY_Abrevetilde = 16785076;
2753 enum int KEY_AccessX_Enable = 65136;
2754 enum int KEY_AccessX_Feedback_Enable = 65137;
2755 enum int KEY_Acircumflex = 194;
2756 enum int KEY_Acircumflexacute = 16785060;
2757 enum int KEY_Acircumflexbelowdot = 16785068;
2758 enum int KEY_Acircumflexgrave = 16785062;
2759 enum int KEY_Acircumflexhook = 16785064;
2760 enum int KEY_Acircumflextilde = 16785066;
2761 enum int KEY_AddFavorite = 269025081;
2762 enum int KEY_Adiaeresis = 196;
2763 enum int KEY_Agrave = 192;
2764 enum int KEY_Ahook = 16785058;
2765 enum int KEY_Alt_L = 65513;
2766 enum int KEY_Alt_R = 65514;
2767 enum int KEY_Amacron = 960;
2768 enum int KEY_Aogonek = 417;
2769 enum int KEY_ApplicationLeft = 269025104;
2770 enum int KEY_ApplicationRight = 269025105;
2771 enum int KEY_Arabic_0 = 16778848;
2772 enum int KEY_Arabic_1 = 16778849;
2773 enum int KEY_Arabic_2 = 16778850;
2774 enum int KEY_Arabic_3 = 16778851;
2775 enum int KEY_Arabic_4 = 16778852;
2776 enum int KEY_Arabic_5 = 16778853;
2777 enum int KEY_Arabic_6 = 16778854;
2778 enum int KEY_Arabic_7 = 16778855;
2779 enum int KEY_Arabic_8 = 16778856;
2780 enum int KEY_Arabic_9 = 16778857;
2781 enum int KEY_Arabic_ain = 1497;
2782 enum int KEY_Arabic_alef = 1479;
2783 enum int KEY_Arabic_alefmaksura = 1513;
2784 enum int KEY_Arabic_beh = 1480;
2785 enum int KEY_Arabic_comma = 1452;
2786 enum int KEY_Arabic_dad = 1494;
2787 enum int KEY_Arabic_dal = 1487;
2788 enum int KEY_Arabic_damma = 1519;
2789 enum int KEY_Arabic_dammatan = 1516;
2790 enum int KEY_Arabic_ddal = 16778888;
2791 enum int KEY_Arabic_farsi_yeh = 16778956;
2792 enum int KEY_Arabic_fatha = 1518;
2793 enum int KEY_Arabic_fathatan = 1515;
2794 enum int KEY_Arabic_feh = 1505;
2795 enum int KEY_Arabic_fullstop = 16778964;
2796 enum int KEY_Arabic_gaf = 16778927;
2797 enum int KEY_Arabic_ghain = 1498;
2798 enum int KEY_Arabic_ha = 1511;
2799 enum int KEY_Arabic_hah = 1485;
2800 enum int KEY_Arabic_hamza = 1473;
2801 enum int KEY_Arabic_hamza_above = 16778836;
2802 enum int KEY_Arabic_hamza_below = 16778837;
2803 enum int KEY_Arabic_hamzaonalef = 1475;
2804 enum int KEY_Arabic_hamzaonwaw = 1476;
2805 enum int KEY_Arabic_hamzaonyeh = 1478;
2806 enum int KEY_Arabic_hamzaunderalef = 1477;
2807 enum int KEY_Arabic_heh = 1511;
2808 enum int KEY_Arabic_heh_doachashmee = 16778942;
2809 enum int KEY_Arabic_heh_goal = 16778945;
2810 enum int KEY_Arabic_jeem = 1484;
2811 enum int KEY_Arabic_jeh = 16778904;
2812 enum int KEY_Arabic_kaf = 1507;
2813 enum int KEY_Arabic_kasra = 1520;
2814 enum int KEY_Arabic_kasratan = 1517;
2815 enum int KEY_Arabic_keheh = 16778921;
2816 enum int KEY_Arabic_khah = 1486;
2817 enum int KEY_Arabic_lam = 1508;
2818 enum int KEY_Arabic_madda_above = 16778835;
2819 enum int KEY_Arabic_maddaonalef = 1474;
2820 enum int KEY_Arabic_meem = 1509;
2821 enum int KEY_Arabic_noon = 1510;
2822 enum int KEY_Arabic_noon_ghunna = 16778938;
2823 enum int KEY_Arabic_peh = 16778878;
2824 enum int KEY_Arabic_percent = 16778858;
2825 enum int KEY_Arabic_qaf = 1506;
2826 enum int KEY_Arabic_question_mark = 1471;
2827 enum int KEY_Arabic_ra = 1489;
2828 enum int KEY_Arabic_rreh = 16778897;
2829 enum int KEY_Arabic_sad = 1493;
2830 enum int KEY_Arabic_seen = 1491;
2831 enum int KEY_Arabic_semicolon = 1467;
2832 enum int KEY_Arabic_shadda = 1521;
2833 enum int KEY_Arabic_sheen = 1492;
2834 enum int KEY_Arabic_sukun = 1522;
2835 enum int KEY_Arabic_superscript_alef = 16778864;
2836 enum int KEY_Arabic_switch = 65406;
2837 enum int KEY_Arabic_tah = 1495;
2838 enum int KEY_Arabic_tatweel = 1504;
2839 enum int KEY_Arabic_tcheh = 16778886;
2840 enum int KEY_Arabic_teh = 1482;
2841 enum int KEY_Arabic_tehmarbuta = 1481;
2842 enum int KEY_Arabic_thal = 1488;
2843 enum int KEY_Arabic_theh = 1483;
2844 enum int KEY_Arabic_tteh = 16778873;
2845 enum int KEY_Arabic_veh = 16778916;
2846 enum int KEY_Arabic_waw = 1512;
2847 enum int KEY_Arabic_yeh = 1514;
2848 enum int KEY_Arabic_yeh_baree = 16778962;
2849 enum int KEY_Arabic_zah = 1496;
2850 enum int KEY_Arabic_zain = 1490;
2851 enum int KEY_Aring = 197;
2852 enum int KEY_Armenian_AT = 16778552;
2853 enum int KEY_Armenian_AYB = 16778545;
2854 enum int KEY_Armenian_BEN = 16778546;
2855 enum int KEY_Armenian_CHA = 16778569;
2856 enum int KEY_Armenian_DA = 16778548;
2857 enum int KEY_Armenian_DZA = 16778561;
2858 enum int KEY_Armenian_E = 16778551;
2859 enum int KEY_Armenian_FE = 16778582;
2860 enum int KEY_Armenian_GHAT = 16778562;
2861 enum int KEY_Armenian_GIM = 16778547;
2862 enum int KEY_Armenian_HI = 16778565;
2863 enum int KEY_Armenian_HO = 16778560;
2864 enum int KEY_Armenian_INI = 16778555;
2865 enum int KEY_Armenian_JE = 16778571;
2866 enum int KEY_Armenian_KE = 16778580;
2867 enum int KEY_Armenian_KEN = 16778559;
2868 enum int KEY_Armenian_KHE = 16778557;
2869 enum int KEY_Armenian_LYUN = 16778556;
2870 enum int KEY_Armenian_MEN = 16778564;
2871 enum int KEY_Armenian_NU = 16778566;
2872 enum int KEY_Armenian_O = 16778581;
2873 enum int KEY_Armenian_PE = 16778570;
2874 enum int KEY_Armenian_PYUR = 16778579;
2875 enum int KEY_Armenian_RA = 16778572;
2876 enum int KEY_Armenian_RE = 16778576;
2877 enum int KEY_Armenian_SE = 16778573;
2878 enum int KEY_Armenian_SHA = 16778567;
2879 enum int KEY_Armenian_TCHE = 16778563;
2880 enum int KEY_Armenian_TO = 16778553;
2881 enum int KEY_Armenian_TSA = 16778558;
2882 enum int KEY_Armenian_TSO = 16778577;
2883 enum int KEY_Armenian_TYUN = 16778575;
2884 enum int KEY_Armenian_VEV = 16778574;
2885 enum int KEY_Armenian_VO = 16778568;
2886 enum int KEY_Armenian_VYUN = 16778578;
2887 enum int KEY_Armenian_YECH = 16778549;
2888 enum int KEY_Armenian_ZA = 16778550;
2889 enum int KEY_Armenian_ZHE = 16778554;
2890 enum int KEY_Armenian_accent = 16778587;
2891 enum int KEY_Armenian_amanak = 16778588;
2892 enum int KEY_Armenian_apostrophe = 16778586;
2893 enum int KEY_Armenian_at = 16778600;
2894 enum int KEY_Armenian_ayb = 16778593;
2895 enum int KEY_Armenian_ben = 16778594;
2896 enum int KEY_Armenian_but = 16778589;
2897 enum int KEY_Armenian_cha = 16778617;
2898 enum int KEY_Armenian_da = 16778596;
2899 enum int KEY_Armenian_dza = 16778609;
2900 enum int KEY_Armenian_e = 16778599;
2901 enum int KEY_Armenian_exclam = 16778588;
2902 enum int KEY_Armenian_fe = 16778630;
2903 enum int KEY_Armenian_full_stop = 16778633;
2904 enum int KEY_Armenian_ghat = 16778610;
2905 enum int KEY_Armenian_gim = 16778595;
2906 enum int KEY_Armenian_hi = 16778613;
2907 enum int KEY_Armenian_ho = 16778608;
2908 enum int KEY_Armenian_hyphen = 16778634;
2909 enum int KEY_Armenian_ini = 16778603;
2910 enum int KEY_Armenian_je = 16778619;
2911 enum int KEY_Armenian_ke = 16778628;
2912 enum int KEY_Armenian_ken = 16778607;
2913 enum int KEY_Armenian_khe = 16778605;
2914 enum int KEY_Armenian_ligature_ew = 16778631;
2915 enum int KEY_Armenian_lyun = 16778604;
2916 enum int KEY_Armenian_men = 16778612;
2917 enum int KEY_Armenian_nu = 16778614;
2918 enum int KEY_Armenian_o = 16778629;
2919 enum int KEY_Armenian_paruyk = 16778590;
2920 enum int KEY_Armenian_pe = 16778618;
2921 enum int KEY_Armenian_pyur = 16778627;
2922 enum int KEY_Armenian_question = 16778590;
2923 enum int KEY_Armenian_ra = 16778620;
2924 enum int KEY_Armenian_re = 16778624;
2925 enum int KEY_Armenian_se = 16778621;
2926 enum int KEY_Armenian_separation_mark = 16778589;
2927 enum int KEY_Armenian_sha = 16778615;
2928 enum int KEY_Armenian_shesht = 16778587;
2929 enum int KEY_Armenian_tche = 16778611;
2930 enum int KEY_Armenian_to = 16778601;
2931 enum int KEY_Armenian_tsa = 16778606;
2932 enum int KEY_Armenian_tso = 16778625;
2933 enum int KEY_Armenian_tyun = 16778623;
2934 enum int KEY_Armenian_verjaket = 16778633;
2935 enum int KEY_Armenian_vev = 16778622;
2936 enum int KEY_Armenian_vo = 16778616;
2937 enum int KEY_Armenian_vyun = 16778626;
2938 enum int KEY_Armenian_yech = 16778597;
2939 enum int KEY_Armenian_yentamna = 16778634;
2940 enum int KEY_Armenian_za = 16778598;
2941 enum int KEY_Armenian_zhe = 16778602;
2942 enum int KEY_Atilde = 195;
2943 enum int KEY_AudibleBell_Enable = 65146;
2944 enum int KEY_AudioCycleTrack = 269025179;
2945 enum int KEY_AudioForward = 269025175;
2946 enum int KEY_AudioLowerVolume = 269025041;
2947 enum int KEY_AudioMedia = 269025074;
2948 enum int KEY_AudioMute = 269025042;
2949 enum int KEY_AudioNext = 269025047;
2950 enum int KEY_AudioPause = 269025073;
2951 enum int KEY_AudioPlay = 269025044;
2952 enum int KEY_AudioPrev = 269025046;
2953 enum int KEY_AudioRaiseVolume = 269025043;
2954 enum int KEY_AudioRandomPlay = 269025177;
2955 enum int KEY_AudioRecord = 269025052;
2956 enum int KEY_AudioRepeat = 269025176;
2957 enum int KEY_AudioRewind = 269025086;
2958 enum int KEY_AudioStop = 269025045;
2959 enum int KEY_Away = 269025165;
2960 enum int KEY_B = 66;
2961 enum int KEY_Babovedot = 16784898;
2962 enum int KEY_Back = 269025062;
2963 enum int KEY_BackForward = 269025087;
2964 enum int KEY_BackSpace = 65288;
2965 enum int KEY_Battery = 269025171;
2966 enum int KEY_Begin = 65368;
2967 enum int KEY_Blue = 269025190;
2968 enum int KEY_Bluetooth = 269025172;
2969 enum int KEY_Book = 269025106;
2970 enum int KEY_BounceKeys_Enable = 65140;
2971 enum int KEY_Break = 65387;
2972 enum int KEY_BrightnessAdjust = 269025083;
2973 enum int KEY_Byelorussian_SHORTU = 1726;
2974 enum int KEY_Byelorussian_shortu = 1710;
2975 enum int KEY_C = 67;
2976 enum int KEY_CD = 269025107;
2977 enum int KEY_Cabovedot = 709;
2978 enum int KEY_Cacute = 454;
2979 enum int KEY_Calculator = 269025053;
2980 enum int KEY_Calendar = 269025056;
2981 enum int KEY_Cancel = 65385;
2982 enum int KEY_Caps_Lock = 65509;
2983 enum int KEY_Ccaron = 456;
2984 enum int KEY_Ccedilla = 199;
2985 enum int KEY_Ccircumflex = 710;
2986 enum int KEY_Clear = 65291;
2987 enum int KEY_ClearGrab = 269024801;
2988 enum int KEY_Close = 269025110;
2989 enum int KEY_Codeinput = 65335;
2990 enum int KEY_ColonSign = 16785569;
2991 enum int KEY_Community = 269025085;
2992 enum int KEY_ContrastAdjust = 269025058;
2993 enum int KEY_Control_L = 65507;
2994 enum int KEY_Control_R = 65508;
2995 enum int KEY_Copy = 269025111;
2996 enum int KEY_CruzeiroSign = 16785570;
2997 enum int KEY_Cut = 269025112;
2998 enum int KEY_CycleAngle = 269025180;
2999 enum int KEY_Cyrillic_A = 1761;
3000 enum int KEY_Cyrillic_BE = 1762;
3001 enum int KEY_Cyrillic_CHE = 1790;
3002 enum int KEY_Cyrillic_CHE_descender = 16778422;
3003 enum int KEY_Cyrillic_CHE_vertstroke = 16778424;
3004 enum int KEY_Cyrillic_DE = 1764;
3005 enum int KEY_Cyrillic_DZHE = 1727;
3006 enum int KEY_Cyrillic_E = 1788;
3007 enum int KEY_Cyrillic_EF = 1766;
3008 enum int KEY_Cyrillic_EL = 1772;
3009 enum int KEY_Cyrillic_EM = 1773;
3010 enum int KEY_Cyrillic_EN = 1774;
3011 enum int KEY_Cyrillic_EN_descender = 16778402;
3012 enum int KEY_Cyrillic_ER = 1778;
3013 enum int KEY_Cyrillic_ES = 1779;
3014 enum int KEY_Cyrillic_GHE = 1767;
3015 enum int KEY_Cyrillic_GHE_bar = 16778386;
3016 enum int KEY_Cyrillic_HA = 1768;
3017 enum int KEY_Cyrillic_HARDSIGN = 1791;
3018 enum int KEY_Cyrillic_HA_descender = 16778418;
3019 enum int KEY_Cyrillic_I = 1769;
3020 enum int KEY_Cyrillic_IE = 1765;
3021 enum int KEY_Cyrillic_IO = 1715;
3022 enum int KEY_Cyrillic_I_macron = 16778466;
3023 enum int KEY_Cyrillic_JE = 1720;
3024 enum int KEY_Cyrillic_KA = 1771;
3025 enum int KEY_Cyrillic_KA_descender = 16778394;
3026 enum int KEY_Cyrillic_KA_vertstroke = 16778396;
3027 enum int KEY_Cyrillic_LJE = 1721;
3028 enum int KEY_Cyrillic_NJE = 1722;
3029 enum int KEY_Cyrillic_O = 1775;
3030 enum int KEY_Cyrillic_O_bar = 16778472;
3031 enum int KEY_Cyrillic_PE = 1776;
3032 enum int KEY_Cyrillic_SCHWA = 16778456;
3033 enum int KEY_Cyrillic_SHA = 1787;
3034 enum int KEY_Cyrillic_SHCHA = 1789;
3035 enum int KEY_Cyrillic_SHHA = 16778426;
3036 enum int KEY_Cyrillic_SHORTI = 1770;
3037 enum int KEY_Cyrillic_SOFTSIGN = 1784;
3038 enum int KEY_Cyrillic_TE = 1780;
3039 enum int KEY_Cyrillic_TSE = 1763;
3040 enum int KEY_Cyrillic_U = 1781;
3041 enum int KEY_Cyrillic_U_macron = 16778478;
3042 enum int KEY_Cyrillic_U_straight = 16778414;
3043 enum int KEY_Cyrillic_U_straight_bar = 16778416;
3044 enum int KEY_Cyrillic_VE = 1783;
3045 enum int KEY_Cyrillic_YA = 1777;
3046 enum int KEY_Cyrillic_YERU = 1785;
3047 enum int KEY_Cyrillic_YU = 1760;
3048 enum int KEY_Cyrillic_ZE = 1786;
3049 enum int KEY_Cyrillic_ZHE = 1782;
3050 enum int KEY_Cyrillic_ZHE_descender = 16778390;
3051 enum int KEY_Cyrillic_a = 1729;
3052 enum int KEY_Cyrillic_be = 1730;
3053 enum int KEY_Cyrillic_che = 1758;
3054 enum int KEY_Cyrillic_che_descender = 16778423;
3055 enum int KEY_Cyrillic_che_vertstroke = 16778425;
3056 enum int KEY_Cyrillic_de = 1732;
3057 enum int KEY_Cyrillic_dzhe = 1711;
3058 enum int KEY_Cyrillic_e = 1756;
3059 enum int KEY_Cyrillic_ef = 1734;
3060 enum int KEY_Cyrillic_el = 1740;
3061 enum int KEY_Cyrillic_em = 1741;
3062 enum int KEY_Cyrillic_en = 1742;
3063 enum int KEY_Cyrillic_en_descender = 16778403;
3064 enum int KEY_Cyrillic_er = 1746;
3065 enum int KEY_Cyrillic_es = 1747;
3066 enum int KEY_Cyrillic_ghe = 1735;
3067 enum int KEY_Cyrillic_ghe_bar = 16778387;
3068 enum int KEY_Cyrillic_ha = 1736;
3069 enum int KEY_Cyrillic_ha_descender = 16778419;
3070 enum int KEY_Cyrillic_hardsign = 1759;
3071 enum int KEY_Cyrillic_i = 1737;
3072 enum int KEY_Cyrillic_i_macron = 16778467;
3073 enum int KEY_Cyrillic_ie = 1733;
3074 enum int KEY_Cyrillic_io = 1699;
3075 enum int KEY_Cyrillic_je = 1704;
3076 enum int KEY_Cyrillic_ka = 1739;
3077 enum int KEY_Cyrillic_ka_descender = 16778395;
3078 enum int KEY_Cyrillic_ka_vertstroke = 16778397;
3079 enum int KEY_Cyrillic_lje = 1705;
3080 enum int KEY_Cyrillic_nje = 1706;
3081 enum int KEY_Cyrillic_o = 1743;
3082 enum int KEY_Cyrillic_o_bar = 16778473;
3083 enum int KEY_Cyrillic_pe = 1744;
3084 enum int KEY_Cyrillic_schwa = 16778457;
3085 enum int KEY_Cyrillic_sha = 1755;
3086 enum int KEY_Cyrillic_shcha = 1757;
3087 enum int KEY_Cyrillic_shha = 16778427;
3088 enum int KEY_Cyrillic_shorti = 1738;
3089 enum int KEY_Cyrillic_softsign = 1752;
3090 enum int KEY_Cyrillic_te = 1748;
3091 enum int KEY_Cyrillic_tse = 1731;
3092 enum int KEY_Cyrillic_u = 1749;
3093 enum int KEY_Cyrillic_u_macron = 16778479;
3094 enum int KEY_Cyrillic_u_straight = 16778415;
3095 enum int KEY_Cyrillic_u_straight_bar = 16778417;
3096 enum int KEY_Cyrillic_ve = 1751;
3097 enum int KEY_Cyrillic_ya = 1745;
3098 enum int KEY_Cyrillic_yeru = 1753;
3099 enum int KEY_Cyrillic_yu = 1728;
3100 enum int KEY_Cyrillic_ze = 1754;
3101 enum int KEY_Cyrillic_zhe = 1750;
3102 enum int KEY_Cyrillic_zhe_descender = 16778391;
3103 enum int KEY_D = 68;
3104 enum int KEY_DOS = 269025114;
3105 enum int KEY_Dabovedot = 16784906;
3106 enum int KEY_Dcaron = 463;
3107 enum int KEY_Delete = 65535;
3108 enum int KEY_Display = 269025113;
3109 enum int KEY_Documents = 269025115;
3110 enum int KEY_DongSign = 16785579;
3111 enum int KEY_Down = 65364;
3112 enum int KEY_Dstroke = 464;
3113 enum int KEY_E = 69;
3114 enum int KEY_ENG = 957;
3115 enum int KEY_ETH = 208;
3116 enum int KEY_Eabovedot = 972;
3117 enum int KEY_Eacute = 201;
3118 enum int KEY_Ebelowdot = 16785080;
3119 enum int KEY_Ecaron = 460;
3120 enum int KEY_Ecircumflex = 202;
3121 enum int KEY_Ecircumflexacute = 16785086;
3122 enum int KEY_Ecircumflexbelowdot = 16785094;
3123 enum int KEY_Ecircumflexgrave = 16785088;
3124 enum int KEY_Ecircumflexhook = 16785090;
3125 enum int KEY_Ecircumflextilde = 16785092;
3126 enum int KEY_EcuSign = 16785568;
3127 enum int KEY_Ediaeresis = 203;
3128 enum int KEY_Egrave = 200;
3129 enum int KEY_Ehook = 16785082;
3130 enum int KEY_Eisu_Shift = 65327;
3131 enum int KEY_Eisu_toggle = 65328;
3132 enum int KEY_Eject = 269025068;
3133 enum int KEY_Emacron = 938;
3134 enum int KEY_End = 65367;
3135 enum int KEY_Eogonek = 458;
3136 enum int KEY_Escape = 65307;
3137 enum int KEY_Eth = 208;
3138 enum int KEY_Etilde = 16785084;
3139 enum int KEY_EuroSign = 8364;
3140 enum int KEY_Excel = 269025116;
3141 enum int KEY_Execute = 65378;
3142 enum int KEY_Explorer = 269025117;
3143 enum int KEY_F = 70;
3144 enum int KEY_F1 = 65470;
3145 enum int KEY_F10 = 65479;
3146 enum int KEY_F11 = 65480;
3147 enum int KEY_F12 = 65481;
3148 enum int KEY_F13 = 65482;
3149 enum int KEY_F14 = 65483;
3150 enum int KEY_F15 = 65484;
3151 enum int KEY_F16 = 65485;
3152 enum int KEY_F17 = 65486;
3153 enum int KEY_F18 = 65487;
3154 enum int KEY_F19 = 65488;
3155 enum int KEY_F2 = 65471;
3156 enum int KEY_F20 = 65489;
3157 enum int KEY_F21 = 65490;
3158 enum int KEY_F22 = 65491;
3159 enum int KEY_F23 = 65492;
3160 enum int KEY_F24 = 65493;
3161 enum int KEY_F25 = 65494;
3162 enum int KEY_F26 = 65495;
3163 enum int KEY_F27 = 65496;
3164 enum int KEY_F28 = 65497;
3165 enum int KEY_F29 = 65498;
3166 enum int KEY_F3 = 65472;
3167 enum int KEY_F30 = 65499;
3168 enum int KEY_F31 = 65500;
3169 enum int KEY_F32 = 65501;
3170 enum int KEY_F33 = 65502;
3171 enum int KEY_F34 = 65503;
3172 enum int KEY_F35 = 65504;
3173 enum int KEY_F4 = 65473;
3174 enum int KEY_F5 = 65474;
3175 enum int KEY_F6 = 65475;
3176 enum int KEY_F7 = 65476;
3177 enum int KEY_F8 = 65477;
3178 enum int KEY_F9 = 65478;
3179 enum int KEY_FFrancSign = 16785571;
3180 enum int KEY_Fabovedot = 16784926;
3181 enum int KEY_Farsi_0 = 16778992;
3182 enum int KEY_Farsi_1 = 16778993;
3183 enum int KEY_Farsi_2 = 16778994;
3184 enum int KEY_Farsi_3 = 16778995;
3185 enum int KEY_Farsi_4 = 16778996;
3186 enum int KEY_Farsi_5 = 16778997;
3187 enum int KEY_Farsi_6 = 16778998;
3188 enum int KEY_Farsi_7 = 16778999;
3189 enum int KEY_Farsi_8 = 16779000;
3190 enum int KEY_Farsi_9 = 16779001;
3191 enum int KEY_Farsi_yeh = 16778956;
3192 enum int KEY_Favorites = 269025072;
3193 enum int KEY_Finance = 269025084;
3194 enum int KEY_Find = 65384;
3195 enum int KEY_First_Virtual_Screen = 65232;
3196 enum int KEY_Forward = 269025063;
3197 enum int KEY_FrameBack = 269025181;
3198 enum int KEY_FrameForward = 269025182;
3199 enum int KEY_G = 71;
3200 enum int KEY_Gabovedot = 725;
3201 enum int KEY_Game = 269025118;
3202 enum int KEY_Gbreve = 683;
3203 enum int KEY_Gcaron = 16777702;
3204 enum int KEY_Gcedilla = 939;
3205 enum int KEY_Gcircumflex = 728;
3206 enum int KEY_Georgian_an = 16781520;
3207 enum int KEY_Georgian_ban = 16781521;
3208 enum int KEY_Georgian_can = 16781546;
3209 enum int KEY_Georgian_char = 16781549;
3210 enum int KEY_Georgian_chin = 16781545;
3211 enum int KEY_Georgian_cil = 16781548;
3212 enum int KEY_Georgian_don = 16781523;
3213 enum int KEY_Georgian_en = 16781524;
3214 enum int KEY_Georgian_fi = 16781558;
3215 enum int KEY_Georgian_gan = 16781522;
3216 enum int KEY_Georgian_ghan = 16781542;
3217 enum int KEY_Georgian_hae = 16781552;
3218 enum int KEY_Georgian_har = 16781556;
3219 enum int KEY_Georgian_he = 16781553;
3220 enum int KEY_Georgian_hie = 16781554;
3221 enum int KEY_Georgian_hoe = 16781557;
3222 enum int KEY_Georgian_in = 16781528;
3223 enum int KEY_Georgian_jhan = 16781551;
3224 enum int KEY_Georgian_jil = 16781547;
3225 enum int KEY_Georgian_kan = 16781529;
3226 enum int KEY_Georgian_khar = 16781541;
3227 enum int KEY_Georgian_las = 16781530;
3228 enum int KEY_Georgian_man = 16781531;
3229 enum int KEY_Georgian_nar = 16781532;
3230 enum int KEY_Georgian_on = 16781533;
3231 enum int KEY_Georgian_par = 16781534;
3232 enum int KEY_Georgian_phar = 16781540;
3233 enum int KEY_Georgian_qar = 16781543;
3234 enum int KEY_Georgian_rae = 16781536;
3235 enum int KEY_Georgian_san = 16781537;
3236 enum int KEY_Georgian_shin = 16781544;
3237 enum int KEY_Georgian_tan = 16781527;
3238 enum int KEY_Georgian_tar = 16781538;
3239 enum int KEY_Georgian_un = 16781539;
3240 enum int KEY_Georgian_vin = 16781525;
3241 enum int KEY_Georgian_we = 16781555;
3242 enum int KEY_Georgian_xan = 16781550;
3243 enum int KEY_Georgian_zen = 16781526;
3244 enum int KEY_Georgian_zhar = 16781535;
3245 enum int KEY_Go = 269025119;
3246 enum int KEY_Greek_ALPHA = 1985;
3247 enum int KEY_Greek_ALPHAaccent = 1953;
3248 enum int KEY_Greek_BETA = 1986;
3249 enum int KEY_Greek_CHI = 2007;
3250 enum int KEY_Greek_DELTA = 1988;
3251 enum int KEY_Greek_EPSILON = 1989;
3252 enum int KEY_Greek_EPSILONaccent = 1954;
3253 enum int KEY_Greek_ETA = 1991;
3254 enum int KEY_Greek_ETAaccent = 1955;
3255 enum int KEY_Greek_GAMMA = 1987;
3256 enum int KEY_Greek_IOTA = 1993;
3257 enum int KEY_Greek_IOTAaccent = 1956;
3258 enum int KEY_Greek_IOTAdiaeresis = 1957;
3259 enum int KEY_Greek_IOTAdieresis = 1957;
3260 enum int KEY_Greek_KAPPA = 1994;
3261 enum int KEY_Greek_LAMBDA = 1995;
3262 enum int KEY_Greek_LAMDA = 1995;
3263 enum int KEY_Greek_MU = 1996;
3264 enum int KEY_Greek_NU = 1997;
3265 enum int KEY_Greek_OMEGA = 2009;
3266 enum int KEY_Greek_OMEGAaccent = 1963;
3267 enum int KEY_Greek_OMICRON = 1999;
3268 enum int KEY_Greek_OMICRONaccent = 1959;
3269 enum int KEY_Greek_PHI = 2006;
3270 enum int KEY_Greek_PI = 2000;
3271 enum int KEY_Greek_PSI = 2008;
3272 enum int KEY_Greek_RHO = 2001;
3273 enum int KEY_Greek_SIGMA = 2002;
3274 enum int KEY_Greek_TAU = 2004;
3275 enum int KEY_Greek_THETA = 1992;
3276 enum int KEY_Greek_UPSILON = 2005;
3277 enum int KEY_Greek_UPSILONaccent = 1960;
3278 enum int KEY_Greek_UPSILONdieresis = 1961;
3279 enum int KEY_Greek_XI = 1998;
3280 enum int KEY_Greek_ZETA = 1990;
3281 enum int KEY_Greek_accentdieresis = 1966;
3282 enum int KEY_Greek_alpha = 2017;
3283 enum int KEY_Greek_alphaaccent = 1969;
3284 enum int KEY_Greek_beta = 2018;
3285 enum int KEY_Greek_chi = 2039;
3286 enum int KEY_Greek_delta = 2020;
3287 enum int KEY_Greek_epsilon = 2021;
3288 enum int KEY_Greek_epsilonaccent = 1970;
3289 enum int KEY_Greek_eta = 2023;
3290 enum int KEY_Greek_etaaccent = 1971;
3291 enum int KEY_Greek_finalsmallsigma = 2035;
3292 enum int KEY_Greek_gamma = 2019;
3293 enum int KEY_Greek_horizbar = 1967;
3294 enum int KEY_Greek_iota = 2025;
3295 enum int KEY_Greek_iotaaccent = 1972;
3296 enum int KEY_Greek_iotaaccentdieresis = 1974;
3297 enum int KEY_Greek_iotadieresis = 1973;
3298 enum int KEY_Greek_kappa = 2026;
3299 enum int KEY_Greek_lambda = 2027;
3300 enum int KEY_Greek_lamda = 2027;
3301 enum int KEY_Greek_mu = 2028;
3302 enum int KEY_Greek_nu = 2029;
3303 enum int KEY_Greek_omega = 2041;
3304 enum int KEY_Greek_omegaaccent = 1979;
3305 enum int KEY_Greek_omicron = 2031;
3306 enum int KEY_Greek_omicronaccent = 1975;
3307 enum int KEY_Greek_phi = 2038;
3308 enum int KEY_Greek_pi = 2032;
3309 enum int KEY_Greek_psi = 2040;
3310 enum int KEY_Greek_rho = 2033;
3311 enum int KEY_Greek_sigma = 2034;
3312 enum int KEY_Greek_switch = 65406;
3313 enum int KEY_Greek_tau = 2036;
3314 enum int KEY_Greek_theta = 2024;
3315 enum int KEY_Greek_upsilon = 2037;
3316 enum int KEY_Greek_upsilonaccent = 1976;
3317 enum int KEY_Greek_upsilonaccentdieresis = 1978;
3318 enum int KEY_Greek_upsilondieresis = 1977;
3319 enum int KEY_Greek_xi = 2030;
3320 enum int KEY_Greek_zeta = 2022;
3321 enum int KEY_Green = 269025188;
3322 enum int KEY_H = 72;
3323 enum int KEY_Hangul = 65329;
3324 enum int KEY_Hangul_A = 3775;
3325 enum int KEY_Hangul_AE = 3776;
3326 enum int KEY_Hangul_AraeA = 3830;
3327 enum int KEY_Hangul_AraeAE = 3831;
3328 enum int KEY_Hangul_Banja = 65337;
3329 enum int KEY_Hangul_Cieuc = 3770;
3330 enum int KEY_Hangul_Codeinput = 65335;
3331 enum int KEY_Hangul_Dikeud = 3751;
3332 enum int KEY_Hangul_E = 3780;
3333 enum int KEY_Hangul_EO = 3779;
3334 enum int KEY_Hangul_EU = 3793;
3335 enum int KEY_Hangul_End = 65331;
3336 enum int KEY_Hangul_Hanja = 65332;
3337 enum int KEY_Hangul_Hieuh = 3774;
3338 enum int KEY_Hangul_I = 3795;
3339 enum int KEY_Hangul_Ieung = 3767;
3340 enum int KEY_Hangul_J_Cieuc = 3818;
3341 enum int KEY_Hangul_J_Dikeud = 3802;
3342 enum int KEY_Hangul_J_Hieuh = 3822;
3343 enum int KEY_Hangul_J_Ieung = 3816;
3344 enum int KEY_Hangul_J_Jieuj = 3817;
3345 enum int KEY_Hangul_J_Khieuq = 3819;
3346 enum int KEY_Hangul_J_Kiyeog = 3796;
3347 enum int KEY_Hangul_J_KiyeogSios = 3798;
3348 enum int KEY_Hangul_J_KkogjiDalrinIeung = 3833;
3349 enum int KEY_Hangul_J_Mieum = 3811;
3350 enum int KEY_Hangul_J_Nieun = 3799;
3351 enum int KEY_Hangul_J_NieunHieuh = 3801;
3352 enum int KEY_Hangul_J_NieunJieuj = 3800;
3353 enum int KEY_Hangul_J_PanSios = 3832;
3354 enum int KEY_Hangul_J_Phieuf = 3821;
3355 enum int KEY_Hangul_J_Pieub = 3812;
3356 enum int KEY_Hangul_J_PieubSios = 3813;
3357 enum int KEY_Hangul_J_Rieul = 3803;
3358 enum int KEY_Hangul_J_RieulHieuh = 3810;
3359 enum int KEY_Hangul_J_RieulKiyeog = 3804;
3360 enum int KEY_Hangul_J_RieulMieum = 3805;
3361 enum int KEY_Hangul_J_RieulPhieuf = 3809;
3362 enum int KEY_Hangul_J_RieulPieub = 3806;
3363 enum int KEY_Hangul_J_RieulSios = 3807;
3364 enum int KEY_Hangul_J_RieulTieut = 3808;
3365 enum int KEY_Hangul_J_Sios = 3814;
3366 enum int KEY_Hangul_J_SsangKiyeog = 3797;
3367 enum int KEY_Hangul_J_SsangSios = 3815;
3368 enum int KEY_Hangul_J_Tieut = 3820;
3369 enum int KEY_Hangul_J_YeorinHieuh = 3834;
3370 enum int KEY_Hangul_Jamo = 65333;
3371 enum int KEY_Hangul_Jeonja = 65336;
3372 enum int KEY_Hangul_Jieuj = 3768;
3373 enum int KEY_Hangul_Khieuq = 3771;
3374 enum int KEY_Hangul_Kiyeog = 3745;
3375 enum int KEY_Hangul_KiyeogSios = 3747;
3376 enum int KEY_Hangul_KkogjiDalrinIeung = 3827;
3377 enum int KEY_Hangul_Mieum = 3761;
3378 enum int KEY_Hangul_MultipleCandidate = 65341;
3379 enum int KEY_Hangul_Nieun = 3748;
3380 enum int KEY_Hangul_NieunHieuh = 3750;
3381 enum int KEY_Hangul_NieunJieuj = 3749;
3382 enum int KEY_Hangul_O = 3783;
3383 enum int KEY_Hangul_OE = 3786;
3384 enum int KEY_Hangul_PanSios = 3826;
3385 enum int KEY_Hangul_Phieuf = 3773;
3386 enum int KEY_Hangul_Pieub = 3762;
3387 enum int KEY_Hangul_PieubSios = 3764;
3388 enum int KEY_Hangul_PostHanja = 65339;
3389 enum int KEY_Hangul_PreHanja = 65338;
3390 enum int KEY_Hangul_PreviousCandidate = 65342;
3391 enum int KEY_Hangul_Rieul = 3753;
3392 enum int KEY_Hangul_RieulHieuh = 3760;
3393 enum int KEY_Hangul_RieulKiyeog = 3754;
3394 enum int KEY_Hangul_RieulMieum = 3755;
3395 enum int KEY_Hangul_RieulPhieuf = 3759;
3396 enum int KEY_Hangul_RieulPieub = 3756;
3397 enum int KEY_Hangul_RieulSios = 3757;
3398 enum int KEY_Hangul_RieulTieut = 3758;
3399 enum int KEY_Hangul_RieulYeorinHieuh = 3823;
3400 enum int KEY_Hangul_Romaja = 65334;
3401 enum int KEY_Hangul_SingleCandidate = 65340;
3402 enum int KEY_Hangul_Sios = 3765;
3403 enum int KEY_Hangul_Special = 65343;
3404 enum int KEY_Hangul_SsangDikeud = 3752;
3405 enum int KEY_Hangul_SsangJieuj = 3769;
3406 enum int KEY_Hangul_SsangKiyeog = 3746;
3407 enum int KEY_Hangul_SsangPieub = 3763;
3408 enum int KEY_Hangul_SsangSios = 3766;
3409 enum int KEY_Hangul_Start = 65330;
3410 enum int KEY_Hangul_SunkyeongeumMieum = 3824;
3411 enum int KEY_Hangul_SunkyeongeumPhieuf = 3828;
3412 enum int KEY_Hangul_SunkyeongeumPieub = 3825;
3413 enum int KEY_Hangul_Tieut = 3772;
3414 enum int KEY_Hangul_U = 3788;
3415 enum int KEY_Hangul_WA = 3784;
3416 enum int KEY_Hangul_WAE = 3785;
3417 enum int KEY_Hangul_WE = 3790;
3418 enum int KEY_Hangul_WEO = 3789;
3419 enum int KEY_Hangul_WI = 3791;
3420 enum int KEY_Hangul_YA = 3777;
3421 enum int KEY_Hangul_YAE = 3778;
3422 enum int KEY_Hangul_YE = 3782;
3423 enum int KEY_Hangul_YEO = 3781;
3424 enum int KEY_Hangul_YI = 3794;
3425 enum int KEY_Hangul_YO = 3787;
3426 enum int KEY_Hangul_YU = 3792;
3427 enum int KEY_Hangul_YeorinHieuh = 3829;
3428 enum int KEY_Hangul_switch = 65406;
3429 enum int KEY_Hankaku = 65321;
3430 enum int KEY_Hcircumflex = 678;
3431 enum int KEY_Hebrew_switch = 65406;
3432 enum int KEY_Help = 65386;
3433 enum int KEY_Henkan = 65315;
3434 enum int KEY_Henkan_Mode = 65315;
3435 enum int KEY_Hibernate = 269025192;
3436 enum int KEY_Hiragana = 65317;
3437 enum int KEY_Hiragana_Katakana = 65319;
3438 enum int KEY_History = 269025079;
3439 enum int KEY_Home = 65360;
3440 enum int KEY_HomePage = 269025048;
3441 enum int KEY_HotLinks = 269025082;
3442 enum int KEY_Hstroke = 673;
3443 enum int KEY_Hyper_L = 65517;
3444 enum int KEY_Hyper_R = 65518;
3445 enum int KEY_I = 73;
3446 enum int KEY_ISO_Center_Object = 65075;
3447 enum int KEY_ISO_Continuous_Underline = 65072;
3448 enum int KEY_ISO_Discontinuous_Underline = 65073;
3449 enum int KEY_ISO_Emphasize = 65074;
3450 enum int KEY_ISO_Enter = 65076;
3451 enum int KEY_ISO_Fast_Cursor_Down = 65071;
3452 enum int KEY_ISO_Fast_Cursor_Left = 65068;
3453 enum int KEY_ISO_Fast_Cursor_Right = 65069;
3454 enum int KEY_ISO_Fast_Cursor_Up = 65070;
3455 enum int KEY_ISO_First_Group = 65036;
3456 enum int KEY_ISO_First_Group_Lock = 65037;
3457 enum int KEY_ISO_Group_Latch = 65030;
3458 enum int KEY_ISO_Group_Lock = 65031;
3459 enum int KEY_ISO_Group_Shift = 65406;
3460 enum int KEY_ISO_Last_Group = 65038;
3461 enum int KEY_ISO_Last_Group_Lock = 65039;
3462 enum int KEY_ISO_Left_Tab = 65056;
3463 enum int KEY_ISO_Level2_Latch = 65026;
3464 enum int KEY_ISO_Level3_Latch = 65028;
3465 enum int KEY_ISO_Level3_Lock = 65029;
3466 enum int KEY_ISO_Level3_Shift = 65027;
3467 enum int KEY_ISO_Level5_Latch = 65042;
3468 enum int KEY_ISO_Level5_Lock = 65043;
3469 enum int KEY_ISO_Level5_Shift = 65041;
3470 enum int KEY_ISO_Lock = 65025;
3471 enum int KEY_ISO_Move_Line_Down = 65058;
3472 enum int KEY_ISO_Move_Line_Up = 65057;
3473 enum int KEY_ISO_Next_Group = 65032;
3474 enum int KEY_ISO_Next_Group_Lock = 65033;
3475 enum int KEY_ISO_Partial_Line_Down = 65060;
3476 enum int KEY_ISO_Partial_Line_Up = 65059;
3477 enum int KEY_ISO_Partial_Space_Left = 65061;
3478 enum int KEY_ISO_Partial_Space_Right = 65062;
3479 enum int KEY_ISO_Prev_Group = 65034;
3480 enum int KEY_ISO_Prev_Group_Lock = 65035;
3481 enum int KEY_ISO_Release_Both_Margins = 65067;
3482 enum int KEY_ISO_Release_Margin_Left = 65065;
3483 enum int KEY_ISO_Release_Margin_Right = 65066;
3484 enum int KEY_ISO_Set_Margin_Left = 65063;
3485 enum int KEY_ISO_Set_Margin_Right = 65064;
3486 enum int KEY_Iabovedot = 681;
3487 enum int KEY_Iacute = 205;
3488 enum int KEY_Ibelowdot = 16785098;
3489 enum int KEY_Ibreve = 16777516;
3490 enum int KEY_Icircumflex = 206;
3491 enum int KEY_Idiaeresis = 207;
3492 enum int KEY_Igrave = 204;
3493 enum int KEY_Ihook = 16785096;
3494 enum int KEY_Imacron = 975;
3495 enum int KEY_Insert = 65379;
3496 enum int KEY_Iogonek = 967;
3497 enum int KEY_Itilde = 933;
3498 enum int KEY_J = 74;
3499 enum int KEY_Jcircumflex = 684;
3500 enum int KEY_K = 75;
3501 enum int KEY_KP_0 = 65456;
3502 enum int KEY_KP_1 = 65457;
3503 enum int KEY_KP_2 = 65458;
3504 enum int KEY_KP_3 = 65459;
3505 enum int KEY_KP_4 = 65460;
3506 enum int KEY_KP_5 = 65461;
3507 enum int KEY_KP_6 = 65462;
3508 enum int KEY_KP_7 = 65463;
3509 enum int KEY_KP_8 = 65464;
3510 enum int KEY_KP_9 = 65465;
3511 enum int KEY_KP_Add = 65451;
3512 enum int KEY_KP_Begin = 65437;
3513 enum int KEY_KP_Decimal = 65454;
3514 enum int KEY_KP_Delete = 65439;
3515 enum int KEY_KP_Divide = 65455;
3516 enum int KEY_KP_Down = 65433;
3517 enum int KEY_KP_End = 65436;
3518 enum int KEY_KP_Enter = 65421;
3519 enum int KEY_KP_Equal = 65469;
3520 enum int KEY_KP_F1 = 65425;
3521 enum int KEY_KP_F2 = 65426;
3522 enum int KEY_KP_F3 = 65427;
3523 enum int KEY_KP_F4 = 65428;
3524 enum int KEY_KP_Home = 65429;
3525 enum int KEY_KP_Insert = 65438;
3526 enum int KEY_KP_Left = 65430;
3527 enum int KEY_KP_Multiply = 65450;
3528 enum int KEY_KP_Next = 65435;
3529 enum int KEY_KP_Page_Down = 65435;
3530 enum int KEY_KP_Page_Up = 65434;
3531 enum int KEY_KP_Prior = 65434;
3532 enum int KEY_KP_Right = 65432;
3533 enum int KEY_KP_Separator = 65452;
3534 enum int KEY_KP_Space = 65408;
3535 enum int KEY_KP_Subtract = 65453;
3536 enum int KEY_KP_Tab = 65417;
3537 enum int KEY_KP_Up = 65431;
3538 enum int KEY_Kana_Lock = 65325;
3539 enum int KEY_Kana_Shift = 65326;
3540 enum int KEY_Kanji = 65313;
3541 enum int KEY_Kanji_Bangou = 65335;
3542 enum int KEY_Katakana = 65318;
3543 enum int KEY_KbdBrightnessDown = 269025030;
3544 enum int KEY_KbdBrightnessUp = 269025029;
3545 enum int KEY_KbdLightOnOff = 269025028;
3546 enum int KEY_Kcedilla = 979;
3547 enum int KEY_Korean_Won = 3839;
3548 enum int KEY_L = 76;
3549 enum int KEY_L1 = 65480;
3550 enum int KEY_L10 = 65489;
3551 enum int KEY_L2 = 65481;
3552 enum int KEY_L3 = 65482;
3553 enum int KEY_L4 = 65483;
3554 enum int KEY_L5 = 65484;
3555 enum int KEY_L6 = 65485;
3556 enum int KEY_L7 = 65486;
3557 enum int KEY_L8 = 65487;
3558 enum int KEY_L9 = 65488;
3559 enum int KEY_Lacute = 453;
3560 enum int KEY_Last_Virtual_Screen = 65236;
3561 enum int KEY_Launch0 = 269025088;
3562 enum int KEY_Launch1 = 269025089;
3563 enum int KEY_Launch2 = 269025090;
3564 enum int KEY_Launch3 = 269025091;
3565 enum int KEY_Launch4 = 269025092;
3566 enum int KEY_Launch5 = 269025093;
3567 enum int KEY_Launch6 = 269025094;
3568 enum int KEY_Launch7 = 269025095;
3569 enum int KEY_Launch8 = 269025096;
3570 enum int KEY_Launch9 = 269025097;
3571 enum int KEY_LaunchA = 269025098;
3572 enum int KEY_LaunchB = 269025099;
3573 enum int KEY_LaunchC = 269025100;
3574 enum int KEY_LaunchD = 269025101;
3575 enum int KEY_LaunchE = 269025102;
3576 enum int KEY_LaunchF = 269025103;
3577 enum int KEY_Lbelowdot = 16784950;
3578 enum int KEY_Lcaron = 421;
3579 enum int KEY_Lcedilla = 934;
3580 enum int KEY_Left = 65361;
3581 enum int KEY_LightBulb = 269025077;
3582 enum int KEY_Linefeed = 65290;
3583 enum int KEY_LiraSign = 16785572;
3584 enum int KEY_LogOff = 269025121;
3585 enum int KEY_Lstroke = 419;
3586 enum int KEY_M = 77;
3587 enum int KEY_Mabovedot = 16784960;
3588 enum int KEY_Macedonia_DSE = 1717;
3589 enum int KEY_Macedonia_GJE = 1714;
3590 enum int KEY_Macedonia_KJE = 1724;
3591 enum int KEY_Macedonia_dse = 1701;
3592 enum int KEY_Macedonia_gje = 1698;
3593 enum int KEY_Macedonia_kje = 1708;
3594 enum int KEY_Mae_Koho = 65342;
3595 enum int KEY_Mail = 269025049;
3596 enum int KEY_MailForward = 269025168;
3597 enum int KEY_Market = 269025122;
3598 enum int KEY_Massyo = 65324;
3599 enum int KEY_Meeting = 269025123;
3600 enum int KEY_Memo = 269025054;
3601 enum int KEY_Menu = 65383;
3602 enum int KEY_MenuKB = 269025125;
3603 enum int KEY_MenuPB = 269025126;
3604 enum int KEY_Messenger = 269025166;
3605 enum int KEY_Meta_L = 65511;
3606 enum int KEY_Meta_R = 65512;
3607 enum int KEY_MillSign = 16785573;
3608 enum int KEY_ModeLock = 269025025;
3609 enum int KEY_Mode_switch = 65406;
3610 enum int KEY_MonBrightnessDown = 269025027;
3611 enum int KEY_MonBrightnessUp = 269025026;
3612 enum int KEY_MouseKeys_Accel_Enable = 65143;
3613 enum int KEY_MouseKeys_Enable = 65142;
3614 enum int KEY_Muhenkan = 65314;
3615 enum int KEY_Multi_key = 65312;
3616 enum int KEY_MultipleCandidate = 65341;
3617 enum int KEY_Music = 269025170;
3618 enum int KEY_MyComputer = 269025075;
3619 enum int KEY_MySites = 269025127;
3620 enum int KEY_N = 78;
3621 enum int KEY_Nacute = 465;
3622 enum int KEY_NairaSign = 16785574;
3623 enum int KEY_Ncaron = 466;
3624 enum int KEY_Ncedilla = 977;
3625 enum int KEY_New = 269025128;
3626 enum int KEY_NewSheqelSign = 16785578;
3627 enum int KEY_News = 269025129;
3628 enum int KEY_Next = 65366;
3629 enum int KEY_Next_VMode = 269024802;
3630 enum int KEY_Next_Virtual_Screen = 65234;
3631 enum int KEY_Ntilde = 209;
3632 enum int KEY_Num_Lock = 65407;
3633 enum int KEY_O = 79;
3634 enum int KEY_OE = 5052;
3635 enum int KEY_Oacute = 211;
3636 enum int KEY_Obarred = 16777631;
3637 enum int KEY_Obelowdot = 16785100;
3638 enum int KEY_Ocaron = 16777681;
3639 enum int KEY_Ocircumflex = 212;
3640 enum int KEY_Ocircumflexacute = 16785104;
3641 enum int KEY_Ocircumflexbelowdot = 16785112;
3642 enum int KEY_Ocircumflexgrave = 16785106;
3643 enum int KEY_Ocircumflexhook = 16785108;
3644 enum int KEY_Ocircumflextilde = 16785110;
3645 enum int KEY_Odiaeresis = 214;
3646 enum int KEY_Odoubleacute = 469;
3647 enum int KEY_OfficeHome = 269025130;
3648 enum int KEY_Ograve = 210;
3649 enum int KEY_Ohook = 16785102;
3650 enum int KEY_Ohorn = 16777632;
3651 enum int KEY_Ohornacute = 16785114;
3652 enum int KEY_Ohornbelowdot = 16785122;
3653 enum int KEY_Ohorngrave = 16785116;
3654 enum int KEY_Ohornhook = 16785118;
3655 enum int KEY_Ohorntilde = 16785120;
3656 enum int KEY_Omacron = 978;
3657 enum int KEY_Ooblique = 216;
3658 enum int KEY_Open = 269025131;
3659 enum int KEY_OpenURL = 269025080;
3660 enum int KEY_Option = 269025132;
3661 enum int KEY_Oslash = 216;
3662 enum int KEY_Otilde = 213;
3663 enum int KEY_Overlay1_Enable = 65144;
3664 enum int KEY_Overlay2_Enable = 65145;
3665 enum int KEY_P = 80;
3666 enum int KEY_Pabovedot = 16784982;
3667 enum int KEY_Page_Down = 65366;
3668 enum int KEY_Page_Up = 65365;
3669 enum int KEY_Paste = 269025133;
3670 enum int KEY_Pause = 65299;
3671 enum int KEY_PesetaSign = 16785575;
3672 enum int KEY_Phone = 269025134;
3673 enum int KEY_Pictures = 269025169;
3674 enum int KEY_Pointer_Accelerate = 65274;
3675 enum int KEY_Pointer_Button1 = 65257;
3676 enum int KEY_Pointer_Button2 = 65258;
3677 enum int KEY_Pointer_Button3 = 65259;
3678 enum int KEY_Pointer_Button4 = 65260;
3679 enum int KEY_Pointer_Button5 = 65261;
3680 enum int KEY_Pointer_Button_Dflt = 65256;
3681 enum int KEY_Pointer_DblClick1 = 65263;
3682 enum int KEY_Pointer_DblClick2 = 65264;
3683 enum int KEY_Pointer_DblClick3 = 65265;
3684 enum int KEY_Pointer_DblClick4 = 65266;
3685 enum int KEY_Pointer_DblClick5 = 65267;
3686 enum int KEY_Pointer_DblClick_Dflt = 65262;
3687 enum int KEY_Pointer_DfltBtnNext = 65275;
3688 enum int KEY_Pointer_DfltBtnPrev = 65276;
3689 enum int KEY_Pointer_Down = 65251;
3690 enum int KEY_Pointer_DownLeft = 65254;
3691 enum int KEY_Pointer_DownRight = 65255;
3692 enum int KEY_Pointer_Drag1 = 65269;
3693 enum int KEY_Pointer_Drag2 = 65270;
3694 enum int KEY_Pointer_Drag3 = 65271;
3695 enum int KEY_Pointer_Drag4 = 65272;
3696 enum int KEY_Pointer_Drag5 = 65277;
3697 enum int KEY_Pointer_Drag_Dflt = 65268;
3698 enum int KEY_Pointer_EnableKeys = 65273;
3699 enum int KEY_Pointer_Left = 65248;
3700 enum int KEY_Pointer_Right = 65249;
3701 enum int KEY_Pointer_Up = 65250;
3702 enum int KEY_Pointer_UpLeft = 65252;
3703 enum int KEY_Pointer_UpRight = 65253;
3704 enum int KEY_PowerDown = 269025057;
3705 enum int KEY_PowerOff = 269025066;
3706 enum int KEY_Prev_VMode = 269024803;
3707 enum int KEY_Prev_Virtual_Screen = 65233;
3708 enum int KEY_PreviousCandidate = 65342;
3709 enum int KEY_Print = 65377;
3710 enum int KEY_Prior = 65365;
3711 enum int KEY_Q = 81;
3712 enum int KEY_R = 82;
3713 enum int KEY_R1 = 65490;
3714 enum int KEY_R10 = 65499;
3715 enum int KEY_R11 = 65500;
3716 enum int KEY_R12 = 65501;
3717 enum int KEY_R13 = 65502;
3718 enum int KEY_R14 = 65503;
3719 enum int KEY_R15 = 65504;
3720 enum int KEY_R2 = 65491;
3721 enum int KEY_R3 = 65492;
3722 enum int KEY_R4 = 65493;
3723 enum int KEY_R5 = 65494;
3724 enum int KEY_R6 = 65495;
3725 enum int KEY_R7 = 65496;
3726 enum int KEY_R8 = 65497;
3727 enum int KEY_R9 = 65498;
3728 enum int KEY_Racute = 448;
3729 enum int KEY_Rcaron = 472;
3730 enum int KEY_Rcedilla = 931;
3731 enum int KEY_Red = 269025187;
3732 enum int KEY_Redo = 65382;
3733 enum int KEY_Refresh = 269025065;
3734 enum int KEY_Reload = 269025139;
3735 enum int KEY_RepeatKeys_Enable = 65138;
3736 enum int KEY_Reply = 269025138;
3737 enum int KEY_Return = 65293;
3738 enum int KEY_Right = 65363;
3739 enum int KEY_RockerDown = 269025060;
3740 enum int KEY_RockerEnter = 269025061;
3741 enum int KEY_RockerUp = 269025059;
3742 enum int KEY_Romaji = 65316;
3743 enum int KEY_RotateWindows = 269025140;
3744 enum int KEY_RotationKB = 269025142;
3745 enum int KEY_RotationPB = 269025141;
3746 enum int KEY_RupeeSign = 16785576;
3747 enum int KEY_S = 83;
3748 enum int KEY_SCHWA = 16777615;
3749 enum int KEY_Sabovedot = 16784992;
3750 enum int KEY_Sacute = 422;
3751 enum int KEY_Save = 269025143;
3752 enum int KEY_Scaron = 425;
3753 enum int KEY_Scedilla = 426;
3754 enum int KEY_Scircumflex = 734;
3755 enum int KEY_ScreenSaver = 269025069;
3756 enum int KEY_ScrollClick = 269025146;
3757 enum int KEY_ScrollDown = 269025145;
3758 enum int KEY_ScrollUp = 269025144;
3759 enum int KEY_Scroll_Lock = 65300;
3760 enum int KEY_Search = 269025051;
3761 enum int KEY_Select = 65376;
3762 enum int KEY_SelectButton = 269025184;
3763 enum int KEY_Send = 269025147;
3764 enum int KEY_Serbian_DJE = 1713;
3765 enum int KEY_Serbian_DZE = 1727;
3766 enum int KEY_Serbian_JE = 1720;
3767 enum int KEY_Serbian_LJE = 1721;
3768 enum int KEY_Serbian_NJE = 1722;
3769 enum int KEY_Serbian_TSHE = 1723;
3770 enum int KEY_Serbian_dje = 1697;
3771 enum int KEY_Serbian_dze = 1711;
3772 enum int KEY_Serbian_je = 1704;
3773 enum int KEY_Serbian_lje = 1705;
3774 enum int KEY_Serbian_nje = 1706;
3775 enum int KEY_Serbian_tshe = 1707;
3776 enum int KEY_Shift_L = 65505;
3777 enum int KEY_Shift_Lock = 65510;
3778 enum int KEY_Shift_R = 65506;
3779 enum int KEY_Shop = 269025078;
3780 enum int KEY_SingleCandidate = 65340;
3781 enum int KEY_Sleep = 269025071;
3782 enum int KEY_SlowKeys_Enable = 65139;
3783 enum int KEY_Spell = 269025148;
3784 enum int KEY_SplitScreen = 269025149;
3785 enum int KEY_Standby = 269025040;
3786 enum int KEY_Start = 269025050;
3787 enum int KEY_StickyKeys_Enable = 65141;
3788 enum int KEY_Stop = 269025064;
3789 enum int KEY_Subtitle = 269025178;
3790 enum int KEY_Super_L = 65515;
3791 enum int KEY_Super_R = 65516;
3792 enum int KEY_Support = 269025150;
3793 enum int KEY_Suspend = 269025191;
3794 enum int KEY_Switch_VT_1 = 269024769;
3795 enum int KEY_Switch_VT_10 = 269024778;
3796 enum int KEY_Switch_VT_11 = 269024779;
3797 enum int KEY_Switch_VT_12 = 269024780;
3798 enum int KEY_Switch_VT_2 = 269024770;
3799 enum int KEY_Switch_VT_3 = 269024771;
3800 enum int KEY_Switch_VT_4 = 269024772;
3801 enum int KEY_Switch_VT_5 = 269024773;
3802 enum int KEY_Switch_VT_6 = 269024774;
3803 enum int KEY_Switch_VT_7 = 269024775;
3804 enum int KEY_Switch_VT_8 = 269024776;
3805 enum int KEY_Switch_VT_9 = 269024777;
3806 enum int KEY_Sys_Req = 65301;
3807 enum int KEY_T = 84;
3808 enum int KEY_THORN = 222;
3809 enum int KEY_Tab = 65289;
3810 enum int KEY_Tabovedot = 16785002;
3811 enum int KEY_TaskPane = 269025151;
3812 enum int KEY_Tcaron = 427;
3813 enum int KEY_Tcedilla = 478;
3814 enum int KEY_Terminal = 269025152;
3815 enum int KEY_Terminate_Server = 65237;
3816 enum int KEY_Thai_baht = 3551;
3817 enum int KEY_Thai_bobaimai = 3514;
3818 enum int KEY_Thai_chochan = 3496;
3819 enum int KEY_Thai_chochang = 3498;
3820 enum int KEY_Thai_choching = 3497;
3821 enum int KEY_Thai_chochoe = 3500;
3822 enum int KEY_Thai_dochada = 3502;
3823 enum int KEY_Thai_dodek = 3508;
3824 enum int KEY_Thai_fofa = 3517;
3825 enum int KEY_Thai_fofan = 3519;
3826 enum int KEY_Thai_hohip = 3531;
3827 enum int KEY_Thai_honokhuk = 3534;
3828 enum int KEY_Thai_khokhai = 3490;
3829 enum int KEY_Thai_khokhon = 3493;
3830 enum int KEY_Thai_khokhuat = 3491;
3831 enum int KEY_Thai_khokhwai = 3492;
3832 enum int KEY_Thai_khorakhang = 3494;
3833 enum int KEY_Thai_kokai = 3489;
3834 enum int KEY_Thai_lakkhangyao = 3557;
3835 enum int KEY_Thai_lekchet = 3575;
3836 enum int KEY_Thai_lekha = 3573;
3837 enum int KEY_Thai_lekhok = 3574;
3838 enum int KEY_Thai_lekkao = 3577;
3839 enum int KEY_Thai_leknung = 3569;
3840 enum int KEY_Thai_lekpaet = 3576;
3841 enum int KEY_Thai_leksam = 3571;
3842 enum int KEY_Thai_leksi = 3572;
3843 enum int KEY_Thai_leksong = 3570;
3844 enum int KEY_Thai_leksun = 3568;
3845 enum int KEY_Thai_lochula = 3532;
3846 enum int KEY_Thai_loling = 3525;
3847 enum int KEY_Thai_lu = 3526;
3848 enum int KEY_Thai_maichattawa = 3563;
3849 enum int KEY_Thai_maiek = 3560;
3850 enum int KEY_Thai_maihanakat = 3537;
3851 enum int KEY_Thai_maihanakat_maitho = 3550;
3852 enum int KEY_Thai_maitaikhu = 3559;
3853 enum int KEY_Thai_maitho = 3561;
3854 enum int KEY_Thai_maitri = 3562;
3855 enum int KEY_Thai_maiyamok = 3558;
3856 enum int KEY_Thai_moma = 3521;
3857 enum int KEY_Thai_ngongu = 3495;
3858 enum int KEY_Thai_nikhahit = 3565;
3859 enum int KEY_Thai_nonen = 3507;
3860 enum int KEY_Thai_nonu = 3513;
3861 enum int KEY_Thai_oang = 3533;
3862 enum int KEY_Thai_paiyannoi = 3535;
3863 enum int KEY_Thai_phinthu = 3546;
3864 enum int KEY_Thai_phophan = 3518;
3865 enum int KEY_Thai_phophung = 3516;
3866 enum int KEY_Thai_phosamphao = 3520;
3867 enum int KEY_Thai_popla = 3515;
3868 enum int KEY_Thai_rorua = 3523;
3869 enum int KEY_Thai_ru = 3524;
3870 enum int KEY_Thai_saraa = 3536;
3871 enum int KEY_Thai_saraaa = 3538;
3872 enum int KEY_Thai_saraae = 3553;
3873 enum int KEY_Thai_saraaimaimalai = 3556;
3874 enum int KEY_Thai_saraaimaimuan = 3555;
3875 enum int KEY_Thai_saraam = 3539;
3876 enum int KEY_Thai_sarae = 3552;
3877 enum int KEY_Thai_sarai = 3540;
3878 enum int KEY_Thai_saraii = 3541;
3879 enum int KEY_Thai_sarao = 3554;
3880 enum int KEY_Thai_sarau = 3544;
3881 enum int KEY_Thai_saraue = 3542;
3882 enum int KEY_Thai_sarauee = 3543;
3883 enum int KEY_Thai_sarauu = 3545;
3884 enum int KEY_Thai_sorusi = 3529;
3885 enum int KEY_Thai_sosala = 3528;
3886 enum int KEY_Thai_soso = 3499;
3887 enum int KEY_Thai_sosua = 3530;
3888 enum int KEY_Thai_thanthakhat = 3564;
3889 enum int KEY_Thai_thonangmontho = 3505;
3890 enum int KEY_Thai_thophuthao = 3506;
3891 enum int KEY_Thai_thothahan = 3511;
3892 enum int KEY_Thai_thothan = 3504;
3893 enum int KEY_Thai_thothong = 3512;
3894 enum int KEY_Thai_thothung = 3510;
3895 enum int KEY_Thai_topatak = 3503;
3896 enum int KEY_Thai_totao = 3509;
3897 enum int KEY_Thai_wowaen = 3527;
3898 enum int KEY_Thai_yoyak = 3522;
3899 enum int KEY_Thai_yoying = 3501;
3900 enum int KEY_Thorn = 222;
3901 enum int KEY_Time = 269025183;
3902 enum int KEY_ToDoList = 269025055;
3903 enum int KEY_Tools = 269025153;
3904 enum int KEY_TopMenu = 269025186;
3905 enum int KEY_TouchpadToggle = 269025193;
3906 enum int KEY_Touroku = 65323;
3907 enum int KEY_Travel = 269025154;
3908 enum int KEY_Tslash = 940;
3909 enum int KEY_U = 85;
3910 enum int KEY_UWB = 269025174;
3911 enum int KEY_Uacute = 218;
3912 enum int KEY_Ubelowdot = 16785124;
3913 enum int KEY_Ubreve = 733;
3914 enum int KEY_Ucircumflex = 219;
3915 enum int KEY_Udiaeresis = 220;
3916 enum int KEY_Udoubleacute = 475;
3917 enum int KEY_Ugrave = 217;
3918 enum int KEY_Uhook = 16785126;
3919 enum int KEY_Uhorn = 16777647;
3920 enum int KEY_Uhornacute = 16785128;
3921 enum int KEY_Uhornbelowdot = 16785136;
3922 enum int KEY_Uhorngrave = 16785130;
3923 enum int KEY_Uhornhook = 16785132;
3924 enum int KEY_Uhorntilde = 16785134;
3925 enum int KEY_Ukrainian_GHE_WITH_UPTURN = 1725;
3926 enum int KEY_Ukrainian_I = 1718;
3927 enum int KEY_Ukrainian_IE = 1716;
3928 enum int KEY_Ukrainian_YI = 1719;
3929 enum int KEY_Ukrainian_ghe_with_upturn = 1709;
3930 enum int KEY_Ukrainian_i = 1702;
3931 enum int KEY_Ukrainian_ie = 1700;
3932 enum int KEY_Ukrainian_yi = 1703;
3933 enum int KEY_Ukranian_I = 1718;
3934 enum int KEY_Ukranian_JE = 1716;
3935 enum int KEY_Ukranian_YI = 1719;
3936 enum int KEY_Ukranian_i = 1702;
3937 enum int KEY_Ukranian_je = 1700;
3938 enum int KEY_Ukranian_yi = 1703;
3939 enum int KEY_Umacron = 990;
3940 enum int KEY_Undo = 65381;
3941 enum int KEY_Ungrab = 269024800;
3942 enum int KEY_Uogonek = 985;
3943 enum int KEY_Up = 65362;
3944 enum int KEY_Uring = 473;
3945 enum int KEY_User1KB = 269025157;
3946 enum int KEY_User2KB = 269025158;
3947 enum int KEY_UserPB = 269025156;
3948 enum int KEY_Utilde = 989;
3949 enum int KEY_V = 86;
3950 enum int KEY_VendorHome = 269025076;
3951 enum int KEY_Video = 269025159;
3952 enum int KEY_View = 269025185;
3953 enum int KEY_VoidSymbol = 16777215;
3954 enum int KEY_W = 87;
3955 enum int KEY_WLAN = 269025173;
3956 enum int KEY_WWW = 269025070;
3957 enum int KEY_Wacute = 16785026;
3958 enum int KEY_WakeUp = 269025067;
3959 enum int KEY_Wcircumflex = 16777588;
3960 enum int KEY_Wdiaeresis = 16785028;
3961 enum int KEY_WebCam = 269025167;
3962 enum int KEY_Wgrave = 16785024;
3963 enum int KEY_WheelButton = 269025160;
3964 enum int KEY_WindowClear = 269025109;
3965 enum int KEY_WonSign = 16785577;
3966 enum int KEY_Word = 269025161;
3967 enum int KEY_X = 88;
3968 enum int KEY_Xabovedot = 16785034;
3969 enum int KEY_Xfer = 269025162;
3970 enum int KEY_Y = 89;
3971 enum int KEY_Yacute = 221;
3972 enum int KEY_Ybelowdot = 16785140;
3973 enum int KEY_Ycircumflex = 16777590;
3974 enum int KEY_Ydiaeresis = 5054;
3975 enum int KEY_Yellow = 269025189;
3976 enum int KEY_Ygrave = 16785138;
3977 enum int KEY_Yhook = 16785142;
3978 enum int KEY_Ytilde = 16785144;
3979 enum int KEY_Z = 90;
3980 enum int KEY_Zabovedot = 431;
3981 enum int KEY_Zacute = 428;
3982 enum int KEY_Zcaron = 430;
3983 enum int KEY_Zen_Koho = 65341;
3984 enum int KEY_Zenkaku = 65320;
3985 enum int KEY_Zenkaku_Hankaku = 65322;
3986 enum int KEY_ZoomIn = 269025163;
3987 enum int KEY_ZoomOut = 269025164;
3988 enum int KEY_Zstroke = 16777653;
3989 enum int KEY_a = 97;
3990 enum int KEY_aacute = 225;
3991 enum int KEY_abelowdot = 16785057;
3992 enum int KEY_abovedot = 511;
3993 enum int KEY_abreve = 483;
3994 enum int KEY_abreveacute = 16785071;
3995 enum int KEY_abrevebelowdot = 16785079;
3996 enum int KEY_abrevegrave = 16785073;
3997 enum int KEY_abrevehook = 16785075;
3998 enum int KEY_abrevetilde = 16785077;
3999 enum int KEY_acircumflex = 226;
4000 enum int KEY_acircumflexacute = 16785061;
4001 enum int KEY_acircumflexbelowdot = 16785069;
4002 enum int KEY_acircumflexgrave = 16785063;
4003 enum int KEY_acircumflexhook = 16785065;
4004 enum int KEY_acircumflextilde = 16785067;
4005 enum int KEY_acute = 180;
4006 enum int KEY_adiaeresis = 228;
4007 enum int KEY_ae = 230;
4008 enum int KEY_agrave = 224;
4009 enum int KEY_ahook = 16785059;
4010 enum int KEY_amacron = 992;
4011 enum int KEY_ampersand = 38;
4012 enum int KEY_aogonek = 433;
4013 enum int KEY_apostrophe = 39;
4014 enum int KEY_approxeq = 16785992;
4015 enum int KEY_approximate = 2248;
4016 enum int KEY_aring = 229;
4017 enum int KEY_asciicircum = 94;
4018 enum int KEY_asciitilde = 126;
4019 enum int KEY_asterisk = 42;
4020 enum int KEY_at = 64;
4021 enum int KEY_atilde = 227;
4022 enum int KEY_b = 98;
4023 enum int KEY_babovedot = 16784899;
4024 enum int KEY_backslash = 92;
4025 enum int KEY_ballotcross = 2804;
4026 enum int KEY_bar = 124;
4027 enum int KEY_because = 16785973;
4028 enum int KEY_blank = 2527;
4029 enum int KEY_botintegral = 2213;
4030 enum int KEY_botleftparens = 2220;
4031 enum int KEY_botleftsqbracket = 2216;
4032 enum int KEY_botleftsummation = 2226;
4033 enum int KEY_botrightparens = 2222;
4034 enum int KEY_botrightsqbracket = 2218;
4035 enum int KEY_botrightsummation = 2230;
4036 enum int KEY_bott = 2550;
4037 enum int KEY_botvertsummationconnector = 2228;
4038 enum int KEY_braceleft = 123;
4039 enum int KEY_braceright = 125;
4040 enum int KEY_bracketleft = 91;
4041 enum int KEY_bracketright = 93;
4042 enum int KEY_braille_blank = 16787456;
4043 enum int KEY_braille_dot_1 = 65521;
4044 enum int KEY_braille_dot_10 = 65530;
4045 enum int KEY_braille_dot_2 = 65522;
4046 enum int KEY_braille_dot_3 = 65523;
4047 enum int KEY_braille_dot_4 = 65524;
4048 enum int KEY_braille_dot_5 = 65525;
4049 enum int KEY_braille_dot_6 = 65526;
4050 enum int KEY_braille_dot_7 = 65527;
4051 enum int KEY_braille_dot_8 = 65528;
4052 enum int KEY_braille_dot_9 = 65529;
4053 enum int KEY_braille_dots_1 = 16787457;
4054 enum int KEY_braille_dots_12 = 16787459;
4055 enum int KEY_braille_dots_123 = 16787463;
4056 enum int KEY_braille_dots_1234 = 16787471;
4057 enum int KEY_braille_dots_12345 = 16787487;
4058 enum int KEY_braille_dots_123456 = 16787519;
4059 enum int KEY_braille_dots_1234567 = 16787583;
4060 enum int KEY_braille_dots_12345678 = 16787711;
4061 enum int KEY_braille_dots_1234568 = 16787647;
4062 enum int KEY_braille_dots_123457 = 16787551;
4063 enum int KEY_braille_dots_1234578 = 16787679;
4064 enum int KEY_braille_dots_123458 = 16787615;
4065 enum int KEY_braille_dots_12346 = 16787503;
4066 enum int KEY_braille_dots_123467 = 16787567;
4067 enum int KEY_braille_dots_1234678 = 16787695;
4068 enum int KEY_braille_dots_123468 = 16787631;
4069 enum int KEY_braille_dots_12347 = 16787535;
4070 enum int KEY_braille_dots_123478 = 16787663;
4071 enum int KEY_braille_dots_12348 = 16787599;
4072 enum int KEY_braille_dots_1235 = 16787479;
4073 enum int KEY_braille_dots_12356 = 16787511;
4074 enum int KEY_braille_dots_123567 = 16787575;
4075 enum int KEY_braille_dots_1235678 = 16787703;
4076 enum int KEY_braille_dots_123568 = 16787639;
4077 enum int KEY_braille_dots_12357 = 16787543;
4078 enum int KEY_braille_dots_123578 = 16787671;
4079 enum int KEY_braille_dots_12358 = 16787607;
4080 enum int KEY_braille_dots_1236 = 16787495;
4081 enum int KEY_braille_dots_12367 = 16787559;
4082 enum int KEY_braille_dots_123678 = 16787687;
4083 enum int KEY_braille_dots_12368 = 16787623;
4084 enum int KEY_braille_dots_1237 = 16787527;
4085 enum int KEY_braille_dots_12378 = 16787655;
4086 enum int KEY_braille_dots_1238 = 16787591;
4087 enum int KEY_braille_dots_124 = 16787467;
4088 enum int KEY_braille_dots_1245 = 16787483;
4089 enum int KEY_braille_dots_12456 = 16787515;
4090 enum int KEY_braille_dots_124567 = 16787579;
4091 enum int KEY_braille_dots_1245678 = 16787707;
4092 enum int KEY_braille_dots_124568 = 16787643;
4093 enum int KEY_braille_dots_12457 = 16787547;
4094 enum int KEY_braille_dots_124578 = 16787675;
4095 enum int KEY_braille_dots_12458 = 16787611;
4096 enum int KEY_braille_dots_1246 = 16787499;
4097 enum int KEY_braille_dots_12467 = 16787563;
4098 enum int KEY_braille_dots_124678 = 16787691;
4099 enum int KEY_braille_dots_12468 = 16787627;
4100 enum int KEY_braille_dots_1247 = 16787531;
4101 enum int KEY_braille_dots_12478 = 16787659;
4102 enum int KEY_braille_dots_1248 = 16787595;
4103 enum int KEY_braille_dots_125 = 16787475;
4104 enum int KEY_braille_dots_1256 = 16787507;
4105 enum int KEY_braille_dots_12567 = 16787571;
4106 enum int KEY_braille_dots_125678 = 16787699;
4107 enum int KEY_braille_dots_12568 = 16787635;
4108 enum int KEY_braille_dots_1257 = 16787539;
4109 enum int KEY_braille_dots_12578 = 16787667;
4110 enum int KEY_braille_dots_1258 = 16787603;
4111 enum int KEY_braille_dots_126 = 16787491;
4112 enum int KEY_braille_dots_1267 = 16787555;
4113 enum int KEY_braille_dots_12678 = 16787683;
4114 enum int KEY_braille_dots_1268 = 16787619;
4115 enum int KEY_braille_dots_127 = 16787523;
4116 enum int KEY_braille_dots_1278 = 16787651;
4117 enum int KEY_braille_dots_128 = 16787587;
4118 enum int KEY_braille_dots_13 = 16787461;
4119 enum int KEY_braille_dots_134 = 16787469;
4120 enum int KEY_braille_dots_1345 = 16787485;
4121 enum int KEY_braille_dots_13456 = 16787517;
4122 enum int KEY_braille_dots_134567 = 16787581;
4123 enum int KEY_braille_dots_1345678 = 16787709;
4124 enum int KEY_braille_dots_134568 = 16787645;
4125 enum int KEY_braille_dots_13457 = 16787549;
4126 enum int KEY_braille_dots_134578 = 16787677;
4127 enum int KEY_braille_dots_13458 = 16787613;
4128 enum int KEY_braille_dots_1346 = 16787501;
4129 enum int KEY_braille_dots_13467 = 16787565;
4130 enum int KEY_braille_dots_134678 = 16787693;
4131 enum int KEY_braille_dots_13468 = 16787629;
4132 enum int KEY_braille_dots_1347 = 16787533;
4133 enum int KEY_braille_dots_13478 = 16787661;
4134 enum int KEY_braille_dots_1348 = 16787597;
4135 enum int KEY_braille_dots_135 = 16787477;
4136 enum int KEY_braille_dots_1356 = 16787509;
4137 enum int KEY_braille_dots_13567 = 16787573;
4138 enum int KEY_braille_dots_135678 = 16787701;
4139 enum int KEY_braille_dots_13568 = 16787637;
4140 enum int KEY_braille_dots_1357 = 16787541;
4141 enum int KEY_braille_dots_13578 = 16787669;
4142 enum int KEY_braille_dots_1358 = 16787605;
4143 enum int KEY_braille_dots_136 = 16787493;
4144 enum int KEY_braille_dots_1367 = 16787557;
4145 enum int KEY_braille_dots_13678 = 16787685;
4146 enum int KEY_braille_dots_1368 = 16787621;
4147 enum int KEY_braille_dots_137 = 16787525;
4148 enum int KEY_braille_dots_1378 = 16787653;
4149 enum int KEY_braille_dots_138 = 16787589;
4150 enum int KEY_braille_dots_14 = 16787465;
4151 enum int KEY_braille_dots_145 = 16787481;
4152 enum int KEY_braille_dots_1456 = 16787513;
4153 enum int KEY_braille_dots_14567 = 16787577;
4154 enum int KEY_braille_dots_145678 = 16787705;
4155 enum int KEY_braille_dots_14568 = 16787641;
4156 enum int KEY_braille_dots_1457 = 16787545;
4157 enum int KEY_braille_dots_14578 = 16787673;
4158 enum int KEY_braille_dots_1458 = 16787609;
4159 enum int KEY_braille_dots_146 = 16787497;
4160 enum int KEY_braille_dots_1467 = 16787561;
4161 enum int KEY_braille_dots_14678 = 16787689;
4162 enum int KEY_braille_dots_1468 = 16787625;
4163 enum int KEY_braille_dots_147 = 16787529;
4164 enum int KEY_braille_dots_1478 = 16787657;
4165 enum int KEY_braille_dots_148 = 16787593;
4166 enum int KEY_braille_dots_15 = 16787473;
4167 enum int KEY_braille_dots_156 = 16787505;
4168 enum int KEY_braille_dots_1567 = 16787569;
4169 enum int KEY_braille_dots_15678 = 16787697;
4170 enum int KEY_braille_dots_1568 = 16787633;
4171 enum int KEY_braille_dots_157 = 16787537;
4172 enum int KEY_braille_dots_1578 = 16787665;
4173 enum int KEY_braille_dots_158 = 16787601;
4174 enum int KEY_braille_dots_16 = 16787489;
4175 enum int KEY_braille_dots_167 = 16787553;
4176 enum int KEY_braille_dots_1678 = 16787681;
4177 enum int KEY_braille_dots_168 = 16787617;
4178 enum int KEY_braille_dots_17 = 16787521;
4179 enum int KEY_braille_dots_178 = 16787649;
4180 enum int KEY_braille_dots_18 = 16787585;
4181 enum int KEY_braille_dots_2 = 16787458;
4182 enum int KEY_braille_dots_23 = 16787462;
4183 enum int KEY_braille_dots_234 = 16787470;
4184 enum int KEY_braille_dots_2345 = 16787486;
4185 enum int KEY_braille_dots_23456 = 16787518;
4186 enum int KEY_braille_dots_234567 = 16787582;
4187 enum int KEY_braille_dots_2345678 = 16787710;
4188 enum int KEY_braille_dots_234568 = 16787646;
4189 enum int KEY_braille_dots_23457 = 16787550;
4190 enum int KEY_braille_dots_234578 = 16787678;
4191 enum int KEY_braille_dots_23458 = 16787614;
4192 enum int KEY_braille_dots_2346 = 16787502;
4193 enum int KEY_braille_dots_23467 = 16787566;
4194 enum int KEY_braille_dots_234678 = 16787694;
4195 enum int KEY_braille_dots_23468 = 16787630;
4196 enum int KEY_braille_dots_2347 = 16787534;
4197 enum int KEY_braille_dots_23478 = 16787662;
4198 enum int KEY_braille_dots_2348 = 16787598;
4199 enum int KEY_braille_dots_235 = 16787478;
4200 enum int KEY_braille_dots_2356 = 16787510;
4201 enum int KEY_braille_dots_23567 = 16787574;
4202 enum int KEY_braille_dots_235678 = 16787702;
4203 enum int KEY_braille_dots_23568 = 16787638;
4204 enum int KEY_braille_dots_2357 = 16787542;
4205 enum int KEY_braille_dots_23578 = 16787670;
4206 enum int KEY_braille_dots_2358 = 16787606;
4207 enum int KEY_braille_dots_236 = 16787494;
4208 enum int KEY_braille_dots_2367 = 16787558;
4209 enum int KEY_braille_dots_23678 = 16787686;
4210 enum int KEY_braille_dots_2368 = 16787622;
4211 enum int KEY_braille_dots_237 = 16787526;
4212 enum int KEY_braille_dots_2378 = 16787654;
4213 enum int KEY_braille_dots_238 = 16787590;
4214 enum int KEY_braille_dots_24 = 16787466;
4215 enum int KEY_braille_dots_245 = 16787482;
4216 enum int KEY_braille_dots_2456 = 16787514;
4217 enum int KEY_braille_dots_24567 = 16787578;
4218 enum int KEY_braille_dots_245678 = 16787706;
4219 enum int KEY_braille_dots_24568 = 16787642;
4220 enum int KEY_braille_dots_2457 = 16787546;
4221 enum int KEY_braille_dots_24578 = 16787674;
4222 enum int KEY_braille_dots_2458 = 16787610;
4223 enum int KEY_braille_dots_246 = 16787498;
4224 enum int KEY_braille_dots_2467 = 16787562;
4225 enum int KEY_braille_dots_24678 = 16787690;
4226 enum int KEY_braille_dots_2468 = 16787626;
4227 enum int KEY_braille_dots_247 = 16787530;
4228 enum int KEY_braille_dots_2478 = 16787658;
4229 enum int KEY_braille_dots_248 = 16787594;
4230 enum int KEY_braille_dots_25 = 16787474;
4231 enum int KEY_braille_dots_256 = 16787506;
4232 enum int KEY_braille_dots_2567 = 16787570;
4233 enum int KEY_braille_dots_25678 = 16787698;
4234 enum int KEY_braille_dots_2568 = 16787634;
4235 enum int KEY_braille_dots_257 = 16787538;
4236 enum int KEY_braille_dots_2578 = 16787666;
4237 enum int KEY_braille_dots_258 = 16787602;
4238 enum int KEY_braille_dots_26 = 16787490;
4239 enum int KEY_braille_dots_267 = 16787554;
4240 enum int KEY_braille_dots_2678 = 16787682;
4241 enum int KEY_braille_dots_268 = 16787618;
4242 enum int KEY_braille_dots_27 = 16787522;
4243 enum int KEY_braille_dots_278 = 16787650;
4244 enum int KEY_braille_dots_28 = 16787586;
4245 enum int KEY_braille_dots_3 = 16787460;
4246 enum int KEY_braille_dots_34 = 16787468;
4247 enum int KEY_braille_dots_345 = 16787484;
4248 enum int KEY_braille_dots_3456 = 16787516;
4249 enum int KEY_braille_dots_34567 = 16787580;
4250 enum int KEY_braille_dots_345678 = 16787708;
4251 enum int KEY_braille_dots_34568 = 16787644;
4252 enum int KEY_braille_dots_3457 = 16787548;
4253 enum int KEY_braille_dots_34578 = 16787676;
4254 enum int KEY_braille_dots_3458 = 16787612;
4255 enum int KEY_braille_dots_346 = 16787500;
4256 enum int KEY_braille_dots_3467 = 16787564;
4257 enum int KEY_braille_dots_34678 = 16787692;
4258 enum int KEY_braille_dots_3468 = 16787628;
4259 enum int KEY_braille_dots_347 = 16787532;
4260 enum int KEY_braille_dots_3478 = 16787660;
4261 enum int KEY_braille_dots_348 = 16787596;
4262 enum int KEY_braille_dots_35 = 16787476;
4263 enum int KEY_braille_dots_356 = 16787508;
4264 enum int KEY_braille_dots_3567 = 16787572;
4265 enum int KEY_braille_dots_35678 = 16787700;
4266 enum int KEY_braille_dots_3568 = 16787636;
4267 enum int KEY_braille_dots_357 = 16787540;
4268 enum int KEY_braille_dots_3578 = 16787668;
4269 enum int KEY_braille_dots_358 = 16787604;
4270 enum int KEY_braille_dots_36 = 16787492;
4271 enum int KEY_braille_dots_367 = 16787556;
4272 enum int KEY_braille_dots_3678 = 16787684;
4273 enum int KEY_braille_dots_368 = 16787620;
4274 enum int KEY_braille_dots_37 = 16787524;
4275 enum int KEY_braille_dots_378 = 16787652;
4276 enum int KEY_braille_dots_38 = 16787588;
4277 enum int KEY_braille_dots_4 = 16787464;
4278 enum int KEY_braille_dots_45 = 16787480;
4279 enum int KEY_braille_dots_456 = 16787512;
4280 enum int KEY_braille_dots_4567 = 16787576;
4281 enum int KEY_braille_dots_45678 = 16787704;
4282 enum int KEY_braille_dots_4568 = 16787640;
4283 enum int KEY_braille_dots_457 = 16787544;
4284 enum int KEY_braille_dots_4578 = 16787672;
4285 enum int KEY_braille_dots_458 = 16787608;
4286 enum int KEY_braille_dots_46 = 16787496;
4287 enum int KEY_braille_dots_467 = 16787560;
4288 enum int KEY_braille_dots_4678 = 16787688;
4289 enum int KEY_braille_dots_468 = 16787624;
4290 enum int KEY_braille_dots_47 = 16787528;
4291 enum int KEY_braille_dots_478 = 16787656;
4292 enum int KEY_braille_dots_48 = 16787592;
4293 enum int KEY_braille_dots_5 = 16787472;
4294 enum int KEY_braille_dots_56 = 16787504;
4295 enum int KEY_braille_dots_567 = 16787568;
4296 enum int KEY_braille_dots_5678 = 16787696;
4297 enum int KEY_braille_dots_568 = 16787632;
4298 enum int KEY_braille_dots_57 = 16787536;
4299 enum int KEY_braille_dots_578 = 16787664;
4300 enum int KEY_braille_dots_58 = 16787600;
4301 enum int KEY_braille_dots_6 = 16787488;
4302 enum int KEY_braille_dots_67 = 16787552;
4303 enum int KEY_braille_dots_678 = 16787680;
4304 enum int KEY_braille_dots_68 = 16787616;
4305 enum int KEY_braille_dots_7 = 16787520;
4306 enum int KEY_braille_dots_78 = 16787648;
4307 enum int KEY_braille_dots_8 = 16787584;
4308 enum int KEY_breve = 418;
4309 enum int KEY_brokenbar = 166;
4310 enum int KEY_c = 99;
4311 enum int KEY_cabovedot = 741;
4312 enum int KEY_cacute = 486;
4313 enum int KEY_careof = 2744;
4314 enum int KEY_caret = 2812;
4315 enum int KEY_caron = 439;
4316 enum int KEY_ccaron = 488;
4317 enum int KEY_ccedilla = 231;
4318 enum int KEY_ccircumflex = 742;
4319 enum int KEY_cedilla = 184;
4320 enum int KEY_cent = 162;
4321 enum int KEY_checkerboard = 2529;
4322 enum int KEY_checkmark = 2803;
4323 enum int KEY_circle = 3023;
4324 enum int KEY_club = 2796;
4325 enum int KEY_colon = 58;
4326 enum int KEY_comma = 44;
4327 enum int KEY_containsas = 16785931;
4328 enum int KEY_copyright = 169;
4329 enum int KEY_cr = 2532;
4330 enum int KEY_crossinglines = 2542;
4331 enum int KEY_cuberoot = 16785947;
4332 enum int KEY_currency = 164;
4333 enum int KEY_cursor = 2815;
4334 enum int KEY_d = 100;
4335 enum int KEY_dabovedot = 16784907;
4336 enum int KEY_dagger = 2801;
4337 enum int KEY_dcaron = 495;
4338 enum int KEY_dead_A = 65153;
4339 enum int KEY_dead_E = 65155;
4340 enum int KEY_dead_I = 65157;
4341 enum int KEY_dead_O = 65159;
4342 enum int KEY_dead_U = 65161;
4343 enum int KEY_dead_a = 65152;
4344 enum int KEY_dead_abovecomma = 65124;
4345 enum int KEY_dead_abovedot = 65110;
4346 enum int KEY_dead_abovereversedcomma = 65125;
4347 enum int KEY_dead_abovering = 65112;
4348 enum int KEY_dead_acute = 65105;
4349 enum int KEY_dead_belowbreve = 65131;
4350 enum int KEY_dead_belowcircumflex = 65129;
4351 enum int KEY_dead_belowcomma = 65134;
4352 enum int KEY_dead_belowdiaeresis = 65132;
4353 enum int KEY_dead_belowdot = 65120;
4354 enum int KEY_dead_belowmacron = 65128;
4355 enum int KEY_dead_belowring = 65127;
4356 enum int KEY_dead_belowtilde = 65130;
4357 enum int KEY_dead_breve = 65109;
4358 enum int KEY_dead_capital_schwa = 65163;
4359 enum int KEY_dead_caron = 65114;
4360 enum int KEY_dead_cedilla = 65115;
4361 enum int KEY_dead_circumflex = 65106;
4362 enum int KEY_dead_currency = 65135;
4363 enum int KEY_dead_dasia = 65125;
4364 enum int KEY_dead_diaeresis = 65111;
4365 enum int KEY_dead_doubleacute = 65113;
4366 enum int KEY_dead_doublegrave = 65126;
4367 enum int KEY_dead_e = 65154;
4368 enum int KEY_dead_grave = 65104;
4369 enum int KEY_dead_hook = 65121;
4370 enum int KEY_dead_horn = 65122;
4371 enum int KEY_dead_i = 65156;
4372 enum int KEY_dead_invertedbreve = 65133;
4373 enum int KEY_dead_iota = 65117;
4374 enum int KEY_dead_macron = 65108;
4375 enum int KEY_dead_o = 65158;
4376 enum int KEY_dead_ogonek = 65116;
4377 enum int KEY_dead_perispomeni = 65107;
4378 enum int KEY_dead_psili = 65124;
4379 enum int KEY_dead_semivoiced_sound = 65119;
4380 enum int KEY_dead_small_schwa = 65162;
4381 enum int KEY_dead_stroke = 65123;
4382 enum int KEY_dead_tilde = 65107;
4383 enum int KEY_dead_u = 65160;
4384 enum int KEY_dead_voiced_sound = 65118;
4385 enum int KEY_decimalpoint = 2749;
4386 enum int KEY_degree = 176;
4387 enum int KEY_diaeresis = 168;
4388 enum int KEY_diamond = 2797;
4389 enum int KEY_digitspace = 2725;
4390 enum int KEY_dintegral = 16785964;
4391 enum int KEY_division = 247;
4392 enum int KEY_dollar = 36;
4393 enum int KEY_doubbaselinedot = 2735;
4394 enum int KEY_doubleacute = 445;
4395 enum int KEY_doubledagger = 2802;
4396 enum int KEY_doublelowquotemark = 2814;
4397 enum int KEY_downarrow = 2302;
4398 enum int KEY_downcaret = 2984;
4399 enum int KEY_downshoe = 3030;
4400 enum int KEY_downstile = 3012;
4401 enum int KEY_downtack = 3010;
4402 enum int KEY_dstroke = 496;
4403 enum int KEY_e = 101;
4404 enum int KEY_eabovedot = 1004;
4405 enum int KEY_eacute = 233;
4406 enum int KEY_ebelowdot = 16785081;
4407 enum int KEY_ecaron = 492;
4408 enum int KEY_ecircumflex = 234;
4409 enum int KEY_ecircumflexacute = 16785087;
4410 enum int KEY_ecircumflexbelowdot = 16785095;
4411 enum int KEY_ecircumflexgrave = 16785089;
4412 enum int KEY_ecircumflexhook = 16785091;
4413 enum int KEY_ecircumflextilde = 16785093;
4414 enum int KEY_ediaeresis = 235;
4415 enum int KEY_egrave = 232;
4416 enum int KEY_ehook = 16785083;
4417 enum int KEY_eightsubscript = 16785544;
4418 enum int KEY_eightsuperior = 16785528;
4419 enum int KEY_elementof = 16785928;
4420 enum int KEY_ellipsis = 2734;
4421 enum int KEY_em3space = 2723;
4422 enum int KEY_em4space = 2724;
4423 enum int KEY_emacron = 954;
4424 enum int KEY_emdash = 2729;
4425 enum int KEY_emfilledcircle = 2782;
4426 enum int KEY_emfilledrect = 2783;
4427 enum int KEY_emopencircle = 2766;
4428 enum int KEY_emopenrectangle = 2767;
4429 enum int KEY_emptyset = 16785925;
4430 enum int KEY_emspace = 2721;
4431 enum int KEY_endash = 2730;
4432 enum int KEY_enfilledcircbullet = 2790;
4433 enum int KEY_enfilledsqbullet = 2791;
4434 enum int KEY_eng = 959;
4435 enum int KEY_enopencircbullet = 2784;
4436 enum int KEY_enopensquarebullet = 2785;
4437 enum int KEY_enspace = 2722;
4438 enum int KEY_eogonek = 490;
4439 enum int KEY_equal = 61;
4440 enum int KEY_eth = 240;
4441 enum int KEY_etilde = 16785085;
4442 enum int KEY_exclam = 33;
4443 enum int KEY_exclamdown = 161;
4444 enum int KEY_f = 102;
4445 enum int KEY_fabovedot = 16784927;
4446 enum int KEY_femalesymbol = 2808;
4447 enum int KEY_ff = 2531;
4448 enum int KEY_figdash = 2747;
4449 enum int KEY_filledlefttribullet = 2780;
4450 enum int KEY_filledrectbullet = 2779;
4451 enum int KEY_filledrighttribullet = 2781;
4452 enum int KEY_filledtribulletdown = 2793;
4453 enum int KEY_filledtribulletup = 2792;
4454 enum int KEY_fiveeighths = 2757;
4455 enum int KEY_fivesixths = 2743;
4456 enum int KEY_fivesubscript = 16785541;
4457 enum int KEY_fivesuperior = 16785525;
4458 enum int KEY_fourfifths = 2741;
4459 enum int KEY_foursubscript = 16785540;
4460 enum int KEY_foursuperior = 16785524;
4461 enum int KEY_fourthroot = 16785948;
4462 enum int KEY_function = 2294;
4463 enum int KEY_g = 103;
4464 enum int KEY_gabovedot = 757;
4465 enum int KEY_gbreve = 699;
4466 enum int KEY_gcaron = 16777703;
4467 enum int KEY_gcedilla = 955;
4468 enum int KEY_gcircumflex = 760;
4469 enum int KEY_grave = 96;
4470 enum int KEY_greater = 62;
4471 enum int KEY_greaterthanequal = 2238;
4472 enum int KEY_guillemotleft = 171;
4473 enum int KEY_guillemotright = 187;
4474 enum int KEY_h = 104;
4475 enum int KEY_hairspace = 2728;
4476 enum int KEY_hcircumflex = 694;
4477 enum int KEY_heart = 2798;
4478 enum int KEY_hebrew_aleph = 3296;
4479 enum int KEY_hebrew_ayin = 3314;
4480 enum int KEY_hebrew_bet = 3297;
4481 enum int KEY_hebrew_beth = 3297;
4482 enum int KEY_hebrew_chet = 3303;
4483 enum int KEY_hebrew_dalet = 3299;
4484 enum int KEY_hebrew_daleth = 3299;
4485 enum int KEY_hebrew_doublelowline = 3295;
4486 enum int KEY_hebrew_finalkaph = 3306;
4487 enum int KEY_hebrew_finalmem = 3309;
4488 enum int KEY_hebrew_finalnun = 3311;
4489 enum int KEY_hebrew_finalpe = 3315;
4490 enum int KEY_hebrew_finalzade = 3317;
4491 enum int KEY_hebrew_finalzadi = 3317;
4492 enum int KEY_hebrew_gimel = 3298;
4493 enum int KEY_hebrew_gimmel = 3298;
4494 enum int KEY_hebrew_he = 3300;
4495 enum int KEY_hebrew_het = 3303;
4496 enum int KEY_hebrew_kaph = 3307;
4497 enum int KEY_hebrew_kuf = 3319;
4498 enum int KEY_hebrew_lamed = 3308;
4499 enum int KEY_hebrew_mem = 3310;
4500 enum int KEY_hebrew_nun = 3312;
4501 enum int KEY_hebrew_pe = 3316;
4502 enum int KEY_hebrew_qoph = 3319;
4503 enum int KEY_hebrew_resh = 3320;
4504 enum int KEY_hebrew_samech = 3313;
4505 enum int KEY_hebrew_samekh = 3313;
4506 enum int KEY_hebrew_shin = 3321;
4507 enum int KEY_hebrew_taf = 3322;
4508 enum int KEY_hebrew_taw = 3322;
4509 enum int KEY_hebrew_tet = 3304;
4510 enum int KEY_hebrew_teth = 3304;
4511 enum int KEY_hebrew_waw = 3301;
4512 enum int KEY_hebrew_yod = 3305;
4513 enum int KEY_hebrew_zade = 3318;
4514 enum int KEY_hebrew_zadi = 3318;
4515 enum int KEY_hebrew_zain = 3302;
4516 enum int KEY_hebrew_zayin = 3302;
4517 enum int KEY_hexagram = 2778;
4518 enum int KEY_horizconnector = 2211;
4519 enum int KEY_horizlinescan1 = 2543;
4520 enum int KEY_horizlinescan3 = 2544;
4521 enum int KEY_horizlinescan5 = 2545;
4522 enum int KEY_horizlinescan7 = 2546;
4523 enum int KEY_horizlinescan9 = 2547;
4524 enum int KEY_hstroke = 689;
4525 enum int KEY_ht = 2530;
4526 enum int KEY_hyphen = 173;
4527 enum int KEY_i = 105;
4528 enum int KEY_iTouch = 269025120;
4529 enum int KEY_iacute = 237;
4530 enum int KEY_ibelowdot = 16785099;
4531 enum int KEY_ibreve = 16777517;
4532 enum int KEY_icircumflex = 238;
4533 enum int KEY_identical = 2255;
4534 enum int KEY_idiaeresis = 239;
4535 enum int KEY_idotless = 697;
4536 enum int KEY_ifonlyif = 2253;
4537 enum int KEY_igrave = 236;
4538 enum int KEY_ihook = 16785097;
4539 enum int KEY_imacron = 1007;
4540 enum int KEY_implies = 2254;
4541 enum int KEY_includedin = 2266;
4542 enum int KEY_includes = 2267;
4543 enum int KEY_infinity = 2242;
4544 enum int KEY_integral = 2239;
4545 enum int KEY_intersection = 2268;
4546 enum int KEY_iogonek = 999;
4547 enum int KEY_itilde = 949;
4548 enum int KEY_j = 106;
4549 enum int KEY_jcircumflex = 700;
4550 enum int KEY_jot = 3018;
4551 enum int KEY_k = 107;
4552 enum int KEY_kana_A = 1201;
4553 enum int KEY_kana_CHI = 1217;
4554 enum int KEY_kana_E = 1204;
4555 enum int KEY_kana_FU = 1228;
4556 enum int KEY_kana_HA = 1226;
4557 enum int KEY_kana_HE = 1229;
4558 enum int KEY_kana_HI = 1227;
4559 enum int KEY_kana_HO = 1230;
4560 enum int KEY_kana_HU = 1228;
4561 enum int KEY_kana_I = 1202;
4562 enum int KEY_kana_KA = 1206;
4563 enum int KEY_kana_KE = 1209;
4564 enum int KEY_kana_KI = 1207;
4565 enum int KEY_kana_KO = 1210;
4566 enum int KEY_kana_KU = 1208;
4567 enum int KEY_kana_MA = 1231;
4568 enum int KEY_kana_ME = 1234;
4569 enum int KEY_kana_MI = 1232;
4570 enum int KEY_kana_MO = 1235;
4571 enum int KEY_kana_MU = 1233;
4572 enum int KEY_kana_N = 1245;
4573 enum int KEY_kana_NA = 1221;
4574 enum int KEY_kana_NE = 1224;
4575 enum int KEY_kana_NI = 1222;
4576 enum int KEY_kana_NO = 1225;
4577 enum int KEY_kana_NU = 1223;
4578 enum int KEY_kana_O = 1205;
4579 enum int KEY_kana_RA = 1239;
4580 enum int KEY_kana_RE = 1242;
4581 enum int KEY_kana_RI = 1240;
4582 enum int KEY_kana_RO = 1243;
4583 enum int KEY_kana_RU = 1241;
4584 enum int KEY_kana_SA = 1211;
4585 enum int KEY_kana_SE = 1214;
4586 enum int KEY_kana_SHI = 1212;
4587 enum int KEY_kana_SO = 1215;
4588 enum int KEY_kana_SU = 1213;
4589 enum int KEY_kana_TA = 1216;
4590 enum int KEY_kana_TE = 1219;
4591 enum int KEY_kana_TI = 1217;
4592 enum int KEY_kana_TO = 1220;
4593 enum int KEY_kana_TSU = 1218;
4594 enum int KEY_kana_TU = 1218;
4595 enum int KEY_kana_U = 1203;
4596 enum int KEY_kana_WA = 1244;
4597 enum int KEY_kana_WO = 1190;
4598 enum int KEY_kana_YA = 1236;
4599 enum int KEY_kana_YO = 1238;
4600 enum int KEY_kana_YU = 1237;
4601 enum int KEY_kana_a = 1191;
4602 enum int KEY_kana_closingbracket = 1187;
4603 enum int KEY_kana_comma = 1188;
4604 enum int KEY_kana_conjunctive = 1189;
4605 enum int KEY_kana_e = 1194;
4606 enum int KEY_kana_fullstop = 1185;
4607 enum int KEY_kana_i = 1192;
4608 enum int KEY_kana_middledot = 1189;
4609 enum int KEY_kana_o = 1195;
4610 enum int KEY_kana_openingbracket = 1186;
4611 enum int KEY_kana_switch = 65406;
4612 enum int KEY_kana_tsu = 1199;
4613 enum int KEY_kana_tu = 1199;
4614 enum int KEY_kana_u = 1193;
4615 enum int KEY_kana_ya = 1196;
4616 enum int KEY_kana_yo = 1198;
4617 enum int KEY_kana_yu = 1197;
4618 enum int KEY_kappa = 930;
4619 enum int KEY_kcedilla = 1011;
4620 enum int KEY_kra = 930;
4621 enum int KEY_l = 108;
4622 enum int KEY_lacute = 485;
4623 enum int KEY_latincross = 2777;
4624 enum int KEY_lbelowdot = 16784951;
4625 enum int KEY_lcaron = 437;
4626 enum int KEY_lcedilla = 950;
4627 enum int KEY_leftanglebracket = 2748;
4628 enum int KEY_leftarrow = 2299;
4629 enum int KEY_leftcaret = 2979;
4630 enum int KEY_leftdoublequotemark = 2770;
4631 enum int KEY_leftmiddlecurlybrace = 2223;
4632 enum int KEY_leftopentriangle = 2764;
4633 enum int KEY_leftpointer = 2794;
4634 enum int KEY_leftradical = 2209;
4635 enum int KEY_leftshoe = 3034;
4636 enum int KEY_leftsinglequotemark = 2768;
4637 enum int KEY_leftt = 2548;
4638 enum int KEY_lefttack = 3036;
4639 enum int KEY_less = 60;
4640 enum int KEY_lessthanequal = 2236;
4641 enum int KEY_lf = 2533;
4642 enum int KEY_logicaland = 2270;
4643 enum int KEY_logicalor = 2271;
4644 enum int KEY_lowleftcorner = 2541;
4645 enum int KEY_lowrightcorner = 2538;
4646 enum int KEY_lstroke = 435;
4647 enum int KEY_m = 109;
4648 enum int KEY_mabovedot = 16784961;
4649 enum int KEY_macron = 175;
4650 enum int KEY_malesymbol = 2807;
4651 enum int KEY_maltesecross = 2800;
4652 enum int KEY_marker = 2751;
4653 enum int KEY_masculine = 186;
4654 enum int KEY_minus = 45;
4655 enum int KEY_minutes = 2774;
4656 enum int KEY_mu = 181;
4657 enum int KEY_multiply = 215;
4658 enum int KEY_musicalflat = 2806;
4659 enum int KEY_musicalsharp = 2805;
4660 enum int KEY_n = 110;
4661 enum int KEY_nabla = 2245;
4662 enum int KEY_nacute = 497;
4663 enum int KEY_ncaron = 498;
4664 enum int KEY_ncedilla = 1009;
4665 enum int KEY_ninesubscript = 16785545;
4666 enum int KEY_ninesuperior = 16785529;
4667 enum int KEY_nl = 2536;
4668 enum int KEY_nobreakspace = 160;
4669 enum int KEY_notapproxeq = 16785991;
4670 enum int KEY_notelementof = 16785929;
4671 enum int KEY_notequal = 2237;
4672 enum int KEY_notidentical = 16786018;
4673 enum int KEY_notsign = 172;
4674 enum int KEY_ntilde = 241;
4675 enum int KEY_numbersign = 35;
4676 enum int KEY_numerosign = 1712;
4677 enum int KEY_o = 111;
4678 enum int KEY_oacute = 243;
4679 enum int KEY_obarred = 16777845;
4680 enum int KEY_obelowdot = 16785101;
4681 enum int KEY_ocaron = 16777682;
4682 enum int KEY_ocircumflex = 244;
4683 enum int KEY_ocircumflexacute = 16785105;
4684 enum int KEY_ocircumflexbelowdot = 16785113;
4685 enum int KEY_ocircumflexgrave = 16785107;
4686 enum int KEY_ocircumflexhook = 16785109;
4687 enum int KEY_ocircumflextilde = 16785111;
4688 enum int KEY_odiaeresis = 246;
4689 enum int KEY_odoubleacute = 501;
4690 enum int KEY_oe = 5053;
4691 enum int KEY_ogonek = 434;
4692 enum int KEY_ograve = 242;
4693 enum int KEY_ohook = 16785103;
4694 enum int KEY_ohorn = 16777633;
4695 enum int KEY_ohornacute = 16785115;
4696 enum int KEY_ohornbelowdot = 16785123;
4697 enum int KEY_ohorngrave = 16785117;
4698 enum int KEY_ohornhook = 16785119;
4699 enum int KEY_ohorntilde = 16785121;
4700 enum int KEY_omacron = 1010;
4701 enum int KEY_oneeighth = 2755;
4702 enum int KEY_onefifth = 2738;
4703 enum int KEY_onehalf = 189;
4704 enum int KEY_onequarter = 188;
4705 enum int KEY_onesixth = 2742;
4706 enum int KEY_onesubscript = 16785537;
4707 enum int KEY_onesuperior = 185;
4708 enum int KEY_onethird = 2736;
4709 enum int KEY_ooblique = 248;
4710 enum int KEY_openrectbullet = 2786;
4711 enum int KEY_openstar = 2789;
4712 enum int KEY_opentribulletdown = 2788;
4713 enum int KEY_opentribulletup = 2787;
4714 enum int KEY_ordfeminine = 170;
4715 enum int KEY_oslash = 248;
4716 enum int KEY_otilde = 245;
4717 enum int KEY_overbar = 3008;
4718 enum int KEY_overline = 1150;
4719 enum int KEY_p = 112;
4720 enum int KEY_pabovedot = 16784983;
4721 enum int KEY_paragraph = 182;
4722 enum int KEY_parenleft = 40;
4723 enum int KEY_parenright = 41;
4724 enum int KEY_partdifferential = 16785922;
4725 enum int KEY_partialderivative = 2287;
4726 enum int KEY_percent = 37;
4727 enum int KEY_period = 46;
4728 enum int KEY_periodcentered = 183;
4729 enum int KEY_phonographcopyright = 2811;
4730 enum int KEY_plus = 43;
4731 enum int KEY_plusminus = 177;
4732 enum int KEY_prescription = 2772;
4733 enum int KEY_prolongedsound = 1200;
4734 enum int KEY_punctspace = 2726;
4735 enum int KEY_q = 113;
4736 enum int KEY_quad = 3020;
4737 enum int KEY_question = 63;
4738 enum int KEY_questiondown = 191;
4739 enum int KEY_quotedbl = 34;
4740 enum int KEY_quoteleft = 96;
4741 enum int KEY_quoteright = 39;
4742 enum int KEY_r = 114;
4743 enum int KEY_racute = 480;
4744 enum int KEY_radical = 2262;
4745 enum int KEY_rcaron = 504;
4746 enum int KEY_rcedilla = 947;
4747 enum int KEY_registered = 174;
4748 enum int KEY_rightanglebracket = 2750;
4749 enum int KEY_rightarrow = 2301;
4750 enum int KEY_rightcaret = 2982;
4751 enum int KEY_rightdoublequotemark = 2771;
4752 enum int KEY_rightmiddlecurlybrace = 2224;
4753 enum int KEY_rightmiddlesummation = 2231;
4754 enum int KEY_rightopentriangle = 2765;
4755 enum int KEY_rightpointer = 2795;
4756 enum int KEY_rightshoe = 3032;
4757 enum int KEY_rightsinglequotemark = 2769;
4758 enum int KEY_rightt = 2549;
4759 enum int KEY_righttack = 3068;
4760 enum int KEY_s = 115;
4761 enum int KEY_sabovedot = 16784993;
4762 enum int KEY_sacute = 438;
4763 enum int KEY_scaron = 441;
4764 enum int KEY_scedilla = 442;
4765 enum int KEY_schwa = 16777817;
4766 enum int KEY_scircumflex = 766;
4767 enum int KEY_script_switch = 65406;
4768 enum int KEY_seconds = 2775;
4769 enum int KEY_section = 167;
4770 enum int KEY_semicolon = 59;
4771 enum int KEY_semivoicedsound = 1247;
4772 enum int KEY_seveneighths = 2758;
4773 enum int KEY_sevensubscript = 16785543;
4774 enum int KEY_sevensuperior = 16785527;
4775 enum int KEY_signaturemark = 2762;
4776 enum int KEY_signifblank = 2732;
4777 enum int KEY_similarequal = 2249;
4778 enum int KEY_singlelowquotemark = 2813;
4779 enum int KEY_sixsubscript = 16785542;
4780 enum int KEY_sixsuperior = 16785526;
4781 enum int KEY_slash = 47;
4782 enum int KEY_soliddiamond = 2528;
4783 enum int KEY_space = 32;
4784 enum int KEY_squareroot = 16785946;
4785 enum int KEY_ssharp = 223;
4786 enum int KEY_sterling = 163;
4787 enum int KEY_stricteq = 16786019;
4788 enum int KEY_t = 116;
4789 enum int KEY_tabovedot = 16785003;
4790 enum int KEY_tcaron = 443;
4791 enum int KEY_tcedilla = 510;
4792 enum int KEY_telephone = 2809;
4793 enum int KEY_telephonerecorder = 2810;
4794 enum int KEY_therefore = 2240;
4795 enum int KEY_thinspace = 2727;
4796 enum int KEY_thorn = 254;
4797 enum int KEY_threeeighths = 2756;
4798 enum int KEY_threefifths = 2740;
4799 enum int KEY_threequarters = 190;
4800 enum int KEY_threesubscript = 16785539;
4801 enum int KEY_threesuperior = 179;
4802 enum int KEY_tintegral = 16785965;
4803 enum int KEY_topintegral = 2212;
4804 enum int KEY_topleftparens = 2219;
4805 enum int KEY_topleftradical = 2210;
4806 enum int KEY_topleftsqbracket = 2215;
4807 enum int KEY_topleftsummation = 2225;
4808 enum int KEY_toprightparens = 2221;
4809 enum int KEY_toprightsqbracket = 2217;
4810 enum int KEY_toprightsummation = 2229;
4811 enum int KEY_topt = 2551;
4812 enum int KEY_topvertsummationconnector = 2227;
4813 enum int KEY_trademark = 2761;
4814 enum int KEY_trademarkincircle = 2763;
4815 enum int KEY_tslash = 956;
4816 enum int KEY_twofifths = 2739;
4817 enum int KEY_twosubscript = 16785538;
4818 enum int KEY_twosuperior = 178;
4819 enum int KEY_twothirds = 2737;
4820 enum int KEY_u = 117;
4821 enum int KEY_uacute = 250;
4822 enum int KEY_ubelowdot = 16785125;
4823 enum int KEY_ubreve = 765;
4824 enum int KEY_ucircumflex = 251;
4825 enum int KEY_udiaeresis = 252;
4826 enum int KEY_udoubleacute = 507;
4827 enum int KEY_ugrave = 249;
4828 enum int KEY_uhook = 16785127;
4829 enum int KEY_uhorn = 16777648;
4830 enum int KEY_uhornacute = 16785129;
4831 enum int KEY_uhornbelowdot = 16785137;
4832 enum int KEY_uhorngrave = 16785131;
4833 enum int KEY_uhornhook = 16785133;
4834 enum int KEY_uhorntilde = 16785135;
4835 enum int KEY_umacron = 1022;
4836 enum int KEY_underbar = 3014;
4837 enum int KEY_underscore = 95;
4838 enum int KEY_union = 2269;
4839 enum int KEY_uogonek = 1017;
4840 enum int KEY_uparrow = 2300;
4841 enum int KEY_upcaret = 2985;
4842 enum int KEY_upleftcorner = 2540;
4843 enum int KEY_uprightcorner = 2539;
4844 enum int KEY_upshoe = 3011;
4845 enum int KEY_upstile = 3027;
4846 enum int KEY_uptack = 3022;
4847 enum int KEY_uring = 505;
4848 enum int KEY_utilde = 1021;
4849 enum int KEY_v = 118;
4850 enum int KEY_variation = 2241;
4851 enum int KEY_vertbar = 2552;
4852 enum int KEY_vertconnector = 2214;
4853 enum int KEY_voicedsound = 1246;
4854 enum int KEY_vt = 2537;
4855 enum int KEY_w = 119;
4856 enum int KEY_wacute = 16785027;
4857 enum int KEY_wcircumflex = 16777589;
4858 enum int KEY_wdiaeresis = 16785029;
4859 enum int KEY_wgrave = 16785025;
4860 enum int KEY_x = 120;
4861 enum int KEY_xabovedot = 16785035;
4862 enum int KEY_y = 121;
4863 enum int KEY_yacute = 253;
4864 enum int KEY_ybelowdot = 16785141;
4865 enum int KEY_ycircumflex = 16777591;
4866 enum int KEY_ydiaeresis = 255;
4867 enum int KEY_yen = 165;
4868 enum int KEY_ygrave = 16785139;
4869 enum int KEY_yhook = 16785143;
4870 enum int KEY_ytilde = 16785145;
4871 enum int KEY_z = 122;
4872 enum int KEY_zabovedot = 447;
4873 enum int KEY_zacute = 444;
4874 enum int KEY_zcaron = 446;
4875 enum int KEY_zerosubscript = 16785536;
4876 enum int KEY_zerosuperior = 16785520;
4877 enum int KEY_zstroke = 16777654;
4878 struct KeyboardGrabInfo {
4879 Window* window, native_window;
4880 c_ulong serial;
4881 int owner_events;
4882 uint time;
4885 struct Keymap /* : GObject.Object */ {
4886 alias parent_instance this;
4887 alias parent_instance super_;
4888 alias parent_instance object;
4889 GObject2.Object parent_instance;
4890 Display* display;
4893 // Unintrospectable function: get_default() / gdk_keymap_get_default()
4894 // Returns the #GdkKeymap attached to the default display.
4895 // RETURNS: the #GdkKeymap attached to the default display.
4896 static Keymap* get_default()() {
4897 return gdk_keymap_get_default();
4900 // Unintrospectable function: get_for_display() / gdk_keymap_get_for_display()
4901 // VERSION: 2.2
4902 // Returns the #GdkKeymap attached to @display.
4903 // RETURNS: the #GdkKeymap attached to @display.
4904 // <display>: the #GdkDisplay.
4905 static Keymap* get_for_display()(Display* display) {
4906 return gdk_keymap_get_for_display(display);
4909 // VERSION: 2.20
4910 // Adds virtual modifiers (i.e. Super, Hyper and Meta) which correspond
4911 // to the real modifiers (i.e Mod2, Mod3, ...) in @modifiers.
4912 // are set in @state to their non-virtual counterparts (i.e. Mod2,
4913 // Mod3,...) and set the corresponding bits in @state.
4914 // GDK already does this before delivering key events, but for
4915 // compatibility reasons, it only sets the first virtual modifier
4916 // it finds, whereas this function sets all matching virtual modifiers.
4917 // This function is useful when matching key events against
4918 // accelerators.
4919 // <state>: pointer to the modifier mask to change
4920 void add_virtual_modifiers()(ModifierType* state) {
4921 gdk_keymap_add_virtual_modifiers(&this, state);
4924 // VERSION: 2.16
4925 // Returns whether the Caps Lock modifer is locked.
4926 // RETURNS: %TRUE if Caps Lock is on
4927 int get_caps_lock_state()() {
4928 return gdk_keymap_get_caps_lock_state(&this);
4931 // Returns the direction of effective layout of the keymap.
4932 // Note that passing %NULL for @keymap is deprecated and will stop
4933 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4934 // if it can determine the direction. %PANGO_DIRECTION_NEUTRAL
4935 // otherwise.
4936 // RETURNS: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL
4937 Pango.Direction get_direction()() {
4938 return gdk_keymap_get_direction(&this);
4941 // Returns the keyvals bound to @hardware_keycode.
4942 // The Nth #GdkKeymapKey in @keys is bound to the Nth
4943 // keyval in @keyvals. Free the returned arrays with g_free().
4944 // When a keycode is pressed by the user, the keyval from
4945 // this list of entries is selected by considering the effective
4946 // keyboard group and level. See gdk_keymap_translate_keyboard_state().
4947 // Note that passing %NULL for @keymap is deprecated and will stop
4948 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4949 // RETURNS: %TRUE if there were any entries
4950 // <hardware_keycode>: a keycode
4951 // <keys>: return location for array of #GdkKeymapKey, or %NULL
4952 // <keyvals>: return location for array of keyvals, or %NULL
4953 // <n_entries>: length of @keys and @keyvals
4954 int get_entries_for_keycode()(uint hardware_keycode, /*out*/ KeymapKey** keys, /*out*/ uint** keyvals, int* n_entries) {
4955 return gdk_keymap_get_entries_for_keycode(&this, hardware_keycode, keys, keyvals, n_entries);
4958 // Obtains a list of keycode/group/level combinations that will
4959 // generate @keyval. Groups and levels are two kinds of keyboard mode;
4960 // in general, the level determines whether the top or bottom symbol
4961 // on a key is used, and the group determines whether the left or
4962 // right symbol is used. On US keyboards, the shift key changes the
4963 // keyboard level, and there are no groups. A group switch key might
4964 // convert a keyboard between Hebrew to English modes, for example.
4965 // #GdkEventKey contains a %group field that indicates the active
4966 // keyboard group. The level is computed from the modifier mask.
4967 // The returned array should be freed
4968 // with g_free().
4969 // Note that passing %NULL for @keymap is deprecated and will stop
4970 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4971 // RETURNS: %TRUE if keys were found and returned
4972 // <keyval>: a keyval, such as %GDK_a, %GDK_Up, %GDK_Return, etc.
4973 // <keys>: return location for an array of #GdkKeymapKey
4974 // <n_keys>: return location for number of elements in returned array
4975 int get_entries_for_keyval()(uint keyval, /*out*/ KeymapKey** keys, /*out*/ int* n_keys) {
4976 return gdk_keymap_get_entries_for_keyval(&this, keyval, keys, n_keys);
4979 // VERSION: 2.12
4980 // Determines if keyboard layouts for both right-to-left and left-to-right
4981 // languages are in use.
4982 // Note that passing %NULL for @keymap is deprecated and will stop
4983 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4984 // RETURNS: %TRUE if there are layouts in both directions, %FALSE otherwise
4985 int have_bidi_layouts()() {
4986 return gdk_keymap_have_bidi_layouts(&this);
4989 // Looks up the keyval mapped to a keycode/group/level triplet.
4990 // If no keyval is bound to @key, returns 0. For normal user input,
4991 // you want to use gdk_keymap_translate_keyboard_state() instead of
4992 // this function, since the effective group/level may not be
4993 // the same as the current keyboard state.
4994 // Note that passing %NULL for @keymap is deprecated and will stop
4995 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4996 // RETURNS: a keyval, or 0 if none was mapped to the given @key
4997 // <key>: a #GdkKeymapKey with keycode, group, and level initialized
4998 uint lookup_key()(KeymapKey* key) {
4999 return gdk_keymap_lookup_key(&this, key);
5002 // VERSION: 2.20
5003 // Maps the virtual modifiers (i.e. Super, Hyper and Meta) which
5004 // are set in @state to their non-virtual counterparts (i.e. Mod2,
5005 // Mod3,...) and set the corresponding bits in @state.
5006 // This function is useful when matching key events against
5007 // accelerators.
5008 // same non-virtual modifier. Note that %FALSE is also returned
5009 // if a virtual modifier is mapped to a non-virtual modifier that
5010 // was already set in @state.
5011 // RETURNS: %TRUE if no virtual modifiers were mapped to the
5012 // <state>: pointer to the modifier state to map
5013 int map_virtual_modifiers()(ModifierType* state) {
5014 return gdk_keymap_map_virtual_modifiers(&this, state);
5017 // Translates the contents of a #GdkEventKey into a keyval, effective
5018 // group, and level. Modifiers that affected the translation and
5019 // are thus unavailable for application use are returned in
5020 // groups and levels. The @effective_group is the group that was
5021 // actually used for the translation; some keys such as Enter are not
5022 // affected by the active keyboard group. The @level is derived from
5023 // keyval, so this function isn't as useful as you might think.
5024 // <note><para>
5025 // from @state when comparing this key press to a hot key. For
5026 // instance, on a US keyboard, the <literal>plus</literal>
5027 // symbol is shifted, so when comparing a key press to a
5028 // <literal>&lt;Control&gt;plus</literal> accelerator &lt;Shift&gt; should
5029 // be masked out.
5030 // </para>
5031 // <informalexample><programlisting>
5032 // &sol;* We want to ignore irrelevant modifiers like ScrollLock *&sol;
5033 // &num;define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
5034 // gdk_keymap_translate_keyboard_state (keymap, event->hardware_keycode,
5035 // event->state, event->group,
5036 // &amp;keyval, NULL, NULL, &amp;consumed);
5037 // if (keyval == GDK_PLUS &&
5038 // (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
5039 // &sol;* Control was pressed *&sol;
5040 // </programlisting></informalexample>
5041 // <para>
5042 // An older interpretation @consumed_modifiers was that it contained
5043 // all modifiers that might affect the translation of the key;
5044 // this allowed accelerators to be stored with irrelevant consumed
5045 // modifiers, by doing:</para>
5046 // <informalexample><programlisting>
5047 // &sol;* XXX Don't do this XXX *&sol;
5048 // if (keyval == accel_keyval &&
5049 // (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == (accel_mods &amp; ~consumed))
5050 // &sol;* Accelerator was pressed *&sol;
5051 // </programlisting></informalexample>
5052 // <para>
5053 // However, this did not work if multi-modifier combinations were
5054 // used in the keymap, since, for instance, <literal>&lt;Control&gt;</literal>
5055 // would be masked out even if only <literal>&lt;Control&gt;&lt;Alt&gt;</literal>
5056 // was used in the keymap. To support this usage as well as well as
5057 // possible, all <emphasis>single modifier</emphasis> combinations
5058 // that could affect the key for any combination of modifiers will
5059 // be returned in @consumed_modifiers; multi-modifier combinations
5060 // are returned only when actually found in @state. When you store
5061 // accelerators, you should always store them with consumed modifiers
5062 // removed. Store <literal>&lt;Control&gt;plus</literal>,
5063 // not <literal>&lt;Control&gt;&lt;Shift&gt;plus</literal>,
5064 // </para></note>
5065 // Note that passing %NULL for @keymap is deprecated and will stop
5066 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
5067 // RETURNS: %TRUE if there was a keyval bound to the keycode/state/group
5068 // <hardware_keycode>: a keycode
5069 // <state>: a modifier state
5070 // <group>: active keyboard group
5071 // <keyval>: return location for keyval, or %NULL
5072 // <effective_group>: return location for effective group, or %NULL
5073 // <level>: return location for level, or %NULL
5074 // <consumed_modifiers>: return location for modifiers that were used to determine the group or level, or %NULL
5075 int translate_keyboard_state()(uint hardware_keycode, ModifierType state, int group, /*out*/ uint* keyval=null, /*out*/ int* effective_group=null, /*out*/ int* level=null, /*out*/ ModifierType* consumed_modifiers=null) {
5076 return gdk_keymap_translate_keyboard_state(&this, hardware_keycode, state, group, keyval, effective_group, level, consumed_modifiers);
5079 // VERSION: 2.0
5080 // The ::direction-changed signal gets emitted when the direction of
5081 // the keymap changes.
5082 extern (C) alias static void function (Keymap* this_, void* user_data=null) signal_direction_changed;
5084 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5085 return super_.signal_connect!name(cb, data, cf);
5088 ulong signal_connect(string name:"direction-changed", CB:signal_direction_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5089 return signal_connect_data!()(&this, cast(char*)"direction-changed",
5090 cast(GObject2.Callback)cb, data, null, cf);
5093 // VERSION: 2.2
5094 // The ::keys-changed signal is emitted when the mapping represented by
5095 extern (C) alias static void function (Keymap* this_, void* user_data=null) signal_keys_changed;
5096 ulong signal_connect(string name:"keys-changed", CB:signal_keys_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5097 return signal_connect_data!()(&this, cast(char*)"keys-changed",
5098 cast(GObject2.Callback)cb, data, null, cf);
5101 // VERSION: 2.16
5102 // The ::state-changed signal is emitted when the state of the
5103 // keyboard changes, e.g when Caps Lock is turned on or off.
5104 // See gdk_keymap_get_caps_lock_state().
5105 extern (C) alias static void function (Keymap* this_, void* user_data=null) signal_state_changed;
5106 ulong signal_connect(string name:"state-changed", CB:signal_state_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5107 return signal_connect_data!()(&this, cast(char*)"state-changed",
5108 cast(GObject2.Callback)cb, data, null, cf);
5112 struct KeymapClass {
5113 GObject2.ObjectClass parent_class;
5114 extern (C) void function (Keymap* keymap) direction_changed;
5115 extern (C) void function (Keymap* keymap) keys_changed;
5116 extern (C) void function (Keymap* keymap) state_changed;
5119 struct KeymapKey {
5120 uint keycode;
5121 int group, level;
5124 enum LineStyle {
5125 SOLID = 0,
5126 ON_OFF_DASH = 1,
5127 DOUBLE_DASH = 2
5129 enum int MAX_TIMECOORD_AXES = 128;
5130 enum ModifierType {
5131 SHIFT_MASK = 1,
5132 LOCK_MASK = 2,
5133 CONTROL_MASK = 4,
5134 MOD1_MASK = 8,
5135 MOD2_MASK = 16,
5136 MOD3_MASK = 32,
5137 MOD4_MASK = 64,
5138 MOD5_MASK = 128,
5139 BUTTON1_MASK = 256,
5140 BUTTON2_MASK = 512,
5141 BUTTON3_MASK = 1024,
5142 BUTTON4_MASK = 2048,
5143 BUTTON5_MASK = 4096,
5144 SUPER_MASK = 67108864,
5145 HYPER_MASK = 134217728,
5146 META_MASK = 268435456,
5147 RELEASE_MASK = 1073741824,
5148 MODIFIER_MASK = 1543512063
5150 enum NotifyType {
5151 ANCESTOR = 0,
5152 VIRTUAL = 1,
5153 INFERIOR = 2,
5154 NONLINEAR = 3,
5155 NONLINEAR_VIRTUAL = 4,
5156 UNKNOWN = 5
5158 enum OverlapType {
5159 IN = 0,
5160 OUT = 1,
5161 PART = 2
5163 enum OwnerChange {
5164 NEW_OWNER = 0,
5165 DESTROY = 1,
5166 CLOSE = 2
5168 enum int PARENT_RELATIVE = 1;
5169 enum int PRIORITY_REDRAW = 20;
5170 struct PangoAttrEmbossColor {
5171 Pango.Attribute attr;
5172 Pango.Color color;
5175 struct PangoAttrEmbossed {
5176 Pango.Attribute attr;
5177 int embossed;
5180 struct PangoAttrStipple {
5181 Pango.Attribute attr;
5182 Bitmap* stipple;
5186 // #GdkPangoRenderer is a subclass of #PangoRenderer used for rendering
5187 // Pango objects into GDK drawables. The default renderer for a particular
5188 // screen is obtained with gdk_pango_renderer_get_default(); Pango
5189 // functions like pango_renderer_draw_layout() and
5190 // pango_renderer_draw_layout_line() are then used to draw objects with
5191 // the renderer.
5192 // In most simple cases, applications can just use gdk_draw_layout(), and
5193 // don't need to directly use #GdkPangoRenderer at all. Using the
5194 // #GdkPangoRenderer directly is most useful when working with a
5195 // transformation such as a rotation, because the Pango drawing functions
5196 // take user space coordinates (coordinates before the transformation)
5197 // instead of device coordinates.
5198 // In certain cases it can be useful to subclass #GdkPangoRenderer. Examples
5199 // of reasons to do this are to add handling of custom attributes by
5200 // overriding 'prepare_run' or to do custom drawing of embedded objects
5201 // by overriding 'draw_shape'.
5202 struct PangoRenderer /* : Pango.Renderer */ /* Version 2.6 */ {
5203 alias parent_instance this;
5204 alias parent_instance super_;
5205 alias parent_instance renderer;
5206 Pango.Renderer parent_instance;
5207 private PangoRendererPrivate* priv;
5210 // VERSION: 2.6
5211 // Creates a new #PangoRenderer for @screen. Normally you can use the
5212 // results of gdk_pango_renderer_get_default() rather than creating a new
5213 // renderer.
5214 // RETURNS: a newly created #PangoRenderer. Free with g_object_unref().
5215 // <screen>: a #GdkScreen
5216 static PangoRenderer* /*new*/ new_()(Screen* screen) {
5217 return gdk_pango_renderer_new(screen);
5220 // Unintrospectable function: get_default() / gdk_pango_renderer_get_default()
5221 // VERSION: 2.6
5222 // Gets the default #PangoRenderer for a screen. This default renderer
5223 // is shared by all users of the display, so properties such as the color
5224 // or transformation matrix set for the renderer may be overwritten
5225 // by functions such as gdk_draw_layout().
5226 // Before using the renderer, you need to call gdk_pango_renderer_set_drawable()
5227 // and gdk_pango_renderer_set_gc() to set the drawable and graphics context
5228 // to use for drawing.
5229 // renderer is owned by GTK+ and will be kept around until the
5230 // screen is closed.
5231 // RETURNS: the default #PangoRenderer for @screen. The
5232 // <screen>: a #GdkScreen
5233 static Pango.Renderer* get_default()(Screen* screen) {
5234 return gdk_pango_renderer_get_default(screen);
5237 // VERSION: 2.6
5238 // Sets the drawable the renderer draws to.
5239 // <drawable>: the new target drawable, or %NULL
5240 void set_drawable()(Drawable* drawable=null) {
5241 gdk_pango_renderer_set_drawable(&this, drawable);
5244 // VERSION: 2.6
5245 // Sets the GC the renderer draws with. Note that the GC must not be
5246 // modified until it is unset by calling the function again with
5247 // %NULL for the @gc parameter, since GDK may make internal copies
5248 // of the GC which won't be updated to follow changes to the
5249 // original GC.
5250 // <gc>: the new GC to use for drawing, or %NULL
5251 void set_gc()(GC* gc=null) {
5252 gdk_pango_renderer_set_gc(&this, gc);
5255 // VERSION: 2.6
5256 // Sets the color for a particular render part (foreground,
5257 // background, underline, etc.), overriding any attributes on the layouts
5258 // renderered with this renderer.
5259 // <part>: the part to render to set the color of
5260 // <color>: the color to use, or %NULL to unset a previously set override color.
5261 void set_override_color()(Pango.RenderPart part, Color* color=null) {
5262 gdk_pango_renderer_set_override_color(&this, part, color);
5265 // VERSION: 2.6
5266 // Sets the stipple for one render part (foreground, background, underline,
5267 // etc.) Note that this is overwritten when iterating through the individual
5268 // styled runs of a #PangoLayout or #PangoLayoutLine. This function is thus
5269 // only useful when you call low level functions like pango_renderer_draw_glyphs()
5270 // directly, or in the 'prepare_run' virtual function of a subclass of
5271 // #GdkPangoRenderer.
5272 // <part>: the part to render with the stipple
5273 // <stipple>: the new stipple value.
5274 void set_stipple()(Pango.RenderPart part, Bitmap* stipple) {
5275 gdk_pango_renderer_set_stipple(&this, part, stipple);
5279 // #GdkPangoRenderer is the class structure for #GdkPangoRenderer.
5280 struct PangoRendererClass /* Version 2.6 */ {
5281 private Pango.RendererClass parent_class;
5284 struct PangoRendererPrivate {
5287 struct Pixmap /* : Drawable */ {
5288 alias method_parent this;
5289 alias method_parent super_;
5290 alias method_parent drawable;
5291 Drawable method_parent;
5294 // Wraps a native window for the default display in a #GdkPixmap.
5295 // This may fail if the pixmap has been destroyed.
5296 // For example in the X backend, a native pixmap handle is an Xlib
5297 // <type>XID</type>.
5298 // native pixmap or %NULL if the pixmap has been destroyed.
5299 // RETURNS: the newly-created #GdkPixmap wrapper for the
5300 // <anid>: a native pixmap handle.
5301 static Pixmap* /*new*/ foreign_new()(NativeWindow anid) {
5302 return gdk_pixmap_foreign_new(anid);
5305 // VERSION: 2.2
5306 // Wraps a native pixmap in a #GdkPixmap.
5307 // This may fail if the pixmap has been destroyed.
5308 // For example in the X backend, a native pixmap handle is an Xlib
5309 // <type>XID</type>.
5310 // native pixmap or %NULL if the pixmap has been destroyed.
5311 // RETURNS: the newly-created #GdkPixmap wrapper for the
5312 // <display>: The #GdkDisplay where @anid is located.
5313 // <anid>: a native pixmap handle.
5314 static Pixmap* /*new*/ foreign_new_for_display()(Display* display, NativeWindow anid) {
5315 return gdk_pixmap_foreign_new_for_display(display, anid);
5318 // VERSION: 2.10
5319 // Wraps a native pixmap in a #GdkPixmap.
5320 // This may fail if the pixmap has been destroyed.
5321 // For example in the X backend, a native pixmap handle is an Xlib
5322 // <type>XID</type>.
5323 // This function is an alternative to gdk_pixmap_foreign_new_for_display()
5324 // for cases where the dimensions of the pixmap are known. For the X
5325 // backend, this avoids a roundtrip to the server.
5326 // native pixmap or %NULL if the pixmap has been destroyed.
5327 // RETURNS: the newly-created #GdkPixmap wrapper for the
5328 // <screen>: a #GdkScreen
5329 // <anid>: a native pixmap handle
5330 // <width>: the width of the pixmap identified by @anid
5331 // <height>: the height of the pixmap identified by @anid
5332 // <depth>: the depth of the pixmap identified by @anid
5333 static Pixmap* /*new*/ foreign_new_for_screen()(Screen* screen, NativeWindow anid, int width, int height, int depth) {
5334 return gdk_pixmap_foreign_new_for_screen(screen, anid, width, height, depth);
5336 static Pixmap* /*new*/ new_()(Drawable* drawable, int width, int height, int depth) {
5337 return gdk_pixmap_new(drawable, width, height, depth);
5340 // DEPRECATED (v2.22) function: colormap_create_from_xpm - Use a #GdkPixbuf instead. You can use
5341 // Create a pixmap from a XPM file using a particular colormap.
5342 // gdk_pixbuf_new_from_file() to create it.
5343 // If you must use a pixmap, use gdk_pixmap_new() to
5344 // create it and Cairo to draw the pixbuf onto it.
5345 // RETURNS: the #GdkPixmap.
5346 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap. Can be %NULL if @colormap is given.
5347 // <colormap>: the #GdkColormap that the new pixmap will be use. If omitted, the colormap for @window will be used.
5348 // <mask>: a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be %NULL, in which case transparency will be ignored.
5349 // <transparent_color>: the color to be used for the pixels that are transparent in the input file. Can be %NULL, in which case a default color will be used.
5350 // <filename>: the filename of a file containing XPM data.
5351 static Pixmap* colormap_create_from_xpm()(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char* filename) {
5352 return gdk_pixmap_colormap_create_from_xpm(drawable, colormap, mask, transparent_color, filename);
5355 // DEPRECATED (v2.22) function: colormap_create_from_xpm_d - Use a #GdkPixbuf instead. You can use
5356 // Create a pixmap from data in XPM format using a particular
5357 // colormap.
5358 // gdk_pixbuf_new_from_xpm_data() to create it.
5359 // If you must use a pixmap, use gdk_pixmap_new() to
5360 // create it and Cairo to draw the pixbuf onto it.
5361 // RETURNS: the #GdkPixmap.
5362 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap. Can be %NULL if @colormap is given.
5363 // <colormap>: the #GdkColormap that the new pixmap will be use. If omitted, the colormap for @window will be used.
5364 // <mask>: a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be %NULL, in which case transparency will be ignored.
5365 // <transparent_color>: the color to be used for the pixels that are transparent in the input file. Can be %NULL, in which case a default color will be used.
5366 // <data>: Pointer to a string containing the XPM data.
5367 static Pixmap* colormap_create_from_xpm_d()(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char** data) {
5368 return gdk_pixmap_colormap_create_from_xpm_d(drawable, colormap, mask, transparent_color, data);
5370 // Unintrospectable function: create_from_data() / gdk_pixmap_create_from_data()
5371 static Pixmap* create_from_data()(Drawable* drawable, char* data, int width, int height, int depth, Color* fg, Color* bg) {
5372 return gdk_pixmap_create_from_data(drawable, data, width, height, depth, fg, bg);
5375 // DEPRECATED (v2.22) function: create_from_xpm - Use a #GdkPixbuf instead. You can use
5376 // Create a pixmap from a XPM file.
5377 // gdk_pixbuf_new_from_file() to create it.
5378 // If you must use a pixmap, use gdk_pixmap_new() to
5379 // create it and Cairo to draw the pixbuf onto it.
5380 // RETURNS: the #GdkPixmap
5381 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap.
5382 // <mask>: (out) a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be %NULL, in which case transparency will be ignored.
5383 // <transparent_color>: the color to be used for the pixels that are transparent in the input file. Can be %NULL, in which case a default color will be used.
5384 // <filename>: the filename of a file containing XPM data.
5385 static Pixmap* create_from_xpm()(Drawable* drawable, Bitmap** mask, Color* transparent_color, char* filename) {
5386 return gdk_pixmap_create_from_xpm(drawable, mask, transparent_color, filename);
5389 // DEPRECATED (v2.22) function: create_from_xpm_d - Use a #GdkPixbuf instead. You can use
5390 // Create a pixmap from data in XPM format.
5391 // gdk_pixbuf_new_from_xpm_data() to create it.
5392 // If you must use a pixmap, use gdk_pixmap_new() to
5393 // create it and Cairo to draw the pixbuf onto it.
5394 // RETURNS: the #GdkPixmap.
5395 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap.
5396 // <mask>: Pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be %NULL, in which case transparency will be ignored.
5397 // <transparent_color>: This color will be used for the pixels that are transparent in the input file. Can be %NULL in which case a default color will be used.
5398 // <data>: Pointer to a string containing the XPM data.
5399 static Pixmap* create_from_xpm_d()(Drawable* drawable, /*out*/ Bitmap** mask, Color* transparent_color, char** data) {
5400 return gdk_pixmap_create_from_xpm_d(drawable, mask, transparent_color, data);
5403 // Unintrospectable function: lookup() / gdk_pixmap_lookup()
5404 // Looks up the #GdkPixmap that wraps the given native pixmap handle.
5405 // For example in the X backend, a native pixmap handle is an Xlib
5406 // <type>XID</type>.
5407 // or %NULL if there is none.
5408 // RETURNS: the #GdkPixmap wrapper for the native pixmap,
5409 // <anid>: a native pixmap handle.
5410 static Pixmap* lookup()(NativeWindow anid) {
5411 return gdk_pixmap_lookup(anid);
5414 // Unintrospectable function: lookup_for_display() / gdk_pixmap_lookup_for_display()
5415 // VERSION: 2.2
5416 // Looks up the #GdkPixmap that wraps the given native pixmap handle.
5417 // For example in the X backend, a native pixmap handle is an Xlib
5418 // <type>XID</type>.
5419 // or %NULL if there is none.
5420 // RETURNS: the #GdkPixmap wrapper for the native pixmap,
5421 // <display>: the #GdkDisplay associated with @anid
5422 // <anid>: a native pixmap handle.
5423 static Pixmap* lookup_for_display()(Display* display, NativeWindow anid) {
5424 return gdk_pixmap_lookup_for_display(display, anid);
5427 // VERSION: 2.24
5428 // This function is purely to make it possible to query the size of pixmaps
5429 // even when compiling without deprecated symbols and you must use pixmaps.
5430 // It is identical to gdk_drawable_get_size(), but for pixmaps.
5431 // <width>: location to store @pixmap's width, or %NULL
5432 // <height>: location to store @pixmap's height, or %NULL
5433 void get_size()(/*out*/ int* width=null, /*out*/ int* height=null) {
5434 gdk_pixmap_get_size(&this, width, height);
5438 struct PixmapObject {
5439 Drawable parent_instance;
5440 Drawable* impl;
5441 int depth;
5444 struct PixmapObjectClass {
5445 DrawableClass parent_class;
5448 struct Point {
5449 int x, y;
5452 struct PointerHooks {
5453 // Unintrospectable functionp: get_pointer() / ()
5454 extern (C) Window* function (Window* window, int* x, int* y, ModifierType* mask) get_pointer;
5455 // Unintrospectable functionp: window_at_pointer() / ()
5456 extern (C) Window* function (Screen* screen, int* win_x, int* win_y) window_at_pointer;
5459 struct PointerWindowInfo {
5460 Window* toplevel_under_pointer, window_under_pointer;
5461 double toplevel_x, toplevel_y;
5462 uint state, button;
5463 c_ulong motion_hint_serial;
5466 enum PropMode {
5467 REPLACE = 0,
5468 PREPEND = 1,
5469 APPEND = 2
5471 enum PropertyState {
5472 NEW_VALUE = 0,
5473 DELETE = 1
5475 struct Rectangle {
5476 int x, y, width, height;
5479 // Calculates the intersection of two rectangles. It is allowed for
5480 // do not intersect, @dest's width and height is set to 0 and its x
5481 // and y values are undefined. If you are only interested in whether
5482 // the rectangles intersect, but not in the intersecting area itself,
5483 // pass %NULL for @dest.
5484 // RETURNS: %TRUE if the rectangles intersect.
5485 // <src2>: a #GdkRectangle
5486 // <dest>: return location for the intersection of @src1 and @src2, or %NULL
5487 int intersect()(Rectangle* src2, /*out*/ Rectangle* dest=null) {
5488 return gdk_rectangle_intersect(&this, src2, dest);
5491 // Calculates the union of two rectangles.
5492 // The union of rectangles @src1 and @src2 is the smallest rectangle which
5493 // includes both @src1 and @src2 within it.
5494 // It is allowed for @dest to be the same as either @src1 or @src2.
5495 // <src2>: a #GdkRectangle
5496 // <dest>: return location for the union of @src1 and @src2
5497 void union_()(Rectangle* src2, /*out*/ Rectangle* dest) {
5498 gdk_rectangle_union(&this, src2, dest);
5501 // --- mixin/Gdk2_Rectangle.d --->
5503 void union_()(Rectangle* src2) {
5504 gdk_rectangle_union(&this, src2, &this);
5507 // <--- mixin/Gdk2_Rectangle.d ---
5510 struct Region {
5512 // Unintrospectable method: copy() / gdk_region_copy()
5513 // Copies @region, creating an identical new region.
5514 // RETURNS: a new region identical to @region
5515 Region* copy()() {
5516 return gdk_region_copy(&this);
5518 // Destroys a #GdkRegion.
5519 void destroy()() {
5520 gdk_region_destroy(&this);
5523 // Finds out if the #GdkRegion is empty.
5524 // RETURNS: %TRUE if @region is empty.
5525 int empty()() {
5526 return gdk_region_empty(&this);
5529 // Finds out if the two regions are the same.
5530 // RETURNS: %TRUE if @region1 and @region2 are equal.
5531 // <region2>: a #GdkRegion
5532 int equal()(Region* region2) {
5533 return gdk_region_equal(&this, region2);
5536 // Obtains the smallest rectangle which includes the entire #GdkRegion.
5537 // <rectangle>: return location for the clipbox
5538 void get_clipbox()(Rectangle* rectangle) {
5539 gdk_region_get_clipbox(&this, rectangle);
5542 // Obtains the area covered by the region as a list of rectangles.
5543 // The array returned in @rectangles must be freed with g_free().
5544 // <rectangles>: return location for an array of rectangles
5545 // <n_rectangles>: length of returned array
5546 void get_rectangles()(Rectangle** rectangles, int* n_rectangles) {
5547 gdk_region_get_rectangles(&this, rectangles, n_rectangles);
5550 // Sets the area of @source1 to the intersection of the areas of @source1
5551 // and @source2. The resulting area is the set of pixels contained in
5552 // both @source1 and @source2.
5553 // <source2>: another #GdkRegion
5554 void intersect()(Region* source2) {
5555 gdk_region_intersect(&this, source2);
5558 // Moves a region the specified distance.
5559 // <dx>: the distance to move the region horizontally
5560 // <dy>: the distance to move the region vertically
5561 void offset()(int dx, int dy) {
5562 gdk_region_offset(&this, dx, dy);
5565 // Finds out if a point is in a region.
5566 // RETURNS: %TRUE if the point is in @region.
5567 // <x>: the x coordinate of a point
5568 // <y>: the y coordinate of a point
5569 int point_in()(int x, int y) {
5570 return gdk_region_point_in(&this, x, y);
5573 // VERSION: 2.18
5574 // DEPRECATED (v2.22) method: rect_equal - Use gdk_region_new_rect() and gdk_region_equal() to
5575 // Finds out if a regions is the same as a rectangle.
5576 // achieve the same effect.
5577 // RETURNS: %TRUE if @region and @rectangle are equal.
5578 // <rectangle>: a #GdkRectangle
5579 int rect_equal()(Rectangle* rectangle) {
5580 return gdk_region_rect_equal(&this, rectangle);
5583 // Tests whether a rectangle is within a region.
5584 // %GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
5585 // outside, or partly inside the #GdkRegion, respectively.
5586 // RETURNS: %GDK_OVERLAP_RECTANGLE_IN, %GDK_OVERLAP_RECTANGLE_OUT, or
5587 // <rectangle>: a #GdkRectangle.
5588 OverlapType rect_in()(Rectangle* rectangle) {
5589 return gdk_region_rect_in(&this, rectangle);
5592 // DEPRECATED (v2.22) method: shrink - There is no replacement for this function.
5593 // Resizes a region by the specified amount.
5594 // Positive values shrink the region. Negative values expand it.
5595 // <dx>: the number of pixels to shrink the region horizontally
5596 // <dy>: the number of pixels to shrink the region vertically
5597 void shrink()(int dx, int dy) {
5598 gdk_region_shrink(&this, dx, dy);
5601 // Unintrospectable method: spans_intersect_foreach() / gdk_region_spans_intersect_foreach()
5602 // DEPRECATED (v2.22) method: spans_intersect_foreach - There is no replacement.
5603 // Calls a function on each span in the intersection of @region and @spans.
5604 // <spans>: an array of #GdkSpans
5605 // <n_spans>: the length of @spans
5606 // <sorted>: %TRUE if @spans is sorted wrt. the y coordinate
5607 // <function>: function to call on each span in the intersection
5608 // <data>: data to pass to @function
5609 void spans_intersect_foreach()(Span* spans, int n_spans, int sorted, SpanFunc function_, void* data) {
5610 gdk_region_spans_intersect_foreach(&this, spans, n_spans, sorted, function_, data);
5613 // Subtracts the area of @source2 from the area @source1. The resulting
5614 // area is the set of pixels contained in @source1 but not in @source2.
5615 // <source2>: another #GdkRegion
5616 void subtract()(Region* source2) {
5617 gdk_region_subtract(&this, source2);
5620 // Sets the area of @source1 to the union of the areas of @source1 and
5621 // either @source1 or @source2.
5622 // <source2>: a #GdkRegion
5623 void union_()(Region* source2) {
5624 gdk_region_union(&this, source2);
5627 // Sets the area of @region to the union of the areas of @region and
5628 // either @region or @rect.
5629 // <rect>: a #GdkRectangle.
5630 void union_with_rect()(Rectangle* rect) {
5631 gdk_region_union_with_rect(&this, rect);
5634 // Sets the area of @source1 to the exclusive-OR of the areas of @source1
5635 // and @source2. The resulting area is the set of pixels contained in one
5636 // or the other of the two sources but not in both.
5637 // <source2>: another #GdkRegion
5638 void xor()(Region* source2) {
5639 gdk_region_xor(&this, source2);
5643 struct RgbCmap {
5644 uint[256] colors;
5645 int n_colors;
5646 private GLib2.SList* info_list;
5648 void free()() {
5649 gdk_rgb_cmap_free(&this);
5653 enum RgbDither {
5654 NONE = 0,
5655 NORMAL = 1,
5656 MAX = 2
5658 struct Screen /* : GObject.Object */ {
5659 alias parent_instance this;
5660 alias parent_instance super_;
5661 alias parent_instance object;
5662 GObject2.Object parent_instance;
5663 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5664 uint, "closed", 1,
5665 uint, "__dummy32A", 31));
5666 GC*[32] normal_gcs, exposure_gcs, subwindow_gcs;
5667 cairo.FontOptions* font_options;
5668 double resolution;
5671 // VERSION: 2.2
5672 // Gets the default screen for the default display. (See
5673 // gdk_display_get_default ()).
5674 // RETURNS: a #GdkScreen, or %NULL if there is no default display.
5675 static Screen* get_default()() {
5676 return gdk_screen_get_default();
5679 // Returns the height of the default screen in pixels.
5680 // RETURNS: the height of the default screen in pixels.
5681 static int height()() {
5682 return gdk_screen_height();
5685 // Returns the height of the default screen in millimeters.
5686 // Note that on many X servers this value will not be correct.
5687 // though it is not always correct.
5688 // RETURNS: the height of the default screen in millimeters,
5689 static int height_mm()() {
5690 return gdk_screen_height_mm();
5693 // Returns the width of the default screen in pixels.
5694 // RETURNS: the width of the default screen in pixels.
5695 static int width()() {
5696 return gdk_screen_width();
5699 // Returns the width of the default screen in millimeters.
5700 // Note that on many X servers this value will not be correct.
5701 // though it is not always correct.
5702 // RETURNS: the width of the default screen in millimeters,
5703 static int width_mm()() {
5704 return gdk_screen_width_mm();
5706 void broadcast_client_message()(Event* event) {
5707 gdk_screen_broadcast_client_message(&this, event);
5710 // Unintrospectable method: get_active_window() / gdk_screen_get_active_window()
5711 // VERSION: 2.10
5712 // Returns the screen's currently active window.
5713 // On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
5714 // on the root window, as described in the <ulink
5715 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
5716 // Manager Hints</ulink>. If there is no currently currently active
5717 // window, or the window manager does not support the
5718 // _NET_ACTIVE_WINDOW hint, this function returns %NULL.
5719 // On other platforms, this function may return %NULL, depending on whether
5720 // it is implementable on that platform.
5721 // The returned window should be unrefed using g_object_unref() when
5722 // no longer needed.
5723 // RETURNS: the currently active window, or %NULL.
5724 Window* get_active_window()() {
5725 return gdk_screen_get_active_window(&this);
5728 // VERSION: 2.2
5729 // Gets the default colormap for @screen.
5730 // RETURNS: the default #GdkColormap.
5731 Colormap* get_default_colormap()() {
5732 return gdk_screen_get_default_colormap(&this);
5735 // Unintrospectable method: get_display() / gdk_screen_get_display()
5736 // VERSION: 2.2
5737 // Gets the display to which the @screen belongs.
5738 // RETURNS: the display to which @screen belongs
5739 Display* get_display()() {
5740 return gdk_screen_get_display(&this);
5743 // VERSION: 2.10
5744 // Gets any options previously set with gdk_screen_set_font_options().
5745 // font options have been set.
5746 // RETURNS: the current font options, or %NULL if no default
5747 cairo.FontOptions* get_font_options()() {
5748 return gdk_screen_get_font_options(&this);
5751 // VERSION: 2.2
5752 // Gets the height of @screen in pixels
5753 // RETURNS: the height of @screen in pixels.
5754 int get_height()() {
5755 return gdk_screen_get_height(&this);
5758 // VERSION: 2.2
5759 // Returns the height of @screen in millimeters.
5760 // Note that on some X servers this value will not be correct.
5761 // RETURNS: the heigth of @screen in millimeters.
5762 int get_height_mm()() {
5763 return gdk_screen_get_height_mm(&this);
5766 // VERSION: 2.2
5767 // Returns the monitor number in which the point (@x,@y) is located.
5768 // a monitor close to (@x,@y) if the point is not in any monitor.
5769 // RETURNS: the monitor number in which the point (@x,@y) lies, or
5770 // <x>: the x coordinate in the virtual screen.
5771 // <y>: the y coordinate in the virtual screen.
5772 int get_monitor_at_point()(int x, int y) {
5773 return gdk_screen_get_monitor_at_point(&this, x, y);
5776 // VERSION: 2.2
5777 // Returns the number of the monitor in which the largest area of the
5778 // bounding rectangle of @window resides.
5779 // RETURNS: the monitor number in which most of @window is located, or if @window does not intersect any monitors, a monitor, close to @window.
5780 // <window>: a #GdkWindow
5781 int get_monitor_at_window()(Window* window) {
5782 return gdk_screen_get_monitor_at_window(&this, window);
5785 // VERSION: 2.2
5786 // Retrieves the #GdkRectangle representing the size and position of
5787 // the individual monitor within the entire screen area.
5788 // Note that the size of the entire screen area can be retrieved via
5789 // gdk_screen_get_width() and gdk_screen_get_height().
5790 // <monitor_num>: the monitor number, between 0 and gdk_screen_get_n_monitors (screen)
5791 // <dest>: a #GdkRectangle to be filled with the monitor geometry
5792 void get_monitor_geometry()(int monitor_num, Rectangle* dest) {
5793 gdk_screen_get_monitor_geometry(&this, monitor_num, dest);
5796 // VERSION: 2.14
5797 // Gets the height in millimeters of the specified monitor.
5798 // RETURNS: the height of the monitor, or -1 if not available
5799 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5800 int get_monitor_height_mm()(int monitor_num) {
5801 return gdk_screen_get_monitor_height_mm(&this, monitor_num);
5804 // VERSION: 2.14
5805 // Returns the output name of the specified monitor.
5806 // Usually something like VGA, DVI, or TV, not the actual
5807 // product name of the display device.
5808 // or %NULL if the name cannot be determined
5809 // RETURNS: a newly-allocated string containing the name of the monitor,
5810 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5811 char* /*new*/ get_monitor_plug_name()(int monitor_num) {
5812 return gdk_screen_get_monitor_plug_name(&this, monitor_num);
5815 // VERSION: 2.14
5816 // Gets the width in millimeters of the specified monitor, if available.
5817 // RETURNS: the width of the monitor, or -1 if not available
5818 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5819 int get_monitor_width_mm()(int monitor_num) {
5820 return gdk_screen_get_monitor_width_mm(&this, monitor_num);
5823 // VERSION: 2.2
5824 // Returns the number of monitors which @screen consists of.
5825 // RETURNS: number of monitors which @screen consists of
5826 int get_n_monitors()() {
5827 return gdk_screen_get_n_monitors(&this);
5830 // VERSION: 2.2
5831 // Gets the index of @screen among the screens in the display
5832 // to which it belongs. (See gdk_screen_get_display())
5833 // RETURNS: the index
5834 int get_number()() {
5835 return gdk_screen_get_number(&this);
5838 // VERSION: 2.20
5839 // Gets the primary monitor for @screen. The primary monitor
5840 // is considered the monitor where the 'main desktop' lives.
5841 // While normal application windows typically allow the window
5842 // manager to place the windows, specialized desktop applications
5843 // such as panels should place themselves on the primary monitor.
5844 // If no primary monitor is configured by the user, the return value
5845 // will be 0, defaulting to the first monitor.
5846 // RETURNS: An integer index for the primary monitor, or 0 if none is configured.
5847 int get_primary_monitor()() {
5848 return gdk_screen_get_primary_monitor(&this);
5851 // VERSION: 2.10
5852 // Gets the resolution for font handling on the screen; see
5853 // gdk_screen_set_resolution() for full details.
5854 // has been set.
5855 // RETURNS: the current resolution, or -1 if no resolution
5856 double get_resolution()() {
5857 return gdk_screen_get_resolution(&this);
5860 // VERSION: 2.2
5861 // DEPRECATED (v2.22) method: get_rgb_colormap - Use gdk_screen_get_system_colormap()
5862 // Gets the preferred colormap for rendering image data on @screen.
5863 // Not a very useful function; historically, GDK could only render RGB
5864 // image data to one colormap and visual, but in the current version
5865 // it can render to any colormap and visual. So there's no need to
5866 // call this function.
5867 // RETURNS: the preferred colormap
5868 Colormap* get_rgb_colormap()() {
5869 return gdk_screen_get_rgb_colormap(&this);
5872 // VERSION: 2.2
5873 // DEPRECATED (v2.22) method: get_rgb_visual - Use gdk_screen_get_system_visual()
5874 // Gets a "preferred visual" chosen by GdkRGB for rendering image data
5875 // on @screen. In previous versions of
5876 // GDK, this was the only visual GdkRGB could use for rendering. In
5877 // current versions, it's simply the visual GdkRGB would have chosen as
5878 // the optimal one in those previous versions. GdkRGB can now render to
5879 // drawables with any visual.
5880 // RETURNS: The #GdkVisual chosen by GdkRGB.
5881 Visual* get_rgb_visual()() {
5882 return gdk_screen_get_rgb_visual(&this);
5885 // VERSION: 2.8
5886 // Gets a colormap to use for creating windows or pixmaps with an
5887 // alpha channel. The windowing system on which GTK+ is running
5888 // may not support this capability, in which case %NULL will
5889 // be returned. Even if a non-%NULL value is returned, its
5890 // possible that the window's alpha channel won't be honored
5891 // X an appropriate windowing manager and compositing manager
5892 // must be running to provide appropriate display.
5893 // This functionality is not implemented in the Windows backend.
5894 // For setting an overall opacity for a top-level window, see
5895 // gdk_window_set_opacity().
5896 // an alpha channel or %NULL if the capability is not available.
5897 // RETURNS: a colormap to use for windows with
5898 Colormap* get_rgba_colormap()() {
5899 return gdk_screen_get_rgba_colormap(&this);
5902 // VERSION: 2.8
5903 // Gets a visual to use for creating windows or pixmaps with an
5904 // alpha channel. See the docs for gdk_screen_get_rgba_colormap()
5905 // for caveats.
5906 // alpha channel or %NULL if the capability is not available.
5907 // RETURNS: a visual to use for windows with an
5908 Visual* get_rgba_visual()() {
5909 return gdk_screen_get_rgba_visual(&this);
5912 // VERSION: 2.2
5913 // Gets the root window of @screen.
5914 // RETURNS: the root window
5915 Window* get_root_window()() {
5916 return gdk_screen_get_root_window(&this);
5918 int get_setting()(char* name, GObject2.Value* value) {
5919 return gdk_screen_get_setting(&this, name, value);
5922 // VERSION: 2.2
5923 // Gets the system's default colormap for @screen
5924 // RETURNS: the default colormap for @screen.
5925 Colormap* get_system_colormap()() {
5926 return gdk_screen_get_system_colormap(&this);
5929 // VERSION: 2.2
5930 // Get the system's default visual for @screen.
5931 // This is the visual for the root window of the display.
5932 // The return value should not be freed.
5933 // RETURNS: the system visual
5934 Visual* get_system_visual()() {
5935 return gdk_screen_get_system_visual(&this);
5938 // VERSION: 2.2
5939 // Obtains a list of all toplevel windows known to GDK on the screen @screen.
5940 // A toplevel window is a child of the root window (see
5941 // gdk_get_default_root_window()).
5942 // The returned list should be freed with g_list_free(), but
5943 // its elements need not be freed.
5944 // list of toplevel windows, free with g_list_free()
5945 GLib2.List* /*new container*/ get_toplevel_windows()() {
5946 return gdk_screen_get_toplevel_windows(&this);
5949 // VERSION: 2.2
5950 // Gets the width of @screen in pixels
5951 // RETURNS: the width of @screen in pixels.
5952 int get_width()() {
5953 return gdk_screen_get_width(&this);
5956 // VERSION: 2.2
5957 // Gets the width of @screen in millimeters.
5958 // Note that on some X servers this value will not be correct.
5959 // RETURNS: the width of @screen in millimeters.
5960 int get_width_mm()() {
5961 return gdk_screen_get_width_mm(&this);
5964 // VERSION: 2.10
5965 // Returns a #GList of #GdkWindow<!-- -->s representing the current
5966 // window stack.
5967 // On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
5968 // property on the root window, as described in the <ulink
5969 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
5970 // Manager Hints</ulink>. If the window manager does not support the
5971 // _NET_CLIENT_LIST_STACKING hint, this function returns %NULL.
5972 // On other platforms, this function may return %NULL, depending on whether
5973 // it is implementable on that platform.
5974 // The returned list is newly allocated and owns references to the
5975 // windows it contains, so it should be freed using g_list_free() and
5976 // its windows unrefed using g_object_unref() when no longer needed.
5977 // a list of #GdkWindow<!-- -->s for the current window stack,
5978 // or %NULL.
5979 GLib2.List* /*new*/ get_window_stack()() {
5980 return gdk_screen_get_window_stack(&this);
5983 // VERSION: 2.10
5984 // Returns whether windows with an RGBA visual can reasonably
5985 // be expected to have their alpha channel drawn correctly on
5986 // the screen.
5987 // On X11 this function returns whether a compositing manager is
5988 // compositing @screen.
5989 // expected to have their alpha channels drawn correctly on the screen.
5990 // RETURNS: Whether windows with RGBA visuals can reasonably be
5991 int is_composited()() {
5992 return gdk_screen_is_composited(&this);
5995 // VERSION: 2.2
5996 // Lists the available visuals for the specified @screen.
5997 // A visual describes a hardware image data format.
5998 // For example, a visual might support 24-bit color, or 8-bit color,
5999 // and might expect pixels to be in a certain format.
6000 // Call g_list_free() on the return value when you're finished with it.
6001 // a list of visuals; the list must be freed, but not its contents
6002 GLib2.List* /*new container*/ list_visuals()() {
6003 return gdk_screen_list_visuals(&this);
6006 // VERSION: 2.2
6007 // Determines the name to pass to gdk_display_open() to get
6008 // a #GdkDisplay with this screen as the default screen.
6009 // RETURNS: a newly allocated string, free with g_free()
6010 char* /*new*/ make_display_name()() {
6011 return gdk_screen_make_display_name(&this);
6014 // VERSION: 2.2
6015 // Sets the default @colormap for @screen.
6016 // <colormap>: a #GdkColormap
6017 void set_default_colormap()(Colormap* colormap) {
6018 gdk_screen_set_default_colormap(&this, colormap);
6021 // VERSION: 2.10
6022 // Sets the default font options for the screen. These
6023 // options will be set on any #PangoContext's newly created
6024 // with gdk_pango_context_get_for_screen(). Changing the
6025 // default set of font options does not affect contexts that
6026 // have already been created.
6027 // <options>: a #cairo_font_options_t, or %NULL to unset any previously set default font options.
6028 void set_font_options()(cairo.FontOptions* options=null) {
6029 gdk_screen_set_font_options(&this, options);
6032 // VERSION: 2.10
6033 // Sets the resolution for font handling on the screen. This is a
6034 // scale factor between points specified in a #PangoFontDescription
6035 // and cairo units. The default value is 96, meaning that a 10 point
6036 // font will be 13 units high. (10 * 96. / 72. = 13.3).
6037 // <dpi>: the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.)
6038 void set_resolution()(double dpi) {
6039 gdk_screen_set_resolution(&this, dpi);
6042 // VERSION: 2.10
6043 // The ::composited-changed signal is emitted when the composited
6044 // status of the screen changes
6045 extern (C) alias static void function (Screen* this_, void* user_data=null) signal_composited_changed;
6047 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6048 return super_.signal_connect!name(cb, data, cf);
6051 ulong signal_connect(string name:"composited-changed", CB:signal_composited_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6052 return signal_connect_data!()(&this, cast(char*)"composited-changed",
6053 cast(GObject2.Callback)cb, data, null, cf);
6056 // VERSION: 2.14
6057 // The ::monitors-changed signal is emitted when the number, size
6058 // or position of the monitors attached to the screen change.
6059 // Only for X11 and OS X for now. A future implementation for Win32
6060 // may be a possibility.
6061 extern (C) alias static void function (Screen* this_, void* user_data=null) signal_monitors_changed;
6062 ulong signal_connect(string name:"monitors-changed", CB:signal_monitors_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6063 return signal_connect_data!()(&this, cast(char*)"monitors-changed",
6064 cast(GObject2.Callback)cb, data, null, cf);
6067 // VERSION: 2.2
6068 // The ::size-changed signal is emitted when the pixel width or
6069 // height of a screen changes.
6070 extern (C) alias static void function (Screen* this_, void* user_data=null) signal_size_changed;
6071 ulong signal_connect(string name:"size-changed", CB:signal_size_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6072 return signal_connect_data!()(&this, cast(char*)"size-changed",
6073 cast(GObject2.Callback)cb, data, null, cf);
6077 struct ScreenClass {
6078 GObject2.ObjectClass parent_class;
6079 extern (C) void function (Screen* screen) size_changed;
6080 extern (C) void function (Screen* screen) composited_changed;
6081 extern (C) void function (Screen* screen) monitors_changed;
6084 enum ScrollDirection {
6085 UP = 0,
6086 DOWN = 1,
6087 LEFT = 2,
6088 RIGHT = 3
6090 struct Segment {
6091 int x1, y1, x2, y2;
6094 enum SettingAction {
6095 NEW = 0,
6096 CHANGED = 1,
6097 DELETED = 2
6099 struct Span {
6100 int x, y, width;
6103 extern (C) alias void function (Span* span, void* data) SpanFunc;
6105 enum Status {
6106 OK = 0,
6107 ERROR = -1,
6108 ERROR_PARAM = -2,
6109 ERROR_FILE = -3,
6110 ERROR_MEM = -4
6112 enum SubwindowMode {
6113 CLIP_BY_CHILDREN = 0,
6114 INCLUDE_INFERIORS = 1
6116 struct TimeCoord {
6117 uint time;
6118 double[128] axes;
6121 struct Trapezoid {
6122 double y1, x11, x21, y2, x12, x22;
6125 enum VisibilityState {
6126 UNOBSCURED = 0,
6127 PARTIAL = 1,
6128 FULLY_OBSCURED = 2
6130 struct Visual /* : GObject.Object */ {
6131 alias parent_instance this;
6132 alias parent_instance super_;
6133 alias parent_instance object;
6134 GObject2.Object parent_instance;
6135 VisualType type;
6136 int depth;
6137 ByteOrder byte_order;
6138 int colormap_size, bits_per_rgb;
6139 uint red_mask;
6140 int red_shift, red_prec;
6141 uint green_mask;
6142 int green_shift, green_prec;
6143 uint blue_mask;
6144 int blue_shift, blue_prec;
6147 // Get the visual with the most available colors for the default
6148 // GDK screen. The return value should not be freed.
6149 // RETURNS: best visual
6150 static Visual* get_best()() {
6151 return gdk_visual_get_best();
6154 // Get the best available depth for the default GDK screen. "Best"
6155 // means "largest," i.e. 32 preferred over 24 preferred over 8 bits
6156 // per pixel.
6157 // RETURNS: best available depth
6158 static int get_best_depth()() {
6159 return gdk_visual_get_best_depth();
6162 // Return the best available visual type for the default GDK screen.
6163 // RETURNS: best visual type
6164 static VisualType get_best_type()() {
6165 return gdk_visual_get_best_type();
6168 // Combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type().
6169 // RETURNS: best visual with both @depth and
6170 // <depth>: a bit depth
6171 // <visual_type>: a visual type
6172 static Visual* get_best_with_both()(int depth, VisualType visual_type) {
6173 return gdk_visual_get_best_with_both(depth, visual_type);
6176 // Get the best visual with depth @depth for the default GDK screen.
6177 // Color visuals and visuals with mutable colormaps are preferred
6178 // over grayscale or fixed-colormap visuals. The return value should not
6179 // be freed. %NULL may be returned if no visual supports @depth.
6180 // RETURNS: best visual for the given depth
6181 // <depth>: a bit depth
6182 static Visual* get_best_with_depth()(int depth) {
6183 return gdk_visual_get_best_with_depth(depth);
6186 // Get the best visual of the given @visual_type for the default GDK screen.
6187 // Visuals with higher color depths are considered better. The return value
6188 // should not be freed. %NULL may be returned if no visual has type
6189 // RETURNS: best visual of the given type
6190 // <visual_type>: a visual type
6191 static Visual* get_best_with_type()(VisualType visual_type) {
6192 return gdk_visual_get_best_with_type(visual_type);
6195 // Get the system's default visual for the default GDK screen.
6196 // This is the visual for the root window of the display.
6197 // The return value should not be freed.
6198 // RETURNS: system visual
6199 static Visual* get_system()() {
6200 return gdk_visual_get_system();
6203 // VERSION: 2.22
6204 // Returns the number of significant bits per red, green and blue value.
6205 // RETURNS: The number of significant bits per color value for @visual.
6206 int get_bits_per_rgb()() {
6207 return gdk_visual_get_bits_per_rgb(&this);
6210 // VERSION: 2.22
6211 // Obtains values that are needed to calculate blue pixel values in TrueColor
6212 // and DirectColor. The "mask" is the significant bits within the pixel.
6213 // The "shift" is the number of bits left we must shift a primary for it
6214 // to be in position (according to the "mask"). Finally, "precision" refers
6215 // to how much precision the pixel value contains for a particular primary.
6216 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6217 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6218 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6219 void get_blue_pixel_details()(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) {
6220 gdk_visual_get_blue_pixel_details(&this, mask, shift, precision);
6223 // VERSION: 2.22
6224 // Returns the byte order of this visual.
6225 // RETURNS: A #GdkByteOrder stating the byte order of @visual.
6226 ByteOrder get_byte_order()() {
6227 return gdk_visual_get_byte_order(&this);
6230 // VERSION: 2.22
6231 // Returns the size of a colormap for this visual.
6232 // RETURNS: The size of a colormap that is suitable for @visual.
6233 int get_colormap_size()() {
6234 return gdk_visual_get_colormap_size(&this);
6237 // VERSION: 2.22
6238 // Returns the bit depth of this visual.
6239 // RETURNS: The bit depth of this visual.
6240 int get_depth()() {
6241 return gdk_visual_get_depth(&this);
6244 // VERSION: 2.22
6245 // Obtains values that are needed to calculate green pixel values in TrueColor
6246 // and DirectColor. The "mask" is the significant bits within the pixel.
6247 // The "shift" is the number of bits left we must shift a primary for it
6248 // to be in position (according to the "mask"). Finally, "precision" refers
6249 // to how much precision the pixel value contains for a particular primary.
6250 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6251 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6252 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6253 void get_green_pixel_details()(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) {
6254 gdk_visual_get_green_pixel_details(&this, mask, shift, precision);
6257 // VERSION: 2.22
6258 // Obtains values that are needed to calculate red pixel values in TrueColor
6259 // and DirectColor. The "mask" is the significant bits within the pixel.
6260 // The "shift" is the number of bits left we must shift a primary for it
6261 // to be in position (according to the "mask"). Finally, "precision" refers
6262 // to how much precision the pixel value contains for a particular primary.
6263 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6264 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6265 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6266 void get_red_pixel_details()(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) {
6267 gdk_visual_get_red_pixel_details(&this, mask, shift, precision);
6270 // VERSION: 2.2
6271 // Gets the screen to which this visual belongs
6272 // RETURNS: the screen to which this visual belongs.
6273 Screen* get_screen()() {
6274 return gdk_visual_get_screen(&this);
6277 // VERSION: 2.22
6278 // Returns the type of visual this is (PseudoColor, TrueColor, etc).
6279 // RETURNS: A #GdkVisualType stating the type of @visual.
6280 VisualType get_visual_type()() {
6281 return gdk_visual_get_visual_type(&this);
6285 struct VisualClass {
6288 enum VisualType {
6289 STATIC_GRAY = 0,
6290 GRAYSCALE = 1,
6291 STATIC_COLOR = 2,
6292 PSEUDO_COLOR = 3,
6293 TRUE_COLOR = 4,
6294 DIRECT_COLOR = 5
6296 enum WMDecoration {
6297 ALL = 1,
6298 BORDER = 2,
6299 RESIZEH = 4,
6300 TITLE = 8,
6301 MENU = 16,
6302 MINIMIZE = 32,
6303 MAXIMIZE = 64
6305 enum WMFunction {
6306 ALL = 1,
6307 RESIZE = 2,
6308 MOVE = 4,
6309 MINIMIZE = 8,
6310 MAXIMIZE = 16,
6311 CLOSE = 32
6313 struct Window /* : Drawable */ {
6314 alias method_parent this;
6315 alias method_parent super_;
6316 alias method_parent drawable;
6317 Drawable method_parent;
6320 // Unintrospectable method: add_filter() / gdk_window_add_filter()
6321 // Adds an event filter to @window, allowing you to intercept events
6322 // before they reach GDK. This is a low-level operation and makes it
6323 // easy to break GDK and/or GTK+, so you have to know what you're
6324 // doing. Pass %NULL for @window to get all events for all windows,
6325 // instead of events for a specific window.
6326 // See gdk_display_add_client_message_filter() if you are interested
6327 // in X ClientMessage events.
6328 // <function>: filter callback
6329 // <data>: data to pass to filter callback
6330 void add_filter()(FilterFunc function_, void* data) {
6331 gdk_window_add_filter(&this, function_, data);
6334 // VERSION: 2.12
6335 // Emits a short beep associated to @window in the appropriate
6336 // display, if supported. Otherwise, emits a short beep on
6337 // the display just as gdk_display_beep().
6338 void beep()() {
6339 gdk_window_beep(&this);
6342 // Begins a window move operation (for a toplevel window). You might
6343 // use this function to implement a "window move grip," for
6344 // example. The function works best with window managers that support
6345 // the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
6346 // Window Manager Hints</ulink>, but has a fallback implementation for
6347 // other window managers.
6348 // <button>: the button being used to drag
6349 // <root_x>: root window X coordinate of mouse click that began the drag
6350 // <root_y>: root window Y coordinate of mouse click that began the drag
6351 // <timestamp>: timestamp of mouse click that began the drag
6352 void begin_move_drag()(int button, int root_x, int root_y, uint timestamp) {
6353 gdk_window_begin_move_drag(&this, button, root_x, root_y, timestamp);
6356 // A convenience wrapper around gdk_window_begin_paint_region() which
6357 // creates a rectangular region for you. See
6358 // gdk_window_begin_paint_region() for details.
6359 // <rectangle>: rectangle you intend to draw to
6360 void begin_paint_rect()(Rectangle* rectangle) {
6361 gdk_window_begin_paint_rect(&this, rectangle);
6364 // Indicates that you are beginning the process of redrawing @region.
6365 // A backing store (offscreen buffer) large enough to contain @region
6366 // will be created. The backing store will be initialized with the
6367 // background color or background pixmap for @window. Then, all
6368 // drawing operations performed on @window will be diverted to the
6369 // backing store. When you call gdk_window_end_paint(), the backing
6370 // store will be copied to @window, making it visible onscreen. Only
6371 // the part of @window contained in @region will be modified; that is,
6372 // drawing operations are clipped to @region.
6373 // The net result of all this is to remove flicker, because the user
6374 // sees the finished product appear all at once when you call
6375 // gdk_window_end_paint(). If you draw to @window directly without
6376 // calling gdk_window_begin_paint_region(), the user may see flicker
6377 // as individual drawing operations are performed in sequence. The
6378 // clipping and background-initializing features of
6379 // gdk_window_begin_paint_region() are conveniences for the
6380 // programmer, so you can avoid doing that work yourself.
6381 // When using GTK+, the widget system automatically places calls to
6382 // gdk_window_begin_paint_region() and gdk_window_end_paint() around
6383 // emissions of the expose_event signal. That is, if you're writing an
6384 // expose event handler, you can assume that the exposed area in
6385 // #GdkEventExpose has already been cleared to the window background,
6386 // is already set as the clip region, and already has a backing store.
6387 // Therefore in most cases, application code need not call
6388 // gdk_window_begin_paint_region(). (You can disable the automatic
6389 // calls around expose events on a widget-by-widget basis by calling
6390 // gtk_widget_set_double_buffered().)
6391 // If you call this function multiple times before calling the
6392 // matching gdk_window_end_paint(), the backing stores are pushed onto
6393 // a stack. gdk_window_end_paint() copies the topmost backing store
6394 // onscreen, subtracts the topmost region from all other regions in
6395 // the stack, and pops the stack. All drawing operations affect only
6396 // the topmost backing store in the stack. One matching call to
6397 // gdk_window_end_paint() is required for each call to
6398 // gdk_window_begin_paint_region().
6399 // <region>: region you intend to draw to
6400 void begin_paint_region()(Region* region) {
6401 gdk_window_begin_paint_region(&this, region);
6404 // Begins a window resize operation (for a toplevel window).
6405 // You might use this function to implement a "window resize grip," for
6406 // example; in fact #GtkStatusbar uses it. The function works best
6407 // with window managers that support the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended Window Manager Hints</ulink>, but has a
6408 // fallback implementation for other window managers.
6409 // <edge>: the edge or corner from which the drag is started
6410 // <button>: the button being used to drag
6411 // <root_x>: root window X coordinate of mouse click that began the drag
6412 // <root_y>: root window Y coordinate of mouse click that began the drag
6413 // <timestamp>: timestamp of mouse click that began the drag (use gdk_event_get_time())
6414 void begin_resize_drag()(WindowEdge edge, int button, int root_x, int root_y, uint timestamp) {
6415 gdk_window_begin_resize_drag(&this, edge, button, root_x, root_y, timestamp);
6417 // Clears an entire @window to the background color or background pixmap.
6418 void clear()() {
6419 gdk_window_clear(&this);
6422 // Clears an area of @window to the background color or background pixmap.
6423 // <x>: x coordinate of rectangle to clear
6424 // <y>: y coordinate of rectangle to clear
6425 // <width>: width of rectangle to clear
6426 // <height>: height of rectangle to clear
6427 void clear_area()(int x, int y, int width, int height) {
6428 gdk_window_clear_area(&this, x, y, width, height);
6431 // Like gdk_window_clear_area(), but also generates an expose event for
6432 // the cleared area.
6433 // This function has a stupid name because it dates back to the mists
6434 // time, pre-GDK-1.0.
6435 // <x>: x coordinate of rectangle to clear
6436 // <y>: y coordinate of rectangle to clear
6437 // <width>: width of rectangle to clear
6438 // <height>: height of rectangle to clear
6439 void clear_area_e()(int x, int y, int width, int height) {
6440 gdk_window_clear_area_e(&this, x, y, width, height);
6443 // VERSION: 2.6
6444 // Signal to the window system that the application has finished
6445 // handling Configure events it has received. Window Managers can
6446 // use this to better synchronize the frame repaint with the
6447 // application. GTK+ applications will automatically call this
6448 // function when appropriate.
6449 // This function can only be called if gdk_window_enable_synchronized_configure()
6450 // was called previously.
6451 void configure_finished()() {
6452 gdk_window_configure_finished(&this);
6455 // VERSION: 2.22
6456 // Transforms window coordinates from a parent window to a child
6457 // window, where the parent window is the normal parent as returned by
6458 // gdk_window_get_parent() for normal windows, and the window's
6459 // embedder as returned by gdk_offscreen_window_get_embedder() for
6460 // offscreen windows.
6461 // For normal windows, calling this function is equivalent to subtracting
6462 // the return values of gdk_window_get_position() from the parent coordinates.
6463 // For offscreen windows however (which can be arbitrarily transformed),
6464 // the coordinates.
6465 // You should always use this function when writing generic code that
6466 // walks down a window hierarchy.
6467 // <parent_x>: X coordinate in parent's coordinate system
6468 // <parent_y>: Y coordinate in parent's coordinate system
6469 // <x>: return location for X coordinate in child's coordinate system
6470 // <y>: return location for Y coordinate in child's coordinate system
6471 void coords_from_parent()(double parent_x, double parent_y, /*out*/ double* x=null, /*out*/ double* y=null) {
6472 gdk_window_coords_from_parent(&this, parent_x, parent_y, x, y);
6475 // VERSION: 2.22
6476 // Transforms window coordinates from a child window to its parent
6477 // window, where the parent window is the normal parent as returned by
6478 // gdk_window_get_parent() for normal windows, and the window's
6479 // embedder as returned by gdk_offscreen_window_get_embedder() for
6480 // offscreen windows.
6481 // For normal windows, calling this function is equivalent to adding
6482 // the return values of gdk_window_get_position() to the child coordinates.
6483 // For offscreen windows however (which can be arbitrarily transformed),
6484 // the coordinates.
6485 // You should always use this function when writing generic code that
6486 // walks up a window hierarchy.
6487 // <x>: X coordinate in child's coordinate system
6488 // <y>: Y coordinate in child's coordinate system
6489 // <parent_x>: return location for X coordinate in parent's coordinate system, or %NULL
6490 // <parent_y>: return location for Y coordinate in parent's coordinate system, or %NULL
6491 void coords_to_parent()(double x, double y, /*out*/ double* parent_x=null, /*out*/ double* parent_y=null) {
6492 gdk_window_coords_to_parent(&this, x, y, parent_x, parent_y);
6495 // VERSION: 2.22
6496 // Create a new surface that is as compatible as possible with the
6497 // given @window. For example the new surface will have the same
6498 // fallback resolution and font options as @window. Generally, the new
6499 // surface will also use the same backend as @window, unless that is
6500 // not possible for some reason. The type of the returned surface may
6501 // be examined with cairo_surface_get_type().
6502 // Initially the surface contents are all 0 (transparent if contents
6503 // have transparency, black otherwise.)
6504 // owns the surface and should call cairo_surface_destroy() when done
6505 // with it.
6506 // This function always returns a valid pointer, but it will return a
6507 // pointer to a "nil" surface if @other is already in an error state
6508 // or any other error occurs.
6509 // RETURNS: a pointer to the newly allocated surface. The caller
6510 // <content>: the content for the new surface
6511 // <width>: width of the new surface
6512 // <height>: height of the new surface
6513 cairo.Surface* /*new*/ create_similar_surface()(cairo.Content content, int width, int height) {
6514 return gdk_window_create_similar_surface(&this, content, width, height);
6517 // Attempt to deiconify (unminimize) @window. On X11 the window manager may
6518 // choose to ignore the request to deiconify. When using GTK+,
6519 // use gtk_window_deiconify() instead of the #GdkWindow variant. Or better yet,
6520 // you probably want to use gtk_window_present(), which raises the window, focuses it,
6521 // unminimizes it, and puts it on the current desktop.
6522 void deiconify()() {
6523 gdk_window_deiconify(&this);
6526 // Destroys the window system resources associated with @window and decrements @window's
6527 // reference count. The window system resources for all children of @window are also
6528 // destroyed, but the children's reference counts are not decremented.
6529 // Note that a window will not be destroyed automatically when its reference count
6530 // reaches zero. You must call this function yourself before that happens.
6531 void destroy()() {
6532 gdk_window_destroy(&this);
6534 void destroy_notify()() {
6535 gdk_window_destroy_notify(&this);
6538 // VERSION: 2.6
6539 // Indicates that the application will cooperate with the window
6540 // system in synchronizing the window repaint with the window
6541 // manager during resizing operations. After an application calls
6542 // this function, it must call gdk_window_configure_finished() every
6543 // time it has finished all processing associated with a set of
6544 // Configure events. Toplevel GTK+ windows automatically use this
6545 // protocol.
6546 // On X, calling this function makes @window participate in the
6547 // _NET_WM_SYNC_REQUEST window manager protocol.
6548 void enable_synchronized_configure()() {
6549 gdk_window_enable_synchronized_configure(&this);
6552 // Indicates that the backing store created by the most recent call to
6553 // gdk_window_begin_paint_region() should be copied onscreen and
6554 // deleted, leaving the next-most-recent backing store or no backing
6555 // store at all as the active paint region. See
6556 // gdk_window_begin_paint_region() for full details. It is an error to
6557 // call this function without a matching
6558 // gdk_window_begin_paint_region() first.
6559 void end_paint()() {
6560 gdk_window_end_paint(&this);
6563 // VERSION: 2.18
6564 // Tries to ensure that there is a window-system native window for this
6565 // GdkWindow. This may fail in some situations, returning %FALSE.
6566 // Offscreen window and children of them can never have native windows.
6567 // Some backends may not support native child windows.
6568 // RETURNS: %TRUE if the window has a native window, %FALSE otherwise
6569 int ensure_native()() {
6570 return gdk_window_ensure_native(&this);
6573 // VERSION: 2.18
6574 // Flush all outstanding cached operations on a window, leaving the
6575 // window in a state which reflects all that has been drawn before.
6576 // Gdk uses multiple kinds of caching to get better performance and
6577 // nicer drawing. For instance, during exposes all paints to a window
6578 // using double buffered rendering are keep on a pixmap until the last
6579 // window has been exposed. It also delays window moves/scrolls until
6580 // as long as possible until next update to avoid tearing when moving
6581 // windows.
6582 // Normally this should be completely invisible to applications, as
6583 // we automatically flush the windows when required, but this might
6584 // be needed if you for instance mix direct native drawing with
6585 // gdk drawing. For Gtk widgets that don't use double buffering this
6586 // will be called automatically before sending the expose event.
6587 void flush()() {
6588 gdk_window_flush(&this);
6591 // Sets keyboard focus to @window. In most cases, gtk_window_present()
6592 // should be used on a #GtkWindow, rather than calling this function.
6593 // <timestamp>: timestamp of the event triggering the window focus
6594 void focus()(uint timestamp) {
6595 gdk_window_focus(&this, timestamp);
6598 // Temporarily freezes a window and all its descendants such that it won't
6599 // receive expose events. The window will begin receiving expose events
6600 // again when gdk_window_thaw_toplevel_updates_libgtk_only() is called. If
6601 // gdk_window_freeze_toplevel_updates_libgtk_only()
6602 // has been called more than once,
6603 // gdk_window_thaw_toplevel_updates_libgtk_only() must be called
6604 // an equal number of times to begin processing exposes.
6605 // This function is not part of the GDK public API and is only
6606 // for use by GTK+.
6607 void freeze_toplevel_updates_libgtk_only()() {
6608 gdk_window_freeze_toplevel_updates_libgtk_only(&this);
6611 // Temporarily freezes a window such that it won't receive expose
6612 // events. The window will begin receiving expose events again when
6613 // gdk_window_thaw_updates() is called. If gdk_window_freeze_updates()
6614 // has been called more than once, gdk_window_thaw_updates() must be called
6615 // an equal number of times to begin processing exposes.
6616 void freeze_updates()() {
6617 gdk_window_freeze_updates(&this);
6620 // VERSION: 2.2
6621 // Moves the window into fullscreen mode. This means the
6622 // window covers the entire screen and is above any panels
6623 // or task bars.
6624 // If the window was already fullscreen, then this function does nothing.
6625 // On X11, asks the window manager to put @window in a fullscreen
6626 // state, if the window manager supports this operation. Not all
6627 // window managers support this, and some deliberately ignore it or
6628 // don't have a concept of "fullscreen"; so you can't rely on the
6629 // fullscreenification actually happening. But it will happen with
6630 // most standard window managers, and GDK makes a best effort to get
6631 // it to happen.
6632 void fullscreen()() {
6633 gdk_window_fullscreen(&this);
6636 // VERSION: 2.18
6637 // This function informs GDK that the geometry of an embedded
6638 // offscreen window has changed. This is necessary for GDK to keep
6639 // track of which offscreen window the pointer is in.
6640 void geometry_changed()() {
6641 gdk_window_geometry_changed(&this);
6644 // VERSION: 2.22
6645 // Determines whether or not the desktop environment shuld be hinted that
6646 // the window does not want to receive input focus.
6647 // RETURNS: whether or not the window should receive input focus.
6648 int get_accept_focus()() {
6649 return gdk_window_get_accept_focus(&this);
6652 // VERSION: 2.22
6653 // Gets the pattern used to clear the background on @window. If @window
6654 // does not have its own background and reuses the parent's, %NULL is
6655 // returned and you'll have to query it yourself.
6656 // %NULL to use the parent's background.
6657 // RETURNS: The pattern to use for the background or
6658 cairo.Pattern* get_background_pattern()() {
6659 return gdk_window_get_background_pattern(&this);
6662 // Gets the list of children of @window known to GDK.
6663 // This function only returns children created via GDK,
6664 // so for example it's useless when used with the root window;
6665 // it only returns windows an application created itself.
6666 // The returned list must be freed, but the elements in the
6667 // list need not be.
6668 // list of child windows inside @window
6669 GLib2.List* /*new container*/ get_children()() {
6670 return gdk_window_get_children(&this);
6673 // VERSION: 2.22
6674 // Determines whether @window is composited.
6675 // See gdk_window_set_composited().
6676 // RETURNS: %TRUE if the window is composited.
6677 int get_composited()() {
6678 return gdk_window_get_composited(&this);
6681 // VERSION: 2.18
6682 // Retrieves a #GdkCursor pointer for the cursor currently set on the
6683 // specified #GdkWindow, or %NULL. If the return value is %NULL then
6684 // there is no custom cursor set on the specified window, and it is
6685 // using the cursor for its parent window.
6686 // object is owned by the #GdkWindow and should not be unreferenced
6687 // directly. Use gdk_window_set_cursor() to unset the cursor of the
6688 // window
6689 // RETURNS: a #GdkCursor, or %NULL. The returned
6690 Cursor* get_cursor()() {
6691 return gdk_window_get_cursor(&this);
6694 // Returns the decorations set on the GdkWindow with #gdk_window_set_decorations
6695 // RETURNS: TRUE if the window has decorations set, FALSE otherwise.
6696 // <decorations>: The window decorations will be written here
6697 int get_decorations()(WMDecoration* decorations) {
6698 return gdk_window_get_decorations(&this, decorations);
6701 // This gets the origin of a #GdkWindow relative to
6702 // an Enlightenment-window-manager desktop. As long as you don't
6703 // assume that the user's desktop/workspace covers the entire
6704 // root window (i.e. you don't assume that the desktop begins
6705 // at root window coordinate 0,0) this function is not necessary.
6706 // It's deprecated for that reason.
6707 // RETURNS: not meaningful
6708 // <x>: return location for X coordinate
6709 // <y>: return location for Y coordinate
6710 int get_deskrelative_origin()(int* x, int* y) {
6711 return gdk_window_get_deskrelative_origin(&this, x, y);
6714 // Unintrospectable method: get_display() / gdk_window_get_display()
6715 // VERSION: 2.24
6716 // Gets the #GdkDisplay associated with a #GdkWindow.
6717 // RETURNS: the #GdkDisplay associated with @window
6718 Display* get_display()() {
6719 return gdk_window_get_display(&this);
6722 // Unintrospectable method: get_effective_parent() / gdk_window_get_effective_parent()
6723 // VERSION: 2.22
6724 // Obtains the parent of @window, as known to GDK. Works like
6725 // gdk_window_get_parent() for normal windows, but returns the
6726 // window's embedder for offscreen windows.
6727 // RETURNS: effective parent of @window
6728 Window* get_effective_parent()() {
6729 return gdk_window_get_effective_parent(&this);
6732 // Unintrospectable method: get_effective_toplevel() / gdk_window_get_effective_toplevel()
6733 // VERSION: 2.22
6734 // Gets the toplevel window that's an ancestor of @window.
6735 // Works like gdk_window_get_toplevel(), but treats an offscreen window's
6736 // embedder as its parent, using gdk_window_get_effective_parent().
6737 // RETURNS: the effective toplevel window containing @window
6738 Window* get_effective_toplevel()() {
6739 return gdk_window_get_effective_toplevel(&this);
6742 // Gets the event mask for @window. See gdk_window_set_events().
6743 // RETURNS: event mask for @window
6744 EventMask get_events()() {
6745 return gdk_window_get_events(&this);
6748 // VERSION: 2.22
6749 // Determines whether or not the desktop environment should be hinted that the
6750 // window does not want to receive input focus when it is mapped.
6751 // it is mapped.
6752 // RETURNS: whether or not the window wants to receive input focus when
6753 int get_focus_on_map()() {
6754 return gdk_window_get_focus_on_map(&this);
6757 // Obtains the bounding box of the window, including window manager
6758 // titlebar/borders if any. The frame position is given in root window
6759 // coordinates. To get the position of the window itself (rather than
6760 // the frame) in root window coordinates, use gdk_window_get_origin().
6761 // <rect>: rectangle to fill with bounding box of the window frame
6762 void get_frame_extents()(Rectangle* rect) {
6763 gdk_window_get_frame_extents(&this, rect);
6766 // Any of the return location arguments to this function may be %NULL,
6767 // if you aren't interested in getting the value of that field.
6768 // The X and Y coordinates returned are relative to the parent window
6769 // of @window, which for toplevels usually means relative to the
6770 // window decorations (titlebar, etc.) rather than relative to the
6771 // root window (screen-size background window).
6772 // On the X11 platform, the geometry is obtained from the X server,
6773 // so reflects the latest position of @window; this may be out-of-sync
6774 // with the position of @window delivered in the most-recently-processed
6775 // #GdkEventConfigure. gdk_window_get_position() in contrast gets the
6776 // position from the most recent configure event.
6777 // <note>
6778 // If @window is not a toplevel, it is <emphasis>much</emphasis> better
6779 // to call gdk_window_get_position() and gdk_drawable_get_size() instead,
6780 // because it avoids the roundtrip to the X server and because
6781 // gdk_drawable_get_size() supports the full 32-bit coordinate space,
6782 // whereas gdk_window_get_geometry() is restricted to the 16-bit
6783 // coordinates of X11.
6784 // </note>
6785 // <x>: return location for X coordinate of window (relative to its parent)
6786 // <y>: return location for Y coordinate of window (relative to its parent)
6787 // <width>: return location for width of window
6788 // <height>: return location for height of window
6789 // <depth>: return location for bit depth of window
6790 void get_geometry()(int* x, int* y, int* width, int* height, int* depth) {
6791 gdk_window_get_geometry(&this, x, y, width, height, depth);
6794 // Unintrospectable method: get_group() / gdk_window_get_group()
6795 // VERSION: 2.4
6796 // Returns the group leader window for @window. See gdk_window_set_group().
6797 // RETURNS: the group leader window for @window
6798 Window* get_group()() {
6799 return gdk_window_get_group(&this);
6802 // VERSION: 2.24
6803 // Returns the height of the given @window.
6804 // On the X11 platform the returned size is the size reported in the
6805 // most-recently-processed configure event, rather than the current
6806 // size on the X server.
6807 // RETURNS: The height of @window
6808 int get_height()() {
6809 return gdk_window_get_height(&this);
6812 // If you bypass the GDK layer and use windowing system primitives to
6813 // draw directly onto a #GdkWindow, then you need to deal with two
6814 // system coordinates, and GDK may have redirected drawing to a offscreen
6815 // pixmap as the result of a gdk_window_begin_paint_region() calls.
6816 // This function allows retrieving the information you need to compensate
6817 // for these effects.
6818 // This function exposes details of the GDK implementation, and is thus
6819 // likely to change in future releases of GDK.
6820 // <real_drawable>: location to store the drawable to which drawing should be done.
6821 // <x_offset>: location to store the X offset between coordinates in @window, and the underlying window system primitive coordinates for *@real_drawable.
6822 // <y_offset>: location to store the Y offset between coordinates in @window, and the underlying window system primitive coordinates for *@real_drawable.
6823 void get_internal_paint_info()(/*out*/ Drawable** real_drawable, /*out*/ int* x_offset, /*out*/ int* y_offset) {
6824 gdk_window_get_internal_paint_info(&this, real_drawable, x_offset, y_offset);
6827 // VERSION: 2.22
6828 // Determines whether or not the window manager is hinted that @window
6829 // has modal behaviour.
6830 // RETURNS: whether or not the window has the modal hint set.
6831 int get_modal_hint()() {
6832 return gdk_window_get_modal_hint(&this);
6835 // Obtains the position of a window in root window coordinates.
6836 // (Compare with gdk_window_get_position() and
6837 // gdk_window_get_geometry() which return the position of a window
6838 // relative to its parent window.)
6839 // RETURNS: not meaningful, ignore
6840 // <x>: return location for X coordinate
6841 // <y>: return location for Y coordinate
6842 int get_origin()(int* x, int* y) {
6843 return gdk_window_get_origin(&this, x, y);
6846 // Unintrospectable method: get_parent() / gdk_window_get_parent()
6847 // Obtains the parent of @window, as known to GDK. Does not query the
6848 // X server; thus this returns the parent as passed to gdk_window_new(),
6849 // not the actual parent. This should never matter unless you're using
6850 // Xlib calls mixed with GDK calls on the X11 platform. It may also
6851 // matter for toplevel windows, because the window manager may choose
6852 // to reparent them.
6853 // Note that you should use gdk_window_get_effective_parent() when
6854 // writing generic code that walks up a window hierarchy, because
6855 // gdk_window_get_parent() will most likely not do what you expect if
6856 // there are offscreen windows in the hierarchy.
6857 // RETURNS: parent of @window
6858 Window* get_parent()() {
6859 return gdk_window_get_parent(&this);
6862 // Obtains the current pointer position and modifier state.
6863 // The position is given in coordinates relative to the upper left
6864 // corner of @window.
6865 // gdk_window_at_pointer()), or %NULL if the window containing the
6866 // pointer isn't known to GDK
6867 // RETURNS: the window containing the pointer (as with
6868 // <x>: return location for X coordinate of pointer or %NULL to not return the X coordinate
6869 // <y>: return location for Y coordinate of pointer or %NULL to not return the Y coordinate
6870 // <mask>: return location for modifier mask or %NULL to not return the modifier mask
6871 Window* get_pointer()(/*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) {
6872 return gdk_window_get_pointer(&this, x, y, mask);
6875 // Obtains the position of the window as reported in the
6876 // most-recently-processed #GdkEventConfigure. Contrast with
6877 // gdk_window_get_geometry() which queries the X server for the
6878 // current window position, regardless of which events have been
6879 // received or processed.
6880 // The position coordinates are relative to the window's parent window.
6881 // <x>: X coordinate of window
6882 // <y>: Y coordinate of window
6883 void get_position()(/*out*/ int* x=null, /*out*/ int* y=null) {
6884 gdk_window_get_position(&this, x, y);
6887 // VERSION: 2.18
6888 // Obtains the position of a window position in root
6889 // window coordinates. This is similar to
6890 // gdk_window_get_origin() but allows you go pass
6891 // in any position in the window, not just the origin.
6892 // <x>: X coordinate in window
6893 // <y>: Y coordinate in window
6894 // <root_x>: return location for X coordinate
6895 // <root_y>: return location for Y coordinate
6896 void get_root_coords()(int x, int y, /*out*/ int* root_x, /*out*/ int* root_y) {
6897 gdk_window_get_root_coords(&this, x, y, root_x, root_y);
6900 // Obtains the top-left corner of the window manager frame in root
6901 // window coordinates.
6902 // <x>: return location for X position of window frame
6903 // <y>: return location for Y position of window frame
6904 void get_root_origin()(int* x, int* y) {
6905 gdk_window_get_root_origin(&this, x, y);
6908 // Unintrospectable method: get_screen() / gdk_window_get_screen()
6909 // Gets the #GdkScreen associated with a #GdkWindow.
6910 // RETURNS: the #GdkScreen associated with @window
6911 Screen* get_screen()() {
6912 return gdk_window_get_screen(&this);
6915 // Gets the bitwise OR of the currently active window state flags,
6916 // from the #GdkWindowState enumeration.
6917 // RETURNS: window state bitfield
6918 WindowState get_state()() {
6919 return gdk_window_get_state(&this);
6922 // Unintrospectable method: get_toplevel() / gdk_window_get_toplevel()
6923 // Gets the toplevel window that's an ancestor of @window.
6924 // Any window type but %GDK_WINDOW_CHILD is considered a
6925 // toplevel window, as is a %GDK_WINDOW_CHILD window that
6926 // has a root window as parent.
6927 // Note that you should use gdk_window_get_effective_toplevel() when
6928 // you want to get to a window's toplevel as seen on screen, because
6929 // gdk_window_get_toplevel() will most likely not do what you expect
6930 // if there are offscreen windows in the hierarchy.
6931 // RETURNS: the toplevel window containing @window
6932 Window* get_toplevel()() {
6933 return gdk_window_get_toplevel(&this);
6936 // VERSION: 2.10
6937 // This function returns the type hint set for a window.
6938 // RETURNS: The type hint set for @window
6939 WindowTypeHint get_type_hint()() {
6940 return gdk_window_get_type_hint(&this);
6943 // Unintrospectable method: get_update_area() / gdk_window_get_update_area()
6944 // Transfers ownership of the update area from @window to the caller
6945 // of the function. That is, after calling this function, @window will
6946 // no longer have an invalid/dirty region; the update area is removed
6947 // from @window and handed to you. If a window has no update area,
6948 // gdk_window_get_update_area() returns %NULL. You are responsible for
6949 // calling gdk_region_destroy() on the returned region if it's non-%NULL.
6950 // RETURNS: the update area for @window
6951 Region* get_update_area()() {
6952 return gdk_window_get_update_area(&this);
6955 // Retrieves the user data for @window, which is normally the widget
6956 // that @window belongs to. See gdk_window_set_user_data().
6957 // <data>: return location for user data
6958 void get_user_data()(/*out*/ void** data) {
6959 gdk_window_get_user_data(&this, data);
6962 // Unintrospectable method: get_visual() / gdk_window_get_visual()
6963 // VERSION: 2.24
6964 // Gets the #GdkVisual describing the pixel format of @window.
6965 // RETURNS: a #GdkVisual
6966 Visual* get_visual()() {
6967 return gdk_window_get_visual(&this);
6970 // VERSION: 2.24
6971 // Returns the width of the given @window.
6972 // On the X11 platform the returned size is the size reported in the
6973 // most-recently-processed configure event, rather than the current
6974 // size on the X server.
6975 // RETURNS: The width of @window
6976 int get_width()() {
6977 return gdk_window_get_width(&this);
6980 // Gets the type of the window. See #GdkWindowType.
6981 // RETURNS: type of window
6982 WindowType get_window_type()() {
6983 return gdk_window_get_window_type(&this);
6986 // VERSION: 2.22
6987 // Checks whether the window has a native window or not. Note that
6988 // you can use gdk_window_ensure_native() if a native window is needed.
6989 // RETURNS: %TRUE if the %window has a native window, %FALSE otherwise.
6990 int has_native()() {
6991 return gdk_window_has_native(&this);
6994 // For toplevel windows, withdraws them, so they will no longer be
6995 // known to the window manager; for all windows, unmaps them, so
6996 // they won't be displayed. Normally done automatically as
6997 // part of gtk_widget_hide().
6998 void hide()() {
6999 gdk_window_hide(&this);
7002 // Asks to iconify (minimize) @window. The window manager may choose
7003 // to ignore the request, but normally will honor it. Using
7004 // gtk_window_iconify() is preferred, if you have a #GtkWindow widget.
7005 // This function only makes sense when @window is a toplevel window.
7006 void iconify()() {
7007 gdk_window_iconify(&this);
7010 // VERSION: 2.10
7011 // Like gdk_window_shape_combine_mask(), but the shape applies
7012 // only to event handling. Mouse events which happen while
7013 // the pointer position corresponds to an unset bit in the
7014 // mask will be passed on the window below @window.
7015 // An input shape is typically used with RGBA windows.
7016 // The alpha channel of the window defines which pixels are
7017 // invisible and allows for nicely antialiased borders,
7018 // and the input shape controls where the window is
7019 // "clickable".
7020 // On the X11 platform, this requires version 1.1 of the
7021 // shape extension.
7022 // On the Win32 platform, this functionality is not present and the
7023 // function does nothing.
7024 // <mask>: shape mask, or %NULL
7025 // <x>: X position of shape mask with respect to @window
7026 // <y>: Y position of shape mask with respect to @window
7027 void input_shape_combine_mask()(Bitmap* mask, int x, int y) {
7028 gdk_window_input_shape_combine_mask(&this, mask, x, y);
7031 // VERSION: 2.10
7032 // Like gdk_window_shape_combine_region(), but the shape applies
7033 // only to event handling. Mouse events which happen while
7034 // the pointer position corresponds to an unset bit in the
7035 // mask will be passed on the window below @window.
7036 // An input shape is typically used with RGBA windows.
7037 // The alpha channel of the window defines which pixels are
7038 // invisible and allows for nicely antialiased borders,
7039 // and the input shape controls where the window is
7040 // "clickable".
7041 // On the X11 platform, this requires version 1.1 of the
7042 // shape extension.
7043 // On the Win32 platform, this functionality is not present and the
7044 // function does nothing.
7045 // <shape_region>: region of window to be non-transparent
7046 // <offset_x>: X position of @shape_region in @window coordinates
7047 // <offset_y>: Y position of @shape_region in @window coordinates
7048 void input_shape_combine_region()(Region* shape_region, int offset_x, int offset_y) {
7049 gdk_window_input_shape_combine_region(&this, shape_region, offset_x, offset_y);
7052 // Adds @region to the update area for @window. The update area is the
7053 // region that needs to be redrawn, or "dirty region." The call
7054 // gdk_window_process_updates() sends one or more expose events to the
7055 // window, which together cover the entire update area. An
7056 // application would normally redraw the contents of @window in
7057 // response to those expose events.
7058 // GDK will call gdk_window_process_all_updates() on your behalf
7059 // whenever your program returns to the main loop and becomes idle, so
7060 // normally there's no need to do that manually, you just need to
7061 // invalidate regions that you know should be redrawn.
7062 // The @child_func parameter controls whether the region of
7063 // each child window that intersects @region will also be invalidated.
7064 // Only children for which @child_func returns TRUE will have the area
7065 // invalidated.
7066 // <region>: a #GdkRegion
7067 // <child_func>: function to use to decide if to recurse to a child, %NULL means never recurse.
7068 // <user_data>: data passed to @child_func
7069 void invalidate_maybe_recurse()(Region* region, void** child_func, void* user_data) {
7070 gdk_window_invalidate_maybe_recurse(&this, region, child_func, user_data);
7073 // A convenience wrapper around gdk_window_invalidate_region() which
7074 // invalidates a rectangular region. See
7075 // gdk_window_invalidate_region() for details.
7076 // <rect>: rectangle to invalidate or %NULL to invalidate the whole window
7077 // <invalidate_children>: whether to also invalidate child windows
7078 void invalidate_rect()(Rectangle* rect, int invalidate_children) {
7079 gdk_window_invalidate_rect(&this, rect, invalidate_children);
7082 // Adds @region to the update area for @window. The update area is the
7083 // region that needs to be redrawn, or "dirty region." The call
7084 // gdk_window_process_updates() sends one or more expose events to the
7085 // window, which together cover the entire update area. An
7086 // application would normally redraw the contents of @window in
7087 // response to those expose events.
7088 // GDK will call gdk_window_process_all_updates() on your behalf
7089 // whenever your program returns to the main loop and becomes idle, so
7090 // normally there's no need to do that manually, you just need to
7091 // invalidate regions that you know should be redrawn.
7092 // The @invalidate_children parameter controls whether the region of
7093 // each child window that intersects @region will also be invalidated.
7094 // If %FALSE, then the update area for child windows will remain
7095 // unaffected. See gdk_window_invalidate_maybe_recurse if you need
7096 // fine grained control over which children are invalidated.
7097 // <region>: a #GdkRegion
7098 // <invalidate_children>: %TRUE to also invalidate child windows
7099 void invalidate_region()(Region* region, int invalidate_children) {
7100 gdk_window_invalidate_region(&this, region, invalidate_children);
7103 // VERSION: 2.18
7104 // Check to see if a window is destroyed..
7105 // RETURNS: %TRUE if the window is destroyed
7106 int is_destroyed()() {
7107 return gdk_window_is_destroyed(&this);
7110 // VERSION: 2.22
7111 // Determines whether or not the window is an input only window.
7112 // RETURNS: %TRUE if @window is input only
7113 int is_input_only()() {
7114 return gdk_window_is_input_only(&this);
7117 // VERSION: 2.22
7118 // Determines whether or not the window is shaped.
7119 // RETURNS: %TRUE if @window is shaped
7120 int is_shaped()() {
7121 return gdk_window_is_shaped(&this);
7124 // Check if the window and all ancestors of the window are
7125 // mapped. (This is not necessarily "viewable" in the X sense, since
7126 // we only check as far as we have GDK window parents, not to the root
7127 // window.)
7128 // RETURNS: %TRUE if the window is viewable
7129 int is_viewable()() {
7130 return gdk_window_is_viewable(&this);
7133 // Checks whether the window has been mapped (with gdk_window_show() or
7134 // gdk_window_show_unraised()).
7135 // RETURNS: %TRUE if the window is mapped
7136 int is_visible()() {
7137 return gdk_window_is_visible(&this);
7140 // Lowers @window to the bottom of the Z-order (stacking order), so that
7141 // other windows with the same parent window appear above @window.
7142 // This is true whether or not the other windows are visible.
7143 // If @window is a toplevel, the window manager may choose to deny the
7144 // request to move the window in the Z-order, gdk_window_lower() only
7145 // requests the restack, does not guarantee it.
7146 // Note that gdk_window_show() raises the window again, so don't call this
7147 // function before gdk_window_show(). (Try gdk_window_show_unraised().)
7148 void lower()() {
7149 gdk_window_lower(&this);
7152 // Maximizes the window. If the window was already maximized, then
7153 // this function does nothing.
7154 // On X11, asks the window manager to maximize @window, if the window
7155 // manager supports this operation. Not all window managers support
7156 // this, and some deliberately ignore it or don't have a concept of
7157 // "maximized"; so you can't rely on the maximization actually
7158 // happening. But it will happen with most standard window managers,
7159 // and GDK makes a best effort to get it to happen.
7160 // On Windows, reliably maximizes the window.
7161 void maximize()() {
7162 gdk_window_maximize(&this);
7165 // VERSION: 2.10
7166 // Merges the input shape masks for any child windows into the
7167 // input shape mask for @window. i.e. the union of all input masks
7168 // for @window and its children will become the new input mask
7169 // for @window. See gdk_window_input_shape_combine_mask().
7170 // This function is distinct from gdk_window_set_child_input_shapes()
7171 // because it includes @window's input shape mask in the set of
7172 // shapes to be merged.
7173 void merge_child_input_shapes()() {
7174 gdk_window_merge_child_input_shapes(&this);
7177 // Merges the shape masks for any child windows into the
7178 // shape mask for @window. i.e. the union of all masks
7179 // for @window and its children will become the new mask
7180 // for @window. See gdk_window_shape_combine_mask().
7181 // This function is distinct from gdk_window_set_child_shapes()
7182 // because it includes @window's shape mask in the set of shapes to
7183 // be merged.
7184 void merge_child_shapes()() {
7185 gdk_window_merge_child_shapes(&this);
7188 // Repositions a window relative to its parent window.
7189 // For toplevel windows, window managers may ignore or modify the move;
7190 // you should probably use gtk_window_move() on a #GtkWindow widget
7191 // anyway, instead of using GDK functions. For child windows,
7192 // the move will reliably succeed.
7193 // If you're also planning to resize the window, use gdk_window_move_resize()
7194 // to both move and resize simultaneously, for a nicer visual effect.
7195 // <x>: X coordinate relative to window's parent
7196 // <y>: Y coordinate relative to window's parent
7197 void move()(int x, int y) {
7198 gdk_window_move(&this, x, y);
7201 // VERSION: 2.8
7202 // Move the part of @window indicated by @region by @dy pixels in the Y
7203 // direction and @dx pixels in the X direction. The portions of @region
7204 // that not covered by the new position of @region are invalidated.
7205 // Child windows are not moved.
7206 // <region>: The #GdkRegion to move
7207 // <dx>: Amount to move in the X direction
7208 // <dy>: Amount to move in the Y direction
7209 void move_region()(Region* region, int dx, int dy) {
7210 gdk_window_move_region(&this, region, dx, dy);
7213 // Equivalent to calling gdk_window_move() and gdk_window_resize(),
7214 // except that both operations are performed at once, avoiding strange
7215 // visual effects. (i.e. the user may be able to see the window first
7216 // move, then resize, if you don't use gdk_window_move_resize().)
7217 // <x>: new X position relative to window's parent
7218 // <y>: new Y position relative to window's parent
7219 // <width>: new width
7220 // <height>: new height
7221 void move_resize()(int x, int y, int width, int height) {
7222 gdk_window_move_resize(&this, x, y, width, height);
7225 // Creates a new #GdkWindow using the attributes from
7226 // display, @parent must be specified.
7227 // RETURNS: the new #GdkWindow
7228 // <attributes>: attributes of the new window
7229 // <attributes_mask>: mask indicating which fields in @attributes are valid
7230 Window* new_()(WindowAttr* attributes, int attributes_mask) {
7231 return gdk_window_new(&this, attributes, attributes_mask);
7234 // Like gdk_window_get_children(), but does not copy the list of
7235 // children, so the list does not need to be freed.
7236 // a reference to the list of child windows in @window
7237 GLib2.List* peek_children()() {
7238 return gdk_window_peek_children(&this);
7241 // Sends one or more expose events to @window. The areas in each
7242 // expose event will cover the entire update area for the window (see
7243 // gdk_window_invalidate_region() for details). Normally GDK calls
7244 // gdk_window_process_all_updates() on your behalf, so there's no
7245 // need to call this function unless you want to force expose events
7246 // to be delivered immediately and synchronously (vs. the usual
7247 // case, where GDK delivers them in an idle handler). Occasionally
7248 // this is useful to produce nicer scrolling behavior, for example.
7249 // <update_children>: whether to also process updates for child windows
7250 void process_updates()(int update_children) {
7251 gdk_window_process_updates(&this, update_children);
7254 // Raises @window to the top of the Z-order (stacking order), so that
7255 // other windows with the same parent window appear below @window.
7256 // This is true whether or not the windows are visible.
7257 // If @window is a toplevel, the window manager may choose to deny the
7258 // request to move the window in the Z-order, gdk_window_raise() only
7259 // requests the restack, does not guarantee it.
7260 void raise()() {
7261 gdk_window_raise(&this);
7264 // VERSION: 2.14
7265 // Redirects drawing into @window so that drawing to the
7266 // window in the rectangle specified by @src_x, @src_y,
7267 // Only drawing between gdk_window_begin_paint_region() or
7268 // gdk_window_begin_paint_rect() and gdk_window_end_paint() is
7269 // redirected.
7270 // Redirection is active until gdk_window_remove_redirection()
7271 // is called.
7272 // <drawable>: a #GdkDrawable
7273 // <src_x>: x position in @window
7274 // <src_y>: y position in @window
7275 // <dest_x>: x position in @drawable
7276 // <dest_y>: y position in @drawable
7277 // <width>: width of redirection, or -1 to use the width of @window
7278 // <height>: height of redirection or -1 to use the height of @window
7279 void redirect_to_drawable()(Drawable* drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
7280 gdk_window_redirect_to_drawable(&this, drawable, src_x, src_y, dest_x, dest_y, width, height);
7282 void register_dnd()() {
7283 gdk_window_register_dnd(&this);
7286 // Unintrospectable method: remove_filter() / gdk_window_remove_filter()
7287 // Remove a filter previously added with gdk_window_add_filter().
7288 // <function>: previously-added filter function
7289 // <data>: user data for previously-added filter function
7290 void remove_filter()(FilterFunc function_, void* data) {
7291 gdk_window_remove_filter(&this, function_, data);
7294 // VERSION: 2.14
7295 // Removes any active redirection started by
7296 // gdk_window_redirect_to_drawable().
7297 void remove_redirection()() {
7298 gdk_window_remove_redirection(&this);
7301 // Reparents @window into the given @new_parent. The window being
7302 // reparented will be unmapped as a side effect.
7303 // <new_parent>: new parent to move @window into
7304 // <x>: X location inside the new parent
7305 // <y>: Y location inside the new parent
7306 void reparent()(Window* new_parent, int x, int y) {
7307 gdk_window_reparent(&this, new_parent, x, y);
7310 // Resizes @window; for toplevel windows, asks the window manager to resize
7311 // the window. The window manager may not allow the resize. When using GTK+,
7312 // use gtk_window_resize() instead of this low-level GDK function.
7313 // Windows may not be resized below 1x1.
7314 // If you're also planning to move the window, use gdk_window_move_resize()
7315 // to both move and resize simultaneously, for a nicer visual effect.
7316 // <width>: new width of the window
7317 // <height>: new height of the window
7318 void resize()(int width, int height) {
7319 gdk_window_resize(&this, width, height);
7322 // VERSION: 2.18
7323 // Changes the position of @window in the Z-order (stacking order), so that
7324 // it is above @sibling (if @above is %TRUE) or below @sibling (if @above is
7325 // %FALSE).
7326 // If @sibling is %NULL, then this either raises (if @above is %TRUE) or
7327 // lowers the window.
7328 // If @window is a toplevel, the window manager may choose to deny the
7329 // request to move the window in the Z-order, gdk_window_restack() only
7330 // requests the restack, does not guarantee it.
7331 // <sibling>: a #GdkWindow that is a sibling of @window, or %NULL
7332 // <above>: a boolean
7333 void restack()(Window* sibling, int above) {
7334 gdk_window_restack(&this, sibling, above);
7337 // Scroll the contents of @window, both pixels and children, by the
7338 // given amount. @window itself does not move. Portions of the window
7339 // that the scroll operation brings in from offscreen areas are
7340 // invalidated. The invalidated region may be bigger than what would
7341 // strictly be necessary.
7342 // For X11, a minimum area will be invalidated if the window has no
7343 // subwindows, or if the edges of the window's parent do not extend
7344 // beyond the edges of the window. In other cases, a multi-step process
7345 // is used to scroll the window which may produce temporary visual
7346 // artifacts and unnecessary invalidations.
7347 // <dx>: Amount to scroll in the X direction
7348 // <dy>: Amount to scroll in the Y direction
7349 void scroll()(int dx, int dy) {
7350 gdk_window_scroll(&this, dx, dy);
7353 // VERSION: 2.4
7354 // Setting @accept_focus to %FALSE hints the desktop environment that the
7355 // window doesn't want to receive input focus.
7356 // On X, it is the responsibility of the window manager to interpret this
7357 // hint. ICCCM-compliant window manager usually respect it.
7358 // <accept_focus>: %TRUE if the window should receive input focus
7359 void set_accept_focus()(int accept_focus) {
7360 gdk_window_set_accept_focus(&this, accept_focus);
7363 // Sets the background pixmap of @window. May also be used to set a
7364 // background of "None" on @window, by setting a background pixmap
7365 // of %NULL.
7366 // A background pixmap will be tiled, positioning the first tile at
7367 // the origin of @window, or if @parent_relative is %TRUE, the tiling
7368 // will be done based on the origin of the parent window (useful to
7369 // align tiles in a parent with tiles in a child).
7370 // A background pixmap of %NULL means that the window will have no
7371 // background. A window with no background will never have its
7372 // background filled by the windowing system, instead the window will
7373 // contain whatever pixels were already in the corresponding area of
7374 // the display.
7375 // The windowing system will normally fill a window with its background
7376 // when the window is obscured then exposed, and when you call
7377 // gdk_window_clear().
7378 // <pixmap>: a #GdkPixmap, or %NULL
7379 // <parent_relative>: whether the tiling origin is at the origin of
7380 void set_back_pixmap()(Pixmap* pixmap, int parent_relative) {
7381 gdk_window_set_back_pixmap(&this, pixmap, parent_relative);
7384 // Sets the background color of @window. (However, when using GTK+,
7385 // set the background of a widget with gtk_widget_modify_bg() - if
7386 // you're an application - or gtk_style_set_background() - if you're
7387 // implementing a custom widget.)
7388 // The @color must be allocated; gdk_rgb_find_color() is the best way
7389 // to allocate a color.
7390 // See also gdk_window_set_back_pixmap().
7391 // <color>: an allocated #GdkColor
7392 void set_background()(Color* color) {
7393 gdk_window_set_background(&this, color);
7396 // VERSION: 2.10
7397 // Sets the input shape mask of @window to the union of input shape masks
7398 // for all children of @window, ignoring the input shape mask of @window
7399 // itself. Contrast with gdk_window_merge_child_input_shapes() which includes
7400 // the input shape mask of @window in the masks to be merged.
7401 void set_child_input_shapes()() {
7402 gdk_window_set_child_input_shapes(&this);
7405 // Sets the shape mask of @window to the union of shape masks
7406 // for all children of @window, ignoring the shape mask of @window
7407 // itself. Contrast with gdk_window_merge_child_shapes() which includes
7408 // the shape mask of @window in the masks to be merged.
7409 void set_child_shapes()() {
7410 gdk_window_set_child_shapes(&this);
7413 // VERSION: 2.12
7414 // Sets a #GdkWindow as composited, or unsets it. Composited
7415 // windows do not automatically have their contents drawn to
7416 // the screen. Drawing is redirected to an offscreen buffer
7417 // and an expose event is emitted on the parent of the composited
7418 // window. It is the responsibility of the parent's expose handler
7419 // to manually merge the off-screen content onto the screen in
7420 // whatever way it sees fit. See <xref linkend="composited-window-example"/>
7421 // for an example.
7422 // It only makes sense for child windows to be composited; see
7423 // gdk_window_set_opacity() if you need translucent toplevel
7424 // windows.
7425 // An additional effect of this call is that the area of this
7426 // window is no longer clipped from regions marked for
7427 // invalidation on its parent. Draws done on the parent
7428 // window are also no longer clipped by the child.
7429 // This call is only supported on some systems (currently,
7430 // only X11 with new enough Xcomposite and Xdamage extensions).
7431 // You must call gdk_display_supports_composite() to check if
7432 // setting a window as composited is supported before
7433 // attempting to do so.
7434 // <composited>: %TRUE to set the window as composited
7435 void set_composited()(int composited) {
7436 gdk_window_set_composited(&this, composited);
7439 // Sets the mouse pointer for a #GdkWindow. Use gdk_cursor_new_for_display()
7440 // or gdk_cursor_new_from_pixmap() to create the cursor. To make the cursor
7441 // invisible, use %GDK_BLANK_CURSOR. Passing %NULL for the @cursor argument
7442 // to gdk_window_set_cursor() means that @window will use the cursor of its
7443 // parent window. Most windows should use this default.
7444 // <cursor>: a cursor
7445 void set_cursor()(Cursor* cursor=null) {
7446 gdk_window_set_cursor(&this, cursor);
7449 // "Decorations" are the features the window manager adds to a toplevel #GdkWindow.
7450 // This function sets the traditional Motif window manager hints that tell the
7451 // window manager which decorations you would like your window to have.
7452 // Usually you should use gtk_window_set_decorated() on a #GtkWindow instead of
7453 // using the GDK function directly.
7454 // The @decorations argument is the logical OR of the fields in
7455 // the #GdkWMDecoration enumeration. If #GDK_DECOR_ALL is included in the
7456 // mask, the other bits indicate which decorations should be turned off.
7457 // If #GDK_DECOR_ALL is not included, then the other bits indicate
7458 // which decorations should be turned on.
7459 // Most window managers honor a decorations hint of 0 to disable all decorations,
7460 // but very few honor all possible combinations of bits.
7461 // <decorations>: decoration hint mask
7462 void set_decorations()(WMDecoration decorations) {
7463 gdk_window_set_decorations(&this, decorations);
7466 // The event mask for a window determines which events will be reported
7467 // for that window. For example, an event mask including #GDK_BUTTON_PRESS_MASK
7468 // means the window should report button press events. The event mask
7469 // is the bitwise OR of values from the #GdkEventMask enumeration.
7470 // <event_mask>: event mask for @window
7471 void set_events()(EventMask event_mask) {
7472 gdk_window_set_events(&this, event_mask);
7475 // VERSION: 2.6
7476 // Setting @focus_on_map to %FALSE hints the desktop environment that the
7477 // window doesn't want to receive input focus when it is mapped.
7478 // focus_on_map should be turned off for windows that aren't triggered
7479 // interactively (such as popups from network activity).
7480 // On X, it is the responsibility of the window manager to interpret
7481 // this hint. Window managers following the freedesktop.org window
7482 // manager extension specification should respect it.
7483 // <focus_on_map>: %TRUE if the window should receive input focus when mapped
7484 void set_focus_on_map()(int focus_on_map) {
7485 gdk_window_set_focus_on_map(&this, focus_on_map);
7488 // Sets hints about the window management functions to make available
7489 // via buttons on the window frame.
7490 // On the X backend, this function sets the traditional Motif window
7491 // manager hint for this purpose. However, few window managers do
7492 // anything reliable or interesting with this hint. Many ignore it
7493 // entirely.
7494 // The @functions argument is the logical OR of values from the
7495 // #GdkWMFunction enumeration. If the bitmask includes #GDK_FUNC_ALL,
7496 // then the other bits indicate which functions to disable; if
7497 // it doesn't include #GDK_FUNC_ALL, it indicates which functions to
7498 // enable.
7499 // <functions>: bitmask of operations to allow on @window
7500 void set_functions()(WMFunction functions) {
7501 gdk_window_set_functions(&this, functions);
7504 // Sets the geometry hints for @window. Hints flagged in @geom_mask
7505 // are set, hints not flagged in @geom_mask are unset.
7506 // To unset all hints, use a @geom_mask of 0 and a @geometry of %NULL.
7507 // This function provides hints to the windowing system about
7508 // acceptable sizes for a toplevel window. The purpose of
7509 // this is to constrain user resizing, but the windowing system
7510 // will typically (but is not required to) also constrain the
7511 // current size of the window to the provided values and
7512 // constrain programatic resizing via gdk_window_resize() or
7513 // gdk_window_move_resize().
7514 // Note that on X11, this effect has no effect on windows
7515 // of type %GDK_WINDOW_TEMP or windows where override redirect
7516 // has been turned on via gdk_window_set_override_redirect()
7517 // since these windows are not resizable by the user.
7518 // Since you can't count on the windowing system doing the
7519 // constraints for programmatic resizes, you should generally
7520 // call gdk_window_constrain_size() yourself to determine
7521 // appropriate sizes.
7522 // <geometry>: geometry hints
7523 // <geom_mask>: bitmask indicating fields of @geometry to pay attention to
7524 void set_geometry_hints()(Geometry* geometry, WindowHints geom_mask) {
7525 gdk_window_set_geometry_hints(&this, geometry, geom_mask);
7528 // Sets the group leader window for @window. By default,
7529 // GDK sets the group leader for all toplevel windows
7530 // to a global window implicitly created by GDK. With this function
7531 // you can override this default.
7532 // The group leader window allows the window manager to distinguish
7533 // all windows that belong to a single application. It may for example
7534 // allow users to minimize/unminimize all windows belonging to an
7535 // application at once. You should only set a non-default group window
7536 // if your application pretends to be multiple applications.
7537 // <leader>: group leader window, or %NULL to restore the default group leader window
7538 void set_group()(Window* leader) {
7539 gdk_window_set_group(&this, leader);
7542 // This function is broken and useless and you should ignore it.
7543 // If using GTK+, use functions such as gtk_window_resize(), gtk_window_set_size_request(),
7544 // gtk_window_move(), gtk_window_parse_geometry(), and gtk_window_set_geometry_hints(),
7545 // depending on what you're trying to do.
7546 // If using GDK directly, use gdk_window_set_geometry_hints().
7547 // <x>: ignored field, does not matter
7548 // <y>: ignored field, does not matter
7549 // <min_width>: minimum width hint
7550 // <min_height>: minimum height hint
7551 // <max_width>: max width hint
7552 // <max_height>: max height hint
7553 // <flags>: logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE
7554 void set_hints()(int x, int y, int min_width, int min_height, int max_width, int max_height, int flags) {
7555 gdk_window_set_hints(&this, x, y, min_width, min_height, max_width, max_height, flags);
7558 // Sets the icon of @window as a pixmap or window. If using GTK+, investigate
7559 // gtk_window_set_default_icon_list() first, and then gtk_window_set_icon_list()
7560 // and gtk_window_set_icon(). If those don't meet your needs, look at
7561 // gdk_window_set_icon_list(). Only if all those are too high-level do you
7562 // want to fall back to gdk_window_set_icon().
7563 // <icon_window>: a #GdkWindow to use for the icon, or %NULL to unset
7564 // <pixmap>: a #GdkPixmap to use as the icon, or %NULL to unset
7565 // <mask>: a 1-bit pixmap (#GdkBitmap) to use as mask for @pixmap, or %NULL to have none
7566 void set_icon()(Window* icon_window, Pixmap* pixmap, Bitmap* mask) {
7567 gdk_window_set_icon(&this, icon_window, pixmap, mask);
7570 // Sets a list of icons for the window. One of these will be used
7571 // to represent the window when it has been iconified. The icon is
7572 // usually shown in an icon box or some sort of task bar. Which icon
7573 // size is shown depends on the window manager. The window manager
7574 // can scale the icon but setting several size icons can give better
7575 // image quality since the window manager may only need to scale the
7576 // icon by a small amount or not at all.
7577 // <pixbufs>: A list of pixbufs, of different sizes.
7578 void set_icon_list()(GLib2.List* pixbufs) {
7579 gdk_window_set_icon_list(&this, pixbufs);
7582 // Windows may have a name used while minimized, distinct from the
7583 // name they display in their titlebar. Most of the time this is a bad
7584 // idea from a user interface standpoint. But you can set such a name
7585 // with this function, if you like.
7586 // After calling this with a non-%NULL @name, calls to gdk_window_set_title()
7587 // will not update the icon title.
7588 // Using %NULL for @name unsets the icon title; further calls to
7589 // gdk_window_set_title() will again update the icon title as well.
7590 // <name>: name of window while iconified (minimized)
7591 void set_icon_name()(char* name) {
7592 gdk_window_set_icon_name(&this, name);
7595 // VERSION: 2.4
7596 // Set if @window must be kept above other windows. If the
7597 // window was already above, then this function does nothing.
7598 // On X11, asks the window manager to keep @window above, if the window
7599 // manager supports this operation. Not all window managers support
7600 // this, and some deliberately ignore it or don't have a concept of
7601 // "keep above"; so you can't rely on the window being kept above.
7602 // But it will happen with most standard window managers,
7603 // and GDK makes a best effort to get it to happen.
7604 // <setting>: whether to keep @window above other windows
7605 void set_keep_above()(int setting) {
7606 gdk_window_set_keep_above(&this, setting);
7609 // VERSION: 2.4
7610 // Set if @window must be kept below other windows. If the
7611 // window was already below, then this function does nothing.
7612 // On X11, asks the window manager to keep @window below, if the window
7613 // manager supports this operation. Not all window managers support
7614 // this, and some deliberately ignore it or don't have a concept of
7615 // "keep below"; so you can't rely on the window being kept below.
7616 // But it will happen with most standard window managers,
7617 // and GDK makes a best effort to get it to happen.
7618 // <setting>: whether to keep @window below other windows
7619 void set_keep_below()(int setting) {
7620 gdk_window_set_keep_below(&this, setting);
7623 // The application can use this hint to tell the window manager
7624 // that a certain window has modal behaviour. The window manager
7625 // can use this information to handle modal windows in a special
7626 // way.
7627 // You should only use this on windows for which you have
7628 // previously called gdk_window_set_transient_for()
7629 // <modal>: %TRUE if the window is modal, %FALSE otherwise.
7630 void set_modal_hint()(int modal) {
7631 gdk_window_set_modal_hint(&this, modal);
7634 // VERSION: 2.12
7635 // Request the windowing system to make @window partially transparent,
7636 // with opacity 0 being fully transparent and 1 fully opaque. (Values
7637 // of the opacity parameter are clamped to the [0,1] range.)
7638 // On X11, this works only on X screens with a compositing manager
7639 // running.
7640 // For setting up per-pixel alpha, see gdk_screen_get_rgba_colormap().
7641 // For making non-toplevel windows translucent, see
7642 // gdk_window_set_composited().
7643 // <opacity>: opacity
7644 void set_opacity()(double opacity) {
7645 gdk_window_set_opacity(&this, opacity);
7648 // An override redirect window is not under the control of the window manager.
7649 // This means it won't have a titlebar, won't be minimizable, etc. - it will
7650 // be entirely under the control of the application. The window manager
7651 // can't see the override redirect window at all.
7652 // Override redirect should only be used for short-lived temporary
7653 // windows, such as popup menus. #GtkMenu uses an override redirect
7654 // window in its implementation, for example.
7655 // <override_redirect>: %TRUE if window should be override redirect
7656 void set_override_redirect()(int override_redirect) {
7657 gdk_window_set_override_redirect(&this, override_redirect);
7660 // When using GTK+, typically you should use gtk_window_set_role() instead
7661 // of this low-level function.
7662 // The window manager and session manager use a window's role to
7663 // distinguish it from other kinds of window in the same application.
7664 // When an application is restarted after being saved in a previous
7665 // session, all windows with the same title and role are treated as
7666 // interchangeable. So if you have two windows with the same title
7667 // that should be distinguished for session management purposes, you
7668 // should set the role on those windows. It doesn't matter what string
7669 // you use for the role, as long as you have a different role for each
7670 // non-interchangeable kind of window.
7671 // <role>: a string indicating its role
7672 void set_role()(char* role) {
7673 gdk_window_set_role(&this, role);
7676 // VERSION: 2.2
7677 // Toggles whether a window should appear in a pager (workspace
7678 // switcher, or other desktop utility program that displays a small
7679 // thumbnail representation of the windows on the desktop). If a
7680 // window's semantic type as specified with gdk_window_set_type_hint()
7681 // already fully describes the window, this function should
7682 // <emphasis>not</emphasis> be called in addition, instead you should
7683 // allow the window to be treated according to standard policy for
7684 // its semantic type.
7685 // <skips_pager>: %TRUE to skip the pager
7686 void set_skip_pager_hint()(int skips_pager) {
7687 gdk_window_set_skip_pager_hint(&this, skips_pager);
7690 // VERSION: 2.2
7691 // Toggles whether a window should appear in a task list or window
7692 // list. If a window's semantic type as specified with
7693 // gdk_window_set_type_hint() already fully describes the window, this
7694 // function should <emphasis>not</emphasis> be called in addition,
7695 // instead you should allow the window to be treated according to
7696 // standard policy for its semantic type.
7697 // <skips_taskbar>: %TRUE to skip the taskbar
7698 void set_skip_taskbar_hint()(int skips_taskbar) {
7699 gdk_window_set_skip_taskbar_hint(&this, skips_taskbar);
7702 // VERSION: 2.12
7703 // When using GTK+, typically you should use gtk_window_set_startup_id()
7704 // instead of this low-level function.
7705 // <startup_id>: a string with startup-notification identifier
7706 void set_startup_id()(char* startup_id) {
7707 gdk_window_set_startup_id(&this, startup_id);
7710 // Set the bit gravity of the given window to static, and flag it so
7711 // all children get static subwindow gravity. This is used if you are
7712 // implementing scary features that involve deep knowledge of the
7713 // windowing system. Don't worry about it unless you have to.
7714 // RETURNS: %TRUE if the server supports static gravity
7715 // <use_static>: %TRUE to turn on static gravity
7716 int set_static_gravities()(int use_static) {
7717 return gdk_window_set_static_gravities(&this, use_static);
7720 // Sets the title of a toplevel window, to be displayed in the titlebar.
7721 // If you haven't explicitly set the icon name for the window
7722 // (using gdk_window_set_icon_name()), the icon name will be set to
7723 // user-readable strings in GDK/GTK+). @title may not be %NULL.
7724 // <title>: title of @window
7725 void set_title()(char* title) {
7726 gdk_window_set_title(&this, title);
7729 // Indicates to the window manager that @window is a transient dialog
7730 // associated with the application window @parent. This allows the
7731 // window manager to do things like center @window on @parent and
7732 // keep @window above @parent.
7733 // See gtk_window_set_transient_for() if you're using #GtkWindow or
7734 // #GtkDialog.
7735 // <parent>: another toplevel #GdkWindow
7736 void set_transient_for()(Window* parent) {
7737 gdk_window_set_transient_for(&this, parent);
7740 // The application can use this call to provide a hint to the window
7741 // manager about the functionality of a window. The window manager
7742 // can use this information when determining the decoration and behaviour
7743 // of the window.
7744 // The hint must be set before the window is mapped.
7745 // <hint>: A hint of the function this window will have
7746 void set_type_hint()(WindowTypeHint hint) {
7747 gdk_window_set_type_hint(&this, hint);
7750 // VERSION: 2.8
7751 // Toggles whether a window needs the user's
7752 // urgent attention.
7753 // <urgent>: %TRUE if the window is urgent
7754 void set_urgency_hint()(int urgent) {
7755 gdk_window_set_urgency_hint(&this, urgent);
7758 // For most purposes this function is deprecated in favor of
7759 // g_object_set_data(). However, for historical reasons GTK+ stores
7760 // the #GtkWidget that owns a #GdkWindow as user data on the
7761 // #GdkWindow. So, custom widget implementations should use
7762 // this function for that. If GTK+ receives an event for a #GdkWindow,
7763 // and the user data for the window is non-%NULL, GTK+ will assume the
7764 // user data is a #GtkWidget, and forward the event to that widget.
7765 // <user_data>: user data
7766 void set_user_data()(void* user_data) {
7767 gdk_window_set_user_data(&this, user_data);
7770 // Applies a shape mask to @window. Pixels in @window corresponding to
7771 // set bits in the @mask will be visible; pixels in @window
7772 // corresponding to unset bits in the @mask will be transparent. This
7773 // gives a non-rectangular window.
7774 // If @mask is %NULL, the shape mask will be unset, and the @x/@y
7775 // parameters are not used.
7776 // On the X11 platform, this uses an X server extension which is
7777 // widely available on most common platforms, but not available on
7778 // very old X servers, and occasionally the implementation will be
7779 // buggy. On servers without the shape extension, this function
7780 // will do nothing.
7781 // This function works on both toplevel and child windows.
7782 // <mask>: shape mask
7783 // <x>: X position of shape mask with respect to @window
7784 // <y>: Y position of shape mask with respect to @window
7785 void shape_combine_mask()(Bitmap* mask, int x, int y) {
7786 gdk_window_shape_combine_mask(&this, mask, x, y);
7789 // Makes pixels in @window outside @shape_region be transparent,
7790 // so that the window may be nonrectangular. See also
7791 // gdk_window_shape_combine_mask() to use a bitmap as the mask.
7792 // If @shape_region is %NULL, the shape will be unset, so the whole
7793 // window will be opaque again. @offset_x and @offset_y are ignored
7794 // if @shape_region is %NULL.
7795 // On the X11 platform, this uses an X server extension which is
7796 // widely available on most common platforms, but not available on
7797 // very old X servers, and occasionally the implementation will be
7798 // buggy. On servers without the shape extension, this function
7799 // will do nothing.
7800 // This function works on both toplevel and child windows.
7801 // <shape_region>: region of window to be non-transparent
7802 // <offset_x>: X position of @shape_region in @window coordinates
7803 // <offset_y>: Y position of @shape_region in @window coordinates
7804 void shape_combine_region()(Region* shape_region, int offset_x, int offset_y) {
7805 gdk_window_shape_combine_region(&this, shape_region, offset_x, offset_y);
7808 // Like gdk_window_show_unraised(), but also raises the window to the
7809 // top of the window stack (moves the window to the front of the
7810 // Z-order).
7811 // This function maps a window so it's visible onscreen. Its opposite
7812 // is gdk_window_hide().
7813 // When implementing a #GtkWidget, you should call this function on the widget's
7814 // #GdkWindow as part of the "map" method.
7815 void show()() {
7816 gdk_window_show(&this);
7819 // Shows a #GdkWindow onscreen, but does not modify its stacking
7820 // order. In contrast, gdk_window_show() will raise the window
7821 // to the top of the window stack.
7822 // On the X11 platform, in Xlib terms, this function calls
7823 // XMapWindow() (it also updates some internal GDK state, which means
7824 // that you can't really use XMapWindow() directly on a GDK window).
7825 void show_unraised()() {
7826 gdk_window_show_unraised(&this);
7829 // "Pins" a window such that it's on all workspaces and does not scroll
7830 // with viewports, for window managers that have scrollable viewports.
7831 // (When using #GtkWindow, gtk_window_stick() may be more useful.)
7832 // On the X11 platform, this function depends on window manager
7833 // support, so may have no effect with many window managers. However,
7834 // GDK will do the best it can to convince the window manager to stick
7835 // the window. For window managers that don't support this operation,
7836 // there's nothing you can do to force it to happen.
7837 void stick()() {
7838 gdk_window_stick(&this);
7841 // Thaws a window frozen with
7842 // gdk_window_freeze_toplevel_updates_libgtk_only().
7843 // This function is not part of the GDK public API and is only
7844 // for use by GTK+.
7845 void thaw_toplevel_updates_libgtk_only()() {
7846 gdk_window_thaw_toplevel_updates_libgtk_only(&this);
7848 // Thaws a window frozen with gdk_window_freeze_updates().
7849 void thaw_updates()() {
7850 gdk_window_thaw_updates(&this);
7853 // VERSION: 2.2
7854 // Moves the window out of fullscreen mode. If the window was not
7855 // fullscreen, does nothing.
7856 // On X11, asks the window manager to move @window out of the fullscreen
7857 // state, if the window manager supports this operation. Not all
7858 // window managers support this, and some deliberately ignore it or
7859 // don't have a concept of "fullscreen"; so you can't rely on the
7860 // unfullscreenification actually happening. But it will happen with
7861 // most standard window managers, and GDK makes a best effort to get
7862 // it to happen.
7863 void unfullscreen()() {
7864 gdk_window_unfullscreen(&this);
7867 // Unmaximizes the window. If the window wasn't maximized, then this
7868 // function does nothing.
7869 // On X11, asks the window manager to unmaximize @window, if the
7870 // window manager supports this operation. Not all window managers
7871 // support this, and some deliberately ignore it or don't have a
7872 // concept of "maximized"; so you can't rely on the unmaximization
7873 // actually happening. But it will happen with most standard window
7874 // managers, and GDK makes a best effort to get it to happen.
7875 // On Windows, reliably unmaximizes the window.
7876 void unmaximize()() {
7877 gdk_window_unmaximize(&this);
7880 // Reverse operation for gdk_window_stick(); see gdk_window_stick(),
7881 // and gtk_window_unstick().
7882 void unstick()() {
7883 gdk_window_unstick(&this);
7886 // Withdraws a window (unmaps it and asks the window manager to forget about it).
7887 // This function is not really useful as gdk_window_hide() automatically
7888 // withdraws toplevel windows before hiding them.
7889 void withdraw()() {
7890 gdk_window_withdraw(&this);
7893 // VERSION: 2.18
7894 // The ::from-embedder signal is emitted to translate coordinates
7895 // in the embedder of an offscreen window to the offscreen window.
7896 // See also #GtkWindow::to-embedder.
7897 // <embedder-x>: x coordinate in the embedder window
7898 // <embedder-y>: y coordinate in the embedder window
7899 // <offscreen-x>: return location for the x coordinate in the offscreen window
7900 // <offscreen-y>: return location for the y coordinate in the offscreen window
7901 extern (C) alias static void function (Window* this_, double embedder_x, double embedder_y, /*out*/ /*POINTER*/ double* offscreen_x, /*out*/ /*POINTER*/ double* offscreen_y, void* user_data=null) signal_from_embedder;
7903 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7904 return super_.signal_connect!name(cb, data, cf);
7907 ulong signal_connect(string name:"from-embedder", CB:signal_from_embedder)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7908 return signal_connect_data!()(&this, cast(char*)"from-embedder",
7909 cast(GObject2.Callback)cb, data, null, cf);
7912 // VERSION: 2.18
7913 // The ::pick-embedded-child signal is emitted to find an embedded
7914 // child at the given position.
7915 // RETURNS: the #GdkWindow of the embedded child at
7916 // <x>: x coordinate in the window
7917 // <y>: y coordinate in the window
7918 extern (C) alias static Window* function (Window* this_, double x, double y, void* user_data=null) signal_pick_embedded_child;
7919 ulong signal_connect(string name:"pick-embedded-child", CB:signal_pick_embedded_child)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7920 return signal_connect_data!()(&this, cast(char*)"pick-embedded-child",
7921 cast(GObject2.Callback)cb, data, null, cf);
7924 // VERSION: 2.18
7925 // The ::to-embedder signal is emitted to translate coordinates
7926 // in an offscreen window to its embedder.
7927 // See also #GtkWindow::from-embedder.
7928 // <offscreen-x>: x coordinate in the offscreen window
7929 // <offscreen-y>: y coordinate in the offscreen window
7930 // <embedder-x>: return location for the x coordinate in the embedder window
7931 // <embedder-y>: return location for the y coordinate in the embedder window
7932 extern (C) alias static void function (Window* this_, double offscreen_x, double offscreen_y, /*out*/ /*POINTER*/ double* embedder_x, /*out*/ /*POINTER*/ double* embedder_y, void* user_data=null) signal_to_embedder;
7933 ulong signal_connect(string name:"to-embedder", CB:signal_to_embedder)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7934 return signal_connect_data!()(&this, cast(char*)"to-embedder",
7935 cast(GObject2.Callback)cb, data, null, cf);
7939 struct WindowAttr {
7940 char* title;
7941 int event_mask, x, y, width, height;
7942 WindowClass wclass;
7943 Visual* visual;
7944 Colormap* colormap;
7945 WindowType window_type;
7946 Cursor* cursor;
7947 char* wmclass_name, wmclass_class;
7948 int override_redirect;
7949 WindowTypeHint type_hint;
7952 enum WindowAttributesType {
7953 TITLE = 2,
7954 X = 4,
7955 Y = 8,
7956 CURSOR = 16,
7957 COLORMAP = 32,
7958 VISUAL = 64,
7959 WMCLASS = 128,
7960 NOREDIR = 256,
7961 TYPE_HINT = 512
7963 enum WindowClass {
7964 OUTPUT = 0,
7965 ONLY = 1
7967 enum WindowEdge {
7968 NORTH_WEST = 0,
7969 NORTH = 1,
7970 NORTH_EAST = 2,
7971 WEST = 3,
7972 EAST = 4,
7973 SOUTH_WEST = 5,
7974 SOUTH = 6,
7975 SOUTH_EAST = 7
7977 enum WindowHints {
7978 POS = 1,
7979 MIN_SIZE = 2,
7980 MAX_SIZE = 4,
7981 BASE_SIZE = 8,
7982 ASPECT = 16,
7983 RESIZE_INC = 32,
7984 WIN_GRAVITY = 64,
7985 USER_POS = 128,
7986 USER_SIZE = 256
7988 struct WindowObject {
7991 struct WindowObjectClass {
7992 DrawableClass parent_class;
7995 struct WindowRedirect {
7998 enum WindowState {
7999 WITHDRAWN = 1,
8000 ICONIFIED = 2,
8001 MAXIMIZED = 4,
8002 STICKY = 8,
8003 FULLSCREEN = 16,
8004 ABOVE = 32,
8005 BELOW = 64
8007 enum WindowType {
8008 ROOT = 0,
8009 TOPLEVEL = 1,
8010 CHILD = 2,
8011 DIALOG = 3,
8012 TEMP = 4,
8013 FOREIGN = 5,
8014 OFFSCREEN = 6
8016 enum WindowTypeHint {
8017 NORMAL = 0,
8018 DIALOG = 1,
8019 MENU = 2,
8020 TOOLBAR = 3,
8021 SPLASHSCREEN = 4,
8022 UTILITY = 5,
8023 DOCK = 6,
8024 DESKTOP = 7,
8025 DROPDOWN_MENU = 8,
8026 POPUP_MENU = 9,
8027 TOOLTIP = 10,
8028 NOTIFICATION = 11,
8029 COMBO = 12,
8030 DND = 13
8032 // Unintrospectable function: add_client_message_filter() / gdk_add_client_message_filter()
8033 static void add_client_message_filter()(Atom message_type, FilterFunc func, void* data) {
8034 gdk_add_client_message_filter(message_type, func, data);
8038 // Appends gdk option entries to the passed in option group. This is
8039 // not public API and must not be used by applications.
8040 // <group>: An option group.
8041 static void add_option_entries_libgtk_only()(GLib2.OptionGroup* group) {
8042 gdk_add_option_entries_libgtk_only(group);
8045 // Unintrospectable function: atom_intern() / gdk_atom_intern()
8046 static Atom atom_intern()(char* atom_name, int only_if_exists) {
8047 return gdk_atom_intern(atom_name, only_if_exists);
8051 // Unintrospectable function: atom_intern_static_string() / gdk_atom_intern_static_string()
8052 // VERSION: 2.10
8053 // Finds or creates an atom corresponding to a given string.
8054 // Note that this function is identical to gdk_atom_intern() except
8055 // that if a new #GdkAtom is created the string itself is used rather
8056 // than a copy. This saves memory, but can only be used if the string
8057 // will <emphasis>always</emphasis> exist. It can be used with statically
8058 // allocated strings in the main program, but not with statically
8059 // allocated memory in dynamically loaded modules, if you expect to
8060 // ever unload the module again (e.g. do not use this function in
8061 // GTK+ theme engines).
8062 // RETURNS: the atom corresponding to @atom_name
8063 // <atom_name>: a static string
8064 static Atom atom_intern_static_string()(char* atom_name) {
8065 return gdk_atom_intern_static_string(atom_name);
8068 static char* /*new*/ atom_name()(Atom atom) {
8069 return gdk_atom_name(atom);
8072 // Emits a short beep on the default display.
8073 static void beep()() {
8074 gdk_beep();
8077 // Unintrospectable function: bitmap_create_from_data() / gdk_bitmap_create_from_data()
8078 static Bitmap* bitmap_create_from_data()(Drawable* drawable, char* data, int width, int height) {
8079 return gdk_bitmap_create_from_data(drawable, data, width, height);
8083 // VERSION: 2.8
8084 // Creates a Cairo context for drawing to @drawable.
8085 // <note><para>
8086 // Note that due to double-buffering, Cairo contexts created
8087 // in a GTK+ expose event handler cannot be cached and reused
8088 // between different expose events.
8089 // </para></note>
8090 // cairo_destroy() when you are done drawing.
8091 // RETURNS: A newly created Cairo context. Free with
8092 // <drawable>: a #GdkDrawable
8093 static cairo.Context* /*new*/ cairo_create()(Drawable* drawable) {
8094 return gdk_cairo_create(drawable);
8098 // VERSION: 2.8
8099 // Adds the given rectangle to the current path of @cr.
8100 // <cr>: a #cairo_t
8101 // <rectangle>: a #GdkRectangle
8102 static void cairo_rectangle()(cairo.Context* cr, Rectangle* rectangle) {
8103 gdk_cairo_rectangle(cr, rectangle);
8107 // VERSION: 2.8
8108 // Adds the given region to the current path of @cr.
8109 // <cr>: a #cairo_t
8110 // <region>: a #GdkRegion
8111 static void cairo_region()(cairo.Context* cr, Region* region) {
8112 gdk_cairo_region(cr, region);
8116 // VERSION: 2.18
8117 // Resets the clip region for a Cairo context created by gdk_cairo_create().
8118 // This resets the clip region to the "empty" state for the given drawable.
8119 // This is required for non-native windows since a direct call to
8120 // cairo_reset_clip() would unset the clip region inherited from the
8121 // drawable (i.e. the window clip region), and thus let you e.g.
8122 // draw outside your window.
8123 // This is rarely needed though, since most code just create a new cairo_t
8124 // using gdk_cairo_create() each time they want to draw something.
8125 // <cr>: a #cairo_t
8126 // <drawable>: a #GdkDrawable
8127 static void cairo_reset_clip()(cairo.Context* cr, Drawable* drawable) {
8128 gdk_cairo_reset_clip(cr, drawable);
8132 // VERSION: 2.8
8133 // Sets the specified #GdkColor as the source color of @cr.
8134 // <cr>: a #cairo_t
8135 // <color>: a #GdkColor
8136 static void cairo_set_source_color()(cairo.Context* cr, Color* color) {
8137 gdk_cairo_set_source_color(cr, color);
8141 // VERSION: 2.8
8142 // Sets the given pixbuf as the source pattern for the Cairo context.
8143 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
8144 // so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y
8145 // <cr>: a #Cairo context
8146 // <pixbuf>: a #GdkPixbuf
8147 // <pixbuf_x>: X coordinate of location to place upper left corner of @pixbuf
8148 // <pixbuf_y>: Y coordinate of location to place upper left corner of @pixbuf
8149 static void cairo_set_source_pixbuf()(cairo.Context* cr, GdkPixbuf2.Pixbuf* pixbuf, double pixbuf_x, double pixbuf_y) {
8150 gdk_cairo_set_source_pixbuf(cr, pixbuf, pixbuf_x, pixbuf_y);
8154 // VERSION: 2.10
8155 // DEPRECATED (v2.24) function: cairo_set_source_pixmap - This function is being removed in GTK+ 3 (together
8156 // Sets the given pixmap as the source pattern for the Cairo context.
8157 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
8158 // so that the origin of @pixmap is @pixmap_x, @pixmap_y
8159 // with #GdkPixmap). Instead, use gdk_cairo_set_source_window() where
8160 // appropriate.
8161 // <cr>: a #Cairo context
8162 // <pixmap>: a #GdkPixmap
8163 // <pixmap_x>: X coordinate of location to place upper left corner of @pixmap
8164 // <pixmap_y>: Y coordinate of location to place upper left corner of @pixmap
8165 static void cairo_set_source_pixmap()(cairo.Context* cr, Pixmap* pixmap, double pixmap_x, double pixmap_y) {
8166 gdk_cairo_set_source_pixmap(cr, pixmap, pixmap_x, pixmap_y);
8170 // VERSION: 2.24
8171 // Sets the given window as the source pattern for the Cairo context.
8172 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
8173 // so that the origin of @window is @x, @y. The window contains all its
8174 // subwindows when rendering.
8175 // Note that the contents of @window are undefined outside of the
8176 // visible part of @window, so use this function with care.
8177 // <cr>: a #Cairo context
8178 // <window>: a #GdkWindow
8179 // <x>: X coordinate of location to place upper left corner of @window
8180 // <y>: Y coordinate of location to place upper left corner of @window
8181 static void cairo_set_source_window()(cairo.Context* cr, Window* window, double x, double y) {
8182 gdk_cairo_set_source_window(cr, window, x, y);
8186 // DEPRECATED (v2.2) function: char_height - Use gdk_text_extents() instead.
8187 // Determines the total height of a given character.
8188 // This value is not generally useful, because you cannot
8189 // determine how this total height will be drawn in
8190 // relation to the baseline. See gdk_text_extents().
8191 // RETURNS: the height of the character in pixels.
8192 // <font>: a #GdkFont
8193 // <character>: the character to measure.
8194 static int char_height()(Font* font, char character) {
8195 return gdk_char_height(font, character);
8199 // Determines the distance from the origin to the rightmost
8200 // portion of a character when drawn. This is not the
8201 // correct value for determining the origin of the next
8202 // portion when drawing text in multiple pieces.
8203 // RETURNS: the right bearing of the character in pixels.
8204 // <font>: a #GdkFont
8205 // <character>: the character to measure.
8206 static int char_measure()(Font* font, char character) {
8207 return gdk_char_measure(font, character);
8211 // DEPRECATED (v2.2) function: char_width - Use gdk_text_extents() instead.
8212 // Determines the width of a given character.
8213 // RETURNS: the width of the character in pixels.
8214 // <font>: a #GdkFont
8215 // <character>: the character to measure.
8216 static int char_width()(Font* font, char character) {
8217 return gdk_char_width(font, character);
8221 // Determines the width of a given wide character. (Encoded
8222 // in the wide-character encoding of the current locale).
8223 // RETURNS: the width of the character in pixels.
8224 // <font>: a #GdkFont
8225 // <character>: the character to measure.
8226 static int char_width_wc()(Font* font, WChar character) {
8227 return gdk_char_width_wc(font, character);
8231 // DEPRECATED (v2.2) function: color_alloc - Use gdk_colormap_alloc_color() instead.
8232 // Allocates a single color from a colormap.
8233 // RETURNS: %TRUE if the allocation succeeded.
8234 // <colormap>: a #GdkColormap.
8235 // <color>: The color to allocate. On return, the <structfield>pixel</structfield> field will be filled in.
8236 static int color_alloc()(Colormap* colormap, Color* color) {
8237 return gdk_color_alloc(colormap, color);
8241 // Returns the black color for a given colormap. The resulting
8242 // value has already been allocated.
8243 // RETURNS: %TRUE if the allocation succeeded.
8244 // <colormap>: a #GdkColormap.
8245 // <color>: the location to store the color.
8246 static int color_black()(Colormap* colormap, Color* color) {
8247 return gdk_color_black(colormap, color);
8251 // Changes the value of a color that has already
8252 // been allocated. If @colormap is not a private
8253 // colormap, then the color must have been allocated
8254 // using gdk_colormap_alloc_colors() with the
8255 // RETURNS: %TRUE if the color was successfully changed.
8256 // <colormap>: a #GdkColormap.
8257 // <color>: a #GdkColor, with the color to change in the <structfield>pixel</structfield> field, and the new value in the remaining fields.
8258 static int color_change()(Colormap* colormap, Color* color) {
8259 return gdk_color_change(colormap, color);
8263 // Parses a textual specification of a color and fill in the
8264 // <structfield>red</structfield>, <structfield>green</structfield>,
8265 // and <structfield>blue</structfield> fields of a #GdkColor
8266 // structure. The color is <emphasis>not</emphasis> allocated, you
8267 // must call gdk_colormap_alloc_color() yourself. The string can
8268 // either one of a large set of standard names. (Taken from the X11
8269 // <filename>rgb.txt</filename> file), or it can be a hex value in the
8270 // form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or
8271 // '&num;rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the
8272 // red, green, and blue components of the color, respectively. (White
8273 // in the four forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and
8274 // '&num;ffffffffffff')
8275 // RETURNS: %TRUE if the parsing succeeded.
8276 // <spec>: the string specifying the color.
8277 // <color>: the #GdkColor to fill in
8278 static int color_parse()(char* spec, /*out*/ Color* color) {
8279 return gdk_color_parse(spec, color);
8283 // Returns the white color for a given colormap. The resulting
8284 // value has already allocated been allocated.
8285 // RETURNS: %TRUE if the allocation succeeded.
8286 // <colormap>: a #GdkColormap.
8287 // <color>: the location to store the color.
8288 static int color_white()(Colormap* colormap, Color* color) {
8289 return gdk_color_white(colormap, color);
8293 // Allocates colors from a colormap. This function
8294 // is obsolete. See gdk_colormap_alloc_colors().
8295 // For full documentation of the fields, see
8296 // the Xlib documentation for <function>XAllocColorCells()</function>.
8297 // RETURNS: %TRUE if the allocation was successful
8298 // <colormap>: a #GdkColormap.
8299 // <contiguous>: if %TRUE, the colors should be allocated in contiguous color cells.
8300 // <planes>: an array in which to store the plane masks.
8301 // <nplanes>: the number of planes to allocate. (Or zero, to indicate that the color allocation should not be planar.)
8302 // <pixels>: an array into which to store allocated pixel values.
8303 // <npixels>: the number of pixels in each plane to allocate.
8304 static int colors_alloc()(Colormap* colormap, int contiguous, c_ulong* planes, int nplanes, c_ulong* pixels, int npixels) {
8305 return gdk_colors_alloc(colormap, contiguous, planes, nplanes, pixels, npixels);
8309 // Frees colors allocated with gdk_colors_alloc(). This
8310 // function is obsolete. See gdk_colormap_free_colors().
8311 // <colormap>: a #GdkColormap.
8312 // <pixels>: the pixel values of the colors to free.
8313 // <npixels>: the number of values in @pixels.
8314 // <planes>: the plane masks for all planes to free, OR'd together.
8315 static void colors_free()(Colormap* colormap, c_ulong* pixels, int npixels, c_ulong planes) {
8316 gdk_colors_free(colormap, pixels, npixels, planes);
8320 // Changes the value of the first @ncolors colors in
8321 // a private colormap. This function is obsolete and
8322 // should not be used. See gdk_color_change().
8323 // <colormap>: a #GdkColormap.
8324 // <colors>: the new color values.
8325 // <ncolors>: the number of colors to change.
8326 static void colors_store()(Colormap* colormap, Color* colors, int ncolors) {
8327 gdk_colors_store(colormap, colors, ncolors);
8331 // Returns the list of available input devices for the default display.
8332 // The list is statically allocated and should not be freed.
8333 // RETURNS: a list of #GdkDevice
8334 static GLib2.List* devices_list()() {
8335 return gdk_devices_list();
8339 // Aborts a drag without dropping.
8340 // This function is called by the drag source.
8341 // <context>: a #GdkDragContext.
8342 // <time_>: the timestamp for this operation.
8343 static void drag_abort()(DragContext* context, uint time_) {
8344 gdk_drag_abort(context, time_);
8348 // Unintrospectable function: drag_begin() / gdk_drag_begin()
8349 // Starts a drag and creates a new drag context for it.
8350 // This function is called by the drag source.
8351 // RETURNS: a newly created #GdkDragContext.
8352 // <window>: the source window for this drag.
8353 // <targets>: the offered targets, as list of #GdkAtom<!-- -->s
8354 static DragContext* drag_begin()(Window* window, GLib2.List* targets) {
8355 return gdk_drag_begin(window, targets);
8359 // Drops on the current destination.
8360 // This function is called by the drag source.
8361 // <context>: a #GdkDragContext.
8362 // <time_>: the timestamp for this operation.
8363 static void drag_drop()(DragContext* context, uint time_) {
8364 gdk_drag_drop(context, time_);
8368 // VERSION: 2.6
8369 // Returns whether the dropped data has been successfully
8370 // transferred. This function is intended to be used while
8371 // handling a %GDK_DROP_FINISHED event, its return value is
8372 // meaningless at other times.
8373 // RETURNS: %TRUE if the drop was successful.
8374 // <context>: a #GdkDragContext
8375 static int drag_drop_succeeded()(DragContext* context) {
8376 return gdk_drag_drop_succeeded(context);
8380 // DEPRECATED (v2.24) function: drag_find_window - Use gdk_drag_find_window_for_screen() instead.
8381 // Finds the destination window and DND protocol to use at the
8382 // given pointer position.
8383 // This function is called by the drag source to obtain the
8384 // <context>: a #GdkDragContext.
8385 // <drag_window>: a window which may be at the pointer position, but should be ignored, since it is put up by the drag source as an icon.
8386 // <x_root>: the x position of the pointer in root coordinates.
8387 // <y_root>: the y position of the pointer in root coordinates.
8388 // <dest_window>: location to store the destination window in.
8389 // <protocol>: location to store the DND protocol in.
8390 static void drag_find_window()(DragContext* context, Window* drag_window, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol) {
8391 gdk_drag_find_window(context, drag_window, x_root, y_root, dest_window, protocol);
8395 // VERSION: 2.2
8396 // Finds the destination window and DND protocol to use at the
8397 // given pointer position.
8398 // This function is called by the drag source to obtain the
8399 // <context>: a #GdkDragContext
8400 // <drag_window>: a window which may be at the pointer position, but should be ignored, since it is put up by the drag source as an icon.
8401 // <screen>: the screen where the destination window is sought.
8402 // <x_root>: the x position of the pointer in root coordinates.
8403 // <y_root>: the y position of the pointer in root coordinates.
8404 // <dest_window>: location to store the destination window in.
8405 // <protocol>: location to store the DND protocol in.
8406 static void drag_find_window_for_screen()(DragContext* context, Window* drag_window, Screen* screen, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol) {
8407 gdk_drag_find_window_for_screen(context, drag_window, screen, x_root, y_root, dest_window, protocol);
8411 // DEPRECATED (v2.24) function: drag_get_protocol - Use gdk_drag_get_protocol_for_display() instead
8412 // Finds out the DND protocol supported by a window.
8413 // the drop should happen. This may be @xid or the id of a proxy
8414 // window, or zero if @xid doesn't support Drag and Drop.
8415 // RETURNS: the windowing system specific id for the window where
8416 // <xid>: the windowing system id of the destination window.
8417 // <protocol>: location where the supported DND protocol is returned.
8418 static NativeWindow drag_get_protocol()(NativeWindow xid, DragProtocol* protocol) {
8419 return gdk_drag_get_protocol(xid, protocol);
8423 // VERSION: 2.2
8424 // Finds out the DND protocol supported by a window.
8425 // RETURNS: the windowing system id of the window where the drop should happen. This may be @xid or the id of a proxy window, or zero if @xid doesn't support Drag and Drop.
8426 // <display>: the #GdkDisplay where the destination window resides
8427 // <xid>: the windowing system id of the destination window.
8428 // <protocol>: location where the supported DND protocol is returned.
8429 static NativeWindow drag_get_protocol_for_display()(Display* display, NativeWindow xid, DragProtocol* protocol) {
8430 return gdk_drag_get_protocol_for_display(display, xid, protocol);
8434 // Unintrospectable function: drag_get_selection() / gdk_drag_get_selection()
8435 // Returns the selection atom for the current source window.
8436 // RETURNS: the selection atom.
8437 // <context>: a #GdkDragContext.
8438 static Atom drag_get_selection()(DragContext* context) {
8439 return gdk_drag_get_selection(context);
8443 // Updates the drag context when the pointer moves or the
8444 // set of actions changes.
8445 // This function is called by the drag source.
8446 // RETURNS: FIXME
8447 // <context>: a #GdkDragContext.
8448 // <dest_window>: the new destination window, obtained by gdk_drag_find_window().
8449 // <protocol>: the DND protocol in use, obtained by gdk_drag_find_window().
8450 // <x_root>: the x position of the pointer in root coordinates.
8451 // <y_root>: the y position of the pointer in root coordinates.
8452 // <suggested_action>: the suggested action.
8453 // <possible_actions>: the possible actions.
8454 // <time_>: the timestamp for this operation.
8455 static int drag_motion()(DragContext* context, Window* dest_window, DragProtocol protocol, int x_root, int y_root, DragAction suggested_action, DragAction possible_actions, uint time_) {
8456 return gdk_drag_motion(context, dest_window, protocol, x_root, y_root, suggested_action, possible_actions, time_);
8460 // Selects one of the actions offered by the drag source.
8461 // This function is called by the drag destination in response to
8462 // gdk_drag_motion() called by the drag source.
8463 // <context>: a #GdkDragContext.
8464 // <action>: the selected action which will be taken when a drop happens, or 0 to indicate that a drop will not be accepted.
8465 // <time_>: the timestamp for this operation.
8466 static void drag_status()(DragContext* context, DragAction action, uint time_) {
8467 gdk_drag_status(context, action, time_);
8471 // DEPRECATED (v2.22) function: draw_arc - Use cairo_arc() and cairo_fill() or cairo_stroke()
8472 // Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
8473 // rectangle of the entire ellipse, and the start and end angles of the part
8474 // of the ellipse to be drawn.
8475 // instead. Note that arcs just like any drawing operation in Cairo are
8476 // antialiased unless you call cairo_set_antialias().
8477 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8478 // <gc>: a #GdkGC.
8479 // <filled>: %TRUE if the arc should be filled, producing a 'pie slice'.
8480 // <x>: the x coordinate of the left edge of the bounding rectangle.
8481 // <y>: the y coordinate of the top edge of the bounding rectangle.
8482 // <width>: the width of the bounding rectangle.
8483 // <height>: the height of the bounding rectangle.
8484 // <angle1>: the start angle of the arc, relative to the 3 o'clock position, counter-clockwise, in 1/64ths of a degree.
8485 // <angle2>: the end angle of the arc, relative to @angle1, in 1/64ths of a degree.
8486 static void draw_arc()(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2) {
8487 gdk_draw_arc(drawable, gc, filled, x, y, width, height, angle1, angle2);
8491 // DEPRECATED (v2.22) function: draw_drawable - Use gdk_cairo_set_source_pixmap(), cairo_rectangle()
8492 // Copies the @width x @height region of @src at coordinates (@xsrc,
8493 // Most fields in @gc are not used for this operation, but notably the
8494 // clip mask or clip region will be honored.
8495 // The source and destination drawables must have the same visual and
8496 // colormap, or errors will result. (On X11, failure to match
8497 // visual/colormap results in a BadMatch error from the X server.)
8498 // A common cause of this problem is an attempt to draw a bitmap to
8499 // a color drawable. The way to draw a bitmap is to set the bitmap as
8500 // the stipple on the #GdkGC, set the fill mode to %GDK_STIPPLED, and
8501 // then draw the rectangle.
8502 // and cairo_fill() to draw pixmap on top of other drawables. Also keep
8503 // in mind that the limitations on allowed sources do not apply to Cairo.
8504 // <drawable>: a #GdkDrawable
8505 // <gc>: a #GdkGC sharing the drawable's visual and colormap
8506 // <src>: the source #GdkDrawable, which may be the same as @drawable
8507 // <xsrc>: X position in @src of rectangle to draw
8508 // <ysrc>: Y position in @src of rectangle to draw
8509 // <xdest>: X position in @drawable where the rectangle should be drawn
8510 // <ydest>: Y position in @drawable where the rectangle should be drawn
8511 // <width>: width of rectangle to draw, or -1 for entire @src width
8512 // <height>: height of rectangle to draw, or -1 for entire @src height
8513 static void draw_drawable()(Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) {
8514 gdk_draw_drawable(drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height);
8518 // DEPRECATED (v2.22) function: draw_glyphs - Use pango_cairo_show_glyphs() instead.
8519 // This is a low-level function; 99% of text rendering should be done
8520 // using gdk_draw_layout() instead.
8521 // A glyph is a single image in a font. This function draws a sequence of
8522 // glyphs. To obtain a sequence of glyphs you have to understand a
8523 // lot about internationalized text handling, which you don't want to
8524 // understand; thus, use gdk_draw_layout() instead of this function,
8525 // gdk_draw_layout() handles the details.
8526 // <drawable>: a #GdkDrawable
8527 // <gc>: a #GdkGC
8528 // <font>: font to be used
8529 // <x>: X coordinate of baseline origin
8530 // <y>: Y coordinate of baseline origin
8531 // <glyphs>: the glyph string to draw
8532 static void draw_glyphs()(Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) {
8533 gdk_draw_glyphs(drawable, gc, font, x, y, glyphs);
8537 // VERSION: 2.6
8538 // DEPRECATED (v2.22) function: draw_glyphs_transformed - Use pango_cairo_show_glyphs() instead.
8539 // Renders a #PangoGlyphString onto a drawable, possibly
8540 // transforming the layed-out coordinates through a transformation
8541 // matrix. Note that the transformation matrix for @font is not
8542 // changed, so to produce correct rendering results, the @font
8543 // must have been loaded using a #PangoContext with an identical
8544 // transformation matrix to that passed in to this function.
8545 // See also gdk_draw_glyphs(), gdk_draw_layout().
8546 // <drawable>: a #GdkDrawable
8547 // <gc>: a #GdkGC
8548 // <matrix>: a #PangoMatrix, or %NULL to use an identity transformation
8549 // <font>: the font in which to draw the string
8550 // <x>: the x position of the start of the string (in Pango units in user space coordinates)
8551 // <y>: the y position of the baseline (in Pango units in user space coordinates)
8552 // <glyphs>: the glyph string to draw
8553 static void draw_glyphs_transformed()(Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) {
8554 gdk_draw_glyphs_transformed(drawable, gc, matrix, font, x, y, glyphs);
8557 static void draw_gray_image()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) {
8558 gdk_draw_gray_image(drawable, gc, x, y, width, height, dith, buf, rowstride);
8562 // DEPRECATED (v2.22) function: draw_image - Do not use #GdkImage anymore, instead use Cairo image
8563 // Draws a #GdkImage onto a drawable.
8564 // The depth of the #GdkImage must match the depth of the #GdkDrawable.
8565 // surfaces.
8566 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8567 // <gc>: a #GdkGC.
8568 // <image>: the #GdkImage to draw.
8569 // <xsrc>: the left edge of the source rectangle within @image.
8570 // <ysrc>: the top of the source rectangle within @image.
8571 // <xdest>: the x coordinate of the destination within @drawable.
8572 // <ydest>: the y coordinate of the destination within @drawable.
8573 // <width>: the width of the area to be copied, or -1 to make the area extend to the right edge of @image.
8574 // <height>: the height of the area to be copied, or -1 to make the area extend to the bottom edge of @image.
8575 static void draw_image()(Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) {
8576 gdk_draw_image(drawable, gc, image, xsrc, ysrc, xdest, ydest, width, height);
8579 static void draw_indexed_image()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride, RgbCmap* cmap) {
8580 gdk_draw_indexed_image(drawable, gc, x, y, width, height, dith, buf, rowstride, cmap);
8584 // Render a #PangoLayout onto a GDK drawable
8585 // If the layout's #PangoContext has a transformation matrix set, then
8586 // bounding box (in device space) of the transformed layout.
8587 // If you're using GTK+, the usual way to obtain a #PangoLayout
8588 // is gtk_widget_create_pango_layout().
8589 // <drawable>: the drawable on which to draw string
8590 // <gc>: base graphics context to use
8591 // <x>: the X position of the left of the layout (in pixels)
8592 // <y>: the Y position of the top of the layout (in pixels)
8593 // <layout>: a #PangoLayout
8594 static void draw_layout()(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout) {
8595 gdk_draw_layout(drawable, gc, x, y, layout);
8599 // Render a #PangoLayoutLine onto an GDK drawable
8600 // If the layout's #PangoContext has a transformation matrix set, then
8601 // (left is in before-tranform user coordinates) in after-transform
8602 // device coordinates.
8603 // <drawable>: the drawable on which to draw the line
8604 // <gc>: base graphics to use
8605 // <x>: the x position of start of string (in pixels)
8606 // <y>: the y position of baseline (in pixels)
8607 // <line>: a #PangoLayoutLine
8608 static void draw_layout_line()(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line) {
8609 gdk_draw_layout_line(drawable, gc, x, y, line);
8613 // Render a #PangoLayoutLine onto a #GdkDrawable, overriding the
8614 // layout's normal colors with @foreground and/or @background.
8615 // If the layout's #PangoContext has a transformation matrix set, then
8616 // (left is in before-tranform user coordinates) in after-transform
8617 // device coordinates.
8618 // <drawable>: the drawable on which to draw the line
8619 // <gc>: base graphics to use
8620 // <x>: the x position of start of string (in pixels)
8621 // <y>: the y position of baseline (in pixels)
8622 // <line>: a #PangoLayoutLine
8623 // <foreground>: foreground override color, or %NULL for none
8624 // <background>: background override color, or %NULL for none
8625 static void draw_layout_line_with_colors()(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line, Color* foreground=null, Color* background=null) {
8626 gdk_draw_layout_line_with_colors(drawable, gc, x, y, line, foreground, background);
8630 // Render a #PangoLayout onto a #GdkDrawable, overriding the
8631 // layout's normal colors with @foreground and/or @background.
8632 // If the layout's #PangoContext has a transformation matrix set, then
8633 // bounding box (in device space) of the transformed layout.
8634 // If you're using GTK+, the ususal way to obtain a #PangoLayout
8635 // is gtk_widget_create_pango_layout().
8636 // <drawable>: the drawable on which to draw string
8637 // <gc>: base graphics context to use
8638 // <x>: the X position of the left of the layout (in pixels)
8639 // <y>: the Y position of the top of the layout (in pixels)
8640 // <layout>: a #PangoLayout
8641 // <foreground>: foreground override color, or %NULL for none
8642 // <background>: background override color, or %NULL for none
8643 static void draw_layout_with_colors()(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout, Color* foreground=null, Color* background=null) {
8644 gdk_draw_layout_with_colors(drawable, gc, x, y, layout, foreground, background);
8648 // DEPRECATED (v2.22) function: draw_line - Use cairo_line_to() and cairo_stroke() instead.
8649 // Draws a line, using the foreground color and other attributes of
8650 // the #GdkGC.
8651 // Be aware that the default line width in Cairo is 2 pixels and that your
8652 // coordinates need to describe the center of the line. To draw a single
8653 // pixel wide pixel-aligned line, you would use:
8654 // |[cairo_set_line_width (cr, 1.0);
8655 // cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
8656 // cairo_move_to (cr, 0.5, 0.5);
8657 // cairo_line_to (cr, 9.5, 0.5);
8658 // cairo_stroke (cr);]|
8659 // See also <ulink url="http://cairographics.org/FAQ/#sharp_lines">the Cairo
8660 // FAQ</ulink> on this topic.
8661 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8662 // <gc>: a #GdkGC.
8663 // <x1_>: the x coordinate of the start point.
8664 // <y1_>: the y coordinate of the start point.
8665 // <x2_>: the x coordinate of the end point.
8666 // <y2_>: the y coordinate of the end point.
8667 static void draw_line()(Drawable* drawable, GC* gc, int x1_, int y1_, int x2_, int y2_) {
8668 gdk_draw_line(drawable, gc, x1_, y1_, x2_, y2_);
8672 // DEPRECATED (v2.22) function: draw_lines - Use cairo_line_to() and cairo_stroke() instead. See the
8673 // Draws a series of lines connecting the given points.
8674 // The way in which joins between lines are draw is determined by the
8675 // #GdkCapStyle value in the #GdkGC. This can be set with
8676 // gdk_gc_set_line_attributes().
8677 // documentation of gdk_draw_line() for notes on line drawing with Cairo.
8678 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8679 // <gc>: a #GdkGC.
8680 // <points>: an array of #GdkPoint structures specifying the endpoints of the
8681 // <n_points>: the size of the @points array.
8682 static void draw_lines()(Drawable* drawable, GC* gc, Point* points, int n_points) {
8683 gdk_draw_lines(drawable, gc, points, n_points);
8687 // VERSION: 2.2
8688 // DEPRECATED (v2.22) function: draw_pixbuf - Use gdk_cairo_set_source_pixbuf() and cairo_paint() or
8689 // Renders a rectangular portion of a pixbuf to a drawable. The destination
8690 // drawable must have a colormap. All windows have a colormap, however, pixmaps
8691 // only have colormap by default if they were created with a non-%NULL window
8692 // argument. Otherwise a colormap must be set on them with
8693 // gdk_drawable_set_colormap().
8694 // On older X servers, rendering pixbufs with an alpha channel involves round
8695 // trips to the X server, and may be somewhat slow.
8696 // If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
8697 // function is accelerated using mediaLib, which provides hardware
8698 // acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib
8699 // support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
8700 // variable.
8701 // cairo_rectangle() and cairo_fill() instead.
8702 // <drawable>: Destination drawable.
8703 // <gc>: a #GdkGC, used for clipping, or %NULL
8704 // <pixbuf>: a #GdkPixbuf
8705 // <src_x>: Source X coordinate within pixbuf.
8706 // <src_y>: Source Y coordinates within pixbuf.
8707 // <dest_x>: Destination X coordinate within drawable.
8708 // <dest_y>: Destination Y coordinate within drawable.
8709 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width.
8710 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height.
8711 // <dither>: Dithering mode for #GdkRGB.
8712 // <x_dither>: X offset for dither.
8713 // <y_dither>: Y offset for dither.
8714 static void draw_pixbuf()(Drawable* drawable, GC* gc, GdkPixbuf2.Pixbuf* pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither) {
8715 gdk_draw_pixbuf(drawable, gc, pixbuf, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither);
8719 // DEPRECATED (v2.22) function: draw_point - Use cairo_rectangle() and cairo_fill() or
8720 // Draws a point, using the foreground color and other attributes of
8721 // the #GdkGC.
8722 // cairo_move_to() and cairo_stroke() instead.
8723 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8724 // <gc>: a #GdkGC.
8725 // <x>: the x coordinate of the point.
8726 // <y>: the y coordinate of the point.
8727 static void draw_point()(Drawable* drawable, GC* gc, int x, int y) {
8728 gdk_draw_point(drawable, gc, x, y);
8732 // DEPRECATED (v2.22) function: draw_points - Use @n_points calls to cairo_rectangle() and
8733 // Draws a number of points, using the foreground color and other
8734 // attributes of the #GdkGC.
8735 // cairo_fill() instead.
8736 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8737 // <gc>: a #GdkGC.
8738 // <points>: an array of #GdkPoint structures.
8739 // <n_points>: the number of points to be drawn.
8740 static void draw_points()(Drawable* drawable, GC* gc, Point* points, int n_points) {
8741 gdk_draw_points(drawable, gc, points, n_points);
8745 // DEPRECATED (v2.22) function: draw_polygon - Use cairo_line_to() or cairo_append_path() and
8746 // Draws an outlined or filled polygon.
8747 // cairo_fill() or cairo_stroke() instead.
8748 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8749 // <gc>: a #GdkGC.
8750 // <filled>: %TRUE if the polygon should be filled. The polygon is closed automatically, connecting the last point to the first point if necessary.
8751 // <points>: an array of #GdkPoint structures specifying the points making up the polygon.
8752 // <n_points>: the number of points.
8753 static void draw_polygon()(Drawable* drawable, GC* gc, int filled, Point* points, int n_points) {
8754 gdk_draw_polygon(drawable, gc, filled, points, n_points);
8758 // DEPRECATED (v2.22) function: draw_rectangle - Use cairo_rectangle() and cairo_fill() or cairo_stroke()
8759 // Draws a rectangular outline or filled rectangle, using the foreground color
8760 // and other attributes of the #GdkGC.
8761 // A rectangle drawn filled is 1 pixel smaller in both dimensions than a
8762 // rectangle outlined. Calling
8763 // <literal>gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20)</literal>
8764 // results in a filled rectangle 20 pixels wide and 20 pixels high. Calling
8765 // <literal>gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20)</literal>
8766 // results in an outlined rectangle with corners at (0, 0), (0, 20), (20, 20),
8767 // and (20, 0), which makes it 21 pixels wide and 21 pixels high.
8768 // instead. For stroking, the same caveats for converting code apply as for
8769 // gdk_draw_line().
8770 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8771 // <gc>: a #GdkGC.
8772 // <filled>: %TRUE if the rectangle should be filled.
8773 // <x>: the x coordinate of the left edge of the rectangle.
8774 // <y>: the y coordinate of the top edge of the rectangle.
8775 // <width>: the width of the rectangle.
8776 // <height>: the height of the rectangle.
8777 static void draw_rectangle()(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height) {
8778 gdk_draw_rectangle(drawable, gc, filled, x, y, width, height);
8781 static void draw_rgb_32_image()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) {
8782 gdk_draw_rgb_32_image(drawable, gc, x, y, width, height, dith, buf, rowstride);
8786 // DEPRECATED (v2.22) function: draw_rgb_32_image_dithalign - Cairo handles colors automatically.
8787 // Like gdk_draw_rgb_32_image(), but allows you to specify the dither
8788 // offsets. See gdk_draw_rgb_image_dithalign() for more details.
8789 // <drawable>: a #GdkDrawable
8790 // <gc>: a #GdkGC
8791 // <x>: X coordinate on @drawable where image should go
8792 // <y>: Y coordinate on @drawable where image should go
8793 // <width>: width of area of image to draw
8794 // <height>: height of area of image to draw
8795 // <dith>: dithering mode
8796 // <buf>: RGB image data
8797 // <rowstride>: rowstride of RGB image data
8798 // <xdith>: X dither offset
8799 // <ydith>: Y dither offset
8800 static void draw_rgb_32_image_dithalign()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride, int xdith, int ydith) {
8801 gdk_draw_rgb_32_image_dithalign(drawable, gc, x, y, width, height, dith, buf, rowstride, xdith, ydith);
8804 static void draw_rgb_image()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride) {
8805 gdk_draw_rgb_image(drawable, gc, x, y, width, height, dith, rgb_buf, rowstride);
8808 static void draw_rgb_image_dithalign()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride, int xdith, int ydith) {
8809 gdk_draw_rgb_image_dithalign(drawable, gc, x, y, width, height, dith, rgb_buf, rowstride, xdith, ydith);
8813 // DEPRECATED (v2.22) function: draw_segments - Use cairo_move_to(), cairo_line_to() and cairo_stroke()
8814 // Draws a number of unconnected lines.
8815 // instead. See the documentation of gdk_draw_line() for notes on line drawing
8816 // with Cairo.
8817 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8818 // <gc>: a #GdkGC.
8819 // <segs>: an array of #GdkSegment structures specifying the start and end points of the lines to be drawn.
8820 // <n_segs>: the number of line segments to draw, i.e. the size of the
8821 static void draw_segments()(Drawable* drawable, GC* gc, Segment* segs, int n_segs) {
8822 gdk_draw_segments(drawable, gc, segs, n_segs);
8826 // DEPRECATED (v2.4) function: draw_string - Use gdk_draw_layout() instead.
8827 // Draws a string of characters in the given font or fontset.
8828 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8829 // <font>: a #GdkFont.
8830 // <gc>: a #GdkGC.
8831 // <x>: the x coordinate of the left edge of the text.
8832 // <y>: the y coordinate of the baseline of the text.
8833 // <string>: the string of characters to draw.
8834 static void draw_string()(Drawable* drawable, Font* font, GC* gc, int x, int y, char* string_) {
8835 gdk_draw_string(drawable, font, gc, x, y, string_);
8839 // DEPRECATED (v2.4) function: draw_text - Use gdk_draw_layout() instead.
8840 // Draws a number of characters in the given font or fontset.
8841 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8842 // <font>: a #GdkFont.
8843 // <gc>: a #GdkGC.
8844 // <x>: the x coordinate of the left edge of the text.
8845 // <y>: the y coordinate of the baseline of the text.
8846 // <text>: the characters to draw.
8847 // <text_length>: the number of characters of @text to draw.
8848 static void draw_text()(Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length) {
8849 gdk_draw_text(drawable, font, gc, x, y, text, text_length);
8853 // DEPRECATED (v2.4) function: draw_text_wc - Use gdk_draw_layout() instead.
8854 // Draws a number of wide characters using the given font of fontset.
8855 // If the font is a 1-byte font, the string is converted into 1-byte
8856 // characters (discarding the high bytes) before output.
8857 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8858 // <font>: a #GdkFont.
8859 // <gc>: a #GdkGC.
8860 // <x>: the x coordinate of the left edge of the text.
8861 // <y>: the y coordinate of the baseline of the text.
8862 // <text>: the wide characters to draw.
8863 // <text_length>: the number of characters to draw.
8864 static void draw_text_wc()(Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length) {
8865 gdk_draw_text_wc(drawable, font, gc, x, y, text, text_length);
8869 // VERSION: 2.6
8870 // DEPRECATED (v2.22) function: draw_trapezoids - Use Cairo path contruction functions and cairo_fill()
8871 // Draws a set of anti-aliased trapezoids. The trapezoids are
8872 // combined using saturation addition, then drawn over the background
8873 // as a set. This is low level functionality used internally to implement
8874 // rotated underlines and backgrouds when rendering a PangoLayout and is
8875 // likely not useful for applications.
8876 // instead.
8877 // <drawable>: a #GdkDrawable
8878 // <gc>: a #GdkGC
8879 // <trapezoids>: an array of #GdkTrapezoid structures
8880 // <n_trapezoids>: the number of trapezoids to draw
8881 static void draw_trapezoids()(Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids) {
8882 gdk_draw_trapezoids(drawable, gc, trapezoids, n_trapezoids);
8886 // Ends the drag operation after a drop.
8887 // This function is called by the drag destination.
8888 // <context>: a #GtkDragContext.
8889 // <success>: %TRUE if the data was successfully received.
8890 // <time_>: the timestamp for this operation.
8891 static void drop_finish()(DragContext* context, int success, uint time_) {
8892 gdk_drop_finish(context, success, time_);
8896 // Accepts or rejects a drop.
8897 // This function is called by the drag destination in response
8898 // to a drop initiated by the drag source.
8899 // <context>: a #GdkDragContext.
8900 // <ok>: %TRUE if the drop is accepted.
8901 // <time_>: the timestamp for this operation.
8902 static void drop_reply()(DragContext* context, int ok, uint time_) {
8903 gdk_drop_reply(context, ok, time_);
8906 static int error_trap_pop()() {
8907 return gdk_error_trap_pop();
8910 static void error_trap_push()() {
8911 gdk_error_trap_push();
8915 // Checks all open displays for a #GdkEvent to process,to be processed
8916 // on, fetching events from the windowing system if necessary.
8917 // See gdk_display_get_event().
8918 // are pending. The returned #GdkEvent should be freed with gdk_event_free().
8919 // RETURNS: the next #GdkEvent to be processed, or %NULL if no events
8920 static Event* /*new*/ event_get()() {
8921 return gdk_event_get();
8924 static Event* /*new*/ event_get_graphics_expose()(Window* window) {
8925 return gdk_event_get_graphics_expose(window);
8929 // Sets the function to call to handle all events from GDK.
8930 // Note that GTK+ uses this to install its own event handler, so it is
8931 // usually not useful for GTK+ applications. (Although an application
8932 // can call this function then call gtk_main_do_event() to pass
8933 // events to GTK+.)
8934 // <func>: the function to call to handle events from GDK.
8935 // <data>: user data to pass to the function.
8936 // <notify>: the function to call when the handler function is removed, i.e. when gdk_event_handler_set() is called with another event handler.
8937 static void event_handler_set()(EventFunc func, void* data, GLib2.DestroyNotify notify) {
8938 gdk_event_handler_set(func, data, notify);
8942 // If there is an event waiting in the event queue of some open
8943 // display, returns a copy of it. See gdk_display_peek_event().
8944 // events are in any queues. The returned #GdkEvent should be freed with
8945 // gdk_event_free().
8946 // RETURNS: a copy of the first #GdkEvent on some event queue, or %NULL if no
8947 static Event* /*new*/ event_peek()() {
8948 return gdk_event_peek();
8952 // VERSION: 2.12
8953 // Request more motion notifies if @event is a motion notify hint event.
8954 // This function should be used instead of gdk_window_get_pointer() to
8955 // request further motion notifies, because it also works for extension
8956 // events where motion notifies are provided for devices other than the
8957 // core pointer. Coordinate extraction, processing and requesting more
8958 // motion events from a %GDK_MOTION_NOTIFY event usually works like this:
8959 // |[
8960 // {
8961 // /&ast; motion_event handler &ast;/
8962 // x = motion_event->x;
8963 // y = motion_event->y;
8964 // /&ast; handle (x,y) motion &ast;/
8965 // gdk_event_request_motions (motion_event); /&ast; handles is_hint events &ast;/
8966 // }
8967 // ]|
8968 // <event>: a valid #GdkEvent
8969 static void event_request_motions()(EventMotion* event) {
8970 gdk_event_request_motions(event);
8973 static int event_send_client_message_for_display()(Display* display, Event* event, NativeWindow winid) {
8974 return gdk_event_send_client_message_for_display(display, event, winid);
8977 static int events_pending()() {
8978 return gdk_events_pending();
8981 static void exit()(int error_code) {
8982 gdk_exit(error_code);
8985 static void flush()() {
8986 gdk_flush();
8990 // Load a #GdkFont based on a Pango font description. This font will
8991 // only be an approximation of the Pango font, and
8992 // internationalization will not be handled correctly. This function
8993 // should only be used for legacy code that cannot be easily converted
8994 // to use Pango. Using Pango directly will produce better results.
8995 // cannot be loaded.
8996 // RETURNS: the newly loaded font, or %NULL if the font
8997 // <font_desc>: a #PangoFontDescription.
8998 static Font* /*new*/ font_from_description()(Pango.FontDescription* font_desc) {
8999 return gdk_font_from_description(font_desc);
9002 static Font* /*new*/ font_from_description_for_display()(Display* display, Pango.FontDescription* font_desc) {
9003 return gdk_font_from_description_for_display(display, font_desc);
9007 // Loads a font.
9008 // The font may be newly loaded or looked up the font in a cache.
9009 // You should make no assumptions about the initial reference count.
9010 // RETURNS: a #GdkFont, or %NULL if the font could not be loaded.
9011 // <font_name>: a XLFD describing the font to load.
9012 static Font* /*new*/ font_load()(char* font_name) {
9013 return gdk_font_load(font_name);
9016 static Font* /*new*/ font_load_for_display()(Display* display, char* font_name) {
9017 return gdk_font_load_for_display(display, font_name);
9020 static Font* /*new*/ fontset_load()(char* fontset_name) {
9021 return gdk_fontset_load(fontset_name);
9024 static Font* /*new*/ fontset_load_for_display()(Display* display, char* fontset_name) {
9025 return gdk_fontset_load_for_display(display, fontset_name);
9028 static void free_compound_text()(ubyte* ctext) {
9029 gdk_free_compound_text(ctext);
9032 static void free_text_list()(char** list) {
9033 gdk_free_text_list(list);
9037 // Unintrospectable function: get_default_root_window() / gdk_get_default_root_window()
9038 // Obtains the root window (parent all other windows are inside)
9039 // for the default display and screen.
9040 // RETURNS: the default root window
9041 static Window* get_default_root_window()() {
9042 return gdk_get_default_root_window();
9045 static char* /*new*/ get_display()() {
9046 return gdk_get_display();
9050 // VERSION: 2.2
9051 // Gets the display name specified in the command line arguments passed
9052 // to gdk_init() or gdk_parse_args(), if any.
9053 // this string is owned by GTK+ and must not be modified or freed.
9054 // RETURNS: the display name, if specified explicitely, otherwise %NULL
9055 static char* get_display_arg_name()() {
9056 return gdk_get_display_arg_name();
9059 static char* get_program_class()() {
9060 return gdk_get_program_class();
9064 // Gets whether event debugging output is enabled.
9065 // RETURNS: %TRUE if event debugging output is enabled.
9066 static int get_show_events()() {
9067 return gdk_get_show_events();
9070 static int get_use_xshm()() {
9071 return gdk_get_use_xshm();
9074 static void init()(/*inout*/ int* argc, /*inout*/ char*** argv) {
9075 gdk_init(argc, argv);
9079 // Initialize the library for use.
9080 // Arguments:
9081 // "argc" is the number of arguments.
9082 // "argv" is an array of strings.
9083 // Results:
9084 // "argc" and "argv" are modified to reflect any arguments
9085 // which were not handled. (Such arguments should either
9086 // be handled by the application or dismissed). If initialization
9087 // fails, returns FALSE, otherwise TRUE.
9088 // Side effects:
9089 // The library is initialized.
9090 // --------------------------------------------------------------
9091 static int init_check()(/*inout*/ int* argc, /*inout*/ char*** argv) {
9092 return gdk_init_check(argc, argv);
9096 // Unintrospectable function: input_add() / gdk_input_add()
9097 // DEPRECATED (v2.14) function: input_add - Use g_io_add_watch() on a #GIOChannel
9098 // Establish a callback when a condition becomes true on
9099 // a file descriptor.
9100 // gdk_input_remove().
9101 // RETURNS: a tag that can later be used as an argument to
9102 // <source>: a file descriptor.
9103 // <condition>: the condition.
9104 // <function>: the callback function.
9105 // <data>: callback data passed to @function.
9106 static int input_add()(int source, InputCondition condition, InputFunction function_, void* data) {
9107 return gdk_input_add(source, condition, function_, data);
9111 // DEPRECATED (v2.14) function: input_add_full - Use g_io_add_watch_full() on a #GIOChannel
9112 // Establish a callback when a condition becomes true on
9113 // a file descriptor.
9114 // gdk_input_remove().
9115 // RETURNS: a tag that can later be used as an argument to
9116 // <source>: a file descriptor.
9117 // <condition>: the condition.
9118 // <function>: the callback function.
9119 // <data>: callback data passed to @function.
9120 // <destroy>: callback function to call with @data when the input handler is removed.
9121 static int input_add_full()(int source, InputCondition condition, InputFunction function_, void* data, GLib2.DestroyNotify destroy) {
9122 return gdk_input_add_full(source, condition, function_, data, destroy);
9125 static void input_remove()(int tag) {
9126 gdk_input_remove(tag);
9129 static void input_set_extension_events()(Window* window, int mask, ExtensionMode mode) {
9130 gdk_input_set_extension_events(window, mask, mode);
9133 static GrabStatus keyboard_grab()(Window* window, int owner_events, uint time_) {
9134 return gdk_keyboard_grab(window, owner_events, time_);
9138 // Determines information about the current keyboard grab.
9139 // This is not public API and must not be used by applications.
9140 // keyboard grabbed.
9141 // RETURNS: %TRUE if this application currently has the
9142 // <display>: the display for which to get the grab information
9143 // <grab_window>: location to store current grab window
9144 // <owner_events>: location to store boolean indicating whether the @owner_events flag to gdk_keyboard_grab() was %TRUE.
9145 static int keyboard_grab_info_libgtk_only()(Display* display, Window** grab_window, int* owner_events) {
9146 return gdk_keyboard_grab_info_libgtk_only(display, grab_window, owner_events);
9150 // Ungrabs the keyboard on the default display, if it is grabbed by this
9151 // application.
9152 // <time_>: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is available.
9153 static void keyboard_ungrab()(uint time_) {
9154 gdk_keyboard_ungrab(time_);
9158 // Obtains the upper- and lower-case versions of the keyval @symbol.
9159 // Examples of keyvals are #GDK_a, #GDK_Enter, #GDK_F1, etc.
9160 // <symbol>: a keyval
9161 // <lower>: return location for lowercase version of @symbol
9162 // <upper>: return location for uppercase version of @symbol
9163 static void keyval_convert_case()(uint symbol, /*out*/ uint* lower, /*out*/ uint* upper) {
9164 gdk_keyval_convert_case(symbol, lower, upper);
9168 // Converts a key name to a key value.
9169 // The names are the same as those in the
9170 // <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
9171 // but without the leading "GDK_KEY_".
9172 // if the key name is not a valid key
9173 // RETURNS: the corresponding key value, or %GDK_KEY_VoidSymbol
9174 // <keyval_name>: a key name
9175 static uint keyval_from_name()(char* keyval_name) {
9176 return gdk_keyval_from_name(keyval_name);
9179 static int keyval_is_lower()(uint keyval) {
9180 return gdk_keyval_is_lower(keyval);
9183 static int keyval_is_upper()(uint keyval) {
9184 return gdk_keyval_is_upper(keyval);
9188 // Converts a key value into a symbolic name.
9189 // The names are the same as those in the
9190 // <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
9191 // but without the leading "GDK_KEY_".
9192 // or %NULL if @keyval is not a valid key. The string should not be
9193 // modified.
9194 // RETURNS: a string containing the name of the key,
9195 // <keyval>: a key value
9196 static char* keyval_name()(uint keyval) {
9197 return gdk_keyval_name(keyval);
9200 static uint keyval_to_lower()(uint keyval) {
9201 return gdk_keyval_to_lower(keyval);
9205 // Convert from a GDK key symbol to the corresponding ISO10646 (Unicode)
9206 // character.
9207 // is no corresponding character.
9208 // RETURNS: the corresponding unicode character, or 0 if there
9209 // <keyval>: a GDK key symbol
9210 static uint keyval_to_unicode()(uint keyval) {
9211 return gdk_keyval_to_unicode(keyval);
9214 static uint keyval_to_upper()(uint keyval) {
9215 return gdk_keyval_to_upper(keyval);
9219 // Lists the available visuals for the default screen.
9220 // (See gdk_screen_list_visuals())
9221 // A visual describes a hardware image data format.
9222 // For example, a visual might support 24-bit color, or 8-bit color,
9223 // and might expect pixels to be in a certain format.
9224 // Call g_list_free() on the return value when you're finished with it.
9225 // a list of visuals; the list must be freed, but not its contents
9226 static GLib2.List* /*new container*/ list_visuals()() {
9227 return gdk_list_visuals();
9231 // Converts a multi-byte string to a wide character string.
9232 // (The function name comes from an acronym of 'Multi-Byte String TO Wide
9233 // Character String').
9234 // the conversion failed.
9235 // RETURNS: the number of wide characters written into @dest, or -1 if
9236 // <dest>: the space to place the converted wide character string into.
9237 // <src>: the multi-byte string to convert, which must be nul-terminated.
9238 // <dest_max>: the maximum number of wide characters to place in @dest.
9239 static int mbstowcs()(WChar* dest, char* src, int dest_max) {
9240 return gdk_mbstowcs(dest, src, dest_max);
9244 // VERSION: 2.2
9245 // Indicates to the GUI environment that the application has finished
9246 // loading. If the applications opens windows, this function is
9247 // normally called after opening the application's initial set of
9248 // windows.
9249 // GTK+ will call this function automatically after opening the first
9250 // #GtkWindow unless gtk_window_set_auto_startup_notification() is called
9251 // to disable that feature.
9252 static void notify_startup_complete()() {
9253 gdk_notify_startup_complete();
9257 // VERSION: 2.12
9258 // Indicates to the GUI environment that the application has finished
9259 // loading, using a given identifier.
9260 // GTK+ will call this function automatically for #GtkWindow with custom
9261 // startup-notification identifier unless
9262 // gtk_window_set_auto_startup_notification() is called to disable
9263 // that feature.
9264 // <startup_id>: a startup-notification identifier, for which notification process should be completed
9265 static void notify_startup_complete_with_id()(char* startup_id) {
9266 gdk_notify_startup_complete_with_id(startup_id);
9270 // Unintrospectable function: offscreen_window_get_embedder() / gdk_offscreen_window_get_embedder()
9271 // VERSION: 2.18
9272 // Gets the window that @window is embedded in.
9273 // embedded offscreen window
9274 // RETURNS: the embedding #GdkWindow, or %NULL if @window is not an
9275 // <window>: a #GdkWindow
9276 static Window* offscreen_window_get_embedder()(Window* window) {
9277 return gdk_offscreen_window_get_embedder(window);
9281 // Unintrospectable function: offscreen_window_get_pixmap() / gdk_offscreen_window_get_pixmap()
9282 // VERSION: 2.18
9283 // Gets the offscreen pixmap that an offscreen window renders into.
9284 // If you need to keep this around over window resizes, you need to
9285 // add a reference to it.
9286 // RETURNS: The offscreen pixmap, or %NULL if not offscreen
9287 // <window>: a #GdkWindow
9288 static Pixmap* offscreen_window_get_pixmap()(Window* window) {
9289 return gdk_offscreen_window_get_pixmap(window);
9293 // VERSION: 2.18
9294 // Sets @window to be embedded in @embedder.
9295 // To fully embed an offscreen window, in addition to calling this
9296 // function, it is also necessary to handle the #GdkWindow::pick-embedded-child
9297 // signal on the @embedder and the #GdkWindow::to-embedder and
9298 // #GdkWindow::from-embedder signals on @window.
9299 // <window>: a #GdkWindow
9300 // <embedder>: the #GdkWindow that @window gets embedded in
9301 static void offscreen_window_set_embedder()(Window* window, Window* embedder) {
9302 gdk_offscreen_window_set_embedder(window, embedder);
9306 // Unintrospectable function: pango_attr_emboss_color_new() / gdk_pango_attr_emboss_color_new()
9307 // VERSION: 2.12
9308 // Creates a new attribute specifying the color to emboss text with.
9309 // RETURNS: new #PangoAttribute
9310 // <color>: a GdkColor representing the color to emboss with
9311 static Pango.Attribute* pango_attr_emboss_color_new()(Color* color) {
9312 return gdk_pango_attr_emboss_color_new(color);
9316 // Unintrospectable function: pango_attr_embossed_new() / gdk_pango_attr_embossed_new()
9317 // Creates a new attribute flagging a region as embossed or not.
9318 // RETURNS: new #PangoAttribute
9319 // <embossed>: if the region should be embossed
9320 static Pango.Attribute* pango_attr_embossed_new()(int embossed) {
9321 return gdk_pango_attr_embossed_new(embossed);
9325 // Unintrospectable function: pango_attr_stipple_new() / gdk_pango_attr_stipple_new()
9326 // Creates a new attribute containing a stipple bitmap to be used when
9327 // rendering the text.
9328 // RETURNS: new #PangoAttribute
9329 // <stipple>: a bitmap to be set as stipple
9330 static Pango.Attribute* pango_attr_stipple_new()(Bitmap* stipple) {
9331 return gdk_pango_attr_stipple_new(stipple);
9335 // Unintrospectable function: pango_context_get() / gdk_pango_context_get()
9336 // Creates a #PangoContext for the default GDK screen.
9337 // The context must be freed when you're finished with it.
9338 // When using GTK+, normally you should use gtk_widget_get_pango_context()
9339 // instead of this function, to get the appropriate context for
9340 // the widget you intend to render text onto.
9341 // The newly created context will have the default font options (see
9342 // #cairo_font_options_t) for the default screen; if these options
9343 // change it will not be updated. Using gtk_widget_get_pango_context()
9344 // is more convenient if you want to keep a context around and track
9345 // changes to the screen's font rendering settings.
9346 // RETURNS: a new #PangoContext for the default display
9347 static Pango.Context* pango_context_get()() {
9348 return gdk_pango_context_get();
9352 // Unintrospectable function: pango_context_get_for_screen() / gdk_pango_context_get_for_screen()
9353 // VERSION: 2.2
9354 // Creates a #PangoContext for @screen.
9355 // The context must be freed when you're finished with it.
9356 // When using GTK+, normally you should use gtk_widget_get_pango_context()
9357 // instead of this function, to get the appropriate context for
9358 // the widget you intend to render text onto.
9359 // The newly created context will have the default font options
9360 // (see #cairo_font_options_t) for the screen; if these options
9361 // change it will not be updated. Using gtk_widget_get_pango_context()
9362 // is more convenient if you want to keep a context around and track
9363 // changes to the screen's font rendering settings.
9364 // RETURNS: a new #PangoContext for @screen
9365 // <screen>: the #GdkScreen for which the context is to be created.
9366 static Pango.Context* pango_context_get_for_screen()(Screen* screen) {
9367 return gdk_pango_context_get_for_screen(screen);
9371 // This function used to set the colormap to be used for drawing with
9372 // context used for drawing, so calling this function is no longer
9373 // necessary.
9374 // <context>: a #PangoContext
9375 // <colormap>: a #GdkColormap
9376 static void pango_context_set_colormap()(Pango.Context* context, Colormap* colormap) {
9377 gdk_pango_context_set_colormap(context, colormap);
9381 // Unintrospectable function: pango_layout_get_clip_region() / gdk_pango_layout_get_clip_region()
9382 // Obtains a clip region which contains the areas where the given ranges
9383 // of text would be drawn. @x_origin and @y_origin are the same position
9384 // you would pass to gdk_draw_layout_line(). @index_ranges should contain
9385 // ranges of bytes in the layout's text.
9386 // Note that the regions returned correspond to logical extents of the text
9387 // ranges, not ink extents. So the drawn layout may in fact touch areas out of
9388 // the clip region. The clip region is mainly useful for highlightling parts
9389 // of text, such as when text is selected.
9390 // RETURNS: a clip region containing the given ranges
9391 // <layout>: a #PangoLayout
9392 // <x_origin>: X pixel where you intend to draw the layout with this clip
9393 // <y_origin>: Y pixel where you intend to draw the layout with this clip
9394 // <index_ranges>: array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
9395 // <n_ranges>: number of ranges in @index_ranges, i.e. half the size of @index_ranges
9396 static Region* pango_layout_get_clip_region()(Pango.Layout* layout, int x_origin, int y_origin, int* index_ranges, int n_ranges) {
9397 return gdk_pango_layout_get_clip_region(layout, x_origin, y_origin, index_ranges, n_ranges);
9401 // Unintrospectable function: pango_layout_line_get_clip_region() / gdk_pango_layout_line_get_clip_region()
9402 // Obtains a clip region which contains the areas where the given
9403 // ranges of text would be drawn. @x_origin and @y_origin are the same
9404 // position you would pass to gdk_draw_layout_line(). @index_ranges
9405 // should contain ranges of bytes in the layout's text. The clip
9406 // region will include space to the left or right of the line (to the
9407 // layout bounding box) if you have indexes above or below the indexes
9408 // contained inside the line. This is to draw the selection all the way
9409 // to the side of the layout. However, the clip region is in line coordinates,
9410 // not layout coordinates.
9411 // Note that the regions returned correspond to logical extents of the text
9412 // ranges, not ink extents. So the drawn line may in fact touch areas out of
9413 // the clip region. The clip region is mainly useful for highlightling parts
9414 // of text, such as when text is selected.
9415 // RETURNS: a clip region containing the given ranges
9416 // <line>: a #PangoLayoutLine
9417 // <x_origin>: X pixel where you intend to draw the layout line with this clip
9418 // <y_origin>: baseline pixel where you intend to draw the layout line with this clip
9419 // <index_ranges>: array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
9420 // <n_ranges>: number of ranges in @index_ranges, i.e. half the size of @index_ranges
9421 static Region* pango_layout_line_get_clip_region()(Pango.LayoutLine* line, int x_origin, int y_origin, int* index_ranges, int n_ranges) {
9422 return gdk_pango_layout_line_get_clip_region(line, x_origin, y_origin, index_ranges, n_ranges);
9426 // VERSION: 2.2
9427 // Parse command line arguments, and store for future
9428 // use by calls to gdk_display_open().
9429 // Any arguments used by GDK are removed from the array and @argc and @argv are
9430 // updated accordingly.
9431 // You shouldn't call this function explicitely if you are using
9432 // gtk_init(), gtk_init_check(), gdk_init(), or gdk_init_check().
9433 // <argc>: the number of command line arguments.
9434 // <argv>: the array of command line arguments.
9435 static void parse_args()(/*inout*/ int* argc, /*inout*/ char*** argv) {
9436 gdk_parse_args(argc, argv);
9440 // Unintrospectable function: pixbuf_get_from_drawable() / gdk_pixbuf_get_from_drawable()
9441 // Transfers image data from a #GdkDrawable and converts it to an RGB(A)
9442 // representation inside a #GdkPixbuf. In other words, copies
9443 // image data from a server-side drawable to a client-side RGB(A) buffer.
9444 // This allows you to efficiently read individual pixels on the client side.
9445 // If the drawable @src has no colormap (gdk_drawable_get_colormap()
9446 // returns %NULL), then a suitable colormap must be specified.
9447 // Typically a #GdkWindow or a pixmap created by passing a #GdkWindow
9448 // to gdk_pixmap_new() will already have a colormap associated with
9449 // it. If the drawable has a colormap, the @cmap argument will be
9450 // ignored. If the drawable is a bitmap (1 bit per pixel pixmap),
9451 // then a colormap is not required; pixels with a value of 1 are
9452 // assumed to be white, and pixels with a value of 0 are assumed to be
9453 // black. For taking screenshots, gdk_colormap_get_system() returns
9454 // the correct colormap to use.
9455 // If the specified destination pixbuf @dest is %NULL, then this
9456 // function will create an RGB pixbuf with 8 bits per channel and no
9457 // alpha, with the same size specified by the @width and @height
9458 // arguments. In this case, the @dest_x and @dest_y arguments must be
9459 // specified as 0. If the specified destination pixbuf is not %NULL
9460 // and it contains alpha information, then the filled pixels will be
9461 // set to full opacity (alpha = 255).
9462 // If the specified drawable is a pixmap, then the requested source
9463 // rectangle must be completely contained within the pixmap, otherwise
9464 // the function will return %NULL. For pixmaps only (not for windows)
9465 // passing -1 for width or height is allowed to mean the full width
9466 // or height of the pixmap.
9467 // If the specified drawable is a window, and the window is off the
9468 // screen, then there is no image data in the obscured/offscreen
9469 // regions to be placed in the pixbuf. The contents of portions of the
9470 // pixbuf corresponding to the offscreen region are undefined.
9471 // If the window you're obtaining data from is partially obscured by
9472 // other windows, then the contents of the pixbuf areas corresponding
9473 // to the obscured regions are undefined.
9474 // If the target drawable is not mapped (typically because it's
9475 // iconified/minimized or not on the current workspace), then %NULL
9476 // will be returned.
9477 // If memory can't be allocated for the return value, %NULL will be returned
9478 // instead.
9479 // (In short, there are several ways this function can fail, and if it fails
9480 // it returns %NULL; so check the return value.)
9481 // This function calls gdk_drawable_get_image() internally and
9482 // converts the resulting image to a #GdkPixbuf, so the
9483 // documentation for gdk_drawable_get_image() may also be relevant.
9484 // pixbuf with a reference count of 1 if no destination pixbuf was specified, or %NULL on error
9485 // RETURNS: The same pixbuf as @dest if it was non-%NULL, or a newly-created
9486 // <dest>: Destination pixbuf, or %NULL if a new pixbuf should be created.
9487 // <src>: Source drawable.
9488 // <cmap>: A colormap if @src doesn't have one set.
9489 // <src_x>: Source X coordinate within drawable.
9490 // <src_y>: Source Y coordinate within drawable.
9491 // <dest_x>: Destination X coordinate in pixbuf, or 0 if @dest is NULL.
9492 // <dest_y>: Destination Y coordinate in pixbuf, or 0 if @dest is NULL.
9493 // <width>: Width in pixels of region to get.
9494 // <height>: Height in pixels of region to get.
9495 static GdkPixbuf2.Pixbuf* pixbuf_get_from_drawable()(GdkPixbuf2.Pixbuf* dest, Drawable* src, Colormap* cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
9496 return gdk_pixbuf_get_from_drawable(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height);
9500 // Unintrospectable function: pixbuf_get_from_image() / gdk_pixbuf_get_from_image()
9501 // Same as gdk_pixbuf_get_from_drawable() but gets the pixbuf from
9502 // an image.
9503 // RETURNS: @dest, newly-created pixbuf if @dest was %NULL, %NULL on error
9504 // <dest>: Destination pixbuf, or %NULL if a new pixbuf should be created.
9505 // <src>: Source #GdkImage.
9506 // <cmap>: A colormap, or %NULL to use the one for @src
9507 // <src_x>: Source X coordinate within drawable.
9508 // <src_y>: Source Y coordinate within drawable.
9509 // <dest_x>: Destination X coordinate in pixbuf, or 0 if @dest is NULL.
9510 // <dest_y>: Destination Y coordinate in pixbuf, or 0 if @dest is NULL.
9511 // <width>: Width in pixels of region to get.
9512 // <height>: Height in pixels of region to get.
9513 static GdkPixbuf2.Pixbuf* pixbuf_get_from_image()(GdkPixbuf2.Pixbuf* dest, Image* src, Colormap* cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
9514 return gdk_pixbuf_get_from_image(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height);
9518 // Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
9519 // and @mask_return arguments, respectively, and renders a pixbuf and its
9520 // corresponding thresholded alpha mask to them. This is merely a convenience
9521 // function; applications that need to render pixbufs with dither offsets or to
9522 // given drawables should use gdk_draw_pixbuf() and gdk_pixbuf_render_threshold_alpha().
9523 // The pixmap that is created is created for the colormap returned
9524 // by gdk_rgb_get_colormap(). You normally will want to instead use
9525 // the actual colormap for a widget, and use
9526 // gdk_pixbuf_render_pixmap_and_mask_for_colormap().
9527 // If the pixbuf does not have an alpha channel, then *@mask_return will be set
9528 // to %NULL.
9529 // <pixbuf>: A pixbuf.
9530 // <pixmap_return>: Location to store a pointer to the created pixmap, or %NULL if the pixmap is not needed.
9531 // <mask_return>: Location to store a pointer to the created mask, or %NULL if the mask is not needed.
9532 // <alpha_threshold>: Threshold value for opacity values.
9533 static void pixbuf_render_pixmap_and_mask()(GdkPixbuf2.Pixbuf* pixbuf, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) {
9534 gdk_pixbuf_render_pixmap_and_mask(pixbuf, pixmap_return, mask_return, alpha_threshold);
9538 // Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
9539 // and @mask_return arguments, respectively, and renders a pixbuf and its
9540 // corresponding tresholded alpha mask to them. This is merely a convenience
9541 // function; applications that need to render pixbufs with dither offsets or to
9542 // given drawables should use gdk_draw_pixbuf(), and gdk_pixbuf_render_threshold_alpha().
9543 // The pixmap that is created uses the #GdkColormap specified by @colormap.
9544 // This colormap must match the colormap of the window where the pixmap
9545 // will eventually be used or an error will result.
9546 // If the pixbuf does not have an alpha channel, then *@mask_return will be set
9547 // to %NULL.
9548 // <pixbuf>: A pixbuf.
9549 // <colormap>: A #GdkColormap
9550 // <pixmap_return>: Location to store a pointer to the created pixmap, or %NULL if the pixmap is not needed.
9551 // <mask_return>: Location to store a pointer to the created mask, or %NULL if the mask is not needed.
9552 // <alpha_threshold>: Threshold value for opacity values.
9553 static void pixbuf_render_pixmap_and_mask_for_colormap()(GdkPixbuf2.Pixbuf* pixbuf, Colormap* colormap, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) {
9554 gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, colormap, pixmap_return, mask_return, alpha_threshold);
9558 // Takes the opacity values in a rectangular portion of a pixbuf and thresholds
9559 // them to produce a bi-level alpha mask that can be used as a clipping mask for
9560 // a drawable.
9561 // <pixbuf>: A pixbuf.
9562 // <bitmap>: Bitmap where the bilevel mask will be painted to.
9563 // <src_x>: Source X coordinate.
9564 // <src_y>: source Y coordinate.
9565 // <dest_x>: Destination X coordinate.
9566 // <dest_y>: Destination Y coordinate.
9567 // <width>: Width of region to threshold, or -1 to use pixbuf width
9568 // <height>: Height of region to threshold, or -1 to use pixbuf height
9569 // <alpha_threshold>: Opacity values below this will be painted as zero; all other values will be painted as one.
9570 static void pixbuf_render_threshold_alpha()(GdkPixbuf2.Pixbuf* pixbuf, Bitmap* bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold) {
9571 gdk_pixbuf_render_threshold_alpha(pixbuf, bitmap, src_x, src_y, dest_x, dest_y, width, height, alpha_threshold);
9575 // DEPRECATED (v2.4) function: pixbuf_render_to_drawable - This function is obsolete. Use gdk_draw_pixbuf() instead.
9576 // Renders a rectangular portion of a pixbuf to a drawable while using the
9577 // specified GC. This is done using GdkRGB, so the specified drawable must have
9578 // the GdkRGB visual and colormap. Note that this function will ignore the
9579 // opacity information for images with an alpha channel; the GC must already
9580 // have the clipping mask set if you want transparent regions to show through.
9581 // For an explanation of dither offsets, see the GdkRGB documentation. In
9582 // brief, the dither offset is important when re-rendering partial regions of an
9583 // image to a rendered version of the full image, or for when the offsets to a
9584 // base position change, as in scrolling. The dither matrix has to be shifted
9585 // for consistent visual results. If you do not have any of these cases, the
9586 // dither offsets can be both zero.
9587 // <pixbuf>: A pixbuf.
9588 // <drawable>: Destination drawable.
9589 // <gc>: GC used for rendering.
9590 // <src_x>: Source X coordinate within pixbuf.
9591 // <src_y>: Source Y coordinate within pixbuf.
9592 // <dest_x>: Destination X coordinate within drawable.
9593 // <dest_y>: Destination Y coordinate within drawable.
9594 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width
9595 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height
9596 // <dither>: Dithering mode for GdkRGB.
9597 // <x_dither>: X offset for dither.
9598 // <y_dither>: Y offset for dither.
9599 static void pixbuf_render_to_drawable()(GdkPixbuf2.Pixbuf* pixbuf, Drawable* drawable, GC* gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither) {
9600 gdk_pixbuf_render_to_drawable(pixbuf, drawable, gc, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither);
9604 // DEPRECATED (v2.4) function: pixbuf_render_to_drawable_alpha - This function is obsolete. Use gdk_draw_pixbuf() instead.
9605 // Renders a rectangular portion of a pixbuf to a drawable. The destination
9606 // drawable must have a colormap. All windows have a colormap, however, pixmaps
9607 // only have colormap by default if they were created with a non-%NULL window argument.
9608 // Otherwise a colormap must be set on them with gdk_drawable_set_colormap.
9609 // On older X servers, rendering pixbufs with an alpha channel involves round trips
9610 // to the X server, and may be somewhat slow.
9611 // <pixbuf>: A pixbuf.
9612 // <drawable>: Destination drawable.
9613 // <src_x>: Source X coordinate within pixbuf.
9614 // <src_y>: Source Y coordinates within pixbuf.
9615 // <dest_x>: Destination X coordinate within drawable.
9616 // <dest_y>: Destination Y coordinate within drawable.
9617 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width.
9618 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height.
9619 // <alpha_mode>: Ignored. Present for backwards compatibility.
9620 // <alpha_threshold>: Ignored. Present for backwards compatibility
9621 // <dither>: Dithering mode for GdkRGB.
9622 // <x_dither>: X offset for dither.
9623 // <y_dither>: Y offset for dither.
9624 static void pixbuf_render_to_drawable_alpha()(GdkPixbuf2.Pixbuf* pixbuf, Drawable* drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, GdkPixbuf2.PixbufAlphaMode alpha_mode, int alpha_threshold, RgbDither dither, int x_dither, int y_dither) {
9625 gdk_pixbuf_render_to_drawable_alpha(pixbuf, drawable, src_x, src_y, dest_x, dest_y, width, height, alpha_mode, alpha_threshold, dither, x_dither, y_dither);
9628 static GrabStatus pointer_grab()(Window* window, int owner_events, EventMask event_mask, Window* confine_to, Cursor* cursor, uint time_) {
9629 return gdk_pointer_grab(window, owner_events, event_mask, confine_to, cursor, time_);
9633 // Determines information about the current pointer grab.
9634 // This is not public API and must not be used by applications.
9635 // pointer grabbed.
9636 // RETURNS: %TRUE if this application currently has the
9637 // <display>: the #GdkDisplay for which to get the grab information
9638 // <grab_window>: location to store current grab window
9639 // <owner_events>: location to store boolean indicating whether the @owner_events flag to gdk_pointer_grab() was %TRUE.
9640 static int pointer_grab_info_libgtk_only()(Display* display, Window** grab_window, int* owner_events) {
9641 return gdk_pointer_grab_info_libgtk_only(display, grab_window, owner_events);
9645 // Returns %TRUE if the pointer on the default display is currently
9646 // grabbed by this application.
9647 // Note that this does not take the inmplicit pointer grab on button
9648 // presses into account.
9649 // RETURNS: %TRUE if the pointer is currently grabbed by this application.*
9650 static int pointer_is_grabbed()() {
9651 return gdk_pointer_is_grabbed();
9655 // Ungrabs the pointer on the default display, if it is grabbed by this
9656 // application.
9657 // <time_>: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is available.
9658 static void pointer_ungrab()(uint time_) {
9659 gdk_pointer_ungrab(time_);
9662 static void pre_parse_libgtk_only()() {
9663 gdk_pre_parse_libgtk_only();
9666 static void property_change()(Window* window, Atom property, Atom type, int format, PropMode mode, ubyte* data, int nelements) {
9667 gdk_property_change(window, property, type, format, mode, data, nelements);
9670 static void property_delete()(Window* window, Atom property) {
9671 gdk_property_delete(window, property);
9674 static int property_get()(Window* window, Atom property, Atom type, c_ulong offset, c_ulong length, int pdelete, Atom* actual_property_type, int* actual_format, int* actual_length, ubyte** data) {
9675 return gdk_property_get(window, property, type, offset, length, pdelete, actual_property_type, actual_format, actual_length, data);
9679 // This function returns the available bit depths for the default
9680 // screen. It's equivalent to listing the visuals
9681 // (gdk_list_visuals()) and then looking at the depth field in each
9682 // visual, removing duplicates.
9683 // The array returned by this function should not be freed.
9684 // <depths>: return location for available depths
9685 // <count>: return location for number of available depths
9686 static void query_depths()(/*out*/ int** depths, /*out*/ int* count) {
9687 gdk_query_depths(depths, count);
9691 // This function returns the available visual types for the default
9692 // screen. It's equivalent to listing the visuals
9693 // (gdk_list_visuals()) and then looking at the type field in each
9694 // visual, removing duplicates.
9695 // The array returned by this function should not be freed.
9696 // <visual_types>: return location for the available visual types
9697 // <count>: return location for the number of available visual types
9698 static void query_visual_types()(VisualType** visual_types, int* count) {
9699 gdk_query_visual_types(visual_types, count);
9703 // Unintrospectable function: region_new() / gdk_region_new()
9704 // Creates a new empty #GdkRegion.
9705 // RETURNS: a new empty #GdkRegion
9706 static Region* region_new()() {
9707 return gdk_region_new();
9711 // Unintrospectable function: region_polygon() / gdk_region_polygon()
9712 // DEPRECATED (v2.22) function: region_polygon - There is no replacement. For working with paths, please
9713 // Creates a new #GdkRegion using the polygon defined by a
9714 // number of points.
9715 // use Cairo.
9716 // RETURNS: a new #GdkRegion based on the given polygon
9717 // <points>: an array of #GdkPoint structs
9718 // <n_points>: the number of elements in the @points array
9719 // <fill_rule>: specifies which pixels are included in the region when the polygon overlaps itself.
9720 static Region* region_polygon()(Point* points, int n_points, FillRule fill_rule) {
9721 return gdk_region_polygon(points, n_points, fill_rule);
9725 // Unintrospectable function: region_rectangle() / gdk_region_rectangle()
9726 // Creates a new region containing the area @rectangle.
9727 // RETURNS: a new region
9728 // <rectangle>: a #GdkRectangle
9729 static Region* region_rectangle()(Rectangle* rectangle) {
9730 return gdk_region_rectangle(rectangle);
9733 // Unintrospectable function: rgb_cmap_new() / gdk_rgb_cmap_new()
9734 static RgbCmap* rgb_cmap_new()(uint* colors, int n_colors) {
9735 return gdk_rgb_cmap_new(colors, n_colors);
9738 static int rgb_colormap_ditherable()(Colormap* cmap) {
9739 return gdk_rgb_colormap_ditherable(cmap);
9742 static int rgb_ditherable()() {
9743 return gdk_rgb_ditherable();
9747 // DEPRECATED (v2.22) function: rgb_find_color - Cairo handles colors automatically.
9748 // drawable you're using to draw. If you're drawing to a #GtkWidget,
9749 // call gtk_widget_get_colormap().
9750 // gdk_rgb_find_color() will fill in the %pixel field with the best
9751 // matching pixel from a color cube. The color is then ready to be
9752 // used for drawing, e.g. you can call gdk_gc_set_foreground() which
9753 // expects %pixel to be initialized.
9754 // In many cases, you can avoid this whole issue by calling
9755 // gdk_gc_set_rgb_fg_color() or gdk_gc_set_rgb_bg_color(), which
9756 // do not expect %pixel to be initialized in advance. If you use those
9757 // functions, there's no need for gdk_rgb_find_color().
9758 // <colormap>: a #GdkColormap
9759 // <color>: a #GdkColor
9760 static void rgb_find_color()(Colormap* colormap, Color* color) {
9761 gdk_rgb_find_color(colormap, color);
9764 static void rgb_gc_set_background()(GC* gc, uint rgb) {
9765 gdk_rgb_gc_set_background(gc, rgb);
9768 static void rgb_gc_set_foreground()(GC* gc, uint rgb) {
9769 gdk_rgb_gc_set_foreground(gc, rgb);
9773 // DEPRECATED (v2.22) function: rgb_get_colormap - Use gdk_screen_get_system_colormap (gdk_screen_get_default ()) instead.
9774 // Get the preferred colormap for rendering image data. Not a
9775 // very useful function; historically, GDK could only render RGB image
9776 // data to one colormap and visual, but in the current version it can
9777 // render to any colormap and visual. So there's no need to call this
9778 // function.
9779 // RETURNS: the preferred colormap
9780 static Colormap* rgb_get_colormap()() {
9781 return gdk_rgb_get_colormap();
9785 // DEPRECATED (v2.22) function: rgb_get_visual - Use gdk_visual_get_system_visual (gdk_screen_get_default ()) instead.
9786 // Gets a "preferred visual" chosen by GdkRGB for rendering image data
9787 // on the default screen. In previous versions of GDK, this was the
9788 // only visual GdkRGB could use for rendering. In current versions,
9789 // it's simply the visual GdkRGB would have chosen as the optimal one
9790 // in those previous versions. GdkRGB can now render to drawables with
9791 // any visual.
9792 // RETURNS: The #GdkVisual chosen by GdkRGB.
9793 static Visual* rgb_get_visual()() {
9794 return gdk_rgb_get_visual();
9797 static void rgb_init()() {
9798 gdk_rgb_init();
9801 static void rgb_set_install()(int install) {
9802 gdk_rgb_set_install(install);
9805 static void rgb_set_min_colors()(int min_colors) {
9806 gdk_rgb_set_min_colors(min_colors);
9809 static void rgb_set_verbose()(int verbose) {
9810 gdk_rgb_set_verbose(verbose);
9813 static c_ulong rgb_xpixel_from_rgb()(uint rgb) {
9814 return gdk_rgb_xpixel_from_rgb(rgb);
9817 static void selection_convert()(Window* requestor, Atom selection, Atom target, uint time_) {
9818 gdk_selection_convert(requestor, selection, target, time_);
9821 // Unintrospectable function: selection_owner_get() / gdk_selection_owner_get()
9822 static Window* selection_owner_get()(Atom selection) {
9823 return gdk_selection_owner_get(selection);
9827 // Unintrospectable function: selection_owner_get_for_display() / gdk_selection_owner_get_for_display()
9828 // VERSION: 2.2
9829 // Determine the owner of the given selection.
9830 // Note that the return value may be owned by a different
9831 // process if a foreign window was previously created for that
9832 // window, but a new foreign window will never be created by this call.
9833 // window known to the current process, the #GdkWindow that owns the
9834 // selection, otherwise %NULL.
9835 // RETURNS: if there is a selection owner for this window, and it is a
9836 // <display>: a #GdkDisplay.
9837 // <selection>: an atom indentifying a selection.
9838 static Window* selection_owner_get_for_display()(Display* display, Atom selection) {
9839 return gdk_selection_owner_get_for_display(display, selection);
9842 static int selection_owner_set()(Window* owner, Atom selection, uint time_, int send_event) {
9843 return gdk_selection_owner_set(owner, selection, time_, send_event);
9847 // VERSION: 2.2
9848 // Sets the #GdkWindow @owner as the current owner of the selection @selection.
9849 // otherwise %FALSE.
9850 // RETURNS: %TRUE if the selection owner was successfully changed to owner,
9851 // <display>: the #GdkDisplay.
9852 // <owner>: a #GdkWindow or %NULL to indicate that the owner for the given should be unset.
9853 // <selection>: an atom identifying a selection.
9854 // <time_>: timestamp to use when setting the selection. If this is older than the timestamp given last time the owner was set for the given selection, the request will be ignored.
9855 // <send_event>: if %TRUE, and the new owner is different from the current owner, the current owner will be sent a SelectionClear event.
9856 static int selection_owner_set_for_display()(Display* display, Window* owner, Atom selection, uint time_, int send_event) {
9857 return gdk_selection_owner_set_for_display(display, owner, selection, time_, send_event);
9861 // Retrieves selection data that was stored by the selection
9862 // data in response to a call to gdk_selection_convert(). This function
9863 // will not be used by applications, who should use the #GtkClipboard
9864 // API instead.
9865 // RETURNS: the length of the retrieved data.
9866 // <requestor>: the window on which the data is stored
9867 // <data>: location to store a pointer to the retrieved data.
9868 // <prop_type>: location to store the type of the property.
9869 // <prop_format>: location to store the format of the property.
9870 static int selection_property_get()(Window* requestor, ubyte** data, Atom* prop_type, int* prop_format) {
9871 return gdk_selection_property_get(requestor, data, prop_type, prop_format);
9874 static void selection_send_notify()(NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) {
9875 gdk_selection_send_notify(requestor, selection, target, property, time_);
9879 // VERSION: 2.2
9880 // Send a response to SelectionRequest event.
9881 // <display>: the #GdkDisplay where @requestor is realized
9882 // <requestor>: window to which to deliver response.
9883 // <selection>: selection that was requested.
9884 // <target>: target that was selected.
9885 // <property>: property in which the selection owner stored the data, or %GDK_NONE to indicate that the request was rejected.
9886 // <time_>: timestamp.
9887 static void selection_send_notify_for_display()(Display* display, NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) {
9888 gdk_selection_send_notify_for_display(display, requestor, selection, target, property, time_);
9892 // Set the double click time for the default display. See
9893 // gdk_display_set_double_click_time().
9894 // See also gdk_display_set_double_click_distance().
9895 // Applications should <emphasis>not</emphasis> set this, it is a
9896 // global user-configured setting.
9897 // <msec>: double click time in milliseconds (thousandths of a second)
9898 static void set_double_click_time()(uint msec) {
9899 gdk_set_double_click_time(msec);
9902 static char* /*new*/ set_locale()() {
9903 return gdk_set_locale();
9907 // Unintrospectable function: set_pointer_hooks() / gdk_set_pointer_hooks()
9908 // DEPRECATED (v2.24) function: set_pointer_hooks - This function will go away in GTK 3 for lack of use cases.
9909 // This function allows for hooking into the operation
9910 // of getting the current location of the pointer. This
9911 // is only useful for such low-level tools as an
9912 // event recorder. Applications should never have any
9913 // reason to use this facility.
9914 // This function is not multihead safe. For multihead operation,
9915 // see gdk_display_set_pointer_hooks().
9916 // RETURNS: the previous pointer hook table
9917 // <new_hooks>: a table of pointers to functions for getting quantities related to the current pointer position, or %NULL to restore the default table.
9918 static PointerHooks* set_pointer_hooks()(PointerHooks* new_hooks) {
9919 return gdk_set_pointer_hooks(new_hooks);
9922 static void set_program_class()(char* program_class) {
9923 gdk_set_program_class(program_class);
9927 // Sets whether a trace of received events is output.
9928 // Note that GTK+ must be compiled with debugging (that is,
9929 // configured using the <option>--enable-debug</option> option)
9930 // to use this option.
9931 // <show_events>: %TRUE to output event debugging information.
9932 static void set_show_events()(int show_events) {
9933 gdk_set_show_events(show_events);
9937 // Sets the <literal>SM_CLIENT_ID</literal> property on the application's leader window so that
9938 // the window manager can save the application's state using the X11R6 ICCCM
9939 // session management protocol.
9940 // See the X Session Management Library documentation for more information on
9941 // session management and the Inter-Client Communication Conventions Manual
9942 // (ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
9943 // (Both documents are part of the X Window System distribution.)
9944 // <sm_client_id>: the client id assigned by the session manager when the connection was opened, or %NULL to remove the property.
9945 static void set_sm_client_id()(char* sm_client_id) {
9946 gdk_set_sm_client_id(sm_client_id);
9949 static void set_use_xshm()(int use_xshm) {
9950 gdk_set_use_xshm(use_xshm);
9954 // Obtains a desktop-wide setting, such as the double-click time,
9955 // for the default screen. See gdk_screen_get_setting().
9956 // in @value, %FALSE otherwise.
9957 // RETURNS: %TRUE if the setting existed and a value was stored
9958 // <name>: the name of the setting.
9959 // <value>: location to store the value of the setting.
9960 static int setting_get()(char* name, GObject2.Value* value) {
9961 return gdk_setting_get(name, value);
9965 // VERSION: 2.4
9966 // DEPRECATED (v2.24) function: spawn_command_line_on_screen - This function is being removed in 3.0. Use
9967 // Like g_spawn_command_line_async(), except the child process is
9968 // spawned in such an environment that on calling gdk_display_open()
9969 // it would be returned a #GdkDisplay with @screen as the default
9970 // screen.
9971 // This is useful for applications which wish to launch an application
9972 // on a specific screen.
9973 // either g_spawn_command_line_sync(), g_spawn_command_line_async() or
9974 // #GdkAppLaunchContext instead.
9975 // RETURNS: %TRUE on success, %FALSE if error is set.
9976 // <screen>: a #GdkScreen
9977 // <command_line>: a command line
9978 static int spawn_command_line_on_screen()(Screen* screen, char* command_line, GLib2.Error** error=null) {
9979 return gdk_spawn_command_line_on_screen(screen, command_line, error);
9983 // Unintrospectable function: spawn_on_screen() / gdk_spawn_on_screen()
9984 // VERSION: 2.4
9985 // DEPRECATED (v2.24) function: spawn_on_screen - This function is being removed in 3.0. Use
9986 // Like g_spawn_async(), except the child process is spawned in such
9987 // an environment that on calling gdk_display_open() it would be
9988 // returned a #GdkDisplay with @screen as the default screen.
9989 // This is useful for applications which wish to launch an application
9990 // on a specific screen.
9991 // either g_spawn_sync(), g_spawn_async(), or #GdkAppLaunchContext instead.
9992 // RETURNS: %TRUE on success, %FALSE if error is set
9993 // <screen>: a #GdkScreen
9994 // <working_directory>: child's current working directory, or %NULL to inherit parent's
9995 // <argv>: child's argument vector
9996 // <envp>: child's environment, or %NULL to inherit parent's
9997 // <flags>: flags from #GSpawnFlags
9998 // <child_setup>: function to run in the child just before exec()
9999 // <user_data>: user data for @child_setup
10000 // <child_pid>: return location for child process ID, or %NULL
10001 static int spawn_on_screen()(Screen* screen, char* working_directory, char** argv, char** envp, GLib2.SpawnFlags flags, GLib2.SpawnChildSetupFunc child_setup, void* user_data, int* child_pid, GLib2.Error** error=null) {
10002 return gdk_spawn_on_screen(screen, working_directory, argv, envp, flags, child_setup, user_data, child_pid, error);
10006 // Unintrospectable function: spawn_on_screen_with_pipes() / gdk_spawn_on_screen_with_pipes()
10007 // VERSION: 2.4
10008 // DEPRECATED (v2.24) function: spawn_on_screen_with_pipes - This function is being removed in 3.0. Use
10009 // Like g_spawn_async_with_pipes(), except the child process is
10010 // spawned in such an environment that on calling gdk_display_open()
10011 // it would be returned a #GdkDisplay with @screen as the default
10012 // screen.
10013 // This is useful for applications which wish to launch an application
10014 // on a specific screen.
10015 // either g_spawn_async_with_pipes() or #GdkAppLaunchContext instead.
10016 // RETURNS: %TRUE on success, %FALSE if an error was set
10017 // <screen>: a #GdkScreen
10018 // <working_directory>: child's current working directory, or %NULL to inherit parent's
10019 // <argv>: child's argument vector
10020 // <envp>: child's environment, or %NULL to inherit parent's
10021 // <flags>: flags from #GSpawnFlags
10022 // <child_setup>: function to run in the child just before exec()
10023 // <user_data>: user data for @child_setup
10024 // <child_pid>: return location for child process ID, or %NULL
10025 // <standard_input>: return location for file descriptor to write to child's stdin, or %NULL
10026 // <standard_output>: return location for file descriptor to read child's stdout, or %NULL
10027 // <standard_error>: return location for file descriptor to read child's stderr, or %NULL
10028 static int spawn_on_screen_with_pipes()(Screen* screen, char* working_directory, char** argv, char** envp, GLib2.SpawnFlags flags, GLib2.SpawnChildSetupFunc child_setup, void* user_data, int* child_pid, int* standard_input, int* standard_output, int* standard_error, GLib2.Error** error=null) {
10029 return gdk_spawn_on_screen_with_pipes(screen, working_directory, argv, envp, flags, child_setup, user_data, child_pid, standard_input, standard_output, standard_error, error);
10033 // Gets the metrics of a nul-terminated string.
10034 // <font>: a #GdkFont.
10035 // <string>: the nul-terminated string to measure.
10036 // <lbearing>: the left bearing of the string.
10037 // <rbearing>: the right bearing of the string.
10038 // <width>: the width of the string.
10039 // <ascent>: the ascent of the string.
10040 // <descent>: the descent of the string.
10041 static void string_extents()(Font* font, char* string_, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) {
10042 gdk_string_extents(font, string_, lbearing, rbearing, width, ascent, descent);
10046 // Determines the total height of a given nul-terminated
10047 // string. This value is not generally useful, because you
10048 // cannot determine how this total height will be drawn in
10049 // relation to the baseline. See gdk_string_extents().
10050 // RETURNS: the height of the string in pixels.
10051 // <font>: a #GdkFont
10052 // <string>: the nul-terminated string to measure.
10053 static int string_height()(Font* font, char* string_) {
10054 return gdk_string_height(font, string_);
10058 // Determines the distance from the origin to the rightmost
10059 // portion of a nul-terminated string when drawn. This is not the
10060 // correct value for determining the origin of the next
10061 // portion when drawing text in multiple pieces.
10062 // See gdk_string_width().
10063 // RETURNS: the right bearing of the string in pixels.
10064 // <font>: a #GdkFont
10065 // <string>: the nul-terminated string to measure.
10066 static int string_measure()(Font* font, char* string_) {
10067 return gdk_string_measure(font, string_);
10070 static int string_to_compound_text()(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
10071 return gdk_string_to_compound_text(str, encoding, format, ctext, length);
10075 // VERSION: 2.2
10076 // Convert a string from the encoding of the current
10077 // locale into a form suitable for storing in a window property.
10078 // RETURNS: 0 upon success, non-zero upon failure.
10079 // <display>: the #GdkDisplay where the encoding is defined.
10080 // <str>: a nul-terminated string.
10081 // <encoding>: location to store the encoding atom (to be used as the type for the property).
10082 // <format>: location to store the format of the property
10083 // <ctext>: location to store newly allocated data for the property.
10084 // <length>: the length of @text, in bytes
10085 static int string_to_compound_text_for_display()(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
10086 return gdk_string_to_compound_text_for_display(display, str, encoding, format, ctext, length);
10090 // Determines the width of a nul-terminated string.
10091 // (The distance from the origin of the string to the
10092 // point where the next string in a sequence of strings
10093 // should be drawn)
10094 // RETURNS: the width of the string in pixels.
10095 // <font>: a #GdkFont
10096 // <string>: the nul-terminated string to measure
10097 static int string_width()(Font* font, char* string_) {
10098 return gdk_string_width(font, string_);
10101 static void synthesize_window_state()(Window* window, WindowState unset_flags, WindowState set_flags) {
10102 gdk_synthesize_window_state(window, unset_flags, set_flags);
10106 // VERSION: 2.14
10107 // This function retrieves a pixel from @window to force the windowing
10108 // system to carry out any pending rendering commands.
10109 // This function is intended to be used to syncronize with rendering
10110 // pipelines, to benchmark windowing system rendering operations.
10111 // <window>: a mapped #GdkWindow
10112 static void test_render_sync()(Window* window) {
10113 gdk_test_render_sync(window);
10117 // VERSION: 2.14
10118 // This function is intended to be used in GTK+ test programs.
10119 // It will warp the mouse pointer to the given (@x,@y) corrdinates
10120 // within @window and simulate a button press or release event.
10121 // Because the mouse pointer needs to be warped to the target
10122 // location, use of this function outside of test programs that
10123 // run in their own virtual windowing system (e.g. Xvfb) is not
10124 // recommended.
10125 // Also, gtk_test_simulate_button() is a fairly low level function,
10126 // for most testing purposes, gtk_test_widget_click() is the right
10127 // function to call which will generate a button press event followed
10128 // by its accompanying button release event.
10129 // were carried out successfully.
10130 // RETURNS: whether all actions neccessary for a button event simulation
10131 // <window>: a #GdkWindow to simulate a button event for.
10132 // <x>: x coordinate within @window for the button event.
10133 // <y>: y coordinate within @window for the button event.
10134 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
10135 // <modifiers>: Keyboard modifiers the event is setup with.
10136 // <button_pressrelease>: either %GDK_BUTTON_PRESS or %GDK_BUTTON_RELEASE
10137 static int test_simulate_button()(Window* window, int x, int y, uint button, ModifierType modifiers, EventType button_pressrelease) {
10138 return gdk_test_simulate_button(window, x, y, button, modifiers, button_pressrelease);
10142 // VERSION: 2.14
10143 // This function is intended to be used in GTK+ test programs.
10144 // If (@x,@y) are > (-1,-1), it will warp the mouse pointer to
10145 // the given (@x,@y) corrdinates within @window and simulate a
10146 // key press or release event.
10147 // When the mouse pointer is warped to the target location, use
10148 // of this function outside of test programs that run in their
10149 // own virtual windowing system (e.g. Xvfb) is not recommended.
10150 // If (@x,@y) are passed as (-1,-1), the mouse pointer will not
10151 // be warped and @window origin will be used as mouse pointer
10152 // location for the event.
10153 // Also, gtk_test_simulate_key() is a fairly low level function,
10154 // for most testing purposes, gtk_test_widget_send_key() is the
10155 // right function to call which will generate a key press event
10156 // followed by its accompanying key release event.
10157 // were carried out successfully.
10158 // RETURNS: whether all actions neccessary for a key event simulation
10159 // <window>: a #GdkWindow to simulate a key event for.
10160 // <x>: x coordinate within @window for the key event.
10161 // <y>: y coordinate within @window for the key event.
10162 // <keyval>: A GDK keyboard value.
10163 // <modifiers>: Keyboard modifiers the event is setup with.
10164 // <key_pressrelease>: either %GDK_KEY_PRESS or %GDK_KEY_RELEASE
10165 static int test_simulate_key()(Window* window, int x, int y, uint keyval, ModifierType modifiers, EventType key_pressrelease) {
10166 return gdk_test_simulate_key(window, x, y, keyval, modifiers, key_pressrelease);
10169 static void text_extents()(Font* font, char* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) {
10170 gdk_text_extents(font, text, text_length, lbearing, rbearing, width, ascent, descent);
10173 static void text_extents_wc()(Font* font, WChar* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) {
10174 gdk_text_extents_wc(font, text, text_length, lbearing, rbearing, width, ascent, descent);
10178 // Determines the total height of a given string.
10179 // This value is not generally useful, because you cannot
10180 // determine how this total height will be drawn in
10181 // relation to the baseline. See gdk_text_extents().
10182 // RETURNS: the height of the string in pixels.
10183 // <font>: a #GdkFont
10184 // <text>: the text to measure.
10185 // <text_length>: the length of the text in bytes.
10186 static int text_height()(Font* font, char* text, int text_length) {
10187 return gdk_text_height(font, text, text_length);
10191 // Determines the distance from the origin to the rightmost
10192 // portion of a string when drawn. This is not the
10193 // correct value for determining the origin of the next
10194 // portion when drawing text in multiple pieces.
10195 // See gdk_text_width().
10196 // RETURNS: the right bearing of the string in pixels.
10197 // <font>: a #GdkFont
10198 // <text>: the text to measure.
10199 // <text_length>: the length of the text in bytes.
10200 static int text_measure()(Font* font, char* text, int text_length) {
10201 return gdk_text_measure(font, text, text_length);
10204 static int text_property_to_text_list()(Atom encoding, int format, ubyte* text, int length, char*** list) {
10205 return gdk_text_property_to_text_list(encoding, format, text, length, list);
10209 // VERSION: 2.2
10210 // Convert a text string from the encoding as it is stored
10211 // in a property into an array of strings in the encoding of
10212 // the current locale. (The elements of the array represent the
10213 // nul-separated elements of the original text string.)
10214 // if the conversion failed.
10215 // RETURNS: the number of strings stored in list, or 0,
10216 // <display>: The #GdkDisplay where the encoding is defined.
10217 // <encoding>: an atom representing the encoding. The most common values for this are STRING, or COMPOUND_TEXT. This is value used as the type for the property.
10218 // <format>: the format of the property.
10219 // <text>: The text data.
10220 // <length>: The number of items to transform.
10221 // <list>: location to store a terminated array of strings in the encoding of the current locale. This array should be freed using gdk_free_text_list().
10222 static int text_property_to_text_list_for_display()(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) {
10223 return gdk_text_property_to_text_list_for_display(display, encoding, format, text, length, list);
10227 // Convert a text property in the giving encoding to
10228 // a list of UTF-8 strings.
10229 // list.
10230 // RETURNS: the number of strings in the resulting
10231 // <encoding>: an atom representing the encoding of the text
10232 // <format>: the format of the property
10233 // <text>: the text to convert
10234 // <length>: the length of @text, in bytes
10235 // <list>: location to store the list of strings or %NULL. The list should be freed with g_strfreev().
10236 static int text_property_to_utf8_list()(Atom encoding, int format, ubyte* text, int length, char*** list=null) {
10237 return gdk_text_property_to_utf8_list(encoding, format, text, length, list);
10241 // VERSION: 2.2
10242 // Converts a text property in the given encoding to
10243 // a list of UTF-8 strings.
10244 // list.
10245 // RETURNS: the number of strings in the resulting
10246 // <display>: a #GdkDisplay
10247 // <encoding>: an atom representing the encoding of the text
10248 // <format>: the format of the property
10249 // <text>: the text to convert
10250 // <length>: the length of @text, in bytes
10251 // <list>: location to store the list of strings or %NULL. The list should be freed with g_strfreev().
10252 static int text_property_to_utf8_list_for_display()(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) {
10253 return gdk_text_property_to_utf8_list_for_display(display, encoding, format, text, length, list);
10256 static int text_width()(Font* font, char* text, int text_length) {
10257 return gdk_text_width(font, text, text_length);
10260 static int text_width_wc()(Font* font, WChar* text, int text_length) {
10261 return gdk_text_width_wc(font, text, text_length);
10265 // Unintrospectable function: threads_add_idle() / gdk_threads_add_idle()
10266 // VERSION: 2.12
10267 // A wrapper for the common usage of gdk_threads_add_idle_full()
10268 // assigning the default priority, #G_PRIORITY_DEFAULT_IDLE.
10269 // See gdk_threads_add_idle_full().
10270 // RETURNS: the ID (greater than 0) of the event source.
10271 // <function>: function to call
10272 // <data>: data to pass to @function
10273 static uint threads_add_idle()(GLib2.SourceFunc function_, void* data) {
10274 return gdk_threads_add_idle(function_, data);
10278 // VERSION: 2.12
10279 // Adds a function to be called whenever there are no higher priority
10280 // events pending. If the function returns %FALSE it is automatically
10281 // removed from the list of event sources and will not be called again.
10282 // This variant of g_idle_add_full() calls @function with the GDK lock
10283 // held. It can be thought of a MT-safe version for GTK+ widgets for the
10284 // following use case, where you have to worry about idle_callback()
10285 // running in thread A and accessing @self after it has been finalized
10286 // in thread B:
10287 // |[
10288 // static gboolean
10289 // idle_callback (gpointer data)
10290 // {
10291 // /&ast; gdk_threads_enter(); would be needed for g_idle_add() &ast;/
10292 // SomeWidget *self = data;
10293 // /&ast; do stuff with self &ast;/
10294 // self->idle_id = 0;
10295 // /&ast; gdk_threads_leave(); would be needed for g_idle_add() &ast;/
10296 // return FALSE;
10297 // }
10298 // static void
10299 // some_widget_do_stuff_later (SomeWidget *self)
10300 // {
10301 // self->idle_id = gdk_threads_add_idle (idle_callback, self)
10302 // /&ast; using g_idle_add() here would require thread protection in the callback &ast;/
10303 // }
10304 // static void
10305 // some_widget_finalize (GObject *object)
10306 // {
10307 // SomeWidget *self = SOME_WIDGET (object);
10308 // if (self->idle_id)
10309 // g_source_remove (self->idle_id);
10310 // G_OBJECT_CLASS (parent_class)->finalize (object);
10311 // }
10312 // ]|
10313 // RETURNS: the ID (greater than 0) of the event source.
10314 // <priority>: the priority of the idle source. Typically this will be in the range btweeen #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE
10315 // <function>: function to call
10316 // <data>: data to pass to @function
10317 // <notify>: function to call when the idle is removed, or %NULL
10318 static uint threads_add_idle_full()(int priority, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) {
10319 return gdk_threads_add_idle_full(priority, function_, data, notify);
10323 // Unintrospectable function: threads_add_timeout() / gdk_threads_add_timeout()
10324 // VERSION: 2.12
10325 // A wrapper for the common usage of gdk_threads_add_timeout_full()
10326 // assigning the default priority, #G_PRIORITY_DEFAULT.
10327 // See gdk_threads_add_timeout_full().
10328 // RETURNS: the ID (greater than 0) of the event source.
10329 // <interval>: the time between calls to the function, in milliseconds (1/1000ths of a second)
10330 // <function>: function to call
10331 // <data>: data to pass to @function
10332 static uint threads_add_timeout()(uint interval, GLib2.SourceFunc function_, void* data) {
10333 return gdk_threads_add_timeout(interval, function_, data);
10337 // VERSION: 2.12
10338 // Sets a function to be called at regular intervals holding the GDK lock,
10339 // with the given priority. The function is called repeatedly until it
10340 // returns %FALSE, at which point the timeout is automatically destroyed
10341 // and the function will not be called again. The @notify function is
10342 // called when the timeout is destroyed. The first call to the
10343 // function will be at the end of the first @interval.
10344 // Note that timeout functions may be delayed, due to the processing of other
10345 // event sources. Thus they should not be relied on for precise timing.
10346 // After each call to the timeout function, the time of the next
10347 // timeout is recalculated based on the current time and the given interval
10348 // (it does not try to 'catch up' time lost in delays).
10349 // This variant of g_timeout_add_full() can be thought of a MT-safe version
10350 // for GTK+ widgets for the following use case:
10351 // |[
10352 // static gboolean timeout_callback (gpointer data)
10353 // {
10354 // SomeWidget *self = data;
10355 // /&ast; do stuff with self &ast;/
10356 // self->timeout_id = 0;
10357 // return FALSE;
10358 // }
10359 // static void some_widget_do_stuff_later (SomeWidget *self)
10360 // {
10361 // self->timeout_id = g_timeout_add (timeout_callback, self)
10362 // }
10363 // static void some_widget_finalize (GObject *object)
10364 // {
10365 // SomeWidget *self = SOME_WIDGET (object);
10366 // if (self->timeout_id)
10367 // g_source_remove (self->timeout_id);
10368 // G_OBJECT_CLASS (parent_class)->finalize (object);
10369 // }
10370 // ]|
10371 // RETURNS: the ID (greater than 0) of the event source.
10372 // <priority>: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
10373 // <interval>: the time between calls to the function, in milliseconds (1/1000ths of a second)
10374 // <function>: function to call
10375 // <data>: data to pass to @function
10376 // <notify>: function to call when the timeout is removed, or %NULL
10377 static uint threads_add_timeout_full()(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) {
10378 return gdk_threads_add_timeout_full(priority, interval, function_, data, notify);
10382 // Unintrospectable function: threads_add_timeout_seconds() / gdk_threads_add_timeout_seconds()
10383 // VERSION: 2.14
10384 // A wrapper for the common usage of gdk_threads_add_timeout_seconds_full()
10385 // assigning the default priority, #G_PRIORITY_DEFAULT.
10386 // For details, see gdk_threads_add_timeout_full().
10387 // RETURNS: the ID (greater than 0) of the event source.
10388 // <interval>: the time between calls to the function, in seconds
10389 // <function>: function to call
10390 // <data>: data to pass to @function
10391 static uint threads_add_timeout_seconds()(uint interval, GLib2.SourceFunc function_, void* data) {
10392 return gdk_threads_add_timeout_seconds(interval, function_, data);
10396 // VERSION: 2.14
10397 // A variant of gdk_threads_add_timout_full() with second-granularity.
10398 // See g_timeout_add_seconds_full() for a discussion of why it is
10399 // a good idea to use this function if you don't need finer granularity.
10400 // RETURNS: the ID (greater than 0) of the event source.
10401 // <priority>: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
10402 // <interval>: the time between calls to the function, in seconds
10403 // <function>: function to call
10404 // <data>: data to pass to @function
10405 // <notify>: function to call when the timeout is removed, or %NULL
10406 static uint threads_add_timeout_seconds_full()(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) {
10407 return gdk_threads_add_timeout_seconds_full(priority, interval, function_, data, notify);
10410 static void threads_enter()() {
10411 gdk_threads_enter();
10415 // Initializes GDK so that it can be used from multiple threads
10416 // in conjunction with gdk_threads_enter() and gdk_threads_leave().
10417 // g_thread_init() must be called previous to this function.
10418 // This call must be made before any use of the main loop from
10419 // GTK+; to be safe, call it before gtk_init().
10420 static void threads_init()() {
10421 gdk_threads_init();
10424 static void threads_leave()() {
10425 gdk_threads_leave();
10429 // Unintrospectable function: threads_set_lock_functions() / gdk_threads_set_lock_functions()
10430 // VERSION: 2.4
10431 // Allows the application to replace the standard method that
10432 // GDK uses to protect its data structures. Normally, GDK
10433 // creates a single #GMutex that is locked by gdk_threads_enter(),
10434 // and released by gdk_threads_leave(); using this function an
10435 // application provides, instead, a function @enter_fn that is
10436 // called by gdk_threads_enter() and a function @leave_fn that is
10437 // called by gdk_threads_leave().
10438 // The functions must provide at least same locking functionality
10439 // as the default implementation, but can also do extra application
10440 // specific processing.
10441 // As an example, consider an application that has its own recursive
10442 // lock that when held, holds the GTK+ lock as well. When GTK+ unlocks
10443 // the GTK+ lock when entering a recursive main loop, the application
10444 // must temporarily release its lock as well.
10445 // Most threaded GTK+ apps won't need to use this method.
10446 // This method must be called before gdk_threads_init(), and cannot
10447 // be called multiple times.
10448 // <enter_fn>: function called to guard GDK
10449 // <leave_fn>: function called to release the guard
10450 static void threads_set_lock_functions()(GObject2.Callback enter_fn, GObject2.Callback leave_fn) {
10451 gdk_threads_set_lock_functions(enter_fn, leave_fn);
10455 // Convert from a ISO10646 character to a key symbol.
10456 // or, if there is no corresponding symbol,
10457 // wc | 0x01000000
10458 // RETURNS: the corresponding GDK key symbol, if one exists.
10459 // <wc>: a ISO10646 encoded character
10460 static uint unicode_to_keyval()(uint wc) {
10461 return gdk_unicode_to_keyval(wc);
10465 // Convert from UTF-8 to compound text.
10466 // false.
10467 // RETURNS: %TRUE if the conversion succeeded, otherwise
10468 // <str>: a UTF-8 string
10469 // <encoding>: location to store resulting encoding
10470 // <format>: location to store format of the result
10471 // <ctext>: location to store the data of the result
10472 // <length>: location to store the length of the data stored in @ctext
10473 static int utf8_to_compound_text()(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
10474 return gdk_utf8_to_compound_text(str, encoding, format, ctext, length);
10478 // VERSION: 2.2
10479 // Converts from UTF-8 to compound text.
10480 // %FALSE.
10481 // RETURNS: %TRUE if the conversion succeeded, otherwise
10482 // <display>: a #GdkDisplay
10483 // <str>: a UTF-8 string
10484 // <encoding>: location to store resulting encoding
10485 // <format>: location to store format of the result
10486 // <ctext>: location to store the data of the result
10487 // <length>: location to store the length of the data stored in @ctext
10488 static int utf8_to_compound_text_for_display()(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
10489 return gdk_utf8_to_compound_text_for_display(display, str, encoding, format, ctext, length);
10493 // Converts an UTF-8 string into the best possible representation
10494 // as a STRING. The representation of characters not in STRING
10495 // is not specified; it may be as pseudo-escape sequences
10496 // \x{ABCD}, or it may be in some other form of approximation.
10497 // conversion failed. (It should not fail for
10498 // any properly formed UTF-8 string unless system
10499 // limits like memory or file descriptors are exceeded.)
10500 // RETURNS: the newly-allocated string, or %NULL if the
10501 // <str>: a UTF-8 string
10502 static char* /*new*/ utf8_to_string_target()(char* str) {
10503 return gdk_utf8_to_string_target(str);
10507 // Converts a wide character string to a multi-byte string.
10508 // (The function name comes from an acronym of 'Wide Character String TO
10509 // Multi-Byte String').
10510 // conversion failed. The returned string should be freed with g_free() when no
10511 // longer needed.
10512 // RETURNS: the multi-byte string corresponding to @src, or %NULL if the
10513 // <src>: a wide character string.
10514 static char* /*new*/ wcstombs()(WChar* src) {
10515 return gdk_wcstombs(src);
10519 // Obtains the window underneath the mouse pointer, returning the
10520 // location of that window in @win_x, @win_y. Returns %NULL if the
10521 // window under the mouse pointer is not known to GDK (if the window
10522 // belongs to another application and a #GdkWindow hasn't been created
10523 // for it with gdk_window_foreign_new())
10524 // gdk_display_get_window_at_pointer() instead.
10525 // RETURNS: window under the mouse pointer
10526 // <win_x>: return location for origin of the window under the pointer
10527 // <win_y>: return location for origin of the window under the pointer
10528 static Window* window_at_pointer()(/*out*/ int* win_x=null, /*out*/ int* win_y=null) {
10529 return gdk_window_at_pointer(win_x, win_y);
10533 // Constrains a desired width and height according to a
10534 // set of geometry hints (such as minimum and maximum size).
10535 // <geometry>: a #GdkGeometry structure
10536 // <flags>: a mask indicating what portions of @geometry are set
10537 // <width>: desired width of window
10538 // <height>: desired height of the window
10539 // <new_width>: location to store resulting width
10540 // <new_height>: location to store resulting height
10541 static void window_constrain_size()(Geometry* geometry, uint flags, int width, int height, /*out*/ int* new_width, /*out*/ int* new_height) {
10542 gdk_window_constrain_size(geometry, flags, width, height, new_width, new_height);
10546 // Unintrospectable function: window_foreign_new() / gdk_window_foreign_new()
10547 // Wraps a native window for the default display in a #GdkWindow.
10548 // This may fail if the window has been destroyed.
10549 // For example in the X backend, a native window handle is an Xlib
10550 // <type>XID</type>.
10551 // native window or %NULL if the window has been destroyed.
10552 // RETURNS: the newly-created #GdkWindow wrapper for the
10553 // <anid>: a native window handle.
10554 static Window* window_foreign_new()(NativeWindow anid) {
10555 return gdk_window_foreign_new(anid);
10559 // Unintrospectable function: window_foreign_new_for_display() / gdk_window_foreign_new_for_display()
10560 // VERSION: 2.2
10561 // Wraps a native window in a #GdkWindow.
10562 // This may fail if the window has been destroyed. If the window
10563 // was already known to GDK, a new reference to the existing
10564 // #GdkWindow is returned.
10565 // For example in the X backend, a native window handle is an Xlib
10566 // <type>XID</type>.
10567 // %NULL if the window has been destroyed. The wrapper will be
10568 // newly created, if one doesn't exist already.
10569 // equivalent backend-specific API instead
10570 // RETURNS: a #GdkWindow wrapper for the native window or
10571 // <display>: the #GdkDisplay where the window handle comes from.
10572 // <anid>: a native window handle.
10573 static Window* window_foreign_new_for_display()(Display* display, NativeWindow anid) {
10574 return gdk_window_foreign_new_for_display(display, anid);
10578 // Unintrospectable function: window_get_toplevels() / gdk_window_get_toplevels()
10579 // DEPRECATED (v2.16) function: window_get_toplevels - Use gdk_screen_get_toplevel_windows() instead.
10580 // Obtains a list of all toplevel windows known to GDK on the default
10581 // screen (see gdk_screen_get_toplevel_windows()).
10582 // A toplevel window is a child of the root window (see
10583 // gdk_get_default_root_window()).
10584 // The returned list should be freed with g_list_free(), but
10585 // its elements need not be freed.
10586 // RETURNS: list of toplevel windows, free with g_list_free()
10587 static GLib2.List* window_get_toplevels()() {
10588 return gdk_window_get_toplevels();
10592 // Unintrospectable function: window_lookup() / gdk_window_lookup()
10593 // DEPRECATED (v2.24) function: window_lookup - Use gdk_x11_window_lookup_for_display() or equivalent
10594 // Looks up the #GdkWindow that wraps the given native window handle.
10595 // For example in the X backend, a native window handle is an Xlib
10596 // <type>XID</type>.
10597 // or %NULL if there is none.
10598 // backend-specific functionality instead
10599 // RETURNS: the #GdkWindow wrapper for the native window,
10600 // <anid>: a native window handle.
10601 static Window* window_lookup()(NativeWindow anid) {
10602 return gdk_window_lookup(anid);
10606 // Unintrospectable function: window_lookup_for_display() / gdk_window_lookup_for_display()
10607 // VERSION: 2.2
10608 // Looks up the #GdkWindow that wraps the given native window handle.
10609 // For example in the X backend, a native window handle is an Xlib
10610 // <type>XID</type>.
10611 // or %NULL if there is none.
10612 // RETURNS: the #GdkWindow wrapper for the native window,
10613 // <display>: the #GdkDisplay corresponding to the window handle
10614 // <anid>: a native window handle.
10615 static Window* window_lookup_for_display()(Display* display, NativeWindow anid) {
10616 return gdk_window_lookup_for_display(display, anid);
10620 // Calls gdk_window_process_updates() for all windows (see #GdkWindow)
10621 // in the application.
10622 static void window_process_all_updates()() {
10623 gdk_window_process_all_updates();
10627 // With update debugging enabled, calls to
10628 // gdk_window_invalidate_region() clear the invalidated region of the
10629 // screen to a noticeable color, and GDK pauses for a short time
10630 // before sending exposes to windows during
10631 // gdk_window_process_updates(). The net effect is that you can see
10632 // the invalid region for each window and watch redraws as they
10633 // occur. This allows you to diagnose inefficiencies in your application.
10634 // In essence, because the GDK rendering model prevents all flicker,
10635 // if you are redrawing the same region 400 times you may never
10636 // notice, aside from noticing a speed problem. Enabling update
10637 // debugging causes GTK to flicker slowly and noticeably, so you can
10638 // see exactly what's being redrawn when, in what order.
10639 // The --gtk-debug=updates command line option passed to GTK+ programs
10640 // enables this debug option at application startup time. That's
10641 // usually more useful than calling gdk_window_set_debug_updates()
10642 // yourself, though you might want to use this function to enable
10643 // updates sometime after application startup time.
10644 // <setting>: %TRUE to turn on update debugging
10645 static void window_set_debug_updates()(int setting) {
10646 gdk_window_set_debug_updates(setting);
10650 // C prototypes:
10652 extern (C) {
10653 AppLaunchContext* /*new*/ gdk_app_launch_context_new();
10654 void gdk_app_launch_context_set_desktop(AppLaunchContext* this_, int desktop);
10655 void gdk_app_launch_context_set_display(AppLaunchContext* this_, Display* display);
10656 void gdk_app_launch_context_set_icon(AppLaunchContext* this_, Gio2.Icon* icon=null);
10657 void gdk_app_launch_context_set_icon_name(AppLaunchContext* this_, char* icon_name=null);
10658 void gdk_app_launch_context_set_screen(AppLaunchContext* this_, Screen* screen);
10659 void gdk_app_launch_context_set_timestamp(AppLaunchContext* this_, uint timestamp);
10660 Color* /*new*/ gdk_color_copy(Color* this_);
10661 int gdk_color_equal(Color* this_, Color* colorb);
10662 void gdk_color_free(Color* this_);
10663 uint gdk_color_hash(Color* this_);
10664 char* /*new*/ gdk_color_to_string(Color* this_);
10665 Colormap* /*new*/ gdk_colormap_new(Visual* visual, int allocate);
10666 Colormap* gdk_colormap_get_system();
10667 int gdk_colormap_get_system_size();
10668 int gdk_colormap_alloc_color(Colormap* this_, Color* color, int writeable, int best_match);
10669 int gdk_colormap_alloc_colors(Colormap* this_, Color* colors, int n_colors, int writeable, int best_match, int* success);
10670 void gdk_colormap_change(Colormap* this_, int ncolors);
10671 void gdk_colormap_free_colors(Colormap* this_, Color* colors, int n_colors);
10672 Screen* gdk_colormap_get_screen(Colormap* this_);
10673 Visual* gdk_colormap_get_visual(Colormap* this_);
10674 void gdk_colormap_query_color(Colormap* this_, c_ulong pixel, Color* result);
10675 Colormap* gdk_colormap_ref(Colormap* this_);
10676 void gdk_colormap_unref(Colormap* this_);
10677 Cursor* /*new*/ gdk_cursor_new(CursorType cursor_type);
10678 Cursor* /*new*/ gdk_cursor_new_for_display(Display* display, CursorType cursor_type);
10679 Cursor* /*new*/ gdk_cursor_new_from_name(Display* display, char* name);
10680 Cursor* /*new*/ gdk_cursor_new_from_pixbuf(Display* display, GdkPixbuf2.Pixbuf* pixbuf, int x, int y);
10681 Cursor* /*new*/ gdk_cursor_new_from_pixmap(Pixmap* source, Pixmap* mask, Color* fg, Color* bg, int x, int y);
10682 CursorType gdk_cursor_get_cursor_type(Cursor* this_);
10683 Display* gdk_cursor_get_display(Cursor* this_);
10684 GdkPixbuf2.Pixbuf* gdk_cursor_get_image(Cursor* this_);
10685 Cursor* /*new*/ gdk_cursor_ref(Cursor* this_);
10686 void gdk_cursor_unref(Cursor* this_);
10687 void gdk_device_free_history(/*inout*/ TimeCoord** events, int n_events);
10688 Device* gdk_device_get_core_pointer();
10689 int gdk_device_get_axis(Device* this_, double* axes, AxisUse use, double* value);
10690 AxisUse gdk_device_get_axis_use(Device* this_, uint index);
10691 int gdk_device_get_has_cursor(Device* this_);
10692 int gdk_device_get_history(Device* this_, Window* window, uint start, uint stop, /*out*/ TimeCoord*** events, /*out*/ int* n_events);
10693 void gdk_device_get_key(Device* this_, uint index, uint* keyval, ModifierType* modifiers);
10694 InputMode gdk_device_get_mode(Device* this_);
10695 int gdk_device_get_n_axes(Device* this_);
10696 int gdk_device_get_n_keys(Device* this_);
10697 char* gdk_device_get_name(Device* this_);
10698 InputSource gdk_device_get_source(Device* this_);
10699 void gdk_device_get_state(Device* this_, Window* window, double* axes, ModifierType* mask);
10700 void gdk_device_set_axis_use(Device* this_, uint index_, AxisUse use);
10701 void gdk_device_set_key(Device* this_, uint index_, uint keyval, ModifierType modifiers);
10702 int gdk_device_set_mode(Device* this_, InputMode mode);
10703 void gdk_device_set_source(Device* this_, InputSource source);
10704 Display* gdk_display_get_default();
10705 Display* gdk_display_open(char* display_name);
10706 Display* gdk_display_open_default_libgtk_only();
10707 void gdk_display_add_client_message_filter(Display* this_, Atom message_type, FilterFunc func, void* data);
10708 void gdk_display_beep(Display* this_);
10709 void gdk_display_close(Display* this_);
10710 void gdk_display_flush(Display* this_);
10711 Device* gdk_display_get_core_pointer(Display* this_);
10712 uint gdk_display_get_default_cursor_size(Display* this_);
10713 Window* gdk_display_get_default_group(Display* this_);
10714 Screen* gdk_display_get_default_screen(Display* this_);
10715 Event* /*new*/ gdk_display_get_event(Display* this_);
10716 void gdk_display_get_maximal_cursor_size(Display* this_, /*out*/ uint* width, /*out*/ uint* height);
10717 int gdk_display_get_n_screens(Display* this_);
10718 char* gdk_display_get_name(Display* this_);
10719 void gdk_display_get_pointer(Display* this_, /*out*/ Screen** screen=null, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null);
10720 Screen* gdk_display_get_screen(Display* this_, int screen_num);
10721 Window* gdk_display_get_window_at_pointer(Display* this_, /*out*/ int* win_x=null, /*out*/ int* win_y=null);
10722 int gdk_display_is_closed(Display* this_);
10723 void gdk_display_keyboard_ungrab(Display* this_, uint time_);
10724 GLib2.List* gdk_display_list_devices(Display* this_);
10725 Event* /*new*/ gdk_display_peek_event(Display* this_);
10726 int gdk_display_pointer_is_grabbed(Display* this_);
10727 void gdk_display_pointer_ungrab(Display* this_, uint time_);
10728 void gdk_display_put_event(Display* this_, Event* event);
10729 int gdk_display_request_selection_notification(Display* this_, Atom selection);
10730 void gdk_display_set_double_click_distance(Display* this_, uint distance);
10731 void gdk_display_set_double_click_time(Display* this_, uint msec);
10732 DisplayPointerHooks* gdk_display_set_pointer_hooks(Display* this_, DisplayPointerHooks* new_hooks);
10733 void gdk_display_store_clipboard(Display* this_, Window* clipboard_window, uint time_, Atom* targets, int n_targets);
10734 int gdk_display_supports_clipboard_persistence(Display* this_);
10735 int gdk_display_supports_composite(Display* this_);
10736 int gdk_display_supports_cursor_alpha(Display* this_);
10737 int gdk_display_supports_cursor_color(Display* this_);
10738 int gdk_display_supports_input_shapes(Display* this_);
10739 int gdk_display_supports_selection_notification(Display* this_);
10740 int gdk_display_supports_shapes(Display* this_);
10741 void gdk_display_sync(Display* this_);
10742 void gdk_display_warp_pointer(Display* this_, Screen* screen, int x, int y);
10743 DisplayManager* gdk_display_manager_get();
10744 Display* gdk_display_manager_get_default_display(DisplayManager* this_);
10745 GLib2.SList* /*new container*/ gdk_display_manager_list_displays(DisplayManager* this_);
10746 void gdk_display_manager_set_default_display(DisplayManager* this_, Display* display);
10747 DragContext* /*new*/ gdk_drag_context_new();
10748 DragAction gdk_drag_context_get_actions(DragContext* this_);
10749 Window* gdk_drag_context_get_dest_window(DragContext* this_);
10750 DragProtocol gdk_drag_context_get_protocol(DragContext* this_);
10751 DragAction gdk_drag_context_get_selected_action(DragContext* this_);
10752 Window* gdk_drag_context_get_source_window(DragContext* this_);
10753 DragAction gdk_drag_context_get_suggested_action(DragContext* this_);
10754 GLib2.List* gdk_drag_context_list_targets(DragContext* this_);
10755 void gdk_drag_context_ref(DragContext* this_);
10756 void gdk_drag_context_unref(DragContext* this_);
10757 Image* gdk_drawable_copy_to_image(Drawable* this_, Image* image, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
10758 Region* gdk_drawable_get_clip_region(Drawable* this_);
10759 Colormap* gdk_drawable_get_colormap(Drawable* this_);
10760 void* gdk_drawable_get_data(Drawable* this_, char* key);
10761 int gdk_drawable_get_depth(Drawable* this_);
10762 Display* gdk_drawable_get_display(Drawable* this_);
10763 Image* gdk_drawable_get_image(Drawable* this_, int x, int y, int width, int height);
10764 Screen* gdk_drawable_get_screen(Drawable* this_);
10765 void gdk_drawable_get_size(Drawable* this_, /*out*/ int* width=null, /*out*/ int* height=null);
10766 Region* gdk_drawable_get_visible_region(Drawable* this_);
10767 Visual* gdk_drawable_get_visual(Drawable* this_);
10768 Drawable* gdk_drawable_ref(Drawable* this_);
10769 void gdk_drawable_set_colormap(Drawable* this_, Colormap* colormap);
10770 void gdk_drawable_set_data(Drawable* this_, char* key, void* data, GLib2.DestroyNotify destroy_func=null);
10771 void gdk_drawable_unref(Drawable* this_);
10772 Event* /*new*/ gdk_event_new(EventType type);
10773 Event* /*new*/ gdk_event_copy(Event* this_);
10774 void gdk_event_free(Event* this_);
10775 int gdk_event_get_axis(Event* this_, AxisUse axis_use, /*out*/ double* value);
10776 int gdk_event_get_coords(Event* this_, /*out*/ double* x_win, /*out*/ double* y_win);
10777 int gdk_event_get_root_coords(Event* this_, /*out*/ double* x_root, /*out*/ double* y_root);
10778 Screen* gdk_event_get_screen(Event* this_);
10779 int gdk_event_get_state(Event* this_, /*out*/ ModifierType* state);
10780 uint gdk_event_get_time(Event* this_);
10781 void gdk_event_put(Event* this_);
10782 int gdk_event_send_client_message(Event* this_, NativeWindow winid);
10783 void gdk_event_send_clientmessage_toall(Event* this_);
10784 void gdk_event_set_screen(Event* this_, Screen* screen);
10785 int gdk_font_equal(Font* this_, Font* fontb);
10786 Display* gdk_font_get_display(Font* this_);
10787 int gdk_font_id(Font* this_);
10788 Font* /*new*/ gdk_font_ref(Font* this_);
10789 void gdk_font_unref(Font* this_);
10790 GC* /*new*/ gdk_gc_new(Drawable* drawable);
10791 GC* /*new*/ gdk_gc_new_with_values(Drawable* drawable, GCValues* values, GCValuesMask values_mask);
10792 void gdk_gc_copy(GC* this_, GC* src_gc);
10793 Colormap* gdk_gc_get_colormap(GC* this_);
10794 Screen* gdk_gc_get_screen(GC* this_);
10795 void gdk_gc_get_values(GC* this_, GCValues* values);
10796 void gdk_gc_offset(GC* this_, int x_offset, int y_offset);
10797 GC* gdk_gc_ref(GC* this_);
10798 void gdk_gc_set_background(GC* this_, Color* color);
10799 void gdk_gc_set_clip_mask(GC* this_, Bitmap* mask);
10800 void gdk_gc_set_clip_origin(GC* this_, int x, int y);
10801 void gdk_gc_set_clip_rectangle(GC* this_, Rectangle* rectangle);
10802 void gdk_gc_set_clip_region(GC* this_, Region* region);
10803 void gdk_gc_set_colormap(GC* this_, Colormap* colormap);
10804 void gdk_gc_set_dashes(GC* this_, int dash_offset, byte dash_list, int n);
10805 void gdk_gc_set_exposures(GC* this_, int exposures);
10806 void gdk_gc_set_fill(GC* this_, Fill fill);
10807 void gdk_gc_set_font(GC* this_, Font* font);
10808 void gdk_gc_set_foreground(GC* this_, Color* color);
10809 void gdk_gc_set_function(GC* this_, Function function_);
10810 void gdk_gc_set_line_attributes(GC* this_, int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style);
10811 void gdk_gc_set_rgb_bg_color(GC* this_, Color* color);
10812 void gdk_gc_set_rgb_fg_color(GC* this_, Color* color);
10813 void gdk_gc_set_stipple(GC* this_, Pixmap* stipple);
10814 void gdk_gc_set_subwindow(GC* this_, SubwindowMode mode);
10815 void gdk_gc_set_tile(GC* this_, Pixmap* tile);
10816 void gdk_gc_set_ts_origin(GC* this_, int x, int y);
10817 void gdk_gc_set_values(GC* this_, GCValues* values, GCValuesMask values_mask);
10818 void gdk_gc_unref(GC* this_);
10819 Image* /*new*/ gdk_image_new(ImageType type, Visual* visual, int width, int height);
10820 Image* gdk_image_get(Drawable* drawable, int x, int y, int width, int height);
10821 ushort gdk_image_get_bits_per_pixel(Image* this_);
10822 ByteOrder gdk_image_get_byte_order(Image* this_);
10823 ushort gdk_image_get_bytes_per_line(Image* this_);
10824 ushort gdk_image_get_bytes_per_pixel(Image* this_);
10825 Colormap* gdk_image_get_colormap(Image* this_);
10826 ushort gdk_image_get_depth(Image* this_);
10827 int gdk_image_get_height(Image* this_);
10828 ImageType gdk_image_get_image_type(Image* this_);
10829 uint gdk_image_get_pixel(Image* this_, int x, int y);
10830 void* gdk_image_get_pixels(Image* this_);
10831 Visual* gdk_image_get_visual(Image* this_);
10832 int gdk_image_get_width(Image* this_);
10833 void gdk_image_put_pixel(Image* this_, int x, int y, uint pixel);
10834 Image* gdk_image_ref(Image* this_);
10835 void gdk_image_set_colormap(Image* this_, Colormap* colormap);
10836 void gdk_image_unref(Image* this_);
10837 Keymap* gdk_keymap_get_default();
10838 Keymap* gdk_keymap_get_for_display(Display* display);
10839 void gdk_keymap_add_virtual_modifiers(Keymap* this_, ModifierType* state);
10840 int gdk_keymap_get_caps_lock_state(Keymap* this_);
10841 Pango.Direction gdk_keymap_get_direction(Keymap* this_);
10842 int gdk_keymap_get_entries_for_keycode(Keymap* this_, uint hardware_keycode, /*out*/ KeymapKey** keys, /*out*/ uint** keyvals, int* n_entries);
10843 int gdk_keymap_get_entries_for_keyval(Keymap* this_, uint keyval, /*out*/ KeymapKey** keys, /*out*/ int* n_keys);
10844 int gdk_keymap_have_bidi_layouts(Keymap* this_);
10845 uint gdk_keymap_lookup_key(Keymap* this_, KeymapKey* key);
10846 int gdk_keymap_map_virtual_modifiers(Keymap* this_, ModifierType* state);
10847 int gdk_keymap_translate_keyboard_state(Keymap* this_, uint hardware_keycode, ModifierType state, int group, /*out*/ uint* keyval=null, /*out*/ int* effective_group=null, /*out*/ int* level=null, /*out*/ ModifierType* consumed_modifiers=null);
10848 PangoRenderer* /*new*/ gdk_pango_renderer_new(Screen* screen);
10849 Pango.Renderer* gdk_pango_renderer_get_default(Screen* screen);
10850 void gdk_pango_renderer_set_drawable(PangoRenderer* this_, Drawable* drawable=null);
10851 void gdk_pango_renderer_set_gc(PangoRenderer* this_, GC* gc=null);
10852 void gdk_pango_renderer_set_override_color(PangoRenderer* this_, Pango.RenderPart part, Color* color=null);
10853 void gdk_pango_renderer_set_stipple(PangoRenderer* this_, Pango.RenderPart part, Bitmap* stipple);
10854 Pixmap* /*new*/ gdk_pixmap_foreign_new(NativeWindow anid);
10855 Pixmap* /*new*/ gdk_pixmap_foreign_new_for_display(Display* display, NativeWindow anid);
10856 Pixmap* /*new*/ gdk_pixmap_foreign_new_for_screen(Screen* screen, NativeWindow anid, int width, int height, int depth);
10857 Pixmap* /*new*/ gdk_pixmap_new(Drawable* drawable, int width, int height, int depth);
10858 Pixmap* gdk_pixmap_colormap_create_from_xpm(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char* filename);
10859 Pixmap* gdk_pixmap_colormap_create_from_xpm_d(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char** data);
10860 Pixmap* gdk_pixmap_create_from_data(Drawable* drawable, char* data, int width, int height, int depth, Color* fg, Color* bg);
10861 Pixmap* gdk_pixmap_create_from_xpm(Drawable* drawable, Bitmap** mask, Color* transparent_color, char* filename);
10862 Pixmap* gdk_pixmap_create_from_xpm_d(Drawable* drawable, /*out*/ Bitmap** mask, Color* transparent_color, char** data);
10863 Pixmap* gdk_pixmap_lookup(NativeWindow anid);
10864 Pixmap* gdk_pixmap_lookup_for_display(Display* display, NativeWindow anid);
10865 void gdk_pixmap_get_size(Pixmap* this_, /*out*/ int* width=null, /*out*/ int* height=null);
10866 int gdk_rectangle_intersect(Rectangle* this_, Rectangle* src2, /*out*/ Rectangle* dest=null);
10867 void gdk_rectangle_union(Rectangle* this_, Rectangle* src2, /*out*/ Rectangle* dest);
10868 Region* gdk_region_copy(Region* this_);
10869 void gdk_region_destroy(Region* this_);
10870 int gdk_region_empty(Region* this_);
10871 int gdk_region_equal(Region* this_, Region* region2);
10872 void gdk_region_get_clipbox(Region* this_, Rectangle* rectangle);
10873 void gdk_region_get_rectangles(Region* this_, Rectangle** rectangles, int* n_rectangles);
10874 void gdk_region_intersect(Region* this_, Region* source2);
10875 void gdk_region_offset(Region* this_, int dx, int dy);
10876 int gdk_region_point_in(Region* this_, int x, int y);
10877 int gdk_region_rect_equal(Region* this_, Rectangle* rectangle);
10878 OverlapType gdk_region_rect_in(Region* this_, Rectangle* rectangle);
10879 void gdk_region_shrink(Region* this_, int dx, int dy);
10880 void gdk_region_spans_intersect_foreach(Region* this_, Span* spans, int n_spans, int sorted, SpanFunc function_, void* data);
10881 void gdk_region_subtract(Region* this_, Region* source2);
10882 void gdk_region_union(Region* this_, Region* source2);
10883 void gdk_region_union_with_rect(Region* this_, Rectangle* rect);
10884 void gdk_region_xor(Region* this_, Region* source2);
10885 void gdk_rgb_cmap_free(RgbCmap* this_);
10886 Screen* gdk_screen_get_default();
10887 int gdk_screen_height();
10888 int gdk_screen_height_mm();
10889 int gdk_screen_width();
10890 int gdk_screen_width_mm();
10891 void gdk_screen_broadcast_client_message(Screen* this_, Event* event);
10892 Window* gdk_screen_get_active_window(Screen* this_);
10893 Colormap* gdk_screen_get_default_colormap(Screen* this_);
10894 Display* gdk_screen_get_display(Screen* this_);
10895 cairo.FontOptions* gdk_screen_get_font_options(Screen* this_);
10896 int gdk_screen_get_height(Screen* this_);
10897 int gdk_screen_get_height_mm(Screen* this_);
10898 int gdk_screen_get_monitor_at_point(Screen* this_, int x, int y);
10899 int gdk_screen_get_monitor_at_window(Screen* this_, Window* window);
10900 void gdk_screen_get_monitor_geometry(Screen* this_, int monitor_num, Rectangle* dest);
10901 int gdk_screen_get_monitor_height_mm(Screen* this_, int monitor_num);
10902 char* /*new*/ gdk_screen_get_monitor_plug_name(Screen* this_, int monitor_num);
10903 int gdk_screen_get_monitor_width_mm(Screen* this_, int monitor_num);
10904 int gdk_screen_get_n_monitors(Screen* this_);
10905 int gdk_screen_get_number(Screen* this_);
10906 int gdk_screen_get_primary_monitor(Screen* this_);
10907 double gdk_screen_get_resolution(Screen* this_);
10908 Colormap* gdk_screen_get_rgb_colormap(Screen* this_);
10909 Visual* gdk_screen_get_rgb_visual(Screen* this_);
10910 Colormap* gdk_screen_get_rgba_colormap(Screen* this_);
10911 Visual* gdk_screen_get_rgba_visual(Screen* this_);
10912 Window* gdk_screen_get_root_window(Screen* this_);
10913 int gdk_screen_get_setting(Screen* this_, char* name, GObject2.Value* value);
10914 Colormap* gdk_screen_get_system_colormap(Screen* this_);
10915 Visual* gdk_screen_get_system_visual(Screen* this_);
10916 GLib2.List* /*new container*/ gdk_screen_get_toplevel_windows(Screen* this_);
10917 int gdk_screen_get_width(Screen* this_);
10918 int gdk_screen_get_width_mm(Screen* this_);
10919 GLib2.List* /*new*/ gdk_screen_get_window_stack(Screen* this_);
10920 int gdk_screen_is_composited(Screen* this_);
10921 GLib2.List* /*new container*/ gdk_screen_list_visuals(Screen* this_);
10922 char* /*new*/ gdk_screen_make_display_name(Screen* this_);
10923 void gdk_screen_set_default_colormap(Screen* this_, Colormap* colormap);
10924 void gdk_screen_set_font_options(Screen* this_, cairo.FontOptions* options=null);
10925 void gdk_screen_set_resolution(Screen* this_, double dpi);
10926 Visual* gdk_visual_get_best();
10927 int gdk_visual_get_best_depth();
10928 VisualType gdk_visual_get_best_type();
10929 Visual* gdk_visual_get_best_with_both(int depth, VisualType visual_type);
10930 Visual* gdk_visual_get_best_with_depth(int depth);
10931 Visual* gdk_visual_get_best_with_type(VisualType visual_type);
10932 Visual* gdk_visual_get_system();
10933 int gdk_visual_get_bits_per_rgb(Visual* this_);
10934 void gdk_visual_get_blue_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null);
10935 ByteOrder gdk_visual_get_byte_order(Visual* this_);
10936 int gdk_visual_get_colormap_size(Visual* this_);
10937 int gdk_visual_get_depth(Visual* this_);
10938 void gdk_visual_get_green_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null);
10939 void gdk_visual_get_red_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null);
10940 Screen* gdk_visual_get_screen(Visual* this_);
10941 VisualType gdk_visual_get_visual_type(Visual* this_);
10942 void gdk_window_add_filter(Window* this_, FilterFunc function_, void* data);
10943 void gdk_window_beep(Window* this_);
10944 void gdk_window_begin_move_drag(Window* this_, int button, int root_x, int root_y, uint timestamp);
10945 void gdk_window_begin_paint_rect(Window* this_, Rectangle* rectangle);
10946 void gdk_window_begin_paint_region(Window* this_, Region* region);
10947 void gdk_window_begin_resize_drag(Window* this_, WindowEdge edge, int button, int root_x, int root_y, uint timestamp);
10948 void gdk_window_clear(Window* this_);
10949 void gdk_window_clear_area(Window* this_, int x, int y, int width, int height);
10950 void gdk_window_clear_area_e(Window* this_, int x, int y, int width, int height);
10951 void gdk_window_configure_finished(Window* this_);
10952 void gdk_window_coords_from_parent(Window* this_, double parent_x, double parent_y, /*out*/ double* x=null, /*out*/ double* y=null);
10953 void gdk_window_coords_to_parent(Window* this_, double x, double y, /*out*/ double* parent_x=null, /*out*/ double* parent_y=null);
10954 cairo.Surface* /*new*/ gdk_window_create_similar_surface(Window* this_, cairo.Content content, int width, int height);
10955 void gdk_window_deiconify(Window* this_);
10956 void gdk_window_destroy(Window* this_);
10957 void gdk_window_destroy_notify(Window* this_);
10958 void gdk_window_enable_synchronized_configure(Window* this_);
10959 void gdk_window_end_paint(Window* this_);
10960 int gdk_window_ensure_native(Window* this_);
10961 void gdk_window_flush(Window* this_);
10962 void gdk_window_focus(Window* this_, uint timestamp);
10963 void gdk_window_freeze_toplevel_updates_libgtk_only(Window* this_);
10964 void gdk_window_freeze_updates(Window* this_);
10965 void gdk_window_fullscreen(Window* this_);
10966 void gdk_window_geometry_changed(Window* this_);
10967 int gdk_window_get_accept_focus(Window* this_);
10968 cairo.Pattern* gdk_window_get_background_pattern(Window* this_);
10969 GLib2.List* /*new container*/ gdk_window_get_children(Window* this_);
10970 int gdk_window_get_composited(Window* this_);
10971 Cursor* gdk_window_get_cursor(Window* this_);
10972 int gdk_window_get_decorations(Window* this_, WMDecoration* decorations);
10973 int gdk_window_get_deskrelative_origin(Window* this_, int* x, int* y);
10974 Display* gdk_window_get_display(Window* this_);
10975 Window* gdk_window_get_effective_parent(Window* this_);
10976 Window* gdk_window_get_effective_toplevel(Window* this_);
10977 EventMask gdk_window_get_events(Window* this_);
10978 int gdk_window_get_focus_on_map(Window* this_);
10979 void gdk_window_get_frame_extents(Window* this_, Rectangle* rect);
10980 void gdk_window_get_geometry(Window* this_, int* x, int* y, int* width, int* height, int* depth);
10981 Window* gdk_window_get_group(Window* this_);
10982 int gdk_window_get_height(Window* this_);
10983 void gdk_window_get_internal_paint_info(Window* this_, /*out*/ Drawable** real_drawable, /*out*/ int* x_offset, /*out*/ int* y_offset);
10984 int gdk_window_get_modal_hint(Window* this_);
10985 int gdk_window_get_origin(Window* this_, int* x, int* y);
10986 Window* gdk_window_get_parent(Window* this_);
10987 Window* gdk_window_get_pointer(Window* this_, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null);
10988 void gdk_window_get_position(Window* this_, /*out*/ int* x=null, /*out*/ int* y=null);
10989 void gdk_window_get_root_coords(Window* this_, int x, int y, /*out*/ int* root_x, /*out*/ int* root_y);
10990 void gdk_window_get_root_origin(Window* this_, int* x, int* y);
10991 Screen* gdk_window_get_screen(Window* this_);
10992 WindowState gdk_window_get_state(Window* this_);
10993 Window* gdk_window_get_toplevel(Window* this_);
10994 WindowTypeHint gdk_window_get_type_hint(Window* this_);
10995 Region* gdk_window_get_update_area(Window* this_);
10996 void gdk_window_get_user_data(Window* this_, /*out*/ void** data);
10997 Visual* gdk_window_get_visual(Window* this_);
10998 int gdk_window_get_width(Window* this_);
10999 WindowType gdk_window_get_window_type(Window* this_);
11000 int gdk_window_has_native(Window* this_);
11001 void gdk_window_hide(Window* this_);
11002 void gdk_window_iconify(Window* this_);
11003 void gdk_window_input_shape_combine_mask(Window* this_, Bitmap* mask, int x, int y);
11004 void gdk_window_input_shape_combine_region(Window* this_, Region* shape_region, int offset_x, int offset_y);
11005 void gdk_window_invalidate_maybe_recurse(Window* this_, Region* region, void** child_func, void* user_data);
11006 void gdk_window_invalidate_rect(Window* this_, Rectangle* rect, int invalidate_children);
11007 void gdk_window_invalidate_region(Window* this_, Region* region, int invalidate_children);
11008 int gdk_window_is_destroyed(Window* this_);
11009 int gdk_window_is_input_only(Window* this_);
11010 int gdk_window_is_shaped(Window* this_);
11011 int gdk_window_is_viewable(Window* this_);
11012 int gdk_window_is_visible(Window* this_);
11013 void gdk_window_lower(Window* this_);
11014 void gdk_window_maximize(Window* this_);
11015 void gdk_window_merge_child_input_shapes(Window* this_);
11016 void gdk_window_merge_child_shapes(Window* this_);
11017 void gdk_window_move(Window* this_, int x, int y);
11018 void gdk_window_move_region(Window* this_, Region* region, int dx, int dy);
11019 void gdk_window_move_resize(Window* this_, int x, int y, int width, int height);
11020 Window* gdk_window_new(Window* this_, WindowAttr* attributes, int attributes_mask);
11021 GLib2.List* gdk_window_peek_children(Window* this_);
11022 void gdk_window_process_updates(Window* this_, int update_children);
11023 void gdk_window_raise(Window* this_);
11024 void gdk_window_redirect_to_drawable(Window* this_, Drawable* drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
11025 void gdk_window_register_dnd(Window* this_);
11026 void gdk_window_remove_filter(Window* this_, FilterFunc function_, void* data);
11027 void gdk_window_remove_redirection(Window* this_);
11028 void gdk_window_reparent(Window* this_, Window* new_parent, int x, int y);
11029 void gdk_window_resize(Window* this_, int width, int height);
11030 void gdk_window_restack(Window* this_, Window* sibling, int above);
11031 void gdk_window_scroll(Window* this_, int dx, int dy);
11032 void gdk_window_set_accept_focus(Window* this_, int accept_focus);
11033 void gdk_window_set_back_pixmap(Window* this_, Pixmap* pixmap, int parent_relative);
11034 void gdk_window_set_background(Window* this_, Color* color);
11035 void gdk_window_set_child_input_shapes(Window* this_);
11036 void gdk_window_set_child_shapes(Window* this_);
11037 void gdk_window_set_composited(Window* this_, int composited);
11038 void gdk_window_set_cursor(Window* this_, Cursor* cursor=null);
11039 void gdk_window_set_decorations(Window* this_, WMDecoration decorations);
11040 void gdk_window_set_events(Window* this_, EventMask event_mask);
11041 void gdk_window_set_focus_on_map(Window* this_, int focus_on_map);
11042 void gdk_window_set_functions(Window* this_, WMFunction functions);
11043 void gdk_window_set_geometry_hints(Window* this_, Geometry* geometry, WindowHints geom_mask);
11044 void gdk_window_set_group(Window* this_, Window* leader);
11045 void gdk_window_set_hints(Window* this_, int x, int y, int min_width, int min_height, int max_width, int max_height, int flags);
11046 void gdk_window_set_icon(Window* this_, Window* icon_window, Pixmap* pixmap, Bitmap* mask);
11047 void gdk_window_set_icon_list(Window* this_, GLib2.List* pixbufs);
11048 void gdk_window_set_icon_name(Window* this_, char* name);
11049 void gdk_window_set_keep_above(Window* this_, int setting);
11050 void gdk_window_set_keep_below(Window* this_, int setting);
11051 void gdk_window_set_modal_hint(Window* this_, int modal);
11052 void gdk_window_set_opacity(Window* this_, double opacity);
11053 void gdk_window_set_override_redirect(Window* this_, int override_redirect);
11054 void gdk_window_set_role(Window* this_, char* role);
11055 void gdk_window_set_skip_pager_hint(Window* this_, int skips_pager);
11056 void gdk_window_set_skip_taskbar_hint(Window* this_, int skips_taskbar);
11057 void gdk_window_set_startup_id(Window* this_, char* startup_id);
11058 int gdk_window_set_static_gravities(Window* this_, int use_static);
11059 void gdk_window_set_title(Window* this_, char* title);
11060 void gdk_window_set_transient_for(Window* this_, Window* parent);
11061 void gdk_window_set_type_hint(Window* this_, WindowTypeHint hint);
11062 void gdk_window_set_urgency_hint(Window* this_, int urgent);
11063 void gdk_window_set_user_data(Window* this_, void* user_data);
11064 void gdk_window_shape_combine_mask(Window* this_, Bitmap* mask, int x, int y);
11065 void gdk_window_shape_combine_region(Window* this_, Region* shape_region, int offset_x, int offset_y);
11066 void gdk_window_show(Window* this_);
11067 void gdk_window_show_unraised(Window* this_);
11068 void gdk_window_stick(Window* this_);
11069 void gdk_window_thaw_toplevel_updates_libgtk_only(Window* this_);
11070 void gdk_window_thaw_updates(Window* this_);
11071 void gdk_window_unfullscreen(Window* this_);
11072 void gdk_window_unmaximize(Window* this_);
11073 void gdk_window_unstick(Window* this_);
11074 void gdk_window_withdraw(Window* this_);
11075 void gdk_add_client_message_filter(Atom message_type, FilterFunc func, void* data);
11076 void gdk_add_option_entries_libgtk_only(GLib2.OptionGroup* group);
11077 Atom gdk_atom_intern(char* atom_name, int only_if_exists);
11078 Atom gdk_atom_intern_static_string(char* atom_name);
11079 char* /*new*/ gdk_atom_name(Atom atom);
11080 void gdk_beep();
11081 Bitmap* gdk_bitmap_create_from_data(Drawable* drawable, char* data, int width, int height);
11082 cairo.Context* /*new*/ gdk_cairo_create(Drawable* drawable);
11083 void gdk_cairo_rectangle(cairo.Context* cr, Rectangle* rectangle);
11084 void gdk_cairo_region(cairo.Context* cr, Region* region);
11085 void gdk_cairo_reset_clip(cairo.Context* cr, Drawable* drawable);
11086 void gdk_cairo_set_source_color(cairo.Context* cr, Color* color);
11087 void gdk_cairo_set_source_pixbuf(cairo.Context* cr, GdkPixbuf2.Pixbuf* pixbuf, double pixbuf_x, double pixbuf_y);
11088 void gdk_cairo_set_source_pixmap(cairo.Context* cr, Pixmap* pixmap, double pixmap_x, double pixmap_y);
11089 void gdk_cairo_set_source_window(cairo.Context* cr, Window* window, double x, double y);
11090 int gdk_char_height(Font* font, char character);
11091 int gdk_char_measure(Font* font, char character);
11092 int gdk_char_width(Font* font, char character);
11093 int gdk_char_width_wc(Font* font, WChar character);
11094 int gdk_color_alloc(Colormap* colormap, Color* color);
11095 int gdk_color_black(Colormap* colormap, Color* color);
11096 int gdk_color_change(Colormap* colormap, Color* color);
11097 int gdk_color_parse(char* spec, /*out*/ Color* color);
11098 int gdk_color_white(Colormap* colormap, Color* color);
11099 int gdk_colors_alloc(Colormap* colormap, int contiguous, c_ulong* planes, int nplanes, c_ulong* pixels, int npixels);
11100 void gdk_colors_free(Colormap* colormap, c_ulong* pixels, int npixels, c_ulong planes);
11101 void gdk_colors_store(Colormap* colormap, Color* colors, int ncolors);
11102 GLib2.List* gdk_devices_list();
11103 void gdk_drag_abort(DragContext* context, uint time_);
11104 DragContext* gdk_drag_begin(Window* window, GLib2.List* targets);
11105 void gdk_drag_drop(DragContext* context, uint time_);
11106 int gdk_drag_drop_succeeded(DragContext* context);
11107 void gdk_drag_find_window(DragContext* context, Window* drag_window, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol);
11108 void gdk_drag_find_window_for_screen(DragContext* context, Window* drag_window, Screen* screen, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol);
11109 NativeWindow gdk_drag_get_protocol(NativeWindow xid, DragProtocol* protocol);
11110 NativeWindow gdk_drag_get_protocol_for_display(Display* display, NativeWindow xid, DragProtocol* protocol);
11111 Atom gdk_drag_get_selection(DragContext* context);
11112 int gdk_drag_motion(DragContext* context, Window* dest_window, DragProtocol protocol, int x_root, int y_root, DragAction suggested_action, DragAction possible_actions, uint time_);
11113 void gdk_drag_status(DragContext* context, DragAction action, uint time_);
11114 void gdk_draw_arc(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2);
11115 void gdk_draw_drawable(Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height);
11116 void gdk_draw_glyphs(Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs);
11117 void gdk_draw_glyphs_transformed(Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs);
11118 void gdk_draw_gray_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride);
11119 void gdk_draw_image(Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height);
11120 void gdk_draw_indexed_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride, RgbCmap* cmap);
11121 void gdk_draw_layout(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout);
11122 void gdk_draw_layout_line(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line);
11123 void gdk_draw_layout_line_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line, Color* foreground=null, Color* background=null);
11124 void gdk_draw_layout_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout, Color* foreground=null, Color* background=null);
11125 void gdk_draw_line(Drawable* drawable, GC* gc, int x1_, int y1_, int x2_, int y2_);
11126 void gdk_draw_lines(Drawable* drawable, GC* gc, Point* points, int n_points);
11127 void gdk_draw_pixbuf(Drawable* drawable, GC* gc, GdkPixbuf2.Pixbuf* pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither);
11128 void gdk_draw_point(Drawable* drawable, GC* gc, int x, int y);
11129 void gdk_draw_points(Drawable* drawable, GC* gc, Point* points, int n_points);
11130 void gdk_draw_polygon(Drawable* drawable, GC* gc, int filled, Point* points, int n_points);
11131 void gdk_draw_rectangle(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height);
11132 void gdk_draw_rgb_32_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride);
11133 void gdk_draw_rgb_32_image_dithalign(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride, int xdith, int ydith);
11134 void gdk_draw_rgb_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride);
11135 void gdk_draw_rgb_image_dithalign(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride, int xdith, int ydith);
11136 void gdk_draw_segments(Drawable* drawable, GC* gc, Segment* segs, int n_segs);
11137 void gdk_draw_string(Drawable* drawable, Font* font, GC* gc, int x, int y, char* string_);
11138 void gdk_draw_text(Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length);
11139 void gdk_draw_text_wc(Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length);
11140 void gdk_draw_trapezoids(Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids);
11141 void gdk_drop_finish(DragContext* context, int success, uint time_);
11142 void gdk_drop_reply(DragContext* context, int ok, uint time_);
11143 int gdk_error_trap_pop();
11144 void gdk_error_trap_push();
11145 Event* /*new*/ gdk_event_get();
11146 Event* /*new*/ gdk_event_get_graphics_expose(Window* window);
11147 void gdk_event_handler_set(EventFunc func, void* data, GLib2.DestroyNotify notify);
11148 Event* /*new*/ gdk_event_peek();
11149 void gdk_event_request_motions(EventMotion* event);
11150 int gdk_event_send_client_message_for_display(Display* display, Event* event, NativeWindow winid);
11151 int gdk_events_pending();
11152 void gdk_exit(int error_code);
11153 void gdk_flush();
11154 Font* /*new*/ gdk_font_from_description(Pango.FontDescription* font_desc);
11155 Font* /*new*/ gdk_font_from_description_for_display(Display* display, Pango.FontDescription* font_desc);
11156 Font* /*new*/ gdk_font_load(char* font_name);
11157 Font* /*new*/ gdk_font_load_for_display(Display* display, char* font_name);
11158 Font* /*new*/ gdk_fontset_load(char* fontset_name);
11159 Font* /*new*/ gdk_fontset_load_for_display(Display* display, char* fontset_name);
11160 void gdk_free_compound_text(ubyte* ctext);
11161 void gdk_free_text_list(char** list);
11162 Window* gdk_get_default_root_window();
11163 char* /*new*/ gdk_get_display();
11164 char* gdk_get_display_arg_name();
11165 char* gdk_get_program_class();
11166 int gdk_get_show_events();
11167 int gdk_get_use_xshm();
11168 void gdk_init(/*inout*/ int* argc, /*inout*/ char*** argv);
11169 int gdk_init_check(/*inout*/ int* argc, /*inout*/ char*** argv);
11170 int gdk_input_add(int source, InputCondition condition, InputFunction function_, void* data);
11171 int gdk_input_add_full(int source, InputCondition condition, InputFunction function_, void* data, GLib2.DestroyNotify destroy);
11172 void gdk_input_remove(int tag);
11173 void gdk_input_set_extension_events(Window* window, int mask, ExtensionMode mode);
11174 GrabStatus gdk_keyboard_grab(Window* window, int owner_events, uint time_);
11175 int gdk_keyboard_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events);
11176 void gdk_keyboard_ungrab(uint time_);
11177 void gdk_keyval_convert_case(uint symbol, /*out*/ uint* lower, /*out*/ uint* upper);
11178 uint gdk_keyval_from_name(char* keyval_name);
11179 int gdk_keyval_is_lower(uint keyval);
11180 int gdk_keyval_is_upper(uint keyval);
11181 char* gdk_keyval_name(uint keyval);
11182 uint gdk_keyval_to_lower(uint keyval);
11183 uint gdk_keyval_to_unicode(uint keyval);
11184 uint gdk_keyval_to_upper(uint keyval);
11185 GLib2.List* /*new container*/ gdk_list_visuals();
11186 int gdk_mbstowcs(WChar* dest, char* src, int dest_max);
11187 void gdk_notify_startup_complete();
11188 void gdk_notify_startup_complete_with_id(char* startup_id);
11189 Window* gdk_offscreen_window_get_embedder(Window* window);
11190 Pixmap* gdk_offscreen_window_get_pixmap(Window* window);
11191 void gdk_offscreen_window_set_embedder(Window* window, Window* embedder);
11192 Pango.Attribute* gdk_pango_attr_emboss_color_new(Color* color);
11193 Pango.Attribute* gdk_pango_attr_embossed_new(int embossed);
11194 Pango.Attribute* gdk_pango_attr_stipple_new(Bitmap* stipple);
11195 Pango.Context* gdk_pango_context_get();
11196 Pango.Context* gdk_pango_context_get_for_screen(Screen* screen);
11197 void gdk_pango_context_set_colormap(Pango.Context* context, Colormap* colormap);
11198 Region* gdk_pango_layout_get_clip_region(Pango.Layout* layout, int x_origin, int y_origin, int* index_ranges, int n_ranges);
11199 Region* gdk_pango_layout_line_get_clip_region(Pango.LayoutLine* line, int x_origin, int y_origin, int* index_ranges, int n_ranges);
11200 void gdk_parse_args(/*inout*/ int* argc, /*inout*/ char*** argv);
11201 GdkPixbuf2.Pixbuf* gdk_pixbuf_get_from_drawable(GdkPixbuf2.Pixbuf* dest, Drawable* src, Colormap* cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
11202 GdkPixbuf2.Pixbuf* gdk_pixbuf_get_from_image(GdkPixbuf2.Pixbuf* dest, Image* src, Colormap* cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
11203 void gdk_pixbuf_render_pixmap_and_mask(GdkPixbuf2.Pixbuf* pixbuf, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold);
11204 void gdk_pixbuf_render_pixmap_and_mask_for_colormap(GdkPixbuf2.Pixbuf* pixbuf, Colormap* colormap, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold);
11205 void gdk_pixbuf_render_threshold_alpha(GdkPixbuf2.Pixbuf* pixbuf, Bitmap* bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold);
11206 void gdk_pixbuf_render_to_drawable(GdkPixbuf2.Pixbuf* pixbuf, Drawable* drawable, GC* gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither);
11207 void gdk_pixbuf_render_to_drawable_alpha(GdkPixbuf2.Pixbuf* pixbuf, Drawable* drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, GdkPixbuf2.PixbufAlphaMode alpha_mode, int alpha_threshold, RgbDither dither, int x_dither, int y_dither);
11208 GrabStatus gdk_pointer_grab(Window* window, int owner_events, EventMask event_mask, Window* confine_to, Cursor* cursor, uint time_);
11209 int gdk_pointer_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events);
11210 int gdk_pointer_is_grabbed();
11211 void gdk_pointer_ungrab(uint time_);
11212 void gdk_pre_parse_libgtk_only();
11213 void gdk_property_change(Window* window, Atom property, Atom type, int format, PropMode mode, ubyte* data, int nelements);
11214 void gdk_property_delete(Window* window, Atom property);
11215 int gdk_property_get(Window* window, Atom property, Atom type, c_ulong offset, c_ulong length, int pdelete, Atom* actual_property_type, int* actual_format, int* actual_length, ubyte** data);
11216 void gdk_query_depths(/*out*/ int** depths, /*out*/ int* count);
11217 void gdk_query_visual_types(VisualType** visual_types, int* count);
11218 Region* gdk_region_new();
11219 Region* gdk_region_polygon(Point* points, int n_points, FillRule fill_rule);
11220 Region* gdk_region_rectangle(Rectangle* rectangle);
11221 RgbCmap* gdk_rgb_cmap_new(uint* colors, int n_colors);
11222 int gdk_rgb_colormap_ditherable(Colormap* cmap);
11223 int gdk_rgb_ditherable();
11224 void gdk_rgb_find_color(Colormap* colormap, Color* color);
11225 void gdk_rgb_gc_set_background(GC* gc, uint rgb);
11226 void gdk_rgb_gc_set_foreground(GC* gc, uint rgb);
11227 Colormap* gdk_rgb_get_colormap();
11228 Visual* gdk_rgb_get_visual();
11229 void gdk_rgb_init();
11230 void gdk_rgb_set_install(int install);
11231 void gdk_rgb_set_min_colors(int min_colors);
11232 void gdk_rgb_set_verbose(int verbose);
11233 c_ulong gdk_rgb_xpixel_from_rgb(uint rgb);
11234 void gdk_selection_convert(Window* requestor, Atom selection, Atom target, uint time_);
11235 Window* gdk_selection_owner_get(Atom selection);
11236 Window* gdk_selection_owner_get_for_display(Display* display, Atom selection);
11237 int gdk_selection_owner_set(Window* owner, Atom selection, uint time_, int send_event);
11238 int gdk_selection_owner_set_for_display(Display* display, Window* owner, Atom selection, uint time_, int send_event);
11239 int gdk_selection_property_get(Window* requestor, ubyte** data, Atom* prop_type, int* prop_format);
11240 void gdk_selection_send_notify(NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_);
11241 void gdk_selection_send_notify_for_display(Display* display, NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_);
11242 void gdk_set_double_click_time(uint msec);
11243 char* /*new*/ gdk_set_locale();
11244 PointerHooks* gdk_set_pointer_hooks(PointerHooks* new_hooks);
11245 void gdk_set_program_class(char* program_class);
11246 void gdk_set_show_events(int show_events);
11247 void gdk_set_sm_client_id(char* sm_client_id);
11248 void gdk_set_use_xshm(int use_xshm);
11249 int gdk_setting_get(char* name, GObject2.Value* value);
11250 int gdk_spawn_command_line_on_screen(Screen* screen, char* command_line, GLib2.Error** error);
11251 int gdk_spawn_on_screen(Screen* screen, char* working_directory, char** argv, char** envp, GLib2.SpawnFlags flags, GLib2.SpawnChildSetupFunc child_setup, void* user_data, int* child_pid, GLib2.Error** error);
11252 int gdk_spawn_on_screen_with_pipes(Screen* screen, char* working_directory, char** argv, char** envp, GLib2.SpawnFlags flags, GLib2.SpawnChildSetupFunc child_setup, void* user_data, int* child_pid, int* standard_input, int* standard_output, int* standard_error, GLib2.Error** error);
11253 void gdk_string_extents(Font* font, char* string_, int* lbearing, int* rbearing, int* width, int* ascent, int* descent);
11254 int gdk_string_height(Font* font, char* string_);
11255 int gdk_string_measure(Font* font, char* string_);
11256 int gdk_string_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
11257 int gdk_string_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
11258 int gdk_string_width(Font* font, char* string_);
11259 void gdk_synthesize_window_state(Window* window, WindowState unset_flags, WindowState set_flags);
11260 void gdk_test_render_sync(Window* window);
11261 int gdk_test_simulate_button(Window* window, int x, int y, uint button, ModifierType modifiers, EventType button_pressrelease);
11262 int gdk_test_simulate_key(Window* window, int x, int y, uint keyval, ModifierType modifiers, EventType key_pressrelease);
11263 void gdk_text_extents(Font* font, char* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent);
11264 void gdk_text_extents_wc(Font* font, WChar* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent);
11265 int gdk_text_height(Font* font, char* text, int text_length);
11266 int gdk_text_measure(Font* font, char* text, int text_length);
11267 int gdk_text_property_to_text_list(Atom encoding, int format, ubyte* text, int length, char*** list);
11268 int gdk_text_property_to_text_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list);
11269 int gdk_text_property_to_utf8_list(Atom encoding, int format, ubyte* text, int length, char*** list=null);
11270 int gdk_text_property_to_utf8_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list);
11271 int gdk_text_width(Font* font, char* text, int text_length);
11272 int gdk_text_width_wc(Font* font, WChar* text, int text_length);
11273 uint gdk_threads_add_idle(GLib2.SourceFunc function_, void* data);
11274 uint gdk_threads_add_idle_full(int priority, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null);
11275 uint gdk_threads_add_timeout(uint interval, GLib2.SourceFunc function_, void* data);
11276 uint gdk_threads_add_timeout_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null);
11277 uint gdk_threads_add_timeout_seconds(uint interval, GLib2.SourceFunc function_, void* data);
11278 uint gdk_threads_add_timeout_seconds_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null);
11279 void gdk_threads_enter();
11280 void gdk_threads_init();
11281 void gdk_threads_leave();
11282 void gdk_threads_set_lock_functions(GObject2.Callback enter_fn, GObject2.Callback leave_fn);
11283 uint gdk_unicode_to_keyval(uint wc);
11284 int gdk_utf8_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
11285 int gdk_utf8_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
11286 char* /*new*/ gdk_utf8_to_string_target(char* str);
11287 char* /*new*/ gdk_wcstombs(WChar* src);
11288 Window* gdk_window_at_pointer(/*out*/ int* win_x=null, /*out*/ int* win_y=null);
11289 void gdk_window_constrain_size(Geometry* geometry, uint flags, int width, int height, /*out*/ int* new_width, /*out*/ int* new_height);
11290 Window* gdk_window_foreign_new(NativeWindow anid);
11291 Window* gdk_window_foreign_new_for_display(Display* display, NativeWindow anid);
11292 GLib2.List* gdk_window_get_toplevels();
11293 Window* gdk_window_lookup(NativeWindow anid);
11294 Window* gdk_window_lookup_for_display(Display* display, NativeWindow anid);
11295 void gdk_window_process_all_updates();
11296 void gdk_window_set_debug_updates(int setting);