1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtkc.gdktypes;
26 
27 public import gtkc.glibtypes;
28 public import gtkc.gobjecttypes;
29 public import gtkc.giotypes;
30 public import gtkc.pangotypes;
31 public import gtkc.gdkpixbuftypes;
32 
33 /**
34  * Defines the position and size of a rectangle. It is identical to
35  * #cairo_rectangle_int_t.
36  */
37 public alias cairo_rectangle_int_t GdkRectangle;
38 
39 /**
40  * Used to represent native events (XEvents for the X11
41  * backend, MSGs for Win32).
42  */
43 public alias void* GdkXEvent;
44 
45 /**
46  * An enumeration describing the way in which a device
47  * axis (valuator) maps onto the predefined valuator
48  * types that GTK+ understands.
49  */
50 public enum GdkAxisUse
51 {
52 	/**
53 	 * the axis is ignored.
54 	 */
55 	IGNORE = 0,
56 	/**
57 	 * the axis is used as the x axis.
58 	 */
59 	X = 1,
60 	/**
61 	 * the axis is used as the y axis.
62 	 */
63 	Y = 2,
64 	/**
65 	 * the axis is used for pressure information.
66 	 */
67 	PRESSURE = 3,
68 	/**
69 	 * the axis is used for x tilt information.
70 	 */
71 	XTILT = 4,
72 	/**
73 	 * the axis is used for y tilt information.
74 	 */
75 	YTILT = 5,
76 	/**
77 	 * the axis is used for wheel information.
78 	 */
79 	WHEEL = 6,
80 	/**
81 	 * a constant equal to the numerically highest axis value.
82 	 */
83 	LAST = 7,
84 }
85 alias GdkAxisUse AxisUse;
86 
87 /**
88  * A set of values describing the possible byte-orders
89  * for storing pixel values in memory.
90  */
91 public enum GdkByteOrder
92 {
93 	/**
94 	 * The values are stored with the least-significant byte
95 	 * first. For instance, the 32-bit value 0xffeecc would be stored
96 	 * in memory as 0xcc, 0xee, 0xff, 0x00.
97 	 */
98 	LSB_FIRST = 0,
99 	/**
100 	 * The values are stored with the most-significant byte
101 	 * first. For instance, the 32-bit value 0xffeecc would be stored
102 	 * in memory as 0x00, 0xff, 0xee, 0xcc.
103 	 */
104 	MSB_FIRST = 1,
105 }
106 alias GdkByteOrder ByteOrder;
107 
108 /**
109  * Specifies the crossing mode for #GdkEventCrossing.
110  */
111 public enum GdkCrossingMode
112 {
113 	/**
114 	 * crossing because of pointer motion.
115 	 */
116 	NORMAL = 0,
117 	/**
118 	 * crossing because a grab is activated.
119 	 */
120 	GRAB = 1,
121 	/**
122 	 * crossing because a grab is deactivated.
123 	 */
124 	UNGRAB = 2,
125 	/**
126 	 * crossing because a GTK+ grab is activated.
127 	 */
128 	GTK_GRAB = 3,
129 	/**
130 	 * crossing because a GTK+ grab is deactivated.
131 	 */
132 	GTK_UNGRAB = 4,
133 	/**
134 	 * crossing because a GTK+ widget changed
135 	 * state (e.g. sensitivity).
136 	 */
137 	STATE_CHANGED = 5,
138 	/**
139 	 * crossing because a touch sequence has begun,
140 	 * this event is synthetic as the pointer might have not left the window.
141 	 */
142 	TOUCH_BEGIN = 6,
143 	/**
144 	 * crossing because a touch sequence has ended,
145 	 * this event is synthetic as the pointer might have not left the window.
146 	 */
147 	TOUCH_END = 7,
148 	/**
149 	 * crossing because of a device switch (i.e.
150 	 * a mouse taking control of the pointer after a touch device), this event
151 	 * is synthetic as the pointer didn’t leave the window.
152 	 */
153 	DEVICE_SWITCH = 8,
154 }
155 alias GdkCrossingMode CrossingMode;
156 
157 /**
158  * The standard cursors available.
159  */
160 public enum GdkCursorType
161 {
162 	/**
163 	 * ![](X_cursor.png)
164 	 */
165 	X_CURSOR = 0,
166 	/**
167 	 * ![](arrow.png)
168 	 */
169 	ARROW = 2,
170 	/**
171 	 * ![](based_arrow_down.png)
172 	 */
173 	BASED_ARROW_DOWN = 4,
174 	/**
175 	 * ![](based_arrow_up.png)
176 	 */
177 	BASED_ARROW_UP = 6,
178 	/**
179 	 * ![](boat.png)
180 	 */
181 	BOAT = 8,
182 	/**
183 	 * ![](bogosity.png)
184 	 */
185 	BOGOSITY = 10,
186 	/**
187 	 * ![](bottom_left_corner.png)
188 	 */
189 	BOTTOM_LEFT_CORNER = 12,
190 	/**
191 	 * ![](bottom_right_corner.png)
192 	 */
193 	BOTTOM_RIGHT_CORNER = 14,
194 	/**
195 	 * ![](bottom_side.png)
196 	 */
197 	BOTTOM_SIDE = 16,
198 	/**
199 	 * ![](bottom_tee.png)
200 	 */
201 	BOTTOM_TEE = 18,
202 	/**
203 	 * ![](box_spiral.png)
204 	 */
205 	BOX_SPIRAL = 20,
206 	/**
207 	 * ![](center_ptr.png)
208 	 */
209 	CENTER_PTR = 22,
210 	/**
211 	 * ![](circle.png)
212 	 */
213 	CIRCLE = 24,
214 	/**
215 	 * ![](clock.png)
216 	 */
217 	CLOCK = 26,
218 	/**
219 	 * ![](coffee_mug.png)
220 	 */
221 	COFFEE_MUG = 28,
222 	/**
223 	 * ![](cross.png)
224 	 */
225 	CROSS = 30,
226 	/**
227 	 * ![](cross_reverse.png)
228 	 */
229 	CROSS_REVERSE = 32,
230 	/**
231 	 * ![](crosshair.png)
232 	 */
233 	CROSSHAIR = 34,
234 	/**
235 	 * ![](diamond_cross.png)
236 	 */
237 	DIAMOND_CROSS = 36,
238 	/**
239 	 * ![](dot.png)
240 	 */
241 	DOT = 38,
242 	/**
243 	 * ![](dotbox.png)
244 	 */
245 	DOTBOX = 40,
246 	/**
247 	 * ![](double_arrow.png)
248 	 */
249 	DOUBLE_ARROW = 42,
250 	/**
251 	 * ![](draft_large.png)
252 	 */
253 	DRAFT_LARGE = 44,
254 	/**
255 	 * ![](draft_small.png)
256 	 */
257 	DRAFT_SMALL = 46,
258 	/**
259 	 * ![](draped_box.png)
260 	 */
261 	DRAPED_BOX = 48,
262 	/**
263 	 * ![](exchange.png)
264 	 */
265 	EXCHANGE = 50,
266 	/**
267 	 * ![](fleur.png)
268 	 */
269 	FLEUR = 52,
270 	/**
271 	 * ![](gobbler.png)
272 	 */
273 	GOBBLER = 54,
274 	/**
275 	 * ![](gumby.png)
276 	 */
277 	GUMBY = 56,
278 	/**
279 	 * ![](hand1.png)
280 	 */
281 	HAND1 = 58,
282 	/**
283 	 * ![](hand2.png)
284 	 */
285 	HAND2 = 60,
286 	/**
287 	 * ![](heart.png)
288 	 */
289 	HEART = 62,
290 	/**
291 	 * ![](icon.png)
292 	 */
293 	ICON = 64,
294 	/**
295 	 * ![](iron_cross.png)
296 	 */
297 	IRON_CROSS = 66,
298 	/**
299 	 * ![](left_ptr.png)
300 	 */
301 	LEFT_PTR = 68,
302 	/**
303 	 * ![](left_side.png)
304 	 */
305 	LEFT_SIDE = 70,
306 	/**
307 	 * ![](left_tee.png)
308 	 */
309 	LEFT_TEE = 72,
310 	/**
311 	 * ![](leftbutton.png)
312 	 */
313 	LEFTBUTTON = 74,
314 	/**
315 	 * ![](ll_angle.png)
316 	 */
317 	LL_ANGLE = 76,
318 	/**
319 	 * ![](lr_angle.png)
320 	 */
321 	LR_ANGLE = 78,
322 	/**
323 	 * ![](man.png)
324 	 */
325 	MAN = 80,
326 	/**
327 	 * ![](middlebutton.png)
328 	 */
329 	MIDDLEBUTTON = 82,
330 	/**
331 	 * ![](mouse.png)
332 	 */
333 	MOUSE = 84,
334 	/**
335 	 * ![](pencil.png)
336 	 */
337 	PENCIL = 86,
338 	/**
339 	 * ![](pirate.png)
340 	 */
341 	PIRATE = 88,
342 	/**
343 	 * ![](plus.png)
344 	 */
345 	PLUS = 90,
346 	/**
347 	 * ![](question_arrow.png)
348 	 */
349 	QUESTION_ARROW = 92,
350 	/**
351 	 * ![](right_ptr.png)
352 	 */
353 	RIGHT_PTR = 94,
354 	/**
355 	 * ![](right_side.png)
356 	 */
357 	RIGHT_SIDE = 96,
358 	/**
359 	 * ![](right_tee.png)
360 	 */
361 	RIGHT_TEE = 98,
362 	/**
363 	 * ![](rightbutton.png)
364 	 */
365 	RIGHTBUTTON = 100,
366 	/**
367 	 * ![](rtl_logo.png)
368 	 */
369 	RTL_LOGO = 102,
370 	/**
371 	 * ![](sailboat.png)
372 	 */
373 	SAILBOAT = 104,
374 	/**
375 	 * ![](sb_down_arrow.png)
376 	 */
377 	SB_DOWN_ARROW = 106,
378 	/**
379 	 * ![](sb_h_double_arrow.png)
380 	 */
381 	SB_H_DOUBLE_ARROW = 108,
382 	/**
383 	 * ![](sb_left_arrow.png)
384 	 */
385 	SB_LEFT_ARROW = 110,
386 	/**
387 	 * ![](sb_right_arrow.png)
388 	 */
389 	SB_RIGHT_ARROW = 112,
390 	/**
391 	 * ![](sb_up_arrow.png)
392 	 */
393 	SB_UP_ARROW = 114,
394 	/**
395 	 * ![](sb_v_double_arrow.png)
396 	 */
397 	SB_V_DOUBLE_ARROW = 116,
398 	/**
399 	 * ![](shuttle.png)
400 	 */
401 	SHUTTLE = 118,
402 	/**
403 	 * ![](sizing.png)
404 	 */
405 	SIZING = 120,
406 	/**
407 	 * ![](spider.png)
408 	 */
409 	SPIDER = 122,
410 	/**
411 	 * ![](spraycan.png)
412 	 */
413 	SPRAYCAN = 124,
414 	/**
415 	 * ![](star.png)
416 	 */
417 	STAR = 126,
418 	/**
419 	 * ![](target.png)
420 	 */
421 	TARGET = 128,
422 	/**
423 	 * ![](tcross.png)
424 	 */
425 	TCROSS = 130,
426 	/**
427 	 * ![](top_left_arrow.png)
428 	 */
429 	TOP_LEFT_ARROW = 132,
430 	/**
431 	 * ![](top_left_corner.png)
432 	 */
433 	TOP_LEFT_CORNER = 134,
434 	/**
435 	 * ![](top_right_corner.png)
436 	 */
437 	TOP_RIGHT_CORNER = 136,
438 	/**
439 	 * ![](top_side.png)
440 	 */
441 	TOP_SIDE = 138,
442 	/**
443 	 * ![](top_tee.png)
444 	 */
445 	TOP_TEE = 140,
446 	/**
447 	 * ![](trek.png)
448 	 */
449 	TREK = 142,
450 	/**
451 	 * ![](ul_angle.png)
452 	 */
453 	UL_ANGLE = 144,
454 	/**
455 	 * ![](umbrella.png)
456 	 */
457 	UMBRELLA = 146,
458 	/**
459 	 * ![](ur_angle.png)
460 	 */
461 	UR_ANGLE = 148,
462 	/**
463 	 * ![](watch.png)
464 	 */
465 	WATCH = 150,
466 	/**
467 	 * ![](xterm.png)
468 	 */
469 	XTERM = 152,
470 	/**
471 	 * last cursor type
472 	 */
473 	LAST_CURSOR = 153,
474 	/**
475 	 * Blank cursor. Since 2.16
476 	 */
477 	BLANK_CURSOR = -2,
478 	/**
479 	 * type of cursors constructed with
480 	 * gdk_cursor_new_from_pixbuf()
481 	 */
482 	CURSOR_IS_PIXMAP = -1,
483 }
484 alias GdkCursorType CursorType;
485 
486 /**
487  * Indicates the device type. See [above][GdkDeviceManager.description]
488  * for more information about the meaning of these device types.
489  */
490 public enum GdkDeviceType
491 {
492 	/**
493 	 * Device is a master (or virtual) device. There will
494 	 * be an associated focus indicator on the screen.
495 	 */
496 	MASTER = 0,
497 	/**
498 	 * Device is a slave (or physical) device.
499 	 */
500 	SLAVE = 1,
501 	/**
502 	 * Device is a physical device, currently not attached to
503 	 * any virtual device.
504 	 */
505 	FLOATING = 2,
506 }
507 alias GdkDeviceType DeviceType;
508 
509 /**
510  * Used in #GdkDragContext to indicate what the destination
511  * should do with the dropped data.
512  */
513 public enum GdkDragAction
514 {
515 	/**
516 	 * Means nothing, and should not be used.
517 	 */
518 	DEFAULT = 1,
519 	/**
520 	 * Copy the data.
521 	 */
522 	COPY = 2,
523 	/**
524 	 * Move the data, i.e. first copy it, then delete
525 	 * it from the source using the DELETE target of the X selection protocol.
526 	 */
527 	MOVE = 4,
528 	/**
529 	 * Add a link to the data. Note that this is only
530 	 * useful if source and destination agree on what it means.
531 	 */
532 	LINK = 8,
533 	/**
534 	 * Special action which tells the source that the
535 	 * destination will do something that the source doesn’t understand.
536 	 */
537 	PRIVATE = 16,
538 	/**
539 	 * Ask the user what to do with the data.
540 	 */
541 	ASK = 32,
542 }
543 alias GdkDragAction DragAction;
544 
545 /**
546  * Used in #GdkDragContext to indicate the protocol according to
547  * which DND is done.
548  */
549 public enum GdkDragProtocol
550 {
551 	/**
552 	 * no protocol.
553 	 */
554 	NONE = 0,
555 	/**
556 	 * The Motif DND protocol. No longer supported
557 	 */
558 	MOTIF = 1,
559 	/**
560 	 * The Xdnd protocol.
561 	 */
562 	XDND = 2,
563 	/**
564 	 * An extension to the Xdnd protocol for
565 	 * unclaimed root window drops.
566 	 */
567 	ROOTWIN = 3,
568 	/**
569 	 * The simple WM_DROPFILES protocol.
570 	 */
571 	WIN32_DROPFILES = 4,
572 	/**
573 	 * The complex OLE2 DND protocol (not implemented).
574 	 */
575 	OLE2 = 5,
576 	/**
577 	 * Intra-application DND.
578 	 */
579 	LOCAL = 6,
580 	/**
581 	 * Wayland DND protocol.
582 	 */
583 	WAYLAND = 7,
584 }
585 alias GdkDragProtocol DragProtocol;
586 
587 /**
588  * A set of bit-flags to indicate which events a window is to receive.
589  * Most of these masks map onto one or more of the #GdkEventType event types
590  * above.
591  *
592  * %GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask
593  * to reduce the number of %GDK_MOTION_NOTIFY events received. When using
594  * %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will
595  * be sent, some of which are marked as a hint (the is_hint member is
596  * %TRUE). To receive more motion events after a motion hint event,
597  * the application needs to asks for more, by calling
598  * gdk_event_request_motions().
599  *
600  * Since GTK 3.8, motion events are already compressed by default, independent
601  * of this mechanism. This compression can be disabled with
602  * gdk_window_set_event_compression(). See the documentation of that function
603  * for details.
604  *
605  * If %GDK_TOUCH_MASK is enabled, the window will receive touch events
606  * from touch-enabled devices. Those will come as sequences of #GdkEventTouch
607  * with type %GDK_TOUCH_UPDATE, enclosed by two events with
608  * type %GDK_TOUCH_BEGIN and %GDK_TOUCH_END (or %GDK_TOUCH_CANCEL).
609  * gdk_event_get_event_sequence() returns the event sequence for these
610  * events, so different sequences may be distinguished.
611  */
612 public enum GdkEventMask
613 {
614 	/**
615 	 * receive expose events
616 	 */
617 	EXPOSURE_MASK = 2,
618 	/**
619 	 * receive all pointer motion events
620 	 */
621 	POINTER_MOTION_MASK = 4,
622 	/**
623 	 * deprecated. see the explanation above
624 	 */
625 	POINTER_MOTION_HINT_MASK = 8,
626 	/**
627 	 * receive pointer motion events while any button is pressed
628 	 */
629 	BUTTON_MOTION_MASK = 16,
630 	/**
631 	 * receive pointer motion events while 1 button is pressed
632 	 */
633 	BUTTON1_MOTION_MASK = 32,
634 	/**
635 	 * receive pointer motion events while 2 button is pressed
636 	 */
637 	BUTTON2_MOTION_MASK = 64,
638 	/**
639 	 * receive pointer motion events while 3 button is pressed
640 	 */
641 	BUTTON3_MOTION_MASK = 128,
642 	/**
643 	 * receive button press events
644 	 */
645 	BUTTON_PRESS_MASK = 256,
646 	/**
647 	 * receive button release events
648 	 */
649 	BUTTON_RELEASE_MASK = 512,
650 	/**
651 	 * receive key press events
652 	 */
653 	KEY_PRESS_MASK = 1024,
654 	/**
655 	 * receive key release events
656 	 */
657 	KEY_RELEASE_MASK = 2048,
658 	/**
659 	 * receive window enter events
660 	 */
661 	ENTER_NOTIFY_MASK = 4096,
662 	/**
663 	 * receive window leave events
664 	 */
665 	LEAVE_NOTIFY_MASK = 8192,
666 	/**
667 	 * receive focus change events
668 	 */
669 	FOCUS_CHANGE_MASK = 16384,
670 	/**
671 	 * receive events about window configuration change
672 	 */
673 	STRUCTURE_MASK = 32768,
674 	/**
675 	 * receive property change events
676 	 */
677 	PROPERTY_CHANGE_MASK = 65536,
678 	/**
679 	 * receive visibility change events
680 	 */
681 	VISIBILITY_NOTIFY_MASK = 131072,
682 	/**
683 	 * receive proximity in events
684 	 */
685 	PROXIMITY_IN_MASK = 262144,
686 	/**
687 	 * receive proximity out events
688 	 */
689 	PROXIMITY_OUT_MASK = 524288,
690 	/**
691 	 * receive events about window configuration changes of
692 	 * child windows
693 	 */
694 	SUBSTRUCTURE_MASK = 1048576,
695 	/**
696 	 * receive scroll events
697 	 */
698 	SCROLL_MASK = 2097152,
699 	/**
700 	 * receive touch events. Since 3.4
701 	 */
702 	TOUCH_MASK = 4194304,
703 	/**
704 	 * receive smooth scrolling events. Since 3.4
705 	 */
706 	SMOOTH_SCROLL_MASK = 8388608,
707 	/**
708 	 * the combination of all the above event masks.
709 	 */
710 	ALL_EVENTS_MASK = 16777214,
711 }
712 alias GdkEventMask EventMask;
713 
714 /**
715  * Specifies the type of the event.
716  *
717  * Do not confuse these events with the signals that GTK+ widgets emit.
718  * Although many of these events result in corresponding signals being emitted,
719  * the events are often transformed or filtered along the way.
720  *
721  * In some language bindings, the values %GDK_2BUTTON_PRESS and
722  * %GDK_3BUTTON_PRESS would translate into something syntactically
723  * invalid (eg `Gdk.EventType.2ButtonPress`, where a
724  * symbol is not allowed to start with a number). In that case, the
725  * aliases %GDK_DOUBLE_BUTTON_PRESS and %GDK_TRIPLE_BUTTON_PRESS can
726  * be used instead.
727  */
728 public enum GdkEventType
729 {
730 	/**
731 	 * a special code to indicate a null event.
732 	 */
733 	NOTHING = -1,
734 	/**
735 	 * the window manager has requested that the toplevel window be
736 	 * hidden or destroyed, usually when the user clicks on a special icon in the
737 	 * title bar.
738 	 */
739 	DELETE = 0,
740 	/**
741 	 * the window has been destroyed.
742 	 */
743 	DESTROY = 1,
744 	/**
745 	 * all or part of the window has become visible and needs to be
746 	 * redrawn.
747 	 */
748 	EXPOSE = 2,
749 	/**
750 	 * the pointer (usually a mouse) has moved.
751 	 */
752 	MOTION_NOTIFY = 3,
753 	/**
754 	 * a mouse button has been pressed.
755 	 */
756 	BUTTON_PRESS = 4,
757 	/**
758 	 * alias for %GDK_2BUTTON_PRESS, added in 3.6.
759 	 */
760 	DOUBLE_BUTTON_PRESS = 5,
761 	/**
762 	 * alias for %GDK_3BUTTON_PRESS, added in 3.6.
763 	 */
764 	TRIPLE_BUTTON_PRESS = 6,
765 	/**
766 	 * a mouse button has been released.
767 	 */
768 	BUTTON_RELEASE = 7,
769 	/**
770 	 * a key has been pressed.
771 	 */
772 	KEY_PRESS = 8,
773 	/**
774 	 * a key has been released.
775 	 */
776 	KEY_RELEASE = 9,
777 	/**
778 	 * the pointer has entered the window.
779 	 */
780 	ENTER_NOTIFY = 10,
781 	/**
782 	 * the pointer has left the window.
783 	 */
784 	LEAVE_NOTIFY = 11,
785 	/**
786 	 * the keyboard focus has entered or left the window.
787 	 */
788 	FOCUS_CHANGE = 12,
789 	/**
790 	 * the size, position or stacking order of the window has changed.
791 	 * Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
792 	 */
793 	CONFIGURE = 13,
794 	/**
795 	 * the window has been mapped.
796 	 */
797 	MAP = 14,
798 	/**
799 	 * the window has been unmapped.
800 	 */
801 	UNMAP = 15,
802 	/**
803 	 * a property on the window has been changed or deleted.
804 	 */
805 	PROPERTY_NOTIFY = 16,
806 	/**
807 	 * the application has lost ownership of a selection.
808 	 */
809 	SELECTION_CLEAR = 17,
810 	/**
811 	 * another application has requested a selection.
812 	 */
813 	SELECTION_REQUEST = 18,
814 	/**
815 	 * a selection has been received.
816 	 */
817 	SELECTION_NOTIFY = 19,
818 	/**
819 	 * an input device has moved into contact with a sensing
820 	 * surface (e.g. a touchscreen or graphics tablet).
821 	 */
822 	PROXIMITY_IN = 20,
823 	/**
824 	 * an input device has moved out of contact with a sensing
825 	 * surface.
826 	 */
827 	PROXIMITY_OUT = 21,
828 	/**
829 	 * the mouse has entered the window while a drag is in progress.
830 	 */
831 	DRAG_ENTER = 22,
832 	/**
833 	 * the mouse has left the window while a drag is in progress.
834 	 */
835 	DRAG_LEAVE = 23,
836 	/**
837 	 * the mouse has moved in the window while a drag is in
838 	 * progress.
839 	 */
840 	DRAG_MOTION = 24,
841 	/**
842 	 * the status of the drag operation initiated by the window
843 	 * has changed.
844 	 */
845 	DRAG_STATUS = 25,
846 	/**
847 	 * a drop operation onto the window has started.
848 	 */
849 	DROP_START = 26,
850 	/**
851 	 * the drop operation initiated by the window has completed.
852 	 */
853 	DROP_FINISHED = 27,
854 	/**
855 	 * a message has been received from another application.
856 	 */
857 	CLIENT_EVENT = 28,
858 	/**
859 	 * the window visibility status has changed.
860 	 */
861 	VISIBILITY_NOTIFY = 29,
862 	/**
863 	 * the scroll wheel was turned
864 	 */
865 	SCROLL = 31,
866 	/**
867 	 * the state of a window has changed. See #GdkWindowState
868 	 * for the possible window states
869 	 */
870 	WINDOW_STATE = 32,
871 	/**
872 	 * a setting has been modified.
873 	 */
874 	SETTING = 33,
875 	/**
876 	 * the owner of a selection has changed. This event type
877 	 * was added in 2.6
878 	 */
879 	OWNER_CHANGE = 34,
880 	/**
881 	 * a pointer or keyboard grab was broken. This event type
882 	 * was added in 2.8.
883 	 */
884 	GRAB_BROKEN = 35,
885 	/**
886 	 * the content of the window has been changed. This event type
887 	 * was added in 2.14.
888 	 */
889 	DAMAGE = 36,
890 	/**
891 	 * A new touch event sequence has just started. This event
892 	 * type was added in 3.4.
893 	 */
894 	TOUCH_BEGIN = 37,
895 	/**
896 	 * A touch event sequence has been updated. This event type
897 	 * was added in 3.4.
898 	 */
899 	TOUCH_UPDATE = 38,
900 	/**
901 	 * A touch event sequence has finished. This event type
902 	 * was added in 3.4.
903 	 */
904 	TOUCH_END = 39,
905 	/**
906 	 * A touch event sequence has been canceled. This event type
907 	 * was added in 3.4.
908 	 */
909 	TOUCH_CANCEL = 40,
910 	/**
911 	 * marks the end of the GdkEventType enumeration. Added in 2.18
912 	 */
913 	EVENT_LAST = 41,
914 }
915 alias GdkEventType EventType;
916 
917 /**
918  * Specifies the result of applying a #GdkFilterFunc to a native event.
919  */
920 public enum GdkFilterReturn
921 {
922 	/**
923 	 * event not handled, continue processing.
924 	 */
925 	CONTINUE = 0,
926 	/**
927 	 * native event translated into a GDK event and stored
928 	 * in the `event` structure that was passed in.
929 	 */
930 	TRANSLATE = 1,
931 	/**
932 	 * event handled, terminate processing.
933 	 */
934 	REMOVE = 2,
935 }
936 alias GdkFilterReturn FilterReturn;
937 
938 /**
939  * #GdkFrameClockPhase is used to represent the different paint clock
940  * phases that can be requested. The elements of the enumeration
941  * correspond to the signals of #GdkFrameClock.
942  *
943  * Since: 3.8
944  */
945 public enum GdkFrameClockPhase
946 {
947 	/**
948 	 * no phase
949 	 */
950 	NONE = 0,
951 	/**
952 	 * corresponds to GdkFrameClock::flush-events. Should not be handled by applications.
953 	 */
954 	FLUSH_EVENTS = 1,
955 	/**
956 	 * corresponds to GdkFrameClock::before-paint. Should not be handled by applications.
957 	 */
958 	BEFORE_PAINT = 2,
959 	/**
960 	 * corresponds to GdkFrameClock::update.
961 	 */
962 	UPDATE = 4,
963 	/**
964 	 * corresponds to GdkFrameClock::layout.
965 	 */
966 	LAYOUT = 8,
967 	/**
968 	 * corresponds to GdkFrameClock::paint.
969 	 */
970 	PAINT = 16,
971 	/**
972 	 * corresponds to GdkFrameClock::resume-events. Should not be handled by applications.
973 	 */
974 	RESUME_EVENTS = 32,
975 	/**
976 	 * corresponds to GdkFrameClock::after-paint. Should not be handled by applications.
977 	 */
978 	AFTER_PAINT = 64,
979 }
980 alias GdkFrameClockPhase FrameClockPhase;
981 
982 /**
983  * Indicates which monitor (in a multi-head setup) a window should span over
984  * when in fullscreen mode.
985  *
986  * Since: 3.8
987  */
988 public enum GdkFullscreenMode
989 {
990 	/**
991 	 * Fullscreen on current monitor only.
992 	 */
993 	CURRENT_MONITOR = 0,
994 	/**
995 	 * Span across all monitors when fullscreen.
996 	 */
997 	ALL_MONITORS = 1,
998 }
999 alias GdkFullscreenMode FullscreenMode;
1000 
1001 /**
1002  * Defines how device grabs interact with other devices.
1003  */
1004 public enum GdkGrabOwnership
1005 {
1006 	/**
1007 	 * All other devices’ events are allowed.
1008 	 */
1009 	NONE = 0,
1010 	/**
1011 	 * Other devices’ events are blocked for the grab window.
1012 	 */
1013 	WINDOW = 1,
1014 	/**
1015 	 * Other devices’ events are blocked for the whole application.
1016 	 */
1017 	APPLICATION = 2,
1018 }
1019 alias GdkGrabOwnership GrabOwnership;
1020 
1021 /**
1022  * Returned by gdk_device_grab(), gdk_pointer_grab() and gdk_keyboard_grab() to
1023  * indicate success or the reason for the failure of the grab attempt.
1024  */
1025 public enum GdkGrabStatus
1026 {
1027 	/**
1028 	 * the resource was successfully grabbed.
1029 	 */
1030 	SUCCESS = 0,
1031 	/**
1032 	 * the resource is actively grabbed by another client.
1033 	 */
1034 	ALREADY_GRABBED = 1,
1035 	/**
1036 	 * the resource was grabbed more recently than the
1037 	 * specified time.
1038 	 */
1039 	INVALID_TIME = 2,
1040 	/**
1041 	 * the grab window or the @confine_to window are not
1042 	 * viewable.
1043 	 */
1044 	NOT_VIEWABLE = 3,
1045 	/**
1046 	 * the resource is frozen by an active grab of another client.
1047 	 */
1048 	FROZEN = 4,
1049 }
1050 alias GdkGrabStatus GrabStatus;
1051 
1052 /**
1053  * Defines the reference point of a window and the meaning of coordinates
1054  * passed to gtk_window_move(). See gtk_window_move() and the "implementation
1055  * notes" section of the
1056  * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
1057  * specification for more details.
1058  */
1059 public enum GdkGravity
1060 {
1061 	/**
1062 	 * the reference point is at the top left corner.
1063 	 */
1064 	NORTH_WEST = 1,
1065 	/**
1066 	 * the reference point is in the middle of the top edge.
1067 	 */
1068 	NORTH = 2,
1069 	/**
1070 	 * the reference point is at the top right corner.
1071 	 */
1072 	NORTH_EAST = 3,
1073 	/**
1074 	 * the reference point is at the middle of the left edge.
1075 	 */
1076 	WEST = 4,
1077 	/**
1078 	 * the reference point is at the center of the window.
1079 	 */
1080 	CENTER = 5,
1081 	/**
1082 	 * the reference point is at the middle of the right edge.
1083 	 */
1084 	EAST = 6,
1085 	/**
1086 	 * the reference point is at the lower left corner.
1087 	 */
1088 	SOUTH_WEST = 7,
1089 	/**
1090 	 * the reference point is at the middle of the lower edge.
1091 	 */
1092 	SOUTH = 8,
1093 	/**
1094 	 * the reference point is at the lower right corner.
1095 	 */
1096 	SOUTH_EAST = 9,
1097 	/**
1098 	 * the reference point is at the top left corner of the
1099 	 * window itself, ignoring window manager decorations.
1100 	 */
1101 	STATIC = 10,
1102 }
1103 alias GdkGravity Gravity;
1104 
1105 /**
1106  * An enumeration that describes the mode of an input device.
1107  */
1108 public enum GdkInputMode
1109 {
1110 	/**
1111 	 * the device is disabled and will not report any events.
1112 	 */
1113 	DISABLED = 0,
1114 	/**
1115 	 * the device is enabled. The device’s coordinate space
1116 	 * maps to the entire screen.
1117 	 */
1118 	SCREEN = 1,
1119 	/**
1120 	 * the device is enabled. The device’s coordinate space
1121 	 * is mapped to a single window. The manner in which this window
1122 	 * is chosen is undefined, but it will typically be the same
1123 	 * way in which the focus window for key events is determined.
1124 	 */
1125 	WINDOW = 2,
1126 }
1127 alias GdkInputMode InputMode;
1128 
1129 /**
1130  * An enumeration describing the type of an input device in general terms.
1131  */
1132 public enum GdkInputSource
1133 {
1134 	/**
1135 	 * the device is a mouse. (This will be reported for the core
1136 	 * pointer, even if it is something else, such as a trackball.)
1137 	 */
1138 	MOUSE = 0,
1139 	/**
1140 	 * the device is a stylus of a graphics tablet or similar device.
1141 	 */
1142 	PEN = 1,
1143 	/**
1144 	 * the device is an eraser. Typically, this would be the other end
1145 	 * of a stylus on a graphics tablet.
1146 	 */
1147 	ERASER = 2,
1148 	/**
1149 	 * the device is a graphics tablet “puck” or similar device.
1150 	 */
1151 	CURSOR = 3,
1152 	/**
1153 	 * the device is a keyboard.
1154 	 */
1155 	KEYBOARD = 4,
1156 	/**
1157 	 * the device is a direct-input touch device, such
1158 	 * as a touchscreen or tablet. This device type has been added in 3.4.
1159 	 */
1160 	TOUCHSCREEN = 5,
1161 	/**
1162 	 * the device is an indirect touch device, such
1163 	 * as a touchpad. This device type has been added in 3.4.
1164 	 */
1165 	TOUCHPAD = 6,
1166 }
1167 alias GdkInputSource InputSource;
1168 
1169 /**
1170  * This enum is used with gdk_keymap_get_modifier_mask()
1171  * in order to determine what modifiers the
1172  * currently used windowing system backend uses for particular
1173  * purposes. For example, on X11/Windows, the Control key is used for
1174  * invoking menu shortcuts (accelerators), whereas on Apple computers
1175  * it’s the Command key (which correspond to %GDK_CONTROL_MASK and
1176  * %GDK_MOD2_MASK, respectively).
1177  *
1178  * Since: 3.4
1179  */
1180 public enum GdkModifierIntent
1181 {
1182 	/**
1183 	 * the primary modifier used to invoke
1184 	 * menu accelerators.
1185 	 */
1186 	PRIMARY_ACCELERATOR = 0,
1187 	/**
1188 	 * the modifier used to invoke context menus.
1189 	 * Note that mouse button 3 always triggers context menus. When this modifier
1190 	 * is not 0, it additionally triggers context menus when used with mouse button 1.
1191 	 */
1192 	CONTEXT_MENU = 1,
1193 	/**
1194 	 * the modifier used to extend selections
1195 	 * using `modifier`-click or `modifier`-cursor-key
1196 	 */
1197 	EXTEND_SELECTION = 2,
1198 	/**
1199 	 * the modifier used to modify selections,
1200 	 * which in most cases means toggling the clicked item into or out of the selection.
1201 	 */
1202 	MODIFY_SELECTION = 3,
1203 	/**
1204 	 * when any of these modifiers is pressed, the
1205 	 * key event cannot produce a symbol directly. This is meant to be used for
1206 	 * input methods, and for use cases like typeahead search.
1207 	 */
1208 	NO_TEXT_INPUT = 4,
1209 	/**
1210 	 * the modifier that switches between keyboard
1211 	 * groups (AltGr on X11/Windows and Option/Alt on OS X).
1212 	 */
1213 	SHIFT_GROUP = 5,
1214 }
1215 alias GdkModifierIntent ModifierIntent;
1216 
1217 /**
1218  * A set of bit-flags to indicate the state of modifier keys and mouse buttons
1219  * in various event types. Typical modifier keys are Shift, Control, Meta,
1220  * Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
1221  *
1222  * Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
1223  *
1224  * Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped
1225  * to Mod2 - Mod5, and indicates this by setting %GDK_SUPER_MASK,
1226  * %GDK_HYPER_MASK or %GDK_META_MASK in the state field of key events.
1227  *
1228  * Note that GDK may add internal values to events which include
1229  * reserved values such as %GDK_MODIFIER_RESERVED_13_MASK.  Your code
1230  * should preserve and ignore them.  You can use %GDK_MODIFIER_MASK to
1231  * remove all reserved values.
1232  */
1233 public enum GdkModifierType
1234 {
1235 	/**
1236 	 * the Shift key.
1237 	 */
1238 	SHIFT_MASK = 1,
1239 	/**
1240 	 * a Lock key (depending on the modifier mapping of the
1241 	 * X server this may either be CapsLock or ShiftLock).
1242 	 */
1243 	LOCK_MASK = 2,
1244 	/**
1245 	 * the Control key.
1246 	 */
1247 	CONTROL_MASK = 4,
1248 	/**
1249 	 * the fourth modifier key (it depends on the modifier
1250 	 * mapping of the X server which key is interpreted as this modifier, but
1251 	 * normally it is the Alt key).
1252 	 */
1253 	MOD1_MASK = 8,
1254 	/**
1255 	 * the fifth modifier key (it depends on the modifier
1256 	 * mapping of the X server which key is interpreted as this modifier).
1257 	 */
1258 	MOD2_MASK = 16,
1259 	/**
1260 	 * the sixth modifier key (it depends on the modifier
1261 	 * mapping of the X server which key is interpreted as this modifier).
1262 	 */
1263 	MOD3_MASK = 32,
1264 	/**
1265 	 * the seventh modifier key (it depends on the modifier
1266 	 * mapping of the X server which key is interpreted as this modifier).
1267 	 */
1268 	MOD4_MASK = 64,
1269 	/**
1270 	 * the eighth modifier key (it depends on the modifier
1271 	 * mapping of the X server which key is interpreted as this modifier).
1272 	 */
1273 	MOD5_MASK = 128,
1274 	/**
1275 	 * the first mouse button.
1276 	 */
1277 	BUTTON1_MASK = 256,
1278 	/**
1279 	 * the second mouse button.
1280 	 */
1281 	BUTTON2_MASK = 512,
1282 	/**
1283 	 * the third mouse button.
1284 	 */
1285 	BUTTON3_MASK = 1024,
1286 	/**
1287 	 * the fourth mouse button.
1288 	 */
1289 	BUTTON4_MASK = 2048,
1290 	/**
1291 	 * the fifth mouse button.
1292 	 */
1293 	BUTTON5_MASK = 4096,
1294 	/**
1295 	 * A reserved bit flag; do not use in your own code
1296 	 */
1297 	MODIFIER_RESERVED_13_MASK = 8192,
1298 	/**
1299 	 * A reserved bit flag; do not use in your own code
1300 	 */
1301 	MODIFIER_RESERVED_14_MASK = 16384,
1302 	/**
1303 	 * A reserved bit flag; do not use in your own code
1304 	 */
1305 	MODIFIER_RESERVED_15_MASK = 32768,
1306 	/**
1307 	 * A reserved bit flag; do not use in your own code
1308 	 */
1309 	MODIFIER_RESERVED_16_MASK = 65536,
1310 	/**
1311 	 * A reserved bit flag; do not use in your own code
1312 	 */
1313 	MODIFIER_RESERVED_17_MASK = 131072,
1314 	/**
1315 	 * A reserved bit flag; do not use in your own code
1316 	 */
1317 	MODIFIER_RESERVED_18_MASK = 262144,
1318 	/**
1319 	 * A reserved bit flag; do not use in your own code
1320 	 */
1321 	MODIFIER_RESERVED_19_MASK = 524288,
1322 	/**
1323 	 * A reserved bit flag; do not use in your own code
1324 	 */
1325 	MODIFIER_RESERVED_20_MASK = 1048576,
1326 	/**
1327 	 * A reserved bit flag; do not use in your own code
1328 	 */
1329 	MODIFIER_RESERVED_21_MASK = 2097152,
1330 	/**
1331 	 * A reserved bit flag; do not use in your own code
1332 	 */
1333 	MODIFIER_RESERVED_22_MASK = 4194304,
1334 	/**
1335 	 * A reserved bit flag; do not use in your own code
1336 	 */
1337 	MODIFIER_RESERVED_23_MASK = 8388608,
1338 	/**
1339 	 * A reserved bit flag; do not use in your own code
1340 	 */
1341 	MODIFIER_RESERVED_24_MASK = 16777216,
1342 	/**
1343 	 * A reserved bit flag; do not use in your own code
1344 	 */
1345 	MODIFIER_RESERVED_25_MASK = 33554432,
1346 	/**
1347 	 * the Super modifier. Since 2.10
1348 	 */
1349 	SUPER_MASK = 67108864,
1350 	/**
1351 	 * the Hyper modifier. Since 2.10
1352 	 */
1353 	HYPER_MASK = 134217728,
1354 	/**
1355 	 * the Meta modifier. Since 2.10
1356 	 */
1357 	META_MASK = 268435456,
1358 	/**
1359 	 * A reserved bit flag; do not use in your own code
1360 	 */
1361 	MODIFIER_RESERVED_29_MASK = 536870912,
1362 	/**
1363 	 * not used in GDK itself. GTK+ uses it to differentiate
1364 	 * between (keyval, modifiers) pairs from key press and release events.
1365 	 */
1366 	RELEASE_MASK = 1073741824,
1367 	/**
1368 	 * a mask covering all modifier types.
1369 	 */
1370 	MODIFIER_MASK = 1543512063,
1371 }
1372 alias GdkModifierType ModifierType;
1373 
1374 /**
1375  * Specifies the kind of crossing for #GdkEventCrossing.
1376  *
1377  * See the X11 protocol specification of LeaveNotify for
1378  * full details of crossing event generation.
1379  */
1380 public enum GdkNotifyType
1381 {
1382 	/**
1383 	 * the window is entered from an ancestor or
1384 	 * left towards an ancestor.
1385 	 */
1386 	ANCESTOR = 0,
1387 	/**
1388 	 * the pointer moves between an ancestor and an
1389 	 * inferior of the window.
1390 	 */
1391 	VIRTUAL = 1,
1392 	/**
1393 	 * the window is entered from an inferior or
1394 	 * left towards an inferior.
1395 	 */
1396 	INFERIOR = 2,
1397 	/**
1398 	 * the window is entered from or left towards
1399 	 * a window which is neither an ancestor nor an inferior.
1400 	 */
1401 	NONLINEAR = 3,
1402 	/**
1403 	 * the pointer moves between two windows
1404 	 * which are not ancestors of each other and the window is part of
1405 	 * the ancestor chain between one of these windows and their least
1406 	 * common ancestor.
1407 	 */
1408 	NONLINEAR_VIRTUAL = 4,
1409 	/**
1410 	 * an unknown type of enter/leave event occurred.
1411 	 */
1412 	UNKNOWN = 5,
1413 }
1414 alias GdkNotifyType NotifyType;
1415 
1416 /**
1417  * Specifies why a selection ownership was changed.
1418  */
1419 public enum GdkOwnerChange
1420 {
1421 	/**
1422 	 * some other app claimed the ownership
1423 	 */
1424 	NEW_OWNER = 0,
1425 	/**
1426 	 * the window was destroyed
1427 	 */
1428 	DESTROY = 1,
1429 	/**
1430 	 * the client was closed
1431 	 */
1432 	CLOSE = 2,
1433 }
1434 alias GdkOwnerChange OwnerChange;
1435 
1436 /**
1437  * Describes how existing data is combined with new data when
1438  * using gdk_property_change().
1439  */
1440 public enum GdkPropMode
1441 {
1442 	/**
1443 	 * the new data replaces the existing data.
1444 	 */
1445 	REPLACE = 0,
1446 	/**
1447 	 * the new data is prepended to the existing data.
1448 	 */
1449 	PREPEND = 1,
1450 	/**
1451 	 * the new data is appended to the existing data.
1452 	 */
1453 	APPEND = 2,
1454 }
1455 alias GdkPropMode PropMode;
1456 
1457 /**
1458  * Specifies the type of a property change for a #GdkEventProperty.
1459  */
1460 public enum GdkPropertyState
1461 {
1462 	/**
1463 	 * the property value was changed.
1464 	 */
1465 	NEW_VALUE = 0,
1466 	/**
1467 	 * the property was deleted.
1468 	 */
1469 	DELETE = 1,
1470 }
1471 alias GdkPropertyState PropertyState;
1472 
1473 /**
1474  * Specifies the direction for #GdkEventScroll.
1475  */
1476 public enum GdkScrollDirection
1477 {
1478 	/**
1479 	 * the window is scrolled up.
1480 	 */
1481 	UP = 0,
1482 	/**
1483 	 * the window is scrolled down.
1484 	 */
1485 	DOWN = 1,
1486 	/**
1487 	 * the window is scrolled to the left.
1488 	 */
1489 	LEFT = 2,
1490 	/**
1491 	 * the window is scrolled to the right.
1492 	 */
1493 	RIGHT = 3,
1494 	/**
1495 	 * the scrolling is determined by the delta values
1496 	 * in #GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4
1497 	 */
1498 	SMOOTH = 4,
1499 }
1500 alias GdkScrollDirection ScrollDirection;
1501 
1502 /**
1503  * Specifies the kind of modification applied to a setting in a
1504  * #GdkEventSetting.
1505  */
1506 public enum GdkSettingAction
1507 {
1508 	/**
1509 	 * a setting was added.
1510 	 */
1511 	NEW = 0,
1512 	/**
1513 	 * a setting was changed.
1514 	 */
1515 	CHANGED = 1,
1516 	/**
1517 	 * a setting was deleted.
1518 	 */
1519 	DELETED = 2,
1520 }
1521 alias GdkSettingAction SettingAction;
1522 
1523 public enum GdkStatus
1524 {
1525 	OK = 0,
1526 	ERROR = -1,
1527 	ERROR_PARAM = -2,
1528 	ERROR_FILE = -3,
1529 	ERROR_MEM = -4,
1530 }
1531 alias GdkStatus Status;
1532 
1533 /**
1534  * Specifies the visiblity status of a window for a #GdkEventVisibility.
1535  */
1536 public enum GdkVisibilityState
1537 {
1538 	/**
1539 	 * the window is completely visible.
1540 	 */
1541 	UNOBSCURED = 0,
1542 	/**
1543 	 * the window is partially visible.
1544 	 */
1545 	PARTIAL = 1,
1546 	/**
1547 	 * the window is not visible at all.
1548 	 */
1549 	FULLY_OBSCURED = 2,
1550 }
1551 alias GdkVisibilityState VisibilityState;
1552 
1553 /**
1554  * A set of values that describe the manner in which the pixel values
1555  * for a visual are converted into RGB values for display.
1556  */
1557 public enum GdkVisualType
1558 {
1559 	/**
1560 	 * Each pixel value indexes a grayscale value
1561 	 * directly.
1562 	 */
1563 	STATIC_GRAY = 0,
1564 	/**
1565 	 * Each pixel is an index into a color map that
1566 	 * maps pixel values into grayscale values. The color map can be
1567 	 * changed by an application.
1568 	 */
1569 	GRAYSCALE = 1,
1570 	/**
1571 	 * Each pixel value is an index into a predefined,
1572 	 * unmodifiable color map that maps pixel values into RGB values.
1573 	 */
1574 	STATIC_COLOR = 2,
1575 	/**
1576 	 * Each pixel is an index into a color map that
1577 	 * maps pixel values into rgb values. The color map can be changed by
1578 	 * an application.
1579 	 */
1580 	PSEUDO_COLOR = 3,
1581 	/**
1582 	 * Each pixel value directly contains red, green,
1583 	 * and blue components. Use gdk_visual_get_red_pixel_details(), etc,
1584 	 * to obtain information about how the components are assembled into
1585 	 * a pixel value.
1586 	 */
1587 	TRUE_COLOR = 4,
1588 	/**
1589 	 * Each pixel value contains red, green, and blue
1590 	 * components as for %GDK_VISUAL_TRUE_COLOR, but the components are
1591 	 * mapped via a color table into the final output table instead of
1592 	 * being converted directly.
1593 	 */
1594 	DIRECT_COLOR = 5,
1595 }
1596 alias GdkVisualType VisualType;
1597 
1598 /**
1599  * These are hints originally defined by the Motif toolkit.
1600  * The window manager can use them when determining how to decorate
1601  * the window. The hint must be set before mapping the window.
1602  */
1603 public enum GdkWMDecoration
1604 {
1605 	/**
1606 	 * all decorations should be applied.
1607 	 */
1608 	ALL = 1,
1609 	/**
1610 	 * a frame should be drawn around the window.
1611 	 */
1612 	BORDER = 2,
1613 	/**
1614 	 * the frame should have resize handles.
1615 	 */
1616 	RESIZEH = 4,
1617 	/**
1618 	 * a titlebar should be placed above the window.
1619 	 */
1620 	TITLE = 8,
1621 	/**
1622 	 * a button for opening a menu should be included.
1623 	 */
1624 	MENU = 16,
1625 	/**
1626 	 * a minimize button should be included.
1627 	 */
1628 	MINIMIZE = 32,
1629 	/**
1630 	 * a maximize button should be included.
1631 	 */
1632 	MAXIMIZE = 64,
1633 }
1634 alias GdkWMDecoration WMDecoration;
1635 
1636 /**
1637  * These are hints originally defined by the Motif toolkit. The window manager
1638  * can use them when determining the functions to offer for the window. The
1639  * hint must be set before mapping the window.
1640  */
1641 public enum GdkWMFunction
1642 {
1643 	/**
1644 	 * all functions should be offered.
1645 	 */
1646 	ALL = 1,
1647 	/**
1648 	 * the window should be resizable.
1649 	 */
1650 	RESIZE = 2,
1651 	/**
1652 	 * the window should be movable.
1653 	 */
1654 	MOVE = 4,
1655 	/**
1656 	 * the window should be minimizable.
1657 	 */
1658 	MINIMIZE = 8,
1659 	/**
1660 	 * the window should be maximizable.
1661 	 */
1662 	MAXIMIZE = 16,
1663 	/**
1664 	 * the window should be closable.
1665 	 */
1666 	CLOSE = 32,
1667 }
1668 alias GdkWMFunction WMFunction;
1669 
1670 /**
1671  * Used to indicate which fields in the #GdkWindowAttr struct should be honored.
1672  * For example, if you filled in the “cursor” and “x” fields of #GdkWindowAttr,
1673  * pass “@GDK_WA_X | @GDK_WA_CURSOR” to gdk_window_new(). Fields in
1674  * #GdkWindowAttr not covered by a bit in this enum are required; for example,
1675  * the @width/@height, @wclass, and @window_type fields are required, they have
1676  * no corresponding flag in #GdkWindowAttributesType.
1677  */
1678 public enum GdkWindowAttributesType
1679 {
1680 	/**
1681 	 * Honor the title field
1682 	 */
1683 	TITLE = 2,
1684 	/**
1685 	 * Honor the X coordinate field
1686 	 */
1687 	X = 4,
1688 	/**
1689 	 * Honor the Y coordinate field
1690 	 */
1691 	Y = 8,
1692 	/**
1693 	 * Honor the cursor field
1694 	 */
1695 	CURSOR = 16,
1696 	/**
1697 	 * Honor the visual field
1698 	 */
1699 	VISUAL = 32,
1700 	/**
1701 	 * Honor the wmclass_class and wmclass_name fields
1702 	 */
1703 	WMCLASS = 64,
1704 	/**
1705 	 * Honor the override_redirect field
1706 	 */
1707 	NOREDIR = 128,
1708 	/**
1709 	 * Honor the type_hint field
1710 	 */
1711 	TYPE_HINT = 256,
1712 }
1713 alias GdkWindowAttributesType WindowAttributesType;
1714 
1715 /**
1716  * Determines a window edge or corner.
1717  */
1718 public enum GdkWindowEdge
1719 {
1720 	/**
1721 	 * the top left corner.
1722 	 */
1723 	NORTH_WEST = 0,
1724 	/**
1725 	 * the top edge.
1726 	 */
1727 	NORTH = 1,
1728 	/**
1729 	 * the top right corner.
1730 	 */
1731 	NORTH_EAST = 2,
1732 	/**
1733 	 * the left edge.
1734 	 */
1735 	WEST = 3,
1736 	/**
1737 	 * the right edge.
1738 	 */
1739 	EAST = 4,
1740 	/**
1741 	 * the lower left corner.
1742 	 */
1743 	SOUTH_WEST = 5,
1744 	/**
1745 	 * the lower edge.
1746 	 */
1747 	SOUTH = 6,
1748 	/**
1749 	 * the lower right corner.
1750 	 */
1751 	SOUTH_EAST = 7,
1752 }
1753 alias GdkWindowEdge WindowEdge;
1754 
1755 /**
1756  * Used to indicate which fields of a #GdkGeometry struct should be paid
1757  * attention to. Also, the presence/absence of @GDK_HINT_POS,
1758  * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't
1759  * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set
1760  * automatically by #GtkWindow if you call gtk_window_move().
1761  * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user
1762  * specified a size/position using a --geometry command-line argument;
1763  * gtk_window_parse_geometry() automatically sets these flags.
1764  */
1765 public enum GdkWindowHints
1766 {
1767 	/**
1768 	 * indicates that the program has positioned the window
1769 	 */
1770 	POS = 1,
1771 	/**
1772 	 * min size fields are set
1773 	 */
1774 	MIN_SIZE = 2,
1775 	/**
1776 	 * max size fields are set
1777 	 */
1778 	MAX_SIZE = 4,
1779 	/**
1780 	 * base size fields are set
1781 	 */
1782 	BASE_SIZE = 8,
1783 	/**
1784 	 * aspect ratio fields are set
1785 	 */
1786 	ASPECT = 16,
1787 	/**
1788 	 * resize increment fields are set
1789 	 */
1790 	RESIZE_INC = 32,
1791 	/**
1792 	 * window gravity field is set
1793 	 */
1794 	WIN_GRAVITY = 64,
1795 	/**
1796 	 * indicates that the window’s position was explicitly set
1797 	 * by the user
1798 	 */
1799 	USER_POS = 128,
1800 	/**
1801 	 * indicates that the window’s size was explicitly set by
1802 	 * the user
1803 	 */
1804 	USER_SIZE = 256,
1805 }
1806 alias GdkWindowHints WindowHints;
1807 
1808 /**
1809  * Specifies the state of a toplevel window.
1810  */
1811 public enum GdkWindowState
1812 {
1813 	/**
1814 	 * the window is not shown.
1815 	 */
1816 	WITHDRAWN = 1,
1817 	/**
1818 	 * the window is minimized.
1819 	 */
1820 	ICONIFIED = 2,
1821 	/**
1822 	 * the window is maximized.
1823 	 */
1824 	MAXIMIZED = 4,
1825 	/**
1826 	 * the window is sticky.
1827 	 */
1828 	STICKY = 8,
1829 	/**
1830 	 * the window is maximized without
1831 	 * decorations.
1832 	 */
1833 	FULLSCREEN = 16,
1834 	/**
1835 	 * the window is kept above other windows.
1836 	 */
1837 	ABOVE = 32,
1838 	/**
1839 	 * the window is kept below other windows.
1840 	 */
1841 	BELOW = 64,
1842 	/**
1843 	 * the window is presented as focused (with active decorations).
1844 	 */
1845 	FOCUSED = 128,
1846 	/**
1847 	 * the window is in a tiled state, Since 3.10
1848 	 */
1849 	TILED = 256,
1850 }
1851 alias GdkWindowState WindowState;
1852 
1853 /**
1854  * Describes the kind of window.
1855  */
1856 public enum GdkWindowType
1857 {
1858 	/**
1859 	 * root window; this window has no parent, covers the entire
1860 	 * screen, and is created by the window system
1861 	 */
1862 	ROOT = 0,
1863 	/**
1864 	 * toplevel window (used to implement #GtkWindow)
1865 	 */
1866 	TOPLEVEL = 1,
1867 	/**
1868 	 * child window (used to implement e.g. #GtkEntry)
1869 	 */
1870 	CHILD = 2,
1871 	/**
1872 	 * override redirect temporary window (used to implement
1873 	 * #GtkMenu)
1874 	 */
1875 	TEMP = 3,
1876 	/**
1877 	 * foreign window (see gdk_window_foreign_new())
1878 	 */
1879 	FOREIGN = 4,
1880 	/**
1881 	 * offscreen window (see
1882 	 * [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18
1883 	 */
1884 	OFFSCREEN = 5,
1885 	/**
1886 	 * subsurface-based window; This window is visually
1887 	 * tied to a toplevel, and is moved/stacked with it. Currently this window
1888 	 * type is only implemented in Wayland. Since 3.14
1889 	 */
1890 	SUBSURFACE = 6,
1891 }
1892 alias GdkWindowType WindowType;
1893 
1894 /**
1895  * These are hints for the window manager that indicate what type of function
1896  * the window has. The window manager can use this when determining decoration
1897  * and behaviour of the window. The hint must be set before mapping the window.
1898  *
1899  * See the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
1900  * specification for more details about window types.
1901  */
1902 public enum GdkWindowTypeHint
1903 {
1904 	/**
1905 	 * Normal toplevel window.
1906 	 */
1907 	NORMAL = 0,
1908 	/**
1909 	 * Dialog window.
1910 	 */
1911 	DIALOG = 1,
1912 	/**
1913 	 * Window used to implement a menu; GTK+ uses
1914 	 * this hint only for torn-off menus, see #GtkTearoffMenuItem.
1915 	 */
1916 	MENU = 2,
1917 	/**
1918 	 * Window used to implement toolbars.
1919 	 */
1920 	TOOLBAR = 3,
1921 	/**
1922 	 * Window used to display a splash
1923 	 * screen during application startup.
1924 	 */
1925 	SPLASHSCREEN = 4,
1926 	/**
1927 	 * Utility windows which are not detached
1928 	 * toolbars or dialogs.
1929 	 */
1930 	UTILITY = 5,
1931 	/**
1932 	 * Used for creating dock or panel windows.
1933 	 */
1934 	DOCK = 6,
1935 	/**
1936 	 * Used for creating the desktop background
1937 	 * window.
1938 	 */
1939 	DESKTOP = 7,
1940 	/**
1941 	 * A menu that belongs to a menubar.
1942 	 */
1943 	DROPDOWN_MENU = 8,
1944 	/**
1945 	 * A menu that does not belong to a menubar,
1946 	 * e.g. a context menu.
1947 	 */
1948 	POPUP_MENU = 9,
1949 	/**
1950 	 * A tooltip.
1951 	 */
1952 	TOOLTIP = 10,
1953 	/**
1954 	 * A notification - typically a “bubble”
1955 	 * that belongs to a status icon.
1956 	 */
1957 	NOTIFICATION = 11,
1958 	/**
1959 	 * A popup from a combo box.
1960 	 */
1961 	COMBO = 12,
1962 	/**
1963 	 * A window that is used to implement a DND cursor.
1964 	 */
1965 	DND = 13,
1966 }
1967 alias GdkWindowTypeHint WindowTypeHint;
1968 
1969 /**
1970  * @GDK_INPUT_OUTPUT windows are the standard kind of window you might expect.
1971  * Such windows receive events and are also displayed on screen.
1972  * @GDK_INPUT_ONLY windows are invisible; they are usually placed above other
1973  * windows in order to trap or filter the events. You can’t draw on
1974  * @GDK_INPUT_ONLY windows.
1975  */
1976 public enum GdkWindowWindowClass
1977 {
1978 	/**
1979 	 * window for graphics and events
1980 	 */
1981 	INPUT_OUTPUT = 0,
1982 	/**
1983 	 * window for events only
1984 	 */
1985 	INPUT_ONLY = 1,
1986 }
1987 alias GdkWindowWindowClass WindowWindowClass;
1988 
1989 /**
1990  * An opaque type representing a string as an index into a table
1991  * of strings on the X server.
1992  */
1993 alias _GdkAtom* GdkAtom;
1994 public struct _GdkAtom;
1995 
1996 struct GdkAppLaunchContext;
1997 
1998 struct GdkColor
1999 {
2000 	/**
2001 	 * For allocated colors, the pixel value used to
2002 	 * draw this color on the screen. Not used anymore.
2003 	 */
2004 	uint pixel;
2005 	/**
2006 	 * The red component of the color. This is
2007 	 * a value between 0 and 65535, with 65535 indicating
2008 	 * full intensity
2009 	 */
2010 	ushort red;
2011 	/**
2012 	 * The green component of the color
2013 	 */
2014 	ushort green;
2015 	/**
2016 	 * The blue component of the color
2017 	 */
2018 	ushort blue;
2019 }
2020 
2021 struct GdkCursor;
2022 
2023 struct GdkDevice;
2024 
2025 struct GdkDeviceManager;
2026 
2027 struct GdkDisplay;
2028 
2029 struct GdkDisplayManager;
2030 
2031 struct GdkDragContext;
2032 
2033 struct GdkEvent
2034 {
2035 	union
2036 	{
2037 		/**
2038 		 * the #GdkEventType
2039 		 */
2040 		GdkEventType type;
2041 		/**
2042 		 * a #GdkEventAny
2043 		 */
2044 		GdkEventAny any;
2045 		/**
2046 		 * a #GdkEventExpose
2047 		 */
2048 		GdkEventExpose expose;
2049 		/**
2050 		 * a #GdkEventVisibility
2051 		 */
2052 		GdkEventVisibility visibility;
2053 		/**
2054 		 * a #GdkEventMotion
2055 		 */
2056 		GdkEventMotion motion;
2057 		/**
2058 		 * a #GdkEventButton
2059 		 */
2060 		GdkEventButton button;
2061 		/**
2062 		 * a #GdkEventTouch
2063 		 */
2064 		GdkEventTouch touch;
2065 		/**
2066 		 * a #GdkEventScroll
2067 		 */
2068 		GdkEventScroll scroll;
2069 		/**
2070 		 * a #GdkEventKey
2071 		 */
2072 		GdkEventKey key;
2073 		/**
2074 		 * a #GdkEventCrossing
2075 		 */
2076 		GdkEventCrossing crossing;
2077 		/**
2078 		 * a #GdkEventFocus
2079 		 */
2080 		GdkEventFocus focusChange;
2081 		/**
2082 		 * a #GdkEventConfigure
2083 		 */
2084 		GdkEventConfigure configure;
2085 		/**
2086 		 * a #GdkEventProperty
2087 		 */
2088 		GdkEventProperty property;
2089 		/**
2090 		 * a #GdkEventSelection
2091 		 */
2092 		GdkEventSelection selection;
2093 		/**
2094 		 * a #GdkEventOwnerChange
2095 		 */
2096 		GdkEventOwnerChange ownerChange;
2097 		/**
2098 		 * a #GdkEventProximity
2099 		 */
2100 		GdkEventProximity proximity;
2101 		/**
2102 		 * a #GdkEventDND
2103 		 */
2104 		GdkEventDND dnd;
2105 		/**
2106 		 * a #GdkEventWindowState
2107 		 */
2108 		GdkEventWindowState windowState;
2109 		/**
2110 		 * a #GdkEventSetting
2111 		 */
2112 		GdkEventSetting setting;
2113 		/**
2114 		 * a #GdkEventGrabBroken
2115 		 */
2116 		GdkEventGrabBroken grabBroken;
2117 	}
2118 }
2119 
2120 /**
2121  * Contains the fields which are common to all event structs.
2122  * Any event pointer can safely be cast to a pointer to a #GdkEventAny to
2123  * access these fields.
2124  */
2125 struct GdkEventAny
2126 {
2127 	/**
2128 	 * the type of the event.
2129 	 */
2130 	GdkEventType type;
2131 	/**
2132 	 * the window which received the event.
2133 	 */
2134 	GdkWindow* window;
2135 	/**
2136 	 * %TRUE if the event was sent explicitly.
2137 	 */
2138 	byte sendEvent;
2139 }
2140 
2141 /**
2142  * Used for button press and button release events. The
2143  * @type field will be one of %GDK_BUTTON_PRESS,
2144  * %GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE,
2145  *
2146  * Double and triple-clicks result in a sequence of events being received.
2147  * For double-clicks the order of events will be:
2148  *
2149  * - %GDK_BUTTON_PRESS
2150  * - %GDK_BUTTON_RELEASE
2151  * - %GDK_BUTTON_PRESS
2152  * - %GDK_2BUTTON_PRESS
2153  * - %GDK_BUTTON_RELEASE
2154  *
2155  * Note that the first click is received just like a normal
2156  * button press, while the second click results in a %GDK_2BUTTON_PRESS
2157  * being received just after the %GDK_BUTTON_PRESS.
2158  *
2159  * Triple-clicks are very similar to double-clicks, except that
2160  * %GDK_3BUTTON_PRESS is inserted after the third click. The order of the
2161  * events is:
2162  *
2163  * - %GDK_BUTTON_PRESS
2164  * - %GDK_BUTTON_RELEASE
2165  * - %GDK_BUTTON_PRESS
2166  * - %GDK_2BUTTON_PRESS
2167  * - %GDK_BUTTON_RELEASE
2168  * - %GDK_BUTTON_PRESS
2169  * - %GDK_3BUTTON_PRESS
2170  * - %GDK_BUTTON_RELEASE
2171  *
2172  * For a double click to occur, the second button press must occur within
2173  * 1/4 of a second of the first. For a triple click to occur, the third
2174  * button press must also occur within 1/2 second of the first button press.
2175  */
2176 struct GdkEventButton
2177 {
2178 	/**
2179 	 * the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS,
2180 	 * %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE).
2181 	 */
2182 	GdkEventType type;
2183 	/**
2184 	 * the window which received the event.
2185 	 */
2186 	GdkWindow* window;
2187 	/**
2188 	 * %TRUE if the event was sent explicitly.
2189 	 */
2190 	byte sendEvent;
2191 	/**
2192 	 * the time of the event in milliseconds.
2193 	 */
2194 	uint time;
2195 	/**
2196 	 * the x coordinate of the pointer relative to the window.
2197 	 */
2198 	double x;
2199 	/**
2200 	 * the y coordinate of the pointer relative to the window.
2201 	 */
2202 	double y;
2203 	/**
2204 	 * @x, @y translated to the axes of @device, or %NULL if @device is
2205 	 * the mouse.
2206 	 */
2207 	double* axes;
2208 	/**
2209 	 * a bit-mask representing the state of
2210 	 * the modifier keys (e.g. Control, Shift and Alt) and the pointer
2211 	 * buttons. See #GdkModifierType.
2212 	 */
2213 	ModifierType state;
2214 	/**
2215 	 * the button which was pressed or released, numbered from 1 to 5.
2216 	 * Normally button 1 is the left mouse button, 2 is the middle button,
2217 	 * and 3 is the right button. On 2-button mice, the middle button can
2218 	 * often be simulated by pressing both mouse buttons together.
2219 	 */
2220 	uint button;
2221 	/**
2222 	 * the master device that the event originated from. Use
2223 	 * gdk_event_get_source_device() to get the slave device.
2224 	 */
2225 	GdkDevice* device;
2226 	/**
2227 	 * the x coordinate of the pointer relative to the root of the
2228 	 * screen.
2229 	 */
2230 	double xRoot;
2231 	/**
2232 	 * the y coordinate of the pointer relative to the root of the
2233 	 * screen.
2234 	 */
2235 	double yRoot;
2236 }
2237 
2238 /**
2239  * Generated when a window size or position has changed.
2240  */
2241 struct GdkEventConfigure
2242 {
2243 	/**
2244 	 * the type of the event (%GDK_CONFIGURE).
2245 	 */
2246 	GdkEventType type;
2247 	/**
2248 	 * the window which received the event.
2249 	 */
2250 	GdkWindow* window;
2251 	/**
2252 	 * %TRUE if the event was sent explicitly.
2253 	 */
2254 	byte sendEvent;
2255 	/**
2256 	 * the new x coordinate of the window, relative to its parent.
2257 	 */
2258 	int x;
2259 	/**
2260 	 * the new y coordinate of the window, relative to its parent.
2261 	 */
2262 	int y;
2263 	/**
2264 	 * the new width of the window.
2265 	 */
2266 	int width;
2267 	/**
2268 	 * the new height of the window.
2269 	 */
2270 	int height;
2271 }
2272 
2273 /**
2274  * Generated when the pointer enters or leaves a window.
2275  */
2276 struct GdkEventCrossing
2277 {
2278 	/**
2279 	 * the type of the event (%GDK_ENTER_NOTIFY or %GDK_LEAVE_NOTIFY).
2280 	 */
2281 	GdkEventType type;
2282 	/**
2283 	 * the window which received the event.
2284 	 */
2285 	GdkWindow* window;
2286 	/**
2287 	 * %TRUE if the event was sent explicitly.
2288 	 */
2289 	byte sendEvent;
2290 	/**
2291 	 * the window that was entered or left.
2292 	 */
2293 	GdkWindow* subwindow;
2294 	/**
2295 	 * the time of the event in milliseconds.
2296 	 */
2297 	uint time;
2298 	/**
2299 	 * the x coordinate of the pointer relative to the window.
2300 	 */
2301 	double x;
2302 	/**
2303 	 * the y coordinate of the pointer relative to the window.
2304 	 */
2305 	double y;
2306 	/**
2307 	 * the x coordinate of the pointer relative to the root of the screen.
2308 	 */
2309 	double xRoot;
2310 	/**
2311 	 * the y coordinate of the pointer relative to the root of the screen.
2312 	 */
2313 	double yRoot;
2314 	/**
2315 	 * the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB,
2316 	 * %GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or
2317 	 * %GDK_CROSSING_STATE_CHANGED).  %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB,
2318 	 * and %GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized,
2319 	 * never native.
2320 	 */
2321 	GdkCrossingMode mode;
2322 	/**
2323 	 * the kind of crossing that happened (%GDK_NOTIFY_INFERIOR,
2324 	 * %GDK_NOTIFY_ANCESTOR, %GDK_NOTIFY_VIRTUAL, %GDK_NOTIFY_NONLINEAR or
2325 	 * %GDK_NOTIFY_NONLINEAR_VIRTUAL).
2326 	 */
2327 	GdkNotifyType detail;
2328 	/**
2329 	 * %TRUE if @window is the focus window or an inferior.
2330 	 */
2331 	bool focus;
2332 	/**
2333 	 * a bit-mask representing the state of
2334 	 * the modifier keys (e.g. Control, Shift and Alt) and the pointer
2335 	 * buttons. See #GdkModifierType.
2336 	 */
2337 	ModifierType state;
2338 }
2339 
2340 /**
2341  * Generated during DND operations.
2342  */
2343 struct GdkEventDND
2344 {
2345 	/**
2346 	 * the type of the event (%GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,
2347 	 * %GDK_DRAG_MOTION, %GDK_DRAG_STATUS, %GDK_DROP_START or
2348 	 * %GDK_DROP_FINISHED).
2349 	 */
2350 	GdkEventType type;
2351 	/**
2352 	 * the window which received the event.
2353 	 */
2354 	GdkWindow* window;
2355 	/**
2356 	 * %TRUE if the event was sent explicitly.
2357 	 */
2358 	byte sendEvent;
2359 	/**
2360 	 * the #GdkDragContext for the current DND operation.
2361 	 */
2362 	GdkDragContext* context;
2363 	/**
2364 	 * the time of the event in milliseconds.
2365 	 */
2366 	uint time;
2367 	/**
2368 	 * the x coordinate of the pointer relative to the root of the
2369 	 * screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
2370 	 */
2371 	short xRoot;
2372 	/**
2373 	 * the y coordinate of the pointer relative to the root of the
2374 	 * screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
2375 	 */
2376 	short yRoot;
2377 }
2378 
2379 /**
2380  * Generated when all or part of a window becomes visible and needs to be
2381  * redrawn.
2382  */
2383 struct GdkEventExpose
2384 {
2385 	/**
2386 	 * the type of the event (%GDK_EXPOSE or %GDK_DAMAGE).
2387 	 */
2388 	GdkEventType type;
2389 	/**
2390 	 * the window which received the event.
2391 	 */
2392 	GdkWindow* window;
2393 	/**
2394 	 * %TRUE if the event was sent explicitly.
2395 	 */
2396 	byte sendEvent;
2397 	/**
2398 	 * bounding box of @region.
2399 	 */
2400 	GdkRectangle area;
2401 	/**
2402 	 * the region that needs to be redrawn.
2403 	 */
2404 	cairo_region_t* region;
2405 	/**
2406 	 * the number of contiguous %GDK_EXPOSE events following this one.
2407 	 * The only use for this is “exposure compression”, i.e. handling all
2408 	 * contiguous %GDK_EXPOSE events in one go, though GDK performs some
2409 	 * exposure compression so this is not normally needed.
2410 	 */
2411 	int count;
2412 }
2413 
2414 /**
2415  * Describes a change of keyboard focus.
2416  */
2417 struct GdkEventFocus
2418 {
2419 	/**
2420 	 * the type of the event (%GDK_FOCUS_CHANGE).
2421 	 */
2422 	GdkEventType type;
2423 	/**
2424 	 * the window which received the event.
2425 	 */
2426 	GdkWindow* window;
2427 	/**
2428 	 * %TRUE if the event was sent explicitly.
2429 	 */
2430 	byte sendEvent;
2431 	/**
2432 	 * %TRUE if the window has gained the keyboard focus, %FALSE if
2433 	 * it has lost the focus.
2434 	 */
2435 	short inn;
2436 }
2437 
2438 /**
2439  * Generated when a pointer or keyboard grab is broken. On X11, this happens
2440  * when the grab window becomes unviewable (i.e. it or one of its ancestors
2441  * is unmapped), or if the same application grabs the pointer or keyboard
2442  * again. Note that implicit grabs (which are initiated by button presses)
2443  * can also cause #GdkEventGrabBroken events.
2444  *
2445  * Since: 2.8
2446  */
2447 struct GdkEventGrabBroken
2448 {
2449 	/**
2450 	 * the type of the event (%GDK_GRAB_BROKEN)
2451 	 */
2452 	GdkEventType type;
2453 	/**
2454 	 * the window which received the event, i.e. the window
2455 	 * that previously owned the grab
2456 	 */
2457 	GdkWindow* window;
2458 	/**
2459 	 * %TRUE if the event was sent explicitly.
2460 	 */
2461 	byte sendEvent;
2462 	/**
2463 	 * %TRUE if a keyboard grab was broken, %FALSE if a pointer
2464 	 * grab was broken
2465 	 */
2466 	bool keyboard;
2467 	/**
2468 	 * %TRUE if the broken grab was implicit
2469 	 */
2470 	bool implicit;
2471 	/**
2472 	 * If this event is caused by another grab in the same
2473 	 * application, @grab_window contains the new grab window. Otherwise
2474 	 * @grab_window is %NULL.
2475 	 */
2476 	GdkWindow* grabWindow;
2477 }
2478 
2479 /**
2480  * Describes a key press or key release event.
2481  */
2482 struct GdkEventKey
2483 {
2484 	/**
2485 	 * the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE).
2486 	 */
2487 	GdkEventType type;
2488 	/**
2489 	 * the window which received the event.
2490 	 */
2491 	GdkWindow* window;
2492 	/**
2493 	 * %TRUE if the event was sent explicitly.
2494 	 */
2495 	byte sendEvent;
2496 	/**
2497 	 * the time of the event in milliseconds.
2498 	 */
2499 	uint time;
2500 	/**
2501 	 * a bit-mask representing the state of
2502 	 * the modifier keys (e.g. Control, Shift and Alt) and the pointer
2503 	 * buttons. See #GdkModifierType.
2504 	 */
2505 	ModifierType state;
2506 	/**
2507 	 * the key that was pressed or released. See the
2508 	 * `gdk/gdkkeysyms.h` header file for a
2509 	 * complete list of GDK key codes.
2510 	 */
2511 	uint keyval;
2512 	/**
2513 	 * the length of @string.
2514 	 */
2515 	int length;
2516 	/**
2517 	 * a string containing an approximation of the text that
2518 	 * would result from this keypress. The only correct way to handle text
2519 	 * input of text is using input methods (see #GtkIMContext), so this
2520 	 * field is deprecated and should never be used.
2521 	 * (gdk_unicode_to_keyval() provides a non-deprecated way of getting
2522 	 * an approximate translation for a key.) The string is encoded in the
2523 	 * encoding of the current locale (Note: this for backwards compatibility:
2524 	 * strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
2525 	 * In some cases, the translation of the key code will be a single
2526 	 * NUL byte, in which case looking at @length is necessary to distinguish
2527 	 * it from the an empty translation.
2528 	 */
2529 	char* str;
2530 	/**
2531 	 * the raw code of the key that was pressed or released.
2532 	 */
2533 	ushort hardwareKeycode;
2534 	/**
2535 	 * the keyboard group.
2536 	 */
2537 	ubyte group;
2538 	import std.bitmanip: bitfields;
2539 	mixin(bitfields!(
2540 		uint, "isModifier", 1,
2541 		uint, "", 31
2542 	));
2543 }
2544 
2545 /**
2546  * Generated when the pointer moves.
2547  */
2548 struct GdkEventMotion
2549 {
2550 	/**
2551 	 * the type of the event.
2552 	 */
2553 	GdkEventType type;
2554 	/**
2555 	 * the window which received the event.
2556 	 */
2557 	GdkWindow* window;
2558 	/**
2559 	 * %TRUE if the event was sent explicitly.
2560 	 */
2561 	byte sendEvent;
2562 	/**
2563 	 * the time of the event in milliseconds.
2564 	 */
2565 	uint time;
2566 	/**
2567 	 * the x coordinate of the pointer relative to the window.
2568 	 */
2569 	double x;
2570 	/**
2571 	 * the y coordinate of the pointer relative to the window.
2572 	 */
2573 	double y;
2574 	/**
2575 	 * @x, @y translated to the axes of @device, or %NULL if @device is
2576 	 * the mouse.
2577 	 */
2578 	double* axes;
2579 	/**
2580 	 * a bit-mask representing the state of
2581 	 * the modifier keys (e.g. Control, Shift and Alt) and the pointer
2582 	 * buttons. See #GdkModifierType.
2583 	 */
2584 	ModifierType state;
2585 	/**
2586 	 * set to 1 if this event is just a hint, see the
2587 	 * %GDK_POINTER_MOTION_HINT_MASK value of #GdkEventMask.
2588 	 */
2589 	short isHint;
2590 	/**
2591 	 * the master device that the event originated from. Use
2592 	 * gdk_event_get_source_device() to get the slave device.
2593 	 */
2594 	GdkDevice* device;
2595 	/**
2596 	 * the x coordinate of the pointer relative to the root of the
2597 	 * screen.
2598 	 */
2599 	double xRoot;
2600 	/**
2601 	 * the y coordinate of the pointer relative to the root of the
2602 	 * screen.
2603 	 */
2604 	double yRoot;
2605 }
2606 
2607 /**
2608  * Generated when the owner of a selection changes. On X11, this
2609  * information is only available if the X server supports the XFIXES
2610  * extension.
2611  *
2612  * Since: 2.6
2613  */
2614 struct GdkEventOwnerChange
2615 {
2616 	/**
2617 	 * the type of the event (%GDK_OWNER_CHANGE).
2618 	 */
2619 	GdkEventType type;
2620 	/**
2621 	 * the window which received the event
2622 	 */
2623 	GdkWindow* window;
2624 	/**
2625 	 * %TRUE if the event was sent explicitly.
2626 	 */
2627 	byte sendEvent;
2628 	/**
2629 	 * the new owner of the selection, or %NULL if there is none
2630 	 */
2631 	GdkWindow* owner;
2632 	/**
2633 	 * the reason for the ownership change as a #GdkOwnerChange value
2634 	 */
2635 	GdkOwnerChange reason;
2636 	/**
2637 	 * the atom identifying the selection
2638 	 */
2639 	GdkAtom selection;
2640 	/**
2641 	 * the timestamp of the event
2642 	 */
2643 	uint time;
2644 	/**
2645 	 * the time at which the selection ownership was taken
2646 	 * over
2647 	 */
2648 	uint selectionTime;
2649 }
2650 
2651 /**
2652  * Describes a property change on a window.
2653  */
2654 struct GdkEventProperty
2655 {
2656 	/**
2657 	 * the type of the event (%GDK_PROPERTY_NOTIFY).
2658 	 */
2659 	GdkEventType type;
2660 	/**
2661 	 * the window which received the event.
2662 	 */
2663 	GdkWindow* window;
2664 	/**
2665 	 * %TRUE if the event was sent explicitly.
2666 	 */
2667 	byte sendEvent;
2668 	/**
2669 	 * the property that was changed.
2670 	 */
2671 	GdkAtom atom;
2672 	/**
2673 	 * the time of the event in milliseconds.
2674 	 */
2675 	uint time;
2676 	/**
2677 	 * whether the property was changed
2678 	 * (%GDK_PROPERTY_NEW_VALUE) or deleted (%GDK_PROPERTY_DELETE).
2679 	 */
2680 	PropertyState state;
2681 }
2682 
2683 /**
2684  * Proximity events are generated when using GDK’s wrapper for the
2685  * XInput extension. The XInput extension is an add-on for standard X
2686  * that allows you to use nonstandard devices such as graphics tablets.
2687  * A proximity event indicates that the stylus has moved in or out of
2688  * contact with the tablet, or perhaps that the user’s finger has moved
2689  * in or out of contact with a touch screen.
2690  *
2691  * This event type will be used pretty rarely. It only is important for
2692  * XInput aware programs that are drawing their own cursor.
2693  */
2694 struct GdkEventProximity
2695 {
2696 	/**
2697 	 * the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT).
2698 	 */
2699 	GdkEventType type;
2700 	/**
2701 	 * the window which received the event.
2702 	 */
2703 	GdkWindow* window;
2704 	/**
2705 	 * %TRUE if the event was sent explicitly.
2706 	 */
2707 	byte sendEvent;
2708 	/**
2709 	 * the time of the event in milliseconds.
2710 	 */
2711 	uint time;
2712 	/**
2713 	 * the master device that the event originated from. Use
2714 	 * gdk_event_get_source_device() to get the slave device.
2715 	 */
2716 	GdkDevice* device;
2717 }
2718 
2719 /**
2720  * Generated from button presses for the buttons 4 to 7. Wheel mice are
2721  * usually configured to generate button press events for buttons 4 and 5
2722  * when the wheel is turned.
2723  *
2724  * Some GDK backends can also generate “smooth” scroll events, which
2725  * can be recognized by the %GDK_SCROLL_SMOOTH scroll direction. For
2726  * these, the scroll deltas can be obtained with
2727  * gdk_event_get_scroll_deltas().
2728  */
2729 struct GdkEventScroll
2730 {
2731 	/**
2732 	 * the type of the event (%GDK_SCROLL).
2733 	 */
2734 	GdkEventType type;
2735 	/**
2736 	 * the window which received the event.
2737 	 */
2738 	GdkWindow* window;
2739 	/**
2740 	 * %TRUE if the event was sent explicitly.
2741 	 */
2742 	byte sendEvent;
2743 	/**
2744 	 * the time of the event in milliseconds.
2745 	 */
2746 	uint time;
2747 	/**
2748 	 * the x coordinate of the pointer relative to the window.
2749 	 */
2750 	double x;
2751 	/**
2752 	 * the y coordinate of the pointer relative to the window.
2753 	 */
2754 	double y;
2755 	/**
2756 	 * a bit-mask representing the state of
2757 	 * the modifier keys (e.g. Control, Shift and Alt) and the pointer
2758 	 * buttons. See #GdkModifierType.
2759 	 */
2760 	ModifierType state;
2761 	/**
2762 	 * the direction to scroll to (one of %GDK_SCROLL_UP,
2763 	 * %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT, %GDK_SCROLL_RIGHT or
2764 	 * %GDK_SCROLL_SMOOTH).
2765 	 */
2766 	GdkScrollDirection direction;
2767 	/**
2768 	 * the master device that the event originated from. Use
2769 	 * gdk_event_get_source_device() to get the slave device.
2770 	 */
2771 	GdkDevice* device;
2772 	/**
2773 	 * the x coordinate of the pointer relative to the root of the
2774 	 * screen.
2775 	 */
2776 	double xRoot;
2777 	/**
2778 	 * the y coordinate of the pointer relative to the root of the
2779 	 * screen.
2780 	 */
2781 	double yRoot;
2782 	/**
2783 	 * the x coordinate of the scroll delta
2784 	 */
2785 	double deltaX;
2786 	/**
2787 	 * the y coordinate of the scroll delta
2788 	 */
2789 	double deltaY;
2790 }
2791 
2792 /**
2793  * Generated when a selection is requested or ownership of a selection
2794  * is taken over by another client application.
2795  */
2796 struct GdkEventSelection
2797 {
2798 	/**
2799 	 * the type of the event (%GDK_SELECTION_CLEAR,
2800 	 * %GDK_SELECTION_NOTIFY or %GDK_SELECTION_REQUEST).
2801 	 */
2802 	GdkEventType type;
2803 	/**
2804 	 * the window which received the event.
2805 	 */
2806 	GdkWindow* window;
2807 	/**
2808 	 * %TRUE if the event was sent explicitly.
2809 	 */
2810 	byte sendEvent;
2811 	/**
2812 	 * the selection.
2813 	 */
2814 	GdkAtom selection;
2815 	/**
2816 	 * the target to which the selection should be converted.
2817 	 */
2818 	GdkAtom target;
2819 	/**
2820 	 * the property in which to place the result of the conversion.
2821 	 */
2822 	GdkAtom property;
2823 	/**
2824 	 * the time of the event in milliseconds.
2825 	 */
2826 	uint time;
2827 	/**
2828 	 * the window on which to place @property or %NULL if none.
2829 	 */
2830 	GdkWindow* requestor;
2831 }
2832 
2833 struct GdkEventSequence;
2834 
2835 /**
2836  * Generated when a setting is modified.
2837  */
2838 struct GdkEventSetting
2839 {
2840 	/**
2841 	 * the type of the event (%GDK_SETTING).
2842 	 */
2843 	GdkEventType type;
2844 	/**
2845 	 * the window which received the event.
2846 	 */
2847 	GdkWindow* window;
2848 	/**
2849 	 * %TRUE if the event was sent explicitly.
2850 	 */
2851 	byte sendEvent;
2852 	/**
2853 	 * what happened to the setting (%GDK_SETTING_ACTION_NEW,
2854 	 * %GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
2855 	 */
2856 	GdkSettingAction action;
2857 	/**
2858 	 * the name of the setting.
2859 	 */
2860 	char* name;
2861 }
2862 
2863 /**
2864  * Used for touch events.
2865  * @type field will be one of %GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE,
2866  * %GDK_TOUCH_END or %GDK_TOUCH_CANCEL.
2867  *
2868  * Touch events are grouped into sequences by means of the @sequence
2869  * field, which can also be obtained with gdk_event_get_event_sequence().
2870  * Each sequence begins with a %GDK_TOUCH_BEGIN event, followed by
2871  * any number of %GDK_TOUCH_UPDATE events, and ends with a %GDK_TOUCH_END
2872  * (or %GDK_TOUCH_CANCEL) event. With multitouch devices, there may be
2873  * several active sequences at the same time.
2874  */
2875 struct GdkEventTouch
2876 {
2877 	/**
2878 	 * the type of the event (%GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE,
2879 	 * %GDK_TOUCH_END, %GDK_TOUCH_CANCEL)
2880 	 */
2881 	GdkEventType type;
2882 	/**
2883 	 * the window which received the event
2884 	 */
2885 	GdkWindow* window;
2886 	/**
2887 	 * %TRUE if the event was sent explicitly.
2888 	 */
2889 	byte sendEvent;
2890 	/**
2891 	 * the time of the event in milliseconds.
2892 	 */
2893 	uint time;
2894 	/**
2895 	 * the x coordinate of the pointer relative to the window
2896 	 */
2897 	double x;
2898 	/**
2899 	 * the y coordinate of the pointer relative to the window
2900 	 */
2901 	double y;
2902 	/**
2903 	 * @x, @y translated to the axes of @device, or %NULL if @device is
2904 	 * the mouse
2905 	 */
2906 	double* axes;
2907 	/**
2908 	 * a bit-mask representing the state of
2909 	 * the modifier keys (e.g. Control, Shift and Alt) and the pointer
2910 	 * buttons. See #GdkModifierType
2911 	 */
2912 	ModifierType state;
2913 	/**
2914 	 * the event sequence that the event belongs to
2915 	 */
2916 	GdkEventSequence* sequence;
2917 	/**
2918 	 * whether the event should be used for emulating
2919 	 * pointer event
2920 	 */
2921 	bool emulatingPointer;
2922 	/**
2923 	 * the master device that the event originated from. Use
2924 	 * gdk_event_get_source_device() to get the slave device.
2925 	 */
2926 	GdkDevice* device;
2927 	/**
2928 	 * the x coordinate of the pointer relative to the root of the
2929 	 * screen
2930 	 */
2931 	double xRoot;
2932 	/**
2933 	 * the y coordinate of the pointer relative to the root of the
2934 	 * screen
2935 	 */
2936 	double yRoot;
2937 }
2938 
2939 /**
2940  * Generated when the window visibility status has changed.
2941  *
2942  * Deprecated: Modern composited windowing systems with pervasive
2943  * transparency make it impossible to track the visibility of a window
2944  * reliably, so this event can not be guaranteed to provide useful
2945  * information.
2946  */
2947 struct GdkEventVisibility
2948 {
2949 	/**
2950 	 * the type of the event (%GDK_VISIBILITY_NOTIFY).
2951 	 */
2952 	GdkEventType type;
2953 	/**
2954 	 * the window which received the event.
2955 	 */
2956 	GdkWindow* window;
2957 	/**
2958 	 * %TRUE if the event was sent explicitly.
2959 	 */
2960 	byte sendEvent;
2961 	/**
2962 	 * the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
2963 	 * %GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
2964 	 */
2965 	GdkVisibilityState state;
2966 }
2967 
2968 /**
2969  * Generated when the state of a toplevel window changes.
2970  */
2971 struct GdkEventWindowState
2972 {
2973 	/**
2974 	 * the type of the event (%GDK_WINDOW_STATE).
2975 	 */
2976 	GdkEventType type;
2977 	/**
2978 	 * the window which received the event.
2979 	 */
2980 	GdkWindow* window;
2981 	/**
2982 	 * %TRUE if the event was sent explicitly.
2983 	 */
2984 	byte sendEvent;
2985 	/**
2986 	 * mask specifying what flags have changed.
2987 	 */
2988 	GdkWindowState changedMask;
2989 	/**
2990 	 * the new window state, a combination of
2991 	 * #GdkWindowState bits.
2992 	 */
2993 	GdkWindowState newWindowState;
2994 }
2995 
2996 struct GdkFrameClock;
2997 
2998 struct GdkFrameClockClass;
2999 
3000 struct GdkFrameClockPrivate;
3001 
3002 struct GdkFrameTimings;
3003 
3004 /**
3005  * The #GdkGeometry struct gives the window manager information about
3006  * a window’s geometry constraints. Normally you would set these on
3007  * the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow
3008  * then sets the hints on the #GdkWindow it creates.
3009  *
3010  * gdk_window_set_geometry_hints() expects the hints to be fully valid already
3011  * and simply passes them to the window manager; in contrast,
3012  * gtk_window_set_geometry_hints() performs some interpretation. For example,
3013  * #GtkWindow will apply the hints to the geometry widget instead of the
3014  * toplevel window, if you set a geometry widget. Also, the
3015  * @min_width/@min_height/@max_width/@max_height fields may be set to -1, and
3016  * #GtkWindow will substitute the size request of the window or geometry widget.
3017  * If the minimum size hint is not provided, #GtkWindow will use its requisition
3018  * as the minimum size. If the minimum size is provided and a geometry widget is
3019  * set, #GtkWindow will take the minimum size as the minimum size of the
3020  * geometry widget rather than the entire window. The base size is treated
3021  * similarly.
3022  *
3023  * The canonical use-case for gtk_window_set_geometry_hints() is to get a
3024  * terminal widget to resize properly. Here, the terminal text area should be
3025  * the geometry widget; #GtkWindow will then automatically set the base size to
3026  * the size of other widgets in the terminal window, such as the menubar and
3027  * scrollbar. Then, the @width_inc and @height_inc fields should be set to the
3028  * size of one character in the terminal. Finally, the base size should be set
3029  * to the size of one character. The net effect is that the minimum size of the
3030  * terminal will have a 1x1 character terminal area, and only terminal sizes on
3031  * the “character grid” will be allowed.
3032  *
3033  * Here’s an example of how the terminal example would be implemented, assuming
3034  * a terminal area widget called “terminal” and a toplevel window “toplevel”:
3035  *
3036  * |[<!-- language="C" -->
3037  * GdkGeometry hints;
3038  *
3039  * hints.base_width = terminal->char_width;
3040  * hints.base_height = terminal->char_height;
3041  * hints.min_width = terminal->char_width;
3042  * hints.min_height = terminal->char_height;
3043  * hints.width_inc = terminal->char_width;
3044  * hints.height_inc = terminal->char_height;
3045  *
3046  * gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
3047  * GTK_WIDGET (terminal),
3048  * &hints,
3049  * GDK_HINT_RESIZE_INC |
3050  * GDK_HINT_MIN_SIZE |
3051  * GDK_HINT_BASE_SIZE);
3052  * ]|
3053  *
3054  * The other useful fields are the @min_aspect and @max_aspect fields; these
3055  * contain a width/height ratio as a floating point number. If a geometry widget
3056  * is set, the aspect applies to the geometry widget rather than the entire
3057  * window. The most common use of these hints is probably to set @min_aspect and
3058  * @max_aspect to the same value, thus forcing the window to keep a constant
3059  * aspect ratio.
3060  */
3061 struct GdkGeometry
3062 {
3063 	/**
3064 	 * minimum width of window (or -1 to use requisition, with
3065 	 * #GtkWindow only)
3066 	 */
3067 	int minWidth;
3068 	/**
3069 	 * minimum height of window (or -1 to use requisition, with
3070 	 * #GtkWindow only)
3071 	 */
3072 	int minHeight;
3073 	/**
3074 	 * maximum width of window (or -1 to use requisition, with
3075 	 * #GtkWindow only)
3076 	 */
3077 	int maxWidth;
3078 	/**
3079 	 * maximum height of window (or -1 to use requisition, with
3080 	 * #GtkWindow only)
3081 	 */
3082 	int maxHeight;
3083 	/**
3084 	 * allowed window widths are @base_width + @width_inc * N where N
3085 	 * is any integer (-1 allowed with #GtkWindow)
3086 	 */
3087 	int baseWidth;
3088 	/**
3089 	 * allowed window widths are @base_height + @height_inc * N where
3090 	 * N is any integer (-1 allowed with #GtkWindow)
3091 	 */
3092 	int baseHeight;
3093 	/**
3094 	 * width resize increment
3095 	 */
3096 	int widthInc;
3097 	/**
3098 	 * height resize increment
3099 	 */
3100 	int heightInc;
3101 	/**
3102 	 * minimum width/height ratio
3103 	 */
3104 	double minAspect;
3105 	/**
3106 	 * maximum width/height ratio
3107 	 */
3108 	double maxAspect;
3109 	/**
3110 	 * window gravity, see gtk_window_set_gravity()
3111 	 */
3112 	GdkGravity winGravity;
3113 }
3114 
3115 struct GdkKeymap;
3116 
3117 /**
3118  * A #GdkKeymapKey is a hardware key that can be mapped to a keyval.
3119  */
3120 struct GdkKeymapKey
3121 {
3122 	/**
3123 	 * the hardware keycode. This is an identifying number for a
3124 	 * physical key.
3125 	 */
3126 	uint keycode;
3127 	/**
3128 	 * indicates movement in a horizontal direction. Usually groups are used
3129 	 * for two different languages. In group 0, a key might have two English
3130 	 * characters, and in group 1 it might have two Hebrew characters. The Hebrew
3131 	 * characters will be printed on the key next to the English characters.
3132 	 */
3133 	int group;
3134 	/**
3135 	 * indicates which symbol on the key will be used, in a vertical direction.
3136 	 * So on a standard US keyboard, the key with the number “1” on it also has the
3137 	 * exclamation point ("!") character on it. The level indicates whether to use
3138 	 * the “1” or the “!” symbol. The letter keys are considered to have a lowercase
3139 	 * letter at level 0, and an uppercase letter at level 1, though only the
3140 	 * uppercase letter is printed.
3141 	 */
3142 	int level;
3143 }
3144 
3145 /**
3146  * Defines the x and y coordinates of a point.
3147  */
3148 struct GdkPoint
3149 {
3150 	/**
3151 	 * the x coordinate of the point.
3152 	 */
3153 	int x;
3154 	/**
3155 	 * the y coordinate of the point.
3156 	 */
3157 	int y;
3158 }
3159 
3160 struct GdkRGBA
3161 {
3162 	/**
3163 	 * The intensity of the red channel from 0.0 to 1.0 inclusive
3164 	 */
3165 	double red;
3166 	/**
3167 	 * The intensity of the green channel from 0.0 to 1.0 inclusive
3168 	 */
3169 	double green;
3170 	/**
3171 	 * The intensity of the blue channel from 0.0 to 1.0 inclusive
3172 	 */
3173 	double blue;
3174 	/**
3175 	 * The opacity of the color from 0.0 for completely translucent to
3176 	 * 1.0 for opaque
3177 	 */
3178 	double alpha;
3179 }
3180 
3181 struct GdkScreen;
3182 
3183 /**
3184  * A #GdkTimeCoord stores a single event in a motion history.
3185  */
3186 struct GdkTimeCoord
3187 {
3188 	/**
3189 	 * The timestamp for this event.
3190 	 */
3191 	uint time;
3192 	/**
3193 	 * the values of the device’s axes.
3194 	 */
3195 	double[128] axes;
3196 }
3197 
3198 struct GdkVisual;
3199 
3200 struct GdkWindow;
3201 
3202 /**
3203  * Attributes to use for a newly-created window.
3204  */
3205 struct GdkWindowAttr
3206 {
3207 	/**
3208 	 * title of the window (for toplevel windows)
3209 	 */
3210 	char* title;
3211 	/**
3212 	 * event mask (see gdk_window_set_events())
3213 	 */
3214 	int eventMask;
3215 	/**
3216 	 * X coordinate relative to parent window (see gdk_window_move())
3217 	 */
3218 	int x;
3219 	/**
3220 	 * Y coordinate relative to parent window (see gdk_window_move())
3221 	 */
3222 	int y;
3223 	/**
3224 	 * width of window
3225 	 */
3226 	int width;
3227 	/**
3228 	 * height of window
3229 	 */
3230 	int height;
3231 	/**
3232 	 * #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible
3233 	 * window that receives events)
3234 	 */
3235 	GdkWindowWindowClass wclass;
3236 	/**
3237 	 * #GdkVisual for window
3238 	 */
3239 	GdkVisual* visual;
3240 	/**
3241 	 * type of window
3242 	 */
3243 	GdkWindowType windowType;
3244 	/**
3245 	 * cursor for the window (see gdk_window_set_cursor())
3246 	 */
3247 	GdkCursor* cursor;
3248 	/**
3249 	 * don’t use (see gtk_window_set_wmclass())
3250 	 */
3251 	char* wmclassName;
3252 	/**
3253 	 * don’t use (see gtk_window_set_wmclass())
3254 	 */
3255 	char* wmclassClass;
3256 	/**
3257 	 * %TRUE to bypass the window manager
3258 	 */
3259 	bool overrideRedirect;
3260 	/**
3261 	 * a hint of the function of the window
3262 	 */
3263 	GdkWindowTypeHint typeHint;
3264 }
3265 
3266 struct GdkWindowClass
3267 {
3268 	GObjectClass parentClass;
3269 	extern(C) GdkWindow* function(GdkWindow* window, double x, double y) pickEmbeddedChild;
3270 	extern(C) void function(GdkWindow* window, double offscreenX, double offscreenY, double* embedderX, double* embedderY) toEmbedder;
3271 	extern(C) void function(GdkWindow* window, double embedderX, double embedderY, double* offscreenX, double* offscreenY) fromEmbedder;
3272 	extern(C) cairo_surface_t* function(GdkWindow* window, int width, int height) createSurface;
3273 	extern(C) void function() GdkReserved1;
3274 	extern(C) void function() GdkReserved2;
3275 	extern(C) void function() GdkReserved3;
3276 	extern(C) void function() GdkReserved4;
3277 	extern(C) void function() GdkReserved5;
3278 	extern(C) void function() GdkReserved6;
3279 	extern(C) void function() GdkReserved7;
3280 	extern(C) void function() GdkReserved8;
3281 }
3282 
3283 struct GdkWindowRedirect;
3284 
3285 struct GdkX11Window;
3286 
3287 struct GdkX11WindowClass;
3288 
3289 /**
3290  * Specifies the type of function passed to gdk_event_handler_set() to
3291  * handle all GDK events.
3292  *
3293  * Params:
3294  *     event = the #GdkEvent to process.
3295  *     data = user data set when the event handler was installed with
3296  *         gdk_event_handler_set().
3297  */
3298 public alias extern(C) void function(GdkEvent* event, void* data) GdkEventFunc;
3299 
3300 /**
3301  * Specifies the type of function used to filter native events before they are
3302  * converted to GDK events.
3303  *
3304  * When a filter is called, @event is unpopulated, except for
3305  * `event->window`. The filter may translate the native
3306  * event to a GDK event and store the result in @event, or handle it without
3307  * translation. If the filter translates the event and processing should
3308  * continue, it should return %GDK_FILTER_TRANSLATE.
3309  *
3310  * Params:
3311  *     xevent = the native event to filter.
3312  *     event = the GDK event to which the X event will be translated.
3313  *     data = user data set when the filter was installed.
3314  *
3315  * Return: a #GdkFilterReturn value.
3316  */
3317 public alias extern(C) GdkFilterReturn function(GdkXEvent* xevent, GdkEvent* event, void* data) GdkFilterFunc;
3318 
3319 /**
3320  * A function of this type is passed to gdk_window_invalidate_maybe_recurse().
3321  * It gets called for each child of the window to determine whether to
3322  * recursively invalidate it or now.
3323  *
3324  * Params:
3325  *     window = a #GdkWindow
3326  *     userData = user data
3327  *
3328  * Return: %TRUE to invalidate @window recursively
3329  */
3330 public alias extern(C) int function(GdkWindow* window, void* userData) GdkWindowChildFunc;
3331 
3332 /**
3333  * Whenever some area of the window is invalidated (directly in the
3334  * window or in a child window) this gets called with @region in
3335  * the coordinate space of @window. You can use @region to just
3336  * keep track of the dirty region, or you can actually change
3337  * @region in case you are doing display tricks like showing
3338  * a child in multiple places.
3339  *
3340  * Params:
3341  *     window = a #GdkWindow
3342  *     region = a #cairo_region_t
3343  *
3344  * Since: 3.10
3345  */
3346 public alias extern(C) void function(GdkWindow* window, cairo_region_t* region) GdkWindowInvalidateHandlerFunc;