Expand description
§Rust GDK 4 X11 bindings
The project website is here.
Rust bindings of GDK 4’s X11 backend, part of gtk4-rs.
GDK is an intermediate layer that isolates GTK from the details of the windowing system. GDK X11 contains functions specific to the X11 backend.
§Minimum supported Rust version
Currently, the minimum supported Rust version is 1.70
.
§Documentation
- The Rust API Stable/Development
- The C API
- GTK Installation instructions
§Using
We recommend using crates from crates.io, as demonstrated here.
If you want to track the bleeding edge, use the git dependency instead:
[dependencies]
gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" }
Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
gdk-x11 = {version = "0.1", package = "gdk4-x11"}
gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" }
§Features
Feature | Description |
---|---|
v4_18 | Enable the new APIs part of GTK 4.18 |
v4_16 | Enable the new APIs part of GTK 4.16 |
v4_10 | Enable the new APIs part of GTK 4.10 |
v4_4 | Enable the new APIs part of GTK 4.4 |
egl | Integration with the khronos-egl crate |
xlib | Integration with the x11 crate |
§See Also
§License
The Rust bindings of gdk4-x11 are available under the MIT License, please refer to it.
Re-exports§
pub use gdk;
pub use gdk4_x11_sys as ffi;
pub use gio;
pub use glib;
pub use khronos_egl;
v4_4
andegl
pub use x11;
xlib
Modules§
Structs§
- X11App
Launch Context - Implements
- X11Device
ManagerX I2 - Properties
- X11DeviceX
I2 - Properties
- X11Display
- Signals
- X11Drag
- Implements
- X11GL
Context - This is an Abstract Base Class, you cannot instantiate it.
- X11Monitor
- Implements
- X11Screen
- Signals
- X11Surface
- Implements
Enums§
Functions§
- x11_
device_ get_ id Deprecated - Returns the device ID as seen by XInput2.
- x11_
device_ manager_ lookup Deprecated - Returns the
gdk::Device
that wraps the given device ID. - x11_
get_ server_ time Deprecated - Routine to get the current X server time stamp.
- x11_
get_ xatom_ by_ name_ for_ display - Returns the X atom for a
gdk::Display
corresponding to @atom_name. This function caches the result, so if called repeatedly it is much faster than XInternAtom(), which is a round trip to the server each time. - x11_
get_ xatom_ name_ for_ display - Returns the name of an X atom for its display. This function is meant mainly for debugging, so for convenience, unlike XAtomName() and the result doesn’t need to be freed.
- x11_
set_ sm_ client_ id - Sets the
SM_CLIENT_ID
property on the application’s leader window so that the window manager can save the application’s state using the X11R6 ICCCM session management protocol.