Gjsify LogoGjsify Logo

Index

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

Allocation: Gdk.Rectangle

Variables

ACCESSIBLE_VALUE_UNDEFINED: number

An undefined value. The accessible attribute is either unset, or its value is undefined.

BINARY_AGE: number

Like [funcget_binary_age], but from the headers used at application compile time, rather than from the library linked against at application run time.

IM_MODULE_EXTENSION_POINT_NAME: string
INPUT_ERROR: number

Constant to return from a signal handler for the ::input signal in case of conversion failure.

See [signalGtk.SpinButton::input].

INTERFACE_AGE: number

Like [funcget_interface_age], but from the headers used at application compile time, rather than from the library linked against at application run time.

INVALID_LIST_POSITION: number

The value used to refer to a guaranteed invalid position in a GListModel.

This value may be returned from some functions, others may accept it as input. Its interpretation may differ for different functions.

Refer to each function's documentation for if this value is allowed and what it does.

LEVEL_BAR_OFFSET_FULL: string

The name used for the stock full offset included by GtkLevelBar.

LEVEL_BAR_OFFSET_HIGH: string

The name used for the stock high offset included by GtkLevelBar.

LEVEL_BAR_OFFSET_LOW: string

The name used for the stock low offset included by GtkLevelBar.

MAJOR_VERSION: number

Like [funcget_major_version], but from the headers used at application compile time, rather than from the library linked against at application run time.

MAX_COMPOSE_LEN: number
MEDIA_FILE_EXTENSION_POINT_NAME: string
MICRO_VERSION: number

Like [funcget_micro_version], but from the headers used at application compile time, rather than from the library linked against at application run time.

MINOR_VERSION: number

Like [funcget_minor_version], but from the headers used at application compile time, rather than from the library linked against at application run time.

PAPER_NAME_A3: string

Name for the A3 paper size.

PAPER_NAME_A4: string

Name for the A4 paper size.

PAPER_NAME_A5: string

Name for the A5 paper size.

PAPER_NAME_B5: string

Name for the B5 paper size.

PAPER_NAME_EXECUTIVE: string

Name for the Executive paper size.

PAPER_NAME_LEGAL: string

Name for the Legal paper size.

PAPER_NAME_LETTER: string

Name for the Letter paper size.

PRINT_SETTINGS_COLLATE: string
PRINT_SETTINGS_DEFAULT_SOURCE: string
PRINT_SETTINGS_DITHER: string
PRINT_SETTINGS_DUPLEX: string
PRINT_SETTINGS_FINISHINGS: string
PRINT_SETTINGS_MEDIA_TYPE: string
PRINT_SETTINGS_NUMBER_UP: string
PRINT_SETTINGS_NUMBER_UP_LAYOUT: string
PRINT_SETTINGS_N_COPIES: string
PRINT_SETTINGS_ORIENTATION: string
PRINT_SETTINGS_OUTPUT_BASENAME: string

The key used by the “Print to file” printer to store the file name of the output without the path to the directory and the file extension.

PRINT_SETTINGS_OUTPUT_BIN: string
PRINT_SETTINGS_OUTPUT_DIR: string

The key used by the “Print to file” printer to store the directory to which the output should be written.

PRINT_SETTINGS_OUTPUT_FILE_FORMAT: string

The key used by the “Print to file” printer to store the format of the output. The supported values are “PS” and “PDF”.

PRINT_SETTINGS_OUTPUT_URI: string

The key used by the “Print to file” printer to store the URI to which the output should be written. GTK itself supports only “file://” URIs.

PRINT_SETTINGS_PAGE_RANGES: string
PRINT_SETTINGS_PAGE_SET: string
PRINT_SETTINGS_PAPER_FORMAT: string
PRINT_SETTINGS_PAPER_HEIGHT: string
PRINT_SETTINGS_PAPER_WIDTH: string
PRINT_SETTINGS_PRINTER: string
PRINT_SETTINGS_PRINTER_LPI: string
PRINT_SETTINGS_PRINT_PAGES: string
PRINT_SETTINGS_QUALITY: string
PRINT_SETTINGS_RESOLUTION: string
PRINT_SETTINGS_RESOLUTION_X: string
PRINT_SETTINGS_RESOLUTION_Y: string
PRINT_SETTINGS_REVERSE: string
PRINT_SETTINGS_SCALE: string
PRINT_SETTINGS_USE_COLOR: string
PRINT_SETTINGS_WIN32_DRIVER_EXTRA: string
PRINT_SETTINGS_WIN32_DRIVER_VERSION: string
PRIORITY_RESIZE: number

Use this priority for functionality related to size allocation.

It is used internally by GTK+ to compute the sizes of widgets. This priority is higher than %GDK_PRIORITY_REDRAW to avoid resizing a widget which was just redrawn.

STYLE_PROVIDER_PRIORITY_APPLICATION: number

A priority that can be used when adding a GtkStyleProvider for application-specific style information.

STYLE_PROVIDER_PRIORITY_FALLBACK: number

The priority used for default style information that is used in the absence of themes.

Note that this is not very useful for providing default styling for custom style classes - themes are likely to override styling provided at this priority with catch-all * {...} rules.

STYLE_PROVIDER_PRIORITY_SETTINGS: number

The priority used for style information provided via GtkSettings.

This priority is higher than %GTK_STYLE_PROVIDER_PRIORITY_THEME to let settings override themes.

STYLE_PROVIDER_PRIORITY_THEME: number

The priority used for style information provided by themes.

STYLE_PROVIDER_PRIORITY_USER: number

The priority used for the style information from $XDG_CONFIG_HOME/gtk-4.0/gtk.css.

You should not use priorities higher than this, to give the user the last word.

TEXT_VIEW_PRIORITY_VALIDATE: number

The priority at which the text view validates onscreen lines in an idle job in the background.

TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID: number

Uses the default sort function in a [ifaceGtk.TreeSortable].

See also: [methodGtk.TreeSortable.set_sort_column_id]

TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID: number

Disables sorting in a [ifaceGtk.TreeSortable].

See also: [methodGtk.TreeSortable.set_sort_column_id]

Functions

  • Gets the modifier mask.

    The modifier mask determines which modifiers are considered significant for keyboard accelerators. This includes all keyboard modifiers except for %GDK_LOCK_MASK.

    Returns Gdk.ModifierType

  • acceleratorGetLabel(acceleratorKey: number, acceleratorMods: Gdk.ModifierType): string
  • Converts an accelerator keyval and modifier mask into a string which can be used to represent the accelerator to the user.

    Parameters

    • acceleratorKey: number

      accelerator keyval

    • acceleratorMods: Gdk.ModifierType

      accelerator modifier mask

    Returns string

  • acceleratorGetLabelWithKeycode(display: Gdk.Display, acceleratorKey: number, keycode: number, acceleratorMods: Gdk.ModifierType): string
  • Converts an accelerator keyval and modifier mask into a string that can be displayed to the user.

    The string may be translated.

    This function is similar to [funcGtk.accelerator_get_label], but handling keycodes. This is only useful for system-level components, applications should use [funcGtk.accelerator_get_label] instead.

    Parameters

    • display: Gdk.Display

      a GdkDisplay or %NULL to use the default display

    • acceleratorKey: number

      accelerator keyval

    • keycode: number

      accelerator keycode

    • acceleratorMods: Gdk.ModifierType

      accelerator modifier mask

    Returns string

  • acceleratorName(acceleratorKey: number, acceleratorMods: Gdk.ModifierType): string
  • Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse().

    For example, if you pass in %GDK_KEY_q and %GDK_CONTROL_MASK, this function returns <Control>q.

    If you need to display accelerators in the user interface, see [funcGtk.accelerator_get_label].

    Parameters

    • acceleratorKey: number

      accelerator keyval

    • acceleratorMods: Gdk.ModifierType

      accelerator modifier mask

    Returns string

  • acceleratorNameWithKeycode(display: Gdk.Display, acceleratorKey: number, keycode: number, acceleratorMods: Gdk.ModifierType): string
  • Converts an accelerator keyval and modifier mask into a string parseable by gtk_accelerator_parse_with_keycode().

    This is similar to [funcGtk.accelerator_name] but handling keycodes. This is only useful for system-level components, applications should use [funcGtk.accelerator_name] instead.

    Parameters

    • display: Gdk.Display

      a GdkDisplay or %NULL to use the default display

    • acceleratorKey: number

      accelerator keyval

    • keycode: number

      accelerator keycode

    • acceleratorMods: Gdk.ModifierType

      accelerator modifier mask

    Returns string

  • Parses a string representing an accelerator.

    The format looks like “<Control>a” or “<Shift><Alt>F1”.

    The parser is fairly liberal and allows lower or upper case, and also abbreviations such as “<Ctl>” and “<Ctrl>”.

    Key names are parsed using [funcGdk.keyval_from_name]. For character keys the name is not the symbol, but the lowercase name, e.g. one would use “<Ctrl>minus” instead of “<Ctrl>-”.

    Modifiers are enclosed in angular brackets <>, and match the [flagsGdk.ModifierType] mask:

    • <Shift> for GDK_SHIFT_MASK
    • <Ctrl> for GDK_CONTROL_MASK
    • <Alt> for GDK_ALT_MASK
    • <Meta> for GDK_META_MASK
    • <Super> for GDK_SUPER_MASK
    • <Hyper> for GDK_HYPER_MASK

    If the parse operation fails, accelerator_key and accelerator_mods will be set to 0 (zero).

    Parameters

    • accelerator: string

      string representing an accelerator

    Returns [boolean, number, Gdk.ModifierType]

  • Parses a string representing an accelerator.

    This is similar to [funcGtk.accelerator_parse] but handles keycodes as well. This is only useful for system-level components, applications should use [funcGtk.accelerator_parse] instead.

    If accelerator_codes is given and the result stored in it is non-%NULL, the result must be freed with g_free().

    If a keycode is present in the accelerator and no accelerator_codes is given, the parse will fail.

    If the parse fails, accelerator_key, accelerator_mods and accelerator_codes will be set to 0 (zero).

    Parameters

    • accelerator: string

      string representing an accelerator

    • display: Gdk.Display

      the GdkDisplay to look up accelerator_codes in

    Returns [boolean, number, number[], Gdk.ModifierType]

  • Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator.

    For example, the %GDK_KEY_a keyval plus %GDK_CONTROL_MASK mark is valid, and matches the “Ctrl+a” accelerator. But, you can't, for instance, use the %GDK_KEY_Control_L keyval as an accelerator.

    Parameters

    Returns boolean

  • Initializes iter to point to target.

    If target is not found, finds the next value after it. If no value >= target exists in set, this function returns %FALSE.

    Parameters

    • set: Bitset

      a GtkBitset

    • target: number

      target value to start iterating at

    Returns [boolean, BitsetIter, number]

  • Initializes an iterator for set and points it to the first value in set.

    If set is empty, %FALSE is returned and value is set to %G_MAXUINT.

    Parameters

    Returns [boolean, BitsetIter, number]

  • Initializes an iterator for set and points it to the last value in set.

    If set is empty, %FALSE is returned.

    Parameters

    Returns [boolean, BitsetIter, number]

  • builderErrorQuark(): Quark
  • checkVersion(requiredMajor: number, requiredMinor: number, requiredMicro: number): string | null
  • Checks that the GTK library in use is compatible with the given version.

    Generally you would pass in the constants %GTK_MAJOR_VERSION, %GTK_MINOR_VERSION, %GTK_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of GTK the application or module was compiled against.

    Compatibility is defined by two things: first the version of the running library is newer than the version required_major.required_minor.required_micro. Second the running library must be binary compatible with the version required_major.required_minor.required_micro (same major version.)

    This function is primarily for GTK modules; the module can call this function to check that it wasn’t loaded into an incompatible version of GTK. However, such a check isn’t completely reliable, since the module may be linked against an old version of GTK and calling the old version of gtk_check_version(), but still get loaded into an application using a newer version of GTK.

    Parameters

    • requiredMajor: number

      the required major version

    • requiredMinor: number

      the required minor version

    • requiredMicro: number

      the required micro version

    Returns string | null

  • constraintVflParserErrorQuark(): Quark
  • cssParserErrorQuark(): Quark
  • cssParserWarningQuark(): Quark
  • disableSetlocale(): void
  • Prevents [idgtk_init] and [idgtk_init_check] from automatically calling setlocale (LC_ALL, "").

    You would want to use this function if you wanted to set the locale for your program to something other than the user’s locale, or if you wanted to set different values for different locale categories.

    Most programs should not need to call this function.

    Returns void

  • distributeNaturalAllocation(extraSpace: number, sizes: Gtk.RequestedSize[]): number
  • Distributes extra_space to child sizes by bringing smaller children up to natural size first.

    The remaining space will be added to the minimum_size member of the GtkRequestedSize struct. If all sizes reach their natural size then the remaining space is returned.

    Parameters

    • extraSpace: number

      Extra space to redistribute among children after subtracting minimum sizes and any child padding from the overall allocation

    • sizes: Gtk.RequestedSize[]

      An array of structs with a client pointer and a minimum/natural size in the orientation of the allocation.

    Returns number

  • Gets a property of the GtkEditable delegate for object.

    This is helper function that should be called in the get_property function of your GtkEditable implementation, before handling your own properties.

    Parameters

    • object: GObject.Object

      a GObject

    • propId: number

      a property ID

    • value: any

      value to set

    • pspec: ParamSpec

      the GParamSpec for the property

    Returns boolean

  • Sets a property on the GtkEditable delegate for object.

    This is a helper function that should be called in the set_property function of your GtkEditable implementation, before handling your own properties.

    Parameters

    • object: GObject.Object

      a GObject

    • propId: number

      a property ID

    • value: any

      value to set

    • pspec: ParamSpec

      the GParamSpec for the property

    Returns boolean

  • Overrides the GtkEditable properties for class.

    This is a helper function that should be called in class_init, after installing your own properties.

    Note that your class must have "text", "cursor-position", "selection-bound", "editable", "width-chars", "max-width-chars", "xalign" and "enable-undo" properties for this function to work.

    To handle the properties in your set_property and get_property functions, you can either use [funcGtk.Editable.delegate_set_property] and [funcGtk.Editable.delegate_get_property] (if you are using a delegate), or remember the first_prop offset and add it to the values in the [enumGtk.EditableProperties] enumeration to get the property IDs for these properties.

    Parameters

    • objectClass: GObject.ObjectClass

      a GObjectClass

    • firstProp: number

      property ID to use for the first property

    Returns number

  • enumeratePrinters(func: PrinterFunc, wait: boolean): void
  • Calls a function for all GtkPrinters.

    If func returns %TRUE, the enumeration is stopped.

    Parameters

    • func: PrinterFunc

      a function to call for each printer

    • wait: boolean

      if %TRUE, wait in a recursive mainloop until all printers are enumerated; otherwise return early

    Returns void

  • fileChooserErrorQuark(): Quark
  • getBinaryAge(): number
  • Returns the binary age as passed to libtool.

    If libtool means nothing to you, don't worry about it.

    Returns number

  • Returns the GTK debug flags that are currently active.

    This function is intended for GTK modules that want to adjust their debug output based on GTK debug flags.

    Returns DebugFlags

  • Returns the PangoLanguage for the default language currently in effect.

    Note that this can change over the life of an application.

    The default language is derived from the current locale. It determines, for example, whether GTK uses the right-to-left or left-to-right text direction.

    This function is equivalent to [funcPango.Language.get_default]. See that function for details.

    Returns Pango.Language

  • getInterfaceAge(): number
  • Returns the interface age as passed to libtool.

    If libtool means nothing to you, don't worry about it.

    Returns number

  • Get the direction of the current locale. This is the expected reading direction for text and UI.

    This function depends on the current locale being set with setlocale() and will default to setting the %GTK_TEXT_DIR_LTR direction otherwise. %GTK_TEXT_DIR_NONE will never be returned.

    GTK sets the default text direction according to the locale during gtk_init(), and you should normally use gtk_widget_get_direction() or gtk_widget_get_default_direction() to obtain the current direction.

    This function is only needed rare cases when the locale is changed after GTK has already been initialized. In this case, you can use it to update the default text direction as follows:

    #include <locale.h>

    static void
    update_locale (const char *new_locale)
    {
    setlocale (LC_ALL, new_locale);
    GtkTextDirection direction = gtk_get_locale_direction ();
    gtk_widget_set_default_direction (direction);
    }

    Returns Gtk.TextDirection

  • getMajorVersion(): number
  • Returns the major version number of the GTK library.

    For example, in GTK version 3.1.5 this is 3.

    This function is in the library, so it represents the GTK library your code is running against. Contrast with the %GTK_MAJOR_VERSION macro, which represents the major version of the GTK headers you have included when compiling your code.

    Returns number

  • getMicroVersion(): number
  • Returns the micro version number of the GTK library.

    For example, in GTK version 3.1.5 this is 5.

    This function is in the library, so it represents the GTK library your code is are running against. Contrast with the %GTK_MICRO_VERSION macro, which represents the micro version of the GTK headers you have included when compiling your code.

    Returns number

  • getMinorVersion(): number
  • Returns the minor version number of the GTK library.

    For example, in GTK version 3.1.5 this is 1.

    This function is in the library, so it represents the GTK library your code is are running against. Contrast with the %GTK_MINOR_VERSION macro, which represents the minor version of the GTK headers you have included when compiling your code.

    Returns number

  • hsvToRgb(h: number, s: number, v: number): [number, number, number]
  • Converts a color from HSV space to RGB.

    Input values must be in the [0.0, 1.0] range; output values will be in the same range.

    Parameters

    • h: number

      Hue

    • s: number

      Saturation

    • v: number

      Value

    Returns [number, number, number]

  • iconThemeErrorQuark(): Quark
  • init(): void
  • Call this function before using any other GTK functions in your GUI applications. It will initialize everything needed to operate the toolkit.

    If you are using GtkApplication, you don't have to call gtk_init() or gtk_init_check(); the GApplication::startup handler does it for you.

    This function will terminate your program if it was unable to initialize the windowing system for some reason. If you want your program to fall back to a textual interface you want to call gtk_init_check() instead.

    GTK calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore SIGPIPE signals, since these are almost never wanted in graphical applications. If you do need to handle SIGPIPE for some reason, reset the handler after gtk_init(), but notice that other libraries (e.g. libdbus or gvfs) might do similar things.

    Returns void

  • initCheck(): boolean
  • This function does the same work as gtk_init() with only a single change: It does not terminate the program if the windowing system can’t be initialized. Instead it returns %FALSE on failure.

    This way the application can fall back to some other means of communication with the user - for example a curses or command line interface.

    Returns boolean

  • isInitialized(): boolean
  • Use this function to check if GTK has been initialized with gtk_init() or gtk_init_check().

    Returns boolean

  • orderingFromCmpfunc(cmpfuncResult: number): Ordering
  • Converts the result of a GCompareFunc like strcmp() to a GtkOrdering value.

    Parameters

    • cmpfuncResult: number

      Result of a comparison function

    Returns Ordering

  • paperSizeGetDefault(): string
  • Returns the name of the default paper size, which depends on the current locale.

    Returns string

  • paperSizeGetPaperSizes(includeCustom: boolean): Gtk.PaperSize[]
  • Creates a list of known paper sizes.

    Parameters

    • includeCustom: boolean

      whether to include custom paper sizes as defined in the page setup dialog

    Returns Gtk.PaperSize[]

  • Creates a new GParamSpec instance for a property holding a GtkExpression.

    See g_param_spec_internal() for details on the property strings.

    Parameters

    • name: string

      canonical name of the property

    • nick: string

      a user-readable name for the property

    • blurb: string

      a user-readable description of the property

    • flags: GObject.ParamFlags

      flags for the property

    Returns ParamSpec

  • Runs a page setup dialog, letting the user modify the values from page_setup. If the user cancels the dialog, the returned GtkPageSetup is identical to the passed in page_setup, otherwise it contains the modifications done in the dialog.

    Note that this function may use a recursive mainloop to show the page setup dialog. See gtk_print_run_page_setup_dialog_async() if this is a problem.

    Parameters

    Returns Gtk.PageSetup

  • Runs a page setup dialog, letting the user modify the values from page_setup.

    In contrast to gtk_print_run_page_setup_dialog(), this function returns after showing the page setup dialog on platforms that support this, and calls done_cb from a signal handler for the ::response signal of the dialog.

    Parameters

    Returns void

  • recentManagerErrorQuark(): Quark
  • Renders an activity indicator (such as in GtkSpinner). The state %GTK_STATE_FLAG_CHECKED determines whether there is activity going on.

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • Renders an arrow pointing to angle.

    Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • angle: number

      arrow angle from 0 to 2 * %G_PI, being 0 the arrow pointing to the north

    • x: number

      X origin of the render area

    • y: number

      Y origin of the render area

    • size: number

      square side for render area

    Returns void

  • Renders the background of an element.

    Typical background rendering, showing the effect of background-image, border-width and border-radius:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • Renders a checkmark (as in a GtkCheckButton).

    The %GTK_STATE_FLAG_CHECKED state determines whether the check is on or off, and %GTK_STATE_FLAG_INCONSISTENT determines whether it should be marked as undefined.

    Typical checkmark rendering:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • Renders an expander (as used in GtkTreeView and GtkExpander) in the area defined by x, y, width, height. The state %GTK_STATE_FLAG_CHECKED determines whether the expander is collapsed or expanded.

    Typical expander rendering:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • Renders a focus indicator on the rectangle determined by x, y, width, height.

    Typical focus rendering:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • Renders a frame around the rectangle defined by x, y, width, height.

    Examples of frame rendering, showing the effect of border-image, border-color, border-width, border-radius and junctions:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • Renders a handle (as in GtkPaned and GtkWindow’s resize grip), in the rectangle determined by x, y, width, height.

    Handles rendered for the paned and grip classes:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • Renders the icon in texture at the specified x and y coordinates.

    This function will render the icon in texture at exactly its size, regardless of scaling factors, which may not be appropriate when drawing on displays with high pixel densities.

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • texture: Gdk.Texture

      a GdkTexture containing the icon to draw

    • x: number

      X position for the texture

    • y: number

      Y position for the texture

    Returns void

  • Renders a line from (x0, y0) to (x1, y1).

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x0: number

      X coordinate for the origin of the line

    • y0: number

      Y coordinate for the origin of the line

    • x1: number

      X coordinate for the end of the line

    • y1: number

      Y coordinate for the end of the line

    Returns void

  • Renders an option mark (as in a radio button), the %GTK_STATE_FLAG_CHECKED state will determine whether the option is on or off, and %GTK_STATE_FLAG_INCONSISTENT whether it should be marked as undefined.

    Typical option mark rendering:

    Parameters

    • context: Gtk.StyleContext

      a GtkStyleContext

    • cr: cairo.Context

      a cairo_t

    • x: number

      X origin of the rectangle

    • y: number

      Y origin of the rectangle

    • width: number

      rectangle width

    • height: number

      rectangle height

    Returns void

  • rgbToHsv(r: number, g: number, b: number): [number, number, number]
  • Converts a color from RGB space to HSV.

    Input values must be in the [0.0, 1.0] range; output values will be in the same range.

    Parameters

    • r: number

      Red

    • g: number

      Green

    • b: number

      Blue

    Returns [number, number, number]

  • showUri(parent: Gtk.Window, uri: string, timestamp: number): void
  • This function launches the default application for showing a given uri, or shows an error dialog if that fails.

    Parameters

    • parent: Gtk.Window

      parent window

    • uri: string

      the uri to show

    • timestamp: number

      timestamp from the event that triggered this call, or %GDK_CURRENT_TIME

    Returns void

  • This function launches the default application for showing a given uri.

    The callback will be called when the launch is completed. It should call gtk_show_uri_full_finish() to obtain the result.

    This is the recommended call to be used as it passes information necessary for sandbox helpers to parent their dialogs properly.

    Parameters

    • parent: Gtk.Window

      parent window

    • uri: string

      the uri to show

    • timestamp: number

      timestamp from the event that triggered this call, or %GDK_CURRENT_TIME

    • cancellable: Gio.Cancellable

      a GCancellable to cancel the launch

    Returns void

  • Finishes the gtk_show_uri() call and returns the result of the operation.

    Parameters

    • parent: Gtk.Window

      the GtkWindow passed to gtk_show_uri()

    • result: AsyncResult

      GAsyncResult that was passed to callback

    Returns boolean

  • testListAllTypes(): GType[]
  • Return the type ids that have been registered after calling gtk_test_register_all_types().

    Returns GType[]

  • testRegisterAllTypes(): void
  • Force registration of all core GTK object types.

    This allowes to refer to any of those object types via g_type_from_name() after calling this function.

    Returns void

  • testWidgetWaitForDraw(widget: Gtk.Widget): void
  • Enters the main loop and waits for widget to be “drawn”.

    In this context that means it waits for the frame clock of widget to have run a full styling, layout and drawing cycle.

    This function is intended to be used for syncing with actions that depend on widget relayouting or on interaction with the display server.

    Parameters

    Returns void

  • Obtains a tree_model and path from value of target type %GTK_TYPE_TREE_ROW_DATA.

    The returned path must be freed with gtk_tree_path_free().

    Parameters

    • value: any

      a GValue

    Returns [boolean, Gtk.TreeModel | null, Gtk.TreePath | null]

  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the ::row-deleted signal.

    Parameters

    Returns void

  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the ::row-inserted signal.

    Parameters

    Returns void

  • Retrieves the GtkExpression stored inside the given value, and acquires a reference to it.

    Parameters

    • value: any

      a GValue initialized with type GTK_TYPE_EXPRESSION

    Returns Gtk.Expression | null

  • Retrieves the GtkExpression stored inside the given value.

    Parameters

    • value: any

      a GValue initialized with type GTK_TYPE_EXPRESSION

    Returns Gtk.Expression | null

  • Stores the given GtkExpression inside value.

    The GValue will acquire a reference to the expression.

    Parameters

    • value: any

      a GValue initialized with type GTK_TYPE_EXPRESSION

    • expression: Gtk.Expression

      a GtkExpression

    Returns void

  • valueTakeExpression(value: any, expression: Gtk.Expression): void
  • Stores the given GtkExpression inside value.

    This function transfers the ownership of the expression to the GValue.

    Parameters

    • value: any

      a GValue initialized with type GTK_TYPE_EXPRESSION

    • expression: Gtk.Expression

      a GtkExpression

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method