/// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /** * 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://Astal?version=3.0' { // Module dependencies import type AstalIO from 'gi://AstalIO?version=0.1'; import type GLib from 'gi://GLib?version=2.0'; import type GObject from 'gi://GObject?version=2.0'; import type Gio from 'gi://Gio?version=2.0'; import type GModule from 'gi://GModule?version=2.0'; import type Gdk from 'gi://Gdk?version=3.0'; import type cairo from 'cairo'; 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 GdkPixbuf from 'gi://GdkPixbuf?version=2.0'; import type Gtk from 'gi://Gtk?version=3.0'; import type xlib from 'gi://xlib?version=2.0'; import type Atk from 'gi://Atk?version=1.0'; export namespace Astal { /** * Astal-3.0 */ export namespace MouseButton { export const $gtype: GObject.GType; } enum MouseButton { PRIMARY, MIDDLE, SECONDARY, BACK, FORWARD, } export namespace Exclusivity { export const $gtype: GObject.GType; } enum Exclusivity { NORMAL, /** * Request the compositor to allocate space for this window. */ EXCLUSIVE, /** * Request the compositor to stack layers on top of each other. */ IGNORE, } export namespace Layer { export const $gtype: GObject.GType; } enum Layer { BACKGROUND, BOTTOM, TOP, OVERLAY, } export namespace Keymode { export const $gtype: GObject.GType; } enum Keymode { /** * Window should not receive keyboard events. */ NONE, /** * Window should have exclusive focus if it is on the top or overlay layer. */ EXCLUSIVE, /** * Focus and Unfocues the window as needed. */ ON_DEMAND, } const MAJOR_VERSION: number; const MINOR_VERSION: number; const MICRO_VERSION: number; const VERSION: string; function widget_set_css(widget: Gtk.Widget, css: string): void; function widget_get_css(widget: Gtk.Widget): string; function widget_set_class_names(widget: Gtk.Widget, class_names: string[]): void; function widget_get_class_names(widget: Gtk.Widget): string[]; function widget_toggle_class_name(widget: Gtk.Widget, class_name: string, condition: boolean): void; function widget_set_cursor(widget: Gtk.Widget, cursor: string): void; function widget_get_cursor(widget: Gtk.Widget): string; function widget_set_click_through(widget: Gtk.Widget, click_through: boolean): void; function widget_get_click_through(widget: Gtk.Widget): boolean; export namespace WindowAnchor { export const $gtype: GObject.GType; } enum WindowAnchor { NONE, TOP, RIGHT, LEFT, BOTTOM, } namespace Box { // Signal signatures interface SignalSignatures extends Gtk.Box.SignalSignatures { 'notify::vertical': (pspec: GObject.ParamSpec) => void; 'notify::children': (pspec: GObject.ParamSpec) => void; 'notify::child': (pspec: GObject.ParamSpec) => void; 'notify::baseline-position': (pspec: GObject.ParamSpec) => void; 'notify::homogeneous': (pspec: GObject.ParamSpec) => void; 'notify::spacing': (pspec: GObject.ParamSpec) => void; 'notify::border-width': (pspec: GObject.ParamSpec) => void; 'notify::resize-mode': (pspec: GObject.ParamSpec) => void; 'notify::app-paintable': (pspec: GObject.ParamSpec) => void; 'notify::can-default': (pspec: GObject.ParamSpec) => void; 'notify::can-focus': (pspec: GObject.ParamSpec) => void; 'notify::composite-child': (pspec: GObject.ParamSpec) => void; 'notify::double-buffered': (pspec: GObject.ParamSpec) => void; 'notify::events': (pspec: GObject.ParamSpec) => void; 'notify::expand': (pspec: GObject.ParamSpec) => void; 'notify::focus-on-click': (pspec: GObject.ParamSpec) => void; 'notify::halign': (pspec: GObject.ParamSpec) => void; 'notify::has-default': (pspec: GObject.ParamSpec) => void; 'notify::has-focus': (pspec: GObject.ParamSpec) => void; 'notify::has-tooltip': (pspec: GObject.ParamSpec) => void; 'notify::height-request': (pspec: GObject.ParamSpec) => void; 'notify::hexpand': (pspec: GObject.ParamSpec) => void; 'notify::hexpand-set': (pspec: GObject.ParamSpec) => void; 'notify::is-focus': (pspec: GObject.ParamSpec) => void; 'notify::margin': (pspec: GObject.ParamSpec) => void; 'notify::margin-bottom': (pspec: GObject.ParamSpec) => void; 'notify::margin-end': (pspec: GObject.ParamSpec) => void; 'notify::margin-left': (pspec: GObject.ParamSpec) => void; 'notify::margin-right': (pspec: GObject.ParamSpec) => void; 'notify::margin-start': (pspec: GObject.ParamSpec) => void; 'notify::margin-top': (pspec: GObject.ParamSpec) => void; 'notify::name': (pspec: GObject.ParamSpec) => void; 'notify::no-show-all': (pspec: GObject.ParamSpec) => void; 'notify::opacity': (pspec: GObject.ParamSpec) => void; 'notify::parent': (pspec: GObject.ParamSpec) => void; 'notify::receives-default': (pspec: GObject.ParamSpec) => void; 'notify::scale-factor': (pspec: GObject.ParamSpec) => void; 'notify::sensitive': (pspec: GObject.ParamSpec) => void; 'notify::style': (pspec: GObject.ParamSpec) => void; 'notify::tooltip-markup': (pspec: GObject.ParamSpec) => void; 'notify::tooltip-text': (pspec: GObject.ParamSpec) => void; 'notify::valign': (pspec: GObject.ParamSpec) => void; 'notify::vexpand': (pspec: GObject.ParamSpec) => void; 'notify::vexpand-set': (pspec: GObject.ParamSpec) => void; 'notify::visible': (pspec: GObject.ParamSpec) => void; 'notify::width-request': (pspec: GObject.ParamSpec) => void; 'notify::window': (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Gtk.Box.ConstructorProps { vertical: boolean; children: Gtk.Widget[]; child: Gtk.Widget; } } class Box extends Gtk.Box { static $gtype: GObject.GType; // Properties /** * Corresponds to [property`Gtk`.Orientable :orientation]. */ get vertical(): boolean; set vertical(val: boolean); get children(): Gtk.Widget[]; set children(val: Gtk.Widget[]); get child(): Gtk.Widget; set child(val: Gtk.Widget); /** * Compile-time signal type information. * * This instance property is generated only for TypeScript type checking. * It is not defined at runtime and should not be accessed in JS code. * @internal */ $signals: Box.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ['new'](vertical: boolean, children: Gtk.Widget[]): Box; // Conflicted with Gtk.Box.new static ['new'](...args: never[]): any; // Signals connect( signal: K, callback: GObject.SignalCallback, ): number; connect(signal: string, callback: (...args: any[]) => any): number; connect_after( signal: K, callback: GObject.SignalCallback, ): number; connect_after(signal: string, callback: (...args: any[]) => any): number; emit( signal: K, ...args: GObject.GjsParameters extends [any, ...infer Q] ? Q : never ): void; emit(signal: string, ...args: any[]): void; // Methods get_vertical(): boolean; set_vertical(value: boolean): void; get_children(): Gtk.Widget[]; set_children(value: Gtk.Widget[]): void; get_child(): Gtk.Widget; set_child(value: Gtk.Widget): void; } namespace Button { // Signal signatures interface SignalSignatures extends Gtk.Button.SignalSignatures { hover: (arg0: HoverEvent) => void; 'hover-lost': (arg0: HoverEvent) => void; click: (arg0: ClickEvent) => void; 'click-release': (arg0: ClickEvent) => void; scroll: (arg0: ScrollEvent) => void; 'notify::always-show-image': (pspec: GObject.ParamSpec) => void; 'notify::image': (pspec: GObject.ParamSpec) => void; 'notify::image-position': (pspec: GObject.ParamSpec) => void; 'notify::label': (pspec: GObject.ParamSpec) => void; 'notify::relief': (pspec: GObject.ParamSpec) => void; 'notify::use-stock': (pspec: GObject.ParamSpec) => void; 'notify::use-underline': (pspec: GObject.ParamSpec) => void; 'notify::xalign': (pspec: GObject.ParamSpec) => void; 'notify::yalign': (pspec: GObject.ParamSpec) => void; 'notify::border-width': (pspec: GObject.ParamSpec) => void; 'notify::child': (pspec: GObject.ParamSpec) => void; 'notify::resize-mode': (pspec: GObject.ParamSpec) => void; 'notify::app-paintable': (pspec: GObject.ParamSpec) => void; 'notify::can-default': (pspec: GObject.ParamSpec) => void; 'notify::can-focus': (pspec: GObject.ParamSpec) => void; 'notify::composite-child': (pspec: GObject.ParamSpec) => void; 'notify::double-buffered': (pspec: GObject.ParamSpec) => void; 'notify::events': (pspec: GObject.ParamSpec) => void; 'notify::expand': (pspec: GObject.ParamSpec) => void; 'notify::focus-on-click': (pspec: GObject.ParamSpec) => void; 'notify::halign': (pspec: GObject.ParamSpec) => void; 'notify::has-default': (pspec: GObject.ParamSpec) => void; 'notify::has-focus': (pspec: GObject.ParamSpec) => void; 'notify::has-tooltip': (pspec: GObject.ParamSpec) => void; 'notify::height-request': (pspec: GObject.ParamSpec) => void; 'notify::hexpand': (pspec: GObject.ParamSpec) => void; 'notify::hexpand-set': (pspec: GObject.ParamSpec) => void; 'notify::is-focus': (pspec: GObject.ParamSpec) => void; 'notify::margin': (pspec: GObject.ParamSpec) => void; 'notify::margin-bottom': (pspec: GObject.ParamSpec) => void; 'notify::margin-end': (pspec: GObject.ParamSpec) => void; 'notify::margin-left': (pspec: GObject.ParamSpec) => void; 'notify::margin-right': (pspec: GObject.ParamSpec) => void; 'notify::margin-start': (pspec: GObject.ParamSpec) => void; 'notify::margin-top': (pspec: GObject.ParamSpec) => void; 'notify::name': (pspec: GObject.ParamSpec) => void; 'notify::no-show-all': (pspec: GObject.ParamSpec) => void; 'notify::opacity': (pspec: GObject.ParamSpec) => void; 'notify::parent': (pspec: GObject.ParamSpec) => void; 'notify::receives-default': (pspec: GObject.ParamSpec) => void; 'notify::scale-factor': (pspec: GObject.ParamSpec) => void; 'notify::sensitive': (pspec: GObject.ParamSpec) => void; 'notify::style': (pspec: GObject.ParamSpec) => void; 'notify::tooltip-markup': (pspec: GObject.ParamSpec) => void; 'notify::tooltip-text': (pspec: GObject.ParamSpec) => void; 'notify::valign': (pspec: GObject.ParamSpec) => void; 'notify::vexpand': (pspec: GObject.ParamSpec) => void; 'notify::vexpand-set': (pspec: GObject.ParamSpec) => void; 'notify::visible': (pspec: GObject.ParamSpec) => void; 'notify::width-request': (pspec: GObject.ParamSpec) => void; 'notify::window': (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Gtk.Button.ConstructorProps {} } /** * This button has no extra functionality on top if its base [class`Gtk`.Button] class. * The purpose of this Button subclass is to have a destructable struct as the argument in GJS event handlers. */ class Button extends Gtk.Button { static $gtype: GObject.GType