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
26 public import glib
.glibtypes
;
27 public import gobject
.gobjecttypes
;
28 public import pango
.pangotypes
;
29 public import gdkpixbuf
.gdkpixbuftypes
;
32 alias void* GdkNativeWindow
;
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
;
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
;
70 * typedef GdkAtom GdkSelection;
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
;
79 * typedef GdkAtom GdkSelectionType;
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
;
94 * typedef GdkAtom GdkTarget;
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.
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
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.
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.
132 * overlapping areas are always included.
134 public enum GdkFillRule
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
156 alias GdkOverlapType OverlapType
;
159 * A set of bit flags used to indicate which fields
160 * GdkGCValues structure are set.
162 * the foreground is set.
164 * the background is set.
168 * the function is set.
174 * the stipple is set.
176 * the clip_mask is set.
178 * the subwindow_mode is set.
180 * the ts_x_origin is set.
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.
188 * the graphics_exposures is set.
190 * the line_width is set.
192 * the line_style is set.
194 * the cap_style is set.
196 * the join_style is set.
198 public enum GdkGCValuesMask
209 TS_X_ORIGIN
= 1 << 9,
210 TS_Y_ORIGIN
= 1 << 10,
211 CLIP_X_ORIGIN
= 1 << 11,
212 CLIP_Y_ORIGIN
= 1 << 12,
214 LINE_WIDTH
= 1 << 14,
215 LINE_STYLE
= 1 << 15,
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
248 alias GdkFunction Funct
;
251 * Determines how primitives are drawn.
253 * draw with the foreground color.
255 * draw with a tiled pixmap.
257 * draw using the stipple bitmap. Pixels corresponding
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.
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
298 alias GdkLineStyle LineStyle
;
301 * Determines how the end of lines are drawn.
303 * the same as GDK_CAP_BUTT for lines of non-zero width.
305 public enum GdkCapStyle
312 alias GdkCapStyle CapStyle
;
315 * Determines how the joins between segments of a polygon are drawn.
317 * the sides of each line are extended to meet at an angle.
319 * the sides of the two lines are joined by a circular arc.
321 * the sides of the two lines are joined by a straight line which
323 public enum GdkJoinStyle
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)
342 * Use dithering in 16 bits per pixel and below.
344 public enum GdkRgbDither
350 alias GdkRgbDither RgbDither
;
353 * Specifies the type of a GdkImage.
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.
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.
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
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
378 * GDK_PIXBUF_ERROR_CORRUPT_IMAGE
379 * An image file was broken somehow.
380 * GDK_PIXBUF_ERROR_INSUFFICIENT_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
423 alias GdkPixbufAlphaMode PixbufAlphaMode
;
427 public enum GdkInterpType
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
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
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
475 alias GdkVisualType VisualType
;
478 * A set of values describing the possible byte-orders
479 * for storing pixel values in memory.
481 * The values are stored with the least-significant byte
483 public enum GdkByteOrder
488 alias GdkByteOrder ByteOrder
;
492 * GdkFontType is deprecated and should not be used in newly-written code.
493 * Indicates the type of a font. The possible values
496 * the font is a single font.
498 * the font is a fontset.
500 public enum GdkFontType
505 alias GdkFontType FontType
;
508 * The standard cursors available.
511 * GDK_BASED_ARROW_DOWN
515 * GDK_BOTTOM_LEFT_CORNER
516 * GDK_BOTTOM_RIGHT_CORNER
563 * GDK_SB_H_DOUBLE_ARROW
567 * GDK_SB_V_DOUBLE_ARROW
576 * GDK_TOP_LEFT_CORNER
577 * GDK_TOP_RIGHT_CORNER
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
596 BASED_ARROW_DOWN
= 4,
600 BOTTOM_LEFT_CORNER
= 12,
601 BOTTOM_RIGHT_CORNER
= 14,
648 SB_H_DOUBLE_ARROW
= 108,
650 SB_RIGHT_ARROW
= 112,
652 SB_V_DOUBLE_ARROW
= 116,
660 TOP_LEFT_ARROW
= 132,
661 TOP_LEFT_CORNER
= 134,
662 TOP_RIGHT_CORNER
= 136,
672 CURSOR_IS_PIXMAP
= -1
674 alias GdkCursorType CursorType
;
677 * Describes the kind of window.
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)
683 * child window (used to implement e.g. GtkButton)
685 * useless/deprecated compatibility type
687 * override redirect temporary window (used to implement GtkMenu)
689 * foreign window (see gdk_window_foreign_new())
691 public enum GdkWindowType
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.
707 * window for graphics and events
709 * window for events only
711 public enum GdkWindowClass
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
728 * indicates that the program has positioned the window
730 * min size fields are set
732 * max size fields are set
734 * base size fields are set
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
742 * indicates that the window's position was explicitly set by the user
744 * indicates that the window's size was explicitly set by the user
746 public enum GdkWindowHints
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
765 * Window Manager Hints specification for more details.
766 * GDK_GRAVITY_NORTH_WEST
767 * the reference point is at the top left corner.
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.
773 * the reference point is at the middle of the left edge.
775 * the reference point is at the center of the window.
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.
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.
785 * the reference point is at the top left corner of the
787 public enum GdkGravity
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
808 * GDK_WINDOW_EDGE_NORTH_EAST
809 * the top right corner.
810 * GDK_WINDOW_EDGE_WEST
812 * GDK_WINDOW_EDGE_EAST
814 * GDK_WINDOW_EDGE_SOUTH_WEST
815 * the lower left corner.
816 * GDK_WINDOW_EDGE_SOUTH
818 * GDK_WINDOW_EDGE_SOUTH_EAST
819 * the lower right corner.
821 public enum GdkWindowEdge
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.
840 * Window Manager Hints specification for more details about
842 * GDK_WINDOW_TYPE_HINT_NORMAL
843 * Normal toplevel window.
844 * GDK_WINDOW_TYPE_HINT_DIALOG
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
857 MENU
, /+* Torn off menu +/
863 DROPDOWN_MENU
, /+* A drop down menu (from a menubar) +/
864 POPUP_MENU
, /+* A popup menu (from right-click) +/
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.
880 * Honor the title field
882 * Honor the X coordinate field
884 * Honor the Y coordinate field
886 * Honor the cursor field
888 * Honor the colormap field
890 * Honor the visual field
892 * Honor the wmclass_class and wmclass_name fields
894 * Honor the override_redirect field
896 public enum GdkWindowAttributesType
902 WA_COLORMAP
= 1 << 5,
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
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.
937 * a Lock key (depending on the modifier mapping of the
939 public enum GdkModifierType
943 CONTROL_MASK
= 1 << 2,
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,
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.
970 * all decorations should be applied.
972 * a frame should be drawn around the window.
974 * the frame should have resize handles.
976 * a titlebar should be placed above the window.
978 * a button for opening a menu should be included.
980 * a minimize button should be included.
982 * a maximize button should be included.
984 public enum GdkWMDecoration
987 DECOR_BORDER
= 1 << 1,
988 DECOR_RESIZEH
= 1 << 2,
989 DECOR_TITLE
= 1 << 3,
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.
1002 * all functions should be offered.
1004 * the window should be resizable.
1006 * the window should be movable.
1008 * the window should be minimizable.
1010 * the window should be maximizable.
1012 * the window should be closable.
1014 public enum GdkWMFunction
1017 FUNC_RESIZE
= 1 << 1,
1019 FUNC_MINIMIZE
= 1 << 3,
1020 FUNC_MAXIMIZE
= 1 << 4,
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.
1031 * a special code to indicate a null event.
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
1037 * the window has been destroyed.
1039 * all or part of the window has become visible and needs to be
1042 * the pointer (usually a mouse) has moved.
1044 * a mouse button has been pressed.
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.
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.
1055 * a key has been pressed.
1057 * a key has been released.
1059 * the pointer has entered the window.
1061 * the pointer has left the window.
1063 * the keyboard focus has entered or left the window.
1065 * the size, position or stacking order of the window has changed.
1066 * Note that GTK+ discards these events for GDK_WINDOW_CHILD windows.
1068 * the window has been mapped.
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.
1080 * an input device has moved into contact with a sensing
1081 * surface (e.g. a touchscreen or graphics tablet).
1083 * an input device has moved out of contact with a sensing
1086 * the mouse has entered the window while a drag is in progress.
1088 * the mouse has left the window while a drag is in progress.
1090 * the mouse has moved in the window while a drag is in
1093 * the status of the drag operation initiated by the window
1096 * a drop operation onto the window has started.
1098 * the drop operation initiated by the window has completed.
1100 * a message has been received from another application.
1101 * GDK_VISIBILITY_NOTIFY
1102 * the window visibility status has changed.
1104 * indicates that the source region was completely available
1105 * when parts of a drawable were copied. This is not very useful.
1107 * the scroll wheel was turned
1109 * the state of a window has changed. See GdkWindowState
1110 * for the possible window states
1112 * a setting has been modified.
1114 * the owner of a selection has changed. This event type
1116 public enum GdkEventType
1124 DOUBLE_BUTTON_PRESS
= 5,
1125 TRIPPLE_BUTTON_PRESS
= 6,
1135 PROPERTY_NOTIFY
= 16,
1136 SELECTION_CLEAR
= 17,
1137 SELECTION_REQUEST
= 18,
1138 SELECTION_NOTIFY
= 19,
1148 VISIBILITY_NOTIFY
= 29,
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
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().
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.
1241 * the window is scrolled up.
1243 * the window is scrolled down.
1245 * the window is scrolled to the left.
1247 * the window is scrolled to the right.
1249 public enum GdkScrollDirection
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
1273 alias GdkVisibilityState VisibilityState
;
1276 * Specifies the crossing mode for GdkEventCrossing.
1277 * GDK_CROSSING_NORMAL
1278 * crossing because of pointer motion.
1280 * crossing because a grab is activated.
1281 * GDK_CROSSING_UNGRAB
1282 * crossing because a grab is deactivated.
1284 public enum GdkCrossingMode
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
1305 NONLINEAR_VIRTUAL
= 4,
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
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
1347 FULLSCREEN
= 1 << 4,
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
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
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
1401 ROOTWIN
, /+* A root window with nobody claiming
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.
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,
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.
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.)
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
1453 alias GdkInputCondition InputCondition
;
1456 * An enumeration describing the type of an input device
1459 * the device is a mouse. (This will be reported for the core
1461 public enum GdkInputSource
1468 alias GdkInputSource InputSource
;
1471 * An enumeration that describes the mode of an input device.
1473 * the device is disabled and will not report any events.
1475 * the device is enabled. The device's coordinate space
1477 public enum GdkInputMode
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.
1490 * the axis is ignored.
1492 * the axis is used as the x axis.
1494 * the axis is used as the y axis.
1496 * the axis is used for pressure information.
1498 * the axis is used for x tilt information.
1500 * the axis is used for x tilt information.
1502 * the axis is used for wheel information.
1504 * a constant equal to the numerically highest axis value.
1506 public enum GdkAxisUse
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
1535 alias GdkExtensionMode ExtensionMode
;
1540 * The GdkDisplay struct is the GDK representation
1541 * of an X display. All its fields are private and should not be accessed directly.
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
1554 * Obtains the current pointer position and modifier state.
1556 public struct GdkDisplayPointerHooks
{}
1557 // void (*getPointer) (GdkDisplay *display,
1559 // GdkScreen **screen,
1565 // GdkModifierType *mask);
1567 // GdkWindow* (*windowGetPointer) (GdkDisplay *display,
1569 // GdkWindow *window,
1575 // GdkModifierType *mask);
1577 // GdkWindow* (*windowAtPointer) (GdkDisplay *display,
1587 * The GdkDisplayManager struct has no interesting
1591 public struct GdkDisplayManager
{}
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.
1601 public struct GdkScreen
{}
1605 * Defines the x and y coordinates of a point.
1607 * the x coordinate of the point.
1609 * the y coordinate of the point.
1611 public struct GdkPoint
1620 * Defines the position and size of a rectangle.
1622 * the x coordinate of the left edge of the rectangle.
1624 * the y coordinate of the top of the rectangle.
1626 * the width of the rectangle.
1628 * the height of the rectangle.
1630 public struct GdkRectangle
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.
1649 * x coordinate of the first pixel.
1651 * y coordinate of the first pixel.
1653 * number of pixels in the span.
1655 public struct GdkSpan
1665 * The GdkGC structure represents a graphics context.
1666 * It is an opaque structure with no user-visible
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
1684 // gdk-Graphics-Contexts.html
1685 // GdkFunction funct;
1686 // gdk-Graphics-Contexts.html
1688 // gdk-Graphics-Contexts.html
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
1698 // gdk-Graphics-Contexts.html
1700 // gdk-Graphics-Contexts.html
1702 // gdk-Graphics-Contexts.html
1704 // gdk-Graphics-Contexts.html
1705 // int graphicsExposures;
1706 // gdk-Graphics-Contexts.html
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
1719 * An opaque structure representing an object that can be
1720 * drawn onto. This can be a GdkPixmap, a GdkBitmap,
1723 public struct GdkDrawable
{}
1727 * Specifies the start and end point of a line for use by the gdk_draw_segments()
1730 * the x coordinate of the start point.
1732 * the y coordinate of the start point.
1734 * the x coordinate of the end point.
1736 * the y coordinate of the end point.
1738 public struct GdkSegment
1748 * Specifies a trapezpoid for use by the gdk_draw_trapezoids().
1749 * The trapezoids used here have parallel, horizontal top and
1752 * the y coordinate of the start point.
1754 * the x coordinate of the top left corner
1756 * the x coordinate of the top right corner
1758 * the y coordinate of the end point.
1760 * the x coordinate of the bottom left corner
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
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
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
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];
1805 * The GdkImage struct contains information on the image and the pixel data.
1806 * GObjectparent_instance;
1807 * the parent instance
1809 * the type of the image.
1812 * GdkByteOrderbyte_order;
1815 * the width of the image in pixels.
1817 * the height of the image in pixels.
1819 * the depth of the image, i.e. the number of bits per pixel.
1821 * the number of bytes per pixel.
1823 * the number of bytes per line of the image.
1824 * guint16bits_per_pixel;
1825 * the number of bits per pixel.
1828 * GdkColormap*colormap;
1829 * the GdkColormap associated with the image
1831 public struct GdkImage
{}
1832 // GObject parentInstance;
1834 // GdkImageType type; /+* read only. +/
1836 // GdkVisual *visual; /+* read only. visual used to create the image +/
1838 // GdkByteOrder byteOrder; /+* read only. +/
1840 // int width; /+* read only. +/
1842 // int height; /+* read only. +/
1844 // ushort depth; /+* read only. +/
1846 // ushort bpp; /+* read only. bytes per pixel +/
1848 // ushort bpl; /+* read only. bytes per line +/
1850 // ushort bitsPerPixel; /+* read only. bits per pixel +/
1854 // GdkColormap *colormap; /+* read only. +/
1861 public struct GdkPixbuf
{}
1865 * The GdkColor structure is used to describe an
1866 * allocated or unallocated color.
1868 * For allocated colors, the value used to
1870 public struct GdkColor
1881 * The colormap structure contains the following public fields.
1883 * For pseudo-color colormaps, the number of colors
1885 public struct GdkColormap
{}
1887 // gdk-Colormaps-and-Colors.html
1888 // GdkColor *colors;
1889 // gdk-Colormaps-and-Colors.html
1894 * The GdkVisual structure contains information about
1895 * a particular visual.
1896 * Example5.Constructing a pixel value from components
1898 * pixel_from_rgb (GdkVisual *visual,
1900 public struct GdkVisual
{}
1901 // GObject parentInstance;
1903 // GdkVisualType type;
1907 // GdkByteOrder byteOrder;
1909 // int colormapSize;
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()
1942 * a value of type GdkFontType which indicates
1944 public struct GdkFont
{}
1945 // GdkFontType type;
1955 * A GdkCursor structure represents a cursor.
1956 * GdkCursorTypetype;
1957 * the GdkCursorType of the cursor
1959 public struct GdkCursor
{}
1960 // GdkCursorType type;
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
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
{}
2020 // double minAspect;
2022 // double maxAspect;
2024 // GdkGravity winGravity;
2029 * Attributes to use for a newly-created window.
2031 * title of the window (for toplevel windows)
2033 * event mask (see gdk_window_set_events())
2035 * X coordinate relative to parent window (see gdk_window_move())
2037 * Y coordinate relative to parent window (see gdk_window_move())
2042 * GdkWindowClasswclass;
2043 * GDK_INPUT_OUTPUT (normal window) or GDK_INPUT_ONLY (invisible window that receives events)
2045 * GdkVisual for window
2046 * GdkColormap*colormap;
2047 * GdkColormap for window
2048 * GdkWindowTypewindow_type;
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
{}
2070 // GdkWindowClass wclass;
2072 // GdkVisual *visual;
2074 // GdkColormap *colormap;
2076 // GdkWindowType windowType;
2078 // GdkCursor *cursor;
2080 // char *wmclassName;
2082 // char *wmclassClass;
2084 // int overrideRedirect;
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
2095 * Obtains the current pointer position and modifier state.
2097 public struct GdkPointerHooks
{}
2098 // GdkWindow* (*getPointer) (GdkWindow *window,
2104 // GdkModifierType *mask);
2106 // GdkWindow* (*windowAtPointer) (GdkScreen *screen, /+* unused +/
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
2119 * the type of the event.
2121 * the window which received the event.
2123 * TRUE if the event was sent explicitly (e.g. using
2126 public struct GdkEventAny
2135 * Describes a key press or key release event.
2137 * the type of the event (GDK_KEY_PRESS or GDK_KEY_RELEASE).
2139 * the window which received the event.
2141 * TRUE if the event was sent explicitly (e.g. using
2144 * the time of the event in milliseconds.
2146 * a bit-mask representing the state of the modifier keys (e.g. Control,
2147 * Shift and Alt) and the pointer buttons. See GdkModifierType.
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.
2153 * the length of 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.
2169 * the keyboard group.
2170 * guintis_modifier:1;
2171 * a flag that indicates if hardware_keycode is mapped to a
2173 public struct GdkEventKey
2183 ushort hardwareKeycode
;
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:
2197 * GDK_BUTTON_RELEASE
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:
2207 * GDK_BUTTON_RELEASE
2210 * GDK_BUTTON_RELEASE
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.
2218 * the type of the event (GDK_BUTTON_PRESS, GDK_2BUTTON_PRESS,
2219 * GDK_3BUTTON_PRESS or GDK_BUTTON_RELEASE).
2221 * the window which received the event.
2223 * TRUE if the event was sent explicitly (e.g. using
2226 * the time of the event in milliseconds.
2228 * the x coordinate of the pointer relative to the window.
2230 * the y coordinate of the pointer relative to the window.
2232 * x, y translated to the axes of device, or NULL if device is
2234 public struct GdkEventButton
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.
2255 * the type of the event (GDK_SCROLL).
2257 * the window which received the event.
2259 * TRUE if the event was sent explicitly (e.g. using
2262 * the time of the event in milliseconds.
2264 * the x coordinate of the pointer relative to the window.
2266 * the y coordinate of the pointer relative to the window.
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
2282 GdkScrollDirection direction
;
2284 double xRoot
, yRoot
;
2289 * Generated when the pointer moves.
2291 * the type of the event.
2293 * the window which received the event.
2295 * TRUE if the event was sent explicitly (e.g. using
2298 * the time of the event in milliseconds.
2300 * the x coordinate of the pointer relative to the window.
2302 * the y coordinate of the pointer relative to the window.
2304 * x, y translated to the axes of device, or NULL if device is
2306 public struct GdkEventMotion
2318 double xRoot
, yRoot
;
2323 * Generated when all or part of a window becomes visible and needs to be
2326 * the type of the event (GDK_EXPOSE).
2328 * the window which received the event.
2330 * TRUE if the event was sent explicitly (e.g. using
2333 * bounding box of region.
2335 * the region that needs to be redrawn.
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
2349 int count
; /+* If non-zero, how many more events follow. +/
2354 * Generated when the window visibility status has changed.
2356 * the type of the event (GDK_VISIBILITY_NOTIFY).
2358 * the window which received the event.
2360 * TRUE if the event was sent explicitly (e.g. using
2362 * GdkVisibilityStatestate;
2363 * the new visibility state (GDK_VISIBILITY_FULLY_OBSCURED,
2364 * GDK_VISIBILITY_PARTIAL or GDK_VISIBILITY_UNOBSCURED).
2366 public struct GdkEventVisibility
2371 GdkVisibilityState state
;
2376 * Generated when the pointer enters or leaves a window.
2378 * the type of the event (GDK_ENTER_NOTIFY or GDK_LEAVE_NOTIFY).
2380 * the window which received the event.
2382 * TRUE if the event was sent explicitly (e.g. using
2384 * GdkWindow*subwindow;
2385 * the window that was entered or left.
2387 * the time of the event in milliseconds.
2389 * the x coordinate of the pointer relative to the window.
2391 * the y coordinate of the pointer relative to the window.
2393 * the x coordinate of the pointer relative to the root of the screen.
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
2404 GdkWindow
*subwindow
;
2410 GdkCrossingMode mode
;
2411 GdkNotifyType detail
;
2418 * Describes a change of keyboard focus.
2420 * the type of the event (GDK_FOCUS_CHANGE).
2422 * the window which received the event.
2424 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2426 * TRUE if the window has gained the keyboard focus, FALSE if it has lost
2429 public struct GdkEventFocus
2439 * Generated when a window size or position has changed.
2441 * the type of the event (GDK_CONFIGURE).
2443 * the window which received the event.
2445 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2447 * the new x coordinate of the window, relative to its parent.
2449 * the new y coordinate of the window, relative to its parent.
2451 * the new width of the window.
2453 * the new height of the window.
2455 public struct GdkEventConfigure
2467 * Describes a property change on a window.
2469 * the type of the event (GDK_PROPERTY_NOTIFY).
2471 * the window which received the event.
2473 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2475 * the property that was changed.
2477 * the time of the event in milliseconds.
2479 * whether the property was changed (GDK_PROPERTY_NEW_VALUE) or
2480 * deleted (GDK_PROPERTY_DELETE).
2482 public struct GdkEventProperty
2494 * Generated when a selection is requested or ownership of a selection
2495 * is taken over by another client application.
2497 * the type of the event (GDK_SELECTION_CLEAR, GDK_SELECTION_NOTIFY or
2498 * GDK_SELECTION_REQUEST).
2500 * the window which received the event.
2502 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2506 * the target to which the selection should be converted.
2508 * the property in which to place the result of the conversion.
2510 * the time of the event in milliseconds.
2511 * GdkNativeWindowrequestor;
2512 * the native window on which to place property.
2514 public struct GdkEventSelection
2523 GdkNativeWindow requestor
;
2528 * Generated during DND operations.
2530 * the type of the event (GDK_DRAG_ENTER, GDK_DRAG_LEAVE,
2532 public struct GdkEventDND
2537 GdkDragContext
*context
;
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.
2551 * the type of the event (GDK_PROXIMITY_IN or GDK_PROXIMITY_OUT).
2553 * the window which received the event.
2555 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2557 * the time of the event in milliseconds.
2559 * the device where the event originated.
2561 public struct GdkEventProximity
2572 * An event sent by another client application.
2574 * the type of the event (GDK_CLIENT_EVENT).
2576 * the window which received the 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
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
2593 // gdk-Event-Structures.html
2594 // GdkAtom messageType;
2595 // gdk-Event-Structures.html
2596 // ushort dataFormat;
2597 // gdk-Event-Structures.html
2599 // gdk-Event-Structures.html
2601 // gdk-Event-Structures.html
2603 // gdk-Event-Structures.html
2605 // gdk-Event-Structures.html
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.
2615 * the type of the event (GDK_NO_EXPOSE).
2617 * the window which received the event.
2619 * TRUE if the event was sent explicitly (e.g. using XSendEvent).
2621 public struct GdkEventNoExpose
2630 * Generated when the state of a toplevel window changes.
2632 * the type of the event (GDK_WINDOW_STATE).
2634 * the window which received the 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
2647 GdkWindowState changedMask
;
2648 GdkWindowState newWindowState
;
2653 * Generated when a setting is modified.
2655 * the type of the event (GDK_SETTING).
2657 * the window which received the 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
2668 GdkSettingAction action
;
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.
2677 * the type of the event (GDK_OWNER_CHANGE).
2679 * the window which received the 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
2687 * the atom identifying the selection
2689 * the timestamp of the event
2690 * guint32selection_time;
2691 * the time at which the selection ownership was taken over
2694 public struct GdkEventOwnerChange
2699 GdkNativeWindow owner
;
2700 GdkOwnerChange reason
;
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.
2714 * the type of the event (GDK_GRAB_BROKEN)
2716 * the window which received the event, i.e. the window
2718 public struct GdkEventGrabBroken
2725 GdkWindow
*grabWindow
;
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.
2745 * the hardware keycode. This is an identifying number for a
2747 public struct GdkKeymapKey
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.
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
2780 // gdk-Drag-and-Drop.html
2781 // GdkWindow *sourceWindow;
2782 // gdk-Drag-and-Drop.html
2783 // GdkWindow *destWindow;
2784 // gdk-Drag-and-Drop.html
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
2794 // gdk-Drag-and-Drop.html
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
2807 * the name of this device.
2808 * GdkInputSourcesource;
2809 * the type of this device.
2811 * the mode of this device
2812 * gbooleanhas_cursor;
2813 * TRUE if the pointer follows device motion.
2815 * the length of the axes array.
2816 * GdkDeviceAxis*axes;
2817 * an array of GdkDeviceAxis, describing the axes of this device.
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
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
2837 // gdk-Input-Devices.html
2838 // GdkDeviceAxis *axes;
2839 // gdk-Input-Devices.html
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:
2851 * the keyval to generate when the macro button is pressed.
2853 public struct GdkDeviceKey
{}
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.
2864 * specifies how the axis is used.
2866 * the minimal value that will be reported by this axis.
2868 * the maximal value that will be reported by this axis.
2870 public struct GdkDeviceAxis
{}
2872 // gdk-Input-Devices.html
2874 // gdk-Input-Devices.html
2876 // gdk-Input-Devices.html
2880 * The GdkTimeCoord structure stores a single event in a
2881 * motion history. It contains the following fields:
2883 * The timestamp for this event.
2884 * gdoubleaxes[GDK_MAX_TIMECOORD_AXES];
2885 * the values of the device's axes.
2887 public struct GdkTimeCoord
{}
2889 // gdk-Input-Devices.html
2890 // double axes[GDK_MAX_TIMECOORD_AXES];
2891 // gdk-Input-Devices.html
2896 * gdk_visual_ref is deprecated and should not be used in newly-written code.
2897 * Deprecated equivalent of g_object_ref().
2904 // #define gdk_visual_ref(v) g_object_ref(v)
2908 * gdk_visual_unref is deprecated and should not be used in newly-written code.
2909 * Deprecated equivalent of g_object_unref().
2914 // #define gdk_visual_unref(v) g_object_unref(v)
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
2923 * a GdkGC sharing the drawable's visual and colormap
2925 * X position in drawable where the rectangle should be drawn
2927 * Y position in drawable where the rectangle should be drawn
2929 * the source GdkDrawable, which may be the same as drawable
2931 * X position in src of rectangle to draw
2933 * Y position in src of rectangle to draw
2935 * width of rectangle to draw, or -1 for entire src width
2937 * height of rectangle to draw, or -1 for entire src height
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.
2950 // #define GDK_THREADS_ENTER()
2953 * This macro marks the end of a critical section
2954 * begun with GDK_THREADS_ENTER.
2957 // #define GDK_THREADS_LEAVE()
2960 * This defines the type of the function passed to
2961 * gdk_region_spans_intersect_foreach().
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.
2978 * The pixel array of the pixbuf that is being finalized.
2980 * User closure data.
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.
2995 * bytes to be written.
2997 * number of bytes in buf.
2999 * A location to return an error.
3001 * user data passed to gdk_pixbuf_save_to_callback().
3003 * TRUE if successful, FALSE (with error set) if failed.
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.
3018 * the native event to filter.
3020 * the GDK event to which the X event will be translated.
3022 * user data set when the filter was installed.
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
3033 * the GdkEvent to process.
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
3045 * the user data passed to gdk_input_add() or gdk_input_add_full().
3047 * the source where the condition occurred.
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.
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
3070 public struct GdkEvent
3076 GdkEventExpose expose
;
3077 GdkEventNoExpose noExpose
;
3078 GdkEventVisibility visibility
;
3079 GdkEventMotion motion
;
3080 GdkEventButton button
;
3081 GdkEventScroll scroll
;
3083 GdkEventCrossing crossing
;
3084 GdkEventFocus focusChange
;
3085 GdkEventConfigure configure
;
3086 GdkEventProperty property
;
3087 GdkEventSelection selection
;
3088 GdkEventOwnerChange ownerChange
;
3089 GdkEventProximity proximity
;
3090 GdkEventClient client
;
3092 GdkEventWindowState windowState
;
3093 GdkEventSetting setting
;
3094 GdkEventGrabBroken grabBroken
;