Type Aliases
The following type aliases are available globally.
-
Used to represent native events (XEvents for the X11 backend, MSGs for Win32).
Declaration
Swift
public typealias XEvent = GdkXEvent
-
Specifies the type of function passed to
gdk_event_handler_set()
to handle all GDK events.Declaration
Swift
public typealias EventFunc = GdkEventFunc
-
Specifies the type of function used to filter native events before they are converted to GDK events.
When a filter is called,
event
is unpopulated, except forevent->window
. The filter may translate the native event to a GDK event and store the result inevent
, or handle it without translation. If the filter translates the event and processing should continue, it should returnGDK_FILTER_TRANSLATE
.Declaration
Swift
public typealias FilterFunc = GdkFilterFunc
-
Type of the callback used to set up
window
so it can be grabbed. A typical action would be ensuring the window is visible, although there’s room for other initialization actions.Declaration
Swift
public typealias SeatGrabPrepareFunc = GdkSeatGrabPrepareFunc
-
A function of this type is passed to
gdk_window_invalidate_maybe_recurse()
. It gets called for each child of the window to determine whether to recursively invalidate it or now.Declaration
Swift
public typealias WindowChildFunc = GdkWindowChildFunc
-
Whenever some area of the window is invalidated (directly in the window or in a child window) this gets called with
region
in the coordinate space ofwindow
. You can useregion
to just keep track of the dirty region, or you can actually changeregion
in case you are doing display tricks like showing a child in multiple places.Declaration
Swift
public typealias WindowInvalidateHandlerFunc = GdkWindowInvalidateHandlerFunc
-
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.
Declaration
Swift
public typealias AxisUse = GdkAxisUse
-
A set of values describing the possible byte-orders for storing pixel values in memory.
Declaration
Swift
public typealias ByteOrder = GdkByteOrder
-
Specifies the crossing mode for
GdkEventCrossing
.Declaration
Swift
public typealias CrossingMode = GdkCrossingMode
-
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_new_from_name()
.Declaration
Swift
public typealias CursorType = GdkCursorType
-
A pad feature.
Declaration
Swift
public typealias DevicePadFeature = GdkDevicePadFeature
-
Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc.
Declaration
Swift
public typealias DeviceToolType = GdkDeviceToolType
-
Indicates the device type. See above for more information about the meaning of these device types.
Declaration
Swift
public typealias DeviceType = GdkDeviceType
-
Used in
GdkDragContext
to the reason of a cancelled DND operation.Declaration
Swift
public typealias DragCancelReason = GdkDragCancelReason
-
Used in
GdkDragContext
to indicate the protocol according to which DND is done.Declaration
Swift
public typealias Drag_Protocol = GdkDragProtocol
-
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_2BUTTON_PRESS
andGDK_3BUTTON_PRESS
would translate into something syntactically invalid (egGdk.EventType.2ButtonPress
, where a symbol is not allowed to start with a number). In that case, the aliasesGDK_DOUBLE_BUTTON_PRESS
andGDK_TRIPLE_BUTTON_PRESS
can be used instead.Declaration
Swift
public typealias EventType = GdkEventType
-
Specifies the result of applying a
GdkFilterFunc
to a native event.Declaration
Swift
public typealias FilterReturn = GdkFilterReturn
-
Indicates which monitor (in a multi-head setup) a window should span over when in fullscreen mode.
Declaration
Swift
public typealias FullscreenMode = GdkFullscreenMode
-
Error enumeration for
GdkGLContext
.Declaration
Swift
public typealias GLError = GdkGLError
-
Defines how device grabs interact with other devices.
Declaration
Swift
public typealias GrabOwnership = GdkGrabOwnership
-
Returned by
gdk_device_grab()
,gdk_pointer_grab()
andgdk_keyboard_grab()
to indicate success or the reason for the failure of the grab attempt.Declaration
Swift
public typealias GrabStatus = GdkGrabStatus
-
Defines the reference point of a window and the meaning of coordinates passed to
gtk_window_move()
. Seegtk_window_move()
and the “implementation notes” section of the Extended Window Manager Hints specification for more details.Declaration
Swift
public typealias Gravity = GdkGravity
-
An enumeration that describes the mode of an input device.
Declaration
Swift
public typealias InputMode = GdkInputMode
-
An enumeration describing the type of an input device in general terms.
Declaration
Swift
public typealias InputSource = GdkInputSource
-
This enum is used with
gdk_keymap_get_modifier_mask()
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 toGDK_CONTROL_MASK
andGDK_MOD2_MASK
, respectively).Declaration
Swift
public typealias ModifierIntent = GdkModifierIntent
-
Specifies the kind of crossing for
GdkEventCrossing
.See the X11 protocol specification of LeaveNotify for full details of crossing event generation.
Declaration
Swift
public typealias NotifyType = GdkNotifyType
-
Specifies why a selection ownership was changed.
Declaration
Swift
public typealias OwnerChange = GdkOwnerChange
-
Describes how existing data is combined with new data when using
gdk_property_change()
.Declaration
Swift
public typealias PropMode = GdkPropMode
-
Specifies the type of a property change for a
GdkEventProperty
.Declaration
Swift
public typealias PropertyState = GdkPropertyState
-
Specifies the direction for
GdkEventScroll
.Declaration
Swift
public typealias ScrollDirection = GdkScrollDirection
-
Specifies the kind of modification applied to a setting in a
GdkEventSetting
.Declaration
Swift
public typealias SettingAction = GdkSettingAction
-
Undocumented
Declaration
Swift
public typealias Status = GdkStatus
-
This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.
Declaration
Swift
public typealias SubpixelLayout = GdkSubpixelLayout
-
Specifies the current state of a touchpad gesture. All gestures are guaranteed to begin with an event with phase
GDK_TOUCHPAD_GESTURE_PHASE_BEGIN
, followed by 0 or several events with phaseGDK_TOUCHPAD_GESTURE_PHASE_UPDATE
.A finished gesture may have 2 possible outcomes, an event with phase
GDK_TOUCHPAD_GESTURE_PHASE_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_TOUCHPAD_GESTURE_PHASE_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
andGdkEventTouchpadPinch
.Declaration
Swift
public typealias TouchpadGesturePhase = GdkTouchpadGesturePhase
-
Specifies the visiblity status of a window for a
GdkEventVisibility
.Declaration
Swift
public typealias VisibilityState = GdkVisibilityState
-
A set of values that describe the manner in which the pixel values for a visual are converted into RGB values for display.
Declaration
Swift
public typealias VisualType = GdkVisualType
-
Determines a window edge or corner.
Declaration
Swift
public typealias WindowEdge = GdkWindowEdge
-
Describes the kind of window.
Declaration
Swift
public typealias WindowType = GdkWindowType
-
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.
Declaration
Swift
public typealias WindowTypeHint = GdkWindowTypeHint
-
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 onGDK_INPUT_ONLY
windows.Declaration
Swift
public typealias WindowWindowClass = GdkWindowWindowClass
-
Undocumented
Declaration
Swift
public typealias GdkXEvent = _GdkXEvent
-
A callback function or closure that runs on a different thread
Declaration
Swift
public typealias ThreadCallback = () -> Bool