Namespace

Gtk – 4.0

The GTK toolkit

Version4.1.0
AuthorsGTK Development Team
LicenseGPL-2.1-or-later
Websitehttps://www.gtk.org
Browse codehttps://gitlab.gnome.org/GNOME/gtk/

Build

C headersgtk/gtk.h
pkg-config filesgtk4

Dependencies

GObject The base type system library
Browse documentation
Graphene A thin layer of mathematical types for 3D libraries
Browse documentation
Pango Text shaping and rendering
Browse documentation
GDK The GTK windowing system abstraction
Browse documentation
GSK The GTK rendering abstraction
Browse documentation

Classes

AboutDialog

The GtkAboutDialog offers a simple way to display information about a program like its logo, name, copyright, website and license.

ActionBar

GtkActionBar is designed to present contextual actions. It is expected to be displayed below the content and expand horizontally to fill the area.

ActivateAction

A GtkShortcutAction that calls gtk_widget_activate().

Adjustment

The GtkAdjustment object represents a value which has an associated lower and upper bound, together with step and page increments, and a page size. It is used within several GTK widgets, including GtkSpinButton, GtkViewport, and GtkRange (which is a base class for GtkScrollbar and GtkScale).

AlternativeTrigger

A GtkShortcutTrigger that triggers when either of two GtkShortcutTriggers trigger.

AnyFilter
AppChooserButton

The GtkAppChooserButton lets the user select an application.

AppChooserDialog

GtkAppChooserDialog shows a GtkAppChooserWidget inside a GtkDialog.

AppChooserWidget

GtkAppChooserWidget is a widget for selecting applications. It is the main building block for GtkAppChooserDialog. Most applications only need to use the latter; but you can use this widget as part of a larger widget if you have special needs.

Application

GtkApplication is a class that handles many important aspects of a GTK application in a convenient fashion, without enforcing a one-size-fits-all application model.

ApplicationWindow

GtkApplicationWindow is a GtkWindow subclass that offers some extra functionality for better integration with GtkApplication features. Notably, it can handle an application menubar.

AspectFrame

GtkAspectFrame is useful when you want pack a widget so that it can resize while retaining the same aspect ratio. For instance, one might be drawing a small preview of a larger image.

Assistant

A GtkAssistant is a widget used to represent a generally complex operation split up into several steps. Each step consists of one or more pages. GtkAssistant guides the user through the pages, and controls the page flow to collect the data needed for the operation.

AssistantPage
ATContext

GtkATContext is an abstract class provided by GTK to communicate to platform-specific assistive technologies API.

BinLayout

GtkBinLayout is a GtkLayoutManager subclass useful for create “bins” of widgets. GtkBinLayout will stack each child of a widget on top of each other, using the GtkWidget:hexpand, GtkWidget:vexpand, GtkWidget:halign, and GtkWidget:valign properties of each child to determine where they should be positioned.

BookmarkList

GtkBookmarkList is a list model that wraps GBookmarkFile. It presents a GListModel and fills it asynchronously with the GFileInfos returned from that function.

BoolFilter

GtkBoolFilter is a simple filter that takes a boolean GtkExpression to determine whether to include items.

Box

The GtkBox widget arranges child widgets into a single row or column, depending upon the value of its GtkOrientable:orientation property. Within the other dimension, all children are allocated the same size. Of course, the GtkWidget:halign and GtkWidget:valign properties can be used on the children to influence their allocation.

BoxLayout

A GtkBoxLayout is a layout manager that arranges the children of any widget using it into a single row or column, depending on the value of its GtkOrientable:orientation property. Within the other dimension all children all allocated the same size. The GtkBoxLayout will respect the GtkWidget:halign and GtkWidget:valign properties of each child widget.

Builder

A GtkBuilder is an auxiliary object that reads textual descriptions of a user interface and instantiates the described objects.

BuilderCScope
BuilderListItemFactory

GtkBuilderListItemFactory is a GtkListItemFactory that creates widgets by instantiating GtkBuilder UI templates. The templates must be extending GtkListItem, and typically use GtkExpressions to obtain data from the items in the model.

Button

The GtkButton widget is generally used to trigger a callback function that is called when the button is pressed.

Calendar

GtkCalendar is a widget that displays a Gregorian calendar, one month at a time.

CallbackAction

A GtkShortcutAction that invokes a callback.

CClosureExpression

A variant of GtkClosureExpression using a C closure.

CellArea

The GtkCellArea is an abstract class for GtkCellLayout widgets (also referred to as “layouting widgets”) to interface with an arbitrary number of GtkCellRenderers and interact with the user for a given GtkTreeModel row.

CellAreaBox

The GtkCellAreaBox renders cell renderers into a row or a column depending on its GtkOrientation.

CellAreaContext

The GtkCellAreaContext object is created by a given GtkCellArea implementation via its GtkCellAreaClass.create_context() virtual method and is used to store cell sizes and alignments for a series of GtkTreeModel rows that are requested and rendered in the same context.

CellRenderer

The GtkCellRenderer is a base class of a set of objects used for rendering a cell to a #cairo_t. These objects are used primarily by the GtkTreeView widget, though they aren’t tied to them in any specific way. It is worth noting that GtkCellRenderer is not a GtkWidget and cannot be treated as such.

CellRendererAccel

GtkCellRendererAccel displays a keyboard accelerator (i.e. a key combination like Control + a). If the cell renderer is editable, the accelerator can be changed by simply typing the new combination.

CellRendererCombo

GtkCellRendererCombo renders text in a cell like GtkCellRendererText from which it is derived. But while GtkCellRendererText offers a simple entry to edit the text, GtkCellRendererCombo offers a GtkComboBox widget to edit the text. The values to display in the combo box are taken from the tree model specified in the GtkCellRendererCombo:model property.

CellRendererPixbuf

A GtkCellRendererPixbuf can be used to render an image in a cell. It allows to render either a given GdkPixbuf (set via the GtkCellRendererPixbuf:pixbuf property) or a named icon (set via the GtkCellRendererPixbuf:icon-name property).

CellRendererProgress

GtkCellRendererProgress renders a numeric value as a progress par in a cell. Additionally, it can display a text on top of the progress bar.

CellRendererSpin

GtkCellRendererSpin renders text in a cell like GtkCellRendererText from which it is derived. But while GtkCellRendererText offers a simple entry to edit the text, GtkCellRendererSpin offers a GtkSpinButton widget. Of course, that means that the text has to be parseable as a floating point number.

CellRendererSpinner

GtkCellRendererSpinner renders a spinning animation in a cell, very similar to GtkSpinner. It can often be used as an alternative to a GtkCellRendererProgress for displaying indefinite activity, instead of actual progress.

CellRendererText

A GtkCellRendererText renders a given text in its cell, using the font, color and style information provided by its properties. The text will be ellipsized if it is too long and the GtkCellRendererText:ellipsize property allows it.

CellRendererToggle

GtkCellRendererToggle renders a toggle button in a cell. The button is drawn as a radio or a checkbutton, depending on the GtkCellRendererToggle:radio property. When activated, it emits the GtkCellRendererToggle::toggled signal.

CellView

A GtkCellView displays a single row of a GtkTreeModel using a GtkCellArea and GtkCellAreaContext. A GtkCellAreaContext can be provided to the GtkCellView at construction time in order to keep the cellview in context of a group of cell views, this ensures that the renderers displayed will be properly aligned with each other (like the aligned cells in the menus of GtkComboBox).

CenterBox

The GtkCenterBox widget arranges three children in a horizontal or vertical arrangement, keeping the middle child centered as well as possible.

CenterLayout

A GtkCenterLayout is a layout manager that manages up to three children. The start widget is allocated at the start of the layout (left in LRT layouts and right in RTL ones), and the end widget at the end.

CheckButton

A GtkCheckButton places a label next to an indicator.

ClosureExpression

An expression using a custom GClosure to compute the value from its parameters.

ColorButton

The GtkColorButton allows to open a color chooser dialog to change the color.

ColorChooserDialog

The GtkColorChooserDialog widget is a dialog for choosing a color. It implements the GtkColorChooser interface.

ColorChooserWidget

The GtkColorChooserWidget widget lets the user select a color. By default, the chooser presents a predefined palette of colors, plus a small number of settable custom colors. It is also possible to select a different color with the single-color editor. To enter the single-color editing mode, use the context menu of any color of the palette, or use the ‘+’ button to add a new custom color.

ColumnView

GtkColumnView is a widget to present a view into a large dynamic list of items using multiple columns with headers.

ColumnViewColumn

GtkColumnViewColumn represents the columns being added to GtkColumnView.

ComboBox

A GtkComboBox is a widget that allows the user to choose from a list of valid choices.

ComboBoxText

A GtkComboBoxText is a simple variant of GtkComboBox for text-only use cases.

ConstantExpression

A constant value in a GtkExpression.

Constraint

GtkConstraint describes a constraint between an attribute on a widget and another attribute on another widget, expressed as a linear equation.

ConstraintGuide

A GtkConstraintGuide is an invisible layout element that can be used by widgets inside a GtkConstraintLayout as a source or a target of a GtkConstraint. Guides can be used like guidelines or as flexible space.

ConstraintLayout

A layout manager using constraints

ConstraintLayoutChild

A GtkLayoutChild in a GtkConstraintLayout.

CssProvider

GtkCssProvider is an object implementing the GtkStyleProvider interface. It is able to parse [CSS-like][css-overview] input in order to style widgets.

CustomFilter

GtkCustomFilter is a GtkFilter that uses a callback to determine whether to include an item or not.

CustomLayout

GtkCustomLayout is a convenience type meant to be used as a transition mechanism between GtkWidgets implementing a layout policy, and GtkLayoutManager classes.

CustomSorter

GtkCustomSorter is a GtkSorter implementation that sorts via a traditional GCompareDataFunc callback.

Dialog

Dialogs are a convenient way to prompt the user for a small amount of input, e.g. to display a message, ask a question, or anything else that does not require extensive effort on the user’s part.

DirectoryList

GtkDirectoryList is a list model that wraps g_file_enumerate_children_async(). It presents a GListModel and fills it asynchronously with the GFileInfos returned from that function.

DragIcon

GtkDragIcon is a GtkRoot implementation with the sole purpose to serve as a drag icon during DND operations. A drag icon moves with the pointer during a drag operation and is destroyed when the drag ends.

DragSource

GtkDragSource is an event controller that is used to initiate Drag-And-Drop operations.

DrawingArea

GtkDrawingArea is a widget that allows drawing with cairo.

DropControllerMotion

GtkDropControllerMotion is an event controller meant for tracking the pointer hovering over a widget during a drag and drop operation.

DropDown

GtkDropDown is a widget that allows the user to choose an item from a list of options.

DropTarget

GtkDropTarget is an event controller implementing a simple way to receive Drag-and-Drop operations.

DropTargetAsync

GtkDropTargetAsync is an auxiliary object that can be used to receive Drag-and-Drop operations. It is the more complete but also more complex method of handling drop operations compared to GtkDropTarget and you should only use it if GtkDropTarget doesn’t provide all the features you need.

EditableLabel

A GtkEditableLabel is a label that allows users to edit the text by switching to an “edit mode”.

EmojiChooser

The GtkEmojiChooser popover is used by text widgets such as GtkEntry or GtkTextView to offer users a convenient way to insert Emoji characters.

Entry

GtkEntry is a single line text entry widget.

EntryBuffer

The GtkEntryBuffer class contains the actual text displayed in a GtkEntry widget.

EntryCompletion

GtkEntryCompletion is an auxiliary object to be used in conjunction with GtkEntry to provide the completion functionality. It implements the GtkCellLayout interface, to allow the user to add extra cells to the GtkTreeView with completion matches.

EventController

GtkEventController is a base, low-level implementation for event controllers: ancillary object associated to widgets, which react to a series of GdkEvents, and possibly trigger actions as a consequence.

EventControllerFocus

GtkEventControllerFocus is an event controller meant for situations where you need to know where the focus is.

EventControllerKey

GtkEventControllerKey is an event controller meant for situations where you need access to key events.

EventControllerLegacy

GtkEventControllerLegacy is an event controller that gives you direct access to the event stream. It should only be used as a last resort if none of the other event controllers or gestures do the job.

EventControllerMotion

GtkEventControllerMotion is an event controller meant for situations where you need to track the position of the pointer.

EventControllerScroll

GtkEventControllerScroll is an event controller meant to handle scroll events from mice and touchpads. It is capable of handling both discrete and continuous scroll events, abstracting them both on the GtkEventControllerScroll::scroll signal (deltas in the discrete case are multiples of 1).

EveryFilter
Expander

A GtkExpander allows the user to hide or show its child by clicking on an expander triangle similar to the triangles used in a GtkTreeView.

Expression

GtkExpression provides a way to describe references to values.

FileChooserDialog

GtkFileChooserDialog is a dialog box suitable for use with “File Open” or “File Save” commands. This widget works by putting a GtkFileChooserWidget inside a GtkDialog. It exposes the GtkFileChooser interface, so you can use all of the GtkFileChooser functions on the file chooser dialog as well as those for GtkDialog.

FileChooserNative

GtkFileChooserNative is an abstraction of a dialog box suitable for use with “File Open” or “File Save as” commands. By default, this just uses a GtkFileChooserDialog to implement the actual dialog. However, on certain platforms, such as Windows and macOS, the native platform file chooser is used instead. When the application is running in a sandboxed environment without direct filesystem access (such as Flatpak), GtkFileChooserNative may call the proper APIs (portals) to let the user choose a file and make it available to the application.

FileChooserWidget

GtkFileChooserWidget is a widget for choosing files. It exposes the GtkFileChooser interface, and you should use the methods of this interface to interact with the widget.

FileFilter

A GtkFileFilter can be used to restrict the files being shown in a GtkFileChooser. Files can be filtered based on their name (with gtk_file_filter_add_pattern()) or on their mime type (with gtk_file_filter_add_mime_type()).

Filter

A GtkFilter object describes the filtering to be performed by a GtkFilterListModel.

FilterListModel

GtkFilterListModel is a list model that filters a given other listmodel. It hides some elements from the other model according to criteria given by a GtkFilter.

Fixed

The GtkFixed widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. GtkFixed performs no automatic layout management.

FixedLayout

GtkFixedLayout is a layout manager which can place child widgets at fixed positions, and with fixed sizes.

FixedLayoutChild
FlattenListModel

GtkFlattenListModel is a list model that takes a list model containing list models and flattens it into a single model.

FlowBox

A GtkFlowBox positions child widgets in sequence according to its orientation.

FlowBoxChild
FontButton

The GtkFontButton allows to open a font chooser dialog to change the font.

FontChooserDialog

The GtkFontChooserDialog widget is a dialog for selecting a font. It implements the GtkFontChooser interface.

FontChooserWidget

The GtkFontChooserWidget widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the GtkFontChooserDialog widget to provide a dialog box for selecting fonts.

Frame

The frame widget is a widget that surrounds its child with a decorative frame and an optional label. If present, the label is drawn inside the top edge of the frame. The horizontal position of the label can be controlled with gtk_frame_set_label_align().

Gesture

GtkGesture is the base object for gesture recognition, although this object is quite generalized to serve as a base for multi-touch gestures, it is suitable to implement single-touch and pointer-based gestures (using the special NULL GdkEventSequence value for these).

GestureClick

GtkGestureClick is a GtkGesture implementation able to recognize multiple clicks on a nearby zone, which can be listened for through the GtkGestureClick::pressed signal. Whenever time or distance between clicks exceed the GTK defaults, GtkGestureClick::stopped is emitted, and the click counter is reset.

GestureDrag

GtkGestureDrag is a GtkGesture implementation that recognizes drag operations. The drag operation itself can be tracked throughout the GtkGestureDrag::drag-begin, GtkGestureDrag::drag-update and GtkGestureDrag::drag-end signals, or the relevant coordinates be extracted through gtk_gesture_drag_get_offset() and gtk_gesture_drag_get_start_point().

GestureLongPress

GtkGestureLongPress is a GtkGesture implementation able to recognize long presses, triggering the GtkGestureLongPress::pressed after the timeout is exceeded.

GesturePan

GtkGesturePan is a GtkGesture implementation able to recognize pan gestures, those are drags that are locked to happen along one axis. The axis that a GtkGesturePan handles is defined at construct time, and can be changed through gtk_gesture_pan_set_orientation().

GestureRotate

GtkGestureRotate is a GtkGesture implementation able to recognize 2-finger rotations, whenever the angle between both handled sequences changes, the GtkGestureRotate::angle-changed signal is emitted.

GestureSingle

GtkGestureSingle is a subclass of GtkGesture, optimized (although not restricted) for dealing with mouse and single-touch gestures. Under interaction, these gestures stick to the first interacting sequence, which is accessible through gtk_gesture_single_get_current_sequence() while the gesture is being interacted with.

GestureStylus

GtkGestureStylus is a GtkGesture implementation specific to stylus input. The provided signals just relay the basic information of the stylus events.

GestureSwipe

GtkGestureSwipe is a GtkGesture implementation able to recognize swipes, after a press/move/…/move/release sequence happens, the GtkGestureSwipe::swipe signal will be emitted, providing the velocity and directionality of the sequence at the time it was lifted.

GestureZoom

GtkGestureZoom is a GtkGesture implementation able to recognize pinch/zoom gestures, whenever the distance between both tracked sequences changes, the GtkGestureZoom::scale-changed signal is emitted to report the scale factor.

GLArea

GtkGLArea is a widget that allows drawing with OpenGL.

Grid

GtkGrid is a container which arranges its child widgets in rows and columns, with arbitrary positions and horizontal/vertical spans.

GridLayout

GtkGridLayout is a layout manager which arranges child widgets in rows and columns, with arbitrary positions and horizontal/vertical spans.

GridLayoutChild

Layout properties for children of GtkGridLayout.

GridView

GtkGridView is a widget to present a view into a large dynamic grid of items.

HeaderBar

GtkHeaderBar is a widget for creating custom title bars for GtkWindow.

IconPaintable

Contains information found when looking up an icon in an icon theme and supports painting it as a GdkPaintable.

IconTheme

GtkIconTheme provides a facility for looking up icons by name and size.

IconView

GtkIconView provides an alternative view on a GtkTreeModel. It displays the model as a grid of icons with labels. Like GtkTreeView, it allows to select one or multiple items (depending on the selection mode, see gtk_icon_view_set_selection_mode()). In addition to selection with the arrow keys, GtkIconView supports rubberband selection, which is controlled by dragging the pointer.

Image

The GtkImage widget displays an image.

IMContext

GtkIMContext defines the interface for GTK input methods. An input method is used by GTK text input widgets like GtkEntry to map from key events to Unicode character strings.

IMContextSimple

GtkIMContextSimple is a simple input method context supporting table-based input methods. It has a built-in table of compose sequences that is derived from the X11 Compose files.

IMMulticontext
InfoBar

GtkInfoBar is a widget that can be used to show messages to the user without showing a dialog.

KeyvalTrigger

A GtkShortcutTrigger that triggers when a specific keyval and (optionally) modifiers are pressed.

Label

The GtkLabel widget displays a small amount of text.

LayoutChild

GtkLayoutChild is the base class for objects that are meant to hold layout properties. If a GtkLayoutManager has per-child properties, like their packing type, or the horizontal and vertical span, or the icon name, then the layout manager should use a GtkLayoutChild implementation to store those properties.

LayoutManager

Layout managers are delegate classes that handle the preferred size and the allocation of a container widget.

LevelBar

The GtkLevelBar is a bar widget that can be used as a level indicator. Typical use cases are displaying the strength of a password, or showing the charge level of a battery.

LinkButton

A GtkLinkButton is a button with a hyperlink.

ListBase

GtkListBase is the abstract base class for GTK’s list widgets.

ListBox

A GtkListBox is a vertical container that contains GtkListBoxRow children. These rows can by dynamically sorted and filtered, and headers can be added dynamically depending on the row content. It also allows keyboard and mouse navigation and selection like a typical list.

ListBoxRow
ListItem

GtkListItem is the object that list-handling containers such as GtkListView use to represent items in a GListModel. They are managed by the container and cannot be created by application code.

ListItemFactory

GtkListItemFactory is one of the core concepts of handling list widgets. It is the object tasked with creating widgets for items taken from a GListModel when the views need them and updating them as the items displayed by the view change.

ListStore

The GtkListStore object is a list model for use with a GtkTreeView widget. It implements the GtkTreeModel interface, and consequentialy, can use all of the methods available there. It also implements the GtkTreeSortable interface so it can be sorted by the view. Finally, it also implements the tree [drag and drop][gtk4-GtkTreeView-drag-and-drop] interfaces.

ListView

GtkListView is a widget to present a view into a large dynamic list of items.

LockButton

GtkLockButton is a widget to obtain and revoke authorizations needed to operate the controls.

MapListModel

GtkMapListModel is a list model that takes a list model and maps the items in that model to different items according to a GtkMapListModelMapFunc.

MediaControls

GtkMediaControls is a widget to show controls for a GtkMediaStream and giving users a way to use it.

MediaFile

GtkMediaFile is the implementation for media file usage with GtkMediaStream.

MediaStream

GtkMediaStream is the integration point for media playback inside GTK.

MenuButton

The GtkMenuButton widget is used to display a popup when clicked on.

MessageDialog

GtkMessageDialog presents a dialog with some message text. It’s simply a convenience widget; you could construct the equivalent of GtkMessageDialog from GtkDialog without too much effort, but GtkMessageDialog saves typing.

MnemonicAction

A GtkShortcutAction that calls gtk_widget_mnemonic_activate().

MnemonicTrigger

A GtkShortcutTrigger that triggers when a specific mnemonic is pressed.

MountOperation

GtkMountOperation is an implementation of GMountOperation that can use a graphical user interface when requiring information from the user, like passwords or other information.

MultiFilter

GtkMultiFilter is the base type that implements support for handling multiple filters.

MultiSelection

GtkMultiSelection is an implementation of the GtkSelectionModel interface that allows selecting multiple elements.

MultiSorter

GtkMultiSorter combines multiple sorters by trying them in turn. If the first sorter compares two items as equal, the second is tried next, and so on.

NamedAction

A GtkShortcutAction that activates an action by name.

NativeDialog

Native dialogs are platform dialogs that don’t use GtkDialog or GtkWindow. They are used in order to integrate better with a platform, by looking the same as other native applications and supporting platform specific features.

NeverTrigger

A GtkShortcutTrigger that never triggers.

NoSelection

GtkNoSelection is an implementation of the GtkSelectionModel interface that does not allow selecting anything.

Notebook

The GtkNotebook widget is a layout container whose children are pages that can be switched between using tab labels along one edge.

NotebookPage

A page in the GtkNotebook.

NothingAction

A GtkShortcutAction that does nothing.

NumericSorter

GtkNumericSorter is a GtkSorter that compares numbers.

ObjectExpression

A GObject value in a GtkExpression.

Overlay

GtkOverlay is a container which contains a single main child, on top of which it can place “overlay” widgets. The position of each overlay widget is determined by its GtkWidget:halign and GtkWidget:valign properties. E.g. a widget with both alignments set to GTK_ALIGN_START will be placed at the top left corner of the GtkOverlay container, whereas an overlay with halign set to GTK_ALIGN_CENTER and valign set to GTK_ALIGN_END will be placed a the bottom edge of the GtkOverlay, horizontally centered. The position can be adjusted by setting the margin properties of the child to non-zero values.

OverlayLayout

GtkOverlayLayout is the layout manager used by GtkOverlay. It places widgets as overlays on top of the main child.

OverlayLayoutChild
PadController

GtkPadController is an event controller for the pads found in drawing tablets (The collection of buttons and tactile sensors often found around the stylus-sensitive area).

PageSetup

A GtkPageSetup object stores the page size, orientation and margins. The idea is that you can get one of these from the page setup dialog and then pass it to the GtkPrintOperation when printing. The benefit of splitting this out of the GtkPrintSettings is that these affect the actual layout of the page, and thus need to be set long before user prints.

Paned

GtkPaned has two panes, arranged either horizontally or vertically. The division between the two panes is adjustable by the user by dragging a handle.

ParamSpecExpression

A GParamSpec for properties holding a GtkExpression.

PasswordEntry

GtkPasswordEntry is an entry that has been tailored for entering secrets.

Picture

The GtkPicture widget displays a GdkPaintable.

Popover

GtkPopover is a bubble-like context window, primarily meant to provide context-dependent information or options. Popovers are attached to a widget, set with gtk_widget_set_parent(). By default they will point to the whole widget area, although this behavior can be changed through gtk_popover_set_pointing_to().

PopoverMenu

GtkPopoverMenu is a subclass of GtkPopover that treats its children like menus and allows switching between them. It can open submenus as traditional, nested submenus, or in a more touch-friendly sliding fashion.

PopoverMenuBar

GtkPopoverMenuBar presents a horizontal bar of items that pop up popover menus when clicked.

PrintContext

A GtkPrintContext encapsulates context information that is required when drawing pages for printing, such as the cairo context and important parameters like page size and resolution. It also lets you easily create PangoLayout and PangoContext objects that match the font metrics of the cairo surface.

PrintOperation

GtkPrintOperation is the high-level, portable printing API. It looks a bit different than other GTK dialogs such as the GtkFileChooser, since some platforms don’t expose enough infrastructure to implement a good print dialog. On such platforms, GtkPrintOperation uses the native print dialog. On platforms which do not provide a native print dialog, GTK uses its own, see GtkPrintUnixDialog.

PrintSettings

A GtkPrintSettings object represents the settings of a print dialog in a system-independent way. The main use for this object is that once you’ve printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn’t have to re-set all his settings.

ProgressBar

GtkProgressBar is typically used to display the progress of a long running operation.

PropertyExpression

A GObject property value in a GtkExpression.

Range

GtkRange is the common base class for widgets which visualize an adjustment, e.g GtkScale or GtkScrollbar.

RecentManager

GtkRecentManager provides a facility for adding, removing and looking up recently used files. Each recently used file is identified by its URI, and has meta-data associated to it, like the names and command lines of the applications that have registered it, the number of time each application has registered the same file, the mime type of the file and whether the file should be displayed only by the applications that have registered it.

Revealer

The GtkRevealer widget is a container which animates the transition of its child from invisible to visible.

Scale

A GtkScale is a slider control used to select a numeric value.

ScaleButton

GtkScaleButton provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and GTK provides a GtkVolumeButton subclass that is tailored for this use case.

Scrollbar

The GtkScrollbar widget is a horizontal or vertical scrollbar.

ScrolledWindow

GtkScrolledWindow is a container that accepts a single child widget, makes that child scrollable using either internally added scrollbars or externally associated adjustments, and optionally draws a frame around the child.

SearchBar

GtkSearchBar is a container made to have a search entry (possibly with additional connex widgets, such as drop-down menus, or buttons) built-in. The search bar would appear when a search is started through typing on the keyboard, or the application’s search mode is toggled on.

SearchEntry

GtkSearchEntry is an entry widget that has been tailored for use as a search entry.

SelectionFilterModel

GtkSelectionFilterModel is a list model that presents the selected items in a GtkSelectionModel as its own list model.

Separator

GtkSeparator is a horizontal or vertical separator widget.

Settings

GtkSettings provide a mechanism to share global settings between applications.

Shortcut

GtkShortcut is the low level object used for managing keyboard shortcuts.

ShortcutAction

GtkShortcutAction is the object used to describe what a GtkShortcut should do when triggered. To activate a GtkShortcutAction manually, gtk_shortcut_action_activate() can be called.

ShortcutController

GtkShortcutController is an event controller that manages shortcuts.

ShortcutLabel

GtkShortcutLabel is a widget that represents a single keyboard shortcut or gesture in the user interface.

ShortcutsGroup

A GtkShortcutsGroup represents a group of related keyboard shortcuts or gestures. The group has a title. It may optionally be associated with a view of the application, which can be used to show only relevant shortcuts depending on the application context.

ShortcutsSection

A GtkShortcutsSection collects all the keyboard shortcuts and gestures for a major application mode. If your application needs multiple sections, you should give each section a unique GtkShortcutsSection:section-name and a GtkShortcutsSection:title that can be shown in the section selector of the GtkShortcutsWindow.

ShortcutsShortcut

A GtkShortcutsShortcut represents a single keyboard shortcut or gesture with a short text. This widget is only meant to be used with GtkShortcutsWindow.

ShortcutsWindow

A GtkShortcutsWindow shows brief information about the keyboard shortcuts and gestures of an application. The shortcuts can be grouped, and you can have multiple sections in this window, corresponding to the major modes of your application.

ShortcutTrigger

GtkShortcutTrigger is the object used to track if a GtkShortcut should be activated. For this purpose, gtk_shortcut_trigger_trigger() can be called on a GdkEvent.

SignalAction

A GtkShortcutAction that emits a signal.

SignalListItemFactory

GtkSignalListItemFactory is a GtkListItemFactory that provides signals that user code can connect to to manage listitems. Signals are emitted for every listitem in the same order:

SingleSelection

GtkSingleSelection is an implementation of the GtkSelectionModel interface that allows selecting a single element. It is the default selection method used by list widgets in GTK.

SizeGroup

GtkSizeGroup provides a mechanism for grouping a number of widgets together so they all request the same amount of space. This is typically useful when you want a column of widgets to have the same size, but you can’t use a GtkGrid widget.

SliceListModel

GtkSliceListModel is a list model that takes a list model and presents a slice of that model.

Snapshot

GtkSnapshot is an auxiliary object that assists in creating GskRenderNodes in the GdkPaintableInterface.snapshot() vfunc. It functions in a similar way to a cairo context, and maintains a stack of render nodes and their associated transformations.

Sorter

GtkSorter is the way to describe sorting criteria. Its primary user is GtkSortListModel.

SortListModel

GtkSortListModel is a list model that takes a list model and sorts its elements according to a GtkSorter.

SpinButton

A GtkSpinButton is an ideal way to allow the user to set the value of some attribute.

Spinner

A GtkSpinner widget displays an icon-size spinning animation. It is often used as an alternative to a GtkProgressBar for displaying indefinite activity, instead of actual progress.

Stack

The GtkStack widget is a container which only shows one of its children at a time. In contrast to GtkNotebook, GtkStack does not provide a means for users to change the visible child. Instead, the GtkStackSwitcher widget can be used with GtkStack to provide this functionality.

StackPage
StackSidebar

A GtkStackSidebar enables you to quickly and easily provide a consistent “sidebar” object for your user interface.

StackSwitcher

The GtkStackSwitcher widget acts as a controller for a GtkStack; it shows a row of buttons to switch between the various pages of the associated stack widget.

Statusbar

A GtkStatusbar widget is usually placed along the bottom of an application’s main GtkWindow.

StringFilter

GtkStringFilter determines whether to include items by looking at strings and comparing them to a fixed search term. The strings are obtained from the items by evaluating a GtkExpression.

StringList

GtkStringList is a list model that wraps an array of strings.

StringObject
StringSorter

GtkStringSorter is a GtkSorter that compares strings. It does the comparison in a linguistically correct way using the current locale by normalizing Unicode strings and possibly case-folding them before performing the comparison.

StyleContext

GtkStyleContext is an object that stores styling information affecting a widget.

Switch

GtkSwitch is a “light switch” that has two states: on or off.

Text

The GtkText widget is a single line text entry widget.

TextBuffer

Stores text (with or without attributes) for display in a GtkTextView widget.

TextChildAnchor

A GtkTextChildAnchor is a spot in the buffer where child widgets can be “anchored” (inserted inline, as if they were characters). The anchor can have multiple widgets anchored, to allow for multiple views.

TextMark

A position in a GtkTextBuffer preserved across modifications.

TextTag

A tag that can be applied to text contained in a GtkTextBuffer.

TextTagTable

The collection of tags in a GtkTextBuffer.

TextView

A widget that displays the contents of a GtkTextBuffer.

ToggleButton

A GtkToggleButton is a button which remains “pressed-in” when clicked.

Tooltip

An object representing a widget tooltip.

TreeExpander

GtkTreeExpander is a widget that provides an expander for a list.

TreeListModel

GtkTreeListModel is a GListModel implementation that can expand rows by creating new child list models on demand.

TreeListRow

GtkTreeListRow is the object used by GtkTreeListModel to represent items. It allows navigating the model as a tree and modify the state of rows.

TreeListRowSorter

GtkTreeListRowSorter is a special-purpose sorter that will apply a given sorter to the levels in a tree, while respecting the tree structure.

TreeModelFilter

A GtkTreeModelFilter is a tree model which wraps another tree model, and can do the following things:

TreeModelSort

The GtkTreeModelSort is a model which implements the GtkTreeSortable interface. It does not hold any data itself, but rather is created with a child model and proxies its data. It has identical column types to this child model, and the changes in the child are propagated. The primary purpose of this model is to provide a way to sort a different model without modifying it. Note that the sort function used by GtkTreeModelSort is not guaranteed to be stable.

TreeSelection

The GtkTreeSelection object is a helper object to manage the selection for a GtkTreeView widget. The GtkTreeSelection object is automatically created when a new GtkTreeView widget is created, and cannot exist independently of this widget. The primary reason the GtkTreeSelection objects exists is for cleanliness of code and API. That is, there is no conceptual reason all these functions could not be methods on the GtkTreeView widget instead of a separate function.

TreeStore

The GtkTreeStore object is a list model for use with a GtkTreeView widget. It implements the GtkTreeModel interface, and consequently, can use all of the methods available there. It also implements the GtkTreeSortable interface so it can be sorted by the view. Finally, it also implements the tree [drag and drop][gtk3-GtkTreeView-drag-and-drop] interfaces.

TreeView

Widget that displays any object that implements the GtkTreeModel interface.

TreeViewColumn

The GtkTreeViewColumn object represents a visible column in a GtkTreeView widget. It allows to set properties of the column header, and functions as a holding pen for the cell renderers which determine how the data in the column is displayed.

Video

GtkVideo is a widget to show a GtkMediaStream with media controls.

Viewport

The GtkViewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use GtkViewport to scroll child widgets such as GtkGrid, GtkBox, and so on.

VolumeButton

GtkVolumeButton is a GtkScaleButton subclass tailored for volume control.

Widget

The base class for all widgets

WidgetPaintable

GtkWidgetPaintable is an implementation of the GdkPaintable interface that allows displaying the contents of a GtkWidget.

Window

A GtkWindow is a toplevel window which can contain other widgets. Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,…).

WindowControls

GtkWindowControls shows window frame controls, such as minimize, maximize and close buttons, and the window icon.

WindowGroup

A GtkWindowGroup restricts the effect of grabs to windows in the same group, thereby making window groups almost behave like separate applications.

WindowHandle

GtkWindowHandle is a titlebar area widget. When added into a window, it can be dragged to move the window, and handles right click, double click and middle click as expected of a titlebar.

Interfaces

Accessible

GtkAccessible provides an interface for describing a UI elements for Assistive Technologies.

Actionable

This interface provides a convenient way of associating widgets with actions on a GtkApplicationWindow or GtkApplication.

AppChooser

GtkAppChooser is an interface that can be implemented by widgets which allow the user to choose an application (typically for the purpose of opening a file). The main objects that implement this interface are GtkAppChooserWidget, GtkAppChooserDialog and GtkAppChooserButton.

Buildable

GtkBuildable allows objects to extend and customize their deserialization from ui files.

BuilderScope

GtkBuilderScope is an interface to provide support to GtkBuilder, primarily for looking up programming-language-specific values for strings that are given in a GtkBuilder UI file.

CellEditable

The GtkCellEditable interface must be implemented for widgets to be usable to edit the contents of a GtkTreeView cell. It provides a way to specify how temporary widgets should be configured for editing, get the new value, etc.

CellLayout

GtkCellLayout is an interface to be implemented by all objects which want to provide a GtkTreeViewColumn like API for packing cells, setting attributes and data funcs.

ColorChooser

GtkColorChooser is an interface that is implemented by widgets for choosing colors. Depending on the situation, colors may be allowed to have alpha (translucency).

ConstraintTarget

The GtkConstraintTarget interface is implemented by objects that can be used as source or target in GtkConstraints.

Editable

The GtkEditable interface is an interface which should be implemented by text editing widgets, such as GtkEntry and GtkSpinButton. It contains functions for generically manipulating an editable widget, a large number of action signals used for key bindings, and several signals that an application can connect to modify the behavior of a widget.

FileChooser

GtkFileChooser is an interface that can be implemented by file selection widgets. In GTK, the main objects that implement this interface are GtkFileChooserWidget and GtkFileChooserDialog. You do not need to write an object that implements the GtkFileChooser interface unless you are trying to adapt an existing file selector to expose a standard programming interface.

FontChooser

GtkFontChooser is an interface that can be implemented by widgets displaying the list of fonts. In GTK, the main objects that implement this interface are GtkFontChooserWidget, GtkFontChooserDialog and GtkFontButton.

Native

GtkNative is the interface implemented by all widgets that can provide a GdkSurface for widgets to render on.

Orientable

The GtkOrientable interface is implemented by all widgets that can be oriented horizontally or vertically.

PrintOperationPreview
Root

GtkRoot is the interface implemented by all widgets that can act as a toplevel widget to a hierarchy of widgets. The root widget takes care of providing the connection to the windowing system and manages layout, drawing and event delivery for its widget hierarchy.

Scrollable

GtkScrollable is an interface that is implemented by widgets with native scrolling ability.

SelectionModel

GtkSelectionModel is an interface that extends the GListModel interface by adding support for selections. This support is then used by widgets using list models to add the ability to select and unselect various items.

ShortcutManager

The GtkShortcutManager interface is used to implement shortcut scopes.

StyleProvider

GtkStyleProvider is an interface used to provide style information to a GtkStyleContext. See gtk_style_context_add_provider() and gtk_style_context_add_provider_for_display().

TreeDragDest
TreeDragSource
TreeModel

The GtkTreeModel interface defines a generic tree interface for use by the GtkTreeView widget. It is an abstract interface, and is designed to be usable with any appropriate data structure. The programmer just has to implement this interface on their own data type for it to be viewable by a GtkTreeView widget.

TreeSortable

GtkTreeSortable is an interface to be implemented by tree models which support sorting. The GtkTreeView uses the methods provided by this interface to sort the model.

Structs

Bitset

GtkBitset is a data structure for representing a set of unsigned integers. Another name for this data structure is “bitmap”.

BitsetIter

An opaque, stack-allocated struct for iterating over the elements of a GtkBitset. Before a GtkBitsetIter can be used, it needs to be initialized with gtk_bitset_iter_init_first(), gtk_bitset_iter_init_last() or gtk_bitset_iter_init_at().

Border

A struct that specifies a border around a rectangular area that can be of different width on each side.

BuildableParseContext
BuildableParser

A sub-parser for GtkBuildable implementations.

CssLocation

GtkCssLocation is used to present a location in a file - or other source of data parsed by the CSS engine.

CssSection

Defines a part of a CSS document. Because sections are nested into one another, you can use gtk_css_section_get_parent() to get the containing region.

CssStyleChange
ExpressionWatch

An opaque structure representing a watched GtkExpression.

PadActionEntry

Struct defining a pad action entry.

PageRange

See also gtk_print_settings_set_page_ranges().

PaperSize

GtkPaperSize handles paper sizes. It uses the standard called PWG 5101.1-2002 PWG: Standard for Media Standardized Names to name the paper sizes (and to get the data for the page sizes). In addition to standard paper sizes, GtkPaperSize allows to construct custom paper sizes with arbitrary dimensions.

RecentData

Meta-data to be passed to gtk_recent_manager_add_full() when registering a recently used resource.

RecentInfo

GtkRecentInfo contains private data only, and should be accessed using the provided API.

RequestedSize

Represents a request of a screen object in a given orientation. These are primarily used in container implementations when allocating a natural size for children calling. See gtk_distribute_natural_allocation().

Requisition

A GtkRequisition-struct represents the desired size of a widget. See [GtkWidget’s geometry management section][geometry-management] for more information.

TextIter

An iterator for the contents of a GtkTextBuffer

TreeIter

The GtkTreeIter is the primary structure for accessing a GtkTreeModel. Models are expected to put a unique integer in the stamp member, and put model-specific data in the three user_data members.

TreePath

An opaque structure representing a path to a row in a model.

TreeRowReference

A GtkTreeRowReference tracks model changes so that it always refers to the same row (a GtkTreePath refers to a position, not a fixed row). Create a new GtkTreeRowReference with gtk_tree_row_reference_new().

Aliases

Allocation

The rectangle representing the area allocated for a widget by its parent.

Enumerations

AccessibleAutocomplete

The possible values for the GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE accessible property.

AccessibleInvalidState

The possible values for the GTK_ACCESSIBLE_STATE_INVALID accessible state.

AccessibleProperty

The possible accessible properties of a GtkAccessible.

AccessibleRelation

The possible accessible relations of a GtkAccessible. Accessible relations can be references to other widgets, integers or strings.

AccessibleRole

The accessible role for a GtkAccessible implementation.

AccessibleSort

The possible values for the GTK_ACCESSIBLE_PROPERTY_SORT accessible property.

AccessibleState

The possible accessible states of a GtkAccessible.

AccessibleTristate

The possible values for the GTK_ACCESSIBLE_STATE_PRESSED accessible state.

Align

Controls how a widget deals with extra space in a single (x or y) dimension.

ArrowType

Used to indicate the direction in which an arrow should point.

AssistantPageType

An enum for determining the page role inside the GtkAssistant. It’s used to handle buttons sensitivity and visibility.

BaselinePosition

Whenever a container has some form of natural row it may align children in that row along a common typographical baseline. If the amount of vertical space in the row is taller than the total requested height of the baseline-aligned children then it can use a GtkBaselinePosition to select where to put the baseline inside the extra available space.

BorderStyle

Describes how the border of a UI element should be rendered.

ButtonsType

Prebuilt sets of buttons for the dialog. If none of these choices are appropriate, simply use GTK_BUTTONS_NONE then call gtk_dialog_add_buttons().

CellRendererAccelMode

Determines if the edited accelerators are GTK accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK are allowed, and the accelerators are rendered in the same way as they are in menus.

CellRendererMode

Identifies how the user can interact with a particular cell.

ConstraintAttribute

The widget attributes that can be used when creating a GtkConstraint.

ConstraintRelation

The relation between two terms of a constraint.

ConstraintStrength

The strength of a constraint, expressed as a symbolic constant.

CornerType

Specifies which corner a child widget should be placed in when packed into a GtkScrolledWindow. This is effectively the opposite of where the scroll bars are placed.

CssParserWarning

Warnings that can occur while parsing CSS.

DeleteType

See also: GtkEntry::delete-from-cursor.

DirectionType

Focus movement types.

EditableProperties
EntryIconPosition

Specifies the side of the entry at which an icon is placed.

EventSequenceState

Describes the state of a GdkEventSequence in a GtkGesture.

FileChooserAction

Describes whether a GtkFileChooser is being used to open existing files or to save to a possibly new file.

FilterChange

Describes changes in a filter in more detail and allows objects using the filter to optimize refiltering items.

FilterMatch

Describes the known strictness of a filter.

IconSize

Built-in icon sizes.

IconViewDropPosition

An enum for determining where a dropped item goes.

ImageType

Describes the image data representation used by a GtkImage.

InputPurpose

Describes primary purpose of the input widget. This information is useful for on-screen keyboards and similar input methods to decide which keys should be presented to the user.

Justification

Used for justifying the text inside a GtkLabel widget.

LevelBarMode

Describes how GtkLevelBar contents should be rendered. Note that this enumeration could be extended with additional modes in the future.

License

The type of license for an application.

MessageType

The type of message being displayed in the dialog.

MovementStep
NotebookTab

The parameter used in the action signals of GtkNotebook.

NumberUpLayout

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 which can be switched between horizontal and vertical orientation on the fly, like GtkBox or GtkGesturePan.

Overflow

Defines how content overflowing a given area should be handled, such as with gtk_widget_set_overflow(). This property is modeled after the CSS overflow property, but implements it only partially.

PackType

Represents the packing location of a children in its parent. See GtkWindowControls for example.

PadActionType

The type of a pad action.

PageOrientation

See also gtk_print_settings_set_orientation().

PageSet

See also gtk_print_job_set_page_set().

PanDirection

Describes the panning direction of a GtkGesturePan

PolicyType

Determines how the size should be computed to achieve the one of the visibility mode for the scrollbars.

PositionType

Describes which edge of a widget a certain feature is positioned at, e.g. the tabs of a GtkNotebook, or the label of a GtkScale.

PrintDuplex

See also gtk_print_settings_set_duplex().

PrintOperationAction

The action parameter to gtk_print_operation_run() determines what action the print operation should perform.

PrintOperationResult

A value of this type is returned by gtk_print_operation_run().

PrintPages

See also gtk_print_job_set_pages()

PrintQuality

See also gtk_print_settings_set_quality().

PrintStatus

The status gives a rough indication of the completion of a running print operation.

PropagationLimit

Describes limits of a GtkEventController for handling events targeting other widgets.

PropagationPhase

Describes the stage at which events are fed into a GtkEventController.

ResponseType

Predefined values for use as response ids in gtk_dialog_add_button(). All predefined values are negative; GTK leaves values of 0 or greater for application-defined response ids.

RevealerTransitionType

These enumeration values describe the possible transitions when the child of a GtkRevealer widget is shown or hidden.

ScrollablePolicy

Defines the policy to be used in a scrollable widget when updating the scrolled window adjustments in a given orientation.

ScrollStep
ScrollType

Scrolling types.

SelectionMode

Used to control what selections users are allowed to make.

SensitivityType

Determines how GTK handles the sensitivity of various controls, such as combo box buttons.

ShortcutScope

Describes where GtkShortcuts added to a GtkShortcutController get handled.

ShortcutType

GtkShortcutType specifies the kind of shortcut that is being described.

SizeGroupMode

The mode of the size group determines the directions in which the size group affects the requested sizes of its component widgets.

SizeRequestMode

Specifies a preference for height-for-width or width-for-height geometry management.

SorterChange

Describes changes in a sorter in more detail and allows users to optimize resorting.

SorterOrder

Describes the type of order that a GtkSorter may describe.

SortType

Determines the direction of a sort.

SpinButtonUpdatePolicy

The spin button update policy determines whether the spin button displays values even if they are outside the bounds of its adjustment. See gtk_spin_button_set_update_policy().

SpinType

The values of the GtkSpinType enumeration are used to specify the change to make in gtk_spin_button_spin().

StackTransitionType

These enumeration values describe the possible transitions between pages in a GtkStack widget.

StringFilterMatchMode

Specifies how search strings are matched inside text.

SystemSetting

Values that can be passed to the GtkWidgetClass.system_setting_changed vfunc to indicate that a system setting has changed and widgets may need to drop caches, or react otherwise.

TextDirection

Reading directions for text.

TextExtendSelection

Granularity types that extend the text selection. Use the GtkTextView::extend-selection signal to customize the selection.

TextViewLayer

Used to reference the layers of GtkTextView for the purpose of customized drawing with the ::snapshot_layer vfunc.

TextWindowType

Used to reference the parts of GtkTextView.

TreeViewColumnSizing

The sizing method the column uses to determine its width. Please note that GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views, and can make columns appear choppy.

TreeViewDropPosition

An enum for determining where a dropped row goes.

TreeViewGridLines

Used to indicate which grid lines to draw in a tree view.

Unit

See also gtk_print_settings_set_paper_width().

WrapMode

Describes a type of line wrapping.

Bitfields

ApplicationInhibitFlags

Types of user actions that may be blocked by gtk_application_inhibit().

BuilderClosureFlags

The list of flags that can be passed to gtk_builder_create_closure().

CellRendererState

Tells how a cell is to be rendered.

DebugFlags
DialogFlags

Flags used to influence dialog construction.

EventControllerScrollFlags

Describes the behavior of a GtkEventControllerScroll.

FontChooserLevel

This enumeration specifies the granularity of font selection that is desired in a font chooser.

IconLookupFlags

Used to specify options for gtk_icon_theme_lookup_icon()

InputHints

Describes hints that might be taken into account by input methods or applications. Note that input methods may already tailor their behaviour according to the GtkInputPurpose of the entry.

PickFlags

Flags that influence the behavior of gtk_widget_pick()

PopoverMenuFlags

Flags that affect how popover menus are created from a menu model.

ShortcutActionFlags

List of flags that can be passed to action activation. More flags may be added in the future.

StateFlags

Describes a widget state. Widget states are used to match the widget against CSS pseudo-classes. Note that GTK extends the regular CSS classes and sometimes uses different names.

StyleContextPrintFlags

Flags that modify the behavior of gtk_style_context_to_string(). New values may be added to this enumeration.

TextSearchFlags

Flags affecting how a search is done.

TreeModelFlags

These flags indicate various properties of a GtkTreeModel.

Error domains

BuilderError

Error codes that identify various errors that can occur while using GtkBuilder.

ConstraintVflParserError

Domain for VFL parsing errors.

CssParserError

Errors that can occur while parsing CSS.

FileChooserError

These identify the various errors that can occur while calling GtkFileChooser functions.

IconThemeError

Error codes for GtkIconTheme operations.

PrintError

Error codes that identify various errors that can occur while using the GTK printing support.

RecentManagerError

Error codes for GtkRecentManager operations

Callbacks

AssistantPageFunc

A function used by gtk_assistant_set_forward_page_func() to know which is the next page given a current one. It’s called both for computing the next page when the user presses the “forward” button and for handling the behavior of the “last” button.

CellAllocCallback

The type of the callback functions used for iterating over the cell renderers and their allocated areas inside a GtkCellArea, see gtk_cell_area_foreach_alloc().

CellCallback

The type of the callback functions used for iterating over the cell renderers of a GtkCellArea, see gtk_cell_area_foreach().

CellLayoutDataFunc

A function which should set the value of cell_layout’s cell renderer(s) as appropriate.

CustomAllocateFunc

A function to be used by GtkCustomLayout to allocate a widget.

CustomFilterFunc

User function that is called to determine if the item should be matched. If the filter matches the item, this function must return TRUE. If the item should be filtered out, FALSE must be returned.

CustomMeasureFunc

A function to be used by GtkCustomLayout to measure a widget.

CustomRequestModeFunc

Queries a widget for its preferred size request mode.

DrawingAreaDrawFunc

Whenever drawing_area needs to redraw, this function will be called.

EntryCompletionMatchFunc

A function which decides whether the row indicated by iter matches a given key, and should be displayed as a possible completion for key.

ExpressionNotify

Callback called by gtk_expression_watch() when the expression value changes.

FlowBoxCreateWidgetFunc

Called for flow boxes that are bound to a GListModel with gtk_flow_box_bind_model() for each item that gets added to the model.

FlowBoxFilterFunc

A function that will be called whenever a child changes or is added. It lets you control if the child should be visible or not.

FlowBoxForeachFunc

A function used by gtk_flow_box_selected_foreach(). It will be called on every selected child of the box.

FlowBoxSortFunc

A function to compare two children to determine which should come first.

FontFilterFunc

The type of function that is used for deciding what fonts get shown in a GtkFontChooser. See gtk_font_chooser_set_filter_func().

IconViewForeachFunc

A function used by gtk_icon_view_selected_foreach() to map all selected rows. It will be called on every selected row in the view.

ListBoxCreateWidgetFunc

Called for list boxes that are bound to a GListModel with gtk_list_box_bind_model() for each item that gets added to the model.

ListBoxFilterFunc

Will be called whenever the row changes or is added and lets you control if the row should be visible or not.

ListBoxForeachFunc

A function used by gtk_list_box_selected_foreach(). It will be called on every selected child of the box.

ListBoxSortFunc

Compare two rows to determine which should be first.

ListBoxUpdateHeaderFunc

Whenever row changes or which row is before row changes this is called, which lets you update the header on row. You may remove or set a new one via gtk_list_box_row_set_header() or just change the state of the current header widget.

MapListModelMapFunc

User function that is called to map an item of the original model to an item expected by the map model.

MenuButtonCreatePopupFunc

User-provided callback function to create a popup for menu_button on demand. This function is called when the popup of menu_button is shown, but none has been provided via gtk_menu_button_set_popover() or gtk_menu_button_set_menu_model().

PageSetupDoneFunc

The type of function that is passed to gtk_print_run_page_setup_dialog_async().

PrintSettingsFunc
ScaleFormatValueFunc
ShortcutFunc

Prototype for shortcuts based on user callbacks.

TextCharPredicate

The predicate function used by gtk_text_iter_forward_find_char() and gtk_text_iter_backward_find_char().

TextTagTableForeach

A function used with gtk_text_tag_table_foreach(), to iterate over every GtkTextTag inside a GtkTextTagTable.

TickCallback

Callback type for adding a function to update animations. See gtk_widget_add_tick_callback().

TreeCellDataFunc

A function to set the properties of a cell instead of just using the straight mapping between the cell and the model.

TreeIterCompareFunc

A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive integer if a sorts before b, a sorts with b, or a sorts after b respectively.

TreeListModelCreateModelFunc

Prototype of the function called to create new child models when gtk_tree_list_row_set_expanded() is called.

TreeModelFilterModifyFunc

A function which calculates display values from raw values in the model. It must fill value with the display value for the column column in the row indicated by iter.

TreeModelFilterVisibleFunc

A function which decides whether the row indicated by iter is visible.

TreeModelForeachFunc

Type of the callback passed to gtk_tree_model_foreach() to iterate over the rows in a tree model.

TreeSelectionForeachFunc

A function used by gtk_tree_selection_selected_foreach() to map all selected rows. It will be called on every selected row in the view.

TreeSelectionFunc

A function used by gtk_tree_selection_set_select_function() to filter whether or not a row may be selected. It is called whenever a row’s state might change.

TreeViewColumnDropFunc

Function type for determining whether column can be dropped in a particular spot (as determined by prev_column and next_column). In left to right locales, prev_column is on the left of the potential drop spot, and next_column is on the right. In right to left mode, this is reversed. This function should return TRUE if the spot is a valid drop spot. Please note that returning TRUE does not actually indicate that the column drop was made, but is meant only to indicate a possible drop spot to the user.

TreeViewMappingFunc

Function used for gtk_tree_view_map_expanded_rows().

TreeViewRowSeparatorFunc

Function type for determining whether the row pointed to by iter should be rendered as a separator. A common way to implement this is to have a boolean column in the model, whose values the GtkTreeViewRowSeparatorFunc returns.

TreeViewSearchEqualFunc

A function used for checking whether a row in model matches a search key string entered by the user. Note the return value is reversed from what you would normally expect, though it has some similarity to strcmp() returning 0 for equal strings.

WidgetActionActivateFunc

The type of the callback functions used for activating actions installed with gtk_widget_class_install_action().

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 (possibly translated) string that can be displayed to a user, similarly to gtk_accelerator_get_label(), but handling keycodes.

accelerator_name

Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse().

accelerator_name_with_keycode

Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse_with_keycode(), similarly to gtk_accelerator_name() but handling keycodes. This is only useful for system-level components, applications should use gtk_accelerator_parse() instead.

accelerator_parse

Parses a string representing an accelerator. The format looks like “a” or “F1”.

accelerator_parse_with_keycode

Parses a string representing an accelerator, similarly to gtk_accelerator_parse() but handles keycodes as well. This is only useful for system-level components, applications should use gtk_accelerator_parse() instead.

accelerator_valid

Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.

accessible_property_init_value
accessible_relation_init_value
accessible_state_init_value
bitset_iter_init_at

Initializes iter to point to target. If target is not found, finds the next value after it. If no value >= target exists in set, this function returns FALSE.

bitset_iter_init_first

Initializes an iterator for set and points it to the first value in set. If set is empty, FALSE is returned and value is set to G_MAXUINT.

bitset_iter_init_last

Initializes an iterator for set and points it to the last value in set. If set is empty, FALSE is returned.

builder_error_quark
check_version

Checks that the GTK library in use is compatible with the given version. Generally you would pass in the constants GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of GTK the application or module was compiled against.

constraint_vfl_parser_error_quark
css_parser_error_quark
css_parser_warning_quark
disable_setlocale

Prevents gtk_init() and gtk_init_check() from automatically calling setlocale (LC_ALL, "").

distribute_natural_allocation

Distributes extra_space to child sizes by bringing smaller children up to natural size first.

editable_delegate_get_property

Gets a property of the GtkEditable delegate for object.

editable_delegate_set_property

Sets a property on the GtkEditable delegate for object.

editable_install_properties

Installs the GtkEditable properties for class.

file_chooser_error_quark

Registers an error quark for GtkFileChooser if necessary.

get_binary_age

Returns the binary age as passed to libtool when building the GTK library the process is running against. If libtool means nothing to you, don’t worry about it.

get_debug_flags

Returns the GTK debug flags that are currently active.

get_default_language

Returns the PangoLanguage for the default language currently in effect. (Note that this can change over the life of an application.) The default language is derived from the current locale. It determines, for example, whether GTK uses the right-to-left or left-to-right text direction.

get_interface_age

Returns the interface age as passed to libtool when building the GTK library the process is running against. If libtool means nothing to you, don’t worry about it.

get_locale_direction

Get the direction of the current locale. This is the expected reading direction for text and UI.

get_major_version

Returns the major version number of the GTK library. (e.g. in GTK version 3.1.5 this is 3.)

get_micro_version

Returns the micro version number of the GTK library. (e.g. in GTK version 3.1.5 this is 5.)

get_minor_version

Returns the minor version number of the GTK library. (e.g. in GTK version 3.1.5 this is 1.)

hsv_to_rgb

Converts a color from HSV space to RGB.

icon_theme_error_quark
init

Call this function before using any other GTK functions in your GUI applications. It will initialize everything needed to operate the toolkit and parses some standard command line options.

init_check

This function does the same work as gtk_init() with only a single change: It does not terminate the program if the windowing system can’t be initialized. Instead it returns FALSE on failure.

is_initialized

Use this function to check if GTK has been initialized with gtk_init() or gtk_init_check().

native_get_for_surface

Finds the GtkNative associated with the surface.

paper_size_get_default

Returns the name of the default paper size, which depends on the current locale.

paper_size_get_paper_sizes

Creates a list of known paper sizes.

param_spec_expression

Creates a new GParamSpec instance for a property holding a GtkExpression.

print_error_quark

Registers an error quark for GtkPrintOperation if necessary.

print_run_page_setup_dialog

Runs a page setup dialog, letting the user modify the values from page_setup. If the user cancels the dialog, the returned GtkPageSetup is identical to the passed in page_setup, otherwise it contains the modifications done in the dialog.

print_run_page_setup_dialog_async

Runs a page setup dialog, letting the user modify the values from page_setup.

recent_manager_error_quark
render_activity

Renders an activity indicator (such as in GtkSpinner). The state GTK_STATE_FLAG_CHECKED determines whether there is activity going on.

render_arrow

Renders an arrow pointing to angle.

render_background

Renders the background of an element.

render_check

Renders a checkmark (as in a GtkCheckButton).

render_expander

Renders an expander (as used in GtkTreeView and GtkExpander) in the area defined by x, y, width, height. The state GTK_STATE_FLAG_CHECKED determines whether the expander is collapsed or expanded.

render_focus

Renders a focus indicator on the rectangle determined by x, y, width, height.

render_frame

Renders a frame around the rectangle defined by x, y, width, height.

render_handle

Renders a handle (as in GtkPaned and GtkWindow’s resize grip), in the rectangle determined by x, y, width, height.

render_icon

Renders the icon in texture at the specified x and y coordinates.

render_layout

Renders layout on the coordinates x, y

render_line

Renders a line from (x0, y0) to (x1, y1).

render_option

Renders an option mark (as in a radio button), the GTK_STATE_FLAG_CHECKED state will determine whether the option is on or off, and GTK_STATE_FLAG_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.

show_about_dialog

A convenience function for showing an application’s about dialog.

show_uri

This function launches the default application for showing a given uri, or shows an error dialog if that fails.

show_uri_full

This function launches the default application for showing a given uri.

show_uri_full_finish

Finishes the gtk_show_uri() call and returns the result of the operation.

test_accessible_assertion_message_role
test_accessible_check_property

Checks whether the accessible property of accessible is set to a specific value.

test_accessible_check_relation

Checks whether the accessible relation of accessible is set to a specific value.

test_accessible_check_state

Checks whether the accessible state of accessible is set to a specific value.

test_accessible_has_property

Checks whether the GtkAccessible has property set.

test_accessible_has_relation

Checks whether the GtkAccessible 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 GtkAccessible has state set.

test_init

This function is used to initialize a GTK test program.

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”. In this context that means it waits for the frame clock of widget to have run a full styling, layout and drawing cycle.

tree_create_row_drag_content

Creates a content provider for dragging path from tree_model.

tree_get_row_drag_data

Obtains a tree_model and path from value of target type GTK_TYPE_TREE_ROW_DATA.

tree_row_reference_deleted

Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the GtkTreeModel::row-deleted signal.

tree_row_reference_inserted

Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the GtkTreeModel::row-inserted signal.

tree_row_reference_reordered

Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the GtkTreeModel::rows-reordered signal.

value_dup_expression

Retrieves the GtkExpression stored inside the given value, and acquires a reference to it.

value_get_expression

Retrieves the GtkExpression stored inside the given value.

value_set_expression

Stores the given GtkExpression inside value.

value_take_expression

Stores the given GtkExpression inside value.

Constants

ACCESSIBLE_VALUE_UNDEFINED

An undefined value. The accessible attribute is either unset, or its value is undefined.

BINARY_AGE

Like gtk_get_binary_age(), but from the headers used at application compile time, rather than from the library linked against at application run time.

IM_MODULE_EXTENSION_POINT_NAME
INPUT_ERROR

Constant to return from a signal handler for the GtkSpinButton::input signal in case of conversion failure.

INTERFACE_AGE

Like gtk_get_interface_age(), but from the headers used at application compile time, rather than from the library linked against at application run time.

LEVEL_BAR_OFFSET_FULL

The name used for the stock full offset included by GtkLevelBar.

LEVEL_BAR_OFFSET_HIGH

The name used for the stock high offset included by GtkLevelBar.

LEVEL_BAR_OFFSET_LOW

The name used for the stock low offset included by GtkLevelBar.

MAJOR_VERSION

Like gtk_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.

MAX_COMPOSE_LEN
MEDIA_FILE_EXTENSION_POINT_NAME
MICRO_VERSION

Like gtk_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.

MINOR_VERSION

Like gtk_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.

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
PRINT_SETTINGS_DEFAULT_SOURCE
PRINT_SETTINGS_DITHER
PRINT_SETTINGS_DUPLEX
PRINT_SETTINGS_FINISHINGS
PRINT_SETTINGS_MEDIA_TYPE
PRINT_SETTINGS_N_COPIES
PRINT_SETTINGS_NUMBER_UP
PRINT_SETTINGS_NUMBER_UP_LAYOUT
PRINT_SETTINGS_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
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
PRINT_SETTINGS_PAGE_SET
PRINT_SETTINGS_PAPER_FORMAT
PRINT_SETTINGS_PAPER_HEIGHT
PRINT_SETTINGS_PAPER_WIDTH
PRINT_SETTINGS_PRINT_PAGES
PRINT_SETTINGS_PRINTER
PRINT_SETTINGS_PRINTER_LPI
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
PRIORITY_RESIZE

Use this priority for functionality related to size allocation.

STYLE_PROVIDER_PRIORITY_APPLICATION

A priority that can be used when adding a GtkStyleProvider 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 GtkSettings.

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.

TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID

Uses the default sort function in a [interface@Gtk.TreeSortable].

TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID

Disables sorting in a [interface@Gtk.TreeSortabke].