Crate gdk [] [src]

Modules

enums
prelude

Traits intended for blanket imports.

Structs

AnchorHints
AppLaunchContext

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

Atom
AxisFlags
Color
Cursor

A Cursor represents a cursor. Its contents are private.

Device

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

DeviceManager

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.

DeviceTool
Display

Display objects purpose are two fold:

DisplayManager

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

DragAction
DragContext
Error

A generic error capable of representing various error domains (types).

Event

A generic GDK event.

EventButton

Used for button press and button release events. The type field will be one of EventType::ButtonPress, EventType::2buttonPress, EventType::3buttonPress or EventType::ButtonRelease,

EventConfigure

Generated when a window size or position has changed.

EventCrossing

Generated when the pointer enters or leaves a window.

EventDND

Generated during DND operations.

EventExpose

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

EventFocus

Describes a change of keyboard focus.

EventGrabBroken

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 EventGrabBroken events.

EventKey

Describes a key press or key release event.

EventMask
EventMotion

Generated when the pointer moves.

EventOwnerChange

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

EventProperty

Describes a property change on a window.

EventProximity

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.

EventScroll

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.

EventSelection

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

EventSetting

Generated when a setting is modified.

EventTouch

Used for touch events. type field will be one of EventType::TouchBegin, EventType::TouchUpdate, EventType::TouchEnd or EventType::TouchCancel.

EventVisibility

[Deprecated since 3.12] Generated when the window visibility status has changed.

EventWindowState

Generated when the state of a toplevel window changes.

FrameClock

A FrameClock 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.

FrameClockPhase
FrameTimings

A FrameTimings object holds timing information for a single frame of the application’s displays. To retrieve FrameTimings objects, use FrameClock::get_timings or FrameClock::get_current_timings. The information in FrameTimings 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.

GLContext

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

ModifierType
Monitor
RGBA
Rectangle
RgbaParseError
Screen

Screen 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 Screen which combines several physical monitors (see Screen::get_n_monitors).

Seat
SeatCapabilities
Visual

A Visual contains information about a particular visual.

WMDecoration
WMFunction
Window
WindowAttr
WindowHints
WindowState

Enums

AxisUse

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

ByteOrder

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

CrossingMode

Specifies the crossing mode for EventCrossing.

CursorType

The standard cursors available.

DeviceToolType
DeviceType

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

DragCancelReason
DragProtocol

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

EventType

Specifies the type of the event.

FullscreenMode

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

GLError

Error enumeration for GLContext.

GrabOwnership

Defines how device grabs interact with other devices.

GrabStatus

Returned by Device::grab, gdk_pointer_grab and gdk_keyboard_grab to indicate success or the reason for the failure of the grab attempt.

Gravity

Defines the reference point of a window and the meaning of coordinates passed to gtk_window_move. See gtk_window_move and the "implementation notes" section of the Extended Window Manager Hints specification for more details.

InputMode

An enumeration that describes the mode of an input device.

InputSource

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

ModifierIntent

This enum is used with 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 to ModifierType::ControlMask and ModifierType::Mod2Mask, respectively).

NotifyType

Specifies the kind of crossing for EventCrossing.

OwnerChange

Specifies why a selection ownership was changed.

PropertyState

Specifies the type of a property change for a EventProperty.

ScrollDirection

Specifies the direction for EventScroll.

SettingAction

Specifies the kind of modification applied to a setting in a EventSetting.

SubpixelLayout
VisibilityState

Specifies the visiblity status of a window for a EventVisibility.

VisualType

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

WindowEdge

Determines a window edge or corner.

WindowType

Describes the kind of window.

WindowTypeHint

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.

WindowWindowClass

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

Constants

ACTION_ASK
ACTION_COPY
ACTION_DEFAULT
ACTION_LINK
ACTION_MOVE
ACTION_PRIVATE
ALL_EVENTS_MASK
ANCHOR_FLIP
ANCHOR_FLIP_X
ANCHOR_FLIP_Y
ANCHOR_RESIZE
ANCHOR_RESIZE_X
ANCHOR_RESIZE_Y
ANCHOR_SLIDE
ANCHOR_SLIDE_X
ANCHOR_SLIDE_Y
ATOM_NONE
AXIS_FLAG_DISTANCE
AXIS_FLAG_PRESSURE
AXIS_FLAG_ROTATION
AXIS_FLAG_SLIDER
AXIS_FLAG_WHEEL
AXIS_FLAG_X
AXIS_FLAG_XTILT
AXIS_FLAG_Y
AXIS_FLAG_YTILT
BUTTON1_MASK
BUTTON1_MOTION_MASK
BUTTON2_MASK
BUTTON2_MOTION_MASK
BUTTON3_MASK
BUTTON3_MOTION_MASK
BUTTON4_MASK
BUTTON5_MASK
BUTTON_MOTION_MASK
BUTTON_PRESS_MASK
BUTTON_RELEASE_MASK
CONTROL_MASK
DECOR_ALL
DECOR_BORDER
DECOR_MAXIMIZE
DECOR_MENU
DECOR_MINIMIZE
DECOR_RESIZEH
DECOR_TITLE
ENTER_NOTIFY_MASK
EXPOSURE_MASK
FOCUS_CHANGE_MASK
FRAME_CLOCK_PHASE_AFTER_PAINT
FRAME_CLOCK_PHASE_BEFORE_PAINT
FRAME_CLOCK_PHASE_FLUSH_EVENTS
FRAME_CLOCK_PHASE_LAYOUT
FRAME_CLOCK_PHASE_NONE
FRAME_CLOCK_PHASE_PAINT
FRAME_CLOCK_PHASE_RESUME_EVENTS
FRAME_CLOCK_PHASE_UPDATE
FUNC_ALL
FUNC_CLOSE
FUNC_MAXIMIZE
FUNC_MINIMIZE
FUNC_MOVE
FUNC_RESIZE
HINT_ASPECT
HINT_BASE_SIZE
HINT_MAX_SIZE
HINT_MIN_SIZE
HINT_POS
HINT_RESIZE_INC
HINT_USER_POS
HINT_USER_SIZE
HINT_WIN_GRAVITY
HYPER_MASK
KEY_PRESS_MASK
KEY_RELEASE_MASK
LEAVE_NOTIFY_MASK
LOCK_MASK
META_MASK
MOD1_MASK
MOD2_MASK
MOD3_MASK
MOD4_MASK
MOD5_MASK
MODIFIER_MASK
MODIFIER_RESERVED_13_MASK
MODIFIER_RESERVED_14_MASK
MODIFIER_RESERVED_15_MASK
MODIFIER_RESERVED_16_MASK
MODIFIER_RESERVED_17_MASK
MODIFIER_RESERVED_18_MASK
MODIFIER_RESERVED_19_MASK
MODIFIER_RESERVED_20_MASK
MODIFIER_RESERVED_21_MASK
MODIFIER_RESERVED_22_MASK
MODIFIER_RESERVED_23_MASK
MODIFIER_RESERVED_24_MASK
MODIFIER_RESERVED_25_MASK
MODIFIER_RESERVED_29_MASK
POINTER_MOTION_HINT_MASK
POINTER_MOTION_MASK
PROPERTY_CHANGE_MASK
PROXIMITY_IN_MASK
PROXIMITY_OUT_MASK
RELEASE_MASK
SCROLL_MASK
SEAT_CAPABILITY_ALL
SEAT_CAPABILITY_ALL_POINTING
SEAT_CAPABILITY_KEYBOARD
SEAT_CAPABILITY_NONE
SEAT_CAPABILITY_POINTER
SEAT_CAPABILITY_TABLET_STYLUS
SEAT_CAPABILITY_TOUCH
SHIFT_MASK
SMOOTH_SCROLL_MASK
STRUCTURE_MASK
SUBSTRUCTURE_MASK
SUPER_MASK
TABLET_PAD_MASK
TOUCHPAD_GESTURE_MASK
TOUCH_MASK
VISIBILITY_NOTIFY_MASK
WINDOW_STATE_ABOVE
WINDOW_STATE_BELOW
WINDOW_STATE_FOCUSED
WINDOW_STATE_FULLSCREEN
WINDOW_STATE_ICONIFIED
WINDOW_STATE_MAXIMIZED
WINDOW_STATE_STICKY
WINDOW_STATE_TILED
WINDOW_STATE_WITHDRAWN

Functions

beep
error_trap_pop
error_trap_pop_ignored
error_trap_push
flush
get_display_arg_name
get_program_class
init
keyval_name
keyval_to_unicode
notify_startup_complete
notify_startup_complete_with_id
screen_height
screen_height_mm
screen_width
screen_width_mm
set_allowed_backends
set_initialized

Informs this crate that GDK has been initialized and the current thread is the main one.

set_program_class

Type Definitions

key