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