Enums

Details

class Gtk.AccessibleAutocomplete(value)

Bases: GObject.GEnum

The possible values for the Gtk.AccessibleProperty.AUTOCOMPLETE accessible property.

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.

class Gtk.AccessibleInvalidState(value)

Bases: GObject.GEnum

The possible values for the Gtk.AccessibleState.INVALID accessible state.

Note that the Gtk.AccessibleInvalidState.FALSE and Gtk.AccessibleInvalidState.TRUE have the same values as False and True.

FALSE = 0

There are no detected errors in the value

TRUE = 1

The value entered by the user has failed validation

GRAMMAR = 2

A grammatical error was detected

SPELLING = 3

A spelling error was detected

class Gtk.AccessiblePlatformState(value)

Bases: GObject.GEnum

The various platform states which can be queried using [method`Gtk`.Accessible.get_platform_state].

New in version 4.10.

FOCUSABLE = 0

whether the accessible can be focused

FOCUSED = 1

whether the accessible has focus

ACTIVE = 2

whether the accessible is active

class Gtk.AccessibleProperty(value)

Bases: GObject.GEnum

The possible accessible properties of a [iface`Accessible`].

classmethod init_value(property, value)[source]
Parameters:
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: [enum`AccessibleAutocomplete`]

DESCRIPTION = 1

Defines a string value that describes or annotates the current element. Value type: string

PLACEHOLDER = 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: string

READ_ONLY = 11

Indicates that the element is not editable, but is otherwise operable. Value type: boolean

REQUIRED = 12

Indicates that user input is required on the element before a form may be submitted. Value type: boolean

ROLE_DESCRIPTION = 13

Defines a human-readable, author-localized description for the role of an element. Value type: string

SORT = 14

Indicates if items in a table or grid are sorted in ascending or descending order. Value type: [enum`AccessibleSort`]

VALUE_MAX = 15

Defines the maximum allowed value for a range widget. Value type: double

VALUE_MIN = 16

Defines the minimum allowed value for a range widget. Value type: double

VALUE_NOW = 17

Defines the current value for a range widget. Value type: double

VALUE_TEXT = 18

Defines the human readable text alternative of aria-valuenow for a range widget. Value type: string

HAS_POPUP = 2

Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.

KEY_SHORTCUTS = 3

Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. Value type: string

LABEL = 4

Defines a string value that labels the current element. Value type: string

LEVEL = 5

Defines the hierarchical level of an element within a structure. Value type: integer

MODAL = 6

Indicates whether an element is modal when displayed. Value type: boolean

MULTI_LINE = 7

Indicates whether a text box accepts multiple lines of input or only a single line. Value type: boolean

MULTI_SELECTABLE = 8

Indicates that the user may select more than one item from the current selectable descendants. Value type: boolean

ORIENTATION = 9

Indicates whether the element’s orientation is horizontal, vertical, or unknown/ambiguous. Value type: [enum`Orientation`]

class Gtk.AccessibleRelation(value)

Bases: GObject.GEnum

The possible accessible relations of a [iface`Accessible`].

Accessible relations can be references to other widgets, integers or strings.

classmethod init_value(relation, value)[source]
Parameters:
ACTIVE_DESCENDANT = 0

Identifies the currently active element when focus is on a composite widget, combobox, textbox, group, or application. Value type: reference

COL_COUNT = 1

Defines the total number of columns in a table, grid, or treegrid. Value type: integer

LABELLED_BY = 10

Identifies the element (or elements) that labels the current element. Value type: reference

OWNS = 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: reference

POS_IN_SET = 12

Defines an element’s number or position in the current set of listitems or treeitems. Value type: integer

ROW_COUNT = 13

Defines the total number of rows in a table, grid, or treegrid. Value type: integer

ROW_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: integer

ROW_INDEX_TEXT = 15

Defines a human readable text alternative of aria-rowindex. Value type: string

ROW_SPAN = 16

Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. Value type: integer

SET_SIZE = 17

Defines the number of items in the current set of listitems or treeitems. Value type: integer

COL_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: integer

COL_INDEX_TEXT = 3

Defines a human readable text alternative of Gtk.AccessibleRelation.COL_INDEX. Value type: string

COL_SPAN = 4

Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. Value type: integer

CONTROLS = 5

Identifies the element (or elements) whose contents or presence are controlled by the current element. Value type: reference

DESCRIBED_BY = 6

Identifies the element (or elements) that describes the object. Value type: reference

DETAILS = 7

Identifies the element (or elements) that provide additional information related to the object. Value type: reference

ERROR_MESSAGE = 8

Identifies the element that provides an error message for an object. Value type: reference

FLOW_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: reference

class Gtk.AccessibleRole(value)

Bases: GObject.GEnum

The accessible role for a [iface`Accessible`] implementation.

Abstract roles are only used as part of the ontology; application developers must not use abstract roles in their code.

ALERT = 0

An element with important, and usually time-sensitive, information

ALERT_DIALOG = 1

A type of dialog that contains an alert message

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

Unused

FORM = 14

Unused

GENERIC = 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, like [class`Gtk`.HeaderBar] or [class`Gtk`.Notebook].

HEADING = 19

Unused

BANNER = 2

Unused

IMG = 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

Unused

A clickable link.

LIST = 26

A list of items.

LIST_BOX = 27

Unused.

LIST_ITEM = 28

An item in a list.

LOG = 29

Unused

BUTTON = 3

An input element that allows for user-triggered actions when clicked or pressed

MAIN = 30

Unused

MARQUEE = 31

Unused

MATH = 32

Unused

METER = 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

Unused

CAPTION = 4

Unused

NONE = 40

An element that is not represented to accessibility technologies. This role is synonymous to Gtk.AccessibleRole.PRESENTATION.

NOTE = 41

Unused

OPTION = 42

Unused

PRESENTATION = 43

An element that is not represented to accessibility technologies. This role is synonymous to Gtk.AccessibleRole.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

Unused

RANGE = 47

Abstract role.

REGION = 48

Unused

ROW = 49

A row in a columned list.

CELL = 5

Unused

ROW_GROUP = 50

Unused

ROW_HEADER = 51

Unused

SCROLLBAR = 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

Unused

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

CHECKBOX = 6

A checkable input element that has three possible values: true, false, or mixed

SPIN_BUTTON = 60

A form of range that expects the user to select from among discrete choices.

STATUS = 61

Unused

STRUCTURE = 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

Unused

TAB_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

Unused

COLUMN_HEADER = 7

A header in a columned list.

TIMER = 70

Unused

TOOLBAR = 71

Unused

TOOLTIP = 72

Unused

TREE = 73

Unused

TREE_GRID = 74

A treeview-like, columned list.

TREE_ITEM = 75

Unused

WIDGET = 76

Abstract role for interactive components of a graphical user interface

WINDOW = 77

Abstract role for windows.

TOGGLE_BUTTON = 78

A type of push button which stays pressed until depressed by a second activation.

New in version 4.10.

APPLICATION = 79

A toplevel element of a graphical user interface. This is the role that GTK uses by default for windows.

New in version 4.12.

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 input

COMMAND = 9

Abstract role.

class Gtk.AccessibleSort(value)

Bases: GObject.GEnum

The possible values for the Gtk.AccessibleProperty.SORT accessible property.

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.

class Gtk.AccessibleState(value)

Bases: GObject.GEnum

The possible accessible states of a [iface`Accessible`].

classmethod init_value(state, value)[source]
Parameters:
BUSY = 0

A “busy” state. This state has boolean values

CHECKED = 1

A “checked” state; indicates the current state of a [class`CheckButton`]. Value type: [enum`AccessibleTristate`]

DISABLED = 2

A “disabled” state; corresponds to the [property`Widget`:sensitive] property. It indicates a UI element that is perceivable, but not editable or operable. Value type: boolean

EXPANDED = 3

An “expanded” state; corresponds to the [property`Expander`:expanded] property. Value type: boolean or undefined

HIDDEN = 4

A “hidden” state; corresponds to the [property`Widget`:visible] property. You can use this state explicitly on UI elements that should not be exposed to an assistive technology. Value type: boolean See also: Gtk.AccessibleState.DISABLED

INVALID = 5

An “invalid” state; set when a widget is showing an error. Value type: [enum`AccessibleInvalidState`]

PRESSED = 6

A “pressed” state; indicates the current state of a [class`ToggleButton`]. Value type: [enum`AccessibleTristate`] enumeration

SELECTED = 7

A “selected” state; set when a widget is selected. Value type: boolean or undefined

VISITED = 8

Indicates that a widget with the Gtk.AccessibleRole.LINK has been visited. Value type: boolean.

New in version 4.12.

class Gtk.AccessibleTristate(value)

Bases: GObject.GEnum

The possible values for the Gtk.AccessibleState.PRESSED accessible state.

Note that the Gtk.AccessibleTristate.FALSE and Gtk.AccessibleTristate.TRUE have the same values as False and True.

FALSE = 0

The state is false

TRUE = 1

The state is true

MIXED = 2

The state is mixed

class Gtk.Align(value)

Bases: GObject.GEnum

Controls how a widget deals with extra space in a single dimension.

Alignment only matters if the widget receives a “too large” allocation, for example if you packed the widget with the [property`Gtk`.Widget:hexpand] property inside a [class`Box`], then the widget might get extra space. If you have for example a 16x16 icon inside a 32x32 space, the icon could be scaled and stretched, it could be centered, or it could be positioned to one side of the space.

Note that in horizontal context GTK_ALIGN_START and GTK_ALIGN_END are interpreted relative to text direction.

Baseline support is optional for containers and widgets, and is only available for vertical alignment. ``GTK_ALIGN_BASELINE_CENTER and `` Gtk.Align.BASELINE_FILL `` are treated similar to `` Gtk.Align.CENTER `` and `` Gtk.Align.FILL`, except that it positions the widget to line up the baselines, where that is supported.

FILL = 0

stretch to fill all space if possible, center if no meaningful way to stretch

START = 1

snap to left or top side, leaving space on right or bottom

END = 2

snap to right or bottom side, leaving space on left or top

CENTER = 3

center natural width of widget inside the allocation

BASELINE = 4

align the widget according to the baseline. See [class`Gtk`.Widget]. Deprecated: 4.12: Use GTK_ALIGN_BASELINE_FILL instead

BASELINE_FILL = 4

a different name for GTK_ALIGN_BASELINE.

New in version 4.12.

BASELINE_CENTER = 5

stretch to fill all space, but align the baseline.

New in version 4.12.

class Gtk.ArrowType(value)

Bases: GObject.GEnum

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

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.

class Gtk.AssistantPageType(value)

Bases: GObject.GEnum

Determines the page role inside a GtkAssistant.

The role is used to handle buttons sensitivity and visibility.

Note that an assistant needs to end its page flow with a page of type Gtk.AssistantPageType.CONFIRM, Gtk.AssistantPageType.SUMMARY or Gtk.AssistantPageType.PROGRESS to be correct.

The Cancel button will only be shown if the page isn’t “committed”. See Gtk.Assistant.commit() for details.

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 through Gtk.Assistant.add_action_widget().

class Gtk.BaselinePosition(value)

Bases: GObject.GEnum

Baseline position in a row of widgets.

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

TOP = 0

Align the baseline at the top

CENTER = 1

Center the baseline

BOTTOM = 2

Align the baseline at the bottom

class Gtk.BorderStyle(value)

Bases: GObject.GEnum

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

NONE = 0

No visible border

HIDDEN = 1

Same as Gtk.BorderStyle.NONE

SOLID = 2

A single line segment

INSET = 3

Looks as if the content is sunken into the canvas

OUTSET = 4

Looks as if the content is coming out of the canvas

DOTTED = 5

A series of round dots

DASHED = 6

A series of square-ended dashes

DOUBLE = 7

Two parallel lines with some space between them

GROOVE = 8

Looks as if it were carved in the canvas

RIDGE = 9

Looks as if it were coming out of the canvas

class Gtk.BuilderError(value)

Bases: GObject.GEnum

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

classmethod quark()[source]
Return type:

int

INVALID_TYPE_FUNCTION = 0

A type-func attribute didn’t name a function that returns a GType.

UNHANDLED_TAG = 1

The input contained a tag that GtkBuilder can’t handle.

TEMPLATE_MISMATCH = 10

The wrong type was specified in a composite class’s template XML

INVALID_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 the gmodule-export-2.0 pkgconfig module can fix this problem.

MISSING_ATTRIBUTE = 2

An attribute that is required by GtkBuilder was missing.

INVALID_ATTRIBUTE = 3

GtkBuilder found an attribute that it doesn’t understand.

INVALID_TAG = 4

GtkBuilder found a tag that it doesn’t understand.

MISSING_PROPERTY_VALUE = 5

A required property value was missing.

INVALID_VALUE = 6

GtkBuilder couldn’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.

class Gtk.ButtonsType(value)

Bases: GObject.GEnum

Prebuilt sets of buttons for GtkDialog.

If none of these choices are appropriate, simply use Gtk.ButtonsType.NONE and call [method`Gtk`.Dialog.add_buttons].

Please note that Gtk.ButtonsType.OK, Gtk.ButtonsType.YES_NO and Gtk.ButtonsType.OK_CANCEL are discouraged by the GNOME Human Interface Guidelines.

NONE = 0

no buttons at all

OK = 1

an OK button

CLOSE = 2

a Close button

CANCEL = 3

a Cancel button

YES_NO = 4

Yes and No buttons

OK_CANCEL = 5

OK and Cancel buttons

class Gtk.CellRendererAccelMode(value)

Bases: GObject.GEnum

The available modes for [property`Gtk`.CellRendererAccel:accel-mode].

GTK = 0

GTK accelerators mode

OTHER = 1

Other accelerator mode

class Gtk.CellRendererMode(value)

Bases: GObject.GEnum

Identifies how the user can interact with a particular cell.

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.

class Gtk.Collation(value)

Bases: GObject.GEnum

Describes how a [class`Gtk`.StringSorter] turns strings into sort keys to compare them.

Note that the result of sorting will in general depend on the current locale unless the mode is Gtk.Collation.NONE.

New in version 4.10.

NONE = 0

Don’t do any collation

UNICODE = 1

Use [func`GLib`.utf8_collate_key]

FILENAME = 2

Use [func`GLib`.utf8_collate_key_for_filename]

class Gtk.ConstraintAttribute(value)

Bases: GObject.GEnum

The widget attributes that can be used when creating a [class`Constraint`].

NONE = 0

No attribute, used for constant relations

LEFT = 1

The left edge of a widget, regardless of text direction

CENTER_Y = 10

The center of a widget, on the vertical axis

BASELINE = 11

The baseline of a widget

RIGHT = 2

The right edge of a widget, regardless of text direction

TOP = 3

The top edge of a widget

BOTTOM = 4

The bottom edge of a widget

START = 5

The leading edge of a widget, depending on text direction; equivalent to Gtk.ConstraintAttribute.LEFT for LTR languages, and Gtk.ConstraintAttribute.RIGHT for RTL ones

END = 6

The trailing edge of a widget, depending on text direction; equivalent to Gtk.ConstraintAttribute.RIGHT for LTR languages, and Gtk.ConstraintAttribute.LEFT for RTL ones

WIDTH = 7

The width of a widget

HEIGHT = 8

The height of a widget

CENTER_X = 9

The center of a widget, on the horizontal axis

class Gtk.ConstraintRelation(value)

Bases: GObject.GEnum

The relation between two terms of a constraint.

LE = -1

Less than, or equal

EQ = 0

Equal

GE = 1

Greater than, or equal

class Gtk.ConstraintStrength(value)

Bases: GObject.GEnum

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

The strength of a [class`Constraint`] can be expressed with any positive integer; the values of this enumeration can be used for readability.

WEAK = 1

A weak constraint

MEDIUM = 1000

A medium constraint

STRONG = 1000000000

A strong constraint

REQUIRED = 1001001000

The constraint is required towards solving the layout

class Gtk.ConstraintVflParserError(value)

Bases: GObject.GEnum

Domain for VFL parsing errors.

classmethod quark()[source]
Return type:

int

SYMBOL = 0

Invalid or unknown symbol

ATTRIBUTE = 1

Invalid or unknown attribute

VIEW = 2

Invalid or unknown view

METRIC = 3

Invalid or unknown metric

PRIORITY = 4

Invalid or unknown priority

RELATION = 5

Invalid or unknown relation

class Gtk.ContentFit(value)

Bases: GObject.GEnum

Controls how a content should be made to fit inside an allocation.

New in version 4.8.

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.

class Gtk.CornerType(value)

Bases: GObject.GEnum

Specifies which corner a child widget should be placed in when packed into a GtkScrolledWindow.

This is effectively the opposite of where the scroll bars are placed.

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.

class Gtk.CssParserError(value)

Bases: GLib.Enum

Errors that can occur while parsing CSS.

These errors are unexpected and will cause parts of the given CSS to be ignored.

FAILED = 0

Unknown failure.

SYNTAX = 1

The given text does not form valid syntax

IMPORT = 2

Failed to import a resource

NAME = 3

The given name has not been defined

UNKNOWN_VALUE = 4

The given value is not correct

class Gtk.CssParserWarning(value)

Bases: GLib.Enum

Warnings that can occur while parsing CSS.

Unlike ``GtkCssParserError``s, warnings do not cause the parser to skip any input, but they indicate issues that should be fixed.

DEPRECATED = 0

The given construct is deprecated and will be removed in a future version

SYNTAX = 1

A syntax construct was used that should be avoided

UNIMPLEMENTED = 2

A feature is not implemented

class Gtk.DeleteType(value)

Bases: GObject.GEnum

Passed to various keybinding signals for deleting text.

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.

class Gtk.DialogError(value)

Bases: GObject.GEnum

Error codes in the GTK_DIALOG_ERROR domain that can be returned by async dialog functions.

New in version 4.10.

classmethod quark()[source]
Return type:

int

FAILED = 0

Generic error condition for when an operation fails and no more specific code is applicable

CANCELLED = 1

The async function call was cancelled via its GCancellable

DISMISSED = 2

The operation was cancelled by the user (via a Cancel or Close button)

class Gtk.DirectionType(value)

Bases: GObject.GEnum

Focus movement types.

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.

class Gtk.EditableProperties(value)

Bases: GObject.GEnum

The identifiers for [iface`Gtk`.Editable] properties.

See [func`Gtk`.Editable.install_properties] for details on how to implement the GtkEditable interface.

PROP_TEXT = 0

the property id for [property`Gtk`.Editable:text]

PROP_CURSOR_POSITION = 1

the property id for [property`Gtk`.Editable:cursor-position]

PROP_SELECTION_BOUND = 2

the property id for [property`Gtk`.Editable:selection-bound]

PROP_EDITABLE = 3

the property id for [property`Gtk`.Editable:editable]

PROP_WIDTH_CHARS = 4

the property id for [property`Gtk`.Editable:width-chars]

PROP_MAX_WIDTH_CHARS = 5

the property id for [property`Gtk`.Editable:max-width-chars]

PROP_XALIGN = 6

the property id for [property`Gtk`.Editable:xalign]

PROP_ENABLE_UNDO = 7

the property id for [property`Gtk`.Editable:enable-undo]

NUM_PROPERTIES = 8

the number of properties

class Gtk.EntryIconPosition(value)

Bases: GObject.GEnum

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

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

class Gtk.EventSequenceState(value)

Bases: GObject.GEnum

Describes the state of a [struct`Gdk`.EventSequence] in a [class`Gesture`].

NONE = 0

The sequence is handled, but not grabbed.

CLAIMED = 1

The sequence is handled and grabbed.

DENIED = 2

The sequence is denied.

class Gtk.FileChooserAction(value)

Bases: GObject.GEnum

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

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.

class Gtk.FileChooserError(value)

Bases: GObject.GEnum

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

classmethod quark()[source]
Returns:

The error quark used for GtkFileChooser errors.

Return type:

int

Registers an error quark for GtkFileChooser errors.

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

class Gtk.FilterChange(value)

Bases: GObject.GEnum

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

If you are writing an implementation and are not sure which value to pass, Gtk.FilterChange.DIFFERENT is always a correct choice.

DIFFERENT = 0

The filter change cannot be described with any of the other enumeration values.

LESS_STRICT = 1

The filter is less strict than it was before: All items that it used to return True for 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 for still return False, others now may, too.

class Gtk.FilterMatch(value)

Bases: GObject.GEnum

Describes the known strictness of a filter.

Note that for filters where the strictness is not known, Gtk.FilterMatch.SOME is always an acceptable value, even if a filter does match all or no items.

SOME = 0

The filter matches some items, Gtk.Filter.match() may return True or False

NONE = 1

The filter does not match any item, Gtk.Filter.match() will always return False.

ALL = 2

The filter matches all items, Gtk.Filter.match() will alays return True.

class Gtk.FontLevel(value)

Bases: GObject.GEnum

The level of granularity for the font selection.

Depending on this value, the PangoFontDescription that is returned by [method`Gtk`.FontDialogButton.get_font_desc] will have more or less fields set.

New in version 4.10.

FAMILY = 0

Select a font family

FACE = 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

class Gtk.IconSize(value)

Bases: GObject.GEnum

Built-in icon sizes.

Icon sizes default to being inherited. Where they cannot be inherited, text size is the default.

All widgets which use GtkIconSize set the normal-icons or large-icons style classes correspondingly, and let themes determine the actual size to be used with the -gtk-icon-size CSS property.

INHERIT = 0

Keep the size of the parent element

NORMAL = 1

Size similar to text size

LARGE = 2

Large size, for example in an icon view

class Gtk.IconThemeError(value)

Bases: GObject.GEnum

Error codes for GtkIconTheme operations.

classmethod quark()[source]
Return type:

int

NOT_FOUND = 0

The icon specified does not exist in the theme

FAILED = 1

An unspecified error occurred.

class Gtk.IconViewDropPosition(value)

Bases: GObject.GEnum

An enum for determining where a dropped item goes.

NO_DROP = 0

no drop possible

DROP_INTO = 1

dropped item replaces the item

DROP_LEFT = 2

dropped item is inserted to the left

DROP_RIGHT = 3

dropped item is inserted to the right

DROP_ABOVE = 4

dropped item is inserted above

DROP_BELOW = 5

dropped item is inserted below

class Gtk.ImageType(value)

Bases: GObject.GEnum

Describes the image data representation used by a [class`Gtk`.Image].

If you want to get the image from the widget, you can only get the currently-stored representation; for instance, if the Gtk.Image.get_storage_type() returns Gtk.ImageType.PAINTABLE, then you can call Gtk.Image.get_paintable().

For empty images, you can request any storage type (call any of the “get” functions), but they will all return None values.

EMPTY = 0

there is no image displayed by the widget

ICON_NAME = 1

the widget contains a named icon

GICON = 2

the widget contains a GIcon

PAINTABLE = 3

the widget contains a GdkPaintable

class Gtk.InputPurpose(value)

Bases: GObject.GEnum

Describes primary purpose of the input widget.

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

Note that the purpose is not meant to impose a totally strict rule about allowed characters, and does not replace input validation. It is fine for an on-screen keyboard to let the user override the character set restriction that is expressed by the purpose. The application is expected to validate the entry contents, even if it specified a purpose.

The difference between Gtk.InputPurpose.DIGITS and Gtk.InputPurpose.NUMBER is that the former accepts only digits while the latter also some punctuation (like commas or points, plus, minus) and “e” or “E” as in 3.14E+000.

This enumeration may be extended in the future; input methods should interpret unknown values as “free form”.

FREE_FORM = 0

Allow any character

ALPHA = 1

Allow only alphabetic characters

TERMINAL = 10

Allow any character, in addition to control codes

DIGITS = 2

Allow only digits

NUMBER = 3

Edited field expects numbers

PHONE = 4

Edited field expects phone number

URL = 5

Edited field expects URL

EMAIL = 6

Edited field expects email address

NAME = 7

Edited field expects the name of a person

PASSWORD = 8

Like Gtk.InputPurpose.FREE_FORM, but characters are hidden

PIN = 9

Like Gtk.InputPurpose.DIGITS, but characters are hidden

class Gtk.InscriptionOverflow(value)

Bases: GObject.GEnum

The different methods to handle text in Gtk.Inscription when it doesn’t fit the available space.

New in version 4.8.

CLIP = 0

Clip the remaining text

ELLIPSIZE_START = 1

Omit characters at the start of the text

ELLIPSIZE_MIDDLE = 2

Omit characters at the middle of the text

ELLIPSIZE_END = 3

Omit characters at the end of the text

class Gtk.Justification(value)

Bases: GObject.GEnum

Used for justifying the text inside a [class`Label`] widget.

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.

class Gtk.LevelBarMode(value)

Bases: GObject.GEnum

Describes how [class`LevelBar`] contents should be rendered.

Note that this enumeration could be extended with additional modes in the future.

CONTINUOUS = 0

the bar has a continuous mode

DISCRETE = 1

the bar has a discrete mode

class Gtk.License(value)

Bases: GObject.GEnum

The type of license for an application.

This enumeration can be expanded at later date.

UNKNOWN = 0

No license specified

CUSTOM = 1

A license text is going to be specified by the developer

GPL_3_0_ONLY = 10

The GNU General Public License, version 3.0 only

LGPL_2_1_ONLY = 11

The GNU Lesser General Public License, version 2.1 only

LGPL_3_0_ONLY = 12

The GNU Lesser General Public License, version 3.0 only

AGPL_3_0 = 13

The GNU Affero General Public License, version 3.0 or later

AGPL_3_0_ONLY = 14

The GNU Affero General Public License, version 3.0 only

BSD_3 = 15

The 3-clause BSD licence

APACHE_2_0 = 16

The Apache License, version 2.0

MPL_2_0 = 17

The Mozilla Public License, version 2.0

GPL_2_0 = 2

The GNU General Public License, version 2.0 or later

GPL_3_0 = 3

The GNU General Public License, version 3.0 or later

LGPL_2_1 = 4

The GNU Lesser General Public License, version 2.1 or later

LGPL_3_0 = 5

The GNU Lesser General Public License, version 3.0 or later

BSD = 6

The BSD standard license

MIT_X11 = 7

The MIT/X11 standard license

ARTISTIC = 8

The Artistic License, version 2.0

GPL_2_0_ONLY = 9

The GNU General Public License, version 2.0 only

class Gtk.ListTabBehavior(value)

Bases: GObject.GEnum

Used to configure the focus behavior in the GTK_DIR_TAB_FORWARD and GTK_DIR_TAB_BACKWARD direction, like the <kbd>Tab</kbd> key in a [class`Gtk`.ListView].

New in version 4.12.

ALL = 0

Cycle through all focusable items of the list

ITEM = 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 like Gtk.ColumnView, otherwise it behaves like GTK_LIST_TAB_ITEM.

class Gtk.MessageType(value)

Bases: GObject.GEnum

The type of message being displayed in a [class`MessageDialog`].

INFO = 0

Informational message

WARNING = 1

Non-fatal warning message

QUESTION = 2

Question requiring a choice

ERROR = 3

Fatal error message

OTHER = 4

None of the above

class Gtk.MovementStep(value)

Bases: GObject.GEnum

Passed as argument to various keybinding signals for moving the cursor position.

LOGICAL_POSITIONS = 0

Move forward or back by graphemes

VISUAL_POSITIONS = 1

Move left or right by graphemes

WORDS = 2

Move forward or back by words

DISPLAY_LINES = 3

Move up or down lines (wrapped lines)

DISPLAY_LINE_ENDS = 4

Move to either end of a line

PARAGRAPHS = 5

Move up or down paragraphs (newline-ended lines)

PARAGRAPH_ENDS = 6

Move to either end of a paragraph

PAGES = 7

Move by pages

BUFFER_ENDS = 8

Move to ends of the buffer

HORIZONTAL_PAGES = 9

Move horizontally by pages

class Gtk.NaturalWrapMode(value)

Bases: GObject.GEnum

Options for selecting a different wrap mode for natural size requests.

See for example the [property`Gtk`.Label:natural-wrap-mode] property.

New in version 4.6.

INHERIT = 0

Inherit the minimum size request. In particular, this should be used with Pango.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 using Pango.WrapMode.WORD_CHAR as the wrap mode.

class Gtk.NotebookTab(value)

Bases: GObject.GEnum

The parameter used in the action signals of GtkNotebook.

FIRST = 0

the first tab in the notebook

LAST = 1

the last tab in the notebook

class Gtk.NumberUpLayout(value)

Bases: GObject.GEnum

Used to determine the layout of pages on a sheet when printing multiple pages per sheet.

LRTB = 0
LRBT = 1
RLTB = 2
RLBT = 3
TBLR = 4
TBRL = 5
BTLR = 6
BTRL = 7
class Gtk.Ordering(value)

Bases: GObject.GEnum

Describes the way two values can be compared.

These values can be used with a [callback`GLib`.CompareFunc]. However, a GCompareFunc is allowed to return any integer values. For converting such a value to a GtkOrdering value, use [func`Gtk`.Ordering.from_cmpfunc].

SMALLER = -1

the first value is smaller than the second

EQUAL = 0

the two values are equal

LARGER = 1

the first value is larger than the second

class Gtk.Orientation(value)

Bases: GObject.GEnum

Represents the orientation of widgets and other objects.

Typical examples are [class`Box`] or [class`GesturePan`].

HORIZONTAL = 0

The element is in horizontal orientation.

VERTICAL = 1

The element is in vertical orientation.

class Gtk.Overflow(value)

Bases: GObject.GEnum

Defines how content overflowing a given area should be handled.

This is used in [method`Gtk`.Widget.set_overflow]. The [property`Gtk`.Widget:overflow] property is modeled after the CSS overflow property, but implements it only partially.

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.

class Gtk.PackType(value)

Bases: GObject.GEnum

Represents the packing location of a children in its parent.

See [class`WindowControls`] for example.

START = 0

The child is packed into the start of the widget

END = 1

The child is packed into the end of the widget

class Gtk.PadActionType(value)

Bases: GObject.GEnum

The type of a pad action.

BUTTON = 0

Action is triggered by a pad button

RING = 1

Action is triggered by a pad ring

STRIP = 2

Action is triggered by a pad strip

class Gtk.PageOrientation(value)

Bases: GObject.GEnum

See also Gtk.PrintSettings.set_orientation().

PORTRAIT = 0

Portrait mode.

LANDSCAPE = 1

Landscape mode.

REVERSE_PORTRAIT = 2

Reverse portrait mode.

REVERSE_LANDSCAPE = 3

Reverse landscape mode.

class Gtk.PageSet(value)

Bases: GObject.GEnum

See also Gtk.PrintJob.set_page_set().

ALL = 0

All pages.

EVEN = 1

Even pages.

ODD = 2

Odd pages.

class Gtk.PanDirection(value)

Bases: GObject.GEnum

Describes the panning direction of a [class`GesturePan`].

LEFT = 0

panned towards the left

RIGHT = 1

panned towards the right

UP = 2

panned upwards

DOWN = 3

panned downwards

class Gtk.PolicyType(value)

Bases: GObject.GEnum

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

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 a GtkTreeView can 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.

class Gtk.PositionType(value)

Bases: GObject.GEnum

Describes which edge of a widget a certain feature is positioned at.

For examples, see the tabs of a [class`Notebook`], or the label of a [class`Scale`].

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.

class Gtk.PrintDuplex(value)

Bases: GObject.GEnum

See also Gtk.PrintSettings.set_duplex().

SIMPLEX = 0

No duplex.

HORIZONTAL = 1

Horizontal duplex.

VERTICAL = 2

Vertical duplex.

class Gtk.PrintError(value)

Bases: GObject.GEnum

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

classmethod quark()[source]
Returns:

The error quark used for GtkPrintOperation errors.

Return type:

int

Registers an error quark for GtkPrintOperation if necessary.

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.

class Gtk.PrintOperationAction(value)

Bases: GObject.GEnum

Determines what action the print operation should perform.

A parameter of this typs is passed to [method`Gtk`.PrintOperation.run].

PRINT_DIALOG = 0

Show the print dialog.

PRINT = 1

Start to print without showing the print dialog, based on the current print settings.

PREVIEW = 2

Show the print preview.

EXPORT = 3

Export to a file. This requires the export-filename property to be set.

class Gtk.PrintOperationResult(value)

Bases: GObject.GEnum

The result of a print operation.

A value of this type is returned by [method`Gtk`.PrintOperation.run].

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.

class Gtk.PrintPages(value)

Bases: GObject.GEnum

See also Gtk.PrintJob.set_pages()

ALL = 0

All pages.

CURRENT = 1

Current page.

RANGES = 2

Range of pages.

SELECTION = 3

Selected pages.

class Gtk.PrintQuality(value)

Bases: GObject.GEnum

See also Gtk.PrintSettings.set_quality().

LOW = 0

Low quality.

NORMAL = 1

Normal quality.

HIGH = 2

High quality.

DRAFT = 3

Draft quality.

class Gtk.PrintStatus(value)

Bases: GObject.GEnum

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

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.

class Gtk.PropagationLimit(value)

Bases: GObject.GEnum

Describes limits of a [class`EventController`] for handling events targeting other widgets.

NONE = 0

Events are handled regardless of what their target is.

SAME_NATIVE = 1

Events are only handled if their target is in the same [iface`Native`] as the event controllers widget. Note that some event types have two targets (origin and destination).

class Gtk.PropagationPhase(value)

Bases: GObject.GEnum

Describes the stage at which events are fed into a [class`EventController`].

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.

class Gtk.RecentManagerError(value)

Bases: GObject.GEnum

Error codes for GtkRecentManager operations

classmethod quark()[source]
Return type:

int

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.

class Gtk.ResponseType(value)

Bases: GObject.GEnum

Predefined values for use as response ids in Gtk.Dialog.add_button().

All predefined values are negative; GTK leaves values of 0 or greater for application-defined response ids.

NONE = -1

Returned if an action widget has no response id, or if the dialog gets programmatically hidden or destroyed

APPLY = -10

Returned by Apply buttons in GTK dialogs

HELP = -11

Returned by Help buttons in GTK dialogs

REJECT = -2

Generic response id, not used by GTK dialogs

ACCEPT = -3

Generic response id, not used by GTK dialogs

DELETE_EVENT = -4

Returned if the dialog is deleted

OK = -5

Returned by OK buttons in GTK dialogs

CANCEL = -6

Returned by Cancel buttons in GTK dialogs

CLOSE = -7

Returned by Close buttons in GTK dialogs

YES = -8

Returned by Yes buttons in GTK dialogs

NO = -9

Returned by No buttons in GTK dialogs

class Gtk.RevealerTransitionType(value)

Bases: GObject.GEnum

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

NONE = 0

No transition

CROSSFADE = 1

Fade in

SLIDE_RIGHT = 2

Slide in from the left

SLIDE_LEFT = 3

Slide in from the right

SLIDE_UP = 4

Slide in from the bottom

SLIDE_DOWN = 5

Slide in from the top

SWING_RIGHT = 6

Floop in from the left

SWING_LEFT = 7

Floop in from the right

SWING_UP = 8

Floop in from the bottom

SWING_DOWN = 9

Floop in from the top

class Gtk.ScrollStep(value)

Bases: GObject.GEnum

Passed as argument to various keybinding signals.

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.

class Gtk.ScrollType(value)

Bases: GObject.GEnum

Scrolling types.

NONE = 0

No scrolling.

JUMP = 1

Jump to new location.

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.

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.

class Gtk.ScrollablePolicy(value)

Bases: GObject.GEnum

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

MINIMUM = 0

Scrollable adjustments are based on the minimum size

NATURAL = 1

Scrollable adjustments are based on the natural size

class Gtk.SelectionMode(value)

Bases: GObject.GEnum

Used to control what selections users are allowed to make.

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 with Gtk.SelectionMode.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.

class Gtk.SensitivityType(value)

Bases: GObject.GEnum

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

AUTO = 0

The control is made insensitive if no action can be triggered

ON = 1

The control is always sensitive

OFF = 2

The control is always insensitive

class Gtk.ShortcutScope(value)

Bases: GObject.GEnum

Describes where [class`Shortcut`]s added to a [class`ShortcutController`] get handled.

LOCAL = 0

Shortcuts are handled inside the widget the controller belongs to.

MANAGED = 1

Shortcuts are handled by the first ancestor that is a [iface`ShortcutManager`]

GLOBAL = 2

Shortcuts are handled by the root widget.

class Gtk.ShortcutType(value)

Bases: GObject.GEnum

Gtk.ShortcutType specifies the kind of shortcut that is being described.

More values may be added to this enumeration over time.

ACCELERATOR = 0

The shortcut is a keyboard accelerator. The Gtk.ShortcutsShortcut :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 Gtk.ShortcutsShortcut :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.

class Gtk.SizeGroupMode(value)

Bases: GObject.GEnum

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

NONE = 0

group has no effect

HORIZONTAL = 1

group affects horizontal requisition

VERTICAL = 2

group affects vertical requisition

BOTH = 3

group affects both horizontal and vertical requisition

class Gtk.SizeRequestMode(value)

Bases: GObject.GEnum

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

HEIGHT_FOR_WIDTH = 0

Prefer height-for-width geometry management

WIDTH_FOR_HEIGHT = 1

Prefer width-for-height geometry management

CONSTANT_SIZE = 2

Don’t trade height-for-width or width-for-height

class Gtk.SortType(value)

Bases: GObject.GEnum

Determines the direction of a sort.

ASCENDING = 0

Sorting is in ascending order.

DESCENDING = 1

Sorting is in descending order.

class Gtk.SorterChange(value)

Bases: GObject.GEnum

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

DIFFERENT = 0

The sorter change cannot be described by any of the other enumeration values

INVERTED = 1

The sort order was inverted. Comparisons that returned Gtk.Ordering.SMALLER now return Gtk.Ordering.LARGER and vice versa. Other comparisons return the same values as before.

LESS_STRICT = 2

The sorter is less strict: Comparisons may now return Gtk.Ordering.EQUAL that did not do so before.

MORE_STRICT = 3

The sorter is more strict: Comparisons that did return Gtk.Ordering.EQUAL may not do so anymore.

class Gtk.SorterOrder(value)

Bases: GObject.GEnum

Describes the type of order that a GtkSorter may produce.

PARTIAL = 0

A partial order. Any GtkOrdering is possible.

NONE = 1

No order, all elements are considered equal. Gtk.Sorter.compare() will only return Gtk.Ordering.EQUAL.

TOTAL = 2

A total order. Gtk.Sorter.compare() will only return Gtk.Ordering.EQUAL if an item is compared with itself. Two different items will never cause this value to be returned.

class Gtk.SpinButtonUpdatePolicy(value)

Bases: GObject.GEnum

Determines whether the spin button displays values outside the adjustment bounds.

See [method`Gtk`.SpinButton.set_update_policy].

ALWAYS = 0

When refreshing your GtkSpinButton, the value is always displayed

IF_VALID = 1

When refreshing your GtkSpinButton, the value is only displayed if it is valid within the bounds of the spin button’s adjustment

class Gtk.SpinType(value)

Bases: GObject.GEnum

The values of the Gtk.SpinType enumeration are used to specify the change to make in Gtk.SpinButton.spin().

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.

class Gtk.StackTransitionType(value)

Bases: GObject.GEnum

Possible transitions between pages in a GtkStack widget.

New values may be added to this enumeration over time.

NONE = 0

No transition

CROSSFADE = 1

A cross-fade

OVER_LEFT = 10

Cover the old page by sliding to the left

OVER_RIGHT = 11

Cover the old page by sliding to the right

UNDER_UP = 12

Uncover the new page by sliding up

UNDER_DOWN = 13

Uncover the new page by sliding down

UNDER_LEFT = 14

Uncover the new page by sliding to the left

UNDER_RIGHT = 15

Uncover the new page by sliding to the right

OVER_UP_DOWN = 16

Cover the old page sliding up or uncover the new page sliding down, according to order

OVER_DOWN_UP = 17

Cover the old page sliding down or uncover the new page sliding up, according to order

OVER_LEFT_RIGHT = 18

Cover the old page sliding left or uncover the new page sliding right, according to order

OVER_RIGHT_LEFT = 19

Cover the old page sliding right or uncover the new page sliding left, according to order

SLIDE_RIGHT = 2

Slide from left to right

ROTATE_LEFT = 20

Pretend the pages are sides of a cube and rotate that cube to the left

ROTATE_RIGHT = 21

Pretend the pages are sides of a cube and rotate that cube to the right

ROTATE_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

SLIDE_LEFT = 3

Slide from right to left

SLIDE_UP = 4

Slide from bottom up

SLIDE_DOWN = 5

Slide from top down

SLIDE_LEFT_RIGHT = 6

Slide from left or right according to the children order

SLIDE_UP_DOWN = 7

Slide from top down or bottom up according to the order

OVER_UP = 8

Cover the old page by sliding up

OVER_DOWN = 9

Cover the old page by sliding down

class Gtk.StringFilterMatchMode(value)

Bases: GObject.GEnum

Specifies how search strings are matched inside text.

EXACT = 0

The search string and text must match exactly.

SUBSTRING = 1

The search string must be contained as a substring inside the text.

PREFIX = 2

The text must begin with the search string.

class Gtk.SymbolicColor(value)

Bases: GObject.GEnum

The indexes of colors passed to symbolic color rendering, such as [vfunc`Gtk`.SymbolicPaintable.snapshot_symbolic].

More values may be added over time.

New in version 4.6.

FOREGROUND = 0

The default foreground color

ERROR = 1

Indication color for errors

WARNING = 2

Indication color for warnings

SUCCESS = 3

Indication color for success

class Gtk.SystemSetting(value)

Bases: GObject.GEnum

Values that can be passed to the [vfunc`Gtk`.Widget.system_setting_changed] vfunc.

The values indicate which system setting has changed. Widgets may need to drop caches, or react otherwise.

Most of the values correspond to [class`Settings`] properties.

More values may be added over time.

DPI = 0

the [property`Gtk`.Settings:gtk-xft-dpi] setting has changed

FONT_NAME = 1

The [property`Gtk`.Settings:gtk-font-name] setting has changed

FONT_CONFIG = 2

The font configuration has changed in a way that requires text to be redrawn. This can be any of the [property`Gtk`.Settings:gtk-xft-antialias], [property`Gtk`.Settings:gtk-xft-hinting], [property`Gtk`.Settings:gtk-xft-hintstyle], [property`Gtk`.Settings:gtk-xft-rgba] or [property`Gtk`.Settings:gtk-fontconfig-timestamp] settings

DISPLAY = 3

The display has changed

ICON_THEME = 4

The icon theme has changed in a way that requires icons to be looked up again

class Gtk.TextDirection(value)

Bases: GObject.GEnum

Reading directions for text.

NONE = 0

No direction.

LTR = 1

Left to right text direction.

RTL = 2

Right to left text direction.

class Gtk.TextExtendSelection(value)

Bases: GObject.GEnum

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

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.

class Gtk.TextViewLayer(value)

Bases: GObject.GEnum

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

BELOW_TEXT = 0

The layer rendered below the text (but above the background).

ABOVE_TEXT = 1

The layer rendered above the text.

class Gtk.TextWindowType(value)

Bases: GObject.GEnum

Used to reference the parts of GtkTextView.

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.

class Gtk.TreeViewColumnSizing(value)

Bases: GObject.GEnum

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

GROW_ONLY = 0

Columns only get bigger in reaction to changes in the model

AUTOSIZE = 1

Columns resize to be the optimal size every time the model changes.

FIXED = 2

Columns are a fixed numbers of pixels wide.

class Gtk.TreeViewDropPosition(value)

Bases: GObject.GEnum

An enum for determining where a dropped row goes.

BEFORE = 0

dropped row is inserted before

AFTER = 1

dropped row is inserted after

INTO_OR_BEFORE = 2

dropped row becomes a child or is inserted before

INTO_OR_AFTER = 3

dropped row becomes a child or is inserted after

class Gtk.TreeViewGridLines(value)

Bases: GObject.GEnum

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

NONE = 0

No grid lines.

HORIZONTAL = 1

Horizontal grid lines.

VERTICAL = 2

Vertical grid lines.

BOTH = 3

Horizontal and vertical grid lines.

class Gtk.Unit(value)

Bases: GObject.GEnum

See also Gtk.PrintSettings.set_paper_width().

NONE = 0

No units.

POINTS = 1

Dimensions in points.

INCH = 2

Dimensions in inches.

MM = 3

Dimensions in millimeters

class Gtk.WrapMode(value)

Bases: GObject.GEnum

Describes a type of line wrapping.

NONE = 0

do not wrap lines; just make the text area wider

CHAR = 1

wrap text, breaking lines anywhere the cursor can appear (between characters, usually - if you want to be technical, between graphemes, see Pango.get_log_attrs())

WORD = 2

wrap text, breaking lines in between words

WORD_CHAR = 3

wrap text, breaking lines in between words, or if that is not enough, also between graphemes