Crate gdk[−][src]
Expand description
Rust GDK 3 bindings
This library contains safe Rust bindings for GDK 3. It is a part of gtk-rs.
GDK 3.18 is the lowest supported version for the underlying library.
Re-exports
pub use cairo; | |
pub use ffi; | |
pub use gdk_pixbuf; | |
pub use gio; | |
pub use glib; | |
pub use pango; |
Modules
functions | |
keys | |
prelude | Traits intended for blanket imports. |
Structs
AnchorHints | Positioning hints for aligning a window relative to a rectangle. |
AppLaunchContext | GdkAppLaunchContext is an implementation of |
Atom | An opaque type representing a string as an index into a table of strings on the X server. |
AxisFlags | Flags describing the current capabilities of a device/tool. |
Color | |
Cursor | A |
Device | The |
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. |
DevicePad |
|
DeviceTool | |
Display |
|
DisplayManager | The purpose of the |
DragAction | Used in |
DragContext | |
DrawingContext |
|
Event | A generic GDK event. |
EventButton | Used for button press and button release events. The
|
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 |
EventKey | Describes a key press or key release event. |
EventMask | 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 |
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. |
EventPadAxis | Generated during |
EventPadButton | Generated during |
EventPadGroupMode | Generated during |
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. |
EventSequence | |
EventSetting | Generated when a setting is modified. |
EventTouch | Used for touch events.
|
EventTouchpadPinch | Generated during touchpad swipe gestures. |
EventTouchpadSwipe | Generated during touchpad swipe gestures. |
EventVisibility | |
EventWindowState | Generated when the state of a toplevel window changes. |
FrameClock | A |
FrameClockPhase |
|
FrameTimings | A |
GLContext |
|
GRange | |
Geometry | The |
Keymap | A |
KeymapKey | A |
ModifierType | 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. |
Monitor | GdkMonitor objects represent the individual outputs that are
associated with a |
RGBA | A |
Rectangle | Defines the position and size of a rectangle. It is identical to
|
RgbaParseError | |
Screen |
|
Seat | The |
SeatCapabilities | Flags describing the seat capabilities. |
TimeCoord | A |
Visual | A |
WMDecoration | 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. |
WMFunction | 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. |
Window | This is an Abstract Base Class, you cannot instantiate it. |
WindowAttr | |
WindowHints | Used to indicate which fields of a |
WindowState | Specifies the state of a toplevel window. |
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. |
ChangeData | |
CrossingMode | Specifies the crossing mode for |
CursorType | Predefined cursors. |
DevicePadFeature | v3_22 A pad feature. |
DeviceToolType | v3_22 Indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc. |
DeviceType | Indicates the device type. See [above][GdkDeviceManager.description] for more information about the meaning of these device types. |
DragCancelReason | v3_20 Used in |
DragProtocol | Used in |
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 |
GrabOwnership | Defines how device grabs interact with other devices. |
GrabStatus | Returned by |
Gravity | Defines the reference point of a window and the meaning of coordinates
passed to |
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 |
NotifyType | Specifies the kind of crossing for |
OwnerChange | Specifies why a selection ownership was changed. |
PropMode | Describes how existing data is combined with new data when
using |
PropertyState | Specifies the type of a property change for a |
ScrollDirection | Specifies the direction for |
SettingAction | Specifies the kind of modification applied to a setting in a
|
SubpixelLayout | v3_22 This enumeration describes how the red, green and blue components of physical pixels on an output device are laid out. |
VisibilityState | Specifies the visiblity status of a window for a |
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 |
|
Constants
ATOM_NONE | |
BUTTON_MIDDLE | The middle button. The middle button. |
BUTTON_PRIMARY | The primary button. This is typically the left mouse button, or the right button in a left-handed setup. The primary button. This is typically the left mouse button, or the right button in a left-handed setup. |
BUTTON_SECONDARY | The secondary button. This is typically the right mouse button, or the left button in a left-handed setup. The secondary button. This is typically the right mouse button, or the left button in a left-handed setup. |
EVENT_PROPAGATE | Use this macro as the return value for continuing the propagation of an event handler. |
EVENT_STOP | Use this macro as the return value for stopping the propagation of an event handler. |
NONE_DEVICE_PAD | |
SELECTION_CLIPBOARD | |
SELECTION_PRIMARY | |
SELECTION_SECONDARY | |
SELECTION_TYPE_ATOM | |
SELECTION_TYPE_BITMAP | |
SELECTION_TYPE_COLORMAP | |
SELECTION_TYPE_DRAWABLE | |
SELECTION_TYPE_INTEGER | |
SELECTION_TYPE_PIXMAP | |
SELECTION_TYPE_STRING | |
SELECTION_TYPE_WINDOW | |
TARGET_BITMAP | |
TARGET_COLORMAP | |
TARGET_DRAWABLE | |
TARGET_PIXMAP | |
TARGET_STRING |
Traits
FromEvent | A helper trait implemented by all event subtypes. |
Functions
beep | Emits a short beep on the default display. |
display_arg_name | Gets the display name specified in the command line arguments passed
to |
error_trap_pop | Removes an error trap pushed with |
error_trap_pop_ignored | Removes an error trap pushed with |
error_trap_push | This function allows X errors to be trapped instead of the normal
behavior of exiting the application. It should only be used if it
is not possible to avoid the X error in any other way. Errors are
ignored on all |
events_get_angle | If both events contain X/Y information, this function will return |
events_get_center | If both events contain X/Y information, the center of both coordinates
will be returned in |
events_get_distance | If both events have X/Y information, the distance between both coordinates
(as in a straight line going from |
events_pending | Checks if any events are ready to be processed for any display. |
flush | Flushes the output buffers of all display connections and waits until all requests have been processed. This is rarely needed by applications. |
init | |
list_visuals | Lists the available visuals for the default screen.
(See |
notify_startup_complete | Indicates to the GUI environment that the application has finished loading. If the applications opens windows, this function is normally called after opening the application’s initial set of windows. |
notify_startup_complete_with_id | Indicates to the GUI environment that the application has finished loading, using a given identifier. |
pango_context_get | Creates a |
pango_context_get_for_display | v3_22 Creates a |
pango_context_get_for_screen | Creates a |
pango_layout_get_clip_region | Obtains a clip region which contains the areas where the given ranges
of text would be drawn. |
pango_layout_line_get_clip_region | Obtains a clip region which contains the areas where the given
ranges of text would be drawn. |
pixbuf_get_from_surface | Transfers image data from a |
program_class | Gets the program class. Unless the program class has explicitly
been set with |
property_change | Changes the contents of a property on a window. |
property_delete | Deletes a property from a window. |
property_get | Retrieves a portion of the contents of a property. If the
property does not exist, then the function returns |
query_depths | This function returns the available bit depths for the default
screen. It’s equivalent to listing the visuals
( |
selection_convert | Retrieves the contents of a selection in a given form. |
selection_owner_get | Determines the owner of the given selection. |
selection_owner_get_for_display | Determine the owner of the given selection. |
selection_owner_set | Sets the owner of the given selection. |
selection_owner_set_for_display | Sets the |
selection_send_notify | Sends a response to SelectionRequest event. |
selection_send_notify_for_display | Send a response to SelectionRequest event. |
set_allowed_backends | Sets a list of backends that GDK should try to use. |
set_double_click_time | Set the double click time for the default display. See
|
set_initialized⚠ | Informs this crate that GDK has been initialized and the current thread is the main one. |
set_program_class | Sets the program class. The X11 backend uses the program class to set
the class name part of the |
set_show_events | Sets whether a trace of received events is output.
Note that GTK+ must be compiled with debugging (that is,
configured using the |
setting_get | Obtains a desktop-wide setting, such as the double-click time,
for the default screen. See [ |
shows_events | Gets whether event debugging output is enabled. |
synthesize_window_state | |
test_render_sync | Retrieves a pixel from |
test_simulate_button | This function is intended to be used in GTK+ test programs.
It will warp the mouse pointer to the given ( |
test_simulate_key | This function is intended to be used in GTK+ test programs.
If ( |
text_property_to_utf8_list_for_display | Converts a text property in the given encoding to a list of UTF-8 strings. |
utf8_to_string_target | Converts an UTF-8 string into the best possible representation as a STRING. The representation of characters not in STRING is not specified; it may be as pseudo-escape sequences \x{ABCD}, or it may be in some other form of approximation. |
Type Definitions
key |