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