@react-gnome/gjs-esm-types
Version:
TypeScript module declarations for GJS ESM modules.
2,447 lines (2,367 loc) • 6.92 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 xlib from "gi://xlib?version=2.0";
import type Gdk from "gi://Gdk?version=3.0";
import type cairo from "gi://cairo?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 GObject from "gi://GObject?version=2.0";
import type GLib from "gi://GLib?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";
import type Atk from "gi://Atk?version=1.0";
declare module "gi://Gtk?version=3.0" {
/**
* 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 #GtkWidget:expand
* flag inside a #GtkBox, 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 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 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. Since 3.10.
*/
BASELINE,
}
/**
* Used to specify the placement of scroll arrows in scrolling menus.
*/
enum ArrowPlacement {
/**
* Place one arrow on each end of the menu.
*/
BOTH,
/**
* Place both arrows at the top of the menu.
*/
START,
/**
* Place both arrows at the bottom of the menu.
*/
END,
}
/**
* 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. Since 2.10.
*/
NONE,
}
/**
* An enum for determining the page role inside the #GtkAssistant. 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_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,
}
/**
* 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
* #GtkBaselinePosition to select where to put the baseline inside the
* extra availible 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,
/**
* 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,
/**
* Same as `GTK_BORDER_STYLE_NONE`
*/
HIDDEN,
/**
* 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,
}
/**
* Used to dictate the style that a #GtkButtonBox uses to layout the buttons it
* contains.
*/
enum ButtonBoxStyle {
/**
* Buttons are evenly spread across the box.
*/
SPREAD,
/**
* Buttons are placed at the edges of the box.
*/
EDGE,
/**
* Buttons are grouped towards the start of the box,
* (on the left for a HBox, or the top for a VBox).
*/
START,
/**
* Buttons are grouped towards the end of the box,
* (on the right for a HBox, or the bottom for a VBox).
*/
END,
/**
* Buttons are centered in the box. Since 2.12.
*/
CENTER,
/**
* 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() and
* gtk_box_set_spacing() manually). Since 3.12.
*/
EXPAND,
}
/**
* The role specifies the desired appearance of a #GtkModelButton.
*/
enum ButtonRole {
/**
* A plain button
*/
NORMAL,
/**
* A check button
*/
CHECK,
/**
* A radio button
*/
RADIO,
}
/**
* Prebuilt sets of buttons for the dialog. If
* none of these choices are appropriate, simply use %GTK_BUTTONS_NONE
* then call gtk_dialog_add_buttons().
*
* > 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,
}
/**
* 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.
*/
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,
}
/**
* 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,
}
/**
* Error codes for %GTK_CSS_PROVIDER_ERROR.
*/
enum CssProviderError {
/**
* Failed.
*/
FAILED,
/**
* Syntax error.
*/
SYNTAX,
/**
* Import error.
*/
IMPORT,
/**
* Name error.
*/
NAME,
/**
* Deprecation error.
*/
DEPRECATED,
/**
* Unknown value.
*/
UNKNOWN_VALUE,
}
/**
* 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](http://www.w3.org/TR/CSS21/grammar.html),
* but may contain extensions.
*
* More types might be added in the future as the parser incorporates
* more features.
*/
enum CssSectionType {
/**
* The section describes a complete document.
* This section time is the only one where gtk_css_section_get_parent()
* might return %NULL.
*/
DOCUMENT,
/**
* The section defines an import rule.
*/
IMPORT,
/**
* The section defines a color. This
* is a GTK extension to CSS.
*/
COLOR_DEFINITION,
/**
* The section defines a binding set. This
* is a GTK extension to CSS.
*/
BINDING_SET,
/**
* The section defines a CSS ruleset.
*/
RULESET,
/**
* The section defines a CSS selector.
*/
SELECTOR,
/**
* The section defines the declaration of
* a CSS variable.
*/
DECLARATION,
/**
* The section defines the value of a CSS declaration.
*/
VALUE,
/**
* The section defines keyframes. See [CSS
* Animations](http://dev.w3.org/csswg/css3-animations/#keyframes) for details. Since 3.6
*/
KEYFRAMES,
}
/**
* See also: #GtkEntry::delete-from-cursor.
*/
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 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,
}
/**
* Gives an indication why a drag operation failed.
* The value can by obtained by connecting to the
* #GtkWidget::drag-failed signal.
*/
enum DragResult {
/**
* The drag operation was successful.
*/
SUCCESS,
/**
* No suitable drag target.
*/
NO_TARGET,
/**
* The user cancelled the drag operation.
*/
USER_CANCELLED,
/**
* The drag operation timed out.
*/
TIMEOUT_EXPIRED,
/**
* The pointer or keyboard grab used
* for the drag operation was broken.
*/
GRAB_BROKEN,
/**
* The drag operation failed due to some
* unspecified error.
*/
ERROR,
}
/**
* 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 #GdkEventSequence in a #GtkGesture.
*/
enum EventSequenceState {
/**
* The sequence is handled, but not grabbed.
*/
NONE,
/**
* The sequence is handled and grabbed.
*/
CLAIMED,
/**
* The sequence is denied.
*/
DENIED,
}
/**
* Used to specify the style of the expanders drawn by a #GtkTreeView.
*/
enum ExpanderStyle {
/**
* The style used for a collapsed subtree.
*/
COLLAPSED,
/**
* Intermediate style used during animation.
*/
SEMI_COLLAPSED,
/**
* Intermediate style used during animation.
*/
SEMI_EXPANDED,
/**
* The style used for an expanded subtree.
*/
EXPANDED,
}
/**
* 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,
/**
* Indicates a mode for creating a
* new folder. The file chooser will let the user name an existing or
* new folder.
*/
CREATE_FOLDER,
}
/**
* Used as a return value of handlers for the
* #GtkFileChooser::confirm-overwrite signal of a #GtkFileChooser. 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.
*/
enum FileChooserConfirmation {
/**
* The file chooser will present
* its stock dialog to confirm about overwriting an existing file.
*/
CONFIRM,
/**
* The file chooser will
* terminate and accept the user’s choice of a file name.
*/
ACCEPT_FILENAME,
/**
* The file chooser will
* continue running, so as to let the user select another file name.
*/
SELECT_AGAIN,
}
/**
* 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,
}
/**
* Style for input method preedit. See also
* #GtkSettings:gtk-im-preedit-style
*/
enum IMPreeditStyle {
/**
* Deprecated
*/
NOTHING,
/**
* Deprecated
*/
CALLBACK,
/**
* Deprecated
*/
NONE,
}
/**
* Style for input method status. See also
* #GtkSettings:gtk-im-status-style
*/
enum IMStatusStyle {
/**
* Deprecated
*/
NOTHING,
/**
* Deprecated
*/
CALLBACK,
/**
* Deprecated
*/
NONE,
}
/**
* Built-in stock icon sizes.
*/
enum IconSize {
/**
* Invalid size.
*/
INVALID,
/**
* Size appropriate for menus (16px).
*/
MENU,
/**
* Size appropriate for small toolbars (16px).
*/
SMALL_TOOLBAR,
/**
* Size appropriate for large toolbars (24px)
*/
LARGE_TOOLBAR,
/**
* Size appropriate for buttons (16px)
*/
BUTTON,
/**
* Size appropriate for drag and drop (32px)
*/
DND,
/**
* Size appropriate for dialogs (48px)
*/
DIALOG,
}
/**
* 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,
/**
* droppped 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 #GtkImage. If you
* want to get the image from the widget, you can only get the
* currently-stored representation. e.g. if the
* gtk_image_get_storage_type() returns #GTK_IMAGE_PIXBUF, then you can
* call gtk_image_get_pixbuf() but not gtk_image_get_stock(). 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 #GdkPixbuf
*/
PIXBUF,
/**
* the widget contains a [stock item name][gtkstock]
*/
STOCK,
/**
* the widget contains a #GtkIconSet
*/
ICON_SET,
/**
* the widget contains a #GdkPixbufAnimation
*/
ANIMATION,
/**
* the widget contains a named icon.
* This image type was added in GTK+ 2.6
*/
ICON_NAME,
/**
* the widget contains a #GIcon.
* This image type was added in GTK+ 2.14
*/
GICON,
/**
* the widget contains a #cairo_surface_t.
* This image type was added in GTK+ 3.10
*/
SURFACE,
}
/**
* 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,
}
/**
* Used for justifying the text inside a #GtkLabel widget. (See also
* #GtkAlignment).
*/
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 #GtkLevelBar 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. Since 3.12.
*/
GPL_2_0_ONLY,
/**
* The GNU General Public License, version 3.0 only. Since 3.12.
*/
GPL_3_0_ONLY,
/**
* The GNU Lesser General Public License, version 2.1 only. Since 3.12.
*/
LGPL_2_1_ONLY,
/**
* The GNU Lesser General Public License, version 3.0 only. Since 3.12.
*/
LGPL_3_0_ONLY,
/**
* The GNU Affero General Public License, version 3.0 or later. Since: 3.22.
*/
AGPL_3_0,
/**
* The GNU Affero General Public License, version 3.0 only. Since: 3.22.27.
*/
AGPL_3_0_ONLY,
/**
* The 3-clause BSD licence. Since: 3.24.20.
*/
BSD_3,
/**
* The Apache License, version 2.0. Since: 3.24.20.
*/
APACHE_2_0,
/**
* The Mozilla Public License, version 2.0. Since: 3.24.20.
*/
MPL_2_0,
}
/**
* An enumeration representing directional movements within a menu.
*/
enum MenuDirectionType {
/**
* To the parent menu shell
*/
PARENT,
/**
* To the submenu, if any, associated with the item
*/
CHILD,
/**
* To the next menu item
*/
NEXT,
/**
* To the previous menu item
*/
PREV,
}
/**
* The type of message being displayed in the dialog.
*/
enum MessageType {
/**
* Informational message
*/
INFO,
/**
* Non-fatal warning message
*/
WARNING,
/**
* Question requiring a choice
*/
QUESTION,
/**
* Fatal error message
*/
ERROR,
/**
* None of the above
*/
OTHER,
}
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,
}
enum NotebookTab {
FIRST,
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,
}
/**
* Represents the orientation of widgets and other objects which can be switched
* between horizontal and vertical orientation on the fly, like #GtkToolbar or
* #GtkGesturePan.
*/
enum Orientation {
/**
* The element is in horizontal orientation.
*/
HORIZONTAL,
/**
* The element is in vertical orientation.
*/
VERTICAL,
}
/**
* Determines how widgets should be packed inside menubars
* and menuitems contained in menubars.
*/
enum PackDirection {
/**
* Widgets are packed left-to-right
*/
LTR,
/**
* Widgets are packed right-to-left
*/
RTL,
/**
* Widgets are packed top-to-bottom
*/
TTB,
/**
* Widgets are packed bottom-to-top
*/
BTT,
}
/**
* Represents the packing location #GtkBox children. (See: #GtkVBox,
* #GtkHBox, and #GtkButtonBox).
*/
enum PackType {
/**
* The child is packed into the start of the box
*/
START,
/**
* The child is packed into the end of the box
*/
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 #GtkGesturePan
*/
enum PanDirection {
/**
* panned towards the left
*/
LEFT,
/**
* panned towards the right
*/
RIGHT,
/**
* panned upwards
*/
UP,
/**
* panned downwards
*/
DOWN,
}
/**
* Priorities for path lookups.
* See also gtk_binding_set_add_path().
*/
enum PathPriorityType {
/**
* Deprecated
*/
LOWEST,
/**
* Deprecated
*/
GTK,
/**
* Deprecated
*/
APPLICATION,
/**
* Deprecated
*/
THEME,
/**
* Deprecated
*/
RC,
/**
* Deprecated
*/
HIGHEST,
}
/**
* Widget path types.
* See also gtk_binding_set_add_path().
*/
enum PathType {
/**
* Deprecated
*/
WIDGET,
/**
* Deprecated
*/
WIDGET_CLASS,
/**
* Deprecated
*/
CLASS,
}
/**
* 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. Since: 3.16
*/
EXTERNAL,
}
/**
* Describes constraints to positioning of popovers. More values
* may be added to this enumeration in the future.
*/
enum PopoverConstraint {
/**
* Don't constrain the popover position
* beyond what is imposed by the implementation
*/
NONE,
/**
* Constrain the popover to the boundaries
* of the window that it is attached to
*/
WINDOW,
}
/**
* Describes which edge of a widget a certain feature is positioned at, e.g. the
* tabs of a #GtkNotebook, the handle of a #GtkHandleBox or the label of a
* #GtkScale.
*/
enum PositionType {
/**
* The feature is at the left edge.
*/
LEFT,
/**
* The feature is at the right edge.
*/
RIGHT,
/**
* The feature is at the top edge.
*/
TOP,
/**
* The feature is at the bottom edge.
*/
BOTTOM,
}
/**
* See also gtk_print_settings_set_duplex().
*/
enum PrintDuplex {
/**
* No duplex.
*/
SIMPLEX,
/**
* Horizontal duplex.
*/
HORIZONTAL,
/**
* Vertical duplex.
*/
VERTICAL,
}
/**
* Error codes that identify various errors that can occur while
* using the GTK+ printing support.
*/
enum PrintError {
/**
* An unspecified error occurred.
*/
GENERAL,
/**
* An internal error occurred.
*/
INTERNAL_ERROR,
/**
* A memory allocation failed.
*/
NOMEM,
/**
* An error occurred while loading a page setup
* or paper size from a key file.
*/
INVALID_FILE,
}
/**
* The `action` parameter to gtk_print_operation_run()
* determines what action the print operation should perform.
*/
enum PrintOperationAction {
/**
* Show the print dialog.
*/
PRINT_DIALOG,
/**
* Start to print without showing
* the print dialog, based on the current print settings.
*/
PRINT,
/**
* Show the print preview.
*/
PREVIEW,
/**
* Export to a file. This requires
* the export-filename property to be set.
*/
EXPORT,
}
/**
* A value of this type is returned by gtk_print_operation_run().
*/
enum PrintOperationResult {
/**
* An error has occurred.
*/
ERROR,
/**
* The print settings should be stored.
*/
APPLY,
/**
* The print operation has been canceled,
* the print settings should not be stored.
*/
CANCEL,
/**
* The print operation is not complete
* yet. This value will only be returned when running asynchronously.
*/
IN_PROGRESS,
}
/**
* See also gtk_print_job_set_pages()
*/
enum PrintPages {
/**
* All pages.
*/
ALL,
/**
* Current page.
*/
CURRENT,
/**
* Range of pages.
*/
RANGES,
/**
* Selected pages.
*/
SELECTION,
}
/**
* See also gtk_print_settings_set_quality().
*/
enum PrintQuality {
/**
* Low quality.
*/
LOW,
/**
* Normal quality.
*/
NORMAL,
/**
* High quality.
*/
HIGH,
/**
* Draft quality.
*/
DRAFT,
}
/**
* The status gives a rough indication of the completion of a running
* print operation.
*/
enum PrintStatus {
/**
* The printing has not started yet; this
* status is set initially, and while the print dialog is shown.
*/
INITIAL,
/**
* This status is set while the begin-print
* signal is emitted and during pagination.
*/
PREPARING,
/**
* This status is set while the
* pages are being rendered.
*/
GENERATING_DATA,
/**
* The print job is being sent off to the
* printer.
*/
SENDING_DATA,
/**
* The print job has been sent to the printer,
* but is not printed for some reason, e.g. the printer may be stopped.
*/
PENDING,
/**
* Some problem has occurred during
* printing, e.g. a paper jam.
*/
PENDING_ISSUE,
/**
* The printer is processing the print job.
*/
PRINTING,
/**
* The printing has been completed successfully.
*/
FINISHED,
/**
* The printing has been aborted.
*/
FINISHED_ABORTED,
}
/**
* Describes the stage at which events are fed into a #GtkEventController.
*/
enum PropagationPhase {
/**
* Events are not delivered automatically. Those can be
* manually fed through gtk_event_controller_handle_event(). This should
* only be used when full control about when, or whether the controller
* handles the event is needed.
*/
NONE,
/**
* 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.
*/
CAPTURE,
/**
* 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.
*/
BUBBLE,
/**
* 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.
*/
TARGET,
}
/**
* The #GtkRcTokenType 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.
*/
enum RcTokenType {
/**
* Deprecated
*/
INVALID,
/**
* Deprecated
*/
INCLUDE,
/**
* Deprecated
*/
NORMAL,
/**
* Deprecated
*/
ACTIVE,
/**
* Deprecated
*/
PRELIGHT,
/**
* Deprecated
*/
SELECTED,
/**
* Deprecated
*/
INSENSITIVE,
/**
* Deprecated
*/
FG,
/**
* Deprecated
*/
BG,
/**
* Deprecated
*/
TEXT,
/**
* Deprecated
*/
BASE,
/**
* Deprecated
*/
XTHICKNESS,
/**
* Deprecated
*/
YTHICKNESS,
/**
* Deprecated
*/
FONT,
/**
* Deprecated
*/
FONTSET,
/**
* Deprecated
*/
FONT_NAME,
/**
* Deprecated
*/
BG_PIXMAP,
/**
* Deprecated
*/
PIXMAP_PATH,
/**
* Deprecated
*/
STYLE,
/**
* Deprecated
*/
BINDING,
/**
* Deprecated
*/
BIND,
/**
* Deprecated
*/
WIDGET,
/**
* Deprecated
*/
WIDGET_CLASS,
/**
* Deprecated
*/
CLASS,
/**
* Deprecated
*/
LOWEST,
/**
* Deprecated
*/
GTK,
/**
* Deprecated
*/
APPLICATION,
/**
* Deprecated
*/
THEME,
/**
* Deprecated
*/
RC,
/**
* Deprecated
*/
HIGHEST,
/**
* Deprecated
*/
ENGINE,
/**
* Deprecated
*/
MODULE_PATH,
/**
* Deprecated
*/
IM_MODULE_PATH,
/**
* Deprecated
*/
IM_MODULE_FILE,
/**
* Deprecated
*/
STOCK,
/**
* Deprecated
*/
LTR,
/**
* Deprecated
*/
RTL,
/**
* Deprecated
*/
COLOR,
/**
* Deprecated
*/
UNBIND,
/**
* Deprecated
*/
LAST,
}
/**
* These identify the various errors that can occur while calling
* #GtkRecentChooser functions.
*/
enum RecentChooserError {
/**
* Indicates that a file does not exist
*/
NOT_FOUND,
/**
* Indicates a malformed URI
*/
INVALID_URI,
}
/**
* Error codes for #GtkRecentManager operations
*/
enum RecentManagerError {
/**
* the URI specified does not exists in
* the recently used resources list.
*/
NOT_FOUND,
/**
* the URI specified is not valid.
*/
INVALID_URI,
/**
* the supplied string is not
* UTF-8 encoded.
*/
INVALID_ENCODING,
/**
* no application has registered
* the specified item.
*/
NOT_REGISTERED,
/**
* failure while reading the recently used
* resources file.
*/
READ,
/**
* failure while writing the recently used
* resources file.
*/
WRITE,
/**
* unspecified error.
*/
UNKNOWN,
}
/**
* Used to specify the sorting method to be applyed to the recently
* used resource list.
*/
enum RecentSortType {
/**
* Do not sort the returned list of recently used
* resources.
*/
NONE,
/**
* Sort the returned list with the most recently used
* items first.
*/
MRU,
/**
* Sort the returned list with the least recently used
* items first.
*/
LRU,
/**
* Sort the returned list using a custom sorting
* function passed using gtk_recent_chooser_set_sort_func().
*/
CUSTOM,
}
/**
* Indicated the relief to be drawn around a #GtkButton.
*/
enum ReliefStyle {
/**
* Draw a normal relief.
*/
NORMAL,
/**
* A half relief. Deprecated in 3.14, does the same as `GTK_RELIEF_NORMAL`
*/
HALF,
/**
* No relief.
*/
NONE,
}
enum ResizeMode {
/**
* Pass resize request to the parent
*/
PARENT,
/**
* Queue resizes on this widget
*/
QUEUE,
/**
* Resize immediately. Deprecated.
*/
IMMEDIATE,
}
/**
* 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.
*/
enum ResponseType {
/**
* Returned if an action widget has no response id,
* or if the dialog gets programmatically hidden or destroyed
*/
NONE,
/**
* Generic response id, not used by GTK+ dialogs
*/
REJECT,
/**
* Generic response id, not used by GTK+ dialogs
*/
ACCEPT,
/**
* Returned if the dialog is deleted
*/
DELETE_EVENT,
/**
* Returned by OK buttons in GTK+ dialogs
*/
OK,
/**
* Returned by Cancel buttons in GTK+ dialogs
*/
CANCEL,
/**
* Returned by Close buttons in GTK+ dialogs
*/
CLOSE,
/**
* Returned by Yes buttons in GTK+ dialogs
*/
YES,
/**
* Returned by No buttons in GTK+ dialogs
*/
NO,
/**
* Returned by Apply buttons in GTK+ dialogs
*/
APPLY,
/**
* Returned by Help buttons in GTK+ dialogs
*/
HELP,
}
/**
* These enumeration values describe the possible transitions
* when the child of a #GtkRevealer widget is shown or hidden.
*/
enum RevealerTransitionType {
/**
* No transition
*/
NONE,
/**
* Fade in
*/
CROSSFADE,
/**
* Slide in from the left
*/
SLIDE_RIGHT,
/**
* Slide in from the right
*/
SLIDE_LEFT,
/**
* Slide in from the bottom
*/
SLIDE_UP,
/**
* Slide in from the top
*/
SLIDE_DOWN,
}
enum ScrollStep {
/**
* Scroll in steps.
*/
STEPS,
/**
* Scroll by pages.
*/
PAGES,
/**
* Scroll to ends.
*/
ENDS,
/**
* Scroll in horizontal steps.
*/
HORIZONTAL_STEPS,
/**
* Scroll by horizontal pages.
*/
HORIZONTAL_PAGES,
/**
* Scroll to the horizontal ends.
*/
HORIZONTAL_ENDS,
}
/**
* Scrolling types.
*/
enum ScrollType {
/**
* No scrolling.
*/
NONE,
/**
* Jump to new location.
*/
JUMP,
/**
* Step backward.
*/
STEP_BACKWARD,
/**
* Step forward.
*/
STEP_FORWARD,
/**
* Page backward.
*/
PAGE_BACKWARD,
/**
* Page forward.
*/
PAGE_FORWARD,
/**
* Step up.
*/
STEP_UP,
/**
* Step down.
*/
STEP_DOWN,
/**
* Page up.
*/
PAGE_UP,
/**
* Page down.
*/
PAGE_DOWN,
/**
* Step to the left.
*/
STEP_LEFT,
/**
* Step to the right.
*/
STEP_RIGHT,
/**
* Page to the left.
*/
PAGE_LEFT,
/**
* Page to the right.
*/
PAGE_RIGHT,
/**
* Scroll to start.
*/
START,
/**
* Scroll to end.
*/
END,
}
/**
* Defines the policy to be used in a scrollable widget when updating
* the scrolled window adjustments in a given orientation.
*/
enum ScrollablePolicy {
/**
* Scrollable adjustments are based on the minimum size
*/
MINIMUM,
/**
* Scrollable adjustments are based on the natural size
*/
NATURAL,
}
/**
* Used to control what selections users are allowed to make.
*/
enum SelectionMode {
/**
* No selection is possible.
*/
NONE,
/**
* Zero or one element may be selected.
*/
SINGLE,
/**
* 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_SELECTION_BROWSE. What is really enforced is that the user
* can’t deselect a currently selected element except by selecting
* another element.
*/
BROWSE,
/**
* 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.
*/
MULTIPLE,
}
/**
* Determines how GTK+ handles the sensitivity of stepper arrows
* at the end of range widgets.
*/
enum SensitivityType {
/**
* The arrow is made insensitive if the
* thumb is at the end
*/
AUTO,
/**
* The arrow is always sensitive
*/
ON,
/**
* The arrow is always insensitive
*/
OFF,
}
/**
* Used to change the appearance of an outline typically provided by a #GtkFrame.
*
* Note that many themes do not differentiate the appearance of the
* various shadow types: Either their is no visible shadow (`GTK_SHADOW_NONE)`,
* or there is (any other value).
*/
enum ShadowType {
/**
* No outline.
*/
NONE,
/**
* The outline is bevelled inwards.
*/
IN,
/**
* The outline is bevelled outwards like a button.
*/
OUT,
/**
* The outline has a sunken 3d appearance.
*/
ETCHED_IN,
/**
* The outline has a raised 3d appearance.
*/
ETCHED_OUT,
}
/**
* GtkShortcutType specifies the kind of shortcut that is being described.
* More values may be added to this enumeration over time.
*/
enum ShortcutType {
/**
* The shortcut is a keyboard accelerator. The #GtkShortcutsShortcut:accelerator
* property will be used.
*/
ACCELERATOR,
/**
* The shortcut is a pinch gesture. GTK+ provides an icon and subtitle.
*/
GESTURE_PINCH,
/**
* The shortcut is a stretch gesture. GTK+ provides an icon and subtitle.
*/
GESTURE_STRETCH,
/**
* The shortcut is a clockwise rotation gesture. GTK+ provides an icon and subtitle.
*/
GESTURE_ROTATE_CLOCKWISE,
/**
* The shortcut is a counterclockwise rotation gesture. GTK+ provides an icon and subtitle.
*/
GESTURE_ROTATE_COUNTERCLOCKWISE,
/**
* The shortcut is a two-finger swipe gesture. GTK+ provides an icon and subtitle.
*/
GESTURE_TWO_FINGER_SWIPE_LEFT,
/**
* The shortcut is a two-finger swipe gesture. GTK+ provides an icon and subtitle.
*/
GESTURE_TWO_FINGER_SWIPE_RIGHT,
/**
* The shortcut is a gesture. The #GtkShortcutsShortcut:icon property will be
* used.
*/
GESTURE,
}
/**
* The mode of the size group determines the directions in which the size
* group affects the requested sizes of its component widgets.
*/
enum SizeGroupMode {
/**
* group has no effect
*/
NONE,
/**
* group affects horizontal requisition
*/
HORIZONTAL,
/**
* group affects vertical requisition
*/
VERTICAL,
/**
* group affects both horizontal and vertical requisition
*/
BOTH,
}
/**
* Specifies a preference for height-for-width or
* width-for-height geometry management.
*/
enum SizeRequestMode {
/**
* Prefer height-for-width geometry management
*/
HEIGHT_FOR_WIDTH,
/**
* Prefer width-for-height geometry management
*/
WIDTH_FOR_HEIGHT,
/**
* Don’t trade height-for-width or width-for-height
*/
CONSTANT_SIZE,
}
/**
* Determines the direction of a sort.
*/
enum SortType {
/**
* Sorting is in ascending order.
*/
ASCENDING,
/**
* Sorting is in descending order.
*/
DESCENDING,
}
/**
* The spin button update policy determines whether the spin button displays
* values even if they are outside the bounds of its adjustment.
* See gtk_spin_button_set_update_policy().
*/
enum SpinButtonUpdatePolicy {
/**
* When refreshing your #GtkSpinButton, the value is
* always displayed
*/
ALWAYS,
/**
* When refreshing your #GtkSpinButton, the value is
* only displayed if it is valid within the bounds of the spin button's
* adjustment
*/
IF_VALID,
}
/**
* The values of the GtkSpinType enumeration are used to specify the
* change to make in gtk_spin_button_spin().
*/
enum SpinType {
/**
* Increment by the adjustments step increment.
*/
STEP_FORWARD,
/**
* Decrement by the adjustments step increment.
*/
STEP_BACKWARD,
/**
* Increment by the adjustments page increment.
*/
PAGE_FORWARD,
/**
* Decrement by the adjustments page increment.
*/
PAGE_BACKWARD,
/**
* Go to the adjustments lower bound.
*/
HOME,
/**
* Go to the adjustments upper bound.
*/
END,
/**
* Change by a specified amount.
*/
USER_DEFINED,
}
/**
* These enumeration values describe the possible transitions
* between pages in a #GtkStack widget.
*
* New values may be added to