@react-gnome/gjs-esm-types
Version:
TypeScript module declarations for GJS ESM modules.
2,229 lines (2,170 loc) • 4.69 MB
TypeScript
/*
* Type Definitions for Gjs (https://gjs.guide/)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in ts-for-gir itself or create a bug report on https://github.com/gjsify/ts-for-gjs
*/
import type Gsk from "gi://Gsk?version=4.0";
import type Graphene from "gi://Graphene?version=1.0";
import type GObject from "gi://GObject?version=2.0";
import type GLib from "gi://GLib?version=2.0";
import type Gdk from "gi://Gdk?version=4.0";
import type cairo from "gi://cairo?version=1.0";
import type PangoCairo from "gi://PangoCairo?version=1.0";
import type Pango from "gi://Pango?version=1.0";
import type HarfBuzz from "gi://HarfBuzz?version=0.0";
import type freetype2 from "gi://freetype2?version=2.0";
import type Gio from "gi://Gio?version=2.0";
import type GdkPixbuf from "gi://GdkPixbuf?version=2.0";
import type GModule from "gi://GModule?version=2.0";
declare module "gi://Gtk?version=4.0" {
/**
* The possible values for the %GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE
* accessible property.
*/
enum AccessibleAutocomplete {
/**
* Automatic suggestions are not displayed.
*/
NONE,
/**
* When a user is providing input, text
* suggesting one way to complete the provided input may be dynamically
* inserted after the caret.
*/
INLINE,
/**
* When a user is providing input, an element
* containing a collection of values that could complete the provided input
* may be displayed.
*/
LIST,
/**
* 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.
*/
BOTH,
}
/**
* The possible values for the %GTK_ACCESSIBLE_STATE_INVALID
* accessible state.
*
* Note that the %GTK_ACCESSIBLE_INVALID_FALSE and
* %GTK_ACCESSIBLE_INVALID_TRUE have the same values
* as %FALSE and %TRUE.
*/
enum AccessibleInvalidState {
/**
* There are no detected errors in the value
*/
FALSE,
/**
* The value entered by the user has failed validation
*/
TRUE,
/**
* A grammatical error was detected
*/
GRAMMAR,
/**
* A spelling error was detected
*/
SPELLING,
}
/**
* The possible accessible properties of a [iface`Accessible]`.
*/
enum AccessibleProperty {
/**
* 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]`
*/
AUTOCOMPLETE,
/**
* Defines a string value that describes
* or annotates the current element. Value type: string
*/
DESCRIPTION,
/**
* Indicates the availability and type of
* interactive popup element, such as menu or dialog, that can be triggered
* by an element.
*/
HAS_POPUP,
/**
* Indicates keyboard shortcuts that an
* author has implemented to activate or give focus to an element. Value type:
* string
*/
KEY_SHORTCUTS,
/**
* Defines a string value that labels the current
* element. Value type: string
*/
LABEL,
/**
* Defines the hierarchical level of an element
* within a structure. Value type: integer
*/
LEVEL,
/**
* Indicates whether an element is modal when
* displayed. Value type: boolean
*/
MODAL,
/**
* Indicates whether a text box accepts
* multiple lines of input or only a single line. Value type: boolean
*/
MULTI_LINE,
/**
* Indicates that the user may select
* more than one item from the current selectable descendants. Value type:
* boolean
*/
MULTI_SELECTABLE,
/**
* Indicates whether the element's
* orientation is horizontal, vertical, or unknown/ambiguous. Value type:
* [enum`Orientation]`
*/
ORIENTATION,
/**
* 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
*/
PLACEHOLDER,
/**
* Indicates that the element is not editable,
* but is otherwise operable. Value type: boolean
*/
READ_ONLY,
/**
* Indicates that user input is required on
* the element before a form may be submitted. Value type: boolean
*/
REQUIRED,
/**
* Defines a human-readable,
* author-localized description for the role of an element. Value type: string
*/
ROLE_DESCRIPTION,
/**
* Indicates if items in a table or grid are
* sorted in ascending or descending order. Value type: [enum`AccessibleSort]`
*/
SORT,
/**
* Defines the maximum allowed value for a
* range widget. Value type: double
*/
VALUE_MAX,
/**
* Defines the minimum allowed value for a
* range widget. Value type: double
*/
VALUE_MIN,
/**
* Defines the current value for a range widget.
* Value type: double
*/
VALUE_NOW,
/**
* Defines the human readable text alternative
* of aria-valuenow for a range widget. Value type: string
*/
VALUE_TEXT,
}
/**
* The possible accessible relations of a [iface`Accessible]`.
*
* Accessible relations can be references to other widgets,
* integers or strings.
*/
enum AccessibleRelation {
/**
* Identifies the currently active
* element when focus is on a composite widget, combobox, textbox, group,
* or application. Value type: reference
*/
ACTIVE_DESCENDANT,
/**
* Defines the total number of columns
* in a table, grid, or treegrid. Value type: integer
*/
COL_COUNT,
/**
* 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,
/**
* Defines a human readable text
* alternative of %GTK_ACCESSIBLE_RELATION_COL_INDEX. Value type: string
*/
COL_INDEX_TEXT,
/**
* Defines the number of columns spanned
* by a cell or gridcell within a table, grid, or treegrid. Value type: integer
*/
COL_SPAN,
/**
* Identifies the element (or elements) whose
* contents or presence are controlled by the current element. Value type: reference
*/
CONTROLS,
/**
* Identifies the element (or elements)
* that describes the object. Value type: reference
*/
DESCRIBED_BY,
/**
* Identifies the element (or elements) that
* provide additional information related to the object. Value type: reference
*/
DETAILS,
/**
* Identifies the element that provides
* an error message for an object. Value type: reference
*/
ERROR_MESSAGE,
/**
* 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
*/
FLOW_TO,
/**
* Identifies the element (or elements)
* that labels the current element. Value type: reference
*/
LABELLED_BY,
/**
* 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
*/
OWNS,
/**
* Defines an element's number or position
* in the current set of listitems or treeitems. Value type: integer
*/
POS_IN_SET,
/**
* Defines the total number of rows in a table,
* grid, or treegrid. Value type: integer
*/
ROW_COUNT,
/**
* 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,
/**
* Defines a human readable text
* alternative of aria-rowindex. Value type: string
*/
ROW_INDEX_TEXT,
/**
* Defines the number of rows spanned by a
* cell or gridcell within a table, grid, or treegrid. Value type: integer
*/
ROW_SPAN,
/**
* Defines the number of items in the current
* set of listitems or treeitems. Value type: integer
*/
SET_SIZE,
}
/**
* 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.
*/
enum AccessibleRole {
/**
* An element with important, and usually
* time-sensitive, information
*/
ALERT,
/**
* A type of dialog that contains an
* alert message
*/
ALERT_DIALOG,
/**
* Unused
*/
BANNER,
/**
* An input element that allows for
* user-triggered actions when clicked or pressed
*/
BUTTON,
/**
* Unused
*/
CAPTION,
/**
* Unused
*/
CELL,
/**
* A checkable input element that has
* three possible values: `true`, `false`, or `mixed`
*/
CHECKBOX,
/**
* A header in a columned list.
*/
COLUMN_HEADER,
/**
* 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
*/
COMBO_BOX,
/**
* Abstract role.
*/
COMMAND,
/**
* Abstract role.
*/
COMPOSITE,
/**
* 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.
*/
DIALOG,
/**
* Unused
*/
DOCUMENT,
/**
* Unused
*/
FEED,
/**
* Unused
*/
FORM,
/**
* Unused
*/
GENERIC,
/**
* A grid of items.
*/
GRID,
/**
* An item in a grid or tree grid.
*/
GRID_CELL,
/**
* An element that groups multiple widgets. GTK uses
* this role for various containers, like [class`Box]`, [class`Viewport]`, and [class`HeaderBar]`.
*/
GROUP,
/**
* Unused
*/
HEADING,
/**
* An image.
*/
IMG,
/**
* Abstract role.
*/
INPUT,
/**
* A visible name or caption for a user interface component.
*/
LABEL,
/**
* Abstract role.
*/
LANDMARK,
/**
* Unused
*/
LEGEND,
/**
* A clickable link.
*/
LINK,
/**
* A list of items.
*/
LIST,
/**
* Unused.
*/
LIST_BOX,
/**
* An item in a list.
*/
LIST_ITEM,
/**
* Unused
*/
LOG,
/**
* Unused
*/
MAIN,
/**
* Unused
*/
MARQUEE,
/**
* Unused
*/
MATH,
/**
* An element that represents a value within a known range.
*/
METER,
/**
* A menu.
*/
MENU,
/**
* A menubar.
*/
MENU_BAR,
/**
* An item in a menu.
*/
MENU_ITEM,
/**
* A check item in a menu.
*/
MENU_ITEM_CHECKBOX,
/**
* A radio item in a menu.
*/
MENU_ITEM_RADIO,
/**
* Unused
*/
NAVIGATION,
/**
* An element that is not represented to accessibility technologies.
*/
NONE,
/**
* Unused
*/
NOTE,
/**
* Unused
*/
OPTION,
/**
* An element that is not represented to accessibility technologies.
*/
PRESENTATION,
/**
* An element that displays the progress
* status for tasks that take a long time.
*/
PROGRESS_BAR,
/**
* A checkable input in a group of radio roles,
* only one of which can be checked at a time.
*/
RADIO,
/**
* Unused
*/
RADIO_GROUP,
/**
* Abstract role.
*/
RANGE,
/**
* Unused
*/
REGION,
/**
* A row in a columned list.
*/
ROW,
/**
* Unused
*/
ROW_GROUP,
/**
* Unused
*/
ROW_HEADER,
/**
* 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.
*/
SCROLLBAR,
/**
* Unused
*/
SEARCH,
/**
* A type of textbox intended for specifying
* search criteria.
*/
SEARCH_BOX,
/**
* Abstract role.
*/
SECTION,
/**
* Abstract role.
*/
SECTION_HEAD,
/**
* Abstract role.
*/
SELECT,
/**
* A divider that separates and distinguishes
* sections of content or groups of menuitems.
*/
SEPARATOR,
/**
* A user input where the user selects a value
* from within a given range.
*/
SLIDER,
/**
* A form of range that expects the user to
* select from among discrete choices.
*/
SPIN_BUTTON,
/**
* Unused
*/
STATUS,
/**
* Abstract role.
*/
STRUCTURE,
/**
* A type of checkbox that represents on/off values,
* as opposed to checked/unchecked values.
*/
SWITCH,
/**
* An item in a list of tab used for switching pages.
*/
TAB,
/**
* Unused
*/
TABLE,
/**
* A list of tabs for switching pages.
*/
TAB_LIST,
/**
* A page in a notebook or stack.
*/
TAB_PANEL,
/**
* A type of input that allows free-form text
* as its value.
*/
TEXT_BOX,
/**
* Unused
*/
TIME,
/**
* Unused
*/
TIMER,
/**
* Unused
*/
TOOLBAR,
/**
* Unused
*/
TOOLTIP,
/**
* Unused
*/
TREE,
/**
* A treeview-like, columned list.
*/
TREE_GRID,
/**
* Unused
*/
TREE_ITEM,
/**
* An interactive component of a graphical user
* interface. This is the role that GTK uses by default for widgets.
*/
WIDGET,
/**
* An application window.
*/
WINDOW,
}
/**
* The possible values for the %GTK_ACCESSIBLE_PROPERTY_SORT
* accessible property.
*/
enum AccessibleSort {
/**
* There is no defined sort applied to the column.
*/
NONE,
/**
* Items are sorted in ascending order by this column.
*/
ASCENDING,
/**
* Items are sorted in descending order by this column.
*/
DESCENDING,
/**
* A sort algorithm other than ascending or
* descending has been applied.
*/
OTHER,
}
/**
* The possible accessible states of a [iface`Accessible]`.
*/
enum AccessibleState {
/**
* A “busy” state. This state has boolean values
*/
BUSY,
/**
* A “checked” state; indicates the current
* state of a [class`CheckButton]`. Value type: [enum`AccessibleTristate]`
*/
CHECKED,
/**
* 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
*/
DISABLED,
/**
* An “expanded” state; corresponds to the
* [property`Expander:`expanded] property. Value type: boolean
* or undefined
*/
EXPANDED,
/**
* 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_ACCESSIBLE_STATE_DISABLED
*/
HIDDEN,
/**
* An “invalid” state; set when a widget
* is showing an error. Value type: [enum`AccessibleInvalidState]`
*/
INVALID,
/**
* A “pressed” state; indicates the current
* state of a [class`ToggleButton]`. Value type: [enum`AccessibleTristate]`
* enumeration
*/
PRESSED,
/**
* A “selected” state; set when a widget
* is selected. Value type: boolean or undefined
*/
SELECTED,
}
/**
* The possible values for the %GTK_ACCESSIBLE_STATE_PRESSED
* accessible state.
*
* Note that the %GTK_ACCESSIBLE_TRISTATE_FALSE and
* %GTK_ACCESSIBLE_TRISTATE_TRUE have the same values
* as %FALSE and %TRUE.
*/
enum AccessibleTristate {
/**
* The state is `false`
*/
FALSE,
/**
* The state is `true`
*/
TRUE,
/**
* The state is `mixed`
*/
MIXED,
}
/**
* 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.
*
* %GTK_ALIGN_BASELINE support is optional for containers and widgets, and
* it is only supported for vertical alignment. When it's not supported by
* a child or a container it is treated as %GTK_ALIGN_FILL.
*/
enum Align {
/**
* stretch to fill all space if possible, center if
* no meaningful way to stretch
*/
FILL,
/**
* snap to left or top side, leaving space on right or bottom
*/
START,
/**
* snap to right or bottom side, leaving space on left or top
*/
END,
/**
* center natural width of widget inside the allocation
*/
CENTER,
/**
* align the widget according to the baseline.
* See [class`Gtk`.Widget].
*/
BASELINE,
}
/**
* Used to indicate the direction in which an arrow should point.
*/
enum ArrowType {
/**
* Represents an upward pointing arrow.
*/
UP,
/**
* Represents a downward pointing arrow.
*/
DOWN,
/**
* Represents a left pointing arrow.
*/
LEFT,
/**
* Represents a right pointing arrow.
*/
RIGHT,
/**
* No arrow.
*/
NONE,
}
/**
* 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_ASSISTANT_PAGE_CONFIRM, %GTK_ASSISTANT_PAGE_SUMMARY or
* %GTK_ASSISTANT_PAGE_PROGRESS to be correct.
*
* The Cancel button will only be shown if the page isn’t “committed”.
* See gtk_assistant_commit() for details.
*/
enum AssistantPageType {
/**
* The page has regular contents. Both the
* Back and forward buttons will be shown.
*/
CONTENT,
/**
* The page contains an introduction to the
* assistant task. Only the Forward button will be shown if there is a
* next page.
*/
INTRO,
/**
* The page lets the user confirm or deny the
* changes. The Back and Apply buttons will be shown.
*/
CONFIRM,
/**
* The page informs the user of the changes
* done. Only the Close button will be shown.
*/
SUMMARY,
/**
* 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.
*/
PROGRESS,
/**
* 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().
*/
CUSTOM,
}
/**
* 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.
*/
enum BaselinePosition {
/**
* Align the baseline at the top
*/
TOP,
/**
* Center the baseline
*/
CENTER,
/**
* Align the baseline at the bottom
*/
BOTTOM,
}
/**
* Describes how the border of a UI element should be rendered.
*/
enum BorderStyle {
/**
* No visible border
*/
NONE,
/**
* Same as %GTK_BORDER_STYLE_NONE
*/
HIDDEN,
/**
* A single line segment
*/
SOLID,
/**
* Looks as if the content is sunken into the canvas
*/
INSET,
/**
* Looks as if the content is coming out of the canvas
*/
OUTSET,
/**
* A series of round dots
*/
DOTTED,
/**
* A series of square-ended dashes
*/
DASHED,
/**
* Two parallel lines with some space between them
*/
DOUBLE,
/**
* Looks as if it were carved in the canvas
*/
GROOVE,
/**
* Looks as if it were coming out of the canvas
*/
RIDGE,
}
/**
* Error codes that identify various errors that can occur while using
* `GtkBuilder`.
*/
enum BuilderError {
/**
* A type-func attribute didn’t name
* a function that returns a `GType`.
*/
INVALID_TYPE_FUNCTION,
/**
* The input contained a tag that `GtkBuilder`
* can’t handle.
*/
UNHANDLED_TAG,
/**
* An attribute that is required by
* `GtkBuilder` was missing.
*/
MISSING_ATTRIBUTE,
/**
* `GtkBuilder` found an attribute that
* it doesn’t understand.
*/
INVALID_ATTRIBUTE,
/**
* `GtkBuilder` found a tag that
* it doesn’t understand.
*/
INVALID_TAG,
/**
* A required property value was
* missing.
*/
MISSING_PROPERTY_VALUE,
/**
* `GtkBuilder` couldn’t parse
* some attribute value.
*/
INVALID_VALUE,
/**
* The input file requires a newer version
* of GTK.
*/
VERSION_MISMATCH,
/**
* An object id occurred twice.
*/
DUPLICATE_ID,
/**
* A specified object type is of the same type or
* derived from the type of the composite class being extended with builder XML.
*/
OBJECT_TYPE_REFUSED,
/**
* The wrong type was specified in a composite class’s template XML
*/
TEMPLATE_MISMATCH,
/**
* The specified property is unknown for the object class.
*/
INVALID_PROPERTY,
/**
* The specified signal is unknown for the object class.
*/
INVALID_SIGNAL,
/**
* An object id is unknown.
*/
INVALID_ID,
/**
* 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.
*/
INVALID_FUNCTION,
}
/**
* Prebuilt sets of buttons for `GtkDialog`.
*
* If none of these choices are appropriate, simply use
* %GTK_BUTTONS_NONE and call [method`Gtk`.Dialog.add_buttons].
*
* > Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO
* > and %GTK_BUTTONS_OK_CANCEL are discouraged by the
* > [GNOME Human Interface Guidelines](http://library.gnome.org/devel/hig-book/stable/).
*/
enum ButtonsType {
/**
* no buttons at all
*/
NONE,
/**
* an OK button
*/
OK,
/**
* a Close button
*/
CLOSE,
/**
* a Cancel button
*/
CANCEL,
/**
* Yes and No buttons
*/
YES_NO,
/**
* OK and Cancel buttons
*/
OK_CANCEL,
}
/**
* The available modes for [property`Gtk`.CellRendererAccel:accel-mode].
*/
enum CellRendererAccelMode {
/**
* GTK accelerators mode
*/
GTK,
/**
* Other accelerator mode
*/
OTHER,
}
/**
* Identifies how the user can interact with a particular cell.
*/
enum CellRendererMode {
/**
* 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.
*/
INERT,
/**
* The cell can be clicked.
*/
ACTIVATABLE,
/**
* The cell can be edited or otherwise modified.
*/
EDITABLE,
}
/**
* The widget attributes that can be used when creating a [class`Constraint]`.
*/
enum ConstraintAttribute {
/**
* No attribute, used for constant
* relations
*/
NONE,
/**
* The left edge of a widget, regardless of
* text direction
*/
LEFT,
/**
* The right edge of a widget, regardless
* of text direction
*/
RIGHT,
/**
* The top edge of a widget
*/
TOP,
/**
* The bottom edge of a widget
*/
BOTTOM,
/**
* The leading edge of a widget, depending
* on text direction; equivalent to %GTK_CONSTRAINT_ATTRIBUTE_LEFT for LTR
* languages, and %GTK_CONSTRAINT_ATTRIBUTE_RIGHT for RTL ones
*/
START,
/**
* The trailing edge of a widget, depending
* on text direction; equivalent to %GTK_CONSTRAINT_ATTRIBUTE_RIGHT for LTR
* languages, and %GTK_CONSTRAINT_ATTRIBUTE_LEFT for RTL ones
*/
END,
/**
* The width of a widget
*/
WIDTH,
/**
* The height of a widget
*/
HEIGHT,
/**
* The center of a widget, on the
* horizontal axis
*/
CENTER_X,
/**
* The center of a widget, on the
* vertical axis
*/
CENTER_Y,
/**
* The baseline of a widget
*/
BASELINE,
}
/**
* The relation between two terms of a constraint.
*/
enum ConstraintRelation {
/**
* Less than, or equal
*/
LE,
/**
* Equal
*/
EQ,
/**
* Greater than, or equal
*/
GE,
}
/**
* 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.
*/
enum ConstraintStrength {
/**
* The constraint is required towards solving the layout
*/
REQUIRED,
/**
* A strong constraint
*/
STRONG,
/**
* A medium constraint
*/
MEDIUM,
/**
* A weak constraint
*/
WEAK,
}
/**
* Domain for VFL parsing errors.
*/
enum ConstraintVflParserError {
/**
* Invalid or unknown symbol
*/
SYMBOL,
/**
* Invalid or unknown attribute
*/
ATTRIBUTE,
/**
* Invalid or unknown view
*/
VIEW,
/**
* Invalid or unknown metric
*/
METRIC,
/**
* Invalid or unknown priority
*/
PRIORITY,
/**
* Invalid or unknown relation
*/
RELATION,
}
/**
* Controls how a content should be made to fit inside an allocation.
*/
enum ContentFit {
/**
* 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.
*/
FILL,
/**
* 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.
*/
CONTAIN,
/**
* 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.
*/
COVER,
/**
* The content is scaled down to fit the
* allocation, if needed, otherwise its original size is used.
*/
SCALE_DOWN,
}
/**
* 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.
*/
enum CornerType {
/**
* Place the scrollbars on the right and bottom of the
* widget (default behaviour).
*/
TOP_LEFT,
/**
* Place the scrollbars on the top and right of the
* widget.
*/
BOTTOM_LEFT,
/**
* Place the scrollbars on the left and bottom of the
* widget.
*/
TOP_RIGHT,
/**
* Place the scrollbars on the top and left of the
* widget.
*/
BOTTOM_RIGHT,
}
/**
* Errors that can occur while parsing CSS.
*
* These errors are unexpected and will cause parts of the given CSS
* to be ignored.
*/
enum CssParserError {
/**
* Unknown failure.
*/
FAILED,
/**
* The given text does not form valid syntax
*/
SYNTAX,
/**
* Failed to import a resource
*/
IMPORT,
/**
* The given name has not been defined
*/
NAME,
/**
* The given value is not correct
*/
UNKNOWN_VALUE,
}
/**
* 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.
*/
enum CssParserWarning {
/**
* The given construct is
* deprecated and will be removed in a future version
*/
DEPRECATED,
/**
* A syntax construct was used
* that should be avoided
*/
SYNTAX,
/**
* A feature is not implemented
*/
UNIMPLEMENTED,
}
/**
* Passed to various keybinding signals for deleting text.
*/
enum DeleteType {
/**
* Delete characters.
*/
CHARS,
/**
* Delete only the portion of the word to the
* left/right of cursor if we’re in the middle of a word.
*/
WORD_ENDS,
/**
* Delete words.
*/
WORDS,
/**
* 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_LINES,
/**
* Delete only the portion of the
* display-line to the left/right of cursor.
*/
DISPLAY_LINE_ENDS,
/**
* Delete to the end of the
* paragraph. Like C-k in Emacs (or its reverse).
*/
PARAGRAPH_ENDS,
/**
* Delete entire line. Like C-k in pico.
*/
PARAGRAPHS,
/**
* Delete only whitespace. Like M-\ in Emacs.
*/
WHITESPACE,
}
/**
* Focus movement types.
*/
enum DirectionType {
/**
* Move forward.
*/
TAB_FORWARD,
/**
* Move backward.
*/
TAB_BACKWARD,
/**
* Move up.
*/
UP,
/**
* Move down.
*/
DOWN,
/**
* Move left.
*/
LEFT,
/**
* Move right.
*/
RIGHT,
}
/**
* The identifiers for [iface`Gtk`.Editable] properties.
*
* See [func`Gtk`.Editable.install_properties] for details on how to
* implement the `GtkEditable` interface.
*/
enum EditableProperties {
/**
* the property id for [property`Gtk`.Editable:text]
*/
PROP_TEXT,
/**
* the property id for [property`Gtk`.Editable:cursor-position]
*/
PROP_CURSOR_POSITION,
/**
* the property id for [property`Gtk`.Editable:selection-bound]
*/
PROP_SELECTION_BOUND,
/**
* the property id for [property`Gtk`.Editable:editable]
*/
PROP_EDITABLE,
/**
* the property id for [property`Gtk`.Editable:width-chars]
*/
PROP_WIDTH_CHARS,
/**
* the property id for [property`Gtk`.Editable:max-width-chars]
*/
PROP_MAX_WIDTH_CHARS,
/**
* the property id for [property`Gtk`.Editable:xalign]
*/
PROP_XALIGN,
/**
* the property id for [property`Gtk`.Editable:enable-undo]
*/
PROP_ENABLE_UNDO,
/**
* the number of properties
*/
NUM_PROPERTIES,
}
/**
* Specifies the side of the entry at which an icon is placed.
*/
enum EntryIconPosition {
/**
* At the beginning of the entry (depending on the text direction).
*/
PRIMARY,
/**
* At the end of the entry (depending on the text direction).
*/
SECONDARY,
}
/**
* Describes the state of a [struct`Gdk`.EventSequence] in a [class`Gesture]`.
*/
enum EventSequenceState {
/**
* The sequence is handled, but not grabbed.
*/
NONE,
/**
* The sequence is handled and grabbed.
*/
CLAIMED,
/**
* The sequence is denied.
*/
DENIED,
}
/**
* Describes whether a `GtkFileChooser` is being used to open existing files
* or to save to a possibly new file.
*/
enum FileChooserAction {
/**
* Indicates open mode. The file chooser
* will only let the user pick an existing file.
*/
OPEN,
/**
* Indicates save mode. The file chooser
* will let the user pick an existing file, or type in a new
* filename.
*/
SAVE,
/**
* Indicates an Open mode for
* selecting folders. The file chooser will let the user pick an
* existing folder.
*/
SELECT_FOLDER,
}
/**
* These identify the various errors that can occur while calling
* `GtkFileChooser` functions.
*/
enum FileChooserError {
/**
* Indicates that a file does not exist.
*/
NONEXISTENT,
/**
* Indicates a malformed filename.
*/
BAD_FILENAME,
/**
* Indicates a duplicate path (e.g. when
* adding a bookmark).
*/
ALREADY_EXISTS,
/**
* Indicates an incomplete hostname
* (e.g. "http://foo" without a slash after that).
*/
INCOMPLETE_HOSTNAME,
}
/**
* 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_FILTER_CHANGE_DIFFERENT is always a correct
* choice.
*/
enum FilterChange {
/**
* The filter change cannot be
* described with any of the other enumeration values.
*/
DIFFERENT,
/**
* 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.
*/
LESS_STRICT,
/**
* 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.
*/
MORE_STRICT,
}
/**
* Describes the known strictness of a filter.
*
* Note that for filters where the strictness is not known,
* %GTK_FILTER_MATCH_SOME is always an acceptable value,
* even if a filter does match all or no items.
*/
enum FilterMatch {
/**
* The filter matches some items,
* gtk_filter_match() may return %TRUE or %FALSE
*/
SOME,
/**
* The filter does not match any item,
* gtk_filter_match() will always return %FALSE.
*/
NONE,
/**
* The filter matches all items,
* gtk_filter_match() will alays return %TRUE.
*/
ALL,
}
/**
* 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.
*/
enum IconSize {
/**
* Keep the size of the parent element
*/
INHERIT,
/**
* Size similar to text size
*/
NORMAL,
/**
* Large size, for example in an icon view
*/
LARGE,
}
/**
* Error codes for `GtkIconTheme` operations.
*/
enum IconThemeError {
/**
* The icon specified does not exist in the theme
*/
NOT_FOUND,
/**
* An unspecified error occurred.
*/
FAILED,
}
/**
* An enum for determining where a dropped item goes.
*/
enum IconViewDropPosition {
/**
* no drop possible
*/
NO_DROP,
/**
* dropped item replaces the item
*/
DROP_INTO,
/**
* dropped item is inserted to the left
*/
DROP_LEFT,
/**
* dropped item is inserted to the right
*/
DROP_RIGHT,
/**
* dropped item is inserted above
*/
DROP_ABOVE,
/**
* dropped item is inserted below
*/
DROP_BELOW,
}
/**
* 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_IMAGE_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 %NULL values.
*/
enum ImageType {
/**
* there is no image displayed by the widget
*/
EMPTY,
/**
* the widget contains a named icon
*/
ICON_NAME,
/**
* the widget contains a `GIcon`
*/
GICON,
/**
* the widget contains a `GdkPaintable`
*/
PAINTABLE,
}
/**
* 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_INPUT_PURPOSE_DIGITS and
* %GTK_INPUT_PURPOSE_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”.
*/
enum InputPurpose {
/**
* Allow any character
*/
FREE_FORM,
/**
* Allow only alphabetic characters
*/
ALPHA,
/**
* Allow only digits
*/
DIGITS,
/**
* Edited field expects numbers
*/
NUMBER,
/**
* Edited field expects phone number
*/
PHONE,
/**
* Edited field expects URL
*/
URL,
/**
* Edited field expects email address
*/
EMAIL,
/**
* Edited field expects the name of a person
*/
NAME,
/**
* Like %GTK_INPUT_PURPOSE_FREE_FORM, but characters are hidden
*/
PASSWORD,
/**
* Like %GTK_INPUT_PURPOSE_DIGITS, but characters are hidden
*/
PIN,
/**
* Allow any character, in addition to control codes
*/
TERMINAL,
}
/**
* The different methods to handle text in #GtkInscription when it doesn't
* fit the available space.
*/
enum InscriptionOverflow {
/**
* Clip the remaining text
*/
CLIP,
/**
* Omit characters at the start of the text
*/
ELLIPSIZE_START,
/**
* Omit characters at the middle of the text
*/
ELLIPSIZE_MIDDLE,
/**
* Omit characters at the end of the text
*/
ELLIPSIZE_END,
}
/**
* Used for justifying the text inside a [class`Label]` widget.
*/
enum Justification {
/**
* The text is placed at the left edge of the label.
*/
LEFT,
/**
* The text is placed at the right edge of the label.
*/
RIGHT,
/**
* The text is placed in the center of the label.
*/
CENTER,
/**
* The text is placed is distributed across the label.
*/
FILL,
}
/**
* Describes how [class`LevelBar]` contents should be rendered.
*
* Note that this enumeration could be extended with additional modes
* in the future.
*/
enum LevelBarMode {
/**
* the bar has a continuous mode
*/
CONTINUOUS,
/**
* the bar has a discrete mode
*/
DISCRETE,
}
/**
* The type of license for an application.
*
* This enumeration can be expanded at later date.
*/
enum License {
/**
* No license specified
*/
UNKNOWN,
/**
* A license text is going to be specified by the
* developer
*/
CUSTOM,
/**
* The GNU General Public License, version 2.0 or later
*/
GPL_2_0,
/**
* The GNU General Public License, version 3.0 or later
*/
GPL_3_0,
/**
* The GNU Lesser General Public License, version 2.1 or later
*/
LGPL_2_1,
/**
* The GNU Lesser General Public License, version 3.0 or later
*/
LGPL_3_0,
/**
* The BSD standard license
*/
BSD,
/**
* The MIT/X11 standard license
*/
MIT_X11,
/**
* The Artistic License, version 2.0
*/
ARTISTIC,
/**
* The GNU General Public License, version 2.0 only
*/
GPL_2_0_ONLY,
/**
* The GNU General Public License, version 3.0 only
*/
GPL_3_0_ONLY,
/**
* The GNU Lesser General Public License, version 2.1 only
*/
LGPL_2_1_ONLY,
/**
* The GNU Lesser General Public License, version 3.0 only
*/
LGPL_3_0_ONLY,
/**
* The GNU Affero General Public License, version 3.0 or later
*/
AGPL_3_0,
/**
* The GNU Affero General Public License, version 3.0 only
*/
AGPL_3_0_ONLY,
/**
* The 3-clause BSD licence
*/
BSD_3,
/**
* The Apache License, version 2.0
*/
APACHE_2_0,
/**
* The Mozilla Public License, version 2.0
*/
MPL_2_0,
}
/**
* The type of message being displayed in a [class`MessageDialog]`.
*/
enum MessageType {
/**
* Informational message
*/
INFO,
/**
* Non-fatal warning message
*/
WARNING,
/**
* Question requiring a choice
*/
QUESTION,
/**
* Fatal error message
*/
ERROR,
/**
* None of the above
*/
OTHER,
}
/**
* Passed as argument to various keybinding signals for moving the
* cursor position.
*/
enum MovementStep {
/**
* Move forward or back by graphemes
*/
LOGICAL_POSITIONS,
/**
* Move left or right by graphemes
*/
VISUAL_POSITIONS,
/**
* Move forward or back by words
*/
WORDS,
/**
* Move up or down lines (wrapped lines)
*/
DISPLAY_LINES,
/**
* Move to either end of a line
*/
DISPLAY_LINE_ENDS,
/**
* Move up or down paragraphs (newline-ended lines)
*/
PARAGRAPHS,
/**
* Move to either end of a paragraph
*/
PARAGRAPH_ENDS,
/**
* Move by pages
*/
PAGES,
/**
* Move to ends of the buffer
*/
BUFFER_ENDS,
/**
* Move horizontally by pages
*/
HORIZONTAL_PAGES,
}
/**
* Options for selecting a different wrap mode for natural size
* requests.
*
* See for example the [property`Gtk`.Label:natural-wrap-mode] property.
*/
enum NaturalWrapMode {
/**
* Inherit the minimum size request.
* In particular, this should be used with %PANGO_WRAP_CHAR.
*/
INHERIT,
/**
* 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.
*/
NONE,
/**
* Attempt to wrap at word boundaries. This
* is useful in particular when using %PANGO_WRAP_WORD_CHAR as the
* wrap mode.
*/
WORD,
}
/**
* The parameter used in the action signals of `GtkNotebook`.
*/
enum NotebookTab {
/**
* the first tab in the notebook
*/
FIRST,
/**
* the last tab in the notebook
*/
LAST,
}
/**
* Used to determine the layout of pages on a sheet when printing
* multiple pages per sheet.
*/
enum NumberUpLayout {
/**
* 
*/
LRTB,
/**
* 
*/
LRBT,
/**
* 
*/
RLTB,
/**
* 
*/
RLBT,
/**
* 
*/
TBLR,
/**
* 
*/
TBRL,
/**
* 
*/
BTLR,
/**
* 
*/
BTRL,
}
/**
* 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].
*/
enum Ordering {
/**
* the first value is smaller than the second
*/
SMALLER,
/**
* the two values are equal
*/
EQUAL,
/**
* the first value is larger than the second
*/
LARGER,
}
/**
* Represents the orientation of widgets and other objects.
*
* Typical examples are [class`Box]` or [class`GesturePan]`.
*/
enum Orientation {
/**
* The element is in horizontal orientation.
*/
HORIZONTAL,
/**
* The element is in vertical orientation.
*/
VERTICAL,
}
/**
* 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.
*/
enum Overflow {
/**
* No change is applied. Content is drawn at the specified
* position.
*/
VISIBLE,
/**
* Content is clipped to the bounds of the area. Content
* outside the area is not drawn and cannot be interacted with.
*/
HIDDEN,
}
/**
* Represents the packing location of a children in its parent.
*
* See [class`WindowControls]` for example.
*/
enum PackType {
/**
* The child is packed into the start of the widget
*/
START,
/**
* The child is packed into the end of the widget
*/
END,
}
/**
* The type of a pad action.
*/
enum PadActionType {
/**
* Action is triggered by a pad button
*/
BUTTON,
/**
* Action is triggered by a pad ring
*/
RING,
/**
* Action is triggered by a pad strip
*/
STRIP,
}
/**
* See also gtk_print_settings_set_orientation().
*/
enum PageOrientation {
/**
* Portrait mode.
*/
PORTRAIT,
/**
* Landscape mode.
*/
LANDSCAPE,
/**
* Reverse portrait mode.
*/
REVERSE_PORTRAIT,
/**
* Reverse landscape mode.
*/
REVERSE_LANDSCAPE,
}
/**
* See also gtk_print_job_set_page_set().
*/
enum PageSet {
/**
* All pages.
*/
ALL,
/**
* Even pages.
*/
EVEN,
/**
* Odd pages.
*/
ODD,
}
/**
* Describes the panning direction of a [class`GesturePan]`.
*/
enum PanDirection {
/**
* panned towards the left
*/
LEFT,
/**
* panned towards the right
*/
RIGHT,
/**
* panned upwards
*/
UP,
/**
* panned downwards
*/
DOWN,
}
/**
* Determines how the size should be computed to achieve the one of the
* visibility mode for the scrollbars.
*/
enum PolicyType {
/**
* The scrollbar is always visible. The view size is
* independent of the content.
*/
ALWAYS,
/**
* The scrollbar will appear and disappear as necessary.
* For example, when all of a `GtkTreeView` can not be seen.
*/
AUTOMATIC,
/**
* The scrollbar should never appear. In this mode the
* content determines the size.
*/
NEVER,
/**
* 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.
*/
EXTERNAL,
}
/**
* 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]`.
*/
enum PositionType {
/**
* The feature is at the left edge.
*/
LEFT,