Crate gdk [] [src]

Modules

enums
prelude

Traits inteded for blanket imports.

Structs

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

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

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
RGBA
Rectangle
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).

Visual

A Visual contains information about a particular visual.

WMDecoration
WMFunction
Window
WindowHints
WindowState

Enums

AxisUse
CrossingMode
CursorType

The standard cursors available.

DragProtocol
EventType
FullscreenMode
GLError

Error enumeration for GLContext.

GrabOwnership
GrabStatus
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
InputSource
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
OwnerChange
PropertyState
ScrollDirection
SettingAction
VisibilityState
WindowEdge

Determines a window edge or corner.

WindowType
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

Constants

ATOM_NONE
BUTTON1_MASK
BUTTON2_MASK
BUTTON3_MASK
BUTTON4_MASK
BUTTON5_MASK
CONTROL_MASK
HYPER_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
RELEASE_MASK
SHIFT_MASK
SUPER_MASK

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