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 module gtkc.gdktypes; 25 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 const int GDK_MAX_TIMECOORD_AXES = 128; 34 35 alias Rectangle GdkRectangle; 36 37 /** 38 * typedef cairo_rectangle_int_t GdkRectangle; 39 * Defines the position and size of a rectangle. It is identical to 40 * cairo_rectangle_int_t. 41 */ 42 public alias cairo_rectangle_int_t Rectangle; 43 44 /** 45 * typedef void GdkXEvent; /+* Can be cast to window system specific 46 * Used to represent native events (XEvents for the X11 47 * backend, MSGs for Win32). 48 */ 49 public alias void GdkXEvent; 50 51 enum GdkModifierIntent 52 { 53 PRIMARY_ACCELERATOR, 54 CONTEXT_MENU, 55 EXTEND_SELECTION, 56 MODIFY_SELECTION, 57 NO_TEXT_INPUT, 58 SHIFT_GROUP 59 } 60 public alias GdkModifierIntent ModifierIntent; 61 62 /** 63 * Returned by gdk_device_grab(), gdk_pointer_grab() and gdk_keyboard_grab() to 64 * indicate success or the reason for the failure of the grab attempt. 65 * GDK_GRAB_SUCCESS 66 * the resource was successfully grabbed. 67 * GDK_GRAB_ALREADY_GRABBED 68 * the resource is actively grabbed by another client. 69 * GDK_GRAB_INVALID_TIME 70 * the resource was grabbed more recently than the 71 * specified time. 72 * GDK_GRAB_NOT_VIEWABLE 73 * the grab window or the confine_to window are not 74 * viewable. 75 * GDK_GRAB_FROZEN 76 * the resource is frozen by an active grab of another client. 77 */ 78 public enum GdkGrabStatus 79 { 80 SUCCESS = 0, 81 ALREADY_GRABBED = 1, 82 INVALID_TIME = 2, 83 NOT_VIEWABLE = 3, 84 FROZEN = 4 85 } 86 alias GdkGrabStatus GrabStatus; 87 88 /** 89 * An enumeration describing the type of an input device in general terms. 90 * GDK_SOURCE_MOUSE 91 * the device is a mouse. (This will be reported for the core 92 * pointer, even if it is something else, such as a trackball.) 93 * GDK_SOURCE_PEN 94 * the device is a stylus of a graphics tablet or similar device. 95 * GDK_SOURCE_ERASER 96 * the device is an eraser. Typically, this would be the other end 97 * of a stylus on a graphics tablet. 98 * GDK_SOURCE_CURSOR 99 * the device is a graphics tablet "puck" or similar device. 100 * GDK_SOURCE_KEYBOARD 101 * the device is a keyboard. 102 * GDK_SOURCE_TOUCHSCREEN 103 * the device is a direct-input touch device, such 104 * as a touchscreen or tablet. This device type has been added in 3.4. 105 * GDK_SOURCE_TOUCHPAD 106 * the device is an indirect touch device, such 107 * as a touchpad. This device type has been added in 3.4. 108 */ 109 public enum GdkInputSource 110 { 111 SOURCE_MOUSE, 112 SOURCE_PEN, 113 SOURCE_ERASER, 114 SOURCE_CURSOR, 115 SOURCE_KEYBOARD, 116 SOURCE_TOUCHSCREEN, 117 SOURCE_TOUCHPAD 118 } 119 alias GdkInputSource InputSource; 120 121 /** 122 * An enumeration that describes the mode of an input device. 123 * GDK_MODE_DISABLED 124 * the device is disabled and will not report any events. 125 * GDK_MODE_SCREEN 126 * the device is enabled. The device's coordinate space 127 * maps to the entire screen. 128 * GDK_MODE_WINDOW 129 * the device is enabled. The device's coordinate space 130 * is mapped to a single window. The manner in which this window 131 * is chosen is undefined, but it will typically be the same 132 * way in which the focus window for key events is determined. 133 */ 134 public enum GdkInputMode 135 { 136 MODE_DISABLED, 137 MODE_SCREEN, 138 MODE_WINDOW 139 } 140 alias GdkInputMode InputMode; 141 142 /** 143 * An enumeration describing the way in which a device 144 * axis (valuator) maps onto the predefined valuator 145 * types that GTK+ understands. 146 * GDK_AXIS_IGNORE 147 * the axis is ignored. 148 * GDK_AXIS_X 149 * the axis is used as the x axis. 150 * GDK_AXIS_Y 151 * the axis is used as the y axis. 152 * GDK_AXIS_PRESSURE 153 * the axis is used for pressure information. 154 * GDK_AXIS_XTILT 155 * the axis is used for x tilt information. 156 * GDK_AXIS_YTILT 157 * the axis is used for y tilt information. 158 * GDK_AXIS_WHEEL 159 * the axis is used for wheel information. 160 * GDK_AXIS_LAST 161 * a constant equal to the numerically highest axis value. 162 */ 163 public enum GdkAxisUse 164 { 165 IGNORE, 166 X, 167 Y, 168 PRESSURE, 169 XTILT, 170 YTILT, 171 WHEEL, 172 LAST 173 } 174 alias GdkAxisUse AxisUse; 175 176 /** 177 * Indicates the device type. See above 178 * for more information about the meaning of these device types. 179 * GDK_DEVICE_TYPE_MASTER 180 * Device is a master (or virtual) device. There will 181 * be an associated focus indicator on the screen. 182 * GDK_DEVICE_TYPE_SLAVE 183 * Device is a slave (or physical) device. 184 * GDK_DEVICE_TYPE_FLOATING 185 * Device is a physical device, currently not attached to 186 * any virtual device. 187 */ 188 public enum GdkDeviceType 189 { 190 TYPE_MASTER, 191 TYPE_SLAVE, 192 TYPE_FLOATING 193 } 194 alias GdkDeviceType DeviceType; 195 196 /** 197 * Defines how device grabs interact with other devices. 198 * GDK_OWNERSHIP_NONE 199 * All other devices' events are allowed. 200 * GDK_OWNERSHIP_WINDOW 201 * Other devices' events are blocked for the grab window. 202 * GDK_OWNERSHIP_APPLICATION 203 * Other devices' events are blocked for the whole application. 204 */ 205 public enum GdkGrabOwnership 206 { 207 OWNERSHIP_NONE, 208 OWNERSHIP_WINDOW, 209 OWNERSHIP_APPLICATION 210 } 211 alias GdkGrabOwnership GrabOwnership; 212 213 /** 214 * An error code in the GDK_PIXBUF_ERROR domain. Many gdk-pixbuf; 215 * operations can cause errors in this domain, or in the G_FILE_ERROR 216 * domain. 217 * GDK_PIXBUF_ERROR_CORRUPT_IMAGE 218 * An image file was broken somehow. 219 * GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY 220 * Not enough memory. 221 * GDK_PIXBUF_ERROR_BAD_OPTION 222 * A bad option was passed to a pixbuf save module. 223 * GDK_PIXBUF_ERROR_UNKNOWN_TYPE 224 * Unknown image type. 225 * GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION 226 * Don't know how to perform the 227 * given operation on the type of image at hand. 228 * GDK_PIXBUF_ERROR_FAILED 229 * Generic failure code, something went wrong. 230 */ 231 public enum GdkPixbufError 232 { 233 CORRUPT_IMAGE, 234 /+* no mem to load image +/ 235 INSUFFICIENT_MEMORY, 236 /+* bad option passed to save routine +/ 237 BAD_OPTION, 238 /+* unsupported image type (sort of an ENOSYS) +/ 239 UNKNOWN_TYPE, 240 /+* unsupported operation (load, save) for image type +/ 241 UNSUPPORTED_OPERATION, 242 FAILED 243 } 244 alias GdkPixbufError PixbufError; 245 246 /** 247 * This enumeration defines the color spaces that are supported by 248 * the gdk-pixbuf; library. Currently only RGB is supported. 249 * GDK_COLORSPACE_RGB 250 * Indicates a red/green/blue additive color space. 251 */ 252 public enum GdkColorspace 253 { 254 RGB 255 } 256 alias GdkColorspace Colorspace; 257 258 /** 259 * These values can be passed to 260 * gdk_pixbuf_render_to_drawable_alpha() to control how the alpha 261 * channel of an image should be handled. This function can create a 262 * bilevel clipping mask (black and white) and use it while painting 263 * the image. In the future, when the X Window System gets an alpha 264 * channel extension, it will be possible to do full alpha 265 * compositing onto arbitrary drawables. For now both cases fall 266 * back to a bilevel clipping mask. 267 * GDK_PIXBUF_ALPHA_BILEVEL 268 * A bilevel clipping mask (black and white) 269 * will be created and used to draw the image. Pixels below 0.5 opacity 270 * will be considered fully transparent, and all others will be 271 * considered fully opaque. 272 * GDK_PIXBUF_ALPHA_FULL 273 * For now falls back to GDK_PIXBUF_ALPHA_BILEVEL. 274 * In the future it will do full alpha compositing. 275 */ 276 public enum GdkPixbufAlphaMode 277 { 278 BILEVEL, 279 FULL 280 } 281 alias GdkPixbufAlphaMode PixbufAlphaMode; 282 283 /** 284 * This enumeration describes the different interpolation modes that 285 * can be used with the scaling functions. GDK_INTERP_NEAREST is 286 * the fastest scaling method, but has horrible quality when 287 * scaling down. GDK_INTERP_BILINEAR is the best choice if you 288 * aren't sure what to choose, it has a good speed/quality balance. 289 * Note 290 * Cubic filtering is missing from the list; hyperbolic 291 * interpolation is just as fast and results in higher quality. 292 * GDK_INTERP_NEAREST 293 * Nearest neighbor sampling; this is the fastest 294 * and lowest quality mode. Quality is normally unacceptable when scaling 295 * down, but may be OK when scaling up. 296 * GDK_INTERP_TILES 297 * This is an accurate simulation of the PostScript 298 * image operator without any interpolation enabled. Each pixel is 299 * rendered as a tiny parallelogram of solid color, the edges of which 300 * are implemented with antialiasing. It resembles nearest neighbor for 301 * enlargement, and bilinear for reduction. 302 * GDK_INTERP_BILINEAR 303 * Best quality/speed balance; use this mode by 304 * default. Bilinear interpolation. For enlargement, it is 305 * equivalent to point-sampling the ideal bilinear-interpolated image. 306 * For reduction, it is equivalent to laying down small tiles and 307 * integrating over the coverage area. 308 * GDK_INTERP_HYPER 309 * This is the slowest and highest quality 310 * reconstruction function. It is derived from the hyperbolic filters in 311 * Wolberg's "Digital Image Warping", and is formally defined as the 312 * hyperbolic-filter sampling the ideal hyperbolic-filter interpolated 313 * image (the filter is designed to be idempotent for 1:1 pixel mapping). 314 */ 315 public enum GdkInterpType 316 { 317 NEAREST, 318 TILES, 319 BILINEAR, 320 HYPER 321 } 322 alias GdkInterpType InterpType; 323 324 /** 325 * The possible rotations which can be passed to gdk_pixbuf_rotate_simple(). 326 * To make them easier to use, their numerical values are the actual degrees. 327 * GDK_PIXBUF_ROTATE_NONE 328 * No rotation. 329 * GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE 330 * Rotate by 90 degrees. 331 * GDK_PIXBUF_ROTATE_UPSIDEDOWN 332 * Rotate by 180 degrees. 333 * GDK_PIXBUF_ROTATE_CLOCKWISE 334 * Rotate by 270 degrees. 335 */ 336 public enum GdkPixbufRotation 337 { 338 ROTATE_NONE = 0, 339 ROTATE_COUNTERCLOCKWISE = 90, 340 ROTATE_UPSIDEDOWN = 180, 341 ROTATE_CLOCKWISE = 270 342 } 343 alias GdkPixbufRotation PixbufRotation; 344 345 /** 346 * A set of values that describe the manner in which the pixel values 347 * for a visual are converted into RGB values for display. 348 * GDK_VISUAL_STATIC_GRAY 349 * Each pixel value indexes a grayscale value 350 * directly. 351 * GDK_VISUAL_GRAYSCALE 352 * Each pixel is an index into a color map that 353 * maps pixel values into grayscale values. The color map can be 354 * changed by an application. 355 * GDK_VISUAL_STATIC_COLOR 356 * Each pixel value is an index into a predefined, 357 * unmodifiable color map that maps pixel values into RGB values. 358 * GDK_VISUAL_PSEUDO_COLOR 359 * Each pixel is an index into a color map that 360 * maps pixel values into rgb values. The color map can be changed by 361 * an application. 362 * GDK_VISUAL_TRUE_COLOR 363 * Each pixel value directly contains red, green, 364 * and blue components. Use gdk_visual_get_red_pixel_details(), etc, 365 * to obtain information about how the components are assembled into 366 * a pixel value. 367 * GDK_VISUAL_DIRECT_COLOR 368 * Each pixel value contains red, green, and blue 369 * components as for GDK_VISUAL_TRUE_COLOR, but the components are 370 * mapped via a color table into the final output table instead of 371 * being converted directly. 372 */ 373 public enum GdkVisualType 374 { 375 STATIC_GRAY, 376 GRAYSCALE, 377 STATIC_COLOR, 378 PSEUDO_COLOR, 379 TRUE_COLOR, 380 DIRECT_COLOR 381 } 382 alias GdkVisualType VisualType; 383 384 /** 385 * A set of values describing the possible byte-orders 386 * for storing pixel values in memory. 387 * GDK_LSB_FIRST 388 * The values are stored with the least-significant byte 389 * first. For instance, the 32-bit value 0xffeecc would be stored 390 * in memory as 0xcc, 0xee, 0xff, 0x00. 391 * GDK_MSB_FIRST 392 * The values are stored with the most-significant byte 393 * first. For instance, the 32-bit value 0xffeecc would be stored 394 * in memory as 0x00, 0xff, 0xee, 0xcc. 395 */ 396 public enum GdkByteOrder 397 { 398 LSB_FIRST, 399 MSB_FIRST 400 } 401 alias GdkByteOrder ByteOrder; 402 403 /** 404 * The standard cursors available. 405 * GDK_X_CURSOR 406 * GDK_ARROW 407 * GDK_BASED_ARROW_DOWN 408 * GDK_BASED_ARROW_UP 409 * GDK_BOAT 410 * GDK_BOGOSITY 411 * GDK_BOTTOM_LEFT_CORNER 412 * GDK_BOTTOM_RIGHT_CORNER 413 * GDK_BOTTOM_SIDE 414 * GDK_BOTTOM_TEE 415 * GDK_BOX_SPIRAL 416 * GDK_CENTER_PTR 417 * GDK_CIRCLE 418 * GDK_CLOCK 419 * GDK_COFFEE_MUG 420 * GDK_CROSS 421 * GDK_CROSS_REVERSE 422 * GDK_CROSSHAIR 423 * GDK_DIAMOND_CROSS 424 * GDK_DOT 425 * GDK_DOTBOX 426 * GDK_DOUBLE_ARROW 427 * GDK_DRAFT_LARGE 428 * GDK_DRAFT_SMALL 429 * GDK_DRAPED_BOX 430 * GDK_EXCHANGE 431 * GDK_FLEUR 432 * GDK_GOBBLER 433 * GDK_GUMBY 434 * GDK_HAND1 435 * GDK_HAND2 436 * GDK_HEART 437 * GDK_ICON 438 * GDK_IRON_CROSS 439 * GDK_LEFT_PTR 440 * GDK_LEFT_SIDE 441 * GDK_LEFT_TEE 442 * GDK_LEFTBUTTON 443 * GDK_LL_ANGLE 444 * GDK_LR_ANGLE 445 * GDK_MAN 446 * GDK_MIDDLEBUTTON 447 * GDK_MOUSE 448 * GDK_PENCIL 449 * GDK_PIRATE 450 * GDK_PLUS 451 * GDK_QUESTION_ARROW 452 * GDK_RIGHT_PTR 453 * GDK_RIGHT_SIDE 454 * GDK_RIGHT_TEE 455 * GDK_RIGHTBUTTON 456 * GDK_RTL_LOGO 457 * GDK_SAILBOAT 458 * GDK_SB_DOWN_ARROW 459 * GDK_SB_H_DOUBLE_ARROW 460 * GDK_SB_LEFT_ARROW 461 * GDK_SB_RIGHT_ARROW 462 * GDK_SB_UP_ARROW 463 * GDK_SB_V_DOUBLE_ARROW 464 * GDK_SHUTTLE 465 * GDK_SIZING 466 * GDK_SPIDER 467 * GDK_SPRAYCAN 468 * GDK_STAR 469 * GDK_TARGET 470 * GDK_TCROSS 471 * GDK_TOP_LEFT_ARROW 472 * GDK_TOP_LEFT_CORNER 473 * GDK_TOP_RIGHT_CORNER 474 * GDK_TOP_SIDE 475 * GDK_TOP_TEE 476 * GDK_TREK 477 * GDK_UL_ANGLE 478 * GDK_UMBRELLA 479 * GDK_UR_ANGLE 480 * GDK_WATCH 481 * GDK_XTERM 482 * GDK_LAST_CURSOR 483 * last cursor type 484 * GDK_BLANK_CURSOR 485 * Blank cursor. Since 2.16 486 * GDK_CURSOR_IS_PIXMAP 487 * type of cursors constructed with 488 * gdk_cursor_new_from_pixbuf() 489 */ 490 public enum GdkCursorType 491 { 492 X_CURSOR = 0, 493 ARROW = 2, 494 BASED_ARROW_DOWN = 4, 495 BASED_ARROW_UP = 6, 496 BOAT = 8, 497 BOGOSITY = 10, 498 BOTTOM_LEFT_CORNER = 12, 499 BOTTOM_RIGHT_CORNER = 14, 500 BOTTOM_SIDE = 16, 501 BOTTOM_TEE = 18, 502 BOX_SPIRAL = 20, 503 CENTER_PTR = 22, 504 CIRCLE = 24, 505 CLOCK = 26, 506 COFFEE_MUG = 28, 507 CROSS = 30, 508 CROSS_REVERSE = 32, 509 CROSSHAIR = 34, 510 DIAMOND_CROSS = 36, 511 DOT = 38, 512 DOTBOX = 40, 513 DOUBLE_ARROW = 42, 514 DRAFT_LARGE = 44, 515 DRAFT_SMALL = 46, 516 DRAPED_BOX = 48, 517 EXCHANGE = 50, 518 FLEUR = 52, 519 GOBBLER = 54, 520 GUMBY = 56, 521 HAND1 = 58, 522 HAND2 = 60, 523 HEART = 62, 524 ICON = 64, 525 IRON_CROSS = 66, 526 LEFT_PTR = 68, 527 LEFT_SIDE = 70, 528 LEFT_TEE = 72, 529 LEFTBUTTON = 74, 530 LL_ANGLE = 76, 531 LR_ANGLE = 78, 532 MAN = 80, 533 MIDDLEBUTTON = 82, 534 MOUSE = 84, 535 PENCIL = 86, 536 PIRATE = 88, 537 PLUS = 90, 538 QUESTION_ARROW = 92, 539 RIGHT_PTR = 94, 540 RIGHT_SIDE = 96, 541 RIGHT_TEE = 98, 542 RIGHTBUTTON = 100, 543 RTL_LOGO = 102, 544 SAILBOAT = 104, 545 SB_DOWN_ARROW = 106, 546 SB_H_DOUBLE_ARROW = 108, 547 SB_LEFT_ARROW = 110, 548 SB_RIGHT_ARROW = 112, 549 SB_UP_ARROW = 114, 550 SB_V_DOUBLE_ARROW = 116, 551 SHUTTLE = 118, 552 SIZING = 120, 553 SPIDER = 122, 554 SPRAYCAN = 124, 555 STAR = 126, 556 TARGET = 128, 557 TCROSS = 130, 558 TOP_LEFT_ARROW = 132, 559 TOP_LEFT_CORNER = 134, 560 TOP_RIGHT_CORNER = 136, 561 TOP_SIDE = 138, 562 TOP_TEE = 140, 563 TREK = 142, 564 UL_ANGLE = 144, 565 UMBRELLA = 146, 566 UR_ANGLE = 148, 567 WATCH = 150, 568 XTERM = 152, 569 LAST_CURSOR, 570 BLANK_CURSOR = -2, 571 CURSOR_IS_PIXMAP = -1 572 } 573 alias GdkCursorType CursorType; 574 575 /** 576 * Describes the kind of window. 577 * GDK_WINDOW_ROOT 578 * root window; this window has no parent, covers the entire 579 * screen, and is created by the window system 580 * GDK_WINDOW_TOPLEVEL 581 * toplevel window (used to implement GtkWindow) 582 * GDK_WINDOW_CHILD 583 * child window (used to implement e.g. GtkEntry) 584 * GDK_WINDOW_TEMP 585 * override redirect temporary window (used to implement 586 * GtkMenu) 587 * GDK_WINDOW_FOREIGN 588 * foreign window (see gdk_window_foreign_new()) 589 * GDK_WINDOW_OFFSCREEN 590 * offscreen window (see 591 * the section called “Offscreen Windows”). Since 2.18 592 */ 593 public enum GdkWindowType 594 { 595 ROOT, 596 TOPLEVEL, 597 CHILD, 598 TEMP, 599 FOREIGN, 600 OFFSCREEN 601 } 602 alias GdkWindowType WindowType; 603 604 /** 605 * GDK_INPUT_OUTPUT windows are the standard kind of window you might expect. 606 * Such windows receive events and are also displayed on screen. 607 * GDK_INPUT_ONLY windows are invisible; they are usually placed above other 608 * windows in order to trap or filter the events. You can't draw on 609 * GDK_INPUT_ONLY windows. 610 * GDK_INPUT_OUTPUT 611 * window for graphics and events 612 * GDK_INPUT_ONLY 613 * window for events only 614 */ 615 public enum GdkWindowWindowClass 616 { 617 INPUT_OUTPUT, /+*< nick= input-output >+/ 618 INPUT_ONLY /+*< nick= input-only >+/ 619 } 620 alias GdkWindowWindowClass WindowWindowClass; 621 622 /** 623 * Used to indicate which fields of a GdkGeometry struct should be paid 624 * attention to. Also, the presence/absence of GDK_HINT_POS, 625 * GDK_HINT_USER_POS, and GDK_HINT_USER_SIZE is significant, though they don't 626 * directly refer to GdkGeometry fields. GDK_HINT_USER_POS will be set 627 * automatically by GtkWindow if you call gtk_window_move(). 628 * GDK_HINT_USER_POS and GDK_HINT_USER_SIZE should be set if the user 629 * specified a size/position using a --geometry command-line argument; 630 * gtk_window_parse_geometry() automatically sets these flags. 631 * GDK_HINT_POS 632 * indicates that the program has positioned the window 633 * GDK_HINT_MIN_SIZE 634 * min size fields are set 635 * GDK_HINT_MAX_SIZE 636 * max size fields are set 637 * GDK_HINT_BASE_SIZE 638 * base size fields are set 639 * GDK_HINT_ASPECT 640 * aspect ratio fields are set 641 * GDK_HINT_RESIZE_INC 642 * resize increment fields are set 643 * GDK_HINT_WIN_GRAVITY 644 * window gravity field is set 645 * GDK_HINT_USER_POS 646 * indicates that the window's position was explicitly set 647 * by the user 648 * GDK_HINT_USER_SIZE 649 * indicates that the window's size was explicitly set by 650 * the user 651 */ 652 public enum GdkWindowHints 653 { 654 HINT_POS = 1 << 0, 655 HINT_MIN_SIZE = 1 << 1, 656 HINT_MAX_SIZE = 1 << 2, 657 HINT_BASE_SIZE = 1 << 3, 658 HINT_ASPECT = 1 << 4, 659 HINT_RESIZE_INC = 1 << 5, 660 HINT_WIN_GRAVITY = 1 << 6, 661 HINT_USER_POS = 1 << 7, 662 HINT_USER_SIZE = 1 << 8 663 } 664 alias GdkWindowHints WindowHints; 665 666 /** 667 * Defines the reference point of a window and the meaning of coordinates 668 * passed to gtk_window_move(). See gtk_window_move() and the "implementation 669 * notes" section of the 670 * Extended 671 * Window Manager Hints specification for more details. 672 * GDK_GRAVITY_NORTH_WEST 673 * the reference point is at the top left corner. 674 * GDK_GRAVITY_NORTH 675 * the reference point is in the middle of the top edge. 676 * GDK_GRAVITY_NORTH_EAST 677 * the reference point is at the top right corner. 678 * GDK_GRAVITY_WEST 679 * the reference point is at the middle of the left edge. 680 * GDK_GRAVITY_CENTER 681 * the reference point is at the center of the window. 682 * GDK_GRAVITY_EAST 683 * the reference point is at the middle of the right edge. 684 * GDK_GRAVITY_SOUTH_WEST 685 * the reference point is at the lower left corner. 686 * GDK_GRAVITY_SOUTH 687 * the reference point is at the middle of the lower edge. 688 * GDK_GRAVITY_SOUTH_EAST 689 * the reference point is at the lower right corner. 690 * GDK_GRAVITY_STATIC 691 * the reference point is at the top left corner of the 692 * window itself, ignoring window manager decorations. 693 */ 694 public enum GdkGravity 695 { 696 NORTH_WEST = 1, 697 NORTH, 698 NORTH_EAST, 699 WEST, 700 CENTER, 701 EAST, 702 SOUTH_WEST, 703 SOUTH, 704 SOUTH_EAST, 705 STATIC 706 } 707 alias GdkGravity Gravity; 708 709 /** 710 * Determines a window edge or corner. 711 * GDK_WINDOW_EDGE_NORTH_WEST 712 * the top left corner. 713 * GDK_WINDOW_EDGE_NORTH 714 * the top edge. 715 * GDK_WINDOW_EDGE_NORTH_EAST 716 * the top right corner. 717 * GDK_WINDOW_EDGE_WEST 718 * the left edge. 719 * GDK_WINDOW_EDGE_EAST 720 * the right edge. 721 * GDK_WINDOW_EDGE_SOUTH_WEST 722 * the lower left corner. 723 * GDK_WINDOW_EDGE_SOUTH 724 * the lower edge. 725 * GDK_WINDOW_EDGE_SOUTH_EAST 726 * the lower right corner. 727 */ 728 public enum GdkWindowEdge 729 { 730 NORTH_WEST, 731 NORTH, 732 NORTH_EAST, 733 WEST, 734 EAST, 735 SOUTH_WEST, 736 SOUTH, 737 SOUTH_EAST 738 } 739 alias GdkWindowEdge WindowEdge; 740 741 /** 742 * These are hints for the window manager that indicate what type of function 743 * the window has. The window manager can use this when determining decoration 744 * and behaviour of the window. The hint must be set before mapping the window. 745 * See the 746 * Extended 747 * Window Manager Hints specification for more details about 748 * window types. 749 * GDK_WINDOW_TYPE_HINT_NORMAL 750 * Normal toplevel window. 751 * GDK_WINDOW_TYPE_HINT_DIALOG 752 * Dialog window. 753 * GDK_WINDOW_TYPE_HINT_MENU 754 * Window used to implement a menu; GTK+ uses 755 * this hint only for torn-off menus, see GtkTearoffMenuItem. 756 * GDK_WINDOW_TYPE_HINT_TOOLBAR 757 * Window used to implement toolbars. 758 * GDK_WINDOW_TYPE_HINT_SPLASHSCREEN 759 * Window used to display a splash 760 * screen during application startup. 761 * GDK_WINDOW_TYPE_HINT_UTILITY 762 * Utility windows which are not detached 763 * toolbars or dialogs. 764 * GDK_WINDOW_TYPE_HINT_DOCK 765 * Used for creating dock or panel windows. 766 * GDK_WINDOW_TYPE_HINT_DESKTOP 767 * Used for creating the desktop background 768 * window. 769 * GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU 770 * A menu that belongs to a menubar. 771 * GDK_WINDOW_TYPE_HINT_POPUP_MENU 772 * A menu that does not belong to a menubar, 773 * e.g. a context menu. 774 * GDK_WINDOW_TYPE_HINT_TOOLTIP 775 * A tooltip. 776 * GDK_WINDOW_TYPE_HINT_NOTIFICATION 777 * A notification - typically a "bubble" 778 * that belongs to a status icon. 779 * GDK_WINDOW_TYPE_HINT_COMBO 780 * A popup from a combo box. 781 * GDK_WINDOW_TYPE_HINT_DND 782 * A window that is used to implement a DND cursor. 783 */ 784 public enum GdkWindowTypeHint 785 { 786 NORMAL, 787 DIALOG, 788 MENU, /+* Torn off menu +/ 789 TOOLBAR, 790 SPLASHSCREEN, 791 UTILITY, 792 DOCK, 793 DESKTOP, 794 DROPDOWN_MENU, /+* A drop down menu (from a menubar) +/ 795 POPUP_MENU, /+* A popup menu (from right-click) +/ 796 TOOLTIP, 797 NOTIFICATION, 798 COMBO, 799 DND 800 } 801 alias GdkWindowTypeHint WindowTypeHint; 802 803 /** 804 * Used to indicate which fields in the GdkWindowAttr struct should be honored. 805 * For example, if you filled in the "cursor" and "x" fields of GdkWindowAttr, 806 * pass "GDK_WA_X | GDK_WA_CURSOR" to gdk_window_new(). Fields in 807 * GdkWindowAttr not covered by a bit in this enum are required; for example, 808 * the width/height, wclass, and window_type fields are required, they have 809 * no corresponding flag in GdkWindowAttributesType. 810 * GDK_WA_TITLE 811 * Honor the title field 812 * GDK_WA_X 813 * Honor the X coordinate field 814 * GDK_WA_Y 815 * Honor the Y coordinate field 816 * GDK_WA_CURSOR 817 * Honor the cursor field 818 * GDK_WA_VISUAL 819 * Honor the visual field 820 * GDK_WA_WMCLASS 821 * Honor the wmclass_class and wmclass_name fields 822 * GDK_WA_NOREDIR 823 * Honor the override_redirect field 824 * GDK_WA_TYPE_HINT 825 * Honor the type_hint field 826 */ 827 public enum GdkWindowAttributesType 828 { 829 WA_TITLE = 1 << 1, 830 WA_X = 1 << 2, 831 WA_Y = 1 << 3, 832 WA_CURSOR = 1 << 4, 833 WA_VISUAL = 1 << 5, 834 WA_WMCLASS = 1 << 6, 835 WA_NOREDIR = 1 << 7, 836 WA_TYPE_HINT = 1 << 8 837 } 838 alias GdkWindowAttributesType WindowAttributesType; 839 840 /** 841 * Indicates which monitor (in a multi-head setup) a window should span over 842 * when in fullscreen mode. 843 * GDK_FULLSCREEN_ON_CURRENT_MONITOR 844 * Fullscreen on current monitor only. 845 * GDK_FULLSCREEN_ON_ALL_MONITORS 846 * Span across all monitors when fullscreen. 847 * Since 3.8 848 */ 849 public enum GdkFullscreenMode 850 { 851 ON_CURRENT_MONITOR, 852 ON_ALL_MONITORS 853 } 854 alias GdkFullscreenMode FullscreenMode; 855 856 /** 857 * Specifies the result of applying a GdkFilterFunc to a native event. 858 * GDK_FILTER_CONTINUE 859 * event not handled, continue processing. 860 * GDK_FILTER_TRANSLATE 861 * native event translated into a GDK event and stored 862 * in the event structure that was passed in. 863 * GDK_FILTER_REMOVE 864 * event handled, terminate processing. 865 */ 866 public enum GdkFilterReturn 867 { 868 CONTINUE, /+* Event not handled, continu processesing +/ 869 TRANSLATE, /+* Native event translated into a GDK event and 870 stored inn the "event" structure that was 871 passed inn +/ 872 REMOVE /+* Terminate processing, removing event +/ 873 } 874 alias GdkFilterReturn FilterReturn; 875 876 /** 877 * A set of bit-flags to indicate the state of modifier keys and mouse buttons 878 * in various event types. Typical modifier keys are Shift, Control, Meta, 879 * Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock. 880 * Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons. 881 * Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped 882 * to Mod2 - Mod5, and indicates this by setting GDK_SUPER_MASK, 883 * GDK_HYPER_MASK or GDK_META_MASK in the state field of key events. 884 * Note that GDK may add internal values to events which include 885 * reserved values such as GDK_MODIFIER_RESERVED_13_MASK. Your code 886 * should preserve and ignore them. You can use GDK_MODIFIER_MASK to 887 * remove all reserved values. 888 * GDK_SHIFT_MASK 889 * the Shift key. 890 * GDK_LOCK_MASK 891 * a Lock key (depending on the modifier mapping of the 892 * X server this may either be CapsLock or ShiftLock). 893 * GDK_CONTROL_MASK 894 * the Control key. 895 * GDK_MOD1_MASK 896 * the fourth modifier key (it depends on the modifier 897 * mapping of the X server which key is interpreted as this modifier, but 898 * normally it is the Alt key). 899 * GDK_MOD2_MASK 900 * the fifth modifier key (it depends on the modifier 901 * mapping of the X server which key is interpreted as this modifier). 902 * GDK_MOD3_MASK 903 * the sixth modifier key (it depends on the modifier 904 * mapping of the X server which key is interpreted as this modifier). 905 * GDK_MOD4_MASK 906 * the seventh modifier key (it depends on the modifier 907 * mapping of the X server which key is interpreted as this modifier). 908 * GDK_MOD5_MASK 909 * the eighth modifier key (it depends on the modifier 910 * mapping of the X server which key is interpreted as this modifier). 911 * GDK_BUTTON1_MASK 912 * the first mouse button. 913 * GDK_BUTTON2_MASK 914 * the second mouse button. 915 * GDK_BUTTON3_MASK 916 * the third mouse button. 917 * GDK_BUTTON4_MASK 918 * the fourth mouse button. 919 * GDK_BUTTON5_MASK 920 * the fifth mouse button. 921 * GDK_MODIFIER_RESERVED_13_MASK 922 * A reserved bit flag; do not use in your own code 923 * GDK_MODIFIER_RESERVED_14_MASK 924 * GDK_MODIFIER_RESERVED_15_MASK 925 * GDK_MODIFIER_RESERVED_16_MASK 926 * GDK_MODIFIER_RESERVED_17_MASK 927 * GDK_MODIFIER_RESERVED_18_MASK 928 * GDK_MODIFIER_RESERVED_19_MASK 929 * GDK_MODIFIER_RESERVED_20_MASK 930 * GDK_MODIFIER_RESERVED_21_MASK 931 * GDK_MODIFIER_RESERVED_22_MASK 932 * GDK_MODIFIER_RESERVED_23_MASK 933 * GDK_MODIFIER_RESERVED_24_MASK 934 * GDK_MODIFIER_RESERVED_25_MASK 935 * GDK_SUPER_MASK 936 * the Super modifier. Since 2.10 937 * GDK_HYPER_MASK 938 * the Hyper modifier. Since 2.10 939 * GDK_META_MASK 940 * the Meta modifier. Since 2.10 941 * GDK_MODIFIER_RESERVED_29_MASK 942 * GDK_RELEASE_MASK 943 * not used in GDK itself. GTK+ uses it to differentiate 944 * between (keyval, modifiers) pairs from key press and release events. 945 * GDK_MODIFIER_MASK 946 * a mask covering all modifier types. 947 */ 948 public enum GdkModifierType 949 { 950 SHIFT_MASK = 1 << 0, 951 LOCK_MASK = 1 << 1, 952 CONTROL_MASK = 1 << 2, 953 MOD1_MASK = 1 << 3, 954 MOD2_MASK = 1 << 4, 955 MOD3_MASK = 1 << 5, 956 MOD4_MASK = 1 << 6, 957 MOD5_MASK = 1 << 7, 958 BUTTON1_MASK = 1 << 8, 959 BUTTON2_MASK = 1 << 9, 960 BUTTON3_MASK = 1 << 10, 961 BUTTON4_MASK = 1 << 11, 962 BUTTON5_MASK = 1 << 12, 963 MODIFIER_RESERVED_13_MASK = 1 << 13, 964 MODIFIER_RESERVED_14_MASK = 1 << 14, 965 MODIFIER_RESERVED_15_MASK = 1 << 15, 966 MODIFIER_RESERVED_16_MASK = 1 << 16, 967 MODIFIER_RESERVED_17_MASK = 1 << 17, 968 MODIFIER_RESERVED_18_MASK = 1 << 18, 969 MODIFIER_RESERVED_19_MASK = 1 << 19, 970 MODIFIER_RESERVED_20_MASK = 1 << 20, 971 MODIFIER_RESERVED_21_MASK = 1 << 21, 972 MODIFIER_RESERVED_22_MASK = 1 << 22, 973 MODIFIER_RESERVED_23_MASK = 1 << 23, 974 MODIFIER_RESERVED_24_MASK = 1 << 24, 975 MODIFIER_RESERVED_25_MASK = 1 << 25, 976 /+* The next few modifiers are used by XKB, so we skip to the end. 977 * Bits 15 - 25 are currently unused. Bit 29 is used internally. 978 +/ 979 SUPER_MASK = 1 << 26, 980 HYPER_MASK = 1 << 27, 981 META_MASK = 1 << 28, 982 MODIFIER_RESERVED_29_MASK = 1 << 29, 983 RELEASE_MASK = 1 << 30, 984 /+* Combination of SHIFT_MASK..BUTTON5_MASK + SUPER_MASK 985 + HYPER_MASK + META_MASK + RELEASE_MASK +/ 986 MODIFIER_MASK = 0x5c001fff 987 } 988 alias GdkModifierType ModifierType; 989 990 /** 991 * These are hints originally defined by the Motif toolkit. 992 * The window manager can use them when determining how to decorate 993 * the window. The hint must be set before mapping the window. 994 * GDK_DECOR_ALL 995 * all decorations should be applied. 996 * GDK_DECOR_BORDER 997 * a frame should be drawn around the window. 998 * GDK_DECOR_RESIZEH 999 * the frame should have resize handles. 1000 * GDK_DECOR_TITLE 1001 * a titlebar should be placed above the window. 1002 * GDK_DECOR_MENU 1003 * a button for opening a menu should be included. 1004 * GDK_DECOR_MINIMIZE 1005 * a minimize button should be included. 1006 * GDK_DECOR_MAXIMIZE 1007 * a maximize button should be included. 1008 */ 1009 public enum GdkWMDecoration 1010 { 1011 DECOR_ALL = 1 << 0, 1012 DECOR_BORDER = 1 << 1, 1013 DECOR_RESIZEH = 1 << 2, 1014 DECOR_TITLE = 1 << 3, 1015 DECOR_MENU = 1 << 4, 1016 DECOR_MINIMIZE = 1 << 5, 1017 DECOR_MAXIMIZE = 1 << 6 1018 } 1019 alias GdkWMDecoration WMDecoration; 1020 1021 /** 1022 * These are hints originally defined by the Motif toolkit. The window manager 1023 * can use them when determining the functions to offer for the window. The 1024 * hint must be set before mapping the window. 1025 * GDK_FUNC_ALL 1026 * all functions should be offered. 1027 * GDK_FUNC_RESIZE 1028 * the window should be resizable. 1029 * GDK_FUNC_MOVE 1030 * the window should be movable. 1031 * GDK_FUNC_MINIMIZE 1032 * the window should be minimizable. 1033 * GDK_FUNC_MAXIMIZE 1034 * the window should be maximizable. 1035 * GDK_FUNC_CLOSE 1036 * the window should be closable. 1037 */ 1038 public enum GdkWMFunction 1039 { 1040 FUNC_ALL = 1 << 0, 1041 FUNC_RESIZE = 1 << 1, 1042 FUNC_MOVE = 1 << 2, 1043 FUNC_MINIMIZE = 1 << 3, 1044 FUNC_MAXIMIZE = 1 << 4, 1045 FUNC_CLOSE = 1 << 5 1046 } 1047 alias GdkWMFunction WMFunction; 1048 1049 /** 1050 * GdkFrameClockPhase is used to represent the different paint clock 1051 * phases that can be requested. The elements of the enumeration 1052 * correspond to the signals of GdkPaintClock. 1053 * GDK_FRAME_CLOCK_PHASE_NONE 1054 * no phase 1055 * GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS 1056 * corresponds to GdkFrameClock::flush-events. Should not be handled by applications. 1057 * GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT 1058 * corresponds to GdkFrameClock::before-paint. Should not be handled by applications. 1059 * GDK_FRAME_CLOCK_PHASE_UPDATE 1060 * corresponds to GdkFrameClock::update. 1061 * GDK_FRAME_CLOCK_PHASE_LAYOUT 1062 * corresponds to GdkFrameClock::layout. 1063 * GDK_FRAME_CLOCK_PHASE_PAINT 1064 * corresponds to GdkFrameClock::paint. 1065 * GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS 1066 * corresponds to GdkFrameClock::resume-events. Should not be handled by applications. 1067 * GDK_FRAME_CLOCK_PHASE_AFTER_PAINT 1068 * corresponds to GdkFrameClock::after-paint. Should not be handled by applications. 1069 * Since 3.8 1070 */ 1071 public enum GdkFrameClockPhase 1072 { 1073 NONE = 0, 1074 FLUSH_EVENTS = 1 << 0, 1075 BEFORE_PAINT = 1 << 1, 1076 UPDATE = 1 << 2, 1077 LAYOUT = 1 << 3, 1078 PAINT = 1 << 4, 1079 RESUME_EVENTS = 1 << 5, 1080 AFTER_PAINT = 1 << 6 1081 } 1082 alias GdkFrameClockPhase FrameClockPhase; 1083 1084 /** 1085 * Specifies the type of the event. 1086 * Do not confuse these events with the signals that GTK+ widgets emit. 1087 * Although many of these events result in corresponding signals being emitted, 1088 * the events are often transformed or filtered along the way. 1089 * In some language bindings, the values GDK_2BUTTON_PRESS and 1090 * GDK_3BUTTON_PRESS would translate into something syntactically 1091 * invalid (eg Gdk.EventType.2ButtonPress, where a 1092 * symbol is not allowed to start with a number). In that case, the 1093 * aliases GDK_DOUBLE_BUTTON_PRESS and GDK_TRIPLE_BUTTON_PRESS can 1094 * be used instead. 1095 * GDK_NOTHING 1096 * a special code to indicate a null event. 1097 * GDK_DELETE 1098 * the window manager has requested that the toplevel window be 1099 * hidden or destroyed, usually when the user clicks on a special icon in the 1100 * title bar. 1101 * GDK_DESTROY 1102 * the window has been destroyed. 1103 * GDK_EXPOSE 1104 * all or part of the window has become visible and needs to be 1105 * redrawn. 1106 * GDK_MOTION_NOTIFY 1107 * the pointer (usually a mouse) has moved. 1108 * GDK_BUTTON_PRESS 1109 * a mouse button has been pressed. 1110 * GDK_2BUTTON_PRESS 1111 * a mouse button has been double-clicked (clicked twice 1112 * within a short period of time). Note that each click also generates a 1113 * GDK_BUTTON_PRESS event. 1114 * GDK_DOUBLE_BUTTON_PRESS 1115 * alias for GDK_2BUTTON_PRESS, added in 3.6. 1116 * GDK_3BUTTON_PRESS 1117 * a mouse button has been clicked 3 times in a short period 1118 * of time. Note that each click also generates a GDK_BUTTON_PRESS event. 1119 * GDK_TRIPLE_BUTTON_PRESS 1120 * alias for GDK_3BUTTON_PRESS, added in 3.6. 1121 * GDK_BUTTON_RELEASE 1122 * a mouse button has been released. 1123 * GDK_KEY_PRESS 1124 * a key has been pressed. 1125 * GDK_KEY_RELEASE 1126 * a key has been released. 1127 * GDK_ENTER_NOTIFY 1128 * the pointer has entered the window. 1129 * GDK_LEAVE_NOTIFY 1130 * the pointer has left the window. 1131 * GDK_FOCUS_CHANGE 1132 * the keyboard focus has entered or left the window. 1133 * GDK_CONFIGURE 1134 * the size, position or stacking order of the window has changed. 1135 * Note that GTK+ discards these events for GDK_WINDOW_CHILD windows. 1136 * GDK_MAP 1137 * the window has been mapped. 1138 * GDK_UNMAP 1139 * the window has been unmapped. 1140 * GDK_PROPERTY_NOTIFY 1141 * a property on the window has been changed or deleted. 1142 * GDK_SELECTION_CLEAR 1143 * the application has lost ownership of a selection. 1144 * GDK_SELECTION_REQUEST 1145 * another application has requested a selection. 1146 * GDK_SELECTION_NOTIFY 1147 * a selection has been received. 1148 * GDK_PROXIMITY_IN 1149 * an input device has moved into contact with a sensing 1150 * surface (e.g. a touchscreen or graphics tablet). 1151 * GDK_PROXIMITY_OUT 1152 * an input device has moved out of contact with a sensing 1153 * surface. 1154 * GDK_DRAG_ENTER 1155 * the mouse has entered the window while a drag is in progress. 1156 * GDK_DRAG_LEAVE 1157 * the mouse has left the window while a drag is in progress. 1158 * GDK_DRAG_MOTION 1159 * the mouse has moved in the window while a drag is in 1160 * progress. 1161 * GDK_DRAG_STATUS 1162 * the status of the drag operation initiated by the window 1163 * has changed. 1164 * GDK_DROP_START 1165 * a drop operation onto the window has started. 1166 * GDK_DROP_FINISHED 1167 * the drop operation initiated by the window has completed. 1168 * GDK_CLIENT_EVENT 1169 * a message has been received from another application. 1170 * GDK_VISIBILITY_NOTIFY 1171 * the window visibility status has changed. 1172 * GDK_SCROLL 1173 * the scroll wheel was turned 1174 * GDK_WINDOW_STATE 1175 * the state of a window has changed. See GdkWindowState 1176 * for the possible window states 1177 * GDK_SETTING 1178 * a setting has been modified. 1179 * GDK_OWNER_CHANGE 1180 * the owner of a selection has changed. This event type 1181 * was added in 2.6 1182 * GDK_GRAB_BROKEN 1183 * a pointer or keyboard grab was broken. This event type 1184 * was added in 2.8. 1185 * GDK_DAMAGE 1186 * the content of the window has been changed. This event type 1187 * was added in 2.14. 1188 * GDK_TOUCH_BEGIN 1189 * A new touch event sequence has just started. This event 1190 * type was added in 3.4. 1191 * GDK_TOUCH_UPDATE 1192 * A touch event sequence has been updated. This event type 1193 * was added in 3.4. 1194 * GDK_TOUCH_END 1195 * A touch event sequence has finished. This event type 1196 * was added in 3.4. 1197 * GDK_TOUCH_CANCEL 1198 * A touch event sequence has been canceled. This event type 1199 * was added in 3.4. 1200 * GDK_EVENT_LAST 1201 * marks the end of the GdkEventType enumeration. Added in 2.18 1202 */ 1203 public enum GdkEventType 1204 { 1205 NOTHING = -1, 1206 DELETE = 0, 1207 DESTROY = 1, 1208 EXPOSE = 2, 1209 MOTION_NOTIFY = 3, 1210 BUTTON_PRESS = 4, 1211 1212 DOUBLE_BUTTON_PRESS = 5, 1213 1214 TRIPLE_BUTTON_PRESS = 6, 1215 BUTTON_RELEASE = 7, 1216 KEY_PRESS = 8, 1217 KEY_RELEASE = 9, 1218 ENTER_NOTIFY = 10, 1219 LEAVE_NOTIFY = 11, 1220 FOCUS_CHANGE = 12, 1221 CONFIGURE = 13, 1222 MAP = 14, 1223 UNMAP = 15, 1224 PROPERTY_NOTIFY = 16, 1225 SELECTION_CLEAR = 17, 1226 SELECTION_REQUEST = 18, 1227 SELECTION_NOTIFY = 19, 1228 PROXIMITY_IN = 20, 1229 PROXIMITY_OUT = 21, 1230 DRAG_ENTER = 22, 1231 DRAG_LEAVE = 23, 1232 DRAG_MOTION = 24, 1233 DRAG_STATUS = 25, 1234 DROP_START = 26, 1235 DROP_FINISHED = 27, 1236 CLIENT_EVENT = 28, 1237 VISIBILITY_NOTIFY = 29, 1238 SCROLL = 31, 1239 WINDOW_STATE = 32, 1240 SETTING = 33, 1241 OWNER_CHANGE = 34, 1242 GRAB_BROKEN = 35, 1243 DAMAGE = 36, 1244 TOUCH_BEGIN = 37, 1245 TOUCH_UPDATE = 38, 1246 TOUCH_END = 39, 1247 TOUCH_CANCEL = 40, 1248 EVENT_LAST /+* helper variable for decls +/ 1249 } 1250 alias GdkEventType EventType; 1251 1252 /** 1253 * A set of bit-flags to indicate which events a window is to receive. 1254 * Most of these masks map onto one or more of the GdkEventType event types 1255 * above. 1256 * GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the 1257 * number of GDK_MOTION_NOTIFY events received. Normally a GDK_MOTION_NOTIFY 1258 * event is received each time the mouse moves. However, if the application 1259 * spends a lot of time processing the event (updating the display, for example), 1260 * it can lag behind the position of the mouse. When using 1261 * GDK_POINTER_MOTION_HINT_MASK, fewer GDK_MOTION_NOTIFY events will be sent, 1262 * some of which are marked as a hint (the is_hint member is TRUE). 1263 * To receive more motion events after a motion hint event, the application 1264 * needs to asks for more, by calling gdk_event_request_motions(). 1265 * If GDK_TOUCH_MASK is enabled, the window will receive touch events 1266 * from touch-enabled devices. Those will come as sequences of GdkEventTouch 1267 * with type GDK_TOUCH_UPDATE, enclosed by two events with 1268 * type GDK_TOUCH_BEGIN and GDK_TOUCH_END (or GDK_TOUCH_CANCEL). 1269 * gdk_event_get_event_sequence() returns the event sequence for these 1270 * events, so different sequences may be distinguished. 1271 * GDK_EXPOSURE_MASK 1272 * receive expose events 1273 * GDK_POINTER_MOTION_MASK 1274 * receive all pointer motion events 1275 * GDK_POINTER_MOTION_HINT_MASK 1276 * see the explanation above 1277 * GDK_BUTTON_MOTION_MASK 1278 * receive pointer motion events while any button is pressed 1279 * GDK_BUTTON1_MOTION_MASK 1280 * receive pointer motion events while 1 button is pressed 1281 * GDK_BUTTON2_MOTION_MASK 1282 * receive pointer motion events while 2 button is pressed 1283 * GDK_BUTTON3_MOTION_MASK 1284 * receive pointer motion events while 3 button is pressed 1285 * GDK_BUTTON_PRESS_MASK 1286 * receive button press events 1287 * GDK_BUTTON_RELEASE_MASK 1288 * receive button release events 1289 * GDK_KEY_PRESS_MASK 1290 * receive key press events 1291 * GDK_KEY_RELEASE_MASK 1292 * receive key release events 1293 * GDK_ENTER_NOTIFY_MASK 1294 * receive window enter events 1295 * GDK_LEAVE_NOTIFY_MASK 1296 * receive window leave events 1297 * GDK_FOCUS_CHANGE_MASK 1298 * receive focus change events 1299 * GDK_STRUCTURE_MASK 1300 * receive events about window configuration change 1301 * GDK_PROPERTY_CHANGE_MASK 1302 * receive property change events 1303 * GDK_VISIBILITY_NOTIFY_MASK 1304 * receive visibility change events 1305 * GDK_PROXIMITY_IN_MASK 1306 * receive proximity in events 1307 * GDK_PROXIMITY_OUT_MASK 1308 * receive proximity out events 1309 * GDK_SUBSTRUCTURE_MASK 1310 * receive events about window configuration changes of 1311 * child windows 1312 * GDK_SCROLL_MASK 1313 * receive scroll events 1314 * GDK_TOUCH_MASK 1315 * receive touch events. Since 3.4 1316 * GDK_SMOOTH_SCROLL_MASK 1317 * receive smooth scrolling events. Since 3.4 1318 * GDK_ALL_EVENTS_MASK 1319 * the combination of all the above event masks. 1320 */ 1321 public enum GdkEventMask 1322 { 1323 EXPOSURE_MASK = 1 << 1, 1324 POINTER_MOTION_MASK = 1 << 2, 1325 POINTER_MOTION_HINT_MASK = 1 << 3, 1326 BUTTON_MOTION_MASK = 1 << 4, 1327 BUTTON1_MOTION_MASK = 1 << 5, 1328 BUTTON2_MOTION_MASK = 1 << 6, 1329 BUTTON3_MOTION_MASK = 1 << 7, 1330 BUTTON_PRESS_MASK = 1 << 8, 1331 BUTTON_RELEASE_MASK = 1 << 9, 1332 KEY_PRESS_MASK = 1 << 10, 1333 KEY_RELEASE_MASK = 1 << 11, 1334 ENTER_NOTIFY_MASK = 1 << 12, 1335 LEAVE_NOTIFY_MASK = 1 << 13, 1336 FOCUS_CHANGE_MASK = 1 << 14, 1337 STRUCTURE_MASK = 1 << 15, 1338 PROPERTY_CHANGE_MASK = 1 << 16, 1339 VISIBILITY_NOTIFY_MASK = 1 << 17, 1340 PROXIMITY_IN_MASK = 1 << 18, 1341 PROXIMITY_OUT_MASK = 1 << 19, 1342 SUBSTRUCTURE_MASK = 1 << 20, 1343 SCROLL_MASK = 1 << 21, 1344 TOUCH_MASK = 1 << 22, 1345 SMOOTH_SCROLL_MASK = 1 << 23, 1346 ALL_EVENTS_MASK = 0xFFFFFE 1347 } 1348 alias GdkEventMask EventMask; 1349 1350 /** 1351 * Specifies the direction for GdkEventScroll. 1352 * GDK_SCROLL_UP 1353 * the window is scrolled up. 1354 * GDK_SCROLL_DOWN 1355 * the window is scrolled down. 1356 * GDK_SCROLL_LEFT 1357 * the window is scrolled to the left. 1358 * GDK_SCROLL_RIGHT 1359 * the window is scrolled to the right. 1360 * GDK_SCROLL_SMOOTH 1361 * the scrolling is determined by the delta values 1362 * in GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4 1363 */ 1364 public enum GdkScrollDirection 1365 { 1366 UP, 1367 DOWN, 1368 LEFT, 1369 RIGHT, 1370 SMOOTH 1371 } 1372 alias GdkScrollDirection ScrollDirection; 1373 1374 /** 1375 * Specifies the visiblity status of a window for a GdkEventVisibility. 1376 * GDK_VISIBILITY_UNOBSCURED 1377 * the window is completely visible. 1378 * GDK_VISIBILITY_PARTIAL 1379 * the window is partially visible. 1380 * GDK_VISIBILITY_FULLY_OBSCURED 1381 * the window is not visible at all. 1382 */ 1383 public enum GdkVisibilityState 1384 { 1385 UNOBSCURED, 1386 PARTIAL, 1387 FULLY_OBSCURED 1388 } 1389 alias GdkVisibilityState VisibilityState; 1390 1391 /** 1392 * Specifies the crossing mode for GdkEventCrossing. 1393 * GDK_CROSSING_NORMAL 1394 * crossing because of pointer motion. 1395 * GDK_CROSSING_GRAB 1396 * crossing because a grab is activated. 1397 * GDK_CROSSING_UNGRAB 1398 * crossing because a grab is deactivated. 1399 * GDK_CROSSING_GTK_GRAB 1400 * crossing because a GTK+ grab is activated. 1401 * GDK_CROSSING_GTK_UNGRAB 1402 * crossing because a GTK+ grab is deactivated. 1403 * GDK_CROSSING_STATE_CHANGED 1404 * crossing because a GTK+ widget changed 1405 * state (e.g. sensitivity). 1406 * GDK_CROSSING_TOUCH_BEGIN 1407 * crossing because a touch sequence has begun, 1408 * this event is synthetic as the pointer might have not left the window. 1409 * GDK_CROSSING_TOUCH_END 1410 * crossing because a touch sequence has ended, 1411 * this event is synthetic as the pointer might have not left the window. 1412 * GDK_CROSSING_DEVICE_SWITCH 1413 * crossing because of a device switch (i.e. 1414 * a mouse taking control of the pointer after a touch device), this event 1415 * is synthetic as the pointer didn't leave the window. 1416 */ 1417 public enum GdkCrossingMode 1418 { 1419 NORMAL, 1420 GRAB, 1421 UNGRAB, 1422 GTK_GRAB, 1423 GTK_UNGRAB, 1424 STATE_CHANGED, 1425 TOUCH_BEGIN, 1426 TOUCH_END, 1427 DEVICE_SWITCH 1428 } 1429 alias GdkCrossingMode CrossingMode; 1430 1431 /** 1432 * Specifies the kind of crossing for GdkEventCrossing. 1433 * See the X11 protocol specification of LeaveNotify for 1434 * full details of crossing event generation. 1435 * GDK_NOTIFY_ANCESTOR 1436 * the window is entered from an ancestor or 1437 * left towards an ancestor. 1438 * GDK_NOTIFY_VIRTUAL 1439 * the pointer moves between an ancestor and an 1440 * inferior of the window. 1441 * GDK_NOTIFY_INFERIOR 1442 * the window is entered from an inferior or 1443 * left towards an inferior. 1444 * GDK_NOTIFY_NONLINEAR 1445 * the window is entered from or left towards 1446 * a window which is neither an ancestor nor an inferior. 1447 * GDK_NOTIFY_NONLINEAR_VIRTUAL 1448 * the pointer moves between two windows 1449 * which are not ancestors of each other and the window is part of 1450 * the ancestor chain between one of these windows and their least 1451 * common ancestor. 1452 * GDK_NOTIFY_UNKNOWN 1453 * an unknown type of enter/leave event occurred. 1454 */ 1455 public enum GdkNotifyType 1456 { 1457 ANCESTOR = 0, 1458 VIRTUAL = 1, 1459 INFERIOR = 2, 1460 NONLINEAR = 3, 1461 NONLINEAR_VIRTUAL = 4, 1462 UNKNOWN = 5 1463 } 1464 alias GdkNotifyType NotifyType; 1465 1466 /** 1467 * Specifies the type of a property change for a GdkEventProperty. 1468 * GDK_PROPERTY_NEW_VALUE 1469 * the property value was changed. 1470 * GDK_PROPERTY_DELETE 1471 * the property was deleted. 1472 */ 1473 public enum GdkPropertyState 1474 { 1475 NEW_VALUE, 1476 DELETE 1477 } 1478 alias GdkPropertyState PropertyState; 1479 1480 /** 1481 * Specifies the state of a toplevel window. 1482 * GDK_WINDOW_STATE_WITHDRAWN 1483 * the window is not shown. 1484 * GDK_WINDOW_STATE_ICONIFIED 1485 * the window is minimized. 1486 * GDK_WINDOW_STATE_MAXIMIZED 1487 * the window is maximized. 1488 * GDK_WINDOW_STATE_STICKY 1489 * the window is sticky. 1490 * GDK_WINDOW_STATE_FULLSCREEN 1491 * the window is maximized without 1492 * decorations. 1493 * GDK_WINDOW_STATE_ABOVE 1494 * the window is kept above other windows. 1495 * GDK_WINDOW_STATE_BELOW 1496 * the window is kept below other windows. 1497 * GDK_WINDOW_STATE_FOCUSED 1498 * the window is presented as focused (with active decorations). 1499 * GDK_WINDOW_STATE_TILED 1500 */ 1501 public enum GdkWindowState 1502 { 1503 WITHDRAWN = 1 << 0, 1504 ICONIFIED = 1 << 1, 1505 MAXIMIZED = 1 << 2, 1506 STICKY = 1 << 3, 1507 FULLSCREEN = 1 << 4, 1508 ABOVE = 1 << 5, 1509 BELOW = 1 << 6, 1510 FOCUSED = 1 << 7, 1511 TILED = 1 << 8 1512 } 1513 alias GdkWindowState WindowState; 1514 1515 /** 1516 * Specifies the kind of modification applied to a setting in a 1517 * GdkEventSetting. 1518 * GDK_SETTING_ACTION_NEW 1519 * a setting was added. 1520 * GDK_SETTING_ACTION_CHANGED 1521 * a setting was changed. 1522 * GDK_SETTING_ACTION_DELETED 1523 * a setting was deleted. 1524 */ 1525 public enum GdkSettingAction 1526 { 1527 NEW, 1528 CHANGED, 1529 DELETED 1530 } 1531 alias GdkSettingAction SettingAction; 1532 1533 /** 1534 * Specifies why a selection ownership was changed. 1535 * GDK_OWNER_CHANGE_NEW_OWNER 1536 * some other app claimed the ownership 1537 * GDK_OWNER_CHANGE_DESTROY 1538 * the window was destroyed 1539 * GDK_OWNER_CHANGE_CLOSE 1540 * the client was closed 1541 */ 1542 public enum GdkOwnerChange 1543 { 1544 NEW_OWNER, 1545 DESTROY, 1546 CLOSE 1547 } 1548 alias GdkOwnerChange OwnerChange; 1549 1550 /** 1551 * Used in GdkDragContext to indicate the protocol according to 1552 * which DND is done. 1553 * GDK_DRAG_PROTO_NONE 1554 * no protocol. 1555 * GDK_DRAG_PROTO_MOTIF 1556 * The Motif DND protocol. No longer supported 1557 * GDK_DRAG_PROTO_XDND 1558 * The Xdnd protocol. 1559 * GDK_DRAG_PROTO_ROOTWIN 1560 * An extension to the Xdnd protocol for 1561 * unclaimed root window drops. 1562 * GDK_DRAG_PROTO_WIN32_DROPFILES 1563 * The simple WM_DROPFILES protocol. 1564 * GDK_DRAG_PROTO_OLE2 1565 * The complex OLE2 DND protocol (not implemented). 1566 * GDK_DRAG_PROTO_LOCAL 1567 * Intra-application DND. 1568 */ 1569 public enum GdkDragProtocol 1570 { 1571 NONE = 0, 1572 MOTIF, 1573 XDND, 1574 ROOTWIN, 1575 WIN32_DROPFILES, 1576 OLE2, 1577 LOCAL 1578 } 1579 alias GdkDragProtocol DragProtocol; 1580 1581 /** 1582 * Used in GdkDragContext to indicate what the destination 1583 * should do with the dropped data. 1584 * GDK_ACTION_DEFAULT 1585 * Means nothing, and should not be used. 1586 * GDK_ACTION_COPY 1587 * Copy the data. 1588 * GDK_ACTION_MOVE 1589 * Move the data, i.e. first copy it, then delete 1590 * it from the source using the DELETE target of the X selection protocol. 1591 * GDK_ACTION_LINK 1592 * Add a link to the data. Note that this is only 1593 * useful if source and destination agree on what it means. 1594 * GDK_ACTION_PRIVATE 1595 * Special action which tells the source that the 1596 * destination will do something that the source doesn't understand. 1597 * GDK_ACTION_ASK 1598 * Ask the user what to do with the data. 1599 */ 1600 public enum GdkDragAction 1601 { 1602 ACTION_DEFAULT = 1 << 0, 1603 ACTION_COPY = 1 << 1, 1604 ACTION_MOVE = 1 << 2, 1605 ACTION_LINK = 1 << 3, 1606 ACTION_PRIVATE = 1 << 4, 1607 ACTION_ASK = 1 << 5 1608 } 1609 alias GdkDragAction DragAction; 1610 1611 /** 1612 * Describes how existing data is combined with new data when 1613 * using gdk_property_change(). 1614 * GDK_PROP_MODE_REPLACE 1615 * the new data replaces the existing data. 1616 * GDK_PROP_MODE_PREPEND 1617 * the new data is prepended to the existing data. 1618 * GDK_PROP_MODE_APPEND 1619 * the new data is appended to the existing data. 1620 */ 1621 public enum GdkPropMode 1622 { 1623 MODE_REPLACE, 1624 MODE_PREPEND, 1625 MODE_APPEND 1626 } 1627 alias GdkPropMode PropMode; 1628 1629 /** 1630 * An opaque type representing a string as an index into a table 1631 * of strings on the X server. 1632 */ 1633 alias _GdkAtom* GdkAtom; 1634 public struct _GdkAtom; 1635 1636 /** 1637 * Main Gtk struct. 1638 */ 1639 public struct GdkDisplayManager{} 1640 1641 1642 /** 1643 * Main Gtk struct. 1644 */ 1645 public struct GdkDisplay{} 1646 1647 1648 /** 1649 * Main Gtk struct. 1650 */ 1651 public struct GdkScreen{} 1652 1653 1654 /** 1655 * Main Gtk struct. 1656 */ 1657 public struct GdkDeviceManager{} 1658 1659 1660 /** 1661 * Main Gtk struct. 1662 */ 1663 public struct GdkDevice{} 1664 1665 1666 /** 1667 * The GdkTimeCoord structure stores a single event in a motion history. 1668 * guint32 time; 1669 * The timestamp for this event. 1670 * gdouble axes[GDK_MAX_TIMECOORD_AXES]; 1671 * the values of the device's axes. 1672 */ 1673 public struct GdkTimeCoord 1674 { 1675 uint time; 1676 double axes[GDK_MAX_TIMECOORD_AXES]; 1677 } 1678 1679 1680 /** 1681 * Defines the x and y coordinates of a point. 1682 * gint x; 1683 * the x coordinate of the point. 1684 * gint y; 1685 * the y coordinate of the point. 1686 */ 1687 public struct GdkPoint 1688 { 1689 int x; 1690 int y; 1691 } 1692 1693 1694 /** 1695 * Main Gtk struct. 1696 * This is the main structure in the gdk-pixbuf; library. It is 1697 * used to represent images. It contains information about the 1698 * image's pixel data, its color space, bits per sample, width and 1699 * height, and the rowstride (the number of bytes between the start of 1700 * one row and the start of the next). 1701 */ 1702 public struct GdkPixbuf{} 1703 1704 1705 /** 1706 * Main Gtk struct. 1707 * The GdkColor structure is used to describe a color, 1708 * similar to the XColor struct used in the X11 drawing API. 1709 * guint32 pixel; 1710 * For allocated colors, the pixel value used to 1711 * draw this color on the screen. Not used anymore. 1712 * guint16 red; 1713 * The red component of the color. This is 1714 * a value between 0 and 65535, with 65535 indicating 1715 * full intensity 1716 * guint16 green; 1717 * The green component of the color 1718 * guint16 blue; 1719 * The blue component of the color 1720 */ 1721 public struct GdkColor 1722 { 1723 uint pixel; 1724 ushort red; 1725 ushort green; 1726 ushort blue; 1727 } 1728 1729 1730 /** 1731 * Main Gtk struct. 1732 * The GdkRGBA structure is used to represent a (possibly translucent) 1733 * color, in a way that is compatible with cairos notion of color. 1734 * gdouble red; 1735 * The intensity of the red channel from 0.0 to 1.0 inclusive 1736 * gdouble green; 1737 * The intensity of the green channel from 0.0 to 1.0 inclusive 1738 * gdouble blue; 1739 * The intensity of the blue channel from 0.0 to 1.0 inclusive 1740 * gdouble alpha; 1741 * The opacity of the color from 0.0 for completely translucent to 1742 * 1.0 for opaque 1743 */ 1744 public struct GdkRGBA 1745 { 1746 double red; 1747 double green; 1748 double blue; 1749 double alpha; 1750 } 1751 1752 1753 /** 1754 * Main Gtk struct. 1755 * The GdkVisual structure contains information about 1756 * a particular visual. 1757 */ 1758 public struct GdkVisual{} 1759 1760 1761 /** 1762 * Main Gtk struct. 1763 * The GdkCursor structure represents a cursor. Its contents are private. 1764 */ 1765 public struct GdkCursor{} 1766 1767 1768 /** 1769 * Main Gtk struct. 1770 */ 1771 public struct GdkWindow{} 1772 1773 1774 /** 1775 * The GdkGeometry struct gives the window manager information about 1776 * a window's geometry constraints. Normally you would set these on 1777 * the GTK+ level using gtk_window_set_geometry_hints(). GtkWindow 1778 * then sets the hints on the GdkWindow it creates. 1779 * gdk_window_set_geometry_hints() expects the hints to be fully valid already 1780 * and simply passes them to the window manager; in contrast, 1781 * gtk_window_set_geometry_hints() performs some interpretation. For example, 1782 * GtkWindow will apply the hints to the geometry widget instead of the 1783 * toplevel window, if you set a geometry widget. Also, the 1784 * min_width/min_height/max_width/max_height fields may be set to -1, and 1785 * GtkWindow will substitute the size request of the window or geometry widget. 1786 * If the minimum size hint is not provided, GtkWindow will use its requisition 1787 * as the minimum size. If the minimum size is provided and a geometry widget is 1788 * set, GtkWindow will take the minimum size as the minimum size of the 1789 * geometry widget rather than the entire window. The base size is treated 1790 * similarly. 1791 * The canonical use-case for gtk_window_set_geometry_hints() is to get a 1792 * terminal widget to resize properly. Here, the terminal text area should be 1793 * the geometry widget; GtkWindow will then automatically set the base size to 1794 * the size of other widgets in the terminal window, such as the menubar and 1795 * scrollbar. Then, the width_inc and height_inc fields should be set to the 1796 * size of one character in the terminal. Finally, the base size should be set 1797 * to the size of one character. The net effect is that the minimum size of the 1798 * terminal will have a 1x1 character terminal area, and only terminal sizes on 1799 * the "character grid" will be allowed. 1800 * Here's an example of how the terminal example would be implemented, assuming 1801 * a terminal area widget called "terminal" and a toplevel window "toplevel": 1802 * $(DDOC_COMMENT example) 1803 * The other useful fields are the min_aspect and max_aspect fields; these 1804 * contain a width/height ratio as a floating point number. If a geometry widget 1805 * is set, the aspect applies to the geometry widget rather than the entire 1806 * window. The most common use of these hints is probably to set min_aspect and 1807 * max_aspect to the same value, thus forcing the window to keep a constant 1808 * aspect ratio. 1809 * gint min_width; 1810 * minimum width of window (or -1 to use requisition, with 1811 * GtkWindow only) 1812 * gint min_height; 1813 * minimum height of window (or -1 to use requisition, with 1814 * GtkWindow only) 1815 * gint max_width; 1816 * maximum width of window (or -1 to use requisition, with 1817 * GtkWindow only) 1818 * gint max_height; 1819 * maximum height of window (or -1 to use requisition, with 1820 * GtkWindow only) 1821 * gint base_width; 1822 * allowed window widths are base_width + width_inc * N where N 1823 * is any integer (-1 allowed with GtkWindow) 1824 * gint base_height; 1825 * allowed window widths are base_height + height_inc * N where 1826 * N is any integer (-1 allowed with GtkWindow) 1827 * gint width_inc; 1828 * width resize increment 1829 * gint height_inc; 1830 * height resize increment 1831 * gdouble min_aspect; 1832 * minimum width/height ratio 1833 * gdouble max_aspect; 1834 * maximum width/height ratio 1835 * GdkGravity win_gravity; 1836 * window gravity, see gtk_window_set_gravity() 1837 */ 1838 public struct GdkGeometry 1839 { 1840 int minWidth; 1841 int minHeight; 1842 int maxWidth; 1843 int maxHeight; 1844 int baseWidth; 1845 int baseHeight; 1846 int widthInc; 1847 int heightInc; 1848 double minAspect; 1849 double maxAspect; 1850 GdkGravity winGravity; 1851 } 1852 1853 1854 /** 1855 * Attributes to use for a newly-created window. 1856 * gchar *title; 1857 * title of the window (for toplevel windows) 1858 * gint event_mask; 1859 * event mask (see gdk_window_set_events()) 1860 * gint x; 1861 * X coordinate relative to parent window (see gdk_window_move()) 1862 * gint y; 1863 * Y coordinate relative to parent window (see gdk_window_move()) 1864 * gint width; 1865 * width of window 1866 * gint height; 1867 * height of window 1868 * GdkWindowWindowClass wclass; 1869 * GDK_INPUT_OUTPUT (normal window) or GDK_INPUT_ONLY (invisible 1870 * window that receives events) 1871 * GdkVisual *visual; 1872 * GdkVisual for window 1873 * GdkWindowType window_type; 1874 * type of window 1875 * GdkCursor *cursor; 1876 * cursor for the window (see gdk_window_set_cursor()) 1877 * gchar *wmclass_name; 1878 * don't use (see gtk_window_set_wmclass()) 1879 * gchar *wmclass_class; 1880 * don't use (see gtk_window_set_wmclass()) 1881 * gboolean override_redirect; 1882 * TRUE to bypass the window manager 1883 * GdkWindowTypeHint type_hint; 1884 * a hint of the function of the window 1885 */ 1886 public struct GdkWindowAttr 1887 { 1888 char *title; 1889 int eventMask; 1890 int x, y; 1891 int width; 1892 int height; 1893 GdkWindowWindowClass wclass; 1894 GdkVisual *visual; 1895 GdkWindowType windowType; 1896 GdkCursor *cursor; 1897 char *wmclassName; 1898 char *wmclassClass; 1899 int overrideRedirect; 1900 GdkWindowTypeHint typeHint; 1901 } 1902 1903 1904 /** 1905 * Main Gtk struct. 1906 */ 1907 public struct GdkFrameClock 1908 { 1909 GObject parentInstance; 1910 } 1911 1912 1913 /** 1914 * Main Gtk struct. 1915 */ 1916 public struct GdkFrameTimings 1917 { 1918 uint refCount; 1919 long frameCounter; 1920 ulong cookie; 1921 long frameTime; 1922 long drawnTime; 1923 long presentationTime; 1924 long refreshInterval; 1925 long predictedPresentationTime; 1926 debug 1927 { 1928 long layoutStartTime; 1929 long paintStartTime; 1930 long frameEndTime; 1931 } 1932 uint bitfield0; 1933 //uint complete : 1; 1934 //uint sleptBefore : 1; 1935 } 1936 1937 1938 public struct GdkEventSequence{} 1939 1940 1941 /** 1942 * Contains the fields which are common to all event structs. 1943 * Any event pointer can safely be cast to a pointer to a GdkEventAny to 1944 * access these fields. 1945 * GdkEventType type; 1946 * the type of the event. 1947 * GdkWindow *window; 1948 * the window which received the event. 1949 * gint8 send_event; 1950 * TRUE if the event was sent explicitly (e.g. using 1951 * XSendEvent). 1952 */ 1953 public struct GdkEventAny 1954 { 1955 GdkEventType type; 1956 GdkWindow *window; 1957 byte sendEvent; 1958 } 1959 1960 1961 /** 1962 * Describes a key press or key release event. 1963 * GdkEventType type; 1964 * the type of the event (GDK_KEY_PRESS or GDK_KEY_RELEASE). 1965 * GdkWindow *window; 1966 * the window which received the event. 1967 * gint8 send_event; 1968 * TRUE if the event was sent explicitly (e.g. using 1969 * XSendEvent). 1970 * guint32 time; 1971 * the time of the event in milliseconds. 1972 * guint state; 1973 * a bit-mask representing the state of 1974 * the modifier keys (e.g. Control, Shift and Alt) and the pointer 1975 * buttons. See GdkModifierType. [type GdkModifierType] 1976 * guint keyval; 1977 * the key that was pressed or released. See the 1978 * <gdk/gdkkeysyms.h> header file for a 1979 * complete list of GDK key codes. 1980 * gint length; 1981 * the length of string. 1982 * gchar *string; 1983 * a string containing an approximation of the text that 1984 * would result from this keypress. The only correct way to handle text 1985 * input of text is using input methods (see GtkIMContext), so this 1986 * field is deprecated and should never be used. 1987 * (gdk_unicode_to_keyval() provides a non-deprecated way of getting 1988 * an approximate translation for a key.) The string is encoded in the 1989 * encoding of the current locale (Note: this for backwards compatibility: 1990 * strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated. 1991 * In some cases, the translation of the key code will be a single 1992 * NUL byte, in which case looking at length is necessary to distinguish 1993 * it from the an empty translation. 1994 * guint16 hardware_keycode; 1995 * the raw code of the key that was pressed or released. 1996 * guint8 group; 1997 * the keyboard group. 1998 * guint is_modifier : 1; 1999 * a flag that indicates if hardware_keycode is mapped to a 2000 * modifier. Since 2.10 2001 */ 2002 public struct GdkEventKey 2003 { 2004 GdkEventType type; 2005 GdkWindow *window; 2006 byte sendEvent; 2007 uint time; 2008 uint state; 2009 uint keyval; 2010 int length; 2011 char *string; 2012 ushort hardwareKeycode; 2013 ubyte group; 2014 uint bitfield0; 2015 //uint isModifier : 1; 2016 } 2017 2018 2019 /** 2020 * Used for button press and button release events. The 2021 * type field will be one of GDK_BUTTON_PRESS, 2022 * GDK_2BUTTON_PRESS, GDK_3BUTTON_PRESS or GDK_BUTTON_RELEASE, 2023 * Double and triple-clicks result in a sequence of events being received. 2024 * For double-clicks the order of events will be: 2025 * GDK_BUTTON_PRESS 2026 * GDK_BUTTON_RELEASE 2027 * GDK_BUTTON_PRESS 2028 * GDK_2BUTTON_PRESS 2029 * GDK_BUTTON_RELEASE 2030 * Note that the first click is received just like a normal 2031 * button press, while the second click results in a GDK_2BUTTON_PRESS 2032 * being received just after the GDK_BUTTON_PRESS. 2033 * Triple-clicks are very similar to double-clicks, except that 2034 * GDK_3BUTTON_PRESS is inserted after the third click. The order of the 2035 * events is: 2036 * GDK_BUTTON_PRESS 2037 * GDK_BUTTON_RELEASE 2038 * GDK_BUTTON_PRESS 2039 * GDK_2BUTTON_PRESS 2040 * GDK_BUTTON_RELEASE 2041 * GDK_BUTTON_PRESS 2042 * GDK_3BUTTON_PRESS 2043 * GDK_BUTTON_RELEASE 2044 * For a double click to occur, the second button press must occur within 2045 * 1/4 of a second of the first. For a triple click to occur, the third 2046 * button press must also occur within 1/2 second of the first button press. 2047 * GdkEventType type; 2048 * the type of the event (GDK_BUTTON_PRESS, GDK_2BUTTON_PRESS, 2049 * GDK_3BUTTON_PRESS or GDK_BUTTON_RELEASE). 2050 * GdkWindow *window; 2051 * the window which received the event. 2052 * gint8 send_event; 2053 * TRUE if the event was sent explicitly (e.g. using 2054 * XSendEvent). 2055 * guint32 time; 2056 * the time of the event in milliseconds. 2057 * gdouble x; 2058 * the x coordinate of the pointer relative to the window. 2059 * gdouble y; 2060 * the y coordinate of the pointer relative to the window. 2061 * gdouble *axes; 2062 * x, y translated to the axes of device, or NULL if device is 2063 * the mouse. 2064 * guint state; 2065 * a bit-mask representing the state of 2066 * the modifier keys (e.g. Control, Shift and Alt) and the pointer 2067 * buttons. See GdkModifierType. [type GdkModifierType] 2068 * guint button; 2069 * the button which was pressed or released, numbered from 1 to 5. 2070 * Normally button 1 is the left mouse button, 2 is the middle button, 2071 * and 3 is the right button. On 2-button mice, the middle button can 2072 * often be simulated by pressing both mouse buttons together. 2073 * GdkDevice *device; 2074 * the device where the event originated. 2075 * gdouble x_root; 2076 * the x coordinate of the pointer relative to the root of the 2077 * screen. 2078 * gdouble y_root; 2079 * the y coordinate of the pointer relative to the root of the 2080 * screen. 2081 */ 2082 public struct GdkEventButton 2083 { 2084 GdkEventType type; 2085 GdkWindow *window; 2086 byte sendEvent; 2087 uint time; 2088 double x; 2089 double y; 2090 double *axes; 2091 uint state; 2092 uint button; 2093 GdkDevice *device; 2094 double xRoot, yRoot; 2095 } 2096 2097 2098 /** 2099 * Used for touch events. 2100 * type field will be one of GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE, 2101 * GDK_TOUCH_END or GDK_TOUCH_CANCEL. 2102 * Touch events are grouped into sequences by means of the sequence 2103 * field, which can also be obtained with gdk_event_get_event_sequence(). 2104 * Each sequence begins with a GDK_TOUCH_BEGIN event, followed by 2105 * any number of GDK_TOUCH_UPDATE events, and ends with a GDK_TOUCH_END 2106 * (or GDK_TOUCH_CANCEL) event. With multitouch devices, there may be 2107 * several active sequences at the same time. 2108 * GdkEventType type; 2109 * the type of the event (GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE, 2110 * GDK_TOUCH_END, GDK_TOUCH_CANCEL) 2111 * GdkWindow *window; 2112 * the window which received the event 2113 * gint8 send_event; 2114 * TRUE if the event was sent explicitly (e.g. using 2115 * XSendEvent) 2116 * guint32 time; 2117 * the time of the event in milliseconds. 2118 * gdouble x; 2119 * the x coordinate of the pointer relative to the window 2120 * gdouble y; 2121 * the y coordinate of the pointer relative to the window 2122 * gdouble *axes; 2123 * x, y translated to the axes of device, or NULL if device is 2124 * the mouse 2125 * guint state; 2126 * a bit-mask representing the state of 2127 * the modifier keys (e.g. Control, Shift and Alt) and the pointer 2128 * buttons. See GdkModifierType. [type GdkModifierType] 2129 * GdkEventSequence *sequence; 2130 * the event sequence that the event belongs to 2131 * gboolean emulating_pointer; 2132 * whether the event should be used for emulating 2133 * pointer event 2134 * GdkDevice *device; 2135 * the device where the event originated 2136 * gdouble x_root; 2137 * the x coordinate of the pointer relative to the root of the 2138 * screen 2139 * gdouble y_root; 2140 * the y coordinate of the pointer relative to the root of the 2141 * screen 2142 */ 2143 public struct GdkEventTouch 2144 { 2145 GdkEventType type; 2146 GdkWindow *window; 2147 byte sendEvent; 2148 uint time; 2149 double x; 2150 double y; 2151 double *axes; 2152 uint state; 2153 GdkEventSequence *sequence; 2154 int emulatingPointer; 2155 GdkDevice *device; 2156 double xRoot, yRoot; 2157 } 2158 2159 2160 /** 2161 * Generated from button presses for the buttons 4 to 7. Wheel mice are 2162 * usually configured to generate button press events for buttons 4 and 5 2163 * when the wheel is turned. 2164 * Some GDK backends can also generate 'smooth' scroll events, which 2165 * can be recognized by the GDK_SCROLL_SMOOTH scroll direction. For 2166 * these, the scroll deltas can be obtained with 2167 * gdk_event_get_scroll_deltas(). 2168 * GdkEventType type; 2169 * the type of the event (GDK_SCROLL). 2170 * GdkWindow *window; 2171 * the window which received the event. 2172 * gint8 send_event; 2173 * TRUE if the event was sent explicitly (e.g. using 2174 * XSendEvent). 2175 * guint32 time; 2176 * the time of the event in milliseconds. 2177 * gdouble x; 2178 * the x coordinate of the pointer relative to the window. 2179 * gdouble y; 2180 * the y coordinate of the pointer relative to the window. 2181 * guint state; 2182 * a bit-mask representing the state of 2183 * the modifier keys (e.g. Control, Shift and Alt) and the pointer 2184 * buttons. See GdkModifierType. [type GdkModifierType] 2185 * GdkScrollDirection direction; 2186 * the direction to scroll to (one of GDK_SCROLL_UP, 2187 * GDK_SCROLL_DOWN, GDK_SCROLL_LEFT, GDK_SCROLL_RIGHT or 2188 * GDK_SCROLL_SMOOTH). 2189 * GdkDevice *device; 2190 * the device where the event originated. 2191 * gdouble x_root; 2192 * the x coordinate of the pointer relative to the root of the 2193 * screen. 2194 * gdouble y_root; 2195 * the y coordinate of the pointer relative to the root of the 2196 * screen. 2197 * gdouble delta_x; 2198 * gdouble delta_y; 2199 */ 2200 public struct GdkEventScroll 2201 { 2202 GdkEventType type; 2203 GdkWindow *window; 2204 byte sendEvent; 2205 uint time; 2206 double x; 2207 double y; 2208 uint state; 2209 GdkScrollDirection direction; 2210 GdkDevice *device; 2211 double xRoot, yRoot; 2212 double deltaX; 2213 double deltaY; 2214 } 2215 2216 2217 /** 2218 * Generated when the pointer moves. 2219 * GdkEventType type; 2220 * the type of the event. 2221 * GdkWindow *window; 2222 * the window which received the event. 2223 * gint8 send_event; 2224 * TRUE if the event was sent explicitly (e.g. using 2225 * XSendEvent). 2226 * guint32 time; 2227 * the time of the event in milliseconds. 2228 * gdouble x; 2229 * the x coordinate of the pointer relative to the window. 2230 * gdouble y; 2231 * the y coordinate of the pointer relative to the window. 2232 * gdouble *axes; 2233 * x, y translated to the axes of device, or NULL if device is 2234 * the mouse. 2235 * guint state; 2236 * a bit-mask representing the state of 2237 * the modifier keys (e.g. Control, Shift and Alt) and the pointer 2238 * buttons. See GdkModifierType. [type GdkModifierType] 2239 * gint16 is_hint; 2240 * set to 1 if this event is just a hint, see the 2241 * GDK_POINTER_MOTION_HINT_MASK value of GdkEventMask. 2242 * GdkDevice *device; 2243 * the device where the event originated. 2244 * gdouble x_root; 2245 * the x coordinate of the pointer relative to the root of the 2246 * screen. 2247 * gdouble y_root; 2248 * the y coordinate of the pointer relative to the root of the 2249 * screen. 2250 */ 2251 public struct GdkEventMotion 2252 { 2253 GdkEventType type; 2254 GdkWindow *window; 2255 byte sendEvent; 2256 uint time; 2257 double x; 2258 double y; 2259 double *axes; 2260 uint state; 2261 short isHint; 2262 GdkDevice *device; 2263 double xRoot, yRoot; 2264 } 2265 2266 2267 /** 2268 * Generated when all or part of a window becomes visible and needs to be 2269 * redrawn. 2270 * GdkEventType type; 2271 * the type of the event (GDK_EXPOSE or GDK_DAMAGE). 2272 * GdkWindow *window; 2273 * the window which received the event. 2274 * gint8 send_event; 2275 * TRUE if the event was sent explicitly (e.g. using 2276 * XSendEvent). 2277 * GdkRectangle area; 2278 * bounding box of region. 2279 * cairo_region_t *region; 2280 * the region that needs to be redrawn. 2281 * gint count; 2282 * the number of contiguous GDK_EXPOSE events following this one. 2283 * The only use for this is "exposure compression", i.e. handling all 2284 * contiguous GDK_EXPOSE events in one go, though GDK performs some 2285 * exposure compression so this is not normally needed. 2286 */ 2287 public struct GdkEventExpose 2288 { 2289 GdkEventType type; 2290 GdkWindow *window; 2291 byte sendEvent; 2292 Rectangle area; 2293 cairo_region_t *region; 2294 int count; /+* If non-zero, how many more events follow. +/ 2295 } 2296 2297 2298 /** 2299 * Generated when the window visibility status has changed. 2300 * GdkEventType type; 2301 * the type of the event (GDK_VISIBILITY_NOTIFY). 2302 * GdkWindow *window; 2303 * the window which received the event. 2304 * gint8 send_event; 2305 * TRUE if the event was sent explicitly (e.g. using 2306 * XSendEvent). 2307 * GdkVisibilityState state; 2308 * the new visibility state (GDK_VISIBILITY_FULLY_OBSCURED, 2309 * GDK_VISIBILITY_PARTIAL or GDK_VISIBILITY_UNOBSCURED). 2310 */ 2311 public struct GdkEventVisibility 2312 { 2313 GdkEventType type; 2314 GdkWindow *window; 2315 byte sendEvent; 2316 GdkVisibilityState state; 2317 } 2318 2319 2320 /** 2321 * Generated when the pointer enters or leaves a window. 2322 * GdkEventType type; 2323 * the type of the event (GDK_ENTER_NOTIFY or GDK_LEAVE_NOTIFY). 2324 * GdkWindow *window; 2325 * the window which received the event. 2326 * gint8 send_event; 2327 * TRUE if the event was sent explicitly (e.g. using 2328 * XSendEvent). 2329 * GdkWindow *subwindow; 2330 * the window that was entered or left. 2331 * guint32 time; 2332 * the time of the event in milliseconds. 2333 * gdouble x; 2334 * the x coordinate of the pointer relative to the window. 2335 * gdouble y; 2336 * the y coordinate of the pointer relative to the window. 2337 * gdouble x_root; 2338 * the x coordinate of the pointer relative to the root of the screen. 2339 * gdouble y_root; 2340 * the y coordinate of the pointer relative to the root of the screen. 2341 * GdkCrossingMode mode; 2342 * the crossing mode (GDK_CROSSING_NORMAL, GDK_CROSSING_GRAB, 2343 * GDK_CROSSING_UNGRAB, GDK_CROSSING_GTK_GRAB, GDK_CROSSING_GTK_UNGRAB or 2344 * GDK_CROSSING_STATE_CHANGED). GDK_CROSSING_GTK_GRAB, GDK_CROSSING_GTK_UNGRAB, 2345 * and GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized, 2346 * never native. 2347 * GdkNotifyType detail; 2348 * the kind of crossing that happened (GDK_NOTIFY_INFERIOR, 2349 * GDK_NOTIFY_ANCESTOR, GDK_NOTIFY_VIRTUAL, GDK_NOTIFY_NONLINEAR or 2350 * GDK_NOTIFY_NONLINEAR_VIRTUAL). 2351 * gboolean focus; 2352 * TRUE if window is the focus window or an inferior. 2353 * guint state; 2354 * a bit-mask representing the state of 2355 * the modifier keys (e.g. Control, Shift and Alt) and the pointer 2356 * buttons. See GdkModifierType. [type GdkModifierType] 2357 */ 2358 public struct GdkEventCrossing 2359 { 2360 GdkEventType type; 2361 GdkWindow *window; 2362 byte sendEvent; 2363 GdkWindow *subwindow; 2364 uint time; 2365 double x; 2366 double y; 2367 double xRoot; 2368 double yRoot; 2369 GdkCrossingMode mode; 2370 GdkNotifyType detail; 2371 int focus; 2372 uint state; 2373 } 2374 2375 2376 /** 2377 * Describes a change of keyboard focus. 2378 * GdkEventType type; 2379 * the type of the event (GDK_FOCUS_CHANGE). 2380 * GdkWindow *window; 2381 * the window which received the event. 2382 * gint8 send_event; 2383 * TRUE if the event was sent explicitly (e.g. using 2384 * XSendEvent). 2385 * gint16 in; 2386 * TRUE if the window has gained the keyboard focus, FALSE if 2387 * it has lost the focus. 2388 */ 2389 public struct GdkEventFocus 2390 { 2391 GdkEventType type; 2392 GdkWindow *window; 2393 byte sendEvent; 2394 short inn; 2395 } 2396 2397 2398 /** 2399 * Generated when a window size or position has changed. 2400 * GdkEventType type; 2401 * the type of the event (GDK_CONFIGURE). 2402 * GdkWindow *window; 2403 * the window which received the event. 2404 * gint8 send_event; 2405 * TRUE if the event was sent explicitly (e.g. using 2406 * XSendEvent). 2407 * gint x; 2408 * the new x coordinate of the window, relative to its parent. 2409 * gint y; 2410 * the new y coordinate of the window, relative to its parent. 2411 * gint width; 2412 * the new width of the window. 2413 * gint height; 2414 * the new height of the window. 2415 */ 2416 public struct GdkEventConfigure 2417 { 2418 GdkEventType type; 2419 GdkWindow *window; 2420 byte sendEvent; 2421 int x, y; 2422 int width; 2423 int height; 2424 } 2425 2426 2427 /** 2428 * Describes a property change on a window. 2429 * GdkEventType type; 2430 * the type of the event (GDK_PROPERTY_NOTIFY). 2431 * GdkWindow *window; 2432 * the window which received the event. 2433 * gint8 send_event; 2434 * TRUE if the event was sent explicitly (e.g. using 2435 * XSendEvent). 2436 * GdkAtom atom; 2437 * the property that was changed. 2438 * guint32 time; 2439 * the time of the event in milliseconds. 2440 * guint state; 2441 * whether the property was changed 2442 * (GDK_PROPERTY_NEW_VALUE) or deleted (GDK_PROPERTY_DELETE). [type GdkPropertyState] 2443 */ 2444 public struct GdkEventProperty 2445 { 2446 GdkEventType type; 2447 GdkWindow *window; 2448 byte sendEvent; 2449 GdkAtom atom; 2450 uint time; 2451 uint state; 2452 } 2453 2454 2455 /** 2456 * Generated when a selection is requested or ownership of a selection 2457 * is taken over by another client application. 2458 * GdkEventType type; 2459 * the type of the event (GDK_SELECTION_CLEAR, 2460 * GDK_SELECTION_NOTIFY or GDK_SELECTION_REQUEST). 2461 * GdkWindow *window; 2462 * the window which received the event. 2463 * gint8 send_event; 2464 * TRUE if the event was sent explicitly (e.g. using 2465 * XSendEvent). 2466 * GdkAtom selection; 2467 * the selection. 2468 * GdkAtom target; 2469 * the target to which the selection should be converted. 2470 * GdkAtom property; 2471 * the property in which to place the result of the conversion. 2472 * guint32 time; 2473 * the time of the event in milliseconds. 2474 * GdkWindow *requestor; 2475 * the window on which to place property or NULL if none. 2476 */ 2477 public struct GdkEventSelection 2478 { 2479 GdkEventType type; 2480 GdkWindow *window; 2481 byte sendEvent; 2482 GdkAtom selection; 2483 GdkAtom target; 2484 GdkAtom property; 2485 uint time; 2486 GdkWindow *requestor; 2487 } 2488 2489 2490 /** 2491 * Generated during DND operations. 2492 * GdkEventType type; 2493 * the type of the event (GDK_DRAG_ENTER, GDK_DRAG_LEAVE, 2494 * GDK_DRAG_MOTION, GDK_DRAG_STATUS, GDK_DROP_START or 2495 * GDK_DROP_FINISHED). 2496 * GdkWindow *window; 2497 * the window which received the event. 2498 * gint8 send_event; 2499 * TRUE if the event was sent explicitly (e.g. using 2500 * XSendEvent). 2501 * GdkDragContext *context; 2502 * the GdkDragContext for the current DND operation. 2503 * guint32 time; 2504 * the time of the event in milliseconds. 2505 * gshort x_root; 2506 * the x coordinate of the pointer relative to the root of the 2507 * screen, only set for GDK_DRAG_MOTION and GDK_DROP_START. 2508 * gshort y_root; 2509 * the y coordinate of the pointer relative to the root of the 2510 * screen, only set for GDK_DRAG_MOTION and GDK_DROP_START. 2511 */ 2512 public struct GdkEventDND 2513 { 2514 GdkEventType type; 2515 GdkWindow *window; 2516 byte sendEvent; 2517 GdkDragContext *context; 2518 uint time; 2519 short xRoot, yRoot; 2520 } 2521 2522 2523 /** 2524 * Proximity events are generated when using GDK's wrapper for the 2525 * XInput extension. The XInput extension is an add-on for standard X 2526 * that allows you to use nonstandard devices such as graphics tablets. 2527 * A proximity event indicates that the stylus has moved in or out of 2528 * contact with the tablet, or perhaps that the user's finger has moved 2529 * in or out of contact with a touch screen. 2530 * This event type will be used pretty rarely. It only is important for 2531 * XInput aware programs that are drawing their own cursor. 2532 * GdkEventType type; 2533 * the type of the event (GDK_PROXIMITY_IN or GDK_PROXIMITY_OUT). 2534 * GdkWindow *window; 2535 * the window which received the event. 2536 * gint8 send_event; 2537 * TRUE if the event was sent explicitly (e.g. using XSendEvent). 2538 * guint32 time; 2539 * the time of the event in milliseconds. 2540 * GdkDevice *device; 2541 * the device where the event originated. 2542 */ 2543 public struct GdkEventProximity 2544 { 2545 GdkEventType type; 2546 GdkWindow *window; 2547 byte sendEvent; 2548 uint time; 2549 GdkDevice *device; 2550 } 2551 2552 2553 /** 2554 * Generated when the state of a toplevel window changes. 2555 * GdkEventType type; 2556 * the type of the event (GDK_WINDOW_STATE). 2557 * GdkWindow *window; 2558 * the window which received the event. 2559 * gint8 send_event; 2560 * TRUE if the event was sent explicitly (e.g. using 2561 * XSendEvent). 2562 * GdkWindowState changed_mask; 2563 * mask specifying what flags have changed. 2564 * GdkWindowState new_window_state; 2565 * the new window state, a combination of 2566 * GdkWindowState bits. 2567 */ 2568 public struct GdkEventWindowState 2569 { 2570 GdkEventType type; 2571 GdkWindow *window; 2572 byte sendEvent; 2573 GdkWindowState changedMask; 2574 GdkWindowState newWindowState; 2575 } 2576 2577 2578 /** 2579 * Generated when a setting is modified. 2580 * GdkEventType type; 2581 * the type of the event (GDK_SETTING). 2582 * GdkWindow *window; 2583 * the window which received the event. 2584 * gint8 send_event; 2585 * TRUE if the event was sent explicitly (e.g. using 2586 * XSendEvent). 2587 * GdkSettingAction action; 2588 * what happened to the setting (GDK_SETTING_ACTION_NEW, 2589 * GDK_SETTING_ACTION_CHANGED or GDK_SETTING_ACTION_DELETED). 2590 * char *name; 2591 * the name of the setting. 2592 */ 2593 public struct GdkEventSetting 2594 { 2595 GdkEventType type; 2596 GdkWindow *window; 2597 byte sendEvent; 2598 GdkSettingAction action; 2599 char *name; 2600 } 2601 2602 2603 /** 2604 * Generated when the owner of a selection changes. On X11, this 2605 * information is only available if the X server supports the XFIXES 2606 * extension. 2607 * GdkEventType type; 2608 * the type of the event (GDK_OWNER_CHANGE). 2609 * GdkWindow *window; 2610 * the window which received the event 2611 * gint8 send_event; 2612 * TRUE if the event was sent explicitly (e.g. using 2613 * XSendEvent) 2614 * GdkWindow *owner; 2615 * the new owner of the selection, or NULL if there is none 2616 * GdkOwnerChange reason; 2617 * the reason for the ownership change as a GdkOwnerChange value 2618 * GdkAtom selection; 2619 * the atom identifying the selection 2620 * guint32 time; 2621 * the timestamp of the event 2622 * guint32 selection_time; 2623 * the time at which the selection ownership was taken 2624 * over 2625 * Since 2.6 2626 */ 2627 public struct GdkEventOwnerChange 2628 { 2629 GdkEventType type; 2630 GdkWindow *window; 2631 byte sendEvent; 2632 GdkWindow *owner; 2633 GdkOwnerChange reason; 2634 GdkAtom selection; 2635 uint time; 2636 uint selectionTime; 2637 } 2638 2639 2640 /** 2641 * Generated when a pointer or keyboard grab is broken. On X11, this happens 2642 * when the grab window becomes unviewable (i.e. it or one of its ancestors 2643 * is unmapped), or if the same application grabs the pointer or keyboard 2644 * again. Note that implicit grabs (which are initiated by button presses) 2645 * can also cause GdkEventGrabBroken events. 2646 * GdkEventType type; 2647 * the type of the event (GDK_GRAB_BROKEN) 2648 * GdkWindow *window; 2649 * the window which received the event, i.e. the window 2650 * that previously owned the grab 2651 * gint8 send_event; 2652 * TRUE if the event was sent explicitly (e.g. using 2653 * XSendEvent). 2654 * gboolean keyboard; 2655 * TRUE if a keyboard grab was broken, FALSE if a pointer 2656 * grab was broken 2657 * gboolean implicit; 2658 * TRUE if the broken grab was implicit 2659 * GdkWindow *grab_window; 2660 * If this event is caused by another grab in the same 2661 * application, grab_window contains the new grab window. Otherwise 2662 * grab_window is NULL. 2663 * Since 2.8 2664 */ 2665 public struct GdkEventGrabBroken 2666 { 2667 GdkEventType type; 2668 GdkWindow *window; 2669 byte sendEvent; 2670 int keyboard; 2671 int implicit; 2672 GdkWindow *grabWindow; 2673 } 2674 2675 2676 /** 2677 * Main Gtk struct. 2678 * A GdkKeymap defines the translation from keyboard state 2679 * (including a hardware key, a modifier mask, and active keyboard group) 2680 * to a keyval. This translation has two phases. The first phase is 2681 * to determine the effective keyboard group and level for the keyboard 2682 * state; the second phase is to look up the keycode/group/level triplet 2683 * in the keymap and see what keyval it corresponds to. 2684 */ 2685 public struct GdkKeymap{} 2686 2687 2688 /** 2689 * A GdkKeymapKey is a hardware key that can be mapped to a keyval. 2690 * guint keycode; 2691 * the hardware keycode. This is an identifying number for a 2692 * physical key. 2693 * gint group; 2694 * indicates movement in a horizontal direction. Usually groups are used 2695 * for two different languages. In group 0, a key might have two English 2696 * characters, and in group 1 it might have two Hebrew characters. The Hebrew 2697 * characters will be printed on the key next to the English characters. 2698 * gint level; 2699 * indicates which symbol on the key will be used, in a vertical direction. 2700 * So on a standard US keyboard, the key with the number "1" on it also has the 2701 * exclamation point ("!") character on it. The level indicates whether to use 2702 * the "1" or the "!" symbol. The letter keys are considered to have a lowercase 2703 * letter at level 0, and an uppercase letter at level 1, though only the 2704 * uppercase letter is printed. 2705 */ 2706 public struct GdkKeymapKey 2707 { 2708 uint keycode; 2709 int group; 2710 int level; 2711 } 2712 2713 2714 /** 2715 * Main Gtk struct. 2716 */ 2717 public struct GdkDragContext{} 2718 2719 2720 /** 2721 * Main Gtk struct. 2722 */ 2723 public struct GdkAppLaunchContext{} 2724 2725 2726 /* 2727 * Converts a GdkAtom into a pointer type. 2728 * atom : 2729 * a GdkAtom. 2730 */ 2731 // TODO 2732 // #define GDK_ATOM_TO_POINTER(atom) (atom) 2733 2734 /* 2735 * Extracts a GdkAtom from a pointer. The GdkAtom must have been 2736 * stored in the pointer with GDK_ATOM_TO_POINTER(). 2737 * ptr : 2738 * a pointer containing a GdkAtom. 2739 */ 2740 // TODO 2741 // #define GDK_POINTER_TO_ATOM(ptr) ((GdkAtom)(ptr)) 2742 2743 /* 2744 * Returns the X window belonging to a GdkWindow. 2745 * win : 2746 * a GdkWindow. 2747 * Returns : 2748 * the Xlib Window of win. 2749 */ 2750 // TODO 2751 // #define GDK_WINDOW_XID(win) 2752 2753 /* 2754 */ 2755 // TODO 2756 // #define GDK_DISPLAY_XDISPLAY(display) 2757 2758 /* 2759 * Returns the display of a X11 GdkScreen. 2760 * screen : 2761 * a GdkScreen 2762 * Returns : 2763 * an Xlib Display* 2764 */ 2765 // TODO 2766 // #define GDK_SCREEN_XDISPLAY(screen) 2767 2768 /* 2769 * Returns the index of a X11 GdkScreen. 2770 * screen : 2771 * a GdkScreen 2772 * Returns : 2773 * the position of screen among the screens of its display 2774 */ 2775 // TODO 2776 // #define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen)) 2777 2778 /* 2779 * Returns the screen of a X11 GdkScreen. 2780 * screen : 2781 * a GdkScreen 2782 * Returns : 2783 * an Xlib Screen* 2784 */ 2785 // TODO 2786 // #define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen)) 2787 2788 /* 2789 * Returns the X cursor belonging to a GdkCursor. 2790 * cursor : 2791 * a GdkCursor. 2792 * Returns : 2793 * an Xlib Cursor. 2794 */ 2795 // TODO 2796 // #define GDK_CURSOR_XCURSOR(cursor) (gdk_x11_cursor_get_xcursor (cursor)) 2797 2798 /* 2799 * Returns the display of a GdkCursor. 2800 * cursor : 2801 * a GdkCursor. 2802 * Returns : 2803 * an Xlib Display*. 2804 */ 2805 // TODO 2806 // #define GDK_CURSOR_XDISPLAY(cursor) (gdk_x11_cursor_get_xdisplay (cursor)) 2807 2808 /* 2809 * Converts a gpointer back to an XID that was previously converted 2810 * using GDK_XID_TO_POINTER(). 2811 */ 2812 // TODO 2813 // #define GDK_POINTER_TO_XID(pointer) GPOINTER_TO_UINT(pointer) 2814 2815 /* 2816 * Converts an XID into a gpointer. This is useful with data structures 2817 * that use pointer arguments such as GHashTable. Use GDK_POINTER_TO_XID() 2818 * to convert the argument back to an XID. 2819 */ 2820 // TODO 2821 // #define GDK_XID_TO_POINTER(pointer) GUINT_TO_POINTER(pointer) 2822 2823 /* 2824 * A function of this type is responsible for freeing the pixel array 2825 * of a pixbuf. The gdk_pixbuf_new_from_data() function lets you 2826 * pass in a pre-allocated pixel array so that a pixbuf can be 2827 * created from it; in this case you will need to pass in a function 2828 * of GdkPixbufDestroyNotify so that the pixel data can be freed 2829 * when the pixbuf is finalized. 2830 * pixels : 2831 * The pixel array of the pixbuf 2832 * that is being finalized. [array][element-type guint8] 2833 * data : 2834 * User closure data. [closure] 2835 * See Also 2836 * GdkPixbuf, gdk_pixbuf_new_from_data(). 2837 */ 2838 // void (*GdkPixbufDestroyNotify) (guchar *pixels, gpointer data); 2839 public alias extern(C) void function(guchar* pixels, void* data) GdkPixbufDestroyNotify; 2840 2841 /* 2842 * Specifies the type of the function passed to 2843 * gdk_pixbuf_save_to_callback(). It is called once for each block of 2844 * bytes that is "written" by gdk_pixbuf_save_to_callback(). If 2845 * successful it should return TRUE. If an error occurs it should set 2846 * error and return FALSE, in which case gdk_pixbuf_save_to_callback() 2847 * will fail with the same error. 2848 * buf : 2849 * bytes to be written. [array length=count][element-type guint8] 2850 * count : 2851 * number of bytes in buf. 2852 * error : 2853 * A location to return an error. [out] 2854 * data : 2855 * user data passed to gdk_pixbuf_save_to_callback(). [closure] 2856 * Returns : 2857 * TRUE if successful, FALSE (with error set) if failed. 2858 * Since 2.4 2859 */ 2860 // gboolean (*GdkPixbufSaveFunc) (const gchar *buf, gsize count, GError **error, gpointer data); 2861 public alias extern(C) int function(char* buf, gsize count, GError** error, void* data) GdkPixbufSaveFunc; 2862 2863 /* 2864 * Whenever some area of the window is invalidated (directly in the 2865 * window or in a child window) this gets called with region in 2866 * the coordinate space of window. You can use region to just 2867 * keep track of the dirty region, or you can actually change 2868 * region in case you are doing display tricks like showing 2869 * a child in multiple places. 2870 * window : 2871 * a GdkWindow 2872 * region : 2873 * a cairo_region_t 2874 * Since 3.10 2875 */ 2876 // void (*GdkWindowInvalidateHandlerFunc) (GdkWindow *window, cairo_region_t *region); 2877 public alias extern(C) void function(GdkWindow* window, cairo_region_t* region) GdkWindowInvalidateHandlerFunc; 2878 2879 /* 2880 * A function of this type is passed to gdk_window_invalidate_maybe_recurse(). 2881 * It gets called for each child of the window to determine whether to 2882 * recursively invalidate it or now. 2883 * window : 2884 * a GdkWindow 2885 * user_data : 2886 * user data 2887 * Returns : 2888 * TRUE to invalidate window recursively 2889 */ 2890 // gboolean (*GdkWindowChildFunc) (GdkWindow *window, gpointer user_data); 2891 public alias extern(C) int function(GdkWindow* window, void* userData) GdkWindowChildFunc; 2892 2893 /* 2894 * Specifies the type of function used to filter native events before they are 2895 * converted to GDK events. 2896 * When a filter is called, event is unpopulated, except for 2897 * event->window. The filter may translate the native 2898 * event to a GDK event and store the result in event, or handle it without 2899 * translation. If the filter translates the event and processing should 2900 * continue, it should return GDK_FILTER_TRANSLATE. 2901 * xevent : 2902 * the native event to filter. 2903 * event : 2904 * the GDK event to which the X event will be translated. 2905 * data : 2906 * user data set when the filter was installed. 2907 * Returns : 2908 * a GdkFilterReturn value. 2909 */ 2910 // GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent, GdkEvent *event, gpointer data); 2911 public alias extern(C) GdkFilterReturn function(GdkXEvent* xevent, GdkEvent* event, void* data) GdkFilterFunc; 2912 2913 /* 2914 * Specifies the type of function passed to gdk_event_handler_set() to 2915 * handle all GDK events. 2916 * event : 2917 * the GdkEvent to process. 2918 * data : 2919 * user data set when the event handler was installed with 2920 * gdk_event_handler_set(). [closure] 2921 */ 2922 // void (*GdkEventFunc) (GdkEvent *event, gpointer data); 2923 public alias extern(C) void function(GdkEvent* event, void* data) GdkEventFunc; 2924 /** 2925 * The GdkEvent struct contains a union of all of the event structs, 2926 * and allows access to the data fields in a number of ways. 2927 * The event type is always the first field in all of the event structs, and 2928 * can always be accessed with the following code, no matter what type of event 2929 * it is: 2930 */ 2931 public struct GdkEvent 2932 { 2933 union 2934 { 2935 GdkEventType type; 2936 GdkEventAny any; 2937 GdkEventExpose expose; 2938 GdkEventVisibility visibility; 2939 GdkEventMotion motion; 2940 GdkEventButton button; 2941 GdkEventScroll scroll; 2942 GdkEventKey key; 2943 GdkEventCrossing crossing; 2944 GdkEventFocus focusChange; 2945 GdkEventConfigure configure; 2946 GdkEventProperty property; 2947 GdkEventSelection selection; 2948 GdkEventOwnerChange ownerChange; 2949 GdkEventProximity proximity; 2950 GdkEventDND dnd; 2951 GdkEventWindowState windowState; 2952 GdkEventSetting setting; 2953 GdkEventGrabBroken grabBroken; 2954 } 2955 }