I've no idea here...
[gtkD.git] / src / gdk / gdktypes.d
blob6f30dccb50b5efd65c0cc131f64f05801be23429
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
23 module gdk.gdktypes;
26 public import glib.glibtypes;
27 public import gobject.gobjecttypes;
28 public import pango.pangotypes;
29 public import gdkpixbuf.gdkpixbuftypes;
31 alias void* GdkAtom;
32 alias void* GdkNativeWindow;
35 /**
36 * typedef guint32 GdkWChar;
37 * Specifies a wide character type, used to represent character codes.
38 * This is needed since some native languages have character sets which have
39 * more than 256 characters (Japanese and Chinese, for example).
40 * Wide character values between 0 and 127 are always identical in meaning to
41 * the ASCII character codes. The wide character value 0 is often used to
42 * terminate strings of wide characters in a similar way to normal strings
43 * using the char type.
44 * An alternative to wide characters is multi-byte characters, which extend
45 * normal char strings to cope with larger character sets. As the name suggests,
46 * multi-byte characters use a different number of bytes to store different
47 * character codes. For example codes 0-127 (i.e. the ASCII codes) often
48 * use just one byte of memory, while other codes may use 2, 3 or even 4 bytes.
49 * Multi-byte characters have the advantage that they can often be used in an
50 * application with little change, since strings are still represented as arrays
51 * of char values. However multi-byte strings are much easier to manipulate since
52 * the character are all of the same size.
53 * Applications typically use wide characters to represent character codes
54 * internally, and multi-byte strings when saving the characters to a file.
55 * The gdk_wcstombs() and gdk_mbstowcs() functions can be used to convert from
56 * one representation to the other.
57 * See the 'Extended Characters' section of the GNU C Library Reference Manual
58 * for more detailed information on wide and multi-byte characters.
60 public alias uint GdkWChar;
62 /**
63 * typedef void GdkXEvent; /+* Can be cast to window system specific
64 * Used to represent native events (XEvents for the X11
65 * backend, MSGs for Win32).
67 public alias void GdkXEvent;
69 /**
70 * typedef GdkAtom GdkSelection;
71 * Warning
72 * GdkSelection is deprecated and should not be used in newly-written code.
73 * The GdkSelection enumeration contains predefined
74 * atom values for several common selections.
76 public alias GdkAtom GdkSelection;
78 /**
79 * typedef GdkAtom GdkSelectionType;
80 * Warning
81 * GdkSelectionType is deprecated and should not be used in newly-written code.
82 * The GdkSelectionType enumeration contains predefined
83 * atom values used to represent the types of data transferred
84 * in response to a request for a target. See the
85 * ICCCM for details about what data should be transferred
86 * for each of these types. Other atoms can be used,
87 * and the recommended practice for GTK+ is to to use mime
88 * types for this purpose. However, supporting these types
89 * may be useful for compatibility with older programs.
91 public alias GdkAtom GdkSelectionType;
93 /**
94 * typedef GdkAtom GdkTarget;
95 * Warning
96 * GdkTarget is deprecated and should not be used in newly-written code.
97 * The GdkTarget enumeration contains predefined atom values which are
98 * used to describe possible targets for a selection. Other atoms can be
99 * used, and the recommended practice for GTK+ is to to use mime types
100 * for this purpose. However, supporting these types may be useful for
101 * compatibility with older programs.
103 public alias GdkAtom GdkTarget;
105 * Returned by gdk_pointer_grab() and gdk_keyboard_grab() to indicate
106 * success or the reason for the failure of the grab attempt.
107 * GDK_GRAB_SUCCESS
108 * the resource was successfully grabbed.
109 * GDK_GRAB_ALREADY_GRABBED
110 * the resource is actively grabbed by another client.
111 * GDK_GRAB_INVALID_TIME
112 * the resource was grabbed more recently than the
114 public enum GdkGrabStatus
116 SUCCESS = 0,
117 ALREADY_GRABBED = 1,
118 INVALID_TIME = 2,
119 NOT_VIEWABLE = 3,
120 FROZEN = 4
122 alias GdkGrabStatus GrabStatus;
125 * The method for determining which pixels are included in a region, when
126 * creating a GdkRegion from a polygon.
127 * The fill rule is only relevant for polygons which overlap themselves.
128 * GDK_EVEN_ODD_RULE
129 * areas which are overlapped an odd number of times are
130 * included in the region, while areas overlapped an even number of times are not.
131 * GDK_WINDING_RULE
132 * overlapping areas are always included.
134 public enum GdkFillRule
136 EVEN_ODD_RULE,
137 WINDING_RULE
139 alias GdkFillRule FillRule;
142 * Specifies the possible values returned by gdk_region_rect_in().
143 * GDK_OVERLAP_RECTANGLE_IN
144 * if the rectangle is inside the GdkRegion.
145 * GDK_OVERLAP_RECTANGLE_OUT
146 * if the rectangle is outside the GdkRegion.
147 * GDK_OVERLAP_RECTANGLE_PART
148 * if the rectangle is partly inside the GdkRegion.
150 public enum GdkOverlapType
152 RECTANGLE_IN,
153 RECTANGLE_OUT,
154 RECTANGLE_PART
156 alias GdkOverlapType OverlapType;
159 * A set of bit flags used to indicate which fields
160 * GdkGCValues structure are set.
161 * GDK_GC_FOREGROUND
162 * the foreground is set.
163 * GDK_GC_BACKGROUND
164 * the background is set.
165 * GDK_GC_FONT
166 * the font is set.
167 * GDK_GC_FUNCTION
168 * the function is set.
169 * GDK_GC_FILL
170 * the fill is set.
171 * GDK_GC_TILE
172 * the tile is set.
173 * GDK_GC_STIPPLE
174 * the stipple is set.
175 * GDK_GC_CLIP_MASK
176 * the clip_mask is set.
177 * GDK_GC_SUBWINDOW
178 * the subwindow_mode is set.
179 * GDK_GC_TS_X_ORIGIN
180 * the ts_x_origin is set.
181 * GDK_GC_TS_Y_ORIGIN
182 * the ts_y_origin is set.
183 * GDK_GC_CLIP_X_ORIGIN
184 * the clip_x_origin is set.
185 * GDK_GC_CLIP_Y_ORIGIN
186 * the clip_y_origin is set.
187 * GDK_GC_EXPOSURES
188 * the graphics_exposures is set.
189 * GDK_GC_LINE_WIDTH
190 * the line_width is set.
191 * GDK_GC_LINE_STYLE
192 * the line_style is set.
193 * GDK_GC_CAP_STYLE
194 * the cap_style is set.
195 * GDK_GC_JOIN_STYLE
196 * the join_style is set.
198 public enum GdkGCValuesMask
200 FOREGROUND = 1 << 0,
201 BACKGROUND = 1 << 1,
202 FONT = 1 << 2,
203 FUNCTION = 1 << 3,
204 FILL = 1 << 4,
205 TILE = 1 << 5,
206 STIPPLE = 1 << 6,
207 CLIP_MASK = 1 << 7,
208 SUBWINDOW = 1 << 8,
209 TS_X_ORIGIN = 1 << 9,
210 TS_Y_ORIGIN = 1 << 10,
211 CLIP_X_ORIGIN = 1 << 11,
212 CLIP_Y_ORIGIN = 1 << 12,
213 EXPOSURES = 1 << 13,
214 LINE_WIDTH = 1 << 14,
215 LINE_STYLE = 1 << 15,
216 CAP_STYLE = 1 << 16,
217 JOIN_STYLE = 1 << 17
219 alias GdkGCValuesMask GCValuesMask;
222 * Determines how the bit values for the source pixels are combined with
223 * the bit values for destination pixels to produce the final result. The
224 * sixteen values here correspond to the 16 different possible 2x2 truth
225 * tables. Only a couple of these values are usually useful; for colored
226 * images, only GDK_COPY, GDK_XOR and GDK_INVERT are generally
227 * useful. For bitmaps, GDK_AND and GDK_OR are also useful.
229 public enum GdkFunction
231 COPY,
232 INVERT,
233 XOR,
234 CLEAR,
235 AND,
236 AND_REVERSE,
237 AND_INVERT,
238 NOOP,
240 EQUIV,
241 OR_REVERSE,
242 COPY_INVERT,
243 OR_INVERT,
244 NAND,
245 NOR,
248 alias GdkFunction Funct;
251 * Determines how primitives are drawn.
252 * GDK_SOLID
253 * draw with the foreground color.
254 * GDK_TILED
255 * draw with a tiled pixmap.
256 * GDK_STIPPLED
257 * draw using the stipple bitmap. Pixels corresponding
259 public enum GdkFill
261 SOLID,
262 TILED,
263 STIPPLED,
264 OPAQUE_STIPPLED
266 alias GdkFill Fill;
269 * Determines how drawing onto a window will affect child
270 * windows of that window.
271 * GDK_CLIP_BY_CHILDREN
272 * only draw onto the window itself.
273 * GDK_INCLUDE_INFERIORS
274 * draw onto the window and child windows.
276 public enum GdkSubwindowMode
278 CLIP_BY_CHILDREN = 0,
279 INCLUDE_INFERIORS = 1
281 alias GdkSubwindowMode SubwindowMode;
284 * Determines how lines are drawn.
285 * GDK_LINE_SOLID
286 * lines are drawn solid.
287 * GDK_LINE_ON_OFF_DASH
288 * even segments are drawn; odd segments are not drawn.
289 * GDK_LINE_DOUBLE_DASH
290 * even segments are normally. Odd segments are drawn
292 public enum GdkLineStyle
294 SOLID,
295 ON_OFF_DASH,
296 DOUBLE_DASH
298 alias GdkLineStyle LineStyle;
301 * Determines how the end of lines are drawn.
302 * GDK_CAP_NOT_LAST
303 * the same as GDK_CAP_BUTT for lines of non-zero width.
305 public enum GdkCapStyle
307 NOT_LAST,
308 BUTT,
309 ROUND,
310 PROJECTING
312 alias GdkCapStyle CapStyle;
315 * Determines how the joins between segments of a polygon are drawn.
316 * GDK_JOIN_MITER
317 * the sides of each line are extended to meet at an angle.
318 * GDK_JOIN_ROUND
319 * the sides of the two lines are joined by a circular arc.
320 * GDK_JOIN_BEVEL
321 * the sides of the two lines are joined by a straight line which
323 public enum GdkJoinStyle
325 MITER,
326 ROUND,
327 BEVEL
329 alias GdkJoinStyle JoinStyle;
332 * Selects whether or not GdkRGB applies dithering
333 * to the image on display.
334 * Since GdkRGB currently only handles images with 8 bits per component,
335 * dithering on 24 bit per pixel displays is a moot point.
336 * GDK_RGB_DITHER_NONE
337 * Never use dithering.
338 * GDK_RGB_DITHER_NORMAL
339 * Use dithering in 8 bits per pixel (and below)
340 * only.
341 * GDK_RGB_DITHER_MAX
342 * Use dithering in 16 bits per pixel and below.
344 public enum GdkRgbDither
346 NONE,
347 NORMAL,
350 alias GdkRgbDither RgbDither;
353 * Specifies the type of a GdkImage.
354 * GDK_IMAGE_NORMAL
355 * The original X image type, which is quite slow since the
356 * image has to be transferred from the client to the server to display it.
357 * GDK_IMAGE_SHARED
358 * A faster image type, which uses shared memory to transfer
359 * the image data between client and server. However this will only be available
360 * if client and server are on the same machine and the shared memory extension
361 * is supported by the server.
362 * GDK_IMAGE_FASTEST
363 * Specifies that GDK_IMAGE_SHARED should be tried first,
364 * and if that fails then GDK_IMAGE_NORMAL will be used.
366 public enum GdkImageType
368 NORMAL,
369 SHARED,
370 FASTEST
372 alias GdkImageType ImageType;
375 * An error code in the GDK_PIXBUF_ERROR domain. Many gdk-pixbuf
376 * operations can cause errors in this domain, or in the G_FILE_ERROR
377 * domain.
378 * GDK_PIXBUF_ERROR_CORRUPT_IMAGE
379 * An image file was broken somehow.
380 * GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY
381 * Not enough memory.
382 * GDK_PIXBUF_ERROR_BAD_OPTION
383 * A bad option was passed to a pixbuf save module.
384 * GDK_PIXBUF_ERROR_UNKNOWN_TYPE
385 * Unknown image type.
386 * GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION
387 * Don't know how to perform the
388 * given operation on the type of image at hand.
389 * GDK_PIXBUF_ERROR_FAILED
390 * Generic failure code, something went wrong.
392 public enum GdkPixbufError
394 /+* image data hosed +/
395 GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
396 /+* no mem to load image +/
397 GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
398 /+* bad option passed to save routine +/
399 GDK_PIXBUF_ERROR_BAD_OPTION,
400 /+* unsupported image type (sort of an ENOSYS) +/
401 GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
402 /+* unsupported operation (load, save) for image type +/
403 GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION,
404 GDK_PIXBUF_ERROR_FAILED
406 alias GdkPixbufError PixbufError;
410 public enum GdkColorspace
414 alias GdkColorspace Colorspace;
418 public enum GdkPixbufAlphaMode
420 BILEVEL,
421 FULL
423 alias GdkPixbufAlphaMode PixbufAlphaMode;
427 public enum GdkInterpType
429 NEAREST,
430 TILES,
431 BILINEAR,
432 HYPER
434 alias GdkInterpType InterpType;
437 * The possible rotations which can be passed to gdk_pixbuf_rotate_simple().
438 * To make them easier to use, their numerical values are the actual degrees.
439 * GDK_PIXBUF_ROTATE_NONE
440 * No rotation.
441 * GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE
442 * Rotate by 90 degrees.
443 * GDK_PIXBUF_ROTATE_UPSIDEDOWN
444 * Rotate by 180 degrees.
445 * GDK_PIXBUF_ROTATE_CLOCKWISE
446 * Rotate by 270 degrees.
448 public enum GdkPixbufRotation
450 ROTATE_NONE = 0,
451 ROTATE_COUNTERCLOCKWISE = 90,
452 ROTATE_UPSIDEDOWN = 180,
453 ROTATE_CLOCKWISE = 270
455 alias GdkPixbufRotation PixbufRotation;
458 * A set of values that describe the manner in which the
459 * pixel values for a visual are converted into RGB
460 * values for display.
461 * GDK_VISUAL_STATIC_GRAY
462 * Each pixel value indexes a grayscale value directly.
463 * GDK_VISUAL_GRAYSCALE
464 * Each pixel is an index into a color map that maps pixel
466 public enum GdkVisualType
468 STATIC_GRAY,
469 GRAYSCALE,
470 STATIC_COLOR,
471 PSEUDO_COLOR,
472 TRUE_COLOR,
473 DIRECT_COLOR
475 alias GdkVisualType VisualType;
478 * A set of values describing the possible byte-orders
479 * for storing pixel values in memory.
480 * GDK_LSB_FIRST
481 * The values are stored with the least-significant byte
483 public enum GdkByteOrder
485 LSB_FIRST,
486 MSB_FIRST
488 alias GdkByteOrder ByteOrder;
491 * Warning
492 * GdkFontType is deprecated and should not be used in newly-written code.
493 * Indicates the type of a font. The possible values
494 * are currently:
495 * GDK_FONT_FONT
496 * the font is a single font.
497 * GDK_FONT_FONTSET
498 * the font is a fontset.
500 public enum GdkFontType
502 FONT,
503 FONTSET
505 alias GdkFontType FontType;
508 * The standard cursors available.
509 * GDK_X_CURSOR
510 * GDK_ARROW
511 * GDK_BASED_ARROW_DOWN
512 * GDK_BASED_ARROW_UP
513 * GDK_BOAT
514 * GDK_BOGOSITY
515 * GDK_BOTTOM_LEFT_CORNER
516 * GDK_BOTTOM_RIGHT_CORNER
517 * GDK_BOTTOM_SIDE
518 * GDK_BOTTOM_TEE
519 * GDK_BOX_SPIRAL
520 * GDK_CENTER_PTR
521 * GDK_CIRCLE
522 * GDK_CLOCK
523 * GDK_COFFEE_MUG
524 * GDK_CROSS
525 * GDK_CROSS_REVERSE
526 * GDK_CROSSHAIR
527 * GDK_DIAMOND_CROSS
528 * GDK_DOT
529 * GDK_DOTBOX
530 * GDK_DOUBLE_ARROW
531 * GDK_DRAFT_LARGE
532 * GDK_DRAFT_SMALL
533 * GDK_DRAPED_BOX
534 * GDK_EXCHANGE
535 * GDK_FLEUR
536 * GDK_GOBBLER
537 * GDK_GUMBY
538 * GDK_HAND1
539 * GDK_HAND2
540 * GDK_HEART
541 * GDK_ICON
542 * GDK_IRON_CROSS
543 * GDK_LEFT_PTR
544 * GDK_LEFT_SIDE
545 * GDK_LEFT_TEE
546 * GDK_LEFTBUTTON
547 * GDK_LL_ANGLE
548 * GDK_LR_ANGLE
549 * GDK_MAN
550 * GDK_MIDDLEBUTTON
551 * GDK_MOUSE
552 * GDK_PENCIL
553 * GDK_PIRATE
554 * GDK_PLUS
555 * GDK_QUESTION_ARROW
556 * GDK_RIGHT_PTR
557 * GDK_RIGHT_SIDE
558 * GDK_RIGHT_TEE
559 * GDK_RIGHTBUTTON
560 * GDK_RTL_LOGO
561 * GDK_SAILBOAT
562 * GDK_SB_DOWN_ARROW
563 * GDK_SB_H_DOUBLE_ARROW
564 * GDK_SB_LEFT_ARROW
565 * GDK_SB_RIGHT_ARROW
566 * GDK_SB_UP_ARROW
567 * GDK_SB_V_DOUBLE_ARROW
568 * GDK_SHUTTLE
569 * GDK_SIZING
570 * GDK_SPIDER
571 * GDK_SPRAYCAN
572 * GDK_STAR
573 * GDK_TARGET
574 * GDK_TCROSS
575 * GDK_TOP_LEFT_ARROW
576 * GDK_TOP_LEFT_CORNER
577 * GDK_TOP_RIGHT_CORNER
578 * GDK_TOP_SIDE
579 * GDK_TOP_TEE
580 * GDK_TREK
581 * GDK_UL_ANGLE
582 * GDK_UMBRELLA
583 * GDK_UR_ANGLE
584 * GDK_WATCH
585 * GDK_XTERM
586 * GDK_LAST_CURSOR
587 * last cursor type
588 * GDK_CURSOR_IS_PIXMAP
589 * type of cursors constructed with
590 * gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
592 public enum GdkCursorType
594 X_CURSOR = 0,
595 ARROW = 2,
596 BASED_ARROW_DOWN = 4,
597 BASED_ARROW_UP = 6,
598 BOAT = 8,
599 BOGOSITY = 10,
600 BOTTOM_LEFT_CORNER = 12,
601 BOTTOM_RIGHT_CORNER = 14,
602 BOTTOM_SIDE = 16,
603 BOTTOM_TEE = 18,
604 BOX_SPIRAL = 20,
605 CENTER_PTR = 22,
606 CIRCLE = 24,
607 CLOCK = 26,
608 COFFEE_MUG = 28,
609 CROSS = 30,
610 CROSS_REVERSE = 32,
611 CROSSHAIR = 34,
612 DIAMOND_CROSS = 36,
613 DOT = 38,
614 DOTBOX = 40,
615 DOUBLE_ARROW = 42,
616 DRAFT_LARGE = 44,
617 DRAFT_SMALL = 46,
618 DRAPED_BOX = 48,
619 EXCHANGE = 50,
620 FLEUR = 52,
621 GOBBLER = 54,
622 GUMBY = 56,
623 HAND1 = 58,
624 HAND2 = 60,
625 HEART = 62,
626 ICON = 64,
627 IRON_CROSS = 66,
628 LEFT_PTR = 68,
629 LEFT_SIDE = 70,
630 LEFT_TEE = 72,
631 LEFTBUTTON = 74,
632 LL_ANGLE = 76,
633 LR_ANGLE = 78,
634 MAN = 80,
635 MIDDLEBUTTON = 82,
636 MOUSE = 84,
637 PENCIL = 86,
638 PIRATE = 88,
639 PLUS = 90,
640 QUESTION_ARROW = 92,
641 RIGHT_PTR = 94,
642 RIGHT_SIDE = 96,
643 RIGHT_TEE = 98,
644 RIGHTBUTTON = 100,
645 RTL_LOGO = 102,
646 SAILBOAT = 104,
647 SB_DOWN_ARROW = 106,
648 SB_H_DOUBLE_ARROW = 108,
649 SB_LEFT_ARROW = 110,
650 SB_RIGHT_ARROW = 112,
651 SB_UP_ARROW = 114,
652 SB_V_DOUBLE_ARROW = 116,
653 SHUTTLE = 118,
654 SIZING = 120,
655 SPIDER = 122,
656 SPRAYCAN = 124,
657 STAR = 126,
658 TARGET = 128,
659 TCROSS = 130,
660 TOP_LEFT_ARROW = 132,
661 TOP_LEFT_CORNER = 134,
662 TOP_RIGHT_CORNER = 136,
663 TOP_SIDE = 138,
664 TOP_TEE = 140,
665 TREK = 142,
666 UL_ANGLE = 144,
667 UMBRELLA = 146,
668 UR_ANGLE = 148,
669 WATCH = 150,
670 XTERM = 152,
671 LAST_CURSOR,
672 CURSOR_IS_PIXMAP = -1
674 alias GdkCursorType CursorType;
677 * Describes the kind of window.
678 * GDK_WINDOW_ROOT
679 * root window; this window has no parent, covers the entire screen, and is created by the window system
680 * GDK_WINDOW_TOPLEVEL
681 * toplevel window (used to implement GtkWindow)
682 * GDK_WINDOW_CHILD
683 * child window (used to implement e.g. GtkButton)
684 * GDK_WINDOW_DIALOG
685 * useless/deprecated compatibility type
686 * GDK_WINDOW_TEMP
687 * override redirect temporary window (used to implement GtkMenu)
688 * GDK_WINDOW_FOREIGN
689 * foreign window (see gdk_window_foreign_new())
691 public enum GdkWindowType
693 ROOT,
694 TOPLEVEL,
695 CHILD,
696 DIALOG,
697 TEMP,
698 FOREIGN
700 alias GdkWindowType WindowType;
703 * GDK_INPUT_OUTPUT windows are the standard kind of window you might expect.
704 * GDK_INPUT_ONLY windows are invisible; they are used to trap events, but
705 * you can't draw on them.
706 * GDK_INPUT_OUTPUT
707 * window for graphics and events
708 * GDK_INPUT_ONLY
709 * window for events only
711 public enum GdkWindowClass
713 INPUT_OUTPUT,
714 INPUT_ONLY
716 alias GdkWindowClass WindowClass;
719 * Used to indicate which fields of a GdkGeometry struct should be paid attention
720 * to. Also, the presence/absence of GDK_HINT_POS, GDK_HINT_USER_POS, and
721 * GDK_HINT_USER_SIZE is significant, though they don't directly refer to
722 * GdkGeometry fields. GDK_HINT_USER_POS will be set automatically by GtkWindow
723 * if you call gtk_window_move(). GDK_HINT_USER_POS and GDK_HINT_USER_SIZE
724 * should be set if the user specified a size/position using a --geometry
725 * command-line argument; gtk_window_parse_geometry() automatically sets these
726 * flags.
727 * GDK_HINT_POS
728 * indicates that the program has positioned the window
729 * GDK_HINT_MIN_SIZE
730 * min size fields are set
731 * GDK_HINT_MAX_SIZE
732 * max size fields are set
733 * GDK_HINT_BASE_SIZE
734 * base size fields are set
735 * GDK_HINT_ASPECT
736 * aspect ratio fields are set
737 * GDK_HINT_RESIZE_INC
738 * resize increment fields are set
739 * GDK_HINT_WIN_GRAVITY
740 * window gravity field is set
741 * GDK_HINT_USER_POS
742 * indicates that the window's position was explicitly set by the user
743 * GDK_HINT_USER_SIZE
744 * indicates that the window's size was explicitly set by the user
746 public enum GdkWindowHints
748 HINT_POS = 1 << 0,
749 HINT_MIN_SIZE = 1 << 1,
750 HINT_MAX_SIZE = 1 << 2,
751 HINT_BASE_SIZE = 1 << 3,
752 HINT_ASPECT = 1 << 4,
753 HINT_RESIZE_INC = 1 << 5,
754 HINT_WIN_GRAVITY = 1 << 6,
755 HINT_USER_POS = 1 << 7,
756 HINT_USER_SIZE = 1 << 8
758 alias GdkWindowHints WindowHints;
761 * Defines the reference point of a window and the meaning of coordinates
762 * passed to gtk_window_move(). See gtk_window_move() and the "implementation
763 * notes" section of the
764 * Extended
765 * Window Manager Hints specification for more details.
766 * GDK_GRAVITY_NORTH_WEST
767 * the reference point is at the top left corner.
768 * GDK_GRAVITY_NORTH
769 * the reference point is in the middle of the top edge.
770 * GDK_GRAVITY_NORTH_EAST
771 * the reference point is at the top right corner.
772 * GDK_GRAVITY_WEST
773 * the reference point is at the middle of the left edge.
774 * GDK_GRAVITY_CENTER
775 * the reference point is at the center of the window.
776 * GDK_GRAVITY_EAST
777 * the reference point is at the middle of the right edge.
778 * GDK_GRAVITY_SOUTH_WEST
779 * the reference point is at the lower left corner.
780 * GDK_GRAVITY_SOUTH
781 * the reference point is at the middle of the lower edge.
782 * GDK_GRAVITY_SOUTH_EAST
783 * the reference point is at the lower right corner.
784 * GDK_GRAVITY_STATIC
785 * the reference point is at the top left corner of the
787 public enum GdkGravity
789 NORTH_WEST = 1,
790 NORTH,
791 NORTH_EAST,
792 WEST,
793 CENTER,
794 EAST,
795 SOUTH_WEST,
796 SOUTH,
797 SOUTH_EAST,
798 STATIC
800 alias GdkGravity Gravity;
803 * Determines a window edge or corner.
804 * GDK_WINDOW_EDGE_NORTH_WEST
805 * the top left corner.
806 * GDK_WINDOW_EDGE_NORTH
807 * the top edge.
808 * GDK_WINDOW_EDGE_NORTH_EAST
809 * the top right corner.
810 * GDK_WINDOW_EDGE_WEST
811 * the left edge.
812 * GDK_WINDOW_EDGE_EAST
813 * the right edge.
814 * GDK_WINDOW_EDGE_SOUTH_WEST
815 * the lower left corner.
816 * GDK_WINDOW_EDGE_SOUTH
817 * the lower edge.
818 * GDK_WINDOW_EDGE_SOUTH_EAST
819 * the lower right corner.
821 public enum GdkWindowEdge
823 NORTH_WEST,
824 NORTH,
825 NORTH_EAST,
826 WEST,
827 EAST,
828 SOUTH_WEST,
829 SOUTH,
830 SOUTH_EAST
832 alias GdkWindowEdge WindowEdge;
835 * These are hints for the window manager that indicate what type of function
836 * the window has. The window manager can use this when determining decoration
837 * and behaviour of the window. The hint must be set before mapping the window.
838 * See the
839 * Extended
840 * Window Manager Hints specification for more details about
841 * window types.
842 * GDK_WINDOW_TYPE_HINT_NORMAL
843 * Normal toplevel window.
844 * GDK_WINDOW_TYPE_HINT_DIALOG
845 * Dialog window.
846 * GDK_WINDOW_TYPE_HINT_MENU
847 * Window used to implement a menu.
848 * GDK_WINDOW_TYPE_HINT_TOOLBAR
849 * Window used to implement toolbars.
850 * GDK_WINDOW_TYPE_HINT_SPLASHSCREEN
851 * Window used to display a splash
853 public enum GdkWindowTypeHint
855 NORMAL,
856 DIALOG,
857 MENU, /+* Torn off menu +/
858 TOOLBAR,
859 SPLASHSCREEN,
860 UTILITY,
861 DOCK,
862 DESKTOP,
863 DROPDOWN_MENU, /+* A drop down menu (from a menubar) +/
864 POPUP_MENU, /+* A popup menu (from right-click) +/
865 TOOLTIP,
866 NOTIFICATION,
867 COMBO,
870 alias GdkWindowTypeHint WindowTypeHint;
873 * Used to indicate which fields in the GdkWindowAttr struct should be
874 * honored. For example, if you filled in the "cursor" and "x" fields of
875 * GdkWindowAttr, pass "GDK_WA_X | GDK_WA_CURSOR" to gdk_window_new(). Fields
876 * in GdkWindowAttr not covered by a bit in this enum are required; for example,
877 * the width/height, wclass, and window_type fields are required, they have no
878 * corresponding flag in GdkWindowAttributesType.
879 * GDK_WA_TITLE
880 * Honor the title field
881 * GDK_WA_X
882 * Honor the X coordinate field
883 * GDK_WA_Y
884 * Honor the Y coordinate field
885 * GDK_WA_CURSOR
886 * Honor the cursor field
887 * GDK_WA_COLORMAP
888 * Honor the colormap field
889 * GDK_WA_VISUAL
890 * Honor the visual field
891 * GDK_WA_WMCLASS
892 * Honor the wmclass_class and wmclass_name fields
893 * GDK_WA_NOREDIR
894 * Honor the override_redirect field
896 public enum GdkWindowAttributesType
898 WA_TITLE = 1 << 1,
899 WA_X = 1 << 2,
900 WA_Y = 1 << 3,
901 WA_CURSOR = 1 << 4,
902 WA_COLORMAP = 1 << 5,
903 WA_VISUAL = 1 << 6,
904 WA_WMCLASS = 1 << 7,
905 WA_NOREDIR = 1 << 8
907 alias GdkWindowAttributesType WindowAttributesType;
910 * Specifies the result of applying a GdkFilterFunc to a native event.
911 * GDK_FILTER_CONTINUE
912 * event not handled, continue processing.
913 * GDK_FILTER_TRANSLATE
914 * native event translated into a GDK event and stored
916 public enum GdkFilterReturn
918 CONTINUE, /+* Event not handled, continue processesing +/
919 TRANSLATE, /+* Native event translated into a GDK event and
920 stored inn the "event" structure that was
921 passed inn +/
922 REMOVE /+* Terminate processing, removing event +/
924 alias GdkFilterReturn FilterReturn;
927 * A set of bit-flags to indicate the state of modifier keys and mouse buttons
928 * in various event types. Typical modifier keys are Shift, Control, Meta, Super,
929 * Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
930 * Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
931 * Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped
932 * to Mod2 - Mod5, and indicates this by setting GDK_SUPER_MASK, GDK_HYPER_MASK
933 * or GDK_META_MASK in the state field of key events.
934 * GDK_SHIFT_MASK
935 * the Shift key.
936 * GDK_LOCK_MASK
937 * a Lock key (depending on the modifier mapping of the
939 public enum GdkModifierType
941 SHIFT_MASK = 1 << 0,
942 LOCK_MASK = 1 << 1,
943 CONTROL_MASK = 1 << 2,
944 MOD1_MASK = 1 << 3,
945 MOD2_MASK = 1 << 4,
946 MOD3_MASK = 1 << 5,
947 MOD4_MASK = 1 << 6,
948 MOD5_MASK = 1 << 7,
949 BUTTON1_MASK = 1 << 8,
950 BUTTON2_MASK = 1 << 9,
951 BUTTON3_MASK = 1 << 10,
952 BUTTON4_MASK = 1 << 11,
953 BUTTON5_MASK = 1 << 12,
954 /+* The next few modifiers are used by XKB, so we skip to the end.
955 * Bits 15 - 25 are currently unused. Bit 29 is used internally.
957 SUPER_MASK = 1 << 26,
958 HYPER_MASK = 1 << 27,
959 META_MASK = 1 << 28,
960 RELEASE_MASK = 1 << 30,
961 MODIFIER_MASK = 0x5c001fff
963 alias GdkModifierType ModifierType;
966 * These are hints originally defined by the Motif toolkit.
967 * The window manager can use them when determining how to decorate
968 * the window. The hint must be set before mapping the window.
969 * GDK_DECOR_ALL
970 * all decorations should be applied.
971 * GDK_DECOR_BORDER
972 * a frame should be drawn around the window.
973 * GDK_DECOR_RESIZEH
974 * the frame should have resize handles.
975 * GDK_DECOR_TITLE
976 * a titlebar should be placed above the window.
977 * GDK_DECOR_MENU
978 * a button for opening a menu should be included.
979 * GDK_DECOR_MINIMIZE
980 * a minimize button should be included.
981 * GDK_DECOR_MAXIMIZE
982 * a maximize button should be included.
984 public enum GdkWMDecoration
986 DECOR_ALL = 1 << 0,
987 DECOR_BORDER = 1 << 1,
988 DECOR_RESIZEH = 1 << 2,
989 DECOR_TITLE = 1 << 3,
990 DECOR_MENU = 1 << 4,
991 DECOR_MINIMIZE = 1 << 5,
992 DECOR_MAXIMIZE = 1 << 6
994 alias GdkWMDecoration WMDecoration;
997 * These are hints originally defined by the Motif toolkit.
998 * The window manager can use them when determining the functions
999 * to offer for the window.
1000 * The hint must be set before mapping the window.
1001 * GDK_FUNC_ALL
1002 * all functions should be offered.
1003 * GDK_FUNC_RESIZE
1004 * the window should be resizable.
1005 * GDK_FUNC_MOVE
1006 * the window should be movable.
1007 * GDK_FUNC_MINIMIZE
1008 * the window should be minimizable.
1009 * GDK_FUNC_MAXIMIZE
1010 * the window should be maximizable.
1011 * GDK_FUNC_CLOSE
1012 * the window should be closable.
1014 public enum GdkWMFunction
1016 FUNC_ALL = 1 << 0,
1017 FUNC_RESIZE = 1 << 1,
1018 FUNC_MOVE = 1 << 2,
1019 FUNC_MINIMIZE = 1 << 3,
1020 FUNC_MAXIMIZE = 1 << 4,
1021 FUNC_CLOSE = 1 << 5
1023 alias GdkWMFunction WMFunction;
1026 * Specifies the type of the event.
1027 * Do not confuse these events with the signals that GTK+ widgets emit.
1028 * Although many of these events result in corresponding signals being emitted,
1029 * the events are often transformed or filtered along the way.
1030 * GDK_NOTHING
1031 * a special code to indicate a null event.
1032 * GDK_DELETE
1033 * the window manager has requested that the toplevel window be
1034 * hidden or destroyed, usually when the user clicks on a special icon in the
1035 * title bar.
1036 * GDK_DESTROY
1037 * the window has been destroyed.
1038 * GDK_EXPOSE
1039 * all or part of the window has become visible and needs to be
1040 * redrawn.
1041 * GDK_MOTION_NOTIFY
1042 * the pointer (usually a mouse) has moved.
1043 * GDK_BUTTON_PRESS
1044 * a mouse button has been pressed.
1045 * GDK_2BUTTON_PRESS
1046 * a mouse button has been double-clicked (clicked twice
1047 * within a short period of time). Note that each click also generates a
1048 * GDK_BUTTON_PRESS event.
1049 * GDK_3BUTTON_PRESS
1050 * a mouse button has been clicked 3 times in a short period
1051 * of time. Note that each click also generates a GDK_BUTTON_PRESS event.
1052 * GDK_BUTTON_RELEASE
1053 * a mouse button has been released.
1054 * GDK_KEY_PRESS
1055 * a key has been pressed.
1056 * GDK_KEY_RELEASE
1057 * a key has been released.
1058 * GDK_ENTER_NOTIFY
1059 * the pointer has entered the window.
1060 * GDK_LEAVE_NOTIFY
1061 * the pointer has left the window.
1062 * GDK_FOCUS_CHANGE
1063 * the keyboard focus has entered or left the window.
1064 * GDK_CONFIGURE
1065 * the size, position or stacking order of the window has changed.
1066 * Note that GTK+ discards these events for GDK_WINDOW_CHILD windows.
1067 * GDK_MAP
1068 * the window has been mapped.
1069 * GDK_UNMAP
1070 * the window has been unmapped.
1071 * GDK_PROPERTY_NOTIFY
1072 * a property on the window has been changed or deleted.
1073 * GDK_SELECTION_CLEAR
1074 * the application has lost ownership of a selection.
1075 * GDK_SELECTION_REQUEST
1076 * another application has requested a selection.
1077 * GDK_SELECTION_NOTIFY
1078 * a selection has been received.
1079 * GDK_PROXIMITY_IN
1080 * an input device has moved into contact with a sensing
1081 * surface (e.g. a touchscreen or graphics tablet).
1082 * GDK_PROXIMITY_OUT
1083 * an input device has moved out of contact with a sensing
1084 * surface.
1085 * GDK_DRAG_ENTER
1086 * the mouse has entered the window while a drag is in progress.
1087 * GDK_DRAG_LEAVE
1088 * the mouse has left the window while a drag is in progress.
1089 * GDK_DRAG_MOTION
1090 * the mouse has moved in the window while a drag is in
1091 * progress.
1092 * GDK_DRAG_STATUS
1093 * the status of the drag operation initiated by the window
1094 * has changed.
1095 * GDK_DROP_START
1096 * a drop operation onto the window has started.
1097 * GDK_DROP_FINISHED
1098 * the drop operation initiated by the window has completed.
1099 * GDK_CLIENT_EVENT
1100 * a message has been received from another application.
1101 * GDK_VISIBILITY_NOTIFY
1102 * the window visibility status has changed.
1103 * GDK_NO_EXPOSE
1104 * indicates that the source region was completely available
1105 * when parts of a drawable were copied. This is not very useful.
1106 * GDK_SCROLL
1107 * the scroll wheel was turned
1108 * GDK_WINDOW_STATE
1109 * the state of a window has changed. See GdkWindowState
1110 * for the possible window states
1111 * GDK_SETTING
1112 * a setting has been modified.
1113 * GDK_OWNER_CHANGE
1114 * the owner of a selection has changed. This event type
1116 public enum GdkEventType
1118 NOTHING = -1,
1119 DELETE = 0,
1120 DESTROY = 1,
1121 EXPOSE = 2,
1122 MOTION_NOTIFY = 3,
1123 BUTTON_PRESS = 4,
1124 DOUBLE_BUTTON_PRESS = 5,
1125 TRIPPLE_BUTTON_PRESS = 6,
1126 BUTTON_RELEASE = 7,
1127 KEY_PRESS = 8,
1128 KEY_RELEASE = 9,
1129 ENTER_NOTIFY = 10,
1130 LEAVE_NOTIFY = 11,
1131 FOCUS_CHANGE = 12,
1132 CONFIGURE = 13,
1133 MAP = 14,
1134 UNMAP = 15,
1135 PROPERTY_NOTIFY = 16,
1136 SELECTION_CLEAR = 17,
1137 SELECTION_REQUEST = 18,
1138 SELECTION_NOTIFY = 19,
1139 PROXIMITY_IN = 20,
1140 PROXIMITY_OUT = 21,
1141 DRAG_ENTER = 22,
1142 DRAG_LEAVE = 23,
1143 DRAG_MOTION = 24,
1144 DRAG_STATUS = 25,
1145 DROP_START = 26,
1146 DROP_FINISHED = 27,
1147 CLIENT_EVENT = 28,
1148 VISIBILITY_NOTIFY = 29,
1149 NO_EXPOSE = 30,
1150 SCROLL = 31,
1151 WINDOW_STATE = 32,
1152 SETTING = 33,
1153 OWNER_CHANGE = 34,
1154 GRAB_BROKEN = 35
1156 alias GdkEventType EventType;
1159 * A set of bit-flags to indicate which events a window is to receive.
1160 * Most of these masks map onto one or more of the GdkEventType event types
1161 * above.
1162 * GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
1163 * number of GDK_MOTION_NOTIFY events received. Normally a GDK_MOTION_NOTIFY
1164 * event is received each time the mouse moves. However, if the application
1165 * spends a lot of time processing the event (updating the display, for example),
1166 * it can easily lag behind the position of the mouse. When using the
1167 * GDK_POINTER_MOTION_HINT_MASK the server will only send a single
1168 * GDK_MOTION_NOTIFY event (which is marked as a hint) until the application
1169 * asks for more, by calling gdk_window_get_pointer().
1170 * GDK_EXPOSURE_MASK
1171 * receive expose events
1172 * GDK_POINTER_MOTION_MASK
1173 * receive all pointer motion events
1174 * GDK_POINTER_MOTION_HINT_MASK
1175 * see the explanation above
1176 * GDK_BUTTON_MOTION_MASK
1177 * receive pointer motion events while any button is pressed
1178 * GDK_BUTTON1_MOTION_MASK
1179 * receive pointer motion events while 1 button is pressed
1180 * GDK_BUTTON2_MOTION_MASK
1181 * receive pointer motion events while 2 button is pressed
1182 * GDK_BUTTON3_MOTION_MASK
1183 * receive pointer motion events while 3 button is pressed
1184 * GDK_BUTTON_PRESS_MASK
1185 * receive button press events
1186 * GDK_BUTTON_RELEASE_MASK
1187 * receive button release events
1188 * GDK_KEY_PRESS_MASK
1189 * receive key press events
1190 * GDK_KEY_RELEASE_MASK
1191 * receive key release events
1192 * GDK_ENTER_NOTIFY_MASK
1193 * receive window enter events
1194 * GDK_LEAVE_NOTIFY_MASK
1195 * receive window leave events
1196 * GDK_FOCUS_CHANGE_MASK
1197 * receive focus change events
1198 * GDK_STRUCTURE_MASK
1199 * receive events about window configuration change
1200 * GDK_PROPERTY_CHANGE_MASK
1201 * receive property change events
1202 * GDK_VISIBILITY_NOTIFY_MASK
1203 * receive visibility change events
1204 * GDK_PROXIMITY_IN_MASK
1205 * receive proximity in events
1206 * GDK_PROXIMITY_OUT_MASK
1207 * receive proximity out events
1208 * GDK_SUBSTRUCTURE_MASK
1209 * receive events about window configuration changes of
1211 public enum GdkEventMask
1213 EXPOSURE_MASK = 1 << 1,
1214 POINTER_MOTION_MASK = 1 << 2,
1215 POINTER_MOTION_HINT_MASK = 1 << 3,
1216 BUTTON_MOTION_MASK = 1 << 4,
1217 BUTTON1_MOTION_MASK = 1 << 5,
1218 BUTTON2_MOTION_MASK = 1 << 6,
1219 BUTTON3_MOTION_MASK = 1 << 7,
1220 BUTTON_PRESS_MASK = 1 << 8,
1221 BUTTON_RELEASE_MASK = 1 << 9,
1222 KEY_PRESS_MASK = 1 << 10,
1223 KEY_RELEASE_MASK = 1 << 11,
1224 ENTER_NOTIFY_MASK = 1 << 12,
1225 LEAVE_NOTIFY_MASK = 1 << 13,
1226 FOCUS_CHANGE_MASK = 1 << 14,
1227 STRUCTURE_MASK = 1 << 15,
1228 PROPERTY_CHANGE_MASK = 1 << 16,
1229 VISIBILITY_NOTIFY_MASK = 1 << 17,
1230 PROXIMITY_IN_MASK = 1 << 18,
1231 PROXIMITY_OUT_MASK = 1 << 19,
1232 SUBSTRUCTURE_MASK = 1 << 20,
1233 SCROLL_MASK = 1 << 21,
1234 ALL_EVENTS_MASK = 0x3FFFFE
1236 alias GdkEventMask EventMask;
1239 * Specifies the direction for GdkEventScroll.
1240 * GDK_SCROLL_UP
1241 * the window is scrolled up.
1242 * GDK_SCROLL_DOWN
1243 * the window is scrolled down.
1244 * GDK_SCROLL_LEFT
1245 * the window is scrolled to the left.
1246 * GDK_SCROLL_RIGHT
1247 * the window is scrolled to the right.
1249 public enum GdkScrollDirection
1252 DOWN,
1253 LEFT,
1254 RIGHT
1256 alias GdkScrollDirection ScrollDirection;
1259 * Specifies the visiblity status of a window for a GdkEventVisibility.
1260 * GDK_VISIBILITY_UNOBSCURED
1261 * the window is completely visible.
1262 * GDK_VISIBILITY_PARTIAL
1263 * the window is partially visible.
1264 * GDK_VISIBILITY_FULLY_OBSCURED
1265 * the window is not visible at all.
1267 public enum GdkVisibilityState
1269 UNOBSCURED,
1270 PARTIAL,
1271 FULLY_OBSCURED
1273 alias GdkVisibilityState VisibilityState;
1276 * Specifies the crossing mode for GdkEventCrossing.
1277 * GDK_CROSSING_NORMAL
1278 * crossing because of pointer motion.
1279 * GDK_CROSSING_GRAB
1280 * crossing because a grab is activated.
1281 * GDK_CROSSING_UNGRAB
1282 * crossing because a grab is deactivated.
1284 public enum GdkCrossingMode
1286 NORMAL,
1287 GRAB,
1288 UNGRAB
1290 alias GdkCrossingMode CrossingMode;
1293 * Specifies the kind of crossing for GdkEventCrossing.
1294 * See the X11 protocol specification of LeaveNotify for
1295 * full details of crossing event generation.
1296 * GDK_NOTIFY_ANCESTOR
1297 * the window is entered from an ancestor or
1299 public enum GdkNotifyType
1301 ANCESTOR = 0,
1302 VIRTUAL = 1,
1303 INFERIOR = 2,
1304 NONLINEAR = 3,
1305 NONLINEAR_VIRTUAL = 4,
1306 UNKNOWN = 5
1308 alias GdkNotifyType NotifyType;
1311 * Specifies the type of a property change for a GdkEventProperty.
1312 * GDK_PROPERTY_NEW_VALUE
1313 * the property value was changed.
1314 * GDK_PROPERTY_DELETE
1315 * the property was deleted.
1317 public enum GdkPropertyState
1319 NEW_VALUE,
1320 DELETE
1322 alias GdkPropertyState PropertyState;
1325 * Specifies the state of a toplevel window.
1326 * GDK_WINDOW_STATE_WITHDRAWN
1327 * the window is not shown.
1328 * GDK_WINDOW_STATE_ICONIFIED
1329 * the window is minimized.
1330 * GDK_WINDOW_STATE_MAXIMIZED
1331 * the window is maximized.
1332 * GDK_WINDOW_STATE_STICKY
1333 * the window is sticky.
1334 * GDK_WINDOW_STATE_FULLSCREEN
1335 * the window is maximized without decorations.
1336 * GDK_WINDOW_STATE_ABOVE
1337 * the window is kept above other windows.
1338 * GDK_WINDOW_STATE_BELOW
1339 * the window is kept below other windows.
1341 public enum GdkWindowState
1343 WITHDRAWN = 1 << 0,
1344 ICONIFIED = 1 << 1,
1345 MAXIMIZED = 1 << 2,
1346 STICKY = 1 << 3,
1347 FULLSCREEN = 1 << 4,
1348 ABOVE = 1 << 5,
1349 BELOW = 1 << 6
1351 alias GdkWindowState WindowState;
1354 * Specifies the kind of modification applied to a setting in a GdkEventSetting.
1355 * GDK_SETTING_ACTION_NEW
1356 * a setting was added.
1357 * GDK_SETTING_ACTION_CHANGED
1358 * a setting was changed.
1359 * GDK_SETTING_ACTION_DELETED
1360 * a setting was deleted.
1362 public enum GdkSettingAction
1364 NEW,
1365 CHANGED,
1366 DELETED
1368 alias GdkSettingAction SettingAction;
1371 * Specifies why a selection ownership was changed.
1372 * GDK_OWNER_CHANGE_NEW_OWNER
1373 * some other app claimed the ownership
1374 * GDK_OWNER_CHANGE_DESTROY
1375 * the window was destroyed
1376 * GDK_OWNER_CHANGE_CLOSE
1377 * the client was closed
1379 public enum GdkOwnerChange
1381 NEW_OWNER,
1382 DESTROY,
1383 CLOSE
1385 alias GdkOwnerChange OwnerChange;
1388 * Used in GdkDragContext to indicate the protocol according to
1389 * which DND is done.
1390 * GDK_DRAG_PROTO_MOTIF
1391 * The Motif DND protocol.
1392 * GDK_DRAG_PROTO_XDND
1393 * The Xdnd protocol.
1394 * GDK_DRAG_PROTO_ROOTWIN
1395 * An extension to the Xdnd protocol for
1397 public enum GdkDragProtocol
1399 MOTIF,
1400 XDND,
1401 ROOTWIN, /+* A root window with nobody claiming
1402 * drags +/
1403 NONE, /+* Not a valid drag window +/
1404 WIN32_DROPFILES, /+* The simple WM_DROPFILES dnd +/
1405 OLE2, /+* The complex OLE2 dnd (not implemented) +/
1406 LOCAL /+* Intra-app +/
1408 alias GdkDragProtocol DragProtocol;
1411 * Used in GdkDragContext to indicate what the destination
1412 * should do with the dropped data.
1413 * GDK_ACTION_DEFAULT
1414 * Means nothing, and should not be used.
1415 * GDK_ACTION_COPY
1416 * Copy the data.
1417 * GDK_ACTION_MOVE
1418 * Move the data, i.e. first copy it, then delete
1420 public enum GdkDragAction
1422 ACTION_DEFAULT = 1 << 0,
1423 ACTION_COPY = 1 << 1,
1424 ACTION_MOVE = 1 << 2,
1425 ACTION_LINK = 1 << 3,
1426 ACTION_PRIVATE = 1 << 4,
1427 ACTION_ASK = 1 << 5
1429 alias GdkDragAction DragAction;
1432 * A set of bit flags used to specify conditions for which
1433 * an input callback will be triggered. The three members
1434 * of this enumeration correspond to the readfds,
1435 * writefds, and exceptfds arguments to the
1436 * select system call.
1437 * GDK_INPUT_READ
1438 * the file descriptor has become available for reading.
1439 * (Or, as is standard in Unix, a socket or pipe was closed
1440 * at the other end; this is the case if a subsequent read
1441 * on the file descriptor returns a count of zero.)
1442 * GDK_INPUT_WRITE
1443 * the file descriptor has become available for writing.
1444 * GDK_INPUT_EXCEPTION
1445 * an exception was raised on the file descriptor.
1447 public enum GdkInputCondition
1449 READ = 1 << 0,
1450 WRITE = 1 << 1,
1451 EXCEPTION = 1 << 2
1453 alias GdkInputCondition InputCondition;
1456 * An enumeration describing the type of an input device
1457 * in general terms.
1458 * GDK_SOURCE_MOUSE
1459 * the device is a mouse. (This will be reported for the core
1461 public enum GdkInputSource
1463 SOURCE_MOUSE,
1464 SOURCE_PEN,
1465 SOURCE_ERASER,
1466 SOURCE_CURSOR
1468 alias GdkInputSource InputSource;
1471 * An enumeration that describes the mode of an input device.
1472 * GDK_MODE_DISABLED
1473 * the device is disabled and will not report any events.
1474 * GDK_MODE_SCREEN
1475 * the device is enabled. The device's coordinate space
1477 public enum GdkInputMode
1479 MODE_DISABLED,
1480 MODE_SCREEN,
1481 MODE_WINDOW
1483 alias GdkInputMode InputMode;
1486 * An enumeration describing the way in which a device
1487 * axis (valuator) maps onto the predefined valuator
1488 * types that GTK+ understands.
1489 * GDK_AXIS_IGNORE
1490 * the axis is ignored.
1491 * GDK_AXIS_X
1492 * the axis is used as the x axis.
1493 * GDK_AXIS_Y
1494 * the axis is used as the y axis.
1495 * GDK_AXIS_PRESSURE
1496 * the axis is used for pressure information.
1497 * GDK_AXIS_XTILT
1498 * the axis is used for x tilt information.
1499 * GDK_AXIS_YTILT
1500 * the axis is used for x tilt information.
1501 * GDK_AXIS_WHEEL
1502 * the axis is used for wheel information.
1503 * GDK_AXIS_LAST
1504 * a constant equal to the numerically highest axis value.
1506 public enum GdkAxisUse
1508 IGNORE,
1511 PRESSURE,
1512 XTILT,
1513 YTILT,
1514 WHEEL,
1515 LAST
1517 alias GdkAxisUse AxisUse;
1520 * An enumeration used to specify which extension events
1521 * are desired for a particular widget.
1522 * GDK_EXTENSION_EVENTS_NONE
1523 * no extension events are desired.
1524 * GDK_EXTENSION_EVENTS_ALL
1525 * all extension events are desired.
1526 * GDK_EXTENSION_EVENTS_CURSOR
1527 * extension events are desired only if a cursor
1529 public enum GdkExtensionMode
1531 EVENTS_NONE,
1532 EVENTS_ALL,
1533 EVENTS_CURSOR
1535 alias GdkExtensionMode ExtensionMode;
1539 * Main Gtk struct.
1540 * The GdkDisplay struct is the GDK representation
1541 * of an X display. All its fields are private and should not be accessed directly.
1542 * Since 2.2
1544 public struct GdkDisplay{}
1548 * A table of pointers to functions for getting quantities related to
1549 * the current pointer position. Each GdkDisplay has a table of this type,
1550 * which can be set using gdk_display_set_pointer_hooks().
1551 * This is only useful for such low-level tools as an event recorder.
1552 * Applications should never have any reason to use this facility
1553 * get_pointer()
1554 * Obtains the current pointer position and modifier state.
1556 public struct GdkDisplayPointerHooks{}
1557 // void (*getPointer) (GdkDisplay *display,
1558 // GdkDisplay.html
1559 // GdkScreen **screen,
1560 // GdkDisplay.html
1561 // int *x,
1562 // GdkDisplay.html
1563 // int *y,
1564 // GdkDisplay.html
1565 // GdkModifierType *mask);
1566 // GdkDisplay.html
1567 // GdkWindow* (*windowGetPointer) (GdkDisplay *display,
1568 // GdkDisplay.html
1569 // GdkWindow *window,
1570 // GdkDisplay.html
1571 // int *x,
1572 // GdkDisplay.html
1573 // int *y,
1574 // GdkDisplay.html
1575 // GdkModifierType *mask);
1576 // GdkDisplay.html
1577 // GdkWindow* (*windowAtPointer) (GdkDisplay *display,
1578 // GdkDisplay.html
1579 // int *winX,
1580 // GdkDisplay.html
1581 // int *winY);
1582 // GdkDisplay.html
1586 * Main Gtk struct.
1587 * The GdkDisplayManager struct has no interesting
1588 * fields.
1589 * Since 2.2
1591 public struct GdkDisplayManager{}
1595 * Main Gtk struct.
1596 * This is a currently just a placeholder typedef for the first argument of
1597 * the window_at_pointer function in GdkPointerHooks. It will be used
1598 * when GDK gets multihead support.
1599 * Since 2.2
1601 public struct GdkScreen{}
1605 * Defines the x and y coordinates of a point.
1606 * gintx;
1607 * the x coordinate of the point.
1608 * ginty;
1609 * the y coordinate of the point.
1611 public struct GdkPoint
1613 int x;
1614 int y;
1619 * Main Gtk struct.
1620 * Defines the position and size of a rectangle.
1621 * gintx;
1622 * the x coordinate of the left edge of the rectangle.
1623 * ginty;
1624 * the y coordinate of the top of the rectangle.
1625 * gintwidth;
1626 * the width of the rectangle.
1627 * gintheight;
1628 * the height of the rectangle.
1630 public struct GdkRectangle
1632 int x;
1633 int y;
1634 int width;
1635 int height;
1640 * A GdkRegion represents a set of pixels on the screen.
1642 public struct GdkRegion{}
1646 * A GdkSpan represents a horizontal line of pixels starting
1647 * at the pixel with coordinates x, y and ending before x + width, y.
1648 * gintx;
1649 * x coordinate of the first pixel.
1650 * ginty;
1651 * y coordinate of the first pixel.
1652 * gintwidth;
1653 * number of pixels in the span.
1655 public struct GdkSpan
1657 int x;
1658 int y;
1659 int width;
1664 * Main Gtk struct.
1665 * The GdkGC structure represents a graphics context.
1666 * It is an opaque structure with no user-visible
1667 * elements.
1669 public struct GdkGC{}
1673 * The GdkGCValues structure holds a set of values used
1674 * to create or modify a graphics context.
1675 * GdkColorforeground;
1676 * the foreground color. Note that gdk_gc_get_values()
1678 public struct GdkGCValues{}
1679 // GdkColor foreground;
1680 // gdk-Graphics-Contexts.html
1681 // GdkColor background;
1682 // gdk-Graphics-Contexts.html
1683 // GdkFont *font;
1684 // gdk-Graphics-Contexts.html
1685 // GdkFunction funct;
1686 // gdk-Graphics-Contexts.html
1687 // GdkFill fill;
1688 // gdk-Graphics-Contexts.html
1689 // GdkPixmap *tile;
1690 // gdk-Graphics-Contexts.html
1691 // GdkPixmap *stipple;
1692 // gdk-Graphics-Contexts.html
1693 // GdkPixmap *clipMask;
1694 // gdk-Graphics-Contexts.html
1695 // GdkSubwindowMode subwindowMode;
1696 // gdk-Graphics-Contexts.html
1697 // int tsXOrigin;
1698 // gdk-Graphics-Contexts.html
1699 // int tsYOrigin;
1700 // gdk-Graphics-Contexts.html
1701 // int clipXOrigin;
1702 // gdk-Graphics-Contexts.html
1703 // int clipYOrigin;
1704 // gdk-Graphics-Contexts.html
1705 // int graphicsExposures;
1706 // gdk-Graphics-Contexts.html
1707 // int lineWidth;
1708 // gdk-Graphics-Contexts.html
1709 // GdkLineStyle lineStyle;
1710 // gdk-Graphics-Contexts.html
1711 // GdkCapStyle capStyle;
1712 // gdk-Graphics-Contexts.html
1713 // GdkJoinStyle joinStyle;
1714 // gdk-Graphics-Contexts.html
1718 * Main Gtk struct.
1719 * An opaque structure representing an object that can be
1720 * drawn onto. This can be a GdkPixmap, a GdkBitmap,
1721 * or a GdkWindow.
1723 public struct GdkDrawable{}
1727 * Specifies the start and end point of a line for use by the gdk_draw_segments()
1728 * function.
1729 * gintx1;
1730 * the x coordinate of the start point.
1731 * ginty1;
1732 * the y coordinate of the start point.
1733 * gintx2;
1734 * the x coordinate of the end point.
1735 * ginty2;
1736 * the y coordinate of the end point.
1738 public struct GdkSegment
1740 int x1;
1741 int y1;
1742 int x2;
1743 int y2;
1748 * Specifies a trapezpoid for use by the gdk_draw_trapezoids().
1749 * The trapezoids used here have parallel, horizontal top and
1750 * bottom edges.
1751 * doubley1;
1752 * the y coordinate of the start point.
1753 * doublex11;
1754 * the x coordinate of the top left corner
1755 * doublex21;
1756 * the x coordinate of the top right corner
1757 * doubley2;
1758 * the y coordinate of the end point.
1759 * doublex12;
1760 * the x coordinate of the bottom left corner
1761 * doublex22;
1762 * the x coordinate of the bottom right corner
1764 public struct GdkTrapezoid{}
1765 // double y1, x11, x21, y2, x12, x22;
1766 // gdk-Drawing-Primitives.html
1770 * Main Gtk struct.
1771 * An opaque structure representing an offscreen drawable.
1772 * Pointers to structures of type GdkPixmap, GdkBitmap,
1773 * and GdkWindow, can often be used interchangeably.
1774 * The type GdkDrawable refers generically to any of
1775 * these types.
1777 public struct GdkPixmap{}
1781 * An opaque structure representing an offscreen drawable of depth
1782 * 1. Pointers to structures of type GdkPixmap, GdkBitmap, and
1783 * GdkWindow, can often be used interchangeably. The type GdkDrawable
1784 * refers generically to any of these types.
1786 public struct GdkBitmap
1788 void* userData;
1793 * A private data structure which maps color indices to actual RGB
1794 * colors. This is used only for gdk_draw_indexed_image().
1796 public struct GdkRgbCmap{}
1797 // uint colors[256];
1798 // gdk-GdkRGB.html
1799 // int nColors;
1800 // gdk-GdkRGB.html
1804 * Main Gtk struct.
1805 * The GdkImage struct contains information on the image and the pixel data.
1806 * GObjectparent_instance;
1807 * the parent instance
1808 * GdkImageTypetype;
1809 * the type of the image.
1810 * GdkVisual*visual;
1811 * the visual.
1812 * GdkByteOrderbyte_order;
1813 * the byte order.
1814 * gintwidth;
1815 * the width of the image in pixels.
1816 * gintheight;
1817 * the height of the image in pixels.
1818 * guint16depth;
1819 * the depth of the image, i.e. the number of bits per pixel.
1820 * guint16bpp;
1821 * the number of bytes per pixel.
1822 * guint16bpl;
1823 * the number of bytes per line of the image.
1824 * guint16bits_per_pixel;
1825 * the number of bits per pixel.
1826 * gpointermem;
1827 * the pixel data.
1828 * GdkColormap*colormap;
1829 * the GdkColormap associated with the image
1831 public struct GdkImage{}
1832 // GObject parentInstance;
1833 // gdk-Images.html
1834 // GdkImageType type; /+* read only. +/
1835 // gdk-Images.html
1836 // GdkVisual *visual; /+* read only. visual used to create the image +/
1837 // gdk-Images.html
1838 // GdkByteOrder byteOrder; /+* read only. +/
1839 // gdk-Images.html
1840 // int width; /+* read only. +/
1841 // gdk-Images.html
1842 // int height; /+* read only. +/
1843 // gdk-Images.html
1844 // ushort depth; /+* read only. +/
1845 // gdk-Images.html
1846 // ushort bpp; /+* read only. bytes per pixel +/
1847 // gdk-Images.html
1848 // ushort bpl; /+* read only. bytes per line +/
1849 // gdk-Images.html
1850 // ushort bitsPerPixel; /+* read only. bits per pixel +/
1851 // gdk-Images.html
1852 // void* mem;
1853 // gdk-Images.html
1854 // GdkColormap *colormap; /+* read only. +/
1855 // gdk-Images.html
1859 * Main Gtk struct.
1861 public struct GdkPixbuf{}
1865 * The GdkColor structure is used to describe an
1866 * allocated or unallocated color.
1867 * guint32pixel;
1868 * For allocated colors, the value used to
1870 public struct GdkColor
1872 uint pixel;
1873 ushort red;
1874 ushort green;
1875 ushort blue;
1880 * Main Gtk struct.
1881 * The colormap structure contains the following public fields.
1882 * gintsize;
1883 * For pseudo-color colormaps, the number of colors
1885 public struct GdkColormap{}
1886 // int size;
1887 // gdk-Colormaps-and-Colors.html
1888 // GdkColor *colors;
1889 // gdk-Colormaps-and-Colors.html
1893 * Main Gtk struct.
1894 * The GdkVisual structure contains information about
1895 * a particular visual.
1896 * Example5.Constructing a pixel value from components
1897 * guint
1898 * pixel_from_rgb (GdkVisual *visual,
1900 public struct GdkVisual{}
1901 // GObject parentInstance;
1902 // gdk-Visuals.html
1903 // GdkVisualType type;
1904 // gdk-Visuals.html
1905 // int depth;
1906 // gdk-Visuals.html
1907 // GdkByteOrder byteOrder;
1908 // gdk-Visuals.html
1909 // int colormapSize;
1910 // gdk-Visuals.html
1911 // int bitsPerRgb;
1912 // gdk-Visuals.html
1913 // uint redMask;
1914 // gdk-Visuals.html
1915 // int redShift;
1916 // gdk-Visuals.html
1917 // int redPrec;
1918 // gdk-Visuals.html
1919 // uint greenMask;
1920 // gdk-Visuals.html
1921 // int greenShift;
1922 // gdk-Visuals.html
1923 // int greenPrec;
1924 // gdk-Visuals.html
1925 // uint blueMask;
1926 // gdk-Visuals.html
1927 // int blueShift;
1928 // gdk-Visuals.html
1929 // int bluePrec;
1930 // gdk-Visuals.html
1934 * Main Gtk struct.
1935 * Warning
1936 * GdkFont is deprecated and should not be used in newly-written code.
1937 * The GdkFont structure represents a font or fontset. It
1938 * contains the following public fields. A new GdkFont
1939 * structure is returned by gdk_font_load() or gdk_fontset_load(),
1940 * and is reference counted with gdk_font_ref() and gdk_font_unref()
1941 * GdkFontTypetype;
1942 * a value of type GdkFontType which indicates
1944 public struct GdkFont{}
1945 // GdkFontType type;
1946 // gdk-Fonts.html
1947 // int ascent;
1948 // gdk-Fonts.html
1949 // int descent;
1950 // gdk-Fonts.html
1954 * Main Gtk struct.
1955 * A GdkCursor structure represents a cursor.
1956 * GdkCursorTypetype;
1957 * the GdkCursorType of the cursor
1959 public struct GdkCursor{}
1960 // GdkCursorType type;
1961 // gdk-Cursors.html
1965 * Main Gtk struct.
1966 * An opaque structure representing an onscreen drawable.
1967 * Pointers to structures of type GdkPixmap, GdkBitmap,
1968 * and GdkWindow, can often be used interchangeably.
1969 * The type GdkDrawable refers generically to any of
1970 * these types.
1972 public struct GdkWindow{}
1976 * The GdkGeometry struct gives the window manager information about
1977 * a window's geometry constraints. Normally you would set these on
1978 * the GTK+ level using gtk_window_set_geometry_hints(). GtkWindow
1979 * then sets the hints on the GdkWindow it creates.
1980 * gdk_window_set_geometry_hints() expects the hints to be fully valid already and
1981 * simply passes them to the window manager; in contrast,
1982 * gtk_window_set_geometry_hints() performs some interpretation. For example,
1983 * GtkWindow will apply the hints to the geometry widget instead of the toplevel
1984 * window, if you set a geometry widget. Also, the
1985 * min_width/min_height/max_width/max_height fields may be set to -1, and
1986 * GtkWindow will substitute the size request of the window or geometry widget. If
1987 * the minimum size hint is not provided, GtkWindow will use its requisition as
1988 * the minimum size. If the minimum size is provided and a geometry widget is set,
1989 * GtkWindow will take the minimum size as the minimum size of the geometry widget
1990 * rather than the entire window. The base size is treated similarly.
1991 * The canonical use-case for gtk_window_set_geometry_hints() is to get a terminal
1992 * widget to resize properly. Here, the terminal text area should be the geometry
1993 * widget; GtkWindow will then automatically set the base size to the size of
1994 * other widgets in the terminal window, such as the menubar and scrollbar. Then,
1995 * the width_inc and height_inc fields should be set to the size of one character
1996 * in the terminal. Finally, the base size should be set to the size of one
1997 * character. The net effect is that the minimum size of the terminal
1998 * will have a 1x1 character terminal area, and only terminal sizes on
1999 * the "character grid" will be allowed.
2000 * Here's an example of how the terminal example would be implemented, assuming
2001 * a terminal area widget called "terminal" and a toplevel window "toplevel":
2003 public struct GdkGeometry{}
2004 // int minWidth;
2005 // gdk-Windows.html
2006 // int minHeight;
2007 // gdk-Windows.html
2008 // int maxWidth;
2009 // gdk-Windows.html
2010 // int maxHeight;
2011 // gdk-Windows.html
2012 // int baseWidth;
2013 // gdk-Windows.html
2014 // int baseHeight;
2015 // gdk-Windows.html
2016 // int widthInc;
2017 // gdk-Windows.html
2018 // int heightInc;
2019 // gdk-Windows.html
2020 // double minAspect;
2021 // gdk-Windows.html
2022 // double maxAspect;
2023 // gdk-Windows.html
2024 // GdkGravity winGravity;
2025 // gdk-Windows.html
2029 * Attributes to use for a newly-created window.
2030 * gchar*title;
2031 * title of the window (for toplevel windows)
2032 * gintevent_mask;
2033 * event mask (see gdk_window_set_events())
2034 * gintx;
2035 * X coordinate relative to parent window (see gdk_window_move())
2036 * ginty;
2037 * Y coordinate relative to parent window (see gdk_window_move())
2038 * gintwidth;
2039 * width of window
2040 * gintheight;
2041 * height of window
2042 * GdkWindowClasswclass;
2043 * GDK_INPUT_OUTPUT (normal window) or GDK_INPUT_ONLY (invisible window that receives events)
2044 * GdkVisual*visual;
2045 * GdkVisual for window
2046 * GdkColormap*colormap;
2047 * GdkColormap for window
2048 * GdkWindowTypewindow_type;
2049 * type of window
2050 * GdkCursor*cursor;
2051 * cursor for the window (see gdk_window_set_cursor())
2052 * gchar*wmclass_name;
2053 * don't use (see gtk_window_set_wmclass())
2054 * gchar*wmclass_class;
2055 * don't use (see gtk_window_set_wmclass())
2056 * gbooleanoverride_redirect;
2057 * TRUE to bypass the window manager
2059 public struct GdkWindowAttr{}
2060 // char *title;
2061 // gdk-Windows.html
2062 // int eventMask;
2063 // gdk-Windows.html
2064 // int x, y;
2065 // gdk-Windows.html
2066 // int width;
2067 // gdk-Windows.html
2068 // int height;
2069 // gdk-Windows.html
2070 // GdkWindowClass wclass;
2071 // gdk-Windows.html
2072 // GdkVisual *visual;
2073 // gdk-Windows.html
2074 // GdkColormap *colormap;
2075 // gdk-Windows.html
2076 // GdkWindowType windowType;
2077 // gdk-Windows.html
2078 // GdkCursor *cursor;
2079 // gdk-Windows.html
2080 // char *wmclassName;
2081 // gdk-Windows.html
2082 // char *wmclassClass;
2083 // gdk-Windows.html
2084 // int overrideRedirect;
2085 // gdk-Windows.html
2089 * A table of pointers to functions for getting quantities related to
2090 * the current pointer position. GDK has one global table of this type,
2091 * which can be set using gdk_set_pointer_hooks().
2092 * This is only useful for such low-level tools as an event recorder.
2093 * Applications should never have any reason to use this facility
2094 * get_pointer()
2095 * Obtains the current pointer position and modifier state.
2097 public struct GdkPointerHooks{}
2098 // GdkWindow* (*getPointer) (GdkWindow *window,
2099 // gdk-Windows.html
2100 // int *x,
2101 // gdk-Windows.html
2102 // int *y,
2103 // gdk-Windows.html
2104 // GdkModifierType *mask);
2105 // gdk-Windows.html
2106 // GdkWindow* (*windowAtPointer) (GdkScreen *screen, /+* unused +/
2107 // gdk-Windows.html
2108 // int *winX,
2109 // gdk-Windows.html
2110 // int *winY);
2111 // gdk-Windows.html
2115 * Contains the fields which are common to all event structs.
2116 * Any event pointer can safely be cast to a pointer to a GdkEventAny to access
2117 * these fields.
2118 * GdkEventTypetype;
2119 * the type of the event.
2120 * GdkWindow*window;
2121 * the window which received the event.
2122 * gint8send_event;
2123 * TRUE if the event was sent explicitly (e.g. using
2124 * XSendEvent).
2126 public struct GdkEventAny
2128 GdkEventType type;
2129 GdkWindow *window;
2130 byte sendEvent;
2135 * Describes a key press or key release event.
2136 * GdkEventTypetype;
2137 * the type of the event (GDK_KEY_PRESS or GDK_KEY_RELEASE).
2138 * GdkWindow*window;
2139 * the window which received the event.
2140 * gint8send_event;
2141 * TRUE if the event was sent explicitly (e.g. using
2142 * XSendEvent).
2143 * guint32time;
2144 * the time of the event in milliseconds.
2145 * guintstate;
2146 * a bit-mask representing the state of the modifier keys (e.g. Control,
2147 * Shift and Alt) and the pointer buttons. See GdkModifierType.
2148 * guintkeyval;
2149 * the key that was pressed or released. See the
2150 * <gdk/gdkkeysyms.h>
2151 * header file for a complete list of GDK key codes.
2152 * gintlength;
2153 * the length of string.
2154 * gchar*string;
2155 * a string containing the an approximation of the text that
2156 * would result from this keypress. The only correct way to handle text
2157 * input of text is using input methods (see GtkIMContext), so this
2158 * field is deprecated and should never be used.
2159 * (gdk_unicode_to_keyval() provides a non-deprecated way of getting
2160 * an approximate translation for a key.) The string is encoded in the encoding
2161 * of the current locale (Note: this for backwards compatibility:
2162 * strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
2163 * In some cases, the translation of the key code will be a single
2164 * NUL byte, in which case looking at length is necessary to distinguish
2165 * it from the an empty translation.
2166 * guint16hardware_keycode;
2167 * the raw code of the key that was pressed or released.
2168 * guint8group;
2169 * the keyboard group.
2170 * guintis_modifier:1;
2171 * a flag that indicates if hardware_keycode is mapped to a
2173 public struct GdkEventKey
2175 GdkEventType type;
2176 GdkWindow *window;
2177 byte sendEvent;
2178 uint time;
2179 uint state;
2180 uint keyval;
2181 int length;
2182 char *string;
2183 ushort hardwareKeycode;
2184 byte group;
2185 uint bitfield;
2186 //uint isModifier : 1;
2191 * Used for button press and button release events. The
2192 * type field will be one of GDK_BUTTON_PRESS,
2193 * GDK_2BUTTON_PRESS, GDK_3BUTTON_PRESS, and GDK_BUTTON_RELEASE.
2194 * Double and triple-clicks result in a sequence of events being received.
2195 * For double-clicks the order of events will be:
2196 * GDK_BUTTON_PRESS
2197 * GDK_BUTTON_RELEASE
2198 * GDK_BUTTON_PRESS
2199 * GDK_2BUTTON_PRESS
2200 * GDK_BUTTON_RELEASE
2201 * Note that the first click is received just like a normal
2202 * button press, while the second click results in a GDK_2BUTTON_PRESS being
2203 * received just after the GDK_BUTTON_PRESS.
2204 * Triple-clicks are very similar to double-clicks, except that GDK_3BUTTON_PRESS
2205 * is inserted after the third click. The order of the events is:
2206 * GDK_BUTTON_PRESS
2207 * GDK_BUTTON_RELEASE
2208 * GDK_BUTTON_PRESS
2209 * GDK_2BUTTON_PRESS
2210 * GDK_BUTTON_RELEASE
2211 * GDK_BUTTON_PRESS
2212 * GDK_3BUTTON_PRESS
2213 * GDK_BUTTON_RELEASE
2214 * For a double click to occur, the second button press must occur within 1/4 of
2215 * a second of the first. For a triple click to occur, the third button press
2216 * must also occur within 1/2 second of the first button press.
2217 * GdkEventTypetype;
2218 * the type of the event (GDK_BUTTON_PRESS, GDK_2BUTTON_PRESS,
2219 * GDK_3BUTTON_PRESS or GDK_BUTTON_RELEASE).
2220 * GdkWindow*window;
2221 * the window which received the event.
2222 * gint8send_event;
2223 * TRUE if the event was sent explicitly (e.g. using
2224 * XSendEvent).
2225 * guint32time;
2226 * the time of the event in milliseconds.
2227 * gdoublex;
2228 * the x coordinate of the pointer relative to the window.
2229 * gdoubley;
2230 * the y coordinate of the pointer relative to the window.
2231 * gdouble*axes;
2232 * x, y translated to the axes of device, or NULL if device is
2234 public struct GdkEventButton
2236 GdkEventType type;
2237 GdkWindow *window;
2238 byte sendEvent;
2239 uint time;
2240 double x;
2241 double y;
2242 double *axes;
2243 uint state;
2244 uint button;
2245 GdkDevice *device;
2246 double xRoot, yRoot;
2251 * Generated from button presses for the buttons 4 to 7. Wheel mice are
2252 * usually configured to generate button press events for buttons 4 and 5
2253 * when the wheel is turned.
2254 * GdkEventTypetype;
2255 * the type of the event (GDK_SCROLL).
2256 * GdkWindow*window;
2257 * the window which received the event.
2258 * gint8send_event;
2259 * TRUE if the event was sent explicitly (e.g. using
2260 * XSendEvent).
2261 * guint32time;
2262 * the time of the event in milliseconds.
2263 * gdoublex;
2264 * the x coordinate of the pointer relative to the window.
2265 * gdoubley;
2266 * the y coordinate of the pointer relative to the window.
2267 * guintstate;
2268 * a bit-mask representing the state of the modifier keys (e.g. Control,
2269 * Shift and Alt) and the pointer buttons. See GdkModifierType.
2270 * GdkScrollDirectiondirection;
2271 * the direction to scroll to (one of GDK_SCROLL_UP,
2273 public struct GdkEventScroll
2275 GdkEventType type;
2276 GdkWindow *window;
2277 byte sendEvent;
2278 uint time;
2279 double x;
2280 double y;
2281 uint state;
2282 GdkScrollDirection direction;
2283 GdkDevice *device;
2284 double xRoot, yRoot;
2289 * Generated when the pointer moves.
2290 * GdkEventTypetype;
2291 * the type of the event.
2292 * GdkWindow*window;
2293 * the window which received the event.
2294 * gint8send_event;
2295 * TRUE if the event was sent explicitly (e.g. using
2296 * XSendEvent).
2297 * guint32time;
2298 * the time of the event in milliseconds.
2299 * gdoublex;
2300 * the x coordinate of the pointer relative to the window.
2301 * gdoubley;
2302 * the y coordinate of the pointer relative to the window.
2303 * gdouble*axes;
2304 * x, y translated to the axes of device, or NULL if device is
2306 public struct GdkEventMotion
2308 GdkEventType type;
2309 GdkWindow *window;
2310 byte sendEvent;
2311 uint time;
2312 double x;
2313 double y;
2314 double *axes;
2315 uint state;
2316 short isHint;
2317 GdkDevice *device;
2318 double xRoot, yRoot;
2323 * Generated when all or part of a window becomes visible and needs to be
2324 * redrawn.
2325 * GdkEventTypetype;
2326 * the type of the event (GDK_EXPOSE).
2327 * GdkWindow*window;
2328 * the window which received the event.
2329 * gint8send_event;
2330 * TRUE if the event was sent explicitly (e.g. using
2331 * XSendEvent).
2332 * GdkRectanglearea;
2333 * bounding box of region.
2334 * GdkRegion*region;
2335 * the region that needs to be redrawn.
2336 * gintcount;
2337 * the number of contiguous GDK_EXPOSE events following this one.
2338 * The only use for this is "exposure compression", i.e. handling all contiguous
2339 * GDK_EXPOSE events in one go, though GDK performs some exposure compression
2340 * so this is not normally needed.
2342 public struct GdkEventExpose
2344 GdkEventType type;
2345 GdkWindow *window;
2346 byte sendEvent;
2347 GdkRectangle area;
2348 GdkRegion *region;
2349 int count; /+* If non-zero, how many more events follow. +/
2354 * Generated when the window visibility status has changed.
2355 * GdkEventTypetype;
2356 * the type of the event (GDK_VISIBILITY_NOTIFY).
2357 * GdkWindow*window;
2358 * the window which received the event.
2359 * gint8send_event;
2360 * TRUE if the event was sent explicitly (e.g. using
2361 * XSendEvent).
2362 * GdkVisibilityStatestate;
2363 * the new visibility state (GDK_VISIBILITY_FULLY_OBSCURED,
2364 * GDK_VISIBILITY_PARTIAL or GDK_VISIBILITY_UNOBSCURED).
2366 public struct GdkEventVisibility
2368 GdkEventType type;
2369 GdkWindow *window;
2370 byte sendEvent;
2371 GdkVisibilityState state;
2376 * Generated when the pointer enters or leaves a window.
2377 * GdkEventTypetype;
2378 * the type of the event (GDK_ENTER_NOTIFY or GDK_LEAVE_NOTIFY).
2379 * GdkWindow*window;
2380 * the window which received the event.
2381 * gint8send_event;
2382 * TRUE if the event was sent explicitly (e.g. using
2383 * XSendEvent).
2384 * GdkWindow*subwindow;
2385 * the window that was entered or left.
2386 * guint32time;
2387 * the time of the event in milliseconds.
2388 * gdoublex;
2389 * the x coordinate of the pointer relative to the window.
2390 * gdoubley;
2391 * the y coordinate of the pointer relative to the window.
2392 * gdoublex_root;
2393 * the x coordinate of the pointer relative to the root of the screen.
2394 * gdoubley_root;
2395 * the y coordinate of the pointer relative to the root of the screen.
2396 * GdkCrossingModemode;
2397 * the crossing mode (GDK_CROSSING_NORMAL, GDK_CROSSING_GRAB or
2399 public struct GdkEventCrossing
2401 GdkEventType type;
2402 GdkWindow *window;
2403 byte sendEvent;
2404 GdkWindow *subwindow;
2405 uint time;
2406 double x;
2407 double y;
2408 double xRoot;
2409 double yRoot;
2410 GdkCrossingMode mode;
2411 GdkNotifyType detail;
2412 int focus;
2413 uint state;
2418 * Describes a change of keyboard focus.
2419 * GdkEventTypetype;
2420 * the type of the event (GDK_FOCUS_CHANGE).
2421 * GdkWindow*window;
2422 * the window which received the event.
2423 * gint8send_event;
2424 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2425 * gint16in;
2426 * TRUE if the window has gained the keyboard focus, FALSE if it has lost
2427 * the focus.
2429 public struct GdkEventFocus
2431 GdkEventType type;
2432 GdkWindow *window;
2433 byte sendEvent;
2434 short inn;
2439 * Generated when a window size or position has changed.
2440 * GdkEventTypetype;
2441 * the type of the event (GDK_CONFIGURE).
2442 * GdkWindow*window;
2443 * the window which received the event.
2444 * gint8send_event;
2445 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2446 * gintx;
2447 * the new x coordinate of the window, relative to its parent.
2448 * ginty;
2449 * the new y coordinate of the window, relative to its parent.
2450 * gintwidth;
2451 * the new width of the window.
2452 * gintheight;
2453 * the new height of the window.
2455 public struct GdkEventConfigure
2457 GdkEventType type;
2458 GdkWindow *window;
2459 byte sendEvent;
2460 int x, y;
2461 int width;
2462 int height;
2467 * Describes a property change on a window.
2468 * GdkEventTypetype;
2469 * the type of the event (GDK_PROPERTY_NOTIFY).
2470 * GdkWindow*window;
2471 * the window which received the event.
2472 * gint8send_event;
2473 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2474 * GdkAtomatom;
2475 * the property that was changed.
2476 * guint32time;
2477 * the time of the event in milliseconds.
2478 * guintstate;
2479 * whether the property was changed (GDK_PROPERTY_NEW_VALUE) or
2480 * deleted (GDK_PROPERTY_DELETE).
2482 public struct GdkEventProperty
2484 GdkEventType type;
2485 GdkWindow *window;
2486 byte sendEvent;
2487 GdkAtom atom;
2488 uint time;
2489 uint state;
2494 * Generated when a selection is requested or ownership of a selection
2495 * is taken over by another client application.
2496 * GdkEventTypetype;
2497 * the type of the event (GDK_SELECTION_CLEAR, GDK_SELECTION_NOTIFY or
2498 * GDK_SELECTION_REQUEST).
2499 * GdkWindow*window;
2500 * the window which received the event.
2501 * gint8send_event;
2502 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2503 * GdkAtomselection;
2504 * the selection.
2505 * GdkAtomtarget;
2506 * the target to which the selection should be converted.
2507 * GdkAtomproperty;
2508 * the property in which to place the result of the conversion.
2509 * guint32time;
2510 * the time of the event in milliseconds.
2511 * GdkNativeWindowrequestor;
2512 * the native window on which to place property.
2514 public struct GdkEventSelection
2516 GdkEventType type;
2517 GdkWindow *window;
2518 byte sendEvent;
2519 GdkAtom selection;
2520 GdkAtom target;
2521 GdkAtom property;
2522 uint time;
2523 GdkNativeWindow requestor;
2528 * Generated during DND operations.
2529 * GdkEventTypetype;
2530 * the type of the event (GDK_DRAG_ENTER, GDK_DRAG_LEAVE,
2532 public struct GdkEventDND
2534 GdkEventType type;
2535 GdkWindow *window;
2536 byte sendEvent;
2537 GdkDragContext *context;
2538 uint time;
2539 short xRoot, yRoot;
2544 * Proximity events are generated when using GDK's wrapper for the
2545 * XInput extension. The XInput extension is an add-on for standard X
2546 * that allows you to use nonstandard devices such as graphics tablets.
2547 * A proximity event indicates that the stylus has moved in or out of
2548 * contact with the tablet, or perhaps that the user's finger has moved
2549 * in or out of contact with a touch screen.
2550 * GdkEventTypetype;
2551 * the type of the event (GDK_PROXIMITY_IN or GDK_PROXIMITY_OUT).
2552 * GdkWindow*window;
2553 * the window which received the event.
2554 * gint8send_event;
2555 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2556 * guint32time;
2557 * the time of the event in milliseconds.
2558 * GdkDevice*device;
2559 * the device where the event originated.
2561 public struct GdkEventProximity
2563 GdkEventType type;
2564 GdkWindow *window;
2565 byte sendEvent;
2566 uint time;
2567 GdkDevice *device;
2572 * An event sent by another client application.
2573 * GdkEventTypetype;
2574 * the type of the event (GDK_CLIENT_EVENT).
2575 * GdkWindow*window;
2576 * the window which received the event.
2577 * gint8send_event;
2578 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2579 * GdkAtommessage_type;
2580 * the type of the message, which can be defined by the
2581 * application.
2582 * gushortdata_format;
2583 * the format of the data, given as the number of bits in each
2584 * data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the data
2585 * union, 16-bit data uses the s array, and 32-bit data uses the l array.
2587 public struct GdkEventClient{}
2588 // GdkEventType type;
2589 // gdk-Event-Structures.html
2590 // GdkWindow *window;
2591 // gdk-Event-Structures.html
2592 // byte sendEvent;
2593 // gdk-Event-Structures.html
2594 // GdkAtom messageType;
2595 // gdk-Event-Structures.html
2596 // ushort dataFormat;
2597 // gdk-Event-Structures.html
2598 // unio {
2599 // gdk-Event-Structures.html
2600 // char b[20];
2601 // gdk-Event-Structures.html
2602 // short s[10];
2603 // gdk-Event-Structures.html
2604 // long l[5];
2605 // gdk-Event-Structures.html
2606 // } data;
2607 // gdk-Event-Structures.html
2611 * Generated when the area of a GdkDrawable being copied, with gdk_draw_drawable()
2612 * or gdk_window_copy_area(), was completely available.
2613 * FIXME: add more here.
2614 * GdkEventTypetype;
2615 * the type of the event (GDK_NO_EXPOSE).
2616 * GdkWindow*window;
2617 * the window which received the event.
2618 * gint8send_event;
2619 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2621 public struct GdkEventNoExpose
2623 GdkEventType type;
2624 GdkWindow *window;
2625 byte sendEvent;
2630 * Generated when the state of a toplevel window changes.
2631 * GdkEventTypetype;
2632 * the type of the event (GDK_WINDOW_STATE).
2633 * GdkWindow*window;
2634 * the window which received the event.
2635 * gint8send_event;
2636 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2637 * GdkWindowStatechanged_mask;
2638 * mask specifying what flags have changed.
2639 * GdkWindowStatenew_window_state;
2640 * the new window state, a combination of GdkWindowState bits.
2642 public struct GdkEventWindowState
2644 GdkEventType type;
2645 GdkWindow *window;
2646 byte sendEvent;
2647 GdkWindowState changedMask;
2648 GdkWindowState newWindowState;
2653 * Generated when a setting is modified.
2654 * GdkEventTypetype;
2655 * the type of the event (GDK_SETTING).
2656 * GdkWindow*window;
2657 * the window which received the event.
2658 * gint8send_event;
2659 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2660 * GdkSettingActionaction;
2661 * what happened to the setting (GDK_SETTING_ACTION_NEW,
2663 public struct GdkEventSetting
2665 GdkEventType type;
2666 GdkWindow *window;
2667 byte sendEvent;
2668 GdkSettingAction action;
2669 char *name;
2674 * Generated when the owner of a selection changes. On X11, this information is
2675 * only available if the X server supports the XFIXES extension.
2676 * GdkEventTypetype;
2677 * the type of the event (GDK_OWNER_CHANGE).
2678 * GdkWindow*window;
2679 * the window which received the event
2680 * gint8send_event;
2681 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2682 * GdkNativeWindowowner;
2683 * the new owner of the selection
2684 * GdkOwnerChangereason;
2685 * the reason for the ownership change as a GdkOwnerChange value
2686 * GdkAtomselection;
2687 * the atom identifying the selection
2688 * guint32time;
2689 * the timestamp of the event
2690 * guint32selection_time;
2691 * the time at which the selection ownership was taken over
2692 * Since 2.6
2694 public struct GdkEventOwnerChange
2696 GdkEventType type;
2697 GdkWindow *window;
2698 byte sendEvent;
2699 GdkNativeWindow owner;
2700 GdkOwnerChange reason;
2701 GdkAtom selection;
2702 uint time;
2703 uint selectionTime;
2708 * Generated when a pointer or keyboard grab is broken. On X11, this happens
2709 * when the grab window becomes unviewable (i.e. it or one of its ancestors
2710 * is unmapped), or if the same application grabs the pointer or keyboard
2711 * again. Note that implicit grabs (which are initiated by button presses)
2712 * can also cause GdkEventGrabBroken events.
2713 * GdkEventTypetype;
2714 * the type of the event (GDK_GRAB_BROKEN)
2715 * GdkWindow*window;
2716 * the window which received the event, i.e. the window
2718 public struct GdkEventGrabBroken
2720 GdkEventType type;
2721 GdkWindow *window;
2722 byte sendEvent;
2723 int keyboard;
2724 int implicit;
2725 GdkWindow *grabWindow;
2730 * Main Gtk struct.
2731 * A GdkKeymap defines the translation from keyboard state
2732 * (including a hardware key, a modifier mask, and active keyboard group)
2733 * to a keyval. This translation has two phases. The first phase is
2734 * to determine the effective keyboard group and level for the keyboard
2735 * state; the second phase is to look up the keycode/group/level triplet
2736 * in the keymap and see what keyval it corresponds to.
2738 public struct GdkKeymap{}
2742 * A GdkKeymapKey is a hardware key that can
2743 * be mapped to a keyval.
2744 * guintkeycode;
2745 * the hardware keycode. This is an identifying number for a
2747 public struct GdkKeymapKey
2749 uint keycode;
2750 int group;
2751 int level;
2756 * Main Gtk struct.
2757 * A GdkDragContext holds information about a
2758 * drag in progress. It is used on both source and destination sides.
2759 * GObjectparent_instance;
2760 * the parent instance
2761 * GdkDragProtocolprotocol;
2762 * the DND protocol which governs this drag.
2763 * gbooleanis_source;
2764 * TRUE if the context is used on the source side.
2765 * GdkWindow*source_window;
2766 * the source of this drag.
2767 * GdkWindow*dest_window;
2768 * the destination window of this drag.
2769 * GList*targets;
2770 * a list of targets offered by the source.
2771 * GdkDragActionactions;
2772 * a bitmask of actions proposed by the source when
2774 public struct GdkDragContext{}
2775 // GObject parentInstance;
2776 // gdk-Drag-and-Drop.html
2777 // GdkDragProtocol protocol;
2778 // gdk-Drag-and-Drop.html
2779 // int isSource;
2780 // gdk-Drag-and-Drop.html
2781 // GdkWindow *sourceWindow;
2782 // gdk-Drag-and-Drop.html
2783 // GdkWindow *destWindow;
2784 // gdk-Drag-and-Drop.html
2785 // GList *targets;
2786 // gdk-Drag-and-Drop.html
2787 // GdkDragAction actions;
2788 // gdk-Drag-and-Drop.html
2789 // GdkDragAction suggestedAction;
2790 // gdk-Drag-and-Drop.html
2791 // GdkDragAction action;
2792 // gdk-Drag-and-Drop.html
2793 // uint startTime;
2794 // gdk-Drag-and-Drop.html
2798 * Main Gtk struct.
2799 * A GdkDevice structure contains
2800 * a detailed description of an extended input device. All
2801 * fields are read-only; but you can use gdk_device_set_source(),
2802 * gdk_device_set_mode(), gdk_device_set_key() and gdk_device_set_axis_use()
2803 * to configure various aspects of the device.
2804 * GObjectparent_instance;
2805 * the parent instance
2806 * gchar*name;
2807 * the name of this device.
2808 * GdkInputSourcesource;
2809 * the type of this device.
2810 * GdkInputModemode;
2811 * the mode of this device
2812 * gbooleanhas_cursor;
2813 * TRUE if the pointer follows device motion.
2814 * gintnum_axes;
2815 * the length of the axes array.
2816 * GdkDeviceAxis*axes;
2817 * an array of GdkDeviceAxis, describing the axes of this device.
2818 * gintnum_keys;
2819 * the length of the keys array.
2820 * GdkDeviceKey*keys;
2821 * an array of GdkDeviceKey, describing the mapped macro buttons
2823 public struct GdkDevice{}
2824 // GObject parentInstance;
2825 // gdk-Input-Devices.html
2826 // /+* All fields are read-only +/
2827 // gdk-Input-Devices.html
2828 // char *name;
2829 // gdk-Input-Devices.html
2830 // GdkInputSource source;
2831 // gdk-Input-Devices.html
2832 // GdkInputMode mode;
2833 // gdk-Input-Devices.html
2834 // int hasCursor; /+* TRUE if the X pointer follows device motion +/
2835 // gdk-Input-Devices.html
2836 // int numAxes;
2837 // gdk-Input-Devices.html
2838 // GdkDeviceAxis *axes;
2839 // gdk-Input-Devices.html
2840 // int numKeys;
2841 // gdk-Input-Devices.html
2842 // GdkDeviceKey *keys;
2843 // gdk-Input-Devices.html
2847 * The GdkDeviceKey structure contains information
2848 * about the mapping of one device macro button onto a normal X key event.
2849 * It has the following fields:
2850 * guintkeyval;
2851 * the keyval to generate when the macro button is pressed.
2853 public struct GdkDeviceKey{}
2854 // uint keyval;
2855 // gdk-Input-Devices.html
2856 // GdkModifierType modifiers;
2857 // gdk-Input-Devices.html
2861 * The GdkDeviceAxis structure contains information
2862 * about the range and mapping of a device axis.
2863 * GdkAxisUseuse;
2864 * specifies how the axis is used.
2865 * gdoublemin;
2866 * the minimal value that will be reported by this axis.
2867 * gdoublemax;
2868 * the maximal value that will be reported by this axis.
2870 public struct GdkDeviceAxis{}
2871 // GdkAxisUse use;
2872 // gdk-Input-Devices.html
2873 // double min;
2874 // gdk-Input-Devices.html
2875 // double max;
2876 // gdk-Input-Devices.html
2880 * The GdkTimeCoord structure stores a single event in a
2881 * motion history. It contains the following fields:
2882 * guint32time;
2883 * The timestamp for this event.
2884 * gdoubleaxes[GDK_MAX_TIMECOORD_AXES];
2885 * the values of the device's axes.
2887 public struct GdkTimeCoord{}
2888 // uint time;
2889 // gdk-Input-Devices.html
2890 // double axes[GDK_MAX_TIMECOORD_AXES];
2891 // gdk-Input-Devices.html
2895 * Warning
2896 * gdk_visual_ref is deprecated and should not be used in newly-written code.
2897 * Deprecated equivalent of g_object_ref().
2898 * v:
2899 * a GdkVisual
2900 * Returns:
2901 * the same visual
2903 // TODO
2904 // #define gdk_visual_ref(v) g_object_ref(v)
2907 * Warning
2908 * gdk_visual_unref is deprecated and should not be used in newly-written code.
2909 * Deprecated equivalent of g_object_unref().
2910 * v:
2911 * a GdkVisual
2913 // TODO
2914 // #define gdk_visual_unref(v) g_object_unref(v)
2917 * Warning
2918 * gdk_window_copy_area is deprecated and should not be used in newly-written code.
2919 * Deprecated equivalent to gdk_draw_drawable(), see that function for docs
2920 * drawable:
2921 * a GdkDrawable
2922 * gc:
2923 * a GdkGC sharing the drawable's visual and colormap
2924 * x:
2925 * X position in drawable where the rectangle should be drawn
2926 * y:
2927 * Y position in drawable where the rectangle should be drawn
2928 * source_drawable:
2929 * the source GdkDrawable, which may be the same as drawable
2930 * source_x:
2931 * X position in src of rectangle to draw
2932 * source_y:
2933 * Y position in src of rectangle to draw
2934 * width:
2935 * width of rectangle to draw, or -1 for entire src width
2936 * height:
2937 * height of rectangle to draw, or -1 for entire src height
2939 // TODO
2940 // #define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height)
2943 * This macro marks the beginning of a critical section in which GDK and GTK+
2944 * functions can be called. Only one thread at a time can be in such a
2945 * critial section. The macro expands to a no-op if G_THREADS_ENABLED
2946 * has not been defined. Typically gdk_threads_enter() should be used
2947 * instead of this macro.
2949 // TODO
2950 // #define GDK_THREADS_ENTER()
2953 * This macro marks the end of a critical section
2954 * begun with GDK_THREADS_ENTER.
2956 // TODO
2957 // #define GDK_THREADS_LEAVE()
2960 * This defines the type of the function passed to
2961 * gdk_region_spans_intersect_foreach().
2962 * span:
2963 * a GdkSpan.
2964 * data:
2965 * the user data passed to gdk_region_spans_intersect_foreach().
2967 // void (*GdkSpanFunc) (GdkSpan *span, gpointer data);
2968 public typedef extern(C) void function (GdkSpan*, void*) GdkSpanFunc;
2971 * A function of this type is responsible for freeing the pixel array
2972 * of a pixbuf. The gdk_pixbuf_new_from_data() function lets you
2973 * pass in a pre-allocated pixel array so that a pixbuf can be
2974 * created from it; in this case you will need to pass in a function
2975 * of GdkPixbufDestroyNotify so that the pixel data can be freed
2976 * when the pixbuf is finalized.
2977 * pixels:
2978 * The pixel array of the pixbuf that is being finalized.
2979 * data:
2980 * User closure data.
2981 * See Also
2982 * GdkPixbuf, gdk_pixbuf_new_from_data().
2984 // void (*GdkPixbufDestroyNotify) (guchar *pixels, gpointer data);
2985 public typedef extern(C) void function (guchar*, void*) GdkPixbufDestroyNotify;
2988 * Specifies the type of the function passed to
2989 * gdk_pixbuf_save_to_callback(). It is called once for each block of
2990 * bytes that is "written" by gdk_pixbuf_save_to_callback(). If
2991 * successful it should return TRUE. If an error occurs it should set
2992 * error and return FALSE, in which case gdk_pixbuf_save_to_callback()
2993 * will fail with the same error.
2994 * buf:
2995 * bytes to be written.
2996 * count:
2997 * number of bytes in buf.
2998 * error:
2999 * A location to return an error.
3000 * data:
3001 * user data passed to gdk_pixbuf_save_to_callback().
3002 * Returns:
3003 * TRUE if successful, FALSE (with error set) if failed.
3004 * Since 2.4
3006 // gboolean (*GdkPixbufSaveFunc) (const gchar *buf, gsize count, GError **error, gpointer data);
3007 public typedef extern(C) int function (char[], uint, GError**, void*) GdkPixbufSaveFunc;
3010 * Specifies the type of function used to filter native events before they are
3011 * converted to GDK events.
3012 * When a filter is called, event is unpopulated, except for
3013 * event->window. The filter may translate the native
3014 * event to a GDK event and store the result in event, or handle it without
3015 * translation. If the filter translates the event and processing should
3016 * continue, it should return GDK_FILTER_TRANSLATE.
3017 * xevent:
3018 * the native event to filter.
3019 * event:
3020 * the GDK event to which the X event will be translated.
3021 * data:
3022 * user data set when the filter was installed.
3023 * Returns:
3024 * a GdkFilterReturn value.
3026 // GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent, GdkEvent *event, gpointer data);
3027 public typedef extern(C) GdkFilterReturn function (GdkXEvent*, GdkEvent*, void*) GdkFilterFunc;
3030 * Specifies the type of function passed to gdk_event_handler_set() to handle
3031 * all GDK events.
3032 * event:
3033 * the GdkEvent to process.
3034 * data:
3035 * user data set when the event handler was installed with
3036 * gdk_event_handler_set().
3038 // void (*GdkEventFunc) (GdkEvent *event, gpointer data);
3039 public typedef extern(C) void function (GdkEvent*, void*) GdkEventFunc;
3042 * A callback function that will be called when some condition
3043 * occurs.
3044 * data:
3045 * the user data passed to gdk_input_add() or gdk_input_add_full().
3046 * source:
3047 * the source where the condition occurred.
3048 * condition:
3049 * the triggering condition.
3051 // void (*GdkInputFunction) (gpointer data, gint source, GdkInputCondition condition);
3052 public typedef extern(C) void function (void*, int, GdkInputCondition) GdkInputFunction;
3055 * A callback function called when a piece of user data is
3056 * no longer being stored by GDK. Will typically free the
3057 * structure or object that data points to.
3058 * data:
3059 * the user data.
3061 // void (*GdkDestroyNotify) (gpointer data);
3062 public typedef extern(C) void function (void*) GdkDestroyNotify;
3064 * The GdkEvent struct contains a union of all of the event structs,
3065 * and allows access to the data fields in a number of ways.
3066 * The event type is always the first field in all of the event structs, and
3067 * can always be accessed with the following code, no matter what type of event
3068 * it is:
3070 public struct GdkEvent
3072 union
3074 GdkEventType type;
3075 GdkEventAny any;
3076 GdkEventExpose expose;
3077 GdkEventNoExpose noExpose;
3078 GdkEventVisibility visibility;
3079 GdkEventMotion motion;
3080 GdkEventButton button;
3081 GdkEventScroll scroll;
3082 GdkEventKey key;
3083 GdkEventCrossing crossing;
3084 GdkEventFocus focusChange;
3085 GdkEventConfigure configure;
3086 GdkEventProperty property;
3087 GdkEventSelection selection;
3088 GdkEventOwnerChange ownerChange;
3089 GdkEventProximity proximity;
3090 GdkEventClient client;
3091 GdkEventDND dnd;
3092 GdkEventWindowState windowState;
3093 GdkEventSetting setting;
3094 GdkEventGrabBroken grabBroken;