UNPKG

@react-gnome/gjs-esm-types

Version:

TypeScript module declarations for GJS ESM modules.

1,563 lines (1,528 loc) 1.07 MB
/* * 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 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 "gi://cairo?version=1.0"; import type PangoCairo from "gi://PangoCairo?version=1.0"; import type Pango from "gi://Pango?version=1.0"; import type HarfBuzz from "gi://HarfBuzz?version=0.0"; import type freetype2 from "gi://freetype2?version=2.0"; import type Gio from "gi://Gio?version=2.0"; import type GdkPixbuf from "gi://GdkPixbuf?version=2.0"; import type GModule from "gi://GModule?version=2.0"; declare module "gi://Adw?version=1" { /** * 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]. */ 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 title centering behavior of a [class`HeaderBar]` widget. */ 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]. */ 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 easing functions for use with * [class`TimedAnimation]`. * * New values may be added to this enumeration over time. */ 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, } /** * Describes the possible folding behavior of a [class`Flap]` widget. */ 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]. * * New values may be added to this enum over time. */ 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. */ enum FoldThresholdPolicy { /** * Folding is based on the minimum size */ MINIMUM, /** * Folding is based on the natural size */ NATURAL, } /** * Describes the possible transitions in a [class`Leaflet]` widget. * * New values may be added to this enumeration over time. */ 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 the direction of a swipe navigation gesture. */ 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 the possible styles of [class`MessageDialog]` response buttons. * * See [method`MessageDialog`.set_response_appearance]. */ 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. */ enum SqueezerTransitionType { /** * No transition */ NONE, /** * A cross-fade */ CROSSFADE, } /** * [class`Toast]` behavior when another toast is already displayed. */ 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 adaptive modes of [class`ViewSwitcher]`. */ enum ViewSwitcherPolicy { /** * Force the narrow mode */ NARROW, /** * Force the wide mode */ WIDE, } /** * 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. * @bitfield */ enum TabViewShortcuts { /** * No shortcuts */ NONE, /** * <kbd>Ctrl</kbd>+<kbd>Tab</kbd> - switch to the next page, with looping */ CONTROL_TAB, /** * <kbd>Shift</kbd>+<kbd>Ctrl</kbd>+<kbd>Tab</kbd> - switch to the previous * page, with looping */ CONTROL_SHIFT_TAB, /** * <kbd>Ctrl</kbd>+<kbd>Page Up</kbd> - switch to the previous page */ CONTROL_PAGE_UP, /** * <kbd>Ctrl</kbd>+<kbd>Page Down</kbd> - switch to the next page */ CONTROL_PAGE_DOWN, /** * <kbd>Ctrl</kbd>+<kbd>Home</kbd> - switch to the first page */ CONTROL_HOME, /** * <kbd>Ctrl</kbd>+<kbd>End</kbd> - switch to the last page */ CONTROL_END, /** * <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Up</kbd> - move the selected * page backward */ CONTROL_SHIFT_PAGE_UP, /** * <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Down</kbd> - move the selected * page forward */ CONTROL_SHIFT_PAGE_DOWN, /** * <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Home</kbd> - move the selected page * at the start */ CONTROL_SHIFT_HOME, /** * <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>End</kbd> - move the current page at * the end */ CONTROL_SHIFT_END, /** * <kbd>Alt</kbd>+<kbd>1</kbd>⋯<kbd>9</kbd> - switch to pages 1-9 */ ALT_DIGITS, /** * <kbd>Alt</kbd>+<kbd>0</kbd> - switch to page 10 */ ALT_ZERO, /** * All of the shortcuts */ ALL_SHORTCUTS, } /** * 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 | null; /** * 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, 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; /** * 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; /** * Prototype for animation targets based on user callbacks. * @callback * @param value The animation value */ interface AnimationTargetFunc { (value: number): void; } module Swipeable { // Constructor properties interface interface ConstructorProperties extends Gtk.Widget.ConstructorProperties, GObject.Object.ConstructorProperties {} } interface Swipeable extends Gtk.Widget { // Owm methods of Adw-1.Adw.Swipeable /** * Gets the progress `self` will snap back to after the gesture is canceled. * @returns the cancel progress, unitless */ get_cancel_progress(): number; /** * Gets the swipe distance of `self`. * * This corresponds to how many pixels 1 unit represents. * @returns the swipe distance in pixels */ get_distance(): number; /** * Gets the current progress of `self`. * @returns the current progress, unitless */ get_progress(): number; /** * Gets the snap points of `self`. * * Each snap point represents a progress value that is considered acceptable to * end the swipe on. * @returns the snap points */ get_snap_points(): number[]; /** * Gets the area `self` can start a swipe from for the given direction and * gesture type. * * This can be used to restrict swipes to only be possible from a certain area, * for example, to only allow edge swipes, or to have a draggable element and * ignore swipes elsewhere. * * If not implemented, the default implementation returns the allocation of * `self,` allowing swipes from anywhere. * @param navigation_direction the direction of the swipe * @param is_drag whether the swipe is caused by a dragging gesture */ get_swipe_area( navigation_direction: NavigationDirection, is_drag: boolean ): /* rect */ Gdk.Rectangle; // Own virtual methods of Adw-1.Adw.Swipeable /** * Gets the progress `self` will snap back to after the gesture is canceled. * @virtual * @returns the cancel progress, unitless */ vfunc_get_cancel_progress(): number; /** * Gets the swipe distance of `self`. * * This corresponds to how many pixels 1 unit represents. * @virtual * @returns the swipe distance in pixels */ vfunc_get_distance(): number; /** * Gets the current progress of `self`. * @virtual * @returns the current progress, unitless */ vfunc_get_progress(): number; /** * Gets the snap points of `self`. * * Each snap point represents a progress value that is considered acceptable to * end the swipe on. * @virtual * @returns the snap points */ vfunc_get_snap_points(): number[]; /** * Gets the area `self` can start a swipe from for the given direction and * gesture type. * * This can be used to restrict swipes to only be possible from a certain area, * for example, to only allow edge swipes, or to have a draggable element and * ignore swipes elsewhere. * * If not implemented, the default implementation returns the allocation of * `self,` allowing swipes from anywhere. * @virtual * @param navigation_direction the direction of the swipe * @param is_drag whether the swipe is caused by a dragging gesture */ vfunc_get_swipe_area( navigation_direction: NavigationDirection, is_drag: boolean ): /* rect */ Gdk.Rectangle; // Class property signals of Adw-1.Adw.Swipeable connect( sigName: "notify::can-focus", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::can-focus", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::can-focus", ...args: any[]): void; connect( sigName: "notify::can-target", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::can-target", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::can-target", ...args: any[]): void; connect( sigName: "notify::css-classes", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::css-classes", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::css-classes", ...args: any[]): void; connect( sigName: "notify::css-name", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::css-name", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::css-name", ...args: any[]): void; connect( sigName: "notify::cursor", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::cursor", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::cursor", ...args: any[]): void; connect( sigName: "notify::focus-on-click", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::focus-on-click", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::focus-on-click", ...args: any[]): void; connect( sigName: "notify::focusable", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::focusable", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::focusable", ...args: any[]): void; connect( sigName: "notify::halign", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::halign", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::halign", ...args: any[]): void; connect( sigName: "notify::has-default", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::has-default", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::has-default", ...args: any[]): void; connect( sigName: "notify::has-focus", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::has-focus", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::has-focus", ...args: any[]): void; connect( sigName: "notify::has-tooltip", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::has-tooltip", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::has-tooltip", ...args: any[]): void; connect( sigName: "notify::height-request", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::height-request", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::height-request", ...args: any[]): void; connect( sigName: "notify::hexpand", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::hexpand", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::hexpand", ...args: any[]): void; connect( sigName: "notify::hexpand-set", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::hexpand-set", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::hexpand-set", ...args: any[]): void; connect( sigName: "notify::layout-manager", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::layout-manager", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::layout-manager", ...args: any[]): void; connect( sigName: "notify::margin-bottom", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::margin-bottom", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::margin-bottom", ...args: any[]): void; connect( sigName: "notify::margin-end", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::margin-end", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::margin-end", ...args: any[]): void; connect( sigName: "notify::margin-start", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::margin-start", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::margin-start", ...args: any[]): void; connect( sigName: "notify::margin-top", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::margin-top", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::margin-top", ...args: any[]): void; connect( sigName: "notify::name", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::name", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::name", ...args: any[]): void; connect( sigName: "notify::opacity", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::opacity", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::opacity", ...args: any[]): void; connect( sigName: "notify::overflow", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::overflow", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::overflow", ...args: any[]): void; connect( sigName: "notify::parent", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::parent", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::parent", ...args: any[]): void; connect( sigName: "notify::receives-default", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::receives-default", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::receives-default", ...args: any[]): void; connect( sigName: "notify::root", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::root", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::root", ...args: any[]): void; connect( sigName: "notify::scale-factor", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::scale-factor", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::scale-factor", ...args: any[]): void; connect( sigName: "notify::sensitive", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::sensitive", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::sensitive", ...args: any[]): void; connect( sigName: "notify::tooltip-markup", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::tooltip-markup", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::tooltip-markup", ...args: any[]): void; connect( sigName: "notify::tooltip-text", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::tooltip-text", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::tooltip-text", ...args: any[]): void; connect( sigName: "notify::valign", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::valign", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::valign", ...args: any[]): void; connect( sigName: "notify::vexpand", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::vexpand", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::vexpand", ...args: any[]): void; connect( sigName: "notify::vexpand-set", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::vexpand-set", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::vexpand-set", ...args: any[]): void; connect( sigName: "notify::visible", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::visible", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::visible", ...args: any[]): void; connect( sigName: "notify::width-request", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::width-request", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::width-request", ...args: any[]): void; connect( sigName: "notify::accessible-role", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; connect_after( sigName: "notify::accessible-role", callback: ($obj: Swipeable, pspec: GObject.ParamSpec) => void ): number; emit(sigName: "notify::accessible-role", ...args: any[]): void; connect(sigName: string, callback: (...args: any[]) => void): number; connect_after(sigName: string, callback: (...args: any[]) => void): number; emit(sigName: string, ...args: any[]): void; disconnect(id: number): void; } /** * An interface for swipeable widgets. * * The `AdwSwipeable` interface is implemented by all swipeable widgets. * * See [class`SwipeTracker]` for details about implementing it. * @interface */ class Swipeable extends GObject.Object { // Own properties of Adw-1.Adw.Swipeable static name: string; static $gtype: GObject.GType<Swipeable>; // Constructors of Adw-1.Adw.Swipeable constructor(config?: Swipeable.ConstructorProperties); _init(config?: Swipeable.ConstructorProperties): void; } module AboutWindow { // Signal callback interfaces /** * Signal callback interface for `activate-link` */ interface ActivateLinkSignalCallback { ($obj: AboutWindow, uri: string | null): boolean; } // Constructor properties interface interface ConstructorProperties extends Gtk.Accessible.ConstructorProperties, Gtk.Buildable.ConstructorProperties, Gtk.ConstraintTarget.ConstructorProperties, Gtk.Native.ConstructorProperties, Gtk.Root.ConstructorProperties, Gtk.ShortcutManager.ConstructorProperties, Window.ConstructorProperties { // Own constructor properties of Adw-1.Adw.AboutWindow /** * The name of the application icon. * * The icon is displayed at the top of the main page. */ application_icon?: string | null; /** * The name of the application. * * The name is displayed at the top of the main page. */ application_name?: string | null; /** * The list of artists of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`developers] * * [property`AboutWindow:`designers] * * [property`AboutWindow:`documenters] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ artists?: string[] | null; /** * The comments about the application. * * Comments will be shown on the Details page, above links. * * Unlike [property`Gtk`.AboutDialog:comments], this string can be long and * detailed. It can also contain links and Pango markup. */ comments?: string | null; /** * The copyright information. * * This should be a short string of one or two lines, for example: * `© 2022 Example`. * * The copyright information will be displayed on the Legal page, above the * application license. * * [method`AboutWindow`.add_legal_section] can be used to add copyright * information for the application dependencies or other components. */ copyright?: string | null; /** * The debug information. * * Debug information will be shown on the Troubleshooting page. It's intended * to be attached to issue reports when reporting issues against the * application. * * `AdwAboutWindow` provides a quick way to save debug information to a file. * When saving, [property`AboutWindow:`debug-info-filename] would be used as * the suggested filename. * * Debug information cannot contain markup or links. */ debug_info?: string | null; /** * The debug information filename. * * It will be used as the suggested filename when saving debug information to * a file. * * See [property`AboutWindow:`debug-info]. */ debug_info_filename?: string | null; /** * The list of designers of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`developers] * * [property`AboutWindow:`artists] * * [property`AboutWindow:`documenters] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ designers?: string[] | null; /** * The developer name. * * The developer name is displayed on the main page, under the application * name. * * If the application is developed by multiple people, the developer name can * be set to values like "AppName team", "AppName developers" or * "The AppName project", and the individual contributors can be listed on the * Credits page, with [property`AboutWindow:`developers] and related * properties. */ developer_name?: string | null; /** * The list of developers of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`designers] * * [property`AboutWindow:`artists] * * [property`AboutWindow:`documenters] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ developers?: string[] | null; /** * The list of documenters of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`developers] * * [property`AboutWindow:`designers] * * [property`AboutWindow:`artists] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ documenters?: string[] | null; /** * The URL for the application's issue tracker. * * The issue tracker link is displayed on the main page. */ issue_url?: string | null; /** * The license text. * * This can be used to set a custom text for the license if it can't be set * via [property`AboutWindow:`license-type]. * * When set, [property`AboutWindow:`license-type] will be set to * `GTK_LICENSE_CUSTOM`. * * The license text will be displayed on the Legal page, below the copyright * information. * * License text can contain Pango markup and links. * * [method`AboutWindow`.add_legal_section] can be used to add license * information for the application dependencies or other components. */ license?: string | null; /** * The license type. * * Allows to set the application's license froma list of known licenses. * * If the application's license is not in the list, * [property`AboutWindow:`license] can be used instead. The license type will * be automatically set to `GTK_LICENSE_CUSTOM` in that case. * * If set to `GTK_LICENSE_UNKNOWN`, no information will be displayed. * * If the license type is different from `GTK_LICENSE_CUSTOM`. * [property`AboutWindow:`license] will be cleared out. * * The license description will be displayed on the Legal page, below the * copyright information. * * [method`AboutWindow`.add_legal_section] can be used to add license * information for the application dependencies or other components. */ license_type?: Gtk.License | null; /** * The release notes of the application. * * Release notes are displayed on the the What's New page. * * 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 (`<p>`) * * Ordered list (`<ol>`), with list items (`<li>`) * * Unordered list (`<ul>`), with list items (`<li>`) * * Within paragraphs and list items, emphasis (`<em>`) and inline code * (`<code>`) text styles are supported. The emphasis is rendered in italic, * while inline code is shown in a monospaced font. * * Any text outside paragraphs or list items is ignored. * * Nested lists are not supported. * * `AdwAboutWindow` displays the version above the release notes. If set, the * [property`AboutWindow:`release-notes-version] of the property will be used * as the version; otherwise, [property`AboutWindow:`version] is used. */ release_notes?: string | null; /** * The version described by the application's release notes. * * The release notes version is displayed on the What's New page, above the * release notes. * * If not set, [property`AboutWindow:`version] will be used instead. * * For example, an application with the current version 2.0.2 might want to * keep the release notes from 2.0.0, and set the release notes version * accordingly. * * See [property`AboutWindow:`release-notes]. */ release_notes_version?: string | null; /** * The URL of the application's support page. * * The support page link is displayed on the main page. */ support_url?: string | null; /** * The translator credits string. * * It will be displayed on the Credits page. * * This string should be `"translator-credits"` or `"translator_credits"` and * should be marked as translatable. * * The string may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`developers] * * [property`AboutWindow:`designers] * * [property`AboutWindow:`artists] * * [property`AboutWindow:`documenters] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ translator_credits?: string | null; /** * The version of the application. * * The version is displayed on the main page. * * If [property`AboutWindow:`release-notes-version] is not set, the version * will also be displayed above the release notes on the What's New page. */ version?: string | null; /** * The URL of the application's website. * * Website is displayed on the Details page, below comments, or on the main * page if the Details page doesn't have any other content. * * Applications can add other links below, see [method`AboutWindow`.add_link]. */ website?: string | null; } } interface AboutWindow extends Gtk.Accessible, Gtk.Buildable, Gtk.ConstraintTarget, Gtk.Native, Gtk.Root, Gtk.ShortcutManager { // Own properties of Adw-1.Adw.AboutWindow /** * The name of the application icon. * * The icon is displayed at the top of the main page. */ application_icon: string | null; /** * The name of the application. * * The name is displayed at the top of the main page. */ application_name: string | null; /** * The list of artists of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`developers] * * [property`AboutWindow:`designers] * * [property`AboutWindow:`documenters] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ artists: string[]; /** * The comments about the application. * * Comments will be shown on the Details page, above links. * * Unlike [property`Gtk`.AboutDialog:comments], this string can be long and * detailed. It can also contain links and Pango markup. */ comments: string | null; /** * The copyright information. * * This should be a short string of one or two lines, for example: * `© 2022 Example`. * * The copyright information will be displayed on the Legal page, above the * application license. * * [method`AboutWindow`.add_legal_section] can be used to add copyright * information for the application dependencies or other components. */ copyright: string | null; /** * The debug information. * * Debug information will be shown on the Troubleshooting page. It's intended * to be attached to issue reports when reporting issues against the * application. * * `AdwAboutWindow` provides a quick way to save debug information to a file. * When saving, [property`AboutWindow:`debug-info-filename] would be used as * the suggested filename. * * Debug information cannot contain markup or links. */ debug_info: string | null; /** * The debug information filename. * * It will be used as the suggested filename when saving debug information to * a file. * * See [property`AboutWindow:`debug-info]. */ debug_info_filename: string | null; /** * The list of designers of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`developers] * * [property`AboutWindow:`artists] * * [property`AboutWindow:`documenters] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ designers: string[]; /** * The developer name. * * The developer name is displayed on the main page, under the application * name. * * If the application is developed by multiple people, the developer name can * be set to values like "AppName team", "AppName developers" or * "The AppName project", and the individual contributors can be listed on the * Credits page, with [property`AboutWindow:`developers] and related * properties. */ developer_name: string | null; /** * The list of developers of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`designers] * * [property`AboutWindow:`artists] * * [property`AboutWindow:`documenters] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ developers: string[]; /** * The list of documenters of the application. * * It will be displayed on the Credits page. * * Each name may contain email addresses and URLs, see the introduction for * more details. * * See also: * * * [property`AboutWindow:`developers] * * [property`AboutWindow:`designers] * * [property`AboutWindow:`artists] * * [property`AboutWindow:`translator-credits] * * [method`AboutWindow`.add_credit_section] * * [method`AboutWindow`.add_acknowledgement_section] */ documenters: string[]; /** * The URL for the application's issue tracker. * * The issue tracker link is displayed on the main page. */ issue_url: string | null; /** * The license text. * * This can be used to set a custom text for the license if it can't be set * via [property`AboutWindow:`license-type]. * * When set, [property`AboutWindow:`license-type] will be set to * `GTK_LICENSE_CUSTOM`. * * The license text will be displayed on the Legal page, below the copyright * information. * * License text can contain Pango markup and links. * * [method`AboutWindow`.add_legal_section] can be used to add license * information for the application dependencies or other components. */ license: string | null; /** * The license type. * * Allows to set the application's license froma list of known licenses. * * If the application's license is not in the list, * [property`AboutWindow:`license] can be used instead. The license type will * be automatically set to `GTK_LICENSE_CUSTOM` in that case. * * If set to `GTK_LICENSE_UNKNOWN`, no information will be displayed. * * If the license type is different from `GTK_LICENSE_CUSTOM`. * [property`AboutWindow:`license] will be cleared out. * * The license description will be displayed on the Legal page, below the * copyright information. * * [method`AboutWindow`.add_legal_section] can be used to add license * information for the application dependencies or other components. */ license_type: Gtk.License; /** * The release notes of the application. * * Release notes are displayed on the the What's New page. * * 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 (`<p>`) * * Ordered list (`<ol>`), with list items (`<li>`) * * Unordered list (`<ul>`), with list items (`<li>`) * * Within paragraphs and list items, emphasis (`<em>`) and inline code * (`<code>`) text styles are supported. The emphasis is rendered in italic, * while inline code is shown in a monospaced font. * * Any text outside paragraphs or list items is ignored. * * Nested lists are not supported. * * `AdwAboutWindow` displays the version above the release notes. If set, the * [property`AboutWindow:`release-notes-version] of the property will be used * as the version; otherwise, [property`AboutWindow:`version] is used. */ release_notes: string | null; /** * The version described by the application's release notes.