Expand description
§GTK+ 3 bindings
This library contains safe Rust bindings for GTK+ 3, a multi-platform GUI toolkit. It’s a part of Gtk-rs.
The library is a work in progress: expect missing bindings and breaking
changes. A steadily increasing share of the code is machine-generated from
GObject
introspection metadata. The API docs were converted from the
upstream ones so until they’ve all been reviewed there will be incongruities
with actual Rust APIs.
See also:
§Hello World
extern crate gtk;
use gtk::prelude::*;
use gtk::{ButtonsType, DialogFlags, MessageType, MessageDialog, Window};
fn main() {
if gtk::init().is_err() {
println!("Failed to initialize GTK.");
return;
}
MessageDialog::new(None::<&Window>,
DialogFlags::empty(),
MessageType::Info,
ButtonsType::Ok,
"Hello World").run();
}
§Initialization
GTK+ needs to be initialized before use by calling init
or
Application::new
. You only need to
do it once and there is no ‘finalize’.
§The main loop
In a typical GTK+ application you set up the UI, assign signal handlers and run the main event loop:
extern crate gtk;
extern crate gio;
// To import all needed traits.
use gtk::prelude::*;
use gio::prelude::*;
use std::env;
fn main() {
let uiapp = gtk::Application::new(Some("org.gtkrsnotes.demo"),
gio::ApplicationFlags::FLAGS_NONE)
.expect("Application::new failed");
uiapp.connect_activate(|app| {
// We create the main window.
let win = gtk::ApplicationWindow::new(app);
// Then we set its size and a title.
win.set_default_size(320, 200);
win.set_title("Basic example");
// Don't forget to make all widgets visible.
win.show_all();
});
uiapp.run(&env::args().collect::<Vec<_>>());
}
§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
. This crate has
versions of those functions without the Send
bound, which may only be
called from the main thread: idle_add
,
timeout_add
.
§Panics
This and the gdk
crate have some run-time safety and contract checks:
-
Any constructor or free function will panic if called before
init
or on a non-main thread. -
Any
&str
or&Path
parameter 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’re not yet.
A panic in a closure will abort the process.
§Crate features
§Library versions
By default this crate provides only GTK+ 3.14 APIs. You can access more
modern APIs by selecting one of the following features: v3_14
, v3_16
, etc.
Cargo.toml
example:
[dependencies.gtk]
version = "0.x.y"
features = ["v3_16"]
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.
§Lgpl-docs
The Gtk-rs crates come with API docs missing because of licensing
incompatibilty. You can embed those docs locally via the embed-lgpl-docs
feature, e.g.
> cargo doc --features embed-lgpl-docs
Its counterpart purge-lgpl-docs
removes those docs regardless of edits.
These features rewrite the crate sources so it’s sufficient to enable them once. Omitting them in the following cargo invocations will not undo their effects!
Re-exports§
pub use self::constants::LEVEL_BAR_OFFSET_FULL;
pub use self::constants::LEVEL_BAR_OFFSET_HIGH;
pub use self::constants::LEVEL_BAR_OFFSET_LOW;
pub use self::constants::PAPER_NAME_A3;
pub use self::constants::PAPER_NAME_A4;
pub use self::constants::PAPER_NAME_A5;
pub use self::constants::PAPER_NAME_B5;
pub use self::constants::PAPER_NAME_EXECUTIVE;
pub use self::constants::PAPER_NAME_LEGAL;
pub use self::constants::PAPER_NAME_LETTER;
pub use self::constants::PRINT_SETTINGS_COLLATE;
pub use self::constants::PRINT_SETTINGS_DEFAULT_SOURCE;
pub use self::constants::PRINT_SETTINGS_DITHER;
pub use self::constants::PRINT_SETTINGS_DUPLEX;
pub use self::constants::PRINT_SETTINGS_FINISHINGS;
pub use self::constants::PRINT_SETTINGS_MEDIA_TYPE;
pub use self::constants::PRINT_SETTINGS_NUMBER_UP;
pub use self::constants::PRINT_SETTINGS_NUMBER_UP_LAYOUT;
pub use self::constants::PRINT_SETTINGS_N_COPIES;
pub use self::constants::PRINT_SETTINGS_ORIENTATION;
pub use self::constants::PRINT_SETTINGS_OUTPUT_BASENAME;
pub use self::constants::PRINT_SETTINGS_OUTPUT_BIN;
pub use self::constants::PRINT_SETTINGS_OUTPUT_DIR;
pub use self::constants::PRINT_SETTINGS_OUTPUT_FILE_FORMAT;
pub use self::constants::PRINT_SETTINGS_OUTPUT_URI;
pub use self::constants::PRINT_SETTINGS_PAGE_RANGES;
pub use self::constants::PRINT_SETTINGS_PAGE_SET;
pub use self::constants::PRINT_SETTINGS_PAPER_FORMAT;
pub use self::constants::PRINT_SETTINGS_PAPER_HEIGHT;
pub use self::constants::PRINT_SETTINGS_PAPER_WIDTH;
pub use self::constants::PRINT_SETTINGS_PRINTER;
pub use self::constants::PRINT_SETTINGS_PRINTER_LPI;
pub use self::constants::PRINT_SETTINGS_PRINT_PAGES;
pub use self::constants::PRINT_SETTINGS_QUALITY;
pub use self::constants::PRINT_SETTINGS_RESOLUTION;
pub use self::constants::PRINT_SETTINGS_RESOLUTION_X;
pub use self::constants::PRINT_SETTINGS_RESOLUTION_Y;
pub use self::constants::PRINT_SETTINGS_REVERSE;
pub use self::constants::PRINT_SETTINGS_SCALE;
pub use self::constants::PRINT_SETTINGS_USE_COLOR;
pub use self::constants::PRINT_SETTINGS_WIN32_DRIVER_EXTRA;
pub use self::constants::PRINT_SETTINGS_WIN32_DRIVER_VERSION;
pub use self::constants::STYLE_CLASS_ACCELERATOR;
pub use self::constants::STYLE_CLASS_ARROW;
pub use self::constants::STYLE_CLASS_BACKGROUND;
pub use self::constants::STYLE_CLASS_BOTTOM;
pub use self::constants::STYLE_CLASS_BUTTON;
pub use self::constants::STYLE_CLASS_CALENDAR;
pub use self::constants::STYLE_CLASS_CELL;
pub use self::constants::STYLE_CLASS_CHECK;
pub use self::constants::STYLE_CLASS_COMBOBOX_ENTRY;
pub use self::constants::STYLE_CLASS_CONTEXT_MENU;
pub use self::constants::STYLE_CLASS_CSD;
pub use self::constants::STYLE_CLASS_CURSOR_HANDLE;
pub use self::constants::STYLE_CLASS_DEFAULT;
pub use self::constants::STYLE_CLASS_DESTRUCTIVE_ACTION;
pub use self::constants::STYLE_CLASS_DIM_LABEL;
pub use self::constants::STYLE_CLASS_DND;
pub use self::constants::STYLE_CLASS_DOCK;
pub use self::constants::STYLE_CLASS_ENTRY;
pub use self::constants::STYLE_CLASS_ERROR;
pub use self::constants::STYLE_CLASS_EXPANDER;
pub use self::constants::STYLE_CLASS_FLAT;
pub use self::constants::STYLE_CLASS_FRAME;
pub use self::constants::STYLE_CLASS_GRIP;
pub use self::constants::STYLE_CLASS_HEADER;
pub use self::constants::STYLE_CLASS_HIGHLIGHT;
pub use self::constants::STYLE_CLASS_HORIZONTAL;
pub use self::constants::STYLE_CLASS_IMAGE;
pub use self::constants::STYLE_CLASS_INFO;
pub use self::constants::STYLE_CLASS_INLINE_TOOLBAR;
pub use self::constants::STYLE_CLASS_INSERTION_CURSOR;
pub use self::constants::STYLE_CLASS_LABEL;
pub use self::constants::STYLE_CLASS_LEFT;
pub use self::constants::STYLE_CLASS_LEVEL_BAR;
pub use self::constants::STYLE_CLASS_LINKED;
pub use self::constants::STYLE_CLASS_LIST;
pub use self::constants::STYLE_CLASS_LIST_ROW;
pub use self::constants::STYLE_CLASS_MARK;
pub use self::constants::STYLE_CLASS_MENU;
pub use self::constants::STYLE_CLASS_MENUBAR;
pub use self::constants::STYLE_CLASS_MENUITEM;
pub use self::constants::STYLE_CLASS_MESSAGE_DIALOG;
pub use self::constants::STYLE_CLASS_MONOSPACE;
pub use self::constants::STYLE_CLASS_NEEDS_ATTENTION;
pub use self::constants::STYLE_CLASS_NOTEBOOK;
pub use self::constants::STYLE_CLASS_OSD;
pub use self::constants::STYLE_CLASS_OVERSHOOT;
pub use self::constants::STYLE_CLASS_PANE_SEPARATOR;
pub use self::constants::STYLE_CLASS_PAPER;
pub use self::constants::STYLE_CLASS_POPOVER;
pub use self::constants::STYLE_CLASS_POPUP;
pub use self::constants::STYLE_CLASS_PRIMARY_TOOLBAR;
pub use self::constants::STYLE_CLASS_PROGRESSBAR;
pub use self::constants::STYLE_CLASS_PULSE;
pub use self::constants::STYLE_CLASS_QUESTION;
pub use self::constants::STYLE_CLASS_RADIO;
pub use self::constants::STYLE_CLASS_RAISED;
pub use self::constants::STYLE_CLASS_READ_ONLY;
pub use self::constants::STYLE_CLASS_RIGHT;
pub use self::constants::STYLE_CLASS_RUBBERBAND;
pub use self::constants::STYLE_CLASS_SCALE;
pub use self::constants::STYLE_CLASS_SCALE_HAS_MARKS_ABOVE;
pub use self::constants::STYLE_CLASS_SCALE_HAS_MARKS_BELOW;
pub use self::constants::STYLE_CLASS_SCROLLBAR;
pub use self::constants::STYLE_CLASS_SCROLLBARS_JUNCTION;
pub use self::constants::STYLE_CLASS_SEPARATOR;
pub use self::constants::STYLE_CLASS_SIDEBAR;
pub use self::constants::STYLE_CLASS_SLIDER;
pub use self::constants::STYLE_CLASS_SPINBUTTON;
pub use self::constants::STYLE_CLASS_SPINNER;
pub use self::constants::STYLE_CLASS_STATUSBAR;
pub use self::constants::STYLE_CLASS_SUBTITLE;
pub use self::constants::STYLE_CLASS_SUGGESTED_ACTION;
pub use self::constants::STYLE_CLASS_TITLE;
pub use self::constants::STYLE_CLASS_TITLEBAR;
pub use self::constants::STYLE_CLASS_TOOLBAR;
pub use self::constants::STYLE_CLASS_TOOLTIP;
pub use self::constants::STYLE_CLASS_TOP;
pub use self::constants::STYLE_CLASS_TOUCH_SELECTION;
pub use self::constants::STYLE_CLASS_TROUGH;
pub use self::constants::STYLE_CLASS_UNDERSHOOT;
pub use self::constants::STYLE_CLASS_VERTICAL;
pub use self::constants::STYLE_CLASS_VIEW;
pub use self::constants::STYLE_CLASS_WARNING;
pub use self::constants::STYLE_CLASS_WIDE;
pub use self::constants::STYLE_PROPERTY_BACKGROUND_COLOR;
pub use self::constants::STYLE_PROPERTY_BACKGROUND_IMAGE;
pub use self::constants::STYLE_PROPERTY_BORDER_COLOR;
pub use self::constants::STYLE_PROPERTY_BORDER_RADIUS;
pub use self::constants::STYLE_PROPERTY_BORDER_STYLE;
pub use self::constants::STYLE_PROPERTY_BORDER_WIDTH;
pub use self::constants::STYLE_PROPERTY_COLOR;
pub use self::constants::STYLE_PROPERTY_FONT;
pub use self::constants::STYLE_PROPERTY_MARGIN;
pub use self::constants::STYLE_PROPERTY_PADDING;
pub use self::constants::STYLE_REGION_COLUMN;
pub use self::constants::STYLE_REGION_COLUMN_HEADER;
pub use self::constants::STYLE_REGION_ROW;
pub use self::constants::STYLE_REGION_TAB;
pub use prelude::*;
Modules§
Structs§
- About
Dialog - About
Dialog Builder - About
Dialog Class - Accel
Flags - Accel
Group - Accel
Group Class - Accel
Label - Accel
Label Builder - Accel
Label Class - Action
Bar - Action
BarBuilder - Action
BarClass - Actionable
- Adjustment
- Adjustment
Class - Allocation
- AppChooser
- AppChooser
Button - AppChooser
Button Builder - AppChooser
Button Class - AppChooser
Dialog - AppChooser
Dialog Builder - AppChooser
Dialog Class - AppChooser
Widget - AppChooser
Widget Builder - AppChooser
Widget Class - Application
- Application
Builder - Application
Class - Application
Inhibit Flags - Application
Window - Application
Window Builder - Application
Window Class - Aspect
Frame - Aspect
Frame Builder - Aspect
Frame Class - Assistant
- Assistant
Builder - Assistant
Class - Bin
- BinClass
- Border
- Box
- BoxBuilder
- BoxClass
- Buildable
- Builder
- Builder
Class - Button
- Button
Box - Button
BoxBuilder - Button
BoxClass - Button
Builder - Button
Class - Calendar
- Calendar
Builder - Calendar
Class - Calendar
Display Options - Cell
Area - Cell
Area Box - Cell
Area BoxBuilder - Cell
Area BoxClass - Cell
Area Class - Cell
Area Context - Cell
Area Context Class - Cell
Editable - Cell
Layout - Cell
Renderer - Cell
Renderer Accel - Cell
Renderer Accel Builder - Cell
Renderer Accel Class - Cell
Renderer Class - Cell
Renderer Combo - Cell
Renderer Combo Builder - Cell
Renderer Combo Class - Cell
Renderer Pixbuf - Cell
Renderer Pixbuf Builder - Cell
Renderer Pixbuf Class - Cell
Renderer Progress - Cell
Renderer Progress Builder - Cell
Renderer Progress Class - Cell
Renderer Spin - Cell
Renderer Spin Builder - Cell
Renderer Spin Class - Cell
Renderer Spinner - Cell
Renderer Spinner Builder - Cell
Renderer Spinner Class - Cell
Renderer State - Cell
Renderer Text - Cell
Renderer Text Builder - Cell
Renderer Text Class - Cell
Renderer Toggle - Cell
Renderer Toggle Builder - Cell
Renderer Toggle Class - Cell
View - Cell
View Builder - Cell
View Class - Check
Button - Check
Button Builder - Check
Button Class - Check
Menu Item - Check
Menu Item Builder - Check
Menu Item Class - Clipboard
- Clipboard
Class - Color
Button - Color
Button Builder - Color
Button Class - Color
Chooser - Color
Chooser Dialog - Color
Chooser Dialog Builder - Color
Chooser Dialog Class - Color
Chooser Widget - Color
Chooser Widget Builder - Color
Chooser Widget Class - Combo
Box - Combo
BoxBuilder - Combo
BoxClass - Combo
BoxText - Combo
BoxText Builder - Combo
BoxText Class - Container
- Container
Class - Continue
- Continue calling the closure in the future iterations or drop it.
- CssProvider
- CssProvider
Class - CssSection
- Dest
Defaults - Dialog
- Dialog
Builder - Dialog
Class - Dialog
Flags - Drawing
Area - Drawing
Area Builder - Drawing
Area Class - Editable
- Entry
- Entry
Buffer - Entry
Builder - Entry
Class - Entry
Completion - Entry
Completion Builder - Entry
Completion Class - Error
- A generic error capable of representing various error domains (types).
- Event
Box - Event
BoxBuilder - Event
BoxClass - Event
Controller - Event
Controller Class - Expander
- Expander
Builder - Expander
Class - File
Chooser - File
Chooser Button - File
Chooser Button Builder - File
Chooser Button Class - File
Chooser Dialog - File
Chooser Dialog Builder - File
Chooser Dialog Class - File
Chooser Native - File
Chooser Native Builder - File
Chooser Native Class - File
Chooser Widget - File
Chooser Widget Builder - File
Chooser Widget Class - File
Filter - File
Filter Class - File
Filter Flags - Fixed
- Fixed
Builder - Fixed
Class - FlowBox
- Flow
BoxBuilder - Flow
BoxChild - Flow
BoxChild Builder - Flow
BoxChild Class - Flow
BoxClass - Font
Button - Font
Button Builder - Font
Button Class - Font
Chooser - Font
Chooser Dialog - Font
Chooser Dialog Builder - Font
Chooser Dialog Class - Font
Chooser Widget - Font
Chooser Widget Builder - Font
Chooser Widget Class - Frame
- Frame
Builder - Frame
Class - GLArea
- GLArea
Builder - GLArea
Class - Gesture
- Gesture
Class - Gesture
Drag - Gesture
Drag Builder - Gesture
Drag Class - Gesture
Long Press - Gesture
Long Press Builder - Gesture
Long Press Class - Gesture
Multi Press - Gesture
Multi Press Builder - Gesture
Multi Press Class - Gesture
Pan - Gesture
PanBuilder - Gesture
PanClass - Gesture
Rotate - Gesture
Rotate Builder - Gesture
Rotate Class - Gesture
Single - Gesture
Single Class - Gesture
Swipe - Gesture
Swipe Builder - Gesture
Swipe Class - Gesture
Zoom - Gesture
Zoom Builder - Gesture
Zoom Class - Grid
- Grid
Builder - Grid
Class - Header
Bar - Header
BarBuilder - Header
BarClass - IMContext
- IMContext
Class - IMContext
Simple - IMContext
Simple Builder - IMContext
Simple Class - IMMulticontext
- IMMulticontext
Builder - IMMulticontext
Class - Icon
Info - Icon
Info Class - Icon
Lookup Flags - Icon
Theme - Icon
Theme Class - Icon
View - Icon
View Class - Image
- Image
Builder - Image
Class - InfoBar
- Info
BarBuilder - Info
BarClass - Inhibit
- Whether to propagate the signal to the default handler.
- Input
Hints - Invisible
- Invisible
Builder - Invisible
Class - Junction
Sides - LEVEL_
BAR_ OFFSET_ FULL - LEVEL_
BAR_ OFFSET_ HIGH - LEVEL_
BAR_ OFFSET_ LOW - Label
- Label
Builder - Label
Class - Layout
- Layout
Builder - Layout
Class - Level
Bar - Level
BarBuilder - Level
BarClass - Link
Button - Link
Button Builder - Link
Button Class - ListBox
- List
BoxBuilder - List
BoxClass - List
BoxRow - List
BoxRow Builder - List
BoxRow Class - List
Store - List
Store Class - Lock
Button - Lock
Button Builder - Lock
Button Class - Menu
- MenuBar
- Menu
BarBuilder - Menu
BarClass - Menu
Builder - Menu
Button - Menu
Button Builder - Menu
Button Class - Menu
Class - Menu
Item - Menu
Item Builder - Menu
Item Class - Menu
Shell - Menu
Shell Class - Menu
Tool Button - Menu
Tool Button Builder - Menu
Tool Button Class - Message
Dialog - Message
Dialog Builder - Message
Dialog Class - Misc
- Misc
Class - Model
Button - Model
Button Builder - Model
Button Class - Mount
Operation - Mount
Operation Builder - Mount
Operation Class - Native
Dialog - Native
Dialog Class - Notebook
- Notebook
Builder - Notebook
Class - Object
- The base class in the object hierarchy.
- Offscreen
Window - Offscreen
Window Builder - Offscreen
Window Class - Orientable
- Overlay
- Overlay
Builder - Overlay
Class - 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 - PadAction
Entry - PadController
- PadController
Builder - PadController
Class - Page
Range - Page
Setup - Page
Setup Class - Paned
- Paned
Builder - Paned
Class - Paper
Size - Places
Open Flags - Places
Sidebar - Places
Sidebar Builder - Places
Sidebar Class - Plug
- Plug
Builder - Plug
Class - Popover
- Popover
Builder - Popover
Class - Popover
Menu - Popover
Menu Builder - Popover
Menu Class - Print
Context - Print
Context Class - Print
Operation - Print
Operation Builder - Print
Operation Class - Print
Operation Preview - Print
Settings - Print
Settings Class - Progress
Bar - Progress
BarBuilder - Progress
BarClass - Radio
Button - Radio
Button Builder - Radio
Button Class - Radio
Menu Item - Radio
Menu Item Builder - Radio
Menu Item Class - Radio
Tool Button - Radio
Tool Button Builder - Radio
Tool Button Class - Range
- Range
Class - Recent
Chooser - Recent
Chooser Dialog - Recent
Chooser Dialog Builder - Recent
Chooser Dialog Class - Recent
Chooser Menu - Recent
Chooser Menu Builder - Recent
Chooser Menu Class - Recent
Chooser Widget - Recent
Chooser Widget Builder - Recent
Chooser Widget Class - Recent
Data - Recent
Filter - Recent
Filter Class - Recent
Filter Flags - Recent
Info - Recent
Manager - Recent
Manager Builder - Recent
Manager Class - Rectangle
- Region
Flags - Requisition
- Revealer
- Revealer
Builder - Revealer
Class - 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 - STYLE_
REGION_ COLUMN - STYLE_
REGION_ COLUMN_ HEADER - STYLE_
REGION_ ROW - STYLE_
REGION_ TAB - Scale
- Scale
Builder - Scale
Button - Scale
Button Builder - Scale
Button Class - Scale
Class - Scrollable
- Scrollbar
- Scrollbar
Builder - Scrollbar
Class - Scrolled
Window - Scrolled
Window Builder - Scrolled
Window Class - Search
Bar - Search
BarBuilder - Search
BarClass - Search
Entry - Search
Entry Builder - Search
Entry Class - Selection
Data - Separator
- Separator
Builder - Separator
Class - Separator
Menu Item - Separator
Menu Item Builder - Separator
Menu Item Class - Separator
Tool Item - Separator
Tool Item Builder - Separator
Tool Item Class - Settings
- Settings
Class - Shortcuts
Window - Shortcuts
Window Class - Size
Group - Size
Group Builder - Size
Group Class - Socket
- Socket
Builder - Socket
Class - Spin
Button - Spin
Button Builder - Spin
Button Class - Spinner
- Spinner
Builder - Spinner
Class - Stack
- Stack
Builder - Stack
Class - Stack
Sidebar - Stack
Sidebar Builder - Stack
Sidebar Class - Stack
Switcher - Stack
Switcher Builder - Stack
Switcher Class - State
Flags - Statusbar
- Statusbar
Builder - Statusbar
Class - Style
Context - Style
Context Builder - Style
Context Class - Style
Context Print Flags - Style
Properties - Style
Properties Class - Style
Provider - Switch
- Switch
Builder - Switch
Class - Target
Entry - Target
Flags - Target
List - Text
Attributes - Text
Buffer - Text
Buffer Builder - Text
Buffer Class - Text
Child Anchor - Text
Child Anchor Class - Text
Iter - Text
Mark - Text
Mark Builder - Text
Mark Class - Text
Search Flags - TextTag
- Text
TagBuilder - Text
TagClass - Text
TagTable - Text
TagTable Class - Text
View - Text
View Builder - Text
View Class - Tick
Callback Id - Toggle
Button - Toggle
Button Builder - Toggle
Button Class - Toggle
Tool Button - Toggle
Tool Button Builder - Toggle
Tool Button Class - Tool
Button - Tool
Button Builder - Tool
Button Class - Tool
Item - Tool
Item Builder - Tool
Item Class - Tool
Item Group - Tool
Item Group Builder - Tool
Item Group Class - Tool
Palette - Tool
Palette Builder - Tool
Palette Class - Tool
Palette Drag Targets - Tool
Shell - Toolbar
- Toolbar
Builder - Toolbar
Class - Tooltip
- Tooltip
Class - Tree
Drag Dest - Tree
Drag Source - Tree
Iter - Tree
Model - Tree
Model Filter - Tree
Model Filter Class - Tree
Model Flags - Tree
Model Sort - Tree
Model Sort Class - Tree
Path - Tree
RowReference - Tree
Selection - Tree
Selection Class - Tree
Sortable - Tree
Store - Tree
Store Class - Tree
View - Tree
View Builder - Tree
View Class - Tree
View Column - Tree
View Column Builder - Tree
View Column Class - Typed
Value - A statically typed
Value
. - Value
- A generic value capable of carrying various types.
- Viewport
- Viewport
Builder - Viewport
Class - Volume
Button - Volume
Button Builder - Volume
Button Class - Widget
- Widget
Class - Widget
Path - Window
- Window
Builder - Window
Class - Window
Group - Window
Group Class
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 - IMPreedit
Style Deprecated - IMStatus
Style Deprecated - 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 - Size
Group Mode - Size
Request Mode - Sort
Column - Sort
Type - Spin
Button Update Policy - Spin
Type - Stack
Transition Type - State
Type Deprecated - 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 - Type
- A GLib or GLib-based library type
- Unit
- Widget
Help Type - Window
Position - Window
Type - Wrap
Mode
Constants§
- NONE_
ABOUT_ DIALOG - NONE_
ACCEL_ GROUP - NONE_
ACCEL_ LABEL - NONE_
ACTIONABLE - NONE_
ACTION_ BAR - NONE_
ADJUSTMENT - NONE_
APPLICATION - NONE_
APPLICATION_ WINDOW - NONE_
APP_ CHOOSER_ BUTTON - NONE_
APP_ CHOOSER_ DIALOG - NONE_
APP_ CHOOSER_ WIDGET - NONE_
ASPECT_ FRAME - NONE_
ASSISTANT - NONE_
BIN - NONE_
BOX - NONE_
BUILDABLE - NONE_
BUILDER - NONE_
BUTTON - NONE_
BUTTON_ BOX - NONE_
CALENDAR - NONE_
CELL_ AREA - NONE_
CELL_ AREA_ BOX - NONE_
CELL_ AREA_ CONTEXT - NONE_
CELL_ EDITABLE - NONE_
CELL_ LAYOUT - NONE_
CELL_ RENDERER - NONE_
CELL_ RENDERER_ ACCEL - NONE_
CELL_ RENDERER_ COMBO - NONE_
CELL_ RENDERER_ PIXBUF - NONE_
CELL_ RENDERER_ PROGRESS - NONE_
CELL_ RENDERER_ SPIN - NONE_
CELL_ RENDERER_ SPINNER - NONE_
CELL_ RENDERER_ TEXT - NONE_
CELL_ RENDERER_ TOGGLE - NONE_
CELL_ VIEW - NONE_
CHECK_ BUTTON - NONE_
CHECK_ MENU_ ITEM - NONE_
COLOR_ BUTTON - NONE_
COLOR_ CHOOSER - NONE_
COLOR_ CHOOSER_ DIALOG - NONE_
COLOR_ CHOOSER_ WIDGET - NONE_
COMBO_ BOX - NONE_
COMBO_ BOX_ TEXT - NONE_
CONTAINER - NONE_
CSS_ PROVIDER - NONE_
DIALOG - NONE_
DRAWING_ AREA - NONE_
EDITABLE - NONE_
ENTRY - NONE_
ENTRY_ COMPLETION - NONE_
EVENT_ BOX - NONE_
EVENT_ CONTROLLER - NONE_
EXPANDER - NONE_
FILE_ CHOOSER - NONE_
FILE_ CHOOSER_ BUTTON - NONE_
FILE_ CHOOSER_ DIALOG - NONE_
FILE_ CHOOSER_ NATIVE - NONE_
FILE_ CHOOSER_ WIDGET - NONE_
FIXED - NONE_
FLOW_ BOX - NONE_
FLOW_ BOX_ CHILD - NONE_
FONT_ BUTTON - NONE_
FONT_ CHOOSER - NONE_
FONT_ CHOOSER_ DIALOG - NONE_
FONT_ CHOOSER_ WIDGET - NONE_
FRAME - NONE_
GESTURE - NONE_
GESTURE_ DRAG - NONE_
GESTURE_ SINGLE - NONE_
GL_ AREA - NONE_
GRID - NONE_
HEADER_ BAR - NONE_
ICON_ THEME - NONE_
ICON_ VIEW - NONE_
IMAGE - NONE_
IM_ CONTEXT - NONE_
IM_ CONTEXT_ SIMPLE - NONE_
IM_ MULTICONTEXT - NONE_
INFO_ BAR - NONE_
INVISIBLE - NONE_
LABEL - NONE_
LAYOUT - NONE_
LEVEL_ BAR - NONE_
LINK_ BUTTON - NONE_
LIST_ BOX - NONE_
LIST_ BOX_ ROW - NONE_
LIST_ STORE - NONE_
LOCK_ BUTTON - NONE_
MENU - NONE_
MENU_ BAR - NONE_
MENU_ BUTTON - NONE_
MENU_ ITEM - NONE_
MENU_ SHELL - NONE_
MENU_ TOOL_ BUTTON - NONE_
MESSAGE_ DIALOG - NONE_
MISC - NONE_
MOUNT_ OPERATION - NONE_
NATIVE_ DIALOG - NONE_
NOTEBOOK - NONE_
OFFSCREEN_ WINDOW - NONE_
ORIENTABLE - NONE_
OVERLAY - NONE_
PANED - NONE_
PLUG - NONE_
POPOVER - NONE_
POPOVER_ MENU - NONE_
PRINT_ OPERATION - NONE_
PRINT_ OPERATION_ PREVIEW - NONE_
PROGRESS_ BAR - NONE_
RADIO_ BUTTON - NONE_
RADIO_ MENU_ ITEM - NONE_
RADIO_ TOOL_ BUTTON - NONE_
RANGE - NONE_
RECENT_ CHOOSER - NONE_
RECENT_ CHOOSER_ DIALOG - NONE_
RECENT_ CHOOSER_ MENU - NONE_
RECENT_ CHOOSER_ WIDGET - NONE_
RECENT_ MANAGER - NONE_
REVEALER - NONE_
SCALE - NONE_
SCALE_ BUTTON - NONE_
SCROLLABLE - NONE_
SCROLLBAR - NONE_
SCROLLED_ WINDOW - NONE_
SEARCH_ BAR - NONE_
SEARCH_ ENTRY - NONE_
SEPARATOR - NONE_
SEPARATOR_ MENU_ ITEM - NONE_
SEPARATOR_ TOOL_ ITEM - NONE_
SETTINGS - NONE_
SHORTCUTS_ WINDOW - NONE_
SIZE_ GROUP - NONE_
SOCKET - NONE_
SPINNER - NONE_
SPIN_ BUTTON - NONE_
STACK - NONE_
STACK_ SIDEBAR - NONE_
STACK_ SWITCHER - NONE_
STATUSBAR - NONE_
STYLE_ CONTEXT - NONE_
STYLE_ PROPERTIES - NONE_
STYLE_ PROVIDER - NONE_
SWITCH - NONE_
TEXT_ BUFFER - NONE_
TEXT_ CHILD_ ANCHOR - NONE_
TEXT_ MARK - NONE_
TEXT_ TAG - NONE_
TEXT_ TAG_ TABLE - NONE_
TEXT_ VIEW - NONE_
TOGGLE_ BUTTON - NONE_
TOGGLE_ TOOL_ BUTTON - NONE_
TOOLBAR - NONE_
TOOL_ BUTTON - NONE_
TOOL_ ITEM - NONE_
TOOL_ ITEM_ GROUP - NONE_
TOOL_ PALETTE - NONE_
TOOL_ SHELL - NONE_
TREE_ DRAG_ DEST - NONE_
TREE_ DRAG_ SOURCE - NONE_
TREE_ MODEL - NONE_
TREE_ MODEL_ FILTER - NONE_
TREE_ MODEL_ SORT - NONE_
TREE_ SELECTION - NONE_
TREE_ SORTABLE - NONE_
TREE_ STORE - NONE_
TREE_ VIEW - NONE_
TREE_ VIEW_ COLUMN - NONE_
VIEWPORT - NONE_
VOLUME_ BUTTON - NONE_
WIDGET - NONE_
WINDOW - NONE_
WINDOW_ GROUP - STYLE_
PROVIDER_ PRIORITY_ APPLICATION - STYLE_
PROVIDER_ PRIORITY_ FALLBACK - STYLE_
PROVIDER_ PRIORITY_ SETTINGS - STYLE_
PROVIDER_ PRIORITY_ THEME - STYLE_
PROVIDER_ PRIORITY_ USER
Traits§
- About
Dialog Ext - Accel
Group Ext - Accel
Label Ext - Action
BarExt - Actionable
Ext - Adjustment
Ext - AppChooser
Button Ext - AppChooser
Dialog Ext - AppChooser
Widget Ext - Application
Window Ext - Aspect
Frame Ext - Assistant
Ext - BinExt
- BoxExt
- Buildable
Ext - Builder
Ext - Button
BoxExt - Button
Ext - Calendar
Ext - Cast
- Upcasting and downcasting support.
- Cell
Area BoxExt - Cell
Area Context Ext - Cell
Area Ext - Cell
Editable Ext - Cell
Layout Ext - Cell
Renderer Accel Ext - Cell
Renderer Combo Ext - Cell
Renderer Ext - Cell
Renderer Pixbuf Ext - Cell
Renderer Progress Ext - Cell
Renderer Spin Ext - Cell
Renderer Spinner Ext - Cell
Renderer Text Ext - Cell
Renderer Toggle Ext - Cell
View Ext - Check
Menu Item Ext - Color
Button Ext - Color
Chooser Dialog Ext - Color
Chooser Ext - Color
Chooser Widget Ext - Combo
BoxExt - Combo
BoxText Ext - Container
Ext - CssProvider
Ext - Dialog
Ext - Editable
Ext - Editable
Signals - Entry
Completion Ext - Entry
Ext - Event
BoxExt - Event
Controller Ext - Expander
Ext - File
Chooser Button Ext - File
Chooser Ext - File
Chooser Native Ext - File
Chooser Widget Ext - Fixed
Ext - Flow
BoxChild Ext - Flow
BoxExt - Font
Button Ext - Font
Chooser Ext - Font
Chooser Widget Ext - Frame
Ext - GLArea
Ext - Gesture
Drag Ext - Gesture
Ext - Gesture
Single Ext - GridExt
- GtkApplication
Ext - GtkList
Store Ext - GtkMenu
Ext - GtkMenu
Item Ext - GtkSocket
Ext - GtkWindow
Ext - Header
BarExt - IMContext
Ext - IMMulticontext
Ext - Icon
Theme Ext - Icon
View Ext - Image
Ext - Info
BarExt - Invisible
Ext - IsA
- Declares the “is a” relationship.
- Label
Ext - Layout
Ext - Level
BarExt - Link
Button Ext - List
BoxExt - List
BoxRow Ext - Lock
Button Ext - Menu
BarExt - Menu
Button Ext - Menu
Shell Ext - Menu
Tool Button Ext - Message
Dialog Ext - Mount
Operation Ext - Native
Dialog Ext - Notebook
Ext - Offscreen
Window Ext - Orientable
Ext - Overlay
Ext - Overlay
Signals - Paned
Ext - PlugExt
- Popover
Ext - Popover
Menu Ext - Print
Operation Ext - Print
Operation Preview Ext - Progress
BarExt - Radio
Button Ext - Radio
Menu Item Ext - Radio
Tool Button Ext - Range
Ext - Recent
Chooser Ext - Recent
Chooser Menu Ext - Recent
Manager Ext - Revealer
Ext - Scale
Button Ext - Scale
Ext - Scrollable
Ext - Scrolled
Window Ext - Search
BarExt - Search
Entry Ext - Separator
Tool Item Ext - Settings
Ext - Shortcuts
Window Ext - Size
Group Ext - Spin
Button Ext - Spin
Button Signals - Spinner
Ext - Stack
Ext - Stack
Sidebar Ext - Stack
Switcher Ext - Static
Type - Types that are supported by GLib dynamic typing.
- Statusbar
Ext - Style
Context Ext - Style
Properties Ext - Style
Provider Ext - Switch
Ext - Text
Buffer Ext - Text
Child Anchor Ext - Text
Mark Ext - Text
TagExt - Text
TagTable Ext - Text
View Ext - ToValue
- Converts to
Value
. - Toggle
Button Ext - Toggle
Tool Button Ext - Tool
Button Ext - Tool
Item Ext - Tool
Item Group Ext - Tool
Palette Ext - Tool
Shell Ext - Toolbar
Ext - Tree
Drag Dest Ext - Tree
Drag Source Ext - Tree
Model Ext - Tree
Model Filter Ext - Tree
Model Sort Ext - Tree
Selection Ext - Tree
Sortable Ext - Tree
Store Ext - Tree
View Column Ext - Tree
View Ext - Viewport
Ext - Volume
Button Ext - Widget
Ext - Window
Group Ext
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_
set_ default_ mod_ mask - accelerator_
valid - bindings_
activate - bindings_
activate_ event - cairo_
should_ draw_ window - cairo_
transform_ to_ window - check_
version - device_
grab_ add - device_
grab_ remove - disable_
setlocale - events_
pending - false_
- get_
binary_ age - get_
current_ event - get_
current_ event_ device - get_
current_ event_ state - get_
current_ event_ time - get_
debug_ flags - get_
default_ language - get_
event_ widget - get_
interface_ age - get_
locale_ direction - get_
major_ version - get_
micro_ version - get_
minor_ version - grab_
get_ current - idle_
add - Adds a closure to be called by the default main loop when it’s idle.
- init
- Tries to initialize GTK+.
- is_
initialized - Returns
true
if GTK has been initialized. - is_
initialized_ main_ thread - Returns
true
if GTK has been initialized and this is the main thread. - main
- main_
do_ event - main_
iteration - main_
iteration_ do - main_
level - main_
quit - 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 - show_
uri_ on_ window - targets_
include_ image - targets_
include_ rich_ text - targets_
include_ text - targets_
include_ uri - test_
create_ simple_ window Deprecated - test_
find_ label - test_
find_ sibling - test_
find_ widget - test_
register_ all_ types - test_
slider_ get_ value Deprecated - test_
slider_ set_ perc Deprecated - test_
spin_ button_ click Deprecated - test_
text_ get Deprecated - test_
text_ set Deprecated - test_
widget_ click Deprecated - test_
widget_ send_ key - test_
widget_ wait_ for_ draw - timeout_
add - Adds a closure to be called by the default main loop at regular intervals with millisecond granularity.
- timeout_
add_ seconds - Adds a closure to be called by the default main loop at regular intervals with second granularity.
- tree_
get_ row_ drag_ data - tree_
set_ row_ drag_ data - true_