Expand description
§Rust GTK 4 bindings
The project website is here.
Rust bindings of GTK 4, part of gtk4-rs.
This library contains safe Rust bindings for GTK 4, a multi-platform GUI toolkit. It is a part of gtk-rs.
Most of this documentation is generated from the C API. Until all parts of the documentation have been reviewed there will be incongruities with the actual Rust API.
For a gentle introduction to gtk-rs we recommend the online book GUI development with Rust and GTK 4.
See also:
- gtk-rs project overview
- General
GLib
family types and object system overview - GTK documentation
- GTK Visual Index
§Minimum supported Rust version
Currently, the minimum supported Rust version is 1.80
.
§“Hello, World!” example program
GTK needs to be initialized before use by calling init
. Creating an
Application
will call init
for you.
The gtk4
crate is usually renamed to gtk
. You can find an example in
the features section for how to do this globally in your Cargo.toml
.
use gtk4 as gtk;
use gtk::prelude::*;
use gtk::{glib, Application, ApplicationWindow};
fn main() -> glib::ExitCode {
let app = Application::builder()
.application_id("org.example.HelloWorld")
.build();
app.connect_activate(|app| {
// We create the main window.
let window = ApplicationWindow::builder()
.application(app)
.default_width(320)
.default_height(200)
.title("Hello, World!")
.build();
// Show the window.
window.present();
});
app.run()
}
§The main loop
In a typical GTK application you set up the UI, assign signal handlers and run the main event loop.
use gtk4 as gtk;
use gtk::prelude::*;
use gtk::{glib, Application, ApplicationWindow, Button};
fn main() -> glib::ExitCode {
let application = Application::builder()
.application_id("com.example.FirstGtkApp")
.build();
application.connect_activate(|app| {
let window = ApplicationWindow::builder()
.application(app)
.title("First GTK Program")
.default_width(350)
.default_height(70)
.build();
let button = Button::with_label("Click me!");
button.connect_clicked(|_| {
eprintln!("Clicked!");
});
window.set_child(Some(&button));
window.present();
});
application.run()
}
§Threads
GTK is not thread-safe. Accordingly, none of this crate’s structs implement
Send
or Sync
.
The thread where init
was called is considered the main thread. OS X has
its own notion of the main thread and init
must be called on that thread.
After successful initialization, calling any gtk
or gdk
functions (including init
) from other threads will panic
.
Any thread can schedule a closure to be run by the main loop on the main
thread via glib::idle_add
or
glib::timeout_add
. While
working with GTK you might need the glib::idle_add_local
or glib::timeout_add_local
version without the
Send
bound. Those may only be called from the main thread.
§Panics
The gtk
and gdk
crates have some run-time safety and contract
checks.
-
Any constructor or free function will panic if called before
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.
§Documentation
- The Rust API Stable/Development
- Book Stable/Development
- Examples
- The C API
- GTK Installation Instructions
§Using
We recommend using crates from crates.io, as demonstrated here.
If you want to track the bleeding edge, use the git dependency instead:
[dependencies]
gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4" }
Avoid mixing versioned and git crates like this:
# This will not compile
[dependencies]
gdk = {version = "0.1", package = "gdk4"}
gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4" }
§Features
Feature | Description |
---|---|
v4_18 | Enable the new APIs part of GTK 4.18 |
v4_16 | Enable the new APIs part of GTK 4.16 |
v4_14 | Enable the new APIs part of GTK 4.14 |
v4_12 | Enable the new APIs part of GTK 4.12 |
v4_10 | Enable the new APIs part of GTK 4.10 |
v4_8 | Enable the new APIs part of GTK 4.8 |
v4_6 | Enable the new APIs part of GTK 4.6 |
v4_4 | Enable the new APIs part of GTK 4.4 |
v4_2 | Enable the new APIs part of GTK 4.2 |
gnome_47 | Enable all version feature flags of this crate and its dependencies to match the GNOME 47 SDK |
gnome_46 | Enable all version feature flags of this crate and its dependencies to match the GNOME 46 SDK |
gnome_45 | Enable all version feature flags of this crate and its dependencies to match the GNOME 45 SDK |
gnome_44 | Enable all version feature flags of this crate and its dependencies to match the GNOME 44 SDK |
gnome_43 | Enable all version feature flags of this crate and its dependencies to match the GNOME 43 SDK |
gnome_42 | Enable all version feature flags of this crate and its dependencies to match the GNOME 42 SDK |
unsafe-assume-initialized | Disable checks that gtk is initialized, for use in C ABI libraries |
xml_validation | Enable xml_validation feature of gtk4-macros |
blueprint | Enable blueprint feature of gtk4-macros |
§See Also
§License
The Rust bindings of gtk4 are available under the MIT License, please refer to it.
Re-exports§
pub use subclass::widget::TemplateChild;
pub use cairo;
pub use gdk;
pub use gdk_pixbuf;
pub use gio;
pub use glib;
pub use graphene;
pub use gsk;
pub use gtk4_sys as ffi;
pub use pango;
Modules§
- accessible
- builders
- Builder pattern types.
- prelude
- Traits intended for blanket imports.
- subclass
- Traits intended for creating custom types.
Structs§
- ATContext
- Communicates with platform-specific assistive technologies API.
- About
Dialog - Displays information about a program.
- Accessible
- An interface for describing UI elements for Assistive Technologies.
- Accessible
List v4_14
- Wraps a list of references to
Accessible
objects. - Accessible
Range v4_10
- An interface for accessible objects containing a numeric value.
- Accessible
Text v4_14
- An interface for accessible objects containing formatted text.
- Accessible
Text Range v4_14
- A range inside the text of an accessible object.
- Action
Bar - Presents contextual actions.
- Actionable
- Provides a way to associate widgets with actions.
- Activate
Action - Activates a widget.
- Adjustment
- A model for a numeric value.
- Alert
Dialog v4_10
- Collects the arguments that are needed to present a message to the user.
- Alternative
Trigger - Combines two shortcut triggers.
- AnyFilter
- Matches an item when at least one of its filters matches.
- AppChooser
Deprecated - The application selection widgets should be
implemented according to the design of each platform and/or
application requiring them.
AppChooser
is an interface for widgets which allow the user to choose an application. - AppChooser
Button Deprecated - The application selection widgets should be
implemented according to the design of each platform and/or
application requiring them.
The
AppChooserButton
lets the user select an application. - AppChooser
Dialog Deprecated - The application selection widgets should be
implemented according to the design of each platform and/or
application requiring them.
AppChooserDialog
shows aAppChooserWidget
inside aDialog
. - AppChooser
Widget Deprecated - The application selection widgets should be
implemented according to the design of each platform and/or
application requiring them.
AppChooserWidget
is a widget for selecting applications. - Application
- A high-level API for writing applications.
- Application
Inhibit Flags - Types of user actions that may be blocked by
Application
. - Application
Window - A
Window
subclass that integrates withApplication
. - Aspect
Frame - Preserves the aspect ratio of its child.
- Assistant
Deprecated - This widget will be removed in GTK 5
Assistant
is used to represent a complex as a series of steps. - Assistant
Page Deprecated - This object will be removed in GTK 5
AssistantPage
is an auxiliary object used byAssistant
. - BinLayout
- A layout manager for widgets with a single child.
- Bitset
- A set of unsigned integers.
- Bitset
Iter - Iterates over the elements of a
Bitset
. - Bookmark
List - A list model that wraps
GBookmarkFile
. - Bool
Filter - Evaluates a boolean expression to determine whether to include items.
- Border
- Specifies a border around a rectangular area.
- Box
- Arranges child widgets into a single row or column.
- BoxLayout
- Arranges children in a single row or column.
- Buildable
- Allows objects to extend and customize deserialization from ui files.
- Builder
- Reads XML descriptions of a user interface and instantiates the described objects.
- BuilderC
Scope - GLib type: GObject with reference counted clone semantics.
- Builder
Closure Flags - The list of flags that can be passed to gtk_builder_create_closure().
- Builder
List Item Factory - A
ListItemFactory
that creates widgets by instantiatingBuilder
UI templates. - Builder
Rust Scope - An implementation of
BuilderScope
that can bind Rust callbacks. - Builder
Scope - Provides language binding support to
Builder
. - Button
- Calls a callback function when the button is clicked.
- Calendar
- Displays a Gregorian calendar, one month at a time.
- Callback
Action - Invokes a callback.
- Cell
Area Deprecated - List views use widgets for displaying their
contents
An abstract class for laying out
CellRenderer
s - Cell
Area Box Deprecated - List views use widgets for displaying their contents A cell area that renders GtkCellRenderers into a row or a column
- Cell
Area Context Deprecated - This object will be removed in GTK 5 Stores geometrical information for a series of rows in a GtkCellArea
- Cell
Editable Deprecated - List views use widgets for displaying their
contents. See
Editable
for editable text widgets Interface for widgets that can be used for editing cells - Cell
Layout Deprecated - List views use widgets to display their contents.
See
LayoutManager
for layout manager delegate objects An interface for packing cells - Cell
Renderer Deprecated - List views use widgets for displaying their contents An object for rendering a single cell
- Cell
Renderer Accel Deprecated - Applications editing keyboard accelerators should provide their own implementation according to platform design guidelines Renders a keyboard accelerator in a cell
- Cell
Renderer Combo Deprecated - List views use widgets to display their contents. You
should use
DropDown
instead Renders a combobox in a cell - Cell
Renderer Pixbuf Deprecated - List views use widgets to display their contents. You
should use
Image
for icons, andPicture
for images Renders a pixbuf in a cell - Cell
Renderer Progress Deprecated - List views use widgets to display their contents.
You should use
ProgressBar
instead Renders numbers as progress bars - Cell
Renderer Spin Deprecated - List views use widgets to display their contents.
You should use
SpinButton
instead Renders a spin button in a cell - Cell
Renderer Spinner Deprecated - List views use widgets to display their contents.
You should use
Spinner
instead Renders a spinning animation in a cell - Cell
Renderer State - Tells how a cell is to be rendered.
- Cell
Renderer Text Deprecated - List views use widgets to display their contents.
You should use
Inscription
orLabel
instead Renders text in a cell - Cell
Renderer Toggle Deprecated - List views use widgets to display their contents.
You should use
ToggleButton
instead Renders a toggle button in a cell - Cell
View Deprecated - List views use widgets to display their contents.
You can use
Box
instead A widget displaying a single row of a GtkTreeModel - Center
Box - Arranges three children in a row, keeping the middle child centered as well as possible.
- Center
Layout - Manages up to three children.
- Check
Button - Places a label next to an indicator.
- Closure
Expression - An expression using a custom
GClosure
to compute the value from its parameters. - Color
Button Deprecated - Use
ColorDialogButton
instead TheColorButton
allows to open a color chooser dialog to change the color. - Color
Chooser Deprecated - Use
ColorDialog
andColorDialogButton
instead of widgets implementingColorChooser
ColorChooser
is an interface that is implemented by widgets for choosing colors. - Color
Chooser Dialog Deprecated - Use
ColorDialog
instead A dialog for choosing a color. - Color
Chooser Widget Deprecated - Direct use of
ColorChooserWidget
is deprecated. TheColorChooserWidget
widget lets the user select a color. - Color
Dialog v4_10
- Asynchronous API to present a color chooser dialog.
- Color
Dialog Button v4_10
- Opens a color chooser dialog to select a color.
- Column
View - Presents a large dynamic list of items using multiple columns with headers.
- Column
View Cell v4_12
- Represents items in a cell in
ColumnView
. - Column
View Column ColumnViewColumn
represents the columns being added to aColumnView
.- Column
View Row v4_12
- Configures how rows are displayed in a
ColumnView
. - Column
View Sorter v4_10
- Sorts
ColumnView
columns. - Combo
Box Deprecated - Use
DropDown
instead AComboBox
is a widget that allows the user to choose from a list of valid choices. - Combo
BoxText Deprecated - Use
DropDown
with aStringList
instead AComboBoxText
is a simple variant ofComboBox
for text-only use cases. - Constant
Expression - A constant value in a
Expression
. - Constraint
- Describes a constraint between attributes of two widgets, expressed as a linear equation.
- Constraint
Guide - An invisible layout element in a
ConstraintLayout
. - Constraint
Layout - Uses constraints to describe relations between widgets.
- Constraint
Layout Child LayoutChild
subclass for children in aConstraintLayout
.- Constraint
Target - Makes it possible to use an object as source or target in a
Constraint
. - CssLocation
- Points at a location inside a CSS stream.
- CssProvider
- A style provider for CSS.
- CssSection
- Defines a part of a CSS document.
- Custom
Filter - Determines whether to include items with a callback.
- Custom
Sorter - Sorts items via a callback function.
- Debug
Flags - Flags to use with gtk_set_debug_flags().
- Dialog
Deprecated - Use
Window
instead Dialogs are a convenient way to prompt the user for a small amount of input. - Dialog
Flags - Flags used to influence dialog construction.
- Directory
List - A list model that wraps
FileExtManual::enumerate_children_async()
. - Drag
Icon - A
Root
implementation for drag icons. - Drag
Source - An event controller to initiate Drag-And-Drop operations.
- Drawing
Area - Allows drawing with cairo.
- Drop
Controller Motion - An event controller tracking the pointer during Drag-and-Drop operations.
- Drop
Down - Allows the user to choose an item from a list of options.
- Drop
Target - An event controller to receive Drag-and-Drop operations.
- Drop
Target Async - An event controller to receive Drag-and-Drop operations, asynchronously.
- Editable
- Interface for single-line text editing widgets.
- Editable
Label - Allows users to edit the displayed text by switching to an “edit mode”.
- Emoji
Chooser - Used by text widgets to let users insert Emoji characters.
- Entry
- A single-line text entry widget.
- Entry
Buffer - Holds the text that is displayed in a single-line text entry widget.
- Entry
Completion Deprecated EntryCompletion
is an auxiliary object to provide completion functionality forEntry
.- Event
Controller - The base class for event controllers.
- Event
Controller Focus - Tracks keyboard focus.
- Event
Controller Key - Provides access to key events.
- Event
Controller Legacy - Provides raw access to the event stream.
- Event
Controller Motion - Tracks the pointer position.
- Event
Controller Scroll - Handles scroll events.
- Event
Controller Scroll Flags - Describes the behavior of a
EventControllerScroll
. - Every
Filter - Matches an item when each of its filters matches.
- Expander
- Allows the user to reveal or conceal a child widget.
- Expression
- Provides a way to describe references to values.
- Expression
Watch - An opaque structure representing a watched
Expression
. - File
Chooser Deprecated - Use
FileDialog
insteadFileChooser
is an interface that can be implemented by file selection widgets. - File
Chooser Dialog Deprecated - Use
FileDialog
insteadFileChooserDialog
is a dialog suitable for use with “File Open” or “File Save” commands. - File
Chooser Native Deprecated - Use
FileDialog
insteadFileChooserNative
is an abstraction of a dialog suitable for use with “File Open” or “File Save as” commands. - File
Chooser Widget Deprecated - Direct use of
FileChooserWidget
is deprecatedFileChooserWidget
is a widget for choosing files. - File
Dialog v4_10
- Asynchronous API to present a file chooser dialog.
- File
Filter - Filters files by name or mime type.
- File
Launcher v4_10
- Asynchronous API to open a file with an application.
- Filter
- Describes the filtering to be performed by a
FilterListModel
. - Filter
List Model - A list model that filters the elements of another model.
- Fixed
- Places its child widgets at fixed positions and with fixed sizes.
- Fixed
Layout - Places child widgets at fixed positions.
- Fixed
Layout Child LayoutChild
subclass for children in aFixedLayout
.- Flatten
List Model - A list model that concatenates other list models.
- FlowBox
- Puts child widgets in a reflowing grid.
- Flow
BoxChild - The kind of widget that can be added to a
FlowBox
. - Font
Button Deprecated - Use
FontDialogButton
instead TheFontButton
allows to open a font chooser dialog to change the font. - Font
Chooser Deprecated - Use
FontDialog
andFontDialogButton
insteadFontChooser
is an interface that can be implemented by widgets for choosing fonts. - Font
Chooser Dialog Deprecated - Use
FontDialog
instead TheFontChooserDialog
widget is a dialog for selecting a font. - Font
Chooser Level - Specifies the granularity of font selection
that is desired in a
FontChooser
. - Font
Chooser Widget Deprecated - Direct use of
FontChooserWidget
is deprecated. TheFontChooserWidget
widget lets the user select a font. - Font
Dialog v4_10
- Asynchronous API to present a font chooser dialog.
- Font
Dialog Button v4_10
- Opens a font chooser dialog to select a font.
- Frame
- Surrounds its child with a decorative frame and an optional label.
- GLArea
- Allows drawing with OpenGL.
- Gesture
- The base class for gesture recognition.
- Gesture
Click - Recognizes click gestures.
- Gesture
Drag - Recognizes drag gestures.
- Gesture
Long Press - Recognizes long press gestures.
- Gesture
Pan - Recognizes pan gestures.
- Gesture
Rotate - Recognizes 2-finger rotation gestures.
- Gesture
Single - A
Gesture
subclass optimized for singe-touch and mouse gestures. - Gesture
Stylus - Recognizes tablet stylus input.
- Gesture
Swipe - Recognizes swipe gestures.
- Gesture
Zoom - Recognizes 2-finger pinch/zoom gestures.
- Graphics
Offload v4_14
- Bypasses gsk rendering by passing the content of its child directly to the compositor.
- Grid
- Arranges its child widgets in rows and columns.
- Grid
Layout - Arranges child widgets in rows and columns.
- Grid
Layout Child LayoutChild
subclass for children in aGridLayout
.- Grid
View - Presents a large dynamic grid of items.
- Header
Bar - Creates a custom titlebar for a window.
- IMContext
- The interface for GTK input methods.
- IMContext
Simple - Supports compose sequences, dead keys and numeric Unicode input.
- IMMulticontext
- Supports switching between multiple input methods.
- Icon
Lookup Flags - Used to specify options for gtk_icon_theme_lookup_icon().
- Icon
Paintable - Contains information found when looking up an icon in
IconTheme
. - Icon
Theme - Loads themed icons.
- Icon
View Deprecated - Use
GridView
insteadIconView
is a widget which displays data in a grid of icons. - Image
- Displays an image.
- InfoBar
Deprecated - There is no replacement in GTK for an “info bar” widget;
you can use
Revealer
with aBox
containing aLabel
and an optionalButton
, according to your application’s design.InfoBar
can be used to show messages to the user without a dialog. - Input
Hints - Describes hints that might be taken into account by input methods or applications.
- Inscription
v4_8
- Shows text in a predefined area.
- Keyval
Trigger - Triggers when a specific keyval and modifiers are pressed.
- Label
- Displays a small amount of text.
- Layout
Child - The base class for objects that are meant to hold layout properties.
- Layout
Manager - Handles the preferred size and allocation for children of a widget.
- Level
Bar - Shows a level indicator.
- Link
Button - A button with a hyperlink.
- List
Base - The abstract base class for GTK’s list widgets.
- ListBox
- Shows a vertical list.
- List
BoxRow - The kind of widget that can be added to a
ListBox
. - List
Header v4_12
- Used by list widgets to represent the headers they display.
- List
Item - Used by list widgets to represent items in a
gio::ListModel
. - List
Item Factory - Creates widgets for the items taken from a
GListModel
. - List
Scroll Flags v4_12
- List of actions to perform when scrolling to items in a list widget.
- List
Store Deprecated - Use
Gio::ListStore
instead A list-like data structure that can be used with theTreeView
. - List
View - Presents a large dynamic list of items.
- Lock
Button Deprecated - This widget will be removed in GTK 5
LockButton
is a widget to obtain and revoke authorizations needed to operate the controls. - MapList
Model - A list model that maps the items in another model to different items.
- Media
Controls - Shows controls for video playback.
- Media
File - Implements the
MediaStream
interface for files. - Media
Stream - The integration point for media playback inside GTK.
- Menu
Button - Displays a popup when clicked.
- Message
Dialog Deprecated - Use
AlertDialog
insteadMessageDialog
presents a dialog with some message text. - Mnemonic
Action - Activates a widget with a mnemonic.
- Mnemonic
Trigger - Triggers when a specific mnemonic is pressed.
- Mount
Operation - Asks the user for passwords and other information required to mount a volume.
- Multi
Filter - Base class for filters that combine multiple filters.
- Multi
Selection - A selection model that allows selecting multiple elements.
- Multi
Sorter - Combines multiple sorters by trying them in turn.
- Named
Action - Activates a named action.
- Native
- An interface for widgets that have their own
gdk::Surface
. - Native
Dialog - Base class for platform dialogs that don’t use
Dialog
. - Never
Trigger - A
ShortcutTrigger
that never triggers. - NoSelection
- A selection model that does not allow selecting anything.
- Notebook
- Switches between children using tabs.
- Notebook
Page - An auxiliary object used by
Notebook
. - Nothing
Action - Does nothing.
- Numeric
Sorter - Sorts items numerically.
- Object
Expression - A
GObject
value in aExpression
. - Orientable
- An interface for widgets that can be oriented horizontally or vertically.
- Overlay
- Places “overlay” widgets on top of a single main child.
- Overlay
Layout - The layout manager used by
Overlay
. - Overlay
Layout Child LayoutChild
subclass for children in aOverlayLayout
.- PadAction
Entry - Struct defining a pad action entry.
- PadController
- Handles input from the pads found in drawing tablets.
- Page
Range - A range of pages to print.
- Page
Setup - Stores page size, orientation and margins for printing.
- Page
Setup Unix Dialog Linux - Presents a page setup dialog for platforms which don’t provide a native page setup dialog, like Unix.
- Paned
- Arranges its children in two panes, horizontally or vertically.
- Paper
Size PaperSize
handles paper sizes.- Param
Spec Expression - A
GParamSpec
for properties holding aExpression
. - Password
Entry - A single-line text entry widget for entering passwords and other secrets.
- Password
Entry Buffer v4_4
- A
EntryBuffer
that locks the underlying memory to prevent it from being swapped to disk. - Pick
Flags - Flags that influence the behavior of
WidgetExt::pick()
. - Picture
- Displays a
gdk::Paintable
. - Popover
- Presents a bubble-like popup.
- Popover
Menu - A subclass of
Popover
that implements menu behavior. - Popover
Menu Bar - Presents a horizontal bar of items that pop up menus when clicked.
- Popover
Menu Flags - Flags that affect how
PopoverMenu
widgets built from agio::MenuModel
are created and displayed. - Print
Capabilities Linux - Specifies which features the print dialog should offer.
- Print
Context - Encapsulates context information that is required when drawing pages for printing.
- Print
Dialog v4_14
- Asynchronous API to present a print dialog to the user.
- Print
Job Linux - Represents a job that is sent to a printer.
- Print
Operation - High-level, portable printing API.
- Print
Operation Preview - The interface that is used to implement print preview.
- Print
Settings - Collects the settings of a print dialog in a system-independent way.
- Print
Setup v4_14
- An auxiliary object for printing that allows decoupling the setup from the printing.
- Print
Unix Dialog Linux - A print dialog for platforms which don’t provide a native print dialog, like Unix.
- Printer
Linux - Represents a printer.
- Progress
Bar - Displays the progress of a long-running operation.
- Property
Expression - A
GObject
property value in aExpression
. - Range
- Base class for widgets which visualize an adjustment.
- Recent
Data - Meta-data to be passed to gtk_recent_manager_add_full() when registering a recently used resource.
- Recent
Info - Contains the metadata associated with an item in the recently used files list.
- Recent
Manager - Manages and looks up recently used files.
- Requisition
- Represents the desired size of a widget.
- Revealer
- Animates the transition of its child from invisible to visible.
- Root
- An interface for widgets that can act as the root of a widget hierarchy.
- Scale
- Allows to select a numeric value with a slider control.
- Scale
Button - Provides a button which pops up a scale widget.
- Scroll
Info v4_12
- Provides detailed information on how a scroll operation should be performed.
- Scrollable
- An interface for widgets with native scrolling ability.
- Scrollbar
- Shows a horizontal or vertical scrollbar.
- Scrolled
Window - Makes its child scrollable.
- Search
Bar - Reveals a search entry when search is started.
- Search
Entry - A single-line text entry widget for use as a search entry.
- Section
Model v4_12
- An interface that adds support for sections to list models.
- Selection
Filter Model - A list model that presents the selection from a
SelectionModel
. - Selection
Model - An interface that adds support for selection to list models.
- Separator
- Draws a horizontal or vertical line to separate other widgets.
- Settings
- Provides a mechanism to share global settings between applications.
- Shortcut
- Describes a keyboard shortcut.
- Shortcut
Action - Encodes an action that can be triggered by a keyboard shortcut.
- Shortcut
Action Flags - Flags that can be passed to action activation.
- Shortcut
Controller - Manages keyboard shortcuts and their activation.
- Shortcut
Label Deprecated - This widget will be removed in GTK 5
ShortcutLabel
displays a single keyboard shortcut or gesture. - Shortcut
Manager - An interface that is used to implement shortcut scopes.
- Shortcut
Trigger - Tracks how a
Shortcut
can be activated. - Shortcuts
Group Deprecated - This widget will be removed in GTK 5
A
ShortcutsGroup
represents a group of related keyboard shortcuts or gestures. - Shortcuts
Section Deprecated - This widget will be removed in GTK 5
A
ShortcutsSection
collects all the keyboard shortcuts and gestures for a major application mode. - Shortcuts
Shortcut Deprecated - This widget will be removed in GTK 5
A
ShortcutsShortcut
represents a single keyboard shortcut or gesture with a short text. - Shortcuts
Window Deprecated - This widget will be removed in GTK 5
A
ShortcutsWindow
shows information about the keyboard shortcuts and gestures of an application. - Signal
Action - Emits a signal on a widget.
- Signal
List Item Factory - A
ListItemFactory
that emits signals to manage listitems. - Single
Selection - A selection model that allows selecting a single item.
- Size
Group - Groups widgets together so they all request the same size.
- Slice
List Model - A list model that presents a slice of another model.
- Snapshot
- Assists in creating
gsk::RenderNode
s for widgets. - Sort
List Model - A list model that sorts the elements of another model.
- Sorter
- Describes sorting criteria for a
SortListModel
. - Spin
Button - Allows to enter or change numeric values.
- Spinner
- Displays an icon-size spinning animation.
- Stack
- Shows one of its children at a time.
- Stack
Page - An auxiliary class used by
Stack
. - Stack
Sidebar - Uses a sidebar to switch between
Stack
pages. - Stack
Switcher - Shows a row of buttons to switch between
Stack
pages. - State
Flags - Describes a widget state.
- Statusbar
Deprecated - This widget will be removed in GTK 5
A
Statusbar
widget is usually placed along the bottom of an application’s mainWindow
. - String
Filter - Determines whether to include items by comparing strings to a fixed search term.
- String
List - A list model that wraps an array of strings.
- String
Object - The type of items in a
StringList
. - String
Sorter - Sorts items by comparing strings.
- Style
Context Deprecated - The relevant API has been moved to
Widget
where applicable; otherwise, there is no replacement for querying the style machinery. Stylable UI elements should use widgets.StyleContext
stores styling information affecting a widget. - Style
Context Print Flags - Flags that modify the behavior of gtk_style_context_to_string().
- Style
Provider - An interface for style information used by
StyleContext
. - Switch
- Shows a “light switch” that has two states: on or off.
- Symbolic
Paintable v4_6
- An interface that supports symbolic colors in paintables.
- Text
- A single-line text entry.
- Text
Buffer - Stores text and attributes for display in a
TextView
. - Text
Buffer Notify Flags v4_16
- Values for `callback::Gtk::TextBufferCommitNotify to denote the point of the notification.
- Text
Child Anchor - Marks a spot in a
TextBuffer
where child widgets can be “anchored”. - Text
Iter - Iterates over the contents of a
TextBuffer
. - Text
Mark - Marks a position in a
GtkTextbuffer
that is preserved across modifications. - Text
Search Flags - Flags affecting how a search is done.
- TextTag
- Can be applied to text contained in a
TextBuffer
. - Text
TagTable - Collects the tags in a
TextBuffer
. - Text
View - Displays the contents of a
TextBuffer
. - Tick
Callback Id - Toggle
Button - Shows a button which remains “pressed-in” when clicked.
- Tooltip
- Represents a widget tooltip.
- Tree
Drag Dest Deprecated - List views use widgets to display their contents.
You can use
DropTarget
to implement a drop destination Interface for Drag-and-Drop destinations inTreeView
. - Tree
Drag Source Deprecated - List views use widgets to display their contents.
You can use
DragSource
to implement a drag source Interface for Drag-and-Drop destinations inTreeView
. - Tree
Expander - Provides an expander for a tree-like list.
- Tree
Iter - The
TreeIter
is the primary structure for accessing aTreeModel
. Models are expected to put a unique integer in the @stamp member, and put model-specific data in the three @user_data members. - Tree
List Model - A list model that can create child models on demand.
- Tree
List Row - The type of item used by
TreeListModel
. - Tree
List RowSorter - Applies a gives sorter to the levels in a tree.
- Tree
Model Deprecated - Use
gio::ListModel
instead The tree interface used by GtkTreeView - Tree
Model Filter Deprecated - Use
FilterListModel
instead. ATreeModel
which hides parts of an underlying tree model - Tree
Model Flags Deprecated - These flags indicate various properties of a
TreeModel
. - Tree
Model Sort Deprecated - Use
SortListModel
instead A GtkTreeModel which makes an underlying tree model sortable - Tree
Path - An opaque structure representing a path to a row in a model.
- Tree
RowReference - A GtkTreeRowReference tracks model changes so that it always refers to the
same row (a
TreePath
refers to a position, not a fixed row). Create a new GtkTreeRowReference with gtk_tree_row_reference_new(). - Tree
Selection Deprecated - Use
SelectionModel
instead The selection object for GtkTreeView - Tree
Sortable Deprecated - There is no replacement for this interface. You should
use
SortListModel
to wrap your list model instead The interface for sortable models used by GtkTreeView - Tree
Store Deprecated - Use
TreeListModel
instead A tree-like data structure that can be used with theTreeView
. - Tree
View Deprecated - Use
ListView
for lists, andColumnView
for tabular lists A widget for displaying both trees and lists - Tree
View Column Deprecated - Use
ColumnView
andColumnViewColumn
instead ofTreeView
to show a tabular list A visible column in aTreeView
widget - UriLauncher
v4_10
- Asynchronous API to open a uri with an application.
- Video
- Shows a
MediaStream
with media controls. - Viewport
- Implements scrollability for widgets that don’t support scrolling on their own.
- Volume
Button Deprecated - This widget will be removed in GTK 5
VolumeButton
is aScaleButton
subclass tailored for volume control. - Widget
- The base class for all widgets.
- Widget
Paintable - A
gdk::Paintable
that displays the contents of a widget. - Window
- A toplevel window which can contain other widgets.
- Window
Controls - Shows window frame controls.
- Window
Group - Creates groups of windows that behave like separate applications.
- Window
Handle - Implements titlebar functionality for a window.
Enums§
- Accessible
Announcement Priority v4_14
- The priority of an accessibility announcement.
- Accessible
Autocomplete - The possible values for the
AccessibleProperty::Autocomplete
accessible property. - Accessible
Invalid State - The possible values for the
AccessibleState::Invalid
accessible state. - Accessible
Platform State v4_10
- The various platform states which can be queried
using
AccessibleExt::platform_state()
. - Accessible
Property - The possible accessible properties of a
Accessible
. - Accessible
Relation - The possible accessible relations of a
Accessible
. - Accessible
Role - The accessible role for a
Accessible
implementation. - Accessible
Sort - The possible values for the
AccessibleProperty::Sort
accessible property. - Accessible
State - The possible accessible states of a
Accessible
. - Accessible
Text Content Change v4_14
- The type of contents change operation.
- Accessible
Text Granularity v4_14
- The granularity for queries about the text contents of a
AccessibleText
implementation. - Accessible
Tristate - The possible values for the
AccessibleState::Pressed
accessible state. - Align
- Controls how a widget deals with extra space in a single dimension.
- Arrow
Type - Indicates the direction in which an arrow should point.
- Assistant
Page Type Deprecated - Determines the role of a page inside a
Assistant
. - Baseline
Position - Baseline position in a row of widgets.
- Border
Style - Describes how the border of a UI element should be rendered.
- Builder
Error - Error codes that identify various errors that can occur while using
Builder
. - Buttons
Type - Prebuilt sets of buttons for
Dialog
. - Cell
Renderer Accel Mode - The available modes for
accel-mode
. - Cell
Renderer Mode - Identifies how the user can interact with a particular cell.
- Collation
v4_10
- Describes how a
StringSorter
turns strings into sort keys to compare them. - Constraint
Attribute - The widget attributes that can be used when creating a
Constraint
. - Constraint
Relation - The relation between two terms of a constraint.
- Constraint
Strength - The strength of a constraint, expressed as a symbolic constant.
- Constraint
VflParser Error - Domain for VFL parsing errors.
- Content
Fit v4_8
- Controls how a content should be made to fit inside an allocation.
- Corner
Type - Specifies which corner a child widget should be placed in when packed into
a
ScrolledWindow
- CssParser
Error - Errors that can occur while parsing CSS.
- CssParser
Warning - Warnings that can occur while parsing CSS.
- Delete
Type - Passed to various keybinding signals for deleting text.
- Dialog
Error v4_10
- Error codes in the
GTK_DIALOG_ERROR
domain that can be returned by async dialog functions. - Direction
Type - Focus movement types.
- Editable
Properties - The identifiers for
Editable
properties. - Entry
Icon Position - Specifies the side of the entry at which an icon is placed.
- Event
Sequence State - Describes the state of a
gdk::EventSequence
in aGesture
. - File
Chooser Action - Describes whether a
FileChooser
is being used to open existing files or to save to a possibly new file. - File
Chooser Error - These identify the various errors that can occur while calling
FileChooser
functions. - Filter
Change - Describes changes in a filter in more detail and allows objects using the filter to optimize refiltering items.
- Filter
Match - Describes the known strictness of a filter.
- Font
Level v4_10
- The level of granularity for the font selection.
- Font
Rendering v4_16
- Values for the
gtk-font-rendering
setting that influence how GTK renders fonts. - Graphics
Offload Enabled v4_14
- Represents the state of graphics offloading.
- Icon
Size - Built-in icon sizes.
- Icon
Theme Error - Error codes for
IconTheme
operations. - Icon
View Drop Position - An enum for determining where a dropped item goes.
- Image
Type - Describes the image data representation used by a
Image
. - Input
Purpose - Describes primary purpose of the input widget.
- Inscription
Overflow v4_8
- The different methods to handle text in #GtkInscription when it doesn’t fit the available space.
- Justification
- Used for justifying the text inside a
Label
widget. - Level
BarMode - Describes how
LevelBar
contents should be rendered. - License
- The type of license for an application.
- List
TabBehavior v4_12
- Used to configure the focus behavior in the
GTK_DIR_TAB_FORWARD
andGTK_DIR_TAB_BACKWARD
direction, like the Tab key in aListView
. - Message
Type - The type of message being displayed in a
MessageDialog
. - Movement
Step - Passed as argument to various keybinding signals for moving the cursor position.
- Natural
Wrap Mode v4_6
- Options for selecting a different wrap mode for natural size requests.
- Notebook
Tab - The parameter used in the action signals of
Notebook
. - Number
UpLayout - Used to determine the layout of pages on a sheet when printing multiple pages per sheet.
- Ordering
- Describes the way two values can be compared.
- Orientation
- Represents the orientation of widgets and other objects.
- Overflow
- Defines how content overflowing a given area should be handled.
- Pack
Type - Represents the packing location of a children in its parent.
- PadAction
Type - The type of a pad action.
- Page
Orientation - See also gtk_print_settings_set_orientation().
- PageSet
- See also gtk_print_job_set_page_set().
- PanDirection
- Describes the panning direction of a
GesturePan
. - Policy
Type - Determines how the size should be computed to achieve the one of the visibility mode for the scrollbars.
- Position
Type - Describes which edge of a widget a certain feature is positioned at.
- Print
Duplex - See also gtk_print_settings_set_duplex().
- Print
Error - Error codes that identify various errors that can occur while using the GTK printing support.
- Print
Operation Action - Determines what action the print operation should perform.
- Print
Operation Result - The result of a print operation.
- Print
Pages - See also gtk_print_job_set_pages()
- Print
Quality - See also gtk_print_settings_set_quality().
- Print
Status - The status gives a rough indication of the completion of a running print operation.
- Propagation
Limit - Describes limits of a
EventController
for handling events targeting other widgets. - Propagation
Phase - Describes the stage at which events are fed into a
EventController
. - Recent
Manager Error - Error codes for
RecentManager
operations - Response
Type - Predefined values for use as response ids in gtk_dialog_add_button().
- Revealer
Transition Type - These enumeration values describe the possible transitions
when the child of a
Revealer
widget is shown or hidden. - Scroll
Step - Passed as argument to various keybinding signals.
- Scroll
Type - Scrolling types.
- Scrollable
Policy - Defines the policy to be used in a scrollable widget when updating the scrolled window adjustments in a given orientation.
- Selection
Mode - Used to control what selections users are allowed to make.
- Sensitivity
Type - Determines how GTK handles the sensitivity of various controls, such as combo box buttons.
- Shortcut
Scope - Describes where
Shortcut
s added to aShortcutController
get handled. - Shortcut
Type - GtkShortcutType specifies the kind of shortcut that is being described.
- Size
Group Mode - The mode of the size group determines the directions in which the size group affects the requested sizes of its component widgets.
- Size
Request Mode - Specifies a preference for height-for-width or width-for-height geometry management.
- Sort
Column Deprecated - Sort
Type - Determines the direction of a sort.
- Sorter
Change - Describes changes in a sorter in more detail and allows users to optimize resorting.
- Sorter
Order - Describes the type of order that a
Sorter
may produce. - Spin
Button Update Policy - Determines whether the spin button displays values outside the adjustment bounds.
- Spin
Type - The values of the GtkSpinType enumeration are used to specify the change to make in gtk_spin_button_spin().
- Stack
Transition Type - Possible transitions between pages in a
Stack
widget. - String
Filter Match Mode - Specifies how search strings are matched inside text.
- Symbolic
Color v4_6
- The indexes of colors passed to symbolic color rendering, such as
vfunc::Gtk::SymbolicPaintable::snapshot_symbolic
. - System
Setting - Values that can be passed to the
WidgetImpl::system_setting_changed()
vfunc. - Text
Direction - Reading directions for text.
- Text
Extend Selection - Granularity types that extend the text selection. Use the
GtkTextView::extend-selection
signal to customize the selection. - Text
View Layer - Used to reference the layers of
TextView
for the purpose of customized drawing with the ::snapshot_layer vfunc. - Text
Window Type - Used to reference the parts of
TextView
. - Tree
View Column Sizing - The sizing method the column uses to determine its width. Please note
that
Autosize
are inefficient for large views, and can make columns appear choppy. - Tree
View Drop Position - An enum for determining where a dropped row goes.
- Tree
View Grid Lines - Used to indicate which grid lines to draw in a tree view.
- Unit
- See also gtk_print_settings_set_paper_width().
- Wrap
Mode - Describes a type of line wrapping.
Constants§
- ACCESSIBLE_
VALUE_ UNDEFINED - An undefined value. The accessible attribute is either unset, or its value is undefined.
- INVALID_
LIST_ POSITION - The value used to refer to a guaranteed invalid position
in a
GListModel
. - PRIORITY_
RESIZE - Use this priority for functionality related to size allocation.
- STYLE_
PROVIDER_ PRIORITY_ APPLICATION - A priority that can be used when adding a
StyleProvider
for application-specific style information. - STYLE_
PROVIDER_ PRIORITY_ FALLBACK - The priority used for default style information that is used in the absence of themes.
- STYLE_
PROVIDER_ PRIORITY_ SETTINGS - The priority used for style information provided
via
Settings
. - STYLE_
PROVIDER_ PRIORITY_ THEME - The priority used for style information provided by themes.
- STYLE_
PROVIDER_ PRIORITY_ USER - The priority used for the style information from
$XDG_CONFIG_HOME/gtk-4.0/gtk.css
. - TEXT_
VIEW_ PRIORITY_ VALIDATE - The priority at which the text view validates onscreen lines in an idle job in the background.
Statics§
- ACCESSIBLE_
ATTRIBUTE_ BACKGROUND v4_14
- An attribute for the background color, expressed as an RGB value
encoded in a string using the format:
{r8},{g8},{b8}
. - ACCESSIBLE_
ATTRIBUTE_ FAMILY v4_14
- An attribute for the font family name.
- ACCESSIBLE_
ATTRIBUTE_ FOREGROUND v4_14
- An attribute for the foreground color, expressed as an RGB value
encoded in a string using the format:
{r8},{g8},{b8}
. - ACCESSIBLE_
ATTRIBUTE_ OVERLINE v4_14
- An attribute for the overline style.
- ACCESSIBLE_
ATTRIBUTE_ OVERLINE_ NONE v4_14
- The “none” overline value for
Gtk::ACCESSIBLE_ATTRIBUTE_OVERLINE
. - ACCESSIBLE_
ATTRIBUTE_ OVERLINE_ SINGLE v4_14
- The “single” overline value for
Gtk::ACCESSIBLE_ATTRIBUTE_OVERLINE
. - ACCESSIBLE_
ATTRIBUTE_ SIZE v4_14
- An attribute for the font size, expressed in points.
- ACCESSIBLE_
ATTRIBUTE_ STRETCH v4_14
- An attribute for the font stretch type.
- ACCESSIBLE_
ATTRIBUTE_ STRETCH_ CONDENSED v4_14
- The “condensed” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ EXPANDED v4_14
- The “expanded” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ EXTRA_ CONDENSED v4_14
- The “extra condensed” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ EXTRA_ EXPANDED v4_14
- The “extra expanded” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ NORMAL v4_14
- The “normal” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ SEMI_ CONDENSED v4_14
- The “semi condensed” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ SEMI_ EXPANDED v4_14
- The “semi expanded” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ ULTRA_ CONDENSED v4_14
- The “ultra condensed” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRETCH_ ULTRA_ EXPANDED v4_14
- The “ultra expanded” stretch value for
Gtk::ACCESSIBLE_ATTRIBUTE_STRETCH
. - ACCESSIBLE_
ATTRIBUTE_ STRIKETHROUGH v4_14
- An attribute for strikethrough text.
- ACCESSIBLE_
ATTRIBUTE_ STYLE v4_14
- An attribute for the font style.
- ACCESSIBLE_
ATTRIBUTE_ STYLE_ ITALIC v4_14
- The “italic” style value for
Gtk::ACCESSIBLE_ATTRIBUTE_STYLE
. - ACCESSIBLE_
ATTRIBUTE_ STYLE_ NORMAL v4_14
- The “normal” style value for
Gtk::ACCESSIBLE_ATTRIBUTE_STYLE
. - ACCESSIBLE_
ATTRIBUTE_ STYLE_ OBLIQUE v4_14
- The “oblique” style value for
Gtk::ACCESSIBLE_ATTRIBUTE_STYLE
. - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE v4_14
- An attribute for the underline style.
- ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ DOUBLE v4_14
- The “double” underline value for
Gtk::ACCESSIBLE_ATTRIBUTE_UNDERLINE
. - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ ERROR v4_14
- The “error” underline value for
Gtk::ACCESSIBLE_ATTRIBUTE_UNDERLINE
. - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ NONE v4_14
- The “none” underline value for
Gtk::ACCESSIBLE_ATTRIBUTE_UNDERLINE
. - ACCESSIBLE_
ATTRIBUTE_ UNDERLINE_ SINGLE v4_14
- The “single” underline value for
Gtk::ACCESSIBLE_ATTRIBUTE_UNDERLINE
. - ACCESSIBLE_
ATTRIBUTE_ VARIANT v4_14
- An attribute for the font variant.
- ACCESSIBLE_
ATTRIBUTE_ VARIANT_ ALL_ PETITE_ CAPS v4_14
- The “all petite caps” variant value for
Gtk::ACCESSIBLE_ATTRIBUTE_VARIANT
. - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ ALL_ SMALL_ CAPS v4_14
- The “all small caps” variant value for
Gtk::ACCESSIBLE_ATTRIBUTE_VARIANT
. - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ PETITE_ CAPS v4_14
- The “petite caps” variant value for
Gtk::ACCESSIBLE_ATTRIBUTE_VARIANT
. - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ SMALL_ CAPS v4_14
- The “small caps” variant value for
Gtk::ACCESSIBLE_ATTRIBUTE_VARIANT
. - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ TITLE_ CAPS v4_14
- The “title caps” variant value for
Gtk::ACCESSIBLE_ATTRIBUTE_VARIANT
. - ACCESSIBLE_
ATTRIBUTE_ VARIANT_ UNICASE v4_14
- The “unicase” variant value for
Gtk::ACCESSIBLE_ATTRIBUTE_VARIANT
. - ACCESSIBLE_
ATTRIBUTE_ WEIGHT v4_14
- An attribute for the font weight.
- IM_
MODULE_ EXTENSION_ POINT_ NAME - The default name of the extension point.
- LEVEL_
BAR_ OFFSET_ FULL - The name used for the stock full offset included by
LevelBar
. - LEVEL_
BAR_ OFFSET_ HIGH - The name used for the stock high offset included by
LevelBar
. - LEVEL_
BAR_ OFFSET_ LOW - The name used for the stock low offset included by
LevelBar
. - MEDIA_
FILE_ EXTENSION_ POINT_ NAME - The default extension point name for media file.
- PAPER_
NAME_ A3 - Name for the A3 paper size.
- PAPER_
NAME_ A4 - Name for the A4 paper size.
- PAPER_
NAME_ A5 - Name for the A5 paper size.
- PAPER_
NAME_ B5 - Name for the B5 paper size.
- PAPER_
NAME_ EXECUTIVE - Name for the Executive paper size.
- PAPER_
NAME_ LEGAL - Name for the Legal paper size.
- PAPER_
NAME_ LETTER - Name for the Letter paper size.
- PRINT_
SETTINGS_ COLLATE - The key used by the “Print to file” printer to store whether to collate the printed pages.
- PRINT_
SETTINGS_ DEFAULT_ SOURCE - The key used by the “Print to file” printer to store the default source.
- PRINT_
SETTINGS_ DITHER - The key used by the “Print to file” printer to store the dither used.
- PRINT_
SETTINGS_ DUPLEX - The key used by the “Print to file” printer to store whether to print the output in duplex.
- PRINT_
SETTINGS_ FINISHINGS - The key used by the “Print to file” printer to store the finishings.
- PRINT_
SETTINGS_ MEDIA_ TYPE - The key used by the “Print to file” printer to store the media type.
- PRINT_
SETTINGS_ NUMBER_ UP - The key used by the “Print to file” printer to store the number of pages per sheet.
- PRINT_
SETTINGS_ NUMBER_ UP_ LAYOUT - The key used by the “Print to file” printer to store the number of pages per sheet in number-up mode.
- PRINT_
SETTINGS_ N_ COPIES - The key used by the “Print to file” printer to store the number of copies.
- PRINT_
SETTINGS_ ORIENTATION - The key used by the “Print to file” printer to store the orientation.
- PRINT_
SETTINGS_ OUTPUT_ BASENAME - The key used by the “Print to file” printer to store the file name of the output without the path to the directory and the file extension.
- PRINT_
SETTINGS_ OUTPUT_ BIN - The key used by the “Print to file” printer to store the output bin.
- PRINT_
SETTINGS_ OUTPUT_ DIR - The key used by the “Print to file” printer to store the directory to which the output should be written.
- PRINT_
SETTINGS_ OUTPUT_ FILE_ FORMAT - The key used by the “Print to file” printer to store the format of the output. The supported values are “PS” and “PDF”.
- PRINT_
SETTINGS_ OUTPUT_ URI - The key used by the “Print to file” printer to store the URI to which the output should be written. GTK itself supports only “file://” URIs.
- PRINT_
SETTINGS_ PAGE_ RANGES - The key used by the “Print to file” printer to store the array of page ranges to print.
- PRINT_
SETTINGS_ PAGE_ SET - The key used by the “Print to file” printer to store the set of pages to print.
- PRINT_
SETTINGS_ PAPER_ FORMAT - The key used by the “Print to file” printer to store the page format.
- PRINT_
SETTINGS_ PAPER_ HEIGHT - The key used by the “Print to file” printer to store the page height.
- PRINT_
SETTINGS_ PAPER_ WIDTH - The key used by the “Print to file” printer to store the paper width.
- PRINT_
SETTINGS_ PRINTER - The key used by the “Print to file” printer to store the printer name.
- PRINT_
SETTINGS_ PRINTER_ LPI - The key used by the “Print to file” printer to store the resolution in lines per inch.
- PRINT_
SETTINGS_ PRINT_ PAGES - The key used by the “Print to file” printer to store which pages to print.
- PRINT_
SETTINGS_ QUALITY - The key used by the “Print to file” printer to store the printing quality.
- PRINT_
SETTINGS_ RESOLUTION - The key used by the “Print to file” printer to store the resolution in DPI.
- PRINT_
SETTINGS_ RESOLUTION_ X - The key used by the “Print to file” printer to store the horizontal resolution in DPI.
- PRINT_
SETTINGS_ RESOLUTION_ Y - The key used by the “Print to file” printer to store the vertical resolution in DPI.
- PRINT_
SETTINGS_ REVERSE - The key used by the “Print to file” printer to store whether to reverse the order of the printed pages.
- PRINT_
SETTINGS_ SCALE - The key used by the “Print to file” printer to store the scale.
- PRINT_
SETTINGS_ USE_ COLOR - The key used by the “Print to file” printer to store whether to print with colors.
- PRINT_
SETTINGS_ WIN32_ DRIVER_ EXTRA - The key used by the “Print to file” printer to store 32-bit Windows extra driver.
- PRINT_
SETTINGS_ WIN32_ DRIVER_ VERSION - The key used by the “Print to file” printer to store the 32-bit Windows driver version.
Functions§
- accelerator_
get_ default_ mod_ mask - Gets the modifier mask.
- accelerator_
get_ label - Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.
- accelerator_
get_ label_ with_ keycode - Converts an accelerator keyval and modifier mask into a string that can be displayed to the user.
- accelerator_
name - Converts an accelerator keyval and modifier mask into a string
that can be parsed by
accelerator_parse()
. - accelerator_
name_ with_ keycode - Converts an accelerator keyval and modifier mask
into a string that can be parsed by
accelerator_parse_with_keycode()
. - accelerator_
parse - Parses a string representing an accelerator.
- accelerator_
parse_ with_ keycode - Parses a string representing an accelerator.
- accelerator_
valid - Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.
- binary_
age - Returns the binary age as passed to
libtool
. - check_
version - Checks that the GTK library in use is compatible with the given version.
- debug_
flags - Returns the GTK debug flags that are currently active.
- default_
language - Returns the
pango::Language
for the default language currently in effect. - disable_
portals v4_18
- Prevents GTK from using portals.
- disable_
setlocale - Prevents
init()
andinit_check()
from callingsetlocale()
. - enumerate_
printers Linux - Calls a function for all printers that are known to GTK.
- hsv_
to_ rgb - Converts a color from HSV space to RGB.
- init
- Tries to initialize GTK.
- interface_
age - Returns the interface age as passed to
libtool
. - 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 - Gets the direction of the current locale.
- major_
version - Returns the major version number of the GTK library.
- micro_
version - Returns the micro version number of the GTK library.
- minor_
version - Returns the minor version number of the GTK library.
- print_
run_ page_ setup_ dialog - Runs a page setup dialog, letting the user modify the values from @page_setup.
- print_
run_ page_ setup_ dialog_ async - Runs a page setup dialog, letting the user modify the values from @page_setup.
- render_
activity Deprecated - Renders an activity indicator (such as in
Spinner
). The stateStateFlags::CHECKED
determines whether there is activity going on. - render_
arrow Deprecated - Renders an arrow pointing to @angle.
- render_
background Deprecated - Renders the background of an element.
- render_
check Deprecated - Renders a checkmark (as in a
CheckButton
). - render_
expander Deprecated - Renders an expander (as used in
TreeView
andExpander
) in the area defined by @x, @y, @width, @height. The stateStateFlags::CHECKED
determines whether the expander is collapsed or expanded. - render_
focus Deprecated - Renders a focus indicator on the rectangle determined by @x, @y, @width, @height.
- render_
frame Deprecated - Renders a frame around the rectangle defined by @x, @y, @width, @height.
- render_
handle Deprecated - Renders a handle (as in
Paned
andWindow
’s resize grip), in the rectangle determined by @x, @y, @width, @height. - render_
icon Deprecated - Renders the icon in @texture at the specified @x and @y coordinates.
- render_
layout Deprecated - Renders @layout on the coordinates @x, @y
- render_
line Deprecated - Renders a line from (x0, y0) to (x1, y1).
- render_
option Deprecated - Renders an option mark (as in a radio button), the
StateFlags::CHECKED
state will determine whether the option is on or off, andStateFlags::INCONSISTENT
whether it should be marked as undefined. - rgb_
to_ hsv - Converts a color from RGB space to HSV.
- set_
debug_ flags - Sets the GTK debug flags.
- set_
initialized ⚠ - Informs this crate that GTK has been initialized and the current thread is the main one.
- show_
about_ dialog - A convenience function for showing an application’s about dialog.
- show_
uri Deprecated - This function launches the default application for showing a given uri, or shows an error dialog if that fails.
- show_
uri_ full Deprecated - This function launches the default application for showing a given uri.
- show_
uri_ full_ future Deprecated - style_
context_ add_ provider_ for_ display - style_
context_ remove_ provider_ for_ display - test_
accessible_ assertion_ message_ role - Prints an assertion message for gtk_test_accessible_assert_role().
- test_
accessible_ has_ property - Checks whether the
Accessible
has @property set. - test_
accessible_ has_ relation - Checks whether the
Accessible
has @relation set. - test_
accessible_ has_ role - Checks whether the
GtkAccessible:accessible-role
of the accessible is @role. - test_
accessible_ has_ state - Checks whether the
Accessible
has @state set. - test_
list_ all_ types - Return the type ids that have been registered after calling gtk_test_register_all_types().
- test_
register_ all_ types - Force registration of all core GTK object types.
- test_
widget_ wait_ for_ draw - Enters the main loop and waits for @widget to be “drawn”.
- tree_
create_ row_ drag_ content Deprecated - Creates a content provider for dragging @path from @tree_model.
- tree_
get_ row_ drag_ data Deprecated - Obtains a @tree_model and @path from value of target type
GTK_TYPE_TREE_ROW_DATA
.