Gtk¶
API reference for the Gtk namespace (version 4.0), generated from GObject-Introspection.
Classes¶
- ATContext — Communicates with platform-specific assistive technologies API. Each platform supported by GTK implements a
GtkATContextsubclass, and is… - ATContextClass
- AboutDialog — Displays information about a program. The shown information includes the programs' logo, name, copyright, website and license. It is also…
- Accessible — An interface for describing UI elements for Assistive Technologies. Every accessible implementation has: - a “role”, represented by a value…
- AccessibleHyperlink — Represents a link (i.e. a uri). A widget that contains one or more links should implement the AccessibleHypertext interface and return…
- AccessibleHyperlinkClass
- AccessibleHypertext — An interface for accessible objects containing links. The
GtkAccessibleHypertextinterfaces is meant to be implemented by accessible… - AccessibleHypertextInterface — The interface vtable for accessible objects containing links.
- AccessibleInterface — The common interface for accessible objects.
- AccessibleList — Wraps a list of references to Accessible objects.
- AccessibleRange — An interface for accessible objects containing a numeric value.
GtkAccessibleRangedescribes ranged controls for Assistive Technologies.… - AccessibleRangeInterface
- AccessibleText — An interface for accessible objects containing formatted text. The
GtkAccessibleTextinterfaces is meant to be implemented by accessible… - AccessibleTextInterface — The interface vtable for accessible objects containing text.
- AccessibleTextRange — A range inside the text of an accessible object.
- ActionBar — Presents contextual actions. <picture> <source srcset="action-bar-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- Actionable — Provides a way to associate widgets with actions. It primarily consists of two properties: Actionable.action-name and…
- ActionableInterface — The interface vtable for
GtkActionable. - ActivateAction — Activates a widget. Widgets are activated by calling Widget.activate.
- ActivateActionClass
- Adjustment — A model for a numeric value. The
GtkAdjustmenthas an associated lower and upper bound. It also contains step and page increments, and a… - AdjustmentClass
- AlertDialog — Collects the arguments that are needed to present a message to the user. The message is shown with the AlertDialog.choose function. If you…
- AlertDialogClass
- AlternativeTrigger — Combines two shortcut triggers. The
GtkAlternativeTriggertriggers when either of the two trigger. This can be cascaded to combine more… - AlternativeTriggerClass
- AnyFilter — Matches an item when at least one of its filters matches. To add filters to a
GtkAnyFilter, use MultiFilter.append. - AnyFilterClass
- AppChooser —
GtkAppChooseris an interface for widgets which allow the user to choose an application. The main objects that implement this interface… - AppChooserButton — The
GtkAppChooserButtonlets the user select an application. <picture> <source srcset="appchooserbutton-dark.png"… - AppChooserDialog —
GtkAppChooserDialogshows aGtkAppChooserWidgetinside aGtkDialog. <picture> <source srcset="appchooserdialog-dark.png"… - AppChooserWidget —
GtkAppChooserWidgetis a widget for selecting applications. It is the main building block for AppChooserDialog. Most applications only… - Application — A high-level API for writing applications.
GtkApplicationsupports many aspects of writing a GTK application in a convenient fashion,… - ApplicationClass
- ApplicationWindow — A
GtkWindowsubclass that integrates withGtkApplication. Notably,GtkApplicationWindowcan handle an application menubar. This class… - ApplicationWindowClass
- AspectFrame — Preserves the aspect ratio of its child. The frame can respect the aspect ratio of the child widget, or use its own aspect ratio. ### CSS…
- Assistant —
GtkAssistantis used to represent a complex as a series of steps. <picture> <source srcset="assistant-dark.png"… - AssistantPage —
GtkAssistantPageis an auxiliary object used byGtkAssistant. - BinLayout — A layout manager for widgets with a single child.
GtkBinLayoutwill stack each child of a widget on top of each other, using the… - BinLayoutClass
- Bitset — A set of unsigned integers. Another name for this data structure is “bitmap”. The current implementation is based on roaring bitmaps. A…
- BitsetIter — Iterates over the elements of a Bitset.
GtkBitSetIter is an opaque, stack-allocated struct. Before aGtkBitsetIter` can be used, it needs… - BookmarkList — A list model that wraps
GBookmarkFile. It presents aGListModeland fills it asynchronously with theGFileInfos returned from that… - BookmarkListClass
- BoolFilter — Evaluates a boolean expression to determine whether to include items.
- BoolFilterClass
- Border — Specifies a border around a rectangular area. Each side can have a different width.
- Box — Arranges child widgets into a single row or column. <picture> <source srcset="box-dark.png" media="(prefers-color-scheme: dark)">…
- BoxClass
- BoxLayout — Arranges children in a single row or column. Whether it is a row or column depends on the value of its Orientable.orientation property.…
- BoxLayoutClass
- Buildable — Allows objects to extend and customize deserialization from ui files. The
GtkBuildableinterface includes methods for setting names and… - BuildableIface — Contains methods to let
GtkBuilderconstruct an object from aGtkBuilderUI definition. - BuildableParseContext — Provides context for parsing GtkBuilder UI files.
GtkBuildableParseContextis an opaque struct. - BuildableParser — A sub-parser for
GtkBuildableimplementations. - Builder — Reads XML descriptions of a user interface and instantiates the described objects. To create a
GtkBuilderfrom a user interface… - BuilderCScope — A
GtkBuilderScopeimplementation for the C language.GtkBuilderCScopeinstances use symbols explicitly added tobuilderwith prior… - BuilderCScopeClass
- BuilderClass
- BuilderListItemFactory — Creates widgets by instantiating
GtkBuilderUI templates. The templates must extend the class that the parent widget expects. For… - BuilderListItemFactoryClass
- BuilderScope — Provides language binding support to
GtkBuilder. The goal ofGtkBuilderScopeis to look up programming-language-specific values for… - BuilderScopeInterface — The virtual function table to implement for
GtkBuilderScopeimplementations. Default implementations for each function do exist, but they… - Button — Calls a callback function when the button is clicked. <picture> <source srcset="button-dark.png" media="(prefers-color-scheme:…
- ButtonClass
- ButtonPrivate
- CClosureExpression — A variant of
GtkClosureExpressionusing a C closure. - Calendar — Displays a Gregorian calendar, one month at a time. <picture> <source srcset="calendar-dark.png" media="(prefers-color-scheme:…
- CallbackAction — Invokes a callback.
- CallbackActionClass
- CellArea — An abstract class for laying out
GtkCellRenderers TheGtkCellAreais an abstract class for CellLayout widgets (also referred to as… - CellAreaBox — A cell area that renders GtkCellRenderers into a row or a column The
GtkCellAreaBoxrenders cell renderers into a row or a column… - CellAreaClass
- CellAreaContext — Stores geometrical information for a series of rows in a GtkCellArea The
GtkCellAreaContextobject is created by a givenGtkCellArea… - CellAreaContextClass
- CellAreaContextPrivate
- CellEditable — Interface for widgets that can be used for editing cells The
GtkCellEditableinterface must be implemented for widgets to be usable to… - CellEditableIface
- CellLayout — An interface for packing cells
GtkCellLayoutis an interface to be implemented by all objects which want to provide aGtkTreeViewColumn… - CellLayoutIface
- CellRenderer — An object for rendering a single cell The
GtkCellRendereris a base class of a set of objects used for rendering a cell to acairo_t.… - CellRendererAccel — Renders a keyboard accelerator in a cell
GtkCellRendererAcceldisplays a keyboard accelerator (i.e. a key combination like `Control +… - CellRendererClass
- CellRendererClassPrivate
- CellRendererCombo — Renders a combobox in a cell
GtkCellRendererComborenders text in a cell likeGtkCellRendererTextfrom which it is derived. But while… - CellRendererPixbuf — Renders a pixbuf in a cell A
GtkCellRendererPixbufcan be used to render an image in a cell. It allows to render either a given… - CellRendererPrivate
- CellRendererProgress — Renders numbers as progress bars
GtkCellRendererProgressrenders a numeric value as a progress par in a cell. Additionally, it can… - CellRendererSpin — Renders a spin button in a cell
GtkCellRendererSpinrenders text in a cell likeGtkCellRendererTextfrom which it is derived. But while… - CellRendererSpinner — Renders a spinning animation in a cell
GtkCellRendererSpinnerrenders a spinning animation in a cell, very similar toGtkSpinner. It… - CellRendererText — Renders text in a cell A
GtkCellRendererTextrenders a given text in its cell, using the font, color and style information provided by… - CellRendererTextClass
- CellRendererToggle — Renders a toggle button in a cell
GtkCellRendererTogglerenders a toggle button in a cell. The button is drawn as a radio or a… - CellView — A widget displaying a single row of a GtkTreeModel A
GtkCellViewdisplays a single row of aGtkTreeModelusing aGtkCellAreaand… - CenterBox — Arranges three children in a row, keeping the middle child centered as well as possible. <picture> <source…
- CenterBoxClass
- CenterLayout — Manages up to three children. The start widget is allocated at the start of the layout (left in left-to-right locales and right in…
- CenterLayoutClass
- CheckButton — Places a label next to an indicator. <picture> <source srcset="check-button-dark.png" media="(prefers-color-scheme: dark)"> <img…
- CheckButtonClass
- ClosureExpression — An expression using a custom
GClosureto compute the value from its parameters. - ColorButton — The
GtkColorButtonallows to open a color chooser dialog to change the color. <picture> <source srcset="color-button-dark.png"… - ColorChooser —
GtkColorChooseris an interface that is implemented by widgets for choosing colors. Depending on the situation, colors may be allowed to… - ColorChooserDialog — A dialog for choosing a color. <picture> <source srcset="colorchooser-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- ColorChooserInterface
- ColorChooserWidget — The
GtkColorChooserWidgetwidget lets the user select a color. By default, the chooser presents a predefined palette of colors, plus a… - ColorDialog — Asynchronous API to present a color chooser dialog.
GtkColorDialogcollects the arguments that are needed to present the dialog to the… - ColorDialogButton — Opens a color chooser dialog to select a color. <picture> <source srcset="color-button-dark.png" media="(prefers-color-scheme:…
- ColorDialogButtonClass
- ColorDialogClass
- ColumnView — Presents a large dynamic list of items using multiple columns with headers.
GtkColumnViewuses the factories of its columns to generate a… - ColumnViewCell — Represents items in a cell in ColumnView. The
GtkColumnViewCells are managed by the ColumnView widget (with its factory) and cannot be… - ColumnViewCellClass
- ColumnViewClass
- ColumnViewColumn — Represents the columns in a
GtkColumnView. The main ingredient for aGtkColumnViewColumnis theGtkListItemFactorythat tells the… - ColumnViewColumnClass
- ColumnViewRow — Configures how rows are displayed in a ColumnView. It is not used to set the widgets displayed in the individual cells. For that see…
- ColumnViewRowClass
- ColumnViewSorter — Sorts ColumnView columns. The sorter returned by ColumnView.get_sorter is a
GtkColumnViewSorter. In column views, sorting can be… - ColumnViewSorterClass
- ComboBox — A
GtkComboBoxis a widget that allows the user to choose from a list of valid choices. <picture> <source… - ComboBoxClass
- ComboBoxText — A
GtkComboBoxTextis a simple variant ofGtkComboBoxfor text-only use cases. <picture> <source srcset="combo-box-text-dark.png"… - ConstantExpression — A constant value in a
GtkExpression. - Constraint — Describes a constraint between attributes of two widgets, expressed as a linear equation. The typical equation for a constraint is: ```…
- ConstraintClass
- ConstraintGuide — An invisible layout element in a
GtkConstraintLayout. TheGtkConstraintLayouttreats guides like widgets. They can be used as the… - ConstraintGuideClass
- ConstraintLayout — Uses constraints to describe relations between widgets.
GtkConstraintLayoutis a layout manager that uses relations between widget… - ConstraintLayoutChild —
GtkLayoutChildsubclass for children in aGtkConstraintLayout. - ConstraintLayoutChildClass
- ConstraintLayoutClass
- ConstraintTarget — Makes it possible to use an object as source or target in a Constraint. Besides
GtkWidget, it is also implemented byGtkConstraintGuide. - ConstraintTargetInterface
- CssLocation — Points at a location inside a CSS stream.
- CssProvider — A style provider for CSS. It is able to parse CSS-like input in order to style widgets. An application can make GTK parse a specific CSS…
- CssProviderClass
- CssProviderPrivate
- CssSection — Defines a part of a CSS document. Because sections are nested into one another, you can use
CssSection.get_parentto get the containing… - CssStyleChange — A CSS style change.
- CustomFilter — Determines whether to include items with a callback.
- CustomFilterClass
- CustomLayout — Uses closures for size negotiation. A
GtkCustomLayoutuses closures matching to the oldGtkWidgetvirtual functions for size… - CustomLayoutClass
- CustomSorter — Sorts items via a callback function.
- CustomSorterClass
- Dialog — Dialogs are a convenient way to prompt the user for a small amount of input. <picture> <source srcset="dialog-dark.png"…
- DialogClass
- DirectoryList — A list model that wraps Gio.File.enumerate_children_async. It presents a
GListModeland fills it asynchronously with theGFileInfos… - DirectoryListClass
- DragIcon — A
GtkRootimplementation for drag icons. A drag icon moves with the pointer during a Drag-and-Drop operation and is destroyed when the… - DragIconClass
- DragSource — An event controller to initiate Drag-And-Drop operations.
GtkDragSourcecan be set up with the necessary ingredients for a DND operation… - DragSourceClass
- DrawingArea — Allows drawing with cairo. <picture> <source srcset="drawingarea-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- DrawingAreaClass
- DropControllerMotion — An event controller tracking the pointer during Drag-and-Drop operations. It is modeled after EventControllerMotion so if you have used…
- DropControllerMotionClass
- DropDown — Allows the user to choose an item from a list of options. <picture> <source srcset="drop-down-dark.png" media="(prefers-color-scheme:…
- DropDownClass
- DropTarget — An event controller to receive Drag-and-Drop operations. The most basic way to use a
GtkDropTargetto receive drops on a widget is to… - DropTargetAsync — An event controller to receive Drag-and-Drop operations, asynchronously. It is the more complete but also more complex method of handling…
- DropTargetAsyncClass
- DropTargetClass
- Editable — Interface for single-line text editing widgets. Typical examples of editable widgets are Entry and SpinButton. It contains functions for…
- EditableInterface
- EditableLabel — Allows users to edit the displayed text by switching to an “edit mode”. <picture> <source srcset="editable-label-dark.png"…
- EditableLabelClass
- EmojiChooser — Used by text widgets to let users insert Emoji characters. <picture> <source srcset="emojichooser-dark.png"…
- EmojiChooserClass
- Entry — A single-line text entry widget. <picture> <source srcset="entry-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- EntryBuffer — Holds the text that is displayed in a single-line text entry widget. A single
GtkEntryBufferobject can be shared by multiple widgets… - EntryBufferClass
- EntryClass — Class structure for
GtkEntry. All virtual functions have a default implementation. Derived classes may set the virtual function pointers… - EntryCompletion —
GtkEntryCompletionis an auxiliary object to provide completion functionality forGtkEntry. It implements the CellLayout interface, to… - EventController — The base class for event controllers. These are ancillary objects associated to widgets, which react to
GdkEvents, and possibly trigger… - EventControllerClass
- EventControllerFocus — Tracks keyboard focus. The event controller offers EventControllerFocus.enter and EventControllerFocus.leave signals, as well as…
- EventControllerFocusClass
- EventControllerKey — Provides access to key events.
- EventControllerKeyClass
- EventControllerLegacy — Provides raw 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…
- EventControllerLegacyClass
- EventControllerMotion — Tracks the pointer position. The event controller offers EventControllerMotion.enter and EventControllerMotion.leave signals, as well as…
- EventControllerMotionClass
- EventControllerScroll — Handles scroll events. It is capable of handling both discrete and continuous scroll events from mice or touchpads, abstracting them both…
- EventControllerScrollClass
- EveryFilter — Matches an item when each of its filters matches. To add filters to a
GtkEveryFilter, use MultiFilter.append. - EveryFilterClass
- Expander — Allows the user to reveal or conceal a child widget. <picture> <source srcset="expander-dark.png" media="(prefers-color-scheme:…
- Expression — Provides a way to describe references to values. An important aspect of expressions is that the value can be obtained from a source that is…
- ExpressionWatch — An opaque structure representing a watched
GtkExpression. The contents ofGtkExpressionWatchshould only be accessed through the… - FileChooser —
GtkFileChooseris an interface that can be implemented by file selection widgets. In GTK, the main objects that implement this interface… - FileChooserDialog —
GtkFileChooserDialogis a dialog suitable for use with “File Open” or “File Save” commands. An example GtkFileChooserDialog This widget… - FileChooserNative —
GtkFileChooserNativeis an abstraction of a dialog suitable for use with “File Open” or “File Save as” commands. By default, this just… - FileChooserNativeClass
- FileChooserWidget —
GtkFileChooserWidgetis a widget for choosing files. It exposes the FileChooser interface, and you should use the methods of this… - FileDialog — Asynchronous API to present a file chooser dialog.
GtkFileDialogcollects the arguments that are needed to present the dialog to the… - FileDialogClass
- FileFilter — Filters files by name or mime type.
GtkFileFiltercan be used to restrict the files being shown in a file chooser. Files can be filtered… - FileLauncher — Asynchronous API to open a file with an application.
GtkFileLaunchercollects the arguments that are needed to open the file. Depending… - FileLauncherClass
- Filter — Describes the filtering to be performed by a FilterListModel. The model will use the filter to determine if it should include items or not…
- FilterClass
- FilterListModel — A list model that filters the elements of another model. It hides some elements from the underlying model according to criteria given by a…
- FilterListModelClass
- Fixed — Places its child widgets at fixed positions and with fixed sizes.
GtkFixedperforms no automatic layout management. For most… - FixedClass
- FixedLayout — Places child widgets at fixed positions. Most applications should never use this layout manager; fixed positioning and sizing requires…
- FixedLayoutChild —
GtkLayoutChildsubclass for children in aGtkFixedLayout. - FixedLayoutChildClass
- FixedLayoutClass
- FlattenListModel — A list model that concatenates other list models.
GtkFlattenListModeltakes a list model containing list models, and flattens it into a… - FlattenListModelClass
- FlowBox — Puts child widgets in a reflowing grid. <picture> <source srcset="flow-box-dark.png" media="(prefers-color-scheme: dark)"> <img…
- FlowBoxChild — The kind of widget that can be added to a
GtkFlowBox. FlowBox will automatically wrap its children in aGtkFlowBoxChildwhen necessary. - FlowBoxChildClass
- FontButton — The
GtkFontButtonallows to open a font chooser dialog to change the font. <picture> <source srcset="font-button-dark.png"… - FontChooser —
GtkFontChooseris an interface that can be implemented by widgets for choosing fonts. In GTK, the main objects that implement this… - FontChooserDialog — The
GtkFontChooserDialogwidget is a dialog for selecting a font. <picture> <source srcset="fontchooser-dark.png"… - FontChooserIface
- FontChooserWidget — The
GtkFontChooserWidgetwidget lets the user select a font. It is used in theGtkFontChooserDialogwidget to provide a dialog for… - FontDialog — Asynchronous API to present a font chooser dialog.
GtkFontDialogcollects the arguments that are needed to present the dialog to the… - FontDialogButton — Opens a font chooser dialog to select a font. <picture> <source srcset="font-button-dark.png" media="(prefers-color-scheme: dark)">…
- FontDialogButtonClass
- FontDialogClass
- Frame — Surrounds its child with a decorative frame and an optional label. <picture> <source srcset="frame-dark.png"…
- FrameClass
- GLArea — Allows drawing with OpenGL. <picture> <source srcset="glarea-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example…
- GLAreaClass — The
GtkGLAreaClassstructure contains only private data. - Gesture — The base class for gesture recognition. Although
GtkGestureis quite generalized to serve as a base for multi-touch gestures, it is… - GestureClass
- GestureClick — Recognizes click gestures. It is able to recognize multiple clicks on a nearby zone, which can be listened for through the…
- GestureClickClass
- GestureDrag — Recognizes drag gestures. The drag operation itself can be tracked throughout the GestureDrag.drag-begin, GestureDrag.drag-update and…
- GestureDragClass
- GestureLongPress — Recognizes long press gestures. This gesture is also known as “Press and Hold”. When the timeout is exceeded, the gesture is triggering the…
- GestureLongPressClass
- GesturePan — Recognizes pan gestures. These are drags that are locked to happen along one axis. The axis that a
GtkGesturePanhandles is defined at… - GesturePanClass
- GestureRotate — Recognizes 2-finger rotation gestures. Whenever the angle between both handled sequences changes, the GestureRotate.angle-changed signal is…
- GestureRotateClass
- GestureSingle — A
GtkGesturesubclass optimized for singe-touch and mouse gestures. Under interaction, these gestures stick to the first interacting… - GestureSingleClass
- GestureStylus — Recognizes tablet stylus input. The provided signals just relay the basic information of the stylus events.
- GestureStylusClass
- GestureSwipe — Recognizes swipe gestures. After a press/move/.../move/release sequence happens, the GestureSwipe.swipe signal will be emitted, providing…
- GestureSwipeClass
- GestureZoom — Recognizes 2-finger pinch/zoom gestures. Whenever the distance between both tracked sequences changes, the GestureZoom.scale-changed signal…
- GestureZoomClass
- GraphicsOffload — Bypasses gsk rendering by passing the content of its child directly to the compositor. Graphics offload is an optimization to reduce…
- GraphicsOffloadClass
- Grid — Arranges its child widgets in rows and columns. <picture> <source srcset="grid-dark.png" media="(prefers-color-scheme: dark)">…
- GridClass
- GridLayout — Arranges child widgets in rows and columns. Children have an "attach point" defined by the horizontal and vertical index of the cell they…
- GridLayoutChild —
GtkLayoutChildsubclass for children in aGtkGridLayout. - GridLayoutChildClass
- GridLayoutClass
- GridView — Presents a large dynamic grid of items.
GtkGridViewuses its factory to generate one child widget for each visible item and shows them in… - GridViewClass
- HeaderBar — Creates a custom titlebar for a window. <picture> <source srcset="headerbar-dark.png" media="(prefers-color-scheme: dark)"> <img…
- IMContext — The interface for GTK input methods.
GtkIMContextis used by GTK text input widgets likeGtkTextto map from key events to Unicode… - IMContextClass
- IMContextSimple — Supports compose sequences, dead keys and numeric Unicode input. #### Compose sequences
GtkIMContextSimplereads compose sequences from… - IMContextSimpleClass
- IMContextSimplePrivate
- IMMulticontext — Supports switching between multiple input methods. Text widgets such as
GtkTextorGtkTextViewuse aGtkIMMultiContextto implement… - IMMulticontextClass
- IMMulticontextPrivate
- IconPaintable — Contains information found when looking up an icon in
GtkIconThemeor loading it from a file.GtkIconPaintableimplements… - IconPaintableClass
- IconTheme — Loads themed icons. The main reason for using a name rather than simply providing a filename is to allow different icons to be used…
- IconView —
GtkIconViewis a widget which displays data in a grid of icons. <picture> <source srcset="icon-view-dark.png"… - Image — Displays an image. <picture> <source srcset="image-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkImage"…
- InfoBar —
GtkInfoBarcan be used to show messages to the user without a dialog. <picture> <source srcset="info-bar-dark.png"… - Inscription — Shows text in a predefined area. You likely want to use
GtkLabelinstead as this widget is intended only for a small subset of use cases.… - InscriptionClass
- KeyvalTrigger — Triggers when a specific keyval and modifiers are pressed.
- KeyvalTriggerClass
- Label — Displays a small amount of text. Most labels are used to label another widget (such as an
Entry). <picture> <source… - LayoutChild — The base class for objects that are meant to hold layout properties. If a
GtkLayoutManagerhas per-child properties, like their packing… - LayoutChildClass
- LayoutManager — Handles the preferred size and allocation for children of a widget. You typically subclass
GtkLayoutManagerif you want to implement a… - LayoutManagerClass — The
GtkLayoutManagerClassstructure contains only private data, and should only be accessed through the provided API, or when subclassing… - LevelBar — Shows a level indicator. Typical use cases are displaying the strength of a password, or showing the charge level of a battery.…
- LinkButton — A button with a hyperlink. <picture> <source srcset="link-button-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- ListBase — The abstract base class for GTK's list widgets. ### Shortcuts and Gestures
GtkListBasesupports the following keyboard shortcuts: -… - ListBaseClass
- ListBox — Shows a vertical list. <picture> <source srcset="list-box-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example…
- ListBoxRow — The kind of widget that can be added to a
GtkListBox. ListBox will automatically wrap its children in aGtkListboxRowwhen necessary. - ListBoxRowClass
- ListHeader — Used by list widgets to represent the headers they display.
GtkListHeaderobjects are managed just like ListItem objects via their… - ListHeaderClass
- ListItem — Used by list widgets to represent items in a Gio.ListModel.
GtkListItemobjects are managed by the list widget (with its factory) and… - ListItemClass
- ListItemFactory — Creates widgets for the items taken from a
GListModel. This is one of the core concepts of handling list widgets such as ListView or… - ListItemFactoryClass
- ListStore — A list-like data structure that can be used with the TreeView. The
GtkListStoreobject is a list model for use with aGtkTreeView… - ListStoreClass
- ListStorePrivate
- ListView — Presents a large dynamic list of items.
GtkListViewuses its factory to generate one row widget for each visible item and shows them in a… - ListViewClass
- LockButton —
GtkLockButtonis a widget to obtain and revoke authorizations needed to operate the controls. <picture> <source… - MapListModel — A list model that maps the items in another model to different items.
GtkMapListModeluses a MapListModelMapFunc. Example: Create a list… - MapListModelClass
- MediaControls — Shows controls for video playback. <picture> <source srcset="media-controls-dark.png" media="(prefers-color-scheme: dark)"> <img…
- MediaControlsClass
- MediaFile — Implements the
GtkMediaStreaminterface for files. This provides a simple way to play back video files with GTK. GTK provides a GIO… - MediaFileClass
- MediaStream — The integration point for media playback inside GTK. GTK provides an implementation of the
GtkMediaStreaminterface that is called… - MediaStreamClass
- MenuButton — Displays a popup when clicked. <picture> <source srcset="menu-button-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- MessageDialog —
GtkMessageDialogpresents a dialog with some message text. <picture> <source srcset="messagedialog-dark.png"… - MessageDialogClass
- MnemonicAction — Activates a widget with a mnemonic. This means that Widget.mnemonic_activate is called.
- MnemonicActionClass
- MnemonicTrigger — Triggers when a specific mnemonic is pressed. Mnemonics require a mnemonic modifier (typically <kbd>Alt</kbd>) to be pressed…
- MnemonicTriggerClass
- MountOperation — Asks the user for passwords and other information required to mount a volume.
GtkMountOperationis needed when mounting volumes: It is an… - MountOperationClass
- MountOperationPrivate
- MultiFilter — Base class for filters that combine multiple filters.
- MultiFilterClass
- MultiSelection — A selection model that allows selecting multiple elements.
- MultiSelectionClass
- MultiSorter — 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.
- MultiSorterClass
- NamedAction — Activates a named action. See WidgetClass.install_action and Widget.insert_action_group for ways to associate named actions with widgets.
- NamedActionClass
- Native — An interface for widgets that have their own Gdk.Surface. The obvious example of a
GtkNativeisGtkWindow. Every widget that is not… - NativeDialog — Base class for platform dialogs that don't use
GtkDialog. Native dialogs are used in order to integrate better with a platform, by… - NativeDialogClass — Class structure for
GtkNativeDialog. - NativeInterface
- NeverTrigger — A
GtkShortcutTriggerthat never triggers. - NeverTriggerClass
- NoSelection — A selection model that does not allow selecting anything. This model is meant to be used as a simple wrapper around a
GListModelwhen a… - NoSelectionClass
- Notebook — Switches between children using tabs. <picture> <source srcset="notebook-dark.png" media="(prefers-color-scheme: dark)"> <img…
- NotebookPage — An auxiliary object used by
GtkNotebook. - NothingAction — Does nothing.
- NothingActionClass
- NumericSorter — Sorts items numerically. To obtain the numbers to compare, this sorter evaluates a Expression.
- NumericSorterClass
- ObjectExpression — A
GObjectvalue in aGtkExpression. - Orientable — An interface for widgets that can be oriented horizontally or vertically.
GtkOrientableis more flexible in that it allows the… - OrientableIface
- Overlay — Places “overlay” widgets on top of a single main child. <picture> <source srcset="overlay-dark.png" media="(prefers-color-scheme:…
- OverlayLayout — The layout manager used by Overlay. It places widgets as overlays on top of the main child. This is not a reusable layout manager, since it…
- OverlayLayoutChild —
GtkLayoutChildsubclass for children in aGtkOverlayLayout. - OverlayLayoutChildClass
- OverlayLayoutClass
- PadActionEntry — Struct defining a pad action entry.
- PadController — Handles input from the pads found in drawing tablets. Pads are the collection of buttons and tactile sensors often found around the…
- PadControllerClass
- PageRange — A range of pages to print. See also PrintSettings.set_page_ranges.
- PageSetup — Stores page size, orientation and margins for printing. The idea is that you can get one of these from the page setup dialog and then pass…
- PageSetupUnixDialog — Presents a page setup dialog for platforms which don’t provide a native page setup dialog, like Unix. <picture> <source…
- Paned — Arranges its children in two panes, horizontally or vertically. <picture> <source srcset="panes-dark.png"…
- PaperSize —
GtkPaperSizehandles paper sizes. It uses the standard called PWG 5101.1-2002 PWG: Standard for Media Standardized Names to name the… - ParamSpecExpression — A
GParamSpecfor properties holding aGtkExpression. - PasswordEntry — A single-line text entry widget for entering passwords and other secrets. <picture> <source srcset="password-entry-dark.png"…
- PasswordEntryBuffer — A
GtkEntryBufferthat locks the underlying memory to prevent it from being swapped to disk.GtkPasswordEntryuses a… - PasswordEntryBufferClass
- PasswordEntryClass
- Picture — Displays a
GdkPaintable. <picture> <source srcset="picture-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example… - PictureClass
- Popover — Presents a bubble-like popup. <picture> <source srcset="popover-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- PopoverBin — A single child container with a popover. You should use
GtkPopoverBinwhenever you need to present a Popover to the user. #### Actions… - PopoverBinClass
- PopoverClass
- PopoverMenu — A subclass of
GtkPopoverthat implements menu behavior. <picture> <source srcset="menu-dark.png" media="(prefers-color-scheme:… - PopoverMenuBar — Presents a horizontal bar of items that pop up menus when clicked. <picture> <source srcset="menubar-dark.png"…
- PrintBackend — A print backend.
- PrintContext — Encapsulates context information that is required when drawing pages for printing. This includes the cairo context and important parameters…
- PrintDialog — Asynchronous API to present a print dialog to the user.
GtkPrintDialogcollects the arguments that are needed to present the dialog, such… - PrintDialogClass
- PrintJob — Represents a job that is sent to a printer. You only need to deal directly with print jobs if you use the non-portable PrintUnixDialog API.…
- PrintOperation — High-level, portable printing API. It looks a bit different than other GTK dialogs such as the
GtkFileChooser, since some platforms don’t… - PrintOperationClass
- PrintOperationPreview — The interface that is used to implement print preview. A
GtkPrintOperationPreviewobject is passed to the PrintOperation.preview signal… - PrintOperationPreviewIface
- PrintOperationPrivate
- PrintSettings — Collects 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…
- PrintSetup — An auxiliary object for printing that allows decoupling the setup from the printing. A print setup is obtained by calling…
- PrintUnixDialog — A print dialog for platforms which don’t provide a native print dialog, like Unix. <picture> <source srcset="printdialog-dark.png"…
- Printer — Represents a printer. You only need to deal directly with printers if you use the non-portable PrintUnixDialog API. A
GtkPrinterallows… - ProgressBar — Displays the progress of a long-running operation.
GtkProgressBarprovides a visual clue that processing is underway. It can be used in… - PropertyExpression — A
GObjectproperty value in aGtkExpression. - Range — Base class for widgets which visualize an adjustment. Widgets that are derived from
GtkRangeinclude Scale and Scrollbar. Apart from… - RangeClass
- RecentData — Meta-data to be passed to RecentManager.add_full when registering a recently used resource.
- RecentInfo — Contains the metadata associated with an item in the recently used files list.
- RecentManager — Manages and looks up recently used files. Each recently used file is identified by its URI, and has meta-data associated to it, like the…
- RecentManagerClass —
GtkRecentManagerClasscontains only private data. - RecentManagerPrivate
- RequestedSize — Represents a request of a screen object in a given orientation. These are primarily used in container implementations when allocating a…
- Requisition — Represents the desired size of a widget. See GtkWidget’s geometry management section for more information.
- Revealer — Animates the transition of its child from invisible to visible. The style of transition can be controlled with…
- Root — An interface for widgets that can act as the root of a widget hierarchy. The root widget takes care of providing the connection to the…
- RootInterface
- Scale — Allows to select a numeric value with a slider control. <picture> <source srcset="scales-dark.png" media="(prefers-color-scheme:…
- ScaleButton — Provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and…
- ScaleButtonClass
- ScaleClass
- ScrollInfo — Provides detailed information on how a scroll operation should be performed. Scrolling functions usually allow passing a
NULLscroll info… - Scrollable — An interface for widgets with native scrolling ability. To implement this interface you should override the Scrollable.hadjustment and…
- ScrollableInterface
- Scrollbar — Shows a horizontal or vertical scrollbar. <picture> <source srcset="scrollbar-dark.png" media="(prefers-color-scheme: dark)"> <img…
- ScrolledWindow — Makes its child scrollable. <picture> <source srcset="scrolledwindow-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- SearchBar — Reveals a search entry when search is started. <picture> <source srcset="search-bar-dark.png" media="(prefers-color-scheme: dark)">…
- SearchEntry — A single-line text entry widget for use as a search entry. The main API for interacting with a
GtkSearchEntryas entry is the… - SectionModel — An interface that adds support for sections to list models. A
GtkSectionModelgroups successive items into so-called sections. List… - SectionModelInterface — The list of virtual functions for the
GtkSectionModelinterface. No function must be implemented, but unless… - SelectionFilterModel — A list model that presents the selection from a
GtkSelectionModel. - SelectionFilterModelClass
- SelectionModel — An interface that adds support for selection to list models. This support is then used by widgets using list models to add the ability to…
- SelectionModelInterface — The list of virtual functions for the
GtkSelectionModelinterface. No function must be implemented, but unless… - Separator — Draws a horizontal or vertical line to separate other widgets. <picture> <source srcset="separator-dark.png"…
- Settings — Provides a mechanism to share global settings between applications. GTK relies on the platform-specific API for getting desktop-wide…
- Shortcut — Describes a keyboard shortcut. It contains a description of how to trigger the shortcut via a ShortcutTrigger and a way to activate the…
- ShortcutAction — Encodes an action that can be triggered by a keyboard shortcut.
GtkShortcutActionscontain functions that allow easy presentation to end… - ShortcutActionClass
- ShortcutClass
- ShortcutController — Manages keyboard shortcuts and their activation. Most common shortcuts are using this controller implicitly, e.g. by adding a mnemonic…
- ShortcutControllerClass
- ShortcutLabel —
GtkShortcutLabeldisplays a single keyboard shortcut or gesture. The main use case forGtkShortcutLabelis inside a ShortcutsWindow. - ShortcutLabelClass
- ShortcutManager — An interface that is used to implement shortcut scopes. This is important for Native widgets that have their own surface, since the event…
- ShortcutManagerInterface — The list of functions that can be implemented for the
GtkShortcutManagerinterface. Note that no function is mandatory to implement, the… - ShortcutTrigger — Tracks how a
GtkShortcutcan be activated. To find out if aGtkShortcutTriggertriggers, you can call ShortcutTrigger.trigger on a… - ShortcutTriggerClass
- ShortcutsGroup — A
GtkShortcutsGrouprepresents a group of related keyboard shortcuts or gestures. The group has a title. It may optionally be associated… - ShortcutsGroupClass
- ShortcutsSection — A
GtkShortcutsSectioncollects all the keyboard shortcuts and gestures for a major application mode. If your application needs multiple… - ShortcutsSectionClass
- ShortcutsShortcut — A
GtkShortcutsShortcutrepresents a single keyboard shortcut or gesture with a short text. This widget is only meant to be used with… - ShortcutsShortcutClass
- ShortcutsWindow — A
GtkShortcutsWindowshows information about the keyboard shortcuts and gestures of an application. The shortcuts can be grouped, and you… - SignalAction — Emits a signal on a widget. Signals that are used in this way are referred to as keybinding signals, and they are expected to be defined…
- SignalActionClass
- SignalListItemFactory — Emits signals to manage listitems. Signals are emitted for every listitem in the same order: 1. SignalListItemFactory.setup is emitted to…
- SignalListItemFactoryClass
- SingleSelection — A selection model that allows selecting a single item. Note that the selection is persistent -- if the selected item is removed and…
- SingleSelectionClass
- SizeGroup — Groups widgets together so they all request the same size. This is typically useful when you want a column of widgets to have the same…
- SliceListModel — A list model that presents a slice of another model. This is useful when implementing paging by setting the size to the number of elements…
- SliceListModelClass
- Snapshot — Assists in creating
Gsk.RenderNodes for widgets. It functions in a similar way to a cairo context, and maintains a stack of render nodes… - SnapshotClass
- SortListModel — A list model that sorts the elements of another model. The elements are sorted according to a
GtkSorter. The model is a stable sort. If… - SortListModelClass
- Sorter — Describes sorting criteria for a SortListModel. Its primary user is SortListModel The model will use a sorter to determine the order in…
- SorterClass — The virtual table for
GtkSorter. - SpinButton — Allows to enter or change numeric values. <picture> <source srcset="spinbutton-dark.png" media="(prefers-color-scheme: dark)">…
- Spinner — Displays an icon-size spinning animation. It is often used as an alternative to a ProgressBar for displaying indefinite activity, instead…
- Stack — Shows one of its children at a time. <picture> <source srcset="stack-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An…
- StackPage — An auxiliary class used by
GtkStack. - StackSidebar — Uses a sidebar to switch between
GtkStackpages. <picture> <source srcset="sidebar-dark.png" media="(prefers-color-scheme: dark)">… - StackSwitcher — Shows a row of buttons to switch between
GtkStackpages. <picture> <source srcset="stackswitcher-dark.png"… - Statusbar — A
GtkStatusbarwidget is usually placed along the bottom of an application's main Window. <picture> <source… - StringFilter — Determines whether to include items by comparing strings to a fixed search term. The strings are obtained from the items by evaluating an…
- StringFilterClass
- StringList — A list model that wraps an array of strings. The objects in the model are of type StringObject and have a "string" property that can be…
- StringListClass
- StringObject — The type of items in a
GtkStringList. AGtkStringObjectis a wrapper around aconst char*; it has a StringObject.string property that… - StringObjectClass
- StringSorter — Sorts items by comparing strings. To obtain the strings to compare, this sorter evaluates a Expression. It does the comparison in a…
- StringSorterClass
- StyleContext —
GtkStyleContextstores styling information affecting a widget. In order to construct the final style information,GtkStyleContext… - StyleContextClass
- StyleProvider — An interface for style information used by StyleContext. See StyleContext.add_provider and StyleContext.add_provider_for_display for adding…
- Svg — A paintable implementation that renders SVG, with animations.
GtkSvgobjects are created by parsing a subset of SVG, including SVG… - SvgClass
- SvgLocation — Provides information about a location in an SVG document. The information should be considered approximate; it is meant to provide feedback…
- Switch — Shows a "light switch" that has two states: on or off. <picture> <source srcset="switch-dark.png" media="(prefers-color-scheme:…
- SymbolicPaintable — An interface that supports symbolic colors in paintables.
GdkPaintables implementing the interface will have the… - SymbolicPaintableInterface — The list of virtual functions for the
GtkSymbolicPaintableinterface. No function must be implemented, default implementations exist for… - Text — A single-line text entry.
GtkTextis the common implementation of single-line text editing that is shared between Entry, PasswordEntry,… - TextBuffer — Stores text and attributes for display in a
GtkTextView. You may wish to begin by reading the text widget conceptual overview, which… - TextBufferClass — The class structure for
GtkTextBuffer. - TextBufferPrivate
- TextChildAnchor — Marks a spot in a
GtkTextBufferwhere child widgets can be “anchored”. The anchor can have multiple widgets anchored, to allow for… - TextChildAnchorClass
- TextIter — Iterates over the contents of a
GtkTextBuffer. You may wish to begin by reading the text widget conceptual overview, which gives an… - TextMark — Marks a position in a
GtkTextbufferthat is preserved across modifications. You may wish to begin by reading the text widget conceptual… - TextMarkClass
- TextTag — Can be applied to text contained in a
GtkTextBuffer. You may wish to begin by reading the text widget conceptual overview, which gives an… - TextTagClass
- TextTagPrivate
- TextTagTable — Collects the tags in a
GtkTextBuffer. You may wish to begin by reading the text widget conceptual overview, which gives an overview of… - TextView — Displays the contents of a TextBuffer. <picture> <source srcset="multiline-text-dark.png" media="(prefers-color-scheme: dark)">…
- TextViewClass
- TextViewPrivate
- ToggleButton — Shows a button which remains “pressed-in” when clicked. <picture> <source srcset="toggle-button-dark.png"…
- ToggleButtonClass
- Tooltip — Represents a widget tooltip. Basic tooltips can be realized simply by using Widget.set_tooltip_text or Widget.set_tooltip_markup without…
- TreeDragDest — Interface for Drag-and-Drop destinations in
GtkTreeView. - TreeDragDestIface
- TreeDragSource — Interface for Drag-and-Drop destinations in
GtkTreeView. - TreeDragSourceIface
- TreeExpander — Provides an expander for a tree-like list. It is typically placed as a bottommost child into a
GtkListViewto allow users to expand and… - TreeExpanderClass
- TreeIter — The
GtkTreeIteris the primary structure for accessing aGtkTreeModel. Models are expected to put a unique integer in thestamp… - TreeListModel — A list model that can create child models on demand.
- TreeListModelClass
- TreeListRow — The type of item used by
GtkTreeListModel. It allows navigating the model as a tree and modify the state of rows.GtkTreeListRow… - TreeListRowClass
- TreeListRowSorter — Applies a gives sorter to the levels in a tree. Here is an example for setting up a column view with a tree model and a…
- TreeListRowSorterClass
- TreeModel — The tree interface used by GtkTreeView The
GtkTreeModelinterface defines a generic tree interface for use by theGtkTreeViewwidget.… - TreeModelFilter — A
GtkTreeModelwhich hides parts of an underlying tree model AGtkTreeModelFilteris a tree model which wraps another tree model, and… - TreeModelFilterClass
- TreeModelFilterPrivate
- TreeModelIface
- TreeModelSort — A GtkTreeModel which makes an underlying tree model sortable The
GtkTreeModelSortis a model which implements theGtkTreeSortable… - TreeModelSortClass
- TreeModelSortPrivate
- 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
GtkTreePathrefers to a position, not a fixed… - TreeSelection — The selection object for GtkTreeView The
GtkTreeSelectionobject is a helper object to manage the selection for aGtkTreeViewwidget.… - TreeSortable — The interface for sortable models used by GtkTreeView
GtkTreeSortableis an interface to be implemented by tree models which support… - TreeSortableIface
- TreeStore — A tree-like data structure that can be used with the TreeView. The
GtkTreeStoreobject is a list model for use with aGtkTreeView… - TreeStoreClass
- TreeStorePrivate
- TreeView — A widget for displaying both trees and lists <picture> <source srcset="list-and-tree-dark.png" media="(prefers-color-scheme: dark)">…
- TreeViewClass
- TreeViewColumn — A visible column in a TreeView widget The
GtkTreeViewColumnobject represents a visible column in aGtkTreeViewwidget. It allows to… - TryExpression — A
GtkExpressionthat tries to evaluate each of its expressions until it succeeds. If all expressions fail to evaluate, the… - UriLauncher — Asynchronous API to open a uri with an application.
GtkUriLaunchercollects the arguments that are needed to open the uri. Depending on… - UriLauncherClass
- Video — Shows a
GtkMediaStreamwith media controls. <picture> <source srcset="video-dark.png" media="(prefers-color-scheme: dark)"> <img… - VideoClass
- Viewport — Implements scrollability for widgets that don't support scrolling on their own. Use
GtkViewportto scroll child widgets such as… - VolumeButton —
GtkVolumeButtonis aGtkScaleButtonsubclass tailored for volume control. <picture> <source srcset="volumebutton-dark.png"… - Widget — The base class for all widgets. It manages the widget lifecycle, layout, states and style. ##### Height-for-width Geometry Management GTK…
- WidgetClass
- WidgetClassPrivate
- WidgetPaintable — A
GdkPaintablethat displays the contents of a widget.GtkWidgetPaintablewill also take care of the widget not being in a state where… - WidgetPaintableClass
- WidgetPrivate
- Window — A toplevel window which can contain other widgets. <picture> <source srcset="window-dark.png" media="(prefers-color-scheme: dark)">…
- WindowClass
- WindowControls — Shows window frame controls. Typical window frame controls are minimize, maximize and close buttons, and the window icon. <picture>…
- WindowControlsClass
- WindowGroup — Creates groups of windows that behave like separate applications. It achieves this by limiting the effect of GTK grabs and modality to…
- WindowGroupClass
- WindowGroupPrivate
- WindowHandle — Implements titlebar functionality for a window. When added into a window, it can be dragged to move the window, and it implements the right…
- WindowHandleClass
Functions¶
accelerator_get_accessible_label¶
def accelerator_get_accessible_label(accelerator_key: int, accelerator_mods: Gdk.ModifierType | int) -> str
Generates an accessible description of an accelerator.
This function is similar to accelerator_get_label but it is meant
for accessibility layers labels rather than user-facing labels. The output
of this function is fit for AccessibleProperty.KEY_SHORTCUTS.
For more information, see the WAI-ARIA reference.
Parameters:
accelerator_key— accelerator keyvalaccelerator_mods— accelerator modifier mask
accelerator_get_default_mod_mask¶
Gets the modifier mask.
The modifier mask determines which modifiers are considered significant
for keyboard accelerators. This includes all keyboard modifiers except
for GDK_LOCK_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.
Parameters:
accelerator_key— accelerator keyvalaccelerator_mods— accelerator modifier mask
accelerator_get_label_with_keycode¶
def accelerator_get_label_with_keycode(display: Gdk.Display | None, accelerator_key: int, keycode: int, accelerator_mods: Gdk.ModifierType | int) -> str
Converts an accelerator keyval and modifier mask into a string that can be displayed to the user.
The string may be translated.
This function is similar to accelerator_get_label,
but handling keycodes. This is only useful for system-level
components, applications should use accelerator_get_label
instead.
Parameters:
display— aGdkDisplayaccelerator_key— accelerator keyvalkeycode— accelerator keycodeaccelerator_mods— accelerator modifier mask
accelerator_name¶
Converts an accelerator keyval and modifier mask into a string
that can be parsed by accelerator_parse.
For example, if you pass in GDK_KEY_q and GDK_CONTROL_MASK,
this function returns <Control>q.
If you need to display accelerators in the user interface,
see accelerator_get_label.
Parameters:
accelerator_key— accelerator keyvalaccelerator_mods— accelerator modifier mask
accelerator_name_with_keycode¶
def accelerator_name_with_keycode(display: Gdk.Display | None, accelerator_key: int, keycode: int, accelerator_mods: Gdk.ModifierType | int) -> str
Converts an accelerator keyval and modifier mask
into a string that can be parsed by accelerator_parse_with_keycode.
This is similar to accelerator_name but handling keycodes.
This is only useful for system-level components, applications
should use accelerator_name instead.
Parameters:
display— aGdkDisplayaccelerator_key— accelerator keyvalkeycode— accelerator keycodeaccelerator_mods— accelerator modifier mask
accelerator_parse¶
Parses a string representing an accelerator.
The format looks like “<Control>a” or “<Shift><Alt>F1”.
The parser is fairly liberal and allows lower or upper case, and also
abbreviations such as “<Ctl>” and “<Ctrl>”.
Key names are parsed using Gdk.keyval_from_name. For character keys
the name is not the symbol, but the lowercase name, e.g. one would use
“<Ctrl>minus” instead of “<Ctrl>-”.
Modifiers are enclosed in angular brackets <>, and match the
Gdk.ModifierType mask:
<Shift>forGDK_SHIFT_MASK<Ctrl>forGDK_CONTROL_MASK<Alt>forGDK_ALT_MASK<Meta>forGDK_META_MASK<Super>forGDK_SUPER_MASK<Hyper>forGDK_HYPER_MASK
If the parse operation fails, accelerator_key and accelerator_mods will
be set to 0 (zero).
Parameters:
accelerator— string representing an accelerator
accelerator_parse_with_keycode¶
def accelerator_parse_with_keycode(accelerator: str, display: Gdk.Display | None = ...) -> tuple[bool, int, list[int], Gdk.ModifierType | int]
Parses a string representing an accelerator.
This is similar to accelerator_parse but handles keycodes as
well. This is only useful for system-level components, applications should
use accelerator_parse instead.
If accelerator_codes is given and the result stored in it is non-None,
the result must be freed with GLib.free.
If a keycode is present in the accelerator and no accelerator_codes
is given, the parse will fail.
If the parse fails, accelerator_key, accelerator_mods and
accelerator_codes will be set to 0 (zero).
Parameters:
accelerator— string representing an acceleratordisplay— theGdkDisplayto look upaccelerator_codesin
accelerator_valid¶
Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.
For example, the GDK_KEY_a keyval plus GDK_CONTROL_MASK mask is valid,
and matches the “Ctrl+a” accelerator. But, you can't, for instance, use
the GDK_KEY_Control_L keyval as an accelerator.
Parameters:
keyval— a GDK keyvalmodifiers— modifier mask
check_version¶
Checks that the GTK library in use is compatible with the given version.
Generally you would pass in the constants MAJOR_VERSION,
MINOR_VERSION, 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.
Compatibility is defined by two things: first the version
of the running library is newer than the version
required_major.required_minor.required_micro. Second
the running library must be binary compatible with the
version required_major.required_minor.required_micro
(same major version.)
This function is primarily for GTK modules; the module
can call this function to check that it wasn’t loaded
into an incompatible version of GTK. However, such a
check isn’t completely reliable, since the module may be
linked against an old version of GTK and calling the
old version of check_version, but still get loaded
into an application using a newer version of GTK.
Parameters:
required_major— the required major versionrequired_minor— the required minor versionrequired_micro— the required micro version
css_parser_error_quark¶
Registers an error quark for CSS parsing errors.
css_parser_warning_quark¶
Registers an error quark for CSS parsing warnings.
disable_portal_interfaces¶
Prevents GTK from using the specified portals.
This should only be used in portal implementations, apps must not call it.
Parameters:
portal_interfaces— aNone-terminated array of portal interface names to disable
disable_portals¶
Prevents GTK from using portals.
This is equivalent to setting GDK_DEBUG=no-portals in the environment.
This should only be used in portal implementations, apps must not call it.
disable_setlocale¶
Prevents init and init_check from calling setlocale().
You would want to use this function if you wanted to set the locale for your program to something other than the user’s locale, or if you wanted to set different values for different locale categories.
Most programs should not need to call this function.
distribute_natural_allocation¶
Distributes extra_space to child sizes by bringing smaller
children up to natural size first.
The remaining space will be added to the minimum_size member of the
GtkRequestedSize struct. If all sizes reach their natural size then
the remaining space is returned.
Parameters:
extra_space— Extra space to redistribute among children after subtracting minimum sizes and any child padding from the overall allocationsizes— An array of structs with a client pointer and a minimum/natural size in the orientation of the allocation.
enumerate_printers¶
Calls a function for all printers that are known to GTK.
If func returns true, the enumeration is stopped.
Parameters:
func— a function to call for each printerwait— if true, wait in a recursive mainloop until all printers are enumerated; otherwise return early
get_binary_age¶
Returns the binary age as passed to libtool.
If libtool means nothing to you, don't worry about it.
get_debug_flags¶
Returns the GTK debug flags that are currently active.
This function is intended for GTK modules that want to adjust their debug output based on GTK debug flags.
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.
This function is equivalent to Pango.Language.get_default.
See that function for details.
get_interface_age¶
Returns the interface age as passed to libtool.
If libtool means nothing to you, don't worry about it.
get_locale_direction¶
Gets the direction of the current locale.
This is the expected reading direction for text and UI.
This function depends on the current locale being set with
setlocale() and will default to setting the GTK_TEXT_DIR_LTR
direction otherwise. GTK_TEXT_DIR_NONE will never be returned.
GTK sets the default text direction according to the locale during
init, and you should normally use Widget.get_direction
or Widget.get_default_direction to obtain the current direction.
This function is only needed rare cases when the locale is changed after GTK has already been initialized. In this case, you can use it to update the default text direction as follows:
#include <locale.h>
static void
update_locale (const char *new_locale)
{
setlocale (LC_ALL, new_locale);
gtk_widget_set_default_direction (gtk_get_locale_direction ());
}
get_major_version¶
Returns the major version number of the GTK library.
For example, in GTK version 3.1.5 this is 3.
This function is in the library, so it represents the GTK library
your code is running against. Contrast with the MAJOR_VERSION
macro, which represents the major version of the GTK headers you
have included when compiling your code.
get_micro_version¶
Returns the micro version number of the GTK library.
For example, in GTK version 3.1.5 this is 5.
This function is in the library, so it represents the GTK library
your code is are running against. Contrast with the
MICRO_VERSION macro, which represents the micro version of the
GTK headers you have included when compiling your code.
get_minor_version¶
Returns the minor version number of the GTK library.
For example, in GTK version 3.1.5 this is 1.
This function is in the library, so it represents the GTK library
your code is are running against. Contrast with the
MINOR_VERSION macro, which represents the minor version of the
GTK headers you have included when compiling your code.
hsv_to_rgb¶
Converts a color from HSV space to RGB.
Input values must be in the [0.0, 1.0] range; output values will be in the same range.
Parameters:
h— Hues— Saturationv— Value
init¶
Initializes GTK.
This function must be called before using any other GTK functions in your GUI applications.
It will initialize everything needed to operate the toolkit. In particular,
it will open the default display (see Gdk.Display.get_default).
If you are using Application, you usually don't have to call this
function; the Gio.Application.startup handler does it for you. Though,
if you are using GApplication methods that will be invoked before startup,
such as local_command_line, you may need to initialize GTK explicitly.
This function will terminate your program if it was unable to initialize
the windowing system for some reason. If you want your program to fall back
to a textual interface, call init_check instead.
GTK calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore
SIGPIPE signals, since these are almost never wanted in graphical
applications. If you do need to handle SIGPIPE for some reason, reset
the handler after init, but notice that other libraries (e.g.
libdbus or gvfs) might do similar things.
init_check¶
Initializes GTK.
This function does the same work as 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.
This way the application can fall back to some other means of communication with the user - for example a curses or command line interface.
is_initialized¶
Returns whether GTK has been initialized.
See init.
param_spec_expression¶
def param_spec_expression(name: str, nick: str, blurb: str, flags: GObject.ParamFlags | int) -> GObject.ParamSpec
Creates a new GParamSpec instance for a property holding a GtkExpression.
See g_param_spec_internal() for details on the property strings.
Parameters:
name— canonical name of the propertynick— a user-readable name for the propertyblurb— a user-readable description of the propertyflags— flags for the property
print_run_page_setup_dialog¶
def print_run_page_setup_dialog(parent: Window | None, page_setup: PageSetup | None, settings: PrintSettings) -> PageSetup
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.
Note that this function may use a recursive mainloop to show the page
setup dialog. See print_run_page_setup_dialog_async if this is
a problem.
Parameters:
parent— transient parentpage_setup— an existingGtkPageSetupsettings— aGtkPrintSettings
print_run_page_setup_dialog_async¶
def print_run_page_setup_dialog_async(parent: Window | None, page_setup: PageSetup | None, settings: PrintSettings, done_cb: PageSetupDoneFunc) -> None
Runs a page setup dialog, letting the user modify the values from page_setup.
In contrast to print_run_page_setup_dialog, this function returns
after showing the page setup dialog on platforms that support this, and calls
done_cb from a signal handler for the ::response signal of the dialog.
Parameters:
parent— transient parentpage_setup— an existingGtkPageSetupsettings— aGtkPrintSettingsdone_cb— a function to call when the user saves the modified page setup
render_activity¶
def render_activity(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders an activity indicator (such as in GtkSpinner).
The state StateFlags.CHECKED determines whether there is
activity going on.
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
render_arrow¶
def render_arrow(context: StyleContext, cr: cairo.Context[cairo.Surface], angle: float, x: float, y: float, size: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders an arrow pointing to angle.
Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:
Parameters:
context— aGtkStyleContextcr— acairo_tangle— arrow angle from 0 to 2 *GLib.PI, being 0 the arrow pointing to the northx— X origin of the render areay— Y origin of the render areasize— square side for render area
render_background¶
def render_background(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders the background of an element.
Typical background rendering, showing the effect of
background-image, border-width and border-radius:
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
render_check¶
def render_check(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders a checkmark (as in a GtkCheckButton).
The StateFlags.CHECKED state determines whether the check is
on or off, and StateFlags.INCONSISTENT determines whether it
should be marked as undefined.
Typical checkmark rendering:
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
render_expander¶
def render_expander(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders an expander (as used in GtkTreeView and GtkExpander) in the area
defined by x, y, width, height. The state StateFlags.CHECKED
determines whether the expander is collapsed or expanded.
Typical expander rendering:
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
render_focus¶
def render_focus(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders a focus indicator on the rectangle determined by x, y, width, height.
Typical focus rendering:
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
render_frame¶
def render_frame(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders a frame around the rectangle defined by x, y, width, height.
Examples of frame rendering, showing the effect of border-image,
border-color, border-width, border-radius and junctions:
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
render_handle¶
def render_handle(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders a handle (as in GtkPaned and GtkWindow’s resize grip),
in the rectangle determined by x, y, width, height.
Handles rendered for the paned and grip classes:
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
render_icon¶
def render_icon(context: StyleContext, cr: cairo.Context[cairo.Surface], texture: Gdk.Texture, x: float, y: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders the icon in texture at the specified x and y coordinates.
This function will render the icon in texture at exactly its size,
regardless of scaling factors, which may not be appropriate when
drawing on displays with high pixel densities.
Parameters:
context— aGtkStyleContextcr— acairo_ttexture— aGdkTexturecontaining the icon to drawx— X position for thetexturey— Y position for thetexture
render_layout¶
def render_layout(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, layout: Pango.Layout) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders layout on the coordinates x, y
Parameters:
context— aGtkStyleContextcr— acairo_tx— X originy— Y originlayout— thePangoLayoutto render
render_line¶
def render_line(context: StyleContext, cr: cairo.Context[cairo.Surface], x0: float, y0: float, x1: float, y1: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders a line from (x0, y0) to (x1, y1).
Parameters:
context— aGtkStyleContextcr— acairo_tx0— X coordinate for the origin of the liney0— Y coordinate for the origin of the linex1— X coordinate for the end of the liney1— Y coordinate for the end of the line
render_option¶
def render_option(context: StyleContext, cr: cairo.Context[cairo.Surface], x: float, y: float, width: float, height: float) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
Renders an option mark (as in a radio button), the StateFlags.CHECKED
state will determine whether the option is on or off, and
StateFlags.INCONSISTENT whether it should be marked as undefined.
Typical option mark rendering:
Parameters:
context— aGtkStyleContextcr— acairo_tx— X origin of the rectangley— Y origin of the rectanglewidth— rectangle widthheight— rectangle height
rgb_to_hsv¶
Converts a color from RGB space to HSV.
Input values must be in the [0.0, 1.0] range; output values will be in the same range.
Parameters:
r— Redg— Greenb— Blue
set_debug_flags¶
Sets the GTK debug flags.
Parameters:
flags— the debug flags to set
show_uri¶
:::warning Deprecated since 4.10 This API is deprecated. :::
This function launches the default application for showing a given uri, or shows an error dialog if that fails.
Parameters:
parent— parent windowuri— the uri to showtimestamp— timestamp from the event that triggered this call, orGdk.CURRENT_TIME
show_uri_full¶
def show_uri_full(parent: Window | None, uri: str, timestamp: int, cancellable: Gio.Cancellable | None = ..., callback: Gio.AsyncReadyCallback | None = ...) -> None
:::warning Deprecated since 4.10 This API is deprecated. :::
This function launches the default application for showing a given uri.
The callback will be called when the launch is completed.
This is the recommended call to be used as it passes information necessary for sandbox helpers to parent their dialogs properly.
Parameters:
parent— parent windowuri— the uri to showtimestamp— timestamp from the event that triggered this call, orGdk.CURRENT_TIMEcancellable— aGCancellableto cancel the launchcallback— a callback to call when the action is complete
show_uri_full_finish¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Finishes the show_uri call and returns the result
of the operation.
Parameters:
parent— theGtkWindowpassed toshow_uriresult—GAsyncResultthat was passed tocallback
test_accessible_assertion_message_role¶
def test_accessible_assertion_message_role(domain: str, file: str, line: int, func: str, expr: str, accessible: Accessible, expected_role: AccessibleRole | int, actual_role: AccessibleRole | int) -> None
Prints an assertion message for gtk_test_accessible_assert_role().
Parameters:
domain— a domainfile— a file nameline— the line infilefunc— a function name infileexpr— the expression being testedaccessible— aGtkAccessibleexpected_role— the expectedGtkAccessibleRoleactual_role— the actualGtkAccessibleRole
test_accessible_has_property¶
def test_accessible_has_property(accessible: Accessible, property: AccessibleProperty | int) -> bool
Checks whether the GtkAccessible has property set.
Parameters:
accessible— aGtkAccessibleproperty— aGtkAccessibleProperty
test_accessible_has_relation¶
def test_accessible_has_relation(accessible: Accessible, relation: AccessibleRelation | int) -> bool
Checks whether the GtkAccessible has relation set.
Parameters:
accessible— aGtkAccessiblerelation— aGtkAccessibleRelation
test_accessible_has_role¶
Checks whether the GtkAccessible:accessible-role of the accessible
is role.
Parameters:
accessible— aGtkAccessiblerole— aGtkAccessibleRole
test_accessible_has_state¶
Checks whether the GtkAccessible has state set.
Parameters:
accessible— aGtkAccessiblestate— aGtkAccessibleState
test_list_all_types¶
Return the type ids that have been registered after
calling test_register_all_types.
test_register_all_types¶
Force registration of all core GTK object types.
This allows to refer to any of those object types via
GObject.type_from_name after calling this function.
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.
This function is intended to be used for syncing with actions that
depend on widget relayouting or on interaction with the display
server.
Parameters:
widget— the widget to wait for
tree_create_row_drag_content¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Creates a content provider for dragging path from tree_model.
Parameters:
tree_model— aGtkTreeModelpath— a row intree_model
tree_get_row_drag_data¶
:::warning Deprecated since 4.10 This API is deprecated. :::
Obtains a tree_model and path from value of target type
GTK_TYPE_TREE_ROW_DATA.
The returned path must be freed with TreePath.free.
Parameters:
value— aGValue
value_dup_expression¶
Retrieves the GtkExpression stored inside the given value, and acquires
a reference to it.
Parameters:
value— aGValueinitialized with typeGTK_TYPE_EXPRESSION
value_get_expression¶
Retrieves the GtkExpression stored inside the given value.
Parameters:
value— aGValueinitialized with typeGTK_TYPE_EXPRESSION
value_set_expression¶
Stores the given GtkExpression inside value.
The GValue will acquire a reference to the expression.
Parameters:
value— aGValueinitialized with typeGTK_TYPE_EXPRESSIONexpression— aGtkExpression
value_take_expression¶
Stores the given GtkExpression inside value.
This function transfers the ownership of the expression to the GValue.
Parameters:
value— aGValueinitialized with typeGTK_TYPE_EXPRESSIONexpression— aGtkExpression
Enumerations¶
AccessibleAnnouncementPriority¶
Enumeration.
LOW=0— The announcement is low priority, and might be read only on the user's request.MEDIUM=1— The announcement is of medium priority, and is usually spoken at the next opportunity, such as at the end of speaking the current sentence or when the user pauses typing.HIGH=2— The announcement is of high priority, and is usually spoken immediately. Because an interruption might disorient users or cause them to not complete their current task, authors SHOULD NOT use high priority announcements unless the interruption is imperative. An example would be a notification about a critical battery power level.
AccessibleAutocomplete¶
Enumeration.
NONE=0— Automatic suggestions are not displayed.INLINE=1— When a user is providing input, text suggesting one way to complete the provided input may be dynamically inserted after the caret.LIST=2— When a user is providing input, an element containing a collection of values that could complete the provided input may be displayed.BOTH=3— When a user is providing input, an element containing a collection of values that could complete the provided input may be displayed. If displayed, one value in the collection is automatically selected, and the text needed to complete the automatically selected value appears after the caret in the input.
AccessibleInvalidState¶
Enumeration.
FALSE=0— There are no detected errors in the valueTRUE=1— The value entered by the user has failed validationGRAMMAR=2— A grammatical error was detectedSPELLING=3— A spelling error was detected
AccessiblePlatformState¶
Enumeration.
FOCUSABLE=0— whether the accessible can be focusedFOCUSED=1— whether the accessible has focusACTIVE=2— whether the accessible is active
AccessibleProperty¶
Enumeration.
AUTOCOMPLETE=0— Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented if they were made. Value type:AccessibleAutocompleteDESCRIPTION=1— Defines a string value that describes or annotates the current element. Value type: stringHAS_POPUP=2— Indicates the availability of interactive popup element, such as menu or popover, that can be triggered by an element. Contrary to “aria-haspopup”, it doesn't indicate the type of the element, as such it cannot be used to indicate the availability of more complex elements such as dialog. Value type: booleanKEY_SHORTCUTS=3— Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. Value type: string. The format of the value is a space-separated list of shortcuts, with each shortcut consisting of one or more modifiers (Control,AltorShift), followed by a non-modifier key, all separated by+. The WAI-ARIA reference specifies how to build keyboard shortcuts strings, with specific values for each key which are the same regardless of the language, so these strings can't be built from localized key names. You can convert an accelerator into the matching key shortcuts label withaccelerator_get_accessible_label. Examples:F2,Alt+F,Control+Shift+NLABEL=4— Defines a string value that labels the current element. Value type: stringLEVEL=5— Defines the hierarchical level of an element within a structure. Value type: integerMODAL=6— Indicates whether an element is modal when displayed. Value type: booleanMULTI_LINE=7— Indicates whether a text box accepts multiple lines of input or only a single line. Value type: booleanMULTI_SELECTABLE=8— Indicates that the user may select more than one item from the current selectable descendants. Value type: booleanORIENTATION=9— Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. Value type:OrientationPLACEHOLDER=10— Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. Value type: stringREAD_ONLY=11— Indicates that the element is not editable, but is otherwise operable. Value type: booleanREQUIRED=12— Indicates that user input is required on the element before a form may be submitted. Value type: booleanROLE_DESCRIPTION=13— Defines a human-readable, author-localized description for the role of an element. Value type: stringSORT=14— Indicates if items in a table or grid are sorted in ascending or descending order. Value type:AccessibleSortVALUE_MAX=15— Defines the maximum allowed value for a range widget. Value type: doubleVALUE_MIN=16— Defines the minimum allowed value for a range widget. Value type: doubleVALUE_NOW=17— Defines the current value for a range widget. Value type: doubleVALUE_TEXT=18— Defines the human readable text alternative ofAccessibleProperty.VALUE_NOWfor a range widget. Value type: stringHELP_TEXT=19— Defines a string value that provides a description of non-standard keyboard interactions of the current element. Value type: string
AccessibleRelation¶
Enumeration.
ACTIVE_DESCENDANT=0— Identifies the currently active element when focus is on a composite widget, combobox, textbox, group, or application. Value type: referenceCOL_COUNT=1— Defines the total number of columns in a table, grid, or treegrid. Value type: integerCOL_INDEX=2— Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. Value type: integerCOL_INDEX_TEXT=3— Defines a human readable text alternative ofAccessibleRelation.COL_INDEX. Value type: stringCOL_SPAN=4— Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. Value type: integerCONTROLS=5— Identifies the element (or elements) whose contents or presence are controlled by the current element. Value type: referenceDESCRIBED_BY=6— Identifies the element (or elements) that describes the object. Value type: referenceDETAILS=7— Identifies the element (or elements) that provide additional information related to the object. Value type: referenceERROR_MESSAGE=8— Identifies the element (or elements) that provide an error message for an object. Value type: referenceFLOW_TO=9— Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. Value type: referenceLABELLED_BY=10— Identifies the element (or elements) that labels the current element. Value type: referenceOWNS=11— Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between elements where the widget hierarchy cannot be used to represent the relationship. Value type: referencePOS_IN_SET=12— Defines an element's number or position in the current set of listitems or treeitems. Value type: integerROW_COUNT=13— Defines the total number of rows in a table, grid, or treegrid. Value type: integerROW_INDEX=14— Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. Value type: integerROW_INDEX_TEXT=15— Defines a human readable text alternative ofAccessibleRelation.ROW_INDEX. Value type: stringROW_SPAN=16— Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. Value type: integerSET_SIZE=17— Defines the number of items in the current set of listitems or treeitems. Value type: integerLABEL_FOR=18— Identifies the element (or elements) that are labeled by the current element. Value type: reference This relation is managed by GTK and should not be set from application code.DESCRIPTION_FOR=19— Identifies the element (or elements) that are described by the current element. Value type: reference This relation is managed by GTK and should not be set from application code.CONTROLLED_BY=20— Identifies the element (or elements) that the current element is controlled by. Value type: reference This relation is managed by GTK and should not be set from application code.DETAILS_FOR=21— Identifies the element (or elements) for which the current element provides additional information. Value type: reference This relation is managed by GTK and should not be set from application code.ERROR_MESSAGE_FOR=22— Identifies the element (or elements) for which the current element provides an error message. Value type: reference This relation is managed by GTK and should not be set from application code.FLOW_FROM=23— Identifies the previous element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. Value type: reference This relation is managed by GTK and should not be set from application code.
AccessibleRole¶
Enumeration.
ALERT=0— An element with important, and usually time-sensitive, informationALERT_DIALOG=1— A type of dialog that contains an alert messageBANNER=2— UnusedBUTTON=3— An input element that allows for user-triggered actions when clicked or pressedCAPTION=4— UnusedCELL=5— UnusedCHECKBOX=6— A checkable input element that has three possible values:true,false, ormixedCOLUMN_HEADER=7— A header in a columned list.COMBO_BOX=8— An input that controls another element, such as a list or a grid, that can dynamically pop up to help the user set the value of the inputCOMMAND=9— Abstract role.COMPOSITE=10— Abstract role.DIALOG=11— A dialog is a window that is designed to interrupt the current processing of an application in order to prompt the user to enter information or require a response.DOCUMENT=12— Content that assistive technology users may want to browse in a reading mode.FEED=13— UnusedFORM=14— UnusedGENERIC=15— A nameless container that has no semantic meaning of its own. This is the role that GTK uses by default for widgets.GRID=16— A grid of items.GRID_CELL=17— An item in a grid or tree grid.GROUP=18— An element that groups multiple related widgets. GTK uses this role for various containers, likeHeaderBarorNotebook.HEADING=19— UnusedIMG=20— An image.INPUT=21— Abstract role.LABEL=22— A visible name or caption for a user interface component.LANDMARK=23— Abstract role.LEGEND=24— UnusedLINK=25— A clickable link.LIST=26— A list of items.LIST_BOX=27— Unused.LIST_ITEM=28— An item in a list.LOG=29— UnusedMAIN=30— UnusedMARQUEE=31— UnusedMATH=32— UnusedMETER=33— An element that represents a value within a known range.MENU=34— A menu.MENU_BAR=35— A menubar.MENU_ITEM=36— An item in a menu.MENU_ITEM_CHECKBOX=37— A check item in a menu.MENU_ITEM_RADIO=38— A radio item in a menu.NAVIGATION=39— UnusedNONE=40— An element that is not represented to accessibility technologies. This role is synonymous toGTK_ACCESSIBLE_ROLE_PRESENTATION.NOTE=41— UnusedOPTION=42— UnusedPRESENTATION=43— An element that is not represented to accessibility technologies. This role is synonymous toGTK_ACCESSIBLE_ROLE_NONE.PROGRESS_BAR=44— An element that displays the progress status for tasks that take a long time.RADIO=45— A checkable input in a group of radio roles, only one of which can be checked at a time.RADIO_GROUP=46— UnusedRANGE=47— Abstract role.REGION=48— UnusedROW=49— A row in a columned list.ROW_GROUP=50— UnusedROW_HEADER=51— UnusedSCROLLBAR=52— A graphical object that controls the scrolling of content within a viewing area, regardless of whether the content is fully displayed within the viewing area.SEARCH=53— UnusedSEARCH_BOX=54— A type of textbox intended for specifying search criteria.SECTION=55— Abstract role.SECTION_HEAD=56— Abstract role.SELECT=57— Abstract role.SEPARATOR=58— A divider that separates and distinguishes sections of content or groups of menuitems.SLIDER=59— A user input where the user selects a value from within a given range.SPIN_BUTTON=60— A form of range that expects the user to select from among discrete choices.STATUS=61— UnusedSTRUCTURE=62— Abstract role.SWITCH=63— A type of checkbox that represents on/off values, as opposed to checked/unchecked values.TAB=64— An item in a list of tab used for switching pages.TABLE=65— UnusedTAB_LIST=66— A list of tabs for switching pages.TAB_PANEL=67— A page in a notebook or stack.TEXT_BOX=68— A type of input that allows free-form text as its value.TIME=69— UnusedTIMER=70— UnusedTOOLBAR=71— UnusedTOOLTIP=72— UnusedTREE=73— UnusedTREE_GRID=74— A treeview-like, columned list.TREE_ITEM=75— UnusedWIDGET=76— Abstract role for interactive components of a graphical user interfaceWINDOW=77— Abstract role for windows.TOGGLE_BUTTON=78— A type of push button which stays pressed until depressed by a second activation.APPLICATION=79— A toplevel element of a graphical user interface. This is the role that GTK uses by default for windows.PARAGRAPH=80— A paragraph of content.BLOCK_QUOTE=81— A section of content that is quoted from another source.ARTICLE=82— A section of a page that consists of a composition that forms an independent part of a document, page, or site.COMMENT=83— A comment contains content expressing reaction to other content.TERMINAL=84— A virtual terminal.
AccessibleSort¶
Enumeration.
NONE=0— There is no defined sort applied to the column.ASCENDING=1— Items are sorted in ascending order by this column.DESCENDING=2— Items are sorted in descending order by this column.OTHER=3— A sort algorithm other than ascending or descending has been applied.
AccessibleState¶
Enumeration.
BUSY=0— A “busy” state. This state has boolean valuesCHECKED=1— A “checked” state; indicates the current state of aCheckButton. Value type:AccessibleTristateDISABLED=2— A “disabled” state; corresponds to theWidget.sensitiveproperty. It indicates a UI element that is perceivable, but not editable or operable. Value type: booleanEXPANDED=3— An “expanded” state; corresponds to theExpander.expandedproperty. Value type: boolean or undefinedHIDDEN=4— A “hidden” state; corresponds to theWidget.visibleproperty. You can use this state explicitly on UI elements that should not be exposed to an assistive technology. Value type: boolean See also:AccessibleState.DISABLEDINVALID=5— An “invalid” state; set when a widget is showing an error. Value type:AccessibleInvalidStatePRESSED=6— A “pressed” state; indicates the current state of aToggleButton. Value type:AccessibleTristateenumerationSELECTED=7— A “selected” state; set when a widget is selected. Value type: boolean or undefinedVISITED=8— Indicates that a widget with the GTK_ACCESSIBLE_ROLE_LINK has been visited. Value type: boolean.
AccessibleTextContentChange¶
Enumeration.
INSERT=0— contents change as the result of an insert operationREMOVE=1— contents change as the result of a remove operation
AccessibleTextGranularity¶
Enumeration.
CHARACTER=0— Use the boundary between characters (including non-printing characters)WORD=1— Use the boundary between words, starting from the beginning of the current word and ending at the beginning of the next wordSENTENCE=2— Use the boundary between sentences, starting from the beginning of the current sentence and ending at the beginning of the next sentenceLINE=3— Use the boundary between lines, starting from the beginning of the current line and ending at the beginning of the next linePARAGRAPH=4— Use the boundary between paragraphs, starting from the beginning of the current paragraph and ending at the beginning of the next paragraph
AccessibleTristate¶
Enumeration.
FALSE=0— The state isfalseTRUE=1— The state istrueMIXED=2— The state ismixed
Align¶
Enumeration.
FILL=0— stretch to fill all space if possible, center if no meaningful way to stretchSTART=1— snap to left or top side, leaving space on right or bottomEND=2— snap to right or bottom side, leaving space on left or topCENTER=3— center natural width of widget inside the allocationBASELINE_FILL=4— a different name forGTK_ALIGN_BASELINE.BASELINE=4— align the widget according to the baseline.BASELINE_CENTER=5— stretch to fill all space, but align the baseline.
ApplicationInhibitFlags¶
Bit flags.
LOGOUT=1— Inhibit ending the user session by logging out or by shutting down the computerSWITCH=2— Inhibit user switchingSUSPEND=4— Inhibit suspending the session or computerIDLE=8— Inhibit the session being marked as idle (and possibly locked)
ArrowType¶
Enumeration.
UP=0— Represents an upward pointing arrow.DOWN=1— Represents a downward pointing arrow.LEFT=2— Represents a left pointing arrow.RIGHT=3— Represents a right pointing arrow.NONE=4— No arrow.
AssistantPageType¶
Enumeration.
CONTENT=0— The page has regular contents. Both the Back and forward buttons will be shown.INTRO=1— The page contains an introduction to the assistant task. Only the Forward button will be shown if there is a next page.CONFIRM=2— The page lets the user confirm or deny the changes. The Back and Apply buttons will be shown.SUMMARY=3— The page informs the user of the changes done. Only the Close button will be shown.PROGRESS=4— Used for tasks that take a long time to complete, blocks the assistant until the page is marked as complete. Only the back button will be shown.CUSTOM=5— Used for when other page types are not appropriate. No buttons will be shown, and the application must add its own buttons throughAssistant.add_action_widget.
BaselinePosition¶
Enumeration.
TOP=0— Align the baseline at the topCENTER=1— Center the baselineBOTTOM=2— Align the baseline at the bottom
BorderStyle¶
Enumeration.
NONE=0— No visible borderHIDDEN=1— Same asBorderStyle.NONESOLID=2— A single line segmentINSET=3— Looks as if the content is sunken into the canvasOUTSET=4— Looks as if the content is coming out of the canvasDOTTED=5— A series of round dotsDASHED=6— A series of square-ended dashesDOUBLE=7— Two parallel lines with some space between themGROOVE=8— Looks as if it were carved in the canvasRIDGE=9— Looks as if it were coming out of the canvas
BuilderClosureFlags¶
Bit flags.
SWAPPED=1— The closure should be created swapped. See g_cclosure_new_swap() for details.
BuilderError¶
Enumeration.
INVALID_TYPE_FUNCTION=0— A type-func attribute didn’t name a function that returns aGType.UNHANDLED_TAG=1— The input contained a tag thatGtkBuildercan’t handle.MISSING_ATTRIBUTE=2— An attribute that is required byGtkBuilderwas missing.INVALID_ATTRIBUTE=3—GtkBuilderfound an attribute that it doesn’t understand.INVALID_TAG=4—GtkBuilderfound a tag that it doesn’t understand.MISSING_PROPERTY_VALUE=5— A required property value was missing.INVALID_VALUE=6—GtkBuildercouldn’t parse some attribute value.VERSION_MISMATCH=7— The input file requires a newer version of GTK.DUPLICATE_ID=8— An object id occurred twice.OBJECT_TYPE_REFUSED=9— A specified object type is of the same type or derived from the type of the composite class being extended with builder XML.TEMPLATE_MISMATCH=10— The wrong type was specified in a composite class’s template XMLINVALID_PROPERTY=11— The specified property is unknown for the object class.INVALID_SIGNAL=12— The specified signal is unknown for the object class.INVALID_ID=13— An object id is unknown.INVALID_FUNCTION=14— A function could not be found. This often happens when symbols are set to be kept private. Compiling code with -rdynamic or using thegmodule-export-2.0pkgconfig module can fix this problem.
ButtonsType¶
Enumeration.
NONE=0— no buttons at allOK=1— an OK buttonCLOSE=2— a Close buttonCANCEL=3— a Cancel buttonYES_NO=4— Yes and No buttonsOK_CANCEL=5— OK and Cancel buttons
CellRendererAccelMode¶
Enumeration.
GTK=0— GTK accelerators modeOTHER=1— Other accelerator mode
CellRendererMode¶
Enumeration.
INERT=0— The cell is just for display and cannot be interacted with. Note that this doesn’t mean that eg. the row being drawn can’t be selected -- just that a particular element of it cannot be individually modified.ACTIVATABLE=1— The cell can be clicked.EDITABLE=2— The cell can be edited or otherwise modified.
CellRendererState¶
Bit flags.
SELECTED=1— The cell is currently selected, and probably has a selection colored background to render to.PRELIT=2— The mouse is hovering over the cell.INSENSITIVE=4— The cell is drawn in an insensitive mannerSORTED=8— The cell is in a sorted rowFOCUSED=16— The cell is in the focus row.EXPANDABLE=32— The cell is in a row that can be expandedEXPANDED=64— The cell is in a row that is expanded
Collation¶
Enumeration.
NONE=0— Don't do any collationUNICODE=1— UseGLib.utf8_collate_keyFILENAME=2— UseGLib.utf8_collate_key_for_filename
ConstraintAttribute¶
Enumeration.
NONE=0— No attribute, used for constant relationsLEFT=1— The left edge of a widget, regardless of text directionRIGHT=2— The right edge of a widget, regardless of text directionTOP=3— The top edge of a widgetBOTTOM=4— The bottom edge of a widgetSTART=5— The leading edge of a widget, depending on text direction; equivalent toConstraintAttribute.LEFTfor LTR languages, andConstraintAttribute.RIGHTfor RTL onesEND=6— The trailing edge of a widget, depending on text direction; equivalent toConstraintAttribute.RIGHTfor LTR languages, andConstraintAttribute.LEFTfor RTL onesWIDTH=7— The width of a widgetHEIGHT=8— The height of a widgetCENTER_X=9— The center of a widget, on the horizontal axisCENTER_Y=10— The center of a widget, on the vertical axisBASELINE=11— The baseline of a widget
ConstraintRelation¶
Enumeration.
LE=-1— Less than, or equalEQ=0— EqualGE=1— Greater than, or equal
ConstraintStrength¶
Enumeration.
REQUIRED=1001001000— The constraint is required towards solving the layoutSTRONG=1000000000— A strong constraintMEDIUM=1000— A medium constraintWEAK=1— A weak constraint
ConstraintVflParserError¶
Enumeration.
INVALID_SYMBOL=0— Invalid or unknown symbolINVALID_ATTRIBUTE=1— Invalid or unknown attributeINVALID_VIEW=2— Invalid or unknown viewINVALID_METRIC=3— Invalid or unknown metricINVALID_PRIORITY=4— Invalid or unknown priorityINVALID_RELATION=5— Invalid or unknown relation
ContentFit¶
Enumeration.
FILL=0— Make the content fill the entire allocation, without taking its aspect ratio in consideration. The resulting content will appear as stretched if its aspect ratio is different from the allocation aspect ratio.CONTAIN=1— Scale the content to fit the allocation, while taking its aspect ratio in consideration. The resulting content will appear as letterboxed if its aspect ratio is different from the allocation aspect ratio.COVER=2— Cover the entire allocation, while taking the content aspect ratio in consideration. The resulting content will appear as clipped if its aspect ratio is different from the allocation aspect ratio.SCALE_DOWN=3— The content is scaled down to fit the allocation, if needed, otherwise its original size is used.
CornerType¶
Enumeration.
TOP_LEFT=0— Place the scrollbars on the right and bottom of the widget (default behaviour).BOTTOM_LEFT=1— Place the scrollbars on the top and right of the widget.TOP_RIGHT=2— Place the scrollbars on the left and bottom of the widget.BOTTOM_RIGHT=3— Place the scrollbars on the top and left of the widget.
CssParserError¶
Enumeration.
FAILED=0— Unknown failure.SYNTAX=1— The given text does not form valid syntaxIMPORT=2— Failed to import a resourceNAME=3— The given name has not been definedUNKNOWN_VALUE=4— The given value is not correct
CssParserWarning¶
Enumeration.
DEPRECATED=0— The given construct is deprecated and will be removed in a future versionSYNTAX=1— A syntax construct was used that should be avoidedUNIMPLEMENTED=2— A feature is not implemented
DebugFlags¶
Bit flags.
TEXT=1— Information about GtkTextViewTREE=2— Information about GtkTreeViewKEYBINDINGS=4— Information about keyboard shortcutsMODULES=8— Information about modules and extensionsGEOMETRY=16— Information about size allocationICONTHEME=32— Information about icon themesPRINTING=64— Information about printingBUILDER_TRACE=128— Trace GtkBuilder operationSIZE_REQUEST=256— Information about size requestsNO_CSS_CACHE=512— Disable the style property cacheINTERACTIVE=1024— Open the GTK inspectorTOUCHSCREEN=2048— Show touch UI elements for pointer events.ACTIONS=4096— Information about actions and menu modelsLAYOUT=8192— Information from layout managersSNAPSHOT=16384— Include debug render nodes in the generated snapshotsCONSTRAINTS=32768— Information from the constraints solverBUILDER_OBJECTS=65536— Log unused GtkBuilder objectsA11Y=131072— Information about accessibility state changesICONFALLBACK=262144— Information about icon fallback.INVERT_TEXT_DIR=524288— Inverts the default text-direction.CSS=1048576— Information about deprecated CSS features.BUILDER=2097152— Information about deprecated GtkBuilder features.SESSION=4194304— Information about session saving.
DeleteType¶
Enumeration.
CHARS=0— Delete characters.WORD_ENDS=1— Delete only the portion of the word to the left/right of cursor if we’re in the middle of a word.WORDS=2— Delete words.DISPLAY_LINES=3— Delete display-lines. Display-lines refers to the visible lines, with respect to the current line breaks. As opposed to paragraphs, which are defined by line breaks in the input.DISPLAY_LINE_ENDS=4— Delete only the portion of the display-line to the left/right of cursor.PARAGRAPH_ENDS=5— Delete to the end of the paragraph. Like C-k in Emacs (or its reverse).PARAGRAPHS=6— Delete entire line. Like C-k in pico.WHITESPACE=7— Delete only whitespace. Like M-\ in Emacs.
DialogError¶
Enumeration.
FAILED=0— Generic error condition for when an operation fails and no more specific code is applicableCANCELLED=1— The async function call was cancelled via itsGCancellableDISMISSED=2— The operation was cancelled by the user (via a Cancel or Close button)
DialogFlags¶
Bit flags.
MODAL=1— Make the constructed dialog modalDESTROY_WITH_PARENT=2— Destroy the dialog when its parent is destroyedUSE_HEADER_BAR=4— Create dialog with actions in header bar instead of action area
DirectionType¶
Enumeration.
TAB_FORWARD=0— Move forward.TAB_BACKWARD=1— Move backward.UP=2— Move up.DOWN=3— Move down.LEFT=4— Move left.RIGHT=5— Move right.
EditableProperties¶
Enumeration.
PROP_TEXT=0— the property id forEditable.textPROP_CURSOR_POSITION=1— the property id forEditable.cursor-positionPROP_SELECTION_BOUND=2— the property id forEditable.selection-boundPROP_EDITABLE=3— the property id forEditable.editablePROP_WIDTH_CHARS=4— the property id forEditable.width-charsPROP_MAX_WIDTH_CHARS=5— the property id forEditable.max-width-charsPROP_XALIGN=6— the property id forEditable.xalignPROP_ENABLE_UNDO=7— the property id forEditable.enable-undoNUM_PROPERTIES=8— the number of properties
EntryIconPosition¶
Enumeration.
PRIMARY=0— At the beginning of the entry (depending on the text direction).SECONDARY=1— At the end of the entry (depending on the text direction).
EventControllerScrollFlags¶
Bit flags.
NONE=0— Don't emit scroll.VERTICAL=1— Emit scroll with vertical deltas.HORIZONTAL=2— Emit scroll with horizontal deltas.DISCRETE=4— Only emit deltas that are multiples of 1.KINETIC=8— Emit ::decelerate after continuous scroll finishes.PHYSICAL_DIRECTION=16— AEventControllerScrollFlagsvalue to prefer physical direction over logical direction (i.e. oblivious to natural scroll).BOTH_AXES=3— Emit scroll on both axes.
EventSequenceState¶
Enumeration.
NONE=0— The sequence is handled, but not grabbed.CLAIMED=1— The sequence is handled and grabbed.DENIED=2— The sequence is denied.
FileChooserAction¶
Enumeration.
OPEN=0— Indicates open mode. The file chooser will only let the user pick an existing file.SAVE=1— Indicates save mode. The file chooser will let the user pick an existing file, or type in a new filename.SELECT_FOLDER=2— Indicates an Open mode for selecting folders. The file chooser will let the user pick an existing folder.
FileChooserError¶
Enumeration.
NONEXISTENT=0— Indicates that a file does not exist.BAD_FILENAME=1— Indicates a malformed filename.ALREADY_EXISTS=2— Indicates a duplicate path (e.g. when adding a bookmark).INCOMPLETE_HOSTNAME=3— Indicates an incomplete hostname (e.g. "http://foo" without a slash after that).
FilterChange¶
Enumeration.
DIFFERENT=0— The filter change cannot be described with any of the other enumeration valuesLESS_STRICT=1— The filter is less strict than it was before: All items that it used to return true still return true, others now may, too.MORE_STRICT=2— The filter is more strict than it was before: All items that it used to return false still return false, others now may, too.DIFFERENT_REWATCH=3— Similar toFilterChange.DIFFERENT, but signs that item watches should be recreated. This is used byFilterListModelto keep the list up-to-date when items change.LESS_STRICT_REWATCH=4— Similar toFilterChange.LESS_STRICT, but signs that item watches should be recreated. This is used byFilterListModelto keep the list up-to-date when items change.MORE_STRICT_REWATCH=5— Similar toFilterChange.MORE_STRICT, but signs that item watches should be recreated. This is used byFilterListModelto keep the list up-to-date when items change.
FilterMatch¶
Enumeration.
SOME=0— The filter matches some items,Filter.matchmay return true or falseNONE=1— The filter does not match any item,Filter.matchwill always return falseALL=2— The filter matches all items,Filter.matchwill alays return true
FontChooserLevel¶
Bit flags.
FAMILY=0— Allow selecting a font familySTYLE=1— Allow selecting a specific font faceSIZE=2— Allow selecting a specific font sizeVARIATIONS=4— Allow changing OpenType font variation axesFEATURES=8— Allow selecting specific OpenType font features
FontLevel¶
Enumeration.
FAMILY=0— Select a font familyFACE=1— Select a font face (i.e. a family and a style)FONT=2— Select a font (i.e. a face with a size, and possibly font variations)FEATURES=3— Select a font and font features
FontRendering¶
Enumeration.
AUTOMATIC=0— Set up font rendering automatically, taking factors like screen resolution and scale into accountMANUAL=1— Follow low-level font-related settings when configuring font rendering
GraphicsOffloadEnabled¶
Enumeration.
ENABLED=0— Graphics offloading is enabled.DISABLED=1— Graphics offloading is disabled.
IconLookupFlags¶
Bit flags.
NONE=0— Perform a regular lookup.FORCE_REGULAR=1— Try to always load regular icons, even when symbolic icon names are givenFORCE_SYMBOLIC=2— Try to always load symbolic icons, even when regular icon names are givenPRELOAD=4— Starts loading the texture in the background so it is ready when later needed.
IconSize¶
Enumeration.
INHERIT=0— Keep the size of the parent elementNORMAL=1— Size similar to text sizeLARGE=2— Large size, for example in an icon view
IconThemeError¶
Enumeration.
NOT_FOUND=0— The icon specified does not exist in the themeFAILED=1— An unspecified error occurred.
IconViewDropPosition¶
Enumeration.
NO_DROP=0— no drop possibleDROP_INTO=1— dropped item replaces the itemDROP_LEFT=2— dropped item is inserted to the leftDROP_RIGHT=3— dropped item is inserted to the rightDROP_ABOVE=4— dropped item is inserted aboveDROP_BELOW=5— dropped item is inserted below
ImageType¶
Enumeration.
EMPTY=0— there is no image displayed by the widgetICON_NAME=1— the widget contains a named iconGICON=2— the widget contains aGIconPAINTABLE=3— the widget contains aGdkPaintable
InputHints¶
Bit flags.
NONE=0— No special behaviour suggestedSPELLCHECK=1— Suggest checking for typosNO_SPELLCHECK=2— Suggest not checking for typosWORD_COMPLETION=4— Suggest word completionLOWERCASE=8— Suggest to convert all text to lowercaseUPPERCASE_CHARS=16— Suggest to capitalize all textUPPERCASE_WORDS=32— Suggest to capitalize the first character of each wordUPPERCASE_SENTENCES=64— Suggest to capitalize the first word of each sentenceINHIBIT_OSK=128— Suggest to not show an onscreen keyboard (e.g for a calculator that already has all the keys).VERTICAL_WRITING=256— The text is verticalEMOJI=512— Suggest offering Emoji supportNO_EMOJI=1024— Suggest not offering Emoji supportPRIVATE=2048— Request that the input method should not update personalized data (like typing history)
InputPurpose¶
Enumeration.
FREE_FORM=0— Allow any characterALPHA=1— Allow only alphabetic charactersDIGITS=2— Allow only digitsNUMBER=3— Edited field expects numbersPHONE=4— Edited field expects phone numberURL=5— Edited field expects URLEMAIL=6— Edited field expects email addressNAME=7— Edited field expects the name of a personPASSWORD=8— LikeInputPurpose.FREE_FORM, but characters are hiddenPIN=9— LikeInputPurpose.DIGITS, but characters are hiddenTERMINAL=10— Allow any character, in addition to control codes
InscriptionOverflow¶
Enumeration.
CLIP=0— Clip the remaining textELLIPSIZE_START=1— Omit characters at the start of the textELLIPSIZE_MIDDLE=2— Omit characters at the middle of the textELLIPSIZE_END=3— Omit characters at the end of the text
InterfaceColorScheme¶
Enumeration.
UNSUPPORTED=0— The system doesn't support color schemesDEFAULT=1— The default color scheme is usedDARK=2— A dark color scheme is usedLIGHT=3— A light color scheme is used
InterfaceContrast¶
Enumeration.
UNSUPPORTED=0— The system doesn't support contrast levelsNO_PREFERENCE=1— No particular preference for contrastMORE=2— More contrast is preferredLESS=3— Less contrast is preferred
Justification¶
Enumeration.
LEFT=0— The text is placed at the left edge of the label.RIGHT=1— The text is placed at the right edge of the label.CENTER=2— The text is placed in the center of the label.FILL=3— The text is placed is distributed across the label.
LevelBarMode¶
Enumeration.
CONTINUOUS=0— the bar has a continuous modeDISCRETE=1— the bar has a discrete mode
License¶
Enumeration.
UNKNOWN=0— No license specifiedCUSTOM=1— A license text is going to be specified by the developerGPL_2_0=2— The GNU General Public License, version 2.0 or laterGPL_3_0=3— The GNU General Public License, version 3.0 or laterLGPL_2_1=4— The GNU Lesser General Public License, version 2.1 or laterLGPL_3_0=5— The GNU Lesser General Public License, version 3.0 or laterBSD=6— The BSD standard licenseMIT_X11=7— The MIT/X11 standard licenseARTISTIC=8— The Artistic License, version 2.0GPL_2_0_ONLY=9— The GNU General Public License, version 2.0 onlyGPL_3_0_ONLY=10— The GNU General Public License, version 3.0 onlyLGPL_2_1_ONLY=11— The GNU Lesser General Public License, version 2.1 onlyLGPL_3_0_ONLY=12— The GNU Lesser General Public License, version 3.0 onlyAGPL_3_0=13— The GNU Affero General Public License, version 3.0 or laterAGPL_3_0_ONLY=14— The GNU Affero General Public License, version 3.0 onlyBSD_3=15— The 3-clause BSD licenceAPACHE_2_0=16— The Apache License, version 2.0MPL_2_0=17— The Mozilla Public License, version 2.0_0BSD=18— Zero-Clause BSD license
ListScrollFlags¶
Bit flags.
NONE=0— Don't do anything extraFOCUS=1— Focus the target itemSELECT=2— Select the target item and unselect all other items.
ListTabBehavior¶
Enumeration.
ALL=0— Cycle through all focusable items of the listITEM=1— Cycle through a single list element, then move focus out of the list. Moving focus between items needs to be done with the arrow keys.CELL=2— Cycle only through a single cell, then move focus out of the list. Moving focus between cells needs to be done with the arrow keys. This is only relevant for cell-based widgets likeColumnView, otherwise it behaves likeGTK_LIST_TAB_ITEM.
MessageType¶
Enumeration.
INFO=0— Informational messageWARNING=1— Non-fatal warning messageQUESTION=2— Question requiring a choiceERROR=3— Fatal error messageOTHER=4— None of the above
MovementStep¶
Enumeration.
LOGICAL_POSITIONS=0— Move forward or back by graphemesVISUAL_POSITIONS=1— Move left or right by graphemesWORDS=2— Move forward or back by wordsDISPLAY_LINES=3— Move up or down lines (wrapped lines)DISPLAY_LINE_ENDS=4— Move to either end of a linePARAGRAPHS=5— Move up or down paragraphs (newline-ended lines)PARAGRAPH_ENDS=6— Move to either end of a paragraphPAGES=7— Move by pagesBUFFER_ENDS=8— Move to ends of the bufferHORIZONTAL_PAGES=9— Move horizontally by pages
NaturalWrapMode¶
Enumeration.
INHERIT=0— Inherit the minimum size request. In particular, this should be used withPango.WrapMode.CHAR.NONE=1— Try not to wrap the text. This mode is the closest to GTK3's behavior but can lead to a wide label leaving lots of empty space below the text.WORD=2— Attempt to wrap at word boundaries. This is useful in particular when usingPango.WrapMode.WORD_CHARas the wrap mode.
NotebookTab¶
Enumeration.
FIRST=0— the first tab in the notebookLAST=1— the last tab in the notebook
NumberUpLayout¶
Enumeration.
LRTB=0LRBT=1RLTB=2RLBT=3TBLR=4TBRL=5BTLR=6BTRL=7
Ordering¶
Enumeration.
SMALLER=-1— the first value is smaller than the secondEQUAL=0— the two values are equalLARGER=1— the first value is larger than the second
Orientation¶
Enumeration.
HORIZONTAL=0— The element is in horizontal orientation.VERTICAL=1— The element is in vertical orientation.
Overflow¶
Enumeration.
VISIBLE=0— No change is applied. Content is drawn at the specified position.HIDDEN=1— Content is clipped to the bounds of the area. Content outside the area is not drawn and cannot be interacted with.
PackType¶
Enumeration.
START=0— The child is packed into the start of the widgetEND=1— The child is packed into the end of the widget
PadActionType¶
Enumeration.
BUTTON=0— Action is triggered by a pad buttonRING=1— Action is triggered by a pad ringSTRIP=2— Action is triggered by a pad stripDIAL=3— Action is triggered by a pad dial
PageOrientation¶
Enumeration.
PORTRAIT=0— Portrait mode.LANDSCAPE=1— Landscape mode.REVERSE_PORTRAIT=2— Reverse portrait mode.REVERSE_LANDSCAPE=3— Reverse landscape mode.
PageSet¶
Enumeration.
ALL=0— All pages.EVEN=1— Even pages.ODD=2— Odd pages.
PanDirection¶
Enumeration.
LEFT=0— panned towards the leftRIGHT=1— panned towards the rightUP=2— panned upwardsDOWN=3— panned downwards
PickFlags¶
Bit flags.
DEFAULT=0— The default behavior, include widgets that are receiving eventsINSENSITIVE=1— Include widgets that are insensitiveNON_TARGETABLE=2— Include widgets that are marked as non-targetable. SeeWidget.can-target
PolicyType¶
Enumeration.
ALWAYS=0— The scrollbar is always visible. The view size is independent of the content.AUTOMATIC=1— The scrollbar will appear and disappear as necessary. For example, when all of aGtkTreeViewcan not be seen.NEVER=2— The scrollbar should never appear. In this mode the content determines the size.EXTERNAL=3— Don't show a scrollbar, but don't force the size to follow the content. This can be used e.g. to make multiple scrolled windows share a scrollbar.
PopoverMenuFlags¶
Bit flags.
SLIDING=0— Submenus are presented as sliding submenus that replace the main menu.NESTED=1— Submenus are presented as traditional, nested popovers.
PositionType¶
Enumeration.
LEFT=0— The feature is at the left edge.RIGHT=1— The feature is at the right edge.TOP=2— The feature is at the top edge.BOTTOM=3— The feature is at the bottom edge.
PrintCapabilities¶
Bit flags.
PAGE_SET=1— Print dialog will offer printing even/odd pages.COPIES=2— Print dialog will allow to print multiple copies.COLLATE=4— Print dialog will allow to collate multiple copies.REVERSE=8— Print dialog will allow to print pages in reverse order.SCALE=16— Print dialog will allow to scale the output.GENERATE_PDF=32— The program will send the document to the printer in PDF formatGENERATE_PS=64— The program will send the document to the printer in Postscript formatPREVIEW=128— Print dialog will offer a previewNUMBER_UP=256— Print dialog will offer printing multiple pages per sheetNUMBER_UP_LAYOUT=512— Print dialog will allow to rearrange pages when printing multiple pages per sheet
PrintDuplex¶
Enumeration.
SIMPLEX=0— No duplex.HORIZONTAL=1— Horizontal duplex.VERTICAL=2— Vertical duplex.
PrintError¶
Enumeration.
GENERAL=0— An unspecified error occurred.INTERNAL_ERROR=1— An internal error occurred.NOMEM=2— A memory allocation failed.INVALID_FILE=3— An error occurred while loading a page setup or paper size from a key file.
PrintOperationAction¶
Enumeration.
PRINT_DIALOG=0— Show the print dialog.PRINT=1— Start to print without showing the print dialog, based on the current print settings, if possible. Depending on the platform, a print dialog might appear anyway.PREVIEW=2— Show the print preview.EXPORT=3— Export to a file. This requires the export-filename property to be set.
PrintOperationResult¶
Enumeration.
ERROR=0— An error has occurred.APPLY=1— The print settings should be stored.CANCEL=2— The print operation has been canceled, the print settings should not be stored.IN_PROGRESS=3— The print operation is not complete yet. This value will only be returned when running asynchronously.
PrintPages¶
Enumeration.
ALL=0— All pages.CURRENT=1— Current page.RANGES=2— Range of pages.SELECTION=3— Selected pages.
PrintQuality¶
Enumeration.
LOW=0— Low quality.NORMAL=1— Normal quality.HIGH=2— High quality.DRAFT=3— Draft quality.
PrintStatus¶
Enumeration.
INITIAL=0— The printing has not started yet; this status is set initially, and while the print dialog is shown.PREPARING=1— This status is set while the begin-print signal is emitted and during pagination.GENERATING_DATA=2— This status is set while the pages are being rendered.SENDING_DATA=3— The print job is being sent off to the printer.PENDING=4— The print job has been sent to the printer, but is not printed for some reason, e.g. the printer may be stopped.PENDING_ISSUE=5— Some problem has occurred during printing, e.g. a paper jam.PRINTING=6— The printer is processing the print job.FINISHED=7— The printing has been completed successfully.FINISHED_ABORTED=8— The printing has been aborted.
PropagationLimit¶
Enumeration.
NONE=0— Events are handled regardless of what their target is.SAME_NATIVE=1— Events are only handled if their target is in the sameNative(or widget withWidget.limit-eventsset) as the event controllers widget. Note that some event types have two targets (origin and destination).
PropagationPhase¶
Enumeration.
NONE=0— Events are not delivered.CAPTURE=1— Events are delivered in the capture phase. The capture phase happens before the bubble phase, runs from the toplevel down to the event widget. This option should only be used on containers that might possibly handle events before their children do.BUBBLE=2— Events are delivered in the bubble phase. The bubble phase happens after the capture phase, and before the default handlers are run. This phase runs from the event widget, up to the toplevel.TARGET=3— Events are delivered in the default widget event handlers, note that widget implementations must chain up on button, motion, touch and grab broken handlers for controllers in this phase to be run.
RecentManagerError¶
Enumeration.
NOT_FOUND=0— the URI specified does not exists in the recently used resources list.INVALID_URI=1— the URI specified is not valid.INVALID_ENCODING=2— the supplied string is not UTF-8 encoded.NOT_REGISTERED=3— no application has registered the specified item.READ=4— failure while reading the recently used resources file.WRITE=5— failure while writing the recently used resources file.UNKNOWN=6— unspecified error.
ReducedMotion¶
Enumeration.
NO_PREFERENCE=0— The user has made no preference known to the systemREDUCE=1— The user has notified the system that they prefer an interface that removes or replaces the types of motion-based animation that either trigger discomfort for those with vestibular motion sensitivity, or distraction for those with attention deficits
ResponseType¶
Enumeration.
NONE=-1— Returned if an action widget has no response id, or if the dialog gets programmatically hidden or destroyedREJECT=-2— Generic response id, not used by GTK dialogsACCEPT=-3— Generic response id, not used by GTK dialogsDELETE_EVENT=-4— Returned if the dialog is deletedOK=-5— Returned by OK buttons in GTK dialogsCANCEL=-6— Returned by Cancel buttons in GTK dialogsCLOSE=-7— Returned by Close buttons in GTK dialogsYES=-8— Returned by Yes buttons in GTK dialogsNO=-9— Returned by No buttons in GTK dialogsAPPLY=-10— Returned by Apply buttons in GTK dialogsHELP=-11— Returned by Help buttons in GTK dialogs
RevealerTransitionType¶
Enumeration.
NONE=0— No transitionCROSSFADE=1— Fade inSLIDE_RIGHT=2— Slide in from the leftSLIDE_LEFT=3— Slide in from the rightSLIDE_UP=4— Slide in from the bottomSLIDE_DOWN=5— Slide in from the topSWING_RIGHT=6— Floop in from the leftSWING_LEFT=7— Floop in from the rightSWING_UP=8— Floop in from the bottomSWING_DOWN=9— Floop in from the topFADE_SLIDE_RIGHT=10— Combination ofRevealerTransitionType.CROSSFADEandRevealerTransitionType.SLIDE_RIGHT.FADE_SLIDE_LEFT=11— Combination ofRevealerTransitionType.CROSSFADEandRevealerTransitionType.SLIDE_LEFT.FADE_SLIDE_UP=12— Combination ofRevealerTransitionType.CROSSFADEandRevealerTransitionType.SLIDE_UP.FADE_SLIDE_DOWN=13— Combination ofRevealerTransitionType.CROSSFADEandRevealerTransitionType.SLIDE_DOWN.
ScrollStep¶
Enumeration.
STEPS=0— Scroll in steps.PAGES=1— Scroll by pages.ENDS=2— Scroll to ends.HORIZONTAL_STEPS=3— Scroll in horizontal steps.HORIZONTAL_PAGES=4— Scroll by horizontal pages.HORIZONTAL_ENDS=5— Scroll to the horizontal ends.
ScrollType¶
Enumeration.
NONE=0— No scrolling.JUMP=1— Jump to new location.STEP_BACKWARD=2— Step backward.STEP_FORWARD=3— Step forward.PAGE_BACKWARD=4— Page backward.PAGE_FORWARD=5— Page forward.STEP_UP=6— Step up.STEP_DOWN=7— Step down.PAGE_UP=8— Page up.PAGE_DOWN=9— Page down.STEP_LEFT=10— Step to the left.STEP_RIGHT=11— Step to the right.PAGE_LEFT=12— Page to the left.PAGE_RIGHT=13— Page to the right.START=14— Scroll to start.END=15— Scroll to end.
ScrollablePolicy¶
Enumeration.
MINIMUM=0— Scrollable adjustments are based on the minimum sizeNATURAL=1— Scrollable adjustments are based on the natural size
SelectionMode¶
Enumeration.
NONE=0— No selection is possible.SINGLE=1— Zero or one element may be selected.BROWSE=2— Exactly one element is selected. In some circumstances, such as initially or during a search operation, it’s possible for no element to be selected withSelectionMode.BROWSE. What is really enforced is that the user can’t deselect a currently selected element except by selecting another element.MULTIPLE=3— Any number of elements may be selected. The Ctrl key may be used to enlarge the selection, and Shift key to select between the focus and the child pointed to. Some widgets may also allow Click-drag to select a range of elements.
SensitivityType¶
Enumeration.
AUTO=0— The control is made insensitive if no action can be triggeredON=1— The control is always sensitiveOFF=2— The control is always insensitive
ShortcutActionFlags¶
Bit flags.
EXCLUSIVE=1— The action is the only action that can be activated. If this flag is not set, a future activation may select a different action.
ShortcutScope¶
Enumeration.
LOCAL=0— Shortcuts are handled inside the widget the controller belongs to.MANAGED=1— Shortcuts are handled by the first ancestor that is aShortcutManagerGLOBAL=2— Shortcuts are handled by the root widget.
ShortcutType¶
Enumeration.
ACCELERATOR=0— The shortcut is a keyboard accelerator. The GtkShortcutsShortcut:accelerator property will be used.GESTURE_PINCH=1— The shortcut is a pinch gesture. GTK provides an icon and subtitle.GESTURE_STRETCH=2— The shortcut is a stretch gesture. GTK provides an icon and subtitle.GESTURE_ROTATE_CLOCKWISE=3— The shortcut is a clockwise rotation gesture. GTK provides an icon and subtitle.GESTURE_ROTATE_COUNTERCLOCKWISE=4— The shortcut is a counterclockwise rotation gesture. GTK provides an icon and subtitle.GESTURE_TWO_FINGER_SWIPE_LEFT=5— The shortcut is a two-finger swipe gesture. GTK provides an icon and subtitle.GESTURE_TWO_FINGER_SWIPE_RIGHT=6— The shortcut is a two-finger swipe gesture. GTK provides an icon and subtitle.GESTURE=7— The shortcut is a gesture. The GtkShortcutsShortcut:icon property will be used.GESTURE_SWIPE_LEFT=8— The shortcut is a swipe gesture. GTK provides an icon and subtitle.GESTURE_SWIPE_RIGHT=9— The shortcut is a swipe gesture. GTK provides an icon and subtitle.
SizeGroupMode¶
Enumeration.
NONE=0— group has no effectHORIZONTAL=1— group affects horizontal requisitionVERTICAL=2— group affects vertical requisitionBOTH=3— group affects both horizontal and vertical requisition
SizeRequestMode¶
Enumeration.
HEIGHT_FOR_WIDTH=0— Prefer height-for-width geometry managementWIDTH_FOR_HEIGHT=1— Prefer width-for-height geometry managementCONSTANT_SIZE=2— Don’t trade height-for-width or width-for-height
SortType¶
Enumeration.
ASCENDING=0— Sorting is in ascending order.DESCENDING=1— Sorting is in descending order.
SorterChange¶
Enumeration.
DIFFERENT=0— The sorter change cannot be described by any of the other enumeration valuesINVERTED=1— The sort order was inverted. Comparisons that returnedOrdering.SMALLERnow returnOrdering.LARGERand vice versa. Other comparisons return the same values as before.LESS_STRICT=2— The sorter is less strict: Comparisons may now returnOrdering.EQUALthat did not do so before.MORE_STRICT=3— The sorter is more strict: Comparisons that did returnOrdering.EQUALmay not do so anymore.
SorterOrder¶
Enumeration.
PARTIAL=0— A partial order. AnyGtkOrderingis possible.NONE=1— No order, all elements are considered equal.Sorter.comparewill only returnOrdering.EQUAL.TOTAL=2— A total order.Sorter.comparewill only returnOrdering.EQUALif an item is compared with itself. Two different items will never cause this value to be returned.
SpinButtonUpdatePolicy¶
Enumeration.
ALWAYS=0— When refreshing yourGtkSpinButton, the value is always displayedIF_VALID=1— When refreshing yourGtkSpinButton, the value is only displayed if it is valid within the bounds of the spin button's adjustment
SpinType¶
Enumeration.
STEP_FORWARD=0— Increment by the adjustments step increment.STEP_BACKWARD=1— Decrement by the adjustments step increment.PAGE_FORWARD=2— Increment by the adjustments page increment.PAGE_BACKWARD=3— Decrement by the adjustments page increment.HOME=4— Go to the adjustments lower bound.END=5— Go to the adjustments upper bound.USER_DEFINED=6— Change by a specified amount.
StackTransitionType¶
Enumeration.
NONE=0— No transitionCROSSFADE=1— A cross-fadeSLIDE_RIGHT=2— Slide from left to rightSLIDE_LEFT=3— Slide from right to leftSLIDE_UP=4— Slide from bottom upSLIDE_DOWN=5— Slide from top downSLIDE_LEFT_RIGHT=6— Slide from left or right according to the children orderSLIDE_UP_DOWN=7— Slide from top down or bottom up according to the orderOVER_UP=8— Cover the old page by sliding upOVER_DOWN=9— Cover the old page by sliding downOVER_LEFT=10— Cover the old page by sliding to the leftOVER_RIGHT=11— Cover the old page by sliding to the rightUNDER_UP=12— Uncover the new page by sliding upUNDER_DOWN=13— Uncover the new page by sliding downUNDER_LEFT=14— Uncover the new page by sliding to the leftUNDER_RIGHT=15— Uncover the new page by sliding to the rightOVER_UP_DOWN=16— Cover the old page sliding up or uncover the new page sliding down, according to orderOVER_DOWN_UP=17— Cover the old page sliding down or uncover the new page sliding up, according to orderOVER_LEFT_RIGHT=18— Cover the old page sliding left or uncover the new page sliding right, according to orderOVER_RIGHT_LEFT=19— Cover the old page sliding right or uncover the new page sliding left, according to orderROTATE_LEFT=20— Pretend the pages are sides of a cube and rotate that cube to the leftROTATE_RIGHT=21— Pretend the pages are sides of a cube and rotate that cube to the rightROTATE_LEFT_RIGHT=22— Pretend the pages are sides of a cube and rotate that cube to the left or right according to the children order
StateFlags¶
Bit flags.
NORMAL=0— State during normal operationACTIVE=1— Widget is activePRELIGHT=2— Widget has a mouse pointer over itSELECTED=4— Widget is selectedINSENSITIVE=8— Widget is insensitiveINCONSISTENT=16— Widget is inconsistentFOCUSED=32— Widget has the keyboard focusBACKDROP=64— Widget is in a background toplevel windowDIR_LTR=128— Widget is in left-to-right text directionDIR_RTL=256— Widget is in right-to-left text directionLINK=512— Widget is a linkVISITED=1024— The location the widget points to has already been visitedCHECKED=2048— Widget is checkedDROP_ACTIVE=4096— Widget is highlighted as a drop target for DNDFOCUS_VISIBLE=8192— Widget has the visible focusFOCUS_WITHIN=16384— Widget contains the keyboard focus
StringFilterMatchMode¶
Enumeration.
EXACT=0— The search string and text must match exactlySUBSTRING=1— The search string must be contained as a substring inside the textPREFIX=2— The text must begin with the search string
StyleContextPrintFlags¶
Bit flags.
NONE=0— Default value.RECURSE=1— Print the entire tree of CSS nodes starting at the style context's nodeSHOW_STYLE=2— Show the values of the CSS properties for each nodeSHOW_CHANGE=4— Show information about what changes affect the styles
SvgError¶
Enumeration.
INVALID_SYNTAX=0— The XML syntax is broken in some wayINVALID_ELEMENT=1— An XML element is invalid (either because it is not part of SVG, or because it is in the wrong place, or because it not implemented in GTK)INVALID_ATTRIBUTE=2— An attribute is invalid (either because it is not part of SVG, or because it is not implemented in GTK, or its value is problematic)MISSING_ATTRIBUTE=3— A required attribute is missingINVALID_REFERENCE=4— A reference does not point to a suitable elementFAILED_UPDATE=5— An animation could not be updatedFAILED_RENDERING=6— Rendering is not according to expecationsIGNORED_ELEMENT=7— An XML element is ignored, but it should not affect rendering (this error code is used for metadata and exension elements)LIMITS_EXCEEDED=8— An implementation limit has been hit, such as the number of loaded shapes.NOT_IMPLEMENTED=9— The SVG uses features that are not supported byGtkSvg. It may be advisable to use a different SVG renderer.
SvgFeatures¶
Bit flags.
ANIMATIONS=1— Whether to run animations. If disabled, state changes are applied without transitionsSYSTEM_RESOURCES=2— Whether to use system resources, such as fonts. If disabled, only embedded fonts are usedEXTERNAL_RESOURCES=4— Whether to load external resources, such as images. If disabled, only embedded images are loadedEXTENSIONS=8— Whether to allow gpa extensions, such as states and transitionsTRADITIONAL_SYMBOLIC=16— This feature is meant for compatibility with old symbolic icons. If this is enabled, fill and stroke attributes are ignored. The used colors are derived from symbolic style classes if present, and the default fill color is the symbolic foreground color.
SymbolicColor¶
Enumeration.
FOREGROUND=0— The default foreground colorERROR=1— Indication color for errorsWARNING=2— Indication color for warningsSUCCESS=3— Indication color for successACCENT=4— The system accent color.
SystemSetting¶
Enumeration.
DPI=0— theSettings.gtk-xft-dpisetting has changedFONT_NAME=1— TheSettings.gtk-font-namesetting has changedFONT_CONFIG=2— The font configuration has changed in a way that requires text to be redrawn. This can be any of theSettings.gtk-xft-antialias,Settings.gtk-xft-hinting,Settings.gtk-xft-hintstyle,Settings.gtk-xft-rgbaorSettings.gtk-fontconfig-timestampsettingsDISPLAY=3— The display has changedICON_THEME=4— The icon theme has changed in a way that requires icons to be looked up again
TextBufferNotifyFlags¶
Bit flags.
BEFORE_INSERT=1— Be notified before text is inserted into the underlying buffer.AFTER_INSERT=2— Be notified after text has been inserted into the underlying buffer.BEFORE_DELETE=4— Be notified before text is deleted from the underlying buffer.AFTER_DELETE=8— Be notified after text has been deleted from the underlying buffer.
TextDirection¶
Enumeration.
NONE=0— No direction.LTR=1— Left to right text direction.RTL=2— Right to left text direction.
TextExtendSelection¶
Enumeration.
WORD=0— Selects the current word. It is triggered by a double-click for example.LINE=1— Selects the current line. It is triggered by a triple-click for example.
TextSearchFlags¶
Bit flags.
VISIBLE_ONLY=1— Search only visible data. A search match may have invisible text interspersed.TEXT_ONLY=2— Search only text. A match may have paintables or child widgets mixed inside the matched range.CASE_INSENSITIVE=4— The text will be matched regardless of what case it is in.
TextViewLayer¶
Enumeration.
BELOW_TEXT=0— The layer rendered below the text (but above the background).ABOVE_TEXT=1— The layer rendered above the text.
TextWindowType¶
Enumeration.
WIDGET=1— Window that floats over scrolling areas.TEXT=2— Scrollable text window.LEFT=3— Left side border window.RIGHT=4— Right side border window.TOP=5— Top border window.BOTTOM=6— Bottom border window.
TreeModelFlags¶
Bit flags.
ITERS_PERSIST=1— iterators survive all signals emitted by the treeLIST_ONLY=2— the model is a list only, and never has children
TreeViewColumnSizing¶
Enumeration.
GROW_ONLY=0— Columns only get bigger in reaction to changes in the modelAUTOSIZE=1— Columns resize to be the optimal size every time the model changes.FIXED=2— Columns are a fixed numbers of pixels wide.
TreeViewDropPosition¶
Enumeration.
BEFORE=0— dropped row is inserted beforeAFTER=1— dropped row is inserted afterINTO_OR_BEFORE=2— dropped row becomes a child or is inserted beforeINTO_OR_AFTER=3— dropped row becomes a child or is inserted after
TreeViewGridLines¶
Enumeration.
NONE=0— No grid lines.HORIZONTAL=1— Horizontal grid lines.VERTICAL=2— Vertical grid lines.BOTH=3— Horizontal and vertical grid lines.
Unit¶
Enumeration.
NONE=0— No units.POINTS=1— Dimensions in points.INCH=2— Dimensions in inches.MM=3— Dimensions in millimeters
WindowGravity¶
Enumeration.
TOP_LEFT=0— The top left cornerTOP=1— The top edgeTOP_RIGHT=2— The top right cornerLEFT=3— The left edgeCENTER=4— The center pointerRIGHT=5— The right edgeBOTTOM_LEFT=6— The bottom left cornerBOTTOM=7— the bottom edgeBOTTOM_RIGHT=8— The bottom right cornerTOP_START=9— The top left or top right corner, depending on the text directionTOP_END=10— The top right or top left corner, depending on the text directionSTART=11— The left or right edge, depending on the text directionEND=12— The right or left edge, depending on the text directionBOTTOM_START=13— The bottom left or top right corner, depending on the text directionBOTTOM_END=14— The bottom right or top left corner, depending on the text direction
WrapMode¶
Enumeration.
NONE=0— do not wrap lines; just make the text area widerCHAR=1— wrap text, breaking lines anywhere the cursor can appear (between characters, usually - if you want to be technical, between graphemes, seePango.get_log_attrs)WORD=2— wrap text, breaking lines in between wordsWORD_CHAR=3— wrap text, breaking lines in between words, or if that is not enough, also between graphemes
Constants¶
ACCESSIBLE_ATTRIBUTE_BACKGROUND¶
An attribute for the background color, expressed as an RGB value
encoded in a string using the format: {r8},{g8},{b8}.
ACCESSIBLE_ATTRIBUTE_FAMILY¶
An attribute for the font family name.
ACCESSIBLE_ATTRIBUTE_FOREGROUND¶
An attribute for the foreground color, expressed as an RGB value
encoded in a string using the format: {r8},{g8},{b8}.
ACCESSIBLE_ATTRIBUTE_OVERLINE¶
An attribute for the overline style.
Possible values are:
ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE¶
The "none" overline value for ACCESSIBLE_ATTRIBUTE_OVERLINE.
ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE¶
The "single" overline value for ACCESSIBLE_ATTRIBUTE_OVERLINE.
ACCESSIBLE_ATTRIBUTE_SIZE¶
An attribute for the font size, expressed in points.
ACCESSIBLE_ATTRIBUTE_STRETCH¶
An attribute for the font stretch type.
Possible values are:
ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSEDACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSEDACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSEDACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED
ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED¶
The "condensed" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_EXPANDED¶
The "expanded" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED¶
The "extra condensed" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_EXPANDED¶
The "extra expanded" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_NORMAL¶
The "normal" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED¶
The "semi condensed" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_EXPANDED¶
The "semi expanded" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED¶
The "ultra condensed" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_EXPANDED¶
The "ultra expanded" stretch value for ACCESSIBLE_ATTRIBUTE_STRETCH.
ACCESSIBLE_ATTRIBUTE_STRIKETHROUGH¶
An attribute for strikethrough text.
Possible values are true or false.
ACCESSIBLE_ATTRIBUTE_STYLE¶
An attribute for the font style.
Possible values are:
ACCESSIBLE_ATTRIBUTE_STYLE_NORMALACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUEACCESSIBLE_ATTRIBUTE_STYLE_ITALIC
ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC¶
The "italic" style value for ACCESSIBLE_ATTRIBUTE_STYLE.
ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL¶
The "normal" style value for ACCESSIBLE_ATTRIBUTE_STYLE.
ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE¶
The "oblique" style value for ACCESSIBLE_ATTRIBUTE_STYLE.
ACCESSIBLE_ATTRIBUTE_UNDERLINE¶
An attribute for the underline style.
Possible values are:
ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONEACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLEACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLEACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR
ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE¶
The "double" underline value for ACCESSIBLE_ATTRIBUTE_UNDERLINE.
ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR¶
The "error" underline value for ACCESSIBLE_ATTRIBUTE_UNDERLINE.
ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE¶
The "none" underline value for ACCESSIBLE_ATTRIBUTE_UNDERLINE.
ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE¶
The "single" underline value for ACCESSIBLE_ATTRIBUTE_UNDERLINE.
ACCESSIBLE_ATTRIBUTE_VARIANT¶
An attribute for the font variant.
Possible values are:
ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPSACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPSACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPSACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPSACCESSIBLE_ATTRIBUTE_VARIANT_UNICASEACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS
ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS¶
The "all petite caps" variant value for ACCESSIBLE_ATTRIBUTE_VARIANT.
ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS¶
The "all small caps" variant value for ACCESSIBLE_ATTRIBUTE_VARIANT.
ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS¶
The "petite caps" variant value for ACCESSIBLE_ATTRIBUTE_VARIANT.
ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS¶
The "small caps" variant value for ACCESSIBLE_ATTRIBUTE_VARIANT.
ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS¶
The "title caps" variant value for ACCESSIBLE_ATTRIBUTE_VARIANT.
ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE¶
The "unicase" variant value for ACCESSIBLE_ATTRIBUTE_VARIANT.
ACCESSIBLE_ATTRIBUTE_WEIGHT¶
An attribute for the font weight.
ACCESSIBLE_VALUE_UNDEFINED¶
An undefined value. The accessible attribute is either unset, or its value is undefined.
BINARY_AGE¶
Like 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¶
The default name of the extension point.
INPUT_ERROR¶
Constant to return from a signal handler for the ::input signal in case of conversion failure.
See SpinButton.input.
INTERFACE_AGE¶
Like get_interface_age, but from the headers used at
application compile time, rather than from the library linked
against at application run time.
INVALID_LIST_POSITION¶
The value used to refer to a guaranteed invalid position
in a GListModel.
This value may be returned from some functions, others may accept it as input. Its interpretation may differ for different functions.
Refer to each function's documentation for if this value is allowed and what it does.
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 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¶
Evaluates to the maximum length of a compose sequence.
This macro is longer used by GTK.
MEDIA_FILE_EXTENSION_POINT_NAME¶
The default extension point name for media file.
MICRO_VERSION¶
Like 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 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¶
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.
The set of media types is defined in PWG 5101.1-2002 PWG.
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.
PRIORITY_RESIZE¶
Use this priority for functionality related to size allocation.
It is used internally by GTK+ to compute the sizes of widgets.
This priority is higher than Gdk.PRIORITY_REDRAW to avoid
resizing a widget which was just redrawn.
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.
Note that this is not very useful for providing default
styling for custom style classes - themes are likely to
override styling provided at this priority with
catch-all * {...} rules.
STYLE_PROVIDER_PRIORITY_SETTINGS¶
The priority used for style information provided
via GtkSettings.
This priority is higher than STYLE_PROVIDER_PRIORITY_THEME
to let settings override themes.
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.
You should not use priorities higher than this, to give the user the last word.
SVG_DEFAULT_FEATURES¶
The GtkSvgFeatures that are enabled by default.
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 TreeSortable.
See also: TreeSortable.set_sort_column_id
TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID¶
Disables sorting in a TreeSortable.
See also: TreeSortable.set_sort_column_id
Callbacks¶
AssistantPageFunc¶
CellAllocCallback¶
CellAllocCallback = Callable[[renderer: CellRenderer, cell_area: Gdk.Rectangle, cell_background: Gdk.Rectangle], bool]
CellCallback¶
CellLayoutDataFunc¶
CellLayoutDataFunc = Callable[[cell_layout: CellLayout, cell: CellRenderer, tree_model: TreeModel, iter: TreeIter], None]
CustomAllocateFunc¶
CustomFilterFunc¶
CustomMeasureFunc¶
CustomRequestModeFunc¶
DrawingAreaDrawFunc¶
DrawingAreaDrawFunc = Callable[[drawing_area: DrawingArea, cr: cairo.Context[cairo.Surface], width: int, height: int], None]
EntryCompletionMatchFunc¶
ExpressionNotify¶
FlowBoxCreateWidgetFunc¶
FlowBoxFilterFunc¶
FlowBoxForeachFunc¶
FlowBoxSortFunc¶
FontFilterFunc¶
IconViewForeachFunc¶
ListBoxCreateWidgetFunc¶
ListBoxFilterFunc¶
ListBoxForeachFunc¶
ListBoxSortFunc¶
ListBoxUpdateHeaderFunc¶
MapListModelMapFunc¶
MenuButtonCreatePopupFunc¶
PageSetupDoneFunc¶
PrintJobCompleteFunc¶
PrintSettingsFunc¶
PrinterFunc¶
ScaleFormatValueFunc¶
ShortcutFunc¶
TextBufferCommitNotify¶
TextBufferCommitNotify = Callable[[buffer: TextBuffer, flags: TextBufferNotifyFlags | int, position: int, length: int], None]
TextCharPredicate¶
TextTagTableForeach¶
TickCallback¶
TreeCellDataFunc¶
TreeCellDataFunc = Callable[[tree_column: TreeViewColumn, cell: CellRenderer, tree_model: TreeModel, iter: TreeIter], None]
TreeIterCompareFunc¶
TreeListModelCreateModelFunc¶
TreeModelFilterModifyFunc¶
TreeModelFilterVisibleFunc¶
TreeModelForeachFunc¶
TreeSelectionForeachFunc¶
TreeSelectionFunc¶
TreeSelectionFunc = Callable[[selection: TreeSelection, model: TreeModel, path: TreePath, path_currently_selected: bool], bool]
TreeViewColumnDropFunc¶
TreeViewColumnDropFunc = Callable[[tree_view: TreeView, column: TreeViewColumn, prev_column: TreeViewColumn, next_column: TreeViewColumn], bool]