Expand description
§Rust GTK 4 bindings
The project website is here.
Rust bindings of GTK 4, part of gtk4-rs.
This library contains safe Rust bindings for GTK 4, a multi-platform GUI toolkit. It is a part of gtk-rs.
Most of this documentation is generated from the C API. Until all parts of the documentation have been reviewed there will be incongruities with the actual Rust API.
For a gentle introduction to gtk-rs we recommend the online book GUI development with Rust and GTK 4.
See also:
- gtk-rs project overview
- General
GLibfamily types and object system overview - GTK documentation
- GTK Visual Index
§Minimum supported Rust version
Currently, the minimum supported Rust version is 1.83.
§“Hello, World!” example program
GTK needs to be initialized before use by calling init. Creating an
Application will call init for you.
The gtk4 crate is usually renamed to gtk. You can find an example in
the features section for how to do this globally in your Cargo.toml.
use gtk4 as gtk;
use gtk::prelude::*;
use gtk::{glib, Application, ApplicationWindow};
fn main() -> glib::ExitCode {
let app = Application::builder()
.application_id("org.example.HelloWorld")
.build();
app.connect_activate(|app| {
// We create the main window.
let window = ApplicationWindow::builder()
.application(app)
.default_width(320)
.default_height(200)
.title("Hello, World!")
.build();
// Show the window.
window.present();
});
app.run()
}§The main loop
In a typical GTK application you set up the UI, assign signal handlers and run the main event loop.
use gtk4 as gtk;
use gtk::prelude::*;
use gtk::{glib, Application, ApplicationWindow, Button};
fn main() -> glib::ExitCode {
let application = Application::builder()
.application_id("com.example.FirstGtkApp")
.build();
application.connect_activate(|app| {
let window = ApplicationWindow::builder()
.application(app)
.title("First GTK Program")
.default_width(350)
.default_height(70)
.build();
let button = Button::with_label("Click me!");
button.connect_clicked(|_| {
eprintln!("Clicked!");
});
window.set_child(Some(&button));
window.present();
});
application.run()
}§Threads
GTK is not thread-safe. Accordingly, none of this crate’s structs implement
Send or Sync.
The thread where init was called is considered the main thread. OS X has
its own notion of the main thread and init must be called on that thread.
After successful initialization, calling any gtk or gdk
functions (including init) from other threads will panic.
Any thread can schedule a closure to be run by the main loop on the main
thread via glib::idle_add or
glib::timeout_add. While
working with GTK you might need the glib::idle_add_local
or glib::timeout_add_local version without the
Send bound. Those may only be called from the main thread.
§Panics
The gtk and gdk crates have some run-time safety and contract
checks.
-
Any constructor or free function will panic if called before
initor on a non-main thread. -
Any
&stror&Pathparameter with an interior null (\0) character will cause a panic. -
Some functions will panic if supplied out-of-range integer parameters. All such cases will be documented individually but they are not yet.
-
A panic in a closure that handles signals or in any other closure passed to a
gtkfunction will abort the process.
§Features
§Library versions
By default this crate provides only GTK 4.0 APIs. You can access additional
functionality by selecting one of the v4_2, v4_4, etc. features.
Cargo.toml example:
[dependencies.gtk]
package = "gtk4"
version = "0.x.y"
features = ["v4_2"]Take care when choosing the version to target: some of your users might not have easy access to the latest ones. The higher the version, the fewer users will have it installed.
§Documentation
- The Rust API Stable/Development
- Book Stable/Development
- Examples
- 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]
gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4" }Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
gdk = {version = "0.1", package = "gdk4"}
gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4" }§Features
| Feature | Description |
|---|---|
v4_20 | Enable the new APIs part of GTK 4.20 |
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 |
gnome_49 | Enable all version feature flags of this crate and its dependencies to match the GNOME 49 SDK |
gnome_48 | Enable all version feature flags of this crate and its dependencies to match the GNOME 48 SDK |
gnome_47 | Enable all version feature flags of this crate and its dependencies to match the GNOME 47 SDK |
gnome_46 | Enable all version feature flags of this crate and its dependencies to match the GNOME 46 SDK |
gnome_45 | Enable all version feature flags of this crate and its dependencies to match the GNOME 45 SDK |
gnome_44 | Enable all version feature flags of this crate and its dependencies to match the GNOME 44 SDK |
gnome_43 | Enable all version feature flags of this crate and its dependencies to match the GNOME 43 SDK |
gnome_42 | Enable all version feature flags of this crate and its dependencies to match the GNOME 42 SDK |
unsafe-assume-initialized | Disable checks that gtk is initialized, for use in C ABI libraries |
xml_validation | Enable xml_validation feature of gtk4-macros |
blueprint | Enable blueprint feature of gtk4-macros |
§See Also
§License
The Rust bindings of gtk4 are available under the MIT License, please refer to it.
Re-exports§
pub use subclass::widget::TemplateChild;pub use cairo;pub use gdk;pub use gdk_pixbuf;pub use gio;pub use glib;pub use graphene;pub use gsk;pub use gtk4_sys as ffi;pub use pango;
Modules§
- accessible
- builders
- Builder pattern types.
- prelude
- Traits intended for blanket imports.
- subclass
- Traits intended for creating custom types.
Structs§
- ATContext
- GLib type: GObject with reference counted clone semantics.
- About
Dialog - GLib type: GObject with reference counted clone semantics.
- Accessible
- GLib type: GObject with reference counted clone semantics.
- Accessible
List - GLib type: Boxed type with copy-on-clone semantics.
- Accessible
Range - GLib type: GObject with reference counted clone semantics.
- Accessible
Text - GLib type: GObject with reference counted clone semantics.
- Accessible
Text Range - GLib type: Inline allocated boxed type with stack copy semantics.
- Action
Bar - GLib type: GObject with reference counted clone semantics.
- Actionable
- GLib type: GObject with reference counted clone semantics.
- Activate
Action - GLib type: GObject with reference counted clone semantics.
- Adjustment
- GLib type: GObject with reference counted clone semantics.
- Alert
Dialog - GLib type: GObject with reference counted clone semantics.
- Alternative
Trigger - GLib type: GObject with reference counted clone semantics.
- AnyFilter
- GLib type: GObject with reference counted clone semantics.
- AppChooser
Deprecated - GLib type: GObject with reference counted clone semantics.
- AppChooser
Button Deprecated - GLib type: GObject with reference counted clone semantics.
- AppChooser
Dialog Deprecated - GLib type: GObject with reference counted clone semantics.
- AppChooser
Widget Deprecated - GLib type: GObject with reference counted clone semantics.
- Application
- GLib type: GObject with reference counted clone semantics.
- Application
Inhibit Flags - Application
Window - GLib type: GObject with reference counted clone semantics.
- Aspect
Frame - GLib type: GObject with reference counted clone semantics.
- Assistant
Deprecated - GLib type: GObject with reference counted clone semantics.
- Assistant
Page Deprecated - GLib type: GObject with reference counted clone semantics.
- BinLayout
- GLib type: GObject with reference counted clone semantics.
- Bitset
- GLib type: Shared boxed type with reference counted clone semantics.
- Bitset
Iter - Bookmark
List - GLib type: GObject with reference counted clone semantics.
- Bool
Filter - GLib type: GObject with reference counted clone semantics.
- Border
- GLib type: Inline allocated boxed type with stack copy semantics.
- Box
- GLib type: GObject with reference counted clone semantics.
- BoxLayout
- GLib type: GObject with reference counted clone semantics.
- Buildable
- GLib type: GObject with reference counted clone semantics.
- Builder
- GLib type: GObject with reference counted clone semantics.
- BuilderC
Scope - GLib type: GObject with reference counted clone semantics.
- Builder
Closure Flags - Builder
List Item Factory - GLib type: GObject with reference counted clone semantics.
- Builder
Rust Scope - An implementation of
BuilderScopethat can bind Rust callbacks. - Builder
Scope - GLib type: GObject with reference counted clone semantics.
- Button
- GLib type: GObject with reference counted clone semantics.
- Calendar
- GLib type: GObject with reference counted clone semantics.
- Callback
Action - GLib type: GObject with reference counted clone semantics.
- Cell
Area Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Area Box Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Area Context Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Editable Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Layout Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Accel Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Combo Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Pixbuf Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Progress Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Spin Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Spinner Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer State Deprecated - Cell
Renderer Text Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Toggle Deprecated - GLib type: GObject with reference counted clone semantics.
- Cell
View Deprecated - GLib type: GObject with reference counted clone semantics.
- Center
Box - GLib type: GObject with reference counted clone semantics.
- Center
Layout - GLib type: GObject with reference counted clone semantics.
- Check
Button - GLib type: GObject with reference counted clone semantics.
- Closure
Expression - GLib type: Shared boxed type with reference counted clone semantics.
- Color
Button Deprecated - GLib type: GObject with reference counted clone semantics.
- Color
Chooser Deprecated - GLib type: GObject with reference counted clone semantics.
- Color
Chooser Dialog Deprecated - GLib type: GObject with reference counted clone semantics.
- Color
Chooser Widget Deprecated - GLib type: GObject with reference counted clone semantics.
- Color
Dialog - GLib type: GObject with reference counted clone semantics.
- Color
Dialog Button - GLib type: GObject with reference counted clone semantics.
- Column
View - GLib type: GObject with reference counted clone semantics.
- Column
View Cell - GLib type: GObject with reference counted clone semantics.
- Column
View Column - GLib type: GObject with reference counted clone semantics.
- Column
View Row - GLib type: GObject with reference counted clone semantics.
- Column
View Sorter - GLib type: GObject with reference counted clone semantics.
- Combo
Box Deprecated - GLib type: GObject with reference counted clone semantics.
- Combo
BoxText Deprecated - GLib type: GObject with reference counted clone semantics.
- Constant
Expression - GLib type: Shared boxed type with reference counted clone semantics.
- Constraint
- GLib type: GObject with reference counted clone semantics.
- Constraint
Guide - GLib type: GObject with reference counted clone semantics.
- Constraint
Layout - GLib type: GObject with reference counted clone semantics.
- Constraint
Layout Child - GLib type: GObject with reference counted clone semantics.
- Constraint
Target - GLib type: GObject with reference counted clone semantics.
- CssLocation
- GLib type: Inline allocated boxed type with stack copy semantics.
- CssProvider
- GLib type: GObject with reference counted clone semantics.
- CssSection
- GLib type: Shared boxed type with reference counted clone semantics.
- Custom
Filter - GLib type: GObject with reference counted clone semantics.
- Custom
Sorter - GLib type: GObject with reference counted clone semantics.
- Debug
Flags - Dialog
Deprecated - GLib type: GObject with reference counted clone semantics.
- Dialog
Flags Deprecated - Directory
List - GLib type: GObject with reference counted clone semantics.
- Drag
Icon - GLib type: GObject with reference counted clone semantics.
- Drag
Source - GLib type: GObject with reference counted clone semantics.
- Drawing
Area - GLib type: GObject with reference counted clone semantics.
- Drop
Controller Motion - GLib type: GObject with reference counted clone semantics.
- Drop
Down - GLib type: GObject with reference counted clone semantics.
- Drop
Target - GLib type: GObject with reference counted clone semantics.
- Drop
Target Async - GLib type: GObject with reference counted clone semantics.
- Editable
- GLib type: GObject with reference counted clone semantics.
- Editable
Label - GLib type: GObject with reference counted clone semantics.
- Emoji
Chooser - GLib type: GObject with reference counted clone semantics.
- Entry
- GLib type: GObject with reference counted clone semantics.
- Entry
Buffer - GLib type: GObject with reference counted clone semantics.
- Entry
Completion Deprecated - GLib type: GObject with reference counted clone semantics.
- Event
Controller - GLib type: GObject with reference counted clone semantics.
- Event
Controller Focus - GLib type: GObject with reference counted clone semantics.
- Event
Controller Key - GLib type: GObject with reference counted clone semantics.
- Event
Controller Legacy - GLib type: GObject with reference counted clone semantics.
- Event
Controller Motion - GLib type: GObject with reference counted clone semantics.
- Event
Controller Scroll - GLib type: GObject with reference counted clone semantics.
- Event
Controller Scroll Flags - Every
Filter - GLib type: GObject with reference counted clone semantics.
- Expander
- GLib type: GObject with reference counted clone semantics.
- Expression
- GLib type: Shared boxed type with reference counted clone semantics.
- Expression
Watch - GLib type: Shared boxed type with reference counted clone semantics.
- File
Chooser Deprecated - GLib type: GObject with reference counted clone semantics.
- File
Chooser Dialog Deprecated - GLib type: GObject with reference counted clone semantics.
- File
Chooser Native Deprecated - GLib type: GObject with reference counted clone semantics.
- File
Chooser Widget Deprecated - GLib type: GObject with reference counted clone semantics.
- File
Dialog - GLib type: GObject with reference counted clone semantics.
- File
Filter - GLib type: GObject with reference counted clone semantics.
- File
Launcher - GLib type: GObject with reference counted clone semantics.
- Filter
- GLib type: GObject with reference counted clone semantics.
- Filter
List Model - GLib type: GObject with reference counted clone semantics.
- Fixed
- GLib type: GObject with reference counted clone semantics.
- Fixed
Layout - GLib type: GObject with reference counted clone semantics.
- Fixed
Layout Child - GLib type: GObject with reference counted clone semantics.
- Flatten
List Model - GLib type: GObject with reference counted clone semantics.
- FlowBox
- GLib type: GObject with reference counted clone semantics.
- Flow
BoxChild - GLib type: GObject with reference counted clone semantics.
- Font
Button Deprecated - GLib type: GObject with reference counted clone semantics.
- Font
Chooser Deprecated - GLib type: GObject with reference counted clone semantics.
- Font
Chooser Dialog Deprecated - GLib type: GObject with reference counted clone semantics.
- Font
Chooser Level Deprecated - Font
Chooser Widget Deprecated - GLib type: GObject with reference counted clone semantics.
- Font
Dialog - GLib type: GObject with reference counted clone semantics.
- Font
Dialog Button - GLib type: GObject with reference counted clone semantics.
- Frame
- GLib type: GObject with reference counted clone semantics.
- GLArea
- GLib type: GObject with reference counted clone semantics.
- Gesture
- GLib type: GObject with reference counted clone semantics.
- Gesture
Click - GLib type: GObject with reference counted clone semantics.
- Gesture
Drag - GLib type: GObject with reference counted clone semantics.
- Gesture
Long Press - GLib type: GObject with reference counted clone semantics.
- Gesture
Pan - GLib type: GObject with reference counted clone semantics.
- Gesture
Rotate - GLib type: GObject with reference counted clone semantics.
- Gesture
Single - GLib type: GObject with reference counted clone semantics.
- Gesture
Stylus - GLib type: GObject with reference counted clone semantics.
- Gesture
Swipe - GLib type: GObject with reference counted clone semantics.
- Gesture
Zoom - GLib type: GObject with reference counted clone semantics.
- Graphics
Offload - GLib type: GObject with reference counted clone semantics.
- Grid
- GLib type: GObject with reference counted clone semantics.
- Grid
Layout - GLib type: GObject with reference counted clone semantics.
- Grid
Layout Child - GLib type: GObject with reference counted clone semantics.
- Grid
View - GLib type: GObject with reference counted clone semantics.
- Header
Bar - GLib type: GObject with reference counted clone semantics.
- IMContext
- GLib type: GObject with reference counted clone semantics.
- IMContext
Simple - GLib type: GObject with reference counted clone semantics.
- IMMulticontext
- GLib type: GObject with reference counted clone semantics.
- Icon
Lookup Flags - Icon
Paintable - GLib type: GObject with reference counted clone semantics.
- Icon
Theme - GLib type: GObject with reference counted clone semantics.
- Icon
View Deprecated - GLib type: GObject with reference counted clone semantics.
- Image
- GLib type: GObject with reference counted clone semantics.
- InfoBar
Deprecated - GLib type: GObject with reference counted clone semantics.
- Input
Hints - Inscription
- GLib type: GObject with reference counted clone semantics.
- Keyval
Trigger - GLib type: GObject with reference counted clone semantics.
- Label
- GLib type: GObject with reference counted clone semantics.
- Layout
Child - GLib type: GObject with reference counted clone semantics.
- Layout
Manager - GLib type: GObject with reference counted clone semantics.
- Level
Bar - GLib type: GObject with reference counted clone semantics.
- Link
Button - GLib type: GObject with reference counted clone semantics.
- List
Base - GLib type: GObject with reference counted clone semantics.
- ListBox
- GLib type: GObject with reference counted clone semantics.
- List
BoxRow - GLib type: GObject with reference counted clone semantics.
- List
Header - GLib type: GObject with reference counted clone semantics.
- List
Item - GLib type: GObject with reference counted clone semantics.
- List
Item Factory - GLib type: GObject with reference counted clone semantics.
- List
Scroll Flags - List
Store Deprecated - GLib type: GObject with reference counted clone semantics.
- List
View - GLib type: GObject with reference counted clone semantics.
- Lock
Button Deprecated - GLib type: GObject with reference counted clone semantics.
- MapList
Model - GLib type: GObject with reference counted clone semantics.
- Media
Controls - GLib type: GObject with reference counted clone semantics.
- Media
File - GLib type: GObject with reference counted clone semantics.
- Media
Stream - GLib type: GObject with reference counted clone semantics.
- Menu
Button - GLib type: GObject with reference counted clone semantics.
- Message
Dialog Deprecated - GLib type: GObject with reference counted clone semantics.
- Mnemonic
Action - GLib type: GObject with reference counted clone semantics.
- Mnemonic
Trigger - GLib type: GObject with reference counted clone semantics.
- Mount
Operation - GLib type: GObject with reference counted clone semantics.
- Multi
Filter - GLib type: GObject with reference counted clone semantics.
- Multi
Selection - GLib type: GObject with reference counted clone semantics.
- Multi
Sorter - GLib type: GObject with reference counted clone semantics.
- Named
Action - GLib type: GObject with reference counted clone semantics.
- Native
- GLib type: GObject with reference counted clone semantics.
- Native
Dialog - GLib type: GObject with reference counted clone semantics.
- Never
Trigger - GLib type: GObject with reference counted clone semantics.
- NoSelection
- GLib type: GObject with reference counted clone semantics.
- Notebook
- GLib type: GObject with reference counted clone semantics.
- Notebook
Page - GLib type: GObject with reference counted clone semantics.
- Nothing
Action - GLib type: GObject with reference counted clone semantics.
- Numeric
Sorter - GLib type: GObject with reference counted clone semantics.
- Object
Expression - GLib type: Shared boxed type with reference counted clone semantics.
- Orientable
- GLib type: GObject with reference counted clone semantics.
- Overlay
- GLib type: GObject with reference counted clone semantics.
- Overlay
Layout - GLib type: GObject with reference counted clone semantics.
- Overlay
Layout Child - GLib type: GObject with reference counted clone semantics.
- PadAction
Entry - GLib type: Inline allocated boxed type with stack copy semantics.
- PadController
- GLib type: GObject with reference counted clone semantics.
- Page
Range - GLib type: Inline allocated boxed type with stack copy semantics.
- Page
Setup - GLib type: GObject with reference counted clone semantics.
- Page
Setup Unix Dialog - GLib type: GObject with reference counted clone semantics.
- Paned
- GLib type: GObject with reference counted clone semantics.
- Paper
Size - GLib type: Boxed type with copy-on-clone semantics.
- Param
Spec Expression - GLib type: Shared boxed type with reference counted clone semantics.
- Password
Entry - GLib type: GObject with reference counted clone semantics.
- Password
Entry Buffer - GLib type: GObject with reference counted clone semantics.
- Pick
Flags - Picture
- GLib type: GObject with reference counted clone semantics.
- Popover
- GLib type: GObject with reference counted clone semantics.
- Popover
Menu - GLib type: GObject with reference counted clone semantics.
- Popover
Menu Bar - GLib type: GObject with reference counted clone semantics.
- Popover
Menu Flags - Print
Capabilities - Print
Context - GLib type: GObject with reference counted clone semantics.
- Print
Dialog - GLib type: GObject with reference counted clone semantics.
- Print
Job - GLib type: GObject with reference counted clone semantics.
- Print
Operation - GLib type: GObject with reference counted clone semantics.
- Print
Operation Preview - GLib type: GObject with reference counted clone semantics.
- Print
Settings - GLib type: GObject with reference counted clone semantics.
- Print
Setup - GLib type: Shared boxed type with reference counted clone semantics.
- Print
Unix Dialog - GLib type: GObject with reference counted clone semantics.
- Printer
- GLib type: GObject with reference counted clone semantics.
- Progress
Bar - GLib type: GObject with reference counted clone semantics.
- Property
Expression - GLib type: Shared boxed type with reference counted clone semantics.
- Range
- GLib type: GObject with reference counted clone semantics.
- Recent
Data - GLib type: Inline allocated boxed type with stack copy semantics.
- Recent
Info - GLib type: Shared boxed type with reference counted clone semantics.
- Recent
Manager - GLib type: GObject with reference counted clone semantics.
- Requisition
- GLib type: Inline allocated boxed type with stack copy semantics.
- Revealer
- GLib type: GObject with reference counted clone semantics.
- Root
- GLib type: GObject with reference counted clone semantics.
- Scale
- GLib type: GObject with reference counted clone semantics.
- Scale
Button - GLib type: GObject with reference counted clone semantics.
- Scroll
Info - GLib type: Shared boxed type with reference counted clone semantics.
- Scrollable
- GLib type: GObject with reference counted clone semantics.
- Scrollbar
- GLib type: GObject with reference counted clone semantics.
- Scrolled
Window - GLib type: GObject with reference counted clone semantics.
- Search
Bar - GLib type: GObject with reference counted clone semantics.
- Search
Entry - GLib type: GObject with reference counted clone semantics.
- Section
Model - GLib type: GObject with reference counted clone semantics.
- Selection
Filter Model - GLib type: GObject with reference counted clone semantics.
- Selection
Model - GLib type: GObject with reference counted clone semantics.
- Separator
- GLib type: GObject with reference counted clone semantics.
- Settings
- GLib type: GObject with reference counted clone semantics.
- Shortcut
- GLib type: GObject with reference counted clone semantics.
- Shortcut
Action - GLib type: GObject with reference counted clone semantics.
- Shortcut
Action Flags - Shortcut
Controller - GLib type: GObject with reference counted clone semantics.
- Shortcut
Label Deprecated - GLib type: GObject with reference counted clone semantics.
- Shortcut
Manager - GLib type: GObject with reference counted clone semantics.
- Shortcut
Trigger - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Group Deprecated - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Section Deprecated - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Shortcut Deprecated - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Window Deprecated - GLib type: GObject with reference counted clone semantics.
- Signal
Action - GLib type: GObject with reference counted clone semantics.
- Signal
List Item Factory - GLib type: GObject with reference counted clone semantics.
- Single
Selection - GLib type: GObject with reference counted clone semantics.
- Size
Group - GLib type: GObject with reference counted clone semantics.
- Slice
List Model - GLib type: GObject with reference counted clone semantics.
- Snapshot
- GLib type: GObject with reference counted clone semantics.
- Sort
List Model - GLib type: GObject with reference counted clone semantics.
- Sorter
- GLib type: GObject with reference counted clone semantics.
- Spin
Button - GLib type: GObject with reference counted clone semantics.
- Spinner
- GLib type: GObject with reference counted clone semantics.
- Stack
- GLib type: GObject with reference counted clone semantics.
- Stack
Page - GLib type: GObject with reference counted clone semantics.
- Stack
Sidebar - GLib type: GObject with reference counted clone semantics.
- Stack
Switcher - GLib type: GObject with reference counted clone semantics.
- State
Flags - Statusbar
Deprecated - GLib type: GObject with reference counted clone semantics.
- String
Filter - GLib type: GObject with reference counted clone semantics.
- String
List - GLib type: GObject with reference counted clone semantics.
- String
Object - GLib type: GObject with reference counted clone semantics.
- String
Sorter - GLib type: GObject with reference counted clone semantics.
- Style
Context Deprecated - GLib type: GObject with reference counted clone semantics.
- Style
Context Print Flags - Style
Provider - GLib type: GObject with reference counted clone semantics.
- Switch
- GLib type: GObject with reference counted clone semantics.
- Symbolic
Paintable - GLib type: GObject with reference counted clone semantics.
- Text
- GLib type: GObject with reference counted clone semantics.
- Text
Buffer - GLib type: GObject with reference counted clone semantics.
- Text
Buffer Notify Flags - Text
Child Anchor - GLib type: GObject with reference counted clone semantics.
- Text
Iter - GLib type: Inline allocated boxed type with stack copy semantics.
- Text
Mark - GLib type: GObject with reference counted clone semantics.
- Text
Search Flags - TextTag
- GLib type: GObject with reference counted clone semantics.
- Text
TagTable - GLib type: GObject with reference counted clone semantics.
- Text
View - GLib type: GObject with reference counted clone semantics.
- Tick
Callback Id - Toggle
Button - GLib type: GObject with reference counted clone semantics.
- Tooltip
- GLib type: GObject with reference counted clone semantics.
- Tree
Drag Dest Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
Drag Source Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
Expander - GLib type: GObject with reference counted clone semantics.
- Tree
Iter - GLib type: Inline allocated boxed type with stack copy semantics.
- Tree
List Model - GLib type: GObject with reference counted clone semantics.
- Tree
List Row - GLib type: GObject with reference counted clone semantics.
- Tree
List RowSorter - GLib type: GObject with reference counted clone semantics.
- Tree
Model Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
Model Filter Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
Model Flags Deprecated - Tree
Model Sort Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
Path - GLib type: Boxed type with copy-on-clone semantics.
- Tree
RowReference - GLib type: Boxed type with copy-on-clone semantics.
- Tree
Selection Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
Sortable Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
Store Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
View Deprecated - GLib type: GObject with reference counted clone semantics.
- Tree
View Column Deprecated - GLib type: GObject with reference counted clone semantics.
- UriLauncher
- GLib type: GObject with reference counted clone semantics.
- Video
- GLib type: GObject with reference counted clone semantics.
- Viewport
- GLib type: GObject with reference counted clone semantics.
- Volume
Button Deprecated - GLib type: GObject with reference counted clone semantics.
- Widget
- GLib type: GObject with reference counted clone semantics.
- Widget
Paintable - GLib type: GObject with reference counted clone semantics.
- Window
- GLib type: GObject with reference counted clone semantics.
- Window
Controls - GLib type: GObject with reference counted clone semantics.
- Window
Group - GLib type: GObject with reference counted clone semantics.
- Window
Handle - GLib type: GObject with reference counted clone semantics.
Enums§
- Accessible
Announcement Priority - Accessible
Autocomplete - Accessible
Invalid State - Accessible
Platform State - Accessible
Property - Accessible
Relation - Accessible
Role - Accessible
Sort - Accessible
State - Accessible
Text Content Change - Accessible
Text Granularity - Accessible
Tristate - Align
- Arrow
Type - Assistant
Page Type Deprecated - Baseline
Position - Border
Style - Builder
Error - Buttons
Type - Cell
Renderer Accel Mode Deprecated - Cell
Renderer Mode Deprecated - Collation
- Constraint
Attribute - Constraint
Relation - Constraint
Strength - Constraint
VflParser Error - Content
Fit - Corner
Type - CssParser
Error - CssParser
Warning - Delete
Type - Dialog
Error - Direction
Type - Editable
Properties - Entry
Icon Position - Event
Sequence State - File
Chooser Action - File
Chooser Error Deprecated - Filter
Change - Filter
Match - Font
Level - Font
Rendering - Graphics
Offload Enabled - Icon
Size - Icon
Theme Error - Icon
View Drop Position Deprecated - Image
Type - Input
Purpose - Inscription
Overflow - Interface
Color Scheme - Interface
Contrast - Justification
- Level
BarMode - License
- List
TabBehavior - Message
Type - Movement
Step - Natural
Wrap Mode - Notebook
Tab - Number
UpLayout - Ordering
- Orientation
- Overflow
- Pack
Type - PadAction
Type - Page
Orientation - PageSet
- PanDirection
- Policy
Type - Position
Type - Print
Duplex - Print
Error - Print
Operation Action - Print
Operation Result - Print
Pages - Print
Quality - Print
Status - Propagation
Limit - Propagation
Phase - Recent
Manager Error - Response
Type - Revealer
Transition Type - Scroll
Step - Scroll
Type - Scrollable
Policy - Selection
Mode - Sensitivity
Type - Shortcut
Scope - Shortcut
Type - Size
Group Mode - Size
Request Mode - Sort
Column Deprecated - Sort
Type - Sorter
Change - Sorter
Order - Spin
Button Update Policy - Spin
Type - Stack
Transition Type - String
Filter Match Mode - Symbolic
Color - System
Setting - Text
Direction - Text
Extend Selection - Text
View Layer - Text
Window Type - Tree
View Column Sizing Deprecated - Tree
View Drop Position Deprecated - Tree
View Grid Lines Deprecated - Unit
- Window
Gravity - Wrap
Mode
Constants§
- ACCESSIBLE_
VALUE_ UNDEFINED - INVALID_
LIST_ POSITION - PRIORITY_
RESIZE - STYLE_
PROVIDER_ PRIORITY_ APPLICATION - STYLE_
PROVIDER_ PRIORITY_ FALLBACK - STYLE_
PROVIDER_ PRIORITY_ SETTINGS - STYLE_
PROVIDER_ PRIORITY_ THEME - STYLE_
PROVIDER_ PRIORITY_ USER - TEXT_
VIEW_ PRIORITY_ VALIDATE
Statics§
- ACCESSIBLE_
ATTRIBUTE_ BACKGROUND - ACCESSIBLE_
ATTRIBUTE_ FAMILY - ACCESSIBLE_
ATTRIBUTE_ FOREGROUND - ACCESSIBLE_
ATTRIBUTE_ OVERLINE - ACCESSIBLE_
ATTRIBUTE_ OVERLINE_ NONE - ACCESSIBLE_
ATTRIBUTE_ OVERLINE_ SINGLE - ACCESSIBLE_
ATTRIBUTE_ SIZE - ACCESSIBLE_
ATTRIBUTE_ STRETCH - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ CONDENSED - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ EXPANDED - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ EXTRA_ CONDENSED - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ EXTRA_ EXPANDED - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ NORMAL - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ SEMI_ CONDENSED - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ SEMI_ EXPANDED - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ ULTRA_ CONDENSED - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ ULTRA_ EXPANDED - ACCESSIBLE_
ATTRIBUTE_ STRIKETHROUGH - ACCESSIBLE_
ATTRIBUTE_ STYLE - ACCESSIBLE_
ATTRIBUTE_ STYLE_ ITALIC - ACCESSIBLE_
ATTRIBUTE_ STYLE_ NORMAL - ACCESSIBLE_
ATTRIBUTE_ STYLE_ OBLIQUE - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ DOUBLE - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ ERROR - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ NONE - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ SINGLE - ACCESSIBLE_
ATTRIBUTE_ VARIANT - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ ALL_ PETITE_ CAPS - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ ALL_ SMALL_ CAPS - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ PETITE_ CAPS - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ SMALL_ CAPS - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ TITLE_ CAPS - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ UNICASE - ACCESSIBLE_
ATTRIBUTE_ WEIGHT - IM_
MODULE_ EXTENSION_ POINT_ NAME - LEVEL_
BAR_ OFFSET_ FULL - LEVEL_
BAR_ OFFSET_ HIGH - LEVEL_
BAR_ OFFSET_ LOW - MEDIA_
FILE_ EXTENSION_ POINT_ NAME - PAPER_
NAME_ A3 - PAPER_
NAME_ A4 - PAPER_
NAME_ A5 - PAPER_
NAME_ B5 - PAPER_
NAME_ EXECUTIVE - PAPER_
NAME_ LEGAL - PAPER_
NAME_ LETTER - PRINT_
SETTINGS_ COLLATE - PRINT_
SETTINGS_ DEFAULT_ SOURCE - PRINT_
SETTINGS_ DITHER - PRINT_
SETTINGS_ DUPLEX - PRINT_
SETTINGS_ FINISHINGS - PRINT_
SETTINGS_ MEDIA_ TYPE - PRINT_
SETTINGS_ NUMBER_ UP - PRINT_
SETTINGS_ NUMBER_ UP_ LAYOUT - PRINT_
SETTINGS_ N_ COPIES - PRINT_
SETTINGS_ ORIENTATION - PRINT_
SETTINGS_ OUTPUT_ BASENAME - PRINT_
SETTINGS_ OUTPUT_ BIN - PRINT_
SETTINGS_ OUTPUT_ DIR - PRINT_
SETTINGS_ OUTPUT_ FILE_ FORMAT - PRINT_
SETTINGS_ OUTPUT_ URI - PRINT_
SETTINGS_ PAGE_ RANGES - PRINT_
SETTINGS_ PAGE_ SET - PRINT_
SETTINGS_ PAPER_ FORMAT - PRINT_
SETTINGS_ PAPER_ HEIGHT - PRINT_
SETTINGS_ PAPER_ WIDTH - PRINT_
SETTINGS_ PRINTER - PRINT_
SETTINGS_ PRINTER_ LPI - PRINT_
SETTINGS_ PRINT_ PAGES - PRINT_
SETTINGS_ QUALITY - PRINT_
SETTINGS_ RESOLUTION - PRINT_
SETTINGS_ RESOLUTION_ X - PRINT_
SETTINGS_ RESOLUTION_ Y - PRINT_
SETTINGS_ REVERSE - PRINT_
SETTINGS_ SCALE - PRINT_
SETTINGS_ USE_ COLOR - PRINT_
SETTINGS_ WIN32_ DRIVER_ EXTRA - PRINT_
SETTINGS_ WIN32_ DRIVER_ VERSION
Functions§
- accelerator_
get_ default_ mod_ mask - accelerator_
get_ label - accelerator_
get_ label_ with_ keycode - accelerator_
name - accelerator_
name_ with_ keycode - accelerator_
parse - accelerator_
parse_ with_ keycode - accelerator_
valid - binary_
age - check_
version - debug_
flags - default_
language - disable_
portals - disable_
setlocale - enumerate_
printers - hsv_
to_ rgb - init
- Tries to initialize GTK.
- interface_
age - is_
initialized - Returns
trueif GTK has been initialized. - is_
initialized_ main_ thread - Returns
trueif GTK has been initialized and this is the main thread. - locale_
direction - major_
version - micro_
version - minor_
version - print_
run_ page_ setup_ dialog - print_
run_ page_ setup_ dialog_ async - render_
activity Deprecated - render_
arrow Deprecated - render_
background Deprecated - render_
check Deprecated - render_
expander Deprecated - render_
focus Deprecated - render_
frame Deprecated - render_
handle Deprecated - render_
icon Deprecated - render_
layout Deprecated - render_
line Deprecated - render_
option Deprecated - rgb_
to_ hsv - set_
debug_ flags - set_
initialized ⚠ - Informs this crate that GTK has been initialized and the current thread is the main one.
- show_
about_ dialog - show_
uri Deprecated - show_
uri_ full Deprecated - show_
uri_ full_ future Deprecated - style_
context_ add_ provider_ for_ display - style_
context_ remove_ provider_ for_ display - test_
accessible_ assertion_ message_ role - test_
accessible_ has_ property - test_
accessible_ has_ relation - test_
accessible_ has_ role - test_
accessible_ has_ state - test_
list_ all_ types - test_
register_ all_ types - test_
widget_ wait_ for_ draw - tree_
create_ row_ drag_ content Deprecated - tree_
get_ row_ drag_ data Deprecated