Crate gdk4

Source
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

§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

FeatureDescription
v4_18Enable the new APIs part of GTK 4.18
v4_16Enable the new APIs part of GTK 4.16
v4_14Enable the new APIs part of GTK 4.14
v4_12Enable the new APIs part of GTK 4.12
v4_10Enable the new APIs part of GTK 4.10
v4_8Enable the new APIs part of GTK 4.8
v4_6Enable the new APIs part of GTK 4.6
v4_4Enable the new APIs part of GTK 4.4
v4_2Enable the new APIs part of GTK 4.2
glIntegration 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§

AnchorHints
AppLaunchContext
GLib type: GObject with reference counted clone semantics.
AxisFlags
ButtonEvent
GLib type: Shared boxed type with reference counted clone semantics.
CairoContext
GLib type: GObject with reference counted clone semantics.
CicpParamsv4_16
GLib type: GObject with reference counted clone semantics.
Clipboard
GLib type: GObject with reference counted clone semantics.
ColorStatev4_16
GLib type: Shared boxed type with reference counted clone semantics.
ContentDeserializer
GLib type: GObject with reference counted clone semantics.
ContentFormats
GLib type: Shared boxed type with reference counted clone semantics.
ContentFormatsBuilder
GLib type: Shared boxed type with reference counted clone semantics.
ContentProvider
GLib type: GObject with reference counted clone semantics.
ContentSerializer
GLib type: GObject with reference counted clone semantics.
CrossingEvent
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.
DeleteEvent
GLib type: Shared boxed type with reference counted clone semantics.
Device
GLib type: GObject with reference counted clone semantics.
DevicePad
GLib type: GObject with reference counted clone semantics.
DeviceTool
GLib type: GObject with reference counted clone semantics.
Display
GLib type: GObject with reference counted clone semantics.
DisplayManager
GLib type: GObject with reference counted clone semantics.
DmabufFormatsv4_14
GLib type: Shared boxed type with reference counted clone semantics.
DmabufTexturev4_14
GLib type: GObject with reference counted clone semantics.
DmabufTextureBuilderv4_14
GLib type: GObject with reference counted clone semantics.
Drag
GLib type: GObject with reference counted clone semantics.
DragAction
DragSurface
GLib type: GObject with reference counted clone semantics.
DragSurfaceSizev4_12
DrawContext
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.
EventSequence
GLib type: Boxed type with copy-on-clone semantics.
FileListv4_6
GLib type: Boxed type with copy-on-clone semantics.
FocusEvent
GLib type: Shared boxed type with reference counted clone semantics.
FrameClock
GLib type: GObject with reference counted clone semantics.
FrameClockPhase
FrameTimings
GLib type: Shared boxed type with reference counted clone semantics.
GLAPIv4_6
GLContext
GLib type: GObject with reference counted clone semantics.
GLTexture
GLib type: GObject with reference counted clone semantics.
GLTextureBuilderv4_12
GLib type: GObject with reference counted clone semantics.
GRange
GrabBrokenEvent
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.
KeymapKey
GLib type: Inline allocated boxed type with stack copy semantics.
MemoryTexture
GLib type: GObject with reference counted clone semantics.
MemoryTextureBuilderv4_16
GLib type: GObject with reference counted clone semantics.
ModifierType
Monitor
GLib type: GObject with reference counted clone semantics.
MotionEvent
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.
PaintableFlags
Popup
GLib type: GObject with reference counted clone semantics.
PopupLayout
GLib type: Shared boxed type with reference counted clone semantics.
ProximityEvent
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.
ScrollEvent
GLib type: Shared boxed type with reference counted clone semantics.
Seat
GLib type: GObject with reference counted clone semantics.
SeatCapabilities
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.
TextureDownloaderv4_10
GLib type: Boxed type with copy-on-clone semantics.
TimeCoord
GLib type: Inline allocated boxed type with stack copy semantics.
Toplevel
GLib type: GObject with reference counted clone semantics.
ToplevelLayout
GLib type: Shared boxed type with reference counted clone semantics.
ToplevelSize
ToplevelState
TouchEvent
GLib type: Shared boxed type with reference counted clone semantics.
TouchpadEvent
GLib type: Shared boxed type with reference counted clone semantics.
VulkanContextDeprecated
GLib type: GObject with reference counted clone semantics.

Enums§

AxisUse
Backend
CicpRangev4_16
CrossingMode
DevicePadFeature
DeviceToolType
DmabufErrorv4_14
DragCancelReason
EventType
FullscreenMode
GLError
Gravity
InputSource
KeyMatch
MemoryFormat
NotifyType
ScrollDirection
ScrollUnitv4_8
SubpixelLayout
SurfaceEdge
TextureErrorv4_6
TitlebarGesturev4_4
TouchpadGesturePhase
VulkanError

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_surfaceDeprecated
pixbuf_get_from_textureDeprecated
set_allowed_backends
unicode_to_keyval