Enums¶
Details¶
- class Gtk.Align(value)¶
Bases:
GObject.GEnum
Controls how a widget deals with extra space in a single (x or y) dimension.
Alignment only matters if the widget receives a “too large” allocation, for example if you packed the widget with the
Gtk.Widget
:expand
flag inside aGtk.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
andGtk.Align.END
are interpreted relative to text direction.Gtk.Align.BASELINE
support for it is optional for containers and widgets, and it is only supported for vertical alignment. When its not supported by a child or a container it is treated asGtk.Align.FILL
.- 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.
New in version 3.10.
- class Gtk.ArrowPlacement(value)¶
Bases:
GObject.GEnum
Used to specify the placement of scroll arrows in scrolling menus.
- BOTH = 0¶
Place one arrow on each end of the menu.
- START = 1¶
Place both arrows at the top of the menu.
- END = 2¶
Place both arrows at the bottom of the menu.
- 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.
New in version 2.10.
- class Gtk.AssistantPageType(value)¶
Bases:
GObject.GEnum
An enum for determining the page role inside the
Gtk.Assistant
. It’s 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
orGtk.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
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 verical space in the row is taller than the total requested height of the baseline-aligned children then it can use a
Gtk.BaselinePosition
to select where to put the baseline inside the extra availible space.New in version 3.10.
- 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
- SOLID = 1¶
A single line segment
- INSET = 2¶
Looks as if the content is sunken into the canvas
- OUTSET = 3¶
Looks as if the content is coming out of the canvas
- HIDDEN = 4¶
Same as
Gtk.BorderStyle.NONE
- 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
Gtk.Builder
.- INVALID_TYPE_FUNCTION = 0¶
A type-func attribute didn’t name a function that returns a
GObject.GType
.
- UNHANDLED_TAG = 1¶
The input contained a tag that
Gtk.Builder
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
- MISSING_ATTRIBUTE = 2¶
An attribute that is required by
Gtk.Builder
was missing.
- INVALID_ATTRIBUTE = 3¶
Gtk.Builder
found an attribute that it doesn’t understand.
- INVALID_TAG = 4¶
Gtk.Builder
found a tag that it doesn’t understand.
- MISSING_PROPERTY_VALUE = 5¶
A required property value was missing.
- INVALID_VALUE = 6¶
Gtk.Builder
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.ButtonBoxStyle(value)¶
Bases:
GObject.GEnum
Used to dictate the style that a
Gtk.ButtonBox
uses to layout the buttons it contains.- SPREAD = 1¶
Buttons are evenly spread across the box.
- EDGE = 2¶
Buttons are placed at the edges of the box.
- START = 3¶
Buttons are grouped towards the start of the box, (on the left for a HBox, or the top for a VBox).
- END = 4¶
Buttons are grouped towards the end of the box, (on the right for a HBox, or the bottom for a VBox).
- CENTER = 5¶
Buttons are centered in the box.
New in version 2.12.
- EXPAND = 6¶
Buttons expand to fill the box. This entails giving buttons a “linked” appearance, making button sizes homogeneous, and setting spacing to 0 (same as calling
Gtk.Box.set_homogeneous
() andGtk.Box.set_spacing
() manually).New in version 3.12.
- class Gtk.ButtonRole(value)¶
Bases:
GObject.GEnum
The role specifies the desired appearance of a
Gtk.ModelButton
.- NORMAL = 0¶
A plain button
- CHECK = 1¶
A check button
- RADIO = 2¶
A radio button
- class Gtk.ButtonsType(value)¶
Bases:
GObject.GEnum
Prebuilt sets of buttons for the dialog. If none of these choices are appropriate, simply use
Gtk.ButtonsType.NONE
then callGtk.Dialog.add_buttons
().Please note that
Gtk.ButtonsType.OK
,Gtk.ButtonsType.YES_NO
andGtk.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
Determines if the edited accelerators are GTK+ accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK+ are allowed, and the accelerators are rendered in the same way as they are in menus.
- 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.CornerType(value)¶
Bases:
GObject.GEnum
Specifies which corner a child widget should be placed in when packed into a
Gtk.ScrolledWindow
. 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.CssProviderError(value)¶
Bases:
GObject.GEnum
Error codes for %GTK_CSS_PROVIDER_ERROR.
- FAILED = 0¶
Failed.
- SYNTAX = 1¶
Syntax error.
- IMPORT = 2¶
Import error.
- NAME = 3¶
Name error.
- DEPRECATED = 4¶
Deprecation error.
- UNKNOWN_VALUE = 5¶
Unknown value.
- class Gtk.CssSectionType(value)¶
Bases:
GObject.GEnum
The different types of sections indicate parts of a CSS document as parsed by GTK’s CSS parser. They are oriented towards the CSS Grammar, but may contain extensions.
More types might be added in the future as the parser incorporates more features.
New in version 3.2.
- DOCUMENT = 0¶
The section describes a complete document. This section time is the only one where
Gtk.CssSection.get_parent
() might returnNone
.
- IMPORT = 1¶
The section defines an import rule.
- COLOR_DEFINITION = 2¶
The section defines a color. This is a GTK extension to CSS.
- BINDING_SET = 3¶
The section defines a binding set. This is a GTK extension to CSS.
- RULESET = 4¶
The section defines a CSS ruleset.
- SELECTOR = 5¶
The section defines a CSS selector.
- DECLARATION = 6¶
The section defines the declaration of a CSS variable.
- VALUE = 7¶
The section defines the value of a CSS declaration.
- KEYFRAMES = 8¶
- The section defines keyframes. See `CSS
Animations <http://dev.w3.org/csswg/css3-animations/#keyframes>`__ for details.
New in version 3.6.
- class Gtk.DeleteType(value)¶
Bases:
GObject.GEnum
See also:
Gtk.Entry
::delete-from-cursor
.- 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.
xlib.Display
-lines refers to the visible lines, with respect to 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.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.DragResult(value)¶
Bases:
GObject.GEnum
Gives an indication why a drag operation failed. The value can by obtained by connecting to the
Gtk.Widget
::drag-failed
signal.- SUCCESS = 0¶
The drag operation was successful.
- NO_TARGET = 1¶
No suitable drag target.
- USER_CANCELLED = 2¶
The user cancelled the drag operation.
- TIMEOUT_EXPIRED = 3¶
The drag operation timed out.
- GRAB_BROKEN = 4¶
The pointer or keyboard grab used for the drag operation was broken.
- ERROR = 5¶
The drag operation failed due to some unspecified error.
- class Gtk.EntryIconPosition(value)¶
Bases:
GObject.GEnum
Specifies the side of the entry at which an icon is placed.
New in version 2.16.
- 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
Gdk.EventSequence
in aGtk.Gesture
.New in version 3.14.
- 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.ExpanderStyle(value)¶
Bases:
GObject.GEnum
Used to specify the style of the expanders drawn by a
Gtk.TreeView
.- COLLAPSED = 0¶
The style used for a collapsed subtree.
- SEMI_COLLAPSED = 1¶
Intermediate style used during animation.
- SEMI_EXPANDED = 2¶
Intermediate style used during animation.
- EXPANDED = 3¶
The style used for an expanded subtree.
- class Gtk.FileChooserAction(value)¶
Bases:
GObject.GEnum
Describes whether a
Gtk.FileChooser
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.
- CREATE_FOLDER = 3¶
Indicates a mode for creating a new folder. The file chooser will let the user name an existing or new folder.
- class Gtk.FileChooserConfirmation(value)¶
Bases:
GObject.GEnum
Used as a return value of handlers for the
Gtk.FileChooser
::confirm-overwrite
signal of aGtk.FileChooser
. This value determines whether the file chooser will present the stock confirmation dialog, accept the user’s choice of a filename, or let the user choose another filename.New in version 2.8.
- CONFIRM = 0¶
The file chooser will present its stock dialog to confirm about overwriting an existing file.
- ACCEPT_FILENAME = 1¶
The file chooser will terminate and accept the user’s choice of a file name.
- SELECT_AGAIN = 2¶
The file chooser will continue running, so as to let the user select another file name.
- class Gtk.FileChooserError(value)¶
Bases:
GObject.GEnum
These identify the various errors that can occur while calling
Gtk.FileChooser
functions.- classmethod quark()[source]¶
- Returns:
The error quark used for
Gtk.FileChooser
errors.- Return type:
Registers an error quark for
Gtk.FileChooser
if necessary.New in version 2.4.
- 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.IMPreeditStyle(value)¶
Bases:
GObject.GEnum
Style for input method preedit. See also
Gtk.Settings
:gtk-im-preedit-style
Deprecated since version 3.10.
- NOTHING = 0¶
Deprecated
- CALLBACK = 1¶
Deprecated
- NONE = 2¶
Deprecated
- class Gtk.IMStatusStyle(value)¶
Bases:
GObject.GEnum
Style for input method status. See also
Gtk.Settings
:gtk-im-status-style
Deprecated since version 3.10.
- NOTHING = 0¶
Deprecated
- CALLBACK = 1¶
Deprecated
- NONE = 2¶
Deprecated
- class Gtk.IconSize(value)¶
Bases:
GObject.GEnum
Built-in stock icon sizes.
- classmethod from_name(name)[source]¶
- Parameters:
name (
str
) – the name to look up.- Returns:
the icon size (
Gtk.IconSize
)- Return type:
Looks up the icon size associated with name.
Deprecated since version 3.10: Use
Gtk.IconTheme
instead.
- classmethod get_name(size)[source]¶
- Parameters:
size (
int
) – aGtk.IconSize
.- Returns:
the name of the given icon size.
- Return type:
Gets the canonical name of the given icon size. The returned string is statically allocated and should not be freed.
Deprecated since version 3.10: Use
Gtk.IconTheme
instead.
- classmethod lookup(size)[source]¶
- Parameters:
size (
int
) – an icon size (Gtk.IconSize
)- Returns:
True
if size was a valid size- width:
location to store icon width
- height:
location to store icon height
- Return type:
Obtains the pixel size of a semantic icon size size:
Gtk.IconSize.MENU
,Gtk.IconSize.BUTTON
, etc. This function isn’t normally needed,Gtk.IconTheme.load_icon
() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned byGtk.IconSize.lookup
(), because themes are free to render the pixbuf however they like, including changing the usual size.
- classmethod lookup_for_settings(settings, size)[source]¶
- Parameters:
settings (
Gtk.Settings
) – aGtk.Settings
object, used to determine which set of user preferences to used.size (
int
) – an icon size (Gtk.IconSize
)
- Returns:
True
if size was a valid size- width:
location to store icon width
- height:
location to store icon height
- Return type:
Obtains the pixel size of a semantic icon size, possibly modified by user preferences for a particular
Gtk.Settings
. Normally size would beGtk.IconSize.MENU
,Gtk.IconSize.BUTTON
, etc. This function isn’t normally needed,Gtk.Widget.render_icon_pixbuf
() is the usual way to get an icon for rendering, then just look at the size of the rendered pixbuf. The rendered pixbuf may not even correspond to the width/height returned byGtk.IconSize.lookup
(), because themes are free to render the pixbuf however they like, including changing the usual size.New in version 2.2.
Deprecated since version 3.10: Use
Gtk.IconSize.lookup
() instead.
- classmethod register(name, width, height)[source]¶
- Parameters:
- Returns:
integer value representing the size (
Gtk.IconSize
)- Return type:
Registers a new icon size, along the same lines as
Gtk.IconSize.MENU
, etc. Returns the integer value for the size.Deprecated since version 3.10: Use
Gtk.IconTheme
instead.
- classmethod register_alias(alias, target)[source]¶
- Parameters:
alias (
str
) – an alias for targettarget (
int
) – an existing icon size (Gtk.IconSize
)
Registers alias as another name for target. So calling
Gtk.IconSize.from_name
() with alias as argument will return target.Deprecated since version 3.10: Use
Gtk.IconTheme
instead.
- INVALID = 0¶
Invalid size.
- MENU = 1¶
Size appropriate for menus (16px).
- SMALL_TOOLBAR = 2¶
Size appropriate for small toolbars (16px).
- LARGE_TOOLBAR = 3¶
Size appropriate for large toolbars (24px)
- BUTTON = 4¶
Size appropriate for buttons (16px)
- DND = 5¶
Size appropriate for drag and drop (32px)
- DIALOG = 6¶
Size appropriate for dialogs (48px)
- class Gtk.IconThemeError(value)¶
Bases:
GObject.GEnum
Error codes for
Gtk.IconTheme
operations.- 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¶
droppped 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
Gtk.Image
. If you want to get the image from the widget, you can only get the currently-stored representation. e.g. if theGtk.Image.get_storage_type
() returnsGtk.ImageType.PIXBUF
, then you can callGtk.Image.get_pixbuf
() but notGtk.Image.get_stock
(). For empty images, you can request any storage type (call any of the “get” functions), but they will all returnNone
values.- EMPTY = 0¶
there is no image displayed by the widget
- PIXBUF = 1¶
the widget contains a
GdkPixbuf.Pixbuf
- STOCK = 2¶
the widget contains a ‘stock item name [gtkstock]’
- ICON_SET = 3¶
the widget contains a
Gtk.IconSet
- ANIMATION = 4¶
the widget contains a
GdkPixbuf.PixbufAnimation
- ICON_NAME = 5¶
the widget contains a named icon. This image type was added in GTK+ 2.6
- SURFACE = 7¶
the widget contains a
cairo.Surface
. This image type was added in GTK+ 3.10
- 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
andGtk.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”.
New in version 3.6.
- 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.Justification(value)¶
Bases:
GObject.GEnum
Used for justifying the text inside a
Gtk.Label
widget. (See alsoGtk.Alignment
).- 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
Gtk.LevelBar
contents should be rendered. Note that this enumeration could be extended with additional modes in the future.New in version 3.6.
- 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.
New in version 3.0.
- 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.
New in version 3.12.
- LGPL_2_1_ONLY = 11¶
The GNU Lesser General Public License, version 2.1 only.
New in version 3.12.
- LGPL_3_0_ONLY = 12¶
The GNU Lesser General Public License, version 3.0 only.
New in version 3.12.
- AGPL_3_0 = 13¶
The GNU Affero General Public License, version 3.0 or later.
New in version 3.22.
- AGPL_3_0_ONLY = 14¶
The GNU Affero General Public License, version 3.0 only.
New in version 3.22.27.
- BSD_3 = 15¶
The 3-clause BSD licence.
New in version 3.24.20.
- APACHE_2_0 = 16¶
The Apache License, version 2.0.
New in version 3.24.20.
- MPL_2_0 = 17¶
The Mozilla Public License, version 2.0.
New in version 3.24.20.
- 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.
New in version 3.12.
- class Gtk.MenuDirectionType(value)¶
Bases:
GObject.GEnum
An enumeration representing directional movements within a menu.
- PARENT = 0¶
To the parent menu shell
- CHILD = 1¶
To the submenu, if any, associated with the item
- NEXT = 2¶
To the next menu item
- PREV = 3¶
To the previous menu item
- class Gtk.MessageType(value)¶
Bases:
GObject.GEnum
The type of message being displayed in the dialog.
- 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
- 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.NotebookTab(value)¶
Bases:
GObject.GEnum
- FIRST = 0¶
- LAST = 1¶
- 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.Orientation(value)¶
Bases:
GObject.GEnum
Represents the orientation of widgets and other objects which can be switched between horizontal and vertical orientation on the fly, like
Gtk.Toolbar
orGtk.GesturePan
.- HORIZONTAL = 0¶
The element is in horizontal orientation.
- VERTICAL = 1¶
The element is in vertical orientation.
- class Gtk.PackDirection(value)¶
Bases:
GObject.GEnum
Determines how widgets should be packed inside menubars and menuitems contained in menubars.
- LTR = 0¶
Widgets are packed left-to-right
- RTL = 1¶
Widgets are packed right-to-left
- TTB = 2¶
Widgets are packed top-to-bottom
- BTT = 3¶
Widgets are packed bottom-to-top
- class Gtk.PackType(value)¶
Bases:
GObject.GEnum
Represents the packing location
Gtk.Box
children. (See:Gtk.VBox
,Gtk.HBox
, andGtk.ButtonBox
).- START = 0¶
The child is packed into the start of the box
- END = 1¶
The child is packed into the end of the box
- 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_print_job_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
Gtk.GesturePan
New in version 3.14.
- LEFT = 0¶
panned towards the left
- RIGHT = 1¶
panned towards the right
- UP = 2¶
panned upwards
- DOWN = 3¶
panned downwards
- class Gtk.PathPriorityType(value)¶
Bases:
GObject.GEnum
Priorities for path lookups. See also
Gtk.BindingSet.add_path
().Deprecated since version 3.0.
- LOWEST = 0¶
Deprecated
- THEME = 10¶
Deprecated
- RC = 12¶
Deprecated
- HIGHEST = 15¶
Deprecated
- GTK = 4¶
Deprecated
- APPLICATION = 8¶
Deprecated
- class Gtk.PathType(value)¶
Bases:
GObject.GEnum
Widget path types. See also
Gtk.BindingSet.add_path
().Deprecated since version 3.0.
- WIDGET = 0¶
Deprecated
- WIDGET_CLASS = 1¶
Deprecated
- CLASS = 2¶
Deprecated
- 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
Gtk.TreeView
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.
New in version 3.16.
- class Gtk.PopoverConstraint(value)¶
Bases:
GObject.GEnum
Describes constraints to positioning of popovers. More values may be added to this enumeration in the future.
New in version 3.20.
- NONE = 0¶
Don’t constrain the popover position beyond what is imposed by the implementation
- WINDOW = 1¶
Constrain the popover to the boundaries of the window that it is attached to
- class Gtk.PositionType(value)¶
Bases:
GObject.GEnum
Describes which edge of a widget a certain feature is positioned at, e.g. the tabs of a
Gtk.Notebook
, the handle of aGtk.HandleBox
or the label of aGtk.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
Gtk.PrintOperation
errors.- Return type:
Registers an error quark for
Gtk.PrintOperation
if necessary.New in version 2.10.
- 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
The action parameter to
Gtk.PrintOperation.run
() determines what action the print operation should perform.- 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
A value of this type is returned by
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_print_job_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.PropagationPhase(value)¶
Bases:
GObject.GEnum
Describes the stage at which events are fed into a
Gtk.EventController
.New in version 3.14.
- NONE = 0¶
Events are not delivered automatically. Those can be manually fed through
Gtk.EventController.handle_event
(). This should only be used when full control about when, or whether the controller handles the event is needed.
- 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.RcTokenType(value)¶
Bases:
GObject.GEnum
The
Gtk.RcTokenType
enumeration represents the tokens in the RC file. It is exposed so that theme engines can reuse these tokens when parsing the theme-engine specific portions of a RC file.Deprecated since version 3.0: Use
Gtk.CssProvider
instead.- INVALID = 270¶
Deprecated
- INCLUDE = 271¶
Deprecated
- NORMAL = 272¶
Deprecated
- ACTIVE = 273¶
Deprecated
- PRELIGHT = 274¶
Deprecated
- SELECTED = 275¶
Deprecated
- INSENSITIVE = 276¶
Deprecated
- FG = 277¶
Deprecated
- BG = 278¶
Deprecated
- TEXT = 279¶
Deprecated
- BASE = 280¶
Deprecated
- XTHICKNESS = 281¶
Deprecated
- YTHICKNESS = 282¶
Deprecated
- FONT = 283¶
Deprecated
- FONTSET = 284¶
Deprecated
- FONT_NAME = 285¶
Deprecated
- BG_PIXMAP = 286¶
Deprecated
- PIXMAP_PATH = 287¶
Deprecated
- STYLE = 288¶
Deprecated
- BINDING = 289¶
Deprecated
- BIND = 290¶
Deprecated
- WIDGET = 291¶
Deprecated
- WIDGET_CLASS = 292¶
Deprecated
- CLASS = 293¶
Deprecated
- LOWEST = 294¶
Deprecated
- GTK = 295¶
Deprecated
- APPLICATION = 296¶
Deprecated
- THEME = 297¶
Deprecated
- RC = 298¶
Deprecated
- HIGHEST = 299¶
Deprecated
- ENGINE = 300¶
Deprecated
- MODULE_PATH = 301¶
Deprecated
- IM_MODULE_PATH = 302¶
Deprecated
- IM_MODULE_FILE = 303¶
Deprecated
- STOCK = 304¶
Deprecated
- LTR = 305¶
Deprecated
- RTL = 306¶
Deprecated
- COLOR = 307¶
Deprecated
- UNBIND = 308¶
Deprecated
- LAST = 309¶
Deprecated
- class Gtk.RecentChooserError(value)¶
Bases:
GObject.GEnum
These identify the various errors that can occur while calling
Gtk.RecentChooser
functions.New in version 2.10.
- NOT_FOUND = 0¶
Indicates that a file does not exist
- INVALID_URI = 1¶
Indicates a malformed URI
- class Gtk.RecentManagerError(value)¶
Bases:
GObject.GEnum
Error codes for
Gtk.RecentManager
operationsNew in version 2.10.
- 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.RecentSortType(value)¶
Bases:
GObject.GEnum
Used to specify the sorting method to be applyed to the recently used resource list.
New in version 2.10.
- NONE = 0¶
Do not sort the returned list of recently used resources.
- MRU = 1¶
Sort the returned list with the most recently used items first.
- LRU = 2¶
Sort the returned list with the least recently used items first.
- CUSTOM = 3¶
Sort the returned list using a custom sorting function passed using
Gtk.RecentChooser.set_sort_func
().
- class Gtk.ReliefStyle(value)¶
Bases:
GObject.GEnum
Indicated the relief to be drawn around a
Gtk.Button
.- NORMAL = 0¶
Draw a normal relief.
- HALF = 1¶
A half relief. Deprecated in 3.14, does the same as
Gtk.ReliefStyle.NORMAL
- NONE = 2¶
No relief.
- class Gtk.ResizeMode(value)¶
Bases:
GObject.GEnum
- PARENT = 0¶
Pass resize request to the parent
- QUEUE = 1¶
Queue resizes on this widget
- IMMEDIATE = 2¶
Resize immediately. Deprecated.
- 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
Gtk.Revealer
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
- class Gtk.ScrollStep(value)¶
Bases:
GObject.GEnum
- 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 stepper arrows at the end of range widgets.
- AUTO = 0¶
The arrow is made insensitive if the thumb is at the end
- ON = 1¶
The arrow is always sensitive
- OFF = 2¶
The arrow is always insensitive
- class Gtk.ShadowType(value)¶
Bases:
GObject.GEnum
Used to change the appearance of an outline typically provided by a
Gtk.Frame
.Note that many themes do not differentiate the appearance of the various shadow types: Either their is no visible shadow (
Gtk.ShadowType.NONE
), or there is (any other value).- NONE = 0¶
No outline.
- IN = 1¶
The outline is bevelled inwards.
- OUT = 2¶
The outline is bevelled outwards like a button.
- ETCHED_IN = 3¶
The outline has a sunken 3d appearance.
- ETCHED_OUT = 4¶
The outline has a raised 3d appearance.
- 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.New in version 3.20.
- 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.
- 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.SpinButtonUpdatePolicy(value)¶
Bases:
GObject.GEnum
The spin button update policy determines whether the spin button displays values even if they are outside the bounds of its adjustment. See
Gtk.SpinButton.set_update_policy
().- ALWAYS = 0¶
When refreshing your
Gtk.SpinButton
, the value is always displayed
- IF_VALID = 1¶
When refreshing your
Gtk.SpinButton
, 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 inGtk.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
These enumeration values describe the possible transitions between pages in a
Gtk.Stack
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.
New in version 3.12.
- OVER_RIGHT = 11¶
Cover the old page by sliding to the right.
New in version 3.12.
- UNDER_UP = 12¶
Uncover the new page by sliding up.
New in version 3.12.
- UNDER_DOWN = 13¶
Uncover the new page by sliding down.
New in version 3.12.
- UNDER_LEFT = 14¶
Uncover the new page by sliding to the left.
New in version 3.12.
- UNDER_RIGHT = 15¶
Uncover the new page by sliding to the right.
New in version 3.12.
- OVER_UP_DOWN = 16¶
Cover the old page sliding up or uncover the new page sliding down, according to order.
New in version 3.12.
- OVER_DOWN_UP = 17¶
Cover the old page sliding down or uncover the new page sliding up, according to order.
New in version 3.14.
- OVER_LEFT_RIGHT = 18¶
Cover the old page sliding left or uncover the new page sliding right, according to order.
New in version 3.14.
- OVER_RIGHT_LEFT = 19¶
Cover the old page sliding right or uncover the new page sliding left, according to order.
New in version 3.14.
- SLIDE_RIGHT = 2¶
Slide from left to right
- 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.
New in version 3.12.
- OVER_DOWN = 9¶
Cover the old page by sliding down.
New in version 3.12.
- class Gtk.StateType(value)¶
Bases:
GObject.GEnum
This type indicates the current state of a widget; the state determines how the widget is drawn. The
Gtk.StateType
enumeration is also used to identify different colors in aGtk.Style
for drawing, so states can be used for subparts of a widget as well as entire widgets.Deprecated since version 3.14: All APIs that are using this enumeration have been deprecated in favor of alternatives using
Gtk.StateFlags
.- NORMAL = 0¶
State during normal operation.
- ACTIVE = 1¶
State of a currently active widget, such as a depressed button.
- PRELIGHT = 2¶
State indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks.
- SELECTED = 3¶
State of a selected item, such the selected row in a list.
- INSENSITIVE = 4¶
State indicating that the widget is unresponsive to user actions.
- INCONSISTENT = 5¶
The widget is inconsistent, such as checkbuttons or radiobuttons that aren’t either set to
True
norFalse
, or buttons requiring the user attention.
- FOCUSED = 6¶
The widget has the keyboard focus.
- class Gtk.TextBufferTargetInfo(value)¶
Bases:
GObject.GEnum
These values are used as “info” for the targets contained in the lists returned by
Gtk.TextBuffer.get_copy_target_list
() andGtk.TextBuffer.get_paste_target_list
().The values counts down from
-1
to avoid clashes with application added drag destinations which usually start at 0.- BUFFER_CONTENTS = -1¶
Buffer contents
- RICH_TEXT = -2¶
Rich text
- TEXT = -3¶
Text
- 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
Gtk.TextView
::extend-selection
signal to customize the selection.New in version 3.16.
- 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
Gtk.TextView
for the purpose of customized drawing with the ::draw_layer vfunc.- BELOW = 0¶
Old deprecated layer, use
Gtk.TextViewLayer.BELOW_TEXT
instead
- ABOVE = 1¶
Old deprecated layer, use
Gtk.TextViewLayer.ABOVE_TEXT
instead
- BELOW_TEXT = 2¶
The layer rendered below the text (but above the background).
New in version 3.20.
- ABOVE_TEXT = 3¶
The layer rendered above the text.
New in version 3.20.
- class Gtk.TextWindowType(value)¶
Bases:
GObject.GEnum
Used to reference the parts of
Gtk.TextView
.- PRIVATE = 0¶
Invalid value, used as a marker
- 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.ToolbarSpaceStyle(value)¶
Bases:
GObject.GEnum
Whether spacers are vertical lines or just blank.
Deprecated since version 3.20.
- EMPTY = 0¶
Use blank spacers.
- LINE = 1¶
Use vertical lines for spacers.
- class Gtk.ToolbarStyle(value)¶
Bases:
GObject.GEnum
Used to customize the appearance of a
Gtk.Toolbar
. Note that setting the toolbar style overrides the user’s preferences for the default toolbar style. Note that if the button has only a label set andGtk.ToolbarStyle.ICONS
is used, the label will be visible, and vice versa.- ICONS = 0¶
Buttons display only icons in the toolbar.
- TEXT = 1¶
Buttons display only text labels in the toolbar.
- BOTH = 2¶
Buttons display text and icons in the toolbar.
- BOTH_HORIZ = 3¶
Buttons display icons and text alongside each other, rather than vertically stacked
- 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 everytime 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.WidgetHelpType(value)¶
Bases:
GObject.GEnum
Kinds of widget-specific help. Used by the
::show-help
signal.- TOOLTIP = 0¶
Tooltip.
- WHATS_THIS = 1¶
What’s this.
- class Gtk.WindowPosition(value)¶
Bases:
GObject.GEnum
Window placement can be influenced using this enumeration. Note that using
Gtk.WindowPosition.CENTER_ALWAYS
is almost always a bad idea. It won’t necessarily work well with all window managers or on all windowing systems.- NONE = 0¶
No influence is made on placement.
- CENTER = 1¶
Windows should be placed in the center of the screen.
- MOUSE = 2¶
Windows should be placed at the current mouse position.
- CENTER_ALWAYS = 3¶
Keep window centered as it changes size, etc.
- CENTER_ON_PARENT = 4¶
Center the window on its transient parent (see
Gtk.Window.set_transient_for
()).
- class Gtk.WindowType(value)¶
Bases:
GObject.GEnum
A
Gtk.Window
can be one of these types. Most things you’d consider a “window” should have typeGtk.WindowType.TOPLEVEL
; windows with this type are managed by the window manager and have a frame by default (callGtk.Window.set_decorated
() to toggle the frame). Windows with typeGtk.WindowType.POPUP
are ignored by the window manager; window manager keybindings won’t work on them, the window manager won’t decorate the window with a frame, many GTK+ features that rely on the window manager will not work (e.g. resize grips and maximization/minimization).Gtk.WindowType.POPUP
is used to implement widgets such asGtk.Menu
or tooltips that you normally don’t think of as windows per se. Nearly all windows should beGtk.WindowType.TOPLEVEL
. In particular, do not useGtk.WindowType.POPUP
just to turn off the window borders; useGtk.Window.set_decorated
() for that.- TOPLEVEL = 0¶
A regular window, such as a dialog.
- POPUP = 1¶
A special window such as a tooltip.
- 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