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