Crate gtk4[][src]

Expand description

Rust GTK 4 bindings

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

“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 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 window = ApplicationWindow::builder()
            .application(app)
            .default_width(320)
            .default_height(200)
            .title("Hello, World!")
            .build();

        // Show the window.
        window.show();
    });

    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.set_child(Some(&button));

        window.show();
    });

    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 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 are not yet.

  • A panic in a closure that handles signals or in any other closure passed to a gtk function 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.

Re-exports

pub use ffi;
pub use cairo;
pub use gdk;
pub use gdk_pixbuf;
pub use gio;
pub use glib;
pub use graphene;
pub use gsk;
pub use pango;

Modules

functions
prelude

Traits intended for blanket imports.

subclass

Structs

ATContext
AboutDialog
AboutDialogBuilder

A builder-pattern type to construct AboutDialog objects.

Accessible
ActionBar
ActionBarBuilder

A builder-pattern type to construct ActionBar objects.

Actionable
ActivateAction
Adjustment
AdjustmentBuilder

A builder-pattern type to construct Adjustment objects.

AlternativeTrigger
AlternativeTriggerBuilder

A builder-pattern type to construct AlternativeTrigger objects.

AnyFilter
AppChooser
AppChooserButton
AppChooserButtonBuilder

A builder-pattern type to construct AppChooserButton objects.

AppChooserDialog
AppChooserDialogBuilder

A builder-pattern type to construct AppChooserDialog objects.

AppChooserWidget
AppChooserWidgetBuilder

A builder-pattern type to construct AppChooserWidget objects.

Application
ApplicationBuilder

A builder-pattern type to construct Application objects.

ApplicationInhibitFlags
ApplicationWindow
ApplicationWindowBuilder

A builder-pattern type to construct ApplicationWindow objects.

AspectFrame
AspectFrameBuilder

A builder-pattern type to construct AspectFrame objects.

Assistant
AssistantBuilder

A builder-pattern type to construct Assistant objects.

AssistantPage
BinLayout
Bitset
BitsetIter
BookmarkList
BookmarkListBuilder
BoolFilter
BoolFilterBuilder

A builder-pattern type to construct BoolFilter objects.

Border
BorderBuilder
Box
BoxBuilder

A builder-pattern type to construct Box objects.

BoxLayout
BoxLayoutBuilder

A builder-pattern type to construct BoxLayout objects.

Buildable
Builder
BuilderClosureFlags
BuilderListItemFactory
BuilderScope
Button
ButtonBuilder

A builder-pattern type to construct Button objects.

Calendar
CalendarBuilder

A builder-pattern type to construct Calendar objects.

CallbackAction
CellArea
CellAreaBox
CellAreaBoxBuilder

A builder-pattern type to construct CellAreaBox objects.

CellAreaContext
CellEditable
CellLayout
CellRenderer
CellRendererAccel
CellRendererAccelBuilder

A builder-pattern type to construct CellRendererAccel objects.

CellRendererCombo
CellRendererComboBuilder

A builder-pattern type to construct CellRendererCombo objects.

CellRendererPixbuf
CellRendererPixbufBuilder

A builder-pattern type to construct CellRendererPixbuf objects.

CellRendererProgress
CellRendererProgressBuilder

A builder-pattern type to construct CellRendererProgress objects.

CellRendererSpin
CellRendererSpinBuilder

A builder-pattern type to construct CellRendererSpin objects.

CellRendererSpinner
CellRendererSpinnerBuilder

A builder-pattern type to construct CellRendererSpinner objects.

CellRendererState
CellRendererText
CellRendererTextBuilder

A builder-pattern type to construct CellRendererText objects.

CellRendererToggle
CellRendererToggleBuilder

A builder-pattern type to construct CellRendererToggle objects.

CellView
CellViewBuilder

A builder-pattern type to construct CellView objects.

CenterBox
CenterBoxBuilder

A builder-pattern type to construct CenterBox objects.

CenterLayout
CheckButton
CheckButtonBuilder

A builder-pattern type to construct CheckButton objects.

ClosureExpression
ColorButton
ColorButtonBuilder

A builder-pattern type to construct ColorButton objects.

ColorChooser
ColorChooserDialog
ColorChooserDialogBuilder

A builder-pattern type to construct ColorChooserDialog objects.

ColorChooserWidget
ColorChooserWidgetBuilder

A builder-pattern type to construct ColorChooserWidget objects.

ColumnView
ColumnViewBuilder

A builder-pattern type to construct ColumnView objects.

ColumnViewColumn
ColumnViewColumnBuilder

A builder-pattern type to construct ColumnViewColumn objects.

ComboBox
ComboBoxBuilder

A builder-pattern type to construct ComboBox objects.

ComboBoxText
ComboBoxTextBuilder

A builder-pattern type to construct ComboBoxText objects.

ConstantExpression
Constraint
ConstraintBuilder

A builder-pattern type to construct Constraint objects.

ConstraintGuide
ConstraintGuideBuilder

A builder-pattern type to construct ConstraintGuide objects.

ConstraintLayout
ConstraintLayoutChild
ConstraintLayoutChildBuilder

A builder-pattern type to construct ConstraintLayoutChild objects.

ConstraintTarget
CssLocation
CssProvider
CssSection
CustomFilter
CustomSorter
DebugFlags
Dialog
DialogBuilder

A builder-pattern type to construct Dialog objects.

DialogFlags
DirectoryList
DirectoryListBuilder
DragIcon
DragIconBuilder

A builder-pattern type to construct DragIcon objects.

DragSource
DragSourceBuilder

A builder-pattern type to construct DragSource objects.

DrawingArea
DrawingAreaBuilder

A builder-pattern type to construct DrawingArea objects.

DropControllerMotion
DropControllerMotionBuilder

A builder-pattern type to construct DropControllerMotion objects.

DropDown
DropDownBuilder

A builder-pattern type to construct DropDown objects.

DropTarget
DropTargetAsync
DropTargetAsyncBuilder

A builder-pattern type to construct DropTargetAsync objects.

DropTargetBuilder

A builder-pattern type to construct DropTarget objects.

Editable
EditableLabel
EditableLabelBuilder

A builder-pattern type to construct EditableLabel objects.

EmojiChooser
EmojiChooserBuilder

A builder-pattern type to construct EmojiChooser objects.

Entry
EntryBuffer
EntryBufferBuilder

A builder-pattern type to construct EntryBuffer objects.

EntryBuilder

A builder-pattern type to construct Entry objects.

EntryCompletion
EntryCompletionBuilder

A builder-pattern type to construct EntryCompletion objects.

EventController
EventControllerFocus
EventControllerFocusBuilder

A builder-pattern type to construct EventControllerFocus objects.

EventControllerKey
EventControllerKeyBuilder

A builder-pattern type to construct EventControllerKey objects.

EventControllerLegacy
EventControllerLegacyBuilder

A builder-pattern type to construct EventControllerLegacy objects.

EventControllerMotion
EventControllerMotionBuilder

A builder-pattern type to construct EventControllerMotion objects.

EventControllerScroll
EventControllerScrollBuilder

A builder-pattern type to construct EventControllerScroll objects.

EventControllerScrollFlags
EveryFilter
Expander
ExpanderBuilder

A builder-pattern type to construct Expander objects.

Expression
ExpressionWatch
FileChooser
FileChooserDialog
FileChooserDialogBuilder

A builder-pattern type to construct FileChooserDialog objects.

FileChooserNative
FileChooserNativeBuilder

A builder-pattern type to construct FileChooserNative objects.

FileChooserWidget
FileChooserWidgetBuilder

A builder-pattern type to construct FileChooserWidget objects.

FileFilter
Filter
FilterListModel
FilterListModelBuilder

A builder-pattern type to construct FilterListModel objects.

Fixed
FixedBuilder

A builder-pattern type to construct Fixed objects.

FixedLayout
FixedLayoutChild
FixedLayoutChildBuilder

A builder-pattern type to construct FixedLayoutChild objects.

FlattenListModel
FlowBox
FlowBoxBuilder

A builder-pattern type to construct FlowBox objects.

FlowBoxChild
FlowBoxChildBuilder

A builder-pattern type to construct FlowBoxChild objects.

FontButton
FontButtonBuilder

A builder-pattern type to construct FontButton objects.

FontChooser
FontChooserDialog
FontChooserDialogBuilder

A builder-pattern type to construct FontChooserDialog objects.

FontChooserLevel
FontChooserWidget
FontChooserWidgetBuilder

A builder-pattern type to construct FontChooserWidget objects.

Frame
FrameBuilder

A builder-pattern type to construct Frame objects.

GLArea
GLAreaBuilder

A builder-pattern type to construct GLArea objects.

Gesture
GestureClick
GestureClickBuilder

A builder-pattern type to construct GestureClick objects.

GestureDrag
GestureDragBuilder

A builder-pattern type to construct GestureDrag objects.

GestureLongPress
GestureLongPressBuilder

A builder-pattern type to construct GestureLongPress objects.

GesturePan
GesturePanBuilder

A builder-pattern type to construct GesturePan objects.

GestureRotate
GestureRotateBuilder

A builder-pattern type to construct GestureRotate objects.

GestureSingle
GestureSingleBuilder

A builder-pattern type to construct GestureSingle objects.

GestureStylus
GestureStylusBuilder

A builder-pattern type to construct GestureStylus objects.

GestureSwipe
GestureSwipeBuilder

A builder-pattern type to construct GestureSwipe objects.

GestureZoom
GestureZoomBuilder

A builder-pattern type to construct GestureZoom objects.

Grid
GridBuilder

A builder-pattern type to construct Grid objects.

GridLayout
GridLayoutBuilder

A builder-pattern type to construct GridLayout objects.

GridLayoutChild
GridLayoutChildBuilder

A builder-pattern type to construct GridLayoutChild objects.

GridView
GridViewBuilder

A builder-pattern type to construct GridView objects.

HeaderBar
HeaderBarBuilder

A builder-pattern type to construct HeaderBar objects.

IMContext
IMContextSimple
IMContextSimpleBuilder

A builder-pattern type to construct IMContextSimple objects.

IMMulticontext
IMMulticontextBuilder

A builder-pattern type to construct IMMulticontext objects.

IconLookupFlags
IconPaintable
IconPaintableBuilder

A builder-pattern type to construct IconPaintable objects.

IconTheme
IconThemeBuilder

A builder-pattern type to construct IconTheme objects.

IconView
IconViewBuilder

A builder-pattern type to construct IconView objects.

Image
ImageBuilder

A builder-pattern type to construct Image objects.

InfoBar
InfoBarBuilder

A builder-pattern type to construct InfoBar objects.

Inhibit

Whether to propagate the signal to the default handler.

InputHints
KeyvalTrigger
Label
LabelBuilder

A builder-pattern type to construct Label objects.

LayoutChild
LayoutManager
LevelBar
LevelBarBuilder

A builder-pattern type to construct LevelBar objects.

LinkButton
LinkButtonBuilder

A builder-pattern type to construct LinkButton objects.

ListBase
ListBox
ListBoxBuilder

A builder-pattern type to construct ListBox objects.

ListBoxRow
ListBoxRowBuilder

A builder-pattern type to construct ListBoxRow objects.

ListItem
ListItemFactory
ListStore
ListView
ListViewBuilder

A builder-pattern type to construct ListView objects.

LockButton
LockButtonBuilder

A builder-pattern type to construct LockButton objects.

MapListModel
MediaControls
MediaControlsBuilder

A builder-pattern type to construct MediaControls objects.

MediaFile
MediaStream
MenuButton
MenuButtonBuilder

A builder-pattern type to construct MenuButton objects.

MessageDialog
MessageDialogBuilder

A builder-pattern type to construct MessageDialog objects.

MnemonicAction
MnemonicTrigger
MountOperation
MountOperationBuilder

A builder-pattern type to construct MountOperation objects.

MultiFilter
MultiSelection
MultiSorter
NamedAction
Native
NativeDialog
NeverTrigger
NoSelection
Notebook
NotebookBuilder

A builder-pattern type to construct Notebook objects.

NotebookPage
NothingAction
NumericSorter
NumericSorterBuilder

A builder-pattern type to construct NumericSorter objects.

ObjectExpression
Orientable
Overlay
OverlayBuilder

A builder-pattern type to construct Overlay objects.

OverlayLayout
OverlayLayoutChild
OverlayLayoutChildBuilder

A builder-pattern type to construct OverlayLayoutChild objects.

PadActionEntry
PadController
PadControllerBuilder

A builder-pattern type to construct PadController objects.

PageRange
PageSetup
PageSetupUnixDialog
PageSetupUnixDialogBuilder

A builder-pattern type to construct PageSetupUnixDialog objects.

Paned
PanedBuilder

A builder-pattern type to construct Paned objects.

PaperSize
ParamSpecExpression
PasswordEntry
PasswordEntryBuilder

A builder-pattern type to construct PasswordEntry objects.

PickFlags
Picture
PictureBuilder

A builder-pattern type to construct Picture objects.

Popover
PopoverBuilder

A builder-pattern type to construct Popover objects.

PopoverMenu
PopoverMenuBar
PopoverMenuBarBuilder

A builder-pattern type to construct PopoverMenuBar objects.

PopoverMenuBuilder

A builder-pattern type to construct PopoverMenu objects.

PopoverMenuFlags
PrintCapabilities
PrintContext
PrintJob
PrintJobBuilder

A builder-pattern type to construct PrintJob objects.

PrintOperation
PrintOperationBuilder

A builder-pattern type to construct PrintOperation objects.

PrintOperationPreview
PrintSettings
PrintUnixDialog
PrintUnixDialogBuilder

A builder-pattern type to construct PrintUnixDialog objects.

Printer
PrinterBuilder

A builder-pattern type to construct Printer objects.

ProgressBar
ProgressBarBuilder

A builder-pattern type to construct ProgressBar objects.

PropertyExpression
Range
RecentData
RecentInfo
RecentManager
Requisition
Revealer
RevealerBuilder

A builder-pattern type to construct Revealer objects.

Root
Scale
ScaleBuilder

A builder-pattern type to construct Scale objects.

ScaleButton
ScaleButtonBuilder

A builder-pattern type to construct ScaleButton objects.

Scrollable
Scrollbar
ScrollbarBuilder

A builder-pattern type to construct Scrollbar objects.

ScrolledWindow
ScrolledWindowBuilder

A builder-pattern type to construct ScrolledWindow objects.

SearchBar
SearchBarBuilder

A builder-pattern type to construct SearchBar objects.

SearchEntry
SearchEntryBuilder

A builder-pattern type to construct SearchEntry objects.

SelectionFilterModel
SelectionModel
Separator
SeparatorBuilder

A builder-pattern type to construct Separator objects.

Settings
SettingsBuilder

A builder-pattern type to construct Settings objects.

Shortcut
ShortcutAction
ShortcutActionFlags
ShortcutBuilder

A builder-pattern type to construct Shortcut objects.

ShortcutController
ShortcutControllerBuilder

A builder-pattern type to construct ShortcutController objects.

ShortcutLabel
ShortcutLabelBuilder

A builder-pattern type to construct ShortcutLabel objects.

ShortcutManager
ShortcutTrigger
ShortcutsGroup
ShortcutsGroupBuilder

A builder-pattern type to construct ShortcutsGroup objects.

ShortcutsSection
ShortcutsSectionBuilder

A builder-pattern type to construct ShortcutsSection objects.

ShortcutsShortcut
ShortcutsShortcutBuilder

A builder-pattern type to construct ShortcutsShortcut objects.

ShortcutsWindow
ShortcutsWindowBuilder

A builder-pattern type to construct ShortcutsWindow objects.

SignalAction
SignalListItemFactory
SingleSelection
SingleSelectionBuilder

A builder-pattern type to construct SingleSelection objects.

SizeGroup
SliceListModel
SliceListModelBuilder

A builder-pattern type to construct SliceListModel objects.

Snapshot
SortListModel
SortListModelBuilder

A builder-pattern type to construct SortListModel objects.

Sorter
SpinButton
SpinButtonBuilder

A builder-pattern type to construct SpinButton objects.

Spinner
SpinnerBuilder

A builder-pattern type to construct Spinner objects.

Stack
StackBuilder

A builder-pattern type to construct Stack objects.

StackPage
StackSidebar
StackSidebarBuilder

A builder-pattern type to construct StackSidebar objects.

StackSwitcher
StackSwitcherBuilder

A builder-pattern type to construct StackSwitcher objects.

StateFlags
Statusbar
StatusbarBuilder

A builder-pattern type to construct Statusbar objects.

StringFilter
StringFilterBuilder

A builder-pattern type to construct StringFilter objects.

StringList
StringObject
StringSorter
StringSorterBuilder

A builder-pattern type to construct StringSorter objects.

StyleContext
StyleContextPrintFlags
StyleProvider
Switch
SwitchBuilder

A builder-pattern type to construct Switch objects.

Text
TextBuffer
TextBufferBuilder

A builder-pattern type to construct TextBuffer objects.

TextBuilder

A builder-pattern type to construct Text objects.

TextChildAnchor
TextIter
TextMark
TextMarkBuilder

A builder-pattern type to construct TextMark objects.

TextSearchFlags
TextTag
TextTagBuilder

A builder-pattern type to construct TextTag objects.

TextTagTable
TextView
TextViewBuilder

A builder-pattern type to construct TextView objects.

TickCallbackId
ToggleButton
ToggleButtonBuilder

A builder-pattern type to construct ToggleButton objects.

Tooltip
TreeDragDest
TreeDragSource
TreeExpander
TreeExpanderBuilder

A builder-pattern type to construct TreeExpander objects.

TreeIter
TreeListModel
TreeListModelBuilder

A builder-pattern type to construct TreeListModel objects.

TreeListRow
TreeListRowSorter
TreeModel
TreeModelFilter
TreeModelFlags
TreeModelSort
TreePath
TreeRowReference
TreeSelection
TreeSortable
TreeStore
TreeView
TreeViewBuilder

A builder-pattern type to construct TreeView objects.

TreeViewColumn
TreeViewColumnBuilder

A builder-pattern type to construct TreeViewColumn objects.

Video
VideoBuilder

A builder-pattern type to construct Video objects.

Viewport
ViewportBuilder

A builder-pattern type to construct Viewport objects.

VolumeButton
VolumeButtonBuilder

A builder-pattern type to construct VolumeButton objects.

Widget
WidgetPaintable
Window
WindowBuilder

A builder-pattern type to construct Window objects.

WindowControls
WindowControlsBuilder

A builder-pattern type to construct WindowControls objects.

WindowGroup
WindowHandle
WindowHandleBuilder

A builder-pattern type to construct WindowHandle objects.

Enums

AccessibleAutocomplete
AccessibleInvalidState
AccessibleProperty
AccessibleRelation
AccessibleRole
AccessibleSort
AccessibleState
AccessibleTristate
Align
ArrowType
AssistantPageType
BaselinePosition
BorderStyle
BuilderError
ButtonsType
CellRendererAccelMode
CellRendererMode
ConstraintAttribute
ConstraintRelation
ConstraintStrength
ConstraintVflParserError
CornerType
CssParserError
CssParserWarning
DeleteType
DirectionType
EditableProperties
EntryIconPosition
EventSequenceState
FileChooserAction
FileChooserError
FilterChange
FilterMatch
IconSize
IconThemeError
IconViewDropPosition
ImageType
InputPurpose
Justification
LevelBarMode
License
MessageType
MovementStep
NotebookTab
NumberUpLayout
Ordering
Orientation
Overflow
PackType
PadActionType
PageOrientation
PageSet
PanDirection
PolicyType
PositionType
PrintDuplex
PrintError
PrintOperationAction
PrintOperationResult
PrintPages
PrintQuality
PrintStatus
PropagationLimit
PropagationPhase
RecentManagerError
ResponseType
RevealerTransitionType
ScrollStep
ScrollType
ScrollablePolicy
SelectionMode
SensitivityType
ShortcutScope
ShortcutType
SizeGroupMode
SizeRequestMode
SortColumn
SortType
SorterChange
SorterOrder
SpinButtonUpdatePolicy
SpinType
StackTransitionType
StringFilterMatchMode
SystemSetting
TextDirection
TextExtendSelection
TextViewLayer
TextWindowType
TreeViewColumnSizing
TreeViewDropPosition
TreeViewGridLines
Unit
WrapMode

Constants

ACCESSIBLE_VALUE_UNDEFINED
INVALID_LIST_POSITION
NONE_ACCESSIBLE
NONE_ACTIONABLE
NONE_ADJUSTMENT
NONE_APPLICATION
NONE_APPLICATION_WINDOW
NONE_APP_CHOOSER
NONE_BOX
NONE_BUILDABLE
NONE_BUILDER_SCOPE
NONE_BUTTON
NONE_CELL_AREA
NONE_CELL_AREA_CONTEXT
NONE_CELL_EDITABLE
NONE_CELL_LAYOUT
NONE_CELL_RENDERER
NONE_CELL_RENDERER_TEXT
NONE_CHECK_BUTTON
NONE_COLOR_CHOOSER
NONE_COMBO_BOX
NONE_CONSTRAINT_TARGET
NONE_DIALOG
NONE_DRAWING_AREA
NONE_EDITABLE
NONE_ENTRY
NONE_ENTRY_BUFFER
NONE_EVENT_CONTROLLER
NONE_EXPRESSION
NONE_FILE_CHOOSER
NONE_FILTER
NONE_FIXED
NONE_FLOW_BOX_CHILD
NONE_FONT_CHOOSER
NONE_FRAME
NONE_GESTURE
NONE_GESTURE_DRAG
NONE_GESTURE_SINGLE
NONE_GL_AREA
NONE_GRID
NONE_IM_CONTEXT
NONE_IM_CONTEXT_SIMPLE
NONE_IM_MULTICONTEXT
NONE_LAYOUT_CHILD
NONE_LAYOUT_MANAGER
NONE_LIST_BASE
NONE_LIST_BOX_ROW
NONE_LIST_ITEM_FACTORY
NONE_MEDIA_FILE
NONE_MEDIA_STREAM
NONE_MOUNT_OPERATION
NONE_MULTI_FILTER
NONE_NATIVE
NONE_NATIVE_DIALOG
NONE_ORIENTABLE
NONE_POPOVER
NONE_PRINT_OPERATION
NONE_PRINT_OPERATION_PREVIEW
NONE_RANGE
NONE_RECENT_MANAGER
NONE_ROOT
NONE_SCALE
NONE_SCALE_BUTTON
NONE_SCROLLABLE
NONE_SELECTION_MODEL
NONE_SHORTCUT_ACTION
NONE_SHORTCUT_MANAGER
NONE_SHORTCUT_TRIGGER
NONE_SORTER
NONE_STYLE_CONTEXT
NONE_STYLE_PROVIDER
NONE_TEXT_BUFFER
NONE_TEXT_CHILD_ANCHOR
NONE_TEXT_MARK
NONE_TEXT_TAG
NONE_TEXT_VIEW
NONE_TOGGLE_BUTTON
NONE_TREE_DRAG_DEST
NONE_TREE_DRAG_SOURCE
NONE_TREE_MODEL
NONE_TREE_MODEL_FILTER
NONE_TREE_MODEL_SORT
NONE_TREE_SORTABLE
NONE_TREE_VIEW
NONE_WIDGET
NONE_WINDOW
NONE_WINDOW_GROUP
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

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_valid
binary_age
check_version
debug_flags
default_language
disable_setlocale
enumerate_printersLinux
hsv_to_rgb
init

Tries to initialize GTK.

interface_age
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.

locale_direction
major_version
micro_version
minor_version
print_run_page_setup_dialog
print_run_page_setup_dialog_async
render_activity
render_arrow
render_background
render_check
render_expander
render_focus
render_frame
render_handle
render_icon
render_layout
render_line
render_option
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
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
tree_get_row_drag_data

Type Definitions

Allocation