gdk.c.types

C types for gdk3 library

union GdkEvent

Types 114

aliasGdkXEvent = void

Used to represent native events (XEvents for the X11 backend, MSGs for Win32).

enumGdkAnchorHints : uint

Positioning hints for aligning a window relative to a rectangle.

These hints determine how the window should be positioned in the case that the window would fall off-screen if placed in its ideal position.

For example, [gdk.types.AnchorHints.FlipX] will replace [gdk.types.Gravity.NorthWest] with [gdk.types.Gravity.NorthEast] and vice versa if the window extends beyond the left or right edges of the monitor.

If [gdk.types.AnchorHints.SlideX] is set, the window can be shifted horizontally to fit on-screen. If [gdk.types.AnchorHints.ResizeX] is set, the window can be shrunken horizontally to fit.

In general, when multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

FlipX = 1allow flipping anchors horizontally
FlipY = 2allow flipping anchors vertically
SlideX = 4allow sliding window horizontally
SlideY = 8allow sliding window vertically
ResizeX = 16allow resizing window horizontally
ResizeY = 32allow resizing window vertically
Flip = 3allow flipping anchors on both axes
Slide = 12allow sliding window on both axes
Resize = 48allow resizing window on both axes
enumGdkAxisFlags : uint

Flags describing the current capabilities of a device/tool.

X = 2X axis is present
Y = 4Y axis is present
Pressure = 8Pressure axis is present
Xtilt = 16X tilt axis is present
Ytilt = 32Y tilt axis is present
Wheel = 64Wheel axis is present
Distance = 128Distance axis is present
Rotation = 256Z-axis rotation is present
Slider = 512Slider axis is present

An enumeration describing the way in which a device axis (valuator) maps onto the predefined valuator types that GTK+ understands.

Note that the X and Y axes are not really needed; pointer devices report their location via the x/y members of events regardless. Whether X and Y are present as axes depends on the GDK backend.

Ignore = 0the axis is ignored.
X = 1the axis is used as the x axis.
Y = 2the axis is used as the y axis.
Pressure = 3the axis is used for pressure information.
Xtilt = 4the axis is used for x tilt information.
Ytilt = 5the axis is used for y tilt information.
Wheel = 6the axis is used for wheel information.
Distance = 7the axis is used for pen/tablet distance information. (Since: 3.22)
Rotation = 8the axis is used for pen rotation information. (Since: 3.22)
Slider = 9the axis is used for pen slider information. (Since: 3.22)
Last = 10a constant equal to the numerically highest axis value.

A set of values describing the possible byte-orders for storing pixel values in memory.

LsbFirst = 0The values are stored with the least-significant byte first. For instance, the 32-bit value 0xffeecc would be stored in memory as 0xcc, 0xee, 0xff, 0x00.
MsbFirst = 1The values are stored with the most-significant byte first. For instance, the 32-bit value 0xffeecc would be stored in memory as 0x00, 0xff, 0xee, 0xcc.

Specifies the crossing mode for #GdkEventCrossing.

Normal = 0crossing because of pointer motion.
Grab = 1crossing because a grab is activated.
Ungrab = 2crossing because a grab is deactivated.
GtkGrab = 3crossing because a GTK+ grab is activated.
GtkUngrab = 4crossing because a GTK+ grab is deactivated.
StateChanged = 5crossing because a GTK+ widget changed state (e.g. sensitivity).
TouchBegin = 6crossing because a touch sequence has begun, this event is synthetic as the pointer might have not left the window.
TouchEnd = 7crossing because a touch sequence has ended, this event is synthetic as the pointer might have not left the window.
DeviceSwitch = 8crossing because of a device switch (i.e. a mouse taking control of the pointer after a touch device), this event is synthetic as the pointer didn’t leave the window.

Predefined cursors.

Note that these IDs are directly taken from the X cursor font, and many of these cursors are either not useful, or are not available on other platforms.

The recommended way to create cursors is to use [gdk.cursor.Cursor.newFromName].

XCursor = 0![](X_cursor.png)
Arrow = 2![](arrow.png)
BasedArrowDown = 4![](basedarrowdown.png)
BasedArrowUp = 6![](basedarrowup.png)
Boat = 8![](boat.png)
Bogosity = 10![](bogosity.png)
BottomLeftCorner = 12![](bottomleftcorner.png)
BottomRightCorner = 14![](bottomrightcorner.png)
BottomSide = 16![](bottom_side.png)
BottomTee = 18![](bottom_tee.png)
BoxSpiral = 20![](box_spiral.png)
CenterPtr = 22![](center_ptr.png)
Circle = 24![](circle.png)
Clock = 26![](clock.png)
CoffeeMug = 28![](coffee_mug.png)
Cross = 30![](cross.png)
CrossReverse = 32![](cross_reverse.png)
Crosshair = 34![](crosshair.png)
DiamondCross = 36![](diamond_cross.png)
Dot = 38![](dot.png)
Dotbox = 40![](dotbox.png)
DoubleArrow = 42![](double_arrow.png)
DraftLarge = 44![](draft_large.png)
DraftSmall = 46![](draft_small.png)
DrapedBox = 48![](draped_box.png)
Exchange = 50![](exchange.png)
Fleur = 52![](fleur.png)
Gobbler = 54![](gobbler.png)
Gumby = 56![](gumby.png)
Hand1 = 58![](hand1.png)
Hand2 = 60![](hand2.png)
Heart = 62![](heart.png)
Icon = 64![](icon.png)
IronCross = 66![](iron_cross.png)
LeftPtr = 68![](left_ptr.png)
LeftSide = 70![](left_side.png)
LeftTee = 72![](left_tee.png)
Leftbutton = 74![](leftbutton.png)
LlAngle = 76![](ll_angle.png)
LrAngle = 78![](lr_angle.png)
Man = 80![](man.png)
Middlebutton = 82![](middlebutton.png)
Mouse = 84![](mouse.png)
Pencil = 86![](pencil.png)
Pirate = 88![](pirate.png)
Plus = 90![](plus.png)
QuestionArrow = 92![](question_arrow.png)
RightPtr = 94![](right_ptr.png)
RightSide = 96![](right_side.png)
RightTee = 98![](right_tee.png)
Rightbutton = 100![](rightbutton.png)
RtlLogo = 102![](rtl_logo.png)
Sailboat = 104![](sailboat.png)
SbDownArrow = 106![](sbdownarrow.png)
SbHDoubleArrow = 108![](sbhdouble_arrow.png)
SbLeftArrow = 110![](sbleftarrow.png)
SbRightArrow = 112![](sbrightarrow.png)
SbUpArrow = 114![](sbuparrow.png)
SbVDoubleArrow = 116![](sbvdouble_arrow.png)
Shuttle = 118![](shuttle.png)
Sizing = 120![](sizing.png)
Spider = 122![](spider.png)
Spraycan = 124![](spraycan.png)
Star = 126![](star.png)
Target = 128![](target.png)
Tcross = 130![](tcross.png)
TopLeftArrow = 132![](topleftarrow.png)
TopLeftCorner = 134![](topleftcorner.png)
TopRightCorner = 136![](toprightcorner.png)
TopSide = 138![](top_side.png)
TopTee = 140![](top_tee.png)
Trek = 142![](trek.png)
UlAngle = 144![](ul_angle.png)
Umbrella = 146![](umbrella.png)
UrAngle = 148![](ur_angle.png)
Watch = 150![](watch.png)
Xterm = 152![](xterm.png)
LastCursor = 153last cursor type
BlankCursor = - 2Blank cursor. Since 2.16
CursorIsPixmap = - 1type of cursors constructed with [gdk.cursor.Cursor.newFromPixbuf]

A pad feature.

Button = 0a button
Ring = 1a ring-shaped interactive area
Strip = 2a straight interactive area

Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc.

Unknown = 0Tool is of an unknown type.
Pen = 1Tool is a standard tablet stylus.
Eraser = 2Tool is standard tablet eraser.
Brush = 3Tool is a brush stylus.
Pencil = 4Tool is a pencil stylus.
Airbrush = 5Tool is an airbrush stylus.
Mouse = 6Tool is a mouse.
Lens = 7Tool is a lens cursor.

Indicates the device type. See [above][GdkDeviceManager.description] for more information about the meaning of these device types.

Master = 0Device is a master (or virtual) device. There will be an associated focus indicator on the screen.
Slave = 1Device is a slave (or physical) device.
Floating = 2Device is a physical device, currently not attached to any virtual device.
enumGdkDragAction : uint

Used in #GdkDragContext to indicate what the destination should do with the dropped data.

Default = 1Means nothing, and should not be used.
Copy = 2Copy the data.
Move = 4Move the data, i.e. first copy it, then delete it from the source using the DELETE target of the X selection protocol.
Link = 8Add a link to the data. Note that this is only useful if source and destination agree on what it means.
Private = 16Special action which tells the source that the destination will do something that the source doesn’t understand.
Ask = 32Ask the user what to do with the data.

Used in #GdkDragContext to the reason of a cancelled DND operation.

NoTarget = 0There is no suitable drop target.
UserCancelled = 1Drag cancelled by the user
Error = 2Unspecified error.

Used in #GdkDragContext to indicate the protocol according to which DND is done.

None = 0no protocol.
Motif = 1The Motif DND protocol. No longer supported
Xdnd = 2The Xdnd protocol.
Rootwin = 3An extension to the Xdnd protocol for unclaimed root window drops.
Win32Dropfiles = 4The simple WM_DROPFILES protocol.
Ole2 = 5The complex OLE2 DND protocol (not implemented).
Local = 6Intra-application DND.
Wayland = 7Wayland DND protocol.
enumGdkEventMask : uint

A set of bit-flags to indicate which events a window is to receive. Most of these masks map onto one or more of the #GdkEventType event types above.

See the [input handling overview][chap-input-handling] for details of [event masks][event-masks] and [event propagation][event-propagation].

[gdk.types.EventMask.PointerMotionHintMask] is deprecated. It is a special mask to reduce the number of [gdk.types.EventType.MotionNotify] events received. When using [gdk.types.EventMask.PointerMotionHintMask], fewer [gdk.types.EventType.MotionNotify] events will be sent, some of which are marked as a hint (the is_hint member is true). To receive more motion events after a motion hint event, the application needs to asks for more, by calling [gdk.event.Event.requestMotions].

Since GTK 3.8, motion events are already compressed by default, independent of this mechanism. This compression can be disabled with [gdk.window.Window.setEventCompression]. See the documentation of that function for details.

If [gdk.types.EventMask.TouchMask] is enabled, the window will receive touch events from touch-enabled devices. Those will come as sequences of #GdkEventTouch with type [gdk.types.EventType.TouchUpdate], enclosed by two events with type [gdk.types.EventType.TouchBegin] and [gdk.types.EventType.TouchEnd] (or [gdk.types.EventType.TouchCancel]). [gdk.event.Event.getEventSequence] returns the event sequence for these events, so different sequences may be distinguished.

ExposureMask = 2receive expose events
PointerMotionMask = 4receive all pointer motion events
PointerMotionHintMask = 8deprecated. see the explanation above
ButtonMotionMask = 16receive pointer motion events while any button is pressed
Button1MotionMask = 32receive pointer motion events while 1 button is pressed
Button2MotionMask = 64receive pointer motion events while 2 button is pressed
Button3MotionMask = 128receive pointer motion events while 3 button is pressed
ButtonPressMask = 256receive button press events
ButtonReleaseMask = 512receive button release events
KeyPressMask = 1024receive key press events
KeyReleaseMask = 2048receive key release events
EnterNotifyMask = 4096receive window enter events
LeaveNotifyMask = 8192receive window leave events
FocusChangeMask = 16384receive focus change events
StructureMask = 32768receive events about window configuration change
PropertyChangeMask = 65536receive property change events
VisibilityNotifyMask = 131072receive visibility change events
ProximityInMask = 262144receive proximity in events
ProximityOutMask = 524288receive proximity out events
SubstructureMask = 1048576receive events about window configuration changes of child windows
ScrollMask = 2097152receive scroll events
TouchMask = 4194304receive touch events. Since 3.4
SmoothScrollMask = 8388608receive smooth scrolling events. Since 3.4
TouchpadGestureMask = 16777216receive touchpad gesture events. Since 3.18
TabletPadMask = 33554432receive tablet pad events. Since 3.22
AllEventsMask = 67108862the combination of all the above event masks.

Specifies the type of the event.

Do not confuse these events with the signals that GTK+ widgets emit. Although many of these events result in corresponding signals being emitted, the events are often transformed or filtered along the way.

In some language bindings, the values [gdk.types.EventType._2buttonPress] and [gdk.types.EventType._3buttonPress] would translate into something syntactically invalid (eg Gdk.EventType.2ButtonPress, where a symbol is not allowed to start with a number). In that case, the aliases [gdk.types.EventType.DoubleButtonPress] and [gdk.types.EventType.TripleButtonPress] can be used instead.

Nothing = - 1a special code to indicate a null event.
Delete = 0the window manager has requested that the toplevel window be hidden or destroyed, usually when the user clicks on a special icon in the title bar.
Destroy = 1the window has been destroyed.
Expose = 2all or part of the window has become visible and needs to be redrawn.
MotionNotify = 3the pointer (usually a mouse) has moved.
ButtonPress = 4a mouse button has been pressed.
_2buttonPress = 5a mouse button has been double-clicked (clicked twice within a short period of time). Note that each click also generates a [gdk.types.EventType.ButtonPress] event.
DoubleButtonPress = 5alias for [gdk.types.EventType._2buttonPress], added in 3.6.
_3buttonPress = 6a mouse button has been clicked 3 times in a short period of time. Note that each click also generates a [gdk.types.EventType.ButtonPress] event.
TripleButtonPress = 6alias for [gdk.types.EventType._3buttonPress], added in 3.6.
ButtonRelease = 7a mouse button has been released.
KeyPress = 8a key has been pressed.
KeyRelease = 9a key has been released.
EnterNotify = 10the pointer has entered the window.
LeaveNotify = 11the pointer has left the window.
FocusChange = 12the keyboard focus has entered or left the window.
Configure = 13the size, position or stacking order of the window has changed. Note that GTK+ discards these events for [gdk.types.WindowType.Child] windows.
Map = 14the window has been mapped.
Unmap = 15the window has been unmapped.
PropertyNotify = 16a property on the window has been changed or deleted.
SelectionClear = 17the application has lost ownership of a selection.
SelectionRequest = 18another application has requested a selection.
SelectionNotify = 19a selection has been received.
ProximityIn = 20an input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet).
ProximityOut = 21an input device has moved out of contact with a sensing surface.
DragEnter = 22the mouse has entered the window while a drag is in progress.
DragLeave = 23the mouse has left the window while a drag is in progress.
DragMotion = 24the mouse has moved in the window while a drag is in progress.
DragStatus = 25the status of the drag operation initiated by the window has changed.
DropStart = 26a drop operation onto the window has started.
DropFinished = 27the drop operation initiated by the window has completed.
ClientEvent = 28a message has been received from another application.
VisibilityNotify = 29the window visibility status has changed.
Scroll = 31the scroll wheel was turned
WindowState = 32the state of a window has changed. See #GdkWindowState for the possible window states
Setting = 33a setting has been modified.
OwnerChange = 34the owner of a selection has changed. This event type was added in 2.6
GrabBroken = 35a pointer or keyboard grab was broken. This event type was added in 2.8.
Damage = 36the content of the window has been changed. This event type was added in 2.14.
TouchBegin = 37A new touch event sequence has just started. This event type was added in 3.4.
TouchUpdate = 38A touch event sequence has been updated. This event type was added in 3.4.
TouchEnd = 39A touch event sequence has finished. This event type was added in 3.4.
TouchCancel = 40A touch event sequence has been canceled. This event type was added in 3.4.
TouchpadSwipe = 41A touchpad swipe gesture event, the current state is determined by its phase field. This event type was added in 3.18.
TouchpadPinch = 42A touchpad pinch gesture event, the current state is determined by its phase field. This event type was added in 3.18.
PadButtonPress = 43A tablet pad button press event. This event type was added in 3.22.
PadButtonRelease = 44A tablet pad button release event. This event type was added in 3.22.
PadRing = 45A tablet pad axis event from a "ring". This event type was added in 3.22.
PadStrip = 46A tablet pad axis event from a "strip". This event type was added in 3.22.
PadGroupMode = 47A tablet pad group mode change. This event type was added in 3.22.
EventLast = 48marks the end of the GdkEventType enumeration. Added in 2.18

Specifies the result of applying a #GdkFilterFunc to a native event.

Continue = 0event not handled, continue processing.
Translate = 1native event translated into a GDK event and stored in the `event` structure that was passed in.
Remove = 2event handled, terminate processing.

#GdkFrameClockPhase is used to represent the different paint clock phases that can be requested. The elements of the enumeration correspond to the signals of #GdkFrameClock.

None = 0no phase
FlushEvents = 1corresponds to GdkFrameClock::flush-events. Should not be handled by applications.
BeforePaint = 2corresponds to GdkFrameClock::before-paint. Should not be handled by applications.
Update = 4corresponds to GdkFrameClock::update.
Layout = 8corresponds to GdkFrameClock::layout.
Paint = 16corresponds to GdkFrameClock::paint.
ResumeEvents = 32corresponds to GdkFrameClock::resume-events. Should not be handled by applications.
AfterPaint = 64corresponds to GdkFrameClock::after-paint. Should not be handled by applications.

Indicates which monitor (in a multi-head setup) a window should span over when in fullscreen mode.

CurrentMonitor = 0Fullscreen on current monitor only.
AllMonitors = 1Span across all monitors when fullscreen.

Error enumeration for #GdkGLContext.

NotAvailable = 0OpenGL support is not available
UnsupportedFormat = 1The requested visual format is not supported
UnsupportedProfile = 2The requested profile is not supported

Defines how device grabs interact with other devices.

None = 0All other devices’ events are allowed.
Window = 1Other devices’ events are blocked for the grab window.
Application = 2Other devices’ events are blocked for the whole application.

Returned by [gdk.device.Device.grab], [gdk.global.pointerGrab] and [gdk.global.keyboardGrab] to indicate success or the reason for the failure of the grab attempt.

Success = 0the resource was successfully grabbed.
AlreadyGrabbed = 1the resource is actively grabbed by another client.
InvalidTime = 2the resource was grabbed more recently than the specified time.
NotViewable = 3the grab window or the @confine_to window are not viewable.
Frozen = 4the resource is frozen by an active grab of another client.
Failed = 5the grab failed for some other reason. Since 3.16

Defines the reference point of a window and the meaning of coordinates passed to [gtk.window.Window.move]. See [gtk.window.Window.move] and the "implementation notes" section of the

Extended Window Manager Hints

specification for more details.

NorthWest = 1the reference point is at the top left corner.
North = 2the reference point is in the middle of the top edge.
NorthEast = 3the reference point is at the top right corner.
West = 4the reference point is at the middle of the left edge.
Center = 5the reference point is at the center of the window.
East = 6the reference point is at the middle of the right edge.
SouthWest = 7the reference point is at the lower left corner.
South = 8the reference point is at the middle of the lower edge.
SouthEast = 9the reference point is at the lower right corner.
Static = 10the reference point is at the top left corner of the window itself, ignoring window manager decorations.

An enumeration that describes the mode of an input device.

Disabled = 0the device is disabled and will not report any events.
Screen = 1the device is enabled. The device’s coordinate space maps to the entire screen.
Window = 2the device is enabled. The device’s coordinate space is mapped to a single window. The manner in which this window is chosen is undefined, but it will typically be the same way in which the focus...

An enumeration describing the type of an input device in general terms.

Mouse = 0the device is a mouse. (This will be reported for the core pointer, even if it is something else, such as a trackball.)
Pen = 1the device is a stylus of a graphics tablet or similar device.
Eraser = 2the device is an eraser. Typically, this would be the other end of a stylus on a graphics tablet.
Cursor = 3the device is a graphics tablet “puck” or similar device.
Keyboard = 4the device is a keyboard.
Touchscreen = 5the device is a direct-input touch device, such as a touchscreen or tablet. This device type has been added in 3.4.
Touchpad = 6the device is an indirect touch device, such as a touchpad. This device type has been added in 3.4.
Trackpoint = 7the device is a trackpoint. This device type has been added in 3.22
TabletPad = 8the device is a "pad", a collection of buttons, rings and strips found in drawing tablets. This device type has been added in 3.22.

This enum is used with [gdk.keymap.Keymap.getModifierMask] in order to determine what modifiers the currently used windowing system backend uses for particular purposes. For example, on X11/Windows, the Control key is used for invoking menu shortcuts (accelerators), whereas on Apple computers it’s the Command key (which correspond to [gdk.types.ModifierType.ControlMask] and [gdk.types.ModifierType.Mod2Mask], respectively).

PrimaryAccelerator = 0the primary modifier used to invoke menu accelerators.
ContextMenu = 1the modifier used to invoke context menus. Note that mouse button 3 always triggers context menus. When this modifier is not 0, it additionally triggers context menus when used with mouse button 1.
ExtendSelection = 2the modifier used to extend selections using `modifier`-click or `modifier`-cursor-key
ModifySelection = 3the modifier used to modify selections, which in most cases means toggling the clicked item into or out of the selection.
NoTextInput = 4when any of these modifiers is pressed, the key event cannot produce a symbol directly. This is meant to be used for input methods, and for use cases like typeahead search.
ShiftGroup = 5the modifier that switches between keyboard groups (AltGr on X11/Windows and Option/Alt on OS X).
DefaultModMask = 6The set of modifier masks accepted as modifiers in accelerators. Needed because Command is mapped to MOD2 on OSX, which is widely used, but on X11 MOD2 is NumLock and using that for a mod key is pr...
enumGdkModifierType : uint

A set of bit-flags to indicate the state of modifier keys and mouse buttons in various event types. Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.

Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.

Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped to Mod2 - Mod5, and indicates this by setting [gdk.types.ModifierType.SuperMask], [gdk.types.ModifierType.HyperMask] or [gdk.types.ModifierType.MetaMask] in the state field of key events.

Note that GDK may add internal values to events which include reserved values such as [gdk.types.ModifierType.ModifierReserved13Mask]. Your code should preserve and ignore them. You can use [gdk.types.MODIFIER_MASK] to remove all reserved values.

Also note that the GDK X backend interprets button press events for button 4-7 as scroll events, so [gdk.types.ModifierType.Button4Mask] and [gdk.types.ModifierType.Button5Mask] will never be set.

ShiftMask = 1the Shift key.
LockMask = 2a Lock key (depending on the modifier mapping of the X server this may either be CapsLock or ShiftLock).
ControlMask = 4the Control key.
Mod1Mask = 8the fourth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier, but normally it is the Alt key).
Mod2Mask = 16the fifth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
Mod3Mask = 32the sixth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
Mod4Mask = 64the seventh modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
Mod5Mask = 128the eighth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).
Button1Mask = 256the first mouse button.
Button2Mask = 512the second mouse button.
Button3Mask = 1024the third mouse button.
Button4Mask = 2048the fourth mouse button.
Button5Mask = 4096the fifth mouse button.
ModifierReserved13Mask = 8192A reserved bit flag; do not use in your own code
ModifierReserved14Mask = 16384A reserved bit flag; do not use in your own code
ModifierReserved15Mask = 32768A reserved bit flag; do not use in your own code
ModifierReserved16Mask = 65536A reserved bit flag; do not use in your own code
ModifierReserved17Mask = 131072A reserved bit flag; do not use in your own code
ModifierReserved18Mask = 262144A reserved bit flag; do not use in your own code
ModifierReserved19Mask = 524288A reserved bit flag; do not use in your own code
ModifierReserved20Mask = 1048576A reserved bit flag; do not use in your own code
ModifierReserved21Mask = 2097152A reserved bit flag; do not use in your own code
ModifierReserved22Mask = 4194304A reserved bit flag; do not use in your own code
ModifierReserved23Mask = 8388608A reserved bit flag; do not use in your own code
ModifierReserved24Mask = 16777216A reserved bit flag; do not use in your own code
ModifierReserved25Mask = 33554432A reserved bit flag; do not use in your own code
SuperMask = 67108864the Super modifier. Since 2.10
HyperMask = 134217728the Hyper modifier. Since 2.10
MetaMask = 268435456the Meta modifier. Since 2.10
ModifierReserved29Mask = 536870912A reserved bit flag; do not use in your own code
ReleaseMask = 1073741824not used in GDK itself. GTK+ uses it to differentiate between (keyval, modifiers) pairs from key press and release events.
ModifierMask = 1543512063a mask covering all modifier types.

Specifies the kind of crossing for #GdkEventCrossing.

See the X11 protocol specification of LeaveNotify for full details of crossing event generation.

Ancestor = 0the window is entered from an ancestor or left towards an ancestor.
Virtual = 1the pointer moves between an ancestor and an inferior of the window.
Inferior = 2the window is entered from an inferior or left towards an inferior.
Nonlinear = 3the window is entered from or left towards a window which is neither an ancestor nor an inferior.
NonlinearVirtual = 4the pointer moves between two windows which are not ancestors of each other and the window is part of the ancestor chain between one of these windows and their least common ancestor.
Unknown = 5an unknown type of enter/leave event occurred.

Specifies why a selection ownership was changed.

NewOwner = 0some other app claimed the ownership
Destroy = 1the window was destroyed
Close = 2the client was closed

Describes how existing data is combined with new data when using [gdk.global.propertyChange].

Replace = 0the new data replaces the existing data.
Prepend = 1the new data is prepended to the existing data.
Append = 2the new data is appended to the existing data.

Specifies the type of a property change for a #GdkEventProperty.

NewValue = 0the property value was changed.
Delete = 1the property was deleted.

Specifies the direction for #GdkEventScroll.

Up = 0the window is scrolled up.
Down = 1the window is scrolled down.
Left = 2the window is scrolled to the left.
Right = 3the window is scrolled to the right.
Smooth = 4the scrolling is determined by the delta values in #GdkEventScroll. See [gdk.event.Event.getScrollDeltas]. Since: 3.4

Flags describing the seat capabilities.

None = 0No input capabilities
Pointer = 1The seat has a pointer (e.g. mouse)
Touch = 2The seat has touchscreen(s) attached
TabletStylus = 4The seat has drawing tablet(s) attached
Keyboard = 8The seat has keyboard(s) attached
AllPointing = 7The union of all pointing capabilities
All = 15The union of all capabilities

Specifies the kind of modification applied to a setting in a #GdkEventSetting.

New = 0a setting was added.
Changed = 1a setting was changed.
Deleted = 2a setting was deleted.
Ok = 0
Error = - 1
ErrorParam = - 2
ErrorFile = - 3
ErrorMem = - 4

This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.

Unknown = 0The layout is not known
None = 1Not organized in this way
HorizontalRgb = 2The layout is horizontal, the order is RGB
HorizontalBgr = 3The layout is horizontal, the order is BGR
VerticalRgb = 4The layout is vertical, the order is RGB
VerticalBgr = 5The layout is vertical, the order is BGR

Specifies the current state of a touchpad gesture. All gestures are guaranteed to begin with an event with phase [gdk.types.TouchpadGesturePhase.Begin], followed by 0 or several events with phase [gdk.types.TouchpadGesturePhase.Update].

A finished gesture may have 2 possible outcomes, an event with phase [gdk.types.TouchpadGesturePhase.End] will be emitted when the gesture is considered successful, this should be used as the hint to perform any permanent changes.

Cancelled gestures may be so for a variety of reasons, due to hardware or the compositor, or due to the gesture recognition layers hinting the gesture did not finish resolutely (eg. a 3rd finger being added during a pinch gesture). In these cases, the last event will report the phase [gdk.types.TouchpadGesturePhase.Cancel], this should be used as a hint to undo any visible/permanent changes that were done throughout the progress of the gesture.

See also #GdkEventTouchpadSwipe and #GdkEventTouchpadPinch.

Begin = 0The gesture has begun.
Update = 1The gesture has been updated.
End = 2The gesture was finished, changes should be permanently applied.
Cancel = 3The gesture was cancelled, all changes should be undone.

Specifies the visiblity status of a window for a #GdkEventVisibility.

Unobscured = 0the window is completely visible.
Partial = 1the window is partially visible.
FullyObscured = 2the window is not visible at all.

A set of values that describe the manner in which the pixel values for a visual are converted into RGB values for display.

StaticGray = 0Each pixel value indexes a grayscale value directly.
Grayscale = 1Each pixel is an index into a color map that maps pixel values into grayscale values. The color map can be changed by an application.
StaticColor = 2Each pixel value is an index into a predefined, unmodifiable color map that maps pixel values into RGB values.
PseudoColor = 3Each pixel is an index into a color map that maps pixel values into rgb values. The color map can be changed by an application.
TrueColor = 4Each pixel value directly contains red, green, and blue components. Use [gdk.visual.Visual.getRedPixelDetails], etc, to obtain information about how the components are assembled into a pixel value.
DirectColor = 5Each pixel value contains red, green, and blue components as for [gdk.types.VisualType.TrueColor], but the components are mapped via a color table into the final output table instead of being conve...
enumGdkWMDecoration : uint

These are hints originally defined by the Motif toolkit. The window manager can use them when determining how to decorate the window. The hint must be set before mapping the window.

All = 1all decorations should be applied.
Border = 2a frame should be drawn around the window.
Resizeh = 4the frame should have resize handles.
Title = 8a titlebar should be placed above the window.
Menu = 16a button for opening a menu should be included.
Minimize = 32a minimize button should be included.
Maximize = 64a maximize button should be included.
enumGdkWMFunction : uint

These are hints originally defined by the Motif toolkit. The window manager can use them when determining the functions to offer for the window. The hint must be set before mapping the window.

All = 1all functions should be offered.
Resize = 2the window should be resizable.
Move = 4the window should be movable.
Minimize = 8the window should be minimizable.
Maximize = 16the window should be maximizable.
Close = 32the window should be closable.

Used to indicate which fields in the #GdkWindowAttr struct should be honored. For example, if you filled in the “cursor” and “x” fields of #GdkWindowAttr, pass “@GDK_WA_X | @GDK_WA_CURSOR” to [gdk.window.Window.new_]. Fields in #GdkWindowAttr not covered by a bit in this enum are required; for example, the @width/@height, @wclass, and @window_type fields are required, they have no corresponding flag in #GdkWindowAttributesType.

Title = 2Honor the title field
X = 4Honor the X coordinate field
Y = 8Honor the Y coordinate field
Cursor = 16Honor the cursor field
Visual = 32Honor the visual field
Wmclass = 64Honor the wmclassclass and wmclassname fields
Noredir = 128Honor the override_redirect field
TypeHint = 256Honor the type_hint field

Determines a window edge or corner.

NorthWest = 0the top left corner.
North = 1the top edge.
NorthEast = 2the top right corner.
West = 3the left edge.
East = 4the right edge.
SouthWest = 5the lower left corner.
South = 6the lower edge.
SouthEast = 7the lower right corner.
enumGdkWindowHints : uint

Used to indicate which fields of a #GdkGeometry struct should be paid attention to. Also, the presence/absence of @GDK_HINT_POS, @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set automatically by #GtkWindow if you call [gtk.window.Window.move]. @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user specified a size/position using a --geometry command-line argument; [gtk.window.Window.parseGeometry] automatically sets these flags.

Pos = 1indicates that the program has positioned the window
MinSize = 2min size fields are set
MaxSize = 4max size fields are set
BaseSize = 8base size fields are set
Aspect = 16aspect ratio fields are set
ResizeInc = 32resize increment fields are set
WinGravity = 64window gravity field is set
UserPos = 128indicates that the window’s position was explicitly set by the user
UserSize = 256indicates that the window’s size was explicitly set by the user
enumGdkWindowState : uint

Specifies the state of a toplevel window.

Withdrawn = 1the window is not shown.
Iconified = 2the window is minimized.
Maximized = 4the window is maximized.
Sticky = 8the window is sticky.
Fullscreen = 16the window is maximized without decorations.
Above = 32the window is kept above other windows.
Below = 64the window is kept below other windows.
Focused = 128the window is presented as focused (with active decorations).
Tiled = 256the window is in a tiled state, Since 3.10. Since 3.22.23, this is deprecated in favor of per-edge information.
TopTiled = 512whether the top edge is tiled, Since 3.22.23
TopResizable = 1024whether the top edge is resizable, Since 3.22.23
RightTiled = 2048whether the right edge is tiled, Since 3.22.23
RightResizable = 4096whether the right edge is resizable, Since 3.22.23
BottomTiled = 8192whether the bottom edge is tiled, Since 3.22.23
BottomResizable = 16384whether the bottom edge is resizable, Since 3.22.23
LeftTiled = 32768whether the left edge is tiled, Since 3.22.23
LeftResizable = 65536whether the left edge is resizable, Since 3.22.23

Describes the kind of window.

Root = 0root window; this window has no parent, covers the entire screen, and is created by the window system
Toplevel = 1toplevel window (used to implement #GtkWindow)
Child = 2child window (used to implement e.g. #GtkEntry)
Temp = 3override redirect temporary window (used to implement #GtkMenu)
Foreign = 4foreign window (see gdkwindowforeign_new())
Offscreen = 5offscreen window (see [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18
Subsurface = 6subsurface-based window; This window is visually tied to a toplevel, and is moved/stacked with it. Currently this window type is only implemented in Wayland. Since 3.14

These are hints for the window manager that indicate what type of function the window has. The window manager can use this when determining decoration and behaviour of the window. The hint must be set before mapping the window.

See the Extended Window Manager Hints specification for more details about window types.

Normal = 0Normal toplevel window.
Dialog = 1Dialog window.
Menu = 2Window used to implement a menu; GTK+ uses this hint only for torn-off menus, see #GtkTearoffMenuItem.
Toolbar = 3Window used to implement toolbars.
Splashscreen = 4Window used to display a splash screen during application startup.
Utility = 5Utility windows which are not detached toolbars or dialogs.
Dock = 6Used for creating dock or panel windows.
Desktop = 7Used for creating the desktop background window.
DropdownMenu = 8A menu that belongs to a menubar.
PopupMenu = 9A menu that does not belong to a menubar, e.g. a context menu.
Tooltip = 10A tooltip.
Notification = 11A notification - typically a “bubble” that belongs to a status icon.
Combo = 12A popup from a combo box.
Dnd = 13A window that is used to implement a DND cursor.

@GDK_INPUT_OUTPUT windows are the standard kind of window you might expect. Such windows receive events and are also displayed on screen. @GDK_INPUT_ONLY windows are invisible; they are usually placed above other windows in order to trap or filter the events. You can’t draw on @GDK_INPUT_ONLY windows.

InputOutput = 0window for graphics and events
InputOnly = 1window for events only

GdkAppLaunchContext is an implementation of #GAppLaunchContext that handles launching an application in a graphical context. It provides startup notification and allows to launch applications on a specific screen or workspace.

Launching an application

GdkAppLaunchContext *context;

context = gdk_display_get_app_launch_context (display);

gdk_app_launch_context_set_screen (screen);
gdk_app_launch_context_set_timestamp (event->time);

if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
 g_warning ("Launching failed: %s\n", error->message);

g_object_unref (context);

An opaque type representing a string as an index into a table of strings on the X server.

structGdkColor

A #GdkColor is used to describe a color, similar to the XColor struct used in the X11 drawing API.

Deprecated

Use #GdkRGBA
Fields
uint pixelFor allocated colors, the pixel value used to draw this color on the screen. Not used anymore.
ushort redThe red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity
ushort greenThe green component of the color
ushort blueThe blue component of the color
structGdkCursor

A #GdkCursor represents a cursor. Its contents are private.

structGdkDevice

The #GdkDevice object represents a single input device, such as a keyboard, a mouse, a touchpad, etc.

See the #GdkDeviceManager documentation for more information about the various kinds of master and slave devices, and their relationships.

In addition to a single pointer and keyboard for user interface input, GDK contains support for a variety of input devices, including graphics tablets, touchscreens and multiple pointers/keyboards interacting simultaneously with the user interface. Such input devices often have additional features, such as sub-pixel positioning information and additional device-dependent information.

In order to query the device hierarchy and be aware of changes in the device hierarchy (such as virtual devices being created or removed, or physical devices being plugged or unplugged), GDK provides #GdkDeviceManager.

By default, and if the platform supports it, GDK is aware of multiple keyboard/pointer pairs and multitouch devices. This behavior can be changed by calling [gdk.global.disableMultidevice] before [gdk.display.Display.open]. There should rarely be a need to do that though, since GDK defaults to a compatibility mode in which it will emit just one enter/leave event pair for all devices on a window. To enable per-device enter/leave events and other multi-pointer interaction features, [gdk.window.Window.setSupportMultidevice] must be called on #GdkWindows (or [gtk.widget.Widget.setSupportMultidevice] on widgets). window. See the [gdk.window.Window.setSupportMultidevice] documentation for more information.

On X11, multi-device support is implemented through XInput 2. Unless [gdk.global.disableMultidevice] is called, the XInput 2 #GdkDeviceManager implementation will be used as the input source. Otherwise either the core or XInput 1 implementations will be used.

For simple applications that don’t have any special interest in input devices, the so-called “client pointer” provides a reasonable approximation to a simple setup with a single pointer and keyboard. The device that has been set as the client pointer can be accessed via [gdk.device_manager.DeviceManager.getClientPointer].

Conceptually, in multidevice mode there are 2 device types. Virtual devices (or master devices) are represented by the pointer cursors and keyboard foci that are seen on the screen. Physical devices (or slave devices) represent the hardware that is controlling the virtual devices, and thus have no visible cursor on the screen.

Virtual devices are always paired, so there is a keyboard device for every pointer device. Associations between devices may be inspected through [gdk.device.Device.getAssociatedDevice].

There may be several virtual devices, and several physical devices could be controlling each of these virtual devices. Physical devices may also be “floating”, which means they are not attached to any virtual device.

Master and slave devices

carlos@sacarino:~$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 E6 Pen stylus                 id=10   [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 E6 Finger touch               id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=14   [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 E6 Pen eraser                 id=16   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
   ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
   ↳ Power Button                              id=6    [slave  keyboard (3)]
   ↳ Video Bus                                 id=7    [slave  keyboard (3)]
   ↳ Sleep Button                              id=8    [slave  keyboard (3)]
   ↳ Integrated Camera                         id=9    [slave  keyboard (3)]
   ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
   ↳ ThinkPad Extra Buttons                    id=15   [slave  keyboard (3)]

By default, GDK will automatically listen for events coming from all master devices, setting the #GdkDevice for all events coming from input devices. Events containing device information are #GDK_MOTION_NOTIFY, #GDK_BUTTON_PRESS, #GDK_2BUTTON_PRESS, #GDK_3BUTTON_PRESS, #GDK_BUTTON_RELEASE, #GDK_SCROLL, #GDK_KEY_PRESS, #GDK_KEY_RELEASE, #GDK_ENTER_NOTIFY, #GDK_LEAVE_NOTIFY, #GDK_FOCUS_CHANGE, #GDK_PROXIMITY_IN, #GDK_PROXIMITY_OUT, #GDK_DRAG_ENTER, #GDK_DRAG_LEAVE, #GDK_DRAG_MOTION, #GDK_DRAG_STATUS, #GDK_DROP_START, #GDK_DROP_FINISHED and #GDK_GRAB_BROKEN. When dealing with an event on a master device, it is possible to get the source (slave) device that the event originated from via [gdk.event.Event.getSourceDevice].

On a standard session, all physical devices are connected by default to the "Virtual Core Pointer/Keyboard" master devices, hence routing all events through these. This behavior is only modified by device grabs, where the slave device is temporarily detached for as long as the grab is held, and more permanently by user modifications to the device hierarchy.

On certain application specific setups, it may make sense to detach a physical device from its master pointer, and mapping it to an specific window. This can be achieved by the combination of [gdk.device.Device.grab] and [gdk.device.Device.setMode].

In order to listen for events coming from devices other than a virtual device, [gdk.window.Window.setDeviceEvents] must be called. Generally, this function can be used to modify the event mask for any given device.

Input devices may also provide additional information besides X/Y. For example, graphics tablets may also provide pressure and X/Y tilt information. This information is device-dependent, and may be queried through [gdk.device.Device.getAxis]. In multidevice mode, virtual devices will change axes in order to always represent the physical device that is routing events through it. Whenever the physical device changes, the #GdkDevice:n-axes property will be notified, and [gdk.device.Device.listAxes] will return the new device axes.

Devices may also have associated “keys” or macro buttons. Such keys can be globally set to map into normal X keyboard events. The mapping is set using [gdk.device.Device.setKey].

In GTK+ 3.20, a new #GdkSeat object has been introduced that supersedes #GdkDeviceManager and should be preferred in newly written code.

#GdkDevicePad is an interface implemented by devices of type [gdk.types.InputSource.TabletPad], it allows querying the features provided by the pad device.

Tablet pads may contain one or more groups, each containing a subset of the buttons/rings/strips available. [gdk.device_pad.DevicePad.getNGroups] can be used to obtain the number of groups, [gdk.device_pad.DevicePad.getNFeatures] and [gdk.device_pad.DevicePad.getFeatureGroup] can be combined to find out the number of buttons/rings/strips the device has, and how are they grouped.

Each of those groups have different modes, which may be used to map each individual pad feature to multiple actions. Only one mode is effective (current) for each given group, different groups may have different current modes. The number of available modes in a group can be found out through [gdk.device_pad.DevicePad.getGroupNModes], and the current mode for a given group will be notified through the #GdkEventPadGroupMode event.

#GdkDisplay objects purpose are two fold:

  • To manage and provide information about input devices (pointers and keyboards)
  • To manage and provide information about the available #GdkScreens

GdkDisplay objects are the GDK representation of an X Display, which can be described as a workstation consisting of a keyboard, a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of various GdkScreen objects currently instantiated by the application. It is also used to access the keyboard(s) and mouse pointer(s) of the display.

Most of the input device handling has been factored out into the separate #GdkDeviceManager object. Every display has a device manager, which you can obtain using [gdk.display.Display.getDeviceManager].

The purpose of the #GdkDisplayManager singleton object is to offer notification when displays appear or disappear or the default display changes.

You can use [gdk.display_manager.DisplayManager.get] to obtain the #GdkDisplayManager singleton, but that should be rarely necessary. Typically, initializing GTK+ opens a display that you can work with without ever accessing the #GdkDisplayManager.

The GDK library can be built with support for multiple backends. The #GdkDisplayManager object determines which backend is used at runtime.

When writing backend-specific code that is supposed to work with multiple GDK backends, you have to consider both compile time and runtime. At compile time, use the #GDK_WINDOWING_X11, #GDK_WINDOWING_WIN32 macros, etc. to find out which backends are present in the GDK library you are building your application against. At runtime, use type-check macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:

Backend-specific code ## {#backend-specific}

#ifdef GDK_WINDOWING_X11
 if (GDK_IS_X11_DISPLAY (display))
   {
     // make X11-specific calls here
   }
 else
#endif
#ifdef GDK_WINDOWING_QUARTZ
 if (GDK_IS_QUARTZ_DISPLAY (display))
   {
     // make Quartz-specific calls here
   }
 else
#endif
 g_error ("Unsupported GDK backend");

#GdkDrawingContext is an object that represents the current drawing state of a #GdkWindow.

It's possible to use a #GdkDrawingContext to draw on a #GdkWindow via rendering API like Cairo or OpenGL.

A #GdkDrawingContext can only be created by calling [gdk.window.Window.beginDrawFrame] and will be valid until a call to [gdk.window.Window.endDrawFrame].

#GdkDrawingContext is available since GDK 3.22

A #GdkEvent contains a union of all of the event types, and allows access to the data fields in a number of ways.

The event type is always the first field in all of the event types, and can always be accessed with the following code, no matter what type of event it is:

GdkEvent *event;
 GdkEventType type;

 type = event->type;

To access other fields of the event, the pointer to the event can be cast to the appropriate event type, or the union member name can be used. For example if the event type is [gdk.types.EventType.ButtonPress] then the x coordinate of the button press can be accessed with:

GdkEvent *event;
 gdouble x;

 x = ((GdkEventButton*)event)->x;
or:
GdkEvent *event;
 gdouble x;

 x = event->button.x;

Fields
GdkEventType typethe #GdkEventType
GdkEventAny anya #GdkEventAny
GdkEventExpose exposea #GdkEventExpose
GdkEventVisibility visibilitya #GdkEventVisibility
GdkEventMotion motiona #GdkEventMotion
GdkEventButton buttona #GdkEventButton
GdkEventTouch toucha #GdkEventTouch
GdkEventScroll scrolla #GdkEventScroll
GdkEventKey keya #GdkEventKey
GdkEventCrossing crossinga #GdkEventCrossing
GdkEventFocus focusChangea #GdkEventFocus
GdkEventConfigure configurea #GdkEventConfigure
GdkEventProperty propertya #GdkEventProperty
GdkEventSelection selectiona #GdkEventSelection
GdkEventOwnerChange ownerChangea #GdkEventOwnerChange
GdkEventProximity proximitya #GdkEventProximity
GdkEventDND dnda #GdkEventDND
GdkEventWindowState windowStatea #GdkEventWindowState
GdkEventSetting settinga #GdkEventSetting
GdkEventGrabBroken grabBrokena #GdkEventGrabBroken
GdkEventTouchpadSwipe touchpadSwipea #GdkEventTouchpadSwipe
GdkEventTouchpadPinch touchpadPincha #GdkEventTouchpadPinch
GdkEventPadButton padButtona #GdkEventPadButton
GdkEventPadAxis padAxisa #GdkEventPadAxis
GdkEventPadGroupMode padGroupModea #GdkEventPadGroupMode

Contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a #GdkEventAny to access these fields.

Fields
GdkEventType typethe type of the event.
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.

Used for button press and button release events. The @type field will be one of [gdk.types.EventType.ButtonPress], [gdk.types.EventType._2buttonPress], [gdk.types.EventType._3buttonPress] or [gdk.types.EventType.ButtonRelease],

Double and triple-clicks result in a sequence of events being received. For double-clicks the order of events will be:

  • [gdk.types.EventType.ButtonPress]
  • [gdk.types.EventType.ButtonRelease]
  • [gdk.types.EventType.ButtonPress]
  • [gdk.types.EventType._2buttonPress]
  • [gdk.types.EventType.ButtonRelease]

Note that the first click is received just like a normal button press, while the second click results in a [gdk.types.EventType._2buttonPress] being received just after the [gdk.types.EventType.ButtonPress].

Triple-clicks are very similar to double-clicks, except that [gdk.types.EventType._3buttonPress] is inserted after the third click. The order of the events is:

  • [gdk.types.EventType.ButtonPress]
  • [gdk.types.EventType.ButtonRelease]
  • [gdk.types.EventType.ButtonPress]
  • [gdk.types.EventType._2buttonPress]
  • [gdk.types.EventType.ButtonRelease]
  • [gdk.types.EventType.ButtonPress]
  • [gdk.types.EventType._3buttonPress]
  • [gdk.types.EventType.ButtonRelease]

For a double click to occur, the second button press must occur within 1/4 of a second of the first. For a triple click to occur, the third button press must also occur within 1/2 second of the first button press.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.ButtonPress], [gdk.types.EventType.2buttonPress], [gdk.types.EventType.3buttonPress] or [gdk.types.EventType.ButtonRelease]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
double xthe x coordinate of the pointer relative to the window.
double ythe y coordinate of the pointer relative to the window.
double * axes@x, @y translated to the axes of @device, or null if @device is the mouse.
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
uint buttonthe button which was pressed or released, numbered from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button. On 2-button mice, the middle button ca...
GdkDevice * devicethe master device that the event originated from. Use [gdk.event.Event.getSourceDevice] to get the slave device.
double xRootthe x coordinate of the pointer relative to the root of the screen.
double yRootthe y coordinate of the pointer relative to the root of the screen.

Generated when a window size or position has changed.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.Configure]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
int xthe new x coordinate of the window, relative to its parent.
int ythe new y coordinate of the window, relative to its parent.
int widththe new width of the window.
int heightthe new height of the window.

Generated when the pointer enters or leaves a window.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.EnterNotify] or [gdk.types.EventType.LeaveNotify]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkWindow * subwindowthe window that was entered or left.
uint timethe time of the event in milliseconds.
double xthe x coordinate of the pointer relative to the window.
double ythe y coordinate of the pointer relative to the window.
double xRootthe x coordinate of the pointer relative to the root of the screen.
double yRootthe y coordinate of the pointer relative to the root of the screen.
GdkCrossingMode modethe crossing mode ([gdk.types.CrossingMode.Normal], [gdk.types.CrossingMode.Grab], [gdk.types.CrossingMode.Ungrab], [gdk.types.CrossingMode.GtkGrab], [gdk.types.CrossingMode.GtkUngrab] or [gdk.type...
GdkNotifyType detailthe kind of crossing that happened ([gdk.types.NotifyType.Inferior], [gdk.types.NotifyType.Ancestor], [gdk.types.NotifyType.Virtual], [gdk.types.NotifyType.Nonlinear] or [gdk.types.NotifyType.Nonli...
gboolean focustrue if @window is the focus window or an inferior.
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.

Generated during DND operations.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.DragEnter], [gdk.types.EventType.DragLeave], [gdk.types.EventType.DragMotion], [gdk.types.EventType.DragStatus], [gdk.types.EventType.DropStart] or [gdk....
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkDragContext * contextthe #GdkDragContext for the current DND operation.
uint timethe time of the event in milliseconds.
short xRootthe x coordinate of the pointer relative to the root of the screen, only set for [gdk.types.EventType.DragMotion] and [gdk.types.EventType.DropStart].
short yRootthe y coordinate of the pointer relative to the root of the screen, only set for [gdk.types.EventType.DragMotion] and [gdk.types.EventType.DropStart].

Generated when all or part of a window becomes visible and needs to be redrawn.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.Expose] or [gdk.types.EventType.Damage]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkRectangle areabounding box of @region.
cairo_region_t * regionthe region that needs to be redrawn.
int countthe number of contiguous [gdk.types.EventType.Expose] events following this one. The only use for this is “exposure compression”, i.e. handling all contiguous [gdk.types.EventType.Expose] event...

Describes a change of keyboard focus.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.FocusChange]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
short in_true if the window has gained the keyboard focus, false if it has lost the focus.

Generated when a pointer or keyboard grab is broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again. Note that implicit grabs (which are initiated by button presses) can also cause #GdkEventGrabBroken events.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.GrabBroken])
GdkWindow * windowthe window which received the event, i.e. the window that previously owned the grab
byte sendEventtrue if the event was sent explicitly.
gboolean keyboardtrue if a keyboard grab was broken, false if a pointer grab was broken
gboolean implicittrue if the broken grab was implicit
GdkWindow * grabWindowIf this event is caused by another grab in the same application, @grabwindow contains the new grab window. Otherwise @grabwindow is null.

Describes a key press or key release event.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.KeyPress] or [gdk.types.EventType.KeyRelease]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
uint keyvalthe key that was pressed or released. See the `gdk/gdkkeysyms.h` header file for a complete list of GDK key codes.
int lengththe length of @string.
char * string_a string containing an approximation of the text that would result from this keypress. The only correct way to handle text input of text is using input methods (see #GtkIMContext), so this field is...
ushort hardwareKeycodethe raw code of the key that was pressed or released.
ubyte groupthe keyboard group.
uint isModifiera flag that indicates if @hardware_keycode is mapped to a modifier. Since 2.10

Generated when the pointer moves.

Fields
GdkEventType typethe type of the event.
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
double xthe x coordinate of the pointer relative to the window.
double ythe y coordinate of the pointer relative to the window.
double * axes@x, @y translated to the axes of @device, or null if @device is the mouse.
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
short isHintset to 1 if this event is just a hint, see the [gdk.types.EventMask.PointerMotionHintMask] value of #GdkEventMask.
GdkDevice * devicethe master device that the event originated from. Use [gdk.event.Event.getSourceDevice] to get the slave device.
double xRootthe x coordinate of the pointer relative to the root of the screen.
double yRootthe y coordinate of the pointer relative to the root of the screen.

Generated when the owner of a selection changes. On X11, this information is only available if the X server supports the XFIXES extension.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.OwnerChange]).
GdkWindow * windowthe window which received the event
byte sendEventtrue if the event was sent explicitly.
GdkWindow * ownerthe new owner of the selection, or null if there is none
GdkOwnerChange reasonthe reason for the ownership change as a #GdkOwnerChange value
GdkAtom selectionthe atom identifying the selection
uint timethe timestamp of the event
uint selectionTimethe time at which the selection ownership was taken over

Generated during [gdk.types.InputSource.TabletPad] interaction with tactile sensors.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.PadRing] or [gdk.types.EventType.PadStrip]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
uint groupthe pad group the ring/strip belongs to. A [gdk.types.InputSource.TabletPad] device may have one or more groups containing a set of buttons/rings/strips each.
uint indexnumber of strip/ring that was interacted. This number is 0-indexed.
uint modeThe current mode of @group. Different groups in a [gdk.types.InputSource.TabletPad] device may have different current modes.
double valueThe current value for the given axis.

Generated during [gdk.types.InputSource.TabletPad] button presses and releases.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.PadButtonPress] or [gdk.types.EventType.PadButtonRelease]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
uint groupthe pad group the button belongs to. A [gdk.types.InputSource.TabletPad] device may have one or more groups containing a set of buttons/rings/strips each.
uint buttonThe pad button that was pressed.
uint modeThe current mode of @group. Different groups in a [gdk.types.InputSource.TabletPad] device may have different current modes.

Generated during [gdk.types.InputSource.TabletPad] mode switches in a group.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.PadGroupMode]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
uint groupthe pad group that is switching mode. A [gdk.types.InputSource.TabletPad] device may have one or more groups containing a set of buttons/rings/strips each.
uint modeThe new mode of @group. Different groups in a [gdk.types.InputSource.TabletPad] device may have different current modes.

Describes a property change on a window.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.PropertyNotify]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkAtom atomthe property that was changed.
uint timethe time of the event in milliseconds.
GdkPropertyState statewhether the property was changed ([gdk.types.PropertyState.NewValue]) or deleted ([gdk.types.PropertyState.Delete]).

Proximity events are generated when using GDK’s wrapper for the XInput extension. The XInput extension is an add-on for standard X that allows you to use nonstandard devices such as graphics tablets. A proximity event indicates that the stylus has moved in or out of contact with the tablet, or perhaps that the user’s finger has moved in or out of contact with a touch screen.

This event type will be used pretty rarely. It only is important for XInput aware programs that are drawing their own cursor.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.ProximityIn] or [gdk.types.EventType.ProximityOut]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
GdkDevice * devicethe master device that the event originated from. Use [gdk.event.Event.getSourceDevice] to get the slave device.

Generated from button presses for the buttons 4 to 7. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

Some GDK backends can also generate “smooth” scroll events, which can be recognized by the [gdk.types.ScrollDirection.Smooth] scroll direction. For these, the scroll deltas can be obtained with [gdk.event.Event.getScrollDeltas].

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.Scroll]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
double xthe x coordinate of the pointer relative to the window.
double ythe y coordinate of the pointer relative to the window.
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
GdkScrollDirection directionthe direction to scroll to (one of [gdk.types.ScrollDirection.Up], [gdk.types.ScrollDirection.Down], [gdk.types.ScrollDirection.Left], [gdk.types.ScrollDirection.Right] or [gdk.types.ScrollDirectio...
GdkDevice * devicethe master device that the event originated from. Use [gdk.event.Event.getSourceDevice] to get the slave device.
double xRootthe x coordinate of the pointer relative to the root of the screen.
double yRootthe y coordinate of the pointer relative to the root of the screen.
double deltaXthe x coordinate of the scroll delta
double deltaYthe y coordinate of the scroll delta
uint isStop

Generated when a selection is requested or ownership of a selection is taken over by another client application.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.SelectionClear], [gdk.types.EventType.SelectionNotify] or [gdk.types.EventType.SelectionRequest]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkAtom selectionthe selection.
GdkAtom targetthe target to which the selection should be converted.
GdkAtom propertythe property in which to place the result of the conversion.
uint timethe time of the event in milliseconds.
GdkWindow * requestorthe window on which to place @property or null if none.

Generated when a setting is modified.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.Setting]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkSettingAction actionwhat happened to the setting ([gdk.types.SettingAction.New], [gdk.types.SettingAction.Changed] or [gdk.types.SettingAction.Deleted]).
char * namethe name of the setting.

Used for touch events. @type field will be one of [gdk.types.EventType.TouchBegin], [gdk.types.EventType.TouchUpdate], [gdk.types.EventType.TouchEnd] or [gdk.types.EventType.TouchCancel].

Touch events are grouped into sequences by means of the @sequence field, which can also be obtained with [gdk.event.Event.getEventSequence]. Each sequence begins with a [gdk.types.EventType.TouchBegin] event, followed by any number of [gdk.types.EventType.TouchUpdate] events, and ends with a [gdk.types.EventType.TouchEnd] (or [gdk.types.EventType.TouchCancel]) event. With multitouch devices, there may be several active sequences at the same time.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.TouchBegin], [gdk.types.EventType.TouchUpdate], [gdk.types.EventType.TouchEnd], [gdk.types.EventType.TouchCancel])
GdkWindow * windowthe window which received the event
byte sendEventtrue if the event was sent explicitly.
uint timethe time of the event in milliseconds.
double xthe x coordinate of the pointer relative to the window
double ythe y coordinate of the pointer relative to the window
double * axes@x, @y translated to the axes of @device, or null if @device is the mouse
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType
GdkEventSequence * sequencethe event sequence that the event belongs to
gboolean emulatingPointerwhether the event should be used for emulating pointer event
GdkDevice * devicethe master device that the event originated from. Use [gdk.event.Event.getSourceDevice] to get the slave device.
double xRootthe x coordinate of the pointer relative to the root of the screen
double yRootthe y coordinate of the pointer relative to the root of the screen

Generated during touchpad swipe gestures.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.TouchpadPinch])
GdkWindow * windowthe window which received the event
byte sendEventtrue if the event was sent explicitly
byte phasethe current phase of the gesture
byte nFingersThe number of fingers triggering the pinch
uint timethe time of the event in milliseconds
double xThe X coordinate of the pointer
double yThe Y coordinate of the pointer
double dxMovement delta in the X axis of the swipe focal point
double dyMovement delta in the Y axis of the swipe focal point
double angleDeltaThe angle change in radians, negative angles denote counter-clockwise movements
double scaleThe current scale, relative to that at the time of the corresponding [gdk.types.TouchpadGesturePhase.Begin] event
double xRootThe X coordinate of the pointer, relative to the root of the screen.
double yRootThe Y coordinate of the pointer, relative to the root of the screen.
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.

Generated during touchpad swipe gestures.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.TouchpadSwipe])
GdkWindow * windowthe window which received the event
byte sendEventtrue if the event was sent explicitly
byte phasethe current phase of the gesture
byte nFingersThe number of fingers triggering the swipe
uint timethe time of the event in milliseconds
double xThe X coordinate of the pointer
double yThe Y coordinate of the pointer
double dxMovement delta in the X axis of the swipe focal point
double dyMovement delta in the Y axis of the swipe focal point
double xRootThe X coordinate of the pointer, relative to the root of the screen.
double yRootThe Y coordinate of the pointer, relative to the root of the screen.
GdkModifierType statea bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.

Generated when the window visibility status has changed.

Deprecated

Modern composited windowing systems with pervasive

transparency make it impossible to track the visibility of a window reliably, so this event can not be guaranteed to provide useful information.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.VisibilityNotify]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkVisibilityState statethe new visibility state ([gdk.types.VisibilityState.FullyObscured], [gdk.types.VisibilityState.Partial] or [gdk.types.VisibilityState.Unobscured]).

Generated when the state of a toplevel window changes.

Fields
GdkEventType typethe type of the event ([gdk.types.EventType.WindowState]).
GdkWindow * windowthe window which received the event.
byte sendEventtrue if the event was sent explicitly.
GdkWindowState changedMaskmask specifying what flags have changed.
GdkWindowState newWindowStatethe new window state, a combination of #GdkWindowState bits.

A #GdkFrameClock tells the application when to update and repaint a window. This may be synced to the vertical refresh rate of the monitor, for example. Even when the frame clock uses a simple timer rather than a hardware-based vertical sync, the frame clock helps because it ensures everything paints at the same time (reducing the total number of frames). The frame clock can also automatically stop painting when it knows the frames will not be visible, or scale back animation framerates.

#GdkFrameClock is designed to be compatible with an OpenGL-based implementation or with mozRequestAnimationFrame in Firefox, for example.

A frame clock is idle until someone requests a frame with [gdk.frame_clock.FrameClock.requestPhase]. At some later point that makes sense for the synchronization being implemented, the clock will process a frame and emit signals for each phase that has been requested. (See the signals of the #GdkFrameClock class for documentation of the phases. [gdk.types.FrameClockPhase.Update] and the #GdkFrameClock::update signal are most interesting for application writers, and are used to update the animations, using the frame time given by [gdk.frame_clock.FrameClock.getFrameTime].

The frame time is reported in microseconds and generally in the same timescale as [glib.global.getMonotonicTime], however, it is not the same as [glib.global.getMonotonicTime]. The frame time does not advance during the time a frame is being painted, and outside of a frame, an attempt is made so that all calls to [gdk.frame_clock.FrameClock.getFrameTime] that are called at a “similar” time get the same value. This means that if different animations are timed by looking at the difference in time between an initial value from [gdk.frame_clock.FrameClock.getFrameTime] and the value inside the #GdkFrameClock::update signal of the clock, they will stay exactly synchronized.

A #GdkFrameTimings object holds timing information for a single frame of the application’s displays. To retrieve #GdkFrameTimings objects, use [gdk.frame_clock.FrameClock.getTimings] or [gdk.frame_clock.FrameClock.getCurrentTimings]. The information in #GdkFrameTimings is useful for precise synchronization of video with the event or audio streams, and for measuring quality metrics for the application’s display, such as latency and jitter.

#GdkGLContext is an object representing the platform-specific OpenGL drawing context.

#GdkGLContexts are created for a #GdkWindow using [gdk.window.Window.createGlContext], and the context will match the #GdkVisual of the window.

A #GdkGLContext is not tied to any particular normal framebuffer. For instance, it cannot draw to the #GdkWindow back buffer. The GDK repaint system is in full control of the painting to that. Instead, you can create render buffers or textures and use [gdk.global.cairoDrawFromGl] in the draw function of your widget to draw them. Then GDK will handle the integration of your rendering with that of other widgets.

Support for #GdkGLContext is platform-specific, context creation can fail, returning null context.

A #GdkGLContext has to be made "current" in order to start using it, otherwise any OpenGL call will be ignored.

Creating a new OpenGL context

In order to create a new #GdkGLContext instance you need a #GdkWindow, which you typically get during the realize call of a widget.

A #GdkGLContext is not realized until either [gdk.glcontext.GLContext.makeCurrent], or until it is realized using [gdk.glcontext.GLContext.realize]. It is possible to specify details of the GL context like the OpenGL version to be used, or whether the GL context should have extra state validation enabled after calling [gdk.window.Window.createGlContext] by calling [gdk.glcontext.GLContext.realize]. If the realization fails you have the option to change the settings of the #GdkGLContext and try again.

Using a GdkGLContext

You will need to make the #GdkGLContext the current context before issuing OpenGL calls; the system sends OpenGL commands to whichever context is current. It is possible to have multiple contexts, so you always need to ensure that the one which you want to draw with is the current one before issuing commands:

gdk_gl_context_make_current (context);

You can now perform your drawing using OpenGL commands.

You can check which #GdkGLContext is the current one by using [gdk.glcontext.GLContext.getCurrent]; you can also unset any #GdkGLContext that is currently set by calling [gdk.glcontext.GLContext.clearCurrent].

The #GdkGeometry struct gives the window manager information about a window’s geometry constraints. Normally you would set these on the GTK+ level using [gtk.window.Window.setGeometryHints]. #GtkWindow then sets the hints on the #GdkWindow it creates.

[gdk.window.Window.setGeometryHints] expects the hints to be fully valid already and simply passes them to the window manager; in contrast, [gtk.window.Window.setGeometryHints] performs some interpretation. For example, #GtkWindow will apply the hints to the geometry widget instead of the toplevel window, if you set a geometry widget. Also, the @min_width/@min_height/@max_width/@max_height fields may be set to -1, and #GtkWindow will substitute the size request of the window or geometry widget. If the minimum size hint is not provided, #GtkWindow will use its requisition as the minimum size. If the minimum size is provided and a geometry widget is set, #GtkWindow will take the minimum size as the minimum size of the geometry widget rather than the entire window. The base size is treated similarly.

The canonical use-case for [gtk.window.Window.setGeometryHints] is to get a terminal widget to resize properly. Here, the terminal text area should be the geometry widget; #GtkWindow will then automatically set the base size to the size of other widgets in the terminal window, such as the menubar and scrollbar. Then, the @width_inc and @height_inc fields should be set to the size of one character in the terminal. Finally, the base size should be set to the size of one character. The net effect is that the minimum size of the terminal will have a 1x1 character terminal area, and only terminal sizes on the “character grid” will be allowed.

Here’s an example of how the terminal example would be implemented, assuming a terminal area widget called “terminal” and a toplevel window “toplevel”:

GdkGeometry hints;

	hints.base_width = terminal->char_width;
       hints.base_height = terminal->char_height;
       hints.min_width = terminal->char_width;
       hints.min_height = terminal->char_height;
       hints.width_inc = terminal->char_width;
       hints.height_inc = terminal->char_height;

gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
                               GTK_WIDGET (terminal),
                               &hints,
                               GDK_HINT_RESIZE_INC |
                               GDK_HINT_MIN_SIZE |
                               GDK_HINT_BASE_SIZE);

The other useful fields are the @min_aspect and @max_aspect fields; these contain a width/height ratio as a floating point number. If a geometry widget is set, the aspect applies to the geometry widget rather than the entire window. The most common use of these hints is probably to set @min_aspect and @max_aspect to the same value, thus forcing the window to keep a constant aspect ratio.

Fields
int minWidthminimum width of window (or -1 to use requisition, with #GtkWindow only)
int minHeightminimum height of window (or -1 to use requisition, with #GtkWindow only)
int maxWidthmaximum width of window (or -1 to use requisition, with #GtkWindow only)
int maxHeightmaximum height of window (or -1 to use requisition, with #GtkWindow only)
int baseWidthallowed window widths are @basewidth + @widthinc * N where N is any integer (-1 allowed with #GtkWindow)
int baseHeightallowed window widths are @baseheight + @heightinc * N where N is any integer (-1 allowed with #GtkWindow)
int widthIncwidth resize increment
int heightIncheight resize increment
double minAspectminimum width/height ratio
double maxAspectmaximum width/height ratio
GdkGravity winGravitywindow gravity, see [gtk.window.Window.setGravity]
structGdkKeymap

A #GdkKeymap defines the translation from keyboard state (including a hardware key, a modifier mask, and active keyboard group) to a keyval. This translation has two phases. The first phase is to determine the effective keyboard group and level for the keyboard state; the second phase is to look up the keycode/group/level triplet in the keymap and see what keyval it corresponds to.

A #GdkKeymapKey is a hardware key that can be mapped to a keyval.

Fields
uint keycodethe hardware keycode. This is an identifying number for a physical key.
int groupindicates movement in a horizontal direction. Usually groups are used for two different languages. In group 0, a key might have two English characters, and in group 1 it might have two Hebrew chara...
int levelindicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number “1” on it also has the exclamation point ("!") character on it. Th...

GdkMonitor objects represent the individual outputs that are associated with a #GdkDisplay. GdkDisplay has APIs to enumerate monitors with [gdk.display.Display.getNMonitors] and [gdk.display.Display.getMonitor], and to find particular monitors with [gdk.display.Display.getPrimaryMonitor] or [gdk.display.Display.getMonitorAtWindow].

GdkMonitor was introduced in GTK+ 3.22 and supersedes earlier APIs in GdkScreen to obtain monitor-related information.

structGdkPoint

Defines the x and y coordinates of a point.

Fields
int xthe x coordinate of the point.
int ythe y coordinate of the point.
structGdkRGBA

A #GdkRGBA is used to represent a (possibly translucent) color, in a way that is compatible with cairo’s notion of color.

Fields
double redThe intensity of the red channel from 0.0 to 1.0 inclusive
double greenThe intensity of the green channel from 0.0 to 1.0 inclusive
double blueThe intensity of the blue channel from 0.0 to 1.0 inclusive
double alphaThe opacity of the color from 0.0 for completely translucent to 1.0 for opaque

Defines the position and size of a rectangle. It is identical to #cairo_rectangle_int_t.

Fields
int x
int y
int width
int height
structGdkScreen

#GdkScreen objects are the GDK representation of the screen on which windows can be displayed and on which the pointer moves. X originally identified screens with physical screens, but nowadays it is more common to have a single #GdkScreen which combines several physical monitors (see [gdk.screen.Screen.getNMonitors]).

GdkScreen is used throughout GDK and GTK+ to specify which screen the top level windows are to be displayed on. it is also used to query the screen specification and default settings such as the default visual ([gdk.screen.Screen.getSystemVisual]), the dimensions of the physical monitors ([gdk.screen.Screen.getMonitorGeometry]), etc.

structGdkSeat

The #GdkSeat object represents a collection of input devices that belong to a user.

Fields
GObject parentInstance

A #GdkTimeCoord stores a single event in a motion history.

Fields
uint timeThe timestamp for this event.
double[128] axesthe values of the device’s axes.
structGdkVisual

A #GdkVisual contains information about a particular visual.

structGdkWindow

Attributes to use for a newly-created window.

Fields
char * titletitle of the window (for toplevel windows)
int eventMaskevent mask (see [gdk.window.Window.setEvents])
int xX coordinate relative to parent window (see [gdk.window.Window.move])
int yY coordinate relative to parent window (see [gdk.window.Window.move])
int widthwidth of window
int heightheight of window
GdkWindowWindowClass wclass#GDKINPUTOUTPUT (normal window) or #GDKINPUTONLY (invisible window that receives events)
GdkVisual * visual#GdkVisual for window
GdkWindowType windowTypetype of window
GdkCursor * cursorcursor for the window (see [gdk.window.Window.setCursor])
char * wmclassNamedon’t use (see [gtk.window.Window.setWmclass])
char * wmclassClassdon’t use (see [gtk.window.Window.setWmclass])
gboolean overrideRedirecttrue to bypass the window manager
GdkWindowTypeHint typeHinta hint of the function of the window
Fields
GObjectClass parentClass
GdkWindow * function(GdkWindow * window, double x, double y) pickEmbeddedChild
void function(GdkWindow * window, double offscreenX, double offscreenY, double * embedderX, double * embedderY) toEmbedder
void function(GdkWindow * window, double embedderX, double embedderY, double * offscreenX, double * offscreenY) fromEmbedder
cairo_surface_t * function(GdkWindow * window, int width, int height) createSurface
void function() GdkReserved1
void function() GdkReserved2
void function() GdkReserved3
void function() GdkReserved4
void function() GdkReserved5
void function() GdkReserved6
void function() GdkReserved7
void function() GdkReserved8
aliasGdkEventFunc = void function(GdkEvent * event, void * data)
aliasGdkFilterFunc = GdkFilterReturn function(GdkXEvent * xevent, GdkEvent * event, void * data)
aliasGdkSeatGrabPrepareFunc = void function(GdkSeat * seat, GdkWindow * window, void * userData)
aliasGdkWindowChildFunc = gboolean function(GdkWindow * window, void * userData)
aliasGdkWindowInvalidateHandlerFunc = void function(GdkWindow * window, cairo_region_t * region)