Expand description
§Rust GTK 3 bindings
Rust bindings and wrappers for GTK 3, part of gtk3-rs, a multi-platform GUI toolkit. It is a part of gtk-rs.
GTK 3.22.30 is the lowest supported version for the underlying library.
§Minimum supported Rust version
Currently, the minimum supported Rust version is 1.92.0.
§Building
gtk expects GTK, GLib and Cairo development files to be installed on your system. See the GTK installation page.
§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/gtk3-rs.git" }Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
gtk = "0.13"
gtk = { git = "https://github.com/gtk-rs/gtk3-rs.git" }§“Hello, World!” example program
GTK needs to be initialized before use by calling init. Creating an
Application will call init for you.
use gtk::prelude::*;
use gtk::{Application, ApplicationWindow};
fn main() {
let app = Application::builder()
.application_id("org.example.HelloWorld")
.build();
app.connect_activate(|app| {
// We create the main window.
let win = ApplicationWindow::builder()
.application(app)
.default_width(320)
.default_height(200)
.title("Hello, World!")
.build();
// Don't forget to make all widgets visible.
win.show_all();
});
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 gtk::prelude::*;
use gtk::{Application, ApplicationWindow, Button};
fn main() {
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.add(&button);
window.show_all();
});
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 3.22.30 APIs. You can access additional
functionality by selecting one of the v3_24, etc. features.
Cargo.toml example:
[dependencies.gtk]
version = "0.x.y"
features = ["v3_24"]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
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.
Generate the docs:
> RUSTDOCFLAGS="--cfg docsrs" cargo doc§Contribute
Contributions are welcome!
See the general bindings documentation.
Most of the bindings (src/auto) are generated by gir using this configuration file. After editing Gir.toml the sources can be regenerated with
> python3 generator.pyWhen opening a PR please put the changes to the src/auto directory in a separate commit.
You may also wish to run cargo clippy -- -D warnings and check that you’re clean because
otherwise you may be surprised when CI fails.
§See Also
But also:
§License
gtk is available under the MIT License, please refer to it.
Re-exports§
pub use gtk_sys as ffi;pub use atk;pub use cairo;pub use gdk;pub use gdk_pixbuf;pub use gio;pub use glib;pub use pango;
Modules§
- builders
- Builder pattern types.
- prelude
- Traits and essential types intended for blanket imports.
- subclass
- xlib
Structs§
- About
Dialog - GLib type: GObject with reference counted clone semantics.
- Accel
Flags - Accel
Group - GLib type: GObject with reference counted clone semantics.
- Accel
Label - GLib type: GObject with reference counted clone semantics.
- Action
Bar - GLib type: GObject with reference counted clone semantics.
- Actionable
- GLib type: GObject with reference counted clone semantics.
- Adjustment
- GLib type: GObject with reference counted clone semantics.
- Allocation
- GLib type: Inline allocated boxed type with stack copy semantics.
- AppChooser
- GLib type: GObject with reference counted clone semantics.
- AppChooser
Button - GLib type: GObject with reference counted clone semantics.
- AppChooser
Dialog - GLib type: GObject with reference counted clone semantics.
- AppChooser
Widget - 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
- GLib type: GObject with reference counted clone semantics.
- Bin
- 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.
- Buildable
- GLib type: GObject with reference counted clone semantics.
- Builder
- GLib type: GObject with reference counted clone semantics.
- Button
- GLib type: GObject with reference counted clone semantics.
- Button
Box - GLib type: GObject with reference counted clone semantics.
- Calendar
- GLib type: GObject with reference counted clone semantics.
- Calendar
Display Options - Cell
Area - GLib type: GObject with reference counted clone semantics.
- Cell
Area Box - GLib type: GObject with reference counted clone semantics.
- Cell
Area Context - GLib type: GObject with reference counted clone semantics.
- Cell
Editable - GLib type: GObject with reference counted clone semantics.
- Cell
Layout - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Accel - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Combo - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Pixbuf - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Progress - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Spin - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Spinner - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer State - Cell
Renderer Text - GLib type: GObject with reference counted clone semantics.
- Cell
Renderer Toggle - GLib type: GObject with reference counted clone semantics.
- Cell
View - GLib type: GObject with reference counted clone semantics.
- Check
Button - GLib type: GObject with reference counted clone semantics.
- Check
Menu Item - GLib type: GObject with reference counted clone semantics.
- Clipboard
- GLib type: GObject with reference counted clone semantics.
- Color
Button - GLib type: GObject with reference counted clone semantics.
- Color
Chooser - GLib type: GObject with reference counted clone semantics.
- Color
Chooser Dialog - GLib type: GObject with reference counted clone semantics.
- Color
Chooser Widget - GLib type: GObject with reference counted clone semantics.
- Combo
Box - GLib type: GObject with reference counted clone semantics.
- Combo
BoxText - GLib type: GObject with reference counted clone semantics.
- Container
- GLib type: GObject with reference counted clone semantics.
- CssProvider
- GLib type: GObject with reference counted clone semantics.
- CssSection
- GLib type: Shared boxed type with reference counted clone semantics.
- Dest
Defaults - Dialog
- GLib type: GObject with reference counted clone semantics.
- Dialog
Flags - Drawing
Area - GLib type: GObject with reference counted clone semantics.
- Editable
- 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 - GLib type: GObject with reference counted clone semantics.
- Event
Box - GLib type: GObject with reference counted clone semantics.
- Event
Controller - GLib type: GObject with reference counted clone semantics.
- Expander
- GLib type: GObject with reference counted clone semantics.
- File
Chooser - GLib type: GObject with reference counted clone semantics.
- File
Chooser Button - GLib type: GObject with reference counted clone semantics.
- File
Chooser Dialog - GLib type: GObject with reference counted clone semantics.
- File
Chooser Native - GLib type: GObject with reference counted clone semantics.
- File
Chooser Widget - GLib type: GObject with reference counted clone semantics.
- File
Filter - GLib type: GObject with reference counted clone semantics.
- File
Filter Flags - File
Filter Info - Fixed
- 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 - GLib type: GObject with reference counted clone semantics.
- Font
Chooser - GLib type: GObject with reference counted clone semantics.
- Font
Chooser Dialog - GLib type: GObject with reference counted clone semantics.
- Font
Chooser Widget - 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
Drag - GLib type: GObject with reference counted clone semantics.
- Gesture
Long Press - GLib type: GObject with reference counted clone semantics.
- Gesture
Multi 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
Swipe - GLib type: GObject with reference counted clone semantics.
- Gesture
Zoom - GLib type: GObject with reference counted clone semantics.
- Grid
- 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
Info - GLib type: GObject with reference counted clone semantics.
- Icon
Lookup Flags - Icon
Theme - GLib type: GObject with reference counted clone semantics.
- Icon
View - GLib type: GObject with reference counted clone semantics.
- Image
- GLib type: GObject with reference counted clone semantics.
- InfoBar
- GLib type: GObject with reference counted clone semantics.
- Input
Hints - Invisible
- GLib type: GObject with reference counted clone semantics.
- Junction
Sides - Label
- GLib type: GObject with reference counted clone semantics.
- Layout
- 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.
- ListBox
- GLib type: GObject with reference counted clone semantics.
- List
BoxRow - GLib type: GObject with reference counted clone semantics.
- List
Store - GLib type: GObject with reference counted clone semantics.
- Lock
Button - GLib type: GObject with reference counted clone semantics.
- Menu
- GLib type: GObject with reference counted clone semantics.
- MenuBar
- GLib type: GObject with reference counted clone semantics.
- Menu
Button - GLib type: GObject with reference counted clone semantics.
- Menu
Item - GLib type: GObject with reference counted clone semantics.
- Menu
Shell - GLib type: GObject with reference counted clone semantics.
- Menu
Tool Button - GLib type: GObject with reference counted clone semantics.
- Message
Dialog - GLib type: GObject with reference counted clone semantics.
- Misc
- GLib type: GObject with reference counted clone semantics.
- Model
Button - GLib type: GObject with reference counted clone semantics.
- Mount
Operation - GLib type: GObject with reference counted clone semantics.
- Native
Dialog - GLib type: GObject with reference counted clone semantics.
- Notebook
- GLib type: GObject with reference counted clone semantics.
- Offscreen
Window - GLib type: GObject with reference counted clone semantics.
- Orientable
- GLib type: GObject with reference counted clone semantics.
- Overlay
- GLib type: GObject with reference counted clone semantics.
- PadAction
Entry - 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.
- Paned
- GLib type: GObject with reference counted clone semantics.
- Paper
Size - GLib type: Boxed type with copy-on-clone semantics.
- Places
Open Flags - Places
Sidebar - GLib type: GObject with reference counted clone semantics.
- Plug
gdk_backend=x11 - 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.
- Print
Context - 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.
- Progress
Bar - GLib type: GObject with reference counted clone semantics.
- Radio
Button - GLib type: GObject with reference counted clone semantics.
- Radio
Menu Item - GLib type: GObject with reference counted clone semantics.
- Radio
Tool Button - GLib type: GObject with reference counted clone semantics.
- Range
- GLib type: GObject with reference counted clone semantics.
- Recent
Chooser - GLib type: GObject with reference counted clone semantics.
- Recent
Chooser Dialog - GLib type: GObject with reference counted clone semantics.
- Recent
Chooser Menu - GLib type: GObject with reference counted clone semantics.
- Recent
Chooser Widget - GLib type: GObject with reference counted clone semantics.
- Recent
Data - Recent
Filter - GLib type: GObject with reference counted clone semantics.
- Recent
Filter Flags - Recent
Info - GLib type: Shared boxed type with reference counted clone semantics.
- Recent
Manager - GLib type: GObject with reference counted clone semantics.
- Rectangle
- GLib type: Inline allocated boxed type with stack copy semantics.
- Region
Flags - Requisition
- Revealer
- 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.
- 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.
- Selection
Data - GLib type: Boxed type with copy-on-clone semantics.
- Separator
- GLib type: GObject with reference counted clone semantics.
- Separator
Menu Item - GLib type: GObject with reference counted clone semantics.
- Separator
Tool Item - GLib type: GObject with reference counted clone semantics.
- Settings
- GLib type: GObject with reference counted clone semantics.
- Shortcut
Label - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Group - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Section - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Shortcut - GLib type: GObject with reference counted clone semantics.
- Shortcuts
Window - GLib type: GObject with reference counted clone semantics.
- Size
Group - GLib type: GObject with reference counted clone semantics.
- Socket
gdk_backend=x11 - 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
Sidebar - GLib type: GObject with reference counted clone semantics.
- Stack
Switcher - GLib type: GObject with reference counted clone semantics.
- State
Flags - Statusbar
- GLib type: GObject with reference counted clone semantics.
- Style
Context - GLib type: GObject with reference counted clone semantics.
- Style
Context Print Flags - Style
Properties - GLib type: GObject with reference counted clone semantics.
- Style
Provider - GLib type: GObject with reference counted clone semantics.
- Switch
- GLib type: GObject with reference counted clone semantics.
- Target
Entry - Target
Flags - Target
List - GLib type: Shared boxed type with reference counted clone semantics.
- Text
Attributes - GLib type: Shared boxed type with reference counted clone semantics.
- Text
Buffer - GLib type: GObject with reference counted clone semantics.
- 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.
- Toggle
Tool Button - GLib type: GObject with reference counted clone semantics.
- Tool
Button - GLib type: GObject with reference counted clone semantics.
- Tool
Item - GLib type: GObject with reference counted clone semantics.
- Tool
Item Group - GLib type: GObject with reference counted clone semantics.
- Tool
Palette - GLib type: GObject with reference counted clone semantics.
- Tool
Palette Drag Targets - Tool
Shell - GLib type: GObject with reference counted clone semantics.
- Toolbar
- GLib type: GObject with reference counted clone semantics.
- Tooltip
- GLib type: GObject with reference counted clone semantics.
- Tree
Drag Dest - GLib type: GObject with reference counted clone semantics.
- Tree
Drag Source - GLib type: GObject with reference counted clone semantics.
- Tree
Iter - GLib type: Inline allocated boxed type with stack copy semantics.
- Tree
Model - GLib type: GObject with reference counted clone semantics.
- Tree
Model Filter - GLib type: GObject with reference counted clone semantics.
- Tree
Model Flags - Tree
Model Sort - 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 - GLib type: GObject with reference counted clone semantics.
- Tree
Sortable - GLib type: GObject with reference counted clone semantics.
- Tree
Store - GLib type: GObject with reference counted clone semantics.
- Tree
View - GLib type: GObject with reference counted clone semantics.
- Tree
View Column - GLib type: GObject with reference counted clone semantics.
- Viewport
- GLib type: GObject with reference counted clone semantics.
- Volume
Button - GLib type: GObject with reference counted clone semantics.
- Widget
- GLib type: GObject with reference counted clone semantics.
- Widget
Path - GLib type: Shared boxed type with reference counted clone semantics.
- Window
- GLib type: GObject with reference counted clone semantics.
- Window
Group - GLib type: GObject with reference counted clone semantics.
Enums§
- Align
- Arrow
Type - Assistant
Page Type - Baseline
Position - Border
Style - Builder
Error - Button
BoxStyle - Button
Role - Buttons
Type - Cell
Renderer Accel Mode - Cell
Renderer Mode - Corner
Type - CssProvider
Error - CssSection
Type - Delete
Type - Direction
Type - Drag
Result - Entry
Icon Position - Event
Sequence State - File
Chooser Action - File
Chooser Confirmation - File
Chooser Error - Icon
Size - Icon
Theme Error - Icon
View Drop Position - Image
Type - Input
Purpose - Justification
- Level
BarMode - License
- Menu
Direction Type - Message
Type - Movement
Step - Notebook
Tab - Number
UpLayout - Orientation
- Pack
Direction - Pack
Type - PadAction
Type - Page
Orientation - PageSet
- PanDirection
- Policy
Type - Popover
Constraint - Position
Type - Print
Duplex - Print
Error - Print
Operation Action - Print
Operation Result - Print
Pages - Print
Quality - Print
Status - Propagation
Phase - Recent
Chooser Error - Recent
Manager Error - Recent
Sort Type - Relief
Style - Resize
Mode - Response
Type - Revealer
Transition Type - Scroll
Step - Scroll
Type - Scrollable
Policy - Selection
Mode - Sensitivity
Type - Shadow
Type - Shortcut
Type - Size
Group Mode - Size
Request Mode - Sort
Column - Sort
Type - Spin
Button Update Policy - Spin
Type - Stack
Transition Type - Text
Direction - Text
Extend Selection - Text
View Layer - Text
Window Type - Toolbar
Style - Tree
View Column Sizing - Tree
View Drop Position - Tree
View Grid Lines - Unit
- Widget
Help Type - Window
Position - Window
Type - Wrap
Mode
Constants§
- STYLE_
PROVIDER_ PRIORITY_ APPLICATION - STYLE_
PROVIDER_ PRIORITY_ FALLBACK - STYLE_
PROVIDER_ PRIORITY_ SETTINGS - STYLE_
PROVIDER_ PRIORITY_ THEME - STYLE_
PROVIDER_ PRIORITY_ USER
Statics§
- LEVEL_
BAR_ OFFSET_ FULL - LEVEL_
BAR_ OFFSET_ HIGH - LEVEL_
BAR_ OFFSET_ LOW - 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 - STYLE_
CLASS_ ACCELERATOR - STYLE_
CLASS_ ARROW - STYLE_
CLASS_ BACKGROUND - STYLE_
CLASS_ BOTTOM - STYLE_
CLASS_ BUTTON - STYLE_
CLASS_ CALENDAR - STYLE_
CLASS_ CELL - STYLE_
CLASS_ CHECK - STYLE_
CLASS_ COMBOBOX_ ENTRY - STYLE_
CLASS_ CONTEXT_ MENU - STYLE_
CLASS_ CSD - STYLE_
CLASS_ CURSOR_ HANDLE - STYLE_
CLASS_ DEFAULT - STYLE_
CLASS_ DESTRUCTIVE_ ACTION - STYLE_
CLASS_ DIM_ LABEL - STYLE_
CLASS_ DND - STYLE_
CLASS_ DOCK - STYLE_
CLASS_ ENTRY - STYLE_
CLASS_ ERROR - STYLE_
CLASS_ EXPANDER - STYLE_
CLASS_ FLAT - STYLE_
CLASS_ FRAME - STYLE_
CLASS_ GRIP - STYLE_
CLASS_ HEADER - STYLE_
CLASS_ HIGHLIGHT - STYLE_
CLASS_ HORIZONTAL - STYLE_
CLASS_ IMAGE - STYLE_
CLASS_ INFO - STYLE_
CLASS_ INLINE_ TOOLBAR - STYLE_
CLASS_ INSERTION_ CURSOR - STYLE_
CLASS_ LABEL - STYLE_
CLASS_ LEFT - STYLE_
CLASS_ LEVEL_ BAR - STYLE_
CLASS_ LINKED - STYLE_
CLASS_ LIST - STYLE_
CLASS_ LIST_ ROW - STYLE_
CLASS_ MARK - STYLE_
CLASS_ MENU - STYLE_
CLASS_ MENUBAR - STYLE_
CLASS_ MENUITEM - STYLE_
CLASS_ MESSAGE_ DIALOG - STYLE_
CLASS_ MONOSPACE - STYLE_
CLASS_ NEEDS_ ATTENTION - STYLE_
CLASS_ NOTEBOOK - STYLE_
CLASS_ OSD - STYLE_
CLASS_ OVERSHOOT - STYLE_
CLASS_ PANE_ SEPARATOR - STYLE_
CLASS_ PAPER - STYLE_
CLASS_ POPOVER - STYLE_
CLASS_ POPUP - STYLE_
CLASS_ PRIMARY_ TOOLBAR - STYLE_
CLASS_ PROGRESSBAR - STYLE_
CLASS_ PULSE - STYLE_
CLASS_ QUESTION - STYLE_
CLASS_ RADIO - STYLE_
CLASS_ RAISED - STYLE_
CLASS_ READ_ ONLY - STYLE_
CLASS_ RIGHT - STYLE_
CLASS_ RUBBERBAND - STYLE_
CLASS_ SCALE - STYLE_
CLASS_ SCALE_ HAS_ MARKS_ ABOVE - STYLE_
CLASS_ SCALE_ HAS_ MARKS_ BELOW - STYLE_
CLASS_ SCROLLBAR - STYLE_
CLASS_ SCROLLBARS_ JUNCTION - STYLE_
CLASS_ SEPARATOR - STYLE_
CLASS_ SIDEBAR - STYLE_
CLASS_ SLIDER - STYLE_
CLASS_ SPINBUTTON - STYLE_
CLASS_ SPINNER - STYLE_
CLASS_ STATUSBAR - STYLE_
CLASS_ SUBTITLE - STYLE_
CLASS_ SUGGESTED_ ACTION - STYLE_
CLASS_ TITLE - STYLE_
CLASS_ TITLEBAR - STYLE_
CLASS_ TOOLBAR - STYLE_
CLASS_ TOOLTIP - STYLE_
CLASS_ TOP - STYLE_
CLASS_ TOUCH_ SELECTION - STYLE_
CLASS_ TROUGH - STYLE_
CLASS_ UNDERSHOOT - STYLE_
CLASS_ VERTICAL - STYLE_
CLASS_ VIEW - STYLE_
CLASS_ WARNING - STYLE_
CLASS_ WIDE - STYLE_
PROPERTY_ BACKGROUND_ COLOR - STYLE_
PROPERTY_ BACKGROUND_ IMAGE - STYLE_
PROPERTY_ BORDER_ COLOR - STYLE_
PROPERTY_ BORDER_ RADIUS - STYLE_
PROPERTY_ BORDER_ STYLE - STYLE_
PROPERTY_ BORDER_ WIDTH - STYLE_
PROPERTY_ COLOR - STYLE_
PROPERTY_ FONT - STYLE_
PROPERTY_ MARGIN - STYLE_
PROPERTY_ PADDING
Traits§
Functions§
- accel_
groups_ activate - accel_
groups_ from_ object - 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_
set_ default_ mod_ mask - accelerator_
valid - binary_
age - bindings_
activate - bindings_
activate_ event - cairo_
should_ draw_ window - cairo_
transform_ to_ window - check_
version - current_
event - current_
event_ device - current_
event_ state - current_
event_ time - debug_
flags - default_
language - device_
grab_ add - device_
grab_ remove - disable_
setlocale - event_
widget - events_
pending - false_
- grab_
get_ current - 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 - main
- main_
do_ event - main_
iteration - main_
iteration_ do - main_
level - main_
quit - major_
version - micro_
version - minor_
version - print_
run_ page_ setup_ dialog - print_
run_ page_ setup_ dialog_ async - propagate_
event - render_
activity - render_
arrow - render_
background - render_
background_ get_ clip - render_
check - render_
expander - render_
extension - render_
focus - render_
frame - render_
frame_ gap - render_
handle - render_
icon - render_
icon_ surface - render_
insertion_ cursor - render_
layout - render_
line - render_
option - render_
slider - rgb_
to_ hsv - selection_
add_ target - selection_
clear_ targets - selection_
convert - selection_
owner_ set - selection_
owner_ set_ for_ display - selection_
remove_ all - set_
debug_ flags - set_
initialized ⚠ - Informs this crate that GTK has been initialized and the current thread is the main one.
- show_
uri_ on_ window - targets_
include_ image - targets_
include_ rich_ text - targets_
include_ text - targets_
include_ uri - test_
find_ label - test_
find_ sibling - test_
find_ widget - test_
register_ all_ types - test_
widget_ send_ key - test_
widget_ wait_ for_ draw - tree_
get_ row_ drag_ data - tree_
set_ row_ drag_ data - true_