/// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /** * 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` or create a bug report on https://github.com/gjsify/ts-for-gir * * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ... */ declare module 'gi://Adw?version=1' { // Module dependencies import type Gtk from 'gi://Gtk?version=4.0'; 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 'cairo'; 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 GModule from 'gi://GModule?version=2.0'; import type GdkPixbuf from 'gi://GdkPixbuf?version=2.0'; export namespace Adw { /** * Adw-1 */ /** * Describes the available system accent colors. */ /** * Describes the available system accent colors. */ export namespace AccentColor { export const $gtype: GObject.GType; } enum AccentColor { /** * Use a blue color (`#3584e4`). This is the default value. */ BLUE, /** * Use a teal color (`#2190a4`). */ TEAL, /** * Use a green color (`#3a944a`). */ GREEN, /** * Use a yellow color (`#c88800`). */ YELLOW, /** * Use a orange color (`#ed5b00`). */ ORANGE, /** * Use a red color (`#e62d42`). */ RED, /** * Use a pink color (`#d56199`). */ PINK, /** * Use a purple color (`#9141ac`). */ PURPLE, /** * Use a slate color (`#6f8396`). */ SLATE, } /** * Describes the possible states of an [class`Animation]`. * * The state can be controlled with [method`Animation`.play], * [method`Animation`.pause], [method`Animation`.resume], * [method`Animation`.reset] and [method`Animation`.skip]. */ /** * Describes the possible states of an [class`Animation]`. * * The state can be controlled with [method`Animation`.play], * [method`Animation`.pause], [method`Animation`.resume], * [method`Animation`.reset] and [method`Animation`.skip]. */ export namespace AnimationState { export const $gtype: GObject.GType; } enum AnimationState { /** * The animation hasn't started yet. */ IDLE, /** * The animation has been paused. */ PAUSED, /** * The animation is currently playing. */ PLAYING, /** * The animation has finished. */ FINISHED, } /** * Describes the available button styles for [class`Banner]`. * * New values may be added to this enumeration over time. * * See [property`Banner:`button-style]. */ /** * Describes the available button styles for [class`Banner]`. * * New values may be added to this enumeration over time. * * See [property`Banner:`button-style]. */ export namespace BannerButtonStyle { export const $gtype: GObject.GType; } enum BannerButtonStyle { /** * The default button style. */ DEFAULT, /** * A button in the suggested action style. */ SUGGESTED, } /** * Describes length types for [struct`BreakpointCondition]`. * * See [ctor`BreakpointCondition`.new_length]. * * New values may be added to this enumeration over time. */ /** * Describes length types for [struct`BreakpointCondition]`. * * See [ctor`BreakpointCondition`.new_length]. * * New values may be added to this enumeration over time. */ export namespace BreakpointConditionLengthType { export const $gtype: GObject.GType; } enum BreakpointConditionLengthType { /** * true if the width is greater than or * equal to the condition value */ MIN_WIDTH, /** * true if the width is less than or * equal to the condition value */ MAX_WIDTH, /** * true if the height is greater than or * equal to the condition value */ MIN_HEIGHT, /** * true if the height is less than or * equal to the condition value */ MAX_HEIGHT, } /** * Describes ratio types for [struct`BreakpointCondition]`. * * See [ctor`BreakpointCondition`.new_ratio]. * * New values may be added to this enumeration over time. */ /** * Describes ratio types for [struct`BreakpointCondition]`. * * See [ctor`BreakpointCondition`.new_ratio]. * * New values may be added to this enumeration over time. */ export namespace BreakpointConditionRatioType { export const $gtype: GObject.GType; } enum BreakpointConditionRatioType { /** * true if the aspect ratio is * greater than or equal to the condition value */ MIN_ASPECT_RATIO, /** * true if the aspect ratio is * less than or equal to the condition value */ MAX_ASPECT_RATIO, } /** * Describes title centering behavior of a [class`HeaderBar]` widget. */ /** * Describes title centering behavior of a [class`HeaderBar]` widget. */ export namespace CenteringPolicy { export const $gtype: GObject.GType; } enum CenteringPolicy { /** * Keep the title centered when possible */ LOOSE, /** * Keep the title centered at all cost */ STRICT, } /** * Application color schemes for [property`StyleManager:`color-scheme]. */ /** * Application color schemes for [property`StyleManager:`color-scheme]. */ export namespace ColorScheme { export const $gtype: GObject.GType; } enum ColorScheme { /** * Inherit the parent color-scheme. When set on the * `AdwStyleManager` returned by [func`StyleManager`.get_default], it's * equivalent to `ADW_COLOR_SCHEME_PREFER_LIGHT`. */ DEFAULT, /** * Always use light appearance. */ FORCE_LIGHT, /** * Use light appearance unless the system * prefers dark colors. */ PREFER_LIGHT, /** * Use dark appearance unless the system prefers * prefers light colors. */ PREFER_DARK, /** * Always use dark appearance. */ FORCE_DARK, } /** * Describes the available presentation modes for [class`Dialog]`. * * New values may be added to this enumeration over time. * * See [property`Dialog:`presentation-mode]. */ /** * Describes the available presentation modes for [class`Dialog]`. * * New values may be added to this enumeration over time. * * See [property`Dialog:`presentation-mode]. */ export namespace DialogPresentationMode { export const $gtype: GObject.GType; } enum DialogPresentationMode { /** * Switch between `ADW_DIALOG_FLOATING` and * `ADW_DIALOG_BOTTOM_SHEET` depending on available size. */ AUTO, /** * Present dialog as a centered floating window. */ FLOATING, /** * Present dialog as a bottom sheet. */ BOTTOM_SHEET, } /** * Describes the available easing functions for use with * [class`TimedAnimation]`. * * New values may be added to this enumeration over time. */ /** * Describes the available easing functions for use with * [class`TimedAnimation]`. * * New values may be added to this enumeration over time. */ export namespace Easing { export const $gtype: GObject.GType; } enum Easing { /** * Linear tweening. */ LINEAR, /** * Quadratic tweening. */ EASE_IN_QUAD, /** * Quadratic tweening, inverse of `ADW_EASE_IN_QUAD`. */ EASE_OUT_QUAD, /** * Quadratic tweening, combining `ADW_EASE_IN_QUAD` and * `ADW_EASE_OUT_QUAD`. */ EASE_IN_OUT_QUAD, /** * Cubic tweening. */ EASE_IN_CUBIC, /** * Cubic tweening, inverse of `ADW_EASE_IN_CUBIC`. */ EASE_OUT_CUBIC, /** * Cubic tweening, combining `ADW_EASE_IN_CUBIC` and * `ADW_EASE_OUT_CUBIC`. */ EASE_IN_OUT_CUBIC, /** * Quartic tweening. */ EASE_IN_QUART, /** * Quartic tweening, inverse of `ADW_EASE_IN_QUART`. */ EASE_OUT_QUART, /** * Quartic tweening, combining `ADW_EASE_IN_QUART` and * `ADW_EASE_OUT_QUART`. */ EASE_IN_OUT_QUART, /** * Quintic tweening. */ EASE_IN_QUINT, /** * Quintic tweening, inverse of `ADW_EASE_IN_QUINT`. */ EASE_OUT_QUINT, /** * Quintic tweening, combining `ADW_EASE_IN_QUINT` and * `ADW_EASE_OUT_QUINT`. */ EASE_IN_OUT_QUINT, /** * Sine wave tweening. */ EASE_IN_SINE, /** * Sine wave tweening, inverse of `ADW_EASE_IN_SINE`. */ EASE_OUT_SINE, /** * Sine wave tweening, combining `ADW_EASE_IN_SINE` and * `ADW_EASE_OUT_SINE`. */ EASE_IN_OUT_SINE, /** * Exponential tweening. */ EASE_IN_EXPO, /** * Exponential tweening, inverse of `ADW_EASE_IN_EXPO`. */ EASE_OUT_EXPO, /** * Exponential tweening, combining `ADW_EASE_IN_EXPO` and * `ADW_EASE_OUT_EXPO`. */ EASE_IN_OUT_EXPO, /** * Circular tweening. */ EASE_IN_CIRC, /** * Circular tweening, inverse of `ADW_EASE_IN_CIRC`. */ EASE_OUT_CIRC, /** * Circular tweening, combining `ADW_EASE_IN_CIRC` and * `ADW_EASE_OUT_CIRC`. */ EASE_IN_OUT_CIRC, /** * Elastic tweening, with offshoot on start. */ EASE_IN_ELASTIC, /** * Elastic tweening, with offshoot on end, inverse of * `ADW_EASE_IN_ELASTIC`. */ EASE_OUT_ELASTIC, /** * Elastic tweening, with offshoot on both ends, * combining `ADW_EASE_IN_ELASTIC` and `ADW_EASE_OUT_ELASTIC`. */ EASE_IN_OUT_ELASTIC, /** * Overshooting cubic tweening, with backtracking on start. */ EASE_IN_BACK, /** * Overshooting cubic tweening, with backtracking on end, * inverse of `ADW_EASE_IN_BACK`. */ EASE_OUT_BACK, /** * Overshooting cubic tweening, with backtracking on both * ends, combining `ADW_EASE_IN_BACK` and `ADW_EASE_OUT_BACK`. */ EASE_IN_OUT_BACK, /** * Exponentially decaying parabolic (bounce) tweening, * on start. */ EASE_IN_BOUNCE, /** * Exponentially decaying parabolic (bounce) tweening, * with bounce on end, inverse of `ADW_EASE_IN_BOUNCE`. */ EASE_OUT_BOUNCE, /** * Exponentially decaying parabolic (bounce) tweening, * with bounce on both ends, combining `ADW_EASE_IN_BOUNCE` and * `ADW_EASE_OUT_BOUNCE`. */ EASE_IN_OUT_BOUNCE, /** * Cubic bezier tweening, with control points in (0.25, 0.1) and (0.25, 1.0). * * Increases in velocity towards the middle of the animation, slowing back down * at the end. */ EASE, /** * Cubic bezier tweening, with control points in (0.42, 0.0) and (1.0, 1.0). * * Starts off slowly, with the speed of the animation increasing until complete. */ EASE_IN, /** * Cubic bezier tweening, with control points in (0.0, 0.0) and (0.58, 1.0). * * Starts quickly, slowing down the animation until complete. */ EASE_OUT, /** * Cubic bezier tweening, with control points in (0.42, 0.0) and (0.58, 1.0). * * Starts off slowly, speeds up in the middle, and then slows down again. */ EASE_IN_OUT, } /** * Describes the possible folding behavior of a [class`Flap]` widget. */ /** * Describes the possible folding behavior of a [class`Flap]` widget. */ export namespace FlapFoldPolicy { export const $gtype: GObject.GType; } enum FlapFoldPolicy { /** * Disable folding, the flap cannot reach narrow * sizes. */ NEVER, /** * Keep the flap always folded. */ ALWAYS, /** * Fold and unfold the flap based on available * space. */ AUTO, } /** * Describes transitions types of a [class`Flap]` widget. * * It determines the type of animation when transitioning between children in a * [class`Flap]` widget, as well as which areas can be swiped via * [property`Flap:`swipe-to-open] and [property`Flap:`swipe-to-close]. */ /** * Describes transitions types of a [class`Flap]` widget. * * It determines the type of animation when transitioning between children in a * [class`Flap]` widget, as well as which areas can be swiped via * [property`Flap:`swipe-to-open] and [property`Flap:`swipe-to-close]. */ export namespace FlapTransitionType { export const $gtype: GObject.GType; } enum FlapTransitionType { /** * The flap slides over the content, which is * dimmed. When folded, only the flap can be swiped. */ OVER, /** * The content slides over the flap. Only the * content can be swiped. */ UNDER, /** * The flap slides offscreen when hidden, * neither the flap nor content overlap each other. Both widgets can be * swiped. */ SLIDE, } /** * Determines when [class`Flap]` and [class`Leaflet]` will fold. */ /** * Determines when [class`Flap]` and [class`Leaflet]` will fold. */ export namespace FoldThresholdPolicy { export const $gtype: GObject.GType; } enum FoldThresholdPolicy { /** * Folding is based on the minimum size */ MINIMUM, /** * Folding is based on the natural size */ NATURAL, } /** * Describes what [class`InlineViewSwitcher]` toggles display. * * * * inline-view-switcher-display-modes * */ /** * Describes what [class`InlineViewSwitcher]` toggles display. * * * * inline-view-switcher-display-modes * */ export namespace InlineViewSwitcherDisplayMode { export const $gtype: GObject.GType; } enum InlineViewSwitcherDisplayMode { /** * Toggles only display labels. */ LABELS, /** * Toggles only display icons. */ ICONS, /** * Toggles display both icons and labels. */ BOTH, } /** * Describes line justify behaviors in a [class`WrapLayout]` or [class`WrapBox]`. * * See [property`WrapLayout:`justify] and [property`WrapBox:`justify]. */ /** * Describes line justify behaviors in a [class`WrapLayout]` or [class`WrapBox]`. * * See [property`WrapLayout:`justify] and [property`WrapBox:`justify]. */ export namespace JustifyMode { export const $gtype: GObject.GType; } enum JustifyMode { /** * Don't justify children within a line. */ NONE, /** * Stretch each child within the line, keeping consistent * spacing, so that the line fills the entire length. */ FILL, /** * Increase spacing between children, moving the children * so that the first and last child are aligned with the beginning and end * of the line. If the line only contains a single widget, it will be * stretched regardless. */ SPREAD, } /** * Describes the possible transitions in a [class`Leaflet]` widget. * * New values may be added to this enumeration over time. */ /** * Describes the possible transitions in a [class`Leaflet]` widget. * * New values may be added to this enumeration over time. */ export namespace LeafletTransitionType { export const $gtype: GObject.GType; } enum LeafletTransitionType { /** * Cover the old page or uncover the new page, sliding from or towards the end according to orientation, text direction and children order */ OVER, /** * Uncover the new page or cover the old page, sliding from or towards the start according to orientation, text direction and children order */ UNDER, /** * Slide from left, right, up or down according to the orientation, text direction and the children order */ SLIDE, } /** * Describes length units. * * | Unit | Regular Text | Large Text | * | ---- | ------------ | ---------- | * | 1px | 1px | 1px | * | 1pt | 1.333333px | 1.666667px | * | 1sp | 1px | 1.25px | * * New values may be added to this enumeration over time. */ /** * Describes length units. * * | Unit | Regular Text | Large Text | * | ---- | ------------ | ---------- | * | 1px | 1px | 1px | * | 1pt | 1.333333px | 1.666667px | * | 1sp | 1px | 1.25px | * * New values may be added to this enumeration over time. */ export namespace LengthUnit { export const $gtype: GObject.GType; } enum LengthUnit { /** * pixels */ PX, /** * points, changes with text scale factor */ PT, /** * scale independent pixels, changes with text scale factor */ SP, } /** * Describes the direction of a swipe navigation gesture. */ /** * Describes the direction of a swipe navigation gesture. */ export namespace NavigationDirection { export const $gtype: GObject.GType; } enum NavigationDirection { /** * Corresponds to start or top, depending on orientation and text direction */ BACK, /** * Corresponds to end or bottom, depending on orientation and text direction */ FORWARD, } /** * Describes child packing behavior in a [class`WrapLayout]` or [class`WrapBox]`. * * See [property`WrapLayout:`pack-direction] and * [property`WrapBox:`pack-direction]. */ /** * Describes child packing behavior in a [class`WrapLayout]` or [class`WrapBox]`. * * See [property`WrapLayout:`pack-direction] and * [property`WrapBox:`pack-direction]. */ export namespace PackDirection { export const $gtype: GObject.GType; } enum PackDirection { /** * Pack children from left to right for LTR languages, * or top to bottom vertically. */ START_TO_END, /** * Pack children from right to left for LTR languages, * or bottom to top vertically. */ END_TO_START, } /** * Describes the possible styles of [class`AlertDialog]` response buttons. * * See [method`AlertDialog`.set_response_appearance]. */ /** * Describes the possible styles of [class`AlertDialog]` response buttons. * * See [method`AlertDialog`.set_response_appearance]. */ export namespace ResponseAppearance { export const $gtype: GObject.GType; } enum ResponseAppearance { /** * the default appearance. */ DEFAULT, /** * used to denote important responses such as the * affirmative action. */ SUGGESTED, /** * used to draw attention to the potentially damaging * consequences of using the response. This appearance acts as a warning to * the user. */ DESTRUCTIVE, } /** * Describes the possible transitions in a [class`Squeezer]` widget. */ /** * Describes the possible transitions in a [class`Squeezer]` widget. */ export namespace SqueezerTransitionType { export const $gtype: GObject.GType; } enum SqueezerTransitionType { /** * No transition */ NONE, /** * A cross-fade */ CROSSFADE, } /** * [class`Toast]` behavior when another toast is already displayed. */ /** * [class`Toast]` behavior when another toast is already displayed. */ export namespace ToastPriority { export const $gtype: GObject.GType; } enum ToastPriority { /** * the toast will be queued if another toast is * already displayed. */ NORMAL, /** * the toast will be displayed immediately, pushing * the previous toast into the queue instead. */ HIGH, } /** * Describes the possible top or bottom bar styles in an [class`ToolbarView]` * widget. * * `ADW_TOOLBAR_FLAT` is suitable for simple content, such as * [class`StatusPage]` or [class`PreferencesPage]`, where the background at the * top and bottom parts of the page is uniform. Additionally, windows with * sidebars should always use this style. * * * * toolbar-view-flat-1 * * * * toolbar-view-flat-2 * * * `ADW_TOOLBAR_RAISED` style is suitable for content such as * [utility panes](https://developer.gnome.org/hig/patterns/containers/utility-panes.html), * where some elements are directly adjacent to the top/bottom bars, or * [class`TabView]`, where each page can have a different background. * * `ADW_TOOLBAR_RAISED_BORDER` style is similar to `ADW_TOOLBAR_RAISED`, but * with the shadow replaced with a more subtle border. It's intended to be used * in applications like image viewers, where a shadow over the content might be * undesired. * * * * toolbar-view-raised * * * * toolbar-view-raised-border * * * See [property`ToolbarView:`top-bar-style] and * [property`ToolbarView:`bottom-bar-style]. * * New values may be added to this enumeration over time. */ /** * Describes the possible top or bottom bar styles in an [class`ToolbarView]` * widget. * * `ADW_TOOLBAR_FLAT` is suitable for simple content, such as * [class`StatusPage]` or [class`PreferencesPage]`, where the background at the * top and bottom parts of the page is uniform. Additionally, windows with * sidebars should always use this style. * * * * toolbar-view-flat-1 * * * * toolbar-view-flat-2 * * * `ADW_TOOLBAR_RAISED` style is suitable for content such as * [utility panes](https://developer.gnome.org/hig/patterns/containers/utility-panes.html), * where some elements are directly adjacent to the top/bottom bars, or * [class`TabView]`, where each page can have a different background. * * `ADW_TOOLBAR_RAISED_BORDER` style is similar to `ADW_TOOLBAR_RAISED`, but * with the shadow replaced with a more subtle border. It's intended to be used * in applications like image viewers, where a shadow over the content might be * undesired. * * * * toolbar-view-raised * * * * toolbar-view-raised-border * * * See [property`ToolbarView:`top-bar-style] and * [property`ToolbarView:`bottom-bar-style]. * * New values may be added to this enumeration over time. */ export namespace ToolbarStyle { export const $gtype: GObject.GType; } enum ToolbarStyle { /** * No background, shadow only for scrolled content */ FLAT, /** * Opaque background with a persistent shadow */ RAISED, /** * Opaque background with a persistent border */ RAISED_BORDER, } /** * Describes the adaptive modes of [class`ViewSwitcher]`. */ /** * Describes the adaptive modes of [class`ViewSwitcher]`. */ export namespace ViewSwitcherPolicy { export const $gtype: GObject.GType; } enum ViewSwitcherPolicy { /** * Force the narrow mode */ NARROW, /** * Force the wide mode */ WIDE, } /** * Describes line wrapping behavior in a [class`WrapLayout]` or [class`WrapBox]`. * * See [property`WrapLayout:`wrap-policy] and [property`WrapBox:`wrap-policy]. */ /** * Describes line wrapping behavior in a [class`WrapLayout]` or [class`WrapBox]`. * * See [property`WrapLayout:`wrap-policy] and [property`WrapBox:`wrap-policy]. */ export namespace WrapPolicy { export const $gtype: GObject.GType; } enum WrapPolicy { /** * Fit as many children into each line as possible, shrinking * them down to their minimum size before wrapping to the next line. */ MINIMUM, /** * Wrap to the next line as soon as the previous line cannot * fit any more children without shrinking them past their natural size. */ NATURAL, } /** * Indicates an [class`Animation]` with an infinite duration. * * This value is mostly used internally. */ const DURATION_INFINITE: number; /** * Adwaita major version component (e.g. 1 if the version is 1.2.3). */ const MAJOR_VERSION: number; /** * Adwaita micro version component (e.g. 3 if the version is 1.2.3). */ const MICRO_VERSION: number; /** * Adwaita minor version component (e.g. 2 if the version is 1.2.3). */ const MINOR_VERSION: number; /** * Adwaita version, encoded as a string, useful for printing and * concatenation. */ const VERSION_S: string; /** * Converts `self` to a `GdkRGBA` representing its background color. * * The matching foreground color is white. * @param self an accent color */ function accent_color_to_rgba(self: AccentColor | null): Gdk.RGBA; /** * Converts `self` to a `GdkRGBA` representing its standalone color. * * It will typically be darker for light background, and lighter for dark * background, ensuring contrast. * @param self an accent color * @param dark Whether to calculate standalone color for light or dark background */ function accent_color_to_standalone_rgba(self: AccentColor | null, dark: boolean): Gdk.RGBA; /** * Parses a condition from a string. * * Length conditions are specified as `: []`, where: * * - `` can be `min-width`, `max-width`, `min-height` or `max-height` * - `` is a fractional number * - `` can be `px`, `pt` or `sp` * * If the unit is omitted, `px` is assumed. * * See [ctor`BreakpointCondition`.new_length]. * * Examples: * * - `min-width: 500px` * - `min-height: 400pt` * - `max-width: 100sp` * - `max-height: 500` * * Ratio conditions are specified as `: [/]`, where: * * - `` can be `min-aspect-ratio` or `max-aspect-ratio` * - `` and `` are integer numbers * * See [ctor`BreakpointCondition`.new_ratio]. * * The ratio is represented as `` divided by ``. * * If `` is omitted, it's assumed to be 1. * * Examples: * * - `min-aspect-ratio: 4/3` * - `max-aspect-ratio: 1` * * The logical operators `and`, `or` can be used to compose a complex condition * as follows: * * - ` and `: the condition is true when both * ``s are true, same as when using * [ctor`BreakpointCondition`.new_and] * - ` or `: the condition is true when either of the * ``s is true, same as when using * [ctor`BreakpointCondition`.new_or] * * Examples: * * - `min-width: 400px and max-aspect-ratio: 4/3` * - `max-width: 360sp or max-width: 360px` * * Conditions can be further nested using parentheses, for example: * * - `min-width: 400px and (max-aspect-ratio: 4/3 or max-height: 400px)` * * If parentheses are omitted, the first operator takes priority. * @param str the string specifying the condition * @returns the parsed condition */ function breakpoint_condition_parse(str: string): BreakpointCondition; /** * Computes easing with `easing` for `value`. * * `value` should generally be in the [0, 1] range. * @param self an easing value * @param value a value to ease * @returns the easing for @value */ function easing_ease(self: Easing | null, value: number): number; /** * Checks whether animations are enabled for `widget`. * * This should be used when implementing an animated widget to know whether to * animate it or not. * @param widget a `GtkWidget` * @returns whether animations are enabled for @widget */ function get_enable_animations(widget: Gtk.Widget): boolean; /** * Returns the major version number of the Adwaita library. * * For example, in libadwaita version 1.2.3 this is 1. * * This function is in the library, so it represents the libadwaita library your * code is running against. Contrast with the [const`MAJOR_VERSION]` constant, * which represents the major version of the libadwaita headers you have * included when compiling your code. * @returns the major version number of the Adwaita library */ function get_major_version(): number; /** * Returns the micro version number of the Adwaita library. * * For example, in libadwaita version 1.2.3 this is 3. * * This function is in the library, so it represents the libadwaita library your * code is running against. Contrast with the [const`MAJOR_VERSION]` constant, * which represents the micro version of the libadwaita headers you have * included when compiling your code. * @returns the micro version number of the Adwaita library */ function get_micro_version(): number; /** * Returns the minor version number of the Adwaita library. * * For example, in libadwaita version 1.2.3 this is 2. * * This function is in the library, so it represents the libadwaita library your * code is running against. Contrast with the [const`MAJOR_VERSION]` constant, * which represents the minor version of the libadwaita headers you have * included when compiling your code. * @returns the minor version number of the Adwaita library */ function get_minor_version(): number; /** * Initializes Libadwaita. * * This function can be used instead of [func`Gtk`.init] as it initializes GTK * implicitly. * * There's no need to call this function if you're using [class`Application]`. * * If Libadwaita has already been initialized, the function will simply return. * * This makes sure translations, types, themes, and icons for the Adwaita * library are set up properly. */ function init(): void; /** * Use this function to check if libadwaita has been initialized with * [func`init]`. * @returns the initialization status */ function is_initialized(): boolean; /** * Converts `value` from pixels to `unit`. * @param unit a length unit * @param value a value in pixels * @param settings settings to use, or `NULL` for default settings * @returns the length in @unit */ function length_unit_from_px(unit: LengthUnit | null, value: number, settings?: Gtk.Settings | null): number; /** * Converts `value` from `unit` to pixels. * @param unit a length unit * @param value a value in @unit * @param settings settings to use, or `NULL` for default settings * @returns the length in pixels */ function length_unit_to_px(unit: LengthUnit | null, value: number, settings?: Gtk.Settings | null): number; /** * Computes the linear interpolation between `a` and `b` for `t`. * @param a the start * @param b the end * @param t the interpolation rate * @returns the computed value */ function lerp(a: number, b: number, t: number): number; /** * Adjusts `rgba` to be suitable as a standalone color. * * It will typically be darker for light background, and lighter for dark * background, ensuring contrast. * @param rgba a background color * @param dark Whether to calculate standalone color for light or dark background */ function rgba_to_standalone(rgba: Gdk.RGBA, dark: boolean): Gdk.RGBA; interface AnimationTargetFunc { (value: number): void; } /** * Describes available shortcuts in an [class`TabView]`. * * Shortcuts can be set with [property`TabView:`shortcuts], or added/removed * individually with [method`TabView`.add_shortcuts] and * [method`TabView`.remove_shortcuts]. * * New values may be added to this enumeration over time. */ /** * Describes available shortcuts in an [class`TabView]`. * * Shortcuts can be set with [property`TabView:`shortcuts], or added/removed * individually with [method`TabView`.add_shortcuts] and * [method`TabView`.remove_shortcuts]. * * New values may be added to this enumeration over time. */ export namespace TabViewShortcuts { export const $gtype: GObject.GType; } enum TabViewShortcuts { /** * No shortcuts */ NONE, /** * Ctrl+Tab - switch to the next page */ CONTROL_TAB, /** * Shift+Ctrl+Tab - switch to the previous * page */ CONTROL_SHIFT_TAB, /** * Ctrl+Page Up - switch to the previous page */ CONTROL_PAGE_UP, /** * Ctrl+Page Down - switch to the next page */ CONTROL_PAGE_DOWN, /** * Ctrl+Home - switch to the first page */ CONTROL_HOME, /** * Ctrl+End - switch to the last page */ CONTROL_END, /** * Ctrl+Shift+Page Up - move the selected * page backward */ CONTROL_SHIFT_PAGE_UP, /** * Ctrl+Shift+Page Down - move the selected * page forward */ CONTROL_SHIFT_PAGE_DOWN, /** * Ctrl+Shift+Home - move the selected page * at the start */ CONTROL_SHIFT_HOME, /** * Ctrl+Shift+End - move the current page at * the end */ CONTROL_SHIFT_END, /** * Alt+19 - switch to pages 1-9 */ ALT_DIGITS, /** * Alt+0 - switch to page 10 */ ALT_ZERO, /** * All of the shortcuts */ ALL_SHORTCUTS, } namespace AboutDialog { // Signal callback interfaces interface ActivateLink { (uri: string): boolean; } // Constructor properties interface interface ConstructorProps extends Dialog.ConstructorProps, Gtk.Accessible.ConstructorProps, Gtk.Buildable.ConstructorProps, Gtk.ConstraintTarget.ConstructorProps, Gtk.ShortcutManager.ConstructorProps { application_icon: string; applicationIcon: string; application_name: string; applicationName: string; artists: string[]; comments: string; copyright: string; debug_info: string; debugInfo: string; debug_info_filename: string; debugInfoFilename: string; designers: string[]; developer_name: string; developerName: string; developers: string[]; documenters: string[]; issue_url: string; issueUrl: string; license: string; license_type: Gtk.License; licenseType: Gtk.License; release_notes: string; releaseNotes: string; release_notes_version: string; releaseNotesVersion: string; support_url: string; supportUrl: string; translator_credits: string; translatorCredits: string; version: string; website: string; } } /** * A dialog showing information about the application. * * * * about-dialog * * * an about dialog is typically opened when the user activates the `About …` * item in the application's primary menu. All parts of the dialog are optional. * * ## Main page * * `AdwAboutDialog` prominently displays the application's icon, name, developer * name and version. They can be set with the [property`AboutDialog:`application-icon], * [property`AboutDialog:`application-name], * [property`AboutDialog:`developer-name] and [property`AboutDialog:`version] * respectively. * * ## What's New * * `AdwAboutDialog` provides a way for applications to display their release * notes, set with the [property`AboutDialog:`release-notes] property. * * Release notes are formatted the same way as * [AppStream descriptions](https://freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description). * * The supported formatting options are: * * * Paragraph (`

`) * * Ordered list (`

    `), with list items (`
  1. `) * * Unordered list (`