/// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /** * 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 { // 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); // 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; // 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 callback interfaces interface Hover { (event: HoverEvent): void; } interface HoverLost { (event: HoverEvent): void; } interface Click { (event: ClickEvent): void; } interface ClickRelease { (event: ClickEvent): void; } interface Scroll { (event: ScrollEvent): 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