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.

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
WindowAttr
WindowHints
WindowState

Enums

AxisUse
CrossingMode
CursorType

The standard cursors available.

DragProtocol
EventType
FullscreenMode
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

ACTION_ASK
ACTION_COPY
ACTION_DEFAULT
ACTION_LINK
ACTION_MOVE
ACTION_PRIVATE
ALL_EVENTS_MASK
ATOM_NONE
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
ENTER_NOTIFY_MASK
EXPOSURE_MASK
FOCUS_CHANGE_MASK
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
SHIFT_MASK
SMOOTH_SCROLL_MASK
STRUCTURE_MASK
SUBSTRUCTURE_MASK
SUPER_MASK
TABLET_PAD_MASK
TOUCHPAD_GESTURE_MASK
TOUCH_MASK
VISIBILITY_NOTIFY_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_initialized

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

set_program_class

Type Definitions

key