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