Expand description
§Rust GDK 4 bindings
The project website is here.
Rust bindings of GDK 4, part of gtk4-rs.
§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 = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4" }
Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
gtk = {version = "0.1", package = "gtk4"}
gdk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4" }
§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_14 | Enable the new APIs part of GTK 4.14 |
v4_12 | Enable the new APIs part of GTK 4.12 |
v4_10 | Enable the new APIs part of GTK 4.10 |
v4_8 | Enable the new APIs part of GTK 4.8 |
v4_6 | Enable the new APIs part of GTK 4.6 |
v4_4 | Enable the new APIs part of GTK 4.4 |
v4_2 | Enable the new APIs part of GTK 4.2 |
gl | Integration with the gl crate |
§See Also
§License
The Rust bindings of gdk4 are available under the MIT License, please refer to it.
Re-exports§
pub use cairo;
pub use gdk4_sys as ffi;
pub use gdk_pixbuf;
pub use gio;
pub use gl;
gl
pub use glib;
pub use pango;
Modules§
- builders
- Builder pattern types.
- prelude
- Traits intended for blanket imports.
- subclass
- Traits intended for creating custom types.
Structs§
- Anchor
Hints - AppLaunch
Context - GLib type: GObject with reference counted clone semantics.
- Axis
Flags - Button
Event - GLib type: Shared boxed type with reference counted clone semantics.
- Cairo
Context - GLib type: GObject with reference counted clone semantics.
- Cicp
Params v4_16
- GLib type: GObject with reference counted clone semantics.
- Clipboard
- GLib type: GObject with reference counted clone semantics.
- Color
State v4_16
- GLib type: Shared boxed type with reference counted clone semantics.
- Content
Deserializer - GLib type: GObject with reference counted clone semantics.
- Content
Formats - GLib type: Shared boxed type with reference counted clone semantics.
- Content
Formats Builder - GLib type: Shared boxed type with reference counted clone semantics.
- Content
Provider - GLib type: GObject with reference counted clone semantics.
- Content
Serializer - GLib type: GObject with reference counted clone semantics.
- Crossing
Event - GLib type: Shared boxed type with reference counted clone semantics.
- Cursor
- GLib type: GObject with reference counted clone semantics.
- DNDEvent
- GLib type: Shared boxed type with reference counted clone semantics.
- Delete
Event - GLib type: Shared boxed type with reference counted clone semantics.
- Device
- GLib type: GObject with reference counted clone semantics.
- Device
Pad - GLib type: GObject with reference counted clone semantics.
- Device
Tool - GLib type: GObject with reference counted clone semantics.
- Display
- GLib type: GObject with reference counted clone semantics.
- Display
Manager - GLib type: GObject with reference counted clone semantics.
- Dmabuf
Formats v4_14
- GLib type: Shared boxed type with reference counted clone semantics.
- Dmabuf
Texture v4_14
- GLib type: GObject with reference counted clone semantics.
- Dmabuf
Texture Builder v4_14
- GLib type: GObject with reference counted clone semantics.
- Drag
- GLib type: GObject with reference counted clone semantics.
- Drag
Action - Drag
Surface - GLib type: GObject with reference counted clone semantics.
- Drag
Surface Size v4_12
- Draw
Context - GLib type: GObject with reference counted clone semantics.
- Drop
- GLib type: GObject with reference counted clone semantics.
- Event
- GLib type: Shared boxed type with reference counted clone semantics.
- Event
Sequence - GLib type: Boxed type with copy-on-clone semantics.
- File
List v4_6
- GLib type: Boxed type with copy-on-clone semantics.
- Focus
Event - GLib type: Shared boxed type with reference counted clone semantics.
- Frame
Clock - GLib type: GObject with reference counted clone semantics.
- Frame
Clock Phase - Frame
Timings - GLib type: Shared boxed type with reference counted clone semantics.
- GLAPI
v4_6
- GLContext
- GLib type: GObject with reference counted clone semantics.
- GLTexture
- GLib type: GObject with reference counted clone semantics.
- GLTexture
Builder v4_12
- GLib type: GObject with reference counted clone semantics.
- GRange
- Grab
Broken Event - GLib type: Shared boxed type with reference counted clone semantics.
- Key
- A wrapper around
GDK_KEY_
constants and keyval methods. - KeyEvent
- GLib type: Shared boxed type with reference counted clone semantics.
- Keymap
Key - GLib type: Inline allocated boxed type with stack copy semantics.
- Memory
Texture - GLib type: GObject with reference counted clone semantics.
- Memory
Texture Builder v4_16
- GLib type: GObject with reference counted clone semantics.
- Modifier
Type - Monitor
- GLib type: GObject with reference counted clone semantics.
- Motion
Event - GLib type: Shared boxed type with reference counted clone semantics.
- PadEvent
- GLib type: Shared boxed type with reference counted clone semantics.
- Paintable
- GLib type: GObject with reference counted clone semantics.
- Paintable
Flags - Popup
- GLib type: GObject with reference counted clone semantics.
- Popup
Layout - GLib type: Shared boxed type with reference counted clone semantics.
- Proximity
Event - GLib type: Shared boxed type with reference counted clone semantics.
- RGBA
- GLib type: Inline allocated boxed type with stack copy semantics.
- Rectangle
- GLib type: Inline allocated boxed type with stack copy semantics.
- Scroll
Event - GLib type: Shared boxed type with reference counted clone semantics.
- Seat
- GLib type: GObject with reference counted clone semantics.
- Seat
Capabilities - Snapshot
- GLib type: GObject with reference counted clone semantics.
- Surface
- GLib type: GObject with reference counted clone semantics.
- Texture
- GLib type: GObject with reference counted clone semantics.
- Texture
Downloader v4_10
- GLib type: Boxed type with copy-on-clone semantics.
- Time
Coord - GLib type: Inline allocated boxed type with stack copy semantics.
- Toplevel
- GLib type: GObject with reference counted clone semantics.
- Toplevel
Layout - GLib type: Shared boxed type with reference counted clone semantics.
- Toplevel
Size - Toplevel
State - Touch
Event - GLib type: Shared boxed type with reference counted clone semantics.
- Touchpad
Event - GLib type: Shared boxed type with reference counted clone semantics.
- Vulkan
Context Deprecated - GLib type: GObject with reference counted clone semantics.
Enums§
- AxisUse
- Backend
- Cicp
Range v4_16
- Crossing
Mode - Device
PadFeature - Device
Tool Type - Dmabuf
Error v4_14
- Drag
Cancel Reason - Event
Type - Fullscreen
Mode - GLError
- Gravity
- Input
Source - KeyMatch
- Memory
Format - Notify
Type - Scroll
Direction - Scroll
Unit v4_8
- Subpixel
Layout - Surface
Edge - Texture
Error v4_6
- Titlebar
Gesture v4_4
- Touchpad
Gesture Phase - Vulkan
Error
Constants§
- ACTION_
ALL - BUTTON_
MIDDLE - BUTTON_
PRIMARY - BUTTON_
SECONDARY - CURRENT_
TIME - EVENT_
PROPAGATE - EVENT_
STOP - MODIFIER_
MASK - PRIORITY_
REDRAW
Functions§
- content_
deserialize_ async - content_
deserialize_ future - content_
register_ deserializer - content_
register_ serializer - content_
serialize_ async - content_
serialize_ future - intern_
mime_ type - pango_
layout_ get_ clip_ region - pango_
layout_ line_ get_ clip_ region - pixbuf_
get_ from_ surface Deprecated - pixbuf_
get_ from_ texture Deprecated - set_
allowed_ backends - unicode_
to_ keyval