Support pre-GTK3 GLibs too.
[girtod.git] / gtk2 / gdk2.d
blob3d986d3b177a06c779d24ba6ef573aecd925b1f0
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_()() nothrow {
43 return gdk_app_launch_context_new();
45 alias new_!() opCall;
47 // VERSION: 2.14
48 // Sets the workspace on which applications will be launched when
49 // using this context when running under a window manager that
50 // supports multiple workspaces, as described in the
51 // <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
52 // Window Manager Hints</ulink>.
53 // When the workspace is not specified or @desktop is set to -1,
54 // it is up to the window manager to pick one, typically it will
55 // be the current workspace.
56 // <desktop>: the number of a workspace, or -1
57 void set_desktop()(int desktop) nothrow {
58 gdk_app_launch_context_set_desktop(&this, desktop);
61 // VERSION: 2.14
62 // Sets the display on which applications will be launched when
63 // using this context. See also gdk_app_launch_context_set_screen().
64 // <display>: a #GdkDisplay
65 void set_display()(Display* display) nothrow {
66 gdk_app_launch_context_set_display(&this, display);
69 // VERSION: 2.14
70 // Sets the icon for applications that are launched with this
71 // context.
72 // Window Managers can use this information when displaying startup
73 // notification.
74 // See also gdk_app_launch_context_set_icon_name().
75 // <icon>: a #GIcon, or %NULL
76 void set_icon()(Gio2.Icon* icon=null) nothrow {
77 gdk_app_launch_context_set_icon(&this, icon);
80 // VERSION: 2.14
81 // Sets the icon for applications that are launched with this context.
82 // The @icon_name will be interpreted in the same way as the Icon field
83 // in desktop files. See also gdk_app_launch_context_set_icon().
84 // If both @icon and @icon_name are set, the @icon_name takes priority.
85 // If neither @icon or @icon_name is set, the icon is taken from either
86 // the file that is passed to launched application or from the #GAppInfo
87 // for the launched application itself.
88 // <icon_name>: an icon name, or %NULL
89 void set_icon_name()(char* icon_name=null) nothrow {
90 gdk_app_launch_context_set_icon_name(&this, icon_name);
93 // VERSION: 2.14
94 // Sets the screen on which applications will be launched when
95 // using this context. See also gdk_app_launch_context_set_display().
96 // If both @screen and @display are set, the @screen takes priority.
97 // If neither @screen or @display are set, the default screen and
98 // display are used.
99 // <screen>: a #GdkScreen
100 void set_screen()(Screen* screen) nothrow {
101 gdk_app_launch_context_set_screen(&this, screen);
104 // VERSION: 2.14
105 // Sets the timestamp of @context. The timestamp should ideally
106 // be taken from the event that triggered the launch.
107 // Window managers can use this information to avoid moving the
108 // focus to the newly launched application when the user is busy
109 // typing in another window. This is also known as 'focus stealing
110 // prevention'.
111 // <timestamp>: a timestamp
112 void set_timestamp()(uint timestamp) nothrow {
113 gdk_app_launch_context_set_timestamp(&this, timestamp);
117 struct AppLaunchContextClass {
118 Gio2.AppLaunchContextClass parent_class;
121 struct AppLaunchContextPrivate {
124 struct Atom {
127 enum AxisUse {
128 IGNORE = 0,
129 X = 1,
130 Y = 2,
131 PRESSURE = 3,
132 XTILT = 4,
133 YTILT = 5,
134 WHEEL = 6,
135 LAST = 7
137 struct Bitmap {
140 enum ByteOrder {
141 LSB_FIRST = 0,
142 MSB_FIRST = 1
144 enum int CURRENT_TIME = 0;
145 enum CapStyle {
146 NOT_LAST = 0,
147 BUTT = 1,
148 ROUND = 2,
149 PROJECTING = 3
151 struct Color {
152 uint pixel;
153 ushort red, green, blue;
156 // Makes a copy of a color structure. The result
157 // must be freed using gdk_color_free().
158 // RETURNS: a copy of @color.
159 Color* /*new*/ copy()() nothrow {
160 return gdk_color_copy(&this);
163 // Compares two colors.
164 // RETURNS: %TRUE if the two colors compare equal
165 // <colorb>: another #GdkColor.
166 int equal()(Color* colorb) nothrow {
167 return gdk_color_equal(&this, colorb);
170 // Frees a color structure created with
171 // gdk_color_copy().
172 void free()() nothrow {
173 gdk_color_free(&this);
176 // A hash function suitable for using for a hash
177 // table that stores #GdkColor's.
178 // RETURNS: The hash function applied to @colora
179 uint hash()() nothrow {
180 return gdk_color_hash(&this);
183 // VERSION: 2.12
184 // Returns a textual specification of @color in the hexadecimal form
185 // <literal>&num;rrrrggggbbbb</literal>, where <literal>r</literal>,
186 // <literal>g</literal> and <literal>b</literal> are hex digits
187 // representing the red, green and blue components respectively.
188 // RETURNS: a newly-allocated text string
189 char* /*new*/ to_string()() nothrow {
190 return gdk_color_to_string(&this);
194 struct Colormap /* : GObject.Object */ {
195 alias parent_instance this;
196 alias parent_instance super_;
197 alias parent_instance object;
198 GObject2.Object parent_instance;
199 int size;
200 Color* colors;
201 private Visual* visual;
202 private void* windowing_data;
205 // Creates a new colormap for the given visual.
206 // RETURNS: the new #GdkColormap.
207 // <visual>: a #GdkVisual.
208 // <allocate>: if %TRUE, the newly created colormap will be a private colormap, and all colors in it will be allocated for the applications use.
209 static Colormap* /*new*/ new_()(Visual* visual, int allocate) nothrow {
210 return gdk_colormap_new(visual, allocate);
212 alias new_!() opCall;
214 // Unintrospectable function: get_system() / gdk_colormap_get_system()
215 // Gets the system's default colormap for the default screen. (See
216 // gdk_colormap_get_system_for_screen ())
217 // RETURNS: the default colormap.
218 static Colormap* get_system()() nothrow {
219 return gdk_colormap_get_system();
222 // Returns the size of the system's default colormap.
223 // (See the description of struct #GdkColormap for an
224 // explanation of the size of a colormap.)
225 // RETURNS: the size of the system's default colormap.
226 static int get_system_size()() nothrow {
227 return gdk_colormap_get_system_size();
230 // Allocates a single color from a colormap.
231 // RETURNS: %TRUE if the allocation succeeded.
232 // <color>: the color to allocate. On return the <structfield>pixel</structfield> field will be filled in if allocation succeeds.
233 // <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.
234 // <best_match>: If %TRUE, GDK will attempt to do matching against existing colors if the color cannot be allocated as requested.
235 int alloc_color()(Color* color, int writeable, int best_match) nothrow {
236 return gdk_colormap_alloc_color(&this, color, writeable, best_match);
239 // Allocates colors from a colormap.
240 // allocated.
241 // RETURNS: The number of colors that were not successfully
242 // <colors>: The color values to allocate. On return, the pixel values for allocated colors will be filled in.
243 // <n_colors>: The number of colors in @colors.
244 // <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.
245 // <best_match>: If %TRUE, GDK will attempt to do matching against existing colors if the colors cannot be allocated as requested.
246 // <success>: An array of length @ncolors. On return, this indicates whether the corresponding color in @colors was successfully allocated or not.
247 int alloc_colors()(Color* colors, int n_colors, int writeable, int best_match, int* success) nothrow {
248 return gdk_colormap_alloc_colors(&this, colors, n_colors, writeable, best_match, success);
251 // Changes the value of the first @ncolors in a private colormap
252 // to match the values in the <structfield>colors</structfield>
253 // array in the colormap. This function is obsolete and
254 // should not be used. See gdk_color_change().
255 // <ncolors>: the number of colors to change.
256 void change()(int ncolors) nothrow {
257 gdk_colormap_change(&this, ncolors);
260 // Frees previously allocated colors.
261 // <colors>: the colors to free.
262 // <n_colors>: the number of colors in @colors.
263 void free_colors()(Color* colors, int n_colors) nothrow {
264 gdk_colormap_free_colors(&this, colors, n_colors);
267 // Unintrospectable method: get_screen() / gdk_colormap_get_screen()
268 // VERSION: 2.2
269 // Gets the screen for which this colormap was created.
270 // RETURNS: the screen for which this colormap was created.
271 Screen* get_screen()() nothrow {
272 return gdk_colormap_get_screen(&this);
275 // Unintrospectable method: get_visual() / gdk_colormap_get_visual()
276 // Returns the visual for which a given colormap was created.
277 // RETURNS: the visual of the colormap.
278 Visual* get_visual()() nothrow {
279 return gdk_colormap_get_visual(&this);
282 // Locates the RGB color in @colormap corresponding to the given
283 // hardware pixel @pixel. @pixel must be a valid pixel in the
284 // colormap; it's a programmer error to call this function with a
285 // pixel which is not in the colormap. Hardware pixels are normally
286 // obtained from gdk_colormap_alloc_colors(), or from a #GdkImage. (A
287 // #GdkImage contains image data in hardware format, a #GdkPixbuf
288 // contains image data in a canonical 24-bit RGB format.)
289 // This function is rarely useful; it's used for example to
290 // implement the eyedropper feature in #GtkColorSelection.
291 // <pixel>: pixel value in hardware display format
292 // <result>: #GdkColor with red, green, blue fields initialized
293 void query_color()(c_ulong pixel, Color* result) nothrow {
294 gdk_colormap_query_color(&this, pixel, result);
297 // Unintrospectable method: ref() / gdk_colormap_ref()
298 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
299 // Deprecated function; use g_object_ref() instead.
300 // RETURNS: the colormap
301 Colormap* ref_()() nothrow {
302 return gdk_colormap_ref(&this);
305 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
306 // Deprecated function; use g_object_unref() instead.
307 void unref()() nothrow {
308 gdk_colormap_unref(&this);
312 struct ColormapClass {
313 GObject2.ObjectClass parent_class;
316 enum CrossingMode {
317 NORMAL = 0,
318 GRAB = 1,
319 UNGRAB = 2,
320 GTK_GRAB = 3,
321 GTK_UNGRAB = 4,
322 STATE_CHANGED = 5
324 struct Cursor {
325 CursorType type;
326 private uint ref_count;
329 // Creates a new cursor from the set of builtin cursors for the default display.
330 // See gdk_cursor_new_for_display().
331 // To make the cursor invisible, use %GDK_BLANK_CURSOR.
332 // RETURNS: a new #GdkCursor
333 // <cursor_type>: cursor to create
334 static Cursor* /*new*/ new_()(CursorType cursor_type) nothrow {
335 return gdk_cursor_new(cursor_type);
337 alias new_!() opCall;
339 // VERSION: 2.2
340 // Creates a new cursor from the set of builtin cursors.
341 // Some useful ones are:
342 // <itemizedlist>
343 // <listitem><para>
344 // <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic> #GDK_RIGHT_PTR (right-facing arrow)
345 // </para></listitem>
346 // <listitem><para>
347 // <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic> #GDK_CROSSHAIR (crosshair)
348 // </para></listitem>
349 // <listitem><para>
350 // <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic> #GDK_XTERM (I-beam)
351 // </para></listitem>
352 // <listitem><para>
353 // <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic> #GDK_WATCH (busy)
354 // </para></listitem>
355 // <listitem><para>
356 // <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic> #GDK_FLEUR (for moving objects)
357 // </para></listitem>
358 // <listitem><para>
359 // <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic> #GDK_HAND1 (a right-pointing hand)
360 // </para></listitem>
361 // <listitem><para>
362 // <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic> #GDK_HAND2 (a left-pointing hand)
363 // </para></listitem>
364 // <listitem><para>
365 // <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic> #GDK_LEFT_SIDE (resize left side)
366 // </para></listitem>
367 // <listitem><para>
368 // <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic> #GDK_RIGHT_SIDE (resize right side)
369 // </para></listitem>
370 // <listitem><para>
371 // <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic> #GDK_TOP_LEFT_CORNER (resize northwest corner)
372 // </para></listitem>
373 // <listitem><para>
374 // <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic> #GDK_TOP_RIGHT_CORNER (resize northeast corner)
375 // </para></listitem>
376 // <listitem><para>
377 // <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic> #GDK_BOTTOM_LEFT_CORNER (resize southwest corner)
378 // </para></listitem>
379 // <listitem><para>
380 // <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic> #GDK_BOTTOM_RIGHT_CORNER (resize southeast corner)
381 // </para></listitem>
382 // <listitem><para>
383 // <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic> #GDK_TOP_SIDE (resize top side)
384 // </para></listitem>
385 // <listitem><para>
386 // <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic> #GDK_BOTTOM_SIDE (resize bottom side)
387 // </para></listitem>
388 // <listitem><para>
389 // <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic> #GDK_SB_H_DOUBLE_ARROW (move vertical splitter)
390 // </para></listitem>
391 // <listitem><para>
392 // <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic> #GDK_SB_V_DOUBLE_ARROW (move horizontal splitter)
393 // </para></listitem>
394 // <listitem><para>
395 // #GDK_BLANK_CURSOR (Blank cursor). Since 2.16
396 // </para></listitem>
397 // </itemizedlist>
398 // RETURNS: a new #GdkCursor
399 // <display>: the #GdkDisplay for which the cursor will be created
400 // <cursor_type>: cursor to create
401 static Cursor* /*new*/ new_for_display()(Display* display, CursorType cursor_type) nothrow {
402 return gdk_cursor_new_for_display(display, cursor_type);
404 alias new_for_display!() opCall;
406 // VERSION: 2.8
407 // Creates a new cursor by looking up @name in the current cursor
408 // theme.
409 // the given name
410 // RETURNS: a new #GdkCursor, or %NULL if there is no cursor with
411 // <display>: the #GdkDisplay for which the cursor will be created
412 // <name>: the name of the cursor
413 static Cursor* /*new*/ new_from_name()(Display* display, char* name) nothrow {
414 return gdk_cursor_new_from_name(display, name);
416 alias new_from_name!() opCall;
418 // VERSION: 2.4
419 // Creates a new cursor from a pixbuf.
420 // Not all GDK backends support RGBA cursors. If they are not
421 // supported, a monochrome approximation will be displayed.
422 // The functions gdk_display_supports_cursor_alpha() and
423 // gdk_display_supports_cursor_color() can be used to determine
424 // whether RGBA cursors are supported;
425 // gdk_display_get_default_cursor_size() and
426 // gdk_display_get_maximal_cursor_size() give information about
427 // cursor sizes.
428 // If @x or @y are <literal>-1</literal>, the pixbuf must have
429 // options named "x_hot" and "y_hot", resp., containing
430 // integer values between %0 and the width resp. height of
431 // On the X backend, support for RGBA cursors requires a
432 // sufficently new version of the X Render extension.
433 // RETURNS: a new #GdkCursor.
434 // <display>: the #GdkDisplay for which the cursor will be created
435 // <pixbuf>: the #GdkPixbuf containing the cursor image
436 // <x>: the horizontal offset of the 'hotspot' of the cursor.
437 // <y>: the vertical offset of the 'hotspot' of the cursor.
438 static Cursor* /*new*/ new_from_pixbuf()(Display* display, GdkPixbuf2.Pixbuf* pixbuf, int x, int y) nothrow {
439 return gdk_cursor_new_from_pixbuf(display, pixbuf, x, y);
441 alias new_from_pixbuf!() opCall;
443 // Creates a new cursor from a given pixmap and mask. Both the pixmap and mask
444 // must have a depth of 1 (i.e. each pixel has only 2 values - on or off).
445 // The standard cursor size is 16 by 16 pixels. You can create a bitmap
446 // from inline data as in the below example.
447 // <example><title>Creating a custom cursor</title>
448 // <programlisting>
449 // /<!-- -->* This data is in X bitmap format, and can be created with the 'bitmap'
450 // utility. *<!-- -->/
451 // &num;define cursor1_width 16
452 // &num;define cursor1_height 16
453 // static unsigned char cursor1_bits[] = {
454 // 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
455 // 0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
456 // 0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01};
457 // static unsigned char cursor1mask_bits[] = {
458 // 0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31,
459 // 0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18,
460 // 0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01};
461 // GdkCursor *cursor;
462 // GdkPixmap *source, *mask;
463 // GdkColor fg = { 0, 65535, 0, 0 }; /<!-- -->* Red. *<!-- -->/
464 // GdkColor bg = { 0, 0, 0, 65535 }; /<!-- -->* Blue. *<!-- -->/
465 // source = gdk_bitmap_create_from_data (NULL, cursor1_bits,
466 // cursor1_width, cursor1_height);
467 // mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
468 // cursor1_width, cursor1_height);
469 // cursor = gdk_cursor_new_from_pixmap (source, mask, &amp;fg, &amp;bg, 8, 8);
470 // g_object_unref (source);
471 // g_object_unref (mask);
472 // gdk_window_set_cursor (widget->window, cursor);
473 // </programlisting>
474 // </example>
475 // RETURNS: a new #GdkCursor.
476 // <source>: the pixmap specifying the cursor.
477 // <mask>: the pixmap specifying the mask, which must be the same size as
478 // <fg>: the foreground color, used for the bits in the source which are 1. The color does not have to be allocated first.
479 // <bg>: the background color, used for the bits in the source which are 0. The color does not have to be allocated first.
480 // <x>: the horizontal offset of the 'hotspot' of the cursor.
481 // <y>: the vertical offset of the 'hotspot' of the cursor.
482 static Cursor* /*new*/ new_from_pixmap()(Pixmap* source, Pixmap* mask, Color* fg, Color* bg, int x, int y) nothrow {
483 return gdk_cursor_new_from_pixmap(source, mask, fg, bg, x, y);
485 alias new_from_pixmap!() opCall;
487 // VERSION: 2.22
488 // Returns the cursor type for this cursor.
489 // RETURNS: a #GdkCursorType
490 CursorType get_cursor_type()() nothrow {
491 return gdk_cursor_get_cursor_type(&this);
494 // Unintrospectable method: get_display() / gdk_cursor_get_display()
495 // VERSION: 2.2
496 // Returns the display on which the #GdkCursor is defined.
497 // RETURNS: the #GdkDisplay associated to @cursor
498 Display* get_display()() nothrow {
499 return gdk_cursor_get_display(&this);
502 // Unintrospectable method: get_image() / gdk_cursor_get_image()
503 // VERSION: 2.8
504 // Returns a #GdkPixbuf with the image used to display the cursor.
505 // Note that depending on the capabilities of the windowing system and
506 // on the cursor, GDK may not be able to obtain the image data. In this
507 // case, %NULL is returned.
508 // RETURNS: a #GdkPixbuf representing @cursor, or %NULL
509 GdkPixbuf2.Pixbuf* get_image()() nothrow {
510 return gdk_cursor_get_image(&this);
513 // Adds a reference to @cursor.
514 // RETURNS: Same @cursor that was passed in
515 Cursor* /*new*/ ref_()() nothrow {
516 return gdk_cursor_ref(&this);
519 // Removes a reference from @cursor, deallocating the cursor
520 // if no references remain.
521 void unref()() nothrow {
522 gdk_cursor_unref(&this);
526 enum CursorType {
527 X_CURSOR = 0,
528 ARROW = 2,
529 BASED_ARROW_DOWN = 4,
530 BASED_ARROW_UP = 6,
531 BOAT = 8,
532 BOGOSITY = 10,
533 BOTTOM_LEFT_CORNER = 12,
534 BOTTOM_RIGHT_CORNER = 14,
535 BOTTOM_SIDE = 16,
536 BOTTOM_TEE = 18,
537 BOX_SPIRAL = 20,
538 CENTER_PTR = 22,
539 CIRCLE = 24,
540 CLOCK = 26,
541 COFFEE_MUG = 28,
542 CROSS = 30,
543 CROSS_REVERSE = 32,
544 CROSSHAIR = 34,
545 DIAMOND_CROSS = 36,
546 DOT = 38,
547 DOTBOX = 40,
548 DOUBLE_ARROW = 42,
549 DRAFT_LARGE = 44,
550 DRAFT_SMALL = 46,
551 DRAPED_BOX = 48,
552 EXCHANGE = 50,
553 FLEUR = 52,
554 GOBBLER = 54,
555 GUMBY = 56,
556 HAND1 = 58,
557 HAND2 = 60,
558 HEART = 62,
559 ICON = 64,
560 IRON_CROSS = 66,
561 LEFT_PTR = 68,
562 LEFT_SIDE = 70,
563 LEFT_TEE = 72,
564 LEFTBUTTON = 74,
565 LL_ANGLE = 76,
566 LR_ANGLE = 78,
567 MAN = 80,
568 MIDDLEBUTTON = 82,
569 MOUSE = 84,
570 PENCIL = 86,
571 PIRATE = 88,
572 PLUS = 90,
573 QUESTION_ARROW = 92,
574 RIGHT_PTR = 94,
575 RIGHT_SIDE = 96,
576 RIGHT_TEE = 98,
577 RIGHTBUTTON = 100,
578 RTL_LOGO = 102,
579 SAILBOAT = 104,
580 SB_DOWN_ARROW = 106,
581 SB_H_DOUBLE_ARROW = 108,
582 SB_LEFT_ARROW = 110,
583 SB_RIGHT_ARROW = 112,
584 SB_UP_ARROW = 114,
585 SB_V_DOUBLE_ARROW = 116,
586 SHUTTLE = 118,
587 SIZING = 120,
588 SPIDER = 122,
589 SPRAYCAN = 124,
590 STAR = 126,
591 TARGET = 128,
592 TCROSS = 130,
593 TOP_LEFT_ARROW = 132,
594 TOP_LEFT_CORNER = 134,
595 TOP_RIGHT_CORNER = 136,
596 TOP_SIDE = 138,
597 TOP_TEE = 140,
598 TREK = 142,
599 UL_ANGLE = 144,
600 UMBRELLA = 146,
601 UR_ANGLE = 148,
602 WATCH = 150,
603 XTERM = 152,
604 LAST_CURSOR = 153,
605 BLANK_CURSOR = -2,
606 CURSOR_IS_PIXMAP = -1
608 extern (C) alias void function (void* data) nothrow DestroyNotify;
610 struct Device /* : GObject.Object */ {
611 alias parent_instance this;
612 alias parent_instance super_;
613 alias parent_instance object;
614 GObject2.Object parent_instance;
615 char* name;
616 InputSource source;
617 InputMode mode;
618 int has_cursor;
619 int num_axes;
620 DeviceAxis* axes;
621 int num_keys;
622 DeviceKey* keys;
625 // Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
626 // <events>: an array of #GdkTimeCoord.
627 // <n_events>: the length of the array.
628 static void free_history()(/*inout*/ TimeCoord** events, int n_events) nothrow {
629 gdk_device_free_history(events, n_events);
632 // Unintrospectable function: get_core_pointer() / gdk_device_get_core_pointer()
633 // Returns the core pointer device for the default display.
634 // display and should not be freed.
635 // RETURNS: the core pointer device; this is owned by the
636 static Device* get_core_pointer()() nothrow {
637 return gdk_device_get_core_pointer();
640 // Interprets an array of double as axis values for a given device,
641 // and locates the value in the array for a given axis use.
642 // RETURNS: %TRUE if the given axis use was found, otherwise %FALSE
643 // <axes>: pointer to an array of axes
644 // <use>: the use to look for
645 // <value>: location to store the found value.
646 int get_axis()(double* axes, AxisUse use, double* value) nothrow {
647 return gdk_device_get_axis(&this, axes, use, value);
650 // VERSION: 2.22
651 // Returns the axis use for @index.
652 // RETURNS: a #GdkAxisUse specifying how the axis is used.
653 // <index>: the index of the axis.
654 AxisUse get_axis_use()(uint index) nothrow {
655 return gdk_device_get_axis_use(&this, index);
658 // VERSION: 2.22
659 // Determines whether the pointer follows device motion.
660 // RETURNS: %TRUE if the pointer follows device motion
661 int get_has_cursor()() nothrow {
662 return gdk_device_get_has_cursor(&this);
665 // Obtains the motion history for a device; given a starting and
666 // ending timestamp, return all events in the motion history for
667 // the device in the given range of time. Some windowing systems
668 // do not support motion history, in which case, %FALSE will
669 // be returned. (This is not distinguishable from the case where
670 // motion history is supported and no events were found.)
671 // at least one event was found.
672 // RETURNS: %TRUE if the windowing system supports motion history and
673 // <window>: the window with respect to which which the event coordinates will be reported
674 // <start>: starting timestamp for range of events to return
675 // <stop>: ending timestamp for the range of events to return
676 // <events>: location to store a newly-allocated array of #GdkTimeCoord, or %NULL
677 // <n_events>: location to store the length of @events, or %NULL
678 int get_history()(Window* window, uint start, uint stop, /*out*/ TimeCoord*** events, /*out*/ int* n_events) nothrow {
679 return gdk_device_get_history(&this, window, start, stop, events, n_events);
682 // VERSION: 2.22
683 // If @index has a valid keyval, this function will
684 // fill in @keyval and @modifiers with the keyval settings.
685 // <index>: the index of the macro button to get.
686 // <keyval>: return value for the keyval.
687 // <modifiers>: return value for modifiers.
688 void get_key()(uint index, uint* keyval, ModifierType* modifiers) nothrow {
689 gdk_device_get_key(&this, index, keyval, modifiers);
692 // VERSION: 2.22
693 // Determines the mode of the device.
694 // RETURNS: a #GdkInputSource
695 InputMode get_mode()() nothrow {
696 return gdk_device_get_mode(&this);
699 // VERSION: 2.22
700 // Gets the number of axes of a device.
701 // RETURNS: the number of axes of @device
702 int get_n_axes()() nothrow {
703 return gdk_device_get_n_axes(&this);
706 // VERSION: 2.24
707 // Gets the number of keys of a device.
708 // RETURNS: the number of keys of @device
709 int get_n_keys()() nothrow {
710 return gdk_device_get_n_keys(&this);
713 // VERSION: 2.22
714 // Determines the name of the device.
715 // RETURNS: a name
716 char* get_name()() nothrow {
717 return gdk_device_get_name(&this);
720 // VERSION: 2.22
721 // Determines the type of the device.
722 // RETURNS: a #GdkInputSource
723 InputSource get_source()() nothrow {
724 return gdk_device_get_source(&this);
726 void get_state()(Window* window, double* axes, ModifierType* mask) nothrow {
727 gdk_device_get_state(&this, window, axes, mask);
729 void set_axis_use()(uint index_, AxisUse use) nothrow {
730 gdk_device_set_axis_use(&this, index_, use);
732 void set_key()(uint index_, uint keyval, ModifierType modifiers) nothrow {
733 gdk_device_set_key(&this, index_, keyval, modifiers);
735 int set_mode()(InputMode mode) nothrow {
736 return gdk_device_set_mode(&this, mode);
738 void set_source()(InputSource source) nothrow {
739 gdk_device_set_source(&this, source);
743 struct DeviceAxis {
744 AxisUse use;
745 double min, max;
748 struct DeviceClass {
751 struct DeviceKey {
752 uint keyval;
753 ModifierType modifiers;
756 struct Display /* : GObject.Object */ {
757 alias parent_instance this;
758 alias parent_instance super_;
759 alias parent_instance object;
760 GObject2.Object parent_instance;
761 private GLib2.List* queued_events, queued_tail;
762 private uint[2] button_click_time;
763 private Window*[2] button_window;
764 private int[2] button_number;
765 private uint double_click_time;
766 private Device* core_pointer;
767 private DisplayPointerHooks* pointer_hooks;
768 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
769 uint, "closed_", 1,
770 uint, "ignore_core_events", 1,
771 uint, "__dummy32A", 30));
772 private uint double_click_distance;
773 private int[2] button_x, button_y;
774 private GLib2.List* pointer_grabs;
775 private KeyboardGrabInfo keyboard_grab;
776 private PointerWindowInfo pointer_info;
777 private uint last_event_time;
780 // VERSION: 2.2
781 // Gets the default #GdkDisplay. This is a convenience
782 // function for
783 // <literal>gdk_display_manager_get_default_display (gdk_display_manager_get ())</literal>.
784 // display.
785 // RETURNS: a #GdkDisplay, or %NULL if there is no default
786 static Display* get_default()() nothrow {
787 return gdk_display_get_default();
790 // Unintrospectable function: open() / gdk_display_open()
791 // VERSION: 2.2
792 // Opens a display.
793 // RETURNS: a #GdkDisplay, or %NULL if the display could not be opened.
794 // <display_name>: the name of the display to open
795 static Display* open()(char* display_name) nothrow {
796 return gdk_display_open(display_name);
799 // Unintrospectable function: open_default_libgtk_only() / gdk_display_open_default_libgtk_only()
800 // Opens the default display specified by command line arguments or
801 // environment variables, sets it as the default display, and returns
802 // it. gdk_parse_args must have been called first. If the default
803 // display has previously been set, simply returns that. An internal
804 // function that should not be used by applications.
805 // otherwise %NULL.
806 // RETURNS: the default display, if it could be opened,
807 static Display* open_default_libgtk_only()() nothrow {
808 return gdk_display_open_default_libgtk_only();
810 // Unintrospectable method: add_client_message_filter() / gdk_display_add_client_message_filter()
811 void add_client_message_filter()(Atom message_type, FilterFunc func, void* data) nothrow {
812 gdk_display_add_client_message_filter(&this, message_type, func, data);
815 // VERSION: 2.2
816 // Emits a short beep on @display
817 void beep()() nothrow {
818 gdk_display_beep(&this);
821 // VERSION: 2.2
822 // Closes the connection to the windowing system for the given display,
823 // and cleans up associated resources.
824 void close()() nothrow {
825 gdk_display_close(&this);
828 // VERSION: 2.4
829 // Flushes any requests queued for the windowing system; this happens automatically
830 // when the main loop blocks waiting for new events, but if your application
831 // is drawing without returning control to the main loop, you may need
832 // to call this function explicitely. A common case where this function
833 // needs to be called is when an application is executing drawing commands
834 // from a thread other than the thread where the main loop is running.
835 // This is most useful for X11. On windowing systems where requests are
836 // handled synchronously, this function will do nothing.
837 void flush()() nothrow {
838 gdk_display_flush(&this);
841 // Unintrospectable method: get_core_pointer() / gdk_display_get_core_pointer()
842 // VERSION: 2.2
843 // Returns the core pointer device for the given display
844 // display and should not be freed.
845 // RETURNS: the core pointer device; this is owned by the
846 Device* get_core_pointer()() nothrow {
847 return gdk_display_get_core_pointer(&this);
850 // VERSION: 2.4
851 // Returns the default size to use for cursors on @display.
852 // RETURNS: the default cursor size.
853 uint get_default_cursor_size()() nothrow {
854 return gdk_display_get_default_cursor_size(&this);
857 // Unintrospectable method: get_default_group() / gdk_display_get_default_group()
858 // VERSION: 2.4
859 // Returns the default group leader window for all toplevel windows
860 // on @display. This window is implicitly created by GDK.
861 // See gdk_window_set_group().
862 // RETURNS: The default group leader window for @display
863 Window* get_default_group()() nothrow {
864 return gdk_display_get_default_group(&this);
867 // Unintrospectable method: get_default_screen() / gdk_display_get_default_screen()
868 // VERSION: 2.2
869 // Get the default #GdkScreen for @display.
870 // RETURNS: the default #GdkScreen object for @display
871 Screen* get_default_screen()() nothrow {
872 return gdk_display_get_default_screen(&this);
875 // VERSION: 2.2
876 // Gets the next #GdkEvent to be processed for @display, fetching events from the
877 // windowing system if necessary.
878 // are pending. The returned #GdkEvent should be freed with gdk_event_free().
879 // RETURNS: the next #GdkEvent to be processed, or %NULL if no events
880 Event* /*new*/ get_event()() nothrow {
881 return gdk_display_get_event(&this);
884 // VERSION: 2.4
885 // Gets the maximal size to use for cursors on @display.
886 // <width>: the return location for the maximal cursor width
887 // <height>: the return location for the maximal cursor height
888 void get_maximal_cursor_size()(/*out*/ uint* width, /*out*/ uint* height) nothrow {
889 gdk_display_get_maximal_cursor_size(&this, width, height);
892 // VERSION: 2.2
893 // Gets the number of screen managed by the @display.
894 // RETURNS: number of screens.
895 int get_n_screens()() nothrow {
896 return gdk_display_get_n_screens(&this);
899 // VERSION: 2.2
900 // Gets the name of the display.
901 // by GDK and should not be modified or freed.
902 // RETURNS: a string representing the display name. This string is owned
903 char* get_name()() nothrow {
904 return gdk_display_get_name(&this);
907 // VERSION: 2.2
908 // Gets the current location of the pointer and the current modifier
909 // mask for a given display.
910 // <screen>: location to store the screen that the cursor is on, or %NULL.
911 // <x>: location to store root window X coordinate of pointer, or %NULL.
912 // <y>: location to store root window Y coordinate of pointer, or %NULL.
913 // <mask>: location to store current modifier mask, or %NULL
914 void get_pointer()(/*out*/ Screen** screen=null, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) nothrow {
915 gdk_display_get_pointer(&this, screen, x, y, mask);
918 // Unintrospectable method: get_screen() / gdk_display_get_screen()
919 // VERSION: 2.2
920 // Returns a screen object for one of the screens of the display.
921 // RETURNS: the #GdkScreen object
922 // <screen_num>: the screen number
923 Screen* get_screen()(int screen_num) nothrow {
924 return gdk_display_get_screen(&this, screen_num);
927 // VERSION: 2.2
928 // Obtains the window underneath the mouse pointer, returning the location
929 // of the pointer in that window in @win_x, @win_y for @screen. Returns %NULL
930 // if the window under the mouse pointer is not known to GDK (for example,
931 // belongs to another application).
932 // RETURNS: the window under the mouse pointer, or %NULL
933 // <win_x>: return location for x coordinate of the pointer location relative to the window origin, or %NULL
934 // <win_y>: return location for y coordinate of the pointer location relative
935 Window* get_window_at_pointer()(/*out*/ int* win_x=null, /*out*/ int* win_y=null) nothrow {
936 return gdk_display_get_window_at_pointer(&this, win_x, win_y);
939 // VERSION: 2.22
940 // Finds out if the display has been closed.
941 // RETURNS: %TRUE if the display is closed.
942 int is_closed()() nothrow {
943 return gdk_display_is_closed(&this);
946 // VERSION: 2.2
947 // Release any keyboard grab
948 // <time_>: a timestap (e.g #GDK_CURRENT_TIME).
949 void keyboard_ungrab()(uint time_) nothrow {
950 gdk_display_keyboard_ungrab(&this, time_);
953 // Unintrospectable method: list_devices() / gdk_display_list_devices()
954 // VERSION: 2.2
955 // Returns the list of available input devices attached to @display.
956 // The list is statically allocated and should not be freed.
957 // RETURNS: a list of #GdkDevice
958 GLib2.List* list_devices()() nothrow {
959 return gdk_display_list_devices(&this);
962 // VERSION: 2.2
963 // Gets a copy of the first #GdkEvent in the @display's event queue, without
964 // removing the event from the queue. (Note that this function will
965 // not get more events from the windowing system. It only checks the events
966 // that have already been moved to the GDK event queue.)
967 // if no events are in the queue. The returned #GdkEvent should be freed with
968 // gdk_event_free().
969 // RETURNS: a copy of the first #GdkEvent on the event queue, or %NULL
970 Event* /*new*/ peek_event()() nothrow {
971 return gdk_display_peek_event(&this);
974 // VERSION: 2.2
975 // Test if the pointer is grabbed.
976 // RETURNS: %TRUE if an active X pointer grab is in effect
977 int pointer_is_grabbed()() nothrow {
978 return gdk_display_pointer_is_grabbed(&this);
981 // VERSION: 2.2
982 // Release any pointer grab.
983 // <time_>: a timestap (e.g. %GDK_CURRENT_TIME).
984 void pointer_ungrab()(uint time_) nothrow {
985 gdk_display_pointer_ungrab(&this, time_);
988 // VERSION: 2.2
989 // Appends a copy of the given event onto the front of the event
990 // queue for @display.
991 // <event>: a #GdkEvent.
992 void put_event()(Event* event) nothrow {
993 gdk_display_put_event(&this, event);
996 // VERSION: 2.6
997 // Request #GdkEventOwnerChange events for ownership changes
998 // of the selection named by the given atom.
999 // be sent.
1000 // RETURNS: whether #GdkEventOwnerChange events will
1001 // <selection>: the #GdkAtom naming the selection for which ownership change notification is requested
1002 int request_selection_notification()(Atom selection) nothrow {
1003 return gdk_display_request_selection_notification(&this, selection);
1006 // VERSION: 2.4
1007 // Sets the double click distance (two clicks within this distance
1008 // count as a double click and result in a #GDK_2BUTTON_PRESS event).
1009 // See also gdk_display_set_double_click_time().
1010 // Applications should <emphasis>not</emphasis> set this, it is a global
1011 // user-configured setting.
1012 // <distance>: distance in pixels
1013 void set_double_click_distance()(uint distance) nothrow {
1014 gdk_display_set_double_click_distance(&this, distance);
1017 // VERSION: 2.2
1018 // Sets the double click time (two clicks within this time interval
1019 // count as a double click and result in a #GDK_2BUTTON_PRESS event).
1020 // Applications should <emphasis>not</emphasis> set this, it is a global
1021 // user-configured setting.
1022 // <msec>: double click time in milliseconds (thousandths of a second)
1023 void set_double_click_time()(uint msec) nothrow {
1024 gdk_display_set_double_click_time(&this, msec);
1027 // Unintrospectable method: set_pointer_hooks() / gdk_display_set_pointer_hooks()
1028 // VERSION: 2.2
1029 // DEPRECATED (v2.24) method: set_pointer_hooks - This function will go away in GTK 3 for lack of use cases.
1030 // This function allows for hooking into the operation
1031 // of getting the current location of the pointer on a particular
1032 // display. This is only useful for such low-level tools as an
1033 // event recorder. Applications should never have any
1034 // reason to use this facility.
1035 // RETURNS: the previous pointer hook table
1036 // <new_hooks>: a table of pointers to functions for getting quantities related to the current pointer position, or %NULL to restore the default table.
1037 DisplayPointerHooks* set_pointer_hooks()(DisplayPointerHooks* new_hooks) nothrow {
1038 return gdk_display_set_pointer_hooks(&this, new_hooks);
1041 // VERSION: 2.6
1042 // Issues a request to the clipboard manager to store the
1043 // clipboard data. On X11, this is a special program that works
1044 // according to the freedesktop clipboard specification, available at
1045 // <ulink url="http://www.freedesktop.org/Standards/clipboard-manager-spec">
1046 // http://www.freedesktop.org/Standards/clipboard-manager-spec</ulink>.
1047 // <clipboard_window>: a #GdkWindow belonging to the clipboard owner
1048 // <time_>: a timestamp if all available targets should be saved.
1049 // <n_targets>: length of the @targets array
1050 void store_clipboard()(Window* clipboard_window, uint time_, Atom* targets, int n_targets) nothrow {
1051 gdk_display_store_clipboard(&this, clipboard_window, time_, targets, n_targets);
1054 // VERSION: 2.6
1055 // Returns whether the speicifed display supports clipboard
1056 // persistance; i.e. if it's possible to store the clipboard data after an
1057 // application has quit. On X11 this checks if a clipboard daemon is
1058 // running.
1059 // RETURNS: %TRUE if the display supports clipboard persistance.
1060 int supports_clipboard_persistence()() nothrow {
1061 return gdk_display_supports_clipboard_persistence(&this);
1064 // VERSION: 2.12
1065 // Returns %TRUE if gdk_window_set_composited() can be used
1066 // to redirect drawing on the window using compositing.
1067 // Currently this only works on X11 with XComposite and
1068 // XDamage extensions available.
1069 // RETURNS: %TRUE if windows may be composited.
1070 int supports_composite()() nothrow {
1071 return gdk_display_supports_composite(&this);
1074 // VERSION: 2.4
1075 // Returns %TRUE if cursors can use an 8bit alpha channel
1076 // on @display. Otherwise, cursors are restricted to bilevel
1077 // alpha (i.e. a mask).
1078 // RETURNS: whether cursors can have alpha channels.
1079 int supports_cursor_alpha()() nothrow {
1080 return gdk_display_supports_cursor_alpha(&this);
1083 // VERSION: 2.4
1084 // Returns %TRUE if multicolored cursors are supported
1085 // on @display. Otherwise, cursors have only a forground
1086 // and a background color.
1087 // RETURNS: whether cursors can have multiple colors.
1088 int supports_cursor_color()() nothrow {
1089 return gdk_display_supports_cursor_color(&this);
1092 // VERSION: 2.10
1093 // Returns %TRUE if gdk_window_input_shape_combine_mask() can
1094 // be used to modify the input shape of windows on @display.
1095 // RETURNS: %TRUE if windows with modified input shape are supported
1096 int supports_input_shapes()() nothrow {
1097 return gdk_display_supports_input_shapes(&this);
1100 // VERSION: 2.6
1101 // Returns whether #GdkEventOwnerChange events will be
1102 // sent when the owner of a selection changes.
1103 // be sent.
1104 // RETURNS: whether #GdkEventOwnerChange events will
1105 int supports_selection_notification()() nothrow {
1106 return gdk_display_supports_selection_notification(&this);
1109 // VERSION: 2.10
1110 // Returns %TRUE if gdk_window_shape_combine_mask() can
1111 // be used to create shaped windows on @display.
1112 // RETURNS: %TRUE if shaped windows are supported
1113 int supports_shapes()() nothrow {
1114 return gdk_display_supports_shapes(&this);
1117 // VERSION: 2.2
1118 // Flushes any requests queued for the windowing system and waits until all
1119 // requests have been handled. This is often used for making sure that the
1120 // display is synchronized with the current state of the program. Calling
1121 // gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors
1122 // generated from earlier requests are handled before the error trap is
1123 // removed.
1124 // This is most useful for X11. On windowing systems where requests are
1125 // handled synchronously, this function will do nothing.
1126 void sync()() nothrow {
1127 gdk_display_sync(&this);
1130 // VERSION: 2.8
1131 // Warps the pointer of @display to the point @x,@y on
1132 // the screen @screen, unless the pointer is confined
1133 // to a window by a grab, in which case it will be moved
1134 // as far as allowed by the grab. Warping the pointer
1135 // creates events as if the user had moved the mouse
1136 // instantaneously to the destination.
1137 // Note that the pointer should normally be under the
1138 // control of the user. This function was added to cover
1139 // some rare use cases like keyboard navigation support
1140 // for the color picker in the #GtkColorSelectionDialog.
1141 // <screen>: the screen of @display to warp the pointer to
1142 // <x>: the x coordinate of the destination
1143 // <y>: the y coordinate of the destination
1144 void warp_pointer()(Screen* screen, int x, int y) nothrow {
1145 gdk_display_warp_pointer(&this, screen, x, y);
1148 // VERSION: 2.2
1149 // The ::closed signal is emitted when the connection to the windowing
1150 // system for @display is closed.
1151 // <is_error>: %TRUE if the display was closed due to an error
1152 extern (C) alias static void function (Display* this_, c_int is_error, void* user_data=null) nothrow signal_closed;
1154 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1155 return super_.signal_connect!name(cb, data, cf);
1158 ulong signal_connect(string name:"closed", CB:signal_closed)
1159 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1160 if (is(typeof(cb)==signal_closed)||_ttmm!(CB, signal_closed)()) {
1161 return signal_connect_data!()(&this, cast(char*)"closed",
1162 cast(GObject2.Callback)cb, data, null, cf);
1166 struct DisplayClass {
1167 GObject2.ObjectClass parent_class;
1168 extern (C) char* function (Display* display) nothrow get_display_name;
1169 // RETURNS: number of screens.
1170 extern (C) int function (Display* display) nothrow get_n_screens;
1172 // Unintrospectable functionp: get_screen() / ()
1174 // RETURNS: the #GdkScreen object
1175 // <screen_num>: the screen number
1176 extern (C) Screen* function (Display* display, int screen_num) nothrow get_screen;
1178 // Unintrospectable functionp: get_default_screen() / ()
1180 // RETURNS: the default #GdkScreen object for @display
1181 extern (C) Screen* function (Display* display) nothrow get_default_screen;
1182 extern (C) void function (Display* display, int is_error) nothrow closed;
1185 struct DisplayManager /* : GObject.Object */ {
1186 alias method_parent this;
1187 alias method_parent super_;
1188 alias method_parent object;
1189 GObject2.Object method_parent;
1192 // VERSION: 2.2
1193 // Gets the singleton #GdkDisplayManager object.
1194 // gdk_init(), or gdk_init_check() must have been called first.
1195 // RETURNS: The global #GdkDisplayManager singleton; gdk_parse_pargs(),
1196 static DisplayManager* get()() nothrow {
1197 return gdk_display_manager_get();
1200 // VERSION: 2.2
1201 // Gets the default #GdkDisplay.
1202 // display.
1203 // RETURNS: a #GdkDisplay, or %NULL if there is no default
1204 Display* get_default_display()() nothrow {
1205 return gdk_display_manager_get_default_display(&this);
1208 // VERSION: 2.2
1209 // List all currently open displays.
1210 // #GSList of #GdkDisplay objects. Free this list with g_slist_free() when you
1211 // are done with it.
1212 // RETURNS: a newly allocated
1213 GLib2.SList* /*new container*/ list_displays()() nothrow {
1214 return gdk_display_manager_list_displays(&this);
1217 // VERSION: 2.2
1218 // Sets @display as the default display.
1219 // <display>: a #GdkDisplay
1220 void set_default_display()(Display* display) nothrow {
1221 gdk_display_manager_set_default_display(&this, display);
1224 // VERSION: 2.2
1225 // The ::display_opened signal is emitted when a display is opened.
1226 // <display>: the opened display
1227 extern (C) alias static void function (DisplayManager* this_, Display* display, void* user_data=null) nothrow signal_display_opened;
1229 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1230 return super_.signal_connect!name(cb, data, cf);
1233 ulong signal_connect(string name:"display-opened", CB:signal_display_opened)
1234 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
1235 if (is(typeof(cb)==signal_display_opened)||_ttmm!(CB, signal_display_opened)()) {
1236 return signal_connect_data!()(&this, cast(char*)"display-opened",
1237 cast(GObject2.Callback)cb, data, null, cf);
1241 struct DisplayManagerClass {
1242 GObject2.ObjectClass parent_class;
1243 extern (C) void function (DisplayManager* display_manager, Display* display) nothrow display_opened;
1246 struct DisplayPointerHooks {
1247 extern (C) void function (Display* display, Screen** screen, int* x, int* y, ModifierType* mask) nothrow get_pointer;
1248 // Unintrospectable functionp: window_get_pointer() / ()
1249 extern (C) Window* function (Display* display, Window* window, int* x, int* y, ModifierType* mask) nothrow window_get_pointer;
1250 // Unintrospectable functionp: window_at_pointer() / ()
1251 extern (C) Window* function (Display* display, int* win_x, int* win_y) nothrow window_at_pointer;
1254 enum DragAction {
1255 DEFAULT = 1,
1256 COPY = 2,
1257 MOVE = 4,
1258 LINK = 8,
1259 PRIVATE = 16,
1260 ASK = 32
1262 struct DragContext /* : GObject.Object */ {
1263 alias parent_instance this;
1264 alias parent_instance super_;
1265 alias parent_instance object;
1266 GObject2.Object parent_instance;
1267 DragProtocol protocol;
1268 int is_source;
1269 Window* source_window, dest_window;
1270 GLib2.List* targets;
1271 DragAction actions, suggested_action, action;
1272 uint start_time;
1273 private void* windowing_data;
1276 // DEPRECATED (v2.24) constructor: new - This function is not useful, you always
1277 // Creates a new #GdkDragContext.
1278 // obtain drag contexts by gdk_drag_begin() or similar.
1279 // RETURNS: the newly created #GdkDragContext.
1280 static DragContext* /*new*/ new_()() nothrow {
1281 return gdk_drag_context_new();
1283 alias new_!() opCall;
1285 // VERSION: 2.22
1286 // Determines the bitmask of actions proposed by the source if
1287 // gdk_drag_context_suggested_action() returns GDK_ACTION_ASK.
1288 // RETURNS: the #GdkDragAction flags
1289 DragAction get_actions()() nothrow {
1290 return gdk_drag_context_get_actions(&this);
1293 // VERSION: 2.24
1294 // Returns the destination windw for the DND operation.
1295 // RETURNS: a #GdkWindow
1296 Window* get_dest_window()() nothrow {
1297 return gdk_drag_context_get_dest_window(&this);
1300 // VERSION: 2.24
1301 // Returns the drag protocol thats used by this context.
1302 // RETURNS: the drag protocol
1303 DragProtocol get_protocol()() nothrow {
1304 return gdk_drag_context_get_protocol(&this);
1307 // VERSION: 2.22
1308 // Determines the action chosen by the drag destination.
1309 // RETURNS: a #GdkDragAction value
1310 DragAction get_selected_action()() nothrow {
1311 return gdk_drag_context_get_selected_action(&this);
1314 // VERSION: 2.22
1315 // Returns the #GdkWindow where the DND operation started.
1316 // RETURNS: a #GdkWindow
1317 Window* get_source_window()() nothrow {
1318 return gdk_drag_context_get_source_window(&this);
1321 // VERSION: 2.22
1322 // Determines the suggested drag action of the context.
1323 // RETURNS: a #GdkDragAction value
1324 DragAction get_suggested_action()() nothrow {
1325 return gdk_drag_context_get_suggested_action(&this);
1328 // VERSION: 2.22
1329 // Retrieves the list of targets of the context.
1330 // RETURNS: a #GList of targets
1331 GLib2.List* list_targets()() nothrow {
1332 return gdk_drag_context_list_targets(&this);
1335 // DEPRECATED (v2.2) method: ref - Use g_object_ref() instead.
1336 // Deprecated function; use g_object_ref() instead.
1337 void ref_()() nothrow {
1338 gdk_drag_context_ref(&this);
1341 // DEPRECATED (v2.2) method: unref - Use g_object_unref() instead.
1342 // Deprecated function; use g_object_unref() instead.
1343 void unref()() nothrow {
1344 gdk_drag_context_unref(&this);
1348 struct DragContextClass {
1349 GObject2.ObjectClass parent_class;
1352 enum DragProtocol {
1353 MOTIF = 0,
1354 XDND = 1,
1355 ROOTWIN = 2,
1356 NONE = 3,
1357 WIN32_DROPFILES = 4,
1358 OLE2 = 5,
1359 LOCAL = 6
1361 struct Drawable /* : GObject.Object */ {
1362 alias parent_instance this;
1363 alias parent_instance super_;
1364 alias parent_instance object;
1365 GObject2.Object parent_instance;
1368 // Unintrospectable method: copy_to_image() / gdk_drawable_copy_to_image()
1369 // VERSION: 2.4
1370 // DEPRECATED (v2.22) method: copy_to_image - Use @drawable as the source and draw to a Cairo image
1371 // Copies a portion of @drawable into the client side image structure
1372 // and copies into that. See gdk_drawable_get_image() for further details.
1373 // of @drawable
1374 // surface if you want to download contents to the client.
1375 // RETURNS: @image, or a new a #GdkImage containing the contents
1376 // <image>: a #GdkDrawable, or %NULL if a new @image should be created.
1377 // <src_x>: x coordinate on @drawable
1378 // <src_y>: y coordinate on @drawable
1379 // <dest_x>: x coordinate within @image. Must be 0 if @image is %NULL
1380 // <dest_y>: y coordinate within @image. Must be 0 if @image is %NULL
1381 // <width>: width of region to get
1382 // <height>: height or region to get
1383 Image* copy_to_image()(Image* image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) nothrow {
1384 return gdk_drawable_copy_to_image(&this, image, src_x, src_y, dest_x, dest_y, width, height);
1387 // Unintrospectable method: get_clip_region() / gdk_drawable_get_clip_region()
1388 // Computes the region of a drawable that potentially can be written
1389 // to by drawing primitives. This region will not take into account
1390 // the clip region for the GC, and may also not take into account
1391 // other factors such as if the window is obscured by other windows,
1392 // but no area outside of this region will be affected by drawing
1393 // primitives.
1394 // when you are done.
1395 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1396 Region* get_clip_region()() nothrow {
1397 return gdk_drawable_get_clip_region(&this);
1400 // Unintrospectable method: get_colormap() / gdk_drawable_get_colormap()
1401 // Gets the colormap for @drawable, if one is set; returns
1402 // %NULL otherwise.
1403 // RETURNS: the colormap, or %NULL
1404 Colormap* get_colormap()() nothrow {
1405 return gdk_drawable_get_colormap(&this);
1408 // Unintrospectable method: get_data() / gdk_drawable_get_data()
1409 // Equivalent to g_object_get_data(); the #GObject variant should be
1410 // used instead.
1411 // RETURNS: the data stored at @key
1412 // <key>: name the data was stored under
1413 void* get_data()(char* key) nothrow {
1414 return gdk_drawable_get_data(&this, key);
1417 // Obtains the bit depth of the drawable, that is, the number of bits
1418 // that make up a pixel in the drawable's visual. Examples are 8 bits
1419 // per pixel, 24 bits per pixel, etc.
1420 // RETURNS: number of bits per pixel
1421 int get_depth()() nothrow {
1422 return gdk_drawable_get_depth(&this);
1425 // Unintrospectable method: get_display() / gdk_drawable_get_display()
1426 // VERSION: 2.2
1427 // DEPRECATED (v2.24) method: get_display - Use gdk_window_get_display() instead
1428 // Gets the #GdkDisplay associated with a #GdkDrawable.
1429 // RETURNS: the #GdkDisplay associated with @drawable
1430 Display* get_display()() nothrow {
1431 return gdk_drawable_get_display(&this);
1434 // Unintrospectable method: get_image() / gdk_drawable_get_image()
1435 // DEPRECATED (v2.22) method: get_image - Use @drawable as the source and draw to a Cairo image
1436 // A #GdkImage stores client-side image data (pixels). In contrast,
1437 // #GdkPixmap and #GdkWindow are server-side
1438 // objects. gdk_drawable_get_image() obtains the pixels from a
1439 // server-side drawable as a client-side #GdkImage. The format of a
1440 // #GdkImage depends on the #GdkVisual of the current display, which
1441 // makes manipulating #GdkImage extremely difficult; therefore, in
1442 // most cases you should use gdk_pixbuf_get_from_drawable() instead of
1443 // this lower-level function. A #GdkPixbuf contains image data in a
1444 // canonicalized RGB format, rather than a display-dependent format.
1445 // Of course, there's a convenience vs. speed tradeoff here, so you'll
1446 // want to think about what makes sense for your application.
1447 // obtain as an image.
1448 // You would usually copy image data to the client side if you intend
1449 // to examine the values of individual pixels, for example to darken
1450 // an image or add a red tint. It would be prohibitively slow to
1451 // make a round-trip request to the windowing system for each pixel,
1452 // so instead you get all of them at once, modify them, then copy
1453 // them all back at once.
1454 // If the X server or other windowing system backend is on the local
1455 // machine, this function may use shared memory to avoid copying
1456 // the image data.
1457 // If the source drawable is a #GdkWindow and partially offscreen
1458 // or obscured, then the obscured portions of the returned image
1459 // will contain undefined data.
1460 // surface if you want to download contents to the client.
1461 // RETURNS: a #GdkImage containing the contents of @drawable
1462 // <x>: x coordinate on @drawable
1463 // <y>: y coordinate on @drawable
1464 // <width>: width of region to get
1465 // <height>: height or region to get
1466 Image* get_image()(int x, int y, int width, int height) nothrow {
1467 return gdk_drawable_get_image(&this, x, y, width, height);
1470 // Unintrospectable method: get_screen() / gdk_drawable_get_screen()
1471 // VERSION: 2.2
1472 // DEPRECATED (v2.24) method: get_screen - Use gdk_window_get_screen() instead
1473 // Gets the #GdkScreen associated with a #GdkDrawable.
1474 // RETURNS: the #GdkScreen associated with @drawable
1475 Screen* get_screen()() nothrow {
1476 return gdk_drawable_get_screen(&this);
1479 // DEPRECATED (v2.24) method: get_size - Use gdk_window_get_width() and gdk_window_get_height() for
1480 // Fills *@width and *@height with the size of @drawable.
1481 // On the X11 platform, if @drawable is a #GdkWindow, the returned
1482 // size is the size reported in the most-recently-processed configure
1483 // event, rather than the current size on the X server.
1484 // #GdkWindows. Use gdk_pixmap_get_size() for #GdkPixmaps.
1485 // <width>: location to store drawable's width, or %NULL
1486 // <height>: location to store drawable's height, or %NULL
1487 void get_size()(/*out*/ int* width=null, /*out*/ int* height=null) nothrow {
1488 gdk_drawable_get_size(&this, width, height);
1491 // Unintrospectable method: get_visible_region() / gdk_drawable_get_visible_region()
1492 // Computes the region of a drawable that is potentially visible.
1493 // This does not necessarily take into account if the window is
1494 // obscured by other windows, but no area outside of this region
1495 // is visible.
1496 // when you are done.
1497 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1498 Region* get_visible_region()() nothrow {
1499 return gdk_drawable_get_visible_region(&this);
1502 // Unintrospectable method: get_visual() / gdk_drawable_get_visual()
1503 // DEPRECATED (v2.24) method: get_visual - Use gdk_window_get_visual()
1504 // Gets the #GdkVisual describing the pixel format of @drawable.
1505 // RETURNS: a #GdkVisual
1506 Visual* get_visual()() nothrow {
1507 return gdk_drawable_get_visual(&this);
1510 // Unintrospectable method: ref() / gdk_drawable_ref()
1511 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
1512 // Deprecated equivalent of calling g_object_ref() on @drawable.
1513 // (Drawables were not objects in previous versions of GDK.)
1514 // RETURNS: the same @drawable passed in
1515 Drawable* ref_()() nothrow {
1516 return gdk_drawable_ref(&this);
1519 // Sets the colormap associated with @drawable. Normally this will
1520 // happen automatically when the drawable is created; you only need to
1521 // use this function if the drawable-creating function did not have a
1522 // way to determine the colormap, and you then use drawable operations
1523 // that require a colormap. The colormap for all drawables and
1524 // graphics contexts you intend to use together should match. i.e.
1525 // when using a #GdkGC to draw to a drawable, or copying one drawable
1526 // to another, the colormaps should match.
1527 // <colormap>: a #GdkColormap
1528 void set_colormap()(Colormap* colormap) nothrow {
1529 gdk_drawable_set_colormap(&this, colormap);
1532 // This function is equivalent to g_object_set_data(),
1533 // the #GObject variant should be used instead.
1534 // <key>: name to store the data under
1535 // <data>: arbitrary data
1536 // <destroy_func>: function to free @data, or %NULL
1537 void set_data()(char* key, void* data, GLib2.DestroyNotify destroy_func=null) nothrow {
1538 gdk_drawable_set_data(&this, key, data, destroy_func);
1541 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
1542 // Deprecated equivalent of calling g_object_unref() on @drawable.
1543 void unref()() nothrow {
1544 gdk_drawable_unref(&this);
1548 struct DrawableClass {
1549 GObject2.ObjectClass parent_class;
1550 // Unintrospectable functionp: create_gc() / ()
1551 extern (C) GC* function (Drawable* drawable, GCValues* values, GCValuesMask mask) nothrow create_gc;
1552 extern (C) void function (Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height) nothrow draw_rectangle;
1553 extern (C) void function (Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2) nothrow draw_arc;
1554 extern (C) void function (Drawable* drawable, GC* gc, int filled, Point* points, int npoints) nothrow draw_polygon;
1555 extern (C) void function (Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length) nothrow draw_text;
1556 extern (C) void function (Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length) nothrow draw_text_wc;
1557 extern (C) void function (Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) nothrow draw_drawable;
1558 extern (C) void function (Drawable* drawable, GC* gc, Point* points, int npoints) nothrow draw_points;
1559 extern (C) void function (Drawable* drawable, GC* gc, Segment* segs, int nsegs) nothrow draw_segments;
1560 extern (C) void function (Drawable* drawable, GC* gc, Point* points, int npoints) nothrow draw_lines;
1561 extern (C) void function (Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) nothrow draw_glyphs;
1562 extern (C) void function (Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) nothrow draw_image;
1563 // RETURNS: number of bits per pixel
1564 extern (C) int function (Drawable* drawable) nothrow get_depth;
1566 // <width>: location to store drawable's width, or %NULL
1567 // <height>: location to store drawable's height, or %NULL
1568 extern (C) void function (Drawable* drawable, /*out*/ int* width=null, /*out*/ int* height=null) nothrow get_size;
1569 extern (C) void function (Drawable* drawable, Colormap* cmap) nothrow set_colormap;
1571 // Unintrospectable functionp: get_colormap() / ()
1573 // RETURNS: the colormap, or %NULL
1574 extern (C) Colormap* function (Drawable* drawable) nothrow get_colormap;
1576 // Unintrospectable functionp: get_visual() / ()
1578 // RETURNS: a #GdkVisual
1579 extern (C) Visual* function (Drawable* drawable) nothrow get_visual;
1581 // Unintrospectable functionp: get_screen() / ()
1583 // RETURNS: the #GdkScreen associated with @drawable
1584 extern (C) Screen* function (Drawable* drawable) nothrow get_screen;
1586 // Unintrospectable functionp: get_image() / ()
1588 // RETURNS: a #GdkImage containing the contents of @drawable
1589 // <x>: x coordinate on @drawable
1590 // <y>: y coordinate on @drawable
1591 // <width>: width of region to get
1592 // <height>: height or region to get
1593 extern (C) Image* function (Drawable* drawable, int x, int y, int width, int height) nothrow get_image;
1595 // Unintrospectable functionp: get_clip_region() / ()
1597 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1598 extern (C) Region* function (Drawable* drawable) nothrow get_clip_region;
1600 // Unintrospectable functionp: get_visible_region() / ()
1602 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1603 extern (C) Region* function (Drawable* drawable) nothrow get_visible_region;
1604 // Unintrospectable functionp: get_composite_drawable() / ()
1605 extern (C) Drawable* function (Drawable* drawable, int x, int y, int width, int height, int* composite_x_offset, int* composite_y_offset) nothrow get_composite_drawable;
1606 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) nothrow draw_pixbuf;
1607 // Unintrospectable functionp: _copy_to_image() / ()
1608 extern (C) Image* function (Drawable* drawable, Image* image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) nothrow _copy_to_image;
1609 extern (C) void function (Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) nothrow draw_glyphs_transformed;
1610 extern (C) void function (Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids) nothrow draw_trapezoids;
1611 extern (C) cairo.Surface* /*new*/ function (Drawable* drawable) nothrow ref_cairo_surface;
1612 // Unintrospectable functionp: get_source_drawable() / ()
1613 extern (C) Drawable* function (Drawable* drawable) nothrow get_source_drawable;
1614 extern (C) void function (Drawable* drawable, cairo.Context* cr) nothrow set_cairo_clip;
1615 extern (C) cairo.Surface* /*new*/ function (Drawable* drawable, int width, int height) nothrow create_cairo_surface;
1616 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) nothrow draw_drawable_with_src;
1617 extern (C) void function () nothrow _gdk_reserved7;
1618 extern (C) void function () nothrow _gdk_reserved9;
1619 extern (C) void function () nothrow _gdk_reserved10;
1620 extern (C) void function () nothrow _gdk_reserved11;
1621 extern (C) void function () nothrow _gdk_reserved12;
1622 extern (C) void function () nothrow _gdk_reserved13;
1623 extern (C) void function () nothrow _gdk_reserved14;
1624 extern (C) void function () nothrow _gdk_reserved15;
1627 union Event {
1628 EventType type;
1629 EventAny any;
1630 EventExpose expose;
1631 EventNoExpose no_expose;
1632 EventVisibility visibility;
1633 EventMotion motion;
1634 EventButton button;
1635 EventScroll scroll;
1636 EventKey key;
1637 EventCrossing crossing;
1638 EventFocus focus_change;
1639 EventConfigure configure;
1640 EventProperty property;
1641 EventSelection selection;
1642 EventOwnerChange owner_change;
1643 EventProximity proximity;
1644 EventClient client;
1645 EventDND dnd;
1646 EventWindowState window_state;
1647 EventSetting setting;
1648 EventGrabBroken grab_broken;
1651 // VERSION: 2.2
1652 // Creates a new event of the given type. All fields are set to 0.
1653 // should be freed with gdk_event_free().
1654 // RETURNS: a newly-allocated #GdkEvent. The returned #GdkEvent
1655 // <type>: a #GdkEventType
1656 static Event* /*new*/ new_()(EventType type) nothrow {
1657 return gdk_event_new(type);
1659 alias new_!() opCall;
1661 // Copies a #GdkEvent, copying or incrementing the reference count of the
1662 // resources associated with it (e.g. #GdkWindow's and strings).
1663 // gdk_event_free().
1664 // RETURNS: a copy of @event. The returned #GdkEvent should be freed with
1665 Event* /*new*/ copy()() nothrow {
1666 return gdk_event_copy(&this);
1669 // Frees a #GdkEvent, freeing or decrementing any resources associated with it.
1670 // Note that this function should only be called with events returned from
1671 // functions such as gdk_event_peek(), gdk_event_get(),
1672 // gdk_event_get_graphics_expose() and gdk_event_copy() and gdk_event_new().
1673 void free()() nothrow {
1674 gdk_event_free(&this);
1677 // Extract the axis value for a particular axis use from
1678 // an event structure.
1679 // RETURNS: %TRUE if the specified axis was found, otherwise %FALSE
1680 // <axis_use>: the axis use to look for
1681 // <value>: location to store the value found
1682 int get_axis()(AxisUse axis_use, /*out*/ double* value) nothrow {
1683 return gdk_event_get_axis(&this, axis_use, value);
1686 // Extract the event window relative x/y coordinates from an event.
1687 // RETURNS: %TRUE if the event delivered event window coordinates
1688 // <x_win>: location to put event window x coordinate
1689 // <y_win>: location to put event window y coordinate
1690 int get_coords()(/*out*/ double* x_win, /*out*/ double* y_win) nothrow {
1691 return gdk_event_get_coords(&this, x_win, y_win);
1694 // Extract the root window relative x/y coordinates from an event.
1695 // RETURNS: %TRUE if the event delivered root window coordinates
1696 // <x_root>: location to put root window x coordinate
1697 // <y_root>: location to put root window y coordinate
1698 int get_root_coords()(/*out*/ double* x_root, /*out*/ double* y_root) nothrow {
1699 return gdk_event_get_root_coords(&this, x_root, y_root);
1702 // Unintrospectable method: get_screen() / gdk_event_get_screen()
1703 // VERSION: 2.2
1704 // Returns the screen for the event. The screen is
1705 // typically the screen for <literal>event->any.window</literal>, but
1706 // for events such as mouse events, it is the screen
1707 // where the pointer was when the event occurs -
1708 // that is, the screen which has the root window
1709 // to which <literal>event->motion.x_root</literal> and
1710 // <literal>event->motion.y_root</literal> are relative.
1711 // RETURNS: the screen for the event
1712 Screen* get_screen()() nothrow {
1713 return gdk_event_get_screen(&this);
1716 // If the event contains a "state" field, puts that field in @state. Otherwise
1717 // stores an empty state (0). Returns %TRUE if there was a state field
1718 // in the event. @event may be %NULL, in which case it's treated
1719 // as if the event had no state field.
1720 // RETURNS: %TRUE if there was a state field in the event
1721 // <state>: return location for state
1722 int get_state()(/*out*/ ModifierType* state) nothrow {
1723 return gdk_event_get_state(&this, state);
1726 // Returns the time stamp from @event, if there is one; otherwise
1727 // returns #GDK_CURRENT_TIME. If @event is %NULL, returns #GDK_CURRENT_TIME.
1728 // RETURNS: time stamp field from @event
1729 uint get_time()() nothrow {
1730 return gdk_event_get_time(&this);
1733 // Appends a copy of the given event onto the front of the event
1734 // queue for event->any.window's display, or the default event
1735 // queue if event->any.window is %NULL. See gdk_display_put_event().
1736 void put()() nothrow {
1737 gdk_event_put(&this);
1740 // Sends an X ClientMessage event to a given window (which must be
1741 // on the default #GdkDisplay.)
1742 // This could be used for communicating between different applications,
1743 // though the amount of data is limited to 20 bytes.
1744 // RETURNS: non-zero on success.
1745 // <winid>: the window to send the X ClientMessage event to.
1746 int send_client_message()(NativeWindow winid) nothrow {
1747 return gdk_event_send_client_message(&this, winid);
1750 // Sends an X ClientMessage event to all toplevel windows on the default
1751 // #GdkScreen.
1752 // Toplevel windows are determined by checking for the WM_STATE property, as
1753 // described in the Inter-Client Communication Conventions Manual (ICCCM).
1754 // If no windows are found with the WM_STATE property set, the message is sent
1755 // to all children of the root window.
1756 void send_clientmessage_toall()() nothrow {
1757 gdk_event_send_clientmessage_toall(&this);
1760 // VERSION: 2.2
1761 // Sets the screen for @event to @screen. The event must
1762 // have been allocated by GTK+, for instance, by
1763 // gdk_event_copy().
1764 // <screen>: a #GdkScreen
1765 void set_screen()(Screen* screen) nothrow {
1766 gdk_event_set_screen(&this, screen);
1769 // --- mixin/Gdk2_Event.d --->
1771 void toString(FT)(scope void delegate(const(char)[]) sink, FT fmt) {
1772 import std.format;
1773 with (EventType)
1774 switch (type) {
1775 case EXPOSE: formatValue(sink, expose, fmt); return;
1776 case MOTION_NOTIFY: formatValue(sink, motion, fmt); return;
1777 case BUTTON_PRESS, _2BUTTON_PRESS, _3BUTTON_PRESS, BUTTON_RELEASE:
1778 formatValue(sink, button, fmt); return; // XXX check, GIR has this as just Event.
1779 case KEY_PRESS, KEY_RELEASE: formatValue(sink, key, fmt); return;
1780 case ENTER_NOTIFY, LEAVE_NOTIFY: formatValue(sink, crossing, fmt); return;
1781 case FOCUS_CHANGE: formatValue(sink, focus_change, fmt); return;
1782 case CONFIGURE: formatValue(sink, configure, fmt); return;
1783 case PROPERTY_NOTIFY: formatValue(sink, property, fmt); return;
1784 case SELECTION_CLEAR, SELECTION_REQUEST, SELECTION_NOTIFY:
1785 formatValue(sink, selection, fmt); return;
1786 case PROXIMITY_IN, PROXIMITY_OUT:
1787 formatValue(sink, proximity, fmt); return;
1788 case VISIBILITY_NOTIFY: formatValue(sink, visibility, fmt); return;
1789 case SCROLL: formatValue(sink, scroll, fmt); return;
1791 case WINDOW_STATE: formatValue(sink, window_state, fmt); return;
1792 any: case DELETE, DESTROY, MAP, UNMAP:
1793 formatValue(sink, any, fmt); return;
1794 default: sink("/*FIXME*/"); goto any;
1798 // <--- mixin/Gdk2_Event.d ---
1801 struct EventAny {
1802 EventType type;
1803 Window* window;
1804 byte send_event;
1807 struct EventButton {
1808 EventType type;
1809 Window* window;
1810 byte send_event;
1811 uint time;
1812 double x, y;
1813 double* axes;
1814 uint state, button;
1815 Device* device;
1816 double x_root, y_root;
1819 struct EventClient {
1820 EventType type;
1821 Window* window;
1822 byte send_event;
1823 Atom message_type;
1824 ushort data_format;
1826 union data {
1827 char[20] b;
1828 short[10] s;
1829 c_long[5] l;
1833 struct EventConfigure {
1834 EventType type;
1835 Window* window;
1836 byte send_event;
1837 int x, y, width, height;
1840 struct EventCrossing {
1841 EventType type;
1842 Window* window;
1843 byte send_event;
1844 Window* subwindow;
1845 uint time;
1846 double x, y, x_root, y_root;
1847 CrossingMode mode;
1848 NotifyType detail;
1849 int focus;
1850 uint state;
1853 struct EventDND {
1854 EventType type;
1855 Window* window;
1856 byte send_event;
1857 DragContext* context;
1858 uint time;
1859 short x_root, y_root;
1862 struct EventExpose {
1863 EventType type;
1864 Window* window;
1865 byte send_event;
1866 Rectangle area;
1867 Region* region;
1868 int count;
1871 struct EventFocus {
1872 EventType type;
1873 Window* window;
1874 byte send_event;
1875 short in_;
1878 extern (C) alias void function (Event* event, void* data) nothrow EventFunc;
1880 struct EventGrabBroken {
1881 EventType type;
1882 Window* window;
1883 byte send_event;
1884 int keyboard, implicit;
1885 Window* grab_window;
1888 struct EventKey {
1889 EventType type;
1890 Window* window;
1891 byte send_event;
1892 uint time;
1893 uint state, keyval;
1894 int length;
1895 char* string_;
1896 ushort hardware_keycode;
1897 ubyte group;
1898 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
1899 uint, "is_modifier", 1,
1900 uint, "__dummy32A", 31));
1903 enum EventMask {
1904 EXPOSURE_MASK = 2,
1905 POINTER_MOTION_MASK = 4,
1906 POINTER_MOTION_HINT_MASK = 8,
1907 BUTTON_MOTION_MASK = 16,
1908 BUTTON1_MOTION_MASK = 32,
1909 BUTTON2_MOTION_MASK = 64,
1910 BUTTON3_MOTION_MASK = 128,
1911 BUTTON_PRESS_MASK = 256,
1912 BUTTON_RELEASE_MASK = 512,
1913 KEY_PRESS_MASK = 1024,
1914 KEY_RELEASE_MASK = 2048,
1915 ENTER_NOTIFY_MASK = 4096,
1916 LEAVE_NOTIFY_MASK = 8192,
1917 FOCUS_CHANGE_MASK = 16384,
1918 STRUCTURE_MASK = 32768,
1919 PROPERTY_CHANGE_MASK = 65536,
1920 VISIBILITY_NOTIFY_MASK = 131072,
1921 PROXIMITY_IN_MASK = 262144,
1922 PROXIMITY_OUT_MASK = 524288,
1923 SUBSTRUCTURE_MASK = 1048576,
1924 SCROLL_MASK = 2097152,
1925 ALL_EVENTS_MASK = 4194302
1927 struct EventMotion {
1928 EventType type;
1929 Window* window;
1930 byte send_event;
1931 uint time;
1932 double x, y;
1933 double* axes;
1934 uint state;
1935 short is_hint;
1936 Device* device;
1937 double x_root, y_root;
1940 struct EventNoExpose {
1941 EventType type;
1942 Window* window;
1943 byte send_event;
1946 struct EventOwnerChange {
1947 EventType type;
1948 Window* window;
1949 byte send_event;
1950 NativeWindow owner;
1951 OwnerChange reason;
1952 Atom selection;
1953 uint time, selection_time;
1956 struct EventProperty {
1957 EventType type;
1958 Window* window;
1959 byte send_event;
1960 Atom atom;
1961 uint time;
1962 uint state;
1965 struct EventProximity {
1966 EventType type;
1967 Window* window;
1968 byte send_event;
1969 uint time;
1970 Device* device;
1973 struct EventScroll {
1974 EventType type;
1975 Window* window;
1976 byte send_event;
1977 uint time;
1978 double x, y;
1979 uint state;
1980 ScrollDirection direction;
1981 Device* device;
1982 double x_root, y_root;
1985 struct EventSelection {
1986 EventType type;
1987 Window* window;
1988 byte send_event;
1989 Atom selection, target, property;
1990 uint time;
1991 NativeWindow requestor;
1994 struct EventSetting {
1995 EventType type;
1996 Window* window;
1997 byte send_event;
1998 SettingAction action;
1999 char* name;
2002 enum EventType {
2003 NOTHING = -1,
2004 DELETE = 0,
2005 DESTROY = 1,
2006 EXPOSE = 2,
2007 MOTION_NOTIFY = 3,
2008 BUTTON_PRESS = 4,
2009 _2BUTTON_PRESS = 5,
2010 _3BUTTON_PRESS = 6,
2011 BUTTON_RELEASE = 7,
2012 KEY_PRESS = 8,
2013 KEY_RELEASE = 9,
2014 ENTER_NOTIFY = 10,
2015 LEAVE_NOTIFY = 11,
2016 FOCUS_CHANGE = 12,
2017 CONFIGURE = 13,
2018 MAP = 14,
2019 UNMAP = 15,
2020 PROPERTY_NOTIFY = 16,
2021 SELECTION_CLEAR = 17,
2022 SELECTION_REQUEST = 18,
2023 SELECTION_NOTIFY = 19,
2024 PROXIMITY_IN = 20,
2025 PROXIMITY_OUT = 21,
2026 DRAG_ENTER = 22,
2027 DRAG_LEAVE = 23,
2028 DRAG_MOTION = 24,
2029 DRAG_STATUS = 25,
2030 DROP_START = 26,
2031 DROP_FINISHED = 27,
2032 CLIENT_EVENT = 28,
2033 VISIBILITY_NOTIFY = 29,
2034 NO_EXPOSE = 30,
2035 SCROLL = 31,
2036 WINDOW_STATE = 32,
2037 SETTING = 33,
2038 OWNER_CHANGE = 34,
2039 GRAB_BROKEN = 35,
2040 DAMAGE = 36,
2041 EVENT_LAST = 37
2043 struct EventVisibility {
2044 EventType type;
2045 Window* window;
2046 byte send_event;
2047 VisibilityState state;
2050 struct EventWindowState {
2051 EventType type;
2052 Window* window;
2053 byte send_event;
2054 WindowState changed_mask, new_window_state;
2057 enum ExtensionMode {
2058 NONE = 0,
2059 ALL = 1,
2060 CURSOR = 2
2062 enum Fill {
2063 SOLID = 0,
2064 TILED = 1,
2065 STIPPLED = 2,
2066 OPAQUE_STIPPLED = 3
2068 enum FillRule {
2069 EVEN_ODD_RULE = 0,
2070 WINDING_RULE = 1
2072 extern (C) alias FilterReturn function (XEvent* xevent, Event* event, void* data) nothrow FilterFunc;
2074 enum FilterReturn {
2075 CONTINUE = 0,
2076 TRANSLATE = 1,
2077 REMOVE = 2
2079 struct Font {
2080 FontType type;
2081 int ascent, descent;
2083 int equal()(Font* fontb) nothrow {
2084 return gdk_font_equal(&this, fontb);
2086 // Unintrospectable method: get_display() / gdk_font_get_display()
2087 Display* get_display()() nothrow {
2088 return gdk_font_get_display(&this);
2090 int id()() nothrow {
2091 return gdk_font_id(&this);
2094 // Increases the reference count of a font by one.
2095 // RETURNS: @font
2096 Font* /*new*/ ref_()() nothrow {
2097 return gdk_font_ref(&this);
2100 // Decreases the reference count of a font by one.
2101 // If the result is zero, destroys the font.
2102 void unref()() nothrow {
2103 gdk_font_unref(&this);
2107 enum FontType {
2108 FONT = 0,
2109 FONTSET = 1
2111 enum Function {
2112 COPY = 0,
2113 INVERT = 1,
2114 XOR = 2,
2115 CLEAR = 3,
2116 AND = 4,
2117 AND_REVERSE = 5,
2118 AND_INVERT = 6,
2119 NOOP = 7,
2120 OR = 8,
2121 EQUIV = 9,
2122 OR_REVERSE = 10,
2123 COPY_INVERT = 11,
2124 OR_INVERT = 12,
2125 NAND = 13,
2126 NOR = 14,
2127 SET = 15
2129 struct GC /* : GObject.Object */ {
2130 alias parent_instance this;
2131 alias parent_instance super_;
2132 alias parent_instance object;
2133 GObject2.Object parent_instance;
2134 int clip_x_origin, clip_y_origin, ts_x_origin, ts_y_origin;
2135 Colormap* colormap;
2138 // DEPRECATED (v2.22) constructor: new - Use Cairo for rendering.
2139 // Create a new graphics context with default values.
2140 // RETURNS: the new graphics context.
2141 // <drawable>: a #GdkDrawable. The created GC must always be used with drawables of the same depth as this one.
2142 static GC* /*new*/ new_()(Drawable* drawable) nothrow {
2143 return gdk_gc_new(drawable);
2145 alias new_!() opCall;
2147 // DEPRECATED (v2.22) constructor: new_with_values - Use Cairo for rendering.
2148 // Create a new GC with the given initial values.
2149 // RETURNS: the new graphics context.
2150 // <drawable>: a #GdkDrawable. The created GC must always be used with drawables of the same depth as this one.
2151 // <values>: a structure containing initial values for the GC.
2152 // <values_mask>: a bit mask indicating which fields in @values are set.
2153 static GC* /*new*/ new_with_values()(Drawable* drawable, GCValues* values, GCValuesMask values_mask) nothrow {
2154 return gdk_gc_new_with_values(drawable, values, values_mask);
2156 alias new_with_values!() opCall;
2158 // DEPRECATED (v2.22) method: copy - Use Cairo for drawing. cairo_save() and cairo_restore()
2159 // Copy the set of values from one graphics context
2160 // onto another graphics context.
2161 // can be helpful in cases where you'd have copied a #GdkGC.
2162 // <src_gc>: the source graphics context.
2163 void copy()(GC* src_gc) nothrow {
2164 gdk_gc_copy(&this, src_gc);
2167 // Unintrospectable method: get_colormap() / gdk_gc_get_colormap()
2168 // DEPRECATED (v2.22) method: get_colormap - There is no replacement. Cairo handles colormaps
2169 // Retrieves the colormap for a given GC, if it exists.
2170 // A GC will have a colormap if the drawable for which it was created
2171 // has a colormap, or if a colormap was set explicitely with
2172 // gdk_gc_set_colormap.
2173 // automatically, so there is no need to care about them.
2174 // RETURNS: the colormap of @gc, or %NULL if @gc doesn't have one.
2175 Colormap* get_colormap()() nothrow {
2176 return gdk_gc_get_colormap(&this);
2179 // Unintrospectable method: get_screen() / gdk_gc_get_screen()
2180 // VERSION: 2.2
2181 // Gets the #GdkScreen for which @gc was created
2182 // RETURNS: the #GdkScreen for @gc.
2183 Screen* get_screen()() nothrow {
2184 return gdk_gc_get_screen(&this);
2187 // DEPRECATED (v2.22) method: get_values - Use Cairo for rendering.
2188 // Retrieves the current values from a graphics context. Note that
2189 // only the pixel values of the @values->foreground and @values->background
2190 // are filled, use gdk_colormap_query_color() to obtain the rgb values
2191 // if you need them.
2192 // <values>: the #GdkGCValues structure in which to store the results.
2193 void get_values()(GCValues* values) nothrow {
2194 gdk_gc_get_values(&this, values);
2197 // DEPRECATED (v2.22) method: offset - There is no direct replacement, as this is just a
2198 // Offset attributes such as the clip and tile-stipple origins
2199 // of the GC so that drawing at x - x_offset, y - y_offset with
2200 // the offset GC has the same effect as drawing at x, y with the original
2201 // GC.
2202 // convenience function for gdk_gc_set_ts_origin and gdk_gc_set_clip_origin().
2203 // <x_offset>: amount by which to offset the GC in the X direction
2204 // <y_offset>: amount by which to offset the GC in the Y direction
2205 void offset()(int x_offset, int y_offset) nothrow {
2206 gdk_gc_offset(&this, x_offset, y_offset);
2209 // Unintrospectable method: ref() / gdk_gc_ref()
2210 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
2211 // Deprecated function; use g_object_ref() instead.
2212 // RETURNS: the gc.
2213 GC* ref_()() nothrow {
2214 return gdk_gc_ref(&this);
2217 // DEPRECATED (v2.22) method: set_background - Use gdk_cairo_set_source_color() to use a #GdkColor
2218 // Sets the background color for a graphics context.
2219 // Note that this function uses @color->pixel, use
2220 // gdk_gc_set_rgb_bg_color() to specify the background
2221 // color as red, green, blue components.
2222 // as the source in Cairo. Note that if you want to draw a background and a
2223 // foreground in Cairo, you need to call drawing functions (like cairo_fill())
2224 // twice.
2225 // <color>: the new background color.
2226 void set_background()(Color* color) nothrow {
2227 gdk_gc_set_background(&this, color);
2230 // DEPRECATED (v2.22) method: set_clip_mask - Use cairo_mask() instead.
2231 // Sets the clip mask for a graphics context from a bitmap.
2232 // The clip mask is interpreted relative to the clip
2233 // origin. (See gdk_gc_set_clip_origin()).
2234 // <mask>: a bitmap.
2235 void set_clip_mask()(Bitmap* mask) nothrow {
2236 gdk_gc_set_clip_mask(&this, mask);
2239 // DEPRECATED (v2.22) method: set_clip_origin - Use cairo_translate() before applying the clip path in
2240 // Sets the origin of the clip mask. The coordinates are
2241 // interpreted relative to the upper-left corner of
2242 // the destination drawable of the current operation.
2243 // Cairo.
2244 // <x>: the x-coordinate of the origin.
2245 // <y>: the y-coordinate of the origin.
2246 void set_clip_origin()(int x, int y) nothrow {
2247 gdk_gc_set_clip_origin(&this, x, y);
2250 // DEPRECATED (v2.22) method: set_clip_rectangle - Use cairo_rectangle() and cairo_clip() in Cairo.
2251 // Sets the clip mask for a graphics context from a
2252 // rectangle. The clip mask is interpreted relative to the clip
2253 // origin. (See gdk_gc_set_clip_origin()).
2254 // <rectangle>: the rectangle to clip to.
2255 void set_clip_rectangle()(Rectangle* rectangle) nothrow {
2256 gdk_gc_set_clip_rectangle(&this, rectangle);
2259 // DEPRECATED (v2.22) method: set_clip_region - Use gdk_cairo_region() and cairo_clip() in Cairo.
2260 // Sets the clip mask for a graphics context from a region structure.
2261 // The clip mask is interpreted relative to the clip origin. (See
2262 // gdk_gc_set_clip_origin()).
2263 // <region>: the #GdkRegion.
2264 void set_clip_region()(Region* region) nothrow {
2265 gdk_gc_set_clip_region(&this, region);
2268 // DEPRECATED (v2.22) method: set_colormap - There is no replacement. Cairo handles colormaps
2269 // Sets the colormap for the GC to the given colormap. The depth
2270 // of the colormap's visual must match the depth of the drawable
2271 // for which the GC was created.
2272 // automatically, so there is no need to care about them.
2273 // <colormap>: a #GdkColormap
2274 void set_colormap()(Colormap* colormap) nothrow {
2275 gdk_gc_set_colormap(&this, colormap);
2278 // DEPRECATED (v2.22) method: set_dashes - Use cairo_set_dash() to set the dash in Cairo.
2279 // Sets the way dashed-lines are drawn. Lines will be
2280 // drawn with alternating on and off segments of the
2281 // lengths specified in @dash_list. The manner in
2282 // which the on and off segments are drawn is determined
2283 // by the @line_style value of the GC. (This can
2284 // be changed with gdk_gc_set_line_attributes().)
2285 // The @dash_offset defines the phase of the pattern,
2286 // specifying how many pixels into the dash-list the pattern
2287 // should actually begin.
2288 // <dash_offset>: the phase of the dash pattern.
2289 // <dash_list>: an array of dash lengths.
2290 // <n>: the number of elements in @dash_list.
2291 void set_dashes()(int dash_offset, byte dash_list, int n) nothrow {
2292 gdk_gc_set_dashes(&this, dash_offset, dash_list, n);
2295 // DEPRECATED (v2.22) method: set_exposures - There is no replacement. If you need to control
2296 // Sets whether copying non-visible portions of a drawable
2297 // using this graphics context generate exposure events
2298 // for the corresponding regions of the destination
2299 // drawable. (See gdk_draw_drawable()).
2300 // exposures, you must use drawing operations of the underlying window
2301 // system or use gdk_window_invalidate_rect(). Cairo will never
2302 // generate exposures.
2303 // <exposures>: if %TRUE, exposure events will be generated.
2304 void set_exposures()(int exposures) nothrow {
2305 gdk_gc_set_exposures(&this, exposures);
2308 // DEPRECATED (v2.22) method: set_fill - You can achieve tiling in Cairo by using
2309 // Set the fill mode for a graphics context.
2310 // cairo_pattern_set_extend() on the source. For stippling, see the
2311 // deprecation comments on gdk_gc_set_stipple().
2312 // <fill>: the new fill mode.
2313 void set_fill()(Fill fill) nothrow {
2314 gdk_gc_set_fill(&this, fill);
2317 // Sets the font for a graphics context. (Note that
2318 // all text-drawing functions in GDK take a @font
2319 // argument; the value set here is used when that
2320 // argument is %NULL.)
2321 // <font>: the new font.
2322 void set_font()(Font* font) nothrow {
2323 gdk_gc_set_font(&this, font);
2326 // DEPRECATED (v2.22) method: set_foreground - Use gdk_cairo_set_source_color() to use a #GdkColor
2327 // Sets the foreground color for a graphics context.
2328 // Note that this function uses @color->pixel, use
2329 // gdk_gc_set_rgb_fg_color() to specify the foreground
2330 // color as red, green, blue components.
2331 // as the source in Cairo.
2332 // <color>: the new foreground color.
2333 void set_foreground()(Color* color) nothrow {
2334 gdk_gc_set_foreground(&this, color);
2337 // DEPRECATED (v2.22) method: set_function - Use cairo_set_operator() with Cairo.
2338 // Determines how the current pixel values and the
2339 // pixel values being drawn are combined to produce
2340 // the final pixel values.
2341 // <function>: the #GdkFunction to use
2342 void set_function()(Function function_) nothrow {
2343 gdk_gc_set_function(&this, function_);
2346 // DEPRECATED (v2.22) method: set_line_attributes - Use the Cairo functions cairo_set_line_width(),
2347 // Sets various attributes of how lines are drawn. See
2348 // the corresponding members of #GdkGCValues for full
2349 // explanations of the arguments.
2350 // cairo_set_line_join(), cairo_set_line_cap() and cairo_set_dash()
2351 // to affect the stroking behavior in Cairo. Keep in mind that the default
2352 // attributes of a #cairo_t are different from the default attributes of
2353 // a #GdkGC.
2354 // <line_width>: the width of lines.
2355 // <line_style>: the dash-style for lines.
2356 // <cap_style>: the manner in which the ends of lines are drawn.
2357 // <join_style>: the in which lines are joined together.
2358 void set_line_attributes()(int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style) nothrow {
2359 gdk_gc_set_line_attributes(&this, line_width, line_style, cap_style, join_style);
2362 // DEPRECATED (v2.22) method: set_rgb_bg_color - Use gdk_cairo_set_source_color() instead.
2363 // Set the background color of a GC using an unallocated color. The
2364 // pixel value for the color will be determined using GdkRGB. If the
2365 // colormap for the GC has not previously been initialized for GdkRGB,
2366 // then for pseudo-color colormaps (colormaps with a small modifiable
2367 // number of colors), a colorcube will be allocated in the colormap.
2368 // Calling this function for a GC without a colormap is an error.
2369 // <color>: an unallocated #GdkColor.
2370 void set_rgb_bg_color()(Color* color) nothrow {
2371 gdk_gc_set_rgb_bg_color(&this, color);
2374 // DEPRECATED (v2.22) method: set_rgb_fg_color - Use gdk_cairo_set_source_color() instead.
2375 // Set the foreground color of a GC using an unallocated color. The
2376 // pixel value for the color will be determined using GdkRGB. If the
2377 // colormap for the GC has not previously been initialized for GdkRGB,
2378 // then for pseudo-color colormaps (colormaps with a small modifiable
2379 // number of colors), a colorcube will be allocated in the colormap.
2380 // Calling this function for a GC without a colormap is an error.
2381 // <color>: an unallocated #GdkColor.
2382 void set_rgb_fg_color()(Color* color) nothrow {
2383 gdk_gc_set_rgb_fg_color(&this, color);
2386 // DEPRECATED (v2.22) method: set_stipple - Stippling has no direct replacement in Cairo. If you
2387 // Set the stipple bitmap for a graphics context. The
2388 // stipple will only be used if the fill mode is
2389 // %GDK_STIPPLED or %GDK_OPAQUE_STIPPLED.
2390 // want to achieve an identical look, you can use the stipple bitmap as a
2391 // mask. Most likely, this involves rendering the source to an intermediate
2392 // surface using cairo_push_group() first, so that you can then use
2393 // cairo_mask() to achieve the stippled look.
2394 // <stipple>: the new stipple bitmap.
2395 void set_stipple()(Pixmap* stipple) nothrow {
2396 gdk_gc_set_stipple(&this, stipple);
2399 // DEPRECATED (v2.22) method: set_subwindow - There is no replacement. If you need to control
2400 // Sets how drawing with this GC on a window will affect child
2401 // windows of that window.
2402 // subwindows, you must use drawing operations of the underlying window
2403 // system manually. Cairo will always use %GDK_INCLUDE_INFERIORS on sources
2404 // and masks and %GDK_CLIP_BY_CHILDREN on targets.
2405 // <mode>: the subwindow mode.
2406 void set_subwindow()(SubwindowMode mode) nothrow {
2407 gdk_gc_set_subwindow(&this, mode);
2410 // DEPRECATED (v2.22) method: set_tile - The following code snippet sets a tiling #GdkPixmap
2411 // Set a tile pixmap for a graphics context.
2412 // This will only be used if the fill mode
2413 // is %GDK_TILED.
2414 // as the source in Cairo:
2415 // |[gdk_cairo_set_source_pixmap (cr, tile, ts_origin_x, ts_origin_y);
2416 // cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);]|
2417 // <tile>: the new tile pixmap.
2418 void set_tile()(Pixmap* tile) nothrow {
2419 gdk_gc_set_tile(&this, tile);
2422 // DEPRECATED (v2.22) method: set_ts_origin - You can set the origin for tiles and stipples in Cairo
2423 // Set the origin when using tiles or stipples with
2424 // the GC. The tile or stipple will be aligned such
2425 // that the upper left corner of the tile or stipple
2426 // will coincide with this point.
2427 // by changing the source's matrix using cairo_pattern_set_matrix(). Or you
2428 // can specify it with gdk_cairo_set_source_pixmap() as shown in the example
2429 // for gdk_gc_set_tile().
2430 // <x>: the x-coordinate of the origin.
2431 // <y>: the y-coordinate of the origin.
2432 void set_ts_origin()(int x, int y) nothrow {
2433 gdk_gc_set_ts_origin(&this, x, y);
2436 // DEPRECATED (v2.22) method: set_values - Use Cairo for rendering.
2437 // Sets attributes of a graphics context in bulk. For each flag set in
2438 // set as the new value for @gc. If you're only setting a few values
2439 // on @gc, calling individual "setter" functions is likely more
2440 // convenient.
2441 // <values>: struct containing the new values
2442 // <values_mask>: mask indicating which struct fields are to be used
2443 void set_values()(GCValues* values, GCValuesMask values_mask) nothrow {
2444 gdk_gc_set_values(&this, values, values_mask);
2447 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
2448 // Decrement the reference count of @gc.
2449 void unref()() nothrow {
2450 gdk_gc_unref(&this);
2454 struct GCClass {
2455 GObject2.ObjectClass parent_class;
2456 // <values>: the #GdkGCValues structure in which to store the results.
2457 extern (C) void function (GC* gc, GCValues* values) nothrow get_values;
2458 // <values>: struct containing the new values
2459 extern (C) void function (GC* gc, GCValues* values, GCValuesMask mask) nothrow set_values;
2461 // <dash_offset>: the phase of the dash pattern.
2462 // <dash_list>: an array of dash lengths.
2463 // <n>: the number of elements in @dash_list.
2464 extern (C) void function (GC* gc, int dash_offset, byte dash_list, int n) nothrow set_dashes;
2465 extern (C) void function () nothrow _gdk_reserved1;
2466 extern (C) void function () nothrow _gdk_reserved2;
2467 extern (C) void function () nothrow _gdk_reserved3;
2468 extern (C) void function () nothrow _gdk_reserved4;
2471 struct GCValues {
2472 Color foreground, background;
2473 Font* font;
2474 Function function_;
2475 Fill fill;
2476 Pixmap* tile, stipple, clip_mask;
2477 SubwindowMode subwindow_mode;
2478 int ts_x_origin, ts_y_origin, clip_x_origin, clip_y_origin, graphics_exposures, line_width;
2479 LineStyle line_style;
2480 CapStyle cap_style;
2481 JoinStyle join_style;
2484 enum GCValuesMask {
2485 FOREGROUND = 1,
2486 BACKGROUND = 2,
2487 FONT = 4,
2488 FUNCTION = 8,
2489 FILL = 16,
2490 TILE = 32,
2491 STIPPLE = 64,
2492 CLIP_MASK = 128,
2493 SUBWINDOW = 256,
2494 TS_X_ORIGIN = 512,
2495 TS_Y_ORIGIN = 1024,
2496 CLIP_X_ORIGIN = 2048,
2497 CLIP_Y_ORIGIN = 4096,
2498 EXPOSURES = 8192,
2499 LINE_WIDTH = 16384,
2500 LINE_STYLE = 32768,
2501 CAP_STYLE = 65536,
2502 JOIN_STYLE = 131072
2504 struct Geometry {
2505 int min_width, min_height, max_width, max_height, base_width, base_height, width_inc, height_inc;
2506 double min_aspect, max_aspect;
2507 Gravity win_gravity;
2510 enum GrabStatus {
2511 SUCCESS = 0,
2512 ALREADY_GRABBED = 1,
2513 INVALID_TIME = 2,
2514 NOT_VIEWABLE = 3,
2515 FROZEN = 4
2517 enum Gravity {
2518 NORTH_WEST = 1,
2519 NORTH = 2,
2520 NORTH_EAST = 3,
2521 WEST = 4,
2522 CENTER = 5,
2523 EAST = 6,
2524 SOUTH_WEST = 7,
2525 SOUTH = 8,
2526 SOUTH_EAST = 9,
2527 STATIC = 10
2529 struct Image /* : GObject.Object */ {
2530 alias parent_instance this;
2531 alias parent_instance super_;
2532 alias parent_instance object;
2533 GObject2.Object parent_instance;
2534 ImageType type;
2535 Visual* visual;
2536 ByteOrder byte_order;
2537 int width, height;
2538 ushort depth, bpp, bpl, bits_per_pixel;
2539 void* mem;
2540 Colormap* colormap;
2541 private void* windowing_data;
2543 static Image* /*new*/ new_()(ImageType type, Visual* visual, int width, int height) nothrow {
2544 return gdk_image_new(type, visual, width, height);
2546 alias new_!() opCall;
2548 // Unintrospectable function: get() / gdk_image_get()
2549 // This is a deprecated wrapper for gdk_drawable_get_image();
2550 // most cases gdk_pixbuf_get_from_drawable() is the most convenient
2551 // choice.
2552 // RETURNS: a new #GdkImage or %NULL
2553 // <drawable>: a #GdkDrawable
2554 // <x>: x coordinate in @window
2555 // <y>: y coordinate in @window
2556 // <width>: width of area in @window
2557 // <height>: height of area in @window
2558 static Image* get()(Drawable* drawable, int x, int y, int width, int height) nothrow {
2559 return gdk_image_get(drawable, x, y, width, height);
2562 // VERSION: 2.22
2563 // DEPRECATED (v2.22) method: get_bits_per_pixel - #GdkImage should not be used anymore.
2564 // Determines the number of bits per pixel of the image.
2565 // RETURNS: the bits per pixel
2566 ushort get_bits_per_pixel()() nothrow {
2567 return gdk_image_get_bits_per_pixel(&this);
2570 // VERSION: 2.22
2571 // DEPRECATED (v2.22) method: get_byte_order - #GdkImage should not be used anymore.
2572 // Determines the byte order of the image.
2573 // RETURNS: a #GdkVisual
2574 ByteOrder get_byte_order()() nothrow {
2575 return gdk_image_get_byte_order(&this);
2578 // VERSION: 2.22
2579 // DEPRECATED (v2.22) method: get_bytes_per_line - #GdkImage should not be used anymore.
2580 // Determines the number of bytes per line of the image.
2581 // RETURNS: the bytes per line
2582 ushort get_bytes_per_line()() nothrow {
2583 return gdk_image_get_bytes_per_line(&this);
2586 // VERSION: 2.22
2587 // DEPRECATED (v2.22) method: get_bytes_per_pixel - #GdkImage should not be used anymore.
2588 // Determines the number of bytes per pixel of the image.
2589 // RETURNS: the bytes per pixel
2590 ushort get_bytes_per_pixel()() nothrow {
2591 return gdk_image_get_bytes_per_pixel(&this);
2594 // Unintrospectable method: get_colormap() / gdk_image_get_colormap()
2595 // DEPRECATED (v2.22) method: get_colormap - #GdkImage should not be used anymore.
2596 // Retrieves the colormap for a given image, if it exists. An image
2597 // will have a colormap if the drawable from which it was created has
2598 // a colormap, or if a colormap was set explicitely with
2599 // gdk_image_set_colormap().
2600 // RETURNS: colormap for the image
2601 Colormap* get_colormap()() nothrow {
2602 return gdk_image_get_colormap(&this);
2605 // VERSION: 2.22
2606 // DEPRECATED (v2.22) method: get_depth - #GdkImage should not be used anymore.
2607 // Determines the depth of the image.
2608 // RETURNS: the depth
2609 ushort get_depth()() nothrow {
2610 return gdk_image_get_depth(&this);
2613 // VERSION: 2.22
2614 // DEPRECATED (v2.22) method: get_height - #GdkImage should not be used anymore.
2615 // Determines the height of the image.
2616 // RETURNS: the height
2617 int get_height()() nothrow {
2618 return gdk_image_get_height(&this);
2621 // VERSION: 2.22
2622 // DEPRECATED (v2.22) method: get_image_type - #GdkImage should not be used anymore.
2623 // Determines the type of a given image.
2624 // RETURNS: the #GdkImageType of the image
2625 ImageType get_image_type()() nothrow {
2626 return gdk_image_get_image_type(&this);
2628 uint get_pixel()(int x, int y) nothrow {
2629 return gdk_image_get_pixel(&this, x, y);
2632 // Unintrospectable method: get_pixels() / gdk_image_get_pixels()
2633 // VERSION: 2.22
2634 // DEPRECATED (v2.22) method: get_pixels - #GdkImage should not be used anymore.
2635 // Returns a pointer to the pixel data of the image.
2636 // RETURNS: the pixel data of the image
2637 void* get_pixels()() nothrow {
2638 return gdk_image_get_pixels(&this);
2641 // Unintrospectable method: get_visual() / gdk_image_get_visual()
2642 // VERSION: 2.22
2643 // DEPRECATED (v2.22) method: get_visual - #GdkImage should not be used anymore.
2644 // Determines the visual that was used to create the image.
2645 // RETURNS: a #GdkVisual
2646 Visual* get_visual()() nothrow {
2647 return gdk_image_get_visual(&this);
2650 // VERSION: 2.22
2651 // DEPRECATED (v2.22) method: get_width - #GdkImage should not be used anymore.
2652 // Determines the width of the image.
2653 // RETURNS: the width
2654 int get_width()() nothrow {
2655 return gdk_image_get_width(&this);
2657 void put_pixel()(int x, int y, uint pixel) nothrow {
2658 gdk_image_put_pixel(&this, x, y, pixel);
2661 // Unintrospectable method: ref() / gdk_image_ref()
2662 // DEPRECATED (v2.0) method: ref - Use g_object_ref() instead.
2663 // Deprecated function; use g_object_ref() instead.
2664 // RETURNS: the image
2665 Image* ref_()() nothrow {
2666 return gdk_image_ref(&this);
2669 // DEPRECATED (v2.22) method: set_colormap - #GdkImage should not be used anymore.
2670 // Sets the colormap for the image to the given colormap. Normally
2671 // there's no need to use this function, images are created with the
2672 // correct colormap if you get the image from a drawable. If you
2673 // create the image from scratch, use the colormap of the drawable you
2674 // intend to render the image to.
2675 // <colormap>: a #GdkColormap
2676 void set_colormap()(Colormap* colormap) nothrow {
2677 gdk_image_set_colormap(&this, colormap);
2680 // DEPRECATED (v2.0) method: unref - Use g_object_unref() instead.
2681 // Deprecated function; use g_object_unref() instead.
2682 void unref()() nothrow {
2683 gdk_image_unref(&this);
2687 struct ImageClass {
2688 GObject2.ObjectClass parent_class;
2691 enum ImageType {
2692 NORMAL = 0,
2693 SHARED = 1,
2694 FASTEST = 2
2696 enum InputCondition {
2697 READ = 1,
2698 WRITE = 2,
2699 EXCEPTION = 4
2701 extern (C) alias void function (void* data, int source, InputCondition condition) nothrow InputFunction;
2703 enum InputMode {
2704 DISABLED = 0,
2705 SCREEN = 1,
2706 WINDOW = 2
2708 enum InputSource {
2709 MOUSE = 0,
2710 PEN = 1,
2711 ERASER = 2,
2712 CURSOR = 3
2714 enum JoinStyle {
2715 MITER = 0,
2716 ROUND = 1,
2717 BEVEL = 2
2719 enum int KEY_0 = 48;
2720 enum int KEY_1 = 49;
2721 enum int KEY_2 = 50;
2722 enum int KEY_3 = 51;
2723 enum int KEY_3270_AltCursor = 64784;
2724 enum int KEY_3270_Attn = 64782;
2725 enum int KEY_3270_BackTab = 64773;
2726 enum int KEY_3270_ChangeScreen = 64793;
2727 enum int KEY_3270_Copy = 64789;
2728 enum int KEY_3270_CursorBlink = 64783;
2729 enum int KEY_3270_CursorSelect = 64796;
2730 enum int KEY_3270_DeleteWord = 64794;
2731 enum int KEY_3270_Duplicate = 64769;
2732 enum int KEY_3270_Enter = 64798;
2733 enum int KEY_3270_EraseEOF = 64774;
2734 enum int KEY_3270_EraseInput = 64775;
2735 enum int KEY_3270_ExSelect = 64795;
2736 enum int KEY_3270_FieldMark = 64770;
2737 enum int KEY_3270_Ident = 64787;
2738 enum int KEY_3270_Jump = 64786;
2739 enum int KEY_3270_KeyClick = 64785;
2740 enum int KEY_3270_Left2 = 64772;
2741 enum int KEY_3270_PA1 = 64778;
2742 enum int KEY_3270_PA2 = 64779;
2743 enum int KEY_3270_PA3 = 64780;
2744 enum int KEY_3270_Play = 64790;
2745 enum int KEY_3270_PrintScreen = 64797;
2746 enum int KEY_3270_Quit = 64777;
2747 enum int KEY_3270_Record = 64792;
2748 enum int KEY_3270_Reset = 64776;
2749 enum int KEY_3270_Right2 = 64771;
2750 enum int KEY_3270_Rule = 64788;
2751 enum int KEY_3270_Setup = 64791;
2752 enum int KEY_3270_Test = 64781;
2753 enum int KEY_4 = 52;
2754 enum int KEY_5 = 53;
2755 enum int KEY_6 = 54;
2756 enum int KEY_7 = 55;
2757 enum int KEY_8 = 56;
2758 enum int KEY_9 = 57;
2759 enum int KEY_A = 65;
2760 enum int KEY_AE = 198;
2761 enum int KEY_Aacute = 193;
2762 enum int KEY_Abelowdot = 16785056;
2763 enum int KEY_Abreve = 451;
2764 enum int KEY_Abreveacute = 16785070;
2765 enum int KEY_Abrevebelowdot = 16785078;
2766 enum int KEY_Abrevegrave = 16785072;
2767 enum int KEY_Abrevehook = 16785074;
2768 enum int KEY_Abrevetilde = 16785076;
2769 enum int KEY_AccessX_Enable = 65136;
2770 enum int KEY_AccessX_Feedback_Enable = 65137;
2771 enum int KEY_Acircumflex = 194;
2772 enum int KEY_Acircumflexacute = 16785060;
2773 enum int KEY_Acircumflexbelowdot = 16785068;
2774 enum int KEY_Acircumflexgrave = 16785062;
2775 enum int KEY_Acircumflexhook = 16785064;
2776 enum int KEY_Acircumflextilde = 16785066;
2777 enum int KEY_AddFavorite = 269025081;
2778 enum int KEY_Adiaeresis = 196;
2779 enum int KEY_Agrave = 192;
2780 enum int KEY_Ahook = 16785058;
2781 enum int KEY_Alt_L = 65513;
2782 enum int KEY_Alt_R = 65514;
2783 enum int KEY_Amacron = 960;
2784 enum int KEY_Aogonek = 417;
2785 enum int KEY_ApplicationLeft = 269025104;
2786 enum int KEY_ApplicationRight = 269025105;
2787 enum int KEY_Arabic_0 = 16778848;
2788 enum int KEY_Arabic_1 = 16778849;
2789 enum int KEY_Arabic_2 = 16778850;
2790 enum int KEY_Arabic_3 = 16778851;
2791 enum int KEY_Arabic_4 = 16778852;
2792 enum int KEY_Arabic_5 = 16778853;
2793 enum int KEY_Arabic_6 = 16778854;
2794 enum int KEY_Arabic_7 = 16778855;
2795 enum int KEY_Arabic_8 = 16778856;
2796 enum int KEY_Arabic_9 = 16778857;
2797 enum int KEY_Arabic_ain = 1497;
2798 enum int KEY_Arabic_alef = 1479;
2799 enum int KEY_Arabic_alefmaksura = 1513;
2800 enum int KEY_Arabic_beh = 1480;
2801 enum int KEY_Arabic_comma = 1452;
2802 enum int KEY_Arabic_dad = 1494;
2803 enum int KEY_Arabic_dal = 1487;
2804 enum int KEY_Arabic_damma = 1519;
2805 enum int KEY_Arabic_dammatan = 1516;
2806 enum int KEY_Arabic_ddal = 16778888;
2807 enum int KEY_Arabic_farsi_yeh = 16778956;
2808 enum int KEY_Arabic_fatha = 1518;
2809 enum int KEY_Arabic_fathatan = 1515;
2810 enum int KEY_Arabic_feh = 1505;
2811 enum int KEY_Arabic_fullstop = 16778964;
2812 enum int KEY_Arabic_gaf = 16778927;
2813 enum int KEY_Arabic_ghain = 1498;
2814 enum int KEY_Arabic_ha = 1511;
2815 enum int KEY_Arabic_hah = 1485;
2816 enum int KEY_Arabic_hamza = 1473;
2817 enum int KEY_Arabic_hamza_above = 16778836;
2818 enum int KEY_Arabic_hamza_below = 16778837;
2819 enum int KEY_Arabic_hamzaonalef = 1475;
2820 enum int KEY_Arabic_hamzaonwaw = 1476;
2821 enum int KEY_Arabic_hamzaonyeh = 1478;
2822 enum int KEY_Arabic_hamzaunderalef = 1477;
2823 enum int KEY_Arabic_heh = 1511;
2824 enum int KEY_Arabic_heh_doachashmee = 16778942;
2825 enum int KEY_Arabic_heh_goal = 16778945;
2826 enum int KEY_Arabic_jeem = 1484;
2827 enum int KEY_Arabic_jeh = 16778904;
2828 enum int KEY_Arabic_kaf = 1507;
2829 enum int KEY_Arabic_kasra = 1520;
2830 enum int KEY_Arabic_kasratan = 1517;
2831 enum int KEY_Arabic_keheh = 16778921;
2832 enum int KEY_Arabic_khah = 1486;
2833 enum int KEY_Arabic_lam = 1508;
2834 enum int KEY_Arabic_madda_above = 16778835;
2835 enum int KEY_Arabic_maddaonalef = 1474;
2836 enum int KEY_Arabic_meem = 1509;
2837 enum int KEY_Arabic_noon = 1510;
2838 enum int KEY_Arabic_noon_ghunna = 16778938;
2839 enum int KEY_Arabic_peh = 16778878;
2840 enum int KEY_Arabic_percent = 16778858;
2841 enum int KEY_Arabic_qaf = 1506;
2842 enum int KEY_Arabic_question_mark = 1471;
2843 enum int KEY_Arabic_ra = 1489;
2844 enum int KEY_Arabic_rreh = 16778897;
2845 enum int KEY_Arabic_sad = 1493;
2846 enum int KEY_Arabic_seen = 1491;
2847 enum int KEY_Arabic_semicolon = 1467;
2848 enum int KEY_Arabic_shadda = 1521;
2849 enum int KEY_Arabic_sheen = 1492;
2850 enum int KEY_Arabic_sukun = 1522;
2851 enum int KEY_Arabic_superscript_alef = 16778864;
2852 enum int KEY_Arabic_switch = 65406;
2853 enum int KEY_Arabic_tah = 1495;
2854 enum int KEY_Arabic_tatweel = 1504;
2855 enum int KEY_Arabic_tcheh = 16778886;
2856 enum int KEY_Arabic_teh = 1482;
2857 enum int KEY_Arabic_tehmarbuta = 1481;
2858 enum int KEY_Arabic_thal = 1488;
2859 enum int KEY_Arabic_theh = 1483;
2860 enum int KEY_Arabic_tteh = 16778873;
2861 enum int KEY_Arabic_veh = 16778916;
2862 enum int KEY_Arabic_waw = 1512;
2863 enum int KEY_Arabic_yeh = 1514;
2864 enum int KEY_Arabic_yeh_baree = 16778962;
2865 enum int KEY_Arabic_zah = 1496;
2866 enum int KEY_Arabic_zain = 1490;
2867 enum int KEY_Aring = 197;
2868 enum int KEY_Armenian_AT = 16778552;
2869 enum int KEY_Armenian_AYB = 16778545;
2870 enum int KEY_Armenian_BEN = 16778546;
2871 enum int KEY_Armenian_CHA = 16778569;
2872 enum int KEY_Armenian_DA = 16778548;
2873 enum int KEY_Armenian_DZA = 16778561;
2874 enum int KEY_Armenian_E = 16778551;
2875 enum int KEY_Armenian_FE = 16778582;
2876 enum int KEY_Armenian_GHAT = 16778562;
2877 enum int KEY_Armenian_GIM = 16778547;
2878 enum int KEY_Armenian_HI = 16778565;
2879 enum int KEY_Armenian_HO = 16778560;
2880 enum int KEY_Armenian_INI = 16778555;
2881 enum int KEY_Armenian_JE = 16778571;
2882 enum int KEY_Armenian_KE = 16778580;
2883 enum int KEY_Armenian_KEN = 16778559;
2884 enum int KEY_Armenian_KHE = 16778557;
2885 enum int KEY_Armenian_LYUN = 16778556;
2886 enum int KEY_Armenian_MEN = 16778564;
2887 enum int KEY_Armenian_NU = 16778566;
2888 enum int KEY_Armenian_O = 16778581;
2889 enum int KEY_Armenian_PE = 16778570;
2890 enum int KEY_Armenian_PYUR = 16778579;
2891 enum int KEY_Armenian_RA = 16778572;
2892 enum int KEY_Armenian_RE = 16778576;
2893 enum int KEY_Armenian_SE = 16778573;
2894 enum int KEY_Armenian_SHA = 16778567;
2895 enum int KEY_Armenian_TCHE = 16778563;
2896 enum int KEY_Armenian_TO = 16778553;
2897 enum int KEY_Armenian_TSA = 16778558;
2898 enum int KEY_Armenian_TSO = 16778577;
2899 enum int KEY_Armenian_TYUN = 16778575;
2900 enum int KEY_Armenian_VEV = 16778574;
2901 enum int KEY_Armenian_VO = 16778568;
2902 enum int KEY_Armenian_VYUN = 16778578;
2903 enum int KEY_Armenian_YECH = 16778549;
2904 enum int KEY_Armenian_ZA = 16778550;
2905 enum int KEY_Armenian_ZHE = 16778554;
2906 enum int KEY_Armenian_accent = 16778587;
2907 enum int KEY_Armenian_amanak = 16778588;
2908 enum int KEY_Armenian_apostrophe = 16778586;
2909 enum int KEY_Armenian_at = 16778600;
2910 enum int KEY_Armenian_ayb = 16778593;
2911 enum int KEY_Armenian_ben = 16778594;
2912 enum int KEY_Armenian_but = 16778589;
2913 enum int KEY_Armenian_cha = 16778617;
2914 enum int KEY_Armenian_da = 16778596;
2915 enum int KEY_Armenian_dza = 16778609;
2916 enum int KEY_Armenian_e = 16778599;
2917 enum int KEY_Armenian_exclam = 16778588;
2918 enum int KEY_Armenian_fe = 16778630;
2919 enum int KEY_Armenian_full_stop = 16778633;
2920 enum int KEY_Armenian_ghat = 16778610;
2921 enum int KEY_Armenian_gim = 16778595;
2922 enum int KEY_Armenian_hi = 16778613;
2923 enum int KEY_Armenian_ho = 16778608;
2924 enum int KEY_Armenian_hyphen = 16778634;
2925 enum int KEY_Armenian_ini = 16778603;
2926 enum int KEY_Armenian_je = 16778619;
2927 enum int KEY_Armenian_ke = 16778628;
2928 enum int KEY_Armenian_ken = 16778607;
2929 enum int KEY_Armenian_khe = 16778605;
2930 enum int KEY_Armenian_ligature_ew = 16778631;
2931 enum int KEY_Armenian_lyun = 16778604;
2932 enum int KEY_Armenian_men = 16778612;
2933 enum int KEY_Armenian_nu = 16778614;
2934 enum int KEY_Armenian_o = 16778629;
2935 enum int KEY_Armenian_paruyk = 16778590;
2936 enum int KEY_Armenian_pe = 16778618;
2937 enum int KEY_Armenian_pyur = 16778627;
2938 enum int KEY_Armenian_question = 16778590;
2939 enum int KEY_Armenian_ra = 16778620;
2940 enum int KEY_Armenian_re = 16778624;
2941 enum int KEY_Armenian_se = 16778621;
2942 enum int KEY_Armenian_separation_mark = 16778589;
2943 enum int KEY_Armenian_sha = 16778615;
2944 enum int KEY_Armenian_shesht = 16778587;
2945 enum int KEY_Armenian_tche = 16778611;
2946 enum int KEY_Armenian_to = 16778601;
2947 enum int KEY_Armenian_tsa = 16778606;
2948 enum int KEY_Armenian_tso = 16778625;
2949 enum int KEY_Armenian_tyun = 16778623;
2950 enum int KEY_Armenian_verjaket = 16778633;
2951 enum int KEY_Armenian_vev = 16778622;
2952 enum int KEY_Armenian_vo = 16778616;
2953 enum int KEY_Armenian_vyun = 16778626;
2954 enum int KEY_Armenian_yech = 16778597;
2955 enum int KEY_Armenian_yentamna = 16778634;
2956 enum int KEY_Armenian_za = 16778598;
2957 enum int KEY_Armenian_zhe = 16778602;
2958 enum int KEY_Atilde = 195;
2959 enum int KEY_AudibleBell_Enable = 65146;
2960 enum int KEY_AudioCycleTrack = 269025179;
2961 enum int KEY_AudioForward = 269025175;
2962 enum int KEY_AudioLowerVolume = 269025041;
2963 enum int KEY_AudioMedia = 269025074;
2964 enum int KEY_AudioMute = 269025042;
2965 enum int KEY_AudioNext = 269025047;
2966 enum int KEY_AudioPause = 269025073;
2967 enum int KEY_AudioPlay = 269025044;
2968 enum int KEY_AudioPrev = 269025046;
2969 enum int KEY_AudioRaiseVolume = 269025043;
2970 enum int KEY_AudioRandomPlay = 269025177;
2971 enum int KEY_AudioRecord = 269025052;
2972 enum int KEY_AudioRepeat = 269025176;
2973 enum int KEY_AudioRewind = 269025086;
2974 enum int KEY_AudioStop = 269025045;
2975 enum int KEY_Away = 269025165;
2976 enum int KEY_B = 66;
2977 enum int KEY_Babovedot = 16784898;
2978 enum int KEY_Back = 269025062;
2979 enum int KEY_BackForward = 269025087;
2980 enum int KEY_BackSpace = 65288;
2981 enum int KEY_Battery = 269025171;
2982 enum int KEY_Begin = 65368;
2983 enum int KEY_Blue = 269025190;
2984 enum int KEY_Bluetooth = 269025172;
2985 enum int KEY_Book = 269025106;
2986 enum int KEY_BounceKeys_Enable = 65140;
2987 enum int KEY_Break = 65387;
2988 enum int KEY_BrightnessAdjust = 269025083;
2989 enum int KEY_Byelorussian_SHORTU = 1726;
2990 enum int KEY_Byelorussian_shortu = 1710;
2991 enum int KEY_C = 67;
2992 enum int KEY_CD = 269025107;
2993 enum int KEY_Cabovedot = 709;
2994 enum int KEY_Cacute = 454;
2995 enum int KEY_Calculator = 269025053;
2996 enum int KEY_Calendar = 269025056;
2997 enum int KEY_Cancel = 65385;
2998 enum int KEY_Caps_Lock = 65509;
2999 enum int KEY_Ccaron = 456;
3000 enum int KEY_Ccedilla = 199;
3001 enum int KEY_Ccircumflex = 710;
3002 enum int KEY_Clear = 65291;
3003 enum int KEY_ClearGrab = 269024801;
3004 enum int KEY_Close = 269025110;
3005 enum int KEY_Codeinput = 65335;
3006 enum int KEY_ColonSign = 16785569;
3007 enum int KEY_Community = 269025085;
3008 enum int KEY_ContrastAdjust = 269025058;
3009 enum int KEY_Control_L = 65507;
3010 enum int KEY_Control_R = 65508;
3011 enum int KEY_Copy = 269025111;
3012 enum int KEY_CruzeiroSign = 16785570;
3013 enum int KEY_Cut = 269025112;
3014 enum int KEY_CycleAngle = 269025180;
3015 enum int KEY_Cyrillic_A = 1761;
3016 enum int KEY_Cyrillic_BE = 1762;
3017 enum int KEY_Cyrillic_CHE = 1790;
3018 enum int KEY_Cyrillic_CHE_descender = 16778422;
3019 enum int KEY_Cyrillic_CHE_vertstroke = 16778424;
3020 enum int KEY_Cyrillic_DE = 1764;
3021 enum int KEY_Cyrillic_DZHE = 1727;
3022 enum int KEY_Cyrillic_E = 1788;
3023 enum int KEY_Cyrillic_EF = 1766;
3024 enum int KEY_Cyrillic_EL = 1772;
3025 enum int KEY_Cyrillic_EM = 1773;
3026 enum int KEY_Cyrillic_EN = 1774;
3027 enum int KEY_Cyrillic_EN_descender = 16778402;
3028 enum int KEY_Cyrillic_ER = 1778;
3029 enum int KEY_Cyrillic_ES = 1779;
3030 enum int KEY_Cyrillic_GHE = 1767;
3031 enum int KEY_Cyrillic_GHE_bar = 16778386;
3032 enum int KEY_Cyrillic_HA = 1768;
3033 enum int KEY_Cyrillic_HARDSIGN = 1791;
3034 enum int KEY_Cyrillic_HA_descender = 16778418;
3035 enum int KEY_Cyrillic_I = 1769;
3036 enum int KEY_Cyrillic_IE = 1765;
3037 enum int KEY_Cyrillic_IO = 1715;
3038 enum int KEY_Cyrillic_I_macron = 16778466;
3039 enum int KEY_Cyrillic_JE = 1720;
3040 enum int KEY_Cyrillic_KA = 1771;
3041 enum int KEY_Cyrillic_KA_descender = 16778394;
3042 enum int KEY_Cyrillic_KA_vertstroke = 16778396;
3043 enum int KEY_Cyrillic_LJE = 1721;
3044 enum int KEY_Cyrillic_NJE = 1722;
3045 enum int KEY_Cyrillic_O = 1775;
3046 enum int KEY_Cyrillic_O_bar = 16778472;
3047 enum int KEY_Cyrillic_PE = 1776;
3048 enum int KEY_Cyrillic_SCHWA = 16778456;
3049 enum int KEY_Cyrillic_SHA = 1787;
3050 enum int KEY_Cyrillic_SHCHA = 1789;
3051 enum int KEY_Cyrillic_SHHA = 16778426;
3052 enum int KEY_Cyrillic_SHORTI = 1770;
3053 enum int KEY_Cyrillic_SOFTSIGN = 1784;
3054 enum int KEY_Cyrillic_TE = 1780;
3055 enum int KEY_Cyrillic_TSE = 1763;
3056 enum int KEY_Cyrillic_U = 1781;
3057 enum int KEY_Cyrillic_U_macron = 16778478;
3058 enum int KEY_Cyrillic_U_straight = 16778414;
3059 enum int KEY_Cyrillic_U_straight_bar = 16778416;
3060 enum int KEY_Cyrillic_VE = 1783;
3061 enum int KEY_Cyrillic_YA = 1777;
3062 enum int KEY_Cyrillic_YERU = 1785;
3063 enum int KEY_Cyrillic_YU = 1760;
3064 enum int KEY_Cyrillic_ZE = 1786;
3065 enum int KEY_Cyrillic_ZHE = 1782;
3066 enum int KEY_Cyrillic_ZHE_descender = 16778390;
3067 enum int KEY_Cyrillic_a = 1729;
3068 enum int KEY_Cyrillic_be = 1730;
3069 enum int KEY_Cyrillic_che = 1758;
3070 enum int KEY_Cyrillic_che_descender = 16778423;
3071 enum int KEY_Cyrillic_che_vertstroke = 16778425;
3072 enum int KEY_Cyrillic_de = 1732;
3073 enum int KEY_Cyrillic_dzhe = 1711;
3074 enum int KEY_Cyrillic_e = 1756;
3075 enum int KEY_Cyrillic_ef = 1734;
3076 enum int KEY_Cyrillic_el = 1740;
3077 enum int KEY_Cyrillic_em = 1741;
3078 enum int KEY_Cyrillic_en = 1742;
3079 enum int KEY_Cyrillic_en_descender = 16778403;
3080 enum int KEY_Cyrillic_er = 1746;
3081 enum int KEY_Cyrillic_es = 1747;
3082 enum int KEY_Cyrillic_ghe = 1735;
3083 enum int KEY_Cyrillic_ghe_bar = 16778387;
3084 enum int KEY_Cyrillic_ha = 1736;
3085 enum int KEY_Cyrillic_ha_descender = 16778419;
3086 enum int KEY_Cyrillic_hardsign = 1759;
3087 enum int KEY_Cyrillic_i = 1737;
3088 enum int KEY_Cyrillic_i_macron = 16778467;
3089 enum int KEY_Cyrillic_ie = 1733;
3090 enum int KEY_Cyrillic_io = 1699;
3091 enum int KEY_Cyrillic_je = 1704;
3092 enum int KEY_Cyrillic_ka = 1739;
3093 enum int KEY_Cyrillic_ka_descender = 16778395;
3094 enum int KEY_Cyrillic_ka_vertstroke = 16778397;
3095 enum int KEY_Cyrillic_lje = 1705;
3096 enum int KEY_Cyrillic_nje = 1706;
3097 enum int KEY_Cyrillic_o = 1743;
3098 enum int KEY_Cyrillic_o_bar = 16778473;
3099 enum int KEY_Cyrillic_pe = 1744;
3100 enum int KEY_Cyrillic_schwa = 16778457;
3101 enum int KEY_Cyrillic_sha = 1755;
3102 enum int KEY_Cyrillic_shcha = 1757;
3103 enum int KEY_Cyrillic_shha = 16778427;
3104 enum int KEY_Cyrillic_shorti = 1738;
3105 enum int KEY_Cyrillic_softsign = 1752;
3106 enum int KEY_Cyrillic_te = 1748;
3107 enum int KEY_Cyrillic_tse = 1731;
3108 enum int KEY_Cyrillic_u = 1749;
3109 enum int KEY_Cyrillic_u_macron = 16778479;
3110 enum int KEY_Cyrillic_u_straight = 16778415;
3111 enum int KEY_Cyrillic_u_straight_bar = 16778417;
3112 enum int KEY_Cyrillic_ve = 1751;
3113 enum int KEY_Cyrillic_ya = 1745;
3114 enum int KEY_Cyrillic_yeru = 1753;
3115 enum int KEY_Cyrillic_yu = 1728;
3116 enum int KEY_Cyrillic_ze = 1754;
3117 enum int KEY_Cyrillic_zhe = 1750;
3118 enum int KEY_Cyrillic_zhe_descender = 16778391;
3119 enum int KEY_D = 68;
3120 enum int KEY_DOS = 269025114;
3121 enum int KEY_Dabovedot = 16784906;
3122 enum int KEY_Dcaron = 463;
3123 enum int KEY_Delete = 65535;
3124 enum int KEY_Display = 269025113;
3125 enum int KEY_Documents = 269025115;
3126 enum int KEY_DongSign = 16785579;
3127 enum int KEY_Down = 65364;
3128 enum int KEY_Dstroke = 464;
3129 enum int KEY_E = 69;
3130 enum int KEY_ENG = 957;
3131 enum int KEY_ETH = 208;
3132 enum int KEY_Eabovedot = 972;
3133 enum int KEY_Eacute = 201;
3134 enum int KEY_Ebelowdot = 16785080;
3135 enum int KEY_Ecaron = 460;
3136 enum int KEY_Ecircumflex = 202;
3137 enum int KEY_Ecircumflexacute = 16785086;
3138 enum int KEY_Ecircumflexbelowdot = 16785094;
3139 enum int KEY_Ecircumflexgrave = 16785088;
3140 enum int KEY_Ecircumflexhook = 16785090;
3141 enum int KEY_Ecircumflextilde = 16785092;
3142 enum int KEY_EcuSign = 16785568;
3143 enum int KEY_Ediaeresis = 203;
3144 enum int KEY_Egrave = 200;
3145 enum int KEY_Ehook = 16785082;
3146 enum int KEY_Eisu_Shift = 65327;
3147 enum int KEY_Eisu_toggle = 65328;
3148 enum int KEY_Eject = 269025068;
3149 enum int KEY_Emacron = 938;
3150 enum int KEY_End = 65367;
3151 enum int KEY_Eogonek = 458;
3152 enum int KEY_Escape = 65307;
3153 enum int KEY_Eth = 208;
3154 enum int KEY_Etilde = 16785084;
3155 enum int KEY_EuroSign = 8364;
3156 enum int KEY_Excel = 269025116;
3157 enum int KEY_Execute = 65378;
3158 enum int KEY_Explorer = 269025117;
3159 enum int KEY_F = 70;
3160 enum int KEY_F1 = 65470;
3161 enum int KEY_F10 = 65479;
3162 enum int KEY_F11 = 65480;
3163 enum int KEY_F12 = 65481;
3164 enum int KEY_F13 = 65482;
3165 enum int KEY_F14 = 65483;
3166 enum int KEY_F15 = 65484;
3167 enum int KEY_F16 = 65485;
3168 enum int KEY_F17 = 65486;
3169 enum int KEY_F18 = 65487;
3170 enum int KEY_F19 = 65488;
3171 enum int KEY_F2 = 65471;
3172 enum int KEY_F20 = 65489;
3173 enum int KEY_F21 = 65490;
3174 enum int KEY_F22 = 65491;
3175 enum int KEY_F23 = 65492;
3176 enum int KEY_F24 = 65493;
3177 enum int KEY_F25 = 65494;
3178 enum int KEY_F26 = 65495;
3179 enum int KEY_F27 = 65496;
3180 enum int KEY_F28 = 65497;
3181 enum int KEY_F29 = 65498;
3182 enum int KEY_F3 = 65472;
3183 enum int KEY_F30 = 65499;
3184 enum int KEY_F31 = 65500;
3185 enum int KEY_F32 = 65501;
3186 enum int KEY_F33 = 65502;
3187 enum int KEY_F34 = 65503;
3188 enum int KEY_F35 = 65504;
3189 enum int KEY_F4 = 65473;
3190 enum int KEY_F5 = 65474;
3191 enum int KEY_F6 = 65475;
3192 enum int KEY_F7 = 65476;
3193 enum int KEY_F8 = 65477;
3194 enum int KEY_F9 = 65478;
3195 enum int KEY_FFrancSign = 16785571;
3196 enum int KEY_Fabovedot = 16784926;
3197 enum int KEY_Farsi_0 = 16778992;
3198 enum int KEY_Farsi_1 = 16778993;
3199 enum int KEY_Farsi_2 = 16778994;
3200 enum int KEY_Farsi_3 = 16778995;
3201 enum int KEY_Farsi_4 = 16778996;
3202 enum int KEY_Farsi_5 = 16778997;
3203 enum int KEY_Farsi_6 = 16778998;
3204 enum int KEY_Farsi_7 = 16778999;
3205 enum int KEY_Farsi_8 = 16779000;
3206 enum int KEY_Farsi_9 = 16779001;
3207 enum int KEY_Farsi_yeh = 16778956;
3208 enum int KEY_Favorites = 269025072;
3209 enum int KEY_Finance = 269025084;
3210 enum int KEY_Find = 65384;
3211 enum int KEY_First_Virtual_Screen = 65232;
3212 enum int KEY_Forward = 269025063;
3213 enum int KEY_FrameBack = 269025181;
3214 enum int KEY_FrameForward = 269025182;
3215 enum int KEY_G = 71;
3216 enum int KEY_Gabovedot = 725;
3217 enum int KEY_Game = 269025118;
3218 enum int KEY_Gbreve = 683;
3219 enum int KEY_Gcaron = 16777702;
3220 enum int KEY_Gcedilla = 939;
3221 enum int KEY_Gcircumflex = 728;
3222 enum int KEY_Georgian_an = 16781520;
3223 enum int KEY_Georgian_ban = 16781521;
3224 enum int KEY_Georgian_can = 16781546;
3225 enum int KEY_Georgian_char = 16781549;
3226 enum int KEY_Georgian_chin = 16781545;
3227 enum int KEY_Georgian_cil = 16781548;
3228 enum int KEY_Georgian_don = 16781523;
3229 enum int KEY_Georgian_en = 16781524;
3230 enum int KEY_Georgian_fi = 16781558;
3231 enum int KEY_Georgian_gan = 16781522;
3232 enum int KEY_Georgian_ghan = 16781542;
3233 enum int KEY_Georgian_hae = 16781552;
3234 enum int KEY_Georgian_har = 16781556;
3235 enum int KEY_Georgian_he = 16781553;
3236 enum int KEY_Georgian_hie = 16781554;
3237 enum int KEY_Georgian_hoe = 16781557;
3238 enum int KEY_Georgian_in = 16781528;
3239 enum int KEY_Georgian_jhan = 16781551;
3240 enum int KEY_Georgian_jil = 16781547;
3241 enum int KEY_Georgian_kan = 16781529;
3242 enum int KEY_Georgian_khar = 16781541;
3243 enum int KEY_Georgian_las = 16781530;
3244 enum int KEY_Georgian_man = 16781531;
3245 enum int KEY_Georgian_nar = 16781532;
3246 enum int KEY_Georgian_on = 16781533;
3247 enum int KEY_Georgian_par = 16781534;
3248 enum int KEY_Georgian_phar = 16781540;
3249 enum int KEY_Georgian_qar = 16781543;
3250 enum int KEY_Georgian_rae = 16781536;
3251 enum int KEY_Georgian_san = 16781537;
3252 enum int KEY_Georgian_shin = 16781544;
3253 enum int KEY_Georgian_tan = 16781527;
3254 enum int KEY_Georgian_tar = 16781538;
3255 enum int KEY_Georgian_un = 16781539;
3256 enum int KEY_Georgian_vin = 16781525;
3257 enum int KEY_Georgian_we = 16781555;
3258 enum int KEY_Georgian_xan = 16781550;
3259 enum int KEY_Georgian_zen = 16781526;
3260 enum int KEY_Georgian_zhar = 16781535;
3261 enum int KEY_Go = 269025119;
3262 enum int KEY_Greek_ALPHA = 1985;
3263 enum int KEY_Greek_ALPHAaccent = 1953;
3264 enum int KEY_Greek_BETA = 1986;
3265 enum int KEY_Greek_CHI = 2007;
3266 enum int KEY_Greek_DELTA = 1988;
3267 enum int KEY_Greek_EPSILON = 1989;
3268 enum int KEY_Greek_EPSILONaccent = 1954;
3269 enum int KEY_Greek_ETA = 1991;
3270 enum int KEY_Greek_ETAaccent = 1955;
3271 enum int KEY_Greek_GAMMA = 1987;
3272 enum int KEY_Greek_IOTA = 1993;
3273 enum int KEY_Greek_IOTAaccent = 1956;
3274 enum int KEY_Greek_IOTAdiaeresis = 1957;
3275 enum int KEY_Greek_IOTAdieresis = 1957;
3276 enum int KEY_Greek_KAPPA = 1994;
3277 enum int KEY_Greek_LAMBDA = 1995;
3278 enum int KEY_Greek_LAMDA = 1995;
3279 enum int KEY_Greek_MU = 1996;
3280 enum int KEY_Greek_NU = 1997;
3281 enum int KEY_Greek_OMEGA = 2009;
3282 enum int KEY_Greek_OMEGAaccent = 1963;
3283 enum int KEY_Greek_OMICRON = 1999;
3284 enum int KEY_Greek_OMICRONaccent = 1959;
3285 enum int KEY_Greek_PHI = 2006;
3286 enum int KEY_Greek_PI = 2000;
3287 enum int KEY_Greek_PSI = 2008;
3288 enum int KEY_Greek_RHO = 2001;
3289 enum int KEY_Greek_SIGMA = 2002;
3290 enum int KEY_Greek_TAU = 2004;
3291 enum int KEY_Greek_THETA = 1992;
3292 enum int KEY_Greek_UPSILON = 2005;
3293 enum int KEY_Greek_UPSILONaccent = 1960;
3294 enum int KEY_Greek_UPSILONdieresis = 1961;
3295 enum int KEY_Greek_XI = 1998;
3296 enum int KEY_Greek_ZETA = 1990;
3297 enum int KEY_Greek_accentdieresis = 1966;
3298 enum int KEY_Greek_alpha = 2017;
3299 enum int KEY_Greek_alphaaccent = 1969;
3300 enum int KEY_Greek_beta = 2018;
3301 enum int KEY_Greek_chi = 2039;
3302 enum int KEY_Greek_delta = 2020;
3303 enum int KEY_Greek_epsilon = 2021;
3304 enum int KEY_Greek_epsilonaccent = 1970;
3305 enum int KEY_Greek_eta = 2023;
3306 enum int KEY_Greek_etaaccent = 1971;
3307 enum int KEY_Greek_finalsmallsigma = 2035;
3308 enum int KEY_Greek_gamma = 2019;
3309 enum int KEY_Greek_horizbar = 1967;
3310 enum int KEY_Greek_iota = 2025;
3311 enum int KEY_Greek_iotaaccent = 1972;
3312 enum int KEY_Greek_iotaaccentdieresis = 1974;
3313 enum int KEY_Greek_iotadieresis = 1973;
3314 enum int KEY_Greek_kappa = 2026;
3315 enum int KEY_Greek_lambda = 2027;
3316 enum int KEY_Greek_lamda = 2027;
3317 enum int KEY_Greek_mu = 2028;
3318 enum int KEY_Greek_nu = 2029;
3319 enum int KEY_Greek_omega = 2041;
3320 enum int KEY_Greek_omegaaccent = 1979;
3321 enum int KEY_Greek_omicron = 2031;
3322 enum int KEY_Greek_omicronaccent = 1975;
3323 enum int KEY_Greek_phi = 2038;
3324 enum int KEY_Greek_pi = 2032;
3325 enum int KEY_Greek_psi = 2040;
3326 enum int KEY_Greek_rho = 2033;
3327 enum int KEY_Greek_sigma = 2034;
3328 enum int KEY_Greek_switch = 65406;
3329 enum int KEY_Greek_tau = 2036;
3330 enum int KEY_Greek_theta = 2024;
3331 enum int KEY_Greek_upsilon = 2037;
3332 enum int KEY_Greek_upsilonaccent = 1976;
3333 enum int KEY_Greek_upsilonaccentdieresis = 1978;
3334 enum int KEY_Greek_upsilondieresis = 1977;
3335 enum int KEY_Greek_xi = 2030;
3336 enum int KEY_Greek_zeta = 2022;
3337 enum int KEY_Green = 269025188;
3338 enum int KEY_H = 72;
3339 enum int KEY_Hangul = 65329;
3340 enum int KEY_Hangul_A = 3775;
3341 enum int KEY_Hangul_AE = 3776;
3342 enum int KEY_Hangul_AraeA = 3830;
3343 enum int KEY_Hangul_AraeAE = 3831;
3344 enum int KEY_Hangul_Banja = 65337;
3345 enum int KEY_Hangul_Cieuc = 3770;
3346 enum int KEY_Hangul_Codeinput = 65335;
3347 enum int KEY_Hangul_Dikeud = 3751;
3348 enum int KEY_Hangul_E = 3780;
3349 enum int KEY_Hangul_EO = 3779;
3350 enum int KEY_Hangul_EU = 3793;
3351 enum int KEY_Hangul_End = 65331;
3352 enum int KEY_Hangul_Hanja = 65332;
3353 enum int KEY_Hangul_Hieuh = 3774;
3354 enum int KEY_Hangul_I = 3795;
3355 enum int KEY_Hangul_Ieung = 3767;
3356 enum int KEY_Hangul_J_Cieuc = 3818;
3357 enum int KEY_Hangul_J_Dikeud = 3802;
3358 enum int KEY_Hangul_J_Hieuh = 3822;
3359 enum int KEY_Hangul_J_Ieung = 3816;
3360 enum int KEY_Hangul_J_Jieuj = 3817;
3361 enum int KEY_Hangul_J_Khieuq = 3819;
3362 enum int KEY_Hangul_J_Kiyeog = 3796;
3363 enum int KEY_Hangul_J_KiyeogSios = 3798;
3364 enum int KEY_Hangul_J_KkogjiDalrinIeung = 3833;
3365 enum int KEY_Hangul_J_Mieum = 3811;
3366 enum int KEY_Hangul_J_Nieun = 3799;
3367 enum int KEY_Hangul_J_NieunHieuh = 3801;
3368 enum int KEY_Hangul_J_NieunJieuj = 3800;
3369 enum int KEY_Hangul_J_PanSios = 3832;
3370 enum int KEY_Hangul_J_Phieuf = 3821;
3371 enum int KEY_Hangul_J_Pieub = 3812;
3372 enum int KEY_Hangul_J_PieubSios = 3813;
3373 enum int KEY_Hangul_J_Rieul = 3803;
3374 enum int KEY_Hangul_J_RieulHieuh = 3810;
3375 enum int KEY_Hangul_J_RieulKiyeog = 3804;
3376 enum int KEY_Hangul_J_RieulMieum = 3805;
3377 enum int KEY_Hangul_J_RieulPhieuf = 3809;
3378 enum int KEY_Hangul_J_RieulPieub = 3806;
3379 enum int KEY_Hangul_J_RieulSios = 3807;
3380 enum int KEY_Hangul_J_RieulTieut = 3808;
3381 enum int KEY_Hangul_J_Sios = 3814;
3382 enum int KEY_Hangul_J_SsangKiyeog = 3797;
3383 enum int KEY_Hangul_J_SsangSios = 3815;
3384 enum int KEY_Hangul_J_Tieut = 3820;
3385 enum int KEY_Hangul_J_YeorinHieuh = 3834;
3386 enum int KEY_Hangul_Jamo = 65333;
3387 enum int KEY_Hangul_Jeonja = 65336;
3388 enum int KEY_Hangul_Jieuj = 3768;
3389 enum int KEY_Hangul_Khieuq = 3771;
3390 enum int KEY_Hangul_Kiyeog = 3745;
3391 enum int KEY_Hangul_KiyeogSios = 3747;
3392 enum int KEY_Hangul_KkogjiDalrinIeung = 3827;
3393 enum int KEY_Hangul_Mieum = 3761;
3394 enum int KEY_Hangul_MultipleCandidate = 65341;
3395 enum int KEY_Hangul_Nieun = 3748;
3396 enum int KEY_Hangul_NieunHieuh = 3750;
3397 enum int KEY_Hangul_NieunJieuj = 3749;
3398 enum int KEY_Hangul_O = 3783;
3399 enum int KEY_Hangul_OE = 3786;
3400 enum int KEY_Hangul_PanSios = 3826;
3401 enum int KEY_Hangul_Phieuf = 3773;
3402 enum int KEY_Hangul_Pieub = 3762;
3403 enum int KEY_Hangul_PieubSios = 3764;
3404 enum int KEY_Hangul_PostHanja = 65339;
3405 enum int KEY_Hangul_PreHanja = 65338;
3406 enum int KEY_Hangul_PreviousCandidate = 65342;
3407 enum int KEY_Hangul_Rieul = 3753;
3408 enum int KEY_Hangul_RieulHieuh = 3760;
3409 enum int KEY_Hangul_RieulKiyeog = 3754;
3410 enum int KEY_Hangul_RieulMieum = 3755;
3411 enum int KEY_Hangul_RieulPhieuf = 3759;
3412 enum int KEY_Hangul_RieulPieub = 3756;
3413 enum int KEY_Hangul_RieulSios = 3757;
3414 enum int KEY_Hangul_RieulTieut = 3758;
3415 enum int KEY_Hangul_RieulYeorinHieuh = 3823;
3416 enum int KEY_Hangul_Romaja = 65334;
3417 enum int KEY_Hangul_SingleCandidate = 65340;
3418 enum int KEY_Hangul_Sios = 3765;
3419 enum int KEY_Hangul_Special = 65343;
3420 enum int KEY_Hangul_SsangDikeud = 3752;
3421 enum int KEY_Hangul_SsangJieuj = 3769;
3422 enum int KEY_Hangul_SsangKiyeog = 3746;
3423 enum int KEY_Hangul_SsangPieub = 3763;
3424 enum int KEY_Hangul_SsangSios = 3766;
3425 enum int KEY_Hangul_Start = 65330;
3426 enum int KEY_Hangul_SunkyeongeumMieum = 3824;
3427 enum int KEY_Hangul_SunkyeongeumPhieuf = 3828;
3428 enum int KEY_Hangul_SunkyeongeumPieub = 3825;
3429 enum int KEY_Hangul_Tieut = 3772;
3430 enum int KEY_Hangul_U = 3788;
3431 enum int KEY_Hangul_WA = 3784;
3432 enum int KEY_Hangul_WAE = 3785;
3433 enum int KEY_Hangul_WE = 3790;
3434 enum int KEY_Hangul_WEO = 3789;
3435 enum int KEY_Hangul_WI = 3791;
3436 enum int KEY_Hangul_YA = 3777;
3437 enum int KEY_Hangul_YAE = 3778;
3438 enum int KEY_Hangul_YE = 3782;
3439 enum int KEY_Hangul_YEO = 3781;
3440 enum int KEY_Hangul_YI = 3794;
3441 enum int KEY_Hangul_YO = 3787;
3442 enum int KEY_Hangul_YU = 3792;
3443 enum int KEY_Hangul_YeorinHieuh = 3829;
3444 enum int KEY_Hangul_switch = 65406;
3445 enum int KEY_Hankaku = 65321;
3446 enum int KEY_Hcircumflex = 678;
3447 enum int KEY_Hebrew_switch = 65406;
3448 enum int KEY_Help = 65386;
3449 enum int KEY_Henkan = 65315;
3450 enum int KEY_Henkan_Mode = 65315;
3451 enum int KEY_Hibernate = 269025192;
3452 enum int KEY_Hiragana = 65317;
3453 enum int KEY_Hiragana_Katakana = 65319;
3454 enum int KEY_History = 269025079;
3455 enum int KEY_Home = 65360;
3456 enum int KEY_HomePage = 269025048;
3457 enum int KEY_HotLinks = 269025082;
3458 enum int KEY_Hstroke = 673;
3459 enum int KEY_Hyper_L = 65517;
3460 enum int KEY_Hyper_R = 65518;
3461 enum int KEY_I = 73;
3462 enum int KEY_ISO_Center_Object = 65075;
3463 enum int KEY_ISO_Continuous_Underline = 65072;
3464 enum int KEY_ISO_Discontinuous_Underline = 65073;
3465 enum int KEY_ISO_Emphasize = 65074;
3466 enum int KEY_ISO_Enter = 65076;
3467 enum int KEY_ISO_Fast_Cursor_Down = 65071;
3468 enum int KEY_ISO_Fast_Cursor_Left = 65068;
3469 enum int KEY_ISO_Fast_Cursor_Right = 65069;
3470 enum int KEY_ISO_Fast_Cursor_Up = 65070;
3471 enum int KEY_ISO_First_Group = 65036;
3472 enum int KEY_ISO_First_Group_Lock = 65037;
3473 enum int KEY_ISO_Group_Latch = 65030;
3474 enum int KEY_ISO_Group_Lock = 65031;
3475 enum int KEY_ISO_Group_Shift = 65406;
3476 enum int KEY_ISO_Last_Group = 65038;
3477 enum int KEY_ISO_Last_Group_Lock = 65039;
3478 enum int KEY_ISO_Left_Tab = 65056;
3479 enum int KEY_ISO_Level2_Latch = 65026;
3480 enum int KEY_ISO_Level3_Latch = 65028;
3481 enum int KEY_ISO_Level3_Lock = 65029;
3482 enum int KEY_ISO_Level3_Shift = 65027;
3483 enum int KEY_ISO_Level5_Latch = 65042;
3484 enum int KEY_ISO_Level5_Lock = 65043;
3485 enum int KEY_ISO_Level5_Shift = 65041;
3486 enum int KEY_ISO_Lock = 65025;
3487 enum int KEY_ISO_Move_Line_Down = 65058;
3488 enum int KEY_ISO_Move_Line_Up = 65057;
3489 enum int KEY_ISO_Next_Group = 65032;
3490 enum int KEY_ISO_Next_Group_Lock = 65033;
3491 enum int KEY_ISO_Partial_Line_Down = 65060;
3492 enum int KEY_ISO_Partial_Line_Up = 65059;
3493 enum int KEY_ISO_Partial_Space_Left = 65061;
3494 enum int KEY_ISO_Partial_Space_Right = 65062;
3495 enum int KEY_ISO_Prev_Group = 65034;
3496 enum int KEY_ISO_Prev_Group_Lock = 65035;
3497 enum int KEY_ISO_Release_Both_Margins = 65067;
3498 enum int KEY_ISO_Release_Margin_Left = 65065;
3499 enum int KEY_ISO_Release_Margin_Right = 65066;
3500 enum int KEY_ISO_Set_Margin_Left = 65063;
3501 enum int KEY_ISO_Set_Margin_Right = 65064;
3502 enum int KEY_Iabovedot = 681;
3503 enum int KEY_Iacute = 205;
3504 enum int KEY_Ibelowdot = 16785098;
3505 enum int KEY_Ibreve = 16777516;
3506 enum int KEY_Icircumflex = 206;
3507 enum int KEY_Idiaeresis = 207;
3508 enum int KEY_Igrave = 204;
3509 enum int KEY_Ihook = 16785096;
3510 enum int KEY_Imacron = 975;
3511 enum int KEY_Insert = 65379;
3512 enum int KEY_Iogonek = 967;
3513 enum int KEY_Itilde = 933;
3514 enum int KEY_J = 74;
3515 enum int KEY_Jcircumflex = 684;
3516 enum int KEY_K = 75;
3517 enum int KEY_KP_0 = 65456;
3518 enum int KEY_KP_1 = 65457;
3519 enum int KEY_KP_2 = 65458;
3520 enum int KEY_KP_3 = 65459;
3521 enum int KEY_KP_4 = 65460;
3522 enum int KEY_KP_5 = 65461;
3523 enum int KEY_KP_6 = 65462;
3524 enum int KEY_KP_7 = 65463;
3525 enum int KEY_KP_8 = 65464;
3526 enum int KEY_KP_9 = 65465;
3527 enum int KEY_KP_Add = 65451;
3528 enum int KEY_KP_Begin = 65437;
3529 enum int KEY_KP_Decimal = 65454;
3530 enum int KEY_KP_Delete = 65439;
3531 enum int KEY_KP_Divide = 65455;
3532 enum int KEY_KP_Down = 65433;
3533 enum int KEY_KP_End = 65436;
3534 enum int KEY_KP_Enter = 65421;
3535 enum int KEY_KP_Equal = 65469;
3536 enum int KEY_KP_F1 = 65425;
3537 enum int KEY_KP_F2 = 65426;
3538 enum int KEY_KP_F3 = 65427;
3539 enum int KEY_KP_F4 = 65428;
3540 enum int KEY_KP_Home = 65429;
3541 enum int KEY_KP_Insert = 65438;
3542 enum int KEY_KP_Left = 65430;
3543 enum int KEY_KP_Multiply = 65450;
3544 enum int KEY_KP_Next = 65435;
3545 enum int KEY_KP_Page_Down = 65435;
3546 enum int KEY_KP_Page_Up = 65434;
3547 enum int KEY_KP_Prior = 65434;
3548 enum int KEY_KP_Right = 65432;
3549 enum int KEY_KP_Separator = 65452;
3550 enum int KEY_KP_Space = 65408;
3551 enum int KEY_KP_Subtract = 65453;
3552 enum int KEY_KP_Tab = 65417;
3553 enum int KEY_KP_Up = 65431;
3554 enum int KEY_Kana_Lock = 65325;
3555 enum int KEY_Kana_Shift = 65326;
3556 enum int KEY_Kanji = 65313;
3557 enum int KEY_Kanji_Bangou = 65335;
3558 enum int KEY_Katakana = 65318;
3559 enum int KEY_KbdBrightnessDown = 269025030;
3560 enum int KEY_KbdBrightnessUp = 269025029;
3561 enum int KEY_KbdLightOnOff = 269025028;
3562 enum int KEY_Kcedilla = 979;
3563 enum int KEY_Korean_Won = 3839;
3564 enum int KEY_L = 76;
3565 enum int KEY_L1 = 65480;
3566 enum int KEY_L10 = 65489;
3567 enum int KEY_L2 = 65481;
3568 enum int KEY_L3 = 65482;
3569 enum int KEY_L4 = 65483;
3570 enum int KEY_L5 = 65484;
3571 enum int KEY_L6 = 65485;
3572 enum int KEY_L7 = 65486;
3573 enum int KEY_L8 = 65487;
3574 enum int KEY_L9 = 65488;
3575 enum int KEY_Lacute = 453;
3576 enum int KEY_Last_Virtual_Screen = 65236;
3577 enum int KEY_Launch0 = 269025088;
3578 enum int KEY_Launch1 = 269025089;
3579 enum int KEY_Launch2 = 269025090;
3580 enum int KEY_Launch3 = 269025091;
3581 enum int KEY_Launch4 = 269025092;
3582 enum int KEY_Launch5 = 269025093;
3583 enum int KEY_Launch6 = 269025094;
3584 enum int KEY_Launch7 = 269025095;
3585 enum int KEY_Launch8 = 269025096;
3586 enum int KEY_Launch9 = 269025097;
3587 enum int KEY_LaunchA = 269025098;
3588 enum int KEY_LaunchB = 269025099;
3589 enum int KEY_LaunchC = 269025100;
3590 enum int KEY_LaunchD = 269025101;
3591 enum int KEY_LaunchE = 269025102;
3592 enum int KEY_LaunchF = 269025103;
3593 enum int KEY_Lbelowdot = 16784950;
3594 enum int KEY_Lcaron = 421;
3595 enum int KEY_Lcedilla = 934;
3596 enum int KEY_Left = 65361;
3597 enum int KEY_LightBulb = 269025077;
3598 enum int KEY_Linefeed = 65290;
3599 enum int KEY_LiraSign = 16785572;
3600 enum int KEY_LogOff = 269025121;
3601 enum int KEY_Lstroke = 419;
3602 enum int KEY_M = 77;
3603 enum int KEY_Mabovedot = 16784960;
3604 enum int KEY_Macedonia_DSE = 1717;
3605 enum int KEY_Macedonia_GJE = 1714;
3606 enum int KEY_Macedonia_KJE = 1724;
3607 enum int KEY_Macedonia_dse = 1701;
3608 enum int KEY_Macedonia_gje = 1698;
3609 enum int KEY_Macedonia_kje = 1708;
3610 enum int KEY_Mae_Koho = 65342;
3611 enum int KEY_Mail = 269025049;
3612 enum int KEY_MailForward = 269025168;
3613 enum int KEY_Market = 269025122;
3614 enum int KEY_Massyo = 65324;
3615 enum int KEY_Meeting = 269025123;
3616 enum int KEY_Memo = 269025054;
3617 enum int KEY_Menu = 65383;
3618 enum int KEY_MenuKB = 269025125;
3619 enum int KEY_MenuPB = 269025126;
3620 enum int KEY_Messenger = 269025166;
3621 enum int KEY_Meta_L = 65511;
3622 enum int KEY_Meta_R = 65512;
3623 enum int KEY_MillSign = 16785573;
3624 enum int KEY_ModeLock = 269025025;
3625 enum int KEY_Mode_switch = 65406;
3626 enum int KEY_MonBrightnessDown = 269025027;
3627 enum int KEY_MonBrightnessUp = 269025026;
3628 enum int KEY_MouseKeys_Accel_Enable = 65143;
3629 enum int KEY_MouseKeys_Enable = 65142;
3630 enum int KEY_Muhenkan = 65314;
3631 enum int KEY_Multi_key = 65312;
3632 enum int KEY_MultipleCandidate = 65341;
3633 enum int KEY_Music = 269025170;
3634 enum int KEY_MyComputer = 269025075;
3635 enum int KEY_MySites = 269025127;
3636 enum int KEY_N = 78;
3637 enum int KEY_Nacute = 465;
3638 enum int KEY_NairaSign = 16785574;
3639 enum int KEY_Ncaron = 466;
3640 enum int KEY_Ncedilla = 977;
3641 enum int KEY_New = 269025128;
3642 enum int KEY_NewSheqelSign = 16785578;
3643 enum int KEY_News = 269025129;
3644 enum int KEY_Next = 65366;
3645 enum int KEY_Next_VMode = 269024802;
3646 enum int KEY_Next_Virtual_Screen = 65234;
3647 enum int KEY_Ntilde = 209;
3648 enum int KEY_Num_Lock = 65407;
3649 enum int KEY_O = 79;
3650 enum int KEY_OE = 5052;
3651 enum int KEY_Oacute = 211;
3652 enum int KEY_Obarred = 16777631;
3653 enum int KEY_Obelowdot = 16785100;
3654 enum int KEY_Ocaron = 16777681;
3655 enum int KEY_Ocircumflex = 212;
3656 enum int KEY_Ocircumflexacute = 16785104;
3657 enum int KEY_Ocircumflexbelowdot = 16785112;
3658 enum int KEY_Ocircumflexgrave = 16785106;
3659 enum int KEY_Ocircumflexhook = 16785108;
3660 enum int KEY_Ocircumflextilde = 16785110;
3661 enum int KEY_Odiaeresis = 214;
3662 enum int KEY_Odoubleacute = 469;
3663 enum int KEY_OfficeHome = 269025130;
3664 enum int KEY_Ograve = 210;
3665 enum int KEY_Ohook = 16785102;
3666 enum int KEY_Ohorn = 16777632;
3667 enum int KEY_Ohornacute = 16785114;
3668 enum int KEY_Ohornbelowdot = 16785122;
3669 enum int KEY_Ohorngrave = 16785116;
3670 enum int KEY_Ohornhook = 16785118;
3671 enum int KEY_Ohorntilde = 16785120;
3672 enum int KEY_Omacron = 978;
3673 enum int KEY_Ooblique = 216;
3674 enum int KEY_Open = 269025131;
3675 enum int KEY_OpenURL = 269025080;
3676 enum int KEY_Option = 269025132;
3677 enum int KEY_Oslash = 216;
3678 enum int KEY_Otilde = 213;
3679 enum int KEY_Overlay1_Enable = 65144;
3680 enum int KEY_Overlay2_Enable = 65145;
3681 enum int KEY_P = 80;
3682 enum int KEY_Pabovedot = 16784982;
3683 enum int KEY_Page_Down = 65366;
3684 enum int KEY_Page_Up = 65365;
3685 enum int KEY_Paste = 269025133;
3686 enum int KEY_Pause = 65299;
3687 enum int KEY_PesetaSign = 16785575;
3688 enum int KEY_Phone = 269025134;
3689 enum int KEY_Pictures = 269025169;
3690 enum int KEY_Pointer_Accelerate = 65274;
3691 enum int KEY_Pointer_Button1 = 65257;
3692 enum int KEY_Pointer_Button2 = 65258;
3693 enum int KEY_Pointer_Button3 = 65259;
3694 enum int KEY_Pointer_Button4 = 65260;
3695 enum int KEY_Pointer_Button5 = 65261;
3696 enum int KEY_Pointer_Button_Dflt = 65256;
3697 enum int KEY_Pointer_DblClick1 = 65263;
3698 enum int KEY_Pointer_DblClick2 = 65264;
3699 enum int KEY_Pointer_DblClick3 = 65265;
3700 enum int KEY_Pointer_DblClick4 = 65266;
3701 enum int KEY_Pointer_DblClick5 = 65267;
3702 enum int KEY_Pointer_DblClick_Dflt = 65262;
3703 enum int KEY_Pointer_DfltBtnNext = 65275;
3704 enum int KEY_Pointer_DfltBtnPrev = 65276;
3705 enum int KEY_Pointer_Down = 65251;
3706 enum int KEY_Pointer_DownLeft = 65254;
3707 enum int KEY_Pointer_DownRight = 65255;
3708 enum int KEY_Pointer_Drag1 = 65269;
3709 enum int KEY_Pointer_Drag2 = 65270;
3710 enum int KEY_Pointer_Drag3 = 65271;
3711 enum int KEY_Pointer_Drag4 = 65272;
3712 enum int KEY_Pointer_Drag5 = 65277;
3713 enum int KEY_Pointer_Drag_Dflt = 65268;
3714 enum int KEY_Pointer_EnableKeys = 65273;
3715 enum int KEY_Pointer_Left = 65248;
3716 enum int KEY_Pointer_Right = 65249;
3717 enum int KEY_Pointer_Up = 65250;
3718 enum int KEY_Pointer_UpLeft = 65252;
3719 enum int KEY_Pointer_UpRight = 65253;
3720 enum int KEY_PowerDown = 269025057;
3721 enum int KEY_PowerOff = 269025066;
3722 enum int KEY_Prev_VMode = 269024803;
3723 enum int KEY_Prev_Virtual_Screen = 65233;
3724 enum int KEY_PreviousCandidate = 65342;
3725 enum int KEY_Print = 65377;
3726 enum int KEY_Prior = 65365;
3727 enum int KEY_Q = 81;
3728 enum int KEY_R = 82;
3729 enum int KEY_R1 = 65490;
3730 enum int KEY_R10 = 65499;
3731 enum int KEY_R11 = 65500;
3732 enum int KEY_R12 = 65501;
3733 enum int KEY_R13 = 65502;
3734 enum int KEY_R14 = 65503;
3735 enum int KEY_R15 = 65504;
3736 enum int KEY_R2 = 65491;
3737 enum int KEY_R3 = 65492;
3738 enum int KEY_R4 = 65493;
3739 enum int KEY_R5 = 65494;
3740 enum int KEY_R6 = 65495;
3741 enum int KEY_R7 = 65496;
3742 enum int KEY_R8 = 65497;
3743 enum int KEY_R9 = 65498;
3744 enum int KEY_Racute = 448;
3745 enum int KEY_Rcaron = 472;
3746 enum int KEY_Rcedilla = 931;
3747 enum int KEY_Red = 269025187;
3748 enum int KEY_Redo = 65382;
3749 enum int KEY_Refresh = 269025065;
3750 enum int KEY_Reload = 269025139;
3751 enum int KEY_RepeatKeys_Enable = 65138;
3752 enum int KEY_Reply = 269025138;
3753 enum int KEY_Return = 65293;
3754 enum int KEY_Right = 65363;
3755 enum int KEY_RockerDown = 269025060;
3756 enum int KEY_RockerEnter = 269025061;
3757 enum int KEY_RockerUp = 269025059;
3758 enum int KEY_Romaji = 65316;
3759 enum int KEY_RotateWindows = 269025140;
3760 enum int KEY_RotationKB = 269025142;
3761 enum int KEY_RotationPB = 269025141;
3762 enum int KEY_RupeeSign = 16785576;
3763 enum int KEY_S = 83;
3764 enum int KEY_SCHWA = 16777615;
3765 enum int KEY_Sabovedot = 16784992;
3766 enum int KEY_Sacute = 422;
3767 enum int KEY_Save = 269025143;
3768 enum int KEY_Scaron = 425;
3769 enum int KEY_Scedilla = 426;
3770 enum int KEY_Scircumflex = 734;
3771 enum int KEY_ScreenSaver = 269025069;
3772 enum int KEY_ScrollClick = 269025146;
3773 enum int KEY_ScrollDown = 269025145;
3774 enum int KEY_ScrollUp = 269025144;
3775 enum int KEY_Scroll_Lock = 65300;
3776 enum int KEY_Search = 269025051;
3777 enum int KEY_Select = 65376;
3778 enum int KEY_SelectButton = 269025184;
3779 enum int KEY_Send = 269025147;
3780 enum int KEY_Serbian_DJE = 1713;
3781 enum int KEY_Serbian_DZE = 1727;
3782 enum int KEY_Serbian_JE = 1720;
3783 enum int KEY_Serbian_LJE = 1721;
3784 enum int KEY_Serbian_NJE = 1722;
3785 enum int KEY_Serbian_TSHE = 1723;
3786 enum int KEY_Serbian_dje = 1697;
3787 enum int KEY_Serbian_dze = 1711;
3788 enum int KEY_Serbian_je = 1704;
3789 enum int KEY_Serbian_lje = 1705;
3790 enum int KEY_Serbian_nje = 1706;
3791 enum int KEY_Serbian_tshe = 1707;
3792 enum int KEY_Shift_L = 65505;
3793 enum int KEY_Shift_Lock = 65510;
3794 enum int KEY_Shift_R = 65506;
3795 enum int KEY_Shop = 269025078;
3796 enum int KEY_SingleCandidate = 65340;
3797 enum int KEY_Sleep = 269025071;
3798 enum int KEY_SlowKeys_Enable = 65139;
3799 enum int KEY_Spell = 269025148;
3800 enum int KEY_SplitScreen = 269025149;
3801 enum int KEY_Standby = 269025040;
3802 enum int KEY_Start = 269025050;
3803 enum int KEY_StickyKeys_Enable = 65141;
3804 enum int KEY_Stop = 269025064;
3805 enum int KEY_Subtitle = 269025178;
3806 enum int KEY_Super_L = 65515;
3807 enum int KEY_Super_R = 65516;
3808 enum int KEY_Support = 269025150;
3809 enum int KEY_Suspend = 269025191;
3810 enum int KEY_Switch_VT_1 = 269024769;
3811 enum int KEY_Switch_VT_10 = 269024778;
3812 enum int KEY_Switch_VT_11 = 269024779;
3813 enum int KEY_Switch_VT_12 = 269024780;
3814 enum int KEY_Switch_VT_2 = 269024770;
3815 enum int KEY_Switch_VT_3 = 269024771;
3816 enum int KEY_Switch_VT_4 = 269024772;
3817 enum int KEY_Switch_VT_5 = 269024773;
3818 enum int KEY_Switch_VT_6 = 269024774;
3819 enum int KEY_Switch_VT_7 = 269024775;
3820 enum int KEY_Switch_VT_8 = 269024776;
3821 enum int KEY_Switch_VT_9 = 269024777;
3822 enum int KEY_Sys_Req = 65301;
3823 enum int KEY_T = 84;
3824 enum int KEY_THORN = 222;
3825 enum int KEY_Tab = 65289;
3826 enum int KEY_Tabovedot = 16785002;
3827 enum int KEY_TaskPane = 269025151;
3828 enum int KEY_Tcaron = 427;
3829 enum int KEY_Tcedilla = 478;
3830 enum int KEY_Terminal = 269025152;
3831 enum int KEY_Terminate_Server = 65237;
3832 enum int KEY_Thai_baht = 3551;
3833 enum int KEY_Thai_bobaimai = 3514;
3834 enum int KEY_Thai_chochan = 3496;
3835 enum int KEY_Thai_chochang = 3498;
3836 enum int KEY_Thai_choching = 3497;
3837 enum int KEY_Thai_chochoe = 3500;
3838 enum int KEY_Thai_dochada = 3502;
3839 enum int KEY_Thai_dodek = 3508;
3840 enum int KEY_Thai_fofa = 3517;
3841 enum int KEY_Thai_fofan = 3519;
3842 enum int KEY_Thai_hohip = 3531;
3843 enum int KEY_Thai_honokhuk = 3534;
3844 enum int KEY_Thai_khokhai = 3490;
3845 enum int KEY_Thai_khokhon = 3493;
3846 enum int KEY_Thai_khokhuat = 3491;
3847 enum int KEY_Thai_khokhwai = 3492;
3848 enum int KEY_Thai_khorakhang = 3494;
3849 enum int KEY_Thai_kokai = 3489;
3850 enum int KEY_Thai_lakkhangyao = 3557;
3851 enum int KEY_Thai_lekchet = 3575;
3852 enum int KEY_Thai_lekha = 3573;
3853 enum int KEY_Thai_lekhok = 3574;
3854 enum int KEY_Thai_lekkao = 3577;
3855 enum int KEY_Thai_leknung = 3569;
3856 enum int KEY_Thai_lekpaet = 3576;
3857 enum int KEY_Thai_leksam = 3571;
3858 enum int KEY_Thai_leksi = 3572;
3859 enum int KEY_Thai_leksong = 3570;
3860 enum int KEY_Thai_leksun = 3568;
3861 enum int KEY_Thai_lochula = 3532;
3862 enum int KEY_Thai_loling = 3525;
3863 enum int KEY_Thai_lu = 3526;
3864 enum int KEY_Thai_maichattawa = 3563;
3865 enum int KEY_Thai_maiek = 3560;
3866 enum int KEY_Thai_maihanakat = 3537;
3867 enum int KEY_Thai_maihanakat_maitho = 3550;
3868 enum int KEY_Thai_maitaikhu = 3559;
3869 enum int KEY_Thai_maitho = 3561;
3870 enum int KEY_Thai_maitri = 3562;
3871 enum int KEY_Thai_maiyamok = 3558;
3872 enum int KEY_Thai_moma = 3521;
3873 enum int KEY_Thai_ngongu = 3495;
3874 enum int KEY_Thai_nikhahit = 3565;
3875 enum int KEY_Thai_nonen = 3507;
3876 enum int KEY_Thai_nonu = 3513;
3877 enum int KEY_Thai_oang = 3533;
3878 enum int KEY_Thai_paiyannoi = 3535;
3879 enum int KEY_Thai_phinthu = 3546;
3880 enum int KEY_Thai_phophan = 3518;
3881 enum int KEY_Thai_phophung = 3516;
3882 enum int KEY_Thai_phosamphao = 3520;
3883 enum int KEY_Thai_popla = 3515;
3884 enum int KEY_Thai_rorua = 3523;
3885 enum int KEY_Thai_ru = 3524;
3886 enum int KEY_Thai_saraa = 3536;
3887 enum int KEY_Thai_saraaa = 3538;
3888 enum int KEY_Thai_saraae = 3553;
3889 enum int KEY_Thai_saraaimaimalai = 3556;
3890 enum int KEY_Thai_saraaimaimuan = 3555;
3891 enum int KEY_Thai_saraam = 3539;
3892 enum int KEY_Thai_sarae = 3552;
3893 enum int KEY_Thai_sarai = 3540;
3894 enum int KEY_Thai_saraii = 3541;
3895 enum int KEY_Thai_sarao = 3554;
3896 enum int KEY_Thai_sarau = 3544;
3897 enum int KEY_Thai_saraue = 3542;
3898 enum int KEY_Thai_sarauee = 3543;
3899 enum int KEY_Thai_sarauu = 3545;
3900 enum int KEY_Thai_sorusi = 3529;
3901 enum int KEY_Thai_sosala = 3528;
3902 enum int KEY_Thai_soso = 3499;
3903 enum int KEY_Thai_sosua = 3530;
3904 enum int KEY_Thai_thanthakhat = 3564;
3905 enum int KEY_Thai_thonangmontho = 3505;
3906 enum int KEY_Thai_thophuthao = 3506;
3907 enum int KEY_Thai_thothahan = 3511;
3908 enum int KEY_Thai_thothan = 3504;
3909 enum int KEY_Thai_thothong = 3512;
3910 enum int KEY_Thai_thothung = 3510;
3911 enum int KEY_Thai_topatak = 3503;
3912 enum int KEY_Thai_totao = 3509;
3913 enum int KEY_Thai_wowaen = 3527;
3914 enum int KEY_Thai_yoyak = 3522;
3915 enum int KEY_Thai_yoying = 3501;
3916 enum int KEY_Thorn = 222;
3917 enum int KEY_Time = 269025183;
3918 enum int KEY_ToDoList = 269025055;
3919 enum int KEY_Tools = 269025153;
3920 enum int KEY_TopMenu = 269025186;
3921 enum int KEY_TouchpadToggle = 269025193;
3922 enum int KEY_Touroku = 65323;
3923 enum int KEY_Travel = 269025154;
3924 enum int KEY_Tslash = 940;
3925 enum int KEY_U = 85;
3926 enum int KEY_UWB = 269025174;
3927 enum int KEY_Uacute = 218;
3928 enum int KEY_Ubelowdot = 16785124;
3929 enum int KEY_Ubreve = 733;
3930 enum int KEY_Ucircumflex = 219;
3931 enum int KEY_Udiaeresis = 220;
3932 enum int KEY_Udoubleacute = 475;
3933 enum int KEY_Ugrave = 217;
3934 enum int KEY_Uhook = 16785126;
3935 enum int KEY_Uhorn = 16777647;
3936 enum int KEY_Uhornacute = 16785128;
3937 enum int KEY_Uhornbelowdot = 16785136;
3938 enum int KEY_Uhorngrave = 16785130;
3939 enum int KEY_Uhornhook = 16785132;
3940 enum int KEY_Uhorntilde = 16785134;
3941 enum int KEY_Ukrainian_GHE_WITH_UPTURN = 1725;
3942 enum int KEY_Ukrainian_I = 1718;
3943 enum int KEY_Ukrainian_IE = 1716;
3944 enum int KEY_Ukrainian_YI = 1719;
3945 enum int KEY_Ukrainian_ghe_with_upturn = 1709;
3946 enum int KEY_Ukrainian_i = 1702;
3947 enum int KEY_Ukrainian_ie = 1700;
3948 enum int KEY_Ukrainian_yi = 1703;
3949 enum int KEY_Ukranian_I = 1718;
3950 enum int KEY_Ukranian_JE = 1716;
3951 enum int KEY_Ukranian_YI = 1719;
3952 enum int KEY_Ukranian_i = 1702;
3953 enum int KEY_Ukranian_je = 1700;
3954 enum int KEY_Ukranian_yi = 1703;
3955 enum int KEY_Umacron = 990;
3956 enum int KEY_Undo = 65381;
3957 enum int KEY_Ungrab = 269024800;
3958 enum int KEY_Uogonek = 985;
3959 enum int KEY_Up = 65362;
3960 enum int KEY_Uring = 473;
3961 enum int KEY_User1KB = 269025157;
3962 enum int KEY_User2KB = 269025158;
3963 enum int KEY_UserPB = 269025156;
3964 enum int KEY_Utilde = 989;
3965 enum int KEY_V = 86;
3966 enum int KEY_VendorHome = 269025076;
3967 enum int KEY_Video = 269025159;
3968 enum int KEY_View = 269025185;
3969 enum int KEY_VoidSymbol = 16777215;
3970 enum int KEY_W = 87;
3971 enum int KEY_WLAN = 269025173;
3972 enum int KEY_WWW = 269025070;
3973 enum int KEY_Wacute = 16785026;
3974 enum int KEY_WakeUp = 269025067;
3975 enum int KEY_Wcircumflex = 16777588;
3976 enum int KEY_Wdiaeresis = 16785028;
3977 enum int KEY_WebCam = 269025167;
3978 enum int KEY_Wgrave = 16785024;
3979 enum int KEY_WheelButton = 269025160;
3980 enum int KEY_WindowClear = 269025109;
3981 enum int KEY_WonSign = 16785577;
3982 enum int KEY_Word = 269025161;
3983 enum int KEY_X = 88;
3984 enum int KEY_Xabovedot = 16785034;
3985 enum int KEY_Xfer = 269025162;
3986 enum int KEY_Y = 89;
3987 enum int KEY_Yacute = 221;
3988 enum int KEY_Ybelowdot = 16785140;
3989 enum int KEY_Ycircumflex = 16777590;
3990 enum int KEY_Ydiaeresis = 5054;
3991 enum int KEY_Yellow = 269025189;
3992 enum int KEY_Ygrave = 16785138;
3993 enum int KEY_Yhook = 16785142;
3994 enum int KEY_Ytilde = 16785144;
3995 enum int KEY_Z = 90;
3996 enum int KEY_Zabovedot = 431;
3997 enum int KEY_Zacute = 428;
3998 enum int KEY_Zcaron = 430;
3999 enum int KEY_Zen_Koho = 65341;
4000 enum int KEY_Zenkaku = 65320;
4001 enum int KEY_Zenkaku_Hankaku = 65322;
4002 enum int KEY_ZoomIn = 269025163;
4003 enum int KEY_ZoomOut = 269025164;
4004 enum int KEY_Zstroke = 16777653;
4005 enum int KEY_a = 97;
4006 enum int KEY_aacute = 225;
4007 enum int KEY_abelowdot = 16785057;
4008 enum int KEY_abovedot = 511;
4009 enum int KEY_abreve = 483;
4010 enum int KEY_abreveacute = 16785071;
4011 enum int KEY_abrevebelowdot = 16785079;
4012 enum int KEY_abrevegrave = 16785073;
4013 enum int KEY_abrevehook = 16785075;
4014 enum int KEY_abrevetilde = 16785077;
4015 enum int KEY_acircumflex = 226;
4016 enum int KEY_acircumflexacute = 16785061;
4017 enum int KEY_acircumflexbelowdot = 16785069;
4018 enum int KEY_acircumflexgrave = 16785063;
4019 enum int KEY_acircumflexhook = 16785065;
4020 enum int KEY_acircumflextilde = 16785067;
4021 enum int KEY_acute = 180;
4022 enum int KEY_adiaeresis = 228;
4023 enum int KEY_ae = 230;
4024 enum int KEY_agrave = 224;
4025 enum int KEY_ahook = 16785059;
4026 enum int KEY_amacron = 992;
4027 enum int KEY_ampersand = 38;
4028 enum int KEY_aogonek = 433;
4029 enum int KEY_apostrophe = 39;
4030 enum int KEY_approxeq = 16785992;
4031 enum int KEY_approximate = 2248;
4032 enum int KEY_aring = 229;
4033 enum int KEY_asciicircum = 94;
4034 enum int KEY_asciitilde = 126;
4035 enum int KEY_asterisk = 42;
4036 enum int KEY_at = 64;
4037 enum int KEY_atilde = 227;
4038 enum int KEY_b = 98;
4039 enum int KEY_babovedot = 16784899;
4040 enum int KEY_backslash = 92;
4041 enum int KEY_ballotcross = 2804;
4042 enum int KEY_bar = 124;
4043 enum int KEY_because = 16785973;
4044 enum int KEY_blank = 2527;
4045 enum int KEY_botintegral = 2213;
4046 enum int KEY_botleftparens = 2220;
4047 enum int KEY_botleftsqbracket = 2216;
4048 enum int KEY_botleftsummation = 2226;
4049 enum int KEY_botrightparens = 2222;
4050 enum int KEY_botrightsqbracket = 2218;
4051 enum int KEY_botrightsummation = 2230;
4052 enum int KEY_bott = 2550;
4053 enum int KEY_botvertsummationconnector = 2228;
4054 enum int KEY_braceleft = 123;
4055 enum int KEY_braceright = 125;
4056 enum int KEY_bracketleft = 91;
4057 enum int KEY_bracketright = 93;
4058 enum int KEY_braille_blank = 16787456;
4059 enum int KEY_braille_dot_1 = 65521;
4060 enum int KEY_braille_dot_10 = 65530;
4061 enum int KEY_braille_dot_2 = 65522;
4062 enum int KEY_braille_dot_3 = 65523;
4063 enum int KEY_braille_dot_4 = 65524;
4064 enum int KEY_braille_dot_5 = 65525;
4065 enum int KEY_braille_dot_6 = 65526;
4066 enum int KEY_braille_dot_7 = 65527;
4067 enum int KEY_braille_dot_8 = 65528;
4068 enum int KEY_braille_dot_9 = 65529;
4069 enum int KEY_braille_dots_1 = 16787457;
4070 enum int KEY_braille_dots_12 = 16787459;
4071 enum int KEY_braille_dots_123 = 16787463;
4072 enum int KEY_braille_dots_1234 = 16787471;
4073 enum int KEY_braille_dots_12345 = 16787487;
4074 enum int KEY_braille_dots_123456 = 16787519;
4075 enum int KEY_braille_dots_1234567 = 16787583;
4076 enum int KEY_braille_dots_12345678 = 16787711;
4077 enum int KEY_braille_dots_1234568 = 16787647;
4078 enum int KEY_braille_dots_123457 = 16787551;
4079 enum int KEY_braille_dots_1234578 = 16787679;
4080 enum int KEY_braille_dots_123458 = 16787615;
4081 enum int KEY_braille_dots_12346 = 16787503;
4082 enum int KEY_braille_dots_123467 = 16787567;
4083 enum int KEY_braille_dots_1234678 = 16787695;
4084 enum int KEY_braille_dots_123468 = 16787631;
4085 enum int KEY_braille_dots_12347 = 16787535;
4086 enum int KEY_braille_dots_123478 = 16787663;
4087 enum int KEY_braille_dots_12348 = 16787599;
4088 enum int KEY_braille_dots_1235 = 16787479;
4089 enum int KEY_braille_dots_12356 = 16787511;
4090 enum int KEY_braille_dots_123567 = 16787575;
4091 enum int KEY_braille_dots_1235678 = 16787703;
4092 enum int KEY_braille_dots_123568 = 16787639;
4093 enum int KEY_braille_dots_12357 = 16787543;
4094 enum int KEY_braille_dots_123578 = 16787671;
4095 enum int KEY_braille_dots_12358 = 16787607;
4096 enum int KEY_braille_dots_1236 = 16787495;
4097 enum int KEY_braille_dots_12367 = 16787559;
4098 enum int KEY_braille_dots_123678 = 16787687;
4099 enum int KEY_braille_dots_12368 = 16787623;
4100 enum int KEY_braille_dots_1237 = 16787527;
4101 enum int KEY_braille_dots_12378 = 16787655;
4102 enum int KEY_braille_dots_1238 = 16787591;
4103 enum int KEY_braille_dots_124 = 16787467;
4104 enum int KEY_braille_dots_1245 = 16787483;
4105 enum int KEY_braille_dots_12456 = 16787515;
4106 enum int KEY_braille_dots_124567 = 16787579;
4107 enum int KEY_braille_dots_1245678 = 16787707;
4108 enum int KEY_braille_dots_124568 = 16787643;
4109 enum int KEY_braille_dots_12457 = 16787547;
4110 enum int KEY_braille_dots_124578 = 16787675;
4111 enum int KEY_braille_dots_12458 = 16787611;
4112 enum int KEY_braille_dots_1246 = 16787499;
4113 enum int KEY_braille_dots_12467 = 16787563;
4114 enum int KEY_braille_dots_124678 = 16787691;
4115 enum int KEY_braille_dots_12468 = 16787627;
4116 enum int KEY_braille_dots_1247 = 16787531;
4117 enum int KEY_braille_dots_12478 = 16787659;
4118 enum int KEY_braille_dots_1248 = 16787595;
4119 enum int KEY_braille_dots_125 = 16787475;
4120 enum int KEY_braille_dots_1256 = 16787507;
4121 enum int KEY_braille_dots_12567 = 16787571;
4122 enum int KEY_braille_dots_125678 = 16787699;
4123 enum int KEY_braille_dots_12568 = 16787635;
4124 enum int KEY_braille_dots_1257 = 16787539;
4125 enum int KEY_braille_dots_12578 = 16787667;
4126 enum int KEY_braille_dots_1258 = 16787603;
4127 enum int KEY_braille_dots_126 = 16787491;
4128 enum int KEY_braille_dots_1267 = 16787555;
4129 enum int KEY_braille_dots_12678 = 16787683;
4130 enum int KEY_braille_dots_1268 = 16787619;
4131 enum int KEY_braille_dots_127 = 16787523;
4132 enum int KEY_braille_dots_1278 = 16787651;
4133 enum int KEY_braille_dots_128 = 16787587;
4134 enum int KEY_braille_dots_13 = 16787461;
4135 enum int KEY_braille_dots_134 = 16787469;
4136 enum int KEY_braille_dots_1345 = 16787485;
4137 enum int KEY_braille_dots_13456 = 16787517;
4138 enum int KEY_braille_dots_134567 = 16787581;
4139 enum int KEY_braille_dots_1345678 = 16787709;
4140 enum int KEY_braille_dots_134568 = 16787645;
4141 enum int KEY_braille_dots_13457 = 16787549;
4142 enum int KEY_braille_dots_134578 = 16787677;
4143 enum int KEY_braille_dots_13458 = 16787613;
4144 enum int KEY_braille_dots_1346 = 16787501;
4145 enum int KEY_braille_dots_13467 = 16787565;
4146 enum int KEY_braille_dots_134678 = 16787693;
4147 enum int KEY_braille_dots_13468 = 16787629;
4148 enum int KEY_braille_dots_1347 = 16787533;
4149 enum int KEY_braille_dots_13478 = 16787661;
4150 enum int KEY_braille_dots_1348 = 16787597;
4151 enum int KEY_braille_dots_135 = 16787477;
4152 enum int KEY_braille_dots_1356 = 16787509;
4153 enum int KEY_braille_dots_13567 = 16787573;
4154 enum int KEY_braille_dots_135678 = 16787701;
4155 enum int KEY_braille_dots_13568 = 16787637;
4156 enum int KEY_braille_dots_1357 = 16787541;
4157 enum int KEY_braille_dots_13578 = 16787669;
4158 enum int KEY_braille_dots_1358 = 16787605;
4159 enum int KEY_braille_dots_136 = 16787493;
4160 enum int KEY_braille_dots_1367 = 16787557;
4161 enum int KEY_braille_dots_13678 = 16787685;
4162 enum int KEY_braille_dots_1368 = 16787621;
4163 enum int KEY_braille_dots_137 = 16787525;
4164 enum int KEY_braille_dots_1378 = 16787653;
4165 enum int KEY_braille_dots_138 = 16787589;
4166 enum int KEY_braille_dots_14 = 16787465;
4167 enum int KEY_braille_dots_145 = 16787481;
4168 enum int KEY_braille_dots_1456 = 16787513;
4169 enum int KEY_braille_dots_14567 = 16787577;
4170 enum int KEY_braille_dots_145678 = 16787705;
4171 enum int KEY_braille_dots_14568 = 16787641;
4172 enum int KEY_braille_dots_1457 = 16787545;
4173 enum int KEY_braille_dots_14578 = 16787673;
4174 enum int KEY_braille_dots_1458 = 16787609;
4175 enum int KEY_braille_dots_146 = 16787497;
4176 enum int KEY_braille_dots_1467 = 16787561;
4177 enum int KEY_braille_dots_14678 = 16787689;
4178 enum int KEY_braille_dots_1468 = 16787625;
4179 enum int KEY_braille_dots_147 = 16787529;
4180 enum int KEY_braille_dots_1478 = 16787657;
4181 enum int KEY_braille_dots_148 = 16787593;
4182 enum int KEY_braille_dots_15 = 16787473;
4183 enum int KEY_braille_dots_156 = 16787505;
4184 enum int KEY_braille_dots_1567 = 16787569;
4185 enum int KEY_braille_dots_15678 = 16787697;
4186 enum int KEY_braille_dots_1568 = 16787633;
4187 enum int KEY_braille_dots_157 = 16787537;
4188 enum int KEY_braille_dots_1578 = 16787665;
4189 enum int KEY_braille_dots_158 = 16787601;
4190 enum int KEY_braille_dots_16 = 16787489;
4191 enum int KEY_braille_dots_167 = 16787553;
4192 enum int KEY_braille_dots_1678 = 16787681;
4193 enum int KEY_braille_dots_168 = 16787617;
4194 enum int KEY_braille_dots_17 = 16787521;
4195 enum int KEY_braille_dots_178 = 16787649;
4196 enum int KEY_braille_dots_18 = 16787585;
4197 enum int KEY_braille_dots_2 = 16787458;
4198 enum int KEY_braille_dots_23 = 16787462;
4199 enum int KEY_braille_dots_234 = 16787470;
4200 enum int KEY_braille_dots_2345 = 16787486;
4201 enum int KEY_braille_dots_23456 = 16787518;
4202 enum int KEY_braille_dots_234567 = 16787582;
4203 enum int KEY_braille_dots_2345678 = 16787710;
4204 enum int KEY_braille_dots_234568 = 16787646;
4205 enum int KEY_braille_dots_23457 = 16787550;
4206 enum int KEY_braille_dots_234578 = 16787678;
4207 enum int KEY_braille_dots_23458 = 16787614;
4208 enum int KEY_braille_dots_2346 = 16787502;
4209 enum int KEY_braille_dots_23467 = 16787566;
4210 enum int KEY_braille_dots_234678 = 16787694;
4211 enum int KEY_braille_dots_23468 = 16787630;
4212 enum int KEY_braille_dots_2347 = 16787534;
4213 enum int KEY_braille_dots_23478 = 16787662;
4214 enum int KEY_braille_dots_2348 = 16787598;
4215 enum int KEY_braille_dots_235 = 16787478;
4216 enum int KEY_braille_dots_2356 = 16787510;
4217 enum int KEY_braille_dots_23567 = 16787574;
4218 enum int KEY_braille_dots_235678 = 16787702;
4219 enum int KEY_braille_dots_23568 = 16787638;
4220 enum int KEY_braille_dots_2357 = 16787542;
4221 enum int KEY_braille_dots_23578 = 16787670;
4222 enum int KEY_braille_dots_2358 = 16787606;
4223 enum int KEY_braille_dots_236 = 16787494;
4224 enum int KEY_braille_dots_2367 = 16787558;
4225 enum int KEY_braille_dots_23678 = 16787686;
4226 enum int KEY_braille_dots_2368 = 16787622;
4227 enum int KEY_braille_dots_237 = 16787526;
4228 enum int KEY_braille_dots_2378 = 16787654;
4229 enum int KEY_braille_dots_238 = 16787590;
4230 enum int KEY_braille_dots_24 = 16787466;
4231 enum int KEY_braille_dots_245 = 16787482;
4232 enum int KEY_braille_dots_2456 = 16787514;
4233 enum int KEY_braille_dots_24567 = 16787578;
4234 enum int KEY_braille_dots_245678 = 16787706;
4235 enum int KEY_braille_dots_24568 = 16787642;
4236 enum int KEY_braille_dots_2457 = 16787546;
4237 enum int KEY_braille_dots_24578 = 16787674;
4238 enum int KEY_braille_dots_2458 = 16787610;
4239 enum int KEY_braille_dots_246 = 16787498;
4240 enum int KEY_braille_dots_2467 = 16787562;
4241 enum int KEY_braille_dots_24678 = 16787690;
4242 enum int KEY_braille_dots_2468 = 16787626;
4243 enum int KEY_braille_dots_247 = 16787530;
4244 enum int KEY_braille_dots_2478 = 16787658;
4245 enum int KEY_braille_dots_248 = 16787594;
4246 enum int KEY_braille_dots_25 = 16787474;
4247 enum int KEY_braille_dots_256 = 16787506;
4248 enum int KEY_braille_dots_2567 = 16787570;
4249 enum int KEY_braille_dots_25678 = 16787698;
4250 enum int KEY_braille_dots_2568 = 16787634;
4251 enum int KEY_braille_dots_257 = 16787538;
4252 enum int KEY_braille_dots_2578 = 16787666;
4253 enum int KEY_braille_dots_258 = 16787602;
4254 enum int KEY_braille_dots_26 = 16787490;
4255 enum int KEY_braille_dots_267 = 16787554;
4256 enum int KEY_braille_dots_2678 = 16787682;
4257 enum int KEY_braille_dots_268 = 16787618;
4258 enum int KEY_braille_dots_27 = 16787522;
4259 enum int KEY_braille_dots_278 = 16787650;
4260 enum int KEY_braille_dots_28 = 16787586;
4261 enum int KEY_braille_dots_3 = 16787460;
4262 enum int KEY_braille_dots_34 = 16787468;
4263 enum int KEY_braille_dots_345 = 16787484;
4264 enum int KEY_braille_dots_3456 = 16787516;
4265 enum int KEY_braille_dots_34567 = 16787580;
4266 enum int KEY_braille_dots_345678 = 16787708;
4267 enum int KEY_braille_dots_34568 = 16787644;
4268 enum int KEY_braille_dots_3457 = 16787548;
4269 enum int KEY_braille_dots_34578 = 16787676;
4270 enum int KEY_braille_dots_3458 = 16787612;
4271 enum int KEY_braille_dots_346 = 16787500;
4272 enum int KEY_braille_dots_3467 = 16787564;
4273 enum int KEY_braille_dots_34678 = 16787692;
4274 enum int KEY_braille_dots_3468 = 16787628;
4275 enum int KEY_braille_dots_347 = 16787532;
4276 enum int KEY_braille_dots_3478 = 16787660;
4277 enum int KEY_braille_dots_348 = 16787596;
4278 enum int KEY_braille_dots_35 = 16787476;
4279 enum int KEY_braille_dots_356 = 16787508;
4280 enum int KEY_braille_dots_3567 = 16787572;
4281 enum int KEY_braille_dots_35678 = 16787700;
4282 enum int KEY_braille_dots_3568 = 16787636;
4283 enum int KEY_braille_dots_357 = 16787540;
4284 enum int KEY_braille_dots_3578 = 16787668;
4285 enum int KEY_braille_dots_358 = 16787604;
4286 enum int KEY_braille_dots_36 = 16787492;
4287 enum int KEY_braille_dots_367 = 16787556;
4288 enum int KEY_braille_dots_3678 = 16787684;
4289 enum int KEY_braille_dots_368 = 16787620;
4290 enum int KEY_braille_dots_37 = 16787524;
4291 enum int KEY_braille_dots_378 = 16787652;
4292 enum int KEY_braille_dots_38 = 16787588;
4293 enum int KEY_braille_dots_4 = 16787464;
4294 enum int KEY_braille_dots_45 = 16787480;
4295 enum int KEY_braille_dots_456 = 16787512;
4296 enum int KEY_braille_dots_4567 = 16787576;
4297 enum int KEY_braille_dots_45678 = 16787704;
4298 enum int KEY_braille_dots_4568 = 16787640;
4299 enum int KEY_braille_dots_457 = 16787544;
4300 enum int KEY_braille_dots_4578 = 16787672;
4301 enum int KEY_braille_dots_458 = 16787608;
4302 enum int KEY_braille_dots_46 = 16787496;
4303 enum int KEY_braille_dots_467 = 16787560;
4304 enum int KEY_braille_dots_4678 = 16787688;
4305 enum int KEY_braille_dots_468 = 16787624;
4306 enum int KEY_braille_dots_47 = 16787528;
4307 enum int KEY_braille_dots_478 = 16787656;
4308 enum int KEY_braille_dots_48 = 16787592;
4309 enum int KEY_braille_dots_5 = 16787472;
4310 enum int KEY_braille_dots_56 = 16787504;
4311 enum int KEY_braille_dots_567 = 16787568;
4312 enum int KEY_braille_dots_5678 = 16787696;
4313 enum int KEY_braille_dots_568 = 16787632;
4314 enum int KEY_braille_dots_57 = 16787536;
4315 enum int KEY_braille_dots_578 = 16787664;
4316 enum int KEY_braille_dots_58 = 16787600;
4317 enum int KEY_braille_dots_6 = 16787488;
4318 enum int KEY_braille_dots_67 = 16787552;
4319 enum int KEY_braille_dots_678 = 16787680;
4320 enum int KEY_braille_dots_68 = 16787616;
4321 enum int KEY_braille_dots_7 = 16787520;
4322 enum int KEY_braille_dots_78 = 16787648;
4323 enum int KEY_braille_dots_8 = 16787584;
4324 enum int KEY_breve = 418;
4325 enum int KEY_brokenbar = 166;
4326 enum int KEY_c = 99;
4327 enum int KEY_cabovedot = 741;
4328 enum int KEY_cacute = 486;
4329 enum int KEY_careof = 2744;
4330 enum int KEY_caret = 2812;
4331 enum int KEY_caron = 439;
4332 enum int KEY_ccaron = 488;
4333 enum int KEY_ccedilla = 231;
4334 enum int KEY_ccircumflex = 742;
4335 enum int KEY_cedilla = 184;
4336 enum int KEY_cent = 162;
4337 enum int KEY_checkerboard = 2529;
4338 enum int KEY_checkmark = 2803;
4339 enum int KEY_circle = 3023;
4340 enum int KEY_club = 2796;
4341 enum int KEY_colon = 58;
4342 enum int KEY_comma = 44;
4343 enum int KEY_containsas = 16785931;
4344 enum int KEY_copyright = 169;
4345 enum int KEY_cr = 2532;
4346 enum int KEY_crossinglines = 2542;
4347 enum int KEY_cuberoot = 16785947;
4348 enum int KEY_currency = 164;
4349 enum int KEY_cursor = 2815;
4350 enum int KEY_d = 100;
4351 enum int KEY_dabovedot = 16784907;
4352 enum int KEY_dagger = 2801;
4353 enum int KEY_dcaron = 495;
4354 enum int KEY_dead_A = 65153;
4355 enum int KEY_dead_E = 65155;
4356 enum int KEY_dead_I = 65157;
4357 enum int KEY_dead_O = 65159;
4358 enum int KEY_dead_U = 65161;
4359 enum int KEY_dead_a = 65152;
4360 enum int KEY_dead_abovecomma = 65124;
4361 enum int KEY_dead_abovedot = 65110;
4362 enum int KEY_dead_abovereversedcomma = 65125;
4363 enum int KEY_dead_abovering = 65112;
4364 enum int KEY_dead_acute = 65105;
4365 enum int KEY_dead_belowbreve = 65131;
4366 enum int KEY_dead_belowcircumflex = 65129;
4367 enum int KEY_dead_belowcomma = 65134;
4368 enum int KEY_dead_belowdiaeresis = 65132;
4369 enum int KEY_dead_belowdot = 65120;
4370 enum int KEY_dead_belowmacron = 65128;
4371 enum int KEY_dead_belowring = 65127;
4372 enum int KEY_dead_belowtilde = 65130;
4373 enum int KEY_dead_breve = 65109;
4374 enum int KEY_dead_capital_schwa = 65163;
4375 enum int KEY_dead_caron = 65114;
4376 enum int KEY_dead_cedilla = 65115;
4377 enum int KEY_dead_circumflex = 65106;
4378 enum int KEY_dead_currency = 65135;
4379 enum int KEY_dead_dasia = 65125;
4380 enum int KEY_dead_diaeresis = 65111;
4381 enum int KEY_dead_doubleacute = 65113;
4382 enum int KEY_dead_doublegrave = 65126;
4383 enum int KEY_dead_e = 65154;
4384 enum int KEY_dead_grave = 65104;
4385 enum int KEY_dead_hook = 65121;
4386 enum int KEY_dead_horn = 65122;
4387 enum int KEY_dead_i = 65156;
4388 enum int KEY_dead_invertedbreve = 65133;
4389 enum int KEY_dead_iota = 65117;
4390 enum int KEY_dead_macron = 65108;
4391 enum int KEY_dead_o = 65158;
4392 enum int KEY_dead_ogonek = 65116;
4393 enum int KEY_dead_perispomeni = 65107;
4394 enum int KEY_dead_psili = 65124;
4395 enum int KEY_dead_semivoiced_sound = 65119;
4396 enum int KEY_dead_small_schwa = 65162;
4397 enum int KEY_dead_stroke = 65123;
4398 enum int KEY_dead_tilde = 65107;
4399 enum int KEY_dead_u = 65160;
4400 enum int KEY_dead_voiced_sound = 65118;
4401 enum int KEY_decimalpoint = 2749;
4402 enum int KEY_degree = 176;
4403 enum int KEY_diaeresis = 168;
4404 enum int KEY_diamond = 2797;
4405 enum int KEY_digitspace = 2725;
4406 enum int KEY_dintegral = 16785964;
4407 enum int KEY_division = 247;
4408 enum int KEY_dollar = 36;
4409 enum int KEY_doubbaselinedot = 2735;
4410 enum int KEY_doubleacute = 445;
4411 enum int KEY_doubledagger = 2802;
4412 enum int KEY_doublelowquotemark = 2814;
4413 enum int KEY_downarrow = 2302;
4414 enum int KEY_downcaret = 2984;
4415 enum int KEY_downshoe = 3030;
4416 enum int KEY_downstile = 3012;
4417 enum int KEY_downtack = 3010;
4418 enum int KEY_dstroke = 496;
4419 enum int KEY_e = 101;
4420 enum int KEY_eabovedot = 1004;
4421 enum int KEY_eacute = 233;
4422 enum int KEY_ebelowdot = 16785081;
4423 enum int KEY_ecaron = 492;
4424 enum int KEY_ecircumflex = 234;
4425 enum int KEY_ecircumflexacute = 16785087;
4426 enum int KEY_ecircumflexbelowdot = 16785095;
4427 enum int KEY_ecircumflexgrave = 16785089;
4428 enum int KEY_ecircumflexhook = 16785091;
4429 enum int KEY_ecircumflextilde = 16785093;
4430 enum int KEY_ediaeresis = 235;
4431 enum int KEY_egrave = 232;
4432 enum int KEY_ehook = 16785083;
4433 enum int KEY_eightsubscript = 16785544;
4434 enum int KEY_eightsuperior = 16785528;
4435 enum int KEY_elementof = 16785928;
4436 enum int KEY_ellipsis = 2734;
4437 enum int KEY_em3space = 2723;
4438 enum int KEY_em4space = 2724;
4439 enum int KEY_emacron = 954;
4440 enum int KEY_emdash = 2729;
4441 enum int KEY_emfilledcircle = 2782;
4442 enum int KEY_emfilledrect = 2783;
4443 enum int KEY_emopencircle = 2766;
4444 enum int KEY_emopenrectangle = 2767;
4445 enum int KEY_emptyset = 16785925;
4446 enum int KEY_emspace = 2721;
4447 enum int KEY_endash = 2730;
4448 enum int KEY_enfilledcircbullet = 2790;
4449 enum int KEY_enfilledsqbullet = 2791;
4450 enum int KEY_eng = 959;
4451 enum int KEY_enopencircbullet = 2784;
4452 enum int KEY_enopensquarebullet = 2785;
4453 enum int KEY_enspace = 2722;
4454 enum int KEY_eogonek = 490;
4455 enum int KEY_equal = 61;
4456 enum int KEY_eth = 240;
4457 enum int KEY_etilde = 16785085;
4458 enum int KEY_exclam = 33;
4459 enum int KEY_exclamdown = 161;
4460 enum int KEY_f = 102;
4461 enum int KEY_fabovedot = 16784927;
4462 enum int KEY_femalesymbol = 2808;
4463 enum int KEY_ff = 2531;
4464 enum int KEY_figdash = 2747;
4465 enum int KEY_filledlefttribullet = 2780;
4466 enum int KEY_filledrectbullet = 2779;
4467 enum int KEY_filledrighttribullet = 2781;
4468 enum int KEY_filledtribulletdown = 2793;
4469 enum int KEY_filledtribulletup = 2792;
4470 enum int KEY_fiveeighths = 2757;
4471 enum int KEY_fivesixths = 2743;
4472 enum int KEY_fivesubscript = 16785541;
4473 enum int KEY_fivesuperior = 16785525;
4474 enum int KEY_fourfifths = 2741;
4475 enum int KEY_foursubscript = 16785540;
4476 enum int KEY_foursuperior = 16785524;
4477 enum int KEY_fourthroot = 16785948;
4478 enum int KEY_function = 2294;
4479 enum int KEY_g = 103;
4480 enum int KEY_gabovedot = 757;
4481 enum int KEY_gbreve = 699;
4482 enum int KEY_gcaron = 16777703;
4483 enum int KEY_gcedilla = 955;
4484 enum int KEY_gcircumflex = 760;
4485 enum int KEY_grave = 96;
4486 enum int KEY_greater = 62;
4487 enum int KEY_greaterthanequal = 2238;
4488 enum int KEY_guillemotleft = 171;
4489 enum int KEY_guillemotright = 187;
4490 enum int KEY_h = 104;
4491 enum int KEY_hairspace = 2728;
4492 enum int KEY_hcircumflex = 694;
4493 enum int KEY_heart = 2798;
4494 enum int KEY_hebrew_aleph = 3296;
4495 enum int KEY_hebrew_ayin = 3314;
4496 enum int KEY_hebrew_bet = 3297;
4497 enum int KEY_hebrew_beth = 3297;
4498 enum int KEY_hebrew_chet = 3303;
4499 enum int KEY_hebrew_dalet = 3299;
4500 enum int KEY_hebrew_daleth = 3299;
4501 enum int KEY_hebrew_doublelowline = 3295;
4502 enum int KEY_hebrew_finalkaph = 3306;
4503 enum int KEY_hebrew_finalmem = 3309;
4504 enum int KEY_hebrew_finalnun = 3311;
4505 enum int KEY_hebrew_finalpe = 3315;
4506 enum int KEY_hebrew_finalzade = 3317;
4507 enum int KEY_hebrew_finalzadi = 3317;
4508 enum int KEY_hebrew_gimel = 3298;
4509 enum int KEY_hebrew_gimmel = 3298;
4510 enum int KEY_hebrew_he = 3300;
4511 enum int KEY_hebrew_het = 3303;
4512 enum int KEY_hebrew_kaph = 3307;
4513 enum int KEY_hebrew_kuf = 3319;
4514 enum int KEY_hebrew_lamed = 3308;
4515 enum int KEY_hebrew_mem = 3310;
4516 enum int KEY_hebrew_nun = 3312;
4517 enum int KEY_hebrew_pe = 3316;
4518 enum int KEY_hebrew_qoph = 3319;
4519 enum int KEY_hebrew_resh = 3320;
4520 enum int KEY_hebrew_samech = 3313;
4521 enum int KEY_hebrew_samekh = 3313;
4522 enum int KEY_hebrew_shin = 3321;
4523 enum int KEY_hebrew_taf = 3322;
4524 enum int KEY_hebrew_taw = 3322;
4525 enum int KEY_hebrew_tet = 3304;
4526 enum int KEY_hebrew_teth = 3304;
4527 enum int KEY_hebrew_waw = 3301;
4528 enum int KEY_hebrew_yod = 3305;
4529 enum int KEY_hebrew_zade = 3318;
4530 enum int KEY_hebrew_zadi = 3318;
4531 enum int KEY_hebrew_zain = 3302;
4532 enum int KEY_hebrew_zayin = 3302;
4533 enum int KEY_hexagram = 2778;
4534 enum int KEY_horizconnector = 2211;
4535 enum int KEY_horizlinescan1 = 2543;
4536 enum int KEY_horizlinescan3 = 2544;
4537 enum int KEY_horizlinescan5 = 2545;
4538 enum int KEY_horizlinescan7 = 2546;
4539 enum int KEY_horizlinescan9 = 2547;
4540 enum int KEY_hstroke = 689;
4541 enum int KEY_ht = 2530;
4542 enum int KEY_hyphen = 173;
4543 enum int KEY_i = 105;
4544 enum int KEY_iTouch = 269025120;
4545 enum int KEY_iacute = 237;
4546 enum int KEY_ibelowdot = 16785099;
4547 enum int KEY_ibreve = 16777517;
4548 enum int KEY_icircumflex = 238;
4549 enum int KEY_identical = 2255;
4550 enum int KEY_idiaeresis = 239;
4551 enum int KEY_idotless = 697;
4552 enum int KEY_ifonlyif = 2253;
4553 enum int KEY_igrave = 236;
4554 enum int KEY_ihook = 16785097;
4555 enum int KEY_imacron = 1007;
4556 enum int KEY_implies = 2254;
4557 enum int KEY_includedin = 2266;
4558 enum int KEY_includes = 2267;
4559 enum int KEY_infinity = 2242;
4560 enum int KEY_integral = 2239;
4561 enum int KEY_intersection = 2268;
4562 enum int KEY_iogonek = 999;
4563 enum int KEY_itilde = 949;
4564 enum int KEY_j = 106;
4565 enum int KEY_jcircumflex = 700;
4566 enum int KEY_jot = 3018;
4567 enum int KEY_k = 107;
4568 enum int KEY_kana_A = 1201;
4569 enum int KEY_kana_CHI = 1217;
4570 enum int KEY_kana_E = 1204;
4571 enum int KEY_kana_FU = 1228;
4572 enum int KEY_kana_HA = 1226;
4573 enum int KEY_kana_HE = 1229;
4574 enum int KEY_kana_HI = 1227;
4575 enum int KEY_kana_HO = 1230;
4576 enum int KEY_kana_HU = 1228;
4577 enum int KEY_kana_I = 1202;
4578 enum int KEY_kana_KA = 1206;
4579 enum int KEY_kana_KE = 1209;
4580 enum int KEY_kana_KI = 1207;
4581 enum int KEY_kana_KO = 1210;
4582 enum int KEY_kana_KU = 1208;
4583 enum int KEY_kana_MA = 1231;
4584 enum int KEY_kana_ME = 1234;
4585 enum int KEY_kana_MI = 1232;
4586 enum int KEY_kana_MO = 1235;
4587 enum int KEY_kana_MU = 1233;
4588 enum int KEY_kana_N = 1245;
4589 enum int KEY_kana_NA = 1221;
4590 enum int KEY_kana_NE = 1224;
4591 enum int KEY_kana_NI = 1222;
4592 enum int KEY_kana_NO = 1225;
4593 enum int KEY_kana_NU = 1223;
4594 enum int KEY_kana_O = 1205;
4595 enum int KEY_kana_RA = 1239;
4596 enum int KEY_kana_RE = 1242;
4597 enum int KEY_kana_RI = 1240;
4598 enum int KEY_kana_RO = 1243;
4599 enum int KEY_kana_RU = 1241;
4600 enum int KEY_kana_SA = 1211;
4601 enum int KEY_kana_SE = 1214;
4602 enum int KEY_kana_SHI = 1212;
4603 enum int KEY_kana_SO = 1215;
4604 enum int KEY_kana_SU = 1213;
4605 enum int KEY_kana_TA = 1216;
4606 enum int KEY_kana_TE = 1219;
4607 enum int KEY_kana_TI = 1217;
4608 enum int KEY_kana_TO = 1220;
4609 enum int KEY_kana_TSU = 1218;
4610 enum int KEY_kana_TU = 1218;
4611 enum int KEY_kana_U = 1203;
4612 enum int KEY_kana_WA = 1244;
4613 enum int KEY_kana_WO = 1190;
4614 enum int KEY_kana_YA = 1236;
4615 enum int KEY_kana_YO = 1238;
4616 enum int KEY_kana_YU = 1237;
4617 enum int KEY_kana_a = 1191;
4618 enum int KEY_kana_closingbracket = 1187;
4619 enum int KEY_kana_comma = 1188;
4620 enum int KEY_kana_conjunctive = 1189;
4621 enum int KEY_kana_e = 1194;
4622 enum int KEY_kana_fullstop = 1185;
4623 enum int KEY_kana_i = 1192;
4624 enum int KEY_kana_middledot = 1189;
4625 enum int KEY_kana_o = 1195;
4626 enum int KEY_kana_openingbracket = 1186;
4627 enum int KEY_kana_switch = 65406;
4628 enum int KEY_kana_tsu = 1199;
4629 enum int KEY_kana_tu = 1199;
4630 enum int KEY_kana_u = 1193;
4631 enum int KEY_kana_ya = 1196;
4632 enum int KEY_kana_yo = 1198;
4633 enum int KEY_kana_yu = 1197;
4634 enum int KEY_kappa = 930;
4635 enum int KEY_kcedilla = 1011;
4636 enum int KEY_kra = 930;
4637 enum int KEY_l = 108;
4638 enum int KEY_lacute = 485;
4639 enum int KEY_latincross = 2777;
4640 enum int KEY_lbelowdot = 16784951;
4641 enum int KEY_lcaron = 437;
4642 enum int KEY_lcedilla = 950;
4643 enum int KEY_leftanglebracket = 2748;
4644 enum int KEY_leftarrow = 2299;
4645 enum int KEY_leftcaret = 2979;
4646 enum int KEY_leftdoublequotemark = 2770;
4647 enum int KEY_leftmiddlecurlybrace = 2223;
4648 enum int KEY_leftopentriangle = 2764;
4649 enum int KEY_leftpointer = 2794;
4650 enum int KEY_leftradical = 2209;
4651 enum int KEY_leftshoe = 3034;
4652 enum int KEY_leftsinglequotemark = 2768;
4653 enum int KEY_leftt = 2548;
4654 enum int KEY_lefttack = 3036;
4655 enum int KEY_less = 60;
4656 enum int KEY_lessthanequal = 2236;
4657 enum int KEY_lf = 2533;
4658 enum int KEY_logicaland = 2270;
4659 enum int KEY_logicalor = 2271;
4660 enum int KEY_lowleftcorner = 2541;
4661 enum int KEY_lowrightcorner = 2538;
4662 enum int KEY_lstroke = 435;
4663 enum int KEY_m = 109;
4664 enum int KEY_mabovedot = 16784961;
4665 enum int KEY_macron = 175;
4666 enum int KEY_malesymbol = 2807;
4667 enum int KEY_maltesecross = 2800;
4668 enum int KEY_marker = 2751;
4669 enum int KEY_masculine = 186;
4670 enum int KEY_minus = 45;
4671 enum int KEY_minutes = 2774;
4672 enum int KEY_mu = 181;
4673 enum int KEY_multiply = 215;
4674 enum int KEY_musicalflat = 2806;
4675 enum int KEY_musicalsharp = 2805;
4676 enum int KEY_n = 110;
4677 enum int KEY_nabla = 2245;
4678 enum int KEY_nacute = 497;
4679 enum int KEY_ncaron = 498;
4680 enum int KEY_ncedilla = 1009;
4681 enum int KEY_ninesubscript = 16785545;
4682 enum int KEY_ninesuperior = 16785529;
4683 enum int KEY_nl = 2536;
4684 enum int KEY_nobreakspace = 160;
4685 enum int KEY_notapproxeq = 16785991;
4686 enum int KEY_notelementof = 16785929;
4687 enum int KEY_notequal = 2237;
4688 enum int KEY_notidentical = 16786018;
4689 enum int KEY_notsign = 172;
4690 enum int KEY_ntilde = 241;
4691 enum int KEY_numbersign = 35;
4692 enum int KEY_numerosign = 1712;
4693 enum int KEY_o = 111;
4694 enum int KEY_oacute = 243;
4695 enum int KEY_obarred = 16777845;
4696 enum int KEY_obelowdot = 16785101;
4697 enum int KEY_ocaron = 16777682;
4698 enum int KEY_ocircumflex = 244;
4699 enum int KEY_ocircumflexacute = 16785105;
4700 enum int KEY_ocircumflexbelowdot = 16785113;
4701 enum int KEY_ocircumflexgrave = 16785107;
4702 enum int KEY_ocircumflexhook = 16785109;
4703 enum int KEY_ocircumflextilde = 16785111;
4704 enum int KEY_odiaeresis = 246;
4705 enum int KEY_odoubleacute = 501;
4706 enum int KEY_oe = 5053;
4707 enum int KEY_ogonek = 434;
4708 enum int KEY_ograve = 242;
4709 enum int KEY_ohook = 16785103;
4710 enum int KEY_ohorn = 16777633;
4711 enum int KEY_ohornacute = 16785115;
4712 enum int KEY_ohornbelowdot = 16785123;
4713 enum int KEY_ohorngrave = 16785117;
4714 enum int KEY_ohornhook = 16785119;
4715 enum int KEY_ohorntilde = 16785121;
4716 enum int KEY_omacron = 1010;
4717 enum int KEY_oneeighth = 2755;
4718 enum int KEY_onefifth = 2738;
4719 enum int KEY_onehalf = 189;
4720 enum int KEY_onequarter = 188;
4721 enum int KEY_onesixth = 2742;
4722 enum int KEY_onesubscript = 16785537;
4723 enum int KEY_onesuperior = 185;
4724 enum int KEY_onethird = 2736;
4725 enum int KEY_ooblique = 248;
4726 enum int KEY_openrectbullet = 2786;
4727 enum int KEY_openstar = 2789;
4728 enum int KEY_opentribulletdown = 2788;
4729 enum int KEY_opentribulletup = 2787;
4730 enum int KEY_ordfeminine = 170;
4731 enum int KEY_oslash = 248;
4732 enum int KEY_otilde = 245;
4733 enum int KEY_overbar = 3008;
4734 enum int KEY_overline = 1150;
4735 enum int KEY_p = 112;
4736 enum int KEY_pabovedot = 16784983;
4737 enum int KEY_paragraph = 182;
4738 enum int KEY_parenleft = 40;
4739 enum int KEY_parenright = 41;
4740 enum int KEY_partdifferential = 16785922;
4741 enum int KEY_partialderivative = 2287;
4742 enum int KEY_percent = 37;
4743 enum int KEY_period = 46;
4744 enum int KEY_periodcentered = 183;
4745 enum int KEY_phonographcopyright = 2811;
4746 enum int KEY_plus = 43;
4747 enum int KEY_plusminus = 177;
4748 enum int KEY_prescription = 2772;
4749 enum int KEY_prolongedsound = 1200;
4750 enum int KEY_punctspace = 2726;
4751 enum int KEY_q = 113;
4752 enum int KEY_quad = 3020;
4753 enum int KEY_question = 63;
4754 enum int KEY_questiondown = 191;
4755 enum int KEY_quotedbl = 34;
4756 enum int KEY_quoteleft = 96;
4757 enum int KEY_quoteright = 39;
4758 enum int KEY_r = 114;
4759 enum int KEY_racute = 480;
4760 enum int KEY_radical = 2262;
4761 enum int KEY_rcaron = 504;
4762 enum int KEY_rcedilla = 947;
4763 enum int KEY_registered = 174;
4764 enum int KEY_rightanglebracket = 2750;
4765 enum int KEY_rightarrow = 2301;
4766 enum int KEY_rightcaret = 2982;
4767 enum int KEY_rightdoublequotemark = 2771;
4768 enum int KEY_rightmiddlecurlybrace = 2224;
4769 enum int KEY_rightmiddlesummation = 2231;
4770 enum int KEY_rightopentriangle = 2765;
4771 enum int KEY_rightpointer = 2795;
4772 enum int KEY_rightshoe = 3032;
4773 enum int KEY_rightsinglequotemark = 2769;
4774 enum int KEY_rightt = 2549;
4775 enum int KEY_righttack = 3068;
4776 enum int KEY_s = 115;
4777 enum int KEY_sabovedot = 16784993;
4778 enum int KEY_sacute = 438;
4779 enum int KEY_scaron = 441;
4780 enum int KEY_scedilla = 442;
4781 enum int KEY_schwa = 16777817;
4782 enum int KEY_scircumflex = 766;
4783 enum int KEY_script_switch = 65406;
4784 enum int KEY_seconds = 2775;
4785 enum int KEY_section = 167;
4786 enum int KEY_semicolon = 59;
4787 enum int KEY_semivoicedsound = 1247;
4788 enum int KEY_seveneighths = 2758;
4789 enum int KEY_sevensubscript = 16785543;
4790 enum int KEY_sevensuperior = 16785527;
4791 enum int KEY_signaturemark = 2762;
4792 enum int KEY_signifblank = 2732;
4793 enum int KEY_similarequal = 2249;
4794 enum int KEY_singlelowquotemark = 2813;
4795 enum int KEY_sixsubscript = 16785542;
4796 enum int KEY_sixsuperior = 16785526;
4797 enum int KEY_slash = 47;
4798 enum int KEY_soliddiamond = 2528;
4799 enum int KEY_space = 32;
4800 enum int KEY_squareroot = 16785946;
4801 enum int KEY_ssharp = 223;
4802 enum int KEY_sterling = 163;
4803 enum int KEY_stricteq = 16786019;
4804 enum int KEY_t = 116;
4805 enum int KEY_tabovedot = 16785003;
4806 enum int KEY_tcaron = 443;
4807 enum int KEY_tcedilla = 510;
4808 enum int KEY_telephone = 2809;
4809 enum int KEY_telephonerecorder = 2810;
4810 enum int KEY_therefore = 2240;
4811 enum int KEY_thinspace = 2727;
4812 enum int KEY_thorn = 254;
4813 enum int KEY_threeeighths = 2756;
4814 enum int KEY_threefifths = 2740;
4815 enum int KEY_threequarters = 190;
4816 enum int KEY_threesubscript = 16785539;
4817 enum int KEY_threesuperior = 179;
4818 enum int KEY_tintegral = 16785965;
4819 enum int KEY_topintegral = 2212;
4820 enum int KEY_topleftparens = 2219;
4821 enum int KEY_topleftradical = 2210;
4822 enum int KEY_topleftsqbracket = 2215;
4823 enum int KEY_topleftsummation = 2225;
4824 enum int KEY_toprightparens = 2221;
4825 enum int KEY_toprightsqbracket = 2217;
4826 enum int KEY_toprightsummation = 2229;
4827 enum int KEY_topt = 2551;
4828 enum int KEY_topvertsummationconnector = 2227;
4829 enum int KEY_trademark = 2761;
4830 enum int KEY_trademarkincircle = 2763;
4831 enum int KEY_tslash = 956;
4832 enum int KEY_twofifths = 2739;
4833 enum int KEY_twosubscript = 16785538;
4834 enum int KEY_twosuperior = 178;
4835 enum int KEY_twothirds = 2737;
4836 enum int KEY_u = 117;
4837 enum int KEY_uacute = 250;
4838 enum int KEY_ubelowdot = 16785125;
4839 enum int KEY_ubreve = 765;
4840 enum int KEY_ucircumflex = 251;
4841 enum int KEY_udiaeresis = 252;
4842 enum int KEY_udoubleacute = 507;
4843 enum int KEY_ugrave = 249;
4844 enum int KEY_uhook = 16785127;
4845 enum int KEY_uhorn = 16777648;
4846 enum int KEY_uhornacute = 16785129;
4847 enum int KEY_uhornbelowdot = 16785137;
4848 enum int KEY_uhorngrave = 16785131;
4849 enum int KEY_uhornhook = 16785133;
4850 enum int KEY_uhorntilde = 16785135;
4851 enum int KEY_umacron = 1022;
4852 enum int KEY_underbar = 3014;
4853 enum int KEY_underscore = 95;
4854 enum int KEY_union = 2269;
4855 enum int KEY_uogonek = 1017;
4856 enum int KEY_uparrow = 2300;
4857 enum int KEY_upcaret = 2985;
4858 enum int KEY_upleftcorner = 2540;
4859 enum int KEY_uprightcorner = 2539;
4860 enum int KEY_upshoe = 3011;
4861 enum int KEY_upstile = 3027;
4862 enum int KEY_uptack = 3022;
4863 enum int KEY_uring = 505;
4864 enum int KEY_utilde = 1021;
4865 enum int KEY_v = 118;
4866 enum int KEY_variation = 2241;
4867 enum int KEY_vertbar = 2552;
4868 enum int KEY_vertconnector = 2214;
4869 enum int KEY_voicedsound = 1246;
4870 enum int KEY_vt = 2537;
4871 enum int KEY_w = 119;
4872 enum int KEY_wacute = 16785027;
4873 enum int KEY_wcircumflex = 16777589;
4874 enum int KEY_wdiaeresis = 16785029;
4875 enum int KEY_wgrave = 16785025;
4876 enum int KEY_x = 120;
4877 enum int KEY_xabovedot = 16785035;
4878 enum int KEY_y = 121;
4879 enum int KEY_yacute = 253;
4880 enum int KEY_ybelowdot = 16785141;
4881 enum int KEY_ycircumflex = 16777591;
4882 enum int KEY_ydiaeresis = 255;
4883 enum int KEY_yen = 165;
4884 enum int KEY_ygrave = 16785139;
4885 enum int KEY_yhook = 16785143;
4886 enum int KEY_ytilde = 16785145;
4887 enum int KEY_z = 122;
4888 enum int KEY_zabovedot = 447;
4889 enum int KEY_zacute = 444;
4890 enum int KEY_zcaron = 446;
4891 enum int KEY_zerosubscript = 16785536;
4892 enum int KEY_zerosuperior = 16785520;
4893 enum int KEY_zstroke = 16777654;
4894 struct KeyboardGrabInfo {
4895 Window* window, native_window;
4896 c_ulong serial;
4897 int owner_events;
4898 uint time;
4901 struct Keymap /* : GObject.Object */ {
4902 alias parent_instance this;
4903 alias parent_instance super_;
4904 alias parent_instance object;
4905 GObject2.Object parent_instance;
4906 Display* display;
4909 // Unintrospectable function: get_default() / gdk_keymap_get_default()
4910 // Returns the #GdkKeymap attached to the default display.
4911 // RETURNS: the #GdkKeymap attached to the default display.
4912 static Keymap* get_default()() nothrow {
4913 return gdk_keymap_get_default();
4916 // Unintrospectable function: get_for_display() / gdk_keymap_get_for_display()
4917 // VERSION: 2.2
4918 // Returns the #GdkKeymap attached to @display.
4919 // RETURNS: the #GdkKeymap attached to @display.
4920 // <display>: the #GdkDisplay.
4921 static Keymap* get_for_display()(Display* display) nothrow {
4922 return gdk_keymap_get_for_display(display);
4925 // VERSION: 2.20
4926 // Adds virtual modifiers (i.e. Super, Hyper and Meta) which correspond
4927 // to the real modifiers (i.e Mod2, Mod3, ...) in @modifiers.
4928 // are set in @state to their non-virtual counterparts (i.e. Mod2,
4929 // Mod3,...) and set the corresponding bits in @state.
4930 // GDK already does this before delivering key events, but for
4931 // compatibility reasons, it only sets the first virtual modifier
4932 // it finds, whereas this function sets all matching virtual modifiers.
4933 // This function is useful when matching key events against
4934 // accelerators.
4935 // <state>: pointer to the modifier mask to change
4936 void add_virtual_modifiers()(ModifierType* state) nothrow {
4937 gdk_keymap_add_virtual_modifiers(&this, state);
4940 // VERSION: 2.16
4941 // Returns whether the Caps Lock modifer is locked.
4942 // RETURNS: %TRUE if Caps Lock is on
4943 int get_caps_lock_state()() nothrow {
4944 return gdk_keymap_get_caps_lock_state(&this);
4947 // Returns the direction of effective layout of the keymap.
4948 // Note that passing %NULL for @keymap is deprecated and will stop
4949 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4950 // if it can determine the direction. %PANGO_DIRECTION_NEUTRAL
4951 // otherwise.
4952 // RETURNS: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL
4953 Pango.Direction get_direction()() nothrow {
4954 return gdk_keymap_get_direction(&this);
4957 // Returns the keyvals bound to @hardware_keycode.
4958 // The Nth #GdkKeymapKey in @keys is bound to the Nth
4959 // keyval in @keyvals. Free the returned arrays with g_free().
4960 // When a keycode is pressed by the user, the keyval from
4961 // this list of entries is selected by considering the effective
4962 // keyboard group and level. See gdk_keymap_translate_keyboard_state().
4963 // Note that passing %NULL for @keymap is deprecated and will stop
4964 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4965 // RETURNS: %TRUE if there were any entries
4966 // <hardware_keycode>: a keycode
4967 // <keys>: return location for array of #GdkKeymapKey, or %NULL
4968 // <keyvals>: return location for array of keyvals, or %NULL
4969 // <n_entries>: length of @keys and @keyvals
4970 int get_entries_for_keycode()(uint hardware_keycode, /*out*/ KeymapKey** keys, /*out*/ uint** keyvals, int* n_entries) nothrow {
4971 return gdk_keymap_get_entries_for_keycode(&this, hardware_keycode, keys, keyvals, n_entries);
4974 // Obtains a list of keycode/group/level combinations that will
4975 // generate @keyval. Groups and levels are two kinds of keyboard mode;
4976 // in general, the level determines whether the top or bottom symbol
4977 // on a key is used, and the group determines whether the left or
4978 // right symbol is used. On US keyboards, the shift key changes the
4979 // keyboard level, and there are no groups. A group switch key might
4980 // convert a keyboard between Hebrew to English modes, for example.
4981 // #GdkEventKey contains a %group field that indicates the active
4982 // keyboard group. The level is computed from the modifier mask.
4983 // The returned array should be freed
4984 // with g_free().
4985 // Note that passing %NULL for @keymap is deprecated and will stop
4986 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4987 // RETURNS: %TRUE if keys were found and returned
4988 // <keyval>: a keyval, such as %GDK_a, %GDK_Up, %GDK_Return, etc.
4989 // <keys>: return location for an array of #GdkKeymapKey
4990 // <n_keys>: return location for number of elements in returned array
4991 int get_entries_for_keyval()(uint keyval, /*out*/ KeymapKey** keys, /*out*/ int* n_keys) nothrow {
4992 return gdk_keymap_get_entries_for_keyval(&this, keyval, keys, n_keys);
4995 // VERSION: 2.12
4996 // Determines if keyboard layouts for both right-to-left and left-to-right
4997 // languages are in use.
4998 // Note that passing %NULL for @keymap is deprecated and will stop
4999 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
5000 // RETURNS: %TRUE if there are layouts in both directions, %FALSE otherwise
5001 int have_bidi_layouts()() nothrow {
5002 return gdk_keymap_have_bidi_layouts(&this);
5005 // Looks up the keyval mapped to a keycode/group/level triplet.
5006 // If no keyval is bound to @key, returns 0. For normal user input,
5007 // you want to use gdk_keymap_translate_keyboard_state() instead of
5008 // this function, since the effective group/level may not be
5009 // the same as the current keyboard state.
5010 // Note that passing %NULL for @keymap is deprecated and will stop
5011 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
5012 // RETURNS: a keyval, or 0 if none was mapped to the given @key
5013 // <key>: a #GdkKeymapKey with keycode, group, and level initialized
5014 uint lookup_key()(KeymapKey* key) nothrow {
5015 return gdk_keymap_lookup_key(&this, key);
5018 // VERSION: 2.20
5019 // Maps the virtual modifiers (i.e. Super, Hyper and Meta) which
5020 // are set in @state to their non-virtual counterparts (i.e. Mod2,
5021 // Mod3,...) and set the corresponding bits in @state.
5022 // This function is useful when matching key events against
5023 // accelerators.
5024 // same non-virtual modifier. Note that %FALSE is also returned
5025 // if a virtual modifier is mapped to a non-virtual modifier that
5026 // was already set in @state.
5027 // RETURNS: %TRUE if no virtual modifiers were mapped to the
5028 // <state>: pointer to the modifier state to map
5029 int map_virtual_modifiers()(ModifierType* state) nothrow {
5030 return gdk_keymap_map_virtual_modifiers(&this, state);
5033 // Translates the contents of a #GdkEventKey into a keyval, effective
5034 // group, and level. Modifiers that affected the translation and
5035 // are thus unavailable for application use are returned in
5036 // groups and levels. The @effective_group is the group that was
5037 // actually used for the translation; some keys such as Enter are not
5038 // affected by the active keyboard group. The @level is derived from
5039 // keyval, so this function isn't as useful as you might think.
5040 // <note><para>
5041 // from @state when comparing this key press to a hot key. For
5042 // instance, on a US keyboard, the <literal>plus</literal>
5043 // symbol is shifted, so when comparing a key press to a
5044 // <literal>&lt;Control&gt;plus</literal> accelerator &lt;Shift&gt; should
5045 // be masked out.
5046 // </para>
5047 // <informalexample><programlisting>
5048 // &sol;* We want to ignore irrelevant modifiers like ScrollLock *&sol;
5049 // &num;define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
5050 // gdk_keymap_translate_keyboard_state (keymap, event->hardware_keycode,
5051 // event->state, event->group,
5052 // &amp;keyval, NULL, NULL, &amp;consumed);
5053 // if (keyval == GDK_PLUS &&
5054 // (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
5055 // &sol;* Control was pressed *&sol;
5056 // </programlisting></informalexample>
5057 // <para>
5058 // An older interpretation @consumed_modifiers was that it contained
5059 // all modifiers that might affect the translation of the key;
5060 // this allowed accelerators to be stored with irrelevant consumed
5061 // modifiers, by doing:</para>
5062 // <informalexample><programlisting>
5063 // &sol;* XXX Don't do this XXX *&sol;
5064 // if (keyval == accel_keyval &&
5065 // (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == (accel_mods &amp; ~consumed))
5066 // &sol;* Accelerator was pressed *&sol;
5067 // </programlisting></informalexample>
5068 // <para>
5069 // However, this did not work if multi-modifier combinations were
5070 // used in the keymap, since, for instance, <literal>&lt;Control&gt;</literal>
5071 // would be masked out even if only <literal>&lt;Control&gt;&lt;Alt&gt;</literal>
5072 // was used in the keymap. To support this usage as well as well as
5073 // possible, all <emphasis>single modifier</emphasis> combinations
5074 // that could affect the key for any combination of modifiers will
5075 // be returned in @consumed_modifiers; multi-modifier combinations
5076 // are returned only when actually found in @state. When you store
5077 // accelerators, you should always store them with consumed modifiers
5078 // removed. Store <literal>&lt;Control&gt;plus</literal>,
5079 // not <literal>&lt;Control&gt;&lt;Shift&gt;plus</literal>,
5080 // </para></note>
5081 // Note that passing %NULL for @keymap is deprecated and will stop
5082 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
5083 // RETURNS: %TRUE if there was a keyval bound to the keycode/state/group
5084 // <hardware_keycode>: a keycode
5085 // <state>: a modifier state
5086 // <group>: active keyboard group
5087 // <keyval>: return location for keyval, or %NULL
5088 // <effective_group>: return location for effective group, or %NULL
5089 // <level>: return location for level, or %NULL
5090 // <consumed_modifiers>: return location for modifiers that were used to determine the group or level, or %NULL
5091 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) nothrow {
5092 return gdk_keymap_translate_keyboard_state(&this, hardware_keycode, state, group, keyval, effective_group, level, consumed_modifiers);
5095 // VERSION: 2.0
5096 // The ::direction-changed signal gets emitted when the direction of
5097 // the keymap changes.
5098 extern (C) alias static void function (Keymap* this_, void* user_data=null) nothrow signal_direction_changed;
5100 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5101 return super_.signal_connect!name(cb, data, cf);
5104 ulong signal_connect(string name:"direction-changed", CB:signal_direction_changed)
5105 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5106 if (is(typeof(cb)==signal_direction_changed)||_ttmm!(CB, signal_direction_changed)()) {
5107 return signal_connect_data!()(&this, cast(char*)"direction-changed",
5108 cast(GObject2.Callback)cb, data, null, cf);
5111 // VERSION: 2.2
5112 // The ::keys-changed signal is emitted when the mapping represented by
5113 extern (C) alias static void function (Keymap* this_, void* user_data=null) nothrow signal_keys_changed;
5114 ulong signal_connect(string name:"keys-changed", CB:signal_keys_changed)
5115 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5116 if (is(typeof(cb)==signal_keys_changed)||_ttmm!(CB, signal_keys_changed)()) {
5117 return signal_connect_data!()(&this, cast(char*)"keys-changed",
5118 cast(GObject2.Callback)cb, data, null, cf);
5121 // VERSION: 2.16
5122 // The ::state-changed signal is emitted when the state of the
5123 // keyboard changes, e.g when Caps Lock is turned on or off.
5124 // See gdk_keymap_get_caps_lock_state().
5125 extern (C) alias static void function (Keymap* this_, void* user_data=null) nothrow signal_state_changed;
5126 ulong signal_connect(string name:"state-changed", CB:signal_state_changed)
5127 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
5128 if (is(typeof(cb)==signal_state_changed)||_ttmm!(CB, signal_state_changed)()) {
5129 return signal_connect_data!()(&this, cast(char*)"state-changed",
5130 cast(GObject2.Callback)cb, data, null, cf);
5134 struct KeymapClass {
5135 GObject2.ObjectClass parent_class;
5136 extern (C) void function (Keymap* keymap) nothrow direction_changed;
5137 extern (C) void function (Keymap* keymap) nothrow keys_changed;
5138 extern (C) void function (Keymap* keymap) nothrow state_changed;
5141 struct KeymapKey {
5142 uint keycode;
5143 int group, level;
5146 enum LineStyle {
5147 SOLID = 0,
5148 ON_OFF_DASH = 1,
5149 DOUBLE_DASH = 2
5151 enum int MAX_TIMECOORD_AXES = 128;
5152 enum ModifierType {
5153 SHIFT_MASK = 1,
5154 LOCK_MASK = 2,
5155 CONTROL_MASK = 4,
5156 MOD1_MASK = 8,
5157 MOD2_MASK = 16,
5158 MOD3_MASK = 32,
5159 MOD4_MASK = 64,
5160 MOD5_MASK = 128,
5161 BUTTON1_MASK = 256,
5162 BUTTON2_MASK = 512,
5163 BUTTON3_MASK = 1024,
5164 BUTTON4_MASK = 2048,
5165 BUTTON5_MASK = 4096,
5166 SUPER_MASK = 67108864,
5167 HYPER_MASK = 134217728,
5168 META_MASK = 268435456,
5169 RELEASE_MASK = 1073741824,
5170 MODIFIER_MASK = 1543512063
5172 enum NotifyType {
5173 ANCESTOR = 0,
5174 VIRTUAL = 1,
5175 INFERIOR = 2,
5176 NONLINEAR = 3,
5177 NONLINEAR_VIRTUAL = 4,
5178 UNKNOWN = 5
5180 enum OverlapType {
5181 IN = 0,
5182 OUT = 1,
5183 PART = 2
5185 enum OwnerChange {
5186 NEW_OWNER = 0,
5187 DESTROY = 1,
5188 CLOSE = 2
5190 enum int PARENT_RELATIVE = 1;
5191 enum int PRIORITY_REDRAW = 20;
5192 struct PangoAttrEmbossColor {
5193 Pango.Attribute attr;
5194 Pango.Color color;
5197 struct PangoAttrEmbossed {
5198 Pango.Attribute attr;
5199 int embossed;
5202 struct PangoAttrStipple {
5203 Pango.Attribute attr;
5204 Bitmap* stipple;
5208 // #GdkPangoRenderer is a subclass of #PangoRenderer used for rendering
5209 // Pango objects into GDK drawables. The default renderer for a particular
5210 // screen is obtained with gdk_pango_renderer_get_default(); Pango
5211 // functions like pango_renderer_draw_layout() and
5212 // pango_renderer_draw_layout_line() are then used to draw objects with
5213 // the renderer.
5214 // In most simple cases, applications can just use gdk_draw_layout(), and
5215 // don't need to directly use #GdkPangoRenderer at all. Using the
5216 // #GdkPangoRenderer directly is most useful when working with a
5217 // transformation such as a rotation, because the Pango drawing functions
5218 // take user space coordinates (coordinates before the transformation)
5219 // instead of device coordinates.
5220 // In certain cases it can be useful to subclass #GdkPangoRenderer. Examples
5221 // of reasons to do this are to add handling of custom attributes by
5222 // overriding 'prepare_run' or to do custom drawing of embedded objects
5223 // by overriding 'draw_shape'.
5224 struct PangoRenderer /* : Pango.Renderer */ /* Version 2.6 */ {
5225 alias parent_instance this;
5226 alias parent_instance super_;
5227 alias parent_instance renderer;
5228 Pango.Renderer parent_instance;
5229 private PangoRendererPrivate* priv;
5232 // VERSION: 2.6
5233 // Creates a new #PangoRenderer for @screen. Normally you can use the
5234 // results of gdk_pango_renderer_get_default() rather than creating a new
5235 // renderer.
5236 // RETURNS: a newly created #PangoRenderer. Free with g_object_unref().
5237 // <screen>: a #GdkScreen
5238 static PangoRenderer* /*new*/ new_()(Screen* screen) nothrow {
5239 return gdk_pango_renderer_new(screen);
5241 alias new_!() opCall;
5243 // Unintrospectable function: get_default() / gdk_pango_renderer_get_default()
5244 // VERSION: 2.6
5245 // Gets the default #PangoRenderer for a screen. This default renderer
5246 // is shared by all users of the display, so properties such as the color
5247 // or transformation matrix set for the renderer may be overwritten
5248 // by functions such as gdk_draw_layout().
5249 // Before using the renderer, you need to call gdk_pango_renderer_set_drawable()
5250 // and gdk_pango_renderer_set_gc() to set the drawable and graphics context
5251 // to use for drawing.
5252 // renderer is owned by GTK+ and will be kept around until the
5253 // screen is closed.
5254 // RETURNS: the default #PangoRenderer for @screen. The
5255 // <screen>: a #GdkScreen
5256 static Pango.Renderer* get_default()(Screen* screen) nothrow {
5257 return gdk_pango_renderer_get_default(screen);
5260 // VERSION: 2.6
5261 // Sets the drawable the renderer draws to.
5262 // <drawable>: the new target drawable, or %NULL
5263 void set_drawable()(Drawable* drawable=null) nothrow {
5264 gdk_pango_renderer_set_drawable(&this, drawable);
5267 // VERSION: 2.6
5268 // Sets the GC the renderer draws with. Note that the GC must not be
5269 // modified until it is unset by calling the function again with
5270 // %NULL for the @gc parameter, since GDK may make internal copies
5271 // of the GC which won't be updated to follow changes to the
5272 // original GC.
5273 // <gc>: the new GC to use for drawing, or %NULL
5274 void set_gc()(GC* gc=null) nothrow {
5275 gdk_pango_renderer_set_gc(&this, gc);
5278 // VERSION: 2.6
5279 // Sets the color for a particular render part (foreground,
5280 // background, underline, etc.), overriding any attributes on the layouts
5281 // renderered with this renderer.
5282 // <part>: the part to render to set the color of
5283 // <color>: the color to use, or %NULL to unset a previously set override color.
5284 void set_override_color()(Pango.RenderPart part, Color* color=null) nothrow {
5285 gdk_pango_renderer_set_override_color(&this, part, color);
5288 // VERSION: 2.6
5289 // Sets the stipple for one render part (foreground, background, underline,
5290 // etc.) Note that this is overwritten when iterating through the individual
5291 // styled runs of a #PangoLayout or #PangoLayoutLine. This function is thus
5292 // only useful when you call low level functions like pango_renderer_draw_glyphs()
5293 // directly, or in the 'prepare_run' virtual function of a subclass of
5294 // #GdkPangoRenderer.
5295 // <part>: the part to render with the stipple
5296 // <stipple>: the new stipple value.
5297 void set_stipple()(Pango.RenderPart part, Bitmap* stipple) nothrow {
5298 gdk_pango_renderer_set_stipple(&this, part, stipple);
5302 // #GdkPangoRenderer is the class structure for #GdkPangoRenderer.
5303 struct PangoRendererClass /* Version 2.6 */ {
5304 private Pango.RendererClass parent_class;
5307 struct PangoRendererPrivate {
5310 struct Pixmap /* : Drawable */ {
5311 alias method_parent this;
5312 alias method_parent super_;
5313 alias method_parent drawable;
5314 Drawable method_parent;
5317 // Wraps a native window for the default display in a #GdkPixmap.
5318 // This may fail if the pixmap has been destroyed.
5319 // For example in the X backend, a native pixmap handle is an Xlib
5320 // <type>XID</type>.
5321 // native pixmap or %NULL if the pixmap has been destroyed.
5322 // RETURNS: the newly-created #GdkPixmap wrapper for the
5323 // <anid>: a native pixmap handle.
5324 static Pixmap* /*new*/ foreign_new()(NativeWindow anid) nothrow {
5325 return gdk_pixmap_foreign_new(anid);
5327 alias foreign_new!() opCall;
5329 // VERSION: 2.2
5330 // Wraps a native pixmap in a #GdkPixmap.
5331 // This may fail if the pixmap has been destroyed.
5332 // For example in the X backend, a native pixmap handle is an Xlib
5333 // <type>XID</type>.
5334 // native pixmap or %NULL if the pixmap has been destroyed.
5335 // RETURNS: the newly-created #GdkPixmap wrapper for the
5336 // <display>: The #GdkDisplay where @anid is located.
5337 // <anid>: a native pixmap handle.
5338 static Pixmap* /*new*/ foreign_new_for_display()(Display* display, NativeWindow anid) nothrow {
5339 return gdk_pixmap_foreign_new_for_display(display, anid);
5341 alias foreign_new_for_display!() opCall;
5343 // VERSION: 2.10
5344 // Wraps a native pixmap in a #GdkPixmap.
5345 // This may fail if the pixmap has been destroyed.
5346 // For example in the X backend, a native pixmap handle is an Xlib
5347 // <type>XID</type>.
5348 // This function is an alternative to gdk_pixmap_foreign_new_for_display()
5349 // for cases where the dimensions of the pixmap are known. For the X
5350 // backend, this avoids a roundtrip to the server.
5351 // native pixmap or %NULL if the pixmap has been destroyed.
5352 // RETURNS: the newly-created #GdkPixmap wrapper for the
5353 // <screen>: a #GdkScreen
5354 // <anid>: a native pixmap handle
5355 // <width>: the width of the pixmap identified by @anid
5356 // <height>: the height of the pixmap identified by @anid
5357 // <depth>: the depth of the pixmap identified by @anid
5358 static Pixmap* /*new*/ foreign_new_for_screen()(Screen* screen, NativeWindow anid, int width, int height, int depth) nothrow {
5359 return gdk_pixmap_foreign_new_for_screen(screen, anid, width, height, depth);
5361 alias foreign_new_for_screen!() opCall;
5362 static Pixmap* /*new*/ new_()(Drawable* drawable, int width, int height, int depth) nothrow {
5363 return gdk_pixmap_new(drawable, width, height, depth);
5365 alias new_!() opCall;
5367 // DEPRECATED (v2.22) function: colormap_create_from_xpm - Use a #GdkPixbuf instead. You can use
5368 // Create a pixmap from a XPM file using a particular colormap.
5369 // gdk_pixbuf_new_from_file() to create it.
5370 // If you must use a pixmap, use gdk_pixmap_new() to
5371 // create it and Cairo to draw the pixbuf onto it.
5372 // RETURNS: the #GdkPixmap.
5373 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap. Can be %NULL if @colormap is given.
5374 // <colormap>: the #GdkColormap that the new pixmap will be use. If omitted, the colormap for @window will be used.
5375 // <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.
5376 // <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.
5377 // <filename>: the filename of a file containing XPM data.
5378 static Pixmap* colormap_create_from_xpm()(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char* filename) nothrow {
5379 return gdk_pixmap_colormap_create_from_xpm(drawable, colormap, mask, transparent_color, filename);
5382 // DEPRECATED (v2.22) function: colormap_create_from_xpm_d - Use a #GdkPixbuf instead. You can use
5383 // Create a pixmap from data in XPM format using a particular
5384 // colormap.
5385 // gdk_pixbuf_new_from_xpm_data() to create it.
5386 // If you must use a pixmap, use gdk_pixmap_new() to
5387 // create it and Cairo to draw the pixbuf onto it.
5388 // RETURNS: the #GdkPixmap.
5389 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap. Can be %NULL if @colormap is given.
5390 // <colormap>: the #GdkColormap that the new pixmap will be use. If omitted, the colormap for @window will be used.
5391 // <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.
5392 // <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.
5393 // <data>: Pointer to a string containing the XPM data.
5394 static Pixmap* colormap_create_from_xpm_d()(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char** data) nothrow {
5395 return gdk_pixmap_colormap_create_from_xpm_d(drawable, colormap, mask, transparent_color, data);
5397 // Unintrospectable function: create_from_data() / gdk_pixmap_create_from_data()
5398 static Pixmap* create_from_data()(Drawable* drawable, char* data, int width, int height, int depth, Color* fg, Color* bg) nothrow {
5399 return gdk_pixmap_create_from_data(drawable, data, width, height, depth, fg, bg);
5402 // DEPRECATED (v2.22) function: create_from_xpm - Use a #GdkPixbuf instead. You can use
5403 // Create a pixmap from a XPM file.
5404 // gdk_pixbuf_new_from_file() to create it.
5405 // If you must use a pixmap, use gdk_pixmap_new() to
5406 // create it and Cairo to draw the pixbuf onto it.
5407 // RETURNS: the #GdkPixmap
5408 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap.
5409 // <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.
5410 // <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.
5411 // <filename>: the filename of a file containing XPM data.
5412 static Pixmap* create_from_xpm()(Drawable* drawable, Bitmap** mask, Color* transparent_color, char* filename) nothrow {
5413 return gdk_pixmap_create_from_xpm(drawable, mask, transparent_color, filename);
5416 // DEPRECATED (v2.22) function: create_from_xpm_d - Use a #GdkPixbuf instead. You can use
5417 // Create a pixmap from data in XPM format.
5418 // gdk_pixbuf_new_from_xpm_data() to create it.
5419 // If you must use a pixmap, use gdk_pixmap_new() to
5420 // create it and Cairo to draw the pixbuf onto it.
5421 // RETURNS: the #GdkPixmap.
5422 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap.
5423 // <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.
5424 // <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.
5425 // <data>: Pointer to a string containing the XPM data.
5426 static Pixmap* create_from_xpm_d()(Drawable* drawable, /*out*/ Bitmap** mask, Color* transparent_color, char** data) nothrow {
5427 return gdk_pixmap_create_from_xpm_d(drawable, mask, transparent_color, data);
5430 // Unintrospectable function: lookup() / gdk_pixmap_lookup()
5431 // Looks up the #GdkPixmap that wraps the given native pixmap handle.
5432 // For example in the X backend, a native pixmap handle is an Xlib
5433 // <type>XID</type>.
5434 // or %NULL if there is none.
5435 // RETURNS: the #GdkPixmap wrapper for the native pixmap,
5436 // <anid>: a native pixmap handle.
5437 static Pixmap* lookup()(NativeWindow anid) nothrow {
5438 return gdk_pixmap_lookup(anid);
5441 // Unintrospectable function: lookup_for_display() / gdk_pixmap_lookup_for_display()
5442 // VERSION: 2.2
5443 // Looks up the #GdkPixmap that wraps the given native pixmap handle.
5444 // For example in the X backend, a native pixmap handle is an Xlib
5445 // <type>XID</type>.
5446 // or %NULL if there is none.
5447 // RETURNS: the #GdkPixmap wrapper for the native pixmap,
5448 // <display>: the #GdkDisplay associated with @anid
5449 // <anid>: a native pixmap handle.
5450 static Pixmap* lookup_for_display()(Display* display, NativeWindow anid) nothrow {
5451 return gdk_pixmap_lookup_for_display(display, anid);
5454 // VERSION: 2.24
5455 // This function is purely to make it possible to query the size of pixmaps
5456 // even when compiling without deprecated symbols and you must use pixmaps.
5457 // It is identical to gdk_drawable_get_size(), but for pixmaps.
5458 // <width>: location to store @pixmap's width, or %NULL
5459 // <height>: location to store @pixmap's height, or %NULL
5460 void get_size()(/*out*/ int* width=null, /*out*/ int* height=null) nothrow {
5461 gdk_pixmap_get_size(&this, width, height);
5465 struct PixmapObject {
5466 Drawable parent_instance;
5467 Drawable* impl;
5468 int depth;
5471 struct PixmapObjectClass {
5472 DrawableClass parent_class;
5475 struct Point {
5476 int x, y;
5479 struct PointerHooks {
5480 // Unintrospectable functionp: get_pointer() / ()
5481 extern (C) Window* function (Window* window, int* x, int* y, ModifierType* mask) nothrow get_pointer;
5482 // Unintrospectable functionp: window_at_pointer() / ()
5483 extern (C) Window* function (Screen* screen, int* win_x, int* win_y) nothrow window_at_pointer;
5486 struct PointerWindowInfo {
5487 Window* toplevel_under_pointer, window_under_pointer;
5488 double toplevel_x, toplevel_y;
5489 uint state, button;
5490 c_ulong motion_hint_serial;
5493 enum PropMode {
5494 REPLACE = 0,
5495 PREPEND = 1,
5496 APPEND = 2
5498 enum PropertyState {
5499 NEW_VALUE = 0,
5500 DELETE = 1
5502 struct Rectangle {
5503 int x, y, width, height;
5506 // Calculates the intersection of two rectangles. It is allowed for
5507 // do not intersect, @dest's width and height is set to 0 and its x
5508 // and y values are undefined. If you are only interested in whether
5509 // the rectangles intersect, but not in the intersecting area itself,
5510 // pass %NULL for @dest.
5511 // RETURNS: %TRUE if the rectangles intersect.
5512 // <src2>: a #GdkRectangle
5513 // <dest>: return location for the intersection of @src1 and @src2, or %NULL
5514 int intersect()(Rectangle* src2, /*out*/ Rectangle* dest=null) nothrow {
5515 return gdk_rectangle_intersect(&this, src2, dest);
5518 // Calculates the union of two rectangles.
5519 // The union of rectangles @src1 and @src2 is the smallest rectangle which
5520 // includes both @src1 and @src2 within it.
5521 // It is allowed for @dest to be the same as either @src1 or @src2.
5522 // <src2>: a #GdkRectangle
5523 // <dest>: return location for the union of @src1 and @src2
5524 void union_()(Rectangle* src2, /*out*/ Rectangle* dest) nothrow {
5525 gdk_rectangle_union(&this, src2, dest);
5528 // --- mixin/Gdk2_Rectangle.d --->
5530 void union_()(Rectangle* src2) {
5531 gdk_rectangle_union(&this, src2, &this);
5534 // <--- mixin/Gdk2_Rectangle.d ---
5537 struct Region {
5539 // Unintrospectable method: copy() / gdk_region_copy()
5540 // Copies @region, creating an identical new region.
5541 // RETURNS: a new region identical to @region
5542 Region* copy()() nothrow {
5543 return gdk_region_copy(&this);
5545 // Destroys a #GdkRegion.
5546 void destroy()() nothrow {
5547 gdk_region_destroy(&this);
5550 // Finds out if the #GdkRegion is empty.
5551 // RETURNS: %TRUE if @region is empty.
5552 int empty()() nothrow {
5553 return gdk_region_empty(&this);
5556 // Finds out if the two regions are the same.
5557 // RETURNS: %TRUE if @region1 and @region2 are equal.
5558 // <region2>: a #GdkRegion
5559 int equal()(Region* region2) nothrow {
5560 return gdk_region_equal(&this, region2);
5563 // Obtains the smallest rectangle which includes the entire #GdkRegion.
5564 // <rectangle>: return location for the clipbox
5565 void get_clipbox()(Rectangle* rectangle) nothrow {
5566 gdk_region_get_clipbox(&this, rectangle);
5569 // Obtains the area covered by the region as a list of rectangles.
5570 // The array returned in @rectangles must be freed with g_free().
5571 // <rectangles>: return location for an array of rectangles
5572 // <n_rectangles>: length of returned array
5573 void get_rectangles()(Rectangle** rectangles, int* n_rectangles) nothrow {
5574 gdk_region_get_rectangles(&this, rectangles, n_rectangles);
5577 // Sets the area of @source1 to the intersection of the areas of @source1
5578 // and @source2. The resulting area is the set of pixels contained in
5579 // both @source1 and @source2.
5580 // <source2>: another #GdkRegion
5581 void intersect()(Region* source2) nothrow {
5582 gdk_region_intersect(&this, source2);
5585 // Moves a region the specified distance.
5586 // <dx>: the distance to move the region horizontally
5587 // <dy>: the distance to move the region vertically
5588 void offset()(int dx, int dy) nothrow {
5589 gdk_region_offset(&this, dx, dy);
5592 // Finds out if a point is in a region.
5593 // RETURNS: %TRUE if the point is in @region.
5594 // <x>: the x coordinate of a point
5595 // <y>: the y coordinate of a point
5596 int point_in()(int x, int y) nothrow {
5597 return gdk_region_point_in(&this, x, y);
5600 // VERSION: 2.18
5601 // DEPRECATED (v2.22) method: rect_equal - Use gdk_region_new_rect() and gdk_region_equal() to
5602 // Finds out if a regions is the same as a rectangle.
5603 // achieve the same effect.
5604 // RETURNS: %TRUE if @region and @rectangle are equal.
5605 // <rectangle>: a #GdkRectangle
5606 int rect_equal()(Rectangle* rectangle) nothrow {
5607 return gdk_region_rect_equal(&this, rectangle);
5610 // Tests whether a rectangle is within a region.
5611 // %GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
5612 // outside, or partly inside the #GdkRegion, respectively.
5613 // RETURNS: %GDK_OVERLAP_RECTANGLE_IN, %GDK_OVERLAP_RECTANGLE_OUT, or
5614 // <rectangle>: a #GdkRectangle.
5615 OverlapType rect_in()(Rectangle* rectangle) nothrow {
5616 return gdk_region_rect_in(&this, rectangle);
5619 // DEPRECATED (v2.22) method: shrink - There is no replacement for this function.
5620 // Resizes a region by the specified amount.
5621 // Positive values shrink the region. Negative values expand it.
5622 // <dx>: the number of pixels to shrink the region horizontally
5623 // <dy>: the number of pixels to shrink the region vertically
5624 void shrink()(int dx, int dy) nothrow {
5625 gdk_region_shrink(&this, dx, dy);
5628 // Unintrospectable method: spans_intersect_foreach() / gdk_region_spans_intersect_foreach()
5629 // DEPRECATED (v2.22) method: spans_intersect_foreach - There is no replacement.
5630 // Calls a function on each span in the intersection of @region and @spans.
5631 // <spans>: an array of #GdkSpans
5632 // <n_spans>: the length of @spans
5633 // <sorted>: %TRUE if @spans is sorted wrt. the y coordinate
5634 // <function>: function to call on each span in the intersection
5635 // <data>: data to pass to @function
5636 void spans_intersect_foreach()(Span* spans, int n_spans, int sorted, SpanFunc function_, void* data) nothrow {
5637 gdk_region_spans_intersect_foreach(&this, spans, n_spans, sorted, function_, data);
5640 // Subtracts the area of @source2 from the area @source1. The resulting
5641 // area is the set of pixels contained in @source1 but not in @source2.
5642 // <source2>: another #GdkRegion
5643 void subtract()(Region* source2) nothrow {
5644 gdk_region_subtract(&this, source2);
5647 // Sets the area of @source1 to the union of the areas of @source1 and
5648 // either @source1 or @source2.
5649 // <source2>: a #GdkRegion
5650 void union_()(Region* source2) nothrow {
5651 gdk_region_union(&this, source2);
5654 // Sets the area of @region to the union of the areas of @region and
5655 // either @region or @rect.
5656 // <rect>: a #GdkRectangle.
5657 void union_with_rect()(Rectangle* rect) nothrow {
5658 gdk_region_union_with_rect(&this, rect);
5661 // Sets the area of @source1 to the exclusive-OR of the areas of @source1
5662 // and @source2. The resulting area is the set of pixels contained in one
5663 // or the other of the two sources but not in both.
5664 // <source2>: another #GdkRegion
5665 void xor()(Region* source2) nothrow {
5666 gdk_region_xor(&this, source2);
5670 struct RgbCmap {
5671 uint[256] colors;
5672 int n_colors;
5673 private GLib2.SList* info_list;
5675 void free()() nothrow {
5676 gdk_rgb_cmap_free(&this);
5680 enum RgbDither {
5681 NONE = 0,
5682 NORMAL = 1,
5683 MAX = 2
5685 struct Screen /* : GObject.Object */ {
5686 alias parent_instance this;
5687 alias parent_instance super_;
5688 alias parent_instance object;
5689 GObject2.Object parent_instance;
5690 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5691 uint, "closed", 1,
5692 uint, "__dummy32A", 31));
5693 GC*[32] normal_gcs, exposure_gcs, subwindow_gcs;
5694 cairo.FontOptions* font_options;
5695 double resolution;
5698 // VERSION: 2.2
5699 // Gets the default screen for the default display. (See
5700 // gdk_display_get_default ()).
5701 // RETURNS: a #GdkScreen, or %NULL if there is no default display.
5702 static Screen* get_default()() nothrow {
5703 return gdk_screen_get_default();
5706 // Returns the height of the default screen in pixels.
5707 // RETURNS: the height of the default screen in pixels.
5708 static int height()() nothrow {
5709 return gdk_screen_height();
5712 // Returns the height of the default screen in millimeters.
5713 // Note that on many X servers this value will not be correct.
5714 // though it is not always correct.
5715 // RETURNS: the height of the default screen in millimeters,
5716 static int height_mm()() nothrow {
5717 return gdk_screen_height_mm();
5720 // Returns the width of the default screen in pixels.
5721 // RETURNS: the width of the default screen in pixels.
5722 static int width()() nothrow {
5723 return gdk_screen_width();
5726 // Returns the width of the default screen in millimeters.
5727 // Note that on many X servers this value will not be correct.
5728 // though it is not always correct.
5729 // RETURNS: the width of the default screen in millimeters,
5730 static int width_mm()() nothrow {
5731 return gdk_screen_width_mm();
5733 void broadcast_client_message()(Event* event) nothrow {
5734 gdk_screen_broadcast_client_message(&this, event);
5737 // Unintrospectable method: get_active_window() / gdk_screen_get_active_window()
5738 // VERSION: 2.10
5739 // Returns the screen's currently active window.
5740 // On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
5741 // on the root window, as described in the <ulink
5742 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
5743 // Manager Hints</ulink>. If there is no currently currently active
5744 // window, or the window manager does not support the
5745 // _NET_ACTIVE_WINDOW hint, this function returns %NULL.
5746 // On other platforms, this function may return %NULL, depending on whether
5747 // it is implementable on that platform.
5748 // The returned window should be unrefed using g_object_unref() when
5749 // no longer needed.
5750 // RETURNS: the currently active window, or %NULL.
5751 Window* get_active_window()() nothrow {
5752 return gdk_screen_get_active_window(&this);
5755 // VERSION: 2.2
5756 // Gets the default colormap for @screen.
5757 // RETURNS: the default #GdkColormap.
5758 Colormap* get_default_colormap()() nothrow {
5759 return gdk_screen_get_default_colormap(&this);
5762 // Unintrospectable method: get_display() / gdk_screen_get_display()
5763 // VERSION: 2.2
5764 // Gets the display to which the @screen belongs.
5765 // RETURNS: the display to which @screen belongs
5766 Display* get_display()() nothrow {
5767 return gdk_screen_get_display(&this);
5770 // VERSION: 2.10
5771 // Gets any options previously set with gdk_screen_set_font_options().
5772 // font options have been set.
5773 // RETURNS: the current font options, or %NULL if no default
5774 cairo.FontOptions* get_font_options()() nothrow {
5775 return gdk_screen_get_font_options(&this);
5778 // VERSION: 2.2
5779 // Gets the height of @screen in pixels
5780 // RETURNS: the height of @screen in pixels.
5781 int get_height()() nothrow {
5782 return gdk_screen_get_height(&this);
5785 // VERSION: 2.2
5786 // Returns the height of @screen in millimeters.
5787 // Note that on some X servers this value will not be correct.
5788 // RETURNS: the heigth of @screen in millimeters.
5789 int get_height_mm()() nothrow {
5790 return gdk_screen_get_height_mm(&this);
5793 // VERSION: 2.2
5794 // Returns the monitor number in which the point (@x,@y) is located.
5795 // a monitor close to (@x,@y) if the point is not in any monitor.
5796 // RETURNS: the monitor number in which the point (@x,@y) lies, or
5797 // <x>: the x coordinate in the virtual screen.
5798 // <y>: the y coordinate in the virtual screen.
5799 int get_monitor_at_point()(int x, int y) nothrow {
5800 return gdk_screen_get_monitor_at_point(&this, x, y);
5803 // VERSION: 2.2
5804 // Returns the number of the monitor in which the largest area of the
5805 // bounding rectangle of @window resides.
5806 // RETURNS: the monitor number in which most of @window is located, or if @window does not intersect any monitors, a monitor, close to @window.
5807 // <window>: a #GdkWindow
5808 int get_monitor_at_window()(Window* window) nothrow {
5809 return gdk_screen_get_monitor_at_window(&this, window);
5812 // VERSION: 2.2
5813 // Retrieves the #GdkRectangle representing the size and position of
5814 // the individual monitor within the entire screen area.
5815 // Note that the size of the entire screen area can be retrieved via
5816 // gdk_screen_get_width() and gdk_screen_get_height().
5817 // <monitor_num>: the monitor number, between 0 and gdk_screen_get_n_monitors (screen)
5818 // <dest>: a #GdkRectangle to be filled with the monitor geometry
5819 void get_monitor_geometry()(int monitor_num, Rectangle* dest) nothrow {
5820 gdk_screen_get_monitor_geometry(&this, monitor_num, dest);
5823 // VERSION: 2.14
5824 // Gets the height in millimeters of the specified monitor.
5825 // RETURNS: the height of the monitor, or -1 if not available
5826 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5827 int get_monitor_height_mm()(int monitor_num) nothrow {
5828 return gdk_screen_get_monitor_height_mm(&this, monitor_num);
5831 // VERSION: 2.14
5832 // Returns the output name of the specified monitor.
5833 // Usually something like VGA, DVI, or TV, not the actual
5834 // product name of the display device.
5835 // or %NULL if the name cannot be determined
5836 // RETURNS: a newly-allocated string containing the name of the monitor,
5837 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5838 char* /*new*/ get_monitor_plug_name()(int monitor_num) nothrow {
5839 return gdk_screen_get_monitor_plug_name(&this, monitor_num);
5842 // VERSION: 2.14
5843 // Gets the width in millimeters of the specified monitor, if available.
5844 // RETURNS: the width of the monitor, or -1 if not available
5845 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5846 int get_monitor_width_mm()(int monitor_num) nothrow {
5847 return gdk_screen_get_monitor_width_mm(&this, monitor_num);
5850 // VERSION: 2.2
5851 // Returns the number of monitors which @screen consists of.
5852 // RETURNS: number of monitors which @screen consists of
5853 int get_n_monitors()() nothrow {
5854 return gdk_screen_get_n_monitors(&this);
5857 // VERSION: 2.2
5858 // Gets the index of @screen among the screens in the display
5859 // to which it belongs. (See gdk_screen_get_display())
5860 // RETURNS: the index
5861 int get_number()() nothrow {
5862 return gdk_screen_get_number(&this);
5865 // VERSION: 2.20
5866 // Gets the primary monitor for @screen. The primary monitor
5867 // is considered the monitor where the 'main desktop' lives.
5868 // While normal application windows typically allow the window
5869 // manager to place the windows, specialized desktop applications
5870 // such as panels should place themselves on the primary monitor.
5871 // If no primary monitor is configured by the user, the return value
5872 // will be 0, defaulting to the first monitor.
5873 // RETURNS: An integer index for the primary monitor, or 0 if none is configured.
5874 int get_primary_monitor()() nothrow {
5875 return gdk_screen_get_primary_monitor(&this);
5878 // VERSION: 2.10
5879 // Gets the resolution for font handling on the screen; see
5880 // gdk_screen_set_resolution() for full details.
5881 // has been set.
5882 // RETURNS: the current resolution, or -1 if no resolution
5883 double get_resolution()() nothrow {
5884 return gdk_screen_get_resolution(&this);
5887 // VERSION: 2.2
5888 // DEPRECATED (v2.22) method: get_rgb_colormap - Use gdk_screen_get_system_colormap()
5889 // Gets the preferred colormap for rendering image data on @screen.
5890 // Not a very useful function; historically, GDK could only render RGB
5891 // image data to one colormap and visual, but in the current version
5892 // it can render to any colormap and visual. So there's no need to
5893 // call this function.
5894 // RETURNS: the preferred colormap
5895 Colormap* get_rgb_colormap()() nothrow {
5896 return gdk_screen_get_rgb_colormap(&this);
5899 // VERSION: 2.2
5900 // DEPRECATED (v2.22) method: get_rgb_visual - Use gdk_screen_get_system_visual()
5901 // Gets a "preferred visual" chosen by GdkRGB for rendering image data
5902 // on @screen. In previous versions of
5903 // GDK, this was the only visual GdkRGB could use for rendering. In
5904 // current versions, it's simply the visual GdkRGB would have chosen as
5905 // the optimal one in those previous versions. GdkRGB can now render to
5906 // drawables with any visual.
5907 // RETURNS: The #GdkVisual chosen by GdkRGB.
5908 Visual* get_rgb_visual()() nothrow {
5909 return gdk_screen_get_rgb_visual(&this);
5912 // VERSION: 2.8
5913 // Gets a colormap to use for creating windows or pixmaps with an
5914 // alpha channel. The windowing system on which GTK+ is running
5915 // may not support this capability, in which case %NULL will
5916 // be returned. Even if a non-%NULL value is returned, its
5917 // possible that the window's alpha channel won't be honored
5918 // X an appropriate windowing manager and compositing manager
5919 // must be running to provide appropriate display.
5920 // This functionality is not implemented in the Windows backend.
5921 // For setting an overall opacity for a top-level window, see
5922 // gdk_window_set_opacity().
5923 // an alpha channel or %NULL if the capability is not available.
5924 // RETURNS: a colormap to use for windows with
5925 Colormap* get_rgba_colormap()() nothrow {
5926 return gdk_screen_get_rgba_colormap(&this);
5929 // VERSION: 2.8
5930 // Gets a visual to use for creating windows or pixmaps with an
5931 // alpha channel. See the docs for gdk_screen_get_rgba_colormap()
5932 // for caveats.
5933 // alpha channel or %NULL if the capability is not available.
5934 // RETURNS: a visual to use for windows with an
5935 Visual* get_rgba_visual()() nothrow {
5936 return gdk_screen_get_rgba_visual(&this);
5939 // VERSION: 2.2
5940 // Gets the root window of @screen.
5941 // RETURNS: the root window
5942 Window* get_root_window()() nothrow {
5943 return gdk_screen_get_root_window(&this);
5945 int get_setting()(char* name, GObject2.Value* value) nothrow {
5946 return gdk_screen_get_setting(&this, name, value);
5949 // VERSION: 2.2
5950 // Gets the system's default colormap for @screen
5951 // RETURNS: the default colormap for @screen.
5952 Colormap* get_system_colormap()() nothrow {
5953 return gdk_screen_get_system_colormap(&this);
5956 // VERSION: 2.2
5957 // Get the system's default visual for @screen.
5958 // This is the visual for the root window of the display.
5959 // The return value should not be freed.
5960 // RETURNS: the system visual
5961 Visual* get_system_visual()() nothrow {
5962 return gdk_screen_get_system_visual(&this);
5965 // VERSION: 2.2
5966 // Obtains a list of all toplevel windows known to GDK on the screen @screen.
5967 // A toplevel window is a child of the root window (see
5968 // gdk_get_default_root_window()).
5969 // The returned list should be freed with g_list_free(), but
5970 // its elements need not be freed.
5971 // list of toplevel windows, free with g_list_free()
5972 GLib2.List* /*new container*/ get_toplevel_windows()() nothrow {
5973 return gdk_screen_get_toplevel_windows(&this);
5976 // VERSION: 2.2
5977 // Gets the width of @screen in pixels
5978 // RETURNS: the width of @screen in pixels.
5979 int get_width()() nothrow {
5980 return gdk_screen_get_width(&this);
5983 // VERSION: 2.2
5984 // Gets the width of @screen in millimeters.
5985 // Note that on some X servers this value will not be correct.
5986 // RETURNS: the width of @screen in millimeters.
5987 int get_width_mm()() nothrow {
5988 return gdk_screen_get_width_mm(&this);
5991 // VERSION: 2.10
5992 // Returns a #GList of #GdkWindow<!-- -->s representing the current
5993 // window stack.
5994 // On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
5995 // property on the root window, as described in the <ulink
5996 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
5997 // Manager Hints</ulink>. If the window manager does not support the
5998 // _NET_CLIENT_LIST_STACKING hint, this function returns %NULL.
5999 // On other platforms, this function may return %NULL, depending on whether
6000 // it is implementable on that platform.
6001 // The returned list is newly allocated and owns references to the
6002 // windows it contains, so it should be freed using g_list_free() and
6003 // its windows unrefed using g_object_unref() when no longer needed.
6004 // a list of #GdkWindow<!-- -->s for the current window stack,
6005 // or %NULL.
6006 GLib2.List* /*new*/ get_window_stack()() nothrow {
6007 return gdk_screen_get_window_stack(&this);
6010 // VERSION: 2.10
6011 // Returns whether windows with an RGBA visual can reasonably
6012 // be expected to have their alpha channel drawn correctly on
6013 // the screen.
6014 // On X11 this function returns whether a compositing manager is
6015 // compositing @screen.
6016 // expected to have their alpha channels drawn correctly on the screen.
6017 // RETURNS: Whether windows with RGBA visuals can reasonably be
6018 int is_composited()() nothrow {
6019 return gdk_screen_is_composited(&this);
6022 // VERSION: 2.2
6023 // Lists the available visuals for the specified @screen.
6024 // A visual describes a hardware image data format.
6025 // For example, a visual might support 24-bit color, or 8-bit color,
6026 // and might expect pixels to be in a certain format.
6027 // Call g_list_free() on the return value when you're finished with it.
6028 // a list of visuals; the list must be freed, but not its contents
6029 GLib2.List* /*new container*/ list_visuals()() nothrow {
6030 return gdk_screen_list_visuals(&this);
6033 // VERSION: 2.2
6034 // Determines the name to pass to gdk_display_open() to get
6035 // a #GdkDisplay with this screen as the default screen.
6036 // RETURNS: a newly allocated string, free with g_free()
6037 char* /*new*/ make_display_name()() nothrow {
6038 return gdk_screen_make_display_name(&this);
6041 // VERSION: 2.2
6042 // Sets the default @colormap for @screen.
6043 // <colormap>: a #GdkColormap
6044 void set_default_colormap()(Colormap* colormap) nothrow {
6045 gdk_screen_set_default_colormap(&this, colormap);
6048 // VERSION: 2.10
6049 // Sets the default font options for the screen. These
6050 // options will be set on any #PangoContext's newly created
6051 // with gdk_pango_context_get_for_screen(). Changing the
6052 // default set of font options does not affect contexts that
6053 // have already been created.
6054 // <options>: a #cairo_font_options_t, or %NULL to unset any previously set default font options.
6055 void set_font_options()(cairo.FontOptions* options=null) nothrow {
6056 gdk_screen_set_font_options(&this, options);
6059 // VERSION: 2.10
6060 // Sets the resolution for font handling on the screen. This is a
6061 // scale factor between points specified in a #PangoFontDescription
6062 // and cairo units. The default value is 96, meaning that a 10 point
6063 // font will be 13 units high. (10 * 96. / 72. = 13.3).
6064 // <dpi>: the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.)
6065 void set_resolution()(double dpi) nothrow {
6066 gdk_screen_set_resolution(&this, dpi);
6069 // VERSION: 2.10
6070 // The ::composited-changed signal is emitted when the composited
6071 // status of the screen changes
6072 extern (C) alias static void function (Screen* this_, void* user_data=null) nothrow signal_composited_changed;
6074 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
6075 return super_.signal_connect!name(cb, data, cf);
6078 ulong signal_connect(string name:"composited-changed", CB:signal_composited_changed)
6079 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
6080 if (is(typeof(cb)==signal_composited_changed)||_ttmm!(CB, signal_composited_changed)()) {
6081 return signal_connect_data!()(&this, cast(char*)"composited-changed",
6082 cast(GObject2.Callback)cb, data, null, cf);
6085 // VERSION: 2.14
6086 // The ::monitors-changed signal is emitted when the number, size
6087 // or position of the monitors attached to the screen change.
6088 // Only for X11 and OS X for now. A future implementation for Win32
6089 // may be a possibility.
6090 extern (C) alias static void function (Screen* this_, void* user_data=null) nothrow signal_monitors_changed;
6091 ulong signal_connect(string name:"monitors-changed", CB:signal_monitors_changed)
6092 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
6093 if (is(typeof(cb)==signal_monitors_changed)||_ttmm!(CB, signal_monitors_changed)()) {
6094 return signal_connect_data!()(&this, cast(char*)"monitors-changed",
6095 cast(GObject2.Callback)cb, data, null, cf);
6098 // VERSION: 2.2
6099 // The ::size-changed signal is emitted when the pixel width or
6100 // height of a screen changes.
6101 extern (C) alias static void function (Screen* this_, void* user_data=null) nothrow signal_size_changed;
6102 ulong signal_connect(string name:"size-changed", CB:signal_size_changed)
6103 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
6104 if (is(typeof(cb)==signal_size_changed)||_ttmm!(CB, signal_size_changed)()) {
6105 return signal_connect_data!()(&this, cast(char*)"size-changed",
6106 cast(GObject2.Callback)cb, data, null, cf);
6110 struct ScreenClass {
6111 GObject2.ObjectClass parent_class;
6112 extern (C) void function (Screen* screen) nothrow size_changed;
6113 extern (C) void function (Screen* screen) nothrow composited_changed;
6114 extern (C) void function (Screen* screen) nothrow monitors_changed;
6117 enum ScrollDirection {
6118 UP = 0,
6119 DOWN = 1,
6120 LEFT = 2,
6121 RIGHT = 3
6123 struct Segment {
6124 int x1, y1, x2, y2;
6127 enum SettingAction {
6128 NEW = 0,
6129 CHANGED = 1,
6130 DELETED = 2
6132 struct Span {
6133 int x, y, width;
6136 extern (C) alias void function (Span* span, void* data) nothrow SpanFunc;
6138 enum Status {
6139 OK = 0,
6140 ERROR = -1,
6141 ERROR_PARAM = -2,
6142 ERROR_FILE = -3,
6143 ERROR_MEM = -4
6145 enum SubwindowMode {
6146 CLIP_BY_CHILDREN = 0,
6147 INCLUDE_INFERIORS = 1
6149 struct TimeCoord {
6150 uint time;
6151 double[128] axes;
6154 struct Trapezoid {
6155 double y1, x11, x21, y2, x12, x22;
6158 enum VisibilityState {
6159 UNOBSCURED = 0,
6160 PARTIAL = 1,
6161 FULLY_OBSCURED = 2
6163 struct Visual /* : GObject.Object */ {
6164 alias parent_instance this;
6165 alias parent_instance super_;
6166 alias parent_instance object;
6167 GObject2.Object parent_instance;
6168 VisualType type;
6169 int depth;
6170 ByteOrder byte_order;
6171 int colormap_size, bits_per_rgb;
6172 uint red_mask;
6173 int red_shift, red_prec;
6174 uint green_mask;
6175 int green_shift, green_prec;
6176 uint blue_mask;
6177 int blue_shift, blue_prec;
6180 // Get the visual with the most available colors for the default
6181 // GDK screen. The return value should not be freed.
6182 // RETURNS: best visual
6183 static Visual* get_best()() nothrow {
6184 return gdk_visual_get_best();
6187 // Get the best available depth for the default GDK screen. "Best"
6188 // means "largest," i.e. 32 preferred over 24 preferred over 8 bits
6189 // per pixel.
6190 // RETURNS: best available depth
6191 static int get_best_depth()() nothrow {
6192 return gdk_visual_get_best_depth();
6195 // Return the best available visual type for the default GDK screen.
6196 // RETURNS: best visual type
6197 static VisualType get_best_type()() nothrow {
6198 return gdk_visual_get_best_type();
6201 // Combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type().
6202 // RETURNS: best visual with both @depth and
6203 // <depth>: a bit depth
6204 // <visual_type>: a visual type
6205 static Visual* get_best_with_both()(int depth, VisualType visual_type) nothrow {
6206 return gdk_visual_get_best_with_both(depth, visual_type);
6209 // Get the best visual with depth @depth for the default GDK screen.
6210 // Color visuals and visuals with mutable colormaps are preferred
6211 // over grayscale or fixed-colormap visuals. The return value should not
6212 // be freed. %NULL may be returned if no visual supports @depth.
6213 // RETURNS: best visual for the given depth
6214 // <depth>: a bit depth
6215 static Visual* get_best_with_depth()(int depth) nothrow {
6216 return gdk_visual_get_best_with_depth(depth);
6219 // Get the best visual of the given @visual_type for the default GDK screen.
6220 // Visuals with higher color depths are considered better. The return value
6221 // should not be freed. %NULL may be returned if no visual has type
6222 // RETURNS: best visual of the given type
6223 // <visual_type>: a visual type
6224 static Visual* get_best_with_type()(VisualType visual_type) nothrow {
6225 return gdk_visual_get_best_with_type(visual_type);
6228 // Get the system's default visual for the default GDK screen.
6229 // This is the visual for the root window of the display.
6230 // The return value should not be freed.
6231 // RETURNS: system visual
6232 static Visual* get_system()() nothrow {
6233 return gdk_visual_get_system();
6236 // VERSION: 2.22
6237 // Returns the number of significant bits per red, green and blue value.
6238 // RETURNS: The number of significant bits per color value for @visual.
6239 int get_bits_per_rgb()() nothrow {
6240 return gdk_visual_get_bits_per_rgb(&this);
6243 // VERSION: 2.22
6244 // Obtains values that are needed to calculate blue pixel values in TrueColor
6245 // and DirectColor. The "mask" is the significant bits within the pixel.
6246 // The "shift" is the number of bits left we must shift a primary for it
6247 // to be in position (according to the "mask"). Finally, "precision" refers
6248 // to how much precision the pixel value contains for a particular primary.
6249 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6250 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6251 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6252 void get_blue_pixel_details()(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) nothrow {
6253 gdk_visual_get_blue_pixel_details(&this, mask, shift, precision);
6256 // VERSION: 2.22
6257 // Returns the byte order of this visual.
6258 // RETURNS: A #GdkByteOrder stating the byte order of @visual.
6259 ByteOrder get_byte_order()() nothrow {
6260 return gdk_visual_get_byte_order(&this);
6263 // VERSION: 2.22
6264 // Returns the size of a colormap for this visual.
6265 // RETURNS: The size of a colormap that is suitable for @visual.
6266 int get_colormap_size()() nothrow {
6267 return gdk_visual_get_colormap_size(&this);
6270 // VERSION: 2.22
6271 // Returns the bit depth of this visual.
6272 // RETURNS: The bit depth of this visual.
6273 int get_depth()() nothrow {
6274 return gdk_visual_get_depth(&this);
6277 // VERSION: 2.22
6278 // Obtains values that are needed to calculate green pixel values in TrueColor
6279 // and DirectColor. The "mask" is the significant bits within the pixel.
6280 // The "shift" is the number of bits left we must shift a primary for it
6281 // to be in position (according to the "mask"). Finally, "precision" refers
6282 // to how much precision the pixel value contains for a particular primary.
6283 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6284 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6285 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6286 void get_green_pixel_details()(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) nothrow {
6287 gdk_visual_get_green_pixel_details(&this, mask, shift, precision);
6290 // VERSION: 2.22
6291 // Obtains values that are needed to calculate red pixel values in TrueColor
6292 // and DirectColor. The "mask" is the significant bits within the pixel.
6293 // The "shift" is the number of bits left we must shift a primary for it
6294 // to be in position (according to the "mask"). Finally, "precision" refers
6295 // to how much precision the pixel value contains for a particular primary.
6296 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6297 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6298 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6299 void get_red_pixel_details()(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) nothrow {
6300 gdk_visual_get_red_pixel_details(&this, mask, shift, precision);
6303 // VERSION: 2.2
6304 // Gets the screen to which this visual belongs
6305 // RETURNS: the screen to which this visual belongs.
6306 Screen* get_screen()() nothrow {
6307 return gdk_visual_get_screen(&this);
6310 // VERSION: 2.22
6311 // Returns the type of visual this is (PseudoColor, TrueColor, etc).
6312 // RETURNS: A #GdkVisualType stating the type of @visual.
6313 VisualType get_visual_type()() nothrow {
6314 return gdk_visual_get_visual_type(&this);
6318 struct VisualClass {
6321 enum VisualType {
6322 STATIC_GRAY = 0,
6323 GRAYSCALE = 1,
6324 STATIC_COLOR = 2,
6325 PSEUDO_COLOR = 3,
6326 TRUE_COLOR = 4,
6327 DIRECT_COLOR = 5
6329 enum WMDecoration {
6330 ALL = 1,
6331 BORDER = 2,
6332 RESIZEH = 4,
6333 TITLE = 8,
6334 MENU = 16,
6335 MINIMIZE = 32,
6336 MAXIMIZE = 64
6338 enum WMFunction {
6339 ALL = 1,
6340 RESIZE = 2,
6341 MOVE = 4,
6342 MINIMIZE = 8,
6343 MAXIMIZE = 16,
6344 CLOSE = 32
6346 struct Window /* : Drawable */ {
6347 alias method_parent this;
6348 alias method_parent super_;
6349 alias method_parent drawable;
6350 Drawable method_parent;
6353 // Unintrospectable method: add_filter() / gdk_window_add_filter()
6354 // Adds an event filter to @window, allowing you to intercept events
6355 // before they reach GDK. This is a low-level operation and makes it
6356 // easy to break GDK and/or GTK+, so you have to know what you're
6357 // doing. Pass %NULL for @window to get all events for all windows,
6358 // instead of events for a specific window.
6359 // See gdk_display_add_client_message_filter() if you are interested
6360 // in X ClientMessage events.
6361 // <function>: filter callback
6362 // <data>: data to pass to filter callback
6363 void add_filter()(FilterFunc function_, void* data) nothrow {
6364 gdk_window_add_filter(&this, function_, data);
6367 // VERSION: 2.12
6368 // Emits a short beep associated to @window in the appropriate
6369 // display, if supported. Otherwise, emits a short beep on
6370 // the display just as gdk_display_beep().
6371 void beep()() nothrow {
6372 gdk_window_beep(&this);
6375 // Begins a window move operation (for a toplevel window). You might
6376 // use this function to implement a "window move grip," for
6377 // example. The function works best with window managers that support
6378 // the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
6379 // Window Manager Hints</ulink>, but has a fallback implementation for
6380 // other window managers.
6381 // <button>: the button being used to drag
6382 // <root_x>: root window X coordinate of mouse click that began the drag
6383 // <root_y>: root window Y coordinate of mouse click that began the drag
6384 // <timestamp>: timestamp of mouse click that began the drag
6385 void begin_move_drag()(int button, int root_x, int root_y, uint timestamp) nothrow {
6386 gdk_window_begin_move_drag(&this, button, root_x, root_y, timestamp);
6389 // A convenience wrapper around gdk_window_begin_paint_region() which
6390 // creates a rectangular region for you. See
6391 // gdk_window_begin_paint_region() for details.
6392 // <rectangle>: rectangle you intend to draw to
6393 void begin_paint_rect()(Rectangle* rectangle) nothrow {
6394 gdk_window_begin_paint_rect(&this, rectangle);
6397 // Indicates that you are beginning the process of redrawing @region.
6398 // A backing store (offscreen buffer) large enough to contain @region
6399 // will be created. The backing store will be initialized with the
6400 // background color or background pixmap for @window. Then, all
6401 // drawing operations performed on @window will be diverted to the
6402 // backing store. When you call gdk_window_end_paint(), the backing
6403 // store will be copied to @window, making it visible onscreen. Only
6404 // the part of @window contained in @region will be modified; that is,
6405 // drawing operations are clipped to @region.
6406 // The net result of all this is to remove flicker, because the user
6407 // sees the finished product appear all at once when you call
6408 // gdk_window_end_paint(). If you draw to @window directly without
6409 // calling gdk_window_begin_paint_region(), the user may see flicker
6410 // as individual drawing operations are performed in sequence. The
6411 // clipping and background-initializing features of
6412 // gdk_window_begin_paint_region() are conveniences for the
6413 // programmer, so you can avoid doing that work yourself.
6414 // When using GTK+, the widget system automatically places calls to
6415 // gdk_window_begin_paint_region() and gdk_window_end_paint() around
6416 // emissions of the expose_event signal. That is, if you're writing an
6417 // expose event handler, you can assume that the exposed area in
6418 // #GdkEventExpose has already been cleared to the window background,
6419 // is already set as the clip region, and already has a backing store.
6420 // Therefore in most cases, application code need not call
6421 // gdk_window_begin_paint_region(). (You can disable the automatic
6422 // calls around expose events on a widget-by-widget basis by calling
6423 // gtk_widget_set_double_buffered().)
6424 // If you call this function multiple times before calling the
6425 // matching gdk_window_end_paint(), the backing stores are pushed onto
6426 // a stack. gdk_window_end_paint() copies the topmost backing store
6427 // onscreen, subtracts the topmost region from all other regions in
6428 // the stack, and pops the stack. All drawing operations affect only
6429 // the topmost backing store in the stack. One matching call to
6430 // gdk_window_end_paint() is required for each call to
6431 // gdk_window_begin_paint_region().
6432 // <region>: region you intend to draw to
6433 void begin_paint_region()(Region* region) nothrow {
6434 gdk_window_begin_paint_region(&this, region);
6437 // Begins a window resize operation (for a toplevel window).
6438 // You might use this function to implement a "window resize grip," for
6439 // example; in fact #GtkStatusbar uses it. The function works best
6440 // with window managers that support the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended Window Manager Hints</ulink>, but has a
6441 // fallback implementation for other window managers.
6442 // <edge>: the edge or corner from which the drag is started
6443 // <button>: the button being used to drag
6444 // <root_x>: root window X coordinate of mouse click that began the drag
6445 // <root_y>: root window Y coordinate of mouse click that began the drag
6446 // <timestamp>: timestamp of mouse click that began the drag (use gdk_event_get_time())
6447 void begin_resize_drag()(WindowEdge edge, int button, int root_x, int root_y, uint timestamp) nothrow {
6448 gdk_window_begin_resize_drag(&this, edge, button, root_x, root_y, timestamp);
6450 // Clears an entire @window to the background color or background pixmap.
6451 void clear()() nothrow {
6452 gdk_window_clear(&this);
6455 // Clears an area of @window to the background color or background pixmap.
6456 // <x>: x coordinate of rectangle to clear
6457 // <y>: y coordinate of rectangle to clear
6458 // <width>: width of rectangle to clear
6459 // <height>: height of rectangle to clear
6460 void clear_area()(int x, int y, int width, int height) nothrow {
6461 gdk_window_clear_area(&this, x, y, width, height);
6464 // Like gdk_window_clear_area(), but also generates an expose event for
6465 // the cleared area.
6466 // This function has a stupid name because it dates back to the mists
6467 // time, pre-GDK-1.0.
6468 // <x>: x coordinate of rectangle to clear
6469 // <y>: y coordinate of rectangle to clear
6470 // <width>: width of rectangle to clear
6471 // <height>: height of rectangle to clear
6472 void clear_area_e()(int x, int y, int width, int height) nothrow {
6473 gdk_window_clear_area_e(&this, x, y, width, height);
6476 // VERSION: 2.6
6477 // Signal to the window system that the application has finished
6478 // handling Configure events it has received. Window Managers can
6479 // use this to better synchronize the frame repaint with the
6480 // application. GTK+ applications will automatically call this
6481 // function when appropriate.
6482 // This function can only be called if gdk_window_enable_synchronized_configure()
6483 // was called previously.
6484 void configure_finished()() nothrow {
6485 gdk_window_configure_finished(&this);
6488 // VERSION: 2.22
6489 // Transforms window coordinates from a parent window to a child
6490 // window, where the parent window is the normal parent as returned by
6491 // gdk_window_get_parent() for normal windows, and the window's
6492 // embedder as returned by gdk_offscreen_window_get_embedder() for
6493 // offscreen windows.
6494 // For normal windows, calling this function is equivalent to subtracting
6495 // the return values of gdk_window_get_position() from the parent coordinates.
6496 // For offscreen windows however (which can be arbitrarily transformed),
6497 // the coordinates.
6498 // You should always use this function when writing generic code that
6499 // walks down a window hierarchy.
6500 // <parent_x>: X coordinate in parent's coordinate system
6501 // <parent_y>: Y coordinate in parent's coordinate system
6502 // <x>: return location for X coordinate in child's coordinate system
6503 // <y>: return location for Y coordinate in child's coordinate system
6504 void coords_from_parent()(double parent_x, double parent_y, /*out*/ double* x=null, /*out*/ double* y=null) nothrow {
6505 gdk_window_coords_from_parent(&this, parent_x, parent_y, x, y);
6508 // VERSION: 2.22
6509 // Transforms window coordinates from a child window to its parent
6510 // window, where the parent window is the normal parent as returned by
6511 // gdk_window_get_parent() for normal windows, and the window's
6512 // embedder as returned by gdk_offscreen_window_get_embedder() for
6513 // offscreen windows.
6514 // For normal windows, calling this function is equivalent to adding
6515 // the return values of gdk_window_get_position() to the child coordinates.
6516 // For offscreen windows however (which can be arbitrarily transformed),
6517 // the coordinates.
6518 // You should always use this function when writing generic code that
6519 // walks up a window hierarchy.
6520 // <x>: X coordinate in child's coordinate system
6521 // <y>: Y coordinate in child's coordinate system
6522 // <parent_x>: return location for X coordinate in parent's coordinate system, or %NULL
6523 // <parent_y>: return location for Y coordinate in parent's coordinate system, or %NULL
6524 void coords_to_parent()(double x, double y, /*out*/ double* parent_x=null, /*out*/ double* parent_y=null) nothrow {
6525 gdk_window_coords_to_parent(&this, x, y, parent_x, parent_y);
6528 // VERSION: 2.22
6529 // Create a new surface that is as compatible as possible with the
6530 // given @window. For example the new surface will have the same
6531 // fallback resolution and font options as @window. Generally, the new
6532 // surface will also use the same backend as @window, unless that is
6533 // not possible for some reason. The type of the returned surface may
6534 // be examined with cairo_surface_get_type().
6535 // Initially the surface contents are all 0 (transparent if contents
6536 // have transparency, black otherwise.)
6537 // owns the surface and should call cairo_surface_destroy() when done
6538 // with it.
6539 // This function always returns a valid pointer, but it will return a
6540 // pointer to a "nil" surface if @other is already in an error state
6541 // or any other error occurs.
6542 // RETURNS: a pointer to the newly allocated surface. The caller
6543 // <content>: the content for the new surface
6544 // <width>: width of the new surface
6545 // <height>: height of the new surface
6546 cairo.Surface* /*new*/ create_similar_surface()(cairo.Content content, int width, int height) nothrow {
6547 return gdk_window_create_similar_surface(&this, content, width, height);
6550 // Attempt to deiconify (unminimize) @window. On X11 the window manager may
6551 // choose to ignore the request to deiconify. When using GTK+,
6552 // use gtk_window_deiconify() instead of the #GdkWindow variant. Or better yet,
6553 // you probably want to use gtk_window_present(), which raises the window, focuses it,
6554 // unminimizes it, and puts it on the current desktop.
6555 void deiconify()() nothrow {
6556 gdk_window_deiconify(&this);
6559 // Destroys the window system resources associated with @window and decrements @window's
6560 // reference count. The window system resources for all children of @window are also
6561 // destroyed, but the children's reference counts are not decremented.
6562 // Note that a window will not be destroyed automatically when its reference count
6563 // reaches zero. You must call this function yourself before that happens.
6564 void destroy()() nothrow {
6565 gdk_window_destroy(&this);
6567 void destroy_notify()() nothrow {
6568 gdk_window_destroy_notify(&this);
6571 // VERSION: 2.6
6572 // Indicates that the application will cooperate with the window
6573 // system in synchronizing the window repaint with the window
6574 // manager during resizing operations. After an application calls
6575 // this function, it must call gdk_window_configure_finished() every
6576 // time it has finished all processing associated with a set of
6577 // Configure events. Toplevel GTK+ windows automatically use this
6578 // protocol.
6579 // On X, calling this function makes @window participate in the
6580 // _NET_WM_SYNC_REQUEST window manager protocol.
6581 void enable_synchronized_configure()() nothrow {
6582 gdk_window_enable_synchronized_configure(&this);
6585 // Indicates that the backing store created by the most recent call to
6586 // gdk_window_begin_paint_region() should be copied onscreen and
6587 // deleted, leaving the next-most-recent backing store or no backing
6588 // store at all as the active paint region. See
6589 // gdk_window_begin_paint_region() for full details. It is an error to
6590 // call this function without a matching
6591 // gdk_window_begin_paint_region() first.
6592 void end_paint()() nothrow {
6593 gdk_window_end_paint(&this);
6596 // VERSION: 2.18
6597 // Tries to ensure that there is a window-system native window for this
6598 // GdkWindow. This may fail in some situations, returning %FALSE.
6599 // Offscreen window and children of them can never have native windows.
6600 // Some backends may not support native child windows.
6601 // RETURNS: %TRUE if the window has a native window, %FALSE otherwise
6602 int ensure_native()() nothrow {
6603 return gdk_window_ensure_native(&this);
6606 // VERSION: 2.18
6607 // Flush all outstanding cached operations on a window, leaving the
6608 // window in a state which reflects all that has been drawn before.
6609 // Gdk uses multiple kinds of caching to get better performance and
6610 // nicer drawing. For instance, during exposes all paints to a window
6611 // using double buffered rendering are keep on a pixmap until the last
6612 // window has been exposed. It also delays window moves/scrolls until
6613 // as long as possible until next update to avoid tearing when moving
6614 // windows.
6615 // Normally this should be completely invisible to applications, as
6616 // we automatically flush the windows when required, but this might
6617 // be needed if you for instance mix direct native drawing with
6618 // gdk drawing. For Gtk widgets that don't use double buffering this
6619 // will be called automatically before sending the expose event.
6620 void flush()() nothrow {
6621 gdk_window_flush(&this);
6624 // Sets keyboard focus to @window. In most cases, gtk_window_present()
6625 // should be used on a #GtkWindow, rather than calling this function.
6626 // <timestamp>: timestamp of the event triggering the window focus
6627 void focus()(uint timestamp) nothrow {
6628 gdk_window_focus(&this, timestamp);
6631 // Temporarily freezes a window and all its descendants such that it won't
6632 // receive expose events. The window will begin receiving expose events
6633 // again when gdk_window_thaw_toplevel_updates_libgtk_only() is called. If
6634 // gdk_window_freeze_toplevel_updates_libgtk_only()
6635 // has been called more than once,
6636 // gdk_window_thaw_toplevel_updates_libgtk_only() must be called
6637 // an equal number of times to begin processing exposes.
6638 // This function is not part of the GDK public API and is only
6639 // for use by GTK+.
6640 void freeze_toplevel_updates_libgtk_only()() nothrow {
6641 gdk_window_freeze_toplevel_updates_libgtk_only(&this);
6644 // Temporarily freezes a window such that it won't receive expose
6645 // events. The window will begin receiving expose events again when
6646 // gdk_window_thaw_updates() is called. If gdk_window_freeze_updates()
6647 // has been called more than once, gdk_window_thaw_updates() must be called
6648 // an equal number of times to begin processing exposes.
6649 void freeze_updates()() nothrow {
6650 gdk_window_freeze_updates(&this);
6653 // VERSION: 2.2
6654 // Moves the window into fullscreen mode. This means the
6655 // window covers the entire screen and is above any panels
6656 // or task bars.
6657 // If the window was already fullscreen, then this function does nothing.
6658 // On X11, asks the window manager to put @window in a fullscreen
6659 // state, if the window manager supports this operation. Not all
6660 // window managers support this, and some deliberately ignore it or
6661 // don't have a concept of "fullscreen"; so you can't rely on the
6662 // fullscreenification actually happening. But it will happen with
6663 // most standard window managers, and GDK makes a best effort to get
6664 // it to happen.
6665 void fullscreen()() nothrow {
6666 gdk_window_fullscreen(&this);
6669 // VERSION: 2.18
6670 // This function informs GDK that the geometry of an embedded
6671 // offscreen window has changed. This is necessary for GDK to keep
6672 // track of which offscreen window the pointer is in.
6673 void geometry_changed()() nothrow {
6674 gdk_window_geometry_changed(&this);
6677 // VERSION: 2.22
6678 // Determines whether or not the desktop environment shuld be hinted that
6679 // the window does not want to receive input focus.
6680 // RETURNS: whether or not the window should receive input focus.
6681 int get_accept_focus()() nothrow {
6682 return gdk_window_get_accept_focus(&this);
6685 // VERSION: 2.22
6686 // Gets the pattern used to clear the background on @window. If @window
6687 // does not have its own background and reuses the parent's, %NULL is
6688 // returned and you'll have to query it yourself.
6689 // %NULL to use the parent's background.
6690 // RETURNS: The pattern to use for the background or
6691 cairo.Pattern* get_background_pattern()() nothrow {
6692 return gdk_window_get_background_pattern(&this);
6695 // Gets the list of children of @window known to GDK.
6696 // This function only returns children created via GDK,
6697 // so for example it's useless when used with the root window;
6698 // it only returns windows an application created itself.
6699 // The returned list must be freed, but the elements in the
6700 // list need not be.
6701 // list of child windows inside @window
6702 GLib2.List* /*new container*/ get_children()() nothrow {
6703 return gdk_window_get_children(&this);
6706 // VERSION: 2.22
6707 // Determines whether @window is composited.
6708 // See gdk_window_set_composited().
6709 // RETURNS: %TRUE if the window is composited.
6710 int get_composited()() nothrow {
6711 return gdk_window_get_composited(&this);
6714 // VERSION: 2.18
6715 // Retrieves a #GdkCursor pointer for the cursor currently set on the
6716 // specified #GdkWindow, or %NULL. If the return value is %NULL then
6717 // there is no custom cursor set on the specified window, and it is
6718 // using the cursor for its parent window.
6719 // object is owned by the #GdkWindow and should not be unreferenced
6720 // directly. Use gdk_window_set_cursor() to unset the cursor of the
6721 // window
6722 // RETURNS: a #GdkCursor, or %NULL. The returned
6723 Cursor* get_cursor()() nothrow {
6724 return gdk_window_get_cursor(&this);
6727 // Returns the decorations set on the GdkWindow with #gdk_window_set_decorations
6728 // RETURNS: TRUE if the window has decorations set, FALSE otherwise.
6729 // <decorations>: The window decorations will be written here
6730 int get_decorations()(WMDecoration* decorations) nothrow {
6731 return gdk_window_get_decorations(&this, decorations);
6734 // This gets the origin of a #GdkWindow relative to
6735 // an Enlightenment-window-manager desktop. As long as you don't
6736 // assume that the user's desktop/workspace covers the entire
6737 // root window (i.e. you don't assume that the desktop begins
6738 // at root window coordinate 0,0) this function is not necessary.
6739 // It's deprecated for that reason.
6740 // RETURNS: not meaningful
6741 // <x>: return location for X coordinate
6742 // <y>: return location for Y coordinate
6743 int get_deskrelative_origin()(int* x, int* y) nothrow {
6744 return gdk_window_get_deskrelative_origin(&this, x, y);
6747 // Unintrospectable method: get_display() / gdk_window_get_display()
6748 // VERSION: 2.24
6749 // Gets the #GdkDisplay associated with a #GdkWindow.
6750 // RETURNS: the #GdkDisplay associated with @window
6751 Display* get_display()() nothrow {
6752 return gdk_window_get_display(&this);
6755 // Unintrospectable method: get_effective_parent() / gdk_window_get_effective_parent()
6756 // VERSION: 2.22
6757 // Obtains the parent of @window, as known to GDK. Works like
6758 // gdk_window_get_parent() for normal windows, but returns the
6759 // window's embedder for offscreen windows.
6760 // RETURNS: effective parent of @window
6761 Window* get_effective_parent()() nothrow {
6762 return gdk_window_get_effective_parent(&this);
6765 // Unintrospectable method: get_effective_toplevel() / gdk_window_get_effective_toplevel()
6766 // VERSION: 2.22
6767 // Gets the toplevel window that's an ancestor of @window.
6768 // Works like gdk_window_get_toplevel(), but treats an offscreen window's
6769 // embedder as its parent, using gdk_window_get_effective_parent().
6770 // RETURNS: the effective toplevel window containing @window
6771 Window* get_effective_toplevel()() nothrow {
6772 return gdk_window_get_effective_toplevel(&this);
6775 // Gets the event mask for @window. See gdk_window_set_events().
6776 // RETURNS: event mask for @window
6777 EventMask get_events()() nothrow {
6778 return gdk_window_get_events(&this);
6781 // VERSION: 2.22
6782 // Determines whether or not the desktop environment should be hinted that the
6783 // window does not want to receive input focus when it is mapped.
6784 // it is mapped.
6785 // RETURNS: whether or not the window wants to receive input focus when
6786 int get_focus_on_map()() nothrow {
6787 return gdk_window_get_focus_on_map(&this);
6790 // Obtains the bounding box of the window, including window manager
6791 // titlebar/borders if any. The frame position is given in root window
6792 // coordinates. To get the position of the window itself (rather than
6793 // the frame) in root window coordinates, use gdk_window_get_origin().
6794 // <rect>: rectangle to fill with bounding box of the window frame
6795 void get_frame_extents()(Rectangle* rect) nothrow {
6796 gdk_window_get_frame_extents(&this, rect);
6799 // Any of the return location arguments to this function may be %NULL,
6800 // if you aren't interested in getting the value of that field.
6801 // The X and Y coordinates returned are relative to the parent window
6802 // of @window, which for toplevels usually means relative to the
6803 // window decorations (titlebar, etc.) rather than relative to the
6804 // root window (screen-size background window).
6805 // On the X11 platform, the geometry is obtained from the X server,
6806 // so reflects the latest position of @window; this may be out-of-sync
6807 // with the position of @window delivered in the most-recently-processed
6808 // #GdkEventConfigure. gdk_window_get_position() in contrast gets the
6809 // position from the most recent configure event.
6810 // <note>
6811 // If @window is not a toplevel, it is <emphasis>much</emphasis> better
6812 // to call gdk_window_get_position() and gdk_drawable_get_size() instead,
6813 // because it avoids the roundtrip to the X server and because
6814 // gdk_drawable_get_size() supports the full 32-bit coordinate space,
6815 // whereas gdk_window_get_geometry() is restricted to the 16-bit
6816 // coordinates of X11.
6817 // </note>
6818 // <x>: return location for X coordinate of window (relative to its parent)
6819 // <y>: return location for Y coordinate of window (relative to its parent)
6820 // <width>: return location for width of window
6821 // <height>: return location for height of window
6822 // <depth>: return location for bit depth of window
6823 void get_geometry()(int* x, int* y, int* width, int* height, int* depth) nothrow {
6824 gdk_window_get_geometry(&this, x, y, width, height, depth);
6827 // Unintrospectable method: get_group() / gdk_window_get_group()
6828 // VERSION: 2.4
6829 // Returns the group leader window for @window. See gdk_window_set_group().
6830 // RETURNS: the group leader window for @window
6831 Window* get_group()() nothrow {
6832 return gdk_window_get_group(&this);
6835 // VERSION: 2.24
6836 // Returns the height of the given @window.
6837 // On the X11 platform the returned size is the size reported in the
6838 // most-recently-processed configure event, rather than the current
6839 // size on the X server.
6840 // RETURNS: The height of @window
6841 int get_height()() nothrow {
6842 return gdk_window_get_height(&this);
6845 // If you bypass the GDK layer and use windowing system primitives to
6846 // draw directly onto a #GdkWindow, then you need to deal with two
6847 // system coordinates, and GDK may have redirected drawing to a offscreen
6848 // pixmap as the result of a gdk_window_begin_paint_region() calls.
6849 // This function allows retrieving the information you need to compensate
6850 // for these effects.
6851 // This function exposes details of the GDK implementation, and is thus
6852 // likely to change in future releases of GDK.
6853 // <real_drawable>: location to store the drawable to which drawing should be done.
6854 // <x_offset>: location to store the X offset between coordinates in @window, and the underlying window system primitive coordinates for *@real_drawable.
6855 // <y_offset>: location to store the Y offset between coordinates in @window, and the underlying window system primitive coordinates for *@real_drawable.
6856 void get_internal_paint_info()(/*out*/ Drawable** real_drawable, /*out*/ int* x_offset, /*out*/ int* y_offset) nothrow {
6857 gdk_window_get_internal_paint_info(&this, real_drawable, x_offset, y_offset);
6860 // VERSION: 2.22
6861 // Determines whether or not the window manager is hinted that @window
6862 // has modal behaviour.
6863 // RETURNS: whether or not the window has the modal hint set.
6864 int get_modal_hint()() nothrow {
6865 return gdk_window_get_modal_hint(&this);
6868 // Obtains the position of a window in root window coordinates.
6869 // (Compare with gdk_window_get_position() and
6870 // gdk_window_get_geometry() which return the position of a window
6871 // relative to its parent window.)
6872 // RETURNS: not meaningful, ignore
6873 // <x>: return location for X coordinate
6874 // <y>: return location for Y coordinate
6875 int get_origin()(int* x, int* y) nothrow {
6876 return gdk_window_get_origin(&this, x, y);
6879 // Unintrospectable method: get_parent() / gdk_window_get_parent()
6880 // Obtains the parent of @window, as known to GDK. Does not query the
6881 // X server; thus this returns the parent as passed to gdk_window_new(),
6882 // not the actual parent. This should never matter unless you're using
6883 // Xlib calls mixed with GDK calls on the X11 platform. It may also
6884 // matter for toplevel windows, because the window manager may choose
6885 // to reparent them.
6886 // Note that you should use gdk_window_get_effective_parent() when
6887 // writing generic code that walks up a window hierarchy, because
6888 // gdk_window_get_parent() will most likely not do what you expect if
6889 // there are offscreen windows in the hierarchy.
6890 // RETURNS: parent of @window
6891 Window* get_parent()() nothrow {
6892 return gdk_window_get_parent(&this);
6895 // Obtains the current pointer position and modifier state.
6896 // The position is given in coordinates relative to the upper left
6897 // corner of @window.
6898 // gdk_window_at_pointer()), or %NULL if the window containing the
6899 // pointer isn't known to GDK
6900 // RETURNS: the window containing the pointer (as with
6901 // <x>: return location for X coordinate of pointer or %NULL to not return the X coordinate
6902 // <y>: return location for Y coordinate of pointer or %NULL to not return the Y coordinate
6903 // <mask>: return location for modifier mask or %NULL to not return the modifier mask
6904 Window* get_pointer()(/*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) nothrow {
6905 return gdk_window_get_pointer(&this, x, y, mask);
6908 // Obtains the position of the window as reported in the
6909 // most-recently-processed #GdkEventConfigure. Contrast with
6910 // gdk_window_get_geometry() which queries the X server for the
6911 // current window position, regardless of which events have been
6912 // received or processed.
6913 // The position coordinates are relative to the window's parent window.
6914 // <x>: X coordinate of window
6915 // <y>: Y coordinate of window
6916 void get_position()(/*out*/ int* x=null, /*out*/ int* y=null) nothrow {
6917 gdk_window_get_position(&this, x, y);
6920 // VERSION: 2.18
6921 // Obtains the position of a window position in root
6922 // window coordinates. This is similar to
6923 // gdk_window_get_origin() but allows you go pass
6924 // in any position in the window, not just the origin.
6925 // <x>: X coordinate in window
6926 // <y>: Y coordinate in window
6927 // <root_x>: return location for X coordinate
6928 // <root_y>: return location for Y coordinate
6929 void get_root_coords()(int x, int y, /*out*/ int* root_x, /*out*/ int* root_y) nothrow {
6930 gdk_window_get_root_coords(&this, x, y, root_x, root_y);
6933 // Obtains the top-left corner of the window manager frame in root
6934 // window coordinates.
6935 // <x>: return location for X position of window frame
6936 // <y>: return location for Y position of window frame
6937 void get_root_origin()(int* x, int* y) nothrow {
6938 gdk_window_get_root_origin(&this, x, y);
6941 // Unintrospectable method: get_screen() / gdk_window_get_screen()
6942 // Gets the #GdkScreen associated with a #GdkWindow.
6943 // RETURNS: the #GdkScreen associated with @window
6944 Screen* get_screen()() nothrow {
6945 return gdk_window_get_screen(&this);
6948 // Gets the bitwise OR of the currently active window state flags,
6949 // from the #GdkWindowState enumeration.
6950 // RETURNS: window state bitfield
6951 WindowState get_state()() nothrow {
6952 return gdk_window_get_state(&this);
6955 // Unintrospectable method: get_toplevel() / gdk_window_get_toplevel()
6956 // Gets the toplevel window that's an ancestor of @window.
6957 // Any window type but %GDK_WINDOW_CHILD is considered a
6958 // toplevel window, as is a %GDK_WINDOW_CHILD window that
6959 // has a root window as parent.
6960 // Note that you should use gdk_window_get_effective_toplevel() when
6961 // you want to get to a window's toplevel as seen on screen, because
6962 // gdk_window_get_toplevel() will most likely not do what you expect
6963 // if there are offscreen windows in the hierarchy.
6964 // RETURNS: the toplevel window containing @window
6965 Window* get_toplevel()() nothrow {
6966 return gdk_window_get_toplevel(&this);
6969 // VERSION: 2.10
6970 // This function returns the type hint set for a window.
6971 // RETURNS: The type hint set for @window
6972 WindowTypeHint get_type_hint()() nothrow {
6973 return gdk_window_get_type_hint(&this);
6976 // Unintrospectable method: get_update_area() / gdk_window_get_update_area()
6977 // Transfers ownership of the update area from @window to the caller
6978 // of the function. That is, after calling this function, @window will
6979 // no longer have an invalid/dirty region; the update area is removed
6980 // from @window and handed to you. If a window has no update area,
6981 // gdk_window_get_update_area() returns %NULL. You are responsible for
6982 // calling gdk_region_destroy() on the returned region if it's non-%NULL.
6983 // RETURNS: the update area for @window
6984 Region* get_update_area()() nothrow {
6985 return gdk_window_get_update_area(&this);
6988 // Retrieves the user data for @window, which is normally the widget
6989 // that @window belongs to. See gdk_window_set_user_data().
6990 // <data>: return location for user data
6991 void get_user_data()(/*out*/ void** data) nothrow {
6992 gdk_window_get_user_data(&this, data);
6995 // Unintrospectable method: get_visual() / gdk_window_get_visual()
6996 // VERSION: 2.24
6997 // Gets the #GdkVisual describing the pixel format of @window.
6998 // RETURNS: a #GdkVisual
6999 Visual* get_visual()() nothrow {
7000 return gdk_window_get_visual(&this);
7003 // VERSION: 2.24
7004 // Returns the width of the given @window.
7005 // On the X11 platform the returned size is the size reported in the
7006 // most-recently-processed configure event, rather than the current
7007 // size on the X server.
7008 // RETURNS: The width of @window
7009 int get_width()() nothrow {
7010 return gdk_window_get_width(&this);
7013 // Gets the type of the window. See #GdkWindowType.
7014 // RETURNS: type of window
7015 WindowType get_window_type()() nothrow {
7016 return gdk_window_get_window_type(&this);
7019 // VERSION: 2.22
7020 // Checks whether the window has a native window or not. Note that
7021 // you can use gdk_window_ensure_native() if a native window is needed.
7022 // RETURNS: %TRUE if the %window has a native window, %FALSE otherwise.
7023 int has_native()() nothrow {
7024 return gdk_window_has_native(&this);
7027 // For toplevel windows, withdraws them, so they will no longer be
7028 // known to the window manager; for all windows, unmaps them, so
7029 // they won't be displayed. Normally done automatically as
7030 // part of gtk_widget_hide().
7031 void hide()() nothrow {
7032 gdk_window_hide(&this);
7035 // Asks to iconify (minimize) @window. The window manager may choose
7036 // to ignore the request, but normally will honor it. Using
7037 // gtk_window_iconify() is preferred, if you have a #GtkWindow widget.
7038 // This function only makes sense when @window is a toplevel window.
7039 void iconify()() nothrow {
7040 gdk_window_iconify(&this);
7043 // VERSION: 2.10
7044 // Like gdk_window_shape_combine_mask(), but the shape applies
7045 // only to event handling. Mouse events which happen while
7046 // the pointer position corresponds to an unset bit in the
7047 // mask will be passed on the window below @window.
7048 // An input shape is typically used with RGBA windows.
7049 // The alpha channel of the window defines which pixels are
7050 // invisible and allows for nicely antialiased borders,
7051 // and the input shape controls where the window is
7052 // "clickable".
7053 // On the X11 platform, this requires version 1.1 of the
7054 // shape extension.
7055 // On the Win32 platform, this functionality is not present and the
7056 // function does nothing.
7057 // <mask>: shape mask, or %NULL
7058 // <x>: X position of shape mask with respect to @window
7059 // <y>: Y position of shape mask with respect to @window
7060 void input_shape_combine_mask()(Bitmap* mask, int x, int y) nothrow {
7061 gdk_window_input_shape_combine_mask(&this, mask, x, y);
7064 // VERSION: 2.10
7065 // Like gdk_window_shape_combine_region(), but the shape applies
7066 // only to event handling. Mouse events which happen while
7067 // the pointer position corresponds to an unset bit in the
7068 // mask will be passed on the window below @window.
7069 // An input shape is typically used with RGBA windows.
7070 // The alpha channel of the window defines which pixels are
7071 // invisible and allows for nicely antialiased borders,
7072 // and the input shape controls where the window is
7073 // "clickable".
7074 // On the X11 platform, this requires version 1.1 of the
7075 // shape extension.
7076 // On the Win32 platform, this functionality is not present and the
7077 // function does nothing.
7078 // <shape_region>: region of window to be non-transparent
7079 // <offset_x>: X position of @shape_region in @window coordinates
7080 // <offset_y>: Y position of @shape_region in @window coordinates
7081 void input_shape_combine_region()(Region* shape_region, int offset_x, int offset_y) nothrow {
7082 gdk_window_input_shape_combine_region(&this, shape_region, offset_x, offset_y);
7085 // Adds @region to the update area for @window. The update area is the
7086 // region that needs to be redrawn, or "dirty region." The call
7087 // gdk_window_process_updates() sends one or more expose events to the
7088 // window, which together cover the entire update area. An
7089 // application would normally redraw the contents of @window in
7090 // response to those expose events.
7091 // GDK will call gdk_window_process_all_updates() on your behalf
7092 // whenever your program returns to the main loop and becomes idle, so
7093 // normally there's no need to do that manually, you just need to
7094 // invalidate regions that you know should be redrawn.
7095 // The @child_func parameter controls whether the region of
7096 // each child window that intersects @region will also be invalidated.
7097 // Only children for which @child_func returns TRUE will have the area
7098 // invalidated.
7099 // <region>: a #GdkRegion
7100 // <child_func>: function to use to decide if to recurse to a child, %NULL means never recurse.
7101 // <user_data>: data passed to @child_func
7102 void invalidate_maybe_recurse()(Region* region, void** child_func, void* user_data) nothrow {
7103 gdk_window_invalidate_maybe_recurse(&this, region, child_func, user_data);
7106 // A convenience wrapper around gdk_window_invalidate_region() which
7107 // invalidates a rectangular region. See
7108 // gdk_window_invalidate_region() for details.
7109 // <rect>: rectangle to invalidate or %NULL to invalidate the whole window
7110 // <invalidate_children>: whether to also invalidate child windows
7111 void invalidate_rect()(Rectangle* rect, int invalidate_children) nothrow {
7112 gdk_window_invalidate_rect(&this, rect, invalidate_children);
7115 // Adds @region to the update area for @window. The update area is the
7116 // region that needs to be redrawn, or "dirty region." The call
7117 // gdk_window_process_updates() sends one or more expose events to the
7118 // window, which together cover the entire update area. An
7119 // application would normally redraw the contents of @window in
7120 // response to those expose events.
7121 // GDK will call gdk_window_process_all_updates() on your behalf
7122 // whenever your program returns to the main loop and becomes idle, so
7123 // normally there's no need to do that manually, you just need to
7124 // invalidate regions that you know should be redrawn.
7125 // The @invalidate_children parameter controls whether the region of
7126 // each child window that intersects @region will also be invalidated.
7127 // If %FALSE, then the update area for child windows will remain
7128 // unaffected. See gdk_window_invalidate_maybe_recurse if you need
7129 // fine grained control over which children are invalidated.
7130 // <region>: a #GdkRegion
7131 // <invalidate_children>: %TRUE to also invalidate child windows
7132 void invalidate_region()(Region* region, int invalidate_children) nothrow {
7133 gdk_window_invalidate_region(&this, region, invalidate_children);
7136 // VERSION: 2.18
7137 // Check to see if a window is destroyed..
7138 // RETURNS: %TRUE if the window is destroyed
7139 int is_destroyed()() nothrow {
7140 return gdk_window_is_destroyed(&this);
7143 // VERSION: 2.22
7144 // Determines whether or not the window is an input only window.
7145 // RETURNS: %TRUE if @window is input only
7146 int is_input_only()() nothrow {
7147 return gdk_window_is_input_only(&this);
7150 // VERSION: 2.22
7151 // Determines whether or not the window is shaped.
7152 // RETURNS: %TRUE if @window is shaped
7153 int is_shaped()() nothrow {
7154 return gdk_window_is_shaped(&this);
7157 // Check if the window and all ancestors of the window are
7158 // mapped. (This is not necessarily "viewable" in the X sense, since
7159 // we only check as far as we have GDK window parents, not to the root
7160 // window.)
7161 // RETURNS: %TRUE if the window is viewable
7162 int is_viewable()() nothrow {
7163 return gdk_window_is_viewable(&this);
7166 // Checks whether the window has been mapped (with gdk_window_show() or
7167 // gdk_window_show_unraised()).
7168 // RETURNS: %TRUE if the window is mapped
7169 int is_visible()() nothrow {
7170 return gdk_window_is_visible(&this);
7173 // Lowers @window to the bottom of the Z-order (stacking order), so that
7174 // other windows with the same parent window appear above @window.
7175 // This is true whether or not the other windows are visible.
7176 // If @window is a toplevel, the window manager may choose to deny the
7177 // request to move the window in the Z-order, gdk_window_lower() only
7178 // requests the restack, does not guarantee it.
7179 // Note that gdk_window_show() raises the window again, so don't call this
7180 // function before gdk_window_show(). (Try gdk_window_show_unraised().)
7181 void lower()() nothrow {
7182 gdk_window_lower(&this);
7185 // Maximizes the window. If the window was already maximized, then
7186 // this function does nothing.
7187 // On X11, asks the window manager to maximize @window, if the window
7188 // manager supports this operation. Not all window managers support
7189 // this, and some deliberately ignore it or don't have a concept of
7190 // "maximized"; so you can't rely on the maximization actually
7191 // happening. But it will happen with most standard window managers,
7192 // and GDK makes a best effort to get it to happen.
7193 // On Windows, reliably maximizes the window.
7194 void maximize()() nothrow {
7195 gdk_window_maximize(&this);
7198 // VERSION: 2.10
7199 // Merges the input shape masks for any child windows into the
7200 // input shape mask for @window. i.e. the union of all input masks
7201 // for @window and its children will become the new input mask
7202 // for @window. See gdk_window_input_shape_combine_mask().
7203 // This function is distinct from gdk_window_set_child_input_shapes()
7204 // because it includes @window's input shape mask in the set of
7205 // shapes to be merged.
7206 void merge_child_input_shapes()() nothrow {
7207 gdk_window_merge_child_input_shapes(&this);
7210 // Merges the shape masks for any child windows into the
7211 // shape mask for @window. i.e. the union of all masks
7212 // for @window and its children will become the new mask
7213 // for @window. See gdk_window_shape_combine_mask().
7214 // This function is distinct from gdk_window_set_child_shapes()
7215 // because it includes @window's shape mask in the set of shapes to
7216 // be merged.
7217 void merge_child_shapes()() nothrow {
7218 gdk_window_merge_child_shapes(&this);
7221 // Repositions a window relative to its parent window.
7222 // For toplevel windows, window managers may ignore or modify the move;
7223 // you should probably use gtk_window_move() on a #GtkWindow widget
7224 // anyway, instead of using GDK functions. For child windows,
7225 // the move will reliably succeed.
7226 // If you're also planning to resize the window, use gdk_window_move_resize()
7227 // to both move and resize simultaneously, for a nicer visual effect.
7228 // <x>: X coordinate relative to window's parent
7229 // <y>: Y coordinate relative to window's parent
7230 void move()(int x, int y) nothrow {
7231 gdk_window_move(&this, x, y);
7234 // VERSION: 2.8
7235 // Move the part of @window indicated by @region by @dy pixels in the Y
7236 // direction and @dx pixels in the X direction. The portions of @region
7237 // that not covered by the new position of @region are invalidated.
7238 // Child windows are not moved.
7239 // <region>: The #GdkRegion to move
7240 // <dx>: Amount to move in the X direction
7241 // <dy>: Amount to move in the Y direction
7242 void move_region()(Region* region, int dx, int dy) nothrow {
7243 gdk_window_move_region(&this, region, dx, dy);
7246 // Equivalent to calling gdk_window_move() and gdk_window_resize(),
7247 // except that both operations are performed at once, avoiding strange
7248 // visual effects. (i.e. the user may be able to see the window first
7249 // move, then resize, if you don't use gdk_window_move_resize().)
7250 // <x>: new X position relative to window's parent
7251 // <y>: new Y position relative to window's parent
7252 // <width>: new width
7253 // <height>: new height
7254 void move_resize()(int x, int y, int width, int height) nothrow {
7255 gdk_window_move_resize(&this, x, y, width, height);
7258 // Creates a new #GdkWindow using the attributes from
7259 // display, @parent must be specified.
7260 // RETURNS: the new #GdkWindow
7261 // <attributes>: attributes of the new window
7262 // <attributes_mask>: mask indicating which fields in @attributes are valid
7263 Window* new_()(WindowAttr* attributes, int attributes_mask) nothrow {
7264 return gdk_window_new(&this, attributes, attributes_mask);
7267 // Like gdk_window_get_children(), but does not copy the list of
7268 // children, so the list does not need to be freed.
7269 // a reference to the list of child windows in @window
7270 GLib2.List* peek_children()() nothrow {
7271 return gdk_window_peek_children(&this);
7274 // Sends one or more expose events to @window. The areas in each
7275 // expose event will cover the entire update area for the window (see
7276 // gdk_window_invalidate_region() for details). Normally GDK calls
7277 // gdk_window_process_all_updates() on your behalf, so there's no
7278 // need to call this function unless you want to force expose events
7279 // to be delivered immediately and synchronously (vs. the usual
7280 // case, where GDK delivers them in an idle handler). Occasionally
7281 // this is useful to produce nicer scrolling behavior, for example.
7282 // <update_children>: whether to also process updates for child windows
7283 void process_updates()(int update_children) nothrow {
7284 gdk_window_process_updates(&this, update_children);
7287 // Raises @window to the top of the Z-order (stacking order), so that
7288 // other windows with the same parent window appear below @window.
7289 // This is true whether or not the windows are visible.
7290 // If @window is a toplevel, the window manager may choose to deny the
7291 // request to move the window in the Z-order, gdk_window_raise() only
7292 // requests the restack, does not guarantee it.
7293 void raise()() nothrow {
7294 gdk_window_raise(&this);
7297 // VERSION: 2.14
7298 // Redirects drawing into @window so that drawing to the
7299 // window in the rectangle specified by @src_x, @src_y,
7300 // Only drawing between gdk_window_begin_paint_region() or
7301 // gdk_window_begin_paint_rect() and gdk_window_end_paint() is
7302 // redirected.
7303 // Redirection is active until gdk_window_remove_redirection()
7304 // is called.
7305 // <drawable>: a #GdkDrawable
7306 // <src_x>: x position in @window
7307 // <src_y>: y position in @window
7308 // <dest_x>: x position in @drawable
7309 // <dest_y>: y position in @drawable
7310 // <width>: width of redirection, or -1 to use the width of @window
7311 // <height>: height of redirection or -1 to use the height of @window
7312 void redirect_to_drawable()(Drawable* drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height) nothrow {
7313 gdk_window_redirect_to_drawable(&this, drawable, src_x, src_y, dest_x, dest_y, width, height);
7315 void register_dnd()() nothrow {
7316 gdk_window_register_dnd(&this);
7319 // Unintrospectable method: remove_filter() / gdk_window_remove_filter()
7320 // Remove a filter previously added with gdk_window_add_filter().
7321 // <function>: previously-added filter function
7322 // <data>: user data for previously-added filter function
7323 void remove_filter()(FilterFunc function_, void* data) nothrow {
7324 gdk_window_remove_filter(&this, function_, data);
7327 // VERSION: 2.14
7328 // Removes any active redirection started by
7329 // gdk_window_redirect_to_drawable().
7330 void remove_redirection()() nothrow {
7331 gdk_window_remove_redirection(&this);
7334 // Reparents @window into the given @new_parent. The window being
7335 // reparented will be unmapped as a side effect.
7336 // <new_parent>: new parent to move @window into
7337 // <x>: X location inside the new parent
7338 // <y>: Y location inside the new parent
7339 void reparent()(Window* new_parent, int x, int y) nothrow {
7340 gdk_window_reparent(&this, new_parent, x, y);
7343 // Resizes @window; for toplevel windows, asks the window manager to resize
7344 // the window. The window manager may not allow the resize. When using GTK+,
7345 // use gtk_window_resize() instead of this low-level GDK function.
7346 // Windows may not be resized below 1x1.
7347 // If you're also planning to move the window, use gdk_window_move_resize()
7348 // to both move and resize simultaneously, for a nicer visual effect.
7349 // <width>: new width of the window
7350 // <height>: new height of the window
7351 void resize()(int width, int height) nothrow {
7352 gdk_window_resize(&this, width, height);
7355 // VERSION: 2.18
7356 // Changes the position of @window in the Z-order (stacking order), so that
7357 // it is above @sibling (if @above is %TRUE) or below @sibling (if @above is
7358 // %FALSE).
7359 // If @sibling is %NULL, then this either raises (if @above is %TRUE) or
7360 // lowers the window.
7361 // If @window is a toplevel, the window manager may choose to deny the
7362 // request to move the window in the Z-order, gdk_window_restack() only
7363 // requests the restack, does not guarantee it.
7364 // <sibling>: a #GdkWindow that is a sibling of @window, or %NULL
7365 // <above>: a boolean
7366 void restack()(Window* sibling, int above) nothrow {
7367 gdk_window_restack(&this, sibling, above);
7370 // Scroll the contents of @window, both pixels and children, by the
7371 // given amount. @window itself does not move. Portions of the window
7372 // that the scroll operation brings in from offscreen areas are
7373 // invalidated. The invalidated region may be bigger than what would
7374 // strictly be necessary.
7375 // For X11, a minimum area will be invalidated if the window has no
7376 // subwindows, or if the edges of the window's parent do not extend
7377 // beyond the edges of the window. In other cases, a multi-step process
7378 // is used to scroll the window which may produce temporary visual
7379 // artifacts and unnecessary invalidations.
7380 // <dx>: Amount to scroll in the X direction
7381 // <dy>: Amount to scroll in the Y direction
7382 void scroll()(int dx, int dy) nothrow {
7383 gdk_window_scroll(&this, dx, dy);
7386 // VERSION: 2.4
7387 // Setting @accept_focus to %FALSE hints the desktop environment that the
7388 // window doesn't want to receive input focus.
7389 // On X, it is the responsibility of the window manager to interpret this
7390 // hint. ICCCM-compliant window manager usually respect it.
7391 // <accept_focus>: %TRUE if the window should receive input focus
7392 void set_accept_focus()(int accept_focus) nothrow {
7393 gdk_window_set_accept_focus(&this, accept_focus);
7396 // Sets the background pixmap of @window. May also be used to set a
7397 // background of "None" on @window, by setting a background pixmap
7398 // of %NULL.
7399 // A background pixmap will be tiled, positioning the first tile at
7400 // the origin of @window, or if @parent_relative is %TRUE, the tiling
7401 // will be done based on the origin of the parent window (useful to
7402 // align tiles in a parent with tiles in a child).
7403 // A background pixmap of %NULL means that the window will have no
7404 // background. A window with no background will never have its
7405 // background filled by the windowing system, instead the window will
7406 // contain whatever pixels were already in the corresponding area of
7407 // the display.
7408 // The windowing system will normally fill a window with its background
7409 // when the window is obscured then exposed, and when you call
7410 // gdk_window_clear().
7411 // <pixmap>: a #GdkPixmap, or %NULL
7412 // <parent_relative>: whether the tiling origin is at the origin of
7413 void set_back_pixmap()(Pixmap* pixmap, int parent_relative) nothrow {
7414 gdk_window_set_back_pixmap(&this, pixmap, parent_relative);
7417 // Sets the background color of @window. (However, when using GTK+,
7418 // set the background of a widget with gtk_widget_modify_bg() - if
7419 // you're an application - or gtk_style_set_background() - if you're
7420 // implementing a custom widget.)
7421 // The @color must be allocated; gdk_rgb_find_color() is the best way
7422 // to allocate a color.
7423 // See also gdk_window_set_back_pixmap().
7424 // <color>: an allocated #GdkColor
7425 void set_background()(Color* color) nothrow {
7426 gdk_window_set_background(&this, color);
7429 // VERSION: 2.10
7430 // Sets the input shape mask of @window to the union of input shape masks
7431 // for all children of @window, ignoring the input shape mask of @window
7432 // itself. Contrast with gdk_window_merge_child_input_shapes() which includes
7433 // the input shape mask of @window in the masks to be merged.
7434 void set_child_input_shapes()() nothrow {
7435 gdk_window_set_child_input_shapes(&this);
7438 // Sets the shape mask of @window to the union of shape masks
7439 // for all children of @window, ignoring the shape mask of @window
7440 // itself. Contrast with gdk_window_merge_child_shapes() which includes
7441 // the shape mask of @window in the masks to be merged.
7442 void set_child_shapes()() nothrow {
7443 gdk_window_set_child_shapes(&this);
7446 // VERSION: 2.12
7447 // Sets a #GdkWindow as composited, or unsets it. Composited
7448 // windows do not automatically have their contents drawn to
7449 // the screen. Drawing is redirected to an offscreen buffer
7450 // and an expose event is emitted on the parent of the composited
7451 // window. It is the responsibility of the parent's expose handler
7452 // to manually merge the off-screen content onto the screen in
7453 // whatever way it sees fit. See <xref linkend="composited-window-example"/>
7454 // for an example.
7455 // It only makes sense for child windows to be composited; see
7456 // gdk_window_set_opacity() if you need translucent toplevel
7457 // windows.
7458 // An additional effect of this call is that the area of this
7459 // window is no longer clipped from regions marked for
7460 // invalidation on its parent. Draws done on the parent
7461 // window are also no longer clipped by the child.
7462 // This call is only supported on some systems (currently,
7463 // only X11 with new enough Xcomposite and Xdamage extensions).
7464 // You must call gdk_display_supports_composite() to check if
7465 // setting a window as composited is supported before
7466 // attempting to do so.
7467 // <composited>: %TRUE to set the window as composited
7468 void set_composited()(int composited) nothrow {
7469 gdk_window_set_composited(&this, composited);
7472 // Sets the mouse pointer for a #GdkWindow. Use gdk_cursor_new_for_display()
7473 // or gdk_cursor_new_from_pixmap() to create the cursor. To make the cursor
7474 // invisible, use %GDK_BLANK_CURSOR. Passing %NULL for the @cursor argument
7475 // to gdk_window_set_cursor() means that @window will use the cursor of its
7476 // parent window. Most windows should use this default.
7477 // <cursor>: a cursor
7478 void set_cursor()(Cursor* cursor=null) nothrow {
7479 gdk_window_set_cursor(&this, cursor);
7482 // "Decorations" are the features the window manager adds to a toplevel #GdkWindow.
7483 // This function sets the traditional Motif window manager hints that tell the
7484 // window manager which decorations you would like your window to have.
7485 // Usually you should use gtk_window_set_decorated() on a #GtkWindow instead of
7486 // using the GDK function directly.
7487 // The @decorations argument is the logical OR of the fields in
7488 // the #GdkWMDecoration enumeration. If #GDK_DECOR_ALL is included in the
7489 // mask, the other bits indicate which decorations should be turned off.
7490 // If #GDK_DECOR_ALL is not included, then the other bits indicate
7491 // which decorations should be turned on.
7492 // Most window managers honor a decorations hint of 0 to disable all decorations,
7493 // but very few honor all possible combinations of bits.
7494 // <decorations>: decoration hint mask
7495 void set_decorations()(WMDecoration decorations) nothrow {
7496 gdk_window_set_decorations(&this, decorations);
7499 // The event mask for a window determines which events will be reported
7500 // for that window. For example, an event mask including #GDK_BUTTON_PRESS_MASK
7501 // means the window should report button press events. The event mask
7502 // is the bitwise OR of values from the #GdkEventMask enumeration.
7503 // <event_mask>: event mask for @window
7504 void set_events()(EventMask event_mask) nothrow {
7505 gdk_window_set_events(&this, event_mask);
7508 // VERSION: 2.6
7509 // Setting @focus_on_map to %FALSE hints the desktop environment that the
7510 // window doesn't want to receive input focus when it is mapped.
7511 // focus_on_map should be turned off for windows that aren't triggered
7512 // interactively (such as popups from network activity).
7513 // On X, it is the responsibility of the window manager to interpret
7514 // this hint. Window managers following the freedesktop.org window
7515 // manager extension specification should respect it.
7516 // <focus_on_map>: %TRUE if the window should receive input focus when mapped
7517 void set_focus_on_map()(int focus_on_map) nothrow {
7518 gdk_window_set_focus_on_map(&this, focus_on_map);
7521 // Sets hints about the window management functions to make available
7522 // via buttons on the window frame.
7523 // On the X backend, this function sets the traditional Motif window
7524 // manager hint for this purpose. However, few window managers do
7525 // anything reliable or interesting with this hint. Many ignore it
7526 // entirely.
7527 // The @functions argument is the logical OR of values from the
7528 // #GdkWMFunction enumeration. If the bitmask includes #GDK_FUNC_ALL,
7529 // then the other bits indicate which functions to disable; if
7530 // it doesn't include #GDK_FUNC_ALL, it indicates which functions to
7531 // enable.
7532 // <functions>: bitmask of operations to allow on @window
7533 void set_functions()(WMFunction functions) nothrow {
7534 gdk_window_set_functions(&this, functions);
7537 // Sets the geometry hints for @window. Hints flagged in @geom_mask
7538 // are set, hints not flagged in @geom_mask are unset.
7539 // To unset all hints, use a @geom_mask of 0 and a @geometry of %NULL.
7540 // This function provides hints to the windowing system about
7541 // acceptable sizes for a toplevel window. The purpose of
7542 // this is to constrain user resizing, but the windowing system
7543 // will typically (but is not required to) also constrain the
7544 // current size of the window to the provided values and
7545 // constrain programatic resizing via gdk_window_resize() or
7546 // gdk_window_move_resize().
7547 // Note that on X11, this effect has no effect on windows
7548 // of type %GDK_WINDOW_TEMP or windows where override redirect
7549 // has been turned on via gdk_window_set_override_redirect()
7550 // since these windows are not resizable by the user.
7551 // Since you can't count on the windowing system doing the
7552 // constraints for programmatic resizes, you should generally
7553 // call gdk_window_constrain_size() yourself to determine
7554 // appropriate sizes.
7555 // <geometry>: geometry hints
7556 // <geom_mask>: bitmask indicating fields of @geometry to pay attention to
7557 void set_geometry_hints()(Geometry* geometry, WindowHints geom_mask) nothrow {
7558 gdk_window_set_geometry_hints(&this, geometry, geom_mask);
7561 // Sets the group leader window for @window. By default,
7562 // GDK sets the group leader for all toplevel windows
7563 // to a global window implicitly created by GDK. With this function
7564 // you can override this default.
7565 // The group leader window allows the window manager to distinguish
7566 // all windows that belong to a single application. It may for example
7567 // allow users to minimize/unminimize all windows belonging to an
7568 // application at once. You should only set a non-default group window
7569 // if your application pretends to be multiple applications.
7570 // <leader>: group leader window, or %NULL to restore the default group leader window
7571 void set_group()(Window* leader) nothrow {
7572 gdk_window_set_group(&this, leader);
7575 // This function is broken and useless and you should ignore it.
7576 // If using GTK+, use functions such as gtk_window_resize(), gtk_window_set_size_request(),
7577 // gtk_window_move(), gtk_window_parse_geometry(), and gtk_window_set_geometry_hints(),
7578 // depending on what you're trying to do.
7579 // If using GDK directly, use gdk_window_set_geometry_hints().
7580 // <x>: ignored field, does not matter
7581 // <y>: ignored field, does not matter
7582 // <min_width>: minimum width hint
7583 // <min_height>: minimum height hint
7584 // <max_width>: max width hint
7585 // <max_height>: max height hint
7586 // <flags>: logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE
7587 void set_hints()(int x, int y, int min_width, int min_height, int max_width, int max_height, int flags) nothrow {
7588 gdk_window_set_hints(&this, x, y, min_width, min_height, max_width, max_height, flags);
7591 // Sets the icon of @window as a pixmap or window. If using GTK+, investigate
7592 // gtk_window_set_default_icon_list() first, and then gtk_window_set_icon_list()
7593 // and gtk_window_set_icon(). If those don't meet your needs, look at
7594 // gdk_window_set_icon_list(). Only if all those are too high-level do you
7595 // want to fall back to gdk_window_set_icon().
7596 // <icon_window>: a #GdkWindow to use for the icon, or %NULL to unset
7597 // <pixmap>: a #GdkPixmap to use as the icon, or %NULL to unset
7598 // <mask>: a 1-bit pixmap (#GdkBitmap) to use as mask for @pixmap, or %NULL to have none
7599 void set_icon()(Window* icon_window, Pixmap* pixmap, Bitmap* mask) nothrow {
7600 gdk_window_set_icon(&this, icon_window, pixmap, mask);
7603 // Sets a list of icons for the window. One of these will be used
7604 // to represent the window when it has been iconified. The icon is
7605 // usually shown in an icon box or some sort of task bar. Which icon
7606 // size is shown depends on the window manager. The window manager
7607 // can scale the icon but setting several size icons can give better
7608 // image quality since the window manager may only need to scale the
7609 // icon by a small amount or not at all.
7610 // <pixbufs>: A list of pixbufs, of different sizes.
7611 void set_icon_list()(GLib2.List* pixbufs) nothrow {
7612 gdk_window_set_icon_list(&this, pixbufs);
7615 // Windows may have a name used while minimized, distinct from the
7616 // name they display in their titlebar. Most of the time this is a bad
7617 // idea from a user interface standpoint. But you can set such a name
7618 // with this function, if you like.
7619 // After calling this with a non-%NULL @name, calls to gdk_window_set_title()
7620 // will not update the icon title.
7621 // Using %NULL for @name unsets the icon title; further calls to
7622 // gdk_window_set_title() will again update the icon title as well.
7623 // <name>: name of window while iconified (minimized)
7624 void set_icon_name()(char* name) nothrow {
7625 gdk_window_set_icon_name(&this, name);
7628 // VERSION: 2.4
7629 // Set if @window must be kept above other windows. If the
7630 // window was already above, then this function does nothing.
7631 // On X11, asks the window manager to keep @window above, if the window
7632 // manager supports this operation. Not all window managers support
7633 // this, and some deliberately ignore it or don't have a concept of
7634 // "keep above"; so you can't rely on the window being kept above.
7635 // But it will happen with most standard window managers,
7636 // and GDK makes a best effort to get it to happen.
7637 // <setting>: whether to keep @window above other windows
7638 void set_keep_above()(int setting) nothrow {
7639 gdk_window_set_keep_above(&this, setting);
7642 // VERSION: 2.4
7643 // Set if @window must be kept below other windows. If the
7644 // window was already below, then this function does nothing.
7645 // On X11, asks the window manager to keep @window below, if the window
7646 // manager supports this operation. Not all window managers support
7647 // this, and some deliberately ignore it or don't have a concept of
7648 // "keep below"; so you can't rely on the window being kept below.
7649 // But it will happen with most standard window managers,
7650 // and GDK makes a best effort to get it to happen.
7651 // <setting>: whether to keep @window below other windows
7652 void set_keep_below()(int setting) nothrow {
7653 gdk_window_set_keep_below(&this, setting);
7656 // The application can use this hint to tell the window manager
7657 // that a certain window has modal behaviour. The window manager
7658 // can use this information to handle modal windows in a special
7659 // way.
7660 // You should only use this on windows for which you have
7661 // previously called gdk_window_set_transient_for()
7662 // <modal>: %TRUE if the window is modal, %FALSE otherwise.
7663 void set_modal_hint()(int modal) nothrow {
7664 gdk_window_set_modal_hint(&this, modal);
7667 // VERSION: 2.12
7668 // Request the windowing system to make @window partially transparent,
7669 // with opacity 0 being fully transparent and 1 fully opaque. (Values
7670 // of the opacity parameter are clamped to the [0,1] range.)
7671 // On X11, this works only on X screens with a compositing manager
7672 // running.
7673 // For setting up per-pixel alpha, see gdk_screen_get_rgba_colormap().
7674 // For making non-toplevel windows translucent, see
7675 // gdk_window_set_composited().
7676 // <opacity>: opacity
7677 void set_opacity()(double opacity) nothrow {
7678 gdk_window_set_opacity(&this, opacity);
7681 // An override redirect window is not under the control of the window manager.
7682 // This means it won't have a titlebar, won't be minimizable, etc. - it will
7683 // be entirely under the control of the application. The window manager
7684 // can't see the override redirect window at all.
7685 // Override redirect should only be used for short-lived temporary
7686 // windows, such as popup menus. #GtkMenu uses an override redirect
7687 // window in its implementation, for example.
7688 // <override_redirect>: %TRUE if window should be override redirect
7689 void set_override_redirect()(int override_redirect) nothrow {
7690 gdk_window_set_override_redirect(&this, override_redirect);
7693 // When using GTK+, typically you should use gtk_window_set_role() instead
7694 // of this low-level function.
7695 // The window manager and session manager use a window's role to
7696 // distinguish it from other kinds of window in the same application.
7697 // When an application is restarted after being saved in a previous
7698 // session, all windows with the same title and role are treated as
7699 // interchangeable. So if you have two windows with the same title
7700 // that should be distinguished for session management purposes, you
7701 // should set the role on those windows. It doesn't matter what string
7702 // you use for the role, as long as you have a different role for each
7703 // non-interchangeable kind of window.
7704 // <role>: a string indicating its role
7705 void set_role()(char* role) nothrow {
7706 gdk_window_set_role(&this, role);
7709 // VERSION: 2.2
7710 // Toggles whether a window should appear in a pager (workspace
7711 // switcher, or other desktop utility program that displays a small
7712 // thumbnail representation of the windows on the desktop). If a
7713 // window's semantic type as specified with gdk_window_set_type_hint()
7714 // already fully describes the window, this function should
7715 // <emphasis>not</emphasis> be called in addition, instead you should
7716 // allow the window to be treated according to standard policy for
7717 // its semantic type.
7718 // <skips_pager>: %TRUE to skip the pager
7719 void set_skip_pager_hint()(int skips_pager) nothrow {
7720 gdk_window_set_skip_pager_hint(&this, skips_pager);
7723 // VERSION: 2.2
7724 // Toggles whether a window should appear in a task list or window
7725 // list. If a window's semantic type as specified with
7726 // gdk_window_set_type_hint() already fully describes the window, this
7727 // function should <emphasis>not</emphasis> be called in addition,
7728 // instead you should allow the window to be treated according to
7729 // standard policy for its semantic type.
7730 // <skips_taskbar>: %TRUE to skip the taskbar
7731 void set_skip_taskbar_hint()(int skips_taskbar) nothrow {
7732 gdk_window_set_skip_taskbar_hint(&this, skips_taskbar);
7735 // VERSION: 2.12
7736 // When using GTK+, typically you should use gtk_window_set_startup_id()
7737 // instead of this low-level function.
7738 // <startup_id>: a string with startup-notification identifier
7739 void set_startup_id()(char* startup_id) nothrow {
7740 gdk_window_set_startup_id(&this, startup_id);
7743 // Set the bit gravity of the given window to static, and flag it so
7744 // all children get static subwindow gravity. This is used if you are
7745 // implementing scary features that involve deep knowledge of the
7746 // windowing system. Don't worry about it unless you have to.
7747 // RETURNS: %TRUE if the server supports static gravity
7748 // <use_static>: %TRUE to turn on static gravity
7749 int set_static_gravities()(int use_static) nothrow {
7750 return gdk_window_set_static_gravities(&this, use_static);
7753 // Sets the title of a toplevel window, to be displayed in the titlebar.
7754 // If you haven't explicitly set the icon name for the window
7755 // (using gdk_window_set_icon_name()), the icon name will be set to
7756 // user-readable strings in GDK/GTK+). @title may not be %NULL.
7757 // <title>: title of @window
7758 void set_title()(char* title) nothrow {
7759 gdk_window_set_title(&this, title);
7762 // Indicates to the window manager that @window is a transient dialog
7763 // associated with the application window @parent. This allows the
7764 // window manager to do things like center @window on @parent and
7765 // keep @window above @parent.
7766 // See gtk_window_set_transient_for() if you're using #GtkWindow or
7767 // #GtkDialog.
7768 // <parent>: another toplevel #GdkWindow
7769 void set_transient_for()(Window* parent) nothrow {
7770 gdk_window_set_transient_for(&this, parent);
7773 // The application can use this call to provide a hint to the window
7774 // manager about the functionality of a window. The window manager
7775 // can use this information when determining the decoration and behaviour
7776 // of the window.
7777 // The hint must be set before the window is mapped.
7778 // <hint>: A hint of the function this window will have
7779 void set_type_hint()(WindowTypeHint hint) nothrow {
7780 gdk_window_set_type_hint(&this, hint);
7783 // VERSION: 2.8
7784 // Toggles whether a window needs the user's
7785 // urgent attention.
7786 // <urgent>: %TRUE if the window is urgent
7787 void set_urgency_hint()(int urgent) nothrow {
7788 gdk_window_set_urgency_hint(&this, urgent);
7791 // For most purposes this function is deprecated in favor of
7792 // g_object_set_data(). However, for historical reasons GTK+ stores
7793 // the #GtkWidget that owns a #GdkWindow as user data on the
7794 // #GdkWindow. So, custom widget implementations should use
7795 // this function for that. If GTK+ receives an event for a #GdkWindow,
7796 // and the user data for the window is non-%NULL, GTK+ will assume the
7797 // user data is a #GtkWidget, and forward the event to that widget.
7798 // <user_data>: user data
7799 void set_user_data()(void* user_data) nothrow {
7800 gdk_window_set_user_data(&this, user_data);
7803 // Applies a shape mask to @window. Pixels in @window corresponding to
7804 // set bits in the @mask will be visible; pixels in @window
7805 // corresponding to unset bits in the @mask will be transparent. This
7806 // gives a non-rectangular window.
7807 // If @mask is %NULL, the shape mask will be unset, and the @x/@y
7808 // parameters are not used.
7809 // On the X11 platform, this uses an X server extension which is
7810 // widely available on most common platforms, but not available on
7811 // very old X servers, and occasionally the implementation will be
7812 // buggy. On servers without the shape extension, this function
7813 // will do nothing.
7814 // This function works on both toplevel and child windows.
7815 // <mask>: shape mask
7816 // <x>: X position of shape mask with respect to @window
7817 // <y>: Y position of shape mask with respect to @window
7818 void shape_combine_mask()(Bitmap* mask, int x, int y) nothrow {
7819 gdk_window_shape_combine_mask(&this, mask, x, y);
7822 // Makes pixels in @window outside @shape_region be transparent,
7823 // so that the window may be nonrectangular. See also
7824 // gdk_window_shape_combine_mask() to use a bitmap as the mask.
7825 // If @shape_region is %NULL, the shape will be unset, so the whole
7826 // window will be opaque again. @offset_x and @offset_y are ignored
7827 // if @shape_region is %NULL.
7828 // On the X11 platform, this uses an X server extension which is
7829 // widely available on most common platforms, but not available on
7830 // very old X servers, and occasionally the implementation will be
7831 // buggy. On servers without the shape extension, this function
7832 // will do nothing.
7833 // This function works on both toplevel and child windows.
7834 // <shape_region>: region of window to be non-transparent
7835 // <offset_x>: X position of @shape_region in @window coordinates
7836 // <offset_y>: Y position of @shape_region in @window coordinates
7837 void shape_combine_region()(Region* shape_region, int offset_x, int offset_y) nothrow {
7838 gdk_window_shape_combine_region(&this, shape_region, offset_x, offset_y);
7841 // Like gdk_window_show_unraised(), but also raises the window to the
7842 // top of the window stack (moves the window to the front of the
7843 // Z-order).
7844 // This function maps a window so it's visible onscreen. Its opposite
7845 // is gdk_window_hide().
7846 // When implementing a #GtkWidget, you should call this function on the widget's
7847 // #GdkWindow as part of the "map" method.
7848 void show()() nothrow {
7849 gdk_window_show(&this);
7852 // Shows a #GdkWindow onscreen, but does not modify its stacking
7853 // order. In contrast, gdk_window_show() will raise the window
7854 // to the top of the window stack.
7855 // On the X11 platform, in Xlib terms, this function calls
7856 // XMapWindow() (it also updates some internal GDK state, which means
7857 // that you can't really use XMapWindow() directly on a GDK window).
7858 void show_unraised()() nothrow {
7859 gdk_window_show_unraised(&this);
7862 // "Pins" a window such that it's on all workspaces and does not scroll
7863 // with viewports, for window managers that have scrollable viewports.
7864 // (When using #GtkWindow, gtk_window_stick() may be more useful.)
7865 // On the X11 platform, this function depends on window manager
7866 // support, so may have no effect with many window managers. However,
7867 // GDK will do the best it can to convince the window manager to stick
7868 // the window. For window managers that don't support this operation,
7869 // there's nothing you can do to force it to happen.
7870 void stick()() nothrow {
7871 gdk_window_stick(&this);
7874 // Thaws a window frozen with
7875 // gdk_window_freeze_toplevel_updates_libgtk_only().
7876 // This function is not part of the GDK public API and is only
7877 // for use by GTK+.
7878 void thaw_toplevel_updates_libgtk_only()() nothrow {
7879 gdk_window_thaw_toplevel_updates_libgtk_only(&this);
7881 // Thaws a window frozen with gdk_window_freeze_updates().
7882 void thaw_updates()() nothrow {
7883 gdk_window_thaw_updates(&this);
7886 // VERSION: 2.2
7887 // Moves the window out of fullscreen mode. If the window was not
7888 // fullscreen, does nothing.
7889 // On X11, asks the window manager to move @window out of the fullscreen
7890 // state, if the window manager supports this operation. Not all
7891 // window managers support this, and some deliberately ignore it or
7892 // don't have a concept of "fullscreen"; so you can't rely on the
7893 // unfullscreenification actually happening. But it will happen with
7894 // most standard window managers, and GDK makes a best effort to get
7895 // it to happen.
7896 void unfullscreen()() nothrow {
7897 gdk_window_unfullscreen(&this);
7900 // Unmaximizes the window. If the window wasn't maximized, then this
7901 // function does nothing.
7902 // On X11, asks the window manager to unmaximize @window, if the
7903 // window manager supports this operation. Not all window managers
7904 // support this, and some deliberately ignore it or don't have a
7905 // concept of "maximized"; so you can't rely on the unmaximization
7906 // actually happening. But it will happen with most standard window
7907 // managers, and GDK makes a best effort to get it to happen.
7908 // On Windows, reliably unmaximizes the window.
7909 void unmaximize()() nothrow {
7910 gdk_window_unmaximize(&this);
7913 // Reverse operation for gdk_window_stick(); see gdk_window_stick(),
7914 // and gtk_window_unstick().
7915 void unstick()() nothrow {
7916 gdk_window_unstick(&this);
7919 // Withdraws a window (unmaps it and asks the window manager to forget about it).
7920 // This function is not really useful as gdk_window_hide() automatically
7921 // withdraws toplevel windows before hiding them.
7922 void withdraw()() nothrow {
7923 gdk_window_withdraw(&this);
7926 // VERSION: 2.18
7927 // The ::from-embedder signal is emitted to translate coordinates
7928 // in the embedder of an offscreen window to the offscreen window.
7929 // See also #GtkWindow::to-embedder.
7930 // <embedder-x>: x coordinate in the embedder window
7931 // <embedder-y>: y coordinate in the embedder window
7932 // <offscreen-x>: return location for the x coordinate in the offscreen window
7933 // <offscreen-y>: return location for the y coordinate in the offscreen window
7934 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) nothrow signal_from_embedder;
7936 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7937 return super_.signal_connect!name(cb, data, cf);
7940 ulong signal_connect(string name:"from-embedder", CB:signal_from_embedder)
7941 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7942 if (is(typeof(cb)==signal_from_embedder)||_ttmm!(CB, signal_from_embedder)()) {
7943 return signal_connect_data!()(&this, cast(char*)"from-embedder",
7944 cast(GObject2.Callback)cb, data, null, cf);
7947 // VERSION: 2.18
7948 // The ::pick-embedded-child signal is emitted to find an embedded
7949 // child at the given position.
7950 // RETURNS: the #GdkWindow of the embedded child at
7951 // <x>: x coordinate in the window
7952 // <y>: y coordinate in the window
7953 extern (C) alias static Window* function (Window* this_, double x, double y, void* user_data=null) nothrow signal_pick_embedded_child;
7954 ulong signal_connect(string name:"pick-embedded-child", CB:signal_pick_embedded_child)
7955 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7956 if (is(typeof(cb)==signal_pick_embedded_child)||_ttmm!(CB, signal_pick_embedded_child)()) {
7957 return signal_connect_data!()(&this, cast(char*)"pick-embedded-child",
7958 cast(GObject2.Callback)cb, data, null, cf);
7961 // VERSION: 2.18
7962 // The ::to-embedder signal is emitted to translate coordinates
7963 // in an offscreen window to its embedder.
7964 // See also #GtkWindow::from-embedder.
7965 // <offscreen-x>: x coordinate in the offscreen window
7966 // <offscreen-y>: y coordinate in the offscreen window
7967 // <embedder-x>: return location for the x coordinate in the embedder window
7968 // <embedder-y>: return location for the y coordinate in the embedder window
7969 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) nothrow signal_to_embedder;
7970 ulong signal_connect(string name:"to-embedder", CB:signal_to_embedder)
7971 (CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0)
7972 if (is(typeof(cb)==signal_to_embedder)||_ttmm!(CB, signal_to_embedder)()) {
7973 return signal_connect_data!()(&this, cast(char*)"to-embedder",
7974 cast(GObject2.Callback)cb, data, null, cf);
7978 struct WindowAttr {
7979 char* title;
7980 int event_mask, x, y, width, height;
7981 WindowClass wclass;
7982 Visual* visual;
7983 Colormap* colormap;
7984 WindowType window_type;
7985 Cursor* cursor;
7986 char* wmclass_name, wmclass_class;
7987 int override_redirect;
7988 WindowTypeHint type_hint;
7991 enum WindowAttributesType {
7992 TITLE = 2,
7993 X = 4,
7994 Y = 8,
7995 CURSOR = 16,
7996 COLORMAP = 32,
7997 VISUAL = 64,
7998 WMCLASS = 128,
7999 NOREDIR = 256,
8000 TYPE_HINT = 512
8002 enum WindowClass {
8003 OUTPUT = 0,
8004 ONLY = 1
8006 enum WindowEdge {
8007 NORTH_WEST = 0,
8008 NORTH = 1,
8009 NORTH_EAST = 2,
8010 WEST = 3,
8011 EAST = 4,
8012 SOUTH_WEST = 5,
8013 SOUTH = 6,
8014 SOUTH_EAST = 7
8016 enum WindowHints {
8017 POS = 1,
8018 MIN_SIZE = 2,
8019 MAX_SIZE = 4,
8020 BASE_SIZE = 8,
8021 ASPECT = 16,
8022 RESIZE_INC = 32,
8023 WIN_GRAVITY = 64,
8024 USER_POS = 128,
8025 USER_SIZE = 256
8027 struct WindowObject {
8030 struct WindowObjectClass {
8031 DrawableClass parent_class;
8034 struct WindowRedirect {
8037 enum WindowState {
8038 WITHDRAWN = 1,
8039 ICONIFIED = 2,
8040 MAXIMIZED = 4,
8041 STICKY = 8,
8042 FULLSCREEN = 16,
8043 ABOVE = 32,
8044 BELOW = 64
8046 enum WindowType {
8047 ROOT = 0,
8048 TOPLEVEL = 1,
8049 CHILD = 2,
8050 DIALOG = 3,
8051 TEMP = 4,
8052 FOREIGN = 5,
8053 OFFSCREEN = 6
8055 enum WindowTypeHint {
8056 NORMAL = 0,
8057 DIALOG = 1,
8058 MENU = 2,
8059 TOOLBAR = 3,
8060 SPLASHSCREEN = 4,
8061 UTILITY = 5,
8062 DOCK = 6,
8063 DESKTOP = 7,
8064 DROPDOWN_MENU = 8,
8065 POPUP_MENU = 9,
8066 TOOLTIP = 10,
8067 NOTIFICATION = 11,
8068 COMBO = 12,
8069 DND = 13
8071 // Unintrospectable function: add_client_message_filter() / gdk_add_client_message_filter()
8072 static void add_client_message_filter()(Atom message_type, FilterFunc func, void* data) nothrow {
8073 gdk_add_client_message_filter(message_type, func, data);
8077 // Appends gdk option entries to the passed in option group. This is
8078 // not public API and must not be used by applications.
8079 // <group>: An option group.
8080 static void add_option_entries_libgtk_only()(GLib2.OptionGroup* group) nothrow {
8081 gdk_add_option_entries_libgtk_only(group);
8084 // Unintrospectable function: atom_intern() / gdk_atom_intern()
8085 static Atom atom_intern()(char* atom_name, int only_if_exists) nothrow {
8086 return gdk_atom_intern(atom_name, only_if_exists);
8090 // Unintrospectable function: atom_intern_static_string() / gdk_atom_intern_static_string()
8091 // VERSION: 2.10
8092 // Finds or creates an atom corresponding to a given string.
8093 // Note that this function is identical to gdk_atom_intern() except
8094 // that if a new #GdkAtom is created the string itself is used rather
8095 // than a copy. This saves memory, but can only be used if the string
8096 // will <emphasis>always</emphasis> exist. It can be used with statically
8097 // allocated strings in the main program, but not with statically
8098 // allocated memory in dynamically loaded modules, if you expect to
8099 // ever unload the module again (e.g. do not use this function in
8100 // GTK+ theme engines).
8101 // RETURNS: the atom corresponding to @atom_name
8102 // <atom_name>: a static string
8103 static Atom atom_intern_static_string()(char* atom_name) nothrow {
8104 return gdk_atom_intern_static_string(atom_name);
8107 static char* /*new*/ atom_name()(Atom atom) nothrow {
8108 return gdk_atom_name(atom);
8111 // Emits a short beep on the default display.
8112 static void beep()() nothrow {
8113 gdk_beep();
8116 // Unintrospectable function: bitmap_create_from_data() / gdk_bitmap_create_from_data()
8117 static Bitmap* bitmap_create_from_data()(Drawable* drawable, char* data, int width, int height) nothrow {
8118 return gdk_bitmap_create_from_data(drawable, data, width, height);
8122 // VERSION: 2.8
8123 // Creates a Cairo context for drawing to @drawable.
8124 // <note><para>
8125 // Note that due to double-buffering, Cairo contexts created
8126 // in a GTK+ expose event handler cannot be cached and reused
8127 // between different expose events.
8128 // </para></note>
8129 // cairo_destroy() when you are done drawing.
8130 // RETURNS: A newly created Cairo context. Free with
8131 // <drawable>: a #GdkDrawable
8132 static cairo.Context* /*new*/ cairo_create()(Drawable* drawable) nothrow {
8133 return gdk_cairo_create(drawable);
8137 // VERSION: 2.8
8138 // Adds the given rectangle to the current path of @cr.
8139 // <cr>: a #cairo_t
8140 // <rectangle>: a #GdkRectangle
8141 static void cairo_rectangle()(cairo.Context* cr, Rectangle* rectangle) nothrow {
8142 gdk_cairo_rectangle(cr, rectangle);
8146 // VERSION: 2.8
8147 // Adds the given region to the current path of @cr.
8148 // <cr>: a #cairo_t
8149 // <region>: a #GdkRegion
8150 static void cairo_region()(cairo.Context* cr, Region* region) nothrow {
8151 gdk_cairo_region(cr, region);
8155 // VERSION: 2.18
8156 // Resets the clip region for a Cairo context created by gdk_cairo_create().
8157 // This resets the clip region to the "empty" state for the given drawable.
8158 // This is required for non-native windows since a direct call to
8159 // cairo_reset_clip() would unset the clip region inherited from the
8160 // drawable (i.e. the window clip region), and thus let you e.g.
8161 // draw outside your window.
8162 // This is rarely needed though, since most code just create a new cairo_t
8163 // using gdk_cairo_create() each time they want to draw something.
8164 // <cr>: a #cairo_t
8165 // <drawable>: a #GdkDrawable
8166 static void cairo_reset_clip()(cairo.Context* cr, Drawable* drawable) nothrow {
8167 gdk_cairo_reset_clip(cr, drawable);
8171 // VERSION: 2.8
8172 // Sets the specified #GdkColor as the source color of @cr.
8173 // <cr>: a #cairo_t
8174 // <color>: a #GdkColor
8175 static void cairo_set_source_color()(cairo.Context* cr, Color* color) nothrow {
8176 gdk_cairo_set_source_color(cr, color);
8180 // VERSION: 2.8
8181 // Sets the given pixbuf as the source pattern for the Cairo context.
8182 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
8183 // so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y
8184 // <cr>: a #Cairo context
8185 // <pixbuf>: a #GdkPixbuf
8186 // <pixbuf_x>: X coordinate of location to place upper left corner of @pixbuf
8187 // <pixbuf_y>: Y coordinate of location to place upper left corner of @pixbuf
8188 static void cairo_set_source_pixbuf()(cairo.Context* cr, GdkPixbuf2.Pixbuf* pixbuf, double pixbuf_x, double pixbuf_y) nothrow {
8189 gdk_cairo_set_source_pixbuf(cr, pixbuf, pixbuf_x, pixbuf_y);
8193 // VERSION: 2.10
8194 // DEPRECATED (v2.24) function: cairo_set_source_pixmap - This function is being removed in GTK+ 3 (together
8195 // Sets the given pixmap as the source pattern for the Cairo context.
8196 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
8197 // so that the origin of @pixmap is @pixmap_x, @pixmap_y
8198 // with #GdkPixmap). Instead, use gdk_cairo_set_source_window() where
8199 // appropriate.
8200 // <cr>: a #Cairo context
8201 // <pixmap>: a #GdkPixmap
8202 // <pixmap_x>: X coordinate of location to place upper left corner of @pixmap
8203 // <pixmap_y>: Y coordinate of location to place upper left corner of @pixmap
8204 static void cairo_set_source_pixmap()(cairo.Context* cr, Pixmap* pixmap, double pixmap_x, double pixmap_y) nothrow {
8205 gdk_cairo_set_source_pixmap(cr, pixmap, pixmap_x, pixmap_y);
8209 // VERSION: 2.24
8210 // Sets the given window as the source pattern for the Cairo context.
8211 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
8212 // so that the origin of @window is @x, @y. The window contains all its
8213 // subwindows when rendering.
8214 // Note that the contents of @window are undefined outside of the
8215 // visible part of @window, so use this function with care.
8216 // <cr>: a #Cairo context
8217 // <window>: a #GdkWindow
8218 // <x>: X coordinate of location to place upper left corner of @window
8219 // <y>: Y coordinate of location to place upper left corner of @window
8220 static void cairo_set_source_window()(cairo.Context* cr, Window* window, double x, double y) nothrow {
8221 gdk_cairo_set_source_window(cr, window, x, y);
8225 // DEPRECATED (v2.2) function: char_height - Use gdk_text_extents() instead.
8226 // Determines the total height of a given character.
8227 // This value is not generally useful, because you cannot
8228 // determine how this total height will be drawn in
8229 // relation to the baseline. See gdk_text_extents().
8230 // RETURNS: the height of the character in pixels.
8231 // <font>: a #GdkFont
8232 // <character>: the character to measure.
8233 static int char_height()(Font* font, char character) nothrow {
8234 return gdk_char_height(font, character);
8238 // Determines the distance from the origin to the rightmost
8239 // portion of a character when drawn. This is not the
8240 // correct value for determining the origin of the next
8241 // portion when drawing text in multiple pieces.
8242 // RETURNS: the right bearing of the character in pixels.
8243 // <font>: a #GdkFont
8244 // <character>: the character to measure.
8245 static int char_measure()(Font* font, char character) nothrow {
8246 return gdk_char_measure(font, character);
8250 // DEPRECATED (v2.2) function: char_width - Use gdk_text_extents() instead.
8251 // Determines the width of a given character.
8252 // RETURNS: the width of the character in pixels.
8253 // <font>: a #GdkFont
8254 // <character>: the character to measure.
8255 static int char_width()(Font* font, char character) nothrow {
8256 return gdk_char_width(font, character);
8260 // Determines the width of a given wide character. (Encoded
8261 // in the wide-character encoding of the current locale).
8262 // RETURNS: the width of the character in pixels.
8263 // <font>: a #GdkFont
8264 // <character>: the character to measure.
8265 static int char_width_wc()(Font* font, WChar character) nothrow {
8266 return gdk_char_width_wc(font, character);
8270 // DEPRECATED (v2.2) function: color_alloc - Use gdk_colormap_alloc_color() instead.
8271 // Allocates a single color from a colormap.
8272 // RETURNS: %TRUE if the allocation succeeded.
8273 // <colormap>: a #GdkColormap.
8274 // <color>: The color to allocate. On return, the <structfield>pixel</structfield> field will be filled in.
8275 static int color_alloc()(Colormap* colormap, Color* color) nothrow {
8276 return gdk_color_alloc(colormap, color);
8280 // Returns the black color for a given colormap. The resulting
8281 // value has already been allocated.
8282 // RETURNS: %TRUE if the allocation succeeded.
8283 // <colormap>: a #GdkColormap.
8284 // <color>: the location to store the color.
8285 static int color_black()(Colormap* colormap, Color* color) nothrow {
8286 return gdk_color_black(colormap, color);
8290 // Changes the value of a color that has already
8291 // been allocated. If @colormap is not a private
8292 // colormap, then the color must have been allocated
8293 // using gdk_colormap_alloc_colors() with the
8294 // RETURNS: %TRUE if the color was successfully changed.
8295 // <colormap>: a #GdkColormap.
8296 // <color>: a #GdkColor, with the color to change in the <structfield>pixel</structfield> field, and the new value in the remaining fields.
8297 static int color_change()(Colormap* colormap, Color* color) nothrow {
8298 return gdk_color_change(colormap, color);
8302 // Parses a textual specification of a color and fill in the
8303 // <structfield>red</structfield>, <structfield>green</structfield>,
8304 // and <structfield>blue</structfield> fields of a #GdkColor
8305 // structure. The color is <emphasis>not</emphasis> allocated, you
8306 // must call gdk_colormap_alloc_color() yourself. The string can
8307 // either one of a large set of standard names. (Taken from the X11
8308 // <filename>rgb.txt</filename> file), or it can be a hex value in the
8309 // form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or
8310 // '&num;rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the
8311 // red, green, and blue components of the color, respectively. (White
8312 // in the four forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and
8313 // '&num;ffffffffffff')
8314 // RETURNS: %TRUE if the parsing succeeded.
8315 // <spec>: the string specifying the color.
8316 // <color>: the #GdkColor to fill in
8317 static int color_parse()(char* spec, /*out*/ Color* color) nothrow {
8318 return gdk_color_parse(spec, color);
8322 // Returns the white color for a given colormap. The resulting
8323 // value has already allocated been allocated.
8324 // RETURNS: %TRUE if the allocation succeeded.
8325 // <colormap>: a #GdkColormap.
8326 // <color>: the location to store the color.
8327 static int color_white()(Colormap* colormap, Color* color) nothrow {
8328 return gdk_color_white(colormap, color);
8332 // Allocates colors from a colormap. This function
8333 // is obsolete. See gdk_colormap_alloc_colors().
8334 // For full documentation of the fields, see
8335 // the Xlib documentation for <function>XAllocColorCells()</function>.
8336 // RETURNS: %TRUE if the allocation was successful
8337 // <colormap>: a #GdkColormap.
8338 // <contiguous>: if %TRUE, the colors should be allocated in contiguous color cells.
8339 // <planes>: an array in which to store the plane masks.
8340 // <nplanes>: the number of planes to allocate. (Or zero, to indicate that the color allocation should not be planar.)
8341 // <pixels>: an array into which to store allocated pixel values.
8342 // <npixels>: the number of pixels in each plane to allocate.
8343 static int colors_alloc()(Colormap* colormap, int contiguous, c_ulong* planes, int nplanes, c_ulong* pixels, int npixels) nothrow {
8344 return gdk_colors_alloc(colormap, contiguous, planes, nplanes, pixels, npixels);
8348 // Frees colors allocated with gdk_colors_alloc(). This
8349 // function is obsolete. See gdk_colormap_free_colors().
8350 // <colormap>: a #GdkColormap.
8351 // <pixels>: the pixel values of the colors to free.
8352 // <npixels>: the number of values in @pixels.
8353 // <planes>: the plane masks for all planes to free, OR'd together.
8354 static void colors_free()(Colormap* colormap, c_ulong* pixels, int npixels, c_ulong planes) nothrow {
8355 gdk_colors_free(colormap, pixels, npixels, planes);
8359 // Changes the value of the first @ncolors colors in
8360 // a private colormap. This function is obsolete and
8361 // should not be used. See gdk_color_change().
8362 // <colormap>: a #GdkColormap.
8363 // <colors>: the new color values.
8364 // <ncolors>: the number of colors to change.
8365 static void colors_store()(Colormap* colormap, Color* colors, int ncolors) nothrow {
8366 gdk_colors_store(colormap, colors, ncolors);
8370 // Returns the list of available input devices for the default display.
8371 // The list is statically allocated and should not be freed.
8372 // RETURNS: a list of #GdkDevice
8373 static GLib2.List* devices_list()() nothrow {
8374 return gdk_devices_list();
8378 // Aborts a drag without dropping.
8379 // This function is called by the drag source.
8380 // <context>: a #GdkDragContext.
8381 // <time_>: the timestamp for this operation.
8382 static void drag_abort()(DragContext* context, uint time_) nothrow {
8383 gdk_drag_abort(context, time_);
8387 // Unintrospectable function: drag_begin() / gdk_drag_begin()
8388 // Starts a drag and creates a new drag context for it.
8389 // This function is called by the drag source.
8390 // RETURNS: a newly created #GdkDragContext.
8391 // <window>: the source window for this drag.
8392 // <targets>: the offered targets, as list of #GdkAtom<!-- -->s
8393 static DragContext* drag_begin()(Window* window, GLib2.List* targets) nothrow {
8394 return gdk_drag_begin(window, targets);
8398 // Drops on the current destination.
8399 // This function is called by the drag source.
8400 // <context>: a #GdkDragContext.
8401 // <time_>: the timestamp for this operation.
8402 static void drag_drop()(DragContext* context, uint time_) nothrow {
8403 gdk_drag_drop(context, time_);
8407 // VERSION: 2.6
8408 // Returns whether the dropped data has been successfully
8409 // transferred. This function is intended to be used while
8410 // handling a %GDK_DROP_FINISHED event, its return value is
8411 // meaningless at other times.
8412 // RETURNS: %TRUE if the drop was successful.
8413 // <context>: a #GdkDragContext
8414 static int drag_drop_succeeded()(DragContext* context) nothrow {
8415 return gdk_drag_drop_succeeded(context);
8419 // DEPRECATED (v2.24) function: drag_find_window - Use gdk_drag_find_window_for_screen() instead.
8420 // Finds the destination window and DND protocol to use at the
8421 // given pointer position.
8422 // This function is called by the drag source to obtain the
8423 // <context>: a #GdkDragContext.
8424 // <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.
8425 // <x_root>: the x position of the pointer in root coordinates.
8426 // <y_root>: the y position of the pointer in root coordinates.
8427 // <dest_window>: location to store the destination window in.
8428 // <protocol>: location to store the DND protocol in.
8429 static void drag_find_window()(DragContext* context, Window* drag_window, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol) nothrow {
8430 gdk_drag_find_window(context, drag_window, x_root, y_root, dest_window, protocol);
8434 // VERSION: 2.2
8435 // Finds the destination window and DND protocol to use at the
8436 // given pointer position.
8437 // This function is called by the drag source to obtain the
8438 // <context>: a #GdkDragContext
8439 // <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.
8440 // <screen>: the screen where the destination window is sought.
8441 // <x_root>: the x position of the pointer in root coordinates.
8442 // <y_root>: the y position of the pointer in root coordinates.
8443 // <dest_window>: location to store the destination window in.
8444 // <protocol>: location to store the DND protocol in.
8445 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) nothrow {
8446 gdk_drag_find_window_for_screen(context, drag_window, screen, x_root, y_root, dest_window, protocol);
8450 // DEPRECATED (v2.24) function: drag_get_protocol - Use gdk_drag_get_protocol_for_display() instead
8451 // Finds out the DND protocol supported by a window.
8452 // the drop should happen. This may be @xid or the id of a proxy
8453 // window, or zero if @xid doesn't support Drag and Drop.
8454 // RETURNS: the windowing system specific id for the window where
8455 // <xid>: the windowing system id of the destination window.
8456 // <protocol>: location where the supported DND protocol is returned.
8457 static NativeWindow drag_get_protocol()(NativeWindow xid, DragProtocol* protocol) nothrow {
8458 return gdk_drag_get_protocol(xid, protocol);
8462 // VERSION: 2.2
8463 // Finds out the DND protocol supported by a window.
8464 // 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.
8465 // <display>: the #GdkDisplay where the destination window resides
8466 // <xid>: the windowing system id of the destination window.
8467 // <protocol>: location where the supported DND protocol is returned.
8468 static NativeWindow drag_get_protocol_for_display()(Display* display, NativeWindow xid, DragProtocol* protocol) nothrow {
8469 return gdk_drag_get_protocol_for_display(display, xid, protocol);
8473 // Unintrospectable function: drag_get_selection() / gdk_drag_get_selection()
8474 // Returns the selection atom for the current source window.
8475 // RETURNS: the selection atom.
8476 // <context>: a #GdkDragContext.
8477 static Atom drag_get_selection()(DragContext* context) nothrow {
8478 return gdk_drag_get_selection(context);
8482 // Updates the drag context when the pointer moves or the
8483 // set of actions changes.
8484 // This function is called by the drag source.
8485 // RETURNS: FIXME
8486 // <context>: a #GdkDragContext.
8487 // <dest_window>: the new destination window, obtained by gdk_drag_find_window().
8488 // <protocol>: the DND protocol in use, obtained by gdk_drag_find_window().
8489 // <x_root>: the x position of the pointer in root coordinates.
8490 // <y_root>: the y position of the pointer in root coordinates.
8491 // <suggested_action>: the suggested action.
8492 // <possible_actions>: the possible actions.
8493 // <time_>: the timestamp for this operation.
8494 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_) nothrow {
8495 return gdk_drag_motion(context, dest_window, protocol, x_root, y_root, suggested_action, possible_actions, time_);
8499 // Selects one of the actions offered by the drag source.
8500 // This function is called by the drag destination in response to
8501 // gdk_drag_motion() called by the drag source.
8502 // <context>: a #GdkDragContext.
8503 // <action>: the selected action which will be taken when a drop happens, or 0 to indicate that a drop will not be accepted.
8504 // <time_>: the timestamp for this operation.
8505 static void drag_status()(DragContext* context, DragAction action, uint time_) nothrow {
8506 gdk_drag_status(context, action, time_);
8510 // DEPRECATED (v2.22) function: draw_arc - Use cairo_arc() and cairo_fill() or cairo_stroke()
8511 // Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
8512 // rectangle of the entire ellipse, and the start and end angles of the part
8513 // of the ellipse to be drawn.
8514 // instead. Note that arcs just like any drawing operation in Cairo are
8515 // antialiased unless you call cairo_set_antialias().
8516 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8517 // <gc>: a #GdkGC.
8518 // <filled>: %TRUE if the arc should be filled, producing a 'pie slice'.
8519 // <x>: the x coordinate of the left edge of the bounding rectangle.
8520 // <y>: the y coordinate of the top edge of the bounding rectangle.
8521 // <width>: the width of the bounding rectangle.
8522 // <height>: the height of the bounding rectangle.
8523 // <angle1>: the start angle of the arc, relative to the 3 o'clock position, counter-clockwise, in 1/64ths of a degree.
8524 // <angle2>: the end angle of the arc, relative to @angle1, in 1/64ths of a degree.
8525 static void draw_arc()(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2) nothrow {
8526 gdk_draw_arc(drawable, gc, filled, x, y, width, height, angle1, angle2);
8530 // DEPRECATED (v2.22) function: draw_drawable - Use gdk_cairo_set_source_pixmap(), cairo_rectangle()
8531 // Copies the @width x @height region of @src at coordinates (@xsrc,
8532 // Most fields in @gc are not used for this operation, but notably the
8533 // clip mask or clip region will be honored.
8534 // The source and destination drawables must have the same visual and
8535 // colormap, or errors will result. (On X11, failure to match
8536 // visual/colormap results in a BadMatch error from the X server.)
8537 // A common cause of this problem is an attempt to draw a bitmap to
8538 // a color drawable. The way to draw a bitmap is to set the bitmap as
8539 // the stipple on the #GdkGC, set the fill mode to %GDK_STIPPLED, and
8540 // then draw the rectangle.
8541 // and cairo_fill() to draw pixmap on top of other drawables. Also keep
8542 // in mind that the limitations on allowed sources do not apply to Cairo.
8543 // <drawable>: a #GdkDrawable
8544 // <gc>: a #GdkGC sharing the drawable's visual and colormap
8545 // <src>: the source #GdkDrawable, which may be the same as @drawable
8546 // <xsrc>: X position in @src of rectangle to draw
8547 // <ysrc>: Y position in @src of rectangle to draw
8548 // <xdest>: X position in @drawable where the rectangle should be drawn
8549 // <ydest>: Y position in @drawable where the rectangle should be drawn
8550 // <width>: width of rectangle to draw, or -1 for entire @src width
8551 // <height>: height of rectangle to draw, or -1 for entire @src height
8552 static void draw_drawable()(Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) nothrow {
8553 gdk_draw_drawable(drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height);
8557 // DEPRECATED (v2.22) function: draw_glyphs - Use pango_cairo_show_glyphs() instead.
8558 // This is a low-level function; 99% of text rendering should be done
8559 // using gdk_draw_layout() instead.
8560 // A glyph is a single image in a font. This function draws a sequence of
8561 // glyphs. To obtain a sequence of glyphs you have to understand a
8562 // lot about internationalized text handling, which you don't want to
8563 // understand; thus, use gdk_draw_layout() instead of this function,
8564 // gdk_draw_layout() handles the details.
8565 // <drawable>: a #GdkDrawable
8566 // <gc>: a #GdkGC
8567 // <font>: font to be used
8568 // <x>: X coordinate of baseline origin
8569 // <y>: Y coordinate of baseline origin
8570 // <glyphs>: the glyph string to draw
8571 static void draw_glyphs()(Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) nothrow {
8572 gdk_draw_glyphs(drawable, gc, font, x, y, glyphs);
8576 // VERSION: 2.6
8577 // DEPRECATED (v2.22) function: draw_glyphs_transformed - Use pango_cairo_show_glyphs() instead.
8578 // Renders a #PangoGlyphString onto a drawable, possibly
8579 // transforming the layed-out coordinates through a transformation
8580 // matrix. Note that the transformation matrix for @font is not
8581 // changed, so to produce correct rendering results, the @font
8582 // must have been loaded using a #PangoContext with an identical
8583 // transformation matrix to that passed in to this function.
8584 // See also gdk_draw_glyphs(), gdk_draw_layout().
8585 // <drawable>: a #GdkDrawable
8586 // <gc>: a #GdkGC
8587 // <matrix>: a #PangoMatrix, or %NULL to use an identity transformation
8588 // <font>: the font in which to draw the string
8589 // <x>: the x position of the start of the string (in Pango units in user space coordinates)
8590 // <y>: the y position of the baseline (in Pango units in user space coordinates)
8591 // <glyphs>: the glyph string to draw
8592 static void draw_glyphs_transformed()(Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) nothrow {
8593 gdk_draw_glyphs_transformed(drawable, gc, matrix, font, x, y, glyphs);
8596 static void draw_gray_image()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) nothrow {
8597 gdk_draw_gray_image(drawable, gc, x, y, width, height, dith, buf, rowstride);
8601 // DEPRECATED (v2.22) function: draw_image - Do not use #GdkImage anymore, instead use Cairo image
8602 // Draws a #GdkImage onto a drawable.
8603 // The depth of the #GdkImage must match the depth of the #GdkDrawable.
8604 // surfaces.
8605 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8606 // <gc>: a #GdkGC.
8607 // <image>: the #GdkImage to draw.
8608 // <xsrc>: the left edge of the source rectangle within @image.
8609 // <ysrc>: the top of the source rectangle within @image.
8610 // <xdest>: the x coordinate of the destination within @drawable.
8611 // <ydest>: the y coordinate of the destination within @drawable.
8612 // <width>: the width of the area to be copied, or -1 to make the area extend to the right edge of @image.
8613 // <height>: the height of the area to be copied, or -1 to make the area extend to the bottom edge of @image.
8614 static void draw_image()(Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) nothrow {
8615 gdk_draw_image(drawable, gc, image, xsrc, ysrc, xdest, ydest, width, height);
8618 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) nothrow {
8619 gdk_draw_indexed_image(drawable, gc, x, y, width, height, dith, buf, rowstride, cmap);
8623 // Render a #PangoLayout onto a GDK drawable
8624 // If the layout's #PangoContext has a transformation matrix set, then
8625 // bounding box (in device space) of the transformed layout.
8626 // If you're using GTK+, the usual way to obtain a #PangoLayout
8627 // is gtk_widget_create_pango_layout().
8628 // <drawable>: the drawable on which to draw string
8629 // <gc>: base graphics context to use
8630 // <x>: the X position of the left of the layout (in pixels)
8631 // <y>: the Y position of the top of the layout (in pixels)
8632 // <layout>: a #PangoLayout
8633 static void draw_layout()(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout) nothrow {
8634 gdk_draw_layout(drawable, gc, x, y, layout);
8638 // Render a #PangoLayoutLine onto an GDK drawable
8639 // If the layout's #PangoContext has a transformation matrix set, then
8640 // (left is in before-tranform user coordinates) in after-transform
8641 // device coordinates.
8642 // <drawable>: the drawable on which to draw the line
8643 // <gc>: base graphics to use
8644 // <x>: the x position of start of string (in pixels)
8645 // <y>: the y position of baseline (in pixels)
8646 // <line>: a #PangoLayoutLine
8647 static void draw_layout_line()(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line) nothrow {
8648 gdk_draw_layout_line(drawable, gc, x, y, line);
8652 // Render a #PangoLayoutLine onto a #GdkDrawable, overriding the
8653 // layout's normal colors with @foreground and/or @background.
8654 // If the layout's #PangoContext has a transformation matrix set, then
8655 // (left is in before-tranform user coordinates) in after-transform
8656 // device coordinates.
8657 // <drawable>: the drawable on which to draw the line
8658 // <gc>: base graphics to use
8659 // <x>: the x position of start of string (in pixels)
8660 // <y>: the y position of baseline (in pixels)
8661 // <line>: a #PangoLayoutLine
8662 // <foreground>: foreground override color, or %NULL for none
8663 // <background>: background override color, or %NULL for none
8664 static void draw_layout_line_with_colors()(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line, Color* foreground=null, Color* background=null) nothrow {
8665 gdk_draw_layout_line_with_colors(drawable, gc, x, y, line, foreground, background);
8669 // Render a #PangoLayout onto a #GdkDrawable, overriding the
8670 // layout's normal colors with @foreground and/or @background.
8671 // If the layout's #PangoContext has a transformation matrix set, then
8672 // bounding box (in device space) of the transformed layout.
8673 // If you're using GTK+, the ususal way to obtain a #PangoLayout
8674 // is gtk_widget_create_pango_layout().
8675 // <drawable>: the drawable on which to draw string
8676 // <gc>: base graphics context to use
8677 // <x>: the X position of the left of the layout (in pixels)
8678 // <y>: the Y position of the top of the layout (in pixels)
8679 // <layout>: a #PangoLayout
8680 // <foreground>: foreground override color, or %NULL for none
8681 // <background>: background override color, or %NULL for none
8682 static void draw_layout_with_colors()(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout, Color* foreground=null, Color* background=null) nothrow {
8683 gdk_draw_layout_with_colors(drawable, gc, x, y, layout, foreground, background);
8687 // DEPRECATED (v2.22) function: draw_line - Use cairo_line_to() and cairo_stroke() instead.
8688 // Draws a line, using the foreground color and other attributes of
8689 // the #GdkGC.
8690 // Be aware that the default line width in Cairo is 2 pixels and that your
8691 // coordinates need to describe the center of the line. To draw a single
8692 // pixel wide pixel-aligned line, you would use:
8693 // |[cairo_set_line_width (cr, 1.0);
8694 // cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
8695 // cairo_move_to (cr, 0.5, 0.5);
8696 // cairo_line_to (cr, 9.5, 0.5);
8697 // cairo_stroke (cr);]|
8698 // See also <ulink url="http://cairographics.org/FAQ/#sharp_lines">the Cairo
8699 // FAQ</ulink> on this topic.
8700 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8701 // <gc>: a #GdkGC.
8702 // <x1_>: the x coordinate of the start point.
8703 // <y1_>: the y coordinate of the start point.
8704 // <x2_>: the x coordinate of the end point.
8705 // <y2_>: the y coordinate of the end point.
8706 static void draw_line()(Drawable* drawable, GC* gc, int x1_, int y1_, int x2_, int y2_) nothrow {
8707 gdk_draw_line(drawable, gc, x1_, y1_, x2_, y2_);
8711 // DEPRECATED (v2.22) function: draw_lines - Use cairo_line_to() and cairo_stroke() instead. See the
8712 // Draws a series of lines connecting the given points.
8713 // The way in which joins between lines are draw is determined by the
8714 // #GdkCapStyle value in the #GdkGC. This can be set with
8715 // gdk_gc_set_line_attributes().
8716 // documentation of gdk_draw_line() for notes on line drawing with Cairo.
8717 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8718 // <gc>: a #GdkGC.
8719 // <points>: an array of #GdkPoint structures specifying the endpoints of the
8720 // <n_points>: the size of the @points array.
8721 static void draw_lines()(Drawable* drawable, GC* gc, Point* points, int n_points) nothrow {
8722 gdk_draw_lines(drawable, gc, points, n_points);
8726 // VERSION: 2.2
8727 // DEPRECATED (v2.22) function: draw_pixbuf - Use gdk_cairo_set_source_pixbuf() and cairo_paint() or
8728 // Renders a rectangular portion of a pixbuf to a drawable. The destination
8729 // drawable must have a colormap. All windows have a colormap, however, pixmaps
8730 // only have colormap by default if they were created with a non-%NULL window
8731 // argument. Otherwise a colormap must be set on them with
8732 // gdk_drawable_set_colormap().
8733 // On older X servers, rendering pixbufs with an alpha channel involves round
8734 // trips to the X server, and may be somewhat slow.
8735 // If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
8736 // function is accelerated using mediaLib, which provides hardware
8737 // acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib
8738 // support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
8739 // variable.
8740 // cairo_rectangle() and cairo_fill() instead.
8741 // <drawable>: Destination drawable.
8742 // <gc>: a #GdkGC, used for clipping, or %NULL
8743 // <pixbuf>: a #GdkPixbuf
8744 // <src_x>: Source X coordinate within pixbuf.
8745 // <src_y>: Source Y coordinates within pixbuf.
8746 // <dest_x>: Destination X coordinate within drawable.
8747 // <dest_y>: Destination Y coordinate within drawable.
8748 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width.
8749 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height.
8750 // <dither>: Dithering mode for #GdkRGB.
8751 // <x_dither>: X offset for dither.
8752 // <y_dither>: Y offset for dither.
8753 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) nothrow {
8754 gdk_draw_pixbuf(drawable, gc, pixbuf, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither);
8758 // DEPRECATED (v2.22) function: draw_point - Use cairo_rectangle() and cairo_fill() or
8759 // Draws a point, using the foreground color and other attributes of
8760 // the #GdkGC.
8761 // cairo_move_to() and cairo_stroke() instead.
8762 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8763 // <gc>: a #GdkGC.
8764 // <x>: the x coordinate of the point.
8765 // <y>: the y coordinate of the point.
8766 static void draw_point()(Drawable* drawable, GC* gc, int x, int y) nothrow {
8767 gdk_draw_point(drawable, gc, x, y);
8771 // DEPRECATED (v2.22) function: draw_points - Use @n_points calls to cairo_rectangle() and
8772 // Draws a number of points, using the foreground color and other
8773 // attributes of the #GdkGC.
8774 // cairo_fill() instead.
8775 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8776 // <gc>: a #GdkGC.
8777 // <points>: an array of #GdkPoint structures.
8778 // <n_points>: the number of points to be drawn.
8779 static void draw_points()(Drawable* drawable, GC* gc, Point* points, int n_points) nothrow {
8780 gdk_draw_points(drawable, gc, points, n_points);
8784 // DEPRECATED (v2.22) function: draw_polygon - Use cairo_line_to() or cairo_append_path() and
8785 // Draws an outlined or filled polygon.
8786 // cairo_fill() or cairo_stroke() instead.
8787 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8788 // <gc>: a #GdkGC.
8789 // <filled>: %TRUE if the polygon should be filled. The polygon is closed automatically, connecting the last point to the first point if necessary.
8790 // <points>: an array of #GdkPoint structures specifying the points making up the polygon.
8791 // <n_points>: the number of points.
8792 static void draw_polygon()(Drawable* drawable, GC* gc, int filled, Point* points, int n_points) nothrow {
8793 gdk_draw_polygon(drawable, gc, filled, points, n_points);
8797 // DEPRECATED (v2.22) function: draw_rectangle - Use cairo_rectangle() and cairo_fill() or cairo_stroke()
8798 // Draws a rectangular outline or filled rectangle, using the foreground color
8799 // and other attributes of the #GdkGC.
8800 // A rectangle drawn filled is 1 pixel smaller in both dimensions than a
8801 // rectangle outlined. Calling
8802 // <literal>gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20)</literal>
8803 // results in a filled rectangle 20 pixels wide and 20 pixels high. Calling
8804 // <literal>gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20)</literal>
8805 // results in an outlined rectangle with corners at (0, 0), (0, 20), (20, 20),
8806 // and (20, 0), which makes it 21 pixels wide and 21 pixels high.
8807 // instead. For stroking, the same caveats for converting code apply as for
8808 // gdk_draw_line().
8809 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8810 // <gc>: a #GdkGC.
8811 // <filled>: %TRUE if the rectangle should be filled.
8812 // <x>: the x coordinate of the left edge of the rectangle.
8813 // <y>: the y coordinate of the top edge of the rectangle.
8814 // <width>: the width of the rectangle.
8815 // <height>: the height of the rectangle.
8816 static void draw_rectangle()(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height) nothrow {
8817 gdk_draw_rectangle(drawable, gc, filled, x, y, width, height);
8820 static void draw_rgb_32_image()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) nothrow {
8821 gdk_draw_rgb_32_image(drawable, gc, x, y, width, height, dith, buf, rowstride);
8825 // DEPRECATED (v2.22) function: draw_rgb_32_image_dithalign - Cairo handles colors automatically.
8826 // Like gdk_draw_rgb_32_image(), but allows you to specify the dither
8827 // offsets. See gdk_draw_rgb_image_dithalign() for more details.
8828 // <drawable>: a #GdkDrawable
8829 // <gc>: a #GdkGC
8830 // <x>: X coordinate on @drawable where image should go
8831 // <y>: Y coordinate on @drawable where image should go
8832 // <width>: width of area of image to draw
8833 // <height>: height of area of image to draw
8834 // <dith>: dithering mode
8835 // <buf>: RGB image data
8836 // <rowstride>: rowstride of RGB image data
8837 // <xdith>: X dither offset
8838 // <ydith>: Y dither offset
8839 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) nothrow {
8840 gdk_draw_rgb_32_image_dithalign(drawable, gc, x, y, width, height, dith, buf, rowstride, xdith, ydith);
8843 static void draw_rgb_image()(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride) nothrow {
8844 gdk_draw_rgb_image(drawable, gc, x, y, width, height, dith, rgb_buf, rowstride);
8847 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) nothrow {
8848 gdk_draw_rgb_image_dithalign(drawable, gc, x, y, width, height, dith, rgb_buf, rowstride, xdith, ydith);
8852 // DEPRECATED (v2.22) function: draw_segments - Use cairo_move_to(), cairo_line_to() and cairo_stroke()
8853 // Draws a number of unconnected lines.
8854 // instead. See the documentation of gdk_draw_line() for notes on line drawing
8855 // with Cairo.
8856 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8857 // <gc>: a #GdkGC.
8858 // <segs>: an array of #GdkSegment structures specifying the start and end points of the lines to be drawn.
8859 // <n_segs>: the number of line segments to draw, i.e. the size of the
8860 static void draw_segments()(Drawable* drawable, GC* gc, Segment* segs, int n_segs) nothrow {
8861 gdk_draw_segments(drawable, gc, segs, n_segs);
8865 // DEPRECATED (v2.4) function: draw_string - Use gdk_draw_layout() instead.
8866 // Draws a string of characters in the given font or fontset.
8867 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8868 // <font>: a #GdkFont.
8869 // <gc>: a #GdkGC.
8870 // <x>: the x coordinate of the left edge of the text.
8871 // <y>: the y coordinate of the baseline of the text.
8872 // <string>: the string of characters to draw.
8873 static void draw_string()(Drawable* drawable, Font* font, GC* gc, int x, int y, char* string_) nothrow {
8874 gdk_draw_string(drawable, font, gc, x, y, string_);
8878 // DEPRECATED (v2.4) function: draw_text - Use gdk_draw_layout() instead.
8879 // Draws a number of characters in the given font or fontset.
8880 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8881 // <font>: a #GdkFont.
8882 // <gc>: a #GdkGC.
8883 // <x>: the x coordinate of the left edge of the text.
8884 // <y>: the y coordinate of the baseline of the text.
8885 // <text>: the characters to draw.
8886 // <text_length>: the number of characters of @text to draw.
8887 static void draw_text()(Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length) nothrow {
8888 gdk_draw_text(drawable, font, gc, x, y, text, text_length);
8892 // DEPRECATED (v2.4) function: draw_text_wc - Use gdk_draw_layout() instead.
8893 // Draws a number of wide characters using the given font of fontset.
8894 // If the font is a 1-byte font, the string is converted into 1-byte
8895 // characters (discarding the high bytes) before output.
8896 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8897 // <font>: a #GdkFont.
8898 // <gc>: a #GdkGC.
8899 // <x>: the x coordinate of the left edge of the text.
8900 // <y>: the y coordinate of the baseline of the text.
8901 // <text>: the wide characters to draw.
8902 // <text_length>: the number of characters to draw.
8903 static void draw_text_wc()(Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length) nothrow {
8904 gdk_draw_text_wc(drawable, font, gc, x, y, text, text_length);
8908 // VERSION: 2.6
8909 // DEPRECATED (v2.22) function: draw_trapezoids - Use Cairo path contruction functions and cairo_fill()
8910 // Draws a set of anti-aliased trapezoids. The trapezoids are
8911 // combined using saturation addition, then drawn over the background
8912 // as a set. This is low level functionality used internally to implement
8913 // rotated underlines and backgrouds when rendering a PangoLayout and is
8914 // likely not useful for applications.
8915 // instead.
8916 // <drawable>: a #GdkDrawable
8917 // <gc>: a #GdkGC
8918 // <trapezoids>: an array of #GdkTrapezoid structures
8919 // <n_trapezoids>: the number of trapezoids to draw
8920 static void draw_trapezoids()(Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids) nothrow {
8921 gdk_draw_trapezoids(drawable, gc, trapezoids, n_trapezoids);
8925 // Ends the drag operation after a drop.
8926 // This function is called by the drag destination.
8927 // <context>: a #GtkDragContext.
8928 // <success>: %TRUE if the data was successfully received.
8929 // <time_>: the timestamp for this operation.
8930 static void drop_finish()(DragContext* context, int success, uint time_) nothrow {
8931 gdk_drop_finish(context, success, time_);
8935 // Accepts or rejects a drop.
8936 // This function is called by the drag destination in response
8937 // to a drop initiated by the drag source.
8938 // <context>: a #GdkDragContext.
8939 // <ok>: %TRUE if the drop is accepted.
8940 // <time_>: the timestamp for this operation.
8941 static void drop_reply()(DragContext* context, int ok, uint time_) nothrow {
8942 gdk_drop_reply(context, ok, time_);
8945 static int error_trap_pop()() nothrow {
8946 return gdk_error_trap_pop();
8949 static void error_trap_push()() nothrow {
8950 gdk_error_trap_push();
8954 // Checks all open displays for a #GdkEvent to process,to be processed
8955 // on, fetching events from the windowing system if necessary.
8956 // See gdk_display_get_event().
8957 // are pending. The returned #GdkEvent should be freed with gdk_event_free().
8958 // RETURNS: the next #GdkEvent to be processed, or %NULL if no events
8959 static Event* /*new*/ event_get()() nothrow {
8960 return gdk_event_get();
8963 static Event* /*new*/ event_get_graphics_expose()(Window* window) nothrow {
8964 return gdk_event_get_graphics_expose(window);
8968 // Sets the function to call to handle all events from GDK.
8969 // Note that GTK+ uses this to install its own event handler, so it is
8970 // usually not useful for GTK+ applications. (Although an application
8971 // can call this function then call gtk_main_do_event() to pass
8972 // events to GTK+.)
8973 // <func>: the function to call to handle events from GDK.
8974 // <data>: user data to pass to the function.
8975 // <notify>: the function to call when the handler function is removed, i.e. when gdk_event_handler_set() is called with another event handler.
8976 static void event_handler_set()(EventFunc func, void* data, GLib2.DestroyNotify notify) nothrow {
8977 gdk_event_handler_set(func, data, notify);
8981 // If there is an event waiting in the event queue of some open
8982 // display, returns a copy of it. See gdk_display_peek_event().
8983 // events are in any queues. The returned #GdkEvent should be freed with
8984 // gdk_event_free().
8985 // RETURNS: a copy of the first #GdkEvent on some event queue, or %NULL if no
8986 static Event* /*new*/ event_peek()() nothrow {
8987 return gdk_event_peek();
8991 // VERSION: 2.12
8992 // Request more motion notifies if @event is a motion notify hint event.
8993 // This function should be used instead of gdk_window_get_pointer() to
8994 // request further motion notifies, because it also works for extension
8995 // events where motion notifies are provided for devices other than the
8996 // core pointer. Coordinate extraction, processing and requesting more
8997 // motion events from a %GDK_MOTION_NOTIFY event usually works like this:
8998 // |[
8999 // {
9000 // /&ast; motion_event handler &ast;/
9001 // x = motion_event->x;
9002 // y = motion_event->y;
9003 // /&ast; handle (x,y) motion &ast;/
9004 // gdk_event_request_motions (motion_event); /&ast; handles is_hint events &ast;/
9005 // }
9006 // ]|
9007 // <event>: a valid #GdkEvent
9008 static void event_request_motions()(EventMotion* event) nothrow {
9009 gdk_event_request_motions(event);
9012 static int event_send_client_message_for_display()(Display* display, Event* event, NativeWindow winid) nothrow {
9013 return gdk_event_send_client_message_for_display(display, event, winid);
9016 static int events_pending()() nothrow {
9017 return gdk_events_pending();
9020 static void exit()(int error_code) nothrow {
9021 gdk_exit(error_code);
9024 static void flush()() nothrow {
9025 gdk_flush();
9029 // Load a #GdkFont based on a Pango font description. This font will
9030 // only be an approximation of the Pango font, and
9031 // internationalization will not be handled correctly. This function
9032 // should only be used for legacy code that cannot be easily converted
9033 // to use Pango. Using Pango directly will produce better results.
9034 // cannot be loaded.
9035 // RETURNS: the newly loaded font, or %NULL if the font
9036 // <font_desc>: a #PangoFontDescription.
9037 static Font* /*new*/ font_from_description()(Pango.FontDescription* font_desc) nothrow {
9038 return gdk_font_from_description(font_desc);
9041 static Font* /*new*/ font_from_description_for_display()(Display* display, Pango.FontDescription* font_desc) nothrow {
9042 return gdk_font_from_description_for_display(display, font_desc);
9046 // Loads a font.
9047 // The font may be newly loaded or looked up the font in a cache.
9048 // You should make no assumptions about the initial reference count.
9049 // RETURNS: a #GdkFont, or %NULL if the font could not be loaded.
9050 // <font_name>: a XLFD describing the font to load.
9051 static Font* /*new*/ font_load()(char* font_name) nothrow {
9052 return gdk_font_load(font_name);
9055 static Font* /*new*/ font_load_for_display()(Display* display, char* font_name) nothrow {
9056 return gdk_font_load_for_display(display, font_name);
9059 static Font* /*new*/ fontset_load()(char* fontset_name) nothrow {
9060 return gdk_fontset_load(fontset_name);
9063 static Font* /*new*/ fontset_load_for_display()(Display* display, char* fontset_name) nothrow {
9064 return gdk_fontset_load_for_display(display, fontset_name);
9067 static void free_compound_text()(ubyte* ctext) nothrow {
9068 gdk_free_compound_text(ctext);
9071 static void free_text_list()(char** list) nothrow {
9072 gdk_free_text_list(list);
9076 // Unintrospectable function: get_default_root_window() / gdk_get_default_root_window()
9077 // Obtains the root window (parent all other windows are inside)
9078 // for the default display and screen.
9079 // RETURNS: the default root window
9080 static Window* get_default_root_window()() nothrow {
9081 return gdk_get_default_root_window();
9084 static char* /*new*/ get_display()() nothrow {
9085 return gdk_get_display();
9089 // VERSION: 2.2
9090 // Gets the display name specified in the command line arguments passed
9091 // to gdk_init() or gdk_parse_args(), if any.
9092 // this string is owned by GTK+ and must not be modified or freed.
9093 // RETURNS: the display name, if specified explicitely, otherwise %NULL
9094 static char* get_display_arg_name()() nothrow {
9095 return gdk_get_display_arg_name();
9098 static char* get_program_class()() nothrow {
9099 return gdk_get_program_class();
9103 // Gets whether event debugging output is enabled.
9104 // RETURNS: %TRUE if event debugging output is enabled.
9105 static int get_show_events()() nothrow {
9106 return gdk_get_show_events();
9109 static int get_use_xshm()() nothrow {
9110 return gdk_get_use_xshm();
9113 static void init()(/*inout*/ int* argc, /*inout*/ char*** argv) nothrow {
9114 gdk_init(argc, argv);
9118 // Initialize the library for use.
9119 // Arguments:
9120 // "argc" is the number of arguments.
9121 // "argv" is an array of strings.
9122 // Results:
9123 // "argc" and "argv" are modified to reflect any arguments
9124 // which were not handled. (Such arguments should either
9125 // be handled by the application or dismissed). If initialization
9126 // fails, returns FALSE, otherwise TRUE.
9127 // Side effects:
9128 // The library is initialized.
9129 // --------------------------------------------------------------
9130 static int init_check()(/*inout*/ int* argc, /*inout*/ char*** argv) nothrow {
9131 return gdk_init_check(argc, argv);
9135 // Unintrospectable function: input_add() / gdk_input_add()
9136 // DEPRECATED (v2.14) function: input_add - Use g_io_add_watch() on a #GIOChannel
9137 // Establish a callback when a condition becomes true on
9138 // a file descriptor.
9139 // gdk_input_remove().
9140 // RETURNS: a tag that can later be used as an argument to
9141 // <source>: a file descriptor.
9142 // <condition>: the condition.
9143 // <function>: the callback function.
9144 // <data>: callback data passed to @function.
9145 static int input_add()(int source, InputCondition condition, InputFunction function_, void* data) nothrow {
9146 return gdk_input_add(source, condition, function_, data);
9150 // DEPRECATED (v2.14) function: input_add_full - Use g_io_add_watch_full() on a #GIOChannel
9151 // Establish a callback when a condition becomes true on
9152 // a file descriptor.
9153 // gdk_input_remove().
9154 // RETURNS: a tag that can later be used as an argument to
9155 // <source>: a file descriptor.
9156 // <condition>: the condition.
9157 // <function>: the callback function.
9158 // <data>: callback data passed to @function.
9159 // <destroy>: callback function to call with @data when the input handler is removed.
9160 static int input_add_full()(int source, InputCondition condition, InputFunction function_, void* data, GLib2.DestroyNotify destroy) nothrow {
9161 return gdk_input_add_full(source, condition, function_, data, destroy);
9164 static void input_remove()(int tag) nothrow {
9165 gdk_input_remove(tag);
9168 static void input_set_extension_events()(Window* window, int mask, ExtensionMode mode) nothrow {
9169 gdk_input_set_extension_events(window, mask, mode);
9172 static GrabStatus keyboard_grab()(Window* window, int owner_events, uint time_) nothrow {
9173 return gdk_keyboard_grab(window, owner_events, time_);
9177 // Determines information about the current keyboard grab.
9178 // This is not public API and must not be used by applications.
9179 // keyboard grabbed.
9180 // RETURNS: %TRUE if this application currently has the
9181 // <display>: the display for which to get the grab information
9182 // <grab_window>: location to store current grab window
9183 // <owner_events>: location to store boolean indicating whether the @owner_events flag to gdk_keyboard_grab() was %TRUE.
9184 static int keyboard_grab_info_libgtk_only()(Display* display, Window** grab_window, int* owner_events) nothrow {
9185 return gdk_keyboard_grab_info_libgtk_only(display, grab_window, owner_events);
9189 // Ungrabs the keyboard on the default display, if it is grabbed by this
9190 // application.
9191 // <time_>: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is available.
9192 static void keyboard_ungrab()(uint time_) nothrow {
9193 gdk_keyboard_ungrab(time_);
9197 // Obtains the upper- and lower-case versions of the keyval @symbol.
9198 // Examples of keyvals are #GDK_a, #GDK_Enter, #GDK_F1, etc.
9199 // <symbol>: a keyval
9200 // <lower>: return location for lowercase version of @symbol
9201 // <upper>: return location for uppercase version of @symbol
9202 static void keyval_convert_case()(uint symbol, /*out*/ uint* lower, /*out*/ uint* upper) nothrow {
9203 gdk_keyval_convert_case(symbol, lower, upper);
9207 // Converts a key name to a key value.
9208 // The names are the same as those in the
9209 // <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
9210 // but without the leading "GDK_KEY_".
9211 // if the key name is not a valid key
9212 // RETURNS: the corresponding key value, or %GDK_KEY_VoidSymbol
9213 // <keyval_name>: a key name
9214 static uint keyval_from_name()(char* keyval_name) nothrow {
9215 return gdk_keyval_from_name(keyval_name);
9218 static int keyval_is_lower()(uint keyval) nothrow {
9219 return gdk_keyval_is_lower(keyval);
9222 static int keyval_is_upper()(uint keyval) nothrow {
9223 return gdk_keyval_is_upper(keyval);
9227 // Converts a key value into a symbolic name.
9228 // The names are the same as those in the
9229 // <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
9230 // but without the leading "GDK_KEY_".
9231 // or %NULL if @keyval is not a valid key. The string should not be
9232 // modified.
9233 // RETURNS: a string containing the name of the key,
9234 // <keyval>: a key value
9235 static char* keyval_name()(uint keyval) nothrow {
9236 return gdk_keyval_name(keyval);
9239 static uint keyval_to_lower()(uint keyval) nothrow {
9240 return gdk_keyval_to_lower(keyval);
9244 // Convert from a GDK key symbol to the corresponding ISO10646 (Unicode)
9245 // character.
9246 // is no corresponding character.
9247 // RETURNS: the corresponding unicode character, or 0 if there
9248 // <keyval>: a GDK key symbol
9249 static uint keyval_to_unicode()(uint keyval) nothrow {
9250 return gdk_keyval_to_unicode(keyval);
9253 static uint keyval_to_upper()(uint keyval) nothrow {
9254 return gdk_keyval_to_upper(keyval);
9258 // Lists the available visuals for the default screen.
9259 // (See gdk_screen_list_visuals())
9260 // A visual describes a hardware image data format.
9261 // For example, a visual might support 24-bit color, or 8-bit color,
9262 // and might expect pixels to be in a certain format.
9263 // Call g_list_free() on the return value when you're finished with it.
9264 // a list of visuals; the list must be freed, but not its contents
9265 static GLib2.List* /*new container*/ list_visuals()() nothrow {
9266 return gdk_list_visuals();
9270 // Converts a multi-byte string to a wide character string.
9271 // (The function name comes from an acronym of 'Multi-Byte String TO Wide
9272 // Character String').
9273 // the conversion failed.
9274 // RETURNS: the number of wide characters written into @dest, or -1 if
9275 // <dest>: the space to place the converted wide character string into.
9276 // <src>: the multi-byte string to convert, which must be nul-terminated.
9277 // <dest_max>: the maximum number of wide characters to place in @dest.
9278 static int mbstowcs()(WChar* dest, char* src, int dest_max) nothrow {
9279 return gdk_mbstowcs(dest, src, dest_max);
9283 // VERSION: 2.2
9284 // Indicates to the GUI environment that the application has finished
9285 // loading. If the applications opens windows, this function is
9286 // normally called after opening the application's initial set of
9287 // windows.
9288 // GTK+ will call this function automatically after opening the first
9289 // #GtkWindow unless gtk_window_set_auto_startup_notification() is called
9290 // to disable that feature.
9291 static void notify_startup_complete()() nothrow {
9292 gdk_notify_startup_complete();
9296 // VERSION: 2.12
9297 // Indicates to the GUI environment that the application has finished
9298 // loading, using a given identifier.
9299 // GTK+ will call this function automatically for #GtkWindow with custom
9300 // startup-notification identifier unless
9301 // gtk_window_set_auto_startup_notification() is called to disable
9302 // that feature.
9303 // <startup_id>: a startup-notification identifier, for which notification process should be completed
9304 static void notify_startup_complete_with_id()(char* startup_id) nothrow {
9305 gdk_notify_startup_complete_with_id(startup_id);
9309 // Unintrospectable function: offscreen_window_get_embedder() / gdk_offscreen_window_get_embedder()
9310 // VERSION: 2.18
9311 // Gets the window that @window is embedded in.
9312 // embedded offscreen window
9313 // RETURNS: the embedding #GdkWindow, or %NULL if @window is not an
9314 // <window>: a #GdkWindow
9315 static Window* offscreen_window_get_embedder()(Window* window) nothrow {
9316 return gdk_offscreen_window_get_embedder(window);
9320 // Unintrospectable function: offscreen_window_get_pixmap() / gdk_offscreen_window_get_pixmap()
9321 // VERSION: 2.18
9322 // Gets the offscreen pixmap that an offscreen window renders into.
9323 // If you need to keep this around over window resizes, you need to
9324 // add a reference to it.
9325 // RETURNS: The offscreen pixmap, or %NULL if not offscreen
9326 // <window>: a #GdkWindow
9327 static Pixmap* offscreen_window_get_pixmap()(Window* window) nothrow {
9328 return gdk_offscreen_window_get_pixmap(window);
9332 // VERSION: 2.18
9333 // Sets @window to be embedded in @embedder.
9334 // To fully embed an offscreen window, in addition to calling this
9335 // function, it is also necessary to handle the #GdkWindow::pick-embedded-child
9336 // signal on the @embedder and the #GdkWindow::to-embedder and
9337 // #GdkWindow::from-embedder signals on @window.
9338 // <window>: a #GdkWindow
9339 // <embedder>: the #GdkWindow that @window gets embedded in
9340 static void offscreen_window_set_embedder()(Window* window, Window* embedder) nothrow {
9341 gdk_offscreen_window_set_embedder(window, embedder);
9345 // Unintrospectable function: pango_attr_emboss_color_new() / gdk_pango_attr_emboss_color_new()
9346 // VERSION: 2.12
9347 // Creates a new attribute specifying the color to emboss text with.
9348 // RETURNS: new #PangoAttribute
9349 // <color>: a GdkColor representing the color to emboss with
9350 static Pango.Attribute* pango_attr_emboss_color_new()(Color* color) nothrow {
9351 return gdk_pango_attr_emboss_color_new(color);
9355 // Unintrospectable function: pango_attr_embossed_new() / gdk_pango_attr_embossed_new()
9356 // Creates a new attribute flagging a region as embossed or not.
9357 // RETURNS: new #PangoAttribute
9358 // <embossed>: if the region should be embossed
9359 static Pango.Attribute* pango_attr_embossed_new()(int embossed) nothrow {
9360 return gdk_pango_attr_embossed_new(embossed);
9364 // Unintrospectable function: pango_attr_stipple_new() / gdk_pango_attr_stipple_new()
9365 // Creates a new attribute containing a stipple bitmap to be used when
9366 // rendering the text.
9367 // RETURNS: new #PangoAttribute
9368 // <stipple>: a bitmap to be set as stipple
9369 static Pango.Attribute* pango_attr_stipple_new()(Bitmap* stipple) nothrow {
9370 return gdk_pango_attr_stipple_new(stipple);
9374 // Unintrospectable function: pango_context_get() / gdk_pango_context_get()
9375 // Creates a #PangoContext for the default GDK screen.
9376 // The context must be freed when you're finished with it.
9377 // When using GTK+, normally you should use gtk_widget_get_pango_context()
9378 // instead of this function, to get the appropriate context for
9379 // the widget you intend to render text onto.
9380 // The newly created context will have the default font options (see
9381 // #cairo_font_options_t) for the default screen; if these options
9382 // change it will not be updated. Using gtk_widget_get_pango_context()
9383 // is more convenient if you want to keep a context around and track
9384 // changes to the screen's font rendering settings.
9385 // RETURNS: a new #PangoContext for the default display
9386 static Pango.Context* pango_context_get()() nothrow {
9387 return gdk_pango_context_get();
9391 // Unintrospectable function: pango_context_get_for_screen() / gdk_pango_context_get_for_screen()
9392 // VERSION: 2.2
9393 // Creates a #PangoContext for @screen.
9394 // The context must be freed when you're finished with it.
9395 // When using GTK+, normally you should use gtk_widget_get_pango_context()
9396 // instead of this function, to get the appropriate context for
9397 // the widget you intend to render text onto.
9398 // The newly created context will have the default font options
9399 // (see #cairo_font_options_t) for the screen; if these options
9400 // change it will not be updated. Using gtk_widget_get_pango_context()
9401 // is more convenient if you want to keep a context around and track
9402 // changes to the screen's font rendering settings.
9403 // RETURNS: a new #PangoContext for @screen
9404 // <screen>: the #GdkScreen for which the context is to be created.
9405 static Pango.Context* pango_context_get_for_screen()(Screen* screen) nothrow {
9406 return gdk_pango_context_get_for_screen(screen);
9410 // This function used to set the colormap to be used for drawing with
9411 // context used for drawing, so calling this function is no longer
9412 // necessary.
9413 // <context>: a #PangoContext
9414 // <colormap>: a #GdkColormap
9415 static void pango_context_set_colormap()(Pango.Context* context, Colormap* colormap) nothrow {
9416 gdk_pango_context_set_colormap(context, colormap);
9420 // Unintrospectable function: pango_layout_get_clip_region() / gdk_pango_layout_get_clip_region()
9421 // Obtains a clip region which contains the areas where the given ranges
9422 // of text would be drawn. @x_origin and @y_origin are the same position
9423 // you would pass to gdk_draw_layout_line(). @index_ranges should contain
9424 // ranges of bytes in the layout's text.
9425 // Note that the regions returned correspond to logical extents of the text
9426 // ranges, not ink extents. So the drawn layout may in fact touch areas out of
9427 // the clip region. The clip region is mainly useful for highlightling parts
9428 // of text, such as when text is selected.
9429 // RETURNS: a clip region containing the given ranges
9430 // <layout>: a #PangoLayout
9431 // <x_origin>: X pixel where you intend to draw the layout with this clip
9432 // <y_origin>: Y pixel where you intend to draw the layout with this clip
9433 // <index_ranges>: array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
9434 // <n_ranges>: number of ranges in @index_ranges, i.e. half the size of @index_ranges
9435 static Region* pango_layout_get_clip_region()(Pango.Layout* layout, int x_origin, int y_origin, int* index_ranges, int n_ranges) nothrow {
9436 return gdk_pango_layout_get_clip_region(layout, x_origin, y_origin, index_ranges, n_ranges);
9440 // Unintrospectable function: pango_layout_line_get_clip_region() / gdk_pango_layout_line_get_clip_region()
9441 // Obtains a clip region which contains the areas where the given
9442 // ranges of text would be drawn. @x_origin and @y_origin are the same
9443 // position you would pass to gdk_draw_layout_line(). @index_ranges
9444 // should contain ranges of bytes in the layout's text. The clip
9445 // region will include space to the left or right of the line (to the
9446 // layout bounding box) if you have indexes above or below the indexes
9447 // contained inside the line. This is to draw the selection all the way
9448 // to the side of the layout. However, the clip region is in line coordinates,
9449 // not layout coordinates.
9450 // Note that the regions returned correspond to logical extents of the text
9451 // ranges, not ink extents. So the drawn line may in fact touch areas out of
9452 // the clip region. The clip region is mainly useful for highlightling parts
9453 // of text, such as when text is selected.
9454 // RETURNS: a clip region containing the given ranges
9455 // <line>: a #PangoLayoutLine
9456 // <x_origin>: X pixel where you intend to draw the layout line with this clip
9457 // <y_origin>: baseline pixel where you intend to draw the layout line with this clip
9458 // <index_ranges>: array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
9459 // <n_ranges>: number of ranges in @index_ranges, i.e. half the size of @index_ranges
9460 static Region* pango_layout_line_get_clip_region()(Pango.LayoutLine* line, int x_origin, int y_origin, int* index_ranges, int n_ranges) nothrow {
9461 return gdk_pango_layout_line_get_clip_region(line, x_origin, y_origin, index_ranges, n_ranges);
9465 // VERSION: 2.2
9466 // Parse command line arguments, and store for future
9467 // use by calls to gdk_display_open().
9468 // Any arguments used by GDK are removed from the array and @argc and @argv are
9469 // updated accordingly.
9470 // You shouldn't call this function explicitely if you are using
9471 // gtk_init(), gtk_init_check(), gdk_init(), or gdk_init_check().
9472 // <argc>: the number of command line arguments.
9473 // <argv>: the array of command line arguments.
9474 static void parse_args()(/*inout*/ int* argc, /*inout*/ char*** argv) nothrow {
9475 gdk_parse_args(argc, argv);
9479 // Unintrospectable function: pixbuf_get_from_drawable() / gdk_pixbuf_get_from_drawable()
9480 // Transfers image data from a #GdkDrawable and converts it to an RGB(A)
9481 // representation inside a #GdkPixbuf. In other words, copies
9482 // image data from a server-side drawable to a client-side RGB(A) buffer.
9483 // This allows you to efficiently read individual pixels on the client side.
9484 // If the drawable @src has no colormap (gdk_drawable_get_colormap()
9485 // returns %NULL), then a suitable colormap must be specified.
9486 // Typically a #GdkWindow or a pixmap created by passing a #GdkWindow
9487 // to gdk_pixmap_new() will already have a colormap associated with
9488 // it. If the drawable has a colormap, the @cmap argument will be
9489 // ignored. If the drawable is a bitmap (1 bit per pixel pixmap),
9490 // then a colormap is not required; pixels with a value of 1 are
9491 // assumed to be white, and pixels with a value of 0 are assumed to be
9492 // black. For taking screenshots, gdk_colormap_get_system() returns
9493 // the correct colormap to use.
9494 // If the specified destination pixbuf @dest is %NULL, then this
9495 // function will create an RGB pixbuf with 8 bits per channel and no
9496 // alpha, with the same size specified by the @width and @height
9497 // arguments. In this case, the @dest_x and @dest_y arguments must be
9498 // specified as 0. If the specified destination pixbuf is not %NULL
9499 // and it contains alpha information, then the filled pixels will be
9500 // set to full opacity (alpha = 255).
9501 // If the specified drawable is a pixmap, then the requested source
9502 // rectangle must be completely contained within the pixmap, otherwise
9503 // the function will return %NULL. For pixmaps only (not for windows)
9504 // passing -1 for width or height is allowed to mean the full width
9505 // or height of the pixmap.
9506 // If the specified drawable is a window, and the window is off the
9507 // screen, then there is no image data in the obscured/offscreen
9508 // regions to be placed in the pixbuf. The contents of portions of the
9509 // pixbuf corresponding to the offscreen region are undefined.
9510 // If the window you're obtaining data from is partially obscured by
9511 // other windows, then the contents of the pixbuf areas corresponding
9512 // to the obscured regions are undefined.
9513 // If the target drawable is not mapped (typically because it's
9514 // iconified/minimized or not on the current workspace), then %NULL
9515 // will be returned.
9516 // If memory can't be allocated for the return value, %NULL will be returned
9517 // instead.
9518 // (In short, there are several ways this function can fail, and if it fails
9519 // it returns %NULL; so check the return value.)
9520 // This function calls gdk_drawable_get_image() internally and
9521 // converts the resulting image to a #GdkPixbuf, so the
9522 // documentation for gdk_drawable_get_image() may also be relevant.
9523 // pixbuf with a reference count of 1 if no destination pixbuf was specified, or %NULL on error
9524 // RETURNS: The same pixbuf as @dest if it was non-%NULL, or a newly-created
9525 // <dest>: Destination pixbuf, or %NULL if a new pixbuf should be created.
9526 // <src>: Source drawable.
9527 // <cmap>: A colormap if @src doesn't have one set.
9528 // <src_x>: Source X coordinate within drawable.
9529 // <src_y>: Source Y coordinate within drawable.
9530 // <dest_x>: Destination X coordinate in pixbuf, or 0 if @dest is NULL.
9531 // <dest_y>: Destination Y coordinate in pixbuf, or 0 if @dest is NULL.
9532 // <width>: Width in pixels of region to get.
9533 // <height>: Height in pixels of region to get.
9534 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) nothrow {
9535 return gdk_pixbuf_get_from_drawable(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height);
9539 // Unintrospectable function: pixbuf_get_from_image() / gdk_pixbuf_get_from_image()
9540 // Same as gdk_pixbuf_get_from_drawable() but gets the pixbuf from
9541 // an image.
9542 // RETURNS: @dest, newly-created pixbuf if @dest was %NULL, %NULL on error
9543 // <dest>: Destination pixbuf, or %NULL if a new pixbuf should be created.
9544 // <src>: Source #GdkImage.
9545 // <cmap>: A colormap, or %NULL to use the one for @src
9546 // <src_x>: Source X coordinate within drawable.
9547 // <src_y>: Source Y coordinate within drawable.
9548 // <dest_x>: Destination X coordinate in pixbuf, or 0 if @dest is NULL.
9549 // <dest_y>: Destination Y coordinate in pixbuf, or 0 if @dest is NULL.
9550 // <width>: Width in pixels of region to get.
9551 // <height>: Height in pixels of region to get.
9552 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) nothrow {
9553 return gdk_pixbuf_get_from_image(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height);
9557 // Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
9558 // and @mask_return arguments, respectively, and renders a pixbuf and its
9559 // corresponding thresholded alpha mask to them. This is merely a convenience
9560 // function; applications that need to render pixbufs with dither offsets or to
9561 // given drawables should use gdk_draw_pixbuf() and gdk_pixbuf_render_threshold_alpha().
9562 // The pixmap that is created is created for the colormap returned
9563 // by gdk_rgb_get_colormap(). You normally will want to instead use
9564 // the actual colormap for a widget, and use
9565 // gdk_pixbuf_render_pixmap_and_mask_for_colormap().
9566 // If the pixbuf does not have an alpha channel, then *@mask_return will be set
9567 // to %NULL.
9568 // <pixbuf>: A pixbuf.
9569 // <pixmap_return>: Location to store a pointer to the created pixmap, or %NULL if the pixmap is not needed.
9570 // <mask_return>: Location to store a pointer to the created mask, or %NULL if the mask is not needed.
9571 // <alpha_threshold>: Threshold value for opacity values.
9572 static void pixbuf_render_pixmap_and_mask()(GdkPixbuf2.Pixbuf* pixbuf, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) nothrow {
9573 gdk_pixbuf_render_pixmap_and_mask(pixbuf, pixmap_return, mask_return, alpha_threshold);
9577 // Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
9578 // and @mask_return arguments, respectively, and renders a pixbuf and its
9579 // corresponding tresholded alpha mask to them. This is merely a convenience
9580 // function; applications that need to render pixbufs with dither offsets or to
9581 // given drawables should use gdk_draw_pixbuf(), and gdk_pixbuf_render_threshold_alpha().
9582 // The pixmap that is created uses the #GdkColormap specified by @colormap.
9583 // This colormap must match the colormap of the window where the pixmap
9584 // will eventually be used or an error will result.
9585 // If the pixbuf does not have an alpha channel, then *@mask_return will be set
9586 // to %NULL.
9587 // <pixbuf>: A pixbuf.
9588 // <colormap>: A #GdkColormap
9589 // <pixmap_return>: Location to store a pointer to the created pixmap, or %NULL if the pixmap is not needed.
9590 // <mask_return>: Location to store a pointer to the created mask, or %NULL if the mask is not needed.
9591 // <alpha_threshold>: Threshold value for opacity values.
9592 static void pixbuf_render_pixmap_and_mask_for_colormap()(GdkPixbuf2.Pixbuf* pixbuf, Colormap* colormap, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) nothrow {
9593 gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, colormap, pixmap_return, mask_return, alpha_threshold);
9597 // Takes the opacity values in a rectangular portion of a pixbuf and thresholds
9598 // them to produce a bi-level alpha mask that can be used as a clipping mask for
9599 // a drawable.
9600 // <pixbuf>: A pixbuf.
9601 // <bitmap>: Bitmap where the bilevel mask will be painted to.
9602 // <src_x>: Source X coordinate.
9603 // <src_y>: source Y coordinate.
9604 // <dest_x>: Destination X coordinate.
9605 // <dest_y>: Destination Y coordinate.
9606 // <width>: Width of region to threshold, or -1 to use pixbuf width
9607 // <height>: Height of region to threshold, or -1 to use pixbuf height
9608 // <alpha_threshold>: Opacity values below this will be painted as zero; all other values will be painted as one.
9609 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) nothrow {
9610 gdk_pixbuf_render_threshold_alpha(pixbuf, bitmap, src_x, src_y, dest_x, dest_y, width, height, alpha_threshold);
9614 // DEPRECATED (v2.4) function: pixbuf_render_to_drawable - This function is obsolete. Use gdk_draw_pixbuf() instead.
9615 // Renders a rectangular portion of a pixbuf to a drawable while using the
9616 // specified GC. This is done using GdkRGB, so the specified drawable must have
9617 // the GdkRGB visual and colormap. Note that this function will ignore the
9618 // opacity information for images with an alpha channel; the GC must already
9619 // have the clipping mask set if you want transparent regions to show through.
9620 // For an explanation of dither offsets, see the GdkRGB documentation. In
9621 // brief, the dither offset is important when re-rendering partial regions of an
9622 // image to a rendered version of the full image, or for when the offsets to a
9623 // base position change, as in scrolling. The dither matrix has to be shifted
9624 // for consistent visual results. If you do not have any of these cases, the
9625 // dither offsets can be both zero.
9626 // <pixbuf>: A pixbuf.
9627 // <drawable>: Destination drawable.
9628 // <gc>: GC used for rendering.
9629 // <src_x>: Source X coordinate within pixbuf.
9630 // <src_y>: Source Y coordinate within pixbuf.
9631 // <dest_x>: Destination X coordinate within drawable.
9632 // <dest_y>: Destination Y coordinate within drawable.
9633 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width
9634 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height
9635 // <dither>: Dithering mode for GdkRGB.
9636 // <x_dither>: X offset for dither.
9637 // <y_dither>: Y offset for dither.
9638 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) nothrow {
9639 gdk_pixbuf_render_to_drawable(pixbuf, drawable, gc, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither);
9643 // DEPRECATED (v2.4) function: pixbuf_render_to_drawable_alpha - This function is obsolete. Use gdk_draw_pixbuf() instead.
9644 // Renders a rectangular portion of a pixbuf to a drawable. The destination
9645 // drawable must have a colormap. All windows have a colormap, however, pixmaps
9646 // only have colormap by default if they were created with a non-%NULL window argument.
9647 // Otherwise a colormap must be set on them with gdk_drawable_set_colormap.
9648 // On older X servers, rendering pixbufs with an alpha channel involves round trips
9649 // to the X server, and may be somewhat slow.
9650 // <pixbuf>: A pixbuf.
9651 // <drawable>: Destination drawable.
9652 // <src_x>: Source X coordinate within pixbuf.
9653 // <src_y>: Source Y coordinates within pixbuf.
9654 // <dest_x>: Destination X coordinate within drawable.
9655 // <dest_y>: Destination Y coordinate within drawable.
9656 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width.
9657 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height.
9658 // <alpha_mode>: Ignored. Present for backwards compatibility.
9659 // <alpha_threshold>: Ignored. Present for backwards compatibility
9660 // <dither>: Dithering mode for GdkRGB.
9661 // <x_dither>: X offset for dither.
9662 // <y_dither>: Y offset for dither.
9663 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) nothrow {
9664 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);
9667 static GrabStatus pointer_grab()(Window* window, int owner_events, EventMask event_mask, Window* confine_to, Cursor* cursor, uint time_) nothrow {
9668 return gdk_pointer_grab(window, owner_events, event_mask, confine_to, cursor, time_);
9672 // Determines information about the current pointer grab.
9673 // This is not public API and must not be used by applications.
9674 // pointer grabbed.
9675 // RETURNS: %TRUE if this application currently has the
9676 // <display>: the #GdkDisplay for which to get the grab information
9677 // <grab_window>: location to store current grab window
9678 // <owner_events>: location to store boolean indicating whether the @owner_events flag to gdk_pointer_grab() was %TRUE.
9679 static int pointer_grab_info_libgtk_only()(Display* display, Window** grab_window, int* owner_events) nothrow {
9680 return gdk_pointer_grab_info_libgtk_only(display, grab_window, owner_events);
9684 // Returns %TRUE if the pointer on the default display is currently
9685 // grabbed by this application.
9686 // Note that this does not take the inmplicit pointer grab on button
9687 // presses into account.
9688 // RETURNS: %TRUE if the pointer is currently grabbed by this application.*
9689 static int pointer_is_grabbed()() nothrow {
9690 return gdk_pointer_is_grabbed();
9694 // Ungrabs the pointer on the default display, if it is grabbed by this
9695 // application.
9696 // <time_>: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is available.
9697 static void pointer_ungrab()(uint time_) nothrow {
9698 gdk_pointer_ungrab(time_);
9701 static void pre_parse_libgtk_only()() nothrow {
9702 gdk_pre_parse_libgtk_only();
9705 static void property_change()(Window* window, Atom property, Atom type, int format, PropMode mode, ubyte* data, int nelements) nothrow {
9706 gdk_property_change(window, property, type, format, mode, data, nelements);
9709 static void property_delete()(Window* window, Atom property) nothrow {
9710 gdk_property_delete(window, property);
9713 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) nothrow {
9714 return gdk_property_get(window, property, type, offset, length, pdelete, actual_property_type, actual_format, actual_length, data);
9718 // This function returns the available bit depths for the default
9719 // screen. It's equivalent to listing the visuals
9720 // (gdk_list_visuals()) and then looking at the depth field in each
9721 // visual, removing duplicates.
9722 // The array returned by this function should not be freed.
9723 // <depths>: return location for available depths
9724 // <count>: return location for number of available depths
9725 static void query_depths()(/*out*/ int** depths, /*out*/ int* count) nothrow {
9726 gdk_query_depths(depths, count);
9730 // This function returns the available visual types for the default
9731 // screen. It's equivalent to listing the visuals
9732 // (gdk_list_visuals()) and then looking at the type field in each
9733 // visual, removing duplicates.
9734 // The array returned by this function should not be freed.
9735 // <visual_types>: return location for the available visual types
9736 // <count>: return location for the number of available visual types
9737 static void query_visual_types()(VisualType** visual_types, int* count) nothrow {
9738 gdk_query_visual_types(visual_types, count);
9742 // Unintrospectable function: region_new() / gdk_region_new()
9743 // Creates a new empty #GdkRegion.
9744 // RETURNS: a new empty #GdkRegion
9745 static Region* region_new()() nothrow {
9746 return gdk_region_new();
9750 // Unintrospectable function: region_polygon() / gdk_region_polygon()
9751 // DEPRECATED (v2.22) function: region_polygon - There is no replacement. For working with paths, please
9752 // Creates a new #GdkRegion using the polygon defined by a
9753 // number of points.
9754 // use Cairo.
9755 // RETURNS: a new #GdkRegion based on the given polygon
9756 // <points>: an array of #GdkPoint structs
9757 // <n_points>: the number of elements in the @points array
9758 // <fill_rule>: specifies which pixels are included in the region when the polygon overlaps itself.
9759 static Region* region_polygon()(Point* points, int n_points, FillRule fill_rule) nothrow {
9760 return gdk_region_polygon(points, n_points, fill_rule);
9764 // Unintrospectable function: region_rectangle() / gdk_region_rectangle()
9765 // Creates a new region containing the area @rectangle.
9766 // RETURNS: a new region
9767 // <rectangle>: a #GdkRectangle
9768 static Region* region_rectangle()(Rectangle* rectangle) nothrow {
9769 return gdk_region_rectangle(rectangle);
9772 // Unintrospectable function: rgb_cmap_new() / gdk_rgb_cmap_new()
9773 static RgbCmap* rgb_cmap_new()(uint* colors, int n_colors) nothrow {
9774 return gdk_rgb_cmap_new(colors, n_colors);
9777 static int rgb_colormap_ditherable()(Colormap* cmap) nothrow {
9778 return gdk_rgb_colormap_ditherable(cmap);
9781 static int rgb_ditherable()() nothrow {
9782 return gdk_rgb_ditherable();
9786 // DEPRECATED (v2.22) function: rgb_find_color - Cairo handles colors automatically.
9787 // drawable you're using to draw. If you're drawing to a #GtkWidget,
9788 // call gtk_widget_get_colormap().
9789 // gdk_rgb_find_color() will fill in the %pixel field with the best
9790 // matching pixel from a color cube. The color is then ready to be
9791 // used for drawing, e.g. you can call gdk_gc_set_foreground() which
9792 // expects %pixel to be initialized.
9793 // In many cases, you can avoid this whole issue by calling
9794 // gdk_gc_set_rgb_fg_color() or gdk_gc_set_rgb_bg_color(), which
9795 // do not expect %pixel to be initialized in advance. If you use those
9796 // functions, there's no need for gdk_rgb_find_color().
9797 // <colormap>: a #GdkColormap
9798 // <color>: a #GdkColor
9799 static void rgb_find_color()(Colormap* colormap, Color* color) nothrow {
9800 gdk_rgb_find_color(colormap, color);
9803 static void rgb_gc_set_background()(GC* gc, uint rgb) nothrow {
9804 gdk_rgb_gc_set_background(gc, rgb);
9807 static void rgb_gc_set_foreground()(GC* gc, uint rgb) nothrow {
9808 gdk_rgb_gc_set_foreground(gc, rgb);
9812 // DEPRECATED (v2.22) function: rgb_get_colormap - Use gdk_screen_get_system_colormap (gdk_screen_get_default ()) instead.
9813 // Get the preferred colormap for rendering image data. Not a
9814 // very useful function; historically, GDK could only render RGB image
9815 // data to one colormap and visual, but in the current version it can
9816 // render to any colormap and visual. So there's no need to call this
9817 // function.
9818 // RETURNS: the preferred colormap
9819 static Colormap* rgb_get_colormap()() nothrow {
9820 return gdk_rgb_get_colormap();
9824 // DEPRECATED (v2.22) function: rgb_get_visual - Use gdk_visual_get_system_visual (gdk_screen_get_default ()) instead.
9825 // Gets a "preferred visual" chosen by GdkRGB for rendering image data
9826 // on the default screen. In previous versions of GDK, this was the
9827 // only visual GdkRGB could use for rendering. In current versions,
9828 // it's simply the visual GdkRGB would have chosen as the optimal one
9829 // in those previous versions. GdkRGB can now render to drawables with
9830 // any visual.
9831 // RETURNS: The #GdkVisual chosen by GdkRGB.
9832 static Visual* rgb_get_visual()() nothrow {
9833 return gdk_rgb_get_visual();
9836 static void rgb_init()() nothrow {
9837 gdk_rgb_init();
9840 static void rgb_set_install()(int install) nothrow {
9841 gdk_rgb_set_install(install);
9844 static void rgb_set_min_colors()(int min_colors) nothrow {
9845 gdk_rgb_set_min_colors(min_colors);
9848 static void rgb_set_verbose()(int verbose) nothrow {
9849 gdk_rgb_set_verbose(verbose);
9852 static c_ulong rgb_xpixel_from_rgb()(uint rgb) nothrow {
9853 return gdk_rgb_xpixel_from_rgb(rgb);
9856 static void selection_convert()(Window* requestor, Atom selection, Atom target, uint time_) nothrow {
9857 gdk_selection_convert(requestor, selection, target, time_);
9860 // Unintrospectable function: selection_owner_get() / gdk_selection_owner_get()
9861 static Window* selection_owner_get()(Atom selection) nothrow {
9862 return gdk_selection_owner_get(selection);
9866 // Unintrospectable function: selection_owner_get_for_display() / gdk_selection_owner_get_for_display()
9867 // VERSION: 2.2
9868 // Determine the owner of the given selection.
9869 // Note that the return value may be owned by a different
9870 // process if a foreign window was previously created for that
9871 // window, but a new foreign window will never be created by this call.
9872 // window known to the current process, the #GdkWindow that owns the
9873 // selection, otherwise %NULL.
9874 // RETURNS: if there is a selection owner for this window, and it is a
9875 // <display>: a #GdkDisplay.
9876 // <selection>: an atom indentifying a selection.
9877 static Window* selection_owner_get_for_display()(Display* display, Atom selection) nothrow {
9878 return gdk_selection_owner_get_for_display(display, selection);
9881 static int selection_owner_set()(Window* owner, Atom selection, uint time_, int send_event) nothrow {
9882 return gdk_selection_owner_set(owner, selection, time_, send_event);
9886 // VERSION: 2.2
9887 // Sets the #GdkWindow @owner as the current owner of the selection @selection.
9888 // otherwise %FALSE.
9889 // RETURNS: %TRUE if the selection owner was successfully changed to owner,
9890 // <display>: the #GdkDisplay.
9891 // <owner>: a #GdkWindow or %NULL to indicate that the owner for the given should be unset.
9892 // <selection>: an atom identifying a selection.
9893 // <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.
9894 // <send_event>: if %TRUE, and the new owner is different from the current owner, the current owner will be sent a SelectionClear event.
9895 static int selection_owner_set_for_display()(Display* display, Window* owner, Atom selection, uint time_, int send_event) nothrow {
9896 return gdk_selection_owner_set_for_display(display, owner, selection, time_, send_event);
9900 // Retrieves selection data that was stored by the selection
9901 // data in response to a call to gdk_selection_convert(). This function
9902 // will not be used by applications, who should use the #GtkClipboard
9903 // API instead.
9904 // RETURNS: the length of the retrieved data.
9905 // <requestor>: the window on which the data is stored
9906 // <data>: location to store a pointer to the retrieved data.
9907 // <prop_type>: location to store the type of the property.
9908 // <prop_format>: location to store the format of the property.
9909 static int selection_property_get()(Window* requestor, ubyte** data, Atom* prop_type, int* prop_format) nothrow {
9910 return gdk_selection_property_get(requestor, data, prop_type, prop_format);
9913 static void selection_send_notify()(NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) nothrow {
9914 gdk_selection_send_notify(requestor, selection, target, property, time_);
9918 // VERSION: 2.2
9919 // Send a response to SelectionRequest event.
9920 // <display>: the #GdkDisplay where @requestor is realized
9921 // <requestor>: window to which to deliver response.
9922 // <selection>: selection that was requested.
9923 // <target>: target that was selected.
9924 // <property>: property in which the selection owner stored the data, or %GDK_NONE to indicate that the request was rejected.
9925 // <time_>: timestamp.
9926 static void selection_send_notify_for_display()(Display* display, NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) nothrow {
9927 gdk_selection_send_notify_for_display(display, requestor, selection, target, property, time_);
9931 // Set the double click time for the default display. See
9932 // gdk_display_set_double_click_time().
9933 // See also gdk_display_set_double_click_distance().
9934 // Applications should <emphasis>not</emphasis> set this, it is a
9935 // global user-configured setting.
9936 // <msec>: double click time in milliseconds (thousandths of a second)
9937 static void set_double_click_time()(uint msec) nothrow {
9938 gdk_set_double_click_time(msec);
9941 static char* /*new*/ set_locale()() nothrow {
9942 return gdk_set_locale();
9946 // Unintrospectable function: set_pointer_hooks() / gdk_set_pointer_hooks()
9947 // DEPRECATED (v2.24) function: set_pointer_hooks - This function will go away in GTK 3 for lack of use cases.
9948 // This function allows for hooking into the operation
9949 // of getting the current location of the pointer. This
9950 // is only useful for such low-level tools as an
9951 // event recorder. Applications should never have any
9952 // reason to use this facility.
9953 // This function is not multihead safe. For multihead operation,
9954 // see gdk_display_set_pointer_hooks().
9955 // RETURNS: the previous pointer hook table
9956 // <new_hooks>: a table of pointers to functions for getting quantities related to the current pointer position, or %NULL to restore the default table.
9957 static PointerHooks* set_pointer_hooks()(PointerHooks* new_hooks) nothrow {
9958 return gdk_set_pointer_hooks(new_hooks);
9961 static void set_program_class()(char* program_class) nothrow {
9962 gdk_set_program_class(program_class);
9966 // Sets whether a trace of received events is output.
9967 // Note that GTK+ must be compiled with debugging (that is,
9968 // configured using the <option>--enable-debug</option> option)
9969 // to use this option.
9970 // <show_events>: %TRUE to output event debugging information.
9971 static void set_show_events()(int show_events) nothrow {
9972 gdk_set_show_events(show_events);
9976 // Sets the <literal>SM_CLIENT_ID</literal> property on the application's leader window so that
9977 // the window manager can save the application's state using the X11R6 ICCCM
9978 // session management protocol.
9979 // See the X Session Management Library documentation for more information on
9980 // session management and the Inter-Client Communication Conventions Manual
9981 // (ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
9982 // (Both documents are part of the X Window System distribution.)
9983 // <sm_client_id>: the client id assigned by the session manager when the connection was opened, or %NULL to remove the property.
9984 static void set_sm_client_id()(char* sm_client_id) nothrow {
9985 gdk_set_sm_client_id(sm_client_id);
9988 static void set_use_xshm()(int use_xshm) nothrow {
9989 gdk_set_use_xshm(use_xshm);
9993 // Obtains a desktop-wide setting, such as the double-click time,
9994 // for the default screen. See gdk_screen_get_setting().
9995 // in @value, %FALSE otherwise.
9996 // RETURNS: %TRUE if the setting existed and a value was stored
9997 // <name>: the name of the setting.
9998 // <value>: location to store the value of the setting.
9999 static int setting_get()(char* name, GObject2.Value* value) nothrow {
10000 return gdk_setting_get(name, value);
10004 // VERSION: 2.4
10005 // DEPRECATED (v2.24) function: spawn_command_line_on_screen - This function is being removed in 3.0. Use
10006 // Like g_spawn_command_line_async(), except the child process is
10007 // spawned in such an environment that on calling gdk_display_open()
10008 // it would be returned a #GdkDisplay with @screen as the default
10009 // screen.
10010 // This is useful for applications which wish to launch an application
10011 // on a specific screen.
10012 // either g_spawn_command_line_sync(), g_spawn_command_line_async() or
10013 // #GdkAppLaunchContext instead.
10014 // RETURNS: %TRUE on success, %FALSE if error is set.
10015 // <screen>: a #GdkScreen
10016 // <command_line>: a command line
10017 static int spawn_command_line_on_screen()(Screen* screen, char* command_line, GLib2.Error** error=null) nothrow {
10018 return gdk_spawn_command_line_on_screen(screen, command_line, error);
10022 // Unintrospectable function: spawn_on_screen() / gdk_spawn_on_screen()
10023 // VERSION: 2.4
10024 // DEPRECATED (v2.24) function: spawn_on_screen - This function is being removed in 3.0. Use
10025 // Like g_spawn_async(), except the child process is spawned in such
10026 // an environment that on calling gdk_display_open() it would be
10027 // returned a #GdkDisplay with @screen as the default screen.
10028 // This is useful for applications which wish to launch an application
10029 // on a specific screen.
10030 // either g_spawn_sync(), g_spawn_async(), or #GdkAppLaunchContext instead.
10031 // RETURNS: %TRUE on success, %FALSE if error is set
10032 // <screen>: a #GdkScreen
10033 // <working_directory>: child's current working directory, or %NULL to inherit parent's
10034 // <argv>: child's argument vector
10035 // <envp>: child's environment, or %NULL to inherit parent's
10036 // <flags>: flags from #GSpawnFlags
10037 // <child_setup>: function to run in the child just before exec()
10038 // <user_data>: user data for @child_setup
10039 // <child_pid>: return location for child process ID, or %NULL
10040 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) nothrow {
10041 return gdk_spawn_on_screen(screen, working_directory, argv, envp, flags, child_setup, user_data, child_pid, error);
10045 // Unintrospectable function: spawn_on_screen_with_pipes() / gdk_spawn_on_screen_with_pipes()
10046 // VERSION: 2.4
10047 // DEPRECATED (v2.24) function: spawn_on_screen_with_pipes - This function is being removed in 3.0. Use
10048 // Like g_spawn_async_with_pipes(), except the child process is
10049 // spawned in such an environment that on calling gdk_display_open()
10050 // it would be returned a #GdkDisplay with @screen as the default
10051 // screen.
10052 // This is useful for applications which wish to launch an application
10053 // on a specific screen.
10054 // either g_spawn_async_with_pipes() or #GdkAppLaunchContext instead.
10055 // RETURNS: %TRUE on success, %FALSE if an error was set
10056 // <screen>: a #GdkScreen
10057 // <working_directory>: child's current working directory, or %NULL to inherit parent's
10058 // <argv>: child's argument vector
10059 // <envp>: child's environment, or %NULL to inherit parent's
10060 // <flags>: flags from #GSpawnFlags
10061 // <child_setup>: function to run in the child just before exec()
10062 // <user_data>: user data for @child_setup
10063 // <child_pid>: return location for child process ID, or %NULL
10064 // <standard_input>: return location for file descriptor to write to child's stdin, or %NULL
10065 // <standard_output>: return location for file descriptor to read child's stdout, or %NULL
10066 // <standard_error>: return location for file descriptor to read child's stderr, or %NULL
10067 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) nothrow {
10068 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);
10072 // Gets the metrics of a nul-terminated string.
10073 // <font>: a #GdkFont.
10074 // <string>: the nul-terminated string to measure.
10075 // <lbearing>: the left bearing of the string.
10076 // <rbearing>: the right bearing of the string.
10077 // <width>: the width of the string.
10078 // <ascent>: the ascent of the string.
10079 // <descent>: the descent of the string.
10080 static void string_extents()(Font* font, char* string_, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) nothrow {
10081 gdk_string_extents(font, string_, lbearing, rbearing, width, ascent, descent);
10085 // Determines the total height of a given nul-terminated
10086 // string. This value is not generally useful, because you
10087 // cannot determine how this total height will be drawn in
10088 // relation to the baseline. See gdk_string_extents().
10089 // RETURNS: the height of the string in pixels.
10090 // <font>: a #GdkFont
10091 // <string>: the nul-terminated string to measure.
10092 static int string_height()(Font* font, char* string_) nothrow {
10093 return gdk_string_height(font, string_);
10097 // Determines the distance from the origin to the rightmost
10098 // portion of a nul-terminated string when drawn. This is not the
10099 // correct value for determining the origin of the next
10100 // portion when drawing text in multiple pieces.
10101 // See gdk_string_width().
10102 // RETURNS: the right bearing of the string in pixels.
10103 // <font>: a #GdkFont
10104 // <string>: the nul-terminated string to measure.
10105 static int string_measure()(Font* font, char* string_) nothrow {
10106 return gdk_string_measure(font, string_);
10109 static int string_to_compound_text()(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow {
10110 return gdk_string_to_compound_text(str, encoding, format, ctext, length);
10114 // VERSION: 2.2
10115 // Convert a string from the encoding of the current
10116 // locale into a form suitable for storing in a window property.
10117 // RETURNS: 0 upon success, non-zero upon failure.
10118 // <display>: the #GdkDisplay where the encoding is defined.
10119 // <str>: a nul-terminated string.
10120 // <encoding>: location to store the encoding atom (to be used as the type for the property).
10121 // <format>: location to store the format of the property
10122 // <ctext>: location to store newly allocated data for the property.
10123 // <length>: the length of @text, in bytes
10124 static int string_to_compound_text_for_display()(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow {
10125 return gdk_string_to_compound_text_for_display(display, str, encoding, format, ctext, length);
10129 // Determines the width of a nul-terminated string.
10130 // (The distance from the origin of the string to the
10131 // point where the next string in a sequence of strings
10132 // should be drawn)
10133 // RETURNS: the width of the string in pixels.
10134 // <font>: a #GdkFont
10135 // <string>: the nul-terminated string to measure
10136 static int string_width()(Font* font, char* string_) nothrow {
10137 return gdk_string_width(font, string_);
10140 static void synthesize_window_state()(Window* window, WindowState unset_flags, WindowState set_flags) nothrow {
10141 gdk_synthesize_window_state(window, unset_flags, set_flags);
10145 // VERSION: 2.14
10146 // This function retrieves a pixel from @window to force the windowing
10147 // system to carry out any pending rendering commands.
10148 // This function is intended to be used to syncronize with rendering
10149 // pipelines, to benchmark windowing system rendering operations.
10150 // <window>: a mapped #GdkWindow
10151 static void test_render_sync()(Window* window) nothrow {
10152 gdk_test_render_sync(window);
10156 // VERSION: 2.14
10157 // This function is intended to be used in GTK+ test programs.
10158 // It will warp the mouse pointer to the given (@x,@y) corrdinates
10159 // within @window and simulate a button press or release event.
10160 // Because the mouse pointer needs to be warped to the target
10161 // location, use of this function outside of test programs that
10162 // run in their own virtual windowing system (e.g. Xvfb) is not
10163 // recommended.
10164 // Also, gtk_test_simulate_button() is a fairly low level function,
10165 // for most testing purposes, gtk_test_widget_click() is the right
10166 // function to call which will generate a button press event followed
10167 // by its accompanying button release event.
10168 // were carried out successfully.
10169 // RETURNS: whether all actions neccessary for a button event simulation
10170 // <window>: a #GdkWindow to simulate a button event for.
10171 // <x>: x coordinate within @window for the button event.
10172 // <y>: y coordinate within @window for the button event.
10173 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
10174 // <modifiers>: Keyboard modifiers the event is setup with.
10175 // <button_pressrelease>: either %GDK_BUTTON_PRESS or %GDK_BUTTON_RELEASE
10176 static int test_simulate_button()(Window* window, int x, int y, uint button, ModifierType modifiers, EventType button_pressrelease) nothrow {
10177 return gdk_test_simulate_button(window, x, y, button, modifiers, button_pressrelease);
10181 // VERSION: 2.14
10182 // This function is intended to be used in GTK+ test programs.
10183 // If (@x,@y) are > (-1,-1), it will warp the mouse pointer to
10184 // the given (@x,@y) corrdinates within @window and simulate a
10185 // key press or release event.
10186 // When the mouse pointer is warped to the target location, use
10187 // of this function outside of test programs that run in their
10188 // own virtual windowing system (e.g. Xvfb) is not recommended.
10189 // If (@x,@y) are passed as (-1,-1), the mouse pointer will not
10190 // be warped and @window origin will be used as mouse pointer
10191 // location for the event.
10192 // Also, gtk_test_simulate_key() is a fairly low level function,
10193 // for most testing purposes, gtk_test_widget_send_key() is the
10194 // right function to call which will generate a key press event
10195 // followed by its accompanying key release event.
10196 // were carried out successfully.
10197 // RETURNS: whether all actions neccessary for a key event simulation
10198 // <window>: a #GdkWindow to simulate a key event for.
10199 // <x>: x coordinate within @window for the key event.
10200 // <y>: y coordinate within @window for the key event.
10201 // <keyval>: A GDK keyboard value.
10202 // <modifiers>: Keyboard modifiers the event is setup with.
10203 // <key_pressrelease>: either %GDK_KEY_PRESS or %GDK_KEY_RELEASE
10204 static int test_simulate_key()(Window* window, int x, int y, uint keyval, ModifierType modifiers, EventType key_pressrelease) nothrow {
10205 return gdk_test_simulate_key(window, x, y, keyval, modifiers, key_pressrelease);
10208 static void text_extents()(Font* font, char* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) nothrow {
10209 gdk_text_extents(font, text, text_length, lbearing, rbearing, width, ascent, descent);
10212 static void text_extents_wc()(Font* font, WChar* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) nothrow {
10213 gdk_text_extents_wc(font, text, text_length, lbearing, rbearing, width, ascent, descent);
10217 // Determines the total height of a given string.
10218 // This value is not generally useful, because you cannot
10219 // determine how this total height will be drawn in
10220 // relation to the baseline. See gdk_text_extents().
10221 // RETURNS: the height of the string in pixels.
10222 // <font>: a #GdkFont
10223 // <text>: the text to measure.
10224 // <text_length>: the length of the text in bytes.
10225 static int text_height()(Font* font, char* text, int text_length) nothrow {
10226 return gdk_text_height(font, text, text_length);
10230 // Determines the distance from the origin to the rightmost
10231 // portion of a string when drawn. This is not the
10232 // correct value for determining the origin of the next
10233 // portion when drawing text in multiple pieces.
10234 // See gdk_text_width().
10235 // RETURNS: the right bearing of the string in pixels.
10236 // <font>: a #GdkFont
10237 // <text>: the text to measure.
10238 // <text_length>: the length of the text in bytes.
10239 static int text_measure()(Font* font, char* text, int text_length) nothrow {
10240 return gdk_text_measure(font, text, text_length);
10243 static int text_property_to_text_list()(Atom encoding, int format, ubyte* text, int length, char*** list) nothrow {
10244 return gdk_text_property_to_text_list(encoding, format, text, length, list);
10248 // VERSION: 2.2
10249 // Convert a text string from the encoding as it is stored
10250 // in a property into an array of strings in the encoding of
10251 // the current locale. (The elements of the array represent the
10252 // nul-separated elements of the original text string.)
10253 // if the conversion failed.
10254 // RETURNS: the number of strings stored in list, or 0,
10255 // <display>: The #GdkDisplay where the encoding is defined.
10256 // <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.
10257 // <format>: the format of the property.
10258 // <text>: The text data.
10259 // <length>: The number of items to transform.
10260 // <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().
10261 static int text_property_to_text_list_for_display()(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) nothrow {
10262 return gdk_text_property_to_text_list_for_display(display, encoding, format, text, length, list);
10266 // Convert a text property in the giving encoding to
10267 // a list of UTF-8 strings.
10268 // list.
10269 // RETURNS: the number of strings in the resulting
10270 // <encoding>: an atom representing the encoding of the text
10271 // <format>: the format of the property
10272 // <text>: the text to convert
10273 // <length>: the length of @text, in bytes
10274 // <list>: location to store the list of strings or %NULL. The list should be freed with g_strfreev().
10275 static int text_property_to_utf8_list()(Atom encoding, int format, ubyte* text, int length, char*** list=null) nothrow {
10276 return gdk_text_property_to_utf8_list(encoding, format, text, length, list);
10280 // VERSION: 2.2
10281 // Converts a text property in the given encoding to
10282 // a list of UTF-8 strings.
10283 // list.
10284 // RETURNS: the number of strings in the resulting
10285 // <display>: a #GdkDisplay
10286 // <encoding>: an atom representing the encoding of the text
10287 // <format>: the format of the property
10288 // <text>: the text to convert
10289 // <length>: the length of @text, in bytes
10290 // <list>: location to store the list of strings or %NULL. The list should be freed with g_strfreev().
10291 static int text_property_to_utf8_list_for_display()(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) nothrow {
10292 return gdk_text_property_to_utf8_list_for_display(display, encoding, format, text, length, list);
10295 static int text_width()(Font* font, char* text, int text_length) nothrow {
10296 return gdk_text_width(font, text, text_length);
10299 static int text_width_wc()(Font* font, WChar* text, int text_length) nothrow {
10300 return gdk_text_width_wc(font, text, text_length);
10304 // Unintrospectable function: threads_add_idle() / gdk_threads_add_idle()
10305 // VERSION: 2.12
10306 // A wrapper for the common usage of gdk_threads_add_idle_full()
10307 // assigning the default priority, #G_PRIORITY_DEFAULT_IDLE.
10308 // See gdk_threads_add_idle_full().
10309 // RETURNS: the ID (greater than 0) of the event source.
10310 // <function>: function to call
10311 // <data>: data to pass to @function
10312 static uint threads_add_idle()(GLib2.SourceFunc function_, void* data) nothrow {
10313 return gdk_threads_add_idle(function_, data);
10317 // VERSION: 2.12
10318 // Adds a function to be called whenever there are no higher priority
10319 // events pending. If the function returns %FALSE it is automatically
10320 // removed from the list of event sources and will not be called again.
10321 // This variant of g_idle_add_full() calls @function with the GDK lock
10322 // held. It can be thought of a MT-safe version for GTK+ widgets for the
10323 // following use case, where you have to worry about idle_callback()
10324 // running in thread A and accessing @self after it has been finalized
10325 // in thread B:
10326 // |[
10327 // static gboolean
10328 // idle_callback (gpointer data)
10329 // {
10330 // /&ast; gdk_threads_enter(); would be needed for g_idle_add() &ast;/
10331 // SomeWidget *self = data;
10332 // /&ast; do stuff with self &ast;/
10333 // self->idle_id = 0;
10334 // /&ast; gdk_threads_leave(); would be needed for g_idle_add() &ast;/
10335 // return FALSE;
10336 // }
10337 // static void
10338 // some_widget_do_stuff_later (SomeWidget *self)
10339 // {
10340 // self->idle_id = gdk_threads_add_idle (idle_callback, self)
10341 // /&ast; using g_idle_add() here would require thread protection in the callback &ast;/
10342 // }
10343 // static void
10344 // some_widget_finalize (GObject *object)
10345 // {
10346 // SomeWidget *self = SOME_WIDGET (object);
10347 // if (self->idle_id)
10348 // g_source_remove (self->idle_id);
10349 // G_OBJECT_CLASS (parent_class)->finalize (object);
10350 // }
10351 // ]|
10352 // RETURNS: the ID (greater than 0) of the event source.
10353 // <priority>: the priority of the idle source. Typically this will be in the range btweeen #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE
10354 // <function>: function to call
10355 // <data>: data to pass to @function
10356 // <notify>: function to call when the idle is removed, or %NULL
10357 static uint threads_add_idle_full()(int priority, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) nothrow {
10358 return gdk_threads_add_idle_full(priority, function_, data, notify);
10362 // Unintrospectable function: threads_add_timeout() / gdk_threads_add_timeout()
10363 // VERSION: 2.12
10364 // A wrapper for the common usage of gdk_threads_add_timeout_full()
10365 // assigning the default priority, #G_PRIORITY_DEFAULT.
10366 // See gdk_threads_add_timeout_full().
10367 // RETURNS: the ID (greater than 0) of the event source.
10368 // <interval>: the time between calls to the function, in milliseconds (1/1000ths of a second)
10369 // <function>: function to call
10370 // <data>: data to pass to @function
10371 static uint threads_add_timeout()(uint interval, GLib2.SourceFunc function_, void* data) nothrow {
10372 return gdk_threads_add_timeout(interval, function_, data);
10376 // VERSION: 2.12
10377 // Sets a function to be called at regular intervals holding the GDK lock,
10378 // with the given priority. The function is called repeatedly until it
10379 // returns %FALSE, at which point the timeout is automatically destroyed
10380 // and the function will not be called again. The @notify function is
10381 // called when the timeout is destroyed. The first call to the
10382 // function will be at the end of the first @interval.
10383 // Note that timeout functions may be delayed, due to the processing of other
10384 // event sources. Thus they should not be relied on for precise timing.
10385 // After each call to the timeout function, the time of the next
10386 // timeout is recalculated based on the current time and the given interval
10387 // (it does not try to 'catch up' time lost in delays).
10388 // This variant of g_timeout_add_full() can be thought of a MT-safe version
10389 // for GTK+ widgets for the following use case:
10390 // |[
10391 // static gboolean timeout_callback (gpointer data)
10392 // {
10393 // SomeWidget *self = data;
10394 // /&ast; do stuff with self &ast;/
10395 // self->timeout_id = 0;
10396 // return FALSE;
10397 // }
10398 // static void some_widget_do_stuff_later (SomeWidget *self)
10399 // {
10400 // self->timeout_id = g_timeout_add (timeout_callback, self)
10401 // }
10402 // static void some_widget_finalize (GObject *object)
10403 // {
10404 // SomeWidget *self = SOME_WIDGET (object);
10405 // if (self->timeout_id)
10406 // g_source_remove (self->timeout_id);
10407 // G_OBJECT_CLASS (parent_class)->finalize (object);
10408 // }
10409 // ]|
10410 // RETURNS: the ID (greater than 0) of the event source.
10411 // <priority>: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
10412 // <interval>: the time between calls to the function, in milliseconds (1/1000ths of a second)
10413 // <function>: function to call
10414 // <data>: data to pass to @function
10415 // <notify>: function to call when the timeout is removed, or %NULL
10416 static uint threads_add_timeout_full()(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) nothrow {
10417 return gdk_threads_add_timeout_full(priority, interval, function_, data, notify);
10421 // Unintrospectable function: threads_add_timeout_seconds() / gdk_threads_add_timeout_seconds()
10422 // VERSION: 2.14
10423 // A wrapper for the common usage of gdk_threads_add_timeout_seconds_full()
10424 // assigning the default priority, #G_PRIORITY_DEFAULT.
10425 // For details, see gdk_threads_add_timeout_full().
10426 // RETURNS: the ID (greater than 0) of the event source.
10427 // <interval>: the time between calls to the function, in seconds
10428 // <function>: function to call
10429 // <data>: data to pass to @function
10430 static uint threads_add_timeout_seconds()(uint interval, GLib2.SourceFunc function_, void* data) nothrow {
10431 return gdk_threads_add_timeout_seconds(interval, function_, data);
10435 // VERSION: 2.14
10436 // A variant of gdk_threads_add_timout_full() with second-granularity.
10437 // See g_timeout_add_seconds_full() for a discussion of why it is
10438 // a good idea to use this function if you don't need finer granularity.
10439 // RETURNS: the ID (greater than 0) of the event source.
10440 // <priority>: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
10441 // <interval>: the time between calls to the function, in seconds
10442 // <function>: function to call
10443 // <data>: data to pass to @function
10444 // <notify>: function to call when the timeout is removed, or %NULL
10445 static uint threads_add_timeout_seconds_full()(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) nothrow {
10446 return gdk_threads_add_timeout_seconds_full(priority, interval, function_, data, notify);
10449 static void threads_enter()() nothrow {
10450 gdk_threads_enter();
10454 // Initializes GDK so that it can be used from multiple threads
10455 // in conjunction with gdk_threads_enter() and gdk_threads_leave().
10456 // g_thread_init() must be called previous to this function.
10457 // This call must be made before any use of the main loop from
10458 // GTK+; to be safe, call it before gtk_init().
10459 static void threads_init()() nothrow {
10460 gdk_threads_init();
10463 static void threads_leave()() nothrow {
10464 gdk_threads_leave();
10468 // Unintrospectable function: threads_set_lock_functions() / gdk_threads_set_lock_functions()
10469 // VERSION: 2.4
10470 // Allows the application to replace the standard method that
10471 // GDK uses to protect its data structures. Normally, GDK
10472 // creates a single #GMutex that is locked by gdk_threads_enter(),
10473 // and released by gdk_threads_leave(); using this function an
10474 // application provides, instead, a function @enter_fn that is
10475 // called by gdk_threads_enter() and a function @leave_fn that is
10476 // called by gdk_threads_leave().
10477 // The functions must provide at least same locking functionality
10478 // as the default implementation, but can also do extra application
10479 // specific processing.
10480 // As an example, consider an application that has its own recursive
10481 // lock that when held, holds the GTK+ lock as well. When GTK+ unlocks
10482 // the GTK+ lock when entering a recursive main loop, the application
10483 // must temporarily release its lock as well.
10484 // Most threaded GTK+ apps won't need to use this method.
10485 // This method must be called before gdk_threads_init(), and cannot
10486 // be called multiple times.
10487 // <enter_fn>: function called to guard GDK
10488 // <leave_fn>: function called to release the guard
10489 static void threads_set_lock_functions()(GObject2.Callback enter_fn, GObject2.Callback leave_fn) nothrow {
10490 gdk_threads_set_lock_functions(enter_fn, leave_fn);
10494 // Convert from a ISO10646 character to a key symbol.
10495 // or, if there is no corresponding symbol,
10496 // wc | 0x01000000
10497 // RETURNS: the corresponding GDK key symbol, if one exists.
10498 // <wc>: a ISO10646 encoded character
10499 static uint unicode_to_keyval()(uint wc) nothrow {
10500 return gdk_unicode_to_keyval(wc);
10504 // Convert from UTF-8 to compound text.
10505 // false.
10506 // RETURNS: %TRUE if the conversion succeeded, otherwise
10507 // <str>: a UTF-8 string
10508 // <encoding>: location to store resulting encoding
10509 // <format>: location to store format of the result
10510 // <ctext>: location to store the data of the result
10511 // <length>: location to store the length of the data stored in @ctext
10512 static int utf8_to_compound_text()(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow {
10513 return gdk_utf8_to_compound_text(str, encoding, format, ctext, length);
10517 // VERSION: 2.2
10518 // Converts from UTF-8 to compound text.
10519 // %FALSE.
10520 // RETURNS: %TRUE if the conversion succeeded, otherwise
10521 // <display>: a #GdkDisplay
10522 // <str>: a UTF-8 string
10523 // <encoding>: location to store resulting encoding
10524 // <format>: location to store format of the result
10525 // <ctext>: location to store the data of the result
10526 // <length>: location to store the length of the data stored in @ctext
10527 static int utf8_to_compound_text_for_display()(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow {
10528 return gdk_utf8_to_compound_text_for_display(display, str, encoding, format, ctext, length);
10532 // Converts an UTF-8 string into the best possible representation
10533 // as a STRING. The representation of characters not in STRING
10534 // is not specified; it may be as pseudo-escape sequences
10535 // \x{ABCD}, or it may be in some other form of approximation.
10536 // conversion failed. (It should not fail for
10537 // any properly formed UTF-8 string unless system
10538 // limits like memory or file descriptors are exceeded.)
10539 // RETURNS: the newly-allocated string, or %NULL if the
10540 // <str>: a UTF-8 string
10541 static char* /*new*/ utf8_to_string_target()(char* str) nothrow {
10542 return gdk_utf8_to_string_target(str);
10546 // Converts a wide character string to a multi-byte string.
10547 // (The function name comes from an acronym of 'Wide Character String TO
10548 // Multi-Byte String').
10549 // conversion failed. The returned string should be freed with g_free() when no
10550 // longer needed.
10551 // RETURNS: the multi-byte string corresponding to @src, or %NULL if the
10552 // <src>: a wide character string.
10553 static char* /*new*/ wcstombs()(WChar* src) nothrow {
10554 return gdk_wcstombs(src);
10558 // Obtains the window underneath the mouse pointer, returning the
10559 // location of that window in @win_x, @win_y. Returns %NULL if the
10560 // window under the mouse pointer is not known to GDK (if the window
10561 // belongs to another application and a #GdkWindow hasn't been created
10562 // for it with gdk_window_foreign_new())
10563 // gdk_display_get_window_at_pointer() instead.
10564 // RETURNS: window under the mouse pointer
10565 // <win_x>: return location for origin of the window under the pointer
10566 // <win_y>: return location for origin of the window under the pointer
10567 static Window* window_at_pointer()(/*out*/ int* win_x=null, /*out*/ int* win_y=null) nothrow {
10568 return gdk_window_at_pointer(win_x, win_y);
10572 // Constrains a desired width and height according to a
10573 // set of geometry hints (such as minimum and maximum size).
10574 // <geometry>: a #GdkGeometry structure
10575 // <flags>: a mask indicating what portions of @geometry are set
10576 // <width>: desired width of window
10577 // <height>: desired height of the window
10578 // <new_width>: location to store resulting width
10579 // <new_height>: location to store resulting height
10580 static void window_constrain_size()(Geometry* geometry, uint flags, int width, int height, /*out*/ int* new_width, /*out*/ int* new_height) nothrow {
10581 gdk_window_constrain_size(geometry, flags, width, height, new_width, new_height);
10585 // Unintrospectable function: window_foreign_new() / gdk_window_foreign_new()
10586 // Wraps a native window for the default display in a #GdkWindow.
10587 // This may fail if the window has been destroyed.
10588 // For example in the X backend, a native window handle is an Xlib
10589 // <type>XID</type>.
10590 // native window or %NULL if the window has been destroyed.
10591 // RETURNS: the newly-created #GdkWindow wrapper for the
10592 // <anid>: a native window handle.
10593 static Window* window_foreign_new()(NativeWindow anid) nothrow {
10594 return gdk_window_foreign_new(anid);
10598 // Unintrospectable function: window_foreign_new_for_display() / gdk_window_foreign_new_for_display()
10599 // VERSION: 2.2
10600 // Wraps a native window in a #GdkWindow.
10601 // This may fail if the window has been destroyed. If the window
10602 // was already known to GDK, a new reference to the existing
10603 // #GdkWindow is returned.
10604 // For example in the X backend, a native window handle is an Xlib
10605 // <type>XID</type>.
10606 // %NULL if the window has been destroyed. The wrapper will be
10607 // newly created, if one doesn't exist already.
10608 // equivalent backend-specific API instead
10609 // RETURNS: a #GdkWindow wrapper for the native window or
10610 // <display>: the #GdkDisplay where the window handle comes from.
10611 // <anid>: a native window handle.
10612 static Window* window_foreign_new_for_display()(Display* display, NativeWindow anid) nothrow {
10613 return gdk_window_foreign_new_for_display(display, anid);
10617 // Unintrospectable function: window_get_toplevels() / gdk_window_get_toplevels()
10618 // DEPRECATED (v2.16) function: window_get_toplevels - Use gdk_screen_get_toplevel_windows() instead.
10619 // Obtains a list of all toplevel windows known to GDK on the default
10620 // screen (see gdk_screen_get_toplevel_windows()).
10621 // A toplevel window is a child of the root window (see
10622 // gdk_get_default_root_window()).
10623 // The returned list should be freed with g_list_free(), but
10624 // its elements need not be freed.
10625 // RETURNS: list of toplevel windows, free with g_list_free()
10626 static GLib2.List* window_get_toplevels()() nothrow {
10627 return gdk_window_get_toplevels();
10631 // Unintrospectable function: window_lookup() / gdk_window_lookup()
10632 // DEPRECATED (v2.24) function: window_lookup - Use gdk_x11_window_lookup_for_display() or equivalent
10633 // Looks up the #GdkWindow that wraps the given native window handle.
10634 // For example in the X backend, a native window handle is an Xlib
10635 // <type>XID</type>.
10636 // or %NULL if there is none.
10637 // backend-specific functionality instead
10638 // RETURNS: the #GdkWindow wrapper for the native window,
10639 // <anid>: a native window handle.
10640 static Window* window_lookup()(NativeWindow anid) nothrow {
10641 return gdk_window_lookup(anid);
10645 // Unintrospectable function: window_lookup_for_display() / gdk_window_lookup_for_display()
10646 // VERSION: 2.2
10647 // Looks up the #GdkWindow that wraps the given native window handle.
10648 // For example in the X backend, a native window handle is an Xlib
10649 // <type>XID</type>.
10650 // or %NULL if there is none.
10651 // RETURNS: the #GdkWindow wrapper for the native window,
10652 // <display>: the #GdkDisplay corresponding to the window handle
10653 // <anid>: a native window handle.
10654 static Window* window_lookup_for_display()(Display* display, NativeWindow anid) nothrow {
10655 return gdk_window_lookup_for_display(display, anid);
10659 // Calls gdk_window_process_updates() for all windows (see #GdkWindow)
10660 // in the application.
10661 static void window_process_all_updates()() nothrow {
10662 gdk_window_process_all_updates();
10666 // With update debugging enabled, calls to
10667 // gdk_window_invalidate_region() clear the invalidated region of the
10668 // screen to a noticeable color, and GDK pauses for a short time
10669 // before sending exposes to windows during
10670 // gdk_window_process_updates(). The net effect is that you can see
10671 // the invalid region for each window and watch redraws as they
10672 // occur. This allows you to diagnose inefficiencies in your application.
10673 // In essence, because the GDK rendering model prevents all flicker,
10674 // if you are redrawing the same region 400 times you may never
10675 // notice, aside from noticing a speed problem. Enabling update
10676 // debugging causes GTK to flicker slowly and noticeably, so you can
10677 // see exactly what's being redrawn when, in what order.
10678 // The --gtk-debug=updates command line option passed to GTK+ programs
10679 // enables this debug option at application startup time. That's
10680 // usually more useful than calling gdk_window_set_debug_updates()
10681 // yourself, though you might want to use this function to enable
10682 // updates sometime after application startup time.
10683 // <setting>: %TRUE to turn on update debugging
10684 static void window_set_debug_updates()(int setting) nothrow {
10685 gdk_window_set_debug_updates(setting);
10689 // C prototypes:
10691 extern (C) {
10692 AppLaunchContext* /*new*/ gdk_app_launch_context_new() nothrow;
10693 void gdk_app_launch_context_set_desktop(AppLaunchContext* this_, int desktop) nothrow;
10694 void gdk_app_launch_context_set_display(AppLaunchContext* this_, Display* display) nothrow;
10695 void gdk_app_launch_context_set_icon(AppLaunchContext* this_, Gio2.Icon* icon=null) nothrow;
10696 void gdk_app_launch_context_set_icon_name(AppLaunchContext* this_, char* icon_name=null) nothrow;
10697 void gdk_app_launch_context_set_screen(AppLaunchContext* this_, Screen* screen) nothrow;
10698 void gdk_app_launch_context_set_timestamp(AppLaunchContext* this_, uint timestamp) nothrow;
10699 Color* /*new*/ gdk_color_copy(Color* this_) nothrow;
10700 int gdk_color_equal(Color* this_, Color* colorb) nothrow;
10701 void gdk_color_free(Color* this_) nothrow;
10702 uint gdk_color_hash(Color* this_) nothrow;
10703 char* /*new*/ gdk_color_to_string(Color* this_) nothrow;
10704 Colormap* /*new*/ gdk_colormap_new(Visual* visual, int allocate) nothrow;
10705 Colormap* gdk_colormap_get_system() nothrow;
10706 int gdk_colormap_get_system_size() nothrow;
10707 int gdk_colormap_alloc_color(Colormap* this_, Color* color, int writeable, int best_match) nothrow;
10708 int gdk_colormap_alloc_colors(Colormap* this_, Color* colors, int n_colors, int writeable, int best_match, int* success) nothrow;
10709 void gdk_colormap_change(Colormap* this_, int ncolors) nothrow;
10710 void gdk_colormap_free_colors(Colormap* this_, Color* colors, int n_colors) nothrow;
10711 Screen* gdk_colormap_get_screen(Colormap* this_) nothrow;
10712 Visual* gdk_colormap_get_visual(Colormap* this_) nothrow;
10713 void gdk_colormap_query_color(Colormap* this_, c_ulong pixel, Color* result) nothrow;
10714 Colormap* gdk_colormap_ref(Colormap* this_) nothrow;
10715 void gdk_colormap_unref(Colormap* this_) nothrow;
10716 Cursor* /*new*/ gdk_cursor_new(CursorType cursor_type) nothrow;
10717 Cursor* /*new*/ gdk_cursor_new_for_display(Display* display, CursorType cursor_type) nothrow;
10718 Cursor* /*new*/ gdk_cursor_new_from_name(Display* display, char* name) nothrow;
10719 Cursor* /*new*/ gdk_cursor_new_from_pixbuf(Display* display, GdkPixbuf2.Pixbuf* pixbuf, int x, int y) nothrow;
10720 Cursor* /*new*/ gdk_cursor_new_from_pixmap(Pixmap* source, Pixmap* mask, Color* fg, Color* bg, int x, int y) nothrow;
10721 CursorType gdk_cursor_get_cursor_type(Cursor* this_) nothrow;
10722 Display* gdk_cursor_get_display(Cursor* this_) nothrow;
10723 GdkPixbuf2.Pixbuf* gdk_cursor_get_image(Cursor* this_) nothrow;
10724 Cursor* /*new*/ gdk_cursor_ref(Cursor* this_) nothrow;
10725 void gdk_cursor_unref(Cursor* this_) nothrow;
10726 void gdk_device_free_history(/*inout*/ TimeCoord** events, int n_events) nothrow;
10727 Device* gdk_device_get_core_pointer() nothrow;
10728 int gdk_device_get_axis(Device* this_, double* axes, AxisUse use, double* value) nothrow;
10729 AxisUse gdk_device_get_axis_use(Device* this_, uint index) nothrow;
10730 int gdk_device_get_has_cursor(Device* this_) nothrow;
10731 int gdk_device_get_history(Device* this_, Window* window, uint start, uint stop, /*out*/ TimeCoord*** events, /*out*/ int* n_events) nothrow;
10732 void gdk_device_get_key(Device* this_, uint index, uint* keyval, ModifierType* modifiers) nothrow;
10733 InputMode gdk_device_get_mode(Device* this_) nothrow;
10734 int gdk_device_get_n_axes(Device* this_) nothrow;
10735 int gdk_device_get_n_keys(Device* this_) nothrow;
10736 char* gdk_device_get_name(Device* this_) nothrow;
10737 InputSource gdk_device_get_source(Device* this_) nothrow;
10738 void gdk_device_get_state(Device* this_, Window* window, double* axes, ModifierType* mask) nothrow;
10739 void gdk_device_set_axis_use(Device* this_, uint index_, AxisUse use) nothrow;
10740 void gdk_device_set_key(Device* this_, uint index_, uint keyval, ModifierType modifiers) nothrow;
10741 int gdk_device_set_mode(Device* this_, InputMode mode) nothrow;
10742 void gdk_device_set_source(Device* this_, InputSource source) nothrow;
10743 Display* gdk_display_get_default() nothrow;
10744 Display* gdk_display_open(char* display_name) nothrow;
10745 Display* gdk_display_open_default_libgtk_only() nothrow;
10746 void gdk_display_add_client_message_filter(Display* this_, Atom message_type, FilterFunc func, void* data) nothrow;
10747 void gdk_display_beep(Display* this_) nothrow;
10748 void gdk_display_close(Display* this_) nothrow;
10749 void gdk_display_flush(Display* this_) nothrow;
10750 Device* gdk_display_get_core_pointer(Display* this_) nothrow;
10751 uint gdk_display_get_default_cursor_size(Display* this_) nothrow;
10752 Window* gdk_display_get_default_group(Display* this_) nothrow;
10753 Screen* gdk_display_get_default_screen(Display* this_) nothrow;
10754 Event* /*new*/ gdk_display_get_event(Display* this_) nothrow;
10755 void gdk_display_get_maximal_cursor_size(Display* this_, /*out*/ uint* width, /*out*/ uint* height) nothrow;
10756 int gdk_display_get_n_screens(Display* this_) nothrow;
10757 char* gdk_display_get_name(Display* this_) nothrow;
10758 void gdk_display_get_pointer(Display* this_, /*out*/ Screen** screen=null, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) nothrow;
10759 Screen* gdk_display_get_screen(Display* this_, int screen_num) nothrow;
10760 Window* gdk_display_get_window_at_pointer(Display* this_, /*out*/ int* win_x=null, /*out*/ int* win_y=null) nothrow;
10761 int gdk_display_is_closed(Display* this_) nothrow;
10762 void gdk_display_keyboard_ungrab(Display* this_, uint time_) nothrow;
10763 GLib2.List* gdk_display_list_devices(Display* this_) nothrow;
10764 Event* /*new*/ gdk_display_peek_event(Display* this_) nothrow;
10765 int gdk_display_pointer_is_grabbed(Display* this_) nothrow;
10766 void gdk_display_pointer_ungrab(Display* this_, uint time_) nothrow;
10767 void gdk_display_put_event(Display* this_, Event* event) nothrow;
10768 int gdk_display_request_selection_notification(Display* this_, Atom selection) nothrow;
10769 void gdk_display_set_double_click_distance(Display* this_, uint distance) nothrow;
10770 void gdk_display_set_double_click_time(Display* this_, uint msec) nothrow;
10771 DisplayPointerHooks* gdk_display_set_pointer_hooks(Display* this_, DisplayPointerHooks* new_hooks) nothrow;
10772 void gdk_display_store_clipboard(Display* this_, Window* clipboard_window, uint time_, Atom* targets, int n_targets) nothrow;
10773 int gdk_display_supports_clipboard_persistence(Display* this_) nothrow;
10774 int gdk_display_supports_composite(Display* this_) nothrow;
10775 int gdk_display_supports_cursor_alpha(Display* this_) nothrow;
10776 int gdk_display_supports_cursor_color(Display* this_) nothrow;
10777 int gdk_display_supports_input_shapes(Display* this_) nothrow;
10778 int gdk_display_supports_selection_notification(Display* this_) nothrow;
10779 int gdk_display_supports_shapes(Display* this_) nothrow;
10780 void gdk_display_sync(Display* this_) nothrow;
10781 void gdk_display_warp_pointer(Display* this_, Screen* screen, int x, int y) nothrow;
10782 DisplayManager* gdk_display_manager_get() nothrow;
10783 Display* gdk_display_manager_get_default_display(DisplayManager* this_) nothrow;
10784 GLib2.SList* /*new container*/ gdk_display_manager_list_displays(DisplayManager* this_) nothrow;
10785 void gdk_display_manager_set_default_display(DisplayManager* this_, Display* display) nothrow;
10786 DragContext* /*new*/ gdk_drag_context_new() nothrow;
10787 DragAction gdk_drag_context_get_actions(DragContext* this_) nothrow;
10788 Window* gdk_drag_context_get_dest_window(DragContext* this_) nothrow;
10789 DragProtocol gdk_drag_context_get_protocol(DragContext* this_) nothrow;
10790 DragAction gdk_drag_context_get_selected_action(DragContext* this_) nothrow;
10791 Window* gdk_drag_context_get_source_window(DragContext* this_) nothrow;
10792 DragAction gdk_drag_context_get_suggested_action(DragContext* this_) nothrow;
10793 GLib2.List* gdk_drag_context_list_targets(DragContext* this_) nothrow;
10794 void gdk_drag_context_ref(DragContext* this_) nothrow;
10795 void gdk_drag_context_unref(DragContext* this_) nothrow;
10796 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) nothrow;
10797 Region* gdk_drawable_get_clip_region(Drawable* this_) nothrow;
10798 Colormap* gdk_drawable_get_colormap(Drawable* this_) nothrow;
10799 void* gdk_drawable_get_data(Drawable* this_, char* key) nothrow;
10800 int gdk_drawable_get_depth(Drawable* this_) nothrow;
10801 Display* gdk_drawable_get_display(Drawable* this_) nothrow;
10802 Image* gdk_drawable_get_image(Drawable* this_, int x, int y, int width, int height) nothrow;
10803 Screen* gdk_drawable_get_screen(Drawable* this_) nothrow;
10804 void gdk_drawable_get_size(Drawable* this_, /*out*/ int* width=null, /*out*/ int* height=null) nothrow;
10805 Region* gdk_drawable_get_visible_region(Drawable* this_) nothrow;
10806 Visual* gdk_drawable_get_visual(Drawable* this_) nothrow;
10807 Drawable* gdk_drawable_ref(Drawable* this_) nothrow;
10808 void gdk_drawable_set_colormap(Drawable* this_, Colormap* colormap) nothrow;
10809 void gdk_drawable_set_data(Drawable* this_, char* key, void* data, GLib2.DestroyNotify destroy_func=null) nothrow;
10810 void gdk_drawable_unref(Drawable* this_) nothrow;
10811 Event* /*new*/ gdk_event_new(EventType type) nothrow;
10812 Event* /*new*/ gdk_event_copy(Event* this_) nothrow;
10813 void gdk_event_free(Event* this_) nothrow;
10814 int gdk_event_get_axis(Event* this_, AxisUse axis_use, /*out*/ double* value) nothrow;
10815 int gdk_event_get_coords(Event* this_, /*out*/ double* x_win, /*out*/ double* y_win) nothrow;
10816 int gdk_event_get_root_coords(Event* this_, /*out*/ double* x_root, /*out*/ double* y_root) nothrow;
10817 Screen* gdk_event_get_screen(Event* this_) nothrow;
10818 int gdk_event_get_state(Event* this_, /*out*/ ModifierType* state) nothrow;
10819 uint gdk_event_get_time(Event* this_) nothrow;
10820 void gdk_event_put(Event* this_) nothrow;
10821 int gdk_event_send_client_message(Event* this_, NativeWindow winid) nothrow;
10822 void gdk_event_send_clientmessage_toall(Event* this_) nothrow;
10823 void gdk_event_set_screen(Event* this_, Screen* screen) nothrow;
10824 int gdk_font_equal(Font* this_, Font* fontb) nothrow;
10825 Display* gdk_font_get_display(Font* this_) nothrow;
10826 int gdk_font_id(Font* this_) nothrow;
10827 Font* /*new*/ gdk_font_ref(Font* this_) nothrow;
10828 void gdk_font_unref(Font* this_) nothrow;
10829 GC* /*new*/ gdk_gc_new(Drawable* drawable) nothrow;
10830 GC* /*new*/ gdk_gc_new_with_values(Drawable* drawable, GCValues* values, GCValuesMask values_mask) nothrow;
10831 void gdk_gc_copy(GC* this_, GC* src_gc) nothrow;
10832 Colormap* gdk_gc_get_colormap(GC* this_) nothrow;
10833 Screen* gdk_gc_get_screen(GC* this_) nothrow;
10834 void gdk_gc_get_values(GC* this_, GCValues* values) nothrow;
10835 void gdk_gc_offset(GC* this_, int x_offset, int y_offset) nothrow;
10836 GC* gdk_gc_ref(GC* this_) nothrow;
10837 void gdk_gc_set_background(GC* this_, Color* color) nothrow;
10838 void gdk_gc_set_clip_mask(GC* this_, Bitmap* mask) nothrow;
10839 void gdk_gc_set_clip_origin(GC* this_, int x, int y) nothrow;
10840 void gdk_gc_set_clip_rectangle(GC* this_, Rectangle* rectangle) nothrow;
10841 void gdk_gc_set_clip_region(GC* this_, Region* region) nothrow;
10842 void gdk_gc_set_colormap(GC* this_, Colormap* colormap) nothrow;
10843 void gdk_gc_set_dashes(GC* this_, int dash_offset, byte dash_list, int n) nothrow;
10844 void gdk_gc_set_exposures(GC* this_, int exposures) nothrow;
10845 void gdk_gc_set_fill(GC* this_, Fill fill) nothrow;
10846 void gdk_gc_set_font(GC* this_, Font* font) nothrow;
10847 void gdk_gc_set_foreground(GC* this_, Color* color) nothrow;
10848 void gdk_gc_set_function(GC* this_, Function function_) nothrow;
10849 void gdk_gc_set_line_attributes(GC* this_, int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style) nothrow;
10850 void gdk_gc_set_rgb_bg_color(GC* this_, Color* color) nothrow;
10851 void gdk_gc_set_rgb_fg_color(GC* this_, Color* color) nothrow;
10852 void gdk_gc_set_stipple(GC* this_, Pixmap* stipple) nothrow;
10853 void gdk_gc_set_subwindow(GC* this_, SubwindowMode mode) nothrow;
10854 void gdk_gc_set_tile(GC* this_, Pixmap* tile) nothrow;
10855 void gdk_gc_set_ts_origin(GC* this_, int x, int y) nothrow;
10856 void gdk_gc_set_values(GC* this_, GCValues* values, GCValuesMask values_mask) nothrow;
10857 void gdk_gc_unref(GC* this_) nothrow;
10858 Image* /*new*/ gdk_image_new(ImageType type, Visual* visual, int width, int height) nothrow;
10859 Image* gdk_image_get(Drawable* drawable, int x, int y, int width, int height) nothrow;
10860 ushort gdk_image_get_bits_per_pixel(Image* this_) nothrow;
10861 ByteOrder gdk_image_get_byte_order(Image* this_) nothrow;
10862 ushort gdk_image_get_bytes_per_line(Image* this_) nothrow;
10863 ushort gdk_image_get_bytes_per_pixel(Image* this_) nothrow;
10864 Colormap* gdk_image_get_colormap(Image* this_) nothrow;
10865 ushort gdk_image_get_depth(Image* this_) nothrow;
10866 int gdk_image_get_height(Image* this_) nothrow;
10867 ImageType gdk_image_get_image_type(Image* this_) nothrow;
10868 uint gdk_image_get_pixel(Image* this_, int x, int y) nothrow;
10869 void* gdk_image_get_pixels(Image* this_) nothrow;
10870 Visual* gdk_image_get_visual(Image* this_) nothrow;
10871 int gdk_image_get_width(Image* this_) nothrow;
10872 void gdk_image_put_pixel(Image* this_, int x, int y, uint pixel) nothrow;
10873 Image* gdk_image_ref(Image* this_) nothrow;
10874 void gdk_image_set_colormap(Image* this_, Colormap* colormap) nothrow;
10875 void gdk_image_unref(Image* this_) nothrow;
10876 Keymap* gdk_keymap_get_default() nothrow;
10877 Keymap* gdk_keymap_get_for_display(Display* display) nothrow;
10878 void gdk_keymap_add_virtual_modifiers(Keymap* this_, ModifierType* state) nothrow;
10879 int gdk_keymap_get_caps_lock_state(Keymap* this_) nothrow;
10880 Pango.Direction gdk_keymap_get_direction(Keymap* this_) nothrow;
10881 int gdk_keymap_get_entries_for_keycode(Keymap* this_, uint hardware_keycode, /*out*/ KeymapKey** keys, /*out*/ uint** keyvals, int* n_entries) nothrow;
10882 int gdk_keymap_get_entries_for_keyval(Keymap* this_, uint keyval, /*out*/ KeymapKey** keys, /*out*/ int* n_keys) nothrow;
10883 int gdk_keymap_have_bidi_layouts(Keymap* this_) nothrow;
10884 uint gdk_keymap_lookup_key(Keymap* this_, KeymapKey* key) nothrow;
10885 int gdk_keymap_map_virtual_modifiers(Keymap* this_, ModifierType* state) nothrow;
10886 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) nothrow;
10887 PangoRenderer* /*new*/ gdk_pango_renderer_new(Screen* screen) nothrow;
10888 Pango.Renderer* gdk_pango_renderer_get_default(Screen* screen) nothrow;
10889 void gdk_pango_renderer_set_drawable(PangoRenderer* this_, Drawable* drawable=null) nothrow;
10890 void gdk_pango_renderer_set_gc(PangoRenderer* this_, GC* gc=null) nothrow;
10891 void gdk_pango_renderer_set_override_color(PangoRenderer* this_, Pango.RenderPart part, Color* color=null) nothrow;
10892 void gdk_pango_renderer_set_stipple(PangoRenderer* this_, Pango.RenderPart part, Bitmap* stipple) nothrow;
10893 Pixmap* /*new*/ gdk_pixmap_foreign_new(NativeWindow anid) nothrow;
10894 Pixmap* /*new*/ gdk_pixmap_foreign_new_for_display(Display* display, NativeWindow anid) nothrow;
10895 Pixmap* /*new*/ gdk_pixmap_foreign_new_for_screen(Screen* screen, NativeWindow anid, int width, int height, int depth) nothrow;
10896 Pixmap* /*new*/ gdk_pixmap_new(Drawable* drawable, int width, int height, int depth) nothrow;
10897 Pixmap* gdk_pixmap_colormap_create_from_xpm(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char* filename) nothrow;
10898 Pixmap* gdk_pixmap_colormap_create_from_xpm_d(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char** data) nothrow;
10899 Pixmap* gdk_pixmap_create_from_data(Drawable* drawable, char* data, int width, int height, int depth, Color* fg, Color* bg) nothrow;
10900 Pixmap* gdk_pixmap_create_from_xpm(Drawable* drawable, Bitmap** mask, Color* transparent_color, char* filename) nothrow;
10901 Pixmap* gdk_pixmap_create_from_xpm_d(Drawable* drawable, /*out*/ Bitmap** mask, Color* transparent_color, char** data) nothrow;
10902 Pixmap* gdk_pixmap_lookup(NativeWindow anid) nothrow;
10903 Pixmap* gdk_pixmap_lookup_for_display(Display* display, NativeWindow anid) nothrow;
10904 void gdk_pixmap_get_size(Pixmap* this_, /*out*/ int* width=null, /*out*/ int* height=null) nothrow;
10905 int gdk_rectangle_intersect(Rectangle* this_, Rectangle* src2, /*out*/ Rectangle* dest=null) nothrow;
10906 void gdk_rectangle_union(Rectangle* this_, Rectangle* src2, /*out*/ Rectangle* dest) nothrow;
10907 Region* gdk_region_copy(Region* this_) nothrow;
10908 void gdk_region_destroy(Region* this_) nothrow;
10909 int gdk_region_empty(Region* this_) nothrow;
10910 int gdk_region_equal(Region* this_, Region* region2) nothrow;
10911 void gdk_region_get_clipbox(Region* this_, Rectangle* rectangle) nothrow;
10912 void gdk_region_get_rectangles(Region* this_, Rectangle** rectangles, int* n_rectangles) nothrow;
10913 void gdk_region_intersect(Region* this_, Region* source2) nothrow;
10914 void gdk_region_offset(Region* this_, int dx, int dy) nothrow;
10915 int gdk_region_point_in(Region* this_, int x, int y) nothrow;
10916 int gdk_region_rect_equal(Region* this_, Rectangle* rectangle) nothrow;
10917 OverlapType gdk_region_rect_in(Region* this_, Rectangle* rectangle) nothrow;
10918 void gdk_region_shrink(Region* this_, int dx, int dy) nothrow;
10919 void gdk_region_spans_intersect_foreach(Region* this_, Span* spans, int n_spans, int sorted, SpanFunc function_, void* data) nothrow;
10920 void gdk_region_subtract(Region* this_, Region* source2) nothrow;
10921 void gdk_region_union(Region* this_, Region* source2) nothrow;
10922 void gdk_region_union_with_rect(Region* this_, Rectangle* rect) nothrow;
10923 void gdk_region_xor(Region* this_, Region* source2) nothrow;
10924 void gdk_rgb_cmap_free(RgbCmap* this_) nothrow;
10925 Screen* gdk_screen_get_default() nothrow;
10926 int gdk_screen_height() nothrow;
10927 int gdk_screen_height_mm() nothrow;
10928 int gdk_screen_width() nothrow;
10929 int gdk_screen_width_mm() nothrow;
10930 void gdk_screen_broadcast_client_message(Screen* this_, Event* event) nothrow;
10931 Window* gdk_screen_get_active_window(Screen* this_) nothrow;
10932 Colormap* gdk_screen_get_default_colormap(Screen* this_) nothrow;
10933 Display* gdk_screen_get_display(Screen* this_) nothrow;
10934 cairo.FontOptions* gdk_screen_get_font_options(Screen* this_) nothrow;
10935 int gdk_screen_get_height(Screen* this_) nothrow;
10936 int gdk_screen_get_height_mm(Screen* this_) nothrow;
10937 int gdk_screen_get_monitor_at_point(Screen* this_, int x, int y) nothrow;
10938 int gdk_screen_get_monitor_at_window(Screen* this_, Window* window) nothrow;
10939 void gdk_screen_get_monitor_geometry(Screen* this_, int monitor_num, Rectangle* dest) nothrow;
10940 int gdk_screen_get_monitor_height_mm(Screen* this_, int monitor_num) nothrow;
10941 char* /*new*/ gdk_screen_get_monitor_plug_name(Screen* this_, int monitor_num) nothrow;
10942 int gdk_screen_get_monitor_width_mm(Screen* this_, int monitor_num) nothrow;
10943 int gdk_screen_get_n_monitors(Screen* this_) nothrow;
10944 int gdk_screen_get_number(Screen* this_) nothrow;
10945 int gdk_screen_get_primary_monitor(Screen* this_) nothrow;
10946 double gdk_screen_get_resolution(Screen* this_) nothrow;
10947 Colormap* gdk_screen_get_rgb_colormap(Screen* this_) nothrow;
10948 Visual* gdk_screen_get_rgb_visual(Screen* this_) nothrow;
10949 Colormap* gdk_screen_get_rgba_colormap(Screen* this_) nothrow;
10950 Visual* gdk_screen_get_rgba_visual(Screen* this_) nothrow;
10951 Window* gdk_screen_get_root_window(Screen* this_) nothrow;
10952 int gdk_screen_get_setting(Screen* this_, char* name, GObject2.Value* value) nothrow;
10953 Colormap* gdk_screen_get_system_colormap(Screen* this_) nothrow;
10954 Visual* gdk_screen_get_system_visual(Screen* this_) nothrow;
10955 GLib2.List* /*new container*/ gdk_screen_get_toplevel_windows(Screen* this_) nothrow;
10956 int gdk_screen_get_width(Screen* this_) nothrow;
10957 int gdk_screen_get_width_mm(Screen* this_) nothrow;
10958 GLib2.List* /*new*/ gdk_screen_get_window_stack(Screen* this_) nothrow;
10959 int gdk_screen_is_composited(Screen* this_) nothrow;
10960 GLib2.List* /*new container*/ gdk_screen_list_visuals(Screen* this_) nothrow;
10961 char* /*new*/ gdk_screen_make_display_name(Screen* this_) nothrow;
10962 void gdk_screen_set_default_colormap(Screen* this_, Colormap* colormap) nothrow;
10963 void gdk_screen_set_font_options(Screen* this_, cairo.FontOptions* options=null) nothrow;
10964 void gdk_screen_set_resolution(Screen* this_, double dpi) nothrow;
10965 Visual* gdk_visual_get_best() nothrow;
10966 int gdk_visual_get_best_depth() nothrow;
10967 VisualType gdk_visual_get_best_type() nothrow;
10968 Visual* gdk_visual_get_best_with_both(int depth, VisualType visual_type) nothrow;
10969 Visual* gdk_visual_get_best_with_depth(int depth) nothrow;
10970 Visual* gdk_visual_get_best_with_type(VisualType visual_type) nothrow;
10971 Visual* gdk_visual_get_system() nothrow;
10972 int gdk_visual_get_bits_per_rgb(Visual* this_) nothrow;
10973 void gdk_visual_get_blue_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) nothrow;
10974 ByteOrder gdk_visual_get_byte_order(Visual* this_) nothrow;
10975 int gdk_visual_get_colormap_size(Visual* this_) nothrow;
10976 int gdk_visual_get_depth(Visual* this_) nothrow;
10977 void gdk_visual_get_green_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) nothrow;
10978 void gdk_visual_get_red_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) nothrow;
10979 Screen* gdk_visual_get_screen(Visual* this_) nothrow;
10980 VisualType gdk_visual_get_visual_type(Visual* this_) nothrow;
10981 void gdk_window_add_filter(Window* this_, FilterFunc function_, void* data) nothrow;
10982 void gdk_window_beep(Window* this_) nothrow;
10983 void gdk_window_begin_move_drag(Window* this_, int button, int root_x, int root_y, uint timestamp) nothrow;
10984 void gdk_window_begin_paint_rect(Window* this_, Rectangle* rectangle) nothrow;
10985 void gdk_window_begin_paint_region(Window* this_, Region* region) nothrow;
10986 void gdk_window_begin_resize_drag(Window* this_, WindowEdge edge, int button, int root_x, int root_y, uint timestamp) nothrow;
10987 void gdk_window_clear(Window* this_) nothrow;
10988 void gdk_window_clear_area(Window* this_, int x, int y, int width, int height) nothrow;
10989 void gdk_window_clear_area_e(Window* this_, int x, int y, int width, int height) nothrow;
10990 void gdk_window_configure_finished(Window* this_) nothrow;
10991 void gdk_window_coords_from_parent(Window* this_, double parent_x, double parent_y, /*out*/ double* x=null, /*out*/ double* y=null) nothrow;
10992 void gdk_window_coords_to_parent(Window* this_, double x, double y, /*out*/ double* parent_x=null, /*out*/ double* parent_y=null) nothrow;
10993 cairo.Surface* /*new*/ gdk_window_create_similar_surface(Window* this_, cairo.Content content, int width, int height) nothrow;
10994 void gdk_window_deiconify(Window* this_) nothrow;
10995 void gdk_window_destroy(Window* this_) nothrow;
10996 void gdk_window_destroy_notify(Window* this_) nothrow;
10997 void gdk_window_enable_synchronized_configure(Window* this_) nothrow;
10998 void gdk_window_end_paint(Window* this_) nothrow;
10999 int gdk_window_ensure_native(Window* this_) nothrow;
11000 void gdk_window_flush(Window* this_) nothrow;
11001 void gdk_window_focus(Window* this_, uint timestamp) nothrow;
11002 void gdk_window_freeze_toplevel_updates_libgtk_only(Window* this_) nothrow;
11003 void gdk_window_freeze_updates(Window* this_) nothrow;
11004 void gdk_window_fullscreen(Window* this_) nothrow;
11005 void gdk_window_geometry_changed(Window* this_) nothrow;
11006 int gdk_window_get_accept_focus(Window* this_) nothrow;
11007 cairo.Pattern* gdk_window_get_background_pattern(Window* this_) nothrow;
11008 GLib2.List* /*new container*/ gdk_window_get_children(Window* this_) nothrow;
11009 int gdk_window_get_composited(Window* this_) nothrow;
11010 Cursor* gdk_window_get_cursor(Window* this_) nothrow;
11011 int gdk_window_get_decorations(Window* this_, WMDecoration* decorations) nothrow;
11012 int gdk_window_get_deskrelative_origin(Window* this_, int* x, int* y) nothrow;
11013 Display* gdk_window_get_display(Window* this_) nothrow;
11014 Window* gdk_window_get_effective_parent(Window* this_) nothrow;
11015 Window* gdk_window_get_effective_toplevel(Window* this_) nothrow;
11016 EventMask gdk_window_get_events(Window* this_) nothrow;
11017 int gdk_window_get_focus_on_map(Window* this_) nothrow;
11018 void gdk_window_get_frame_extents(Window* this_, Rectangle* rect) nothrow;
11019 void gdk_window_get_geometry(Window* this_, int* x, int* y, int* width, int* height, int* depth) nothrow;
11020 Window* gdk_window_get_group(Window* this_) nothrow;
11021 int gdk_window_get_height(Window* this_) nothrow;
11022 void gdk_window_get_internal_paint_info(Window* this_, /*out*/ Drawable** real_drawable, /*out*/ int* x_offset, /*out*/ int* y_offset) nothrow;
11023 int gdk_window_get_modal_hint(Window* this_) nothrow;
11024 int gdk_window_get_origin(Window* this_, int* x, int* y) nothrow;
11025 Window* gdk_window_get_parent(Window* this_) nothrow;
11026 Window* gdk_window_get_pointer(Window* this_, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) nothrow;
11027 void gdk_window_get_position(Window* this_, /*out*/ int* x=null, /*out*/ int* y=null) nothrow;
11028 void gdk_window_get_root_coords(Window* this_, int x, int y, /*out*/ int* root_x, /*out*/ int* root_y) nothrow;
11029 void gdk_window_get_root_origin(Window* this_, int* x, int* y) nothrow;
11030 Screen* gdk_window_get_screen(Window* this_) nothrow;
11031 WindowState gdk_window_get_state(Window* this_) nothrow;
11032 Window* gdk_window_get_toplevel(Window* this_) nothrow;
11033 WindowTypeHint gdk_window_get_type_hint(Window* this_) nothrow;
11034 Region* gdk_window_get_update_area(Window* this_) nothrow;
11035 void gdk_window_get_user_data(Window* this_, /*out*/ void** data) nothrow;
11036 Visual* gdk_window_get_visual(Window* this_) nothrow;
11037 int gdk_window_get_width(Window* this_) nothrow;
11038 WindowType gdk_window_get_window_type(Window* this_) nothrow;
11039 int gdk_window_has_native(Window* this_) nothrow;
11040 void gdk_window_hide(Window* this_) nothrow;
11041 void gdk_window_iconify(Window* this_) nothrow;
11042 void gdk_window_input_shape_combine_mask(Window* this_, Bitmap* mask, int x, int y) nothrow;
11043 void gdk_window_input_shape_combine_region(Window* this_, Region* shape_region, int offset_x, int offset_y) nothrow;
11044 void gdk_window_invalidate_maybe_recurse(Window* this_, Region* region, void** child_func, void* user_data) nothrow;
11045 void gdk_window_invalidate_rect(Window* this_, Rectangle* rect, int invalidate_children) nothrow;
11046 void gdk_window_invalidate_region(Window* this_, Region* region, int invalidate_children) nothrow;
11047 int gdk_window_is_destroyed(Window* this_) nothrow;
11048 int gdk_window_is_input_only(Window* this_) nothrow;
11049 int gdk_window_is_shaped(Window* this_) nothrow;
11050 int gdk_window_is_viewable(Window* this_) nothrow;
11051 int gdk_window_is_visible(Window* this_) nothrow;
11052 void gdk_window_lower(Window* this_) nothrow;
11053 void gdk_window_maximize(Window* this_) nothrow;
11054 void gdk_window_merge_child_input_shapes(Window* this_) nothrow;
11055 void gdk_window_merge_child_shapes(Window* this_) nothrow;
11056 void gdk_window_move(Window* this_, int x, int y) nothrow;
11057 void gdk_window_move_region(Window* this_, Region* region, int dx, int dy) nothrow;
11058 void gdk_window_move_resize(Window* this_, int x, int y, int width, int height) nothrow;
11059 Window* gdk_window_new(Window* this_, WindowAttr* attributes, int attributes_mask) nothrow;
11060 GLib2.List* gdk_window_peek_children(Window* this_) nothrow;
11061 void gdk_window_process_updates(Window* this_, int update_children) nothrow;
11062 void gdk_window_raise(Window* this_) nothrow;
11063 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) nothrow;
11064 void gdk_window_register_dnd(Window* this_) nothrow;
11065 void gdk_window_remove_filter(Window* this_, FilterFunc function_, void* data) nothrow;
11066 void gdk_window_remove_redirection(Window* this_) nothrow;
11067 void gdk_window_reparent(Window* this_, Window* new_parent, int x, int y) nothrow;
11068 void gdk_window_resize(Window* this_, int width, int height) nothrow;
11069 void gdk_window_restack(Window* this_, Window* sibling, int above) nothrow;
11070 void gdk_window_scroll(Window* this_, int dx, int dy) nothrow;
11071 void gdk_window_set_accept_focus(Window* this_, int accept_focus) nothrow;
11072 void gdk_window_set_back_pixmap(Window* this_, Pixmap* pixmap, int parent_relative) nothrow;
11073 void gdk_window_set_background(Window* this_, Color* color) nothrow;
11074 void gdk_window_set_child_input_shapes(Window* this_) nothrow;
11075 void gdk_window_set_child_shapes(Window* this_) nothrow;
11076 void gdk_window_set_composited(Window* this_, int composited) nothrow;
11077 void gdk_window_set_cursor(Window* this_, Cursor* cursor=null) nothrow;
11078 void gdk_window_set_decorations(Window* this_, WMDecoration decorations) nothrow;
11079 void gdk_window_set_events(Window* this_, EventMask event_mask) nothrow;
11080 void gdk_window_set_focus_on_map(Window* this_, int focus_on_map) nothrow;
11081 void gdk_window_set_functions(Window* this_, WMFunction functions) nothrow;
11082 void gdk_window_set_geometry_hints(Window* this_, Geometry* geometry, WindowHints geom_mask) nothrow;
11083 void gdk_window_set_group(Window* this_, Window* leader) nothrow;
11084 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) nothrow;
11085 void gdk_window_set_icon(Window* this_, Window* icon_window, Pixmap* pixmap, Bitmap* mask) nothrow;
11086 void gdk_window_set_icon_list(Window* this_, GLib2.List* pixbufs) nothrow;
11087 void gdk_window_set_icon_name(Window* this_, char* name) nothrow;
11088 void gdk_window_set_keep_above(Window* this_, int setting) nothrow;
11089 void gdk_window_set_keep_below(Window* this_, int setting) nothrow;
11090 void gdk_window_set_modal_hint(Window* this_, int modal) nothrow;
11091 void gdk_window_set_opacity(Window* this_, double opacity) nothrow;
11092 void gdk_window_set_override_redirect(Window* this_, int override_redirect) nothrow;
11093 void gdk_window_set_role(Window* this_, char* role) nothrow;
11094 void gdk_window_set_skip_pager_hint(Window* this_, int skips_pager) nothrow;
11095 void gdk_window_set_skip_taskbar_hint(Window* this_, int skips_taskbar) nothrow;
11096 void gdk_window_set_startup_id(Window* this_, char* startup_id) nothrow;
11097 int gdk_window_set_static_gravities(Window* this_, int use_static) nothrow;
11098 void gdk_window_set_title(Window* this_, char* title) nothrow;
11099 void gdk_window_set_transient_for(Window* this_, Window* parent) nothrow;
11100 void gdk_window_set_type_hint(Window* this_, WindowTypeHint hint) nothrow;
11101 void gdk_window_set_urgency_hint(Window* this_, int urgent) nothrow;
11102 void gdk_window_set_user_data(Window* this_, void* user_data) nothrow;
11103 void gdk_window_shape_combine_mask(Window* this_, Bitmap* mask, int x, int y) nothrow;
11104 void gdk_window_shape_combine_region(Window* this_, Region* shape_region, int offset_x, int offset_y) nothrow;
11105 void gdk_window_show(Window* this_) nothrow;
11106 void gdk_window_show_unraised(Window* this_) nothrow;
11107 void gdk_window_stick(Window* this_) nothrow;
11108 void gdk_window_thaw_toplevel_updates_libgtk_only(Window* this_) nothrow;
11109 void gdk_window_thaw_updates(Window* this_) nothrow;
11110 void gdk_window_unfullscreen(Window* this_) nothrow;
11111 void gdk_window_unmaximize(Window* this_) nothrow;
11112 void gdk_window_unstick(Window* this_) nothrow;
11113 void gdk_window_withdraw(Window* this_) nothrow;
11114 void gdk_add_client_message_filter(Atom message_type, FilterFunc func, void* data) nothrow;
11115 void gdk_add_option_entries_libgtk_only(GLib2.OptionGroup* group) nothrow;
11116 Atom gdk_atom_intern(char* atom_name, int only_if_exists) nothrow;
11117 Atom gdk_atom_intern_static_string(char* atom_name) nothrow;
11118 char* /*new*/ gdk_atom_name(Atom atom) nothrow;
11119 void gdk_beep() nothrow;
11120 Bitmap* gdk_bitmap_create_from_data(Drawable* drawable, char* data, int width, int height) nothrow;
11121 cairo.Context* /*new*/ gdk_cairo_create(Drawable* drawable) nothrow;
11122 void gdk_cairo_rectangle(cairo.Context* cr, Rectangle* rectangle) nothrow;
11123 void gdk_cairo_region(cairo.Context* cr, Region* region) nothrow;
11124 void gdk_cairo_reset_clip(cairo.Context* cr, Drawable* drawable) nothrow;
11125 void gdk_cairo_set_source_color(cairo.Context* cr, Color* color) nothrow;
11126 void gdk_cairo_set_source_pixbuf(cairo.Context* cr, GdkPixbuf2.Pixbuf* pixbuf, double pixbuf_x, double pixbuf_y) nothrow;
11127 void gdk_cairo_set_source_pixmap(cairo.Context* cr, Pixmap* pixmap, double pixmap_x, double pixmap_y) nothrow;
11128 void gdk_cairo_set_source_window(cairo.Context* cr, Window* window, double x, double y) nothrow;
11129 int gdk_char_height(Font* font, char character) nothrow;
11130 int gdk_char_measure(Font* font, char character) nothrow;
11131 int gdk_char_width(Font* font, char character) nothrow;
11132 int gdk_char_width_wc(Font* font, WChar character) nothrow;
11133 int gdk_color_alloc(Colormap* colormap, Color* color) nothrow;
11134 int gdk_color_black(Colormap* colormap, Color* color) nothrow;
11135 int gdk_color_change(Colormap* colormap, Color* color) nothrow;
11136 int gdk_color_parse(char* spec, /*out*/ Color* color) nothrow;
11137 int gdk_color_white(Colormap* colormap, Color* color) nothrow;
11138 int gdk_colors_alloc(Colormap* colormap, int contiguous, c_ulong* planes, int nplanes, c_ulong* pixels, int npixels) nothrow;
11139 void gdk_colors_free(Colormap* colormap, c_ulong* pixels, int npixels, c_ulong planes) nothrow;
11140 void gdk_colors_store(Colormap* colormap, Color* colors, int ncolors) nothrow;
11141 GLib2.List* gdk_devices_list() nothrow;
11142 void gdk_drag_abort(DragContext* context, uint time_) nothrow;
11143 DragContext* gdk_drag_begin(Window* window, GLib2.List* targets) nothrow;
11144 void gdk_drag_drop(DragContext* context, uint time_) nothrow;
11145 int gdk_drag_drop_succeeded(DragContext* context) nothrow;
11146 void gdk_drag_find_window(DragContext* context, Window* drag_window, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol) nothrow;
11147 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) nothrow;
11148 NativeWindow gdk_drag_get_protocol(NativeWindow xid, DragProtocol* protocol) nothrow;
11149 NativeWindow gdk_drag_get_protocol_for_display(Display* display, NativeWindow xid, DragProtocol* protocol) nothrow;
11150 Atom gdk_drag_get_selection(DragContext* context) nothrow;
11151 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_) nothrow;
11152 void gdk_drag_status(DragContext* context, DragAction action, uint time_) nothrow;
11153 void gdk_draw_arc(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2) nothrow;
11154 void gdk_draw_drawable(Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) nothrow;
11155 void gdk_draw_glyphs(Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) nothrow;
11156 void gdk_draw_glyphs_transformed(Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) nothrow;
11157 void gdk_draw_gray_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) nothrow;
11158 void gdk_draw_image(Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) nothrow;
11159 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) nothrow;
11160 void gdk_draw_layout(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout) nothrow;
11161 void gdk_draw_layout_line(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line) nothrow;
11162 void gdk_draw_layout_line_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line, Color* foreground=null, Color* background=null) nothrow;
11163 void gdk_draw_layout_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout, Color* foreground=null, Color* background=null) nothrow;
11164 void gdk_draw_line(Drawable* drawable, GC* gc, int x1_, int y1_, int x2_, int y2_) nothrow;
11165 void gdk_draw_lines(Drawable* drawable, GC* gc, Point* points, int n_points) nothrow;
11166 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) nothrow;
11167 void gdk_draw_point(Drawable* drawable, GC* gc, int x, int y) nothrow;
11168 void gdk_draw_points(Drawable* drawable, GC* gc, Point* points, int n_points) nothrow;
11169 void gdk_draw_polygon(Drawable* drawable, GC* gc, int filled, Point* points, int n_points) nothrow;
11170 void gdk_draw_rectangle(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height) nothrow;
11171 void gdk_draw_rgb_32_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) nothrow;
11172 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) nothrow;
11173 void gdk_draw_rgb_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride) nothrow;
11174 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) nothrow;
11175 void gdk_draw_segments(Drawable* drawable, GC* gc, Segment* segs, int n_segs) nothrow;
11176 void gdk_draw_string(Drawable* drawable, Font* font, GC* gc, int x, int y, char* string_) nothrow;
11177 void gdk_draw_text(Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length) nothrow;
11178 void gdk_draw_text_wc(Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length) nothrow;
11179 void gdk_draw_trapezoids(Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids) nothrow;
11180 void gdk_drop_finish(DragContext* context, int success, uint time_) nothrow;
11181 void gdk_drop_reply(DragContext* context, int ok, uint time_) nothrow;
11182 int gdk_error_trap_pop() nothrow;
11183 void gdk_error_trap_push() nothrow;
11184 Event* /*new*/ gdk_event_get() nothrow;
11185 Event* /*new*/ gdk_event_get_graphics_expose(Window* window) nothrow;
11186 void gdk_event_handler_set(EventFunc func, void* data, GLib2.DestroyNotify notify) nothrow;
11187 Event* /*new*/ gdk_event_peek() nothrow;
11188 void gdk_event_request_motions(EventMotion* event) nothrow;
11189 int gdk_event_send_client_message_for_display(Display* display, Event* event, NativeWindow winid) nothrow;
11190 int gdk_events_pending() nothrow;
11191 void gdk_exit(int error_code) nothrow;
11192 void gdk_flush() nothrow;
11193 Font* /*new*/ gdk_font_from_description(Pango.FontDescription* font_desc) nothrow;
11194 Font* /*new*/ gdk_font_from_description_for_display(Display* display, Pango.FontDescription* font_desc) nothrow;
11195 Font* /*new*/ gdk_font_load(char* font_name) nothrow;
11196 Font* /*new*/ gdk_font_load_for_display(Display* display, char* font_name) nothrow;
11197 Font* /*new*/ gdk_fontset_load(char* fontset_name) nothrow;
11198 Font* /*new*/ gdk_fontset_load_for_display(Display* display, char* fontset_name) nothrow;
11199 void gdk_free_compound_text(ubyte* ctext) nothrow;
11200 void gdk_free_text_list(char** list) nothrow;
11201 Window* gdk_get_default_root_window() nothrow;
11202 char* /*new*/ gdk_get_display() nothrow;
11203 char* gdk_get_display_arg_name() nothrow;
11204 char* gdk_get_program_class() nothrow;
11205 int gdk_get_show_events() nothrow;
11206 int gdk_get_use_xshm() nothrow;
11207 void gdk_init(/*inout*/ int* argc, /*inout*/ char*** argv) nothrow;
11208 int gdk_init_check(/*inout*/ int* argc, /*inout*/ char*** argv) nothrow;
11209 int gdk_input_add(int source, InputCondition condition, InputFunction function_, void* data) nothrow;
11210 int gdk_input_add_full(int source, InputCondition condition, InputFunction function_, void* data, GLib2.DestroyNotify destroy) nothrow;
11211 void gdk_input_remove(int tag) nothrow;
11212 void gdk_input_set_extension_events(Window* window, int mask, ExtensionMode mode) nothrow;
11213 GrabStatus gdk_keyboard_grab(Window* window, int owner_events, uint time_) nothrow;
11214 int gdk_keyboard_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events) nothrow;
11215 void gdk_keyboard_ungrab(uint time_) nothrow;
11216 void gdk_keyval_convert_case(uint symbol, /*out*/ uint* lower, /*out*/ uint* upper) nothrow;
11217 uint gdk_keyval_from_name(char* keyval_name) nothrow;
11218 int gdk_keyval_is_lower(uint keyval) nothrow;
11219 int gdk_keyval_is_upper(uint keyval) nothrow;
11220 char* gdk_keyval_name(uint keyval) nothrow;
11221 uint gdk_keyval_to_lower(uint keyval) nothrow;
11222 uint gdk_keyval_to_unicode(uint keyval) nothrow;
11223 uint gdk_keyval_to_upper(uint keyval) nothrow;
11224 GLib2.List* /*new container*/ gdk_list_visuals() nothrow;
11225 int gdk_mbstowcs(WChar* dest, char* src, int dest_max) nothrow;
11226 void gdk_notify_startup_complete() nothrow;
11227 void gdk_notify_startup_complete_with_id(char* startup_id) nothrow;
11228 Window* gdk_offscreen_window_get_embedder(Window* window) nothrow;
11229 Pixmap* gdk_offscreen_window_get_pixmap(Window* window) nothrow;
11230 void gdk_offscreen_window_set_embedder(Window* window, Window* embedder) nothrow;
11231 Pango.Attribute* gdk_pango_attr_emboss_color_new(Color* color) nothrow;
11232 Pango.Attribute* gdk_pango_attr_embossed_new(int embossed) nothrow;
11233 Pango.Attribute* gdk_pango_attr_stipple_new(Bitmap* stipple) nothrow;
11234 Pango.Context* gdk_pango_context_get() nothrow;
11235 Pango.Context* gdk_pango_context_get_for_screen(Screen* screen) nothrow;
11236 void gdk_pango_context_set_colormap(Pango.Context* context, Colormap* colormap) nothrow;
11237 Region* gdk_pango_layout_get_clip_region(Pango.Layout* layout, int x_origin, int y_origin, int* index_ranges, int n_ranges) nothrow;
11238 Region* gdk_pango_layout_line_get_clip_region(Pango.LayoutLine* line, int x_origin, int y_origin, int* index_ranges, int n_ranges) nothrow;
11239 void gdk_parse_args(/*inout*/ int* argc, /*inout*/ char*** argv) nothrow;
11240 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) nothrow;
11241 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) nothrow;
11242 void gdk_pixbuf_render_pixmap_and_mask(GdkPixbuf2.Pixbuf* pixbuf, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) nothrow;
11243 void gdk_pixbuf_render_pixmap_and_mask_for_colormap(GdkPixbuf2.Pixbuf* pixbuf, Colormap* colormap, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) nothrow;
11244 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) nothrow;
11245 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) nothrow;
11246 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) nothrow;
11247 GrabStatus gdk_pointer_grab(Window* window, int owner_events, EventMask event_mask, Window* confine_to, Cursor* cursor, uint time_) nothrow;
11248 int gdk_pointer_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events) nothrow;
11249 int gdk_pointer_is_grabbed() nothrow;
11250 void gdk_pointer_ungrab(uint time_) nothrow;
11251 void gdk_pre_parse_libgtk_only() nothrow;
11252 void gdk_property_change(Window* window, Atom property, Atom type, int format, PropMode mode, ubyte* data, int nelements) nothrow;
11253 void gdk_property_delete(Window* window, Atom property) nothrow;
11254 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) nothrow;
11255 void gdk_query_depths(/*out*/ int** depths, /*out*/ int* count) nothrow;
11256 void gdk_query_visual_types(VisualType** visual_types, int* count) nothrow;
11257 Region* gdk_region_new() nothrow;
11258 Region* gdk_region_polygon(Point* points, int n_points, FillRule fill_rule) nothrow;
11259 Region* gdk_region_rectangle(Rectangle* rectangle) nothrow;
11260 RgbCmap* gdk_rgb_cmap_new(uint* colors, int n_colors) nothrow;
11261 int gdk_rgb_colormap_ditherable(Colormap* cmap) nothrow;
11262 int gdk_rgb_ditherable() nothrow;
11263 void gdk_rgb_find_color(Colormap* colormap, Color* color) nothrow;
11264 void gdk_rgb_gc_set_background(GC* gc, uint rgb) nothrow;
11265 void gdk_rgb_gc_set_foreground(GC* gc, uint rgb) nothrow;
11266 Colormap* gdk_rgb_get_colormap() nothrow;
11267 Visual* gdk_rgb_get_visual() nothrow;
11268 void gdk_rgb_init() nothrow;
11269 void gdk_rgb_set_install(int install) nothrow;
11270 void gdk_rgb_set_min_colors(int min_colors) nothrow;
11271 void gdk_rgb_set_verbose(int verbose) nothrow;
11272 c_ulong gdk_rgb_xpixel_from_rgb(uint rgb) nothrow;
11273 void gdk_selection_convert(Window* requestor, Atom selection, Atom target, uint time_) nothrow;
11274 Window* gdk_selection_owner_get(Atom selection) nothrow;
11275 Window* gdk_selection_owner_get_for_display(Display* display, Atom selection) nothrow;
11276 int gdk_selection_owner_set(Window* owner, Atom selection, uint time_, int send_event) nothrow;
11277 int gdk_selection_owner_set_for_display(Display* display, Window* owner, Atom selection, uint time_, int send_event) nothrow;
11278 int gdk_selection_property_get(Window* requestor, ubyte** data, Atom* prop_type, int* prop_format) nothrow;
11279 void gdk_selection_send_notify(NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) nothrow;
11280 void gdk_selection_send_notify_for_display(Display* display, NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) nothrow;
11281 void gdk_set_double_click_time(uint msec) nothrow;
11282 char* /*new*/ gdk_set_locale() nothrow;
11283 PointerHooks* gdk_set_pointer_hooks(PointerHooks* new_hooks) nothrow;
11284 void gdk_set_program_class(char* program_class) nothrow;
11285 void gdk_set_show_events(int show_events) nothrow;
11286 void gdk_set_sm_client_id(char* sm_client_id) nothrow;
11287 void gdk_set_use_xshm(int use_xshm) nothrow;
11288 int gdk_setting_get(char* name, GObject2.Value* value) nothrow;
11289 int gdk_spawn_command_line_on_screen(Screen* screen, char* command_line, GLib2.Error** error) nothrow;
11290 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) nothrow;
11291 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) nothrow;
11292 void gdk_string_extents(Font* font, char* string_, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) nothrow;
11293 int gdk_string_height(Font* font, char* string_) nothrow;
11294 int gdk_string_measure(Font* font, char* string_) nothrow;
11295 int gdk_string_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow;
11296 int gdk_string_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow;
11297 int gdk_string_width(Font* font, char* string_) nothrow;
11298 void gdk_synthesize_window_state(Window* window, WindowState unset_flags, WindowState set_flags) nothrow;
11299 void gdk_test_render_sync(Window* window) nothrow;
11300 int gdk_test_simulate_button(Window* window, int x, int y, uint button, ModifierType modifiers, EventType button_pressrelease) nothrow;
11301 int gdk_test_simulate_key(Window* window, int x, int y, uint keyval, ModifierType modifiers, EventType key_pressrelease) nothrow;
11302 void gdk_text_extents(Font* font, char* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) nothrow;
11303 void gdk_text_extents_wc(Font* font, WChar* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) nothrow;
11304 int gdk_text_height(Font* font, char* text, int text_length) nothrow;
11305 int gdk_text_measure(Font* font, char* text, int text_length) nothrow;
11306 int gdk_text_property_to_text_list(Atom encoding, int format, ubyte* text, int length, char*** list) nothrow;
11307 int gdk_text_property_to_text_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) nothrow;
11308 int gdk_text_property_to_utf8_list(Atom encoding, int format, ubyte* text, int length, char*** list=null) nothrow;
11309 int gdk_text_property_to_utf8_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) nothrow;
11310 int gdk_text_width(Font* font, char* text, int text_length) nothrow;
11311 int gdk_text_width_wc(Font* font, WChar* text, int text_length) nothrow;
11312 uint gdk_threads_add_idle(GLib2.SourceFunc function_, void* data) nothrow;
11313 uint gdk_threads_add_idle_full(int priority, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) nothrow;
11314 uint gdk_threads_add_timeout(uint interval, GLib2.SourceFunc function_, void* data) nothrow;
11315 uint gdk_threads_add_timeout_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) nothrow;
11316 uint gdk_threads_add_timeout_seconds(uint interval, GLib2.SourceFunc function_, void* data) nothrow;
11317 uint gdk_threads_add_timeout_seconds_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) nothrow;
11318 void gdk_threads_enter() nothrow;
11319 void gdk_threads_init() nothrow;
11320 void gdk_threads_leave() nothrow;
11321 void gdk_threads_set_lock_functions(GObject2.Callback enter_fn, GObject2.Callback leave_fn) nothrow;
11322 uint gdk_unicode_to_keyval(uint wc) nothrow;
11323 int gdk_utf8_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow;
11324 int gdk_utf8_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) nothrow;
11325 char* /*new*/ gdk_utf8_to_string_target(char* str) nothrow;
11326 char* /*new*/ gdk_wcstombs(WChar* src) nothrow;
11327 Window* gdk_window_at_pointer(/*out*/ int* win_x=null, /*out*/ int* win_y=null) nothrow;
11328 void gdk_window_constrain_size(Geometry* geometry, uint flags, int width, int height, /*out*/ int* new_width, /*out*/ int* new_height) nothrow;
11329 Window* gdk_window_foreign_new(NativeWindow anid) nothrow;
11330 Window* gdk_window_foreign_new_for_display(Display* display, NativeWindow anid) nothrow;
11331 GLib2.List* gdk_window_get_toplevels() nothrow;
11332 Window* gdk_window_lookup(NativeWindow anid) nothrow;
11333 Window* gdk_window_lookup_for_display(Display* display, NativeWindow anid) nothrow;
11334 void gdk_window_process_all_updates() nothrow;
11335 void gdk_window_set_debug_updates(int setting) nothrow;