Update. Clutter now working.
[girtod.git] / gtk2 / gdk2.d
blobdccbfa53b72603033c17dff020533586f4121d7c
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 // Creates a new #GdkAppLaunchContext.
40 // RETURNS: a new #GdkAppLaunchContext
41 static AppLaunchContext* /*new*/ new_() {
42 return gdk_app_launch_context_new();
45 // Sets the workspace on which applications will be launched when
46 // using this context when running under a window manager that
47 // supports multiple workspaces, as described in the
48 // <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
49 // Window Manager Hints</ulink>.
50 // When the workspace is not specified or @desktop is set to -1,
51 // it is up to the window manager to pick one, typically it will
52 // be the current workspace.
53 // <desktop>: the number of a workspace, or -1
54 void set_desktop(int desktop) {
55 gdk_app_launch_context_set_desktop(&this, desktop);
58 // Sets the display on which applications will be launched when
59 // using this context. See also gdk_app_launch_context_set_screen().
60 // <display>: a #GdkDisplay
61 void set_display(Display* display) {
62 gdk_app_launch_context_set_display(&this, display);
65 // Sets the icon for applications that are launched with this
66 // context.
67 // Window Managers can use this information when displaying startup
68 // notification.
69 // See also gdk_app_launch_context_set_icon_name().
70 // <icon>: a #GIcon, or %NULL
71 void set_icon(Gio2.Icon* icon=null) {
72 gdk_app_launch_context_set_icon(&this, icon);
75 // Sets the icon for applications that are launched with this context.
76 // The @icon_name will be interpreted in the same way as the Icon field
77 // in desktop files. See also gdk_app_launch_context_set_icon().
78 // If both @icon and @icon_name are set, the @icon_name takes priority.
79 // If neither @icon or @icon_name is set, the icon is taken from either
80 // the file that is passed to launched application or from the #GAppInfo
81 // for the launched application itself.
82 // <icon_name>: an icon name, or %NULL
83 void set_icon_name(char* icon_name=null) {
84 gdk_app_launch_context_set_icon_name(&this, icon_name);
87 // Sets the screen on which applications will be launched when
88 // using this context. See also gdk_app_launch_context_set_display().
89 // If both @screen and @display are set, the @screen takes priority.
90 // If neither @screen or @display are set, the default screen and
91 // display are used.
92 // <screen>: a #GdkScreen
93 void set_screen(Screen* screen) {
94 gdk_app_launch_context_set_screen(&this, screen);
97 // Sets the timestamp of @context. The timestamp should ideally
98 // be taken from the event that triggered the launch.
99 // Window managers can use this information to avoid moving the
100 // focus to the newly launched application when the user is busy
101 // typing in another window. This is also known as 'focus stealing
102 // prevention'.
103 // <timestamp>: a timestamp
104 void set_timestamp(uint timestamp) {
105 gdk_app_launch_context_set_timestamp(&this, timestamp);
109 struct AppLaunchContextClass {
110 Gio2.AppLaunchContextClass parent_class;
113 struct AppLaunchContextPrivate {
116 struct Atom {
119 enum AxisUse {
120 IGNORE = 0,
121 X = 1,
122 Y = 2,
123 PRESSURE = 3,
124 XTILT = 4,
125 YTILT = 5,
126 WHEEL = 6,
127 LAST = 7
129 struct Bitmap {
132 enum ByteOrder {
133 LSB_FIRST = 0,
134 MSB_FIRST = 1
136 enum int CURRENT_TIME = 0;
137 enum CapStyle {
138 NOT_LAST = 0,
139 BUTT = 1,
140 ROUND = 2,
141 PROJECTING = 3
143 struct Color {
144 uint pixel;
145 ushort red, green, blue;
148 // Makes a copy of a color structure. The result
149 // must be freed using gdk_color_free().
150 // RETURNS: a copy of @color.
151 Color* /*new*/ copy() {
152 return gdk_color_copy(&this);
155 // Compares two colors.
156 // RETURNS: %TRUE if the two colors compare equal
157 // <colorb>: another #GdkColor.
158 int equal(Color* colorb) {
159 return gdk_color_equal(&this, colorb);
162 // Frees a color structure created with
163 // gdk_color_copy().
164 void free() {
165 gdk_color_free(&this);
168 // A hash function suitable for using for a hash
169 // table that stores #GdkColor's.
170 // RETURNS: The hash function applied to @colora
171 uint hash() {
172 return gdk_color_hash(&this);
175 // Returns a textual specification of @color in the hexadecimal form
176 // <literal>&num;rrrrggggbbbb</literal>, where <literal>r</literal>,
177 // <literal>g</literal> and <literal>b</literal> are hex digits
178 // representing the red, green and blue components respectively.
179 // RETURNS: a newly-allocated text string
180 char* /*new*/ to_string() {
181 return gdk_color_to_string(&this);
185 struct Colormap /* : GObject.Object */ {
186 alias parent_instance this;
187 alias parent_instance super_;
188 alias parent_instance object;
189 GObject2.Object parent_instance;
190 int size;
191 Color* colors;
192 private Visual* visual;
193 private void* windowing_data;
196 // Creates a new colormap for the given visual.
197 // RETURNS: the new #GdkColormap.
198 // <visual>: a #GdkVisual.
199 // <allocate>: if %TRUE, the newly created colormap will be a private colormap, and all colors in it will be allocated for the applications use.
200 static Colormap* /*new*/ new_(Visual* visual, int allocate) {
201 return gdk_colormap_new(visual, allocate);
204 // Unintrospectable function: get_system() / gdk_colormap_get_system()
205 // Gets the system's default colormap for the default screen. (See
206 // gdk_colormap_get_system_for_screen ())
207 // RETURNS: the default colormap.
208 static Colormap* get_system() {
209 return gdk_colormap_get_system();
212 // Returns the size of the system's default colormap.
213 // (See the description of struct #GdkColormap for an
214 // explanation of the size of a colormap.)
215 // RETURNS: the size of the system's default colormap.
216 static int get_system_size() {
217 return gdk_colormap_get_system_size();
220 // Allocates a single color from a colormap.
221 // RETURNS: %TRUE if the allocation succeeded.
222 // <color>: the color to allocate. On return the <structfield>pixel</structfield> field will be filled in if allocation succeeds.
223 // <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.
224 // <best_match>: If %TRUE, GDK will attempt to do matching against existing colors if the color cannot be allocated as requested.
225 int alloc_color(Color* color, int writeable, int best_match) {
226 return gdk_colormap_alloc_color(&this, color, writeable, best_match);
229 // Allocates colors from a colormap.
230 // allocated.
231 // RETURNS: The number of colors that were not successfully
232 // <colors>: The color values to allocate. On return, the pixel values for allocated colors will be filled in.
233 // <n_colors>: The number of colors in @colors.
234 // <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.
235 // <best_match>: If %TRUE, GDK will attempt to do matching against existing colors if the colors cannot be allocated as requested.
236 // <success>: An array of length @ncolors. On return, this indicates whether the corresponding color in @colors was successfully allocated or not.
237 int alloc_colors(Color* colors, int n_colors, int writeable, int best_match, int* success) {
238 return gdk_colormap_alloc_colors(&this, colors, n_colors, writeable, best_match, success);
241 // Changes the value of the first @ncolors in a private colormap
242 // to match the values in the <structfield>colors</structfield>
243 // array in the colormap. This function is obsolete and
244 // should not be used. See gdk_color_change().
245 // <ncolors>: the number of colors to change.
246 void change(int ncolors) {
247 gdk_colormap_change(&this, ncolors);
250 // Frees previously allocated colors.
251 // <colors>: the colors to free.
252 // <n_colors>: the number of colors in @colors.
253 void free_colors(Color* colors, int n_colors) {
254 gdk_colormap_free_colors(&this, colors, n_colors);
257 // Unintrospectable method: get_screen() / gdk_colormap_get_screen()
258 // Gets the screen for which this colormap was created.
259 // RETURNS: the screen for which this colormap was created.
260 Screen* get_screen() {
261 return gdk_colormap_get_screen(&this);
264 // Unintrospectable method: get_visual() / gdk_colormap_get_visual()
265 // Returns the visual for which a given colormap was created.
266 // RETURNS: the visual of the colormap.
267 Visual* get_visual() {
268 return gdk_colormap_get_visual(&this);
271 // Locates the RGB color in @colormap corresponding to the given
272 // hardware pixel @pixel. @pixel must be a valid pixel in the
273 // colormap; it's a programmer error to call this function with a
274 // pixel which is not in the colormap. Hardware pixels are normally
275 // obtained from gdk_colormap_alloc_colors(), or from a #GdkImage. (A
276 // #GdkImage contains image data in hardware format, a #GdkPixbuf
277 // contains image data in a canonical 24-bit RGB format.)
278 // This function is rarely useful; it's used for example to
279 // implement the eyedropper feature in #GtkColorSelection.
280 // <pixel>: pixel value in hardware display format
281 // <result>: #GdkColor with red, green, blue fields initialized
282 void query_color(c_ulong pixel, Color* result) {
283 gdk_colormap_query_color(&this, pixel, result);
286 // Unintrospectable method: ref() / gdk_colormap_ref()
287 // Deprecated function; use g_object_ref() instead.
288 // RETURNS: the colormap
289 Colormap* ref_() {
290 return gdk_colormap_ref(&this);
292 // Deprecated function; use g_object_unref() instead.
293 void unref() {
294 gdk_colormap_unref(&this);
298 struct ColormapClass {
299 GObject2.ObjectClass parent_class;
302 enum CrossingMode {
303 NORMAL = 0,
304 GRAB = 1,
305 UNGRAB = 2,
306 GTK_GRAB = 3,
307 GTK_UNGRAB = 4,
308 STATE_CHANGED = 5
310 struct Cursor {
311 CursorType type;
312 private uint ref_count;
315 // Creates a new cursor from the set of builtin cursors for the default display.
316 // See gdk_cursor_new_for_display().
317 // To make the cursor invisible, use %GDK_BLANK_CURSOR.
318 // RETURNS: a new #GdkCursor
319 // <cursor_type>: cursor to create
320 static Cursor* /*new*/ new_(CursorType cursor_type) {
321 return gdk_cursor_new(cursor_type);
324 // Creates a new cursor from the set of builtin cursors.
325 // Some useful ones are:
326 // <itemizedlist>
327 // <listitem><para>
328 // <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic> #GDK_RIGHT_PTR (right-facing arrow)
329 // </para></listitem>
330 // <listitem><para>
331 // <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic> #GDK_CROSSHAIR (crosshair)
332 // </para></listitem>
333 // <listitem><para>
334 // <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic> #GDK_XTERM (I-beam)
335 // </para></listitem>
336 // <listitem><para>
337 // <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic> #GDK_WATCH (busy)
338 // </para></listitem>
339 // <listitem><para>
340 // <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic> #GDK_FLEUR (for moving objects)
341 // </para></listitem>
342 // <listitem><para>
343 // <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic> #GDK_HAND1 (a right-pointing hand)
344 // </para></listitem>
345 // <listitem><para>
346 // <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic> #GDK_HAND2 (a left-pointing hand)
347 // </para></listitem>
348 // <listitem><para>
349 // <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic> #GDK_LEFT_SIDE (resize left side)
350 // </para></listitem>
351 // <listitem><para>
352 // <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic> #GDK_RIGHT_SIDE (resize right side)
353 // </para></listitem>
354 // <listitem><para>
355 // <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic> #GDK_TOP_LEFT_CORNER (resize northwest corner)
356 // </para></listitem>
357 // <listitem><para>
358 // <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic> #GDK_TOP_RIGHT_CORNER (resize northeast corner)
359 // </para></listitem>
360 // <listitem><para>
361 // <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic> #GDK_BOTTOM_LEFT_CORNER (resize southwest corner)
362 // </para></listitem>
363 // <listitem><para>
364 // <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic> #GDK_BOTTOM_RIGHT_CORNER (resize southeast corner)
365 // </para></listitem>
366 // <listitem><para>
367 // <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic> #GDK_TOP_SIDE (resize top side)
368 // </para></listitem>
369 // <listitem><para>
370 // <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic> #GDK_BOTTOM_SIDE (resize bottom side)
371 // </para></listitem>
372 // <listitem><para>
373 // <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic> #GDK_SB_H_DOUBLE_ARROW (move vertical splitter)
374 // </para></listitem>
375 // <listitem><para>
376 // <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic> #GDK_SB_V_DOUBLE_ARROW (move horizontal splitter)
377 // </para></listitem>
378 // <listitem><para>
379 // #GDK_BLANK_CURSOR (Blank cursor). Since 2.16
380 // </para></listitem>
381 // </itemizedlist>
382 // RETURNS: a new #GdkCursor
383 // <display>: the #GdkDisplay for which the cursor will be created
384 // <cursor_type>: cursor to create
385 static Cursor* /*new*/ new_for_display(Display* display, CursorType cursor_type) {
386 return gdk_cursor_new_for_display(display, cursor_type);
389 // Creates a new cursor by looking up @name in the current cursor
390 // theme.
391 // the given name
392 // RETURNS: a new #GdkCursor, or %NULL if there is no cursor with
393 // <display>: the #GdkDisplay for which the cursor will be created
394 // <name>: the name of the cursor
395 static Cursor* /*new*/ new_from_name(Display* display, char* name) {
396 return gdk_cursor_new_from_name(display, name);
399 // Creates a new cursor from a pixbuf.
400 // Not all GDK backends support RGBA cursors. If they are not
401 // supported, a monochrome approximation will be displayed.
402 // The functions gdk_display_supports_cursor_alpha() and
403 // gdk_display_supports_cursor_color() can be used to determine
404 // whether RGBA cursors are supported;
405 // gdk_display_get_default_cursor_size() and
406 // gdk_display_get_maximal_cursor_size() give information about
407 // cursor sizes.
408 // If @x or @y are <literal>-1</literal>, the pixbuf must have
409 // options named "x_hot" and "y_hot", resp., containing
410 // integer values between %0 and the width resp. height of
411 // On the X backend, support for RGBA cursors requires a
412 // sufficently new version of the X Render extension.
413 // RETURNS: a new #GdkCursor.
414 // <display>: the #GdkDisplay for which the cursor will be created
415 // <pixbuf>: the #GdkPixbuf containing the cursor image
416 // <x>: the horizontal offset of the 'hotspot' of the cursor.
417 // <y>: the vertical offset of the 'hotspot' of the cursor.
418 static Cursor* /*new*/ new_from_pixbuf(Display* display, GdkPixbuf2.Pixbuf* pixbuf, int x, int y) {
419 return gdk_cursor_new_from_pixbuf(display, pixbuf, x, y);
422 // Creates a new cursor from a given pixmap and mask. Both the pixmap and mask
423 // must have a depth of 1 (i.e. each pixel has only 2 values - on or off).
424 // The standard cursor size is 16 by 16 pixels. You can create a bitmap
425 // from inline data as in the below example.
426 // <example><title>Creating a custom cursor</title>
427 // <programlisting>
428 // /<!-- -->* This data is in X bitmap format, and can be created with the 'bitmap'
429 // utility. *<!-- -->/
430 // &num;define cursor1_width 16
431 // &num;define cursor1_height 16
432 // static unsigned char cursor1_bits[] = {
433 // 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
434 // 0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
435 // 0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01};
436 // static unsigned char cursor1mask_bits[] = {
437 // 0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31,
438 // 0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18,
439 // 0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01};
440 // GdkCursor *cursor;
441 // GdkPixmap *source, *mask;
442 // GdkColor fg = { 0, 65535, 0, 0 }; /<!-- -->* Red. *<!-- -->/
443 // GdkColor bg = { 0, 0, 0, 65535 }; /<!-- -->* Blue. *<!-- -->/
444 // source = gdk_bitmap_create_from_data (NULL, cursor1_bits,
445 // cursor1_width, cursor1_height);
446 // mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
447 // cursor1_width, cursor1_height);
448 // cursor = gdk_cursor_new_from_pixmap (source, mask, &amp;fg, &amp;bg, 8, 8);
449 // g_object_unref (source);
450 // g_object_unref (mask);
451 // gdk_window_set_cursor (widget->window, cursor);
452 // </programlisting>
453 // </example>
454 // RETURNS: a new #GdkCursor.
455 // <source>: the pixmap specifying the cursor.
456 // <mask>: the pixmap specifying the mask, which must be the same size as
457 // <fg>: the foreground color, used for the bits in the source which are 1. The color does not have to be allocated first.
458 // <bg>: the background color, used for the bits in the source which are 0. The color does not have to be allocated first.
459 // <x>: the horizontal offset of the 'hotspot' of the cursor.
460 // <y>: the vertical offset of the 'hotspot' of the cursor.
461 static Cursor* /*new*/ new_from_pixmap(Pixmap* source, Pixmap* mask, Color* fg, Color* bg, int x, int y) {
462 return gdk_cursor_new_from_pixmap(source, mask, fg, bg, x, y);
465 // Returns the cursor type for this cursor.
466 // RETURNS: a #GdkCursorType
467 CursorType get_cursor_type() {
468 return gdk_cursor_get_cursor_type(&this);
471 // Unintrospectable method: get_display() / gdk_cursor_get_display()
472 // Returns the display on which the #GdkCursor is defined.
473 // RETURNS: the #GdkDisplay associated to @cursor
474 Display* get_display() {
475 return gdk_cursor_get_display(&this);
478 // Unintrospectable method: get_image() / gdk_cursor_get_image()
479 // Returns a #GdkPixbuf with the image used to display the cursor.
480 // Note that depending on the capabilities of the windowing system and
481 // on the cursor, GDK may not be able to obtain the image data. In this
482 // case, %NULL is returned.
483 // RETURNS: a #GdkPixbuf representing @cursor, or %NULL
484 GdkPixbuf2.Pixbuf* get_image() {
485 return gdk_cursor_get_image(&this);
488 // Adds a reference to @cursor.
489 // RETURNS: Same @cursor that was passed in
490 Cursor* /*new*/ ref_() {
491 return gdk_cursor_ref(&this);
494 // Removes a reference from @cursor, deallocating the cursor
495 // if no references remain.
496 void unref() {
497 gdk_cursor_unref(&this);
501 enum CursorType {
502 X_CURSOR = 0,
503 ARROW = 2,
504 BASED_ARROW_DOWN = 4,
505 BASED_ARROW_UP = 6,
506 BOAT = 8,
507 BOGOSITY = 10,
508 BOTTOM_LEFT_CORNER = 12,
509 BOTTOM_RIGHT_CORNER = 14,
510 BOTTOM_SIDE = 16,
511 BOTTOM_TEE = 18,
512 BOX_SPIRAL = 20,
513 CENTER_PTR = 22,
514 CIRCLE = 24,
515 CLOCK = 26,
516 COFFEE_MUG = 28,
517 CROSS = 30,
518 CROSS_REVERSE = 32,
519 CROSSHAIR = 34,
520 DIAMOND_CROSS = 36,
521 DOT = 38,
522 DOTBOX = 40,
523 DOUBLE_ARROW = 42,
524 DRAFT_LARGE = 44,
525 DRAFT_SMALL = 46,
526 DRAPED_BOX = 48,
527 EXCHANGE = 50,
528 FLEUR = 52,
529 GOBBLER = 54,
530 GUMBY = 56,
531 HAND1 = 58,
532 HAND2 = 60,
533 HEART = 62,
534 ICON = 64,
535 IRON_CROSS = 66,
536 LEFT_PTR = 68,
537 LEFT_SIDE = 70,
538 LEFT_TEE = 72,
539 LEFTBUTTON = 74,
540 LL_ANGLE = 76,
541 LR_ANGLE = 78,
542 MAN = 80,
543 MIDDLEBUTTON = 82,
544 MOUSE = 84,
545 PENCIL = 86,
546 PIRATE = 88,
547 PLUS = 90,
548 QUESTION_ARROW = 92,
549 RIGHT_PTR = 94,
550 RIGHT_SIDE = 96,
551 RIGHT_TEE = 98,
552 RIGHTBUTTON = 100,
553 RTL_LOGO = 102,
554 SAILBOAT = 104,
555 SB_DOWN_ARROW = 106,
556 SB_H_DOUBLE_ARROW = 108,
557 SB_LEFT_ARROW = 110,
558 SB_RIGHT_ARROW = 112,
559 SB_UP_ARROW = 114,
560 SB_V_DOUBLE_ARROW = 116,
561 SHUTTLE = 118,
562 SIZING = 120,
563 SPIDER = 122,
564 SPRAYCAN = 124,
565 STAR = 126,
566 TARGET = 128,
567 TCROSS = 130,
568 TOP_LEFT_ARROW = 132,
569 TOP_LEFT_CORNER = 134,
570 TOP_RIGHT_CORNER = 136,
571 TOP_SIDE = 138,
572 TOP_TEE = 140,
573 TREK = 142,
574 UL_ANGLE = 144,
575 UMBRELLA = 146,
576 UR_ANGLE = 148,
577 WATCH = 150,
578 XTERM = 152,
579 LAST_CURSOR = 153,
580 BLANK_CURSOR = -2,
581 CURSOR_IS_PIXMAP = -1
583 extern (C) alias void function (void* data) DestroyNotify;
585 struct Device /* : GObject.Object */ {
586 alias parent_instance this;
587 alias parent_instance super_;
588 alias parent_instance object;
589 GObject2.Object parent_instance;
590 char* name;
591 InputSource source;
592 InputMode mode;
593 int has_cursor;
594 int num_axes;
595 DeviceAxis* axes;
596 int num_keys;
597 DeviceKey* keys;
600 // Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
601 // <events>: an array of #GdkTimeCoord.
602 // <n_events>: the length of the array.
603 static void free_history(/*inout*/ TimeCoord** events, int n_events) {
604 gdk_device_free_history(events, n_events);
607 // Unintrospectable function: get_core_pointer() / gdk_device_get_core_pointer()
608 // Returns the core pointer device for the default display.
609 // display and should not be freed.
610 // RETURNS: the core pointer device; this is owned by the
611 static Device* get_core_pointer() {
612 return gdk_device_get_core_pointer();
615 // Interprets an array of double as axis values for a given device,
616 // and locates the value in the array for a given axis use.
617 // RETURNS: %TRUE if the given axis use was found, otherwise %FALSE
618 // <axes>: pointer to an array of axes
619 // <use>: the use to look for
620 // <value>: location to store the found value.
621 int get_axis(double* axes, AxisUse use, double* value) {
622 return gdk_device_get_axis(&this, axes, use, value);
625 // Returns the axis use for @index.
626 // RETURNS: a #GdkAxisUse specifying how the axis is used.
627 // <index>: the index of the axis.
628 AxisUse get_axis_use(uint index) {
629 return gdk_device_get_axis_use(&this, index);
632 // Determines whether the pointer follows device motion.
633 // RETURNS: %TRUE if the pointer follows device motion
634 int get_has_cursor() {
635 return gdk_device_get_has_cursor(&this);
638 // Obtains the motion history for a device; given a starting and
639 // ending timestamp, return all events in the motion history for
640 // the device in the given range of time. Some windowing systems
641 // do not support motion history, in which case, %FALSE will
642 // be returned. (This is not distinguishable from the case where
643 // motion history is supported and no events were found.)
644 // at least one event was found.
645 // RETURNS: %TRUE if the windowing system supports motion history and
646 // <window>: the window with respect to which which the event coordinates will be reported
647 // <start>: starting timestamp for range of events to return
648 // <stop>: ending timestamp for the range of events to return
649 // <events>: location to store a newly-allocated array of #GdkTimeCoord, or %NULL
650 // <n_events>: location to store the length of @events, or %NULL
651 int get_history(Window* window, uint start, uint stop, /*out*/ TimeCoord*** events, /*out*/ int* n_events) {
652 return gdk_device_get_history(&this, window, start, stop, events, n_events);
655 // If @index has a valid keyval, this function will
656 // fill in @keyval and @modifiers with the keyval settings.
657 // <index>: the index of the macro button to get.
658 // <keyval>: return value for the keyval.
659 // <modifiers>: return value for modifiers.
660 void get_key(uint index, uint* keyval, ModifierType* modifiers) {
661 gdk_device_get_key(&this, index, keyval, modifiers);
664 // Determines the mode of the device.
665 // RETURNS: a #GdkInputSource
666 InputMode get_mode() {
667 return gdk_device_get_mode(&this);
670 // Gets the number of axes of a device.
671 // RETURNS: the number of axes of @device
672 int get_n_axes() {
673 return gdk_device_get_n_axes(&this);
676 // Gets the number of keys of a device.
677 // RETURNS: the number of keys of @device
678 int get_n_keys() {
679 return gdk_device_get_n_keys(&this);
682 // Determines the name of the device.
683 // RETURNS: a name
684 char* get_name() {
685 return gdk_device_get_name(&this);
688 // Determines the type of the device.
689 // RETURNS: a #GdkInputSource
690 InputSource get_source() {
691 return gdk_device_get_source(&this);
693 void get_state(Window* window, double* axes, ModifierType* mask) {
694 gdk_device_get_state(&this, window, axes, mask);
696 void set_axis_use(uint index_, AxisUse use) {
697 gdk_device_set_axis_use(&this, index_, use);
699 void set_key(uint index_, uint keyval, ModifierType modifiers) {
700 gdk_device_set_key(&this, index_, keyval, modifiers);
702 int set_mode(InputMode mode) {
703 return gdk_device_set_mode(&this, mode);
705 void set_source(InputSource source) {
706 gdk_device_set_source(&this, source);
710 struct DeviceAxis {
711 AxisUse use;
712 double min, max;
715 struct DeviceClass {
718 struct DeviceKey {
719 uint keyval;
720 ModifierType modifiers;
723 struct Display /* : GObject.Object */ {
724 alias parent_instance this;
725 alias parent_instance super_;
726 alias parent_instance object;
727 GObject2.Object parent_instance;
728 private GLib2.List* queued_events, queued_tail;
729 private uint[2] button_click_time;
730 private Window*[2] button_window;
731 private int[2] button_number;
732 private uint double_click_time;
733 private Device* core_pointer;
734 private DisplayPointerHooks* pointer_hooks;
735 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
736 uint, "closed", 1,
737 uint, "ignore_core_events", 1,
738 uint, "__dummy32A", 30));
739 private uint double_click_distance;
740 private int[2] button_x, button_y;
741 private GLib2.List* pointer_grabs;
742 private KeyboardGrabInfo keyboard_grab;
743 private PointerWindowInfo pointer_info;
744 private uint last_event_time;
747 // Gets the default #GdkDisplay. This is a convenience
748 // function for
749 // <literal>gdk_display_manager_get_default_display (gdk_display_manager_get ())</literal>.
750 // display.
751 // RETURNS: a #GdkDisplay, or %NULL if there is no default
752 static Display* get_default() {
753 return gdk_display_get_default();
756 // Unintrospectable function: open() / gdk_display_open()
757 // Opens a display.
758 // RETURNS: a #GdkDisplay, or %NULL if the display could not be opened.
759 // <display_name>: the name of the display to open
760 static Display* open(char* display_name) {
761 return gdk_display_open(display_name);
764 // Unintrospectable function: open_default_libgtk_only() / gdk_display_open_default_libgtk_only()
765 // Opens the default display specified by command line arguments or
766 // environment variables, sets it as the default display, and returns
767 // it. gdk_parse_args must have been called first. If the default
768 // display has previously been set, simply returns that. An internal
769 // function that should not be used by applications.
770 // otherwise %NULL.
771 // RETURNS: the default display, if it could be opened,
772 static Display* open_default_libgtk_only() {
773 return gdk_display_open_default_libgtk_only();
775 // Unintrospectable method: add_client_message_filter() / gdk_display_add_client_message_filter()
776 void add_client_message_filter(Atom message_type, FilterFunc func, void* data) {
777 gdk_display_add_client_message_filter(&this, message_type, func, data);
779 // Emits a short beep on @display
780 void beep() {
781 gdk_display_beep(&this);
784 // Closes the connection to the windowing system for the given display,
785 // and cleans up associated resources.
786 void close() {
787 gdk_display_close(&this);
790 // Flushes any requests queued for the windowing system; this happens automatically
791 // when the main loop blocks waiting for new events, but if your application
792 // is drawing without returning control to the main loop, you may need
793 // to call this function explicitely. A common case where this function
794 // needs to be called is when an application is executing drawing commands
795 // from a thread other than the thread where the main loop is running.
796 // This is most useful for X11. On windowing systems where requests are
797 // handled synchronously, this function will do nothing.
798 void flush() {
799 gdk_display_flush(&this);
802 // Unintrospectable method: get_core_pointer() / gdk_display_get_core_pointer()
803 // Returns the core pointer device for the given display
804 // display and should not be freed.
805 // RETURNS: the core pointer device; this is owned by the
806 Device* get_core_pointer() {
807 return gdk_display_get_core_pointer(&this);
810 // Returns the default size to use for cursors on @display.
811 // RETURNS: the default cursor size.
812 uint get_default_cursor_size() {
813 return gdk_display_get_default_cursor_size(&this);
816 // Unintrospectable method: get_default_group() / gdk_display_get_default_group()
817 // Returns the default group leader window for all toplevel windows
818 // on @display. This window is implicitly created by GDK.
819 // See gdk_window_set_group().
820 // RETURNS: The default group leader window for @display
821 Window* get_default_group() {
822 return gdk_display_get_default_group(&this);
825 // Unintrospectable method: get_default_screen() / gdk_display_get_default_screen()
826 // Get the default #GdkScreen for @display.
827 // RETURNS: the default #GdkScreen object for @display
828 Screen* get_default_screen() {
829 return gdk_display_get_default_screen(&this);
832 // Gets the next #GdkEvent to be processed for @display, fetching events from the
833 // windowing system if necessary.
834 // are pending. The returned #GdkEvent should be freed with gdk_event_free().
835 // RETURNS: the next #GdkEvent to be processed, or %NULL if no events
836 Event* /*new*/ get_event() {
837 return gdk_display_get_event(&this);
840 // Gets the maximal size to use for cursors on @display.
841 // <width>: the return location for the maximal cursor width
842 // <height>: the return location for the maximal cursor height
843 void get_maximal_cursor_size(/*out*/ uint* width, /*out*/ uint* height) {
844 gdk_display_get_maximal_cursor_size(&this, width, height);
847 // Gets the number of screen managed by the @display.
848 // RETURNS: number of screens.
849 int get_n_screens() {
850 return gdk_display_get_n_screens(&this);
853 // Gets the name of the display.
854 // by GDK and should not be modified or freed.
855 // RETURNS: a string representing the display name. This string is owned
856 char* get_name() {
857 return gdk_display_get_name(&this);
860 // Gets the current location of the pointer and the current modifier
861 // mask for a given display.
862 // <screen>: location to store the screen that the cursor is on, or %NULL.
863 // <x>: location to store root window X coordinate of pointer, or %NULL.
864 // <y>: location to store root window Y coordinate of pointer, or %NULL.
865 // <mask>: location to store current modifier mask, or %NULL
866 void get_pointer(/*out*/ Screen** screen=null, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) {
867 gdk_display_get_pointer(&this, screen, x, y, mask);
870 // Unintrospectable method: get_screen() / gdk_display_get_screen()
871 // Returns a screen object for one of the screens of the display.
872 // RETURNS: the #GdkScreen object
873 // <screen_num>: the screen number
874 Screen* get_screen(int screen_num) {
875 return gdk_display_get_screen(&this, screen_num);
878 // Obtains the window underneath the mouse pointer, returning the location
879 // of the pointer in that window in @win_x, @win_y for @screen. Returns %NULL
880 // if the window under the mouse pointer is not known to GDK (for example,
881 // belongs to another application).
882 // RETURNS: the window under the mouse pointer, or %NULL
883 // <win_x>: return location for x coordinate of the pointer location relative to the window origin, or %NULL
884 // <win_y>: return location for y coordinate of the pointer location relative
885 Window* get_window_at_pointer(/*out*/ int* win_x=null, /*out*/ int* win_y=null) {
886 return gdk_display_get_window_at_pointer(&this, win_x, win_y);
889 // Finds out if the display has been closed.
890 // RETURNS: %TRUE if the display is closed.
891 int is_closed() {
892 return gdk_display_is_closed(&this);
895 // Release any keyboard grab
896 // <time_>: a timestap (e.g #GDK_CURRENT_TIME).
897 void keyboard_ungrab(uint time_) {
898 gdk_display_keyboard_ungrab(&this, time_);
901 // Unintrospectable method: list_devices() / gdk_display_list_devices()
902 // Returns the list of available input devices attached to @display.
903 // The list is statically allocated and should not be freed.
904 // RETURNS: a list of #GdkDevice
905 GLib2.List* list_devices() {
906 return gdk_display_list_devices(&this);
909 // Gets a copy of the first #GdkEvent in the @display's event queue, without
910 // removing the event from the queue. (Note that this function will
911 // not get more events from the windowing system. It only checks the events
912 // that have already been moved to the GDK event queue.)
913 // if no events are in the queue. The returned #GdkEvent should be freed with
914 // gdk_event_free().
915 // RETURNS: a copy of the first #GdkEvent on the event queue, or %NULL
916 Event* /*new*/ peek_event() {
917 return gdk_display_peek_event(&this);
920 // Test if the pointer is grabbed.
921 // RETURNS: %TRUE if an active X pointer grab is in effect
922 int pointer_is_grabbed() {
923 return gdk_display_pointer_is_grabbed(&this);
926 // Release any pointer grab.
927 // <time_>: a timestap (e.g. %GDK_CURRENT_TIME).
928 void pointer_ungrab(uint time_) {
929 gdk_display_pointer_ungrab(&this, time_);
932 // Appends a copy of the given event onto the front of the event
933 // queue for @display.
934 // <event>: a #GdkEvent.
935 void put_event(Event* event) {
936 gdk_display_put_event(&this, event);
939 // Request #GdkEventOwnerChange events for ownership changes
940 // of the selection named by the given atom.
941 // be sent.
942 // RETURNS: whether #GdkEventOwnerChange events will
943 // <selection>: the #GdkAtom naming the selection for which ownership change notification is requested
944 int request_selection_notification(Atom selection) {
945 return gdk_display_request_selection_notification(&this, selection);
948 // Sets the double click distance (two clicks within this distance
949 // count as a double click and result in a #GDK_2BUTTON_PRESS event).
950 // See also gdk_display_set_double_click_time().
951 // Applications should <emphasis>not</emphasis> set this, it is a global
952 // user-configured setting.
953 // <distance>: distance in pixels
954 void set_double_click_distance(uint distance) {
955 gdk_display_set_double_click_distance(&this, distance);
958 // Sets the double click time (two clicks within this time interval
959 // count as a double click and result in a #GDK_2BUTTON_PRESS event).
960 // Applications should <emphasis>not</emphasis> set this, it is a global
961 // user-configured setting.
962 // <msec>: double click time in milliseconds (thousandths of a second)
963 void set_double_click_time(uint msec) {
964 gdk_display_set_double_click_time(&this, msec);
967 // Unintrospectable method: set_pointer_hooks() / gdk_display_set_pointer_hooks()
968 // This function allows for hooking into the operation
969 // of getting the current location of the pointer on a particular
970 // display. This is only useful for such low-level tools as an
971 // event recorder. Applications should never have any
972 // reason to use this facility.
973 // RETURNS: the previous pointer hook table
974 // <new_hooks>: a table of pointers to functions for getting quantities related to the current pointer position, or %NULL to restore the default table.
975 DisplayPointerHooks* set_pointer_hooks(DisplayPointerHooks* new_hooks) {
976 return gdk_display_set_pointer_hooks(&this, new_hooks);
979 // Issues a request to the clipboard manager to store the
980 // clipboard data. On X11, this is a special program that works
981 // according to the freedesktop clipboard specification, available at
982 // <ulink url="http://www.freedesktop.org/Standards/clipboard-manager-spec">
983 // http://www.freedesktop.org/Standards/clipboard-manager-spec</ulink>.
984 // <clipboard_window>: a #GdkWindow belonging to the clipboard owner
985 // <time_>: a timestamp if all available targets should be saved.
986 // <n_targets>: length of the @targets array
987 void store_clipboard(Window* clipboard_window, uint time_, Atom* targets, int n_targets) {
988 gdk_display_store_clipboard(&this, clipboard_window, time_, targets, n_targets);
991 // Returns whether the speicifed display supports clipboard
992 // persistance; i.e. if it's possible to store the clipboard data after an
993 // application has quit. On X11 this checks if a clipboard daemon is
994 // running.
995 // RETURNS: %TRUE if the display supports clipboard persistance.
996 int supports_clipboard_persistence() {
997 return gdk_display_supports_clipboard_persistence(&this);
1000 // Returns %TRUE if gdk_window_set_composited() can be used
1001 // to redirect drawing on the window using compositing.
1002 // Currently this only works on X11 with XComposite and
1003 // XDamage extensions available.
1004 // RETURNS: %TRUE if windows may be composited.
1005 int supports_composite() {
1006 return gdk_display_supports_composite(&this);
1009 // Returns %TRUE if cursors can use an 8bit alpha channel
1010 // on @display. Otherwise, cursors are restricted to bilevel
1011 // alpha (i.e. a mask).
1012 // RETURNS: whether cursors can have alpha channels.
1013 int supports_cursor_alpha() {
1014 return gdk_display_supports_cursor_alpha(&this);
1017 // Returns %TRUE if multicolored cursors are supported
1018 // on @display. Otherwise, cursors have only a forground
1019 // and a background color.
1020 // RETURNS: whether cursors can have multiple colors.
1021 int supports_cursor_color() {
1022 return gdk_display_supports_cursor_color(&this);
1025 // Returns %TRUE if gdk_window_input_shape_combine_mask() can
1026 // be used to modify the input shape of windows on @display.
1027 // RETURNS: %TRUE if windows with modified input shape are supported
1028 int supports_input_shapes() {
1029 return gdk_display_supports_input_shapes(&this);
1032 // Returns whether #GdkEventOwnerChange events will be
1033 // sent when the owner of a selection changes.
1034 // be sent.
1035 // RETURNS: whether #GdkEventOwnerChange events will
1036 int supports_selection_notification() {
1037 return gdk_display_supports_selection_notification(&this);
1040 // Returns %TRUE if gdk_window_shape_combine_mask() can
1041 // be used to create shaped windows on @display.
1042 // RETURNS: %TRUE if shaped windows are supported
1043 int supports_shapes() {
1044 return gdk_display_supports_shapes(&this);
1047 // Flushes any requests queued for the windowing system and waits until all
1048 // requests have been handled. This is often used for making sure that the
1049 // display is synchronized with the current state of the program. Calling
1050 // gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors
1051 // generated from earlier requests are handled before the error trap is
1052 // removed.
1053 // This is most useful for X11. On windowing systems where requests are
1054 // handled synchronously, this function will do nothing.
1055 void sync() {
1056 gdk_display_sync(&this);
1059 // Warps the pointer of @display to the point @x,@y on
1060 // the screen @screen, unless the pointer is confined
1061 // to a window by a grab, in which case it will be moved
1062 // as far as allowed by the grab. Warping the pointer
1063 // creates events as if the user had moved the mouse
1064 // instantaneously to the destination.
1065 // Note that the pointer should normally be under the
1066 // control of the user. This function was added to cover
1067 // some rare use cases like keyboard navigation support
1068 // for the color picker in the #GtkColorSelectionDialog.
1069 // <screen>: the screen of @display to warp the pointer to
1070 // <x>: the x coordinate of the destination
1071 // <y>: the y coordinate of the destination
1072 void warp_pointer(Screen* screen, int x, int y) {
1073 gdk_display_warp_pointer(&this, screen, x, y);
1076 // The ::closed signal is emitted when the connection to the windowing
1077 // system for @display is closed.
1078 // <is_error>: %TRUE if the display was closed due to an error
1079 extern (C) alias static void function (Display* this_, c_int is_error, void* user_data=null) signal_closed;
1081 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1082 return super_.signal_connect!name(cb, data, cf);
1085 ulong signal_connect(string name:"closed", CB/*:signal_closed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1086 return signal_connect_data(&this, cast(char*)"closed",
1087 cast(GObject2.Callback)cb, data, null, cf);
1091 struct DisplayClass {
1092 GObject2.ObjectClass parent_class;
1093 extern (C) char* function (Display* display) get_display_name;
1094 // RETURNS: number of screens.
1095 extern (C) int function (Display* display) get_n_screens;
1097 // Unintrospectable functionp: get_screen() / ()
1099 // RETURNS: the #GdkScreen object
1100 // <screen_num>: the screen number
1101 extern (C) Screen* function (Display* display, int screen_num) get_screen;
1103 // Unintrospectable functionp: get_default_screen() / ()
1105 // RETURNS: the default #GdkScreen object for @display
1106 extern (C) Screen* function (Display* display) get_default_screen;
1107 extern (C) void function (Display* display, int is_error) closed;
1110 struct DisplayManager /* : GObject.Object */ {
1111 alias method_parent this;
1112 alias method_parent super_;
1113 alias method_parent object;
1114 GObject2.Object method_parent;
1117 // Gets the singleton #GdkDisplayManager object.
1118 // gdk_init(), or gdk_init_check() must have been called first.
1119 // RETURNS: The global #GdkDisplayManager singleton; gdk_parse_pargs(),
1120 static DisplayManager* get() {
1121 return gdk_display_manager_get();
1124 // Gets the default #GdkDisplay.
1125 // display.
1126 // RETURNS: a #GdkDisplay, or %NULL if there is no default
1127 Display* get_default_display() {
1128 return gdk_display_manager_get_default_display(&this);
1131 // List all currently open displays.
1132 // #GSList of #GdkDisplay objects. Free this list with g_slist_free() when you
1133 // are done with it.
1134 // RETURNS: a newly allocated
1135 GLib2.SList* /*new container*/ list_displays() {
1136 return gdk_display_manager_list_displays(&this);
1139 // Sets @display as the default display.
1140 // <display>: a #GdkDisplay
1141 void set_default_display(Display* display) {
1142 gdk_display_manager_set_default_display(&this, display);
1145 // The ::display_opened signal is emitted when a display is opened.
1146 // <display>: the opened display
1147 extern (C) alias static void function (DisplayManager* this_, Display* display, void* user_data=null) signal_display_opened;
1149 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1150 return super_.signal_connect!name(cb, data, cf);
1153 ulong signal_connect(string name:"display-opened", CB/*:signal_display_opened*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
1154 return signal_connect_data(&this, cast(char*)"display-opened",
1155 cast(GObject2.Callback)cb, data, null, cf);
1159 struct DisplayManagerClass {
1160 GObject2.ObjectClass parent_class;
1161 extern (C) void function (DisplayManager* display_manager, Display* display) display_opened;
1164 struct DisplayPointerHooks {
1165 extern (C) void function (Display* display, Screen** screen, int* x, int* y, ModifierType* mask) get_pointer;
1166 // Unintrospectable functionp: window_get_pointer() / ()
1167 extern (C) Window* function (Display* display, Window* window, int* x, int* y, ModifierType* mask) window_get_pointer;
1168 // Unintrospectable functionp: window_at_pointer() / ()
1169 extern (C) Window* function (Display* display, int* win_x, int* win_y) window_at_pointer;
1172 enum DragAction {
1173 DEFAULT = 1,
1174 COPY = 2,
1175 MOVE = 4,
1176 LINK = 8,
1177 PRIVATE = 16,
1178 ASK = 32
1180 struct DragContext /* : GObject.Object */ {
1181 alias parent_instance this;
1182 alias parent_instance super_;
1183 alias parent_instance object;
1184 GObject2.Object parent_instance;
1185 DragProtocol protocol;
1186 int is_source;
1187 Window* source_window, dest_window;
1188 GLib2.List* targets;
1189 DragAction actions, suggested_action, action;
1190 uint start_time;
1191 private void* windowing_data;
1194 // Creates a new #GdkDragContext.
1195 // obtain drag contexts by gdk_drag_begin() or similar.
1196 // RETURNS: the newly created #GdkDragContext.
1197 static DragContext* /*new*/ new_() {
1198 return gdk_drag_context_new();
1201 // Determines the bitmask of actions proposed by the source if
1202 // gdk_drag_context_suggested_action() returns GDK_ACTION_ASK.
1203 // RETURNS: the #GdkDragAction flags
1204 DragAction get_actions() {
1205 return gdk_drag_context_get_actions(&this);
1208 // Returns the destination windw for the DND operation.
1209 // RETURNS: a #GdkWindow
1210 Window* get_dest_window() {
1211 return gdk_drag_context_get_dest_window(&this);
1214 // Returns the drag protocol thats used by this context.
1215 // RETURNS: the drag protocol
1216 DragProtocol get_protocol() {
1217 return gdk_drag_context_get_protocol(&this);
1220 // Determines the action chosen by the drag destination.
1221 // RETURNS: a #GdkDragAction value
1222 DragAction get_selected_action() {
1223 return gdk_drag_context_get_selected_action(&this);
1226 // Returns the #GdkWindow where the DND operation started.
1227 // RETURNS: a #GdkWindow
1228 Window* get_source_window() {
1229 return gdk_drag_context_get_source_window(&this);
1232 // Determines the suggested drag action of the context.
1233 // RETURNS: a #GdkDragAction value
1234 DragAction get_suggested_action() {
1235 return gdk_drag_context_get_suggested_action(&this);
1238 // Retrieves the list of targets of the context.
1239 // RETURNS: a #GList of targets
1240 GLib2.List* list_targets() {
1241 return gdk_drag_context_list_targets(&this);
1243 // Deprecated function; use g_object_ref() instead.
1244 void ref_() {
1245 gdk_drag_context_ref(&this);
1247 // Deprecated function; use g_object_unref() instead.
1248 void unref() {
1249 gdk_drag_context_unref(&this);
1253 struct DragContextClass {
1254 GObject2.ObjectClass parent_class;
1257 enum DragProtocol {
1258 MOTIF = 0,
1259 XDND = 1,
1260 ROOTWIN = 2,
1261 NONE = 3,
1262 WIN32_DROPFILES = 4,
1263 OLE2 = 5,
1264 LOCAL = 6
1266 struct Drawable /* : GObject.Object */ {
1267 alias parent_instance this;
1268 alias parent_instance super_;
1269 alias parent_instance object;
1270 GObject2.Object parent_instance;
1273 // Unintrospectable method: copy_to_image() / gdk_drawable_copy_to_image()
1274 // Copies a portion of @drawable into the client side image structure
1275 // and copies into that. See gdk_drawable_get_image() for further details.
1276 // of @drawable
1277 // surface if you want to download contents to the client.
1278 // RETURNS: @image, or a new a #GdkImage containing the contents
1279 // <image>: a #GdkDrawable, or %NULL if a new @image should be created.
1280 // <src_x>: x coordinate on @drawable
1281 // <src_y>: y coordinate on @drawable
1282 // <dest_x>: x coordinate within @image. Must be 0 if @image is %NULL
1283 // <dest_y>: y coordinate within @image. Must be 0 if @image is %NULL
1284 // <width>: width of region to get
1285 // <height>: height or region to get
1286 Image* copy_to_image(Image* image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
1287 return gdk_drawable_copy_to_image(&this, image, src_x, src_y, dest_x, dest_y, width, height);
1290 // Unintrospectable method: get_clip_region() / gdk_drawable_get_clip_region()
1291 // Computes the region of a drawable that potentially can be written
1292 // to by drawing primitives. This region will not take into account
1293 // the clip region for the GC, and may also not take into account
1294 // other factors such as if the window is obscured by other windows,
1295 // but no area outside of this region will be affected by drawing
1296 // primitives.
1297 // when you are done.
1298 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1299 Region* get_clip_region() {
1300 return gdk_drawable_get_clip_region(&this);
1303 // Unintrospectable method: get_colormap() / gdk_drawable_get_colormap()
1304 // Gets the colormap for @drawable, if one is set; returns
1305 // %NULL otherwise.
1306 // RETURNS: the colormap, or %NULL
1307 Colormap* get_colormap() {
1308 return gdk_drawable_get_colormap(&this);
1311 // Unintrospectable method: get_data() / gdk_drawable_get_data()
1312 // Equivalent to g_object_get_data(); the #GObject variant should be
1313 // used instead.
1314 // RETURNS: the data stored at @key
1315 // <key>: name the data was stored under
1316 void* get_data(char* key) {
1317 return gdk_drawable_get_data(&this, key);
1320 // Obtains the bit depth of the drawable, that is, the number of bits
1321 // that make up a pixel in the drawable's visual. Examples are 8 bits
1322 // per pixel, 24 bits per pixel, etc.
1323 // RETURNS: number of bits per pixel
1324 int get_depth() {
1325 return gdk_drawable_get_depth(&this);
1328 // Unintrospectable method: get_display() / gdk_drawable_get_display()
1329 // Gets the #GdkDisplay associated with a #GdkDrawable.
1330 // RETURNS: the #GdkDisplay associated with @drawable
1331 Display* get_display() {
1332 return gdk_drawable_get_display(&this);
1335 // Unintrospectable method: get_image() / gdk_drawable_get_image()
1336 // A #GdkImage stores client-side image data (pixels). In contrast,
1337 // #GdkPixmap and #GdkWindow are server-side
1338 // objects. gdk_drawable_get_image() obtains the pixels from a
1339 // server-side drawable as a client-side #GdkImage. The format of a
1340 // #GdkImage depends on the #GdkVisual of the current display, which
1341 // makes manipulating #GdkImage extremely difficult; therefore, in
1342 // most cases you should use gdk_pixbuf_get_from_drawable() instead of
1343 // this lower-level function. A #GdkPixbuf contains image data in a
1344 // canonicalized RGB format, rather than a display-dependent format.
1345 // Of course, there's a convenience vs. speed tradeoff here, so you'll
1346 // want to think about what makes sense for your application.
1347 // obtain as an image.
1348 // You would usually copy image data to the client side if you intend
1349 // to examine the values of individual pixels, for example to darken
1350 // an image or add a red tint. It would be prohibitively slow to
1351 // make a round-trip request to the windowing system for each pixel,
1352 // so instead you get all of them at once, modify them, then copy
1353 // them all back at once.
1354 // If the X server or other windowing system backend is on the local
1355 // machine, this function may use shared memory to avoid copying
1356 // the image data.
1357 // If the source drawable is a #GdkWindow and partially offscreen
1358 // or obscured, then the obscured portions of the returned image
1359 // will contain undefined data.
1360 // surface if you want to download contents to the client.
1361 // RETURNS: a #GdkImage containing the contents of @drawable
1362 // <x>: x coordinate on @drawable
1363 // <y>: y coordinate on @drawable
1364 // <width>: width of region to get
1365 // <height>: height or region to get
1366 Image* get_image(int x, int y, int width, int height) {
1367 return gdk_drawable_get_image(&this, x, y, width, height);
1370 // Unintrospectable method: get_screen() / gdk_drawable_get_screen()
1371 // Gets the #GdkScreen associated with a #GdkDrawable.
1372 // RETURNS: the #GdkScreen associated with @drawable
1373 Screen* get_screen() {
1374 return gdk_drawable_get_screen(&this);
1377 // Fills *@width and *@height with the size of @drawable.
1378 // On the X11 platform, if @drawable is a #GdkWindow, the returned
1379 // size is the size reported in the most-recently-processed configure
1380 // event, rather than the current size on the X server.
1381 // #GdkWindows. Use gdk_pixmap_get_size() for #GdkPixmaps.
1382 // <width>: location to store drawable's width, or %NULL
1383 // <height>: location to store drawable's height, or %NULL
1384 void get_size(/*out*/ int* width=null, /*out*/ int* height=null) {
1385 gdk_drawable_get_size(&this, width, height);
1388 // Unintrospectable method: get_visible_region() / gdk_drawable_get_visible_region()
1389 // Computes the region of a drawable that is potentially visible.
1390 // This does not necessarily take into account if the window is
1391 // obscured by other windows, but no area outside of this region
1392 // is visible.
1393 // when you are done.
1394 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1395 Region* get_visible_region() {
1396 return gdk_drawable_get_visible_region(&this);
1399 // Unintrospectable method: get_visual() / gdk_drawable_get_visual()
1400 // Gets the #GdkVisual describing the pixel format of @drawable.
1401 // RETURNS: a #GdkVisual
1402 Visual* get_visual() {
1403 return gdk_drawable_get_visual(&this);
1406 // Unintrospectable method: ref() / gdk_drawable_ref()
1407 // Deprecated equivalent of calling g_object_ref() on @drawable.
1408 // (Drawables were not objects in previous versions of GDK.)
1409 // RETURNS: the same @drawable passed in
1410 Drawable* ref_() {
1411 return gdk_drawable_ref(&this);
1414 // Sets the colormap associated with @drawable. Normally this will
1415 // happen automatically when the drawable is created; you only need to
1416 // use this function if the drawable-creating function did not have a
1417 // way to determine the colormap, and you then use drawable operations
1418 // that require a colormap. The colormap for all drawables and
1419 // graphics contexts you intend to use together should match. i.e.
1420 // when using a #GdkGC to draw to a drawable, or copying one drawable
1421 // to another, the colormaps should match.
1422 // <colormap>: a #GdkColormap
1423 void set_colormap(Colormap* colormap) {
1424 gdk_drawable_set_colormap(&this, colormap);
1427 // This function is equivalent to g_object_set_data(),
1428 // the #GObject variant should be used instead.
1429 // <key>: name to store the data under
1430 // <data>: arbitrary data
1431 // <destroy_func>: function to free @data, or %NULL
1432 void set_data(char* key, void* data, GLib2.DestroyNotify destroy_func=null) {
1433 gdk_drawable_set_data(&this, key, data, destroy_func);
1435 // Deprecated equivalent of calling g_object_unref() on @drawable.
1436 void unref() {
1437 gdk_drawable_unref(&this);
1441 struct DrawableClass {
1442 GObject2.ObjectClass parent_class;
1443 // Unintrospectable functionp: create_gc() / ()
1444 extern (C) GC* function (Drawable* drawable, GCValues* values, GCValuesMask mask) create_gc;
1445 extern (C) void function (Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height) draw_rectangle;
1446 extern (C) void function (Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2) draw_arc;
1447 extern (C) void function (Drawable* drawable, GC* gc, int filled, Point* points, int npoints) draw_polygon;
1448 extern (C) void function (Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length) draw_text;
1449 extern (C) void function (Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length) draw_text_wc;
1450 extern (C) void function (Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) draw_drawable;
1451 extern (C) void function (Drawable* drawable, GC* gc, Point* points, int npoints) draw_points;
1452 extern (C) void function (Drawable* drawable, GC* gc, Segment* segs, int nsegs) draw_segments;
1453 extern (C) void function (Drawable* drawable, GC* gc, Point* points, int npoints) draw_lines;
1454 extern (C) void function (Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) draw_glyphs;
1455 extern (C) void function (Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) draw_image;
1456 // RETURNS: number of bits per pixel
1457 extern (C) int function (Drawable* drawable) get_depth;
1459 // <width>: location to store drawable's width, or %NULL
1460 // <height>: location to store drawable's height, or %NULL
1461 extern (C) void function (Drawable* drawable, /*out*/ int* width=null, /*out*/ int* height=null) get_size;
1462 extern (C) void function (Drawable* drawable, Colormap* cmap) set_colormap;
1464 // Unintrospectable functionp: get_colormap() / ()
1466 // RETURNS: the colormap, or %NULL
1467 extern (C) Colormap* function (Drawable* drawable) get_colormap;
1469 // Unintrospectable functionp: get_visual() / ()
1471 // RETURNS: a #GdkVisual
1472 extern (C) Visual* function (Drawable* drawable) get_visual;
1474 // Unintrospectable functionp: get_screen() / ()
1476 // RETURNS: the #GdkScreen associated with @drawable
1477 extern (C) Screen* function (Drawable* drawable) get_screen;
1479 // Unintrospectable functionp: get_image() / ()
1481 // RETURNS: a #GdkImage containing the contents of @drawable
1482 // <x>: x coordinate on @drawable
1483 // <y>: y coordinate on @drawable
1484 // <width>: width of region to get
1485 // <height>: height or region to get
1486 extern (C) Image* function (Drawable* drawable, int x, int y, int width, int height) get_image;
1488 // Unintrospectable functionp: get_clip_region() / ()
1490 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1491 extern (C) Region* function (Drawable* drawable) get_clip_region;
1493 // Unintrospectable functionp: get_visible_region() / ()
1495 // RETURNS: a #GdkRegion. This must be freed with gdk_region_destroy()
1496 extern (C) Region* function (Drawable* drawable) get_visible_region;
1497 // Unintrospectable functionp: get_composite_drawable() / ()
1498 extern (C) Drawable* function (Drawable* drawable, int x, int y, int width, int height, int* composite_x_offset, int* composite_y_offset) get_composite_drawable;
1499 extern (C) void function (Drawable* drawable, GC* gc, GdkPixbuf2.Pixbuf* pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither) draw_pixbuf;
1500 // Unintrospectable functionp: _copy_to_image() / ()
1501 extern (C) Image* function (Drawable* drawable, Image* image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) _copy_to_image;
1502 extern (C) void function (Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) draw_glyphs_transformed;
1503 extern (C) void function (Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids) draw_trapezoids;
1504 extern (C) cairo.Surface* /*new*/ function (Drawable* drawable) ref_cairo_surface;
1505 // Unintrospectable functionp: get_source_drawable() / ()
1506 extern (C) Drawable* function (Drawable* drawable) get_source_drawable;
1507 extern (C) void function (Drawable* drawable, cairo.Context* cr) set_cairo_clip;
1508 extern (C) cairo.Surface* /*new*/ function (Drawable* drawable, int width, int height) create_cairo_surface;
1509 extern (C) void function (Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height, Drawable* original_src) draw_drawable_with_src;
1510 extern (C) void function () _gdk_reserved7;
1511 extern (C) void function () _gdk_reserved9;
1512 extern (C) void function () _gdk_reserved10;
1513 extern (C) void function () _gdk_reserved11;
1514 extern (C) void function () _gdk_reserved12;
1515 extern (C) void function () _gdk_reserved13;
1516 extern (C) void function () _gdk_reserved14;
1517 extern (C) void function () _gdk_reserved15;
1520 union Event {
1521 EventType type;
1522 EventAny any;
1523 EventExpose expose;
1524 EventNoExpose no_expose;
1525 EventVisibility visibility;
1526 EventMotion motion;
1527 EventButton button;
1528 EventScroll scroll;
1529 EventKey key;
1530 EventCrossing crossing;
1531 EventFocus focus_change;
1532 EventConfigure configure;
1533 EventProperty property;
1534 EventSelection selection;
1535 EventOwnerChange owner_change;
1536 EventProximity proximity;
1537 EventClient client;
1538 EventDND dnd;
1539 EventWindowState window_state;
1540 EventSetting setting;
1541 EventGrabBroken grab_broken;
1544 // Creates a new event of the given type. All fields are set to 0.
1545 // should be freed with gdk_event_free().
1546 // RETURNS: a newly-allocated #GdkEvent. The returned #GdkEvent
1547 // <type>: a #GdkEventType
1548 static Event* /*new*/ new_(EventType type) {
1549 return gdk_event_new(type);
1552 // Copies a #GdkEvent, copying or incrementing the reference count of the
1553 // resources associated with it (e.g. #GdkWindow's and strings).
1554 // gdk_event_free().
1555 // RETURNS: a copy of @event. The returned #GdkEvent should be freed with
1556 Event* /*new*/ copy() {
1557 return gdk_event_copy(&this);
1560 // Frees a #GdkEvent, freeing or decrementing any resources associated with it.
1561 // Note that this function should only be called with events returned from
1562 // functions such as gdk_event_peek(), gdk_event_get(),
1563 // gdk_event_get_graphics_expose() and gdk_event_copy() and gdk_event_new().
1564 void free() {
1565 gdk_event_free(&this);
1568 // Extract the axis value for a particular axis use from
1569 // an event structure.
1570 // RETURNS: %TRUE if the specified axis was found, otherwise %FALSE
1571 // <axis_use>: the axis use to look for
1572 // <value>: location to store the value found
1573 int get_axis(AxisUse axis_use, /*out*/ double* value) {
1574 return gdk_event_get_axis(&this, axis_use, value);
1577 // Extract the event window relative x/y coordinates from an event.
1578 // RETURNS: %TRUE if the event delivered event window coordinates
1579 // <x_win>: location to put event window x coordinate
1580 // <y_win>: location to put event window y coordinate
1581 int get_coords(/*out*/ double* x_win, /*out*/ double* y_win) {
1582 return gdk_event_get_coords(&this, x_win, y_win);
1585 // Extract the root window relative x/y coordinates from an event.
1586 // RETURNS: %TRUE if the event delivered root window coordinates
1587 // <x_root>: location to put root window x coordinate
1588 // <y_root>: location to put root window y coordinate
1589 int get_root_coords(/*out*/ double* x_root, /*out*/ double* y_root) {
1590 return gdk_event_get_root_coords(&this, x_root, y_root);
1593 // Unintrospectable method: get_screen() / gdk_event_get_screen()
1594 // Returns the screen for the event. The screen is
1595 // typically the screen for <literal>event->any.window</literal>, but
1596 // for events such as mouse events, it is the screen
1597 // where the pointer was when the event occurs -
1598 // that is, the screen which has the root window
1599 // to which <literal>event->motion.x_root</literal> and
1600 // <literal>event->motion.y_root</literal> are relative.
1601 // RETURNS: the screen for the event
1602 Screen* get_screen() {
1603 return gdk_event_get_screen(&this);
1606 // If the event contains a "state" field, puts that field in @state. Otherwise
1607 // stores an empty state (0). Returns %TRUE if there was a state field
1608 // in the event. @event may be %NULL, in which case it's treated
1609 // as if the event had no state field.
1610 // RETURNS: %TRUE if there was a state field in the event
1611 // <state>: return location for state
1612 int get_state(/*out*/ ModifierType* state) {
1613 return gdk_event_get_state(&this, state);
1616 // Returns the time stamp from @event, if there is one; otherwise
1617 // returns #GDK_CURRENT_TIME. If @event is %NULL, returns #GDK_CURRENT_TIME.
1618 // RETURNS: time stamp field from @event
1619 uint get_time() {
1620 return gdk_event_get_time(&this);
1623 // Appends a copy of the given event onto the front of the event
1624 // queue for event->any.window's display, or the default event
1625 // queue if event->any.window is %NULL. See gdk_display_put_event().
1626 void put() {
1627 gdk_event_put(&this);
1630 // Sends an X ClientMessage event to a given window (which must be
1631 // on the default #GdkDisplay.)
1632 // This could be used for communicating between different applications,
1633 // though the amount of data is limited to 20 bytes.
1634 // RETURNS: non-zero on success.
1635 // <winid>: the window to send the X ClientMessage event to.
1636 int send_client_message(NativeWindow winid) {
1637 return gdk_event_send_client_message(&this, winid);
1640 // Sends an X ClientMessage event to all toplevel windows on the default
1641 // #GdkScreen.
1642 // Toplevel windows are determined by checking for the WM_STATE property, as
1643 // described in the Inter-Client Communication Conventions Manual (ICCCM).
1644 // If no windows are found with the WM_STATE property set, the message is sent
1645 // to all children of the root window.
1646 void send_clientmessage_toall() {
1647 gdk_event_send_clientmessage_toall(&this);
1650 // Sets the screen for @event to @screen. The event must
1651 // have been allocated by GTK+, for instance, by
1652 // gdk_event_copy().
1653 // <screen>: a #GdkScreen
1654 void set_screen(Screen* screen) {
1655 gdk_event_set_screen(&this, screen);
1658 // --- mixin/Gdk2_Event.d --->
1660 void toString(FT)(scope void delegate(const(char)[]) sink, FT fmt) {
1661 import std.format;
1662 with (EventType)
1663 switch (type) {
1664 case EXPOSE: formatValue(sink, expose, fmt); return;
1665 case MOTION_NOTIFY: formatValue(sink, motion, fmt); return;
1666 case BUTTON_PRESS, _2BUTTON_PRESS, _3BUTTON_PRESS, BUTTON_RELEASE:
1667 formatValue(sink, button, fmt); return; // XXX check, GIR has this as just Event.
1668 case KEY_PRESS, KEY_RELEASE: formatValue(sink, key, fmt); return;
1669 case ENTER_NOTIFY, LEAVE_NOTIFY: formatValue(sink, crossing, fmt); return;
1670 case FOCUS_CHANGE: formatValue(sink, focus_change, fmt); return;
1671 case CONFIGURE: formatValue(sink, configure, fmt); return;
1672 case PROPERTY_NOTIFY: formatValue(sink, property, fmt); return;
1673 case SELECTION_CLEAR, SELECTION_REQUEST, SELECTION_NOTIFY:
1674 formatValue(sink, selection, fmt); return;
1675 case PROXIMITY_IN, PROXIMITY_OUT:
1676 formatValue(sink, proximity, fmt); return;
1677 case VISIBILITY_NOTIFY: formatValue(sink, visibility, fmt); return;
1678 case SCROLL: formatValue(sink, scroll, fmt); return;
1680 case WINDOW_STATE: formatValue(sink, window_state, fmt); return;
1681 any: case DELETE, DESTROY, MAP, UNMAP:
1682 formatValue(sink, any, fmt); return;
1683 default: sink("/*FIXME*/"); goto any;
1687 // <--- mixin/Gdk2_Event.d ---
1690 struct EventAny {
1691 EventType type;
1692 Window* window;
1693 byte send_event;
1696 struct EventButton {
1697 EventType type;
1698 Window* window;
1699 byte send_event;
1700 uint time;
1701 double x, y;
1702 double* axes;
1703 uint state, button;
1704 Device* device;
1705 double x_root, y_root;
1708 struct EventClient {
1709 EventType type;
1710 Window* window;
1711 byte send_event;
1712 Atom message_type;
1713 ushort data_format;
1715 union data {
1716 char[20] b;
1717 short[10] s;
1718 c_long[5] l;
1722 struct EventConfigure {
1723 EventType type;
1724 Window* window;
1725 byte send_event;
1726 int x, y, width, height;
1729 struct EventCrossing {
1730 EventType type;
1731 Window* window;
1732 byte send_event;
1733 Window* subwindow;
1734 uint time;
1735 double x, y, x_root, y_root;
1736 CrossingMode mode;
1737 NotifyType detail;
1738 int focus;
1739 uint state;
1742 struct EventDND {
1743 EventType type;
1744 Window* window;
1745 byte send_event;
1746 DragContext* context;
1747 uint time;
1748 short x_root, y_root;
1751 struct EventExpose {
1752 EventType type;
1753 Window* window;
1754 byte send_event;
1755 Rectangle area;
1756 Region* region;
1757 int count;
1760 struct EventFocus {
1761 EventType type;
1762 Window* window;
1763 byte send_event;
1764 short in_;
1767 extern (C) alias void function (Event* event, void* data) EventFunc;
1769 struct EventGrabBroken {
1770 EventType type;
1771 Window* window;
1772 byte send_event;
1773 int keyboard, implicit;
1774 Window* grab_window;
1777 struct EventKey {
1778 EventType type;
1779 Window* window;
1780 byte send_event;
1781 uint time;
1782 uint state, keyval;
1783 int length;
1784 char* string_;
1785 ushort hardware_keycode;
1786 ubyte group;
1787 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
1788 uint, "is_modifier", 1,
1789 uint, "__dummy32A", 31));
1792 enum EventMask {
1793 EXPOSURE_MASK = 2,
1794 POINTER_MOTION_MASK = 4,
1795 POINTER_MOTION_HINT_MASK = 8,
1796 BUTTON_MOTION_MASK = 16,
1797 BUTTON1_MOTION_MASK = 32,
1798 BUTTON2_MOTION_MASK = 64,
1799 BUTTON3_MOTION_MASK = 128,
1800 BUTTON_PRESS_MASK = 256,
1801 BUTTON_RELEASE_MASK = 512,
1802 KEY_PRESS_MASK = 1024,
1803 KEY_RELEASE_MASK = 2048,
1804 ENTER_NOTIFY_MASK = 4096,
1805 LEAVE_NOTIFY_MASK = 8192,
1806 FOCUS_CHANGE_MASK = 16384,
1807 STRUCTURE_MASK = 32768,
1808 PROPERTY_CHANGE_MASK = 65536,
1809 VISIBILITY_NOTIFY_MASK = 131072,
1810 PROXIMITY_IN_MASK = 262144,
1811 PROXIMITY_OUT_MASK = 524288,
1812 SUBSTRUCTURE_MASK = 1048576,
1813 SCROLL_MASK = 2097152,
1814 ALL_EVENTS_MASK = 4194302
1816 struct EventMotion {
1817 EventType type;
1818 Window* window;
1819 byte send_event;
1820 uint time;
1821 double x, y;
1822 double* axes;
1823 uint state;
1824 short is_hint;
1825 Device* device;
1826 double x_root, y_root;
1829 struct EventNoExpose {
1830 EventType type;
1831 Window* window;
1832 byte send_event;
1835 struct EventOwnerChange {
1836 EventType type;
1837 Window* window;
1838 byte send_event;
1839 NativeWindow owner;
1840 OwnerChange reason;
1841 Atom selection;
1842 uint time, selection_time;
1845 struct EventProperty {
1846 EventType type;
1847 Window* window;
1848 byte send_event;
1849 Atom atom;
1850 uint time;
1851 uint state;
1854 struct EventProximity {
1855 EventType type;
1856 Window* window;
1857 byte send_event;
1858 uint time;
1859 Device* device;
1862 struct EventScroll {
1863 EventType type;
1864 Window* window;
1865 byte send_event;
1866 uint time;
1867 double x, y;
1868 uint state;
1869 ScrollDirection direction;
1870 Device* device;
1871 double x_root, y_root;
1874 struct EventSelection {
1875 EventType type;
1876 Window* window;
1877 byte send_event;
1878 Atom selection, target, property;
1879 uint time;
1880 NativeWindow requestor;
1883 struct EventSetting {
1884 EventType type;
1885 Window* window;
1886 byte send_event;
1887 SettingAction action;
1888 char* name;
1891 enum EventType {
1892 NOTHING = -1,
1893 DELETE = 0,
1894 DESTROY = 1,
1895 EXPOSE = 2,
1896 MOTION_NOTIFY = 3,
1897 BUTTON_PRESS = 4,
1898 _2BUTTON_PRESS = 5,
1899 _3BUTTON_PRESS = 6,
1900 BUTTON_RELEASE = 7,
1901 KEY_PRESS = 8,
1902 KEY_RELEASE = 9,
1903 ENTER_NOTIFY = 10,
1904 LEAVE_NOTIFY = 11,
1905 FOCUS_CHANGE = 12,
1906 CONFIGURE = 13,
1907 MAP = 14,
1908 UNMAP = 15,
1909 PROPERTY_NOTIFY = 16,
1910 SELECTION_CLEAR = 17,
1911 SELECTION_REQUEST = 18,
1912 SELECTION_NOTIFY = 19,
1913 PROXIMITY_IN = 20,
1914 PROXIMITY_OUT = 21,
1915 DRAG_ENTER = 22,
1916 DRAG_LEAVE = 23,
1917 DRAG_MOTION = 24,
1918 DRAG_STATUS = 25,
1919 DROP_START = 26,
1920 DROP_FINISHED = 27,
1921 CLIENT_EVENT = 28,
1922 VISIBILITY_NOTIFY = 29,
1923 NO_EXPOSE = 30,
1924 SCROLL = 31,
1925 WINDOW_STATE = 32,
1926 SETTING = 33,
1927 OWNER_CHANGE = 34,
1928 GRAB_BROKEN = 35,
1929 DAMAGE = 36,
1930 EVENT_LAST = 37
1932 struct EventVisibility {
1933 EventType type;
1934 Window* window;
1935 byte send_event;
1936 VisibilityState state;
1939 struct EventWindowState {
1940 EventType type;
1941 Window* window;
1942 byte send_event;
1943 WindowState changed_mask, new_window_state;
1946 enum ExtensionMode {
1947 NONE = 0,
1948 ALL = 1,
1949 CURSOR = 2
1951 enum Fill {
1952 SOLID = 0,
1953 TILED = 1,
1954 STIPPLED = 2,
1955 OPAQUE_STIPPLED = 3
1957 enum FillRule {
1958 EVEN_ODD_RULE = 0,
1959 WINDING_RULE = 1
1961 extern (C) alias FilterReturn function (XEvent* xevent, Event* event, void* data) FilterFunc;
1963 enum FilterReturn {
1964 CONTINUE = 0,
1965 TRANSLATE = 1,
1966 REMOVE = 2
1968 struct Font {
1969 FontType type;
1970 int ascent, descent;
1972 int equal(Font* fontb) {
1973 return gdk_font_equal(&this, fontb);
1975 // Unintrospectable method: get_display() / gdk_font_get_display()
1976 Display* get_display() {
1977 return gdk_font_get_display(&this);
1979 int id() {
1980 return gdk_font_id(&this);
1983 // Increases the reference count of a font by one.
1984 // RETURNS: @font
1985 Font* /*new*/ ref_() {
1986 return gdk_font_ref(&this);
1989 // Decreases the reference count of a font by one.
1990 // If the result is zero, destroys the font.
1991 void unref() {
1992 gdk_font_unref(&this);
1996 enum FontType {
1997 FONT = 0,
1998 FONTSET = 1
2000 enum Function {
2001 COPY = 0,
2002 INVERT = 1,
2003 XOR = 2,
2004 CLEAR = 3,
2005 AND = 4,
2006 AND_REVERSE = 5,
2007 AND_INVERT = 6,
2008 NOOP = 7,
2009 OR = 8,
2010 EQUIV = 9,
2011 OR_REVERSE = 10,
2012 COPY_INVERT = 11,
2013 OR_INVERT = 12,
2014 NAND = 13,
2015 NOR = 14,
2016 SET = 15
2018 struct GC /* : GObject.Object */ {
2019 alias parent_instance this;
2020 alias parent_instance super_;
2021 alias parent_instance object;
2022 GObject2.Object parent_instance;
2023 int clip_x_origin, clip_y_origin, ts_x_origin, ts_y_origin;
2024 Colormap* colormap;
2027 // Create a new graphics context with default values.
2028 // RETURNS: the new graphics context.
2029 // <drawable>: a #GdkDrawable. The created GC must always be used with drawables of the same depth as this one.
2030 static GC* /*new*/ new_(Drawable* drawable) {
2031 return gdk_gc_new(drawable);
2034 // Create a new GC with the given initial values.
2035 // RETURNS: the new graphics context.
2036 // <drawable>: a #GdkDrawable. The created GC must always be used with drawables of the same depth as this one.
2037 // <values>: a structure containing initial values for the GC.
2038 // <values_mask>: a bit mask indicating which fields in @values are set.
2039 static GC* /*new*/ new_with_values(Drawable* drawable, GCValues* values, GCValuesMask values_mask) {
2040 return gdk_gc_new_with_values(drawable, values, values_mask);
2043 // Copy the set of values from one graphics context
2044 // onto another graphics context.
2045 // can be helpful in cases where you'd have copied a #GdkGC.
2046 // <src_gc>: the source graphics context.
2047 void copy(GC* src_gc) {
2048 gdk_gc_copy(&this, src_gc);
2051 // Unintrospectable method: get_colormap() / gdk_gc_get_colormap()
2052 // Retrieves the colormap for a given GC, if it exists.
2053 // A GC will have a colormap if the drawable for which it was created
2054 // has a colormap, or if a colormap was set explicitely with
2055 // gdk_gc_set_colormap.
2056 // automatically, so there is no need to care about them.
2057 // RETURNS: the colormap of @gc, or %NULL if @gc doesn't have one.
2058 Colormap* get_colormap() {
2059 return gdk_gc_get_colormap(&this);
2062 // Unintrospectable method: get_screen() / gdk_gc_get_screen()
2063 // Gets the #GdkScreen for which @gc was created
2064 // RETURNS: the #GdkScreen for @gc.
2065 Screen* get_screen() {
2066 return gdk_gc_get_screen(&this);
2069 // Retrieves the current values from a graphics context. Note that
2070 // only the pixel values of the @values->foreground and @values->background
2071 // are filled, use gdk_colormap_query_color() to obtain the rgb values
2072 // if you need them.
2073 // <values>: the #GdkGCValues structure in which to store the results.
2074 void get_values(GCValues* values) {
2075 gdk_gc_get_values(&this, values);
2078 // Offset attributes such as the clip and tile-stipple origins
2079 // of the GC so that drawing at x - x_offset, y - y_offset with
2080 // the offset GC has the same effect as drawing at x, y with the original
2081 // GC.
2082 // convenience function for gdk_gc_set_ts_origin and gdk_gc_set_clip_origin().
2083 // <x_offset>: amount by which to offset the GC in the X direction
2084 // <y_offset>: amount by which to offset the GC in the Y direction
2085 void offset(int x_offset, int y_offset) {
2086 gdk_gc_offset(&this, x_offset, y_offset);
2089 // Unintrospectable method: ref() / gdk_gc_ref()
2090 // Deprecated function; use g_object_ref() instead.
2091 // RETURNS: the gc.
2092 GC* ref_() {
2093 return gdk_gc_ref(&this);
2096 // Sets the background color for a graphics context.
2097 // Note that this function uses @color->pixel, use
2098 // gdk_gc_set_rgb_bg_color() to specify the background
2099 // color as red, green, blue components.
2100 // as the source in Cairo. Note that if you want to draw a background and a
2101 // foreground in Cairo, you need to call drawing functions (like cairo_fill())
2102 // twice.
2103 // <color>: the new background color.
2104 void set_background(Color* color) {
2105 gdk_gc_set_background(&this, color);
2108 // Sets the clip mask for a graphics context from a bitmap.
2109 // The clip mask is interpreted relative to the clip
2110 // origin. (See gdk_gc_set_clip_origin()).
2111 // <mask>: a bitmap.
2112 void set_clip_mask(Bitmap* mask) {
2113 gdk_gc_set_clip_mask(&this, mask);
2116 // Sets the origin of the clip mask. The coordinates are
2117 // interpreted relative to the upper-left corner of
2118 // the destination drawable of the current operation.
2119 // Cairo.
2120 // <x>: the x-coordinate of the origin.
2121 // <y>: the y-coordinate of the origin.
2122 void set_clip_origin(int x, int y) {
2123 gdk_gc_set_clip_origin(&this, x, y);
2126 // Sets the clip mask for a graphics context from a
2127 // rectangle. The clip mask is interpreted relative to the clip
2128 // origin. (See gdk_gc_set_clip_origin()).
2129 // <rectangle>: the rectangle to clip to.
2130 void set_clip_rectangle(Rectangle* rectangle) {
2131 gdk_gc_set_clip_rectangle(&this, rectangle);
2134 // Sets the clip mask for a graphics context from a region structure.
2135 // The clip mask is interpreted relative to the clip origin. (See
2136 // gdk_gc_set_clip_origin()).
2137 // <region>: the #GdkRegion.
2138 void set_clip_region(Region* region) {
2139 gdk_gc_set_clip_region(&this, region);
2142 // Sets the colormap for the GC to the given colormap. The depth
2143 // of the colormap's visual must match the depth of the drawable
2144 // for which the GC was created.
2145 // automatically, so there is no need to care about them.
2146 // <colormap>: a #GdkColormap
2147 void set_colormap(Colormap* colormap) {
2148 gdk_gc_set_colormap(&this, colormap);
2151 // Sets the way dashed-lines are drawn. Lines will be
2152 // drawn with alternating on and off segments of the
2153 // lengths specified in @dash_list. The manner in
2154 // which the on and off segments are drawn is determined
2155 // by the @line_style value of the GC. (This can
2156 // be changed with gdk_gc_set_line_attributes().)
2157 // The @dash_offset defines the phase of the pattern,
2158 // specifying how many pixels into the dash-list the pattern
2159 // should actually begin.
2160 // <dash_offset>: the phase of the dash pattern.
2161 // <dash_list>: an array of dash lengths.
2162 // <n>: the number of elements in @dash_list.
2163 void set_dashes(int dash_offset, byte dash_list, int n) {
2164 gdk_gc_set_dashes(&this, dash_offset, dash_list, n);
2167 // Sets whether copying non-visible portions of a drawable
2168 // using this graphics context generate exposure events
2169 // for the corresponding regions of the destination
2170 // drawable. (See gdk_draw_drawable()).
2171 // exposures, you must use drawing operations of the underlying window
2172 // system or use gdk_window_invalidate_rect(). Cairo will never
2173 // generate exposures.
2174 // <exposures>: if %TRUE, exposure events will be generated.
2175 void set_exposures(int exposures) {
2176 gdk_gc_set_exposures(&this, exposures);
2179 // Set the fill mode for a graphics context.
2180 // cairo_pattern_set_extend() on the source. For stippling, see the
2181 // deprecation comments on gdk_gc_set_stipple().
2182 // <fill>: the new fill mode.
2183 void set_fill(Fill fill) {
2184 gdk_gc_set_fill(&this, fill);
2187 // Sets the font for a graphics context. (Note that
2188 // all text-drawing functions in GDK take a @font
2189 // argument; the value set here is used when that
2190 // argument is %NULL.)
2191 // <font>: the new font.
2192 void set_font(Font* font) {
2193 gdk_gc_set_font(&this, font);
2196 // Sets the foreground color for a graphics context.
2197 // Note that this function uses @color->pixel, use
2198 // gdk_gc_set_rgb_fg_color() to specify the foreground
2199 // color as red, green, blue components.
2200 // as the source in Cairo.
2201 // <color>: the new foreground color.
2202 void set_foreground(Color* color) {
2203 gdk_gc_set_foreground(&this, color);
2206 // Determines how the current pixel values and the
2207 // pixel values being drawn are combined to produce
2208 // the final pixel values.
2209 // <function>: the #GdkFunction to use
2210 void set_function(Function function_) {
2211 gdk_gc_set_function(&this, function_);
2214 // Sets various attributes of how lines are drawn. See
2215 // the corresponding members of #GdkGCValues for full
2216 // explanations of the arguments.
2217 // cairo_set_line_join(), cairo_set_line_cap() and cairo_set_dash()
2218 // to affect the stroking behavior in Cairo. Keep in mind that the default
2219 // attributes of a #cairo_t are different from the default attributes of
2220 // a #GdkGC.
2221 // <line_width>: the width of lines.
2222 // <line_style>: the dash-style for lines.
2223 // <cap_style>: the manner in which the ends of lines are drawn.
2224 // <join_style>: the in which lines are joined together.
2225 void set_line_attributes(int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style) {
2226 gdk_gc_set_line_attributes(&this, line_width, line_style, cap_style, join_style);
2229 // Set the background color of a GC using an unallocated color. The
2230 // pixel value for the color will be determined using GdkRGB. If the
2231 // colormap for the GC has not previously been initialized for GdkRGB,
2232 // then for pseudo-color colormaps (colormaps with a small modifiable
2233 // number of colors), a colorcube will be allocated in the colormap.
2234 // Calling this function for a GC without a colormap is an error.
2235 // <color>: an unallocated #GdkColor.
2236 void set_rgb_bg_color(Color* color) {
2237 gdk_gc_set_rgb_bg_color(&this, color);
2240 // Set the foreground color of a GC using an unallocated color. The
2241 // pixel value for the color will be determined using GdkRGB. If the
2242 // colormap for the GC has not previously been initialized for GdkRGB,
2243 // then for pseudo-color colormaps (colormaps with a small modifiable
2244 // number of colors), a colorcube will be allocated in the colormap.
2245 // Calling this function for a GC without a colormap is an error.
2246 // <color>: an unallocated #GdkColor.
2247 void set_rgb_fg_color(Color* color) {
2248 gdk_gc_set_rgb_fg_color(&this, color);
2251 // Set the stipple bitmap for a graphics context. The
2252 // stipple will only be used if the fill mode is
2253 // %GDK_STIPPLED or %GDK_OPAQUE_STIPPLED.
2254 // want to achieve an identical look, you can use the stipple bitmap as a
2255 // mask. Most likely, this involves rendering the source to an intermediate
2256 // surface using cairo_push_group() first, so that you can then use
2257 // cairo_mask() to achieve the stippled look.
2258 // <stipple>: the new stipple bitmap.
2259 void set_stipple(Pixmap* stipple) {
2260 gdk_gc_set_stipple(&this, stipple);
2263 // Sets how drawing with this GC on a window will affect child
2264 // windows of that window.
2265 // subwindows, you must use drawing operations of the underlying window
2266 // system manually. Cairo will always use %GDK_INCLUDE_INFERIORS on sources
2267 // and masks and %GDK_CLIP_BY_CHILDREN on targets.
2268 // <mode>: the subwindow mode.
2269 void set_subwindow(SubwindowMode mode) {
2270 gdk_gc_set_subwindow(&this, mode);
2273 // Set a tile pixmap for a graphics context.
2274 // This will only be used if the fill mode
2275 // is %GDK_TILED.
2276 // as the source in Cairo:
2277 // |[gdk_cairo_set_source_pixmap (cr, tile, ts_origin_x, ts_origin_y);
2278 // cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);]|
2279 // <tile>: the new tile pixmap.
2280 void set_tile(Pixmap* tile) {
2281 gdk_gc_set_tile(&this, tile);
2284 // Set the origin when using tiles or stipples with
2285 // the GC. The tile or stipple will be aligned such
2286 // that the upper left corner of the tile or stipple
2287 // will coincide with this point.
2288 // by changing the source's matrix using cairo_pattern_set_matrix(). Or you
2289 // can specify it with gdk_cairo_set_source_pixmap() as shown in the example
2290 // for gdk_gc_set_tile().
2291 // <x>: the x-coordinate of the origin.
2292 // <y>: the y-coordinate of the origin.
2293 void set_ts_origin(int x, int y) {
2294 gdk_gc_set_ts_origin(&this, x, y);
2297 // Sets attributes of a graphics context in bulk. For each flag set in
2298 // set as the new value for @gc. If you're only setting a few values
2299 // on @gc, calling individual "setter" functions is likely more
2300 // convenient.
2301 // <values>: struct containing the new values
2302 // <values_mask>: mask indicating which struct fields are to be used
2303 void set_values(GCValues* values, GCValuesMask values_mask) {
2304 gdk_gc_set_values(&this, values, values_mask);
2306 // Decrement the reference count of @gc.
2307 void unref() {
2308 gdk_gc_unref(&this);
2312 struct GCClass {
2313 GObject2.ObjectClass parent_class;
2314 // <values>: the #GdkGCValues structure in which to store the results.
2315 extern (C) void function (GC* gc, GCValues* values) get_values;
2316 // <values>: struct containing the new values
2317 extern (C) void function (GC* gc, GCValues* values, GCValuesMask mask) set_values;
2319 // <dash_offset>: the phase of the dash pattern.
2320 // <dash_list>: an array of dash lengths.
2321 // <n>: the number of elements in @dash_list.
2322 extern (C) void function (GC* gc, int dash_offset, byte dash_list, int n) set_dashes;
2323 extern (C) void function () _gdk_reserved1;
2324 extern (C) void function () _gdk_reserved2;
2325 extern (C) void function () _gdk_reserved3;
2326 extern (C) void function () _gdk_reserved4;
2329 struct GCValues {
2330 Color foreground, background;
2331 Font* font;
2332 Function function_;
2333 Fill fill;
2334 Pixmap* tile, stipple, clip_mask;
2335 SubwindowMode subwindow_mode;
2336 int ts_x_origin, ts_y_origin, clip_x_origin, clip_y_origin, graphics_exposures, line_width;
2337 LineStyle line_style;
2338 CapStyle cap_style;
2339 JoinStyle join_style;
2342 enum GCValuesMask {
2343 FOREGROUND = 1,
2344 BACKGROUND = 2,
2345 FONT = 4,
2346 FUNCTION = 8,
2347 FILL = 16,
2348 TILE = 32,
2349 STIPPLE = 64,
2350 CLIP_MASK = 128,
2351 SUBWINDOW = 256,
2352 TS_X_ORIGIN = 512,
2353 TS_Y_ORIGIN = 1024,
2354 CLIP_X_ORIGIN = 2048,
2355 CLIP_Y_ORIGIN = 4096,
2356 EXPOSURES = 8192,
2357 LINE_WIDTH = 16384,
2358 LINE_STYLE = 32768,
2359 CAP_STYLE = 65536,
2360 JOIN_STYLE = 131072
2362 struct Geometry {
2363 int min_width, min_height, max_width, max_height, base_width, base_height, width_inc, height_inc;
2364 double min_aspect, max_aspect;
2365 Gravity win_gravity;
2368 enum GrabStatus {
2369 SUCCESS = 0,
2370 ALREADY_GRABBED = 1,
2371 INVALID_TIME = 2,
2372 NOT_VIEWABLE = 3,
2373 FROZEN = 4
2375 enum Gravity {
2376 NORTH_WEST = 1,
2377 NORTH = 2,
2378 NORTH_EAST = 3,
2379 WEST = 4,
2380 CENTER = 5,
2381 EAST = 6,
2382 SOUTH_WEST = 7,
2383 SOUTH = 8,
2384 SOUTH_EAST = 9,
2385 STATIC = 10
2387 struct Image /* : GObject.Object */ {
2388 alias parent_instance this;
2389 alias parent_instance super_;
2390 alias parent_instance object;
2391 GObject2.Object parent_instance;
2392 ImageType type;
2393 Visual* visual;
2394 ByteOrder byte_order;
2395 int width, height;
2396 ushort depth, bpp, bpl, bits_per_pixel;
2397 void* mem;
2398 Colormap* colormap;
2399 private void* windowing_data;
2401 static Image* /*new*/ new_(ImageType type, Visual* visual, int width, int height) {
2402 return gdk_image_new(type, visual, width, height);
2405 // Unintrospectable function: get() / gdk_image_get()
2406 // This is a deprecated wrapper for gdk_drawable_get_image();
2407 // most cases gdk_pixbuf_get_from_drawable() is the most convenient
2408 // choice.
2409 // RETURNS: a new #GdkImage or %NULL
2410 // <drawable>: a #GdkDrawable
2411 // <x>: x coordinate in @window
2412 // <y>: y coordinate in @window
2413 // <width>: width of area in @window
2414 // <height>: height of area in @window
2415 static Image* get(Drawable* drawable, int x, int y, int width, int height) {
2416 return gdk_image_get(drawable, x, y, width, height);
2419 // Determines the number of bits per pixel of the image.
2420 // RETURNS: the bits per pixel
2421 ushort get_bits_per_pixel() {
2422 return gdk_image_get_bits_per_pixel(&this);
2425 // Determines the byte order of the image.
2426 // RETURNS: a #GdkVisual
2427 ByteOrder get_byte_order() {
2428 return gdk_image_get_byte_order(&this);
2431 // Determines the number of bytes per line of the image.
2432 // RETURNS: the bytes per line
2433 ushort get_bytes_per_line() {
2434 return gdk_image_get_bytes_per_line(&this);
2437 // Determines the number of bytes per pixel of the image.
2438 // RETURNS: the bytes per pixel
2439 ushort get_bytes_per_pixel() {
2440 return gdk_image_get_bytes_per_pixel(&this);
2443 // Unintrospectable method: get_colormap() / gdk_image_get_colormap()
2444 // Retrieves the colormap for a given image, if it exists. An image
2445 // will have a colormap if the drawable from which it was created has
2446 // a colormap, or if a colormap was set explicitely with
2447 // gdk_image_set_colormap().
2448 // RETURNS: colormap for the image
2449 Colormap* get_colormap() {
2450 return gdk_image_get_colormap(&this);
2453 // Determines the depth of the image.
2454 // RETURNS: the depth
2455 ushort get_depth() {
2456 return gdk_image_get_depth(&this);
2459 // Determines the height of the image.
2460 // RETURNS: the height
2461 int get_height() {
2462 return gdk_image_get_height(&this);
2465 // Determines the type of a given image.
2466 // RETURNS: the #GdkImageType of the image
2467 ImageType get_image_type() {
2468 return gdk_image_get_image_type(&this);
2470 uint get_pixel(int x, int y) {
2471 return gdk_image_get_pixel(&this, x, y);
2474 // Unintrospectable method: get_pixels() / gdk_image_get_pixels()
2475 // Returns a pointer to the pixel data of the image.
2476 // RETURNS: the pixel data of the image
2477 void* get_pixels() {
2478 return gdk_image_get_pixels(&this);
2481 // Unintrospectable method: get_visual() / gdk_image_get_visual()
2482 // Determines the visual that was used to create the image.
2483 // RETURNS: a #GdkVisual
2484 Visual* get_visual() {
2485 return gdk_image_get_visual(&this);
2488 // Determines the width of the image.
2489 // RETURNS: the width
2490 int get_width() {
2491 return gdk_image_get_width(&this);
2493 void put_pixel(int x, int y, uint pixel) {
2494 gdk_image_put_pixel(&this, x, y, pixel);
2497 // Unintrospectable method: ref() / gdk_image_ref()
2498 // Deprecated function; use g_object_ref() instead.
2499 // RETURNS: the image
2500 Image* ref_() {
2501 return gdk_image_ref(&this);
2504 // Sets the colormap for the image to the given colormap. Normally
2505 // there's no need to use this function, images are created with the
2506 // correct colormap if you get the image from a drawable. If you
2507 // create the image from scratch, use the colormap of the drawable you
2508 // intend to render the image to.
2509 // <colormap>: a #GdkColormap
2510 void set_colormap(Colormap* colormap) {
2511 gdk_image_set_colormap(&this, colormap);
2513 // Deprecated function; use g_object_unref() instead.
2514 void unref() {
2515 gdk_image_unref(&this);
2519 struct ImageClass {
2520 GObject2.ObjectClass parent_class;
2523 enum ImageType {
2524 NORMAL = 0,
2525 SHARED = 1,
2526 FASTEST = 2
2528 enum InputCondition {
2529 READ = 1,
2530 WRITE = 2,
2531 EXCEPTION = 4
2533 extern (C) alias void function (void* data, int source, InputCondition condition) InputFunction;
2535 enum InputMode {
2536 DISABLED = 0,
2537 SCREEN = 1,
2538 WINDOW = 2
2540 enum InputSource {
2541 MOUSE = 0,
2542 PEN = 1,
2543 ERASER = 2,
2544 CURSOR = 3
2546 enum JoinStyle {
2547 MITER = 0,
2548 ROUND = 1,
2549 BEVEL = 2
2551 enum int KEY_0 = 48;
2552 enum int KEY_1 = 49;
2553 enum int KEY_2 = 50;
2554 enum int KEY_3 = 51;
2555 enum int KEY_3270_AltCursor = 64784;
2556 enum int KEY_3270_Attn = 64782;
2557 enum int KEY_3270_BackTab = 64773;
2558 enum int KEY_3270_ChangeScreen = 64793;
2559 enum int KEY_3270_Copy = 64789;
2560 enum int KEY_3270_CursorBlink = 64783;
2561 enum int KEY_3270_CursorSelect = 64796;
2562 enum int KEY_3270_DeleteWord = 64794;
2563 enum int KEY_3270_Duplicate = 64769;
2564 enum int KEY_3270_Enter = 64798;
2565 enum int KEY_3270_EraseEOF = 64774;
2566 enum int KEY_3270_EraseInput = 64775;
2567 enum int KEY_3270_ExSelect = 64795;
2568 enum int KEY_3270_FieldMark = 64770;
2569 enum int KEY_3270_Ident = 64787;
2570 enum int KEY_3270_Jump = 64786;
2571 enum int KEY_3270_KeyClick = 64785;
2572 enum int KEY_3270_Left2 = 64772;
2573 enum int KEY_3270_PA1 = 64778;
2574 enum int KEY_3270_PA2 = 64779;
2575 enum int KEY_3270_PA3 = 64780;
2576 enum int KEY_3270_Play = 64790;
2577 enum int KEY_3270_PrintScreen = 64797;
2578 enum int KEY_3270_Quit = 64777;
2579 enum int KEY_3270_Record = 64792;
2580 enum int KEY_3270_Reset = 64776;
2581 enum int KEY_3270_Right2 = 64771;
2582 enum int KEY_3270_Rule = 64788;
2583 enum int KEY_3270_Setup = 64791;
2584 enum int KEY_3270_Test = 64781;
2585 enum int KEY_4 = 52;
2586 enum int KEY_5 = 53;
2587 enum int KEY_6 = 54;
2588 enum int KEY_7 = 55;
2589 enum int KEY_8 = 56;
2590 enum int KEY_9 = 57;
2591 enum int KEY_A = 65;
2592 enum int KEY_AE = 198;
2593 enum int KEY_Aacute = 193;
2594 enum int KEY_Abelowdot = 16785056;
2595 enum int KEY_Abreve = 451;
2596 enum int KEY_Abreveacute = 16785070;
2597 enum int KEY_Abrevebelowdot = 16785078;
2598 enum int KEY_Abrevegrave = 16785072;
2599 enum int KEY_Abrevehook = 16785074;
2600 enum int KEY_Abrevetilde = 16785076;
2601 enum int KEY_AccessX_Enable = 65136;
2602 enum int KEY_AccessX_Feedback_Enable = 65137;
2603 enum int KEY_Acircumflex = 194;
2604 enum int KEY_Acircumflexacute = 16785060;
2605 enum int KEY_Acircumflexbelowdot = 16785068;
2606 enum int KEY_Acircumflexgrave = 16785062;
2607 enum int KEY_Acircumflexhook = 16785064;
2608 enum int KEY_Acircumflextilde = 16785066;
2609 enum int KEY_AddFavorite = 269025081;
2610 enum int KEY_Adiaeresis = 196;
2611 enum int KEY_Agrave = 192;
2612 enum int KEY_Ahook = 16785058;
2613 enum int KEY_Alt_L = 65513;
2614 enum int KEY_Alt_R = 65514;
2615 enum int KEY_Amacron = 960;
2616 enum int KEY_Aogonek = 417;
2617 enum int KEY_ApplicationLeft = 269025104;
2618 enum int KEY_ApplicationRight = 269025105;
2619 enum int KEY_Arabic_0 = 16778848;
2620 enum int KEY_Arabic_1 = 16778849;
2621 enum int KEY_Arabic_2 = 16778850;
2622 enum int KEY_Arabic_3 = 16778851;
2623 enum int KEY_Arabic_4 = 16778852;
2624 enum int KEY_Arabic_5 = 16778853;
2625 enum int KEY_Arabic_6 = 16778854;
2626 enum int KEY_Arabic_7 = 16778855;
2627 enum int KEY_Arabic_8 = 16778856;
2628 enum int KEY_Arabic_9 = 16778857;
2629 enum int KEY_Arabic_ain = 1497;
2630 enum int KEY_Arabic_alef = 1479;
2631 enum int KEY_Arabic_alefmaksura = 1513;
2632 enum int KEY_Arabic_beh = 1480;
2633 enum int KEY_Arabic_comma = 1452;
2634 enum int KEY_Arabic_dad = 1494;
2635 enum int KEY_Arabic_dal = 1487;
2636 enum int KEY_Arabic_damma = 1519;
2637 enum int KEY_Arabic_dammatan = 1516;
2638 enum int KEY_Arabic_ddal = 16778888;
2639 enum int KEY_Arabic_farsi_yeh = 16778956;
2640 enum int KEY_Arabic_fatha = 1518;
2641 enum int KEY_Arabic_fathatan = 1515;
2642 enum int KEY_Arabic_feh = 1505;
2643 enum int KEY_Arabic_fullstop = 16778964;
2644 enum int KEY_Arabic_gaf = 16778927;
2645 enum int KEY_Arabic_ghain = 1498;
2646 enum int KEY_Arabic_ha = 1511;
2647 enum int KEY_Arabic_hah = 1485;
2648 enum int KEY_Arabic_hamza = 1473;
2649 enum int KEY_Arabic_hamza_above = 16778836;
2650 enum int KEY_Arabic_hamza_below = 16778837;
2651 enum int KEY_Arabic_hamzaonalef = 1475;
2652 enum int KEY_Arabic_hamzaonwaw = 1476;
2653 enum int KEY_Arabic_hamzaonyeh = 1478;
2654 enum int KEY_Arabic_hamzaunderalef = 1477;
2655 enum int KEY_Arabic_heh = 1511;
2656 enum int KEY_Arabic_heh_doachashmee = 16778942;
2657 enum int KEY_Arabic_heh_goal = 16778945;
2658 enum int KEY_Arabic_jeem = 1484;
2659 enum int KEY_Arabic_jeh = 16778904;
2660 enum int KEY_Arabic_kaf = 1507;
2661 enum int KEY_Arabic_kasra = 1520;
2662 enum int KEY_Arabic_kasratan = 1517;
2663 enum int KEY_Arabic_keheh = 16778921;
2664 enum int KEY_Arabic_khah = 1486;
2665 enum int KEY_Arabic_lam = 1508;
2666 enum int KEY_Arabic_madda_above = 16778835;
2667 enum int KEY_Arabic_maddaonalef = 1474;
2668 enum int KEY_Arabic_meem = 1509;
2669 enum int KEY_Arabic_noon = 1510;
2670 enum int KEY_Arabic_noon_ghunna = 16778938;
2671 enum int KEY_Arabic_peh = 16778878;
2672 enum int KEY_Arabic_percent = 16778858;
2673 enum int KEY_Arabic_qaf = 1506;
2674 enum int KEY_Arabic_question_mark = 1471;
2675 enum int KEY_Arabic_ra = 1489;
2676 enum int KEY_Arabic_rreh = 16778897;
2677 enum int KEY_Arabic_sad = 1493;
2678 enum int KEY_Arabic_seen = 1491;
2679 enum int KEY_Arabic_semicolon = 1467;
2680 enum int KEY_Arabic_shadda = 1521;
2681 enum int KEY_Arabic_sheen = 1492;
2682 enum int KEY_Arabic_sukun = 1522;
2683 enum int KEY_Arabic_superscript_alef = 16778864;
2684 enum int KEY_Arabic_switch = 65406;
2685 enum int KEY_Arabic_tah = 1495;
2686 enum int KEY_Arabic_tatweel = 1504;
2687 enum int KEY_Arabic_tcheh = 16778886;
2688 enum int KEY_Arabic_teh = 1482;
2689 enum int KEY_Arabic_tehmarbuta = 1481;
2690 enum int KEY_Arabic_thal = 1488;
2691 enum int KEY_Arabic_theh = 1483;
2692 enum int KEY_Arabic_tteh = 16778873;
2693 enum int KEY_Arabic_veh = 16778916;
2694 enum int KEY_Arabic_waw = 1512;
2695 enum int KEY_Arabic_yeh = 1514;
2696 enum int KEY_Arabic_yeh_baree = 16778962;
2697 enum int KEY_Arabic_zah = 1496;
2698 enum int KEY_Arabic_zain = 1490;
2699 enum int KEY_Aring = 197;
2700 enum int KEY_Armenian_AT = 16778552;
2701 enum int KEY_Armenian_AYB = 16778545;
2702 enum int KEY_Armenian_BEN = 16778546;
2703 enum int KEY_Armenian_CHA = 16778569;
2704 enum int KEY_Armenian_DA = 16778548;
2705 enum int KEY_Armenian_DZA = 16778561;
2706 enum int KEY_Armenian_E = 16778551;
2707 enum int KEY_Armenian_FE = 16778582;
2708 enum int KEY_Armenian_GHAT = 16778562;
2709 enum int KEY_Armenian_GIM = 16778547;
2710 enum int KEY_Armenian_HI = 16778565;
2711 enum int KEY_Armenian_HO = 16778560;
2712 enum int KEY_Armenian_INI = 16778555;
2713 enum int KEY_Armenian_JE = 16778571;
2714 enum int KEY_Armenian_KE = 16778580;
2715 enum int KEY_Armenian_KEN = 16778559;
2716 enum int KEY_Armenian_KHE = 16778557;
2717 enum int KEY_Armenian_LYUN = 16778556;
2718 enum int KEY_Armenian_MEN = 16778564;
2719 enum int KEY_Armenian_NU = 16778566;
2720 enum int KEY_Armenian_O = 16778581;
2721 enum int KEY_Armenian_PE = 16778570;
2722 enum int KEY_Armenian_PYUR = 16778579;
2723 enum int KEY_Armenian_RA = 16778572;
2724 enum int KEY_Armenian_RE = 16778576;
2725 enum int KEY_Armenian_SE = 16778573;
2726 enum int KEY_Armenian_SHA = 16778567;
2727 enum int KEY_Armenian_TCHE = 16778563;
2728 enum int KEY_Armenian_TO = 16778553;
2729 enum int KEY_Armenian_TSA = 16778558;
2730 enum int KEY_Armenian_TSO = 16778577;
2731 enum int KEY_Armenian_TYUN = 16778575;
2732 enum int KEY_Armenian_VEV = 16778574;
2733 enum int KEY_Armenian_VO = 16778568;
2734 enum int KEY_Armenian_VYUN = 16778578;
2735 enum int KEY_Armenian_YECH = 16778549;
2736 enum int KEY_Armenian_ZA = 16778550;
2737 enum int KEY_Armenian_ZHE = 16778554;
2738 enum int KEY_Armenian_accent = 16778587;
2739 enum int KEY_Armenian_amanak = 16778588;
2740 enum int KEY_Armenian_apostrophe = 16778586;
2741 enum int KEY_Armenian_at = 16778600;
2742 enum int KEY_Armenian_ayb = 16778593;
2743 enum int KEY_Armenian_ben = 16778594;
2744 enum int KEY_Armenian_but = 16778589;
2745 enum int KEY_Armenian_cha = 16778617;
2746 enum int KEY_Armenian_da = 16778596;
2747 enum int KEY_Armenian_dza = 16778609;
2748 enum int KEY_Armenian_e = 16778599;
2749 enum int KEY_Armenian_exclam = 16778588;
2750 enum int KEY_Armenian_fe = 16778630;
2751 enum int KEY_Armenian_full_stop = 16778633;
2752 enum int KEY_Armenian_ghat = 16778610;
2753 enum int KEY_Armenian_gim = 16778595;
2754 enum int KEY_Armenian_hi = 16778613;
2755 enum int KEY_Armenian_ho = 16778608;
2756 enum int KEY_Armenian_hyphen = 16778634;
2757 enum int KEY_Armenian_ini = 16778603;
2758 enum int KEY_Armenian_je = 16778619;
2759 enum int KEY_Armenian_ke = 16778628;
2760 enum int KEY_Armenian_ken = 16778607;
2761 enum int KEY_Armenian_khe = 16778605;
2762 enum int KEY_Armenian_ligature_ew = 16778631;
2763 enum int KEY_Armenian_lyun = 16778604;
2764 enum int KEY_Armenian_men = 16778612;
2765 enum int KEY_Armenian_nu = 16778614;
2766 enum int KEY_Armenian_o = 16778629;
2767 enum int KEY_Armenian_paruyk = 16778590;
2768 enum int KEY_Armenian_pe = 16778618;
2769 enum int KEY_Armenian_pyur = 16778627;
2770 enum int KEY_Armenian_question = 16778590;
2771 enum int KEY_Armenian_ra = 16778620;
2772 enum int KEY_Armenian_re = 16778624;
2773 enum int KEY_Armenian_se = 16778621;
2774 enum int KEY_Armenian_separation_mark = 16778589;
2775 enum int KEY_Armenian_sha = 16778615;
2776 enum int KEY_Armenian_shesht = 16778587;
2777 enum int KEY_Armenian_tche = 16778611;
2778 enum int KEY_Armenian_to = 16778601;
2779 enum int KEY_Armenian_tsa = 16778606;
2780 enum int KEY_Armenian_tso = 16778625;
2781 enum int KEY_Armenian_tyun = 16778623;
2782 enum int KEY_Armenian_verjaket = 16778633;
2783 enum int KEY_Armenian_vev = 16778622;
2784 enum int KEY_Armenian_vo = 16778616;
2785 enum int KEY_Armenian_vyun = 16778626;
2786 enum int KEY_Armenian_yech = 16778597;
2787 enum int KEY_Armenian_yentamna = 16778634;
2788 enum int KEY_Armenian_za = 16778598;
2789 enum int KEY_Armenian_zhe = 16778602;
2790 enum int KEY_Atilde = 195;
2791 enum int KEY_AudibleBell_Enable = 65146;
2792 enum int KEY_AudioCycleTrack = 269025179;
2793 enum int KEY_AudioForward = 269025175;
2794 enum int KEY_AudioLowerVolume = 269025041;
2795 enum int KEY_AudioMedia = 269025074;
2796 enum int KEY_AudioMute = 269025042;
2797 enum int KEY_AudioNext = 269025047;
2798 enum int KEY_AudioPause = 269025073;
2799 enum int KEY_AudioPlay = 269025044;
2800 enum int KEY_AudioPrev = 269025046;
2801 enum int KEY_AudioRaiseVolume = 269025043;
2802 enum int KEY_AudioRandomPlay = 269025177;
2803 enum int KEY_AudioRecord = 269025052;
2804 enum int KEY_AudioRepeat = 269025176;
2805 enum int KEY_AudioRewind = 269025086;
2806 enum int KEY_AudioStop = 269025045;
2807 enum int KEY_Away = 269025165;
2808 enum int KEY_B = 66;
2809 enum int KEY_Babovedot = 16784898;
2810 enum int KEY_Back = 269025062;
2811 enum int KEY_BackForward = 269025087;
2812 enum int KEY_BackSpace = 65288;
2813 enum int KEY_Battery = 269025171;
2814 enum int KEY_Begin = 65368;
2815 enum int KEY_Blue = 269025190;
2816 enum int KEY_Bluetooth = 269025172;
2817 enum int KEY_Book = 269025106;
2818 enum int KEY_BounceKeys_Enable = 65140;
2819 enum int KEY_Break = 65387;
2820 enum int KEY_BrightnessAdjust = 269025083;
2821 enum int KEY_Byelorussian_SHORTU = 1726;
2822 enum int KEY_Byelorussian_shortu = 1710;
2823 enum int KEY_C = 67;
2824 enum int KEY_CD = 269025107;
2825 enum int KEY_Cabovedot = 709;
2826 enum int KEY_Cacute = 454;
2827 enum int KEY_Calculator = 269025053;
2828 enum int KEY_Calendar = 269025056;
2829 enum int KEY_Cancel = 65385;
2830 enum int KEY_Caps_Lock = 65509;
2831 enum int KEY_Ccaron = 456;
2832 enum int KEY_Ccedilla = 199;
2833 enum int KEY_Ccircumflex = 710;
2834 enum int KEY_Clear = 65291;
2835 enum int KEY_ClearGrab = 269024801;
2836 enum int KEY_Close = 269025110;
2837 enum int KEY_Codeinput = 65335;
2838 enum int KEY_ColonSign = 16785569;
2839 enum int KEY_Community = 269025085;
2840 enum int KEY_ContrastAdjust = 269025058;
2841 enum int KEY_Control_L = 65507;
2842 enum int KEY_Control_R = 65508;
2843 enum int KEY_Copy = 269025111;
2844 enum int KEY_CruzeiroSign = 16785570;
2845 enum int KEY_Cut = 269025112;
2846 enum int KEY_CycleAngle = 269025180;
2847 enum int KEY_Cyrillic_A = 1761;
2848 enum int KEY_Cyrillic_BE = 1762;
2849 enum int KEY_Cyrillic_CHE = 1790;
2850 enum int KEY_Cyrillic_CHE_descender = 16778422;
2851 enum int KEY_Cyrillic_CHE_vertstroke = 16778424;
2852 enum int KEY_Cyrillic_DE = 1764;
2853 enum int KEY_Cyrillic_DZHE = 1727;
2854 enum int KEY_Cyrillic_E = 1788;
2855 enum int KEY_Cyrillic_EF = 1766;
2856 enum int KEY_Cyrillic_EL = 1772;
2857 enum int KEY_Cyrillic_EM = 1773;
2858 enum int KEY_Cyrillic_EN = 1774;
2859 enum int KEY_Cyrillic_EN_descender = 16778402;
2860 enum int KEY_Cyrillic_ER = 1778;
2861 enum int KEY_Cyrillic_ES = 1779;
2862 enum int KEY_Cyrillic_GHE = 1767;
2863 enum int KEY_Cyrillic_GHE_bar = 16778386;
2864 enum int KEY_Cyrillic_HA = 1768;
2865 enum int KEY_Cyrillic_HARDSIGN = 1791;
2866 enum int KEY_Cyrillic_HA_descender = 16778418;
2867 enum int KEY_Cyrillic_I = 1769;
2868 enum int KEY_Cyrillic_IE = 1765;
2869 enum int KEY_Cyrillic_IO = 1715;
2870 enum int KEY_Cyrillic_I_macron = 16778466;
2871 enum int KEY_Cyrillic_JE = 1720;
2872 enum int KEY_Cyrillic_KA = 1771;
2873 enum int KEY_Cyrillic_KA_descender = 16778394;
2874 enum int KEY_Cyrillic_KA_vertstroke = 16778396;
2875 enum int KEY_Cyrillic_LJE = 1721;
2876 enum int KEY_Cyrillic_NJE = 1722;
2877 enum int KEY_Cyrillic_O = 1775;
2878 enum int KEY_Cyrillic_O_bar = 16778472;
2879 enum int KEY_Cyrillic_PE = 1776;
2880 enum int KEY_Cyrillic_SCHWA = 16778456;
2881 enum int KEY_Cyrillic_SHA = 1787;
2882 enum int KEY_Cyrillic_SHCHA = 1789;
2883 enum int KEY_Cyrillic_SHHA = 16778426;
2884 enum int KEY_Cyrillic_SHORTI = 1770;
2885 enum int KEY_Cyrillic_SOFTSIGN = 1784;
2886 enum int KEY_Cyrillic_TE = 1780;
2887 enum int KEY_Cyrillic_TSE = 1763;
2888 enum int KEY_Cyrillic_U = 1781;
2889 enum int KEY_Cyrillic_U_macron = 16778478;
2890 enum int KEY_Cyrillic_U_straight = 16778414;
2891 enum int KEY_Cyrillic_U_straight_bar = 16778416;
2892 enum int KEY_Cyrillic_VE = 1783;
2893 enum int KEY_Cyrillic_YA = 1777;
2894 enum int KEY_Cyrillic_YERU = 1785;
2895 enum int KEY_Cyrillic_YU = 1760;
2896 enum int KEY_Cyrillic_ZE = 1786;
2897 enum int KEY_Cyrillic_ZHE = 1782;
2898 enum int KEY_Cyrillic_ZHE_descender = 16778390;
2899 enum int KEY_Cyrillic_a = 1729;
2900 enum int KEY_Cyrillic_be = 1730;
2901 enum int KEY_Cyrillic_che = 1758;
2902 enum int KEY_Cyrillic_che_descender = 16778423;
2903 enum int KEY_Cyrillic_che_vertstroke = 16778425;
2904 enum int KEY_Cyrillic_de = 1732;
2905 enum int KEY_Cyrillic_dzhe = 1711;
2906 enum int KEY_Cyrillic_e = 1756;
2907 enum int KEY_Cyrillic_ef = 1734;
2908 enum int KEY_Cyrillic_el = 1740;
2909 enum int KEY_Cyrillic_em = 1741;
2910 enum int KEY_Cyrillic_en = 1742;
2911 enum int KEY_Cyrillic_en_descender = 16778403;
2912 enum int KEY_Cyrillic_er = 1746;
2913 enum int KEY_Cyrillic_es = 1747;
2914 enum int KEY_Cyrillic_ghe = 1735;
2915 enum int KEY_Cyrillic_ghe_bar = 16778387;
2916 enum int KEY_Cyrillic_ha = 1736;
2917 enum int KEY_Cyrillic_ha_descender = 16778419;
2918 enum int KEY_Cyrillic_hardsign = 1759;
2919 enum int KEY_Cyrillic_i = 1737;
2920 enum int KEY_Cyrillic_i_macron = 16778467;
2921 enum int KEY_Cyrillic_ie = 1733;
2922 enum int KEY_Cyrillic_io = 1699;
2923 enum int KEY_Cyrillic_je = 1704;
2924 enum int KEY_Cyrillic_ka = 1739;
2925 enum int KEY_Cyrillic_ka_descender = 16778395;
2926 enum int KEY_Cyrillic_ka_vertstroke = 16778397;
2927 enum int KEY_Cyrillic_lje = 1705;
2928 enum int KEY_Cyrillic_nje = 1706;
2929 enum int KEY_Cyrillic_o = 1743;
2930 enum int KEY_Cyrillic_o_bar = 16778473;
2931 enum int KEY_Cyrillic_pe = 1744;
2932 enum int KEY_Cyrillic_schwa = 16778457;
2933 enum int KEY_Cyrillic_sha = 1755;
2934 enum int KEY_Cyrillic_shcha = 1757;
2935 enum int KEY_Cyrillic_shha = 16778427;
2936 enum int KEY_Cyrillic_shorti = 1738;
2937 enum int KEY_Cyrillic_softsign = 1752;
2938 enum int KEY_Cyrillic_te = 1748;
2939 enum int KEY_Cyrillic_tse = 1731;
2940 enum int KEY_Cyrillic_u = 1749;
2941 enum int KEY_Cyrillic_u_macron = 16778479;
2942 enum int KEY_Cyrillic_u_straight = 16778415;
2943 enum int KEY_Cyrillic_u_straight_bar = 16778417;
2944 enum int KEY_Cyrillic_ve = 1751;
2945 enum int KEY_Cyrillic_ya = 1745;
2946 enum int KEY_Cyrillic_yeru = 1753;
2947 enum int KEY_Cyrillic_yu = 1728;
2948 enum int KEY_Cyrillic_ze = 1754;
2949 enum int KEY_Cyrillic_zhe = 1750;
2950 enum int KEY_Cyrillic_zhe_descender = 16778391;
2951 enum int KEY_D = 68;
2952 enum int KEY_DOS = 269025114;
2953 enum int KEY_Dabovedot = 16784906;
2954 enum int KEY_Dcaron = 463;
2955 enum int KEY_Delete = 65535;
2956 enum int KEY_Display = 269025113;
2957 enum int KEY_Documents = 269025115;
2958 enum int KEY_DongSign = 16785579;
2959 enum int KEY_Down = 65364;
2960 enum int KEY_Dstroke = 464;
2961 enum int KEY_E = 69;
2962 enum int KEY_ENG = 957;
2963 enum int KEY_ETH = 208;
2964 enum int KEY_Eabovedot = 972;
2965 enum int KEY_Eacute = 201;
2966 enum int KEY_Ebelowdot = 16785080;
2967 enum int KEY_Ecaron = 460;
2968 enum int KEY_Ecircumflex = 202;
2969 enum int KEY_Ecircumflexacute = 16785086;
2970 enum int KEY_Ecircumflexbelowdot = 16785094;
2971 enum int KEY_Ecircumflexgrave = 16785088;
2972 enum int KEY_Ecircumflexhook = 16785090;
2973 enum int KEY_Ecircumflextilde = 16785092;
2974 enum int KEY_EcuSign = 16785568;
2975 enum int KEY_Ediaeresis = 203;
2976 enum int KEY_Egrave = 200;
2977 enum int KEY_Ehook = 16785082;
2978 enum int KEY_Eisu_Shift = 65327;
2979 enum int KEY_Eisu_toggle = 65328;
2980 enum int KEY_Eject = 269025068;
2981 enum int KEY_Emacron = 938;
2982 enum int KEY_End = 65367;
2983 enum int KEY_Eogonek = 458;
2984 enum int KEY_Escape = 65307;
2985 enum int KEY_Eth = 208;
2986 enum int KEY_Etilde = 16785084;
2987 enum int KEY_EuroSign = 8364;
2988 enum int KEY_Excel = 269025116;
2989 enum int KEY_Execute = 65378;
2990 enum int KEY_Explorer = 269025117;
2991 enum int KEY_F = 70;
2992 enum int KEY_F1 = 65470;
2993 enum int KEY_F10 = 65479;
2994 enum int KEY_F11 = 65480;
2995 enum int KEY_F12 = 65481;
2996 enum int KEY_F13 = 65482;
2997 enum int KEY_F14 = 65483;
2998 enum int KEY_F15 = 65484;
2999 enum int KEY_F16 = 65485;
3000 enum int KEY_F17 = 65486;
3001 enum int KEY_F18 = 65487;
3002 enum int KEY_F19 = 65488;
3003 enum int KEY_F2 = 65471;
3004 enum int KEY_F20 = 65489;
3005 enum int KEY_F21 = 65490;
3006 enum int KEY_F22 = 65491;
3007 enum int KEY_F23 = 65492;
3008 enum int KEY_F24 = 65493;
3009 enum int KEY_F25 = 65494;
3010 enum int KEY_F26 = 65495;
3011 enum int KEY_F27 = 65496;
3012 enum int KEY_F28 = 65497;
3013 enum int KEY_F29 = 65498;
3014 enum int KEY_F3 = 65472;
3015 enum int KEY_F30 = 65499;
3016 enum int KEY_F31 = 65500;
3017 enum int KEY_F32 = 65501;
3018 enum int KEY_F33 = 65502;
3019 enum int KEY_F34 = 65503;
3020 enum int KEY_F35 = 65504;
3021 enum int KEY_F4 = 65473;
3022 enum int KEY_F5 = 65474;
3023 enum int KEY_F6 = 65475;
3024 enum int KEY_F7 = 65476;
3025 enum int KEY_F8 = 65477;
3026 enum int KEY_F9 = 65478;
3027 enum int KEY_FFrancSign = 16785571;
3028 enum int KEY_Fabovedot = 16784926;
3029 enum int KEY_Farsi_0 = 16778992;
3030 enum int KEY_Farsi_1 = 16778993;
3031 enum int KEY_Farsi_2 = 16778994;
3032 enum int KEY_Farsi_3 = 16778995;
3033 enum int KEY_Farsi_4 = 16778996;
3034 enum int KEY_Farsi_5 = 16778997;
3035 enum int KEY_Farsi_6 = 16778998;
3036 enum int KEY_Farsi_7 = 16778999;
3037 enum int KEY_Farsi_8 = 16779000;
3038 enum int KEY_Farsi_9 = 16779001;
3039 enum int KEY_Farsi_yeh = 16778956;
3040 enum int KEY_Favorites = 269025072;
3041 enum int KEY_Finance = 269025084;
3042 enum int KEY_Find = 65384;
3043 enum int KEY_First_Virtual_Screen = 65232;
3044 enum int KEY_Forward = 269025063;
3045 enum int KEY_FrameBack = 269025181;
3046 enum int KEY_FrameForward = 269025182;
3047 enum int KEY_G = 71;
3048 enum int KEY_Gabovedot = 725;
3049 enum int KEY_Game = 269025118;
3050 enum int KEY_Gbreve = 683;
3051 enum int KEY_Gcaron = 16777702;
3052 enum int KEY_Gcedilla = 939;
3053 enum int KEY_Gcircumflex = 728;
3054 enum int KEY_Georgian_an = 16781520;
3055 enum int KEY_Georgian_ban = 16781521;
3056 enum int KEY_Georgian_can = 16781546;
3057 enum int KEY_Georgian_char = 16781549;
3058 enum int KEY_Georgian_chin = 16781545;
3059 enum int KEY_Georgian_cil = 16781548;
3060 enum int KEY_Georgian_don = 16781523;
3061 enum int KEY_Georgian_en = 16781524;
3062 enum int KEY_Georgian_fi = 16781558;
3063 enum int KEY_Georgian_gan = 16781522;
3064 enum int KEY_Georgian_ghan = 16781542;
3065 enum int KEY_Georgian_hae = 16781552;
3066 enum int KEY_Georgian_har = 16781556;
3067 enum int KEY_Georgian_he = 16781553;
3068 enum int KEY_Georgian_hie = 16781554;
3069 enum int KEY_Georgian_hoe = 16781557;
3070 enum int KEY_Georgian_in = 16781528;
3071 enum int KEY_Georgian_jhan = 16781551;
3072 enum int KEY_Georgian_jil = 16781547;
3073 enum int KEY_Georgian_kan = 16781529;
3074 enum int KEY_Georgian_khar = 16781541;
3075 enum int KEY_Georgian_las = 16781530;
3076 enum int KEY_Georgian_man = 16781531;
3077 enum int KEY_Georgian_nar = 16781532;
3078 enum int KEY_Georgian_on = 16781533;
3079 enum int KEY_Georgian_par = 16781534;
3080 enum int KEY_Georgian_phar = 16781540;
3081 enum int KEY_Georgian_qar = 16781543;
3082 enum int KEY_Georgian_rae = 16781536;
3083 enum int KEY_Georgian_san = 16781537;
3084 enum int KEY_Georgian_shin = 16781544;
3085 enum int KEY_Georgian_tan = 16781527;
3086 enum int KEY_Georgian_tar = 16781538;
3087 enum int KEY_Georgian_un = 16781539;
3088 enum int KEY_Georgian_vin = 16781525;
3089 enum int KEY_Georgian_we = 16781555;
3090 enum int KEY_Georgian_xan = 16781550;
3091 enum int KEY_Georgian_zen = 16781526;
3092 enum int KEY_Georgian_zhar = 16781535;
3093 enum int KEY_Go = 269025119;
3094 enum int KEY_Greek_ALPHA = 1985;
3095 enum int KEY_Greek_ALPHAaccent = 1953;
3096 enum int KEY_Greek_BETA = 1986;
3097 enum int KEY_Greek_CHI = 2007;
3098 enum int KEY_Greek_DELTA = 1988;
3099 enum int KEY_Greek_EPSILON = 1989;
3100 enum int KEY_Greek_EPSILONaccent = 1954;
3101 enum int KEY_Greek_ETA = 1991;
3102 enum int KEY_Greek_ETAaccent = 1955;
3103 enum int KEY_Greek_GAMMA = 1987;
3104 enum int KEY_Greek_IOTA = 1993;
3105 enum int KEY_Greek_IOTAaccent = 1956;
3106 enum int KEY_Greek_IOTAdiaeresis = 1957;
3107 enum int KEY_Greek_IOTAdieresis = 1957;
3108 enum int KEY_Greek_KAPPA = 1994;
3109 enum int KEY_Greek_LAMBDA = 1995;
3110 enum int KEY_Greek_LAMDA = 1995;
3111 enum int KEY_Greek_MU = 1996;
3112 enum int KEY_Greek_NU = 1997;
3113 enum int KEY_Greek_OMEGA = 2009;
3114 enum int KEY_Greek_OMEGAaccent = 1963;
3115 enum int KEY_Greek_OMICRON = 1999;
3116 enum int KEY_Greek_OMICRONaccent = 1959;
3117 enum int KEY_Greek_PHI = 2006;
3118 enum int KEY_Greek_PI = 2000;
3119 enum int KEY_Greek_PSI = 2008;
3120 enum int KEY_Greek_RHO = 2001;
3121 enum int KEY_Greek_SIGMA = 2002;
3122 enum int KEY_Greek_TAU = 2004;
3123 enum int KEY_Greek_THETA = 1992;
3124 enum int KEY_Greek_UPSILON = 2005;
3125 enum int KEY_Greek_UPSILONaccent = 1960;
3126 enum int KEY_Greek_UPSILONdieresis = 1961;
3127 enum int KEY_Greek_XI = 1998;
3128 enum int KEY_Greek_ZETA = 1990;
3129 enum int KEY_Greek_accentdieresis = 1966;
3130 enum int KEY_Greek_alpha = 2017;
3131 enum int KEY_Greek_alphaaccent = 1969;
3132 enum int KEY_Greek_beta = 2018;
3133 enum int KEY_Greek_chi = 2039;
3134 enum int KEY_Greek_delta = 2020;
3135 enum int KEY_Greek_epsilon = 2021;
3136 enum int KEY_Greek_epsilonaccent = 1970;
3137 enum int KEY_Greek_eta = 2023;
3138 enum int KEY_Greek_etaaccent = 1971;
3139 enum int KEY_Greek_finalsmallsigma = 2035;
3140 enum int KEY_Greek_gamma = 2019;
3141 enum int KEY_Greek_horizbar = 1967;
3142 enum int KEY_Greek_iota = 2025;
3143 enum int KEY_Greek_iotaaccent = 1972;
3144 enum int KEY_Greek_iotaaccentdieresis = 1974;
3145 enum int KEY_Greek_iotadieresis = 1973;
3146 enum int KEY_Greek_kappa = 2026;
3147 enum int KEY_Greek_lambda = 2027;
3148 enum int KEY_Greek_lamda = 2027;
3149 enum int KEY_Greek_mu = 2028;
3150 enum int KEY_Greek_nu = 2029;
3151 enum int KEY_Greek_omega = 2041;
3152 enum int KEY_Greek_omegaaccent = 1979;
3153 enum int KEY_Greek_omicron = 2031;
3154 enum int KEY_Greek_omicronaccent = 1975;
3155 enum int KEY_Greek_phi = 2038;
3156 enum int KEY_Greek_pi = 2032;
3157 enum int KEY_Greek_psi = 2040;
3158 enum int KEY_Greek_rho = 2033;
3159 enum int KEY_Greek_sigma = 2034;
3160 enum int KEY_Greek_switch = 65406;
3161 enum int KEY_Greek_tau = 2036;
3162 enum int KEY_Greek_theta = 2024;
3163 enum int KEY_Greek_upsilon = 2037;
3164 enum int KEY_Greek_upsilonaccent = 1976;
3165 enum int KEY_Greek_upsilonaccentdieresis = 1978;
3166 enum int KEY_Greek_upsilondieresis = 1977;
3167 enum int KEY_Greek_xi = 2030;
3168 enum int KEY_Greek_zeta = 2022;
3169 enum int KEY_Green = 269025188;
3170 enum int KEY_H = 72;
3171 enum int KEY_Hangul = 65329;
3172 enum int KEY_Hangul_A = 3775;
3173 enum int KEY_Hangul_AE = 3776;
3174 enum int KEY_Hangul_AraeA = 3830;
3175 enum int KEY_Hangul_AraeAE = 3831;
3176 enum int KEY_Hangul_Banja = 65337;
3177 enum int KEY_Hangul_Cieuc = 3770;
3178 enum int KEY_Hangul_Codeinput = 65335;
3179 enum int KEY_Hangul_Dikeud = 3751;
3180 enum int KEY_Hangul_E = 3780;
3181 enum int KEY_Hangul_EO = 3779;
3182 enum int KEY_Hangul_EU = 3793;
3183 enum int KEY_Hangul_End = 65331;
3184 enum int KEY_Hangul_Hanja = 65332;
3185 enum int KEY_Hangul_Hieuh = 3774;
3186 enum int KEY_Hangul_I = 3795;
3187 enum int KEY_Hangul_Ieung = 3767;
3188 enum int KEY_Hangul_J_Cieuc = 3818;
3189 enum int KEY_Hangul_J_Dikeud = 3802;
3190 enum int KEY_Hangul_J_Hieuh = 3822;
3191 enum int KEY_Hangul_J_Ieung = 3816;
3192 enum int KEY_Hangul_J_Jieuj = 3817;
3193 enum int KEY_Hangul_J_Khieuq = 3819;
3194 enum int KEY_Hangul_J_Kiyeog = 3796;
3195 enum int KEY_Hangul_J_KiyeogSios = 3798;
3196 enum int KEY_Hangul_J_KkogjiDalrinIeung = 3833;
3197 enum int KEY_Hangul_J_Mieum = 3811;
3198 enum int KEY_Hangul_J_Nieun = 3799;
3199 enum int KEY_Hangul_J_NieunHieuh = 3801;
3200 enum int KEY_Hangul_J_NieunJieuj = 3800;
3201 enum int KEY_Hangul_J_PanSios = 3832;
3202 enum int KEY_Hangul_J_Phieuf = 3821;
3203 enum int KEY_Hangul_J_Pieub = 3812;
3204 enum int KEY_Hangul_J_PieubSios = 3813;
3205 enum int KEY_Hangul_J_Rieul = 3803;
3206 enum int KEY_Hangul_J_RieulHieuh = 3810;
3207 enum int KEY_Hangul_J_RieulKiyeog = 3804;
3208 enum int KEY_Hangul_J_RieulMieum = 3805;
3209 enum int KEY_Hangul_J_RieulPhieuf = 3809;
3210 enum int KEY_Hangul_J_RieulPieub = 3806;
3211 enum int KEY_Hangul_J_RieulSios = 3807;
3212 enum int KEY_Hangul_J_RieulTieut = 3808;
3213 enum int KEY_Hangul_J_Sios = 3814;
3214 enum int KEY_Hangul_J_SsangKiyeog = 3797;
3215 enum int KEY_Hangul_J_SsangSios = 3815;
3216 enum int KEY_Hangul_J_Tieut = 3820;
3217 enum int KEY_Hangul_J_YeorinHieuh = 3834;
3218 enum int KEY_Hangul_Jamo = 65333;
3219 enum int KEY_Hangul_Jeonja = 65336;
3220 enum int KEY_Hangul_Jieuj = 3768;
3221 enum int KEY_Hangul_Khieuq = 3771;
3222 enum int KEY_Hangul_Kiyeog = 3745;
3223 enum int KEY_Hangul_KiyeogSios = 3747;
3224 enum int KEY_Hangul_KkogjiDalrinIeung = 3827;
3225 enum int KEY_Hangul_Mieum = 3761;
3226 enum int KEY_Hangul_MultipleCandidate = 65341;
3227 enum int KEY_Hangul_Nieun = 3748;
3228 enum int KEY_Hangul_NieunHieuh = 3750;
3229 enum int KEY_Hangul_NieunJieuj = 3749;
3230 enum int KEY_Hangul_O = 3783;
3231 enum int KEY_Hangul_OE = 3786;
3232 enum int KEY_Hangul_PanSios = 3826;
3233 enum int KEY_Hangul_Phieuf = 3773;
3234 enum int KEY_Hangul_Pieub = 3762;
3235 enum int KEY_Hangul_PieubSios = 3764;
3236 enum int KEY_Hangul_PostHanja = 65339;
3237 enum int KEY_Hangul_PreHanja = 65338;
3238 enum int KEY_Hangul_PreviousCandidate = 65342;
3239 enum int KEY_Hangul_Rieul = 3753;
3240 enum int KEY_Hangul_RieulHieuh = 3760;
3241 enum int KEY_Hangul_RieulKiyeog = 3754;
3242 enum int KEY_Hangul_RieulMieum = 3755;
3243 enum int KEY_Hangul_RieulPhieuf = 3759;
3244 enum int KEY_Hangul_RieulPieub = 3756;
3245 enum int KEY_Hangul_RieulSios = 3757;
3246 enum int KEY_Hangul_RieulTieut = 3758;
3247 enum int KEY_Hangul_RieulYeorinHieuh = 3823;
3248 enum int KEY_Hangul_Romaja = 65334;
3249 enum int KEY_Hangul_SingleCandidate = 65340;
3250 enum int KEY_Hangul_Sios = 3765;
3251 enum int KEY_Hangul_Special = 65343;
3252 enum int KEY_Hangul_SsangDikeud = 3752;
3253 enum int KEY_Hangul_SsangJieuj = 3769;
3254 enum int KEY_Hangul_SsangKiyeog = 3746;
3255 enum int KEY_Hangul_SsangPieub = 3763;
3256 enum int KEY_Hangul_SsangSios = 3766;
3257 enum int KEY_Hangul_Start = 65330;
3258 enum int KEY_Hangul_SunkyeongeumMieum = 3824;
3259 enum int KEY_Hangul_SunkyeongeumPhieuf = 3828;
3260 enum int KEY_Hangul_SunkyeongeumPieub = 3825;
3261 enum int KEY_Hangul_Tieut = 3772;
3262 enum int KEY_Hangul_U = 3788;
3263 enum int KEY_Hangul_WA = 3784;
3264 enum int KEY_Hangul_WAE = 3785;
3265 enum int KEY_Hangul_WE = 3790;
3266 enum int KEY_Hangul_WEO = 3789;
3267 enum int KEY_Hangul_WI = 3791;
3268 enum int KEY_Hangul_YA = 3777;
3269 enum int KEY_Hangul_YAE = 3778;
3270 enum int KEY_Hangul_YE = 3782;
3271 enum int KEY_Hangul_YEO = 3781;
3272 enum int KEY_Hangul_YI = 3794;
3273 enum int KEY_Hangul_YO = 3787;
3274 enum int KEY_Hangul_YU = 3792;
3275 enum int KEY_Hangul_YeorinHieuh = 3829;
3276 enum int KEY_Hangul_switch = 65406;
3277 enum int KEY_Hankaku = 65321;
3278 enum int KEY_Hcircumflex = 678;
3279 enum int KEY_Hebrew_switch = 65406;
3280 enum int KEY_Help = 65386;
3281 enum int KEY_Henkan = 65315;
3282 enum int KEY_Henkan_Mode = 65315;
3283 enum int KEY_Hibernate = 269025192;
3284 enum int KEY_Hiragana = 65317;
3285 enum int KEY_Hiragana_Katakana = 65319;
3286 enum int KEY_History = 269025079;
3287 enum int KEY_Home = 65360;
3288 enum int KEY_HomePage = 269025048;
3289 enum int KEY_HotLinks = 269025082;
3290 enum int KEY_Hstroke = 673;
3291 enum int KEY_Hyper_L = 65517;
3292 enum int KEY_Hyper_R = 65518;
3293 enum int KEY_I = 73;
3294 enum int KEY_ISO_Center_Object = 65075;
3295 enum int KEY_ISO_Continuous_Underline = 65072;
3296 enum int KEY_ISO_Discontinuous_Underline = 65073;
3297 enum int KEY_ISO_Emphasize = 65074;
3298 enum int KEY_ISO_Enter = 65076;
3299 enum int KEY_ISO_Fast_Cursor_Down = 65071;
3300 enum int KEY_ISO_Fast_Cursor_Left = 65068;
3301 enum int KEY_ISO_Fast_Cursor_Right = 65069;
3302 enum int KEY_ISO_Fast_Cursor_Up = 65070;
3303 enum int KEY_ISO_First_Group = 65036;
3304 enum int KEY_ISO_First_Group_Lock = 65037;
3305 enum int KEY_ISO_Group_Latch = 65030;
3306 enum int KEY_ISO_Group_Lock = 65031;
3307 enum int KEY_ISO_Group_Shift = 65406;
3308 enum int KEY_ISO_Last_Group = 65038;
3309 enum int KEY_ISO_Last_Group_Lock = 65039;
3310 enum int KEY_ISO_Left_Tab = 65056;
3311 enum int KEY_ISO_Level2_Latch = 65026;
3312 enum int KEY_ISO_Level3_Latch = 65028;
3313 enum int KEY_ISO_Level3_Lock = 65029;
3314 enum int KEY_ISO_Level3_Shift = 65027;
3315 enum int KEY_ISO_Level5_Latch = 65042;
3316 enum int KEY_ISO_Level5_Lock = 65043;
3317 enum int KEY_ISO_Level5_Shift = 65041;
3318 enum int KEY_ISO_Lock = 65025;
3319 enum int KEY_ISO_Move_Line_Down = 65058;
3320 enum int KEY_ISO_Move_Line_Up = 65057;
3321 enum int KEY_ISO_Next_Group = 65032;
3322 enum int KEY_ISO_Next_Group_Lock = 65033;
3323 enum int KEY_ISO_Partial_Line_Down = 65060;
3324 enum int KEY_ISO_Partial_Line_Up = 65059;
3325 enum int KEY_ISO_Partial_Space_Left = 65061;
3326 enum int KEY_ISO_Partial_Space_Right = 65062;
3327 enum int KEY_ISO_Prev_Group = 65034;
3328 enum int KEY_ISO_Prev_Group_Lock = 65035;
3329 enum int KEY_ISO_Release_Both_Margins = 65067;
3330 enum int KEY_ISO_Release_Margin_Left = 65065;
3331 enum int KEY_ISO_Release_Margin_Right = 65066;
3332 enum int KEY_ISO_Set_Margin_Left = 65063;
3333 enum int KEY_ISO_Set_Margin_Right = 65064;
3334 enum int KEY_Iabovedot = 681;
3335 enum int KEY_Iacute = 205;
3336 enum int KEY_Ibelowdot = 16785098;
3337 enum int KEY_Ibreve = 16777516;
3338 enum int KEY_Icircumflex = 206;
3339 enum int KEY_Idiaeresis = 207;
3340 enum int KEY_Igrave = 204;
3341 enum int KEY_Ihook = 16785096;
3342 enum int KEY_Imacron = 975;
3343 enum int KEY_Insert = 65379;
3344 enum int KEY_Iogonek = 967;
3345 enum int KEY_Itilde = 933;
3346 enum int KEY_J = 74;
3347 enum int KEY_Jcircumflex = 684;
3348 enum int KEY_K = 75;
3349 enum int KEY_KP_0 = 65456;
3350 enum int KEY_KP_1 = 65457;
3351 enum int KEY_KP_2 = 65458;
3352 enum int KEY_KP_3 = 65459;
3353 enum int KEY_KP_4 = 65460;
3354 enum int KEY_KP_5 = 65461;
3355 enum int KEY_KP_6 = 65462;
3356 enum int KEY_KP_7 = 65463;
3357 enum int KEY_KP_8 = 65464;
3358 enum int KEY_KP_9 = 65465;
3359 enum int KEY_KP_Add = 65451;
3360 enum int KEY_KP_Begin = 65437;
3361 enum int KEY_KP_Decimal = 65454;
3362 enum int KEY_KP_Delete = 65439;
3363 enum int KEY_KP_Divide = 65455;
3364 enum int KEY_KP_Down = 65433;
3365 enum int KEY_KP_End = 65436;
3366 enum int KEY_KP_Enter = 65421;
3367 enum int KEY_KP_Equal = 65469;
3368 enum int KEY_KP_F1 = 65425;
3369 enum int KEY_KP_F2 = 65426;
3370 enum int KEY_KP_F3 = 65427;
3371 enum int KEY_KP_F4 = 65428;
3372 enum int KEY_KP_Home = 65429;
3373 enum int KEY_KP_Insert = 65438;
3374 enum int KEY_KP_Left = 65430;
3375 enum int KEY_KP_Multiply = 65450;
3376 enum int KEY_KP_Next = 65435;
3377 enum int KEY_KP_Page_Down = 65435;
3378 enum int KEY_KP_Page_Up = 65434;
3379 enum int KEY_KP_Prior = 65434;
3380 enum int KEY_KP_Right = 65432;
3381 enum int KEY_KP_Separator = 65452;
3382 enum int KEY_KP_Space = 65408;
3383 enum int KEY_KP_Subtract = 65453;
3384 enum int KEY_KP_Tab = 65417;
3385 enum int KEY_KP_Up = 65431;
3386 enum int KEY_Kana_Lock = 65325;
3387 enum int KEY_Kana_Shift = 65326;
3388 enum int KEY_Kanji = 65313;
3389 enum int KEY_Kanji_Bangou = 65335;
3390 enum int KEY_Katakana = 65318;
3391 enum int KEY_KbdBrightnessDown = 269025030;
3392 enum int KEY_KbdBrightnessUp = 269025029;
3393 enum int KEY_KbdLightOnOff = 269025028;
3394 enum int KEY_Kcedilla = 979;
3395 enum int KEY_Korean_Won = 3839;
3396 enum int KEY_L = 76;
3397 enum int KEY_L1 = 65480;
3398 enum int KEY_L10 = 65489;
3399 enum int KEY_L2 = 65481;
3400 enum int KEY_L3 = 65482;
3401 enum int KEY_L4 = 65483;
3402 enum int KEY_L5 = 65484;
3403 enum int KEY_L6 = 65485;
3404 enum int KEY_L7 = 65486;
3405 enum int KEY_L8 = 65487;
3406 enum int KEY_L9 = 65488;
3407 enum int KEY_Lacute = 453;
3408 enum int KEY_Last_Virtual_Screen = 65236;
3409 enum int KEY_Launch0 = 269025088;
3410 enum int KEY_Launch1 = 269025089;
3411 enum int KEY_Launch2 = 269025090;
3412 enum int KEY_Launch3 = 269025091;
3413 enum int KEY_Launch4 = 269025092;
3414 enum int KEY_Launch5 = 269025093;
3415 enum int KEY_Launch6 = 269025094;
3416 enum int KEY_Launch7 = 269025095;
3417 enum int KEY_Launch8 = 269025096;
3418 enum int KEY_Launch9 = 269025097;
3419 enum int KEY_LaunchA = 269025098;
3420 enum int KEY_LaunchB = 269025099;
3421 enum int KEY_LaunchC = 269025100;
3422 enum int KEY_LaunchD = 269025101;
3423 enum int KEY_LaunchE = 269025102;
3424 enum int KEY_LaunchF = 269025103;
3425 enum int KEY_Lbelowdot = 16784950;
3426 enum int KEY_Lcaron = 421;
3427 enum int KEY_Lcedilla = 934;
3428 enum int KEY_Left = 65361;
3429 enum int KEY_LightBulb = 269025077;
3430 enum int KEY_Linefeed = 65290;
3431 enum int KEY_LiraSign = 16785572;
3432 enum int KEY_LogOff = 269025121;
3433 enum int KEY_Lstroke = 419;
3434 enum int KEY_M = 77;
3435 enum int KEY_Mabovedot = 16784960;
3436 enum int KEY_Macedonia_DSE = 1717;
3437 enum int KEY_Macedonia_GJE = 1714;
3438 enum int KEY_Macedonia_KJE = 1724;
3439 enum int KEY_Macedonia_dse = 1701;
3440 enum int KEY_Macedonia_gje = 1698;
3441 enum int KEY_Macedonia_kje = 1708;
3442 enum int KEY_Mae_Koho = 65342;
3443 enum int KEY_Mail = 269025049;
3444 enum int KEY_MailForward = 269025168;
3445 enum int KEY_Market = 269025122;
3446 enum int KEY_Massyo = 65324;
3447 enum int KEY_Meeting = 269025123;
3448 enum int KEY_Memo = 269025054;
3449 enum int KEY_Menu = 65383;
3450 enum int KEY_MenuKB = 269025125;
3451 enum int KEY_MenuPB = 269025126;
3452 enum int KEY_Messenger = 269025166;
3453 enum int KEY_Meta_L = 65511;
3454 enum int KEY_Meta_R = 65512;
3455 enum int KEY_MillSign = 16785573;
3456 enum int KEY_ModeLock = 269025025;
3457 enum int KEY_Mode_switch = 65406;
3458 enum int KEY_MonBrightnessDown = 269025027;
3459 enum int KEY_MonBrightnessUp = 269025026;
3460 enum int KEY_MouseKeys_Accel_Enable = 65143;
3461 enum int KEY_MouseKeys_Enable = 65142;
3462 enum int KEY_Muhenkan = 65314;
3463 enum int KEY_Multi_key = 65312;
3464 enum int KEY_MultipleCandidate = 65341;
3465 enum int KEY_Music = 269025170;
3466 enum int KEY_MyComputer = 269025075;
3467 enum int KEY_MySites = 269025127;
3468 enum int KEY_N = 78;
3469 enum int KEY_Nacute = 465;
3470 enum int KEY_NairaSign = 16785574;
3471 enum int KEY_Ncaron = 466;
3472 enum int KEY_Ncedilla = 977;
3473 enum int KEY_New = 269025128;
3474 enum int KEY_NewSheqelSign = 16785578;
3475 enum int KEY_News = 269025129;
3476 enum int KEY_Next = 65366;
3477 enum int KEY_Next_VMode = 269024802;
3478 enum int KEY_Next_Virtual_Screen = 65234;
3479 enum int KEY_Ntilde = 209;
3480 enum int KEY_Num_Lock = 65407;
3481 enum int KEY_O = 79;
3482 enum int KEY_OE = 5052;
3483 enum int KEY_Oacute = 211;
3484 enum int KEY_Obarred = 16777631;
3485 enum int KEY_Obelowdot = 16785100;
3486 enum int KEY_Ocaron = 16777681;
3487 enum int KEY_Ocircumflex = 212;
3488 enum int KEY_Ocircumflexacute = 16785104;
3489 enum int KEY_Ocircumflexbelowdot = 16785112;
3490 enum int KEY_Ocircumflexgrave = 16785106;
3491 enum int KEY_Ocircumflexhook = 16785108;
3492 enum int KEY_Ocircumflextilde = 16785110;
3493 enum int KEY_Odiaeresis = 214;
3494 enum int KEY_Odoubleacute = 469;
3495 enum int KEY_OfficeHome = 269025130;
3496 enum int KEY_Ograve = 210;
3497 enum int KEY_Ohook = 16785102;
3498 enum int KEY_Ohorn = 16777632;
3499 enum int KEY_Ohornacute = 16785114;
3500 enum int KEY_Ohornbelowdot = 16785122;
3501 enum int KEY_Ohorngrave = 16785116;
3502 enum int KEY_Ohornhook = 16785118;
3503 enum int KEY_Ohorntilde = 16785120;
3504 enum int KEY_Omacron = 978;
3505 enum int KEY_Ooblique = 216;
3506 enum int KEY_Open = 269025131;
3507 enum int KEY_OpenURL = 269025080;
3508 enum int KEY_Option = 269025132;
3509 enum int KEY_Oslash = 216;
3510 enum int KEY_Otilde = 213;
3511 enum int KEY_Overlay1_Enable = 65144;
3512 enum int KEY_Overlay2_Enable = 65145;
3513 enum int KEY_P = 80;
3514 enum int KEY_Pabovedot = 16784982;
3515 enum int KEY_Page_Down = 65366;
3516 enum int KEY_Page_Up = 65365;
3517 enum int KEY_Paste = 269025133;
3518 enum int KEY_Pause = 65299;
3519 enum int KEY_PesetaSign = 16785575;
3520 enum int KEY_Phone = 269025134;
3521 enum int KEY_Pictures = 269025169;
3522 enum int KEY_Pointer_Accelerate = 65274;
3523 enum int KEY_Pointer_Button1 = 65257;
3524 enum int KEY_Pointer_Button2 = 65258;
3525 enum int KEY_Pointer_Button3 = 65259;
3526 enum int KEY_Pointer_Button4 = 65260;
3527 enum int KEY_Pointer_Button5 = 65261;
3528 enum int KEY_Pointer_Button_Dflt = 65256;
3529 enum int KEY_Pointer_DblClick1 = 65263;
3530 enum int KEY_Pointer_DblClick2 = 65264;
3531 enum int KEY_Pointer_DblClick3 = 65265;
3532 enum int KEY_Pointer_DblClick4 = 65266;
3533 enum int KEY_Pointer_DblClick5 = 65267;
3534 enum int KEY_Pointer_DblClick_Dflt = 65262;
3535 enum int KEY_Pointer_DfltBtnNext = 65275;
3536 enum int KEY_Pointer_DfltBtnPrev = 65276;
3537 enum int KEY_Pointer_Down = 65251;
3538 enum int KEY_Pointer_DownLeft = 65254;
3539 enum int KEY_Pointer_DownRight = 65255;
3540 enum int KEY_Pointer_Drag1 = 65269;
3541 enum int KEY_Pointer_Drag2 = 65270;
3542 enum int KEY_Pointer_Drag3 = 65271;
3543 enum int KEY_Pointer_Drag4 = 65272;
3544 enum int KEY_Pointer_Drag5 = 65277;
3545 enum int KEY_Pointer_Drag_Dflt = 65268;
3546 enum int KEY_Pointer_EnableKeys = 65273;
3547 enum int KEY_Pointer_Left = 65248;
3548 enum int KEY_Pointer_Right = 65249;
3549 enum int KEY_Pointer_Up = 65250;
3550 enum int KEY_Pointer_UpLeft = 65252;
3551 enum int KEY_Pointer_UpRight = 65253;
3552 enum int KEY_PowerDown = 269025057;
3553 enum int KEY_PowerOff = 269025066;
3554 enum int KEY_Prev_VMode = 269024803;
3555 enum int KEY_Prev_Virtual_Screen = 65233;
3556 enum int KEY_PreviousCandidate = 65342;
3557 enum int KEY_Print = 65377;
3558 enum int KEY_Prior = 65365;
3559 enum int KEY_Q = 81;
3560 enum int KEY_R = 82;
3561 enum int KEY_R1 = 65490;
3562 enum int KEY_R10 = 65499;
3563 enum int KEY_R11 = 65500;
3564 enum int KEY_R12 = 65501;
3565 enum int KEY_R13 = 65502;
3566 enum int KEY_R14 = 65503;
3567 enum int KEY_R15 = 65504;
3568 enum int KEY_R2 = 65491;
3569 enum int KEY_R3 = 65492;
3570 enum int KEY_R4 = 65493;
3571 enum int KEY_R5 = 65494;
3572 enum int KEY_R6 = 65495;
3573 enum int KEY_R7 = 65496;
3574 enum int KEY_R8 = 65497;
3575 enum int KEY_R9 = 65498;
3576 enum int KEY_Racute = 448;
3577 enum int KEY_Rcaron = 472;
3578 enum int KEY_Rcedilla = 931;
3579 enum int KEY_Red = 269025187;
3580 enum int KEY_Redo = 65382;
3581 enum int KEY_Refresh = 269025065;
3582 enum int KEY_Reload = 269025139;
3583 enum int KEY_RepeatKeys_Enable = 65138;
3584 enum int KEY_Reply = 269025138;
3585 enum int KEY_Return = 65293;
3586 enum int KEY_Right = 65363;
3587 enum int KEY_RockerDown = 269025060;
3588 enum int KEY_RockerEnter = 269025061;
3589 enum int KEY_RockerUp = 269025059;
3590 enum int KEY_Romaji = 65316;
3591 enum int KEY_RotateWindows = 269025140;
3592 enum int KEY_RotationKB = 269025142;
3593 enum int KEY_RotationPB = 269025141;
3594 enum int KEY_RupeeSign = 16785576;
3595 enum int KEY_S = 83;
3596 enum int KEY_SCHWA = 16777615;
3597 enum int KEY_Sabovedot = 16784992;
3598 enum int KEY_Sacute = 422;
3599 enum int KEY_Save = 269025143;
3600 enum int KEY_Scaron = 425;
3601 enum int KEY_Scedilla = 426;
3602 enum int KEY_Scircumflex = 734;
3603 enum int KEY_ScreenSaver = 269025069;
3604 enum int KEY_ScrollClick = 269025146;
3605 enum int KEY_ScrollDown = 269025145;
3606 enum int KEY_ScrollUp = 269025144;
3607 enum int KEY_Scroll_Lock = 65300;
3608 enum int KEY_Search = 269025051;
3609 enum int KEY_Select = 65376;
3610 enum int KEY_SelectButton = 269025184;
3611 enum int KEY_Send = 269025147;
3612 enum int KEY_Serbian_DJE = 1713;
3613 enum int KEY_Serbian_DZE = 1727;
3614 enum int KEY_Serbian_JE = 1720;
3615 enum int KEY_Serbian_LJE = 1721;
3616 enum int KEY_Serbian_NJE = 1722;
3617 enum int KEY_Serbian_TSHE = 1723;
3618 enum int KEY_Serbian_dje = 1697;
3619 enum int KEY_Serbian_dze = 1711;
3620 enum int KEY_Serbian_je = 1704;
3621 enum int KEY_Serbian_lje = 1705;
3622 enum int KEY_Serbian_nje = 1706;
3623 enum int KEY_Serbian_tshe = 1707;
3624 enum int KEY_Shift_L = 65505;
3625 enum int KEY_Shift_Lock = 65510;
3626 enum int KEY_Shift_R = 65506;
3627 enum int KEY_Shop = 269025078;
3628 enum int KEY_SingleCandidate = 65340;
3629 enum int KEY_Sleep = 269025071;
3630 enum int KEY_SlowKeys_Enable = 65139;
3631 enum int KEY_Spell = 269025148;
3632 enum int KEY_SplitScreen = 269025149;
3633 enum int KEY_Standby = 269025040;
3634 enum int KEY_Start = 269025050;
3635 enum int KEY_StickyKeys_Enable = 65141;
3636 enum int KEY_Stop = 269025064;
3637 enum int KEY_Subtitle = 269025178;
3638 enum int KEY_Super_L = 65515;
3639 enum int KEY_Super_R = 65516;
3640 enum int KEY_Support = 269025150;
3641 enum int KEY_Suspend = 269025191;
3642 enum int KEY_Switch_VT_1 = 269024769;
3643 enum int KEY_Switch_VT_10 = 269024778;
3644 enum int KEY_Switch_VT_11 = 269024779;
3645 enum int KEY_Switch_VT_12 = 269024780;
3646 enum int KEY_Switch_VT_2 = 269024770;
3647 enum int KEY_Switch_VT_3 = 269024771;
3648 enum int KEY_Switch_VT_4 = 269024772;
3649 enum int KEY_Switch_VT_5 = 269024773;
3650 enum int KEY_Switch_VT_6 = 269024774;
3651 enum int KEY_Switch_VT_7 = 269024775;
3652 enum int KEY_Switch_VT_8 = 269024776;
3653 enum int KEY_Switch_VT_9 = 269024777;
3654 enum int KEY_Sys_Req = 65301;
3655 enum int KEY_T = 84;
3656 enum int KEY_THORN = 222;
3657 enum int KEY_Tab = 65289;
3658 enum int KEY_Tabovedot = 16785002;
3659 enum int KEY_TaskPane = 269025151;
3660 enum int KEY_Tcaron = 427;
3661 enum int KEY_Tcedilla = 478;
3662 enum int KEY_Terminal = 269025152;
3663 enum int KEY_Terminate_Server = 65237;
3664 enum int KEY_Thai_baht = 3551;
3665 enum int KEY_Thai_bobaimai = 3514;
3666 enum int KEY_Thai_chochan = 3496;
3667 enum int KEY_Thai_chochang = 3498;
3668 enum int KEY_Thai_choching = 3497;
3669 enum int KEY_Thai_chochoe = 3500;
3670 enum int KEY_Thai_dochada = 3502;
3671 enum int KEY_Thai_dodek = 3508;
3672 enum int KEY_Thai_fofa = 3517;
3673 enum int KEY_Thai_fofan = 3519;
3674 enum int KEY_Thai_hohip = 3531;
3675 enum int KEY_Thai_honokhuk = 3534;
3676 enum int KEY_Thai_khokhai = 3490;
3677 enum int KEY_Thai_khokhon = 3493;
3678 enum int KEY_Thai_khokhuat = 3491;
3679 enum int KEY_Thai_khokhwai = 3492;
3680 enum int KEY_Thai_khorakhang = 3494;
3681 enum int KEY_Thai_kokai = 3489;
3682 enum int KEY_Thai_lakkhangyao = 3557;
3683 enum int KEY_Thai_lekchet = 3575;
3684 enum int KEY_Thai_lekha = 3573;
3685 enum int KEY_Thai_lekhok = 3574;
3686 enum int KEY_Thai_lekkao = 3577;
3687 enum int KEY_Thai_leknung = 3569;
3688 enum int KEY_Thai_lekpaet = 3576;
3689 enum int KEY_Thai_leksam = 3571;
3690 enum int KEY_Thai_leksi = 3572;
3691 enum int KEY_Thai_leksong = 3570;
3692 enum int KEY_Thai_leksun = 3568;
3693 enum int KEY_Thai_lochula = 3532;
3694 enum int KEY_Thai_loling = 3525;
3695 enum int KEY_Thai_lu = 3526;
3696 enum int KEY_Thai_maichattawa = 3563;
3697 enum int KEY_Thai_maiek = 3560;
3698 enum int KEY_Thai_maihanakat = 3537;
3699 enum int KEY_Thai_maihanakat_maitho = 3550;
3700 enum int KEY_Thai_maitaikhu = 3559;
3701 enum int KEY_Thai_maitho = 3561;
3702 enum int KEY_Thai_maitri = 3562;
3703 enum int KEY_Thai_maiyamok = 3558;
3704 enum int KEY_Thai_moma = 3521;
3705 enum int KEY_Thai_ngongu = 3495;
3706 enum int KEY_Thai_nikhahit = 3565;
3707 enum int KEY_Thai_nonen = 3507;
3708 enum int KEY_Thai_nonu = 3513;
3709 enum int KEY_Thai_oang = 3533;
3710 enum int KEY_Thai_paiyannoi = 3535;
3711 enum int KEY_Thai_phinthu = 3546;
3712 enum int KEY_Thai_phophan = 3518;
3713 enum int KEY_Thai_phophung = 3516;
3714 enum int KEY_Thai_phosamphao = 3520;
3715 enum int KEY_Thai_popla = 3515;
3716 enum int KEY_Thai_rorua = 3523;
3717 enum int KEY_Thai_ru = 3524;
3718 enum int KEY_Thai_saraa = 3536;
3719 enum int KEY_Thai_saraaa = 3538;
3720 enum int KEY_Thai_saraae = 3553;
3721 enum int KEY_Thai_saraaimaimalai = 3556;
3722 enum int KEY_Thai_saraaimaimuan = 3555;
3723 enum int KEY_Thai_saraam = 3539;
3724 enum int KEY_Thai_sarae = 3552;
3725 enum int KEY_Thai_sarai = 3540;
3726 enum int KEY_Thai_saraii = 3541;
3727 enum int KEY_Thai_sarao = 3554;
3728 enum int KEY_Thai_sarau = 3544;
3729 enum int KEY_Thai_saraue = 3542;
3730 enum int KEY_Thai_sarauee = 3543;
3731 enum int KEY_Thai_sarauu = 3545;
3732 enum int KEY_Thai_sorusi = 3529;
3733 enum int KEY_Thai_sosala = 3528;
3734 enum int KEY_Thai_soso = 3499;
3735 enum int KEY_Thai_sosua = 3530;
3736 enum int KEY_Thai_thanthakhat = 3564;
3737 enum int KEY_Thai_thonangmontho = 3505;
3738 enum int KEY_Thai_thophuthao = 3506;
3739 enum int KEY_Thai_thothahan = 3511;
3740 enum int KEY_Thai_thothan = 3504;
3741 enum int KEY_Thai_thothong = 3512;
3742 enum int KEY_Thai_thothung = 3510;
3743 enum int KEY_Thai_topatak = 3503;
3744 enum int KEY_Thai_totao = 3509;
3745 enum int KEY_Thai_wowaen = 3527;
3746 enum int KEY_Thai_yoyak = 3522;
3747 enum int KEY_Thai_yoying = 3501;
3748 enum int KEY_Thorn = 222;
3749 enum int KEY_Time = 269025183;
3750 enum int KEY_ToDoList = 269025055;
3751 enum int KEY_Tools = 269025153;
3752 enum int KEY_TopMenu = 269025186;
3753 enum int KEY_TouchpadToggle = 269025193;
3754 enum int KEY_Touroku = 65323;
3755 enum int KEY_Travel = 269025154;
3756 enum int KEY_Tslash = 940;
3757 enum int KEY_U = 85;
3758 enum int KEY_UWB = 269025174;
3759 enum int KEY_Uacute = 218;
3760 enum int KEY_Ubelowdot = 16785124;
3761 enum int KEY_Ubreve = 733;
3762 enum int KEY_Ucircumflex = 219;
3763 enum int KEY_Udiaeresis = 220;
3764 enum int KEY_Udoubleacute = 475;
3765 enum int KEY_Ugrave = 217;
3766 enum int KEY_Uhook = 16785126;
3767 enum int KEY_Uhorn = 16777647;
3768 enum int KEY_Uhornacute = 16785128;
3769 enum int KEY_Uhornbelowdot = 16785136;
3770 enum int KEY_Uhorngrave = 16785130;
3771 enum int KEY_Uhornhook = 16785132;
3772 enum int KEY_Uhorntilde = 16785134;
3773 enum int KEY_Ukrainian_GHE_WITH_UPTURN = 1725;
3774 enum int KEY_Ukrainian_I = 1718;
3775 enum int KEY_Ukrainian_IE = 1716;
3776 enum int KEY_Ukrainian_YI = 1719;
3777 enum int KEY_Ukrainian_ghe_with_upturn = 1709;
3778 enum int KEY_Ukrainian_i = 1702;
3779 enum int KEY_Ukrainian_ie = 1700;
3780 enum int KEY_Ukrainian_yi = 1703;
3781 enum int KEY_Ukranian_I = 1718;
3782 enum int KEY_Ukranian_JE = 1716;
3783 enum int KEY_Ukranian_YI = 1719;
3784 enum int KEY_Ukranian_i = 1702;
3785 enum int KEY_Ukranian_je = 1700;
3786 enum int KEY_Ukranian_yi = 1703;
3787 enum int KEY_Umacron = 990;
3788 enum int KEY_Undo = 65381;
3789 enum int KEY_Ungrab = 269024800;
3790 enum int KEY_Uogonek = 985;
3791 enum int KEY_Up = 65362;
3792 enum int KEY_Uring = 473;
3793 enum int KEY_User1KB = 269025157;
3794 enum int KEY_User2KB = 269025158;
3795 enum int KEY_UserPB = 269025156;
3796 enum int KEY_Utilde = 989;
3797 enum int KEY_V = 86;
3798 enum int KEY_VendorHome = 269025076;
3799 enum int KEY_Video = 269025159;
3800 enum int KEY_View = 269025185;
3801 enum int KEY_VoidSymbol = 16777215;
3802 enum int KEY_W = 87;
3803 enum int KEY_WLAN = 269025173;
3804 enum int KEY_WWW = 269025070;
3805 enum int KEY_Wacute = 16785026;
3806 enum int KEY_WakeUp = 269025067;
3807 enum int KEY_Wcircumflex = 16777588;
3808 enum int KEY_Wdiaeresis = 16785028;
3809 enum int KEY_WebCam = 269025167;
3810 enum int KEY_Wgrave = 16785024;
3811 enum int KEY_WheelButton = 269025160;
3812 enum int KEY_WindowClear = 269025109;
3813 enum int KEY_WonSign = 16785577;
3814 enum int KEY_Word = 269025161;
3815 enum int KEY_X = 88;
3816 enum int KEY_Xabovedot = 16785034;
3817 enum int KEY_Xfer = 269025162;
3818 enum int KEY_Y = 89;
3819 enum int KEY_Yacute = 221;
3820 enum int KEY_Ybelowdot = 16785140;
3821 enum int KEY_Ycircumflex = 16777590;
3822 enum int KEY_Ydiaeresis = 5054;
3823 enum int KEY_Yellow = 269025189;
3824 enum int KEY_Ygrave = 16785138;
3825 enum int KEY_Yhook = 16785142;
3826 enum int KEY_Ytilde = 16785144;
3827 enum int KEY_Z = 90;
3828 enum int KEY_Zabovedot = 431;
3829 enum int KEY_Zacute = 428;
3830 enum int KEY_Zcaron = 430;
3831 enum int KEY_Zen_Koho = 65341;
3832 enum int KEY_Zenkaku = 65320;
3833 enum int KEY_Zenkaku_Hankaku = 65322;
3834 enum int KEY_ZoomIn = 269025163;
3835 enum int KEY_ZoomOut = 269025164;
3836 enum int KEY_Zstroke = 16777653;
3837 enum int KEY_a = 97;
3838 enum int KEY_aacute = 225;
3839 enum int KEY_abelowdot = 16785057;
3840 enum int KEY_abovedot = 511;
3841 enum int KEY_abreve = 483;
3842 enum int KEY_abreveacute = 16785071;
3843 enum int KEY_abrevebelowdot = 16785079;
3844 enum int KEY_abrevegrave = 16785073;
3845 enum int KEY_abrevehook = 16785075;
3846 enum int KEY_abrevetilde = 16785077;
3847 enum int KEY_acircumflex = 226;
3848 enum int KEY_acircumflexacute = 16785061;
3849 enum int KEY_acircumflexbelowdot = 16785069;
3850 enum int KEY_acircumflexgrave = 16785063;
3851 enum int KEY_acircumflexhook = 16785065;
3852 enum int KEY_acircumflextilde = 16785067;
3853 enum int KEY_acute = 180;
3854 enum int KEY_adiaeresis = 228;
3855 enum int KEY_ae = 230;
3856 enum int KEY_agrave = 224;
3857 enum int KEY_ahook = 16785059;
3858 enum int KEY_amacron = 992;
3859 enum int KEY_ampersand = 38;
3860 enum int KEY_aogonek = 433;
3861 enum int KEY_apostrophe = 39;
3862 enum int KEY_approxeq = 16785992;
3863 enum int KEY_approximate = 2248;
3864 enum int KEY_aring = 229;
3865 enum int KEY_asciicircum = 94;
3866 enum int KEY_asciitilde = 126;
3867 enum int KEY_asterisk = 42;
3868 enum int KEY_at = 64;
3869 enum int KEY_atilde = 227;
3870 enum int KEY_b = 98;
3871 enum int KEY_babovedot = 16784899;
3872 enum int KEY_backslash = 92;
3873 enum int KEY_ballotcross = 2804;
3874 enum int KEY_bar = 124;
3875 enum int KEY_because = 16785973;
3876 enum int KEY_blank = 2527;
3877 enum int KEY_botintegral = 2213;
3878 enum int KEY_botleftparens = 2220;
3879 enum int KEY_botleftsqbracket = 2216;
3880 enum int KEY_botleftsummation = 2226;
3881 enum int KEY_botrightparens = 2222;
3882 enum int KEY_botrightsqbracket = 2218;
3883 enum int KEY_botrightsummation = 2230;
3884 enum int KEY_bott = 2550;
3885 enum int KEY_botvertsummationconnector = 2228;
3886 enum int KEY_braceleft = 123;
3887 enum int KEY_braceright = 125;
3888 enum int KEY_bracketleft = 91;
3889 enum int KEY_bracketright = 93;
3890 enum int KEY_braille_blank = 16787456;
3891 enum int KEY_braille_dot_1 = 65521;
3892 enum int KEY_braille_dot_10 = 65530;
3893 enum int KEY_braille_dot_2 = 65522;
3894 enum int KEY_braille_dot_3 = 65523;
3895 enum int KEY_braille_dot_4 = 65524;
3896 enum int KEY_braille_dot_5 = 65525;
3897 enum int KEY_braille_dot_6 = 65526;
3898 enum int KEY_braille_dot_7 = 65527;
3899 enum int KEY_braille_dot_8 = 65528;
3900 enum int KEY_braille_dot_9 = 65529;
3901 enum int KEY_braille_dots_1 = 16787457;
3902 enum int KEY_braille_dots_12 = 16787459;
3903 enum int KEY_braille_dots_123 = 16787463;
3904 enum int KEY_braille_dots_1234 = 16787471;
3905 enum int KEY_braille_dots_12345 = 16787487;
3906 enum int KEY_braille_dots_123456 = 16787519;
3907 enum int KEY_braille_dots_1234567 = 16787583;
3908 enum int KEY_braille_dots_12345678 = 16787711;
3909 enum int KEY_braille_dots_1234568 = 16787647;
3910 enum int KEY_braille_dots_123457 = 16787551;
3911 enum int KEY_braille_dots_1234578 = 16787679;
3912 enum int KEY_braille_dots_123458 = 16787615;
3913 enum int KEY_braille_dots_12346 = 16787503;
3914 enum int KEY_braille_dots_123467 = 16787567;
3915 enum int KEY_braille_dots_1234678 = 16787695;
3916 enum int KEY_braille_dots_123468 = 16787631;
3917 enum int KEY_braille_dots_12347 = 16787535;
3918 enum int KEY_braille_dots_123478 = 16787663;
3919 enum int KEY_braille_dots_12348 = 16787599;
3920 enum int KEY_braille_dots_1235 = 16787479;
3921 enum int KEY_braille_dots_12356 = 16787511;
3922 enum int KEY_braille_dots_123567 = 16787575;
3923 enum int KEY_braille_dots_1235678 = 16787703;
3924 enum int KEY_braille_dots_123568 = 16787639;
3925 enum int KEY_braille_dots_12357 = 16787543;
3926 enum int KEY_braille_dots_123578 = 16787671;
3927 enum int KEY_braille_dots_12358 = 16787607;
3928 enum int KEY_braille_dots_1236 = 16787495;
3929 enum int KEY_braille_dots_12367 = 16787559;
3930 enum int KEY_braille_dots_123678 = 16787687;
3931 enum int KEY_braille_dots_12368 = 16787623;
3932 enum int KEY_braille_dots_1237 = 16787527;
3933 enum int KEY_braille_dots_12378 = 16787655;
3934 enum int KEY_braille_dots_1238 = 16787591;
3935 enum int KEY_braille_dots_124 = 16787467;
3936 enum int KEY_braille_dots_1245 = 16787483;
3937 enum int KEY_braille_dots_12456 = 16787515;
3938 enum int KEY_braille_dots_124567 = 16787579;
3939 enum int KEY_braille_dots_1245678 = 16787707;
3940 enum int KEY_braille_dots_124568 = 16787643;
3941 enum int KEY_braille_dots_12457 = 16787547;
3942 enum int KEY_braille_dots_124578 = 16787675;
3943 enum int KEY_braille_dots_12458 = 16787611;
3944 enum int KEY_braille_dots_1246 = 16787499;
3945 enum int KEY_braille_dots_12467 = 16787563;
3946 enum int KEY_braille_dots_124678 = 16787691;
3947 enum int KEY_braille_dots_12468 = 16787627;
3948 enum int KEY_braille_dots_1247 = 16787531;
3949 enum int KEY_braille_dots_12478 = 16787659;
3950 enum int KEY_braille_dots_1248 = 16787595;
3951 enum int KEY_braille_dots_125 = 16787475;
3952 enum int KEY_braille_dots_1256 = 16787507;
3953 enum int KEY_braille_dots_12567 = 16787571;
3954 enum int KEY_braille_dots_125678 = 16787699;
3955 enum int KEY_braille_dots_12568 = 16787635;
3956 enum int KEY_braille_dots_1257 = 16787539;
3957 enum int KEY_braille_dots_12578 = 16787667;
3958 enum int KEY_braille_dots_1258 = 16787603;
3959 enum int KEY_braille_dots_126 = 16787491;
3960 enum int KEY_braille_dots_1267 = 16787555;
3961 enum int KEY_braille_dots_12678 = 16787683;
3962 enum int KEY_braille_dots_1268 = 16787619;
3963 enum int KEY_braille_dots_127 = 16787523;
3964 enum int KEY_braille_dots_1278 = 16787651;
3965 enum int KEY_braille_dots_128 = 16787587;
3966 enum int KEY_braille_dots_13 = 16787461;
3967 enum int KEY_braille_dots_134 = 16787469;
3968 enum int KEY_braille_dots_1345 = 16787485;
3969 enum int KEY_braille_dots_13456 = 16787517;
3970 enum int KEY_braille_dots_134567 = 16787581;
3971 enum int KEY_braille_dots_1345678 = 16787709;
3972 enum int KEY_braille_dots_134568 = 16787645;
3973 enum int KEY_braille_dots_13457 = 16787549;
3974 enum int KEY_braille_dots_134578 = 16787677;
3975 enum int KEY_braille_dots_13458 = 16787613;
3976 enum int KEY_braille_dots_1346 = 16787501;
3977 enum int KEY_braille_dots_13467 = 16787565;
3978 enum int KEY_braille_dots_134678 = 16787693;
3979 enum int KEY_braille_dots_13468 = 16787629;
3980 enum int KEY_braille_dots_1347 = 16787533;
3981 enum int KEY_braille_dots_13478 = 16787661;
3982 enum int KEY_braille_dots_1348 = 16787597;
3983 enum int KEY_braille_dots_135 = 16787477;
3984 enum int KEY_braille_dots_1356 = 16787509;
3985 enum int KEY_braille_dots_13567 = 16787573;
3986 enum int KEY_braille_dots_135678 = 16787701;
3987 enum int KEY_braille_dots_13568 = 16787637;
3988 enum int KEY_braille_dots_1357 = 16787541;
3989 enum int KEY_braille_dots_13578 = 16787669;
3990 enum int KEY_braille_dots_1358 = 16787605;
3991 enum int KEY_braille_dots_136 = 16787493;
3992 enum int KEY_braille_dots_1367 = 16787557;
3993 enum int KEY_braille_dots_13678 = 16787685;
3994 enum int KEY_braille_dots_1368 = 16787621;
3995 enum int KEY_braille_dots_137 = 16787525;
3996 enum int KEY_braille_dots_1378 = 16787653;
3997 enum int KEY_braille_dots_138 = 16787589;
3998 enum int KEY_braille_dots_14 = 16787465;
3999 enum int KEY_braille_dots_145 = 16787481;
4000 enum int KEY_braille_dots_1456 = 16787513;
4001 enum int KEY_braille_dots_14567 = 16787577;
4002 enum int KEY_braille_dots_145678 = 16787705;
4003 enum int KEY_braille_dots_14568 = 16787641;
4004 enum int KEY_braille_dots_1457 = 16787545;
4005 enum int KEY_braille_dots_14578 = 16787673;
4006 enum int KEY_braille_dots_1458 = 16787609;
4007 enum int KEY_braille_dots_146 = 16787497;
4008 enum int KEY_braille_dots_1467 = 16787561;
4009 enum int KEY_braille_dots_14678 = 16787689;
4010 enum int KEY_braille_dots_1468 = 16787625;
4011 enum int KEY_braille_dots_147 = 16787529;
4012 enum int KEY_braille_dots_1478 = 16787657;
4013 enum int KEY_braille_dots_148 = 16787593;
4014 enum int KEY_braille_dots_15 = 16787473;
4015 enum int KEY_braille_dots_156 = 16787505;
4016 enum int KEY_braille_dots_1567 = 16787569;
4017 enum int KEY_braille_dots_15678 = 16787697;
4018 enum int KEY_braille_dots_1568 = 16787633;
4019 enum int KEY_braille_dots_157 = 16787537;
4020 enum int KEY_braille_dots_1578 = 16787665;
4021 enum int KEY_braille_dots_158 = 16787601;
4022 enum int KEY_braille_dots_16 = 16787489;
4023 enum int KEY_braille_dots_167 = 16787553;
4024 enum int KEY_braille_dots_1678 = 16787681;
4025 enum int KEY_braille_dots_168 = 16787617;
4026 enum int KEY_braille_dots_17 = 16787521;
4027 enum int KEY_braille_dots_178 = 16787649;
4028 enum int KEY_braille_dots_18 = 16787585;
4029 enum int KEY_braille_dots_2 = 16787458;
4030 enum int KEY_braille_dots_23 = 16787462;
4031 enum int KEY_braille_dots_234 = 16787470;
4032 enum int KEY_braille_dots_2345 = 16787486;
4033 enum int KEY_braille_dots_23456 = 16787518;
4034 enum int KEY_braille_dots_234567 = 16787582;
4035 enum int KEY_braille_dots_2345678 = 16787710;
4036 enum int KEY_braille_dots_234568 = 16787646;
4037 enum int KEY_braille_dots_23457 = 16787550;
4038 enum int KEY_braille_dots_234578 = 16787678;
4039 enum int KEY_braille_dots_23458 = 16787614;
4040 enum int KEY_braille_dots_2346 = 16787502;
4041 enum int KEY_braille_dots_23467 = 16787566;
4042 enum int KEY_braille_dots_234678 = 16787694;
4043 enum int KEY_braille_dots_23468 = 16787630;
4044 enum int KEY_braille_dots_2347 = 16787534;
4045 enum int KEY_braille_dots_23478 = 16787662;
4046 enum int KEY_braille_dots_2348 = 16787598;
4047 enum int KEY_braille_dots_235 = 16787478;
4048 enum int KEY_braille_dots_2356 = 16787510;
4049 enum int KEY_braille_dots_23567 = 16787574;
4050 enum int KEY_braille_dots_235678 = 16787702;
4051 enum int KEY_braille_dots_23568 = 16787638;
4052 enum int KEY_braille_dots_2357 = 16787542;
4053 enum int KEY_braille_dots_23578 = 16787670;
4054 enum int KEY_braille_dots_2358 = 16787606;
4055 enum int KEY_braille_dots_236 = 16787494;
4056 enum int KEY_braille_dots_2367 = 16787558;
4057 enum int KEY_braille_dots_23678 = 16787686;
4058 enum int KEY_braille_dots_2368 = 16787622;
4059 enum int KEY_braille_dots_237 = 16787526;
4060 enum int KEY_braille_dots_2378 = 16787654;
4061 enum int KEY_braille_dots_238 = 16787590;
4062 enum int KEY_braille_dots_24 = 16787466;
4063 enum int KEY_braille_dots_245 = 16787482;
4064 enum int KEY_braille_dots_2456 = 16787514;
4065 enum int KEY_braille_dots_24567 = 16787578;
4066 enum int KEY_braille_dots_245678 = 16787706;
4067 enum int KEY_braille_dots_24568 = 16787642;
4068 enum int KEY_braille_dots_2457 = 16787546;
4069 enum int KEY_braille_dots_24578 = 16787674;
4070 enum int KEY_braille_dots_2458 = 16787610;
4071 enum int KEY_braille_dots_246 = 16787498;
4072 enum int KEY_braille_dots_2467 = 16787562;
4073 enum int KEY_braille_dots_24678 = 16787690;
4074 enum int KEY_braille_dots_2468 = 16787626;
4075 enum int KEY_braille_dots_247 = 16787530;
4076 enum int KEY_braille_dots_2478 = 16787658;
4077 enum int KEY_braille_dots_248 = 16787594;
4078 enum int KEY_braille_dots_25 = 16787474;
4079 enum int KEY_braille_dots_256 = 16787506;
4080 enum int KEY_braille_dots_2567 = 16787570;
4081 enum int KEY_braille_dots_25678 = 16787698;
4082 enum int KEY_braille_dots_2568 = 16787634;
4083 enum int KEY_braille_dots_257 = 16787538;
4084 enum int KEY_braille_dots_2578 = 16787666;
4085 enum int KEY_braille_dots_258 = 16787602;
4086 enum int KEY_braille_dots_26 = 16787490;
4087 enum int KEY_braille_dots_267 = 16787554;
4088 enum int KEY_braille_dots_2678 = 16787682;
4089 enum int KEY_braille_dots_268 = 16787618;
4090 enum int KEY_braille_dots_27 = 16787522;
4091 enum int KEY_braille_dots_278 = 16787650;
4092 enum int KEY_braille_dots_28 = 16787586;
4093 enum int KEY_braille_dots_3 = 16787460;
4094 enum int KEY_braille_dots_34 = 16787468;
4095 enum int KEY_braille_dots_345 = 16787484;
4096 enum int KEY_braille_dots_3456 = 16787516;
4097 enum int KEY_braille_dots_34567 = 16787580;
4098 enum int KEY_braille_dots_345678 = 16787708;
4099 enum int KEY_braille_dots_34568 = 16787644;
4100 enum int KEY_braille_dots_3457 = 16787548;
4101 enum int KEY_braille_dots_34578 = 16787676;
4102 enum int KEY_braille_dots_3458 = 16787612;
4103 enum int KEY_braille_dots_346 = 16787500;
4104 enum int KEY_braille_dots_3467 = 16787564;
4105 enum int KEY_braille_dots_34678 = 16787692;
4106 enum int KEY_braille_dots_3468 = 16787628;
4107 enum int KEY_braille_dots_347 = 16787532;
4108 enum int KEY_braille_dots_3478 = 16787660;
4109 enum int KEY_braille_dots_348 = 16787596;
4110 enum int KEY_braille_dots_35 = 16787476;
4111 enum int KEY_braille_dots_356 = 16787508;
4112 enum int KEY_braille_dots_3567 = 16787572;
4113 enum int KEY_braille_dots_35678 = 16787700;
4114 enum int KEY_braille_dots_3568 = 16787636;
4115 enum int KEY_braille_dots_357 = 16787540;
4116 enum int KEY_braille_dots_3578 = 16787668;
4117 enum int KEY_braille_dots_358 = 16787604;
4118 enum int KEY_braille_dots_36 = 16787492;
4119 enum int KEY_braille_dots_367 = 16787556;
4120 enum int KEY_braille_dots_3678 = 16787684;
4121 enum int KEY_braille_dots_368 = 16787620;
4122 enum int KEY_braille_dots_37 = 16787524;
4123 enum int KEY_braille_dots_378 = 16787652;
4124 enum int KEY_braille_dots_38 = 16787588;
4125 enum int KEY_braille_dots_4 = 16787464;
4126 enum int KEY_braille_dots_45 = 16787480;
4127 enum int KEY_braille_dots_456 = 16787512;
4128 enum int KEY_braille_dots_4567 = 16787576;
4129 enum int KEY_braille_dots_45678 = 16787704;
4130 enum int KEY_braille_dots_4568 = 16787640;
4131 enum int KEY_braille_dots_457 = 16787544;
4132 enum int KEY_braille_dots_4578 = 16787672;
4133 enum int KEY_braille_dots_458 = 16787608;
4134 enum int KEY_braille_dots_46 = 16787496;
4135 enum int KEY_braille_dots_467 = 16787560;
4136 enum int KEY_braille_dots_4678 = 16787688;
4137 enum int KEY_braille_dots_468 = 16787624;
4138 enum int KEY_braille_dots_47 = 16787528;
4139 enum int KEY_braille_dots_478 = 16787656;
4140 enum int KEY_braille_dots_48 = 16787592;
4141 enum int KEY_braille_dots_5 = 16787472;
4142 enum int KEY_braille_dots_56 = 16787504;
4143 enum int KEY_braille_dots_567 = 16787568;
4144 enum int KEY_braille_dots_5678 = 16787696;
4145 enum int KEY_braille_dots_568 = 16787632;
4146 enum int KEY_braille_dots_57 = 16787536;
4147 enum int KEY_braille_dots_578 = 16787664;
4148 enum int KEY_braille_dots_58 = 16787600;
4149 enum int KEY_braille_dots_6 = 16787488;
4150 enum int KEY_braille_dots_67 = 16787552;
4151 enum int KEY_braille_dots_678 = 16787680;
4152 enum int KEY_braille_dots_68 = 16787616;
4153 enum int KEY_braille_dots_7 = 16787520;
4154 enum int KEY_braille_dots_78 = 16787648;
4155 enum int KEY_braille_dots_8 = 16787584;
4156 enum int KEY_breve = 418;
4157 enum int KEY_brokenbar = 166;
4158 enum int KEY_c = 99;
4159 enum int KEY_cabovedot = 741;
4160 enum int KEY_cacute = 486;
4161 enum int KEY_careof = 2744;
4162 enum int KEY_caret = 2812;
4163 enum int KEY_caron = 439;
4164 enum int KEY_ccaron = 488;
4165 enum int KEY_ccedilla = 231;
4166 enum int KEY_ccircumflex = 742;
4167 enum int KEY_cedilla = 184;
4168 enum int KEY_cent = 162;
4169 enum int KEY_checkerboard = 2529;
4170 enum int KEY_checkmark = 2803;
4171 enum int KEY_circle = 3023;
4172 enum int KEY_club = 2796;
4173 enum int KEY_colon = 58;
4174 enum int KEY_comma = 44;
4175 enum int KEY_containsas = 16785931;
4176 enum int KEY_copyright = 169;
4177 enum int KEY_cr = 2532;
4178 enum int KEY_crossinglines = 2542;
4179 enum int KEY_cuberoot = 16785947;
4180 enum int KEY_currency = 164;
4181 enum int KEY_cursor = 2815;
4182 enum int KEY_d = 100;
4183 enum int KEY_dabovedot = 16784907;
4184 enum int KEY_dagger = 2801;
4185 enum int KEY_dcaron = 495;
4186 enum int KEY_dead_A = 65153;
4187 enum int KEY_dead_E = 65155;
4188 enum int KEY_dead_I = 65157;
4189 enum int KEY_dead_O = 65159;
4190 enum int KEY_dead_U = 65161;
4191 enum int KEY_dead_a = 65152;
4192 enum int KEY_dead_abovecomma = 65124;
4193 enum int KEY_dead_abovedot = 65110;
4194 enum int KEY_dead_abovereversedcomma = 65125;
4195 enum int KEY_dead_abovering = 65112;
4196 enum int KEY_dead_acute = 65105;
4197 enum int KEY_dead_belowbreve = 65131;
4198 enum int KEY_dead_belowcircumflex = 65129;
4199 enum int KEY_dead_belowcomma = 65134;
4200 enum int KEY_dead_belowdiaeresis = 65132;
4201 enum int KEY_dead_belowdot = 65120;
4202 enum int KEY_dead_belowmacron = 65128;
4203 enum int KEY_dead_belowring = 65127;
4204 enum int KEY_dead_belowtilde = 65130;
4205 enum int KEY_dead_breve = 65109;
4206 enum int KEY_dead_capital_schwa = 65163;
4207 enum int KEY_dead_caron = 65114;
4208 enum int KEY_dead_cedilla = 65115;
4209 enum int KEY_dead_circumflex = 65106;
4210 enum int KEY_dead_currency = 65135;
4211 enum int KEY_dead_dasia = 65125;
4212 enum int KEY_dead_diaeresis = 65111;
4213 enum int KEY_dead_doubleacute = 65113;
4214 enum int KEY_dead_doublegrave = 65126;
4215 enum int KEY_dead_e = 65154;
4216 enum int KEY_dead_grave = 65104;
4217 enum int KEY_dead_hook = 65121;
4218 enum int KEY_dead_horn = 65122;
4219 enum int KEY_dead_i = 65156;
4220 enum int KEY_dead_invertedbreve = 65133;
4221 enum int KEY_dead_iota = 65117;
4222 enum int KEY_dead_macron = 65108;
4223 enum int KEY_dead_o = 65158;
4224 enum int KEY_dead_ogonek = 65116;
4225 enum int KEY_dead_perispomeni = 65107;
4226 enum int KEY_dead_psili = 65124;
4227 enum int KEY_dead_semivoiced_sound = 65119;
4228 enum int KEY_dead_small_schwa = 65162;
4229 enum int KEY_dead_stroke = 65123;
4230 enum int KEY_dead_tilde = 65107;
4231 enum int KEY_dead_u = 65160;
4232 enum int KEY_dead_voiced_sound = 65118;
4233 enum int KEY_decimalpoint = 2749;
4234 enum int KEY_degree = 176;
4235 enum int KEY_diaeresis = 168;
4236 enum int KEY_diamond = 2797;
4237 enum int KEY_digitspace = 2725;
4238 enum int KEY_dintegral = 16785964;
4239 enum int KEY_division = 247;
4240 enum int KEY_dollar = 36;
4241 enum int KEY_doubbaselinedot = 2735;
4242 enum int KEY_doubleacute = 445;
4243 enum int KEY_doubledagger = 2802;
4244 enum int KEY_doublelowquotemark = 2814;
4245 enum int KEY_downarrow = 2302;
4246 enum int KEY_downcaret = 2984;
4247 enum int KEY_downshoe = 3030;
4248 enum int KEY_downstile = 3012;
4249 enum int KEY_downtack = 3010;
4250 enum int KEY_dstroke = 496;
4251 enum int KEY_e = 101;
4252 enum int KEY_eabovedot = 1004;
4253 enum int KEY_eacute = 233;
4254 enum int KEY_ebelowdot = 16785081;
4255 enum int KEY_ecaron = 492;
4256 enum int KEY_ecircumflex = 234;
4257 enum int KEY_ecircumflexacute = 16785087;
4258 enum int KEY_ecircumflexbelowdot = 16785095;
4259 enum int KEY_ecircumflexgrave = 16785089;
4260 enum int KEY_ecircumflexhook = 16785091;
4261 enum int KEY_ecircumflextilde = 16785093;
4262 enum int KEY_ediaeresis = 235;
4263 enum int KEY_egrave = 232;
4264 enum int KEY_ehook = 16785083;
4265 enum int KEY_eightsubscript = 16785544;
4266 enum int KEY_eightsuperior = 16785528;
4267 enum int KEY_elementof = 16785928;
4268 enum int KEY_ellipsis = 2734;
4269 enum int KEY_em3space = 2723;
4270 enum int KEY_em4space = 2724;
4271 enum int KEY_emacron = 954;
4272 enum int KEY_emdash = 2729;
4273 enum int KEY_emfilledcircle = 2782;
4274 enum int KEY_emfilledrect = 2783;
4275 enum int KEY_emopencircle = 2766;
4276 enum int KEY_emopenrectangle = 2767;
4277 enum int KEY_emptyset = 16785925;
4278 enum int KEY_emspace = 2721;
4279 enum int KEY_endash = 2730;
4280 enum int KEY_enfilledcircbullet = 2790;
4281 enum int KEY_enfilledsqbullet = 2791;
4282 enum int KEY_eng = 959;
4283 enum int KEY_enopencircbullet = 2784;
4284 enum int KEY_enopensquarebullet = 2785;
4285 enum int KEY_enspace = 2722;
4286 enum int KEY_eogonek = 490;
4287 enum int KEY_equal = 61;
4288 enum int KEY_eth = 240;
4289 enum int KEY_etilde = 16785085;
4290 enum int KEY_exclam = 33;
4291 enum int KEY_exclamdown = 161;
4292 enum int KEY_f = 102;
4293 enum int KEY_fabovedot = 16784927;
4294 enum int KEY_femalesymbol = 2808;
4295 enum int KEY_ff = 2531;
4296 enum int KEY_figdash = 2747;
4297 enum int KEY_filledlefttribullet = 2780;
4298 enum int KEY_filledrectbullet = 2779;
4299 enum int KEY_filledrighttribullet = 2781;
4300 enum int KEY_filledtribulletdown = 2793;
4301 enum int KEY_filledtribulletup = 2792;
4302 enum int KEY_fiveeighths = 2757;
4303 enum int KEY_fivesixths = 2743;
4304 enum int KEY_fivesubscript = 16785541;
4305 enum int KEY_fivesuperior = 16785525;
4306 enum int KEY_fourfifths = 2741;
4307 enum int KEY_foursubscript = 16785540;
4308 enum int KEY_foursuperior = 16785524;
4309 enum int KEY_fourthroot = 16785948;
4310 enum int KEY_function = 2294;
4311 enum int KEY_g = 103;
4312 enum int KEY_gabovedot = 757;
4313 enum int KEY_gbreve = 699;
4314 enum int KEY_gcaron = 16777703;
4315 enum int KEY_gcedilla = 955;
4316 enum int KEY_gcircumflex = 760;
4317 enum int KEY_grave = 96;
4318 enum int KEY_greater = 62;
4319 enum int KEY_greaterthanequal = 2238;
4320 enum int KEY_guillemotleft = 171;
4321 enum int KEY_guillemotright = 187;
4322 enum int KEY_h = 104;
4323 enum int KEY_hairspace = 2728;
4324 enum int KEY_hcircumflex = 694;
4325 enum int KEY_heart = 2798;
4326 enum int KEY_hebrew_aleph = 3296;
4327 enum int KEY_hebrew_ayin = 3314;
4328 enum int KEY_hebrew_bet = 3297;
4329 enum int KEY_hebrew_beth = 3297;
4330 enum int KEY_hebrew_chet = 3303;
4331 enum int KEY_hebrew_dalet = 3299;
4332 enum int KEY_hebrew_daleth = 3299;
4333 enum int KEY_hebrew_doublelowline = 3295;
4334 enum int KEY_hebrew_finalkaph = 3306;
4335 enum int KEY_hebrew_finalmem = 3309;
4336 enum int KEY_hebrew_finalnun = 3311;
4337 enum int KEY_hebrew_finalpe = 3315;
4338 enum int KEY_hebrew_finalzade = 3317;
4339 enum int KEY_hebrew_finalzadi = 3317;
4340 enum int KEY_hebrew_gimel = 3298;
4341 enum int KEY_hebrew_gimmel = 3298;
4342 enum int KEY_hebrew_he = 3300;
4343 enum int KEY_hebrew_het = 3303;
4344 enum int KEY_hebrew_kaph = 3307;
4345 enum int KEY_hebrew_kuf = 3319;
4346 enum int KEY_hebrew_lamed = 3308;
4347 enum int KEY_hebrew_mem = 3310;
4348 enum int KEY_hebrew_nun = 3312;
4349 enum int KEY_hebrew_pe = 3316;
4350 enum int KEY_hebrew_qoph = 3319;
4351 enum int KEY_hebrew_resh = 3320;
4352 enum int KEY_hebrew_samech = 3313;
4353 enum int KEY_hebrew_samekh = 3313;
4354 enum int KEY_hebrew_shin = 3321;
4355 enum int KEY_hebrew_taf = 3322;
4356 enum int KEY_hebrew_taw = 3322;
4357 enum int KEY_hebrew_tet = 3304;
4358 enum int KEY_hebrew_teth = 3304;
4359 enum int KEY_hebrew_waw = 3301;
4360 enum int KEY_hebrew_yod = 3305;
4361 enum int KEY_hebrew_zade = 3318;
4362 enum int KEY_hebrew_zadi = 3318;
4363 enum int KEY_hebrew_zain = 3302;
4364 enum int KEY_hebrew_zayin = 3302;
4365 enum int KEY_hexagram = 2778;
4366 enum int KEY_horizconnector = 2211;
4367 enum int KEY_horizlinescan1 = 2543;
4368 enum int KEY_horizlinescan3 = 2544;
4369 enum int KEY_horizlinescan5 = 2545;
4370 enum int KEY_horizlinescan7 = 2546;
4371 enum int KEY_horizlinescan9 = 2547;
4372 enum int KEY_hstroke = 689;
4373 enum int KEY_ht = 2530;
4374 enum int KEY_hyphen = 173;
4375 enum int KEY_i = 105;
4376 enum int KEY_iTouch = 269025120;
4377 enum int KEY_iacute = 237;
4378 enum int KEY_ibelowdot = 16785099;
4379 enum int KEY_ibreve = 16777517;
4380 enum int KEY_icircumflex = 238;
4381 enum int KEY_identical = 2255;
4382 enum int KEY_idiaeresis = 239;
4383 enum int KEY_idotless = 697;
4384 enum int KEY_ifonlyif = 2253;
4385 enum int KEY_igrave = 236;
4386 enum int KEY_ihook = 16785097;
4387 enum int KEY_imacron = 1007;
4388 enum int KEY_implies = 2254;
4389 enum int KEY_includedin = 2266;
4390 enum int KEY_includes = 2267;
4391 enum int KEY_infinity = 2242;
4392 enum int KEY_integral = 2239;
4393 enum int KEY_intersection = 2268;
4394 enum int KEY_iogonek = 999;
4395 enum int KEY_itilde = 949;
4396 enum int KEY_j = 106;
4397 enum int KEY_jcircumflex = 700;
4398 enum int KEY_jot = 3018;
4399 enum int KEY_k = 107;
4400 enum int KEY_kana_A = 1201;
4401 enum int KEY_kana_CHI = 1217;
4402 enum int KEY_kana_E = 1204;
4403 enum int KEY_kana_FU = 1228;
4404 enum int KEY_kana_HA = 1226;
4405 enum int KEY_kana_HE = 1229;
4406 enum int KEY_kana_HI = 1227;
4407 enum int KEY_kana_HO = 1230;
4408 enum int KEY_kana_HU = 1228;
4409 enum int KEY_kana_I = 1202;
4410 enum int KEY_kana_KA = 1206;
4411 enum int KEY_kana_KE = 1209;
4412 enum int KEY_kana_KI = 1207;
4413 enum int KEY_kana_KO = 1210;
4414 enum int KEY_kana_KU = 1208;
4415 enum int KEY_kana_MA = 1231;
4416 enum int KEY_kana_ME = 1234;
4417 enum int KEY_kana_MI = 1232;
4418 enum int KEY_kana_MO = 1235;
4419 enum int KEY_kana_MU = 1233;
4420 enum int KEY_kana_N = 1245;
4421 enum int KEY_kana_NA = 1221;
4422 enum int KEY_kana_NE = 1224;
4423 enum int KEY_kana_NI = 1222;
4424 enum int KEY_kana_NO = 1225;
4425 enum int KEY_kana_NU = 1223;
4426 enum int KEY_kana_O = 1205;
4427 enum int KEY_kana_RA = 1239;
4428 enum int KEY_kana_RE = 1242;
4429 enum int KEY_kana_RI = 1240;
4430 enum int KEY_kana_RO = 1243;
4431 enum int KEY_kana_RU = 1241;
4432 enum int KEY_kana_SA = 1211;
4433 enum int KEY_kana_SE = 1214;
4434 enum int KEY_kana_SHI = 1212;
4435 enum int KEY_kana_SO = 1215;
4436 enum int KEY_kana_SU = 1213;
4437 enum int KEY_kana_TA = 1216;
4438 enum int KEY_kana_TE = 1219;
4439 enum int KEY_kana_TI = 1217;
4440 enum int KEY_kana_TO = 1220;
4441 enum int KEY_kana_TSU = 1218;
4442 enum int KEY_kana_TU = 1218;
4443 enum int KEY_kana_U = 1203;
4444 enum int KEY_kana_WA = 1244;
4445 enum int KEY_kana_WO = 1190;
4446 enum int KEY_kana_YA = 1236;
4447 enum int KEY_kana_YO = 1238;
4448 enum int KEY_kana_YU = 1237;
4449 enum int KEY_kana_a = 1191;
4450 enum int KEY_kana_closingbracket = 1187;
4451 enum int KEY_kana_comma = 1188;
4452 enum int KEY_kana_conjunctive = 1189;
4453 enum int KEY_kana_e = 1194;
4454 enum int KEY_kana_fullstop = 1185;
4455 enum int KEY_kana_i = 1192;
4456 enum int KEY_kana_middledot = 1189;
4457 enum int KEY_kana_o = 1195;
4458 enum int KEY_kana_openingbracket = 1186;
4459 enum int KEY_kana_switch = 65406;
4460 enum int KEY_kana_tsu = 1199;
4461 enum int KEY_kana_tu = 1199;
4462 enum int KEY_kana_u = 1193;
4463 enum int KEY_kana_ya = 1196;
4464 enum int KEY_kana_yo = 1198;
4465 enum int KEY_kana_yu = 1197;
4466 enum int KEY_kappa = 930;
4467 enum int KEY_kcedilla = 1011;
4468 enum int KEY_kra = 930;
4469 enum int KEY_l = 108;
4470 enum int KEY_lacute = 485;
4471 enum int KEY_latincross = 2777;
4472 enum int KEY_lbelowdot = 16784951;
4473 enum int KEY_lcaron = 437;
4474 enum int KEY_lcedilla = 950;
4475 enum int KEY_leftanglebracket = 2748;
4476 enum int KEY_leftarrow = 2299;
4477 enum int KEY_leftcaret = 2979;
4478 enum int KEY_leftdoublequotemark = 2770;
4479 enum int KEY_leftmiddlecurlybrace = 2223;
4480 enum int KEY_leftopentriangle = 2764;
4481 enum int KEY_leftpointer = 2794;
4482 enum int KEY_leftradical = 2209;
4483 enum int KEY_leftshoe = 3034;
4484 enum int KEY_leftsinglequotemark = 2768;
4485 enum int KEY_leftt = 2548;
4486 enum int KEY_lefttack = 3036;
4487 enum int KEY_less = 60;
4488 enum int KEY_lessthanequal = 2236;
4489 enum int KEY_lf = 2533;
4490 enum int KEY_logicaland = 2270;
4491 enum int KEY_logicalor = 2271;
4492 enum int KEY_lowleftcorner = 2541;
4493 enum int KEY_lowrightcorner = 2538;
4494 enum int KEY_lstroke = 435;
4495 enum int KEY_m = 109;
4496 enum int KEY_mabovedot = 16784961;
4497 enum int KEY_macron = 175;
4498 enum int KEY_malesymbol = 2807;
4499 enum int KEY_maltesecross = 2800;
4500 enum int KEY_marker = 2751;
4501 enum int KEY_masculine = 186;
4502 enum int KEY_minus = 45;
4503 enum int KEY_minutes = 2774;
4504 enum int KEY_mu = 181;
4505 enum int KEY_multiply = 215;
4506 enum int KEY_musicalflat = 2806;
4507 enum int KEY_musicalsharp = 2805;
4508 enum int KEY_n = 110;
4509 enum int KEY_nabla = 2245;
4510 enum int KEY_nacute = 497;
4511 enum int KEY_ncaron = 498;
4512 enum int KEY_ncedilla = 1009;
4513 enum int KEY_ninesubscript = 16785545;
4514 enum int KEY_ninesuperior = 16785529;
4515 enum int KEY_nl = 2536;
4516 enum int KEY_nobreakspace = 160;
4517 enum int KEY_notapproxeq = 16785991;
4518 enum int KEY_notelementof = 16785929;
4519 enum int KEY_notequal = 2237;
4520 enum int KEY_notidentical = 16786018;
4521 enum int KEY_notsign = 172;
4522 enum int KEY_ntilde = 241;
4523 enum int KEY_numbersign = 35;
4524 enum int KEY_numerosign = 1712;
4525 enum int KEY_o = 111;
4526 enum int KEY_oacute = 243;
4527 enum int KEY_obarred = 16777845;
4528 enum int KEY_obelowdot = 16785101;
4529 enum int KEY_ocaron = 16777682;
4530 enum int KEY_ocircumflex = 244;
4531 enum int KEY_ocircumflexacute = 16785105;
4532 enum int KEY_ocircumflexbelowdot = 16785113;
4533 enum int KEY_ocircumflexgrave = 16785107;
4534 enum int KEY_ocircumflexhook = 16785109;
4535 enum int KEY_ocircumflextilde = 16785111;
4536 enum int KEY_odiaeresis = 246;
4537 enum int KEY_odoubleacute = 501;
4538 enum int KEY_oe = 5053;
4539 enum int KEY_ogonek = 434;
4540 enum int KEY_ograve = 242;
4541 enum int KEY_ohook = 16785103;
4542 enum int KEY_ohorn = 16777633;
4543 enum int KEY_ohornacute = 16785115;
4544 enum int KEY_ohornbelowdot = 16785123;
4545 enum int KEY_ohorngrave = 16785117;
4546 enum int KEY_ohornhook = 16785119;
4547 enum int KEY_ohorntilde = 16785121;
4548 enum int KEY_omacron = 1010;
4549 enum int KEY_oneeighth = 2755;
4550 enum int KEY_onefifth = 2738;
4551 enum int KEY_onehalf = 189;
4552 enum int KEY_onequarter = 188;
4553 enum int KEY_onesixth = 2742;
4554 enum int KEY_onesubscript = 16785537;
4555 enum int KEY_onesuperior = 185;
4556 enum int KEY_onethird = 2736;
4557 enum int KEY_ooblique = 248;
4558 enum int KEY_openrectbullet = 2786;
4559 enum int KEY_openstar = 2789;
4560 enum int KEY_opentribulletdown = 2788;
4561 enum int KEY_opentribulletup = 2787;
4562 enum int KEY_ordfeminine = 170;
4563 enum int KEY_oslash = 248;
4564 enum int KEY_otilde = 245;
4565 enum int KEY_overbar = 3008;
4566 enum int KEY_overline = 1150;
4567 enum int KEY_p = 112;
4568 enum int KEY_pabovedot = 16784983;
4569 enum int KEY_paragraph = 182;
4570 enum int KEY_parenleft = 40;
4571 enum int KEY_parenright = 41;
4572 enum int KEY_partdifferential = 16785922;
4573 enum int KEY_partialderivative = 2287;
4574 enum int KEY_percent = 37;
4575 enum int KEY_period = 46;
4576 enum int KEY_periodcentered = 183;
4577 enum int KEY_phonographcopyright = 2811;
4578 enum int KEY_plus = 43;
4579 enum int KEY_plusminus = 177;
4580 enum int KEY_prescription = 2772;
4581 enum int KEY_prolongedsound = 1200;
4582 enum int KEY_punctspace = 2726;
4583 enum int KEY_q = 113;
4584 enum int KEY_quad = 3020;
4585 enum int KEY_question = 63;
4586 enum int KEY_questiondown = 191;
4587 enum int KEY_quotedbl = 34;
4588 enum int KEY_quoteleft = 96;
4589 enum int KEY_quoteright = 39;
4590 enum int KEY_r = 114;
4591 enum int KEY_racute = 480;
4592 enum int KEY_radical = 2262;
4593 enum int KEY_rcaron = 504;
4594 enum int KEY_rcedilla = 947;
4595 enum int KEY_registered = 174;
4596 enum int KEY_rightanglebracket = 2750;
4597 enum int KEY_rightarrow = 2301;
4598 enum int KEY_rightcaret = 2982;
4599 enum int KEY_rightdoublequotemark = 2771;
4600 enum int KEY_rightmiddlecurlybrace = 2224;
4601 enum int KEY_rightmiddlesummation = 2231;
4602 enum int KEY_rightopentriangle = 2765;
4603 enum int KEY_rightpointer = 2795;
4604 enum int KEY_rightshoe = 3032;
4605 enum int KEY_rightsinglequotemark = 2769;
4606 enum int KEY_rightt = 2549;
4607 enum int KEY_righttack = 3068;
4608 enum int KEY_s = 115;
4609 enum int KEY_sabovedot = 16784993;
4610 enum int KEY_sacute = 438;
4611 enum int KEY_scaron = 441;
4612 enum int KEY_scedilla = 442;
4613 enum int KEY_schwa = 16777817;
4614 enum int KEY_scircumflex = 766;
4615 enum int KEY_script_switch = 65406;
4616 enum int KEY_seconds = 2775;
4617 enum int KEY_section = 167;
4618 enum int KEY_semicolon = 59;
4619 enum int KEY_semivoicedsound = 1247;
4620 enum int KEY_seveneighths = 2758;
4621 enum int KEY_sevensubscript = 16785543;
4622 enum int KEY_sevensuperior = 16785527;
4623 enum int KEY_signaturemark = 2762;
4624 enum int KEY_signifblank = 2732;
4625 enum int KEY_similarequal = 2249;
4626 enum int KEY_singlelowquotemark = 2813;
4627 enum int KEY_sixsubscript = 16785542;
4628 enum int KEY_sixsuperior = 16785526;
4629 enum int KEY_slash = 47;
4630 enum int KEY_soliddiamond = 2528;
4631 enum int KEY_space = 32;
4632 enum int KEY_squareroot = 16785946;
4633 enum int KEY_ssharp = 223;
4634 enum int KEY_sterling = 163;
4635 enum int KEY_stricteq = 16786019;
4636 enum int KEY_t = 116;
4637 enum int KEY_tabovedot = 16785003;
4638 enum int KEY_tcaron = 443;
4639 enum int KEY_tcedilla = 510;
4640 enum int KEY_telephone = 2809;
4641 enum int KEY_telephonerecorder = 2810;
4642 enum int KEY_therefore = 2240;
4643 enum int KEY_thinspace = 2727;
4644 enum int KEY_thorn = 254;
4645 enum int KEY_threeeighths = 2756;
4646 enum int KEY_threefifths = 2740;
4647 enum int KEY_threequarters = 190;
4648 enum int KEY_threesubscript = 16785539;
4649 enum int KEY_threesuperior = 179;
4650 enum int KEY_tintegral = 16785965;
4651 enum int KEY_topintegral = 2212;
4652 enum int KEY_topleftparens = 2219;
4653 enum int KEY_topleftradical = 2210;
4654 enum int KEY_topleftsqbracket = 2215;
4655 enum int KEY_topleftsummation = 2225;
4656 enum int KEY_toprightparens = 2221;
4657 enum int KEY_toprightsqbracket = 2217;
4658 enum int KEY_toprightsummation = 2229;
4659 enum int KEY_topt = 2551;
4660 enum int KEY_topvertsummationconnector = 2227;
4661 enum int KEY_trademark = 2761;
4662 enum int KEY_trademarkincircle = 2763;
4663 enum int KEY_tslash = 956;
4664 enum int KEY_twofifths = 2739;
4665 enum int KEY_twosubscript = 16785538;
4666 enum int KEY_twosuperior = 178;
4667 enum int KEY_twothirds = 2737;
4668 enum int KEY_u = 117;
4669 enum int KEY_uacute = 250;
4670 enum int KEY_ubelowdot = 16785125;
4671 enum int KEY_ubreve = 765;
4672 enum int KEY_ucircumflex = 251;
4673 enum int KEY_udiaeresis = 252;
4674 enum int KEY_udoubleacute = 507;
4675 enum int KEY_ugrave = 249;
4676 enum int KEY_uhook = 16785127;
4677 enum int KEY_uhorn = 16777648;
4678 enum int KEY_uhornacute = 16785129;
4679 enum int KEY_uhornbelowdot = 16785137;
4680 enum int KEY_uhorngrave = 16785131;
4681 enum int KEY_uhornhook = 16785133;
4682 enum int KEY_uhorntilde = 16785135;
4683 enum int KEY_umacron = 1022;
4684 enum int KEY_underbar = 3014;
4685 enum int KEY_underscore = 95;
4686 enum int KEY_union = 2269;
4687 enum int KEY_uogonek = 1017;
4688 enum int KEY_uparrow = 2300;
4689 enum int KEY_upcaret = 2985;
4690 enum int KEY_upleftcorner = 2540;
4691 enum int KEY_uprightcorner = 2539;
4692 enum int KEY_upshoe = 3011;
4693 enum int KEY_upstile = 3027;
4694 enum int KEY_uptack = 3022;
4695 enum int KEY_uring = 505;
4696 enum int KEY_utilde = 1021;
4697 enum int KEY_v = 118;
4698 enum int KEY_variation = 2241;
4699 enum int KEY_vertbar = 2552;
4700 enum int KEY_vertconnector = 2214;
4701 enum int KEY_voicedsound = 1246;
4702 enum int KEY_vt = 2537;
4703 enum int KEY_w = 119;
4704 enum int KEY_wacute = 16785027;
4705 enum int KEY_wcircumflex = 16777589;
4706 enum int KEY_wdiaeresis = 16785029;
4707 enum int KEY_wgrave = 16785025;
4708 enum int KEY_x = 120;
4709 enum int KEY_xabovedot = 16785035;
4710 enum int KEY_y = 121;
4711 enum int KEY_yacute = 253;
4712 enum int KEY_ybelowdot = 16785141;
4713 enum int KEY_ycircumflex = 16777591;
4714 enum int KEY_ydiaeresis = 255;
4715 enum int KEY_yen = 165;
4716 enum int KEY_ygrave = 16785139;
4717 enum int KEY_yhook = 16785143;
4718 enum int KEY_ytilde = 16785145;
4719 enum int KEY_z = 122;
4720 enum int KEY_zabovedot = 447;
4721 enum int KEY_zacute = 444;
4722 enum int KEY_zcaron = 446;
4723 enum int KEY_zerosubscript = 16785536;
4724 enum int KEY_zerosuperior = 16785520;
4725 enum int KEY_zstroke = 16777654;
4726 struct KeyboardGrabInfo {
4727 Window* window, native_window;
4728 c_ulong serial;
4729 int owner_events;
4730 uint time;
4733 struct Keymap /* : GObject.Object */ {
4734 alias parent_instance this;
4735 alias parent_instance super_;
4736 alias parent_instance object;
4737 GObject2.Object parent_instance;
4738 Display* display;
4741 // Unintrospectable function: get_default() / gdk_keymap_get_default()
4742 // Returns the #GdkKeymap attached to the default display.
4743 // RETURNS: the #GdkKeymap attached to the default display.
4744 static Keymap* get_default() {
4745 return gdk_keymap_get_default();
4748 // Unintrospectable function: get_for_display() / gdk_keymap_get_for_display()
4749 // Returns the #GdkKeymap attached to @display.
4750 // RETURNS: the #GdkKeymap attached to @display.
4751 // <display>: the #GdkDisplay.
4752 static Keymap* get_for_display(Display* display) {
4753 return gdk_keymap_get_for_display(display);
4756 // Adds virtual modifiers (i.e. Super, Hyper and Meta) which correspond
4757 // to the real modifiers (i.e Mod2, Mod3, ...) in @modifiers.
4758 // are set in @state to their non-virtual counterparts (i.e. Mod2,
4759 // Mod3,...) and set the corresponding bits in @state.
4760 // GDK already does this before delivering key events, but for
4761 // compatibility reasons, it only sets the first virtual modifier
4762 // it finds, whereas this function sets all matching virtual modifiers.
4763 // This function is useful when matching key events against
4764 // accelerators.
4765 // <state>: pointer to the modifier mask to change
4766 void add_virtual_modifiers(ModifierType* state) {
4767 gdk_keymap_add_virtual_modifiers(&this, state);
4770 // Returns whether the Caps Lock modifer is locked.
4771 // RETURNS: %TRUE if Caps Lock is on
4772 int get_caps_lock_state() {
4773 return gdk_keymap_get_caps_lock_state(&this);
4776 // Returns the direction of effective layout of the keymap.
4777 // Note that passing %NULL for @keymap is deprecated and will stop
4778 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4779 // if it can determine the direction. %PANGO_DIRECTION_NEUTRAL
4780 // otherwise.
4781 // RETURNS: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL
4782 Pango.Direction get_direction() {
4783 return gdk_keymap_get_direction(&this);
4786 // Returns the keyvals bound to @hardware_keycode.
4787 // The Nth #GdkKeymapKey in @keys is bound to the Nth
4788 // keyval in @keyvals. Free the returned arrays with g_free().
4789 // When a keycode is pressed by the user, the keyval from
4790 // this list of entries is selected by considering the effective
4791 // keyboard group and level. See gdk_keymap_translate_keyboard_state().
4792 // Note that passing %NULL for @keymap is deprecated and will stop
4793 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4794 // RETURNS: %TRUE if there were any entries
4795 // <hardware_keycode>: a keycode
4796 // <keys>: return location for array of #GdkKeymapKey, or %NULL
4797 // <keyvals>: return location for array of keyvals, or %NULL
4798 // <n_entries>: length of @keys and @keyvals
4799 int get_entries_for_keycode(uint hardware_keycode, /*out*/ KeymapKey** keys, /*out*/ uint** keyvals, int* n_entries) {
4800 return gdk_keymap_get_entries_for_keycode(&this, hardware_keycode, keys, keyvals, n_entries);
4803 // Obtains a list of keycode/group/level combinations that will
4804 // generate @keyval. Groups and levels are two kinds of keyboard mode;
4805 // in general, the level determines whether the top or bottom symbol
4806 // on a key is used, and the group determines whether the left or
4807 // right symbol is used. On US keyboards, the shift key changes the
4808 // keyboard level, and there are no groups. A group switch key might
4809 // convert a keyboard between Hebrew to English modes, for example.
4810 // #GdkEventKey contains a %group field that indicates the active
4811 // keyboard group. The level is computed from the modifier mask.
4812 // The returned array should be freed
4813 // with g_free().
4814 // Note that passing %NULL for @keymap is deprecated and will stop
4815 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4816 // RETURNS: %TRUE if keys were found and returned
4817 // <keyval>: a keyval, such as %GDK_a, %GDK_Up, %GDK_Return, etc.
4818 // <keys>: return location for an array of #GdkKeymapKey
4819 // <n_keys>: return location for number of elements in returned array
4820 int get_entries_for_keyval(uint keyval, /*out*/ KeymapKey** keys, /*out*/ int* n_keys) {
4821 return gdk_keymap_get_entries_for_keyval(&this, keyval, keys, n_keys);
4824 // Determines if keyboard layouts for both right-to-left and left-to-right
4825 // languages are in use.
4826 // Note that passing %NULL for @keymap is deprecated and will stop
4827 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4828 // RETURNS: %TRUE if there are layouts in both directions, %FALSE otherwise
4829 int have_bidi_layouts() {
4830 return gdk_keymap_have_bidi_layouts(&this);
4833 // Looks up the keyval mapped to a keycode/group/level triplet.
4834 // If no keyval is bound to @key, returns 0. For normal user input,
4835 // you want to use gdk_keymap_translate_keyboard_state() instead of
4836 // this function, since the effective group/level may not be
4837 // the same as the current keyboard state.
4838 // Note that passing %NULL for @keymap is deprecated and will stop
4839 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4840 // RETURNS: a keyval, or 0 if none was mapped to the given @key
4841 // <key>: a #GdkKeymapKey with keycode, group, and level initialized
4842 uint lookup_key(KeymapKey* key) {
4843 return gdk_keymap_lookup_key(&this, key);
4846 // Maps the virtual modifiers (i.e. Super, Hyper and Meta) which
4847 // are set in @state to their non-virtual counterparts (i.e. Mod2,
4848 // Mod3,...) and set the corresponding bits in @state.
4849 // This function is useful when matching key events against
4850 // accelerators.
4851 // same non-virtual modifier. Note that %FALSE is also returned
4852 // if a virtual modifier is mapped to a non-virtual modifier that
4853 // was already set in @state.
4854 // RETURNS: %TRUE if no virtual modifiers were mapped to the
4855 // <state>: pointer to the modifier state to map
4856 int map_virtual_modifiers(ModifierType* state) {
4857 return gdk_keymap_map_virtual_modifiers(&this, state);
4860 // Translates the contents of a #GdkEventKey into a keyval, effective
4861 // group, and level. Modifiers that affected the translation and
4862 // are thus unavailable for application use are returned in
4863 // groups and levels. The @effective_group is the group that was
4864 // actually used for the translation; some keys such as Enter are not
4865 // affected by the active keyboard group. The @level is derived from
4866 // keyval, so this function isn't as useful as you might think.
4867 // <note><para>
4868 // from @state when comparing this key press to a hot key. For
4869 // instance, on a US keyboard, the <literal>plus</literal>
4870 // symbol is shifted, so when comparing a key press to a
4871 // <literal>&lt;Control&gt;plus</literal> accelerator &lt;Shift&gt; should
4872 // be masked out.
4873 // </para>
4874 // <informalexample><programlisting>
4875 // &sol;* We want to ignore irrelevant modifiers like ScrollLock *&sol;
4876 // &num;define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
4877 // gdk_keymap_translate_keyboard_state (keymap, event->hardware_keycode,
4878 // event->state, event->group,
4879 // &amp;keyval, NULL, NULL, &amp;consumed);
4880 // if (keyval == GDK_PLUS &&
4881 // (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
4882 // &sol;* Control was pressed *&sol;
4883 // </programlisting></informalexample>
4884 // <para>
4885 // An older interpretation @consumed_modifiers was that it contained
4886 // all modifiers that might affect the translation of the key;
4887 // this allowed accelerators to be stored with irrelevant consumed
4888 // modifiers, by doing:</para>
4889 // <informalexample><programlisting>
4890 // &sol;* XXX Don't do this XXX *&sol;
4891 // if (keyval == accel_keyval &&
4892 // (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == (accel_mods &amp; ~consumed))
4893 // &sol;* Accelerator was pressed *&sol;
4894 // </programlisting></informalexample>
4895 // <para>
4896 // However, this did not work if multi-modifier combinations were
4897 // used in the keymap, since, for instance, <literal>&lt;Control&gt;</literal>
4898 // would be masked out even if only <literal>&lt;Control&gt;&lt;Alt&gt;</literal>
4899 // was used in the keymap. To support this usage as well as well as
4900 // possible, all <emphasis>single modifier</emphasis> combinations
4901 // that could affect the key for any combination of modifiers will
4902 // be returned in @consumed_modifiers; multi-modifier combinations
4903 // are returned only when actually found in @state. When you store
4904 // accelerators, you should always store them with consumed modifiers
4905 // removed. Store <literal>&lt;Control&gt;plus</literal>,
4906 // not <literal>&lt;Control&gt;&lt;Shift&gt;plus</literal>,
4907 // </para></note>
4908 // Note that passing %NULL for @keymap is deprecated and will stop
4909 // to work in GTK+ 3.0. Use gdk_keymap_get_for_display() instead.
4910 // RETURNS: %TRUE if there was a keyval bound to the keycode/state/group
4911 // <hardware_keycode>: a keycode
4912 // <state>: a modifier state
4913 // <group>: active keyboard group
4914 // <keyval>: return location for keyval, or %NULL
4915 // <effective_group>: return location for effective group, or %NULL
4916 // <level>: return location for level, or %NULL
4917 // <consumed_modifiers>: return location for modifiers that were used to determine the group or level, or %NULL
4918 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) {
4919 return gdk_keymap_translate_keyboard_state(&this, hardware_keycode, state, group, keyval, effective_group, level, consumed_modifiers);
4922 // The ::direction-changed signal gets emitted when the direction of
4923 // the keymap changes.
4924 extern (C) alias static void function (Keymap* this_, void* user_data=null) signal_direction_changed;
4926 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4927 return super_.signal_connect!name(cb, data, cf);
4930 ulong signal_connect(string name:"direction-changed", CB/*:signal_direction_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4931 return signal_connect_data(&this, cast(char*)"direction-changed",
4932 cast(GObject2.Callback)cb, data, null, cf);
4934 // The ::keys-changed signal is emitted when the mapping represented by
4935 extern (C) alias static void function (Keymap* this_, void* user_data=null) signal_keys_changed;
4936 ulong signal_connect(string name:"keys-changed", CB/*:signal_keys_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4937 return signal_connect_data(&this, cast(char*)"keys-changed",
4938 cast(GObject2.Callback)cb, data, null, cf);
4941 // The ::state-changed signal is emitted when the state of the
4942 // keyboard changes, e.g when Caps Lock is turned on or off.
4943 // See gdk_keymap_get_caps_lock_state().
4944 extern (C) alias static void function (Keymap* this_, void* user_data=null) signal_state_changed;
4945 ulong signal_connect(string name:"state-changed", CB/*:signal_state_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
4946 return signal_connect_data(&this, cast(char*)"state-changed",
4947 cast(GObject2.Callback)cb, data, null, cf);
4951 struct KeymapClass {
4952 GObject2.ObjectClass parent_class;
4953 extern (C) void function (Keymap* keymap) direction_changed;
4954 extern (C) void function (Keymap* keymap) keys_changed;
4955 extern (C) void function (Keymap* keymap) state_changed;
4958 struct KeymapKey {
4959 uint keycode;
4960 int group, level;
4963 enum LineStyle {
4964 SOLID = 0,
4965 ON_OFF_DASH = 1,
4966 DOUBLE_DASH = 2
4968 enum int MAX_TIMECOORD_AXES = 128;
4969 enum ModifierType {
4970 SHIFT_MASK = 1,
4971 LOCK_MASK = 2,
4972 CONTROL_MASK = 4,
4973 MOD1_MASK = 8,
4974 MOD2_MASK = 16,
4975 MOD3_MASK = 32,
4976 MOD4_MASK = 64,
4977 MOD5_MASK = 128,
4978 BUTTON1_MASK = 256,
4979 BUTTON2_MASK = 512,
4980 BUTTON3_MASK = 1024,
4981 BUTTON4_MASK = 2048,
4982 BUTTON5_MASK = 4096,
4983 SUPER_MASK = 67108864,
4984 HYPER_MASK = 134217728,
4985 META_MASK = 268435456,
4986 RELEASE_MASK = 1073741824,
4987 MODIFIER_MASK = 1543512063
4989 enum NotifyType {
4990 ANCESTOR = 0,
4991 VIRTUAL = 1,
4992 INFERIOR = 2,
4993 NONLINEAR = 3,
4994 NONLINEAR_VIRTUAL = 4,
4995 UNKNOWN = 5
4997 enum OverlapType {
4998 IN = 0,
4999 OUT = 1,
5000 PART = 2
5002 enum OwnerChange {
5003 NEW_OWNER = 0,
5004 DESTROY = 1,
5005 CLOSE = 2
5007 enum int PARENT_RELATIVE = 1;
5008 enum int PRIORITY_REDRAW = 20;
5009 struct PangoAttrEmbossColor {
5010 Pango.Attribute attr;
5011 Pango.Color color;
5014 struct PangoAttrEmbossed {
5015 Pango.Attribute attr;
5016 int embossed;
5019 struct PangoAttrStipple {
5020 Pango.Attribute attr;
5021 Bitmap* stipple;
5025 // #GdkPangoRenderer is a subclass of #PangoRenderer used for rendering
5026 // Pango objects into GDK drawables. The default renderer for a particular
5027 // screen is obtained with gdk_pango_renderer_get_default(); Pango
5028 // functions like pango_renderer_draw_layout() and
5029 // pango_renderer_draw_layout_line() are then used to draw objects with
5030 // the renderer.
5031 // In most simple cases, applications can just use gdk_draw_layout(), and
5032 // don't need to directly use #GdkPangoRenderer at all. Using the
5033 // #GdkPangoRenderer directly is most useful when working with a
5034 // transformation such as a rotation, because the Pango drawing functions
5035 // take user space coordinates (coordinates before the transformation)
5036 // instead of device coordinates.
5037 // In certain cases it can be useful to subclass #GdkPangoRenderer. Examples
5038 // of reasons to do this are to add handling of custom attributes by
5039 // overriding 'prepare_run' or to do custom drawing of embedded objects
5040 // by overriding 'draw_shape'.
5041 struct PangoRenderer /* : Pango.Renderer */ /* Version 2.6 */ {
5042 alias parent_instance this;
5043 alias parent_instance super_;
5044 alias parent_instance renderer;
5045 Pango.Renderer parent_instance;
5046 private PangoRendererPrivate* priv;
5049 // Creates a new #PangoRenderer for @screen. Normally you can use the
5050 // results of gdk_pango_renderer_get_default() rather than creating a new
5051 // renderer.
5052 // RETURNS: a newly created #PangoRenderer. Free with g_object_unref().
5053 // <screen>: a #GdkScreen
5054 static PangoRenderer* /*new*/ new_(Screen* screen) {
5055 return gdk_pango_renderer_new(screen);
5058 // Unintrospectable function: get_default() / gdk_pango_renderer_get_default()
5059 // Gets the default #PangoRenderer for a screen. This default renderer
5060 // is shared by all users of the display, so properties such as the color
5061 // or transformation matrix set for the renderer may be overwritten
5062 // by functions such as gdk_draw_layout().
5063 // Before using the renderer, you need to call gdk_pango_renderer_set_drawable()
5064 // and gdk_pango_renderer_set_gc() to set the drawable and graphics context
5065 // to use for drawing.
5066 // renderer is owned by GTK+ and will be kept around until the
5067 // screen is closed.
5068 // RETURNS: the default #PangoRenderer for @screen. The
5069 // <screen>: a #GdkScreen
5070 static Pango.Renderer* get_default(Screen* screen) {
5071 return gdk_pango_renderer_get_default(screen);
5074 // Sets the drawable the renderer draws to.
5075 // <drawable>: the new target drawable, or %NULL
5076 void set_drawable(Drawable* drawable=null) {
5077 gdk_pango_renderer_set_drawable(&this, drawable);
5080 // Sets the GC the renderer draws with. Note that the GC must not be
5081 // modified until it is unset by calling the function again with
5082 // %NULL for the @gc parameter, since GDK may make internal copies
5083 // of the GC which won't be updated to follow changes to the
5084 // original GC.
5085 // <gc>: the new GC to use for drawing, or %NULL
5086 void set_gc(GC* gc=null) {
5087 gdk_pango_renderer_set_gc(&this, gc);
5090 // Sets the color for a particular render part (foreground,
5091 // background, underline, etc.), overriding any attributes on the layouts
5092 // renderered with this renderer.
5093 // <part>: the part to render to set the color of
5094 // <color>: the color to use, or %NULL to unset a previously set override color.
5095 void set_override_color(Pango.RenderPart part, Color* color=null) {
5096 gdk_pango_renderer_set_override_color(&this, part, color);
5099 // Sets the stipple for one render part (foreground, background, underline,
5100 // etc.) Note that this is overwritten when iterating through the individual
5101 // styled runs of a #PangoLayout or #PangoLayoutLine. This function is thus
5102 // only useful when you call low level functions like pango_renderer_draw_glyphs()
5103 // directly, or in the 'prepare_run' virtual function of a subclass of
5104 // #GdkPangoRenderer.
5105 // <part>: the part to render with the stipple
5106 // <stipple>: the new stipple value.
5107 void set_stipple(Pango.RenderPart part, Bitmap* stipple) {
5108 gdk_pango_renderer_set_stipple(&this, part, stipple);
5112 // #GdkPangoRenderer is the class structure for #GdkPangoRenderer.
5113 struct PangoRendererClass /* Version 2.6 */ {
5114 private Pango.RendererClass parent_class;
5117 struct PangoRendererPrivate {
5120 struct Pixmap /* : Drawable */ {
5121 alias method_parent this;
5122 alias method_parent super_;
5123 alias method_parent drawable;
5124 Drawable method_parent;
5127 // Wraps a native window for the default display in a #GdkPixmap.
5128 // This may fail if the pixmap has been destroyed.
5129 // For example in the X backend, a native pixmap handle is an Xlib
5130 // <type>XID</type>.
5131 // native pixmap or %NULL if the pixmap has been destroyed.
5132 // RETURNS: the newly-created #GdkPixmap wrapper for the
5133 // <anid>: a native pixmap handle.
5134 static Pixmap* /*new*/ foreign_new(NativeWindow anid) {
5135 return gdk_pixmap_foreign_new(anid);
5138 // Wraps a native pixmap in a #GdkPixmap.
5139 // This may fail if the pixmap has been destroyed.
5140 // For example in the X backend, a native pixmap handle is an Xlib
5141 // <type>XID</type>.
5142 // native pixmap or %NULL if the pixmap has been destroyed.
5143 // RETURNS: the newly-created #GdkPixmap wrapper for the
5144 // <display>: The #GdkDisplay where @anid is located.
5145 // <anid>: a native pixmap handle.
5146 static Pixmap* /*new*/ foreign_new_for_display(Display* display, NativeWindow anid) {
5147 return gdk_pixmap_foreign_new_for_display(display, anid);
5150 // Wraps a native pixmap in a #GdkPixmap.
5151 // This may fail if the pixmap has been destroyed.
5152 // For example in the X backend, a native pixmap handle is an Xlib
5153 // <type>XID</type>.
5154 // This function is an alternative to gdk_pixmap_foreign_new_for_display()
5155 // for cases where the dimensions of the pixmap are known. For the X
5156 // backend, this avoids a roundtrip to the server.
5157 // native pixmap or %NULL if the pixmap has been destroyed.
5158 // RETURNS: the newly-created #GdkPixmap wrapper for the
5159 // <screen>: a #GdkScreen
5160 // <anid>: a native pixmap handle
5161 // <width>: the width of the pixmap identified by @anid
5162 // <height>: the height of the pixmap identified by @anid
5163 // <depth>: the depth of the pixmap identified by @anid
5164 static Pixmap* /*new*/ foreign_new_for_screen(Screen* screen, NativeWindow anid, int width, int height, int depth) {
5165 return gdk_pixmap_foreign_new_for_screen(screen, anid, width, height, depth);
5167 static Pixmap* /*new*/ new_(Drawable* drawable, int width, int height, int depth) {
5168 return gdk_pixmap_new(drawable, width, height, depth);
5171 // Create a pixmap from a XPM file using a particular colormap.
5172 // gdk_pixbuf_new_from_file() to create it.
5173 // If you must use a pixmap, use gdk_pixmap_new() to
5174 // create it and Cairo to draw the pixbuf onto it.
5175 // RETURNS: the #GdkPixmap.
5176 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap. Can be %NULL if @colormap is given.
5177 // <colormap>: the #GdkColormap that the new pixmap will be use. If omitted, the colormap for @window will be used.
5178 // <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.
5179 // <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.
5180 // <filename>: the filename of a file containing XPM data.
5181 static Pixmap* colormap_create_from_xpm(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char* filename) {
5182 return gdk_pixmap_colormap_create_from_xpm(drawable, colormap, mask, transparent_color, filename);
5185 // Create a pixmap from data in XPM format using a particular
5186 // colormap.
5187 // gdk_pixbuf_new_from_xpm_data() to create it.
5188 // If you must use a pixmap, use gdk_pixmap_new() to
5189 // create it and Cairo to draw the pixbuf onto it.
5190 // RETURNS: the #GdkPixmap.
5191 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap. Can be %NULL if @colormap is given.
5192 // <colormap>: the #GdkColormap that the new pixmap will be use. If omitted, the colormap for @window will be used.
5193 // <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.
5194 // <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.
5195 // <data>: Pointer to a string containing the XPM data.
5196 static Pixmap* colormap_create_from_xpm_d(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char** data) {
5197 return gdk_pixmap_colormap_create_from_xpm_d(drawable, colormap, mask, transparent_color, data);
5199 // Unintrospectable function: create_from_data() / gdk_pixmap_create_from_data()
5200 static Pixmap* create_from_data(Drawable* drawable, char* data, int width, int height, int depth, Color* fg, Color* bg) {
5201 return gdk_pixmap_create_from_data(drawable, data, width, height, depth, fg, bg);
5204 // Create a pixmap from a XPM file.
5205 // gdk_pixbuf_new_from_file() to create it.
5206 // If you must use a pixmap, use gdk_pixmap_new() to
5207 // create it and Cairo to draw the pixbuf onto it.
5208 // RETURNS: the #GdkPixmap
5209 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap.
5210 // <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.
5211 // <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.
5212 // <filename>: the filename of a file containing XPM data.
5213 static Pixmap* create_from_xpm(Drawable* drawable, Bitmap** mask, Color* transparent_color, char* filename) {
5214 return gdk_pixmap_create_from_xpm(drawable, mask, transparent_color, filename);
5217 // Create a pixmap from data in XPM format.
5218 // gdk_pixbuf_new_from_xpm_data() to create it.
5219 // If you must use a pixmap, use gdk_pixmap_new() to
5220 // create it and Cairo to draw the pixbuf onto it.
5221 // RETURNS: the #GdkPixmap.
5222 // <drawable>: a #GdkDrawable, used to determine default values for the new pixmap.
5223 // <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.
5224 // <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.
5225 // <data>: Pointer to a string containing the XPM data.
5226 static Pixmap* create_from_xpm_d(Drawable* drawable, /*out*/ Bitmap** mask, Color* transparent_color, char** data) {
5227 return gdk_pixmap_create_from_xpm_d(drawable, mask, transparent_color, data);
5230 // Unintrospectable function: lookup() / gdk_pixmap_lookup()
5231 // Looks up the #GdkPixmap that wraps the given native pixmap handle.
5232 // For example in the X backend, a native pixmap handle is an Xlib
5233 // <type>XID</type>.
5234 // or %NULL if there is none.
5235 // RETURNS: the #GdkPixmap wrapper for the native pixmap,
5236 // <anid>: a native pixmap handle.
5237 static Pixmap* lookup(NativeWindow anid) {
5238 return gdk_pixmap_lookup(anid);
5241 // Unintrospectable function: lookup_for_display() / gdk_pixmap_lookup_for_display()
5242 // Looks up the #GdkPixmap that wraps the given native pixmap handle.
5243 // For example in the X backend, a native pixmap handle is an Xlib
5244 // <type>XID</type>.
5245 // or %NULL if there is none.
5246 // RETURNS: the #GdkPixmap wrapper for the native pixmap,
5247 // <display>: the #GdkDisplay associated with @anid
5248 // <anid>: a native pixmap handle.
5249 static Pixmap* lookup_for_display(Display* display, NativeWindow anid) {
5250 return gdk_pixmap_lookup_for_display(display, anid);
5253 // This function is purely to make it possible to query the size of pixmaps
5254 // even when compiling without deprecated symbols and you must use pixmaps.
5255 // It is identical to gdk_drawable_get_size(), but for pixmaps.
5256 // <width>: location to store @pixmap's width, or %NULL
5257 // <height>: location to store @pixmap's height, or %NULL
5258 void get_size(/*out*/ int* width=null, /*out*/ int* height=null) {
5259 gdk_pixmap_get_size(&this, width, height);
5263 struct PixmapObject {
5264 Drawable parent_instance;
5265 Drawable* impl;
5266 int depth;
5269 struct PixmapObjectClass {
5270 DrawableClass parent_class;
5273 struct Point {
5274 int x, y;
5277 struct PointerHooks {
5278 // Unintrospectable functionp: get_pointer() / ()
5279 extern (C) Window* function (Window* window, int* x, int* y, ModifierType* mask) get_pointer;
5280 // Unintrospectable functionp: window_at_pointer() / ()
5281 extern (C) Window* function (Screen* screen, int* win_x, int* win_y) window_at_pointer;
5284 struct PointerWindowInfo {
5285 Window* toplevel_under_pointer, window_under_pointer;
5286 double toplevel_x, toplevel_y;
5287 uint state, button;
5288 c_ulong motion_hint_serial;
5291 enum PropMode {
5292 REPLACE = 0,
5293 PREPEND = 1,
5294 APPEND = 2
5296 enum PropertyState {
5297 NEW_VALUE = 0,
5298 DELETE = 1
5300 struct Rectangle {
5301 int x, y, width, height;
5304 // Calculates the intersection of two rectangles. It is allowed for
5305 // do not intersect, @dest's width and height is set to 0 and its x
5306 // and y values are undefined. If you are only interested in whether
5307 // the rectangles intersect, but not in the intersecting area itself,
5308 // pass %NULL for @dest.
5309 // RETURNS: %TRUE if the rectangles intersect.
5310 // <src2>: a #GdkRectangle
5311 // <dest>: return location for the intersection of @src1 and @src2, or %NULL
5312 int intersect(Rectangle* src2, /*out*/ Rectangle* dest=null) {
5313 return gdk_rectangle_intersect(&this, src2, dest);
5316 // Calculates the union of two rectangles.
5317 // The union of rectangles @src1 and @src2 is the smallest rectangle which
5318 // includes both @src1 and @src2 within it.
5319 // It is allowed for @dest to be the same as either @src1 or @src2.
5320 // <src2>: a #GdkRectangle
5321 // <dest>: return location for the union of @src1 and @src2
5322 void union_(Rectangle* src2, /*out*/ Rectangle* dest) {
5323 gdk_rectangle_union(&this, src2, dest);
5326 // --- mixin/Gdk2_Rectangle.d --->
5328 void union_(Rectangle* src2) {
5329 gdk_rectangle_union(&this, src2, &this);
5332 // <--- mixin/Gdk2_Rectangle.d ---
5335 struct Region {
5337 // Unintrospectable method: copy() / gdk_region_copy()
5338 // Copies @region, creating an identical new region.
5339 // RETURNS: a new region identical to @region
5340 Region* copy() {
5341 return gdk_region_copy(&this);
5343 // Destroys a #GdkRegion.
5344 void destroy() {
5345 gdk_region_destroy(&this);
5348 // Finds out if the #GdkRegion is empty.
5349 // RETURNS: %TRUE if @region is empty.
5350 int empty() {
5351 return gdk_region_empty(&this);
5354 // Finds out if the two regions are the same.
5355 // RETURNS: %TRUE if @region1 and @region2 are equal.
5356 // <region2>: a #GdkRegion
5357 int equal(Region* region2) {
5358 return gdk_region_equal(&this, region2);
5361 // Obtains the smallest rectangle which includes the entire #GdkRegion.
5362 // <rectangle>: return location for the clipbox
5363 void get_clipbox(Rectangle* rectangle) {
5364 gdk_region_get_clipbox(&this, rectangle);
5367 // Obtains the area covered by the region as a list of rectangles.
5368 // The array returned in @rectangles must be freed with g_free().
5369 // <rectangles>: return location for an array of rectangles
5370 // <n_rectangles>: length of returned array
5371 void get_rectangles(Rectangle** rectangles, int* n_rectangles) {
5372 gdk_region_get_rectangles(&this, rectangles, n_rectangles);
5375 // Sets the area of @source1 to the intersection of the areas of @source1
5376 // and @source2. The resulting area is the set of pixels contained in
5377 // both @source1 and @source2.
5378 // <source2>: another #GdkRegion
5379 void intersect(Region* source2) {
5380 gdk_region_intersect(&this, source2);
5383 // Moves a region the specified distance.
5384 // <dx>: the distance to move the region horizontally
5385 // <dy>: the distance to move the region vertically
5386 void offset(int dx, int dy) {
5387 gdk_region_offset(&this, dx, dy);
5390 // Finds out if a point is in a region.
5391 // RETURNS: %TRUE if the point is in @region.
5392 // <x>: the x coordinate of a point
5393 // <y>: the y coordinate of a point
5394 int point_in(int x, int y) {
5395 return gdk_region_point_in(&this, x, y);
5398 // Finds out if a regions is the same as a rectangle.
5399 // achieve the same effect.
5400 // RETURNS: %TRUE if @region and @rectangle are equal.
5401 // <rectangle>: a #GdkRectangle
5402 int rect_equal(Rectangle* rectangle) {
5403 return gdk_region_rect_equal(&this, rectangle);
5406 // Tests whether a rectangle is within a region.
5407 // %GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
5408 // outside, or partly inside the #GdkRegion, respectively.
5409 // RETURNS: %GDK_OVERLAP_RECTANGLE_IN, %GDK_OVERLAP_RECTANGLE_OUT, or
5410 // <rectangle>: a #GdkRectangle.
5411 OverlapType rect_in(Rectangle* rectangle) {
5412 return gdk_region_rect_in(&this, rectangle);
5415 // Resizes a region by the specified amount.
5416 // Positive values shrink the region. Negative values expand it.
5417 // <dx>: the number of pixels to shrink the region horizontally
5418 // <dy>: the number of pixels to shrink the region vertically
5419 void shrink(int dx, int dy) {
5420 gdk_region_shrink(&this, dx, dy);
5423 // Unintrospectable method: spans_intersect_foreach() / gdk_region_spans_intersect_foreach()
5424 // Calls a function on each span in the intersection of @region and @spans.
5425 // <spans>: an array of #GdkSpans
5426 // <n_spans>: the length of @spans
5427 // <sorted>: %TRUE if @spans is sorted wrt. the y coordinate
5428 // <function>: function to call on each span in the intersection
5429 // <data>: data to pass to @function
5430 void spans_intersect_foreach(Span* spans, int n_spans, int sorted, SpanFunc function_, void* data) {
5431 gdk_region_spans_intersect_foreach(&this, spans, n_spans, sorted, function_, data);
5434 // Subtracts the area of @source2 from the area @source1. The resulting
5435 // area is the set of pixels contained in @source1 but not in @source2.
5436 // <source2>: another #GdkRegion
5437 void subtract(Region* source2) {
5438 gdk_region_subtract(&this, source2);
5441 // Sets the area of @source1 to the union of the areas of @source1 and
5442 // either @source1 or @source2.
5443 // <source2>: a #GdkRegion
5444 void union_(Region* source2) {
5445 gdk_region_union(&this, source2);
5448 // Sets the area of @region to the union of the areas of @region and
5449 // either @region or @rect.
5450 // <rect>: a #GdkRectangle.
5451 void union_with_rect(Rectangle* rect) {
5452 gdk_region_union_with_rect(&this, rect);
5455 // Sets the area of @source1 to the exclusive-OR of the areas of @source1
5456 // and @source2. The resulting area is the set of pixels contained in one
5457 // or the other of the two sources but not in both.
5458 // <source2>: another #GdkRegion
5459 void xor(Region* source2) {
5460 gdk_region_xor(&this, source2);
5464 struct RgbCmap {
5465 uint[256] colors;
5466 int n_colors;
5467 private GLib2.SList* info_list;
5469 void free() {
5470 gdk_rgb_cmap_free(&this);
5474 enum RgbDither {
5475 NONE = 0,
5476 NORMAL = 1,
5477 MAX = 2
5479 struct Screen /* : GObject.Object */ {
5480 alias parent_instance this;
5481 alias parent_instance super_;
5482 alias parent_instance object;
5483 GObject2.Object parent_instance;
5484 static import std.bitmanip; mixin(std.bitmanip.bitfields!(
5485 uint, "closed", 1,
5486 uint, "__dummy32A", 31));
5487 GC*[32] normal_gcs, exposure_gcs, subwindow_gcs;
5488 cairo.FontOptions* font_options;
5489 double resolution;
5492 // Gets the default screen for the default display. (See
5493 // gdk_display_get_default ()).
5494 // RETURNS: a #GdkScreen, or %NULL if there is no default display.
5495 static Screen* get_default() {
5496 return gdk_screen_get_default();
5499 // Returns the height of the default screen in pixels.
5500 // RETURNS: the height of the default screen in pixels.
5501 static int height() {
5502 return gdk_screen_height();
5505 // Returns the height of the default screen in millimeters.
5506 // Note that on many X servers this value will not be correct.
5507 // though it is not always correct.
5508 // RETURNS: the height of the default screen in millimeters,
5509 static int height_mm() {
5510 return gdk_screen_height_mm();
5513 // Returns the width of the default screen in pixels.
5514 // RETURNS: the width of the default screen in pixels.
5515 static int width() {
5516 return gdk_screen_width();
5519 // Returns the width of the default screen in millimeters.
5520 // Note that on many X servers this value will not be correct.
5521 // though it is not always correct.
5522 // RETURNS: the width of the default screen in millimeters,
5523 static int width_mm() {
5524 return gdk_screen_width_mm();
5526 void broadcast_client_message(Event* event) {
5527 gdk_screen_broadcast_client_message(&this, event);
5530 // Unintrospectable method: get_active_window() / gdk_screen_get_active_window()
5531 // Returns the screen's currently active window.
5532 // On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
5533 // on the root window, as described in the <ulink
5534 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
5535 // Manager Hints</ulink>. If there is no currently currently active
5536 // window, or the window manager does not support the
5537 // _NET_ACTIVE_WINDOW hint, this function returns %NULL.
5538 // On other platforms, this function may return %NULL, depending on whether
5539 // it is implementable on that platform.
5540 // The returned window should be unrefed using g_object_unref() when
5541 // no longer needed.
5542 // RETURNS: the currently active window, or %NULL.
5543 Window* get_active_window() {
5544 return gdk_screen_get_active_window(&this);
5547 // Gets the default colormap for @screen.
5548 // RETURNS: the default #GdkColormap.
5549 Colormap* get_default_colormap() {
5550 return gdk_screen_get_default_colormap(&this);
5553 // Unintrospectable method: get_display() / gdk_screen_get_display()
5554 // Gets the display to which the @screen belongs.
5555 // RETURNS: the display to which @screen belongs
5556 Display* get_display() {
5557 return gdk_screen_get_display(&this);
5560 // Gets any options previously set with gdk_screen_set_font_options().
5561 // font options have been set.
5562 // RETURNS: the current font options, or %NULL if no default
5563 cairo.FontOptions* get_font_options() {
5564 return gdk_screen_get_font_options(&this);
5567 // Gets the height of @screen in pixels
5568 // RETURNS: the height of @screen in pixels.
5569 int get_height() {
5570 return gdk_screen_get_height(&this);
5573 // Returns the height of @screen in millimeters.
5574 // Note that on some X servers this value will not be correct.
5575 // RETURNS: the heigth of @screen in millimeters.
5576 int get_height_mm() {
5577 return gdk_screen_get_height_mm(&this);
5580 // Returns the monitor number in which the point (@x,@y) is located.
5581 // a monitor close to (@x,@y) if the point is not in any monitor.
5582 // RETURNS: the monitor number in which the point (@x,@y) lies, or
5583 // <x>: the x coordinate in the virtual screen.
5584 // <y>: the y coordinate in the virtual screen.
5585 int get_monitor_at_point(int x, int y) {
5586 return gdk_screen_get_monitor_at_point(&this, x, y);
5589 // Returns the number of the monitor in which the largest area of the
5590 // bounding rectangle of @window resides.
5591 // RETURNS: the monitor number in which most of @window is located, or if @window does not intersect any monitors, a monitor, close to @window.
5592 // <window>: a #GdkWindow
5593 int get_monitor_at_window(Window* window) {
5594 return gdk_screen_get_monitor_at_window(&this, window);
5597 // Retrieves the #GdkRectangle representing the size and position of
5598 // the individual monitor within the entire screen area.
5599 // Note that the size of the entire screen area can be retrieved via
5600 // gdk_screen_get_width() and gdk_screen_get_height().
5601 // <monitor_num>: the monitor number, between 0 and gdk_screen_get_n_monitors (screen)
5602 // <dest>: a #GdkRectangle to be filled with the monitor geometry
5603 void get_monitor_geometry(int monitor_num, Rectangle* dest) {
5604 gdk_screen_get_monitor_geometry(&this, monitor_num, dest);
5607 // Gets the height in millimeters of the specified monitor.
5608 // RETURNS: the height of the monitor, or -1 if not available
5609 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5610 int get_monitor_height_mm(int monitor_num) {
5611 return gdk_screen_get_monitor_height_mm(&this, monitor_num);
5614 // Returns the output name of the specified monitor.
5615 // Usually something like VGA, DVI, or TV, not the actual
5616 // product name of the display device.
5617 // or %NULL if the name cannot be determined
5618 // RETURNS: a newly-allocated string containing the name of the monitor,
5619 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5620 char* /*new*/ get_monitor_plug_name(int monitor_num) {
5621 return gdk_screen_get_monitor_plug_name(&this, monitor_num);
5624 // Gets the width in millimeters of the specified monitor, if available.
5625 // RETURNS: the width of the monitor, or -1 if not available
5626 // <monitor_num>: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)
5627 int get_monitor_width_mm(int monitor_num) {
5628 return gdk_screen_get_monitor_width_mm(&this, monitor_num);
5631 // Returns the number of monitors which @screen consists of.
5632 // RETURNS: number of monitors which @screen consists of
5633 int get_n_monitors() {
5634 return gdk_screen_get_n_monitors(&this);
5637 // Gets the index of @screen among the screens in the display
5638 // to which it belongs. (See gdk_screen_get_display())
5639 // RETURNS: the index
5640 int get_number() {
5641 return gdk_screen_get_number(&this);
5644 // Gets the primary monitor for @screen. The primary monitor
5645 // is considered the monitor where the 'main desktop' lives.
5646 // While normal application windows typically allow the window
5647 // manager to place the windows, specialized desktop applications
5648 // such as panels should place themselves on the primary monitor.
5649 // If no primary monitor is configured by the user, the return value
5650 // will be 0, defaulting to the first monitor.
5651 // RETURNS: An integer index for the primary monitor, or 0 if none is configured.
5652 int get_primary_monitor() {
5653 return gdk_screen_get_primary_monitor(&this);
5656 // Gets the resolution for font handling on the screen; see
5657 // gdk_screen_set_resolution() for full details.
5658 // has been set.
5659 // RETURNS: the current resolution, or -1 if no resolution
5660 double get_resolution() {
5661 return gdk_screen_get_resolution(&this);
5664 // Gets the preferred colormap for rendering image data on @screen.
5665 // Not a very useful function; historically, GDK could only render RGB
5666 // image data to one colormap and visual, but in the current version
5667 // it can render to any colormap and visual. So there's no need to
5668 // call this function.
5669 // RETURNS: the preferred colormap
5670 Colormap* get_rgb_colormap() {
5671 return gdk_screen_get_rgb_colormap(&this);
5674 // Gets a "preferred visual" chosen by GdkRGB for rendering image data
5675 // on @screen. In previous versions of
5676 // GDK, this was the only visual GdkRGB could use for rendering. In
5677 // current versions, it's simply the visual GdkRGB would have chosen as
5678 // the optimal one in those previous versions. GdkRGB can now render to
5679 // drawables with any visual.
5680 // RETURNS: The #GdkVisual chosen by GdkRGB.
5681 Visual* get_rgb_visual() {
5682 return gdk_screen_get_rgb_visual(&this);
5685 // Gets a colormap to use for creating windows or pixmaps with an
5686 // alpha channel. The windowing system on which GTK+ is running
5687 // may not support this capability, in which case %NULL will
5688 // be returned. Even if a non-%NULL value is returned, its
5689 // possible that the window's alpha channel won't be honored
5690 // X an appropriate windowing manager and compositing manager
5691 // must be running to provide appropriate display.
5692 // This functionality is not implemented in the Windows backend.
5693 // For setting an overall opacity for a top-level window, see
5694 // gdk_window_set_opacity().
5695 // an alpha channel or %NULL if the capability is not available.
5696 // RETURNS: a colormap to use for windows with
5697 Colormap* get_rgba_colormap() {
5698 return gdk_screen_get_rgba_colormap(&this);
5701 // Gets a visual to use for creating windows or pixmaps with an
5702 // alpha channel. See the docs for gdk_screen_get_rgba_colormap()
5703 // for caveats.
5704 // alpha channel or %NULL if the capability is not available.
5705 // RETURNS: a visual to use for windows with an
5706 Visual* get_rgba_visual() {
5707 return gdk_screen_get_rgba_visual(&this);
5710 // Gets the root window of @screen.
5711 // RETURNS: the root window
5712 Window* get_root_window() {
5713 return gdk_screen_get_root_window(&this);
5715 int get_setting(char* name, GObject2.Value* value) {
5716 return gdk_screen_get_setting(&this, name, value);
5719 // Gets the system's default colormap for @screen
5720 // RETURNS: the default colormap for @screen.
5721 Colormap* get_system_colormap() {
5722 return gdk_screen_get_system_colormap(&this);
5725 // Get the system's default visual for @screen.
5726 // This is the visual for the root window of the display.
5727 // The return value should not be freed.
5728 // RETURNS: the system visual
5729 Visual* get_system_visual() {
5730 return gdk_screen_get_system_visual(&this);
5733 // Obtains a list of all toplevel windows known to GDK on the screen @screen.
5734 // A toplevel window is a child of the root window (see
5735 // gdk_get_default_root_window()).
5736 // The returned list should be freed with g_list_free(), but
5737 // its elements need not be freed.
5738 // list of toplevel windows, free with g_list_free()
5739 GLib2.List* /*new container*/ get_toplevel_windows() {
5740 return gdk_screen_get_toplevel_windows(&this);
5743 // Gets the width of @screen in pixels
5744 // RETURNS: the width of @screen in pixels.
5745 int get_width() {
5746 return gdk_screen_get_width(&this);
5749 // Gets the width of @screen in millimeters.
5750 // Note that on some X servers this value will not be correct.
5751 // RETURNS: the width of @screen in millimeters.
5752 int get_width_mm() {
5753 return gdk_screen_get_width_mm(&this);
5756 // Returns a #GList of #GdkWindow<!-- -->s representing the current
5757 // window stack.
5758 // On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
5759 // property on the root window, as described in the <ulink
5760 // url="http://www.freedesktop.org/Standards/wm-spec">Extended Window
5761 // Manager Hints</ulink>. If the window manager does not support the
5762 // _NET_CLIENT_LIST_STACKING hint, this function returns %NULL.
5763 // On other platforms, this function may return %NULL, depending on whether
5764 // it is implementable on that platform.
5765 // The returned list is newly allocated and owns references to the
5766 // windows it contains, so it should be freed using g_list_free() and
5767 // its windows unrefed using g_object_unref() when no longer needed.
5768 // a list of #GdkWindow<!-- -->s for the current window stack,
5769 // or %NULL.
5770 GLib2.List* /*new*/ get_window_stack() {
5771 return gdk_screen_get_window_stack(&this);
5774 // Returns whether windows with an RGBA visual can reasonably
5775 // be expected to have their alpha channel drawn correctly on
5776 // the screen.
5777 // On X11 this function returns whether a compositing manager is
5778 // compositing @screen.
5779 // expected to have their alpha channels drawn correctly on the screen.
5780 // RETURNS: Whether windows with RGBA visuals can reasonably be
5781 int is_composited() {
5782 return gdk_screen_is_composited(&this);
5785 // Lists the available visuals for the specified @screen.
5786 // A visual describes a hardware image data format.
5787 // For example, a visual might support 24-bit color, or 8-bit color,
5788 // and might expect pixels to be in a certain format.
5789 // Call g_list_free() on the return value when you're finished with it.
5790 // a list of visuals; the list must be freed, but not its contents
5791 GLib2.List* /*new container*/ list_visuals() {
5792 return gdk_screen_list_visuals(&this);
5795 // Determines the name to pass to gdk_display_open() to get
5796 // a #GdkDisplay with this screen as the default screen.
5797 // RETURNS: a newly allocated string, free with g_free()
5798 char* /*new*/ make_display_name() {
5799 return gdk_screen_make_display_name(&this);
5802 // Sets the default @colormap for @screen.
5803 // <colormap>: a #GdkColormap
5804 void set_default_colormap(Colormap* colormap) {
5805 gdk_screen_set_default_colormap(&this, colormap);
5808 // Sets the default font options for the screen. These
5809 // options will be set on any #PangoContext's newly created
5810 // with gdk_pango_context_get_for_screen(). Changing the
5811 // default set of font options does not affect contexts that
5812 // have already been created.
5813 // <options>: a #cairo_font_options_t, or %NULL to unset any previously set default font options.
5814 void set_font_options(cairo.FontOptions* options=null) {
5815 gdk_screen_set_font_options(&this, options);
5818 // Sets the resolution for font handling on the screen. This is a
5819 // scale factor between points specified in a #PangoFontDescription
5820 // and cairo units. The default value is 96, meaning that a 10 point
5821 // font will be 13 units high. (10 * 96. / 72. = 13.3).
5822 // <dpi>: the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.)
5823 void set_resolution(double dpi) {
5824 gdk_screen_set_resolution(&this, dpi);
5827 // The ::composited-changed signal is emitted when the composited
5828 // status of the screen changes
5829 extern (C) alias static void function (Screen* this_, void* user_data=null) signal_composited_changed;
5831 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5832 return super_.signal_connect!name(cb, data, cf);
5835 ulong signal_connect(string name:"composited-changed", CB/*:signal_composited_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5836 return signal_connect_data(&this, cast(char*)"composited-changed",
5837 cast(GObject2.Callback)cb, data, null, cf);
5840 // The ::monitors-changed signal is emitted when the number, size
5841 // or position of the monitors attached to the screen change.
5842 // Only for X11 and OS X for now. A future implementation for Win32
5843 // may be a possibility.
5844 extern (C) alias static void function (Screen* this_, void* user_data=null) signal_monitors_changed;
5845 ulong signal_connect(string name:"monitors-changed", CB/*:signal_monitors_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5846 return signal_connect_data(&this, cast(char*)"monitors-changed",
5847 cast(GObject2.Callback)cb, data, null, cf);
5850 // The ::size-changed signal is emitted when the pixel width or
5851 // height of a screen changes.
5852 extern (C) alias static void function (Screen* this_, void* user_data=null) signal_size_changed;
5853 ulong signal_connect(string name:"size-changed", CB/*:signal_size_changed*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
5854 return signal_connect_data(&this, cast(char*)"size-changed",
5855 cast(GObject2.Callback)cb, data, null, cf);
5859 struct ScreenClass {
5860 GObject2.ObjectClass parent_class;
5861 extern (C) void function (Screen* screen) size_changed;
5862 extern (C) void function (Screen* screen) composited_changed;
5863 extern (C) void function (Screen* screen) monitors_changed;
5866 enum ScrollDirection {
5867 UP = 0,
5868 DOWN = 1,
5869 LEFT = 2,
5870 RIGHT = 3
5872 struct Segment {
5873 int x1, y1, x2, y2;
5876 enum SettingAction {
5877 NEW = 0,
5878 CHANGED = 1,
5879 DELETED = 2
5881 struct Span {
5882 int x, y, width;
5885 extern (C) alias void function (Span* span, void* data) SpanFunc;
5887 enum Status {
5888 OK = 0,
5889 ERROR = -1,
5890 ERROR_PARAM = -2,
5891 ERROR_FILE = -3,
5892 ERROR_MEM = -4
5894 enum SubwindowMode {
5895 CLIP_BY_CHILDREN = 0,
5896 INCLUDE_INFERIORS = 1
5898 struct TimeCoord {
5899 uint time;
5900 double[128] axes;
5903 struct Trapezoid {
5904 double y1, x11, x21, y2, x12, x22;
5907 enum VisibilityState {
5908 UNOBSCURED = 0,
5909 PARTIAL = 1,
5910 FULLY_OBSCURED = 2
5912 struct Visual /* : GObject.Object */ {
5913 alias parent_instance this;
5914 alias parent_instance super_;
5915 alias parent_instance object;
5916 GObject2.Object parent_instance;
5917 VisualType type;
5918 int depth;
5919 ByteOrder byte_order;
5920 int colormap_size, bits_per_rgb;
5921 uint red_mask;
5922 int red_shift, red_prec;
5923 uint green_mask;
5924 int green_shift, green_prec;
5925 uint blue_mask;
5926 int blue_shift, blue_prec;
5929 // Get the visual with the most available colors for the default
5930 // GDK screen. The return value should not be freed.
5931 // RETURNS: best visual
5932 static Visual* get_best() {
5933 return gdk_visual_get_best();
5936 // Get the best available depth for the default GDK screen. "Best"
5937 // means "largest," i.e. 32 preferred over 24 preferred over 8 bits
5938 // per pixel.
5939 // RETURNS: best available depth
5940 static int get_best_depth() {
5941 return gdk_visual_get_best_depth();
5944 // Return the best available visual type for the default GDK screen.
5945 // RETURNS: best visual type
5946 static VisualType get_best_type() {
5947 return gdk_visual_get_best_type();
5950 // Combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type().
5951 // RETURNS: best visual with both @depth and
5952 // <depth>: a bit depth
5953 // <visual_type>: a visual type
5954 static Visual* get_best_with_both(int depth, VisualType visual_type) {
5955 return gdk_visual_get_best_with_both(depth, visual_type);
5958 // Get the best visual with depth @depth for the default GDK screen.
5959 // Color visuals and visuals with mutable colormaps are preferred
5960 // over grayscale or fixed-colormap visuals. The return value should not
5961 // be freed. %NULL may be returned if no visual supports @depth.
5962 // RETURNS: best visual for the given depth
5963 // <depth>: a bit depth
5964 static Visual* get_best_with_depth(int depth) {
5965 return gdk_visual_get_best_with_depth(depth);
5968 // Get the best visual of the given @visual_type for the default GDK screen.
5969 // Visuals with higher color depths are considered better. The return value
5970 // should not be freed. %NULL may be returned if no visual has type
5971 // RETURNS: best visual of the given type
5972 // <visual_type>: a visual type
5973 static Visual* get_best_with_type(VisualType visual_type) {
5974 return gdk_visual_get_best_with_type(visual_type);
5977 // Get the system's default visual for the default GDK screen.
5978 // This is the visual for the root window of the display.
5979 // The return value should not be freed.
5980 // RETURNS: system visual
5981 static Visual* get_system() {
5982 return gdk_visual_get_system();
5985 // Returns the number of significant bits per red, green and blue value.
5986 // RETURNS: The number of significant bits per color value for @visual.
5987 int get_bits_per_rgb() {
5988 return gdk_visual_get_bits_per_rgb(&this);
5991 // Obtains values that are needed to calculate blue pixel values in TrueColor
5992 // and DirectColor. The "mask" is the significant bits within the pixel.
5993 // The "shift" is the number of bits left we must shift a primary for it
5994 // to be in position (according to the "mask"). Finally, "precision" refers
5995 // to how much precision the pixel value contains for a particular primary.
5996 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
5997 // <shift>: A pointer to a #gint to be filled in, or %NULL.
5998 // <precision>: A pointer to a #gint to be filled in, or %NULL.
5999 void get_blue_pixel_details(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) {
6000 gdk_visual_get_blue_pixel_details(&this, mask, shift, precision);
6003 // Returns the byte order of this visual.
6004 // RETURNS: A #GdkByteOrder stating the byte order of @visual.
6005 ByteOrder get_byte_order() {
6006 return gdk_visual_get_byte_order(&this);
6009 // Returns the size of a colormap for this visual.
6010 // RETURNS: The size of a colormap that is suitable for @visual.
6011 int get_colormap_size() {
6012 return gdk_visual_get_colormap_size(&this);
6015 // Returns the bit depth of this visual.
6016 // RETURNS: The bit depth of this visual.
6017 int get_depth() {
6018 return gdk_visual_get_depth(&this);
6021 // Obtains values that are needed to calculate green pixel values in TrueColor
6022 // and DirectColor. The "mask" is the significant bits within the pixel.
6023 // The "shift" is the number of bits left we must shift a primary for it
6024 // to be in position (according to the "mask"). Finally, "precision" refers
6025 // to how much precision the pixel value contains for a particular primary.
6026 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6027 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6028 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6029 void get_green_pixel_details(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) {
6030 gdk_visual_get_green_pixel_details(&this, mask, shift, precision);
6033 // Obtains values that are needed to calculate red pixel values in TrueColor
6034 // and DirectColor. The "mask" is the significant bits within the pixel.
6035 // The "shift" is the number of bits left we must shift a primary for it
6036 // to be in position (according to the "mask"). Finally, "precision" refers
6037 // to how much precision the pixel value contains for a particular primary.
6038 // <mask>: A pointer to a #guint32 to be filled in, or %NULL.
6039 // <shift>: A pointer to a #gint to be filled in, or %NULL.
6040 // <precision>: A pointer to a #gint to be filled in, or %NULL.
6041 void get_red_pixel_details(/*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null) {
6042 gdk_visual_get_red_pixel_details(&this, mask, shift, precision);
6045 // Gets the screen to which this visual belongs
6046 // RETURNS: the screen to which this visual belongs.
6047 Screen* get_screen() {
6048 return gdk_visual_get_screen(&this);
6051 // Returns the type of visual this is (PseudoColor, TrueColor, etc).
6052 // RETURNS: A #GdkVisualType stating the type of @visual.
6053 VisualType get_visual_type() {
6054 return gdk_visual_get_visual_type(&this);
6058 struct VisualClass {
6061 enum VisualType {
6062 STATIC_GRAY = 0,
6063 GRAYSCALE = 1,
6064 STATIC_COLOR = 2,
6065 PSEUDO_COLOR = 3,
6066 TRUE_COLOR = 4,
6067 DIRECT_COLOR = 5
6069 enum WMDecoration {
6070 ALL = 1,
6071 BORDER = 2,
6072 RESIZEH = 4,
6073 TITLE = 8,
6074 MENU = 16,
6075 MINIMIZE = 32,
6076 MAXIMIZE = 64
6078 enum WMFunction {
6079 ALL = 1,
6080 RESIZE = 2,
6081 MOVE = 4,
6082 MINIMIZE = 8,
6083 MAXIMIZE = 16,
6084 CLOSE = 32
6086 struct Window /* : Drawable */ {
6087 alias method_parent this;
6088 alias method_parent super_;
6089 alias method_parent drawable;
6090 Drawable method_parent;
6093 // Unintrospectable method: add_filter() / gdk_window_add_filter()
6094 // Adds an event filter to @window, allowing you to intercept events
6095 // before they reach GDK. This is a low-level operation and makes it
6096 // easy to break GDK and/or GTK+, so you have to know what you're
6097 // doing. Pass %NULL for @window to get all events for all windows,
6098 // instead of events for a specific window.
6099 // See gdk_display_add_client_message_filter() if you are interested
6100 // in X ClientMessage events.
6101 // <function>: filter callback
6102 // <data>: data to pass to filter callback
6103 void add_filter(FilterFunc function_, void* data) {
6104 gdk_window_add_filter(&this, function_, data);
6107 // Emits a short beep associated to @window in the appropriate
6108 // display, if supported. Otherwise, emits a short beep on
6109 // the display just as gdk_display_beep().
6110 void beep() {
6111 gdk_window_beep(&this);
6114 // Begins a window move operation (for a toplevel window). You might
6115 // use this function to implement a "window move grip," for
6116 // example. The function works best with window managers that support
6117 // the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
6118 // Window Manager Hints</ulink>, but has a fallback implementation for
6119 // other window managers.
6120 // <button>: the button being used to drag
6121 // <root_x>: root window X coordinate of mouse click that began the drag
6122 // <root_y>: root window Y coordinate of mouse click that began the drag
6123 // <timestamp>: timestamp of mouse click that began the drag
6124 void begin_move_drag(int button, int root_x, int root_y, uint timestamp) {
6125 gdk_window_begin_move_drag(&this, button, root_x, root_y, timestamp);
6128 // A convenience wrapper around gdk_window_begin_paint_region() which
6129 // creates a rectangular region for you. See
6130 // gdk_window_begin_paint_region() for details.
6131 // <rectangle>: rectangle you intend to draw to
6132 void begin_paint_rect(Rectangle* rectangle) {
6133 gdk_window_begin_paint_rect(&this, rectangle);
6136 // Indicates that you are beginning the process of redrawing @region.
6137 // A backing store (offscreen buffer) large enough to contain @region
6138 // will be created. The backing store will be initialized with the
6139 // background color or background pixmap for @window. Then, all
6140 // drawing operations performed on @window will be diverted to the
6141 // backing store. When you call gdk_window_end_paint(), the backing
6142 // store will be copied to @window, making it visible onscreen. Only
6143 // the part of @window contained in @region will be modified; that is,
6144 // drawing operations are clipped to @region.
6145 // The net result of all this is to remove flicker, because the user
6146 // sees the finished product appear all at once when you call
6147 // gdk_window_end_paint(). If you draw to @window directly without
6148 // calling gdk_window_begin_paint_region(), the user may see flicker
6149 // as individual drawing operations are performed in sequence. The
6150 // clipping and background-initializing features of
6151 // gdk_window_begin_paint_region() are conveniences for the
6152 // programmer, so you can avoid doing that work yourself.
6153 // When using GTK+, the widget system automatically places calls to
6154 // gdk_window_begin_paint_region() and gdk_window_end_paint() around
6155 // emissions of the expose_event signal. That is, if you're writing an
6156 // expose event handler, you can assume that the exposed area in
6157 // #GdkEventExpose has already been cleared to the window background,
6158 // is already set as the clip region, and already has a backing store.
6159 // Therefore in most cases, application code need not call
6160 // gdk_window_begin_paint_region(). (You can disable the automatic
6161 // calls around expose events on a widget-by-widget basis by calling
6162 // gtk_widget_set_double_buffered().)
6163 // If you call this function multiple times before calling the
6164 // matching gdk_window_end_paint(), the backing stores are pushed onto
6165 // a stack. gdk_window_end_paint() copies the topmost backing store
6166 // onscreen, subtracts the topmost region from all other regions in
6167 // the stack, and pops the stack. All drawing operations affect only
6168 // the topmost backing store in the stack. One matching call to
6169 // gdk_window_end_paint() is required for each call to
6170 // gdk_window_begin_paint_region().
6171 // <region>: region you intend to draw to
6172 void begin_paint_region(Region* region) {
6173 gdk_window_begin_paint_region(&this, region);
6176 // Begins a window resize operation (for a toplevel window).
6177 // You might use this function to implement a "window resize grip," for
6178 // example; in fact #GtkStatusbar uses it. The function works best
6179 // with window managers that support the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended Window Manager Hints</ulink>, but has a
6180 // fallback implementation for other window managers.
6181 // <edge>: the edge or corner from which the drag is started
6182 // <button>: the button being used to drag
6183 // <root_x>: root window X coordinate of mouse click that began the drag
6184 // <root_y>: root window Y coordinate of mouse click that began the drag
6185 // <timestamp>: timestamp of mouse click that began the drag (use gdk_event_get_time())
6186 void begin_resize_drag(WindowEdge edge, int button, int root_x, int root_y, uint timestamp) {
6187 gdk_window_begin_resize_drag(&this, edge, button, root_x, root_y, timestamp);
6189 // Clears an entire @window to the background color or background pixmap.
6190 void clear() {
6191 gdk_window_clear(&this);
6194 // Clears an area of @window to the background color or background pixmap.
6195 // <x>: x coordinate of rectangle to clear
6196 // <y>: y coordinate of rectangle to clear
6197 // <width>: width of rectangle to clear
6198 // <height>: height of rectangle to clear
6199 void clear_area(int x, int y, int width, int height) {
6200 gdk_window_clear_area(&this, x, y, width, height);
6203 // Like gdk_window_clear_area(), but also generates an expose event for
6204 // the cleared area.
6205 // This function has a stupid name because it dates back to the mists
6206 // time, pre-GDK-1.0.
6207 // <x>: x coordinate of rectangle to clear
6208 // <y>: y coordinate of rectangle to clear
6209 // <width>: width of rectangle to clear
6210 // <height>: height of rectangle to clear
6211 void clear_area_e(int x, int y, int width, int height) {
6212 gdk_window_clear_area_e(&this, x, y, width, height);
6215 // Signal to the window system that the application has finished
6216 // handling Configure events it has received. Window Managers can
6217 // use this to better synchronize the frame repaint with the
6218 // application. GTK+ applications will automatically call this
6219 // function when appropriate.
6220 // This function can only be called if gdk_window_enable_synchronized_configure()
6221 // was called previously.
6222 void configure_finished() {
6223 gdk_window_configure_finished(&this);
6226 // Transforms window coordinates from a parent window to a child
6227 // window, where the parent window is the normal parent as returned by
6228 // gdk_window_get_parent() for normal windows, and the window's
6229 // embedder as returned by gdk_offscreen_window_get_embedder() for
6230 // offscreen windows.
6231 // For normal windows, calling this function is equivalent to subtracting
6232 // the return values of gdk_window_get_position() from the parent coordinates.
6233 // For offscreen windows however (which can be arbitrarily transformed),
6234 // the coordinates.
6235 // You should always use this function when writing generic code that
6236 // walks down a window hierarchy.
6237 // <parent_x>: X coordinate in parent's coordinate system
6238 // <parent_y>: Y coordinate in parent's coordinate system
6239 // <x>: return location for X coordinate in child's coordinate system
6240 // <y>: return location for Y coordinate in child's coordinate system
6241 void coords_from_parent(double parent_x, double parent_y, /*out*/ double* x=null, /*out*/ double* y=null) {
6242 gdk_window_coords_from_parent(&this, parent_x, parent_y, x, y);
6245 // Transforms window coordinates from a child window to its parent
6246 // window, where the parent window is the normal parent as returned by
6247 // gdk_window_get_parent() for normal windows, and the window's
6248 // embedder as returned by gdk_offscreen_window_get_embedder() for
6249 // offscreen windows.
6250 // For normal windows, calling this function is equivalent to adding
6251 // the return values of gdk_window_get_position() to the child coordinates.
6252 // For offscreen windows however (which can be arbitrarily transformed),
6253 // the coordinates.
6254 // You should always use this function when writing generic code that
6255 // walks up a window hierarchy.
6256 // <x>: X coordinate in child's coordinate system
6257 // <y>: Y coordinate in child's coordinate system
6258 // <parent_x>: return location for X coordinate in parent's coordinate system, or %NULL
6259 // <parent_y>: return location for Y coordinate in parent's coordinate system, or %NULL
6260 void coords_to_parent(double x, double y, /*out*/ double* parent_x=null, /*out*/ double* parent_y=null) {
6261 gdk_window_coords_to_parent(&this, x, y, parent_x, parent_y);
6264 // Create a new surface that is as compatible as possible with the
6265 // given @window. For example the new surface will have the same
6266 // fallback resolution and font options as @window. Generally, the new
6267 // surface will also use the same backend as @window, unless that is
6268 // not possible for some reason. The type of the returned surface may
6269 // be examined with cairo_surface_get_type().
6270 // Initially the surface contents are all 0 (transparent if contents
6271 // have transparency, black otherwise.)
6272 // owns the surface and should call cairo_surface_destroy() when done
6273 // with it.
6274 // This function always returns a valid pointer, but it will return a
6275 // pointer to a "nil" surface if @other is already in an error state
6276 // or any other error occurs.
6277 // RETURNS: a pointer to the newly allocated surface. The caller
6278 // <content>: the content for the new surface
6279 // <width>: width of the new surface
6280 // <height>: height of the new surface
6281 cairo.Surface* /*new*/ create_similar_surface(cairo.Content content, int width, int height) {
6282 return gdk_window_create_similar_surface(&this, content, width, height);
6285 // Attempt to deiconify (unminimize) @window. On X11 the window manager may
6286 // choose to ignore the request to deiconify. When using GTK+,
6287 // use gtk_window_deiconify() instead of the #GdkWindow variant. Or better yet,
6288 // you probably want to use gtk_window_present(), which raises the window, focuses it,
6289 // unminimizes it, and puts it on the current desktop.
6290 void deiconify() {
6291 gdk_window_deiconify(&this);
6294 // Destroys the window system resources associated with @window and decrements @window's
6295 // reference count. The window system resources for all children of @window are also
6296 // destroyed, but the children's reference counts are not decremented.
6297 // Note that a window will not be destroyed automatically when its reference count
6298 // reaches zero. You must call this function yourself before that happens.
6299 void destroy() {
6300 gdk_window_destroy(&this);
6302 void destroy_notify() {
6303 gdk_window_destroy_notify(&this);
6306 // Indicates that the application will cooperate with the window
6307 // system in synchronizing the window repaint with the window
6308 // manager during resizing operations. After an application calls
6309 // this function, it must call gdk_window_configure_finished() every
6310 // time it has finished all processing associated with a set of
6311 // Configure events. Toplevel GTK+ windows automatically use this
6312 // protocol.
6313 // On X, calling this function makes @window participate in the
6314 // _NET_WM_SYNC_REQUEST window manager protocol.
6315 void enable_synchronized_configure() {
6316 gdk_window_enable_synchronized_configure(&this);
6319 // Indicates that the backing store created by the most recent call to
6320 // gdk_window_begin_paint_region() should be copied onscreen and
6321 // deleted, leaving the next-most-recent backing store or no backing
6322 // store at all as the active paint region. See
6323 // gdk_window_begin_paint_region() for full details. It is an error to
6324 // call this function without a matching
6325 // gdk_window_begin_paint_region() first.
6326 void end_paint() {
6327 gdk_window_end_paint(&this);
6330 // Tries to ensure that there is a window-system native window for this
6331 // GdkWindow. This may fail in some situations, returning %FALSE.
6332 // Offscreen window and children of them can never have native windows.
6333 // Some backends may not support native child windows.
6334 // RETURNS: %TRUE if the window has a native window, %FALSE otherwise
6335 int ensure_native() {
6336 return gdk_window_ensure_native(&this);
6339 // Flush all outstanding cached operations on a window, leaving the
6340 // window in a state which reflects all that has been drawn before.
6341 // Gdk uses multiple kinds of caching to get better performance and
6342 // nicer drawing. For instance, during exposes all paints to a window
6343 // using double buffered rendering are keep on a pixmap until the last
6344 // window has been exposed. It also delays window moves/scrolls until
6345 // as long as possible until next update to avoid tearing when moving
6346 // windows.
6347 // Normally this should be completely invisible to applications, as
6348 // we automatically flush the windows when required, but this might
6349 // be needed if you for instance mix direct native drawing with
6350 // gdk drawing. For Gtk widgets that don't use double buffering this
6351 // will be called automatically before sending the expose event.
6352 void flush() {
6353 gdk_window_flush(&this);
6356 // Sets keyboard focus to @window. In most cases, gtk_window_present()
6357 // should be used on a #GtkWindow, rather than calling this function.
6358 // <timestamp>: timestamp of the event triggering the window focus
6359 void focus(uint timestamp) {
6360 gdk_window_focus(&this, timestamp);
6363 // Temporarily freezes a window and all its descendants such that it won't
6364 // receive expose events. The window will begin receiving expose events
6365 // again when gdk_window_thaw_toplevel_updates_libgtk_only() is called. If
6366 // gdk_window_freeze_toplevel_updates_libgtk_only()
6367 // has been called more than once,
6368 // gdk_window_thaw_toplevel_updates_libgtk_only() must be called
6369 // an equal number of times to begin processing exposes.
6370 // This function is not part of the GDK public API and is only
6371 // for use by GTK+.
6372 void freeze_toplevel_updates_libgtk_only() {
6373 gdk_window_freeze_toplevel_updates_libgtk_only(&this);
6376 // Temporarily freezes a window such that it won't receive expose
6377 // events. The window will begin receiving expose events again when
6378 // gdk_window_thaw_updates() is called. If gdk_window_freeze_updates()
6379 // has been called more than once, gdk_window_thaw_updates() must be called
6380 // an equal number of times to begin processing exposes.
6381 void freeze_updates() {
6382 gdk_window_freeze_updates(&this);
6385 // Moves the window into fullscreen mode. This means the
6386 // window covers the entire screen and is above any panels
6387 // or task bars.
6388 // If the window was already fullscreen, then this function does nothing.
6389 // On X11, asks the window manager to put @window in a fullscreen
6390 // state, if the window manager supports this operation. Not all
6391 // window managers support this, and some deliberately ignore it or
6392 // don't have a concept of "fullscreen"; so you can't rely on the
6393 // fullscreenification actually happening. But it will happen with
6394 // most standard window managers, and GDK makes a best effort to get
6395 // it to happen.
6396 void fullscreen() {
6397 gdk_window_fullscreen(&this);
6400 // This function informs GDK that the geometry of an embedded
6401 // offscreen window has changed. This is necessary for GDK to keep
6402 // track of which offscreen window the pointer is in.
6403 void geometry_changed() {
6404 gdk_window_geometry_changed(&this);
6407 // Determines whether or not the desktop environment shuld be hinted that
6408 // the window does not want to receive input focus.
6409 // RETURNS: whether or not the window should receive input focus.
6410 int get_accept_focus() {
6411 return gdk_window_get_accept_focus(&this);
6414 // Gets the pattern used to clear the background on @window. If @window
6415 // does not have its own background and reuses the parent's, %NULL is
6416 // returned and you'll have to query it yourself.
6417 // %NULL to use the parent's background.
6418 // RETURNS: The pattern to use for the background or
6419 cairo.Pattern* get_background_pattern() {
6420 return gdk_window_get_background_pattern(&this);
6423 // Gets the list of children of @window known to GDK.
6424 // This function only returns children created via GDK,
6425 // so for example it's useless when used with the root window;
6426 // it only returns windows an application created itself.
6427 // The returned list must be freed, but the elements in the
6428 // list need not be.
6429 // list of child windows inside @window
6430 GLib2.List* /*new container*/ get_children() {
6431 return gdk_window_get_children(&this);
6434 // Determines whether @window is composited.
6435 // See gdk_window_set_composited().
6436 // RETURNS: %TRUE if the window is composited.
6437 int get_composited() {
6438 return gdk_window_get_composited(&this);
6441 // Retrieves a #GdkCursor pointer for the cursor currently set on the
6442 // specified #GdkWindow, or %NULL. If the return value is %NULL then
6443 // there is no custom cursor set on the specified window, and it is
6444 // using the cursor for its parent window.
6445 // object is owned by the #GdkWindow and should not be unreferenced
6446 // directly. Use gdk_window_set_cursor() to unset the cursor of the
6447 // window
6448 // RETURNS: a #GdkCursor, or %NULL. The returned
6449 Cursor* get_cursor() {
6450 return gdk_window_get_cursor(&this);
6453 // Returns the decorations set on the GdkWindow with #gdk_window_set_decorations
6454 // RETURNS: TRUE if the window has decorations set, FALSE otherwise.
6455 // <decorations>: The window decorations will be written here
6456 int get_decorations(WMDecoration* decorations) {
6457 return gdk_window_get_decorations(&this, decorations);
6460 // This gets the origin of a #GdkWindow relative to
6461 // an Enlightenment-window-manager desktop. As long as you don't
6462 // assume that the user's desktop/workspace covers the entire
6463 // root window (i.e. you don't assume that the desktop begins
6464 // at root window coordinate 0,0) this function is not necessary.
6465 // It's deprecated for that reason.
6466 // RETURNS: not meaningful
6467 // <x>: return location for X coordinate
6468 // <y>: return location for Y coordinate
6469 int get_deskrelative_origin(int* x, int* y) {
6470 return gdk_window_get_deskrelative_origin(&this, x, y);
6473 // Unintrospectable method: get_display() / gdk_window_get_display()
6474 // Gets the #GdkDisplay associated with a #GdkWindow.
6475 // RETURNS: the #GdkDisplay associated with @window
6476 Display* get_display() {
6477 return gdk_window_get_display(&this);
6480 // Unintrospectable method: get_effective_parent() / gdk_window_get_effective_parent()
6481 // Obtains the parent of @window, as known to GDK. Works like
6482 // gdk_window_get_parent() for normal windows, but returns the
6483 // window's embedder for offscreen windows.
6484 // RETURNS: effective parent of @window
6485 Window* get_effective_parent() {
6486 return gdk_window_get_effective_parent(&this);
6489 // Unintrospectable method: get_effective_toplevel() / gdk_window_get_effective_toplevel()
6490 // Gets the toplevel window that's an ancestor of @window.
6491 // Works like gdk_window_get_toplevel(), but treats an offscreen window's
6492 // embedder as its parent, using gdk_window_get_effective_parent().
6493 // RETURNS: the effective toplevel window containing @window
6494 Window* get_effective_toplevel() {
6495 return gdk_window_get_effective_toplevel(&this);
6498 // Gets the event mask for @window. See gdk_window_set_events().
6499 // RETURNS: event mask for @window
6500 EventMask get_events() {
6501 return gdk_window_get_events(&this);
6504 // Determines whether or not the desktop environment should be hinted that the
6505 // window does not want to receive input focus when it is mapped.
6506 // it is mapped.
6507 // RETURNS: whether or not the window wants to receive input focus when
6508 int get_focus_on_map() {
6509 return gdk_window_get_focus_on_map(&this);
6512 // Obtains the bounding box of the window, including window manager
6513 // titlebar/borders if any. The frame position is given in root window
6514 // coordinates. To get the position of the window itself (rather than
6515 // the frame) in root window coordinates, use gdk_window_get_origin().
6516 // <rect>: rectangle to fill with bounding box of the window frame
6517 void get_frame_extents(Rectangle* rect) {
6518 gdk_window_get_frame_extents(&this, rect);
6521 // Any of the return location arguments to this function may be %NULL,
6522 // if you aren't interested in getting the value of that field.
6523 // The X and Y coordinates returned are relative to the parent window
6524 // of @window, which for toplevels usually means relative to the
6525 // window decorations (titlebar, etc.) rather than relative to the
6526 // root window (screen-size background window).
6527 // On the X11 platform, the geometry is obtained from the X server,
6528 // so reflects the latest position of @window; this may be out-of-sync
6529 // with the position of @window delivered in the most-recently-processed
6530 // #GdkEventConfigure. gdk_window_get_position() in contrast gets the
6531 // position from the most recent configure event.
6532 // <note>
6533 // If @window is not a toplevel, it is <emphasis>much</emphasis> better
6534 // to call gdk_window_get_position() and gdk_drawable_get_size() instead,
6535 // because it avoids the roundtrip to the X server and because
6536 // gdk_drawable_get_size() supports the full 32-bit coordinate space,
6537 // whereas gdk_window_get_geometry() is restricted to the 16-bit
6538 // coordinates of X11.
6539 // </note>
6540 // <x>: return location for X coordinate of window (relative to its parent)
6541 // <y>: return location for Y coordinate of window (relative to its parent)
6542 // <width>: return location for width of window
6543 // <height>: return location for height of window
6544 // <depth>: return location for bit depth of window
6545 void get_geometry(int* x, int* y, int* width, int* height, int* depth) {
6546 gdk_window_get_geometry(&this, x, y, width, height, depth);
6549 // Unintrospectable method: get_group() / gdk_window_get_group()
6550 // Returns the group leader window for @window. See gdk_window_set_group().
6551 // RETURNS: the group leader window for @window
6552 Window* get_group() {
6553 return gdk_window_get_group(&this);
6556 // Returns the height of the given @window.
6557 // On the X11 platform the returned size is the size reported in the
6558 // most-recently-processed configure event, rather than the current
6559 // size on the X server.
6560 // RETURNS: The height of @window
6561 int get_height() {
6562 return gdk_window_get_height(&this);
6565 // If you bypass the GDK layer and use windowing system primitives to
6566 // draw directly onto a #GdkWindow, then you need to deal with two
6567 // system coordinates, and GDK may have redirected drawing to a offscreen
6568 // pixmap as the result of a gdk_window_begin_paint_region() calls.
6569 // This function allows retrieving the information you need to compensate
6570 // for these effects.
6571 // This function exposes details of the GDK implementation, and is thus
6572 // likely to change in future releases of GDK.
6573 // <real_drawable>: location to store the drawable to which drawing should be done.
6574 // <x_offset>: location to store the X offset between coordinates in @window, and the underlying window system primitive coordinates for *@real_drawable.
6575 // <y_offset>: location to store the Y offset between coordinates in @window, and the underlying window system primitive coordinates for *@real_drawable.
6576 void get_internal_paint_info(/*out*/ Drawable** real_drawable, /*out*/ int* x_offset, /*out*/ int* y_offset) {
6577 gdk_window_get_internal_paint_info(&this, real_drawable, x_offset, y_offset);
6580 // Determines whether or not the window manager is hinted that @window
6581 // has modal behaviour.
6582 // RETURNS: whether or not the window has the modal hint set.
6583 int get_modal_hint() {
6584 return gdk_window_get_modal_hint(&this);
6587 // Obtains the position of a window in root window coordinates.
6588 // (Compare with gdk_window_get_position() and
6589 // gdk_window_get_geometry() which return the position of a window
6590 // relative to its parent window.)
6591 // RETURNS: not meaningful, ignore
6592 // <x>: return location for X coordinate
6593 // <y>: return location for Y coordinate
6594 int get_origin(int* x, int* y) {
6595 return gdk_window_get_origin(&this, x, y);
6598 // Unintrospectable method: get_parent() / gdk_window_get_parent()
6599 // Obtains the parent of @window, as known to GDK. Does not query the
6600 // X server; thus this returns the parent as passed to gdk_window_new(),
6601 // not the actual parent. This should never matter unless you're using
6602 // Xlib calls mixed with GDK calls on the X11 platform. It may also
6603 // matter for toplevel windows, because the window manager may choose
6604 // to reparent them.
6605 // Note that you should use gdk_window_get_effective_parent() when
6606 // writing generic code that walks up a window hierarchy, because
6607 // gdk_window_get_parent() will most likely not do what you expect if
6608 // there are offscreen windows in the hierarchy.
6609 // RETURNS: parent of @window
6610 Window* get_parent() {
6611 return gdk_window_get_parent(&this);
6614 // Obtains the current pointer position and modifier state.
6615 // The position is given in coordinates relative to the upper left
6616 // corner of @window.
6617 // gdk_window_at_pointer()), or %NULL if the window containing the
6618 // pointer isn't known to GDK
6619 // RETURNS: the window containing the pointer (as with
6620 // <x>: return location for X coordinate of pointer or %NULL to not return the X coordinate
6621 // <y>: return location for Y coordinate of pointer or %NULL to not return the Y coordinate
6622 // <mask>: return location for modifier mask or %NULL to not return the modifier mask
6623 Window* get_pointer(/*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null) {
6624 return gdk_window_get_pointer(&this, x, y, mask);
6627 // Obtains the position of the window as reported in the
6628 // most-recently-processed #GdkEventConfigure. Contrast with
6629 // gdk_window_get_geometry() which queries the X server for the
6630 // current window position, regardless of which events have been
6631 // received or processed.
6632 // The position coordinates are relative to the window's parent window.
6633 // <x>: X coordinate of window
6634 // <y>: Y coordinate of window
6635 void get_position(/*out*/ int* x=null, /*out*/ int* y=null) {
6636 gdk_window_get_position(&this, x, y);
6639 // Obtains the position of a window position in root
6640 // window coordinates. This is similar to
6641 // gdk_window_get_origin() but allows you go pass
6642 // in any position in the window, not just the origin.
6643 // <x>: X coordinate in window
6644 // <y>: Y coordinate in window
6645 // <root_x>: return location for X coordinate
6646 // <root_y>: return location for Y coordinate
6647 void get_root_coords(int x, int y, /*out*/ int* root_x, /*out*/ int* root_y) {
6648 gdk_window_get_root_coords(&this, x, y, root_x, root_y);
6651 // Obtains the top-left corner of the window manager frame in root
6652 // window coordinates.
6653 // <x>: return location for X position of window frame
6654 // <y>: return location for Y position of window frame
6655 void get_root_origin(int* x, int* y) {
6656 gdk_window_get_root_origin(&this, x, y);
6659 // Unintrospectable method: get_screen() / gdk_window_get_screen()
6660 // Gets the #GdkScreen associated with a #GdkWindow.
6661 // RETURNS: the #GdkScreen associated with @window
6662 Screen* get_screen() {
6663 return gdk_window_get_screen(&this);
6666 // Gets the bitwise OR of the currently active window state flags,
6667 // from the #GdkWindowState enumeration.
6668 // RETURNS: window state bitfield
6669 WindowState get_state() {
6670 return gdk_window_get_state(&this);
6673 // Unintrospectable method: get_toplevel() / gdk_window_get_toplevel()
6674 // Gets the toplevel window that's an ancestor of @window.
6675 // Any window type but %GDK_WINDOW_CHILD is considered a
6676 // toplevel window, as is a %GDK_WINDOW_CHILD window that
6677 // has a root window as parent.
6678 // Note that you should use gdk_window_get_effective_toplevel() when
6679 // you want to get to a window's toplevel as seen on screen, because
6680 // gdk_window_get_toplevel() will most likely not do what you expect
6681 // if there are offscreen windows in the hierarchy.
6682 // RETURNS: the toplevel window containing @window
6683 Window* get_toplevel() {
6684 return gdk_window_get_toplevel(&this);
6687 // This function returns the type hint set for a window.
6688 // RETURNS: The type hint set for @window
6689 WindowTypeHint get_type_hint() {
6690 return gdk_window_get_type_hint(&this);
6693 // Unintrospectable method: get_update_area() / gdk_window_get_update_area()
6694 // Transfers ownership of the update area from @window to the caller
6695 // of the function. That is, after calling this function, @window will
6696 // no longer have an invalid/dirty region; the update area is removed
6697 // from @window and handed to you. If a window has no update area,
6698 // gdk_window_get_update_area() returns %NULL. You are responsible for
6699 // calling gdk_region_destroy() on the returned region if it's non-%NULL.
6700 // RETURNS: the update area for @window
6701 Region* get_update_area() {
6702 return gdk_window_get_update_area(&this);
6705 // Retrieves the user data for @window, which is normally the widget
6706 // that @window belongs to. See gdk_window_set_user_data().
6707 // <data>: return location for user data
6708 void get_user_data(/*out*/ void** data) {
6709 gdk_window_get_user_data(&this, data);
6712 // Unintrospectable method: get_visual() / gdk_window_get_visual()
6713 // Gets the #GdkVisual describing the pixel format of @window.
6714 // RETURNS: a #GdkVisual
6715 Visual* get_visual() {
6716 return gdk_window_get_visual(&this);
6719 // Returns the width of the given @window.
6720 // On the X11 platform the returned size is the size reported in the
6721 // most-recently-processed configure event, rather than the current
6722 // size on the X server.
6723 // RETURNS: The width of @window
6724 int get_width() {
6725 return gdk_window_get_width(&this);
6728 // Gets the type of the window. See #GdkWindowType.
6729 // RETURNS: type of window
6730 WindowType get_window_type() {
6731 return gdk_window_get_window_type(&this);
6734 // Checks whether the window has a native window or not. Note that
6735 // you can use gdk_window_ensure_native() if a native window is needed.
6736 // RETURNS: %TRUE if the %window has a native window, %FALSE otherwise.
6737 int has_native() {
6738 return gdk_window_has_native(&this);
6741 // For toplevel windows, withdraws them, so they will no longer be
6742 // known to the window manager; for all windows, unmaps them, so
6743 // they won't be displayed. Normally done automatically as
6744 // part of gtk_widget_hide().
6745 void hide() {
6746 gdk_window_hide(&this);
6749 // Asks to iconify (minimize) @window. The window manager may choose
6750 // to ignore the request, but normally will honor it. Using
6751 // gtk_window_iconify() is preferred, if you have a #GtkWindow widget.
6752 // This function only makes sense when @window is a toplevel window.
6753 void iconify() {
6754 gdk_window_iconify(&this);
6757 // Like gdk_window_shape_combine_mask(), but the shape applies
6758 // only to event handling. Mouse events which happen while
6759 // the pointer position corresponds to an unset bit in the
6760 // mask will be passed on the window below @window.
6761 // An input shape is typically used with RGBA windows.
6762 // The alpha channel of the window defines which pixels are
6763 // invisible and allows for nicely antialiased borders,
6764 // and the input shape controls where the window is
6765 // "clickable".
6766 // On the X11 platform, this requires version 1.1 of the
6767 // shape extension.
6768 // On the Win32 platform, this functionality is not present and the
6769 // function does nothing.
6770 // <mask>: shape mask, or %NULL
6771 // <x>: X position of shape mask with respect to @window
6772 // <y>: Y position of shape mask with respect to @window
6773 void input_shape_combine_mask(Bitmap* mask, int x, int y) {
6774 gdk_window_input_shape_combine_mask(&this, mask, x, y);
6777 // Like gdk_window_shape_combine_region(), but the shape applies
6778 // only to event handling. Mouse events which happen while
6779 // the pointer position corresponds to an unset bit in the
6780 // mask will be passed on the window below @window.
6781 // An input shape is typically used with RGBA windows.
6782 // The alpha channel of the window defines which pixels are
6783 // invisible and allows for nicely antialiased borders,
6784 // and the input shape controls where the window is
6785 // "clickable".
6786 // On the X11 platform, this requires version 1.1 of the
6787 // shape extension.
6788 // On the Win32 platform, this functionality is not present and the
6789 // function does nothing.
6790 // <shape_region>: region of window to be non-transparent
6791 // <offset_x>: X position of @shape_region in @window coordinates
6792 // <offset_y>: Y position of @shape_region in @window coordinates
6793 void input_shape_combine_region(Region* shape_region, int offset_x, int offset_y) {
6794 gdk_window_input_shape_combine_region(&this, shape_region, offset_x, offset_y);
6797 // Adds @region to the update area for @window. The update area is the
6798 // region that needs to be redrawn, or "dirty region." The call
6799 // gdk_window_process_updates() sends one or more expose events to the
6800 // window, which together cover the entire update area. An
6801 // application would normally redraw the contents of @window in
6802 // response to those expose events.
6803 // GDK will call gdk_window_process_all_updates() on your behalf
6804 // whenever your program returns to the main loop and becomes idle, so
6805 // normally there's no need to do that manually, you just need to
6806 // invalidate regions that you know should be redrawn.
6807 // The @child_func parameter controls whether the region of
6808 // each child window that intersects @region will also be invalidated.
6809 // Only children for which @child_func returns TRUE will have the area
6810 // invalidated.
6811 // <region>: a #GdkRegion
6812 // <child_func>: function to use to decide if to recurse to a child, %NULL means never recurse.
6813 // <user_data>: data passed to @child_func
6814 void invalidate_maybe_recurse(Region* region, void** child_func, void* user_data) {
6815 gdk_window_invalidate_maybe_recurse(&this, region, child_func, user_data);
6818 // A convenience wrapper around gdk_window_invalidate_region() which
6819 // invalidates a rectangular region. See
6820 // gdk_window_invalidate_region() for details.
6821 // <rect>: rectangle to invalidate or %NULL to invalidate the whole window
6822 // <invalidate_children>: whether to also invalidate child windows
6823 void invalidate_rect(Rectangle* rect, int invalidate_children) {
6824 gdk_window_invalidate_rect(&this, rect, invalidate_children);
6827 // Adds @region to the update area for @window. The update area is the
6828 // region that needs to be redrawn, or "dirty region." The call
6829 // gdk_window_process_updates() sends one or more expose events to the
6830 // window, which together cover the entire update area. An
6831 // application would normally redraw the contents of @window in
6832 // response to those expose events.
6833 // GDK will call gdk_window_process_all_updates() on your behalf
6834 // whenever your program returns to the main loop and becomes idle, so
6835 // normally there's no need to do that manually, you just need to
6836 // invalidate regions that you know should be redrawn.
6837 // The @invalidate_children parameter controls whether the region of
6838 // each child window that intersects @region will also be invalidated.
6839 // If %FALSE, then the update area for child windows will remain
6840 // unaffected. See gdk_window_invalidate_maybe_recurse if you need
6841 // fine grained control over which children are invalidated.
6842 // <region>: a #GdkRegion
6843 // <invalidate_children>: %TRUE to also invalidate child windows
6844 void invalidate_region(Region* region, int invalidate_children) {
6845 gdk_window_invalidate_region(&this, region, invalidate_children);
6848 // Check to see if a window is destroyed..
6849 // RETURNS: %TRUE if the window is destroyed
6850 int is_destroyed() {
6851 return gdk_window_is_destroyed(&this);
6854 // Determines whether or not the window is an input only window.
6855 // RETURNS: %TRUE if @window is input only
6856 int is_input_only() {
6857 return gdk_window_is_input_only(&this);
6860 // Determines whether or not the window is shaped.
6861 // RETURNS: %TRUE if @window is shaped
6862 int is_shaped() {
6863 return gdk_window_is_shaped(&this);
6866 // Check if the window and all ancestors of the window are
6867 // mapped. (This is not necessarily "viewable" in the X sense, since
6868 // we only check as far as we have GDK window parents, not to the root
6869 // window.)
6870 // RETURNS: %TRUE if the window is viewable
6871 int is_viewable() {
6872 return gdk_window_is_viewable(&this);
6875 // Checks whether the window has been mapped (with gdk_window_show() or
6876 // gdk_window_show_unraised()).
6877 // RETURNS: %TRUE if the window is mapped
6878 int is_visible() {
6879 return gdk_window_is_visible(&this);
6882 // Lowers @window to the bottom of the Z-order (stacking order), so that
6883 // other windows with the same parent window appear above @window.
6884 // This is true whether or not the other windows are visible.
6885 // If @window is a toplevel, the window manager may choose to deny the
6886 // request to move the window in the Z-order, gdk_window_lower() only
6887 // requests the restack, does not guarantee it.
6888 // Note that gdk_window_show() raises the window again, so don't call this
6889 // function before gdk_window_show(). (Try gdk_window_show_unraised().)
6890 void lower() {
6891 gdk_window_lower(&this);
6894 // Maximizes the window. If the window was already maximized, then
6895 // this function does nothing.
6896 // On X11, asks the window manager to maximize @window, if the window
6897 // manager supports this operation. Not all window managers support
6898 // this, and some deliberately ignore it or don't have a concept of
6899 // "maximized"; so you can't rely on the maximization actually
6900 // happening. But it will happen with most standard window managers,
6901 // and GDK makes a best effort to get it to happen.
6902 // On Windows, reliably maximizes the window.
6903 void maximize() {
6904 gdk_window_maximize(&this);
6907 // Merges the input shape masks for any child windows into the
6908 // input shape mask for @window. i.e. the union of all input masks
6909 // for @window and its children will become the new input mask
6910 // for @window. See gdk_window_input_shape_combine_mask().
6911 // This function is distinct from gdk_window_set_child_input_shapes()
6912 // because it includes @window's input shape mask in the set of
6913 // shapes to be merged.
6914 void merge_child_input_shapes() {
6915 gdk_window_merge_child_input_shapes(&this);
6918 // Merges the shape masks for any child windows into the
6919 // shape mask for @window. i.e. the union of all masks
6920 // for @window and its children will become the new mask
6921 // for @window. See gdk_window_shape_combine_mask().
6922 // This function is distinct from gdk_window_set_child_shapes()
6923 // because it includes @window's shape mask in the set of shapes to
6924 // be merged.
6925 void merge_child_shapes() {
6926 gdk_window_merge_child_shapes(&this);
6929 // Repositions a window relative to its parent window.
6930 // For toplevel windows, window managers may ignore or modify the move;
6931 // you should probably use gtk_window_move() on a #GtkWindow widget
6932 // anyway, instead of using GDK functions. For child windows,
6933 // the move will reliably succeed.
6934 // If you're also planning to resize the window, use gdk_window_move_resize()
6935 // to both move and resize simultaneously, for a nicer visual effect.
6936 // <x>: X coordinate relative to window's parent
6937 // <y>: Y coordinate relative to window's parent
6938 void move(int x, int y) {
6939 gdk_window_move(&this, x, y);
6942 // Move the part of @window indicated by @region by @dy pixels in the Y
6943 // direction and @dx pixels in the X direction. The portions of @region
6944 // that not covered by the new position of @region are invalidated.
6945 // Child windows are not moved.
6946 // <region>: The #GdkRegion to move
6947 // <dx>: Amount to move in the X direction
6948 // <dy>: Amount to move in the Y direction
6949 void move_region(Region* region, int dx, int dy) {
6950 gdk_window_move_region(&this, region, dx, dy);
6953 // Equivalent to calling gdk_window_move() and gdk_window_resize(),
6954 // except that both operations are performed at once, avoiding strange
6955 // visual effects. (i.e. the user may be able to see the window first
6956 // move, then resize, if you don't use gdk_window_move_resize().)
6957 // <x>: new X position relative to window's parent
6958 // <y>: new Y position relative to window's parent
6959 // <width>: new width
6960 // <height>: new height
6961 void move_resize(int x, int y, int width, int height) {
6962 gdk_window_move_resize(&this, x, y, width, height);
6965 // Creates a new #GdkWindow using the attributes from
6966 // display, @parent must be specified.
6967 // RETURNS: the new #GdkWindow
6968 // <attributes>: attributes of the new window
6969 // <attributes_mask>: mask indicating which fields in @attributes are valid
6970 Window* new_(WindowAttr* attributes, int attributes_mask) {
6971 return gdk_window_new(&this, attributes, attributes_mask);
6974 // Like gdk_window_get_children(), but does not copy the list of
6975 // children, so the list does not need to be freed.
6976 // a reference to the list of child windows in @window
6977 GLib2.List* peek_children() {
6978 return gdk_window_peek_children(&this);
6981 // Sends one or more expose events to @window. The areas in each
6982 // expose event will cover the entire update area for the window (see
6983 // gdk_window_invalidate_region() for details). Normally GDK calls
6984 // gdk_window_process_all_updates() on your behalf, so there's no
6985 // need to call this function unless you want to force expose events
6986 // to be delivered immediately and synchronously (vs. the usual
6987 // case, where GDK delivers them in an idle handler). Occasionally
6988 // this is useful to produce nicer scrolling behavior, for example.
6989 // <update_children>: whether to also process updates for child windows
6990 void process_updates(int update_children) {
6991 gdk_window_process_updates(&this, update_children);
6994 // Raises @window to the top of the Z-order (stacking order), so that
6995 // other windows with the same parent window appear below @window.
6996 // This is true whether or not the windows are visible.
6997 // If @window is a toplevel, the window manager may choose to deny the
6998 // request to move the window in the Z-order, gdk_window_raise() only
6999 // requests the restack, does not guarantee it.
7000 void raise() {
7001 gdk_window_raise(&this);
7004 // Redirects drawing into @window so that drawing to the
7005 // window in the rectangle specified by @src_x, @src_y,
7006 // Only drawing between gdk_window_begin_paint_region() or
7007 // gdk_window_begin_paint_rect() and gdk_window_end_paint() is
7008 // redirected.
7009 // Redirection is active until gdk_window_remove_redirection()
7010 // is called.
7011 // <drawable>: a #GdkDrawable
7012 // <src_x>: x position in @window
7013 // <src_y>: y position in @window
7014 // <dest_x>: x position in @drawable
7015 // <dest_y>: y position in @drawable
7016 // <width>: width of redirection, or -1 to use the width of @window
7017 // <height>: height of redirection or -1 to use the height of @window
7018 void redirect_to_drawable(Drawable* drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
7019 gdk_window_redirect_to_drawable(&this, drawable, src_x, src_y, dest_x, dest_y, width, height);
7021 void register_dnd() {
7022 gdk_window_register_dnd(&this);
7025 // Unintrospectable method: remove_filter() / gdk_window_remove_filter()
7026 // Remove a filter previously added with gdk_window_add_filter().
7027 // <function>: previously-added filter function
7028 // <data>: user data for previously-added filter function
7029 void remove_filter(FilterFunc function_, void* data) {
7030 gdk_window_remove_filter(&this, function_, data);
7033 // Removes any active redirection started by
7034 // gdk_window_redirect_to_drawable().
7035 void remove_redirection() {
7036 gdk_window_remove_redirection(&this);
7039 // Reparents @window into the given @new_parent. The window being
7040 // reparented will be unmapped as a side effect.
7041 // <new_parent>: new parent to move @window into
7042 // <x>: X location inside the new parent
7043 // <y>: Y location inside the new parent
7044 void reparent(Window* new_parent, int x, int y) {
7045 gdk_window_reparent(&this, new_parent, x, y);
7048 // Resizes @window; for toplevel windows, asks the window manager to resize
7049 // the window. The window manager may not allow the resize. When using GTK+,
7050 // use gtk_window_resize() instead of this low-level GDK function.
7051 // Windows may not be resized below 1x1.
7052 // If you're also planning to move the window, use gdk_window_move_resize()
7053 // to both move and resize simultaneously, for a nicer visual effect.
7054 // <width>: new width of the window
7055 // <height>: new height of the window
7056 void resize(int width, int height) {
7057 gdk_window_resize(&this, width, height);
7060 // Changes the position of @window in the Z-order (stacking order), so that
7061 // it is above @sibling (if @above is %TRUE) or below @sibling (if @above is
7062 // %FALSE).
7063 // If @sibling is %NULL, then this either raises (if @above is %TRUE) or
7064 // lowers the window.
7065 // If @window is a toplevel, the window manager may choose to deny the
7066 // request to move the window in the Z-order, gdk_window_restack() only
7067 // requests the restack, does not guarantee it.
7068 // <sibling>: a #GdkWindow that is a sibling of @window, or %NULL
7069 // <above>: a boolean
7070 void restack(Window* sibling, int above) {
7071 gdk_window_restack(&this, sibling, above);
7074 // Scroll the contents of @window, both pixels and children, by the
7075 // given amount. @window itself does not move. Portions of the window
7076 // that the scroll operation brings in from offscreen areas are
7077 // invalidated. The invalidated region may be bigger than what would
7078 // strictly be necessary.
7079 // For X11, a minimum area will be invalidated if the window has no
7080 // subwindows, or if the edges of the window's parent do not extend
7081 // beyond the edges of the window. In other cases, a multi-step process
7082 // is used to scroll the window which may produce temporary visual
7083 // artifacts and unnecessary invalidations.
7084 // <dx>: Amount to scroll in the X direction
7085 // <dy>: Amount to scroll in the Y direction
7086 void scroll(int dx, int dy) {
7087 gdk_window_scroll(&this, dx, dy);
7090 // Setting @accept_focus to %FALSE hints the desktop environment that the
7091 // window doesn't want to receive input focus.
7092 // On X, it is the responsibility of the window manager to interpret this
7093 // hint. ICCCM-compliant window manager usually respect it.
7094 // <accept_focus>: %TRUE if the window should receive input focus
7095 void set_accept_focus(int accept_focus) {
7096 gdk_window_set_accept_focus(&this, accept_focus);
7099 // Sets the background pixmap of @window. May also be used to set a
7100 // background of "None" on @window, by setting a background pixmap
7101 // of %NULL.
7102 // A background pixmap will be tiled, positioning the first tile at
7103 // the origin of @window, or if @parent_relative is %TRUE, the tiling
7104 // will be done based on the origin of the parent window (useful to
7105 // align tiles in a parent with tiles in a child).
7106 // A background pixmap of %NULL means that the window will have no
7107 // background. A window with no background will never have its
7108 // background filled by the windowing system, instead the window will
7109 // contain whatever pixels were already in the corresponding area of
7110 // the display.
7111 // The windowing system will normally fill a window with its background
7112 // when the window is obscured then exposed, and when you call
7113 // gdk_window_clear().
7114 // <pixmap>: a #GdkPixmap, or %NULL
7115 // <parent_relative>: whether the tiling origin is at the origin of
7116 void set_back_pixmap(Pixmap* pixmap, int parent_relative) {
7117 gdk_window_set_back_pixmap(&this, pixmap, parent_relative);
7120 // Sets the background color of @window. (However, when using GTK+,
7121 // set the background of a widget with gtk_widget_modify_bg() - if
7122 // you're an application - or gtk_style_set_background() - if you're
7123 // implementing a custom widget.)
7124 // The @color must be allocated; gdk_rgb_find_color() is the best way
7125 // to allocate a color.
7126 // See also gdk_window_set_back_pixmap().
7127 // <color>: an allocated #GdkColor
7128 void set_background(Color* color) {
7129 gdk_window_set_background(&this, color);
7132 // Sets the input shape mask of @window to the union of input shape masks
7133 // for all children of @window, ignoring the input shape mask of @window
7134 // itself. Contrast with gdk_window_merge_child_input_shapes() which includes
7135 // the input shape mask of @window in the masks to be merged.
7136 void set_child_input_shapes() {
7137 gdk_window_set_child_input_shapes(&this);
7140 // Sets the shape mask of @window to the union of shape masks
7141 // for all children of @window, ignoring the shape mask of @window
7142 // itself. Contrast with gdk_window_merge_child_shapes() which includes
7143 // the shape mask of @window in the masks to be merged.
7144 void set_child_shapes() {
7145 gdk_window_set_child_shapes(&this);
7148 // Sets a #GdkWindow as composited, or unsets it. Composited
7149 // windows do not automatically have their contents drawn to
7150 // the screen. Drawing is redirected to an offscreen buffer
7151 // and an expose event is emitted on the parent of the composited
7152 // window. It is the responsibility of the parent's expose handler
7153 // to manually merge the off-screen content onto the screen in
7154 // whatever way it sees fit. See <xref linkend="composited-window-example"/>
7155 // for an example.
7156 // It only makes sense for child windows to be composited; see
7157 // gdk_window_set_opacity() if you need translucent toplevel
7158 // windows.
7159 // An additional effect of this call is that the area of this
7160 // window is no longer clipped from regions marked for
7161 // invalidation on its parent. Draws done on the parent
7162 // window are also no longer clipped by the child.
7163 // This call is only supported on some systems (currently,
7164 // only X11 with new enough Xcomposite and Xdamage extensions).
7165 // You must call gdk_display_supports_composite() to check if
7166 // setting a window as composited is supported before
7167 // attempting to do so.
7168 // <composited>: %TRUE to set the window as composited
7169 void set_composited(int composited) {
7170 gdk_window_set_composited(&this, composited);
7173 // Sets the mouse pointer for a #GdkWindow. Use gdk_cursor_new_for_display()
7174 // or gdk_cursor_new_from_pixmap() to create the cursor. To make the cursor
7175 // invisible, use %GDK_BLANK_CURSOR. Passing %NULL for the @cursor argument
7176 // to gdk_window_set_cursor() means that @window will use the cursor of its
7177 // parent window. Most windows should use this default.
7178 // <cursor>: a cursor
7179 void set_cursor(Cursor* cursor=null) {
7180 gdk_window_set_cursor(&this, cursor);
7183 // "Decorations" are the features the window manager adds to a toplevel #GdkWindow.
7184 // This function sets the traditional Motif window manager hints that tell the
7185 // window manager which decorations you would like your window to have.
7186 // Usually you should use gtk_window_set_decorated() on a #GtkWindow instead of
7187 // using the GDK function directly.
7188 // The @decorations argument is the logical OR of the fields in
7189 // the #GdkWMDecoration enumeration. If #GDK_DECOR_ALL is included in the
7190 // mask, the other bits indicate which decorations should be turned off.
7191 // If #GDK_DECOR_ALL is not included, then the other bits indicate
7192 // which decorations should be turned on.
7193 // Most window managers honor a decorations hint of 0 to disable all decorations,
7194 // but very few honor all possible combinations of bits.
7195 // <decorations>: decoration hint mask
7196 void set_decorations(WMDecoration decorations) {
7197 gdk_window_set_decorations(&this, decorations);
7200 // The event mask for a window determines which events will be reported
7201 // for that window. For example, an event mask including #GDK_BUTTON_PRESS_MASK
7202 // means the window should report button press events. The event mask
7203 // is the bitwise OR of values from the #GdkEventMask enumeration.
7204 // <event_mask>: event mask for @window
7205 void set_events(EventMask event_mask) {
7206 gdk_window_set_events(&this, event_mask);
7209 // Setting @focus_on_map to %FALSE hints the desktop environment that the
7210 // window doesn't want to receive input focus when it is mapped.
7211 // focus_on_map should be turned off for windows that aren't triggered
7212 // interactively (such as popups from network activity).
7213 // On X, it is the responsibility of the window manager to interpret
7214 // this hint. Window managers following the freedesktop.org window
7215 // manager extension specification should respect it.
7216 // <focus_on_map>: %TRUE if the window should receive input focus when mapped
7217 void set_focus_on_map(int focus_on_map) {
7218 gdk_window_set_focus_on_map(&this, focus_on_map);
7221 // Sets hints about the window management functions to make available
7222 // via buttons on the window frame.
7223 // On the X backend, this function sets the traditional Motif window
7224 // manager hint for this purpose. However, few window managers do
7225 // anything reliable or interesting with this hint. Many ignore it
7226 // entirely.
7227 // The @functions argument is the logical OR of values from the
7228 // #GdkWMFunction enumeration. If the bitmask includes #GDK_FUNC_ALL,
7229 // then the other bits indicate which functions to disable; if
7230 // it doesn't include #GDK_FUNC_ALL, it indicates which functions to
7231 // enable.
7232 // <functions>: bitmask of operations to allow on @window
7233 void set_functions(WMFunction functions) {
7234 gdk_window_set_functions(&this, functions);
7237 // Sets the geometry hints for @window. Hints flagged in @geom_mask
7238 // are set, hints not flagged in @geom_mask are unset.
7239 // To unset all hints, use a @geom_mask of 0 and a @geometry of %NULL.
7240 // This function provides hints to the windowing system about
7241 // acceptable sizes for a toplevel window. The purpose of
7242 // this is to constrain user resizing, but the windowing system
7243 // will typically (but is not required to) also constrain the
7244 // current size of the window to the provided values and
7245 // constrain programatic resizing via gdk_window_resize() or
7246 // gdk_window_move_resize().
7247 // Note that on X11, this effect has no effect on windows
7248 // of type %GDK_WINDOW_TEMP or windows where override redirect
7249 // has been turned on via gdk_window_set_override_redirect()
7250 // since these windows are not resizable by the user.
7251 // Since you can't count on the windowing system doing the
7252 // constraints for programmatic resizes, you should generally
7253 // call gdk_window_constrain_size() yourself to determine
7254 // appropriate sizes.
7255 // <geometry>: geometry hints
7256 // <geom_mask>: bitmask indicating fields of @geometry to pay attention to
7257 void set_geometry_hints(Geometry* geometry, WindowHints geom_mask) {
7258 gdk_window_set_geometry_hints(&this, geometry, geom_mask);
7261 // Sets the group leader window for @window. By default,
7262 // GDK sets the group leader for all toplevel windows
7263 // to a global window implicitly created by GDK. With this function
7264 // you can override this default.
7265 // The group leader window allows the window manager to distinguish
7266 // all windows that belong to a single application. It may for example
7267 // allow users to minimize/unminimize all windows belonging to an
7268 // application at once. You should only set a non-default group window
7269 // if your application pretends to be multiple applications.
7270 // <leader>: group leader window, or %NULL to restore the default group leader window
7271 void set_group(Window* leader) {
7272 gdk_window_set_group(&this, leader);
7275 // This function is broken and useless and you should ignore it.
7276 // If using GTK+, use functions such as gtk_window_resize(), gtk_window_set_size_request(),
7277 // gtk_window_move(), gtk_window_parse_geometry(), and gtk_window_set_geometry_hints(),
7278 // depending on what you're trying to do.
7279 // If using GDK directly, use gdk_window_set_geometry_hints().
7280 // <x>: ignored field, does not matter
7281 // <y>: ignored field, does not matter
7282 // <min_width>: minimum width hint
7283 // <min_height>: minimum height hint
7284 // <max_width>: max width hint
7285 // <max_height>: max height hint
7286 // <flags>: logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE
7287 void set_hints(int x, int y, int min_width, int min_height, int max_width, int max_height, int flags) {
7288 gdk_window_set_hints(&this, x, y, min_width, min_height, max_width, max_height, flags);
7291 // Sets the icon of @window as a pixmap or window. If using GTK+, investigate
7292 // gtk_window_set_default_icon_list() first, and then gtk_window_set_icon_list()
7293 // and gtk_window_set_icon(). If those don't meet your needs, look at
7294 // gdk_window_set_icon_list(). Only if all those are too high-level do you
7295 // want to fall back to gdk_window_set_icon().
7296 // <icon_window>: a #GdkWindow to use for the icon, or %NULL to unset
7297 // <pixmap>: a #GdkPixmap to use as the icon, or %NULL to unset
7298 // <mask>: a 1-bit pixmap (#GdkBitmap) to use as mask for @pixmap, or %NULL to have none
7299 void set_icon(Window* icon_window, Pixmap* pixmap, Bitmap* mask) {
7300 gdk_window_set_icon(&this, icon_window, pixmap, mask);
7303 // Sets a list of icons for the window. One of these will be used
7304 // to represent the window when it has been iconified. The icon is
7305 // usually shown in an icon box or some sort of task bar. Which icon
7306 // size is shown depends on the window manager. The window manager
7307 // can scale the icon but setting several size icons can give better
7308 // image quality since the window manager may only need to scale the
7309 // icon by a small amount or not at all.
7310 // <pixbufs>: A list of pixbufs, of different sizes.
7311 void set_icon_list(GLib2.List* pixbufs) {
7312 gdk_window_set_icon_list(&this, pixbufs);
7315 // Windows may have a name used while minimized, distinct from the
7316 // name they display in their titlebar. Most of the time this is a bad
7317 // idea from a user interface standpoint. But you can set such a name
7318 // with this function, if you like.
7319 // After calling this with a non-%NULL @name, calls to gdk_window_set_title()
7320 // will not update the icon title.
7321 // Using %NULL for @name unsets the icon title; further calls to
7322 // gdk_window_set_title() will again update the icon title as well.
7323 // <name>: name of window while iconified (minimized)
7324 void set_icon_name(char* name) {
7325 gdk_window_set_icon_name(&this, name);
7328 // Set if @window must be kept above other windows. If the
7329 // window was already above, then this function does nothing.
7330 // On X11, asks the window manager to keep @window above, if the window
7331 // manager supports this operation. Not all window managers support
7332 // this, and some deliberately ignore it or don't have a concept of
7333 // "keep above"; so you can't rely on the window being kept above.
7334 // But it will happen with most standard window managers,
7335 // and GDK makes a best effort to get it to happen.
7336 // <setting>: whether to keep @window above other windows
7337 void set_keep_above(int setting) {
7338 gdk_window_set_keep_above(&this, setting);
7341 // Set if @window must be kept below other windows. If the
7342 // window was already below, then this function does nothing.
7343 // On X11, asks the window manager to keep @window below, if the window
7344 // manager supports this operation. Not all window managers support
7345 // this, and some deliberately ignore it or don't have a concept of
7346 // "keep below"; so you can't rely on the window being kept below.
7347 // But it will happen with most standard window managers,
7348 // and GDK makes a best effort to get it to happen.
7349 // <setting>: whether to keep @window below other windows
7350 void set_keep_below(int setting) {
7351 gdk_window_set_keep_below(&this, setting);
7354 // The application can use this hint to tell the window manager
7355 // that a certain window has modal behaviour. The window manager
7356 // can use this information to handle modal windows in a special
7357 // way.
7358 // You should only use this on windows for which you have
7359 // previously called gdk_window_set_transient_for()
7360 // <modal>: %TRUE if the window is modal, %FALSE otherwise.
7361 void set_modal_hint(int modal) {
7362 gdk_window_set_modal_hint(&this, modal);
7365 // Request the windowing system to make @window partially transparent,
7366 // with opacity 0 being fully transparent and 1 fully opaque. (Values
7367 // of the opacity parameter are clamped to the [0,1] range.)
7368 // On X11, this works only on X screens with a compositing manager
7369 // running.
7370 // For setting up per-pixel alpha, see gdk_screen_get_rgba_colormap().
7371 // For making non-toplevel windows translucent, see
7372 // gdk_window_set_composited().
7373 // <opacity>: opacity
7374 void set_opacity(double opacity) {
7375 gdk_window_set_opacity(&this, opacity);
7378 // An override redirect window is not under the control of the window manager.
7379 // This means it won't have a titlebar, won't be minimizable, etc. - it will
7380 // be entirely under the control of the application. The window manager
7381 // can't see the override redirect window at all.
7382 // Override redirect should only be used for short-lived temporary
7383 // windows, such as popup menus. #GtkMenu uses an override redirect
7384 // window in its implementation, for example.
7385 // <override_redirect>: %TRUE if window should be override redirect
7386 void set_override_redirect(int override_redirect) {
7387 gdk_window_set_override_redirect(&this, override_redirect);
7390 // When using GTK+, typically you should use gtk_window_set_role() instead
7391 // of this low-level function.
7392 // The window manager and session manager use a window's role to
7393 // distinguish it from other kinds of window in the same application.
7394 // When an application is restarted after being saved in a previous
7395 // session, all windows with the same title and role are treated as
7396 // interchangeable. So if you have two windows with the same title
7397 // that should be distinguished for session management purposes, you
7398 // should set the role on those windows. It doesn't matter what string
7399 // you use for the role, as long as you have a different role for each
7400 // non-interchangeable kind of window.
7401 // <role>: a string indicating its role
7402 void set_role(char* role) {
7403 gdk_window_set_role(&this, role);
7406 // Toggles whether a window should appear in a pager (workspace
7407 // switcher, or other desktop utility program that displays a small
7408 // thumbnail representation of the windows on the desktop). If a
7409 // window's semantic type as specified with gdk_window_set_type_hint()
7410 // already fully describes the window, this function should
7411 // <emphasis>not</emphasis> be called in addition, instead you should
7412 // allow the window to be treated according to standard policy for
7413 // its semantic type.
7414 // <skips_pager>: %TRUE to skip the pager
7415 void set_skip_pager_hint(int skips_pager) {
7416 gdk_window_set_skip_pager_hint(&this, skips_pager);
7419 // Toggles whether a window should appear in a task list or window
7420 // list. If a window's semantic type as specified with
7421 // gdk_window_set_type_hint() already fully describes the window, this
7422 // function should <emphasis>not</emphasis> be called in addition,
7423 // instead you should allow the window to be treated according to
7424 // standard policy for its semantic type.
7425 // <skips_taskbar>: %TRUE to skip the taskbar
7426 void set_skip_taskbar_hint(int skips_taskbar) {
7427 gdk_window_set_skip_taskbar_hint(&this, skips_taskbar);
7430 // When using GTK+, typically you should use gtk_window_set_startup_id()
7431 // instead of this low-level function.
7432 // <startup_id>: a string with startup-notification identifier
7433 void set_startup_id(char* startup_id) {
7434 gdk_window_set_startup_id(&this, startup_id);
7437 // Set the bit gravity of the given window to static, and flag it so
7438 // all children get static subwindow gravity. This is used if you are
7439 // implementing scary features that involve deep knowledge of the
7440 // windowing system. Don't worry about it unless you have to.
7441 // RETURNS: %TRUE if the server supports static gravity
7442 // <use_static>: %TRUE to turn on static gravity
7443 int set_static_gravities(int use_static) {
7444 return gdk_window_set_static_gravities(&this, use_static);
7447 // Sets the title of a toplevel window, to be displayed in the titlebar.
7448 // If you haven't explicitly set the icon name for the window
7449 // (using gdk_window_set_icon_name()), the icon name will be set to
7450 // user-readable strings in GDK/GTK+). @title may not be %NULL.
7451 // <title>: title of @window
7452 void set_title(char* title) {
7453 gdk_window_set_title(&this, title);
7456 // Indicates to the window manager that @window is a transient dialog
7457 // associated with the application window @parent. This allows the
7458 // window manager to do things like center @window on @parent and
7459 // keep @window above @parent.
7460 // See gtk_window_set_transient_for() if you're using #GtkWindow or
7461 // #GtkDialog.
7462 // <parent>: another toplevel #GdkWindow
7463 void set_transient_for(Window* parent) {
7464 gdk_window_set_transient_for(&this, parent);
7467 // The application can use this call to provide a hint to the window
7468 // manager about the functionality of a window. The window manager
7469 // can use this information when determining the decoration and behaviour
7470 // of the window.
7471 // The hint must be set before the window is mapped.
7472 // <hint>: A hint of the function this window will have
7473 void set_type_hint(WindowTypeHint hint) {
7474 gdk_window_set_type_hint(&this, hint);
7477 // Toggles whether a window needs the user's
7478 // urgent attention.
7479 // <urgent>: %TRUE if the window is urgent
7480 void set_urgency_hint(int urgent) {
7481 gdk_window_set_urgency_hint(&this, urgent);
7484 // For most purposes this function is deprecated in favor of
7485 // g_object_set_data(). However, for historical reasons GTK+ stores
7486 // the #GtkWidget that owns a #GdkWindow as user data on the
7487 // #GdkWindow. So, custom widget implementations should use
7488 // this function for that. If GTK+ receives an event for a #GdkWindow,
7489 // and the user data for the window is non-%NULL, GTK+ will assume the
7490 // user data is a #GtkWidget, and forward the event to that widget.
7491 // <user_data>: user data
7492 void set_user_data(void* user_data) {
7493 gdk_window_set_user_data(&this, user_data);
7496 // Applies a shape mask to @window. Pixels in @window corresponding to
7497 // set bits in the @mask will be visible; pixels in @window
7498 // corresponding to unset bits in the @mask will be transparent. This
7499 // gives a non-rectangular window.
7500 // If @mask is %NULL, the shape mask will be unset, and the @x/@y
7501 // parameters are not used.
7502 // On the X11 platform, this uses an X server extension which is
7503 // widely available on most common platforms, but not available on
7504 // very old X servers, and occasionally the implementation will be
7505 // buggy. On servers without the shape extension, this function
7506 // will do nothing.
7507 // This function works on both toplevel and child windows.
7508 // <mask>: shape mask
7509 // <x>: X position of shape mask with respect to @window
7510 // <y>: Y position of shape mask with respect to @window
7511 void shape_combine_mask(Bitmap* mask, int x, int y) {
7512 gdk_window_shape_combine_mask(&this, mask, x, y);
7515 // Makes pixels in @window outside @shape_region be transparent,
7516 // so that the window may be nonrectangular. See also
7517 // gdk_window_shape_combine_mask() to use a bitmap as the mask.
7518 // If @shape_region is %NULL, the shape will be unset, so the whole
7519 // window will be opaque again. @offset_x and @offset_y are ignored
7520 // if @shape_region is %NULL.
7521 // On the X11 platform, this uses an X server extension which is
7522 // widely available on most common platforms, but not available on
7523 // very old X servers, and occasionally the implementation will be
7524 // buggy. On servers without the shape extension, this function
7525 // will do nothing.
7526 // This function works on both toplevel and child windows.
7527 // <shape_region>: region of window to be non-transparent
7528 // <offset_x>: X position of @shape_region in @window coordinates
7529 // <offset_y>: Y position of @shape_region in @window coordinates
7530 void shape_combine_region(Region* shape_region, int offset_x, int offset_y) {
7531 gdk_window_shape_combine_region(&this, shape_region, offset_x, offset_y);
7534 // Like gdk_window_show_unraised(), but also raises the window to the
7535 // top of the window stack (moves the window to the front of the
7536 // Z-order).
7537 // This function maps a window so it's visible onscreen. Its opposite
7538 // is gdk_window_hide().
7539 // When implementing a #GtkWidget, you should call this function on the widget's
7540 // #GdkWindow as part of the "map" method.
7541 void show() {
7542 gdk_window_show(&this);
7545 // Shows a #GdkWindow onscreen, but does not modify its stacking
7546 // order. In contrast, gdk_window_show() will raise the window
7547 // to the top of the window stack.
7548 // On the X11 platform, in Xlib terms, this function calls
7549 // XMapWindow() (it also updates some internal GDK state, which means
7550 // that you can't really use XMapWindow() directly on a GDK window).
7551 void show_unraised() {
7552 gdk_window_show_unraised(&this);
7555 // "Pins" a window such that it's on all workspaces and does not scroll
7556 // with viewports, for window managers that have scrollable viewports.
7557 // (When using #GtkWindow, gtk_window_stick() may be more useful.)
7558 // On the X11 platform, this function depends on window manager
7559 // support, so may have no effect with many window managers. However,
7560 // GDK will do the best it can to convince the window manager to stick
7561 // the window. For window managers that don't support this operation,
7562 // there's nothing you can do to force it to happen.
7563 void stick() {
7564 gdk_window_stick(&this);
7567 // Thaws a window frozen with
7568 // gdk_window_freeze_toplevel_updates_libgtk_only().
7569 // This function is not part of the GDK public API and is only
7570 // for use by GTK+.
7571 void thaw_toplevel_updates_libgtk_only() {
7572 gdk_window_thaw_toplevel_updates_libgtk_only(&this);
7574 // Thaws a window frozen with gdk_window_freeze_updates().
7575 void thaw_updates() {
7576 gdk_window_thaw_updates(&this);
7579 // Moves the window out of fullscreen mode. If the window was not
7580 // fullscreen, does nothing.
7581 // On X11, asks the window manager to move @window out of the fullscreen
7582 // state, if the window manager supports this operation. Not all
7583 // window managers support this, and some deliberately ignore it or
7584 // don't have a concept of "fullscreen"; so you can't rely on the
7585 // unfullscreenification actually happening. But it will happen with
7586 // most standard window managers, and GDK makes a best effort to get
7587 // it to happen.
7588 void unfullscreen() {
7589 gdk_window_unfullscreen(&this);
7592 // Unmaximizes the window. If the window wasn't maximized, then this
7593 // function does nothing.
7594 // On X11, asks the window manager to unmaximize @window, if the
7595 // window manager supports this operation. Not all window managers
7596 // support this, and some deliberately ignore it or don't have a
7597 // concept of "maximized"; so you can't rely on the unmaximization
7598 // actually happening. But it will happen with most standard window
7599 // managers, and GDK makes a best effort to get it to happen.
7600 // On Windows, reliably unmaximizes the window.
7601 void unmaximize() {
7602 gdk_window_unmaximize(&this);
7605 // Reverse operation for gdk_window_stick(); see gdk_window_stick(),
7606 // and gtk_window_unstick().
7607 void unstick() {
7608 gdk_window_unstick(&this);
7611 // Withdraws a window (unmaps it and asks the window manager to forget about it).
7612 // This function is not really useful as gdk_window_hide() automatically
7613 // withdraws toplevel windows before hiding them.
7614 void withdraw() {
7615 gdk_window_withdraw(&this);
7618 // The ::from-embedder signal is emitted to translate coordinates
7619 // in the embedder of an offscreen window to the offscreen window.
7620 // See also #GtkWindow::to-embedder.
7621 // <embedder-x>: x coordinate in the embedder window
7622 // <embedder-y>: y coordinate in the embedder window
7623 // <offscreen-x>: return location for the x coordinate in the offscreen window
7624 // <offscreen-y>: return location for the y coordinate in the offscreen window
7625 extern (C) alias static void function (Window* this_, double embedder_x, double embedder_y, /*out*/ /*POINTER*/ double* offscreen_x, /*out*/ /*POINTER*/ double* offscreen_y, void* user_data=null) signal_from_embedder;
7627 ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7628 return super_.signal_connect!name(cb, data, cf);
7631 ulong signal_connect(string name:"from-embedder", CB/*:signal_from_embedder*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7632 return signal_connect_data(&this, cast(char*)"from-embedder",
7633 cast(GObject2.Callback)cb, data, null, cf);
7636 // The ::pick-embedded-child signal is emitted to find an embedded
7637 // child at the given position.
7638 // RETURNS: the #GdkWindow of the embedded child at
7639 // <x>: x coordinate in the window
7640 // <y>: y coordinate in the window
7641 extern (C) alias static Window* function (Window* this_, double x, double y, void* user_data=null) signal_pick_embedded_child;
7642 ulong signal_connect(string name:"pick-embedded-child", CB/*:signal_pick_embedded_child*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7643 return signal_connect_data(&this, cast(char*)"pick-embedded-child",
7644 cast(GObject2.Callback)cb, data, null, cf);
7647 // The ::to-embedder signal is emitted to translate coordinates
7648 // in an offscreen window to its embedder.
7649 // See also #GtkWindow::from-embedder.
7650 // <offscreen-x>: x coordinate in the offscreen window
7651 // <offscreen-y>: y coordinate in the offscreen window
7652 // <embedder-x>: return location for the x coordinate in the embedder window
7653 // <embedder-y>: return location for the y coordinate in the embedder window
7654 extern (C) alias static void function (Window* this_, double offscreen_x, double offscreen_y, /*out*/ /*POINTER*/ double* embedder_x, /*out*/ /*POINTER*/ double* embedder_y, void* user_data=null) signal_to_embedder;
7655 ulong signal_connect(string name:"to-embedder", CB/*:signal_to_embedder*/)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) {
7656 return signal_connect_data(&this, cast(char*)"to-embedder",
7657 cast(GObject2.Callback)cb, data, null, cf);
7661 struct WindowAttr {
7662 char* title;
7663 int event_mask, x, y, width, height;
7664 WindowClass wclass;
7665 Visual* visual;
7666 Colormap* colormap;
7667 WindowType window_type;
7668 Cursor* cursor;
7669 char* wmclass_name, wmclass_class;
7670 int override_redirect;
7671 WindowTypeHint type_hint;
7674 enum WindowAttributesType {
7675 TITLE = 2,
7676 X = 4,
7677 Y = 8,
7678 CURSOR = 16,
7679 COLORMAP = 32,
7680 VISUAL = 64,
7681 WMCLASS = 128,
7682 NOREDIR = 256,
7683 TYPE_HINT = 512
7685 enum WindowClass {
7686 OUTPUT = 0,
7687 ONLY = 1
7689 enum WindowEdge {
7690 NORTH_WEST = 0,
7691 NORTH = 1,
7692 NORTH_EAST = 2,
7693 WEST = 3,
7694 EAST = 4,
7695 SOUTH_WEST = 5,
7696 SOUTH = 6,
7697 SOUTH_EAST = 7
7699 enum WindowHints {
7700 POS = 1,
7701 MIN_SIZE = 2,
7702 MAX_SIZE = 4,
7703 BASE_SIZE = 8,
7704 ASPECT = 16,
7705 RESIZE_INC = 32,
7706 WIN_GRAVITY = 64,
7707 USER_POS = 128,
7708 USER_SIZE = 256
7710 struct WindowObject {
7713 struct WindowObjectClass {
7714 DrawableClass parent_class;
7717 struct WindowRedirect {
7720 enum WindowState {
7721 WITHDRAWN = 1,
7722 ICONIFIED = 2,
7723 MAXIMIZED = 4,
7724 STICKY = 8,
7725 FULLSCREEN = 16,
7726 ABOVE = 32,
7727 BELOW = 64
7729 enum WindowType {
7730 ROOT = 0,
7731 TOPLEVEL = 1,
7732 CHILD = 2,
7733 DIALOG = 3,
7734 TEMP = 4,
7735 FOREIGN = 5,
7736 OFFSCREEN = 6
7738 enum WindowTypeHint {
7739 NORMAL = 0,
7740 DIALOG = 1,
7741 MENU = 2,
7742 TOOLBAR = 3,
7743 SPLASHSCREEN = 4,
7744 UTILITY = 5,
7745 DOCK = 6,
7746 DESKTOP = 7,
7747 DROPDOWN_MENU = 8,
7748 POPUP_MENU = 9,
7749 TOOLTIP = 10,
7750 NOTIFICATION = 11,
7751 COMBO = 12,
7752 DND = 13
7754 // Unintrospectable function: add_client_message_filter() / gdk_add_client_message_filter()
7755 static void add_client_message_filter(Atom message_type, FilterFunc func, void* data) {
7756 gdk_add_client_message_filter(message_type, func, data);
7760 // Appends gdk option entries to the passed in option group. This is
7761 // not public API and must not be used by applications.
7762 // <group>: An option group.
7763 static void add_option_entries_libgtk_only(GLib2.OptionGroup* group) {
7764 gdk_add_option_entries_libgtk_only(group);
7767 // Unintrospectable function: atom_intern() / gdk_atom_intern()
7768 static Atom atom_intern(char* atom_name, int only_if_exists) {
7769 return gdk_atom_intern(atom_name, only_if_exists);
7773 // Unintrospectable function: atom_intern_static_string() / gdk_atom_intern_static_string()
7774 // Finds or creates an atom corresponding to a given string.
7775 // Note that this function is identical to gdk_atom_intern() except
7776 // that if a new #GdkAtom is created the string itself is used rather
7777 // than a copy. This saves memory, but can only be used if the string
7778 // will <emphasis>always</emphasis> exist. It can be used with statically
7779 // allocated strings in the main program, but not with statically
7780 // allocated memory in dynamically loaded modules, if you expect to
7781 // ever unload the module again (e.g. do not use this function in
7782 // GTK+ theme engines).
7783 // RETURNS: the atom corresponding to @atom_name
7784 // <atom_name>: a static string
7785 static Atom atom_intern_static_string(char* atom_name) {
7786 return gdk_atom_intern_static_string(atom_name);
7789 static char* /*new*/ atom_name(Atom atom) {
7790 return gdk_atom_name(atom);
7793 // Emits a short beep on the default display.
7794 static void beep() {
7795 gdk_beep();
7798 // Unintrospectable function: bitmap_create_from_data() / gdk_bitmap_create_from_data()
7799 static Bitmap* bitmap_create_from_data(Drawable* drawable, char* data, int width, int height) {
7800 return gdk_bitmap_create_from_data(drawable, data, width, height);
7804 // Creates a Cairo context for drawing to @drawable.
7805 // <note><para>
7806 // Note that due to double-buffering, Cairo contexts created
7807 // in a GTK+ expose event handler cannot be cached and reused
7808 // between different expose events.
7809 // </para></note>
7810 // cairo_destroy() when you are done drawing.
7811 // RETURNS: A newly created Cairo context. Free with
7812 // <drawable>: a #GdkDrawable
7813 static cairo.Context* /*new*/ cairo_create(Drawable* drawable) {
7814 return gdk_cairo_create(drawable);
7818 // Adds the given rectangle to the current path of @cr.
7819 // <cr>: a #cairo_t
7820 // <rectangle>: a #GdkRectangle
7821 static void cairo_rectangle(cairo.Context* cr, Rectangle* rectangle) {
7822 gdk_cairo_rectangle(cr, rectangle);
7826 // Adds the given region to the current path of @cr.
7827 // <cr>: a #cairo_t
7828 // <region>: a #GdkRegion
7829 static void cairo_region(cairo.Context* cr, Region* region) {
7830 gdk_cairo_region(cr, region);
7834 // Resets the clip region for a Cairo context created by gdk_cairo_create().
7835 // This resets the clip region to the "empty" state for the given drawable.
7836 // This is required for non-native windows since a direct call to
7837 // cairo_reset_clip() would unset the clip region inherited from the
7838 // drawable (i.e. the window clip region), and thus let you e.g.
7839 // draw outside your window.
7840 // This is rarely needed though, since most code just create a new cairo_t
7841 // using gdk_cairo_create() each time they want to draw something.
7842 // <cr>: a #cairo_t
7843 // <drawable>: a #GdkDrawable
7844 static void cairo_reset_clip(cairo.Context* cr, Drawable* drawable) {
7845 gdk_cairo_reset_clip(cr, drawable);
7849 // Sets the specified #GdkColor as the source color of @cr.
7850 // <cr>: a #cairo_t
7851 // <color>: a #GdkColor
7852 static void cairo_set_source_color(cairo.Context* cr, Color* color) {
7853 gdk_cairo_set_source_color(cr, color);
7857 // Sets the given pixbuf as the source pattern for the Cairo context.
7858 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
7859 // so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y
7860 // <cr>: a #Cairo context
7861 // <pixbuf>: a #GdkPixbuf
7862 // <pixbuf_x>: X coordinate of location to place upper left corner of @pixbuf
7863 // <pixbuf_y>: Y coordinate of location to place upper left corner of @pixbuf
7864 static void cairo_set_source_pixbuf(cairo.Context* cr, GdkPixbuf2.Pixbuf* pixbuf, double pixbuf_x, double pixbuf_y) {
7865 gdk_cairo_set_source_pixbuf(cr, pixbuf, pixbuf_x, pixbuf_y);
7869 // Sets the given pixmap as the source pattern for the Cairo context.
7870 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
7871 // so that the origin of @pixmap is @pixmap_x, @pixmap_y
7872 // with #GdkPixmap). Instead, use gdk_cairo_set_source_window() where
7873 // appropriate.
7874 // <cr>: a #Cairo context
7875 // <pixmap>: a #GdkPixmap
7876 // <pixmap_x>: X coordinate of location to place upper left corner of @pixmap
7877 // <pixmap_y>: Y coordinate of location to place upper left corner of @pixmap
7878 static void cairo_set_source_pixmap(cairo.Context* cr, Pixmap* pixmap, double pixmap_x, double pixmap_y) {
7879 gdk_cairo_set_source_pixmap(cr, pixmap, pixmap_x, pixmap_y);
7883 // Sets the given window as the source pattern for the Cairo context.
7884 // The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
7885 // so that the origin of @window is @x, @y. The window contains all its
7886 // subwindows when rendering.
7887 // Note that the contents of @window are undefined outside of the
7888 // visible part of @window, so use this function with care.
7889 // <cr>: a #Cairo context
7890 // <window>: a #GdkWindow
7891 // <x>: X coordinate of location to place upper left corner of @window
7892 // <y>: Y coordinate of location to place upper left corner of @window
7893 static void cairo_set_source_window(cairo.Context* cr, Window* window, double x, double y) {
7894 gdk_cairo_set_source_window(cr, window, x, y);
7898 // Determines the total height of a given character.
7899 // This value is not generally useful, because you cannot
7900 // determine how this total height will be drawn in
7901 // relation to the baseline. See gdk_text_extents().
7902 // RETURNS: the height of the character in pixels.
7903 // <font>: a #GdkFont
7904 // <character>: the character to measure.
7905 static int char_height(Font* font, char character) {
7906 return gdk_char_height(font, character);
7910 // Determines the distance from the origin to the rightmost
7911 // portion of a character when drawn. This is not the
7912 // correct value for determining the origin of the next
7913 // portion when drawing text in multiple pieces.
7914 // RETURNS: the right bearing of the character in pixels.
7915 // <font>: a #GdkFont
7916 // <character>: the character to measure.
7917 static int char_measure(Font* font, char character) {
7918 return gdk_char_measure(font, character);
7922 // Determines the width of a given character.
7923 // RETURNS: the width of the character in pixels.
7924 // <font>: a #GdkFont
7925 // <character>: the character to measure.
7926 static int char_width(Font* font, char character) {
7927 return gdk_char_width(font, character);
7931 // Determines the width of a given wide character. (Encoded
7932 // in the wide-character encoding of the current locale).
7933 // RETURNS: the width of the character in pixels.
7934 // <font>: a #GdkFont
7935 // <character>: the character to measure.
7936 static int char_width_wc(Font* font, WChar character) {
7937 return gdk_char_width_wc(font, character);
7941 // Allocates a single color from a colormap.
7942 // RETURNS: %TRUE if the allocation succeeded.
7943 // <colormap>: a #GdkColormap.
7944 // <color>: The color to allocate. On return, the <structfield>pixel</structfield> field will be filled in.
7945 static int color_alloc(Colormap* colormap, Color* color) {
7946 return gdk_color_alloc(colormap, color);
7950 // Returns the black color for a given colormap. The resulting
7951 // value has already been allocated.
7952 // RETURNS: %TRUE if the allocation succeeded.
7953 // <colormap>: a #GdkColormap.
7954 // <color>: the location to store the color.
7955 static int color_black(Colormap* colormap, Color* color) {
7956 return gdk_color_black(colormap, color);
7960 // Changes the value of a color that has already
7961 // been allocated. If @colormap is not a private
7962 // colormap, then the color must have been allocated
7963 // using gdk_colormap_alloc_colors() with the
7964 // RETURNS: %TRUE if the color was successfully changed.
7965 // <colormap>: a #GdkColormap.
7966 // <color>: a #GdkColor, with the color to change in the <structfield>pixel</structfield> field, and the new value in the remaining fields.
7967 static int color_change(Colormap* colormap, Color* color) {
7968 return gdk_color_change(colormap, color);
7972 // Parses a textual specification of a color and fill in the
7973 // <structfield>red</structfield>, <structfield>green</structfield>,
7974 // and <structfield>blue</structfield> fields of a #GdkColor
7975 // structure. The color is <emphasis>not</emphasis> allocated, you
7976 // must call gdk_colormap_alloc_color() yourself. The string can
7977 // either one of a large set of standard names. (Taken from the X11
7978 // <filename>rgb.txt</filename> file), or it can be a hex value in the
7979 // form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or
7980 // '&num;rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the
7981 // red, green, and blue components of the color, respectively. (White
7982 // in the four forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and
7983 // '&num;ffffffffffff')
7984 // RETURNS: %TRUE if the parsing succeeded.
7985 // <spec>: the string specifying the color.
7986 // <color>: the #GdkColor to fill in
7987 static int color_parse(char* spec, /*out*/ Color* color) {
7988 return gdk_color_parse(spec, color);
7992 // Returns the white color for a given colormap. The resulting
7993 // value has already allocated been allocated.
7994 // RETURNS: %TRUE if the allocation succeeded.
7995 // <colormap>: a #GdkColormap.
7996 // <color>: the location to store the color.
7997 static int color_white(Colormap* colormap, Color* color) {
7998 return gdk_color_white(colormap, color);
8002 // Allocates colors from a colormap. This function
8003 // is obsolete. See gdk_colormap_alloc_colors().
8004 // For full documentation of the fields, see
8005 // the Xlib documentation for <function>XAllocColorCells()</function>.
8006 // RETURNS: %TRUE if the allocation was successful
8007 // <colormap>: a #GdkColormap.
8008 // <contiguous>: if %TRUE, the colors should be allocated in contiguous color cells.
8009 // <planes>: an array in which to store the plane masks.
8010 // <nplanes>: the number of planes to allocate. (Or zero, to indicate that the color allocation should not be planar.)
8011 // <pixels>: an array into which to store allocated pixel values.
8012 // <npixels>: the number of pixels in each plane to allocate.
8013 static int colors_alloc(Colormap* colormap, int contiguous, c_ulong* planes, int nplanes, c_ulong* pixels, int npixels) {
8014 return gdk_colors_alloc(colormap, contiguous, planes, nplanes, pixels, npixels);
8018 // Frees colors allocated with gdk_colors_alloc(). This
8019 // function is obsolete. See gdk_colormap_free_colors().
8020 // <colormap>: a #GdkColormap.
8021 // <pixels>: the pixel values of the colors to free.
8022 // <npixels>: the number of values in @pixels.
8023 // <planes>: the plane masks for all planes to free, OR'd together.
8024 static void colors_free(Colormap* colormap, c_ulong* pixels, int npixels, c_ulong planes) {
8025 gdk_colors_free(colormap, pixels, npixels, planes);
8029 // Changes the value of the first @ncolors colors in
8030 // a private colormap. This function is obsolete and
8031 // should not be used. See gdk_color_change().
8032 // <colormap>: a #GdkColormap.
8033 // <colors>: the new color values.
8034 // <ncolors>: the number of colors to change.
8035 static void colors_store(Colormap* colormap, Color* colors, int ncolors) {
8036 gdk_colors_store(colormap, colors, ncolors);
8040 // Returns the list of available input devices for the default display.
8041 // The list is statically allocated and should not be freed.
8042 // RETURNS: a list of #GdkDevice
8043 static GLib2.List* devices_list() {
8044 return gdk_devices_list();
8048 // Aborts a drag without dropping.
8049 // This function is called by the drag source.
8050 // <context>: a #GdkDragContext.
8051 // <time_>: the timestamp for this operation.
8052 static void drag_abort(DragContext* context, uint time_) {
8053 gdk_drag_abort(context, time_);
8057 // Unintrospectable function: drag_begin() / gdk_drag_begin()
8058 // Starts a drag and creates a new drag context for it.
8059 // This function is called by the drag source.
8060 // RETURNS: a newly created #GdkDragContext.
8061 // <window>: the source window for this drag.
8062 // <targets>: the offered targets, as list of #GdkAtom<!-- -->s
8063 static DragContext* drag_begin(Window* window, GLib2.List* targets) {
8064 return gdk_drag_begin(window, targets);
8068 // Drops on the current destination.
8069 // This function is called by the drag source.
8070 // <context>: a #GdkDragContext.
8071 // <time_>: the timestamp for this operation.
8072 static void drag_drop(DragContext* context, uint time_) {
8073 gdk_drag_drop(context, time_);
8077 // Returns whether the dropped data has been successfully
8078 // transferred. This function is intended to be used while
8079 // handling a %GDK_DROP_FINISHED event, its return value is
8080 // meaningless at other times.
8081 // RETURNS: %TRUE if the drop was successful.
8082 // <context>: a #GdkDragContext
8083 static int drag_drop_succeeded(DragContext* context) {
8084 return gdk_drag_drop_succeeded(context);
8088 // Finds the destination window and DND protocol to use at the
8089 // given pointer position.
8090 // This function is called by the drag source to obtain the
8091 // <context>: a #GdkDragContext.
8092 // <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.
8093 // <x_root>: the x position of the pointer in root coordinates.
8094 // <y_root>: the y position of the pointer in root coordinates.
8095 // <dest_window>: location to store the destination window in.
8096 // <protocol>: location to store the DND protocol in.
8097 static void drag_find_window(DragContext* context, Window* drag_window, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol) {
8098 gdk_drag_find_window(context, drag_window, x_root, y_root, dest_window, protocol);
8102 // Finds the destination window and DND protocol to use at the
8103 // given pointer position.
8104 // This function is called by the drag source to obtain the
8105 // <context>: a #GdkDragContext
8106 // <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.
8107 // <screen>: the screen where the destination window is sought.
8108 // <x_root>: the x position of the pointer in root coordinates.
8109 // <y_root>: the y position of the pointer in root coordinates.
8110 // <dest_window>: location to store the destination window in.
8111 // <protocol>: location to store the DND protocol in.
8112 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) {
8113 gdk_drag_find_window_for_screen(context, drag_window, screen, x_root, y_root, dest_window, protocol);
8117 // Finds out the DND protocol supported by a window.
8118 // the drop should happen. This may be @xid or the id of a proxy
8119 // window, or zero if @xid doesn't support Drag and Drop.
8120 // RETURNS: the windowing system specific id for the window where
8121 // <xid>: the windowing system id of the destination window.
8122 // <protocol>: location where the supported DND protocol is returned.
8123 static NativeWindow drag_get_protocol(NativeWindow xid, DragProtocol* protocol) {
8124 return gdk_drag_get_protocol(xid, protocol);
8128 // Finds out the DND protocol supported by a window.
8129 // 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.
8130 // <display>: the #GdkDisplay where the destination window resides
8131 // <xid>: the windowing system id of the destination window.
8132 // <protocol>: location where the supported DND protocol is returned.
8133 static NativeWindow drag_get_protocol_for_display(Display* display, NativeWindow xid, DragProtocol* protocol) {
8134 return gdk_drag_get_protocol_for_display(display, xid, protocol);
8138 // Unintrospectable function: drag_get_selection() / gdk_drag_get_selection()
8139 // Returns the selection atom for the current source window.
8140 // RETURNS: the selection atom.
8141 // <context>: a #GdkDragContext.
8142 static Atom drag_get_selection(DragContext* context) {
8143 return gdk_drag_get_selection(context);
8147 // Updates the drag context when the pointer moves or the
8148 // set of actions changes.
8149 // This function is called by the drag source.
8150 // RETURNS: FIXME
8151 // <context>: a #GdkDragContext.
8152 // <dest_window>: the new destination window, obtained by gdk_drag_find_window().
8153 // <protocol>: the DND protocol in use, obtained by gdk_drag_find_window().
8154 // <x_root>: the x position of the pointer in root coordinates.
8155 // <y_root>: the y position of the pointer in root coordinates.
8156 // <suggested_action>: the suggested action.
8157 // <possible_actions>: the possible actions.
8158 // <time_>: the timestamp for this operation.
8159 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_) {
8160 return gdk_drag_motion(context, dest_window, protocol, x_root, y_root, suggested_action, possible_actions, time_);
8164 // Selects one of the actions offered by the drag source.
8165 // This function is called by the drag destination in response to
8166 // gdk_drag_motion() called by the drag source.
8167 // <context>: a #GdkDragContext.
8168 // <action>: the selected action which will be taken when a drop happens, or 0 to indicate that a drop will not be accepted.
8169 // <time_>: the timestamp for this operation.
8170 static void drag_status(DragContext* context, DragAction action, uint time_) {
8171 gdk_drag_status(context, action, time_);
8175 // Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
8176 // rectangle of the entire ellipse, and the start and end angles of the part
8177 // of the ellipse to be drawn.
8178 // instead. Note that arcs just like any drawing operation in Cairo are
8179 // antialiased unless you call cairo_set_antialias().
8180 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8181 // <gc>: a #GdkGC.
8182 // <filled>: %TRUE if the arc should be filled, producing a 'pie slice'.
8183 // <x>: the x coordinate of the left edge of the bounding rectangle.
8184 // <y>: the y coordinate of the top edge of the bounding rectangle.
8185 // <width>: the width of the bounding rectangle.
8186 // <height>: the height of the bounding rectangle.
8187 // <angle1>: the start angle of the arc, relative to the 3 o'clock position, counter-clockwise, in 1/64ths of a degree.
8188 // <angle2>: the end angle of the arc, relative to @angle1, in 1/64ths of a degree.
8189 static void draw_arc(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2) {
8190 gdk_draw_arc(drawable, gc, filled, x, y, width, height, angle1, angle2);
8194 // Copies the @width x @height region of @src at coordinates (@xsrc,
8195 // Most fields in @gc are not used for this operation, but notably the
8196 // clip mask or clip region will be honored.
8197 // The source and destination drawables must have the same visual and
8198 // colormap, or errors will result. (On X11, failure to match
8199 // visual/colormap results in a BadMatch error from the X server.)
8200 // A common cause of this problem is an attempt to draw a bitmap to
8201 // a color drawable. The way to draw a bitmap is to set the bitmap as
8202 // the stipple on the #GdkGC, set the fill mode to %GDK_STIPPLED, and
8203 // then draw the rectangle.
8204 // and cairo_fill() to draw pixmap on top of other drawables. Also keep
8205 // in mind that the limitations on allowed sources do not apply to Cairo.
8206 // <drawable>: a #GdkDrawable
8207 // <gc>: a #GdkGC sharing the drawable's visual and colormap
8208 // <src>: the source #GdkDrawable, which may be the same as @drawable
8209 // <xsrc>: X position in @src of rectangle to draw
8210 // <ysrc>: Y position in @src of rectangle to draw
8211 // <xdest>: X position in @drawable where the rectangle should be drawn
8212 // <ydest>: Y position in @drawable where the rectangle should be drawn
8213 // <width>: width of rectangle to draw, or -1 for entire @src width
8214 // <height>: height of rectangle to draw, or -1 for entire @src height
8215 static void draw_drawable(Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height) {
8216 gdk_draw_drawable(drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height);
8220 // This is a low-level function; 99% of text rendering should be done
8221 // using gdk_draw_layout() instead.
8222 // A glyph is a single image in a font. This function draws a sequence of
8223 // glyphs. To obtain a sequence of glyphs you have to understand a
8224 // lot about internationalized text handling, which you don't want to
8225 // understand; thus, use gdk_draw_layout() instead of this function,
8226 // gdk_draw_layout() handles the details.
8227 // <drawable>: a #GdkDrawable
8228 // <gc>: a #GdkGC
8229 // <font>: font to be used
8230 // <x>: X coordinate of baseline origin
8231 // <y>: Y coordinate of baseline origin
8232 // <glyphs>: the glyph string to draw
8233 static void draw_glyphs(Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) {
8234 gdk_draw_glyphs(drawable, gc, font, x, y, glyphs);
8238 // Renders a #PangoGlyphString onto a drawable, possibly
8239 // transforming the layed-out coordinates through a transformation
8240 // matrix. Note that the transformation matrix for @font is not
8241 // changed, so to produce correct rendering results, the @font
8242 // must have been loaded using a #PangoContext with an identical
8243 // transformation matrix to that passed in to this function.
8244 // See also gdk_draw_glyphs(), gdk_draw_layout().
8245 // <drawable>: a #GdkDrawable
8246 // <gc>: a #GdkGC
8247 // <matrix>: a #PangoMatrix, or %NULL to use an identity transformation
8248 // <font>: the font in which to draw the string
8249 // <x>: the x position of the start of the string (in Pango units in user space coordinates)
8250 // <y>: the y position of the baseline (in Pango units in user space coordinates)
8251 // <glyphs>: the glyph string to draw
8252 static void draw_glyphs_transformed(Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs) {
8253 gdk_draw_glyphs_transformed(drawable, gc, matrix, font, x, y, glyphs);
8256 static void draw_gray_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) {
8257 gdk_draw_gray_image(drawable, gc, x, y, width, height, dith, buf, rowstride);
8261 // Draws a #GdkImage onto a drawable.
8262 // The depth of the #GdkImage must match the depth of the #GdkDrawable.
8263 // surfaces.
8264 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8265 // <gc>: a #GdkGC.
8266 // <image>: the #GdkImage to draw.
8267 // <xsrc>: the left edge of the source rectangle within @image.
8268 // <ysrc>: the top of the source rectangle within @image.
8269 // <xdest>: the x coordinate of the destination within @drawable.
8270 // <ydest>: the y coordinate of the destination within @drawable.
8271 // <width>: the width of the area to be copied, or -1 to make the area extend to the right edge of @image.
8272 // <height>: the height of the area to be copied, or -1 to make the area extend to the bottom edge of @image.
8273 static void draw_image(Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) {
8274 gdk_draw_image(drawable, gc, image, xsrc, ysrc, xdest, ydest, width, height);
8277 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) {
8278 gdk_draw_indexed_image(drawable, gc, x, y, width, height, dith, buf, rowstride, cmap);
8282 // Render a #PangoLayout onto a GDK drawable
8283 // If the layout's #PangoContext has a transformation matrix set, then
8284 // bounding box (in device space) of the transformed layout.
8285 // If you're using GTK+, the usual way to obtain a #PangoLayout
8286 // is gtk_widget_create_pango_layout().
8287 // <drawable>: the drawable on which to draw string
8288 // <gc>: base graphics context to use
8289 // <x>: the X position of the left of the layout (in pixels)
8290 // <y>: the Y position of the top of the layout (in pixels)
8291 // <layout>: a #PangoLayout
8292 static void draw_layout(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout) {
8293 gdk_draw_layout(drawable, gc, x, y, layout);
8297 // Render a #PangoLayoutLine onto an GDK drawable
8298 // If the layout's #PangoContext has a transformation matrix set, then
8299 // (left is in before-tranform user coordinates) in after-transform
8300 // device coordinates.
8301 // <drawable>: the drawable on which to draw the line
8302 // <gc>: base graphics to use
8303 // <x>: the x position of start of string (in pixels)
8304 // <y>: the y position of baseline (in pixels)
8305 // <line>: a #PangoLayoutLine
8306 static void draw_layout_line(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line) {
8307 gdk_draw_layout_line(drawable, gc, x, y, line);
8311 // Render a #PangoLayoutLine onto a #GdkDrawable, overriding the
8312 // layout's normal colors with @foreground and/or @background.
8313 // If the layout's #PangoContext has a transformation matrix set, then
8314 // (left is in before-tranform user coordinates) in after-transform
8315 // device coordinates.
8316 // <drawable>: the drawable on which to draw the line
8317 // <gc>: base graphics to use
8318 // <x>: the x position of start of string (in pixels)
8319 // <y>: the y position of baseline (in pixels)
8320 // <line>: a #PangoLayoutLine
8321 // <foreground>: foreground override color, or %NULL for none
8322 // <background>: background override color, or %NULL for none
8323 static void draw_layout_line_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line, Color* foreground=null, Color* background=null) {
8324 gdk_draw_layout_line_with_colors(drawable, gc, x, y, line, foreground, background);
8328 // Render a #PangoLayout onto a #GdkDrawable, overriding the
8329 // layout's normal colors with @foreground and/or @background.
8330 // If the layout's #PangoContext has a transformation matrix set, then
8331 // bounding box (in device space) of the transformed layout.
8332 // If you're using GTK+, the ususal way to obtain a #PangoLayout
8333 // is gtk_widget_create_pango_layout().
8334 // <drawable>: the drawable on which to draw string
8335 // <gc>: base graphics context to use
8336 // <x>: the X position of the left of the layout (in pixels)
8337 // <y>: the Y position of the top of the layout (in pixels)
8338 // <layout>: a #PangoLayout
8339 // <foreground>: foreground override color, or %NULL for none
8340 // <background>: background override color, or %NULL for none
8341 static void draw_layout_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout, Color* foreground=null, Color* background=null) {
8342 gdk_draw_layout_with_colors(drawable, gc, x, y, layout, foreground, background);
8346 // Draws a line, using the foreground color and other attributes of
8347 // the #GdkGC.
8348 // Be aware that the default line width in Cairo is 2 pixels and that your
8349 // coordinates need to describe the center of the line. To draw a single
8350 // pixel wide pixel-aligned line, you would use:
8351 // |[cairo_set_line_width (cr, 1.0);
8352 // cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
8353 // cairo_move_to (cr, 0.5, 0.5);
8354 // cairo_line_to (cr, 9.5, 0.5);
8355 // cairo_stroke (cr);]|
8356 // See also <ulink url="http://cairographics.org/FAQ/#sharp_lines">the Cairo
8357 // FAQ</ulink> on this topic.
8358 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8359 // <gc>: a #GdkGC.
8360 // <x1_>: the x coordinate of the start point.
8361 // <y1_>: the y coordinate of the start point.
8362 // <x2_>: the x coordinate of the end point.
8363 // <y2_>: the y coordinate of the end point.
8364 static void draw_line(Drawable* drawable, GC* gc, int x1_, int y1_, int x2_, int y2_) {
8365 gdk_draw_line(drawable, gc, x1_, y1_, x2_, y2_);
8369 // Draws a series of lines connecting the given points.
8370 // The way in which joins between lines are draw is determined by the
8371 // #GdkCapStyle value in the #GdkGC. This can be set with
8372 // gdk_gc_set_line_attributes().
8373 // documentation of gdk_draw_line() for notes on line drawing with Cairo.
8374 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8375 // <gc>: a #GdkGC.
8376 // <points>: an array of #GdkPoint structures specifying the endpoints of the
8377 // <n_points>: the size of the @points array.
8378 static void draw_lines(Drawable* drawable, GC* gc, Point* points, int n_points) {
8379 gdk_draw_lines(drawable, gc, points, n_points);
8383 // Renders a rectangular portion of a pixbuf to a drawable. The destination
8384 // drawable must have a colormap. All windows have a colormap, however, pixmaps
8385 // only have colormap by default if they were created with a non-%NULL window
8386 // argument. Otherwise a colormap must be set on them with
8387 // gdk_drawable_set_colormap().
8388 // On older X servers, rendering pixbufs with an alpha channel involves round
8389 // trips to the X server, and may be somewhat slow.
8390 // If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
8391 // function is accelerated using mediaLib, which provides hardware
8392 // acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib
8393 // support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
8394 // variable.
8395 // cairo_rectangle() and cairo_fill() instead.
8396 // <drawable>: Destination drawable.
8397 // <gc>: a #GdkGC, used for clipping, or %NULL
8398 // <pixbuf>: a #GdkPixbuf
8399 // <src_x>: Source X coordinate within pixbuf.
8400 // <src_y>: Source Y coordinates within pixbuf.
8401 // <dest_x>: Destination X coordinate within drawable.
8402 // <dest_y>: Destination Y coordinate within drawable.
8403 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width.
8404 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height.
8405 // <dither>: Dithering mode for #GdkRGB.
8406 // <x_dither>: X offset for dither.
8407 // <y_dither>: Y offset for dither.
8408 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) {
8409 gdk_draw_pixbuf(drawable, gc, pixbuf, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither);
8413 // Draws a point, using the foreground color and other attributes of
8414 // the #GdkGC.
8415 // cairo_move_to() and cairo_stroke() instead.
8416 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8417 // <gc>: a #GdkGC.
8418 // <x>: the x coordinate of the point.
8419 // <y>: the y coordinate of the point.
8420 static void draw_point(Drawable* drawable, GC* gc, int x, int y) {
8421 gdk_draw_point(drawable, gc, x, y);
8425 // Draws a number of points, using the foreground color and other
8426 // attributes of the #GdkGC.
8427 // cairo_fill() instead.
8428 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8429 // <gc>: a #GdkGC.
8430 // <points>: an array of #GdkPoint structures.
8431 // <n_points>: the number of points to be drawn.
8432 static void draw_points(Drawable* drawable, GC* gc, Point* points, int n_points) {
8433 gdk_draw_points(drawable, gc, points, n_points);
8437 // Draws an outlined or filled polygon.
8438 // cairo_fill() or cairo_stroke() instead.
8439 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8440 // <gc>: a #GdkGC.
8441 // <filled>: %TRUE if the polygon should be filled. The polygon is closed automatically, connecting the last point to the first point if necessary.
8442 // <points>: an array of #GdkPoint structures specifying the points making up the polygon.
8443 // <n_points>: the number of points.
8444 static void draw_polygon(Drawable* drawable, GC* gc, int filled, Point* points, int n_points) {
8445 gdk_draw_polygon(drawable, gc, filled, points, n_points);
8449 // Draws a rectangular outline or filled rectangle, using the foreground color
8450 // and other attributes of the #GdkGC.
8451 // A rectangle drawn filled is 1 pixel smaller in both dimensions than a
8452 // rectangle outlined. Calling
8453 // <literal>gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20)</literal>
8454 // results in a filled rectangle 20 pixels wide and 20 pixels high. Calling
8455 // <literal>gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20)</literal>
8456 // results in an outlined rectangle with corners at (0, 0), (0, 20), (20, 20),
8457 // and (20, 0), which makes it 21 pixels wide and 21 pixels high.
8458 // instead. For stroking, the same caveats for converting code apply as for
8459 // gdk_draw_line().
8460 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8461 // <gc>: a #GdkGC.
8462 // <filled>: %TRUE if the rectangle should be filled.
8463 // <x>: the x coordinate of the left edge of the rectangle.
8464 // <y>: the y coordinate of the top edge of the rectangle.
8465 // <width>: the width of the rectangle.
8466 // <height>: the height of the rectangle.
8467 static void draw_rectangle(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height) {
8468 gdk_draw_rectangle(drawable, gc, filled, x, y, width, height);
8471 static void draw_rgb_32_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride) {
8472 gdk_draw_rgb_32_image(drawable, gc, x, y, width, height, dith, buf, rowstride);
8476 // Like gdk_draw_rgb_32_image(), but allows you to specify the dither
8477 // offsets. See gdk_draw_rgb_image_dithalign() for more details.
8478 // <drawable>: a #GdkDrawable
8479 // <gc>: a #GdkGC
8480 // <x>: X coordinate on @drawable where image should go
8481 // <y>: Y coordinate on @drawable where image should go
8482 // <width>: width of area of image to draw
8483 // <height>: height of area of image to draw
8484 // <dith>: dithering mode
8485 // <buf>: RGB image data
8486 // <rowstride>: rowstride of RGB image data
8487 // <xdith>: X dither offset
8488 // <ydith>: Y dither offset
8489 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) {
8490 gdk_draw_rgb_32_image_dithalign(drawable, gc, x, y, width, height, dith, buf, rowstride, xdith, ydith);
8493 static void draw_rgb_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride) {
8494 gdk_draw_rgb_image(drawable, gc, x, y, width, height, dith, rgb_buf, rowstride);
8497 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) {
8498 gdk_draw_rgb_image_dithalign(drawable, gc, x, y, width, height, dith, rgb_buf, rowstride, xdith, ydith);
8502 // Draws a number of unconnected lines.
8503 // instead. See the documentation of gdk_draw_line() for notes on line drawing
8504 // with Cairo.
8505 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8506 // <gc>: a #GdkGC.
8507 // <segs>: an array of #GdkSegment structures specifying the start and end points of the lines to be drawn.
8508 // <n_segs>: the number of line segments to draw, i.e. the size of the
8509 static void draw_segments(Drawable* drawable, GC* gc, Segment* segs, int n_segs) {
8510 gdk_draw_segments(drawable, gc, segs, n_segs);
8514 // Draws a string of characters in the given font or fontset.
8515 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8516 // <font>: a #GdkFont.
8517 // <gc>: a #GdkGC.
8518 // <x>: the x coordinate of the left edge of the text.
8519 // <y>: the y coordinate of the baseline of the text.
8520 // <string>: the string of characters to draw.
8521 static void draw_string(Drawable* drawable, Font* font, GC* gc, int x, int y, char* string_) {
8522 gdk_draw_string(drawable, font, gc, x, y, string_);
8526 // Draws a number of characters in the given font or fontset.
8527 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8528 // <font>: a #GdkFont.
8529 // <gc>: a #GdkGC.
8530 // <x>: the x coordinate of the left edge of the text.
8531 // <y>: the y coordinate of the baseline of the text.
8532 // <text>: the characters to draw.
8533 // <text_length>: the number of characters of @text to draw.
8534 static void draw_text(Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length) {
8535 gdk_draw_text(drawable, font, gc, x, y, text, text_length);
8539 // Draws a number of wide characters using the given font of fontset.
8540 // If the font is a 1-byte font, the string is converted into 1-byte
8541 // characters (discarding the high bytes) before output.
8542 // <drawable>: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
8543 // <font>: a #GdkFont.
8544 // <gc>: a #GdkGC.
8545 // <x>: the x coordinate of the left edge of the text.
8546 // <y>: the y coordinate of the baseline of the text.
8547 // <text>: the wide characters to draw.
8548 // <text_length>: the number of characters to draw.
8549 static void draw_text_wc(Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length) {
8550 gdk_draw_text_wc(drawable, font, gc, x, y, text, text_length);
8554 // Draws a set of anti-aliased trapezoids. The trapezoids are
8555 // combined using saturation addition, then drawn over the background
8556 // as a set. This is low level functionality used internally to implement
8557 // rotated underlines and backgrouds when rendering a PangoLayout and is
8558 // likely not useful for applications.
8559 // instead.
8560 // <drawable>: a #GdkDrawable
8561 // <gc>: a #GdkGC
8562 // <trapezoids>: an array of #GdkTrapezoid structures
8563 // <n_trapezoids>: the number of trapezoids to draw
8564 static void draw_trapezoids(Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids) {
8565 gdk_draw_trapezoids(drawable, gc, trapezoids, n_trapezoids);
8569 // Ends the drag operation after a drop.
8570 // This function is called by the drag destination.
8571 // <context>: a #GtkDragContext.
8572 // <success>: %TRUE if the data was successfully received.
8573 // <time_>: the timestamp for this operation.
8574 static void drop_finish(DragContext* context, int success, uint time_) {
8575 gdk_drop_finish(context, success, time_);
8579 // Accepts or rejects a drop.
8580 // This function is called by the drag destination in response
8581 // to a drop initiated by the drag source.
8582 // <context>: a #GdkDragContext.
8583 // <ok>: %TRUE if the drop is accepted.
8584 // <time_>: the timestamp for this operation.
8585 static void drop_reply(DragContext* context, int ok, uint time_) {
8586 gdk_drop_reply(context, ok, time_);
8589 static int error_trap_pop() {
8590 return gdk_error_trap_pop();
8593 static void error_trap_push() {
8594 gdk_error_trap_push();
8598 // Checks all open displays for a #GdkEvent to process,to be processed
8599 // on, fetching events from the windowing system if necessary.
8600 // See gdk_display_get_event().
8601 // are pending. The returned #GdkEvent should be freed with gdk_event_free().
8602 // RETURNS: the next #GdkEvent to be processed, or %NULL if no events
8603 static Event* /*new*/ event_get() {
8604 return gdk_event_get();
8607 static Event* /*new*/ event_get_graphics_expose(Window* window) {
8608 return gdk_event_get_graphics_expose(window);
8612 // Sets the function to call to handle all events from GDK.
8613 // Note that GTK+ uses this to install its own event handler, so it is
8614 // usually not useful for GTK+ applications. (Although an application
8615 // can call this function then call gtk_main_do_event() to pass
8616 // events to GTK+.)
8617 // <func>: the function to call to handle events from GDK.
8618 // <data>: user data to pass to the function.
8619 // <notify>: the function to call when the handler function is removed, i.e. when gdk_event_handler_set() is called with another event handler.
8620 static void event_handler_set(EventFunc func, void* data, GLib2.DestroyNotify notify) {
8621 gdk_event_handler_set(func, data, notify);
8625 // If there is an event waiting in the event queue of some open
8626 // display, returns a copy of it. See gdk_display_peek_event().
8627 // events are in any queues. The returned #GdkEvent should be freed with
8628 // gdk_event_free().
8629 // RETURNS: a copy of the first #GdkEvent on some event queue, or %NULL if no
8630 static Event* /*new*/ event_peek() {
8631 return gdk_event_peek();
8635 // Request more motion notifies if @event is a motion notify hint event.
8636 // This function should be used instead of gdk_window_get_pointer() to
8637 // request further motion notifies, because it also works for extension
8638 // events where motion notifies are provided for devices other than the
8639 // core pointer. Coordinate extraction, processing and requesting more
8640 // motion events from a %GDK_MOTION_NOTIFY event usually works like this:
8641 // |[
8642 // {
8643 // /&ast; motion_event handler &ast;/
8644 // x = motion_event->x;
8645 // y = motion_event->y;
8646 // /&ast; handle (x,y) motion &ast;/
8647 // gdk_event_request_motions (motion_event); /&ast; handles is_hint events &ast;/
8648 // }
8649 // ]|
8650 // <event>: a valid #GdkEvent
8651 static void event_request_motions(EventMotion* event) {
8652 gdk_event_request_motions(event);
8655 static int event_send_client_message_for_display(Display* display, Event* event, NativeWindow winid) {
8656 return gdk_event_send_client_message_for_display(display, event, winid);
8659 static int events_pending() {
8660 return gdk_events_pending();
8663 static void exit(int error_code) {
8664 gdk_exit(error_code);
8667 static void flush() {
8668 gdk_flush();
8672 // Load a #GdkFont based on a Pango font description. This font will
8673 // only be an approximation of the Pango font, and
8674 // internationalization will not be handled correctly. This function
8675 // should only be used for legacy code that cannot be easily converted
8676 // to use Pango. Using Pango directly will produce better results.
8677 // cannot be loaded.
8678 // RETURNS: the newly loaded font, or %NULL if the font
8679 // <font_desc>: a #PangoFontDescription.
8680 static Font* /*new*/ font_from_description(Pango.FontDescription* font_desc) {
8681 return gdk_font_from_description(font_desc);
8684 static Font* /*new*/ font_from_description_for_display(Display* display, Pango.FontDescription* font_desc) {
8685 return gdk_font_from_description_for_display(display, font_desc);
8689 // Loads a font.
8690 // The font may be newly loaded or looked up the font in a cache.
8691 // You should make no assumptions about the initial reference count.
8692 // RETURNS: a #GdkFont, or %NULL if the font could not be loaded.
8693 // <font_name>: a XLFD describing the font to load.
8694 static Font* /*new*/ font_load(char* font_name) {
8695 return gdk_font_load(font_name);
8698 static Font* /*new*/ font_load_for_display(Display* display, char* font_name) {
8699 return gdk_font_load_for_display(display, font_name);
8702 static Font* /*new*/ fontset_load(char* fontset_name) {
8703 return gdk_fontset_load(fontset_name);
8706 static Font* /*new*/ fontset_load_for_display(Display* display, char* fontset_name) {
8707 return gdk_fontset_load_for_display(display, fontset_name);
8710 static void free_compound_text(ubyte* ctext) {
8711 gdk_free_compound_text(ctext);
8714 static void free_text_list(char** list) {
8715 gdk_free_text_list(list);
8719 // Unintrospectable function: get_default_root_window() / gdk_get_default_root_window()
8720 // Obtains the root window (parent all other windows are inside)
8721 // for the default display and screen.
8722 // RETURNS: the default root window
8723 static Window* get_default_root_window() {
8724 return gdk_get_default_root_window();
8727 static char* /*new*/ get_display() {
8728 return gdk_get_display();
8732 // Gets the display name specified in the command line arguments passed
8733 // to gdk_init() or gdk_parse_args(), if any.
8734 // this string is owned by GTK+ and must not be modified or freed.
8735 // RETURNS: the display name, if specified explicitely, otherwise %NULL
8736 static char* get_display_arg_name() {
8737 return gdk_get_display_arg_name();
8740 static char* get_program_class() {
8741 return gdk_get_program_class();
8745 // Gets whether event debugging output is enabled.
8746 // RETURNS: %TRUE if event debugging output is enabled.
8747 static int get_show_events() {
8748 return gdk_get_show_events();
8751 static int get_use_xshm() {
8752 return gdk_get_use_xshm();
8755 static void init(/*inout*/ int* argc, /*inout*/ char*** argv) {
8756 gdk_init(argc, argv);
8760 // Initialize the library for use.
8761 // Arguments:
8762 // "argc" is the number of arguments.
8763 // "argv" is an array of strings.
8764 // Results:
8765 // "argc" and "argv" are modified to reflect any arguments
8766 // which were not handled. (Such arguments should either
8767 // be handled by the application or dismissed). If initialization
8768 // fails, returns FALSE, otherwise TRUE.
8769 // Side effects:
8770 // The library is initialized.
8771 // --------------------------------------------------------------
8772 static int init_check(/*inout*/ int* argc, /*inout*/ char*** argv) {
8773 return gdk_init_check(argc, argv);
8777 // Unintrospectable function: input_add() / gdk_input_add()
8778 // Establish a callback when a condition becomes true on
8779 // a file descriptor.
8780 // gdk_input_remove().
8781 // RETURNS: a tag that can later be used as an argument to
8782 // <source>: a file descriptor.
8783 // <condition>: the condition.
8784 // <function>: the callback function.
8785 // <data>: callback data passed to @function.
8786 static int input_add(int source, InputCondition condition, InputFunction function_, void* data) {
8787 return gdk_input_add(source, condition, function_, data);
8791 // Establish a callback when a condition becomes true on
8792 // a file descriptor.
8793 // gdk_input_remove().
8794 // RETURNS: a tag that can later be used as an argument to
8795 // <source>: a file descriptor.
8796 // <condition>: the condition.
8797 // <function>: the callback function.
8798 // <data>: callback data passed to @function.
8799 // <destroy>: callback function to call with @data when the input handler is removed.
8800 static int input_add_full(int source, InputCondition condition, InputFunction function_, void* data, GLib2.DestroyNotify destroy) {
8801 return gdk_input_add_full(source, condition, function_, data, destroy);
8804 static void input_remove(int tag) {
8805 gdk_input_remove(tag);
8808 static void input_set_extension_events(Window* window, int mask, ExtensionMode mode) {
8809 gdk_input_set_extension_events(window, mask, mode);
8812 static GrabStatus keyboard_grab(Window* window, int owner_events, uint time_) {
8813 return gdk_keyboard_grab(window, owner_events, time_);
8817 // Determines information about the current keyboard grab.
8818 // This is not public API and must not be used by applications.
8819 // keyboard grabbed.
8820 // RETURNS: %TRUE if this application currently has the
8821 // <display>: the display for which to get the grab information
8822 // <grab_window>: location to store current grab window
8823 // <owner_events>: location to store boolean indicating whether the @owner_events flag to gdk_keyboard_grab() was %TRUE.
8824 static int keyboard_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events) {
8825 return gdk_keyboard_grab_info_libgtk_only(display, grab_window, owner_events);
8829 // Ungrabs the keyboard on the default display, if it is grabbed by this
8830 // application.
8831 // <time_>: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is available.
8832 static void keyboard_ungrab(uint time_) {
8833 gdk_keyboard_ungrab(time_);
8837 // Obtains the upper- and lower-case versions of the keyval @symbol.
8838 // Examples of keyvals are #GDK_a, #GDK_Enter, #GDK_F1, etc.
8839 // <symbol>: a keyval
8840 // <lower>: return location for lowercase version of @symbol
8841 // <upper>: return location for uppercase version of @symbol
8842 static void keyval_convert_case(uint symbol, /*out*/ uint* lower, /*out*/ uint* upper) {
8843 gdk_keyval_convert_case(symbol, lower, upper);
8847 // Converts a key name to a key value.
8848 // The names are the same as those in the
8849 // <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
8850 // but without the leading "GDK_KEY_".
8851 // if the key name is not a valid key
8852 // RETURNS: the corresponding key value, or %GDK_KEY_VoidSymbol
8853 // <keyval_name>: a key name
8854 static uint keyval_from_name(char* keyval_name) {
8855 return gdk_keyval_from_name(keyval_name);
8858 static int keyval_is_lower(uint keyval) {
8859 return gdk_keyval_is_lower(keyval);
8862 static int keyval_is_upper(uint keyval) {
8863 return gdk_keyval_is_upper(keyval);
8867 // Converts a key value into a symbolic name.
8868 // The names are the same as those in the
8869 // <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
8870 // but without the leading "GDK_KEY_".
8871 // or %NULL if @keyval is not a valid key. The string should not be
8872 // modified.
8873 // RETURNS: a string containing the name of the key,
8874 // <keyval>: a key value
8875 static char* keyval_name(uint keyval) {
8876 return gdk_keyval_name(keyval);
8879 static uint keyval_to_lower(uint keyval) {
8880 return gdk_keyval_to_lower(keyval);
8884 // Convert from a GDK key symbol to the corresponding ISO10646 (Unicode)
8885 // character.
8886 // is no corresponding character.
8887 // RETURNS: the corresponding unicode character, or 0 if there
8888 // <keyval>: a GDK key symbol
8889 static uint keyval_to_unicode(uint keyval) {
8890 return gdk_keyval_to_unicode(keyval);
8893 static uint keyval_to_upper(uint keyval) {
8894 return gdk_keyval_to_upper(keyval);
8898 // Lists the available visuals for the default screen.
8899 // (See gdk_screen_list_visuals())
8900 // A visual describes a hardware image data format.
8901 // For example, a visual might support 24-bit color, or 8-bit color,
8902 // and might expect pixels to be in a certain format.
8903 // Call g_list_free() on the return value when you're finished with it.
8904 // a list of visuals; the list must be freed, but not its contents
8905 static GLib2.List* /*new container*/ list_visuals() {
8906 return gdk_list_visuals();
8910 // Converts a multi-byte string to a wide character string.
8911 // (The function name comes from an acronym of 'Multi-Byte String TO Wide
8912 // Character String').
8913 // the conversion failed.
8914 // RETURNS: the number of wide characters written into @dest, or -1 if
8915 // <dest>: the space to place the converted wide character string into.
8916 // <src>: the multi-byte string to convert, which must be nul-terminated.
8917 // <dest_max>: the maximum number of wide characters to place in @dest.
8918 static int mbstowcs(WChar* dest, char* src, int dest_max) {
8919 return gdk_mbstowcs(dest, src, dest_max);
8923 // Indicates to the GUI environment that the application has finished
8924 // loading. If the applications opens windows, this function is
8925 // normally called after opening the application's initial set of
8926 // windows.
8927 // GTK+ will call this function automatically after opening the first
8928 // #GtkWindow unless gtk_window_set_auto_startup_notification() is called
8929 // to disable that feature.
8930 static void notify_startup_complete() {
8931 gdk_notify_startup_complete();
8935 // Indicates to the GUI environment that the application has finished
8936 // loading, using a given identifier.
8937 // GTK+ will call this function automatically for #GtkWindow with custom
8938 // startup-notification identifier unless
8939 // gtk_window_set_auto_startup_notification() is called to disable
8940 // that feature.
8941 // <startup_id>: a startup-notification identifier, for which notification process should be completed
8942 static void notify_startup_complete_with_id(char* startup_id) {
8943 gdk_notify_startup_complete_with_id(startup_id);
8947 // Unintrospectable function: offscreen_window_get_embedder() / gdk_offscreen_window_get_embedder()
8948 // Gets the window that @window is embedded in.
8949 // embedded offscreen window
8950 // RETURNS: the embedding #GdkWindow, or %NULL if @window is not an
8951 // <window>: a #GdkWindow
8952 static Window* offscreen_window_get_embedder(Window* window) {
8953 return gdk_offscreen_window_get_embedder(window);
8957 // Unintrospectable function: offscreen_window_get_pixmap() / gdk_offscreen_window_get_pixmap()
8958 // Gets the offscreen pixmap that an offscreen window renders into.
8959 // If you need to keep this around over window resizes, you need to
8960 // add a reference to it.
8961 // RETURNS: The offscreen pixmap, or %NULL if not offscreen
8962 // <window>: a #GdkWindow
8963 static Pixmap* offscreen_window_get_pixmap(Window* window) {
8964 return gdk_offscreen_window_get_pixmap(window);
8968 // Sets @window to be embedded in @embedder.
8969 // To fully embed an offscreen window, in addition to calling this
8970 // function, it is also necessary to handle the #GdkWindow::pick-embedded-child
8971 // signal on the @embedder and the #GdkWindow::to-embedder and
8972 // #GdkWindow::from-embedder signals on @window.
8973 // <window>: a #GdkWindow
8974 // <embedder>: the #GdkWindow that @window gets embedded in
8975 static void offscreen_window_set_embedder(Window* window, Window* embedder) {
8976 gdk_offscreen_window_set_embedder(window, embedder);
8980 // Unintrospectable function: pango_attr_emboss_color_new() / gdk_pango_attr_emboss_color_new()
8981 // Creates a new attribute specifying the color to emboss text with.
8982 // RETURNS: new #PangoAttribute
8983 // <color>: a GdkColor representing the color to emboss with
8984 static Pango.Attribute* pango_attr_emboss_color_new(Color* color) {
8985 return gdk_pango_attr_emboss_color_new(color);
8989 // Unintrospectable function: pango_attr_embossed_new() / gdk_pango_attr_embossed_new()
8990 // Creates a new attribute flagging a region as embossed or not.
8991 // RETURNS: new #PangoAttribute
8992 // <embossed>: if the region should be embossed
8993 static Pango.Attribute* pango_attr_embossed_new(int embossed) {
8994 return gdk_pango_attr_embossed_new(embossed);
8998 // Unintrospectable function: pango_attr_stipple_new() / gdk_pango_attr_stipple_new()
8999 // Creates a new attribute containing a stipple bitmap to be used when
9000 // rendering the text.
9001 // RETURNS: new #PangoAttribute
9002 // <stipple>: a bitmap to be set as stipple
9003 static Pango.Attribute* pango_attr_stipple_new(Bitmap* stipple) {
9004 return gdk_pango_attr_stipple_new(stipple);
9008 // Unintrospectable function: pango_context_get() / gdk_pango_context_get()
9009 // Creates a #PangoContext for the default GDK screen.
9010 // The context must be freed when you're finished with it.
9011 // When using GTK+, normally you should use gtk_widget_get_pango_context()
9012 // instead of this function, to get the appropriate context for
9013 // the widget you intend to render text onto.
9014 // The newly created context will have the default font options (see
9015 // #cairo_font_options_t) for the default screen; if these options
9016 // change it will not be updated. Using gtk_widget_get_pango_context()
9017 // is more convenient if you want to keep a context around and track
9018 // changes to the screen's font rendering settings.
9019 // RETURNS: a new #PangoContext for the default display
9020 static Pango.Context* pango_context_get() {
9021 return gdk_pango_context_get();
9025 // Unintrospectable function: pango_context_get_for_screen() / gdk_pango_context_get_for_screen()
9026 // Creates a #PangoContext for @screen.
9027 // The context must be freed when you're finished with it.
9028 // When using GTK+, normally you should use gtk_widget_get_pango_context()
9029 // instead of this function, to get the appropriate context for
9030 // the widget you intend to render text onto.
9031 // The newly created context will have the default font options
9032 // (see #cairo_font_options_t) for the screen; if these options
9033 // change it will not be updated. Using gtk_widget_get_pango_context()
9034 // is more convenient if you want to keep a context around and track
9035 // changes to the screen's font rendering settings.
9036 // RETURNS: a new #PangoContext for @screen
9037 // <screen>: the #GdkScreen for which the context is to be created.
9038 static Pango.Context* pango_context_get_for_screen(Screen* screen) {
9039 return gdk_pango_context_get_for_screen(screen);
9043 // This function used to set the colormap to be used for drawing with
9044 // context used for drawing, so calling this function is no longer
9045 // necessary.
9046 // <context>: a #PangoContext
9047 // <colormap>: a #GdkColormap
9048 static void pango_context_set_colormap(Pango.Context* context, Colormap* colormap) {
9049 gdk_pango_context_set_colormap(context, colormap);
9053 // Unintrospectable function: pango_layout_get_clip_region() / gdk_pango_layout_get_clip_region()
9054 // Obtains a clip region which contains the areas where the given ranges
9055 // of text would be drawn. @x_origin and @y_origin are the same position
9056 // you would pass to gdk_draw_layout_line(). @index_ranges should contain
9057 // ranges of bytes in the layout's text.
9058 // Note that the regions returned correspond to logical extents of the text
9059 // ranges, not ink extents. So the drawn layout may in fact touch areas out of
9060 // the clip region. The clip region is mainly useful for highlightling parts
9061 // of text, such as when text is selected.
9062 // RETURNS: a clip region containing the given ranges
9063 // <layout>: a #PangoLayout
9064 // <x_origin>: X pixel where you intend to draw the layout with this clip
9065 // <y_origin>: Y pixel where you intend to draw the layout with this clip
9066 // <index_ranges>: array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
9067 // <n_ranges>: number of ranges in @index_ranges, i.e. half the size of @index_ranges
9068 static Region* pango_layout_get_clip_region(Pango.Layout* layout, int x_origin, int y_origin, int* index_ranges, int n_ranges) {
9069 return gdk_pango_layout_get_clip_region(layout, x_origin, y_origin, index_ranges, n_ranges);
9073 // Unintrospectable function: pango_layout_line_get_clip_region() / gdk_pango_layout_line_get_clip_region()
9074 // Obtains a clip region which contains the areas where the given
9075 // ranges of text would be drawn. @x_origin and @y_origin are the same
9076 // position you would pass to gdk_draw_layout_line(). @index_ranges
9077 // should contain ranges of bytes in the layout's text. The clip
9078 // region will include space to the left or right of the line (to the
9079 // layout bounding box) if you have indexes above or below the indexes
9080 // contained inside the line. This is to draw the selection all the way
9081 // to the side of the layout. However, the clip region is in line coordinates,
9082 // not layout coordinates.
9083 // Note that the regions returned correspond to logical extents of the text
9084 // ranges, not ink extents. So the drawn line may in fact touch areas out of
9085 // the clip region. The clip region is mainly useful for highlightling parts
9086 // of text, such as when text is selected.
9087 // RETURNS: a clip region containing the given ranges
9088 // <line>: a #PangoLayoutLine
9089 // <x_origin>: X pixel where you intend to draw the layout line with this clip
9090 // <y_origin>: baseline pixel where you intend to draw the layout line with this clip
9091 // <index_ranges>: array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
9092 // <n_ranges>: number of ranges in @index_ranges, i.e. half the size of @index_ranges
9093 static Region* pango_layout_line_get_clip_region(Pango.LayoutLine* line, int x_origin, int y_origin, int* index_ranges, int n_ranges) {
9094 return gdk_pango_layout_line_get_clip_region(line, x_origin, y_origin, index_ranges, n_ranges);
9098 // Parse command line arguments, and store for future
9099 // use by calls to gdk_display_open().
9100 // Any arguments used by GDK are removed from the array and @argc and @argv are
9101 // updated accordingly.
9102 // You shouldn't call this function explicitely if you are using
9103 // gtk_init(), gtk_init_check(), gdk_init(), or gdk_init_check().
9104 // <argc>: the number of command line arguments.
9105 // <argv>: the array of command line arguments.
9106 static void parse_args(/*inout*/ int* argc, /*inout*/ char*** argv) {
9107 gdk_parse_args(argc, argv);
9111 // Unintrospectable function: pixbuf_get_from_drawable() / gdk_pixbuf_get_from_drawable()
9112 // Transfers image data from a #GdkDrawable and converts it to an RGB(A)
9113 // representation inside a #GdkPixbuf. In other words, copies
9114 // image data from a server-side drawable to a client-side RGB(A) buffer.
9115 // This allows you to efficiently read individual pixels on the client side.
9116 // If the drawable @src has no colormap (gdk_drawable_get_colormap()
9117 // returns %NULL), then a suitable colormap must be specified.
9118 // Typically a #GdkWindow or a pixmap created by passing a #GdkWindow
9119 // to gdk_pixmap_new() will already have a colormap associated with
9120 // it. If the drawable has a colormap, the @cmap argument will be
9121 // ignored. If the drawable is a bitmap (1 bit per pixel pixmap),
9122 // then a colormap is not required; pixels with a value of 1 are
9123 // assumed to be white, and pixels with a value of 0 are assumed to be
9124 // black. For taking screenshots, gdk_colormap_get_system() returns
9125 // the correct colormap to use.
9126 // If the specified destination pixbuf @dest is %NULL, then this
9127 // function will create an RGB pixbuf with 8 bits per channel and no
9128 // alpha, with the same size specified by the @width and @height
9129 // arguments. In this case, the @dest_x and @dest_y arguments must be
9130 // specified as 0. If the specified destination pixbuf is not %NULL
9131 // and it contains alpha information, then the filled pixels will be
9132 // set to full opacity (alpha = 255).
9133 // If the specified drawable is a pixmap, then the requested source
9134 // rectangle must be completely contained within the pixmap, otherwise
9135 // the function will return %NULL. For pixmaps only (not for windows)
9136 // passing -1 for width or height is allowed to mean the full width
9137 // or height of the pixmap.
9138 // If the specified drawable is a window, and the window is off the
9139 // screen, then there is no image data in the obscured/offscreen
9140 // regions to be placed in the pixbuf. The contents of portions of the
9141 // pixbuf corresponding to the offscreen region are undefined.
9142 // If the window you're obtaining data from is partially obscured by
9143 // other windows, then the contents of the pixbuf areas corresponding
9144 // to the obscured regions are undefined.
9145 // If the target drawable is not mapped (typically because it's
9146 // iconified/minimized or not on the current workspace), then %NULL
9147 // will be returned.
9148 // If memory can't be allocated for the return value, %NULL will be returned
9149 // instead.
9150 // (In short, there are several ways this function can fail, and if it fails
9151 // it returns %NULL; so check the return value.)
9152 // This function calls gdk_drawable_get_image() internally and
9153 // converts the resulting image to a #GdkPixbuf, so the
9154 // documentation for gdk_drawable_get_image() may also be relevant.
9155 // pixbuf with a reference count of 1 if no destination pixbuf was specified, or %NULL on error
9156 // RETURNS: The same pixbuf as @dest if it was non-%NULL, or a newly-created
9157 // <dest>: Destination pixbuf, or %NULL if a new pixbuf should be created.
9158 // <src>: Source drawable.
9159 // <cmap>: A colormap if @src doesn't have one set.
9160 // <src_x>: Source X coordinate within drawable.
9161 // <src_y>: Source Y coordinate within drawable.
9162 // <dest_x>: Destination X coordinate in pixbuf, or 0 if @dest is NULL.
9163 // <dest_y>: Destination Y coordinate in pixbuf, or 0 if @dest is NULL.
9164 // <width>: Width in pixels of region to get.
9165 // <height>: Height in pixels of region to get.
9166 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) {
9167 return gdk_pixbuf_get_from_drawable(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height);
9171 // Unintrospectable function: pixbuf_get_from_image() / gdk_pixbuf_get_from_image()
9172 // Same as gdk_pixbuf_get_from_drawable() but gets the pixbuf from
9173 // an image.
9174 // RETURNS: @dest, newly-created pixbuf if @dest was %NULL, %NULL on error
9175 // <dest>: Destination pixbuf, or %NULL if a new pixbuf should be created.
9176 // <src>: Source #GdkImage.
9177 // <cmap>: A colormap, or %NULL to use the one for @src
9178 // <src_x>: Source X coordinate within drawable.
9179 // <src_y>: Source Y coordinate within drawable.
9180 // <dest_x>: Destination X coordinate in pixbuf, or 0 if @dest is NULL.
9181 // <dest_y>: Destination Y coordinate in pixbuf, or 0 if @dest is NULL.
9182 // <width>: Width in pixels of region to get.
9183 // <height>: Height in pixels of region to get.
9184 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) {
9185 return gdk_pixbuf_get_from_image(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height);
9189 // Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
9190 // and @mask_return arguments, respectively, and renders a pixbuf and its
9191 // corresponding thresholded alpha mask to them. This is merely a convenience
9192 // function; applications that need to render pixbufs with dither offsets or to
9193 // given drawables should use gdk_draw_pixbuf() and gdk_pixbuf_render_threshold_alpha().
9194 // The pixmap that is created is created for the colormap returned
9195 // by gdk_rgb_get_colormap(). You normally will want to instead use
9196 // the actual colormap for a widget, and use
9197 // gdk_pixbuf_render_pixmap_and_mask_for_colormap().
9198 // If the pixbuf does not have an alpha channel, then *@mask_return will be set
9199 // to %NULL.
9200 // <pixbuf>: A pixbuf.
9201 // <pixmap_return>: Location to store a pointer to the created pixmap, or %NULL if the pixmap is not needed.
9202 // <mask_return>: Location to store a pointer to the created mask, or %NULL if the mask is not needed.
9203 // <alpha_threshold>: Threshold value for opacity values.
9204 static void pixbuf_render_pixmap_and_mask(GdkPixbuf2.Pixbuf* pixbuf, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) {
9205 gdk_pixbuf_render_pixmap_and_mask(pixbuf, pixmap_return, mask_return, alpha_threshold);
9209 // Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
9210 // and @mask_return arguments, respectively, and renders a pixbuf and its
9211 // corresponding tresholded alpha mask to them. This is merely a convenience
9212 // function; applications that need to render pixbufs with dither offsets or to
9213 // given drawables should use gdk_draw_pixbuf(), and gdk_pixbuf_render_threshold_alpha().
9214 // The pixmap that is created uses the #GdkColormap specified by @colormap.
9215 // This colormap must match the colormap of the window where the pixmap
9216 // will eventually be used or an error will result.
9217 // If the pixbuf does not have an alpha channel, then *@mask_return will be set
9218 // to %NULL.
9219 // <pixbuf>: A pixbuf.
9220 // <colormap>: A #GdkColormap
9221 // <pixmap_return>: Location to store a pointer to the created pixmap, or %NULL if the pixmap is not needed.
9222 // <mask_return>: Location to store a pointer to the created mask, or %NULL if the mask is not needed.
9223 // <alpha_threshold>: Threshold value for opacity values.
9224 static void pixbuf_render_pixmap_and_mask_for_colormap(GdkPixbuf2.Pixbuf* pixbuf, Colormap* colormap, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold) {
9225 gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, colormap, pixmap_return, mask_return, alpha_threshold);
9229 // Takes the opacity values in a rectangular portion of a pixbuf and thresholds
9230 // them to produce a bi-level alpha mask that can be used as a clipping mask for
9231 // a drawable.
9232 // <pixbuf>: A pixbuf.
9233 // <bitmap>: Bitmap where the bilevel mask will be painted to.
9234 // <src_x>: Source X coordinate.
9235 // <src_y>: source Y coordinate.
9236 // <dest_x>: Destination X coordinate.
9237 // <dest_y>: Destination Y coordinate.
9238 // <width>: Width of region to threshold, or -1 to use pixbuf width
9239 // <height>: Height of region to threshold, or -1 to use pixbuf height
9240 // <alpha_threshold>: Opacity values below this will be painted as zero; all other values will be painted as one.
9241 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) {
9242 gdk_pixbuf_render_threshold_alpha(pixbuf, bitmap, src_x, src_y, dest_x, dest_y, width, height, alpha_threshold);
9246 // Renders a rectangular portion of a pixbuf to a drawable while using the
9247 // specified GC. This is done using GdkRGB, so the specified drawable must have
9248 // the GdkRGB visual and colormap. Note that this function will ignore the
9249 // opacity information for images with an alpha channel; the GC must already
9250 // have the clipping mask set if you want transparent regions to show through.
9251 // For an explanation of dither offsets, see the GdkRGB documentation. In
9252 // brief, the dither offset is important when re-rendering partial regions of an
9253 // image to a rendered version of the full image, or for when the offsets to a
9254 // base position change, as in scrolling. The dither matrix has to be shifted
9255 // for consistent visual results. If you do not have any of these cases, the
9256 // dither offsets can be both zero.
9257 // <pixbuf>: A pixbuf.
9258 // <drawable>: Destination drawable.
9259 // <gc>: GC used for rendering.
9260 // <src_x>: Source X coordinate within pixbuf.
9261 // <src_y>: Source Y coordinate within pixbuf.
9262 // <dest_x>: Destination X coordinate within drawable.
9263 // <dest_y>: Destination Y coordinate within drawable.
9264 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width
9265 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height
9266 // <dither>: Dithering mode for GdkRGB.
9267 // <x_dither>: X offset for dither.
9268 // <y_dither>: Y offset for dither.
9269 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) {
9270 gdk_pixbuf_render_to_drawable(pixbuf, drawable, gc, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither);
9274 // Renders a rectangular portion of a pixbuf to a drawable. The destination
9275 // drawable must have a colormap. All windows have a colormap, however, pixmaps
9276 // only have colormap by default if they were created with a non-%NULL window argument.
9277 // Otherwise a colormap must be set on them with gdk_drawable_set_colormap.
9278 // On older X servers, rendering pixbufs with an alpha channel involves round trips
9279 // to the X server, and may be somewhat slow.
9280 // <pixbuf>: A pixbuf.
9281 // <drawable>: Destination drawable.
9282 // <src_x>: Source X coordinate within pixbuf.
9283 // <src_y>: Source Y coordinates within pixbuf.
9284 // <dest_x>: Destination X coordinate within drawable.
9285 // <dest_y>: Destination Y coordinate within drawable.
9286 // <width>: Width of region to render, in pixels, or -1 to use pixbuf width.
9287 // <height>: Height of region to render, in pixels, or -1 to use pixbuf height.
9288 // <alpha_mode>: Ignored. Present for backwards compatibility.
9289 // <alpha_threshold>: Ignored. Present for backwards compatibility
9290 // <dither>: Dithering mode for GdkRGB.
9291 // <x_dither>: X offset for dither.
9292 // <y_dither>: Y offset for dither.
9293 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) {
9294 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);
9297 static GrabStatus pointer_grab(Window* window, int owner_events, EventMask event_mask, Window* confine_to, Cursor* cursor, uint time_) {
9298 return gdk_pointer_grab(window, owner_events, event_mask, confine_to, cursor, time_);
9302 // Determines information about the current pointer grab.
9303 // This is not public API and must not be used by applications.
9304 // pointer grabbed.
9305 // RETURNS: %TRUE if this application currently has the
9306 // <display>: the #GdkDisplay for which to get the grab information
9307 // <grab_window>: location to store current grab window
9308 // <owner_events>: location to store boolean indicating whether the @owner_events flag to gdk_pointer_grab() was %TRUE.
9309 static int pointer_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events) {
9310 return gdk_pointer_grab_info_libgtk_only(display, grab_window, owner_events);
9314 // Returns %TRUE if the pointer on the default display is currently
9315 // grabbed by this application.
9316 // Note that this does not take the inmplicit pointer grab on button
9317 // presses into account.
9318 // RETURNS: %TRUE if the pointer is currently grabbed by this application.*
9319 static int pointer_is_grabbed() {
9320 return gdk_pointer_is_grabbed();
9324 // Ungrabs the pointer on the default display, if it is grabbed by this
9325 // application.
9326 // <time_>: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is available.
9327 static void pointer_ungrab(uint time_) {
9328 gdk_pointer_ungrab(time_);
9331 static void pre_parse_libgtk_only() {
9332 gdk_pre_parse_libgtk_only();
9335 static void property_change(Window* window, Atom property, Atom type, int format, PropMode mode, ubyte* data, int nelements) {
9336 gdk_property_change(window, property, type, format, mode, data, nelements);
9339 static void property_delete(Window* window, Atom property) {
9340 gdk_property_delete(window, property);
9343 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) {
9344 return gdk_property_get(window, property, type, offset, length, pdelete, actual_property_type, actual_format, actual_length, data);
9348 // This function returns the available bit depths for the default
9349 // screen. It's equivalent to listing the visuals
9350 // (gdk_list_visuals()) and then looking at the depth field in each
9351 // visual, removing duplicates.
9352 // The array returned by this function should not be freed.
9353 // <depths>: return location for available depths
9354 // <count>: return location for number of available depths
9355 static void query_depths(/*out*/ int** depths, /*out*/ int* count) {
9356 gdk_query_depths(depths, count);
9360 // This function returns the available visual types for the default
9361 // screen. It's equivalent to listing the visuals
9362 // (gdk_list_visuals()) and then looking at the type field in each
9363 // visual, removing duplicates.
9364 // The array returned by this function should not be freed.
9365 // <visual_types>: return location for the available visual types
9366 // <count>: return location for the number of available visual types
9367 static void query_visual_types(VisualType** visual_types, int* count) {
9368 gdk_query_visual_types(visual_types, count);
9372 // Unintrospectable function: region_new() / gdk_region_new()
9373 // Creates a new empty #GdkRegion.
9374 // RETURNS: a new empty #GdkRegion
9375 static Region* region_new() {
9376 return gdk_region_new();
9380 // Unintrospectable function: region_polygon() / gdk_region_polygon()
9381 // Creates a new #GdkRegion using the polygon defined by a
9382 // number of points.
9383 // use Cairo.
9384 // RETURNS: a new #GdkRegion based on the given polygon
9385 // <points>: an array of #GdkPoint structs
9386 // <n_points>: the number of elements in the @points array
9387 // <fill_rule>: specifies which pixels are included in the region when the polygon overlaps itself.
9388 static Region* region_polygon(Point* points, int n_points, FillRule fill_rule) {
9389 return gdk_region_polygon(points, n_points, fill_rule);
9393 // Unintrospectable function: region_rectangle() / gdk_region_rectangle()
9394 // Creates a new region containing the area @rectangle.
9395 // RETURNS: a new region
9396 // <rectangle>: a #GdkRectangle
9397 static Region* region_rectangle(Rectangle* rectangle) {
9398 return gdk_region_rectangle(rectangle);
9401 // Unintrospectable function: rgb_cmap_new() / gdk_rgb_cmap_new()
9402 static RgbCmap* rgb_cmap_new(uint* colors, int n_colors) {
9403 return gdk_rgb_cmap_new(colors, n_colors);
9406 static int rgb_colormap_ditherable(Colormap* cmap) {
9407 return gdk_rgb_colormap_ditherable(cmap);
9410 static int rgb_ditherable() {
9411 return gdk_rgb_ditherable();
9415 // drawable you're using to draw. If you're drawing to a #GtkWidget,
9416 // call gtk_widget_get_colormap().
9417 // gdk_rgb_find_color() will fill in the %pixel field with the best
9418 // matching pixel from a color cube. The color is then ready to be
9419 // used for drawing, e.g. you can call gdk_gc_set_foreground() which
9420 // expects %pixel to be initialized.
9421 // In many cases, you can avoid this whole issue by calling
9422 // gdk_gc_set_rgb_fg_color() or gdk_gc_set_rgb_bg_color(), which
9423 // do not expect %pixel to be initialized in advance. If you use those
9424 // functions, there's no need for gdk_rgb_find_color().
9425 // <colormap>: a #GdkColormap
9426 // <color>: a #GdkColor
9427 static void rgb_find_color(Colormap* colormap, Color* color) {
9428 gdk_rgb_find_color(colormap, color);
9431 static void rgb_gc_set_background(GC* gc, uint rgb) {
9432 gdk_rgb_gc_set_background(gc, rgb);
9435 static void rgb_gc_set_foreground(GC* gc, uint rgb) {
9436 gdk_rgb_gc_set_foreground(gc, rgb);
9440 // Get the preferred colormap for rendering image data. Not a
9441 // very useful function; historically, GDK could only render RGB image
9442 // data to one colormap and visual, but in the current version it can
9443 // render to any colormap and visual. So there's no need to call this
9444 // function.
9445 // RETURNS: the preferred colormap
9446 static Colormap* rgb_get_colormap() {
9447 return gdk_rgb_get_colormap();
9451 // Gets a "preferred visual" chosen by GdkRGB for rendering image data
9452 // on the default screen. In previous versions of GDK, this was the
9453 // only visual GdkRGB could use for rendering. In current versions,
9454 // it's simply the visual GdkRGB would have chosen as the optimal one
9455 // in those previous versions. GdkRGB can now render to drawables with
9456 // any visual.
9457 // RETURNS: The #GdkVisual chosen by GdkRGB.
9458 static Visual* rgb_get_visual() {
9459 return gdk_rgb_get_visual();
9462 static void rgb_init() {
9463 gdk_rgb_init();
9466 static void rgb_set_install(int install) {
9467 gdk_rgb_set_install(install);
9470 static void rgb_set_min_colors(int min_colors) {
9471 gdk_rgb_set_min_colors(min_colors);
9474 static void rgb_set_verbose(int verbose) {
9475 gdk_rgb_set_verbose(verbose);
9478 static c_ulong rgb_xpixel_from_rgb(uint rgb) {
9479 return gdk_rgb_xpixel_from_rgb(rgb);
9482 static void selection_convert(Window* requestor, Atom selection, Atom target, uint time_) {
9483 gdk_selection_convert(requestor, selection, target, time_);
9486 // Unintrospectable function: selection_owner_get() / gdk_selection_owner_get()
9487 static Window* selection_owner_get(Atom selection) {
9488 return gdk_selection_owner_get(selection);
9492 // Unintrospectable function: selection_owner_get_for_display() / gdk_selection_owner_get_for_display()
9493 // Determine the owner of the given selection.
9494 // Note that the return value may be owned by a different
9495 // process if a foreign window was previously created for that
9496 // window, but a new foreign window will never be created by this call.
9497 // window known to the current process, the #GdkWindow that owns the
9498 // selection, otherwise %NULL.
9499 // RETURNS: if there is a selection owner for this window, and it is a
9500 // <display>: a #GdkDisplay.
9501 // <selection>: an atom indentifying a selection.
9502 static Window* selection_owner_get_for_display(Display* display, Atom selection) {
9503 return gdk_selection_owner_get_for_display(display, selection);
9506 static int selection_owner_set(Window* owner, Atom selection, uint time_, int send_event) {
9507 return gdk_selection_owner_set(owner, selection, time_, send_event);
9511 // Sets the #GdkWindow @owner as the current owner of the selection @selection.
9512 // otherwise %FALSE.
9513 // RETURNS: %TRUE if the selection owner was successfully changed to owner,
9514 // <display>: the #GdkDisplay.
9515 // <owner>: a #GdkWindow or %NULL to indicate that the owner for the given should be unset.
9516 // <selection>: an atom identifying a selection.
9517 // <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.
9518 // <send_event>: if %TRUE, and the new owner is different from the current owner, the current owner will be sent a SelectionClear event.
9519 static int selection_owner_set_for_display(Display* display, Window* owner, Atom selection, uint time_, int send_event) {
9520 return gdk_selection_owner_set_for_display(display, owner, selection, time_, send_event);
9524 // Retrieves selection data that was stored by the selection
9525 // data in response to a call to gdk_selection_convert(). This function
9526 // will not be used by applications, who should use the #GtkClipboard
9527 // API instead.
9528 // RETURNS: the length of the retrieved data.
9529 // <requestor>: the window on which the data is stored
9530 // <data>: location to store a pointer to the retrieved data.
9531 // <prop_type>: location to store the type of the property.
9532 // <prop_format>: location to store the format of the property.
9533 static int selection_property_get(Window* requestor, ubyte** data, Atom* prop_type, int* prop_format) {
9534 return gdk_selection_property_get(requestor, data, prop_type, prop_format);
9537 static void selection_send_notify(NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) {
9538 gdk_selection_send_notify(requestor, selection, target, property, time_);
9542 // Send a response to SelectionRequest event.
9543 // <display>: the #GdkDisplay where @requestor is realized
9544 // <requestor>: window to which to deliver response.
9545 // <selection>: selection that was requested.
9546 // <target>: target that was selected.
9547 // <property>: property in which the selection owner stored the data, or %GDK_NONE to indicate that the request was rejected.
9548 // <time_>: timestamp.
9549 static void selection_send_notify_for_display(Display* display, NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_) {
9550 gdk_selection_send_notify_for_display(display, requestor, selection, target, property, time_);
9554 // Set the double click time for the default display. See
9555 // gdk_display_set_double_click_time().
9556 // See also gdk_display_set_double_click_distance().
9557 // Applications should <emphasis>not</emphasis> set this, it is a
9558 // global user-configured setting.
9559 // <msec>: double click time in milliseconds (thousandths of a second)
9560 static void set_double_click_time(uint msec) {
9561 gdk_set_double_click_time(msec);
9564 static char* /*new*/ set_locale() {
9565 return gdk_set_locale();
9569 // Unintrospectable function: set_pointer_hooks() / gdk_set_pointer_hooks()
9570 // This function allows for hooking into the operation
9571 // of getting the current location of the pointer. This
9572 // is only useful for such low-level tools as an
9573 // event recorder. Applications should never have any
9574 // reason to use this facility.
9575 // This function is not multihead safe. For multihead operation,
9576 // see gdk_display_set_pointer_hooks().
9577 // RETURNS: the previous pointer hook table
9578 // <new_hooks>: a table of pointers to functions for getting quantities related to the current pointer position, or %NULL to restore the default table.
9579 static PointerHooks* set_pointer_hooks(PointerHooks* new_hooks) {
9580 return gdk_set_pointer_hooks(new_hooks);
9583 static void set_program_class(char* program_class) {
9584 gdk_set_program_class(program_class);
9588 // Sets whether a trace of received events is output.
9589 // Note that GTK+ must be compiled with debugging (that is,
9590 // configured using the <option>--enable-debug</option> option)
9591 // to use this option.
9592 // <show_events>: %TRUE to output event debugging information.
9593 static void set_show_events(int show_events) {
9594 gdk_set_show_events(show_events);
9598 // Sets the <literal>SM_CLIENT_ID</literal> property on the application's leader window so that
9599 // the window manager can save the application's state using the X11R6 ICCCM
9600 // session management protocol.
9601 // See the X Session Management Library documentation for more information on
9602 // session management and the Inter-Client Communication Conventions Manual
9603 // (ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
9604 // (Both documents are part of the X Window System distribution.)
9605 // <sm_client_id>: the client id assigned by the session manager when the connection was opened, or %NULL to remove the property.
9606 static void set_sm_client_id(char* sm_client_id) {
9607 gdk_set_sm_client_id(sm_client_id);
9610 static void set_use_xshm(int use_xshm) {
9611 gdk_set_use_xshm(use_xshm);
9615 // Obtains a desktop-wide setting, such as the double-click time,
9616 // for the default screen. See gdk_screen_get_setting().
9617 // in @value, %FALSE otherwise.
9618 // RETURNS: %TRUE if the setting existed and a value was stored
9619 // <name>: the name of the setting.
9620 // <value>: location to store the value of the setting.
9621 static int setting_get(char* name, GObject2.Value* value) {
9622 return gdk_setting_get(name, value);
9626 // Like g_spawn_command_line_async(), except the child process is
9627 // spawned in such an environment that on calling gdk_display_open()
9628 // it would be returned a #GdkDisplay with @screen as the default
9629 // screen.
9630 // This is useful for applications which wish to launch an application
9631 // on a specific screen.
9632 // either g_spawn_command_line_sync(), g_spawn_command_line_async() or
9633 // #GdkAppLaunchContext instead.
9634 // RETURNS: %TRUE on success, %FALSE if error is set.
9635 // <screen>: a #GdkScreen
9636 // <command_line>: a command line
9637 static int spawn_command_line_on_screen(Screen* screen, char* command_line, GLib2.Error** error=null) {
9638 return gdk_spawn_command_line_on_screen(screen, command_line, error);
9642 // Unintrospectable function: spawn_on_screen() / gdk_spawn_on_screen()
9643 // Like g_spawn_async(), except the child process is spawned in such
9644 // an environment that on calling gdk_display_open() it would be
9645 // returned a #GdkDisplay with @screen as the default screen.
9646 // This is useful for applications which wish to launch an application
9647 // on a specific screen.
9648 // either g_spawn_sync(), g_spawn_async(), or #GdkAppLaunchContext instead.
9649 // RETURNS: %TRUE on success, %FALSE if error is set
9650 // <screen>: a #GdkScreen
9651 // <working_directory>: child's current working directory, or %NULL to inherit parent's
9652 // <argv>: child's argument vector
9653 // <envp>: child's environment, or %NULL to inherit parent's
9654 // <flags>: flags from #GSpawnFlags
9655 // <child_setup>: function to run in the child just before exec()
9656 // <user_data>: user data for @child_setup
9657 // <child_pid>: return location for child process ID, or %NULL
9658 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) {
9659 return gdk_spawn_on_screen(screen, working_directory, argv, envp, flags, child_setup, user_data, child_pid, error);
9663 // Unintrospectable function: spawn_on_screen_with_pipes() / gdk_spawn_on_screen_with_pipes()
9664 // Like g_spawn_async_with_pipes(), except the child process is
9665 // spawned in such an environment that on calling gdk_display_open()
9666 // it would be returned a #GdkDisplay with @screen as the default
9667 // screen.
9668 // This is useful for applications which wish to launch an application
9669 // on a specific screen.
9670 // either g_spawn_async_with_pipes() or #GdkAppLaunchContext instead.
9671 // RETURNS: %TRUE on success, %FALSE if an error was set
9672 // <screen>: a #GdkScreen
9673 // <working_directory>: child's current working directory, or %NULL to inherit parent's
9674 // <argv>: child's argument vector
9675 // <envp>: child's environment, or %NULL to inherit parent's
9676 // <flags>: flags from #GSpawnFlags
9677 // <child_setup>: function to run in the child just before exec()
9678 // <user_data>: user data for @child_setup
9679 // <child_pid>: return location for child process ID, or %NULL
9680 // <standard_input>: return location for file descriptor to write to child's stdin, or %NULL
9681 // <standard_output>: return location for file descriptor to read child's stdout, or %NULL
9682 // <standard_error>: return location for file descriptor to read child's stderr, or %NULL
9683 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) {
9684 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);
9688 // Gets the metrics of a nul-terminated string.
9689 // <font>: a #GdkFont.
9690 // <string>: the nul-terminated string to measure.
9691 // <lbearing>: the left bearing of the string.
9692 // <rbearing>: the right bearing of the string.
9693 // <width>: the width of the string.
9694 // <ascent>: the ascent of the string.
9695 // <descent>: the descent of the string.
9696 static void string_extents(Font* font, char* string_, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) {
9697 gdk_string_extents(font, string_, lbearing, rbearing, width, ascent, descent);
9701 // Determines the total height of a given nul-terminated
9702 // string. This value is not generally useful, because you
9703 // cannot determine how this total height will be drawn in
9704 // relation to the baseline. See gdk_string_extents().
9705 // RETURNS: the height of the string in pixels.
9706 // <font>: a #GdkFont
9707 // <string>: the nul-terminated string to measure.
9708 static int string_height(Font* font, char* string_) {
9709 return gdk_string_height(font, string_);
9713 // Determines the distance from the origin to the rightmost
9714 // portion of a nul-terminated string when drawn. This is not the
9715 // correct value for determining the origin of the next
9716 // portion when drawing text in multiple pieces.
9717 // See gdk_string_width().
9718 // RETURNS: the right bearing of the string in pixels.
9719 // <font>: a #GdkFont
9720 // <string>: the nul-terminated string to measure.
9721 static int string_measure(Font* font, char* string_) {
9722 return gdk_string_measure(font, string_);
9725 static int string_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
9726 return gdk_string_to_compound_text(str, encoding, format, ctext, length);
9730 // Convert a string from the encoding of the current
9731 // locale into a form suitable for storing in a window property.
9732 // RETURNS: 0 upon success, non-zero upon failure.
9733 // <display>: the #GdkDisplay where the encoding is defined.
9734 // <str>: a nul-terminated string.
9735 // <encoding>: location to store the encoding atom (to be used as the type for the property).
9736 // <format>: location to store the format of the property
9737 // <ctext>: location to store newly allocated data for the property.
9738 // <length>: the length of @text, in bytes
9739 static int string_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
9740 return gdk_string_to_compound_text_for_display(display, str, encoding, format, ctext, length);
9744 // Determines the width of a nul-terminated string.
9745 // (The distance from the origin of the string to the
9746 // point where the next string in a sequence of strings
9747 // should be drawn)
9748 // RETURNS: the width of the string in pixels.
9749 // <font>: a #GdkFont
9750 // <string>: the nul-terminated string to measure
9751 static int string_width(Font* font, char* string_) {
9752 return gdk_string_width(font, string_);
9755 static void synthesize_window_state(Window* window, WindowState unset_flags, WindowState set_flags) {
9756 gdk_synthesize_window_state(window, unset_flags, set_flags);
9760 // This function retrieves a pixel from @window to force the windowing
9761 // system to carry out any pending rendering commands.
9762 // This function is intended to be used to syncronize with rendering
9763 // pipelines, to benchmark windowing system rendering operations.
9764 // <window>: a mapped #GdkWindow
9765 static void test_render_sync(Window* window) {
9766 gdk_test_render_sync(window);
9770 // This function is intended to be used in GTK+ test programs.
9771 // It will warp the mouse pointer to the given (@x,@y) corrdinates
9772 // within @window and simulate a button press or release event.
9773 // Because the mouse pointer needs to be warped to the target
9774 // location, use of this function outside of test programs that
9775 // run in their own virtual windowing system (e.g. Xvfb) is not
9776 // recommended.
9777 // Also, gtk_test_simulate_button() is a fairly low level function,
9778 // for most testing purposes, gtk_test_widget_click() is the right
9779 // function to call which will generate a button press event followed
9780 // by its accompanying button release event.
9781 // were carried out successfully.
9782 // RETURNS: whether all actions neccessary for a button event simulation
9783 // <window>: a #GdkWindow to simulate a button event for.
9784 // <x>: x coordinate within @window for the button event.
9785 // <y>: y coordinate within @window for the button event.
9786 // <button>: Number of the pointer button for the event, usually 1, 2 or 3.
9787 // <modifiers>: Keyboard modifiers the event is setup with.
9788 // <button_pressrelease>: either %GDK_BUTTON_PRESS or %GDK_BUTTON_RELEASE
9789 static int test_simulate_button(Window* window, int x, int y, uint button, ModifierType modifiers, EventType button_pressrelease) {
9790 return gdk_test_simulate_button(window, x, y, button, modifiers, button_pressrelease);
9794 // This function is intended to be used in GTK+ test programs.
9795 // If (@x,@y) are > (-1,-1), it will warp the mouse pointer to
9796 // the given (@x,@y) corrdinates within @window and simulate a
9797 // key press or release event.
9798 // When the mouse pointer is warped to the target location, use
9799 // of this function outside of test programs that run in their
9800 // own virtual windowing system (e.g. Xvfb) is not recommended.
9801 // If (@x,@y) are passed as (-1,-1), the mouse pointer will not
9802 // be warped and @window origin will be used as mouse pointer
9803 // location for the event.
9804 // Also, gtk_test_simulate_key() is a fairly low level function,
9805 // for most testing purposes, gtk_test_widget_send_key() is the
9806 // right function to call which will generate a key press event
9807 // followed by its accompanying key release event.
9808 // were carried out successfully.
9809 // RETURNS: whether all actions neccessary for a key event simulation
9810 // <window>: a #GdkWindow to simulate a key event for.
9811 // <x>: x coordinate within @window for the key event.
9812 // <y>: y coordinate within @window for the key event.
9813 // <keyval>: A GDK keyboard value.
9814 // <modifiers>: Keyboard modifiers the event is setup with.
9815 // <key_pressrelease>: either %GDK_KEY_PRESS or %GDK_KEY_RELEASE
9816 static int test_simulate_key(Window* window, int x, int y, uint keyval, ModifierType modifiers, EventType key_pressrelease) {
9817 return gdk_test_simulate_key(window, x, y, keyval, modifiers, key_pressrelease);
9820 static void text_extents(Font* font, char* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) {
9821 gdk_text_extents(font, text, text_length, lbearing, rbearing, width, ascent, descent);
9824 static void text_extents_wc(Font* font, WChar* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent) {
9825 gdk_text_extents_wc(font, text, text_length, lbearing, rbearing, width, ascent, descent);
9829 // Determines the total height of a given string.
9830 // This value is not generally useful, because you cannot
9831 // determine how this total height will be drawn in
9832 // relation to the baseline. See gdk_text_extents().
9833 // RETURNS: the height of the string in pixels.
9834 // <font>: a #GdkFont
9835 // <text>: the text to measure.
9836 // <text_length>: the length of the text in bytes.
9837 static int text_height(Font* font, char* text, int text_length) {
9838 return gdk_text_height(font, text, text_length);
9842 // Determines the distance from the origin to the rightmost
9843 // portion of a string when drawn. This is not the
9844 // correct value for determining the origin of the next
9845 // portion when drawing text in multiple pieces.
9846 // See gdk_text_width().
9847 // RETURNS: the right bearing of the string in pixels.
9848 // <font>: a #GdkFont
9849 // <text>: the text to measure.
9850 // <text_length>: the length of the text in bytes.
9851 static int text_measure(Font* font, char* text, int text_length) {
9852 return gdk_text_measure(font, text, text_length);
9855 static int text_property_to_text_list(Atom encoding, int format, ubyte* text, int length, char*** list) {
9856 return gdk_text_property_to_text_list(encoding, format, text, length, list);
9860 // Convert a text string from the encoding as it is stored
9861 // in a property into an array of strings in the encoding of
9862 // the current locale. (The elements of the array represent the
9863 // nul-separated elements of the original text string.)
9864 // if the conversion failed.
9865 // RETURNS: the number of strings stored in list, or 0,
9866 // <display>: The #GdkDisplay where the encoding is defined.
9867 // <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.
9868 // <format>: the format of the property.
9869 // <text>: The text data.
9870 // <length>: The number of items to transform.
9871 // <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().
9872 static int text_property_to_text_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) {
9873 return gdk_text_property_to_text_list_for_display(display, encoding, format, text, length, list);
9877 // Convert a text property in the giving encoding to
9878 // a list of UTF-8 strings.
9879 // list.
9880 // RETURNS: the number of strings in the resulting
9881 // <encoding>: an atom representing the encoding of the text
9882 // <format>: the format of the property
9883 // <text>: the text to convert
9884 // <length>: the length of @text, in bytes
9885 // <list>: location to store the list of strings or %NULL. The list should be freed with g_strfreev().
9886 static int text_property_to_utf8_list(Atom encoding, int format, ubyte* text, int length, char*** list=null) {
9887 return gdk_text_property_to_utf8_list(encoding, format, text, length, list);
9891 // Converts a text property in the given encoding to
9892 // a list of UTF-8 strings.
9893 // list.
9894 // RETURNS: the number of strings in the resulting
9895 // <display>: a #GdkDisplay
9896 // <encoding>: an atom representing the encoding of the text
9897 // <format>: the format of the property
9898 // <text>: the text to convert
9899 // <length>: the length of @text, in bytes
9900 // <list>: location to store the list of strings or %NULL. The list should be freed with g_strfreev().
9901 static int text_property_to_utf8_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list) {
9902 return gdk_text_property_to_utf8_list_for_display(display, encoding, format, text, length, list);
9905 static int text_width(Font* font, char* text, int text_length) {
9906 return gdk_text_width(font, text, text_length);
9909 static int text_width_wc(Font* font, WChar* text, int text_length) {
9910 return gdk_text_width_wc(font, text, text_length);
9914 // Unintrospectable function: threads_add_idle() / gdk_threads_add_idle()
9915 // A wrapper for the common usage of gdk_threads_add_idle_full()
9916 // assigning the default priority, #G_PRIORITY_DEFAULT_IDLE.
9917 // See gdk_threads_add_idle_full().
9918 // RETURNS: the ID (greater than 0) of the event source.
9919 // <function>: function to call
9920 // <data>: data to pass to @function
9921 static uint threads_add_idle(GLib2.SourceFunc function_, void* data) {
9922 return gdk_threads_add_idle(function_, data);
9926 // Adds a function to be called whenever there are no higher priority
9927 // events pending. If the function returns %FALSE it is automatically
9928 // removed from the list of event sources and will not be called again.
9929 // This variant of g_idle_add_full() calls @function with the GDK lock
9930 // held. It can be thought of a MT-safe version for GTK+ widgets for the
9931 // following use case, where you have to worry about idle_callback()
9932 // running in thread A and accessing @self after it has been finalized
9933 // in thread B:
9934 // |[
9935 // static gboolean
9936 // idle_callback (gpointer data)
9937 // {
9938 // /&ast; gdk_threads_enter(); would be needed for g_idle_add() &ast;/
9939 // SomeWidget *self = data;
9940 // /&ast; do stuff with self &ast;/
9941 // self->idle_id = 0;
9942 // /&ast; gdk_threads_leave(); would be needed for g_idle_add() &ast;/
9943 // return FALSE;
9944 // }
9945 // static void
9946 // some_widget_do_stuff_later (SomeWidget *self)
9947 // {
9948 // self->idle_id = gdk_threads_add_idle (idle_callback, self)
9949 // /&ast; using g_idle_add() here would require thread protection in the callback &ast;/
9950 // }
9951 // static void
9952 // some_widget_finalize (GObject *object)
9953 // {
9954 // SomeWidget *self = SOME_WIDGET (object);
9955 // if (self->idle_id)
9956 // g_source_remove (self->idle_id);
9957 // G_OBJECT_CLASS (parent_class)->finalize (object);
9958 // }
9959 // ]|
9960 // RETURNS: the ID (greater than 0) of the event source.
9961 // <priority>: the priority of the idle source. Typically this will be in the range btweeen #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE
9962 // <function>: function to call
9963 // <data>: data to pass to @function
9964 // <notify>: function to call when the idle is removed, or %NULL
9965 static uint threads_add_idle_full(int priority, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) {
9966 return gdk_threads_add_idle_full(priority, function_, data, notify);
9970 // Unintrospectable function: threads_add_timeout() / gdk_threads_add_timeout()
9971 // A wrapper for the common usage of gdk_threads_add_timeout_full()
9972 // assigning the default priority, #G_PRIORITY_DEFAULT.
9973 // See gdk_threads_add_timeout_full().
9974 // RETURNS: the ID (greater than 0) of the event source.
9975 // <interval>: the time between calls to the function, in milliseconds (1/1000ths of a second)
9976 // <function>: function to call
9977 // <data>: data to pass to @function
9978 static uint threads_add_timeout(uint interval, GLib2.SourceFunc function_, void* data) {
9979 return gdk_threads_add_timeout(interval, function_, data);
9983 // Sets a function to be called at regular intervals holding the GDK lock,
9984 // with the given priority. The function is called repeatedly until it
9985 // returns %FALSE, at which point the timeout is automatically destroyed
9986 // and the function will not be called again. The @notify function is
9987 // called when the timeout is destroyed. The first call to the
9988 // function will be at the end of the first @interval.
9989 // Note that timeout functions may be delayed, due to the processing of other
9990 // event sources. Thus they should not be relied on for precise timing.
9991 // After each call to the timeout function, the time of the next
9992 // timeout is recalculated based on the current time and the given interval
9993 // (it does not try to 'catch up' time lost in delays).
9994 // This variant of g_timeout_add_full() can be thought of a MT-safe version
9995 // for GTK+ widgets for the following use case:
9996 // |[
9997 // static gboolean timeout_callback (gpointer data)
9998 // {
9999 // SomeWidget *self = data;
10000 // /&ast; do stuff with self &ast;/
10001 // self->timeout_id = 0;
10002 // return FALSE;
10003 // }
10004 // static void some_widget_do_stuff_later (SomeWidget *self)
10005 // {
10006 // self->timeout_id = g_timeout_add (timeout_callback, self)
10007 // }
10008 // static void some_widget_finalize (GObject *object)
10009 // {
10010 // SomeWidget *self = SOME_WIDGET (object);
10011 // if (self->timeout_id)
10012 // g_source_remove (self->timeout_id);
10013 // G_OBJECT_CLASS (parent_class)->finalize (object);
10014 // }
10015 // ]|
10016 // RETURNS: the ID (greater than 0) of the event source.
10017 // <priority>: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
10018 // <interval>: the time between calls to the function, in milliseconds (1/1000ths of a second)
10019 // <function>: function to call
10020 // <data>: data to pass to @function
10021 // <notify>: function to call when the timeout is removed, or %NULL
10022 static uint threads_add_timeout_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) {
10023 return gdk_threads_add_timeout_full(priority, interval, function_, data, notify);
10027 // Unintrospectable function: threads_add_timeout_seconds() / gdk_threads_add_timeout_seconds()
10028 // A wrapper for the common usage of gdk_threads_add_timeout_seconds_full()
10029 // assigning the default priority, #G_PRIORITY_DEFAULT.
10030 // For details, see gdk_threads_add_timeout_full().
10031 // RETURNS: the ID (greater than 0) of the event source.
10032 // <interval>: the time between calls to the function, in seconds
10033 // <function>: function to call
10034 // <data>: data to pass to @function
10035 static uint threads_add_timeout_seconds(uint interval, GLib2.SourceFunc function_, void* data) {
10036 return gdk_threads_add_timeout_seconds(interval, function_, data);
10040 // A variant of gdk_threads_add_timout_full() with second-granularity.
10041 // See g_timeout_add_seconds_full() for a discussion of why it is
10042 // a good idea to use this function if you don't need finer granularity.
10043 // RETURNS: the ID (greater than 0) of the event source.
10044 // <priority>: the priority of the timeout source. Typically this will be in the range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
10045 // <interval>: the time between calls to the function, in seconds
10046 // <function>: function to call
10047 // <data>: data to pass to @function
10048 // <notify>: function to call when the timeout is removed, or %NULL
10049 static uint threads_add_timeout_seconds_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null) {
10050 return gdk_threads_add_timeout_seconds_full(priority, interval, function_, data, notify);
10053 static void threads_enter() {
10054 gdk_threads_enter();
10058 // Initializes GDK so that it can be used from multiple threads
10059 // in conjunction with gdk_threads_enter() and gdk_threads_leave().
10060 // g_thread_init() must be called previous to this function.
10061 // This call must be made before any use of the main loop from
10062 // GTK+; to be safe, call it before gtk_init().
10063 static void threads_init() {
10064 gdk_threads_init();
10067 static void threads_leave() {
10068 gdk_threads_leave();
10072 // Unintrospectable function: threads_set_lock_functions() / gdk_threads_set_lock_functions()
10073 // Allows the application to replace the standard method that
10074 // GDK uses to protect its data structures. Normally, GDK
10075 // creates a single #GMutex that is locked by gdk_threads_enter(),
10076 // and released by gdk_threads_leave(); using this function an
10077 // application provides, instead, a function @enter_fn that is
10078 // called by gdk_threads_enter() and a function @leave_fn that is
10079 // called by gdk_threads_leave().
10080 // The functions must provide at least same locking functionality
10081 // as the default implementation, but can also do extra application
10082 // specific processing.
10083 // As an example, consider an application that has its own recursive
10084 // lock that when held, holds the GTK+ lock as well. When GTK+ unlocks
10085 // the GTK+ lock when entering a recursive main loop, the application
10086 // must temporarily release its lock as well.
10087 // Most threaded GTK+ apps won't need to use this method.
10088 // This method must be called before gdk_threads_init(), and cannot
10089 // be called multiple times.
10090 // <enter_fn>: function called to guard GDK
10091 // <leave_fn>: function called to release the guard
10092 static void threads_set_lock_functions(GObject2.Callback enter_fn, GObject2.Callback leave_fn) {
10093 gdk_threads_set_lock_functions(enter_fn, leave_fn);
10097 // Convert from a ISO10646 character to a key symbol.
10098 // or, if there is no corresponding symbol,
10099 // wc | 0x01000000
10100 // RETURNS: the corresponding GDK key symbol, if one exists.
10101 // <wc>: a ISO10646 encoded character
10102 static uint unicode_to_keyval(uint wc) {
10103 return gdk_unicode_to_keyval(wc);
10107 // Convert from UTF-8 to compound text.
10108 // false.
10109 // RETURNS: %TRUE if the conversion succeeded, otherwise
10110 // <str>: a UTF-8 string
10111 // <encoding>: location to store resulting encoding
10112 // <format>: location to store format of the result
10113 // <ctext>: location to store the data of the result
10114 // <length>: location to store the length of the data stored in @ctext
10115 static int utf8_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
10116 return gdk_utf8_to_compound_text(str, encoding, format, ctext, length);
10120 // Converts from UTF-8 to compound text.
10121 // %FALSE.
10122 // RETURNS: %TRUE if the conversion succeeded, otherwise
10123 // <display>: a #GdkDisplay
10124 // <str>: a UTF-8 string
10125 // <encoding>: location to store resulting encoding
10126 // <format>: location to store format of the result
10127 // <ctext>: location to store the data of the result
10128 // <length>: location to store the length of the data stored in @ctext
10129 static int utf8_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length) {
10130 return gdk_utf8_to_compound_text_for_display(display, str, encoding, format, ctext, length);
10134 // Converts an UTF-8 string into the best possible representation
10135 // as a STRING. The representation of characters not in STRING
10136 // is not specified; it may be as pseudo-escape sequences
10137 // \x{ABCD}, or it may be in some other form of approximation.
10138 // conversion failed. (It should not fail for
10139 // any properly formed UTF-8 string unless system
10140 // limits like memory or file descriptors are exceeded.)
10141 // RETURNS: the newly-allocated string, or %NULL if the
10142 // <str>: a UTF-8 string
10143 static char* /*new*/ utf8_to_string_target(char* str) {
10144 return gdk_utf8_to_string_target(str);
10148 // Converts a wide character string to a multi-byte string.
10149 // (The function name comes from an acronym of 'Wide Character String TO
10150 // Multi-Byte String').
10151 // conversion failed. The returned string should be freed with g_free() when no
10152 // longer needed.
10153 // RETURNS: the multi-byte string corresponding to @src, or %NULL if the
10154 // <src>: a wide character string.
10155 static char* /*new*/ wcstombs(WChar* src) {
10156 return gdk_wcstombs(src);
10160 // Obtains the window underneath the mouse pointer, returning the
10161 // location of that window in @win_x, @win_y. Returns %NULL if the
10162 // window under the mouse pointer is not known to GDK (if the window
10163 // belongs to another application and a #GdkWindow hasn't been created
10164 // for it with gdk_window_foreign_new())
10165 // gdk_display_get_window_at_pointer() instead.
10166 // RETURNS: window under the mouse pointer
10167 // <win_x>: return location for origin of the window under the pointer
10168 // <win_y>: return location for origin of the window under the pointer
10169 static Window* window_at_pointer(/*out*/ int* win_x=null, /*out*/ int* win_y=null) {
10170 return gdk_window_at_pointer(win_x, win_y);
10174 // Constrains a desired width and height according to a
10175 // set of geometry hints (such as minimum and maximum size).
10176 // <geometry>: a #GdkGeometry structure
10177 // <flags>: a mask indicating what portions of @geometry are set
10178 // <width>: desired width of window
10179 // <height>: desired height of the window
10180 // <new_width>: location to store resulting width
10181 // <new_height>: location to store resulting height
10182 static void window_constrain_size(Geometry* geometry, uint flags, int width, int height, /*out*/ int* new_width, /*out*/ int* new_height) {
10183 gdk_window_constrain_size(geometry, flags, width, height, new_width, new_height);
10187 // Unintrospectable function: window_foreign_new() / gdk_window_foreign_new()
10188 // Wraps a native window for the default display in a #GdkWindow.
10189 // This may fail if the window has been destroyed.
10190 // For example in the X backend, a native window handle is an Xlib
10191 // <type>XID</type>.
10192 // native window or %NULL if the window has been destroyed.
10193 // RETURNS: the newly-created #GdkWindow wrapper for the
10194 // <anid>: a native window handle.
10195 static Window* window_foreign_new(NativeWindow anid) {
10196 return gdk_window_foreign_new(anid);
10200 // Unintrospectable function: window_foreign_new_for_display() / gdk_window_foreign_new_for_display()
10201 // Wraps a native window in a #GdkWindow.
10202 // This may fail if the window has been destroyed. If the window
10203 // was already known to GDK, a new reference to the existing
10204 // #GdkWindow is returned.
10205 // For example in the X backend, a native window handle is an Xlib
10206 // <type>XID</type>.
10207 // %NULL if the window has been destroyed. The wrapper will be
10208 // newly created, if one doesn't exist already.
10209 // equivalent backend-specific API instead
10210 // RETURNS: a #GdkWindow wrapper for the native window or
10211 // <display>: the #GdkDisplay where the window handle comes from.
10212 // <anid>: a native window handle.
10213 static Window* window_foreign_new_for_display(Display* display, NativeWindow anid) {
10214 return gdk_window_foreign_new_for_display(display, anid);
10218 // Unintrospectable function: window_get_toplevels() / gdk_window_get_toplevels()
10219 // Obtains a list of all toplevel windows known to GDK on the default
10220 // screen (see gdk_screen_get_toplevel_windows()).
10221 // A toplevel window is a child of the root window (see
10222 // gdk_get_default_root_window()).
10223 // The returned list should be freed with g_list_free(), but
10224 // its elements need not be freed.
10225 // RETURNS: list of toplevel windows, free with g_list_free()
10226 static GLib2.List* window_get_toplevels() {
10227 return gdk_window_get_toplevels();
10231 // Unintrospectable function: window_lookup() / gdk_window_lookup()
10232 // Looks up the #GdkWindow that wraps the given native window handle.
10233 // For example in the X backend, a native window handle is an Xlib
10234 // <type>XID</type>.
10235 // or %NULL if there is none.
10236 // backend-specific functionality instead
10237 // RETURNS: the #GdkWindow wrapper for the native window,
10238 // <anid>: a native window handle.
10239 static Window* window_lookup(NativeWindow anid) {
10240 return gdk_window_lookup(anid);
10244 // Unintrospectable function: window_lookup_for_display() / gdk_window_lookup_for_display()
10245 // Looks up the #GdkWindow that wraps the given native window handle.
10246 // For example in the X backend, a native window handle is an Xlib
10247 // <type>XID</type>.
10248 // or %NULL if there is none.
10249 // RETURNS: the #GdkWindow wrapper for the native window,
10250 // <display>: the #GdkDisplay corresponding to the window handle
10251 // <anid>: a native window handle.
10252 static Window* window_lookup_for_display(Display* display, NativeWindow anid) {
10253 return gdk_window_lookup_for_display(display, anid);
10257 // Calls gdk_window_process_updates() for all windows (see #GdkWindow)
10258 // in the application.
10259 static void window_process_all_updates() {
10260 gdk_window_process_all_updates();
10264 // With update debugging enabled, calls to
10265 // gdk_window_invalidate_region() clear the invalidated region of the
10266 // screen to a noticeable color, and GDK pauses for a short time
10267 // before sending exposes to windows during
10268 // gdk_window_process_updates(). The net effect is that you can see
10269 // the invalid region for each window and watch redraws as they
10270 // occur. This allows you to diagnose inefficiencies in your application.
10271 // In essence, because the GDK rendering model prevents all flicker,
10272 // if you are redrawing the same region 400 times you may never
10273 // notice, aside from noticing a speed problem. Enabling update
10274 // debugging causes GTK to flicker slowly and noticeably, so you can
10275 // see exactly what's being redrawn when, in what order.
10276 // The --gtk-debug=updates command line option passed to GTK+ programs
10277 // enables this debug option at application startup time. That's
10278 // usually more useful than calling gdk_window_set_debug_updates()
10279 // yourself, though you might want to use this function to enable
10280 // updates sometime after application startup time.
10281 // <setting>: %TRUE to turn on update debugging
10282 static void window_set_debug_updates(int setting) {
10283 gdk_window_set_debug_updates(setting);
10287 // C prototypes:
10289 extern (C) {
10290 AppLaunchContext* /*new*/ gdk_app_launch_context_new();
10291 void gdk_app_launch_context_set_desktop(AppLaunchContext* this_, int desktop);
10292 void gdk_app_launch_context_set_display(AppLaunchContext* this_, Display* display);
10293 void gdk_app_launch_context_set_icon(AppLaunchContext* this_, Gio2.Icon* icon=null);
10294 void gdk_app_launch_context_set_icon_name(AppLaunchContext* this_, char* icon_name=null);
10295 void gdk_app_launch_context_set_screen(AppLaunchContext* this_, Screen* screen);
10296 void gdk_app_launch_context_set_timestamp(AppLaunchContext* this_, uint timestamp);
10297 Color* /*new*/ gdk_color_copy(Color* this_);
10298 int gdk_color_equal(Color* this_, Color* colorb);
10299 void gdk_color_free(Color* this_);
10300 uint gdk_color_hash(Color* this_);
10301 char* /*new*/ gdk_color_to_string(Color* this_);
10302 Colormap* /*new*/ gdk_colormap_new(Visual* visual, int allocate);
10303 Colormap* gdk_colormap_get_system();
10304 int gdk_colormap_get_system_size();
10305 int gdk_colormap_alloc_color(Colormap* this_, Color* color, int writeable, int best_match);
10306 int gdk_colormap_alloc_colors(Colormap* this_, Color* colors, int n_colors, int writeable, int best_match, int* success);
10307 void gdk_colormap_change(Colormap* this_, int ncolors);
10308 void gdk_colormap_free_colors(Colormap* this_, Color* colors, int n_colors);
10309 Screen* gdk_colormap_get_screen(Colormap* this_);
10310 Visual* gdk_colormap_get_visual(Colormap* this_);
10311 void gdk_colormap_query_color(Colormap* this_, c_ulong pixel, Color* result);
10312 Colormap* gdk_colormap_ref(Colormap* this_);
10313 void gdk_colormap_unref(Colormap* this_);
10314 Cursor* /*new*/ gdk_cursor_new(CursorType cursor_type);
10315 Cursor* /*new*/ gdk_cursor_new_for_display(Display* display, CursorType cursor_type);
10316 Cursor* /*new*/ gdk_cursor_new_from_name(Display* display, char* name);
10317 Cursor* /*new*/ gdk_cursor_new_from_pixbuf(Display* display, GdkPixbuf2.Pixbuf* pixbuf, int x, int y);
10318 Cursor* /*new*/ gdk_cursor_new_from_pixmap(Pixmap* source, Pixmap* mask, Color* fg, Color* bg, int x, int y);
10319 CursorType gdk_cursor_get_cursor_type(Cursor* this_);
10320 Display* gdk_cursor_get_display(Cursor* this_);
10321 GdkPixbuf2.Pixbuf* gdk_cursor_get_image(Cursor* this_);
10322 Cursor* /*new*/ gdk_cursor_ref(Cursor* this_);
10323 void gdk_cursor_unref(Cursor* this_);
10324 void gdk_device_free_history(/*inout*/ TimeCoord** events, int n_events);
10325 Device* gdk_device_get_core_pointer();
10326 int gdk_device_get_axis(Device* this_, double* axes, AxisUse use, double* value);
10327 AxisUse gdk_device_get_axis_use(Device* this_, uint index);
10328 int gdk_device_get_has_cursor(Device* this_);
10329 int gdk_device_get_history(Device* this_, Window* window, uint start, uint stop, /*out*/ TimeCoord*** events, /*out*/ int* n_events);
10330 void gdk_device_get_key(Device* this_, uint index, uint* keyval, ModifierType* modifiers);
10331 InputMode gdk_device_get_mode(Device* this_);
10332 int gdk_device_get_n_axes(Device* this_);
10333 int gdk_device_get_n_keys(Device* this_);
10334 char* gdk_device_get_name(Device* this_);
10335 InputSource gdk_device_get_source(Device* this_);
10336 void gdk_device_get_state(Device* this_, Window* window, double* axes, ModifierType* mask);
10337 void gdk_device_set_axis_use(Device* this_, uint index_, AxisUse use);
10338 void gdk_device_set_key(Device* this_, uint index_, uint keyval, ModifierType modifiers);
10339 int gdk_device_set_mode(Device* this_, InputMode mode);
10340 void gdk_device_set_source(Device* this_, InputSource source);
10341 Display* gdk_display_get_default();
10342 Display* gdk_display_open(char* display_name);
10343 Display* gdk_display_open_default_libgtk_only();
10344 void gdk_display_add_client_message_filter(Display* this_, Atom message_type, FilterFunc func, void* data);
10345 void gdk_display_beep(Display* this_);
10346 void gdk_display_close(Display* this_);
10347 void gdk_display_flush(Display* this_);
10348 Device* gdk_display_get_core_pointer(Display* this_);
10349 uint gdk_display_get_default_cursor_size(Display* this_);
10350 Window* gdk_display_get_default_group(Display* this_);
10351 Screen* gdk_display_get_default_screen(Display* this_);
10352 Event* /*new*/ gdk_display_get_event(Display* this_);
10353 void gdk_display_get_maximal_cursor_size(Display* this_, /*out*/ uint* width, /*out*/ uint* height);
10354 int gdk_display_get_n_screens(Display* this_);
10355 char* gdk_display_get_name(Display* this_);
10356 void gdk_display_get_pointer(Display* this_, /*out*/ Screen** screen=null, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null);
10357 Screen* gdk_display_get_screen(Display* this_, int screen_num);
10358 Window* gdk_display_get_window_at_pointer(Display* this_, /*out*/ int* win_x=null, /*out*/ int* win_y=null);
10359 int gdk_display_is_closed(Display* this_);
10360 void gdk_display_keyboard_ungrab(Display* this_, uint time_);
10361 GLib2.List* gdk_display_list_devices(Display* this_);
10362 Event* /*new*/ gdk_display_peek_event(Display* this_);
10363 int gdk_display_pointer_is_grabbed(Display* this_);
10364 void gdk_display_pointer_ungrab(Display* this_, uint time_);
10365 void gdk_display_put_event(Display* this_, Event* event);
10366 int gdk_display_request_selection_notification(Display* this_, Atom selection);
10367 void gdk_display_set_double_click_distance(Display* this_, uint distance);
10368 void gdk_display_set_double_click_time(Display* this_, uint msec);
10369 DisplayPointerHooks* gdk_display_set_pointer_hooks(Display* this_, DisplayPointerHooks* new_hooks);
10370 void gdk_display_store_clipboard(Display* this_, Window* clipboard_window, uint time_, Atom* targets, int n_targets);
10371 int gdk_display_supports_clipboard_persistence(Display* this_);
10372 int gdk_display_supports_composite(Display* this_);
10373 int gdk_display_supports_cursor_alpha(Display* this_);
10374 int gdk_display_supports_cursor_color(Display* this_);
10375 int gdk_display_supports_input_shapes(Display* this_);
10376 int gdk_display_supports_selection_notification(Display* this_);
10377 int gdk_display_supports_shapes(Display* this_);
10378 void gdk_display_sync(Display* this_);
10379 void gdk_display_warp_pointer(Display* this_, Screen* screen, int x, int y);
10380 DisplayManager* gdk_display_manager_get();
10381 Display* gdk_display_manager_get_default_display(DisplayManager* this_);
10382 GLib2.SList* /*new container*/ gdk_display_manager_list_displays(DisplayManager* this_);
10383 void gdk_display_manager_set_default_display(DisplayManager* this_, Display* display);
10384 DragContext* /*new*/ gdk_drag_context_new();
10385 DragAction gdk_drag_context_get_actions(DragContext* this_);
10386 Window* gdk_drag_context_get_dest_window(DragContext* this_);
10387 DragProtocol gdk_drag_context_get_protocol(DragContext* this_);
10388 DragAction gdk_drag_context_get_selected_action(DragContext* this_);
10389 Window* gdk_drag_context_get_source_window(DragContext* this_);
10390 DragAction gdk_drag_context_get_suggested_action(DragContext* this_);
10391 GLib2.List* gdk_drag_context_list_targets(DragContext* this_);
10392 void gdk_drag_context_ref(DragContext* this_);
10393 void gdk_drag_context_unref(DragContext* this_);
10394 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);
10395 Region* gdk_drawable_get_clip_region(Drawable* this_);
10396 Colormap* gdk_drawable_get_colormap(Drawable* this_);
10397 void* gdk_drawable_get_data(Drawable* this_, char* key);
10398 int gdk_drawable_get_depth(Drawable* this_);
10399 Display* gdk_drawable_get_display(Drawable* this_);
10400 Image* gdk_drawable_get_image(Drawable* this_, int x, int y, int width, int height);
10401 Screen* gdk_drawable_get_screen(Drawable* this_);
10402 void gdk_drawable_get_size(Drawable* this_, /*out*/ int* width=null, /*out*/ int* height=null);
10403 Region* gdk_drawable_get_visible_region(Drawable* this_);
10404 Visual* gdk_drawable_get_visual(Drawable* this_);
10405 Drawable* gdk_drawable_ref(Drawable* this_);
10406 void gdk_drawable_set_colormap(Drawable* this_, Colormap* colormap);
10407 void gdk_drawable_set_data(Drawable* this_, char* key, void* data, GLib2.DestroyNotify destroy_func=null);
10408 void gdk_drawable_unref(Drawable* this_);
10409 Event* /*new*/ gdk_event_new(EventType type);
10410 Event* /*new*/ gdk_event_copy(Event* this_);
10411 void gdk_event_free(Event* this_);
10412 int gdk_event_get_axis(Event* this_, AxisUse axis_use, /*out*/ double* value);
10413 int gdk_event_get_coords(Event* this_, /*out*/ double* x_win, /*out*/ double* y_win);
10414 int gdk_event_get_root_coords(Event* this_, /*out*/ double* x_root, /*out*/ double* y_root);
10415 Screen* gdk_event_get_screen(Event* this_);
10416 int gdk_event_get_state(Event* this_, /*out*/ ModifierType* state);
10417 uint gdk_event_get_time(Event* this_);
10418 void gdk_event_put(Event* this_);
10419 int gdk_event_send_client_message(Event* this_, NativeWindow winid);
10420 void gdk_event_send_clientmessage_toall(Event* this_);
10421 void gdk_event_set_screen(Event* this_, Screen* screen);
10422 int gdk_font_equal(Font* this_, Font* fontb);
10423 Display* gdk_font_get_display(Font* this_);
10424 int gdk_font_id(Font* this_);
10425 Font* /*new*/ gdk_font_ref(Font* this_);
10426 void gdk_font_unref(Font* this_);
10427 GC* /*new*/ gdk_gc_new(Drawable* drawable);
10428 GC* /*new*/ gdk_gc_new_with_values(Drawable* drawable, GCValues* values, GCValuesMask values_mask);
10429 void gdk_gc_copy(GC* this_, GC* src_gc);
10430 Colormap* gdk_gc_get_colormap(GC* this_);
10431 Screen* gdk_gc_get_screen(GC* this_);
10432 void gdk_gc_get_values(GC* this_, GCValues* values);
10433 void gdk_gc_offset(GC* this_, int x_offset, int y_offset);
10434 GC* gdk_gc_ref(GC* this_);
10435 void gdk_gc_set_background(GC* this_, Color* color);
10436 void gdk_gc_set_clip_mask(GC* this_, Bitmap* mask);
10437 void gdk_gc_set_clip_origin(GC* this_, int x, int y);
10438 void gdk_gc_set_clip_rectangle(GC* this_, Rectangle* rectangle);
10439 void gdk_gc_set_clip_region(GC* this_, Region* region);
10440 void gdk_gc_set_colormap(GC* this_, Colormap* colormap);
10441 void gdk_gc_set_dashes(GC* this_, int dash_offset, byte dash_list, int n);
10442 void gdk_gc_set_exposures(GC* this_, int exposures);
10443 void gdk_gc_set_fill(GC* this_, Fill fill);
10444 void gdk_gc_set_font(GC* this_, Font* font);
10445 void gdk_gc_set_foreground(GC* this_, Color* color);
10446 void gdk_gc_set_function(GC* this_, Function function_);
10447 void gdk_gc_set_line_attributes(GC* this_, int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style);
10448 void gdk_gc_set_rgb_bg_color(GC* this_, Color* color);
10449 void gdk_gc_set_rgb_fg_color(GC* this_, Color* color);
10450 void gdk_gc_set_stipple(GC* this_, Pixmap* stipple);
10451 void gdk_gc_set_subwindow(GC* this_, SubwindowMode mode);
10452 void gdk_gc_set_tile(GC* this_, Pixmap* tile);
10453 void gdk_gc_set_ts_origin(GC* this_, int x, int y);
10454 void gdk_gc_set_values(GC* this_, GCValues* values, GCValuesMask values_mask);
10455 void gdk_gc_unref(GC* this_);
10456 Image* /*new*/ gdk_image_new(ImageType type, Visual* visual, int width, int height);
10457 Image* gdk_image_get(Drawable* drawable, int x, int y, int width, int height);
10458 ushort gdk_image_get_bits_per_pixel(Image* this_);
10459 ByteOrder gdk_image_get_byte_order(Image* this_);
10460 ushort gdk_image_get_bytes_per_line(Image* this_);
10461 ushort gdk_image_get_bytes_per_pixel(Image* this_);
10462 Colormap* gdk_image_get_colormap(Image* this_);
10463 ushort gdk_image_get_depth(Image* this_);
10464 int gdk_image_get_height(Image* this_);
10465 ImageType gdk_image_get_image_type(Image* this_);
10466 uint gdk_image_get_pixel(Image* this_, int x, int y);
10467 void* gdk_image_get_pixels(Image* this_);
10468 Visual* gdk_image_get_visual(Image* this_);
10469 int gdk_image_get_width(Image* this_);
10470 void gdk_image_put_pixel(Image* this_, int x, int y, uint pixel);
10471 Image* gdk_image_ref(Image* this_);
10472 void gdk_image_set_colormap(Image* this_, Colormap* colormap);
10473 void gdk_image_unref(Image* this_);
10474 Keymap* gdk_keymap_get_default();
10475 Keymap* gdk_keymap_get_for_display(Display* display);
10476 void gdk_keymap_add_virtual_modifiers(Keymap* this_, ModifierType* state);
10477 int gdk_keymap_get_caps_lock_state(Keymap* this_);
10478 Pango.Direction gdk_keymap_get_direction(Keymap* this_);
10479 int gdk_keymap_get_entries_for_keycode(Keymap* this_, uint hardware_keycode, /*out*/ KeymapKey** keys, /*out*/ uint** keyvals, int* n_entries);
10480 int gdk_keymap_get_entries_for_keyval(Keymap* this_, uint keyval, /*out*/ KeymapKey** keys, /*out*/ int* n_keys);
10481 int gdk_keymap_have_bidi_layouts(Keymap* this_);
10482 uint gdk_keymap_lookup_key(Keymap* this_, KeymapKey* key);
10483 int gdk_keymap_map_virtual_modifiers(Keymap* this_, ModifierType* state);
10484 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);
10485 PangoRenderer* /*new*/ gdk_pango_renderer_new(Screen* screen);
10486 Pango.Renderer* gdk_pango_renderer_get_default(Screen* screen);
10487 void gdk_pango_renderer_set_drawable(PangoRenderer* this_, Drawable* drawable=null);
10488 void gdk_pango_renderer_set_gc(PangoRenderer* this_, GC* gc=null);
10489 void gdk_pango_renderer_set_override_color(PangoRenderer* this_, Pango.RenderPart part, Color* color=null);
10490 void gdk_pango_renderer_set_stipple(PangoRenderer* this_, Pango.RenderPart part, Bitmap* stipple);
10491 Pixmap* /*new*/ gdk_pixmap_foreign_new(NativeWindow anid);
10492 Pixmap* /*new*/ gdk_pixmap_foreign_new_for_display(Display* display, NativeWindow anid);
10493 Pixmap* /*new*/ gdk_pixmap_foreign_new_for_screen(Screen* screen, NativeWindow anid, int width, int height, int depth);
10494 Pixmap* /*new*/ gdk_pixmap_new(Drawable* drawable, int width, int height, int depth);
10495 Pixmap* gdk_pixmap_colormap_create_from_xpm(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char* filename);
10496 Pixmap* gdk_pixmap_colormap_create_from_xpm_d(Drawable* drawable, Colormap* colormap, Bitmap** mask, Color* transparent_color, char** data);
10497 Pixmap* gdk_pixmap_create_from_data(Drawable* drawable, char* data, int width, int height, int depth, Color* fg, Color* bg);
10498 Pixmap* gdk_pixmap_create_from_xpm(Drawable* drawable, Bitmap** mask, Color* transparent_color, char* filename);
10499 Pixmap* gdk_pixmap_create_from_xpm_d(Drawable* drawable, /*out*/ Bitmap** mask, Color* transparent_color, char** data);
10500 Pixmap* gdk_pixmap_lookup(NativeWindow anid);
10501 Pixmap* gdk_pixmap_lookup_for_display(Display* display, NativeWindow anid);
10502 void gdk_pixmap_get_size(Pixmap* this_, /*out*/ int* width=null, /*out*/ int* height=null);
10503 int gdk_rectangle_intersect(Rectangle* this_, Rectangle* src2, /*out*/ Rectangle* dest=null);
10504 void gdk_rectangle_union(Rectangle* this_, Rectangle* src2, /*out*/ Rectangle* dest);
10505 Region* gdk_region_copy(Region* this_);
10506 void gdk_region_destroy(Region* this_);
10507 int gdk_region_empty(Region* this_);
10508 int gdk_region_equal(Region* this_, Region* region2);
10509 void gdk_region_get_clipbox(Region* this_, Rectangle* rectangle);
10510 void gdk_region_get_rectangles(Region* this_, Rectangle** rectangles, int* n_rectangles);
10511 void gdk_region_intersect(Region* this_, Region* source2);
10512 void gdk_region_offset(Region* this_, int dx, int dy);
10513 int gdk_region_point_in(Region* this_, int x, int y);
10514 int gdk_region_rect_equal(Region* this_, Rectangle* rectangle);
10515 OverlapType gdk_region_rect_in(Region* this_, Rectangle* rectangle);
10516 void gdk_region_shrink(Region* this_, int dx, int dy);
10517 void gdk_region_spans_intersect_foreach(Region* this_, Span* spans, int n_spans, int sorted, SpanFunc function_, void* data);
10518 void gdk_region_subtract(Region* this_, Region* source2);
10519 void gdk_region_union(Region* this_, Region* source2);
10520 void gdk_region_union_with_rect(Region* this_, Rectangle* rect);
10521 void gdk_region_xor(Region* this_, Region* source2);
10522 void gdk_rgb_cmap_free(RgbCmap* this_);
10523 Screen* gdk_screen_get_default();
10524 int gdk_screen_height();
10525 int gdk_screen_height_mm();
10526 int gdk_screen_width();
10527 int gdk_screen_width_mm();
10528 void gdk_screen_broadcast_client_message(Screen* this_, Event* event);
10529 Window* gdk_screen_get_active_window(Screen* this_);
10530 Colormap* gdk_screen_get_default_colormap(Screen* this_);
10531 Display* gdk_screen_get_display(Screen* this_);
10532 cairo.FontOptions* gdk_screen_get_font_options(Screen* this_);
10533 int gdk_screen_get_height(Screen* this_);
10534 int gdk_screen_get_height_mm(Screen* this_);
10535 int gdk_screen_get_monitor_at_point(Screen* this_, int x, int y);
10536 int gdk_screen_get_monitor_at_window(Screen* this_, Window* window);
10537 void gdk_screen_get_monitor_geometry(Screen* this_, int monitor_num, Rectangle* dest);
10538 int gdk_screen_get_monitor_height_mm(Screen* this_, int monitor_num);
10539 char* /*new*/ gdk_screen_get_monitor_plug_name(Screen* this_, int monitor_num);
10540 int gdk_screen_get_monitor_width_mm(Screen* this_, int monitor_num);
10541 int gdk_screen_get_n_monitors(Screen* this_);
10542 int gdk_screen_get_number(Screen* this_);
10543 int gdk_screen_get_primary_monitor(Screen* this_);
10544 double gdk_screen_get_resolution(Screen* this_);
10545 Colormap* gdk_screen_get_rgb_colormap(Screen* this_);
10546 Visual* gdk_screen_get_rgb_visual(Screen* this_);
10547 Colormap* gdk_screen_get_rgba_colormap(Screen* this_);
10548 Visual* gdk_screen_get_rgba_visual(Screen* this_);
10549 Window* gdk_screen_get_root_window(Screen* this_);
10550 int gdk_screen_get_setting(Screen* this_, char* name, GObject2.Value* value);
10551 Colormap* gdk_screen_get_system_colormap(Screen* this_);
10552 Visual* gdk_screen_get_system_visual(Screen* this_);
10553 GLib2.List* /*new container*/ gdk_screen_get_toplevel_windows(Screen* this_);
10554 int gdk_screen_get_width(Screen* this_);
10555 int gdk_screen_get_width_mm(Screen* this_);
10556 GLib2.List* /*new*/ gdk_screen_get_window_stack(Screen* this_);
10557 int gdk_screen_is_composited(Screen* this_);
10558 GLib2.List* /*new container*/ gdk_screen_list_visuals(Screen* this_);
10559 char* /*new*/ gdk_screen_make_display_name(Screen* this_);
10560 void gdk_screen_set_default_colormap(Screen* this_, Colormap* colormap);
10561 void gdk_screen_set_font_options(Screen* this_, cairo.FontOptions* options=null);
10562 void gdk_screen_set_resolution(Screen* this_, double dpi);
10563 Visual* gdk_visual_get_best();
10564 int gdk_visual_get_best_depth();
10565 VisualType gdk_visual_get_best_type();
10566 Visual* gdk_visual_get_best_with_both(int depth, VisualType visual_type);
10567 Visual* gdk_visual_get_best_with_depth(int depth);
10568 Visual* gdk_visual_get_best_with_type(VisualType visual_type);
10569 Visual* gdk_visual_get_system();
10570 int gdk_visual_get_bits_per_rgb(Visual* this_);
10571 void gdk_visual_get_blue_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null);
10572 ByteOrder gdk_visual_get_byte_order(Visual* this_);
10573 int gdk_visual_get_colormap_size(Visual* this_);
10574 int gdk_visual_get_depth(Visual* this_);
10575 void gdk_visual_get_green_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null);
10576 void gdk_visual_get_red_pixel_details(Visual* this_, /*out*/ uint* mask=null, /*out*/ int* shift=null, /*out*/ int* precision=null);
10577 Screen* gdk_visual_get_screen(Visual* this_);
10578 VisualType gdk_visual_get_visual_type(Visual* this_);
10579 void gdk_window_add_filter(Window* this_, FilterFunc function_, void* data);
10580 void gdk_window_beep(Window* this_);
10581 void gdk_window_begin_move_drag(Window* this_, int button, int root_x, int root_y, uint timestamp);
10582 void gdk_window_begin_paint_rect(Window* this_, Rectangle* rectangle);
10583 void gdk_window_begin_paint_region(Window* this_, Region* region);
10584 void gdk_window_begin_resize_drag(Window* this_, WindowEdge edge, int button, int root_x, int root_y, uint timestamp);
10585 void gdk_window_clear(Window* this_);
10586 void gdk_window_clear_area(Window* this_, int x, int y, int width, int height);
10587 void gdk_window_clear_area_e(Window* this_, int x, int y, int width, int height);
10588 void gdk_window_configure_finished(Window* this_);
10589 void gdk_window_coords_from_parent(Window* this_, double parent_x, double parent_y, /*out*/ double* x=null, /*out*/ double* y=null);
10590 void gdk_window_coords_to_parent(Window* this_, double x, double y, /*out*/ double* parent_x=null, /*out*/ double* parent_y=null);
10591 cairo.Surface* /*new*/ gdk_window_create_similar_surface(Window* this_, cairo.Content content, int width, int height);
10592 void gdk_window_deiconify(Window* this_);
10593 void gdk_window_destroy(Window* this_);
10594 void gdk_window_destroy_notify(Window* this_);
10595 void gdk_window_enable_synchronized_configure(Window* this_);
10596 void gdk_window_end_paint(Window* this_);
10597 int gdk_window_ensure_native(Window* this_);
10598 void gdk_window_flush(Window* this_);
10599 void gdk_window_focus(Window* this_, uint timestamp);
10600 void gdk_window_freeze_toplevel_updates_libgtk_only(Window* this_);
10601 void gdk_window_freeze_updates(Window* this_);
10602 void gdk_window_fullscreen(Window* this_);
10603 void gdk_window_geometry_changed(Window* this_);
10604 int gdk_window_get_accept_focus(Window* this_);
10605 cairo.Pattern* gdk_window_get_background_pattern(Window* this_);
10606 GLib2.List* /*new container*/ gdk_window_get_children(Window* this_);
10607 int gdk_window_get_composited(Window* this_);
10608 Cursor* gdk_window_get_cursor(Window* this_);
10609 int gdk_window_get_decorations(Window* this_, WMDecoration* decorations);
10610 int gdk_window_get_deskrelative_origin(Window* this_, int* x, int* y);
10611 Display* gdk_window_get_display(Window* this_);
10612 Window* gdk_window_get_effective_parent(Window* this_);
10613 Window* gdk_window_get_effective_toplevel(Window* this_);
10614 EventMask gdk_window_get_events(Window* this_);
10615 int gdk_window_get_focus_on_map(Window* this_);
10616 void gdk_window_get_frame_extents(Window* this_, Rectangle* rect);
10617 void gdk_window_get_geometry(Window* this_, int* x, int* y, int* width, int* height, int* depth);
10618 Window* gdk_window_get_group(Window* this_);
10619 int gdk_window_get_height(Window* this_);
10620 void gdk_window_get_internal_paint_info(Window* this_, /*out*/ Drawable** real_drawable, /*out*/ int* x_offset, /*out*/ int* y_offset);
10621 int gdk_window_get_modal_hint(Window* this_);
10622 int gdk_window_get_origin(Window* this_, int* x, int* y);
10623 Window* gdk_window_get_parent(Window* this_);
10624 Window* gdk_window_get_pointer(Window* this_, /*out*/ int* x=null, /*out*/ int* y=null, /*out*/ ModifierType* mask=null);
10625 void gdk_window_get_position(Window* this_, /*out*/ int* x=null, /*out*/ int* y=null);
10626 void gdk_window_get_root_coords(Window* this_, int x, int y, /*out*/ int* root_x, /*out*/ int* root_y);
10627 void gdk_window_get_root_origin(Window* this_, int* x, int* y);
10628 Screen* gdk_window_get_screen(Window* this_);
10629 WindowState gdk_window_get_state(Window* this_);
10630 Window* gdk_window_get_toplevel(Window* this_);
10631 WindowTypeHint gdk_window_get_type_hint(Window* this_);
10632 Region* gdk_window_get_update_area(Window* this_);
10633 void gdk_window_get_user_data(Window* this_, /*out*/ void** data);
10634 Visual* gdk_window_get_visual(Window* this_);
10635 int gdk_window_get_width(Window* this_);
10636 WindowType gdk_window_get_window_type(Window* this_);
10637 int gdk_window_has_native(Window* this_);
10638 void gdk_window_hide(Window* this_);
10639 void gdk_window_iconify(Window* this_);
10640 void gdk_window_input_shape_combine_mask(Window* this_, Bitmap* mask, int x, int y);
10641 void gdk_window_input_shape_combine_region(Window* this_, Region* shape_region, int offset_x, int offset_y);
10642 void gdk_window_invalidate_maybe_recurse(Window* this_, Region* region, void** child_func, void* user_data);
10643 void gdk_window_invalidate_rect(Window* this_, Rectangle* rect, int invalidate_children);
10644 void gdk_window_invalidate_region(Window* this_, Region* region, int invalidate_children);
10645 int gdk_window_is_destroyed(Window* this_);
10646 int gdk_window_is_input_only(Window* this_);
10647 int gdk_window_is_shaped(Window* this_);
10648 int gdk_window_is_viewable(Window* this_);
10649 int gdk_window_is_visible(Window* this_);
10650 void gdk_window_lower(Window* this_);
10651 void gdk_window_maximize(Window* this_);
10652 void gdk_window_merge_child_input_shapes(Window* this_);
10653 void gdk_window_merge_child_shapes(Window* this_);
10654 void gdk_window_move(Window* this_, int x, int y);
10655 void gdk_window_move_region(Window* this_, Region* region, int dx, int dy);
10656 void gdk_window_move_resize(Window* this_, int x, int y, int width, int height);
10657 Window* gdk_window_new(Window* this_, WindowAttr* attributes, int attributes_mask);
10658 GLib2.List* gdk_window_peek_children(Window* this_);
10659 void gdk_window_process_updates(Window* this_, int update_children);
10660 void gdk_window_raise(Window* this_);
10661 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);
10662 void gdk_window_register_dnd(Window* this_);
10663 void gdk_window_remove_filter(Window* this_, FilterFunc function_, void* data);
10664 void gdk_window_remove_redirection(Window* this_);
10665 void gdk_window_reparent(Window* this_, Window* new_parent, int x, int y);
10666 void gdk_window_resize(Window* this_, int width, int height);
10667 void gdk_window_restack(Window* this_, Window* sibling, int above);
10668 void gdk_window_scroll(Window* this_, int dx, int dy);
10669 void gdk_window_set_accept_focus(Window* this_, int accept_focus);
10670 void gdk_window_set_back_pixmap(Window* this_, Pixmap* pixmap, int parent_relative);
10671 void gdk_window_set_background(Window* this_, Color* color);
10672 void gdk_window_set_child_input_shapes(Window* this_);
10673 void gdk_window_set_child_shapes(Window* this_);
10674 void gdk_window_set_composited(Window* this_, int composited);
10675 void gdk_window_set_cursor(Window* this_, Cursor* cursor=null);
10676 void gdk_window_set_decorations(Window* this_, WMDecoration decorations);
10677 void gdk_window_set_events(Window* this_, EventMask event_mask);
10678 void gdk_window_set_focus_on_map(Window* this_, int focus_on_map);
10679 void gdk_window_set_functions(Window* this_, WMFunction functions);
10680 void gdk_window_set_geometry_hints(Window* this_, Geometry* geometry, WindowHints geom_mask);
10681 void gdk_window_set_group(Window* this_, Window* leader);
10682 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);
10683 void gdk_window_set_icon(Window* this_, Window* icon_window, Pixmap* pixmap, Bitmap* mask);
10684 void gdk_window_set_icon_list(Window* this_, GLib2.List* pixbufs);
10685 void gdk_window_set_icon_name(Window* this_, char* name);
10686 void gdk_window_set_keep_above(Window* this_, int setting);
10687 void gdk_window_set_keep_below(Window* this_, int setting);
10688 void gdk_window_set_modal_hint(Window* this_, int modal);
10689 void gdk_window_set_opacity(Window* this_, double opacity);
10690 void gdk_window_set_override_redirect(Window* this_, int override_redirect);
10691 void gdk_window_set_role(Window* this_, char* role);
10692 void gdk_window_set_skip_pager_hint(Window* this_, int skips_pager);
10693 void gdk_window_set_skip_taskbar_hint(Window* this_, int skips_taskbar);
10694 void gdk_window_set_startup_id(Window* this_, char* startup_id);
10695 int gdk_window_set_static_gravities(Window* this_, int use_static);
10696 void gdk_window_set_title(Window* this_, char* title);
10697 void gdk_window_set_transient_for(Window* this_, Window* parent);
10698 void gdk_window_set_type_hint(Window* this_, WindowTypeHint hint);
10699 void gdk_window_set_urgency_hint(Window* this_, int urgent);
10700 void gdk_window_set_user_data(Window* this_, void* user_data);
10701 void gdk_window_shape_combine_mask(Window* this_, Bitmap* mask, int x, int y);
10702 void gdk_window_shape_combine_region(Window* this_, Region* shape_region, int offset_x, int offset_y);
10703 void gdk_window_show(Window* this_);
10704 void gdk_window_show_unraised(Window* this_);
10705 void gdk_window_stick(Window* this_);
10706 void gdk_window_thaw_toplevel_updates_libgtk_only(Window* this_);
10707 void gdk_window_thaw_updates(Window* this_);
10708 void gdk_window_unfullscreen(Window* this_);
10709 void gdk_window_unmaximize(Window* this_);
10710 void gdk_window_unstick(Window* this_);
10711 void gdk_window_withdraw(Window* this_);
10712 void gdk_add_client_message_filter(Atom message_type, FilterFunc func, void* data);
10713 void gdk_add_option_entries_libgtk_only(GLib2.OptionGroup* group);
10714 Atom gdk_atom_intern(char* atom_name, int only_if_exists);
10715 Atom gdk_atom_intern_static_string(char* atom_name);
10716 char* /*new*/ gdk_atom_name(Atom atom);
10717 void gdk_beep();
10718 Bitmap* gdk_bitmap_create_from_data(Drawable* drawable, char* data, int width, int height);
10719 cairo.Context* /*new*/ gdk_cairo_create(Drawable* drawable);
10720 void gdk_cairo_rectangle(cairo.Context* cr, Rectangle* rectangle);
10721 void gdk_cairo_region(cairo.Context* cr, Region* region);
10722 void gdk_cairo_reset_clip(cairo.Context* cr, Drawable* drawable);
10723 void gdk_cairo_set_source_color(cairo.Context* cr, Color* color);
10724 void gdk_cairo_set_source_pixbuf(cairo.Context* cr, GdkPixbuf2.Pixbuf* pixbuf, double pixbuf_x, double pixbuf_y);
10725 void gdk_cairo_set_source_pixmap(cairo.Context* cr, Pixmap* pixmap, double pixmap_x, double pixmap_y);
10726 void gdk_cairo_set_source_window(cairo.Context* cr, Window* window, double x, double y);
10727 int gdk_char_height(Font* font, char character);
10728 int gdk_char_measure(Font* font, char character);
10729 int gdk_char_width(Font* font, char character);
10730 int gdk_char_width_wc(Font* font, WChar character);
10731 int gdk_color_alloc(Colormap* colormap, Color* color);
10732 int gdk_color_black(Colormap* colormap, Color* color);
10733 int gdk_color_change(Colormap* colormap, Color* color);
10734 int gdk_color_parse(char* spec, /*out*/ Color* color);
10735 int gdk_color_white(Colormap* colormap, Color* color);
10736 int gdk_colors_alloc(Colormap* colormap, int contiguous, c_ulong* planes, int nplanes, c_ulong* pixels, int npixels);
10737 void gdk_colors_free(Colormap* colormap, c_ulong* pixels, int npixels, c_ulong planes);
10738 void gdk_colors_store(Colormap* colormap, Color* colors, int ncolors);
10739 GLib2.List* gdk_devices_list();
10740 void gdk_drag_abort(DragContext* context, uint time_);
10741 DragContext* gdk_drag_begin(Window* window, GLib2.List* targets);
10742 void gdk_drag_drop(DragContext* context, uint time_);
10743 int gdk_drag_drop_succeeded(DragContext* context);
10744 void gdk_drag_find_window(DragContext* context, Window* drag_window, int x_root, int y_root, /*out*/ Window** dest_window, /*out*/ DragProtocol* protocol);
10745 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);
10746 NativeWindow gdk_drag_get_protocol(NativeWindow xid, DragProtocol* protocol);
10747 NativeWindow gdk_drag_get_protocol_for_display(Display* display, NativeWindow xid, DragProtocol* protocol);
10748 Atom gdk_drag_get_selection(DragContext* context);
10749 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_);
10750 void gdk_drag_status(DragContext* context, DragAction action, uint time_);
10751 void gdk_draw_arc(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height, int angle1, int angle2);
10752 void gdk_draw_drawable(Drawable* drawable, GC* gc, Drawable* src, int xsrc, int ysrc, int xdest, int ydest, int width, int height);
10753 void gdk_draw_glyphs(Drawable* drawable, GC* gc, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs);
10754 void gdk_draw_glyphs_transformed(Drawable* drawable, GC* gc, Pango.Matrix* matrix, Pango.Font* font, int x, int y, Pango.GlyphString* glyphs);
10755 void gdk_draw_gray_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride);
10756 void gdk_draw_image(Drawable* drawable, GC* gc, Image* image, int xsrc, int ysrc, int xdest, int ydest, int width, int height);
10757 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);
10758 void gdk_draw_layout(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout);
10759 void gdk_draw_layout_line(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line);
10760 void gdk_draw_layout_line_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.LayoutLine* line, Color* foreground=null, Color* background=null);
10761 void gdk_draw_layout_with_colors(Drawable* drawable, GC* gc, int x, int y, Pango.Layout* layout, Color* foreground=null, Color* background=null);
10762 void gdk_draw_line(Drawable* drawable, GC* gc, int x1_, int y1_, int x2_, int y2_);
10763 void gdk_draw_lines(Drawable* drawable, GC* gc, Point* points, int n_points);
10764 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);
10765 void gdk_draw_point(Drawable* drawable, GC* gc, int x, int y);
10766 void gdk_draw_points(Drawable* drawable, GC* gc, Point* points, int n_points);
10767 void gdk_draw_polygon(Drawable* drawable, GC* gc, int filled, Point* points, int n_points);
10768 void gdk_draw_rectangle(Drawable* drawable, GC* gc, int filled, int x, int y, int width, int height);
10769 void gdk_draw_rgb_32_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* buf, int rowstride);
10770 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);
10771 void gdk_draw_rgb_image(Drawable* drawable, GC* gc, int x, int y, int width, int height, RgbDither dith, ubyte* rgb_buf, int rowstride);
10772 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);
10773 void gdk_draw_segments(Drawable* drawable, GC* gc, Segment* segs, int n_segs);
10774 void gdk_draw_string(Drawable* drawable, Font* font, GC* gc, int x, int y, char* string_);
10775 void gdk_draw_text(Drawable* drawable, Font* font, GC* gc, int x, int y, char* text, int text_length);
10776 void gdk_draw_text_wc(Drawable* drawable, Font* font, GC* gc, int x, int y, WChar* text, int text_length);
10777 void gdk_draw_trapezoids(Drawable* drawable, GC* gc, Trapezoid* trapezoids, int n_trapezoids);
10778 void gdk_drop_finish(DragContext* context, int success, uint time_);
10779 void gdk_drop_reply(DragContext* context, int ok, uint time_);
10780 int gdk_error_trap_pop();
10781 void gdk_error_trap_push();
10782 Event* /*new*/ gdk_event_get();
10783 Event* /*new*/ gdk_event_get_graphics_expose(Window* window);
10784 void gdk_event_handler_set(EventFunc func, void* data, GLib2.DestroyNotify notify);
10785 Event* /*new*/ gdk_event_peek();
10786 void gdk_event_request_motions(EventMotion* event);
10787 int gdk_event_send_client_message_for_display(Display* display, Event* event, NativeWindow winid);
10788 int gdk_events_pending();
10789 void gdk_exit(int error_code);
10790 void gdk_flush();
10791 Font* /*new*/ gdk_font_from_description(Pango.FontDescription* font_desc);
10792 Font* /*new*/ gdk_font_from_description_for_display(Display* display, Pango.FontDescription* font_desc);
10793 Font* /*new*/ gdk_font_load(char* font_name);
10794 Font* /*new*/ gdk_font_load_for_display(Display* display, char* font_name);
10795 Font* /*new*/ gdk_fontset_load(char* fontset_name);
10796 Font* /*new*/ gdk_fontset_load_for_display(Display* display, char* fontset_name);
10797 void gdk_free_compound_text(ubyte* ctext);
10798 void gdk_free_text_list(char** list);
10799 Window* gdk_get_default_root_window();
10800 char* /*new*/ gdk_get_display();
10801 char* gdk_get_display_arg_name();
10802 char* gdk_get_program_class();
10803 int gdk_get_show_events();
10804 int gdk_get_use_xshm();
10805 void gdk_init(/*inout*/ int* argc, /*inout*/ char*** argv);
10806 int gdk_init_check(/*inout*/ int* argc, /*inout*/ char*** argv);
10807 int gdk_input_add(int source, InputCondition condition, InputFunction function_, void* data);
10808 int gdk_input_add_full(int source, InputCondition condition, InputFunction function_, void* data, GLib2.DestroyNotify destroy);
10809 void gdk_input_remove(int tag);
10810 void gdk_input_set_extension_events(Window* window, int mask, ExtensionMode mode);
10811 GrabStatus gdk_keyboard_grab(Window* window, int owner_events, uint time_);
10812 int gdk_keyboard_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events);
10813 void gdk_keyboard_ungrab(uint time_);
10814 void gdk_keyval_convert_case(uint symbol, /*out*/ uint* lower, /*out*/ uint* upper);
10815 uint gdk_keyval_from_name(char* keyval_name);
10816 int gdk_keyval_is_lower(uint keyval);
10817 int gdk_keyval_is_upper(uint keyval);
10818 char* gdk_keyval_name(uint keyval);
10819 uint gdk_keyval_to_lower(uint keyval);
10820 uint gdk_keyval_to_unicode(uint keyval);
10821 uint gdk_keyval_to_upper(uint keyval);
10822 GLib2.List* /*new container*/ gdk_list_visuals();
10823 int gdk_mbstowcs(WChar* dest, char* src, int dest_max);
10824 void gdk_notify_startup_complete();
10825 void gdk_notify_startup_complete_with_id(char* startup_id);
10826 Window* gdk_offscreen_window_get_embedder(Window* window);
10827 Pixmap* gdk_offscreen_window_get_pixmap(Window* window);
10828 void gdk_offscreen_window_set_embedder(Window* window, Window* embedder);
10829 Pango.Attribute* gdk_pango_attr_emboss_color_new(Color* color);
10830 Pango.Attribute* gdk_pango_attr_embossed_new(int embossed);
10831 Pango.Attribute* gdk_pango_attr_stipple_new(Bitmap* stipple);
10832 Pango.Context* gdk_pango_context_get();
10833 Pango.Context* gdk_pango_context_get_for_screen(Screen* screen);
10834 void gdk_pango_context_set_colormap(Pango.Context* context, Colormap* colormap);
10835 Region* gdk_pango_layout_get_clip_region(Pango.Layout* layout, int x_origin, int y_origin, int* index_ranges, int n_ranges);
10836 Region* gdk_pango_layout_line_get_clip_region(Pango.LayoutLine* line, int x_origin, int y_origin, int* index_ranges, int n_ranges);
10837 void gdk_parse_args(/*inout*/ int* argc, /*inout*/ char*** argv);
10838 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);
10839 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);
10840 void gdk_pixbuf_render_pixmap_and_mask(GdkPixbuf2.Pixbuf* pixbuf, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold);
10841 void gdk_pixbuf_render_pixmap_and_mask_for_colormap(GdkPixbuf2.Pixbuf* pixbuf, Colormap* colormap, Pixmap** pixmap_return, Bitmap** mask_return, int alpha_threshold);
10842 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);
10843 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);
10844 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);
10845 GrabStatus gdk_pointer_grab(Window* window, int owner_events, EventMask event_mask, Window* confine_to, Cursor* cursor, uint time_);
10846 int gdk_pointer_grab_info_libgtk_only(Display* display, Window** grab_window, int* owner_events);
10847 int gdk_pointer_is_grabbed();
10848 void gdk_pointer_ungrab(uint time_);
10849 void gdk_pre_parse_libgtk_only();
10850 void gdk_property_change(Window* window, Atom property, Atom type, int format, PropMode mode, ubyte* data, int nelements);
10851 void gdk_property_delete(Window* window, Atom property);
10852 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);
10853 void gdk_query_depths(/*out*/ int** depths, /*out*/ int* count);
10854 void gdk_query_visual_types(VisualType** visual_types, int* count);
10855 Region* gdk_region_new();
10856 Region* gdk_region_polygon(Point* points, int n_points, FillRule fill_rule);
10857 Region* gdk_region_rectangle(Rectangle* rectangle);
10858 RgbCmap* gdk_rgb_cmap_new(uint* colors, int n_colors);
10859 int gdk_rgb_colormap_ditherable(Colormap* cmap);
10860 int gdk_rgb_ditherable();
10861 void gdk_rgb_find_color(Colormap* colormap, Color* color);
10862 void gdk_rgb_gc_set_background(GC* gc, uint rgb);
10863 void gdk_rgb_gc_set_foreground(GC* gc, uint rgb);
10864 Colormap* gdk_rgb_get_colormap();
10865 Visual* gdk_rgb_get_visual();
10866 void gdk_rgb_init();
10867 void gdk_rgb_set_install(int install);
10868 void gdk_rgb_set_min_colors(int min_colors);
10869 void gdk_rgb_set_verbose(int verbose);
10870 c_ulong gdk_rgb_xpixel_from_rgb(uint rgb);
10871 void gdk_selection_convert(Window* requestor, Atom selection, Atom target, uint time_);
10872 Window* gdk_selection_owner_get(Atom selection);
10873 Window* gdk_selection_owner_get_for_display(Display* display, Atom selection);
10874 int gdk_selection_owner_set(Window* owner, Atom selection, uint time_, int send_event);
10875 int gdk_selection_owner_set_for_display(Display* display, Window* owner, Atom selection, uint time_, int send_event);
10876 int gdk_selection_property_get(Window* requestor, ubyte** data, Atom* prop_type, int* prop_format);
10877 void gdk_selection_send_notify(NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_);
10878 void gdk_selection_send_notify_for_display(Display* display, NativeWindow requestor, Atom selection, Atom target, Atom property, uint time_);
10879 void gdk_set_double_click_time(uint msec);
10880 char* /*new*/ gdk_set_locale();
10881 PointerHooks* gdk_set_pointer_hooks(PointerHooks* new_hooks);
10882 void gdk_set_program_class(char* program_class);
10883 void gdk_set_show_events(int show_events);
10884 void gdk_set_sm_client_id(char* sm_client_id);
10885 void gdk_set_use_xshm(int use_xshm);
10886 int gdk_setting_get(char* name, GObject2.Value* value);
10887 int gdk_spawn_command_line_on_screen(Screen* screen, char* command_line, GLib2.Error** error);
10888 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);
10889 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);
10890 void gdk_string_extents(Font* font, char* string_, int* lbearing, int* rbearing, int* width, int* ascent, int* descent);
10891 int gdk_string_height(Font* font, char* string_);
10892 int gdk_string_measure(Font* font, char* string_);
10893 int gdk_string_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
10894 int gdk_string_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
10895 int gdk_string_width(Font* font, char* string_);
10896 void gdk_synthesize_window_state(Window* window, WindowState unset_flags, WindowState set_flags);
10897 void gdk_test_render_sync(Window* window);
10898 int gdk_test_simulate_button(Window* window, int x, int y, uint button, ModifierType modifiers, EventType button_pressrelease);
10899 int gdk_test_simulate_key(Window* window, int x, int y, uint keyval, ModifierType modifiers, EventType key_pressrelease);
10900 void gdk_text_extents(Font* font, char* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent);
10901 void gdk_text_extents_wc(Font* font, WChar* text, int text_length, int* lbearing, int* rbearing, int* width, int* ascent, int* descent);
10902 int gdk_text_height(Font* font, char* text, int text_length);
10903 int gdk_text_measure(Font* font, char* text, int text_length);
10904 int gdk_text_property_to_text_list(Atom encoding, int format, ubyte* text, int length, char*** list);
10905 int gdk_text_property_to_text_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list);
10906 int gdk_text_property_to_utf8_list(Atom encoding, int format, ubyte* text, int length, char*** list=null);
10907 int gdk_text_property_to_utf8_list_for_display(Display* display, Atom encoding, int format, ubyte* text, int length, char*** list);
10908 int gdk_text_width(Font* font, char* text, int text_length);
10909 int gdk_text_width_wc(Font* font, WChar* text, int text_length);
10910 uint gdk_threads_add_idle(GLib2.SourceFunc function_, void* data);
10911 uint gdk_threads_add_idle_full(int priority, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null);
10912 uint gdk_threads_add_timeout(uint interval, GLib2.SourceFunc function_, void* data);
10913 uint gdk_threads_add_timeout_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null);
10914 uint gdk_threads_add_timeout_seconds(uint interval, GLib2.SourceFunc function_, void* data);
10915 uint gdk_threads_add_timeout_seconds_full(int priority, uint interval, GLib2.SourceFunc function_, void* data, GLib2.DestroyNotify notify=null);
10916 void gdk_threads_enter();
10917 void gdk_threads_init();
10918 void gdk_threads_leave();
10919 void gdk_threads_set_lock_functions(GObject2.Callback enter_fn, GObject2.Callback leave_fn);
10920 uint gdk_unicode_to_keyval(uint wc);
10921 int gdk_utf8_to_compound_text(char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
10922 int gdk_utf8_to_compound_text_for_display(Display* display, char* str, Atom* encoding, int* format, ubyte** ctext, int* length);
10923 char* /*new*/ gdk_utf8_to_string_target(char* str);
10924 char* /*new*/ gdk_wcstombs(WChar* src);
10925 Window* gdk_window_at_pointer(/*out*/ int* win_x=null, /*out*/ int* win_y=null);
10926 void gdk_window_constrain_size(Geometry* geometry, uint flags, int width, int height, /*out*/ int* new_width, /*out*/ int* new_height);
10927 Window* gdk_window_foreign_new(NativeWindow anid);
10928 Window* gdk_window_foreign_new_for_display(Display* display, NativeWindow anid);
10929 GLib2.List* gdk_window_get_toplevels();
10930 Window* gdk_window_lookup(NativeWindow anid);
10931 Window* gdk_window_lookup_for_display(Display* display, NativeWindow anid);
10932 void gdk_window_process_all_updates();
10933 void gdk_window_set_debug_updates(int setting);