Crate gtk[][src]

Expand description

Rust GTK 3 bindings

This library contains safe Rust bindings for GTK 3, a multi-platform GUI toolkit. It is a part of gtk-rs.

GTK 3.18 is the lowest supported version for the underlying library.

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.

See also

“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 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 3.18 APIs. You can access additional functionality by selecting one of the v3_20, v3_24, etc. features.

Cargo.toml example:

[dependencies.gtk]
version = "0.x.y"
features = ["v3_20"]

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 atk;
pub use cairo;
pub use gdk;
pub use gdk_pixbuf;
pub use gio;
pub use glib;
pub use pango;

Modules

functions
prelude

Traits and essential types intended for blanket imports.

subclass
xlib

Structs

AboutDialog
AboutDialogBuilder

A builder-pattern type to construct AboutDialog objects.

AccelFlags
AccelGroup
AccelLabel
AccelLabelBuilder

A builder-pattern type to construct AccelLabel objects.

ActionBar
ActionBarBuilder

A builder-pattern type to construct ActionBar objects.

Actionable
Adjustment
AdjustmentBuilder

A builder-pattern type to construct Adjustment objects.

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

Bin
Border
Box
BoxBuilder

A builder-pattern type to construct Box objects.

Buildable
Builder
Button
ButtonBox
ButtonBoxBuilder

A builder-pattern type to construct ButtonBox objects.

ButtonBuilder

A builder-pattern type to construct Button objects.

Calendar
CalendarBuilder

A builder-pattern type to construct Calendar objects.

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

CheckButton
CheckButtonBuilder

A builder-pattern type to construct CheckButton objects.

CheckMenuItem
CheckMenuItemBuilder

A builder-pattern type to construct CheckMenuItem objects.

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

ComboBox
ComboBoxBuilder

A builder-pattern type to construct ComboBox objects.

ComboBoxText
ComboBoxTextBuilder

A builder-pattern type to construct ComboBoxText objects.

Container
CssProvider
CssSection
DestDefaults
Dialog
DialogBuilder

A builder-pattern type to construct Dialog objects.

DialogFlags
DrawingArea
DrawingAreaBuilder

A builder-pattern type to construct DrawingArea objects.

Editable
Entry
EntryBuffer
EntryBuilder

A builder-pattern type to construct Entry objects.

EntryCompletion
EntryCompletionBuilder

A builder-pattern type to construct EntryCompletion objects.

EventBox
EventBoxBuilder

A builder-pattern type to construct EventBox objects.

EventController
EventControllerKey
EventControllerMotion
EventControllerScroll
EventControllerScrollFlags
Expander
ExpanderBuilder

A builder-pattern type to construct Expander objects.

FileChooser
FileChooserButton
FileChooserButtonBuilder

A builder-pattern type to construct FileChooserButton objects.

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
FileFilterFlags
Fixed
FixedBuilder

A builder-pattern type to construct Fixed objects.

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
GestureDrag
GestureDragBuilder

A builder-pattern type to construct GestureDrag objects.

GestureLongPress
GestureLongPressBuilder

A builder-pattern type to construct GestureLongPress objects.

GestureMultiPress
GestureMultiPressBuilder

A builder-pattern type to construct GestureMultiPress objects.

GesturePan
GesturePanBuilder

A builder-pattern type to construct GesturePan objects.

GestureRotate
GestureRotateBuilder

A builder-pattern type to construct GestureRotate objects.

GestureSingle
GestureStylus
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.

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.

IconInfo
IconLookupFlags
IconTheme
IconView
IconViewBuilder

A builder-pattern type to construct IconView objects.

Image
ImageBuilder

A builder for generating a Image.

InfoBar
InfoBarBuilder

A builder-pattern type to construct InfoBar objects.

Inhibit

Whether to propagate the signal to the default handler.

InputHints
Invisible
InvisibleBuilder

A builder-pattern type to construct Invisible objects.

JunctionSides
Label
LabelBuilder

A builder-pattern type to construct Label objects.

Layout
LayoutBuilder

A builder-pattern type to construct Layout objects.

LevelBar
LevelBarBuilder

A builder-pattern type to construct LevelBar objects.

LinkButton
LinkButtonBuilder

A builder-pattern type to construct LinkButton objects.

ListBox
ListBoxBuilder

A builder-pattern type to construct ListBox objects.

ListBoxRow
ListBoxRowBuilder

A builder-pattern type to construct ListBoxRow objects.

ListStore
LockButton
LockButtonBuilder

A builder-pattern type to construct LockButton objects.

Menu
MenuBar
MenuBarBuilder

A builder-pattern type to construct MenuBar objects.

MenuBuilder

A builder-pattern type to construct Menu objects.

MenuButton
MenuButtonBuilder

A builder-pattern type to construct MenuButton objects.

MenuItem
MenuItemBuilder

A builder-pattern type to construct MenuItem objects.

MenuShell
MenuToolButton
MenuToolButtonBuilder

A builder-pattern type to construct MenuToolButton objects.

MessageDialog
MessageDialogBuilder

A builder-pattern type to construct MessageDialog objects.

Misc
ModelButton
ModelButtonBuilder

A builder-pattern type to construct ModelButton objects.

MountOperation
MountOperationBuilder

A builder-pattern type to construct MountOperation objects.

NativeDialog
Notebook
NotebookBuilder

A builder-pattern type to construct Notebook objects.

OffscreenWindow
OffscreenWindowBuilder

A builder-pattern type to construct OffscreenWindow objects.

Orientable
Overlay
OverlayBuilder

A builder-pattern type to construct Overlay objects.

PadActionEntry
PadController
PadControllerBuilder

A builder-pattern type to construct PadController objects.

PageRange
PageSetup
Paned
PanedBuilder

A builder-pattern type to construct Paned objects.

PaperSize
PlacesOpenFlags
PlacesSidebar
PlacesSidebarBuilder

A builder-pattern type to construct PlacesSidebar objects.

Plug
PlugBuilder

A builder-pattern type to construct Plug objects.

Popover
PopoverBuilder

A builder-pattern type to construct Popover objects.

PopoverMenu
PopoverMenuBuilder

A builder-pattern type to construct PopoverMenu objects.

PrintContext
PrintOperation
PrintOperationBuilder

A builder-pattern type to construct PrintOperation objects.

PrintOperationPreview
PrintSettings
ProgressBar
ProgressBarBuilder

A builder-pattern type to construct ProgressBar objects.

RadioButton
RadioButtonBuilder

A builder-pattern type to construct RadioButton objects.

RadioMenuItem
RadioMenuItemBuilder

A builder-pattern type to construct RadioMenuItem objects.

RadioToolButton
RadioToolButtonBuilder

A builder-pattern type to construct RadioToolButton objects.

Range
RecentChooser
RecentChooserDialog
RecentChooserDialogBuilder

A builder-pattern type to construct RecentChooserDialog objects.

RecentChooserMenu
RecentChooserMenuBuilder

A builder-pattern type to construct RecentChooserMenu objects.

RecentChooserWidget
RecentChooserWidgetBuilder

A builder-pattern type to construct RecentChooserWidget objects.

RecentData
RecentFilter
RecentFilterFlags
RecentInfo
RecentManager
RecentManagerBuilder

A builder-pattern type to construct RecentManager objects.

Rectangle
RegionFlags
Requisition
Revealer
RevealerBuilder

A builder-pattern type to construct Revealer objects.

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.

SelectionData
Separator
SeparatorBuilder

A builder-pattern type to construct Separator objects.

SeparatorMenuItem
SeparatorMenuItemBuilder

A builder-pattern type to construct SeparatorMenuItem objects.

SeparatorToolItem
SeparatorToolItemBuilder

A builder-pattern type to construct SeparatorToolItem objects.

Settings
ShortcutLabel
ShortcutLabelBuilder

A builder-pattern type to construct ShortcutLabel objects.

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.

SizeGroup
SizeGroupBuilder

A builder-pattern type to construct SizeGroup objects.

Socket
SocketBuilder

A builder-pattern type to construct Socket objects.

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.

StackSidebar
StackSidebarBuilder

A builder-pattern type to construct StackSidebar objects.

StackSwitcher
StackSwitcherBuilder

A builder for generating a StackSwitcher.

StateFlags
Statusbar
StatusbarBuilder

A builder-pattern type to construct Statusbar objects.

StyleContext
StyleContextBuilder

A builder-pattern type to construct StyleContext objects.

StyleContextPrintFlags
StyleProperties
StyleProvider
Switch
SwitchBuilder

A builder-pattern type to construct Switch objects.

TargetEntry
TargetFlags
TargetList
TextAttributes
TextBuffer
TextBufferBuilder

A builder-pattern type to construct TextBuffer 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.

ToggleToolButton
ToggleToolButtonBuilder

A builder-pattern type to construct ToggleToolButton objects.

ToolButton
ToolButtonBuilder

A builder-pattern type to construct ToolButton objects.

ToolItem
ToolItemBuilder

A builder-pattern type to construct ToolItem objects.

ToolItemGroup
ToolItemGroupBuilder

A builder-pattern type to construct ToolItemGroup objects.

ToolPalette
ToolPaletteBuilder

A builder-pattern type to construct ToolPalette objects.

ToolPaletteDragTargets
ToolShell
Toolbar
ToolbarBuilder

A builder-pattern type to construct Toolbar objects.

Tooltip
TreeDragDest
TreeDragSource
TreeIter
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.

Viewport
ViewportBuilder

A builder-pattern type to construct Viewport objects.

VolumeButton
VolumeButtonBuilder

A builder-pattern type to construct VolumeButton objects.

Widget
WidgetPath
Window
WindowBuilder

A builder-pattern type to construct Window objects.

WindowGroup

Enums

Align
ArrowType
AssistantPageType
BaselinePosition
BorderStyle
BuilderError
ButtonBoxStyle
ButtonRole
ButtonsType
CellRendererAccelMode
CellRendererMode
CornerType
CssProviderError
CssSectionType
DeleteType
DirectionType
DragResult
EntryIconPosition
EventSequenceState
FileChooserAction
FileChooserConfirmation
FileChooserError
IconSize
IconThemeError
IconViewDropPosition
ImageType
InputPurpose
Justification
LevelBarMode
License
MenuDirectionType
MessageType
MovementStep
NotebookTab
NumberUpLayout
Orientation
PackDirection
PackType
PadActionTypev3_22
PageOrientation
PageSet
PanDirection
PolicyType
PopoverConstraintv3_20
PositionType
PrintDuplex
PrintError
PrintOperationAction
PrintOperationResult
PrintPages
PrintQuality
PrintStatus
PropagationPhase
RecentChooserError
RecentManagerError
RecentSortType
ReliefStyle
ResizeMode
ResponseType
RevealerTransitionType
ScrollStep
ScrollType
ScrollablePolicy
SelectionMode
SensitivityType
ShadowType
ShortcutTypev3_20
SizeGroupMode
SizeRequestMode
SortColumn
SortType
SpinButtonUpdatePolicy
SpinType
StackTransitionType
TextDirection
TextExtendSelection
TextViewLayer
TextWindowType
ToolbarStyle
TreeViewColumnSizing
TreeViewDropPosition
TreeViewGridLines
Unit
WidgetHelpType
WindowPosition
WindowType
WrapMode

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_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_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

Statics

LEVEL_BAR_OFFSET_FULLv3_20
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
STYLE_REGION_COLUMN
STYLE_REGION_COLUMN_HEADER
STYLE_REGION_ROW
STYLE_REGION_TAB

Traits

EditableSignals
OverlaySignals
SpinButtonSignals

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
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 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
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_clipv3_20
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_windowv3_22
targets_include_image
targets_include_rich_text
targets_include_text
targets_include_uri
test_create_simple_window
test_find_label
test_find_sibling
test_find_widget
test_register_all_types
test_slider_get_value
test_slider_set_perc
test_spin_button_click
test_text_get
test_text_set
test_widget_click
test_widget_send_key
test_widget_wait_for_draw
tree_get_row_drag_data
tree_set_row_drag_data
true_