/** * 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, ... */ import '@girs/gjs'; // Module dependencies import type xlib from '@girs/xlib-2.0'; import type xfixes from '@girs/xfixes-4.0'; import type Mtk from '@girs/mtk-17'; import type Graphene from '@girs/graphene-1.0'; import type GObject from '@girs/gobject-2.0'; import type GLib from '@girs/glib-2.0'; import type Gio from '@girs/gio-2.0'; import type GModule from '@girs/gmodule-2.0'; import type GDesktopEnums from '@girs/gdesktopenums-3.0'; import type Cogl from '@girs/cogl-17'; import type GL from '@girs/gl-1.0'; import type Clutter from '@girs/clutter-17'; import type Pango from '@girs/pango-1.0'; import type cairo from 'cairo'; import type HarfBuzz from '@girs/harfbuzz-0.0'; import type freetype2 from '@girs/freetype2-2.0'; import type Atk from '@girs/atk-1.0'; export namespace Meta { /** * Meta-17 */ /** * @gir-type Enum */ export namespace ButtonFunction { export const $gtype: GObject.GType; } /** * Function a window button can have. * * Note, you can't add stuff here without extending the theme format * to draw a new function and breaking all existing themes. * @gir-type Enum */ enum ButtonFunction { /** * Menu */ MENU = 0, /** * Minimize */ MINIMIZE = 1, /** * Maximize */ MAXIMIZE = 2, /** * Close */ CLOSE = 3, /** * Marks the end of the {@link Meta.ButtonFunction} enumeration */ LAST = 4, } /** * @gir-type Enum */ export namespace CloseDialogResponse { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum CloseDialogResponse { WAIT = 0, FORCE_CLOSE = 1, } /** * @gir-type Enum */ export namespace CompEffect { export const $gtype: GObject.GType; } /** * Indicates the appropriate effect to show the user for * `meta_compositor_show_window()` and `meta_compositor_hide_window()` * @gir-type Enum */ enum CompEffect { /** * The window is newly created * (also used for a window that was previously on a different * workspace and is changed to become visible on the active * workspace.) */ CREATE = 0, /** * The window should be shown * as unminimizing from its icon geometry. */ UNMINIMIZE = 1, /** * The window is being destroyed */ DESTROY = 2, /** * The window should be shown * as minimizing to its icon geometry. */ MINIMIZE = 3, /** * No effect, the window should be * shown or hidden immediately. */ NONE = 4, } /** * @gir-type Enum */ export namespace CompositorType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum CompositorType { WAYLAND = 0, X11 = 1, } /** * @gir-type Enum */ export namespace Cursor { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum Cursor { /** * No cursor */ INVALID = 0, /** * No cursor */ NONE = 1, /** * Default cursor */ DEFAULT = 2, /** * Context menu cursor */ CONTEXT_MENU = 3, /** * Help cursor */ HELP = 4, /** * Pointer cursor */ POINTER = 5, /** * Progress cursor */ PROGRESS = 6, /** * Wait cursor */ WAIT = 7, /** * Cell cursor */ CELL = 8, /** * Crosshair cursor */ CROSSHAIR = 9, /** * Text cursor */ TEXT = 10, /** * Vertical text cursor */ VERTICAL_TEXT = 11, /** * DnD alias cursor */ ALIAS = 12, /** * DnD copy cursor */ COPY = 13, /** * DnD move cursor */ MOVE = 14, /** * DnD no drop cursor */ NO_DROP = 15, /** * DnD not allowed cursor */ NOT_ALLOWED = 16, /** * DnD grab cursor */ GRAB = 17, /** * DnD grabbing cursor */ GRABBING = 18, /** * Resize eastern edge cursor */ E_RESIZE = 19, /** * Resize northern edge cursor */ N_RESIZE = 20, /** * Resize north-eastern corner cursor */ NE_RESIZE = 21, /** * Resize north-western corner cursor */ NW_RESIZE = 22, /** * Resize southern edge cursor */ S_RESIZE = 23, /** * Resize south-eastern corner cursor */ SE_RESIZE = 24, /** * Resize south-western corner cursor */ SW_RESIZE = 25, /** * Resize western edge cursor */ W_RESIZE = 26, /** * Resize eastern and western edges cursor */ EW_RESIZE = 27, /** * Resize northern and eastern edges cursor */ NS_RESIZE = 28, /** * Resize north-east and south-west corners cursor */ NESW_RESIZE = 29, /** * Resize north-west and south-east corners cursor */ NWSE_RESIZE = 30, /** * Resize column cursor */ COL_RESIZE = 31, /** * Resize row cursor */ ROW_RESIZE = 32, /** * Scroll all directions cursor */ ALL_SCROLL = 33, /** * Zoom in cursor */ ZOOM_IN = 34, /** * Zoom out cursor */ ZOOM_OUT = 35, /** * DnD ask cursor */ DND_ASK = 36, /** * Resize all directions */ ALL_RESIZE = 37, } /** * @gir-type Enum */ export namespace DisplayCorner { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum DisplayCorner { /** * top-left corner */ TOPLEFT = 0, /** * top-right corner */ TOPRIGHT = 1, /** * bottom-left corner */ BOTTOMLEFT = 2, /** * bottom-right corner */ BOTTOMRIGHT = 3, } /** * @gir-type Enum */ export namespace DisplayDirection { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum DisplayDirection { /** * up */ UP = 0, /** * down */ DOWN = 1, /** * left */ LEFT = 2, /** * right */ RIGHT = 3, } /** * @gir-type Enum */ export namespace EdgeType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum EdgeType { /** * Whether the edge belongs to a window */ WINDOW = 0, /** * Whether the edge belongs to a monitor */ MONITOR = 1, /** * Whether the edge belongs to a screen */ SCREEN = 2, } /** * @gir-type Enum */ export namespace ExitCode { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum ExitCode { /** * Success */ SUCCESS = 0, /** * Error */ ERROR = 1, } /** * @gir-type Enum */ export namespace FrameType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum FrameType { /** * Normal frame */ NORMAL = 0, /** * Dialog frame */ DIALOG = 1, /** * Modal dialog frame */ MODAL_DIALOG = 2, /** * Utility frame */ UTILITY = 3, /** * Menu frame */ MENU = 4, /** * Border frame */ BORDER = 5, /** * Attached frame */ ATTACHED = 6, /** * Marks the end of the {@link Meta.FrameType} enumeration */ LAST = 7, } /** * @gir-type Enum */ export namespace GrabOp { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum GrabOp { /** * None */ NONE = 0, WINDOW_BASE = 1, /** * Moving with pointer */ MOVING = 1, MOVING_UNCONSTRAINED = 1025, /** * Resizing NW with pointer */ RESIZING_NW = 36865, /** * Resizing N with pointer */ RESIZING_N = 32769, /** * Resizing NE with pointer */ RESIZING_NE = 40961, /** * Resizing E with pointer */ RESIZING_E = 8193, /** * Resizing SW with pointer */ RESIZING_SW = 20481, /** * Resizing S with pointer */ RESIZING_S = 16385, /** * Resizing SE with pointer */ RESIZING_SE = 24577, /** * Resizing W with pointer */ RESIZING_W = 4097, /** * Moving with keyboard */ KEYBOARD_MOVING = 257, /** * Resizing with keyboard */ KEYBOARD_RESIZING_UNKNOWN = 769, /** * Resizing NS with keyboard */ KEYBOARD_RESIZING_NW = 37121, /** * Resizing N with keyboard */ KEYBOARD_RESIZING_N = 33025, /** * Resizing NE with keyboard */ KEYBOARD_RESIZING_NE = 41217, /** * Resizing E with keyboard */ KEYBOARD_RESIZING_E = 8449, /** * Resizing SW with keyboard */ KEYBOARD_RESIZING_SW = 20737, /** * Resizing S with keyboard */ KEYBOARD_RESIZING_S = 16641, /** * Resizing SE with keyboard */ KEYBOARD_RESIZING_SE = 24833, /** * Resizing W with keyboard */ KEYBOARD_RESIZING_W = 4353, } /** * @gir-type Enum */ export namespace Gravity { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum Gravity { NONE = 0, NORTH_WEST = 1, NORTH = 2, NORTH_EAST = 3, WEST = 4, CENTER = 5, EAST = 6, SOUTH_WEST = 7, SOUTH = 8, SOUTH_EAST = 9, STATIC = 10, } /** * @gir-type Enum */ export namespace InhibitShortcutsDialogResponse { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum InhibitShortcutsDialogResponse { ALLOW = 0, DENY = 1, } /** * @gir-type Enum */ export namespace KeyBindingAction { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum KeyBindingAction { /** * FILLME */ NONE = 0, /** * FILLME */ WORKSPACE_1 = 1, /** * FILLME */ WORKSPACE_2 = 2, /** * FILLME */ WORKSPACE_3 = 3, /** * FILLME */ WORKSPACE_4 = 4, /** * FILLME */ WORKSPACE_5 = 5, /** * FILLME */ WORKSPACE_6 = 6, /** * FILLME */ WORKSPACE_7 = 7, /** * FILLME */ WORKSPACE_8 = 8, /** * FILLME */ WORKSPACE_9 = 9, /** * FILLME */ WORKSPACE_10 = 10, /** * FILLME */ WORKSPACE_11 = 11, /** * FILLME */ WORKSPACE_12 = 12, /** * FILLME */ WORKSPACE_LEFT = 13, /** * FILLME */ WORKSPACE_RIGHT = 14, /** * FILLME */ WORKSPACE_UP = 15, /** * FILLME */ WORKSPACE_DOWN = 16, /** * FILLME */ WORKSPACE_LAST = 17, /** * FILLME */ SWITCH_APPLICATIONS = 18, /** * FILLME */ SWITCH_APPLICATIONS_BACKWARD = 19, /** * FILLME */ SWITCH_GROUP = 20, /** * FILLME */ SWITCH_GROUP_BACKWARD = 21, /** * FILLME */ SWITCH_WINDOWS = 22, /** * FILLME */ SWITCH_WINDOWS_BACKWARD = 23, /** * FILLME */ SWITCH_PANELS = 24, /** * FILLME */ SWITCH_PANELS_BACKWARD = 25, /** * FILLME */ CYCLE_GROUP = 26, /** * FILLME */ CYCLE_GROUP_BACKWARD = 27, /** * FILLME */ CYCLE_WINDOWS = 28, /** * FILLME */ CYCLE_WINDOWS_BACKWARD = 29, /** * FILLME */ CYCLE_PANELS = 30, /** * FILLME */ CYCLE_PANELS_BACKWARD = 31, /** * FILLME */ SHOW_DESKTOP = 32, /** * FILLME */ PANEL_RUN_DIALOG = 33, /** * FILLME */ TOGGLE_RECORDING = 34, /** * FILLME */ SET_SPEW_MARK = 35, /** * FILLME */ ACTIVATE_WINDOW_MENU = 36, /** * FILLME */ TOGGLE_FULLSCREEN = 37, /** * FILLME */ TOGGLE_MAXIMIZED = 38, /** * FILLME */ TOGGLE_TILED_LEFT = 39, /** * FILLME */ TOGGLE_TILED_RIGHT = 40, /** * FILLME */ TOGGLE_ABOVE = 41, /** * FILLME */ MAXIMIZE = 42, /** * FILLME */ UNMAXIMIZE = 43, /** * FILLME */ TOGGLE_SHADED = 44, /** * FILLME */ MINIMIZE = 45, /** * FILLME */ CLOSE = 46, /** * FILLME */ BEGIN_MOVE = 47, /** * FILLME */ BEGIN_RESIZE = 48, /** * FILLME */ TOGGLE_ON_ALL_WORKSPACES = 49, /** * FILLME */ MOVE_TO_WORKSPACE_1 = 50, /** * FILLME */ MOVE_TO_WORKSPACE_2 = 51, /** * FILLME */ MOVE_TO_WORKSPACE_3 = 52, /** * FILLME */ MOVE_TO_WORKSPACE_4 = 53, /** * FILLME */ MOVE_TO_WORKSPACE_5 = 54, /** * FILLME */ MOVE_TO_WORKSPACE_6 = 55, /** * FILLME */ MOVE_TO_WORKSPACE_7 = 56, /** * FILLME */ MOVE_TO_WORKSPACE_8 = 57, /** * FILLME */ MOVE_TO_WORKSPACE_9 = 58, /** * FILLME */ MOVE_TO_WORKSPACE_10 = 59, /** * FILLME */ MOVE_TO_WORKSPACE_11 = 60, /** * FILLME */ MOVE_TO_WORKSPACE_12 = 61, /** * FILLME */ MOVE_TO_WORKSPACE_LEFT = 62, /** * FILLME */ MOVE_TO_WORKSPACE_RIGHT = 63, /** * FILLME */ MOVE_TO_WORKSPACE_UP = 64, /** * FILLME */ MOVE_TO_WORKSPACE_DOWN = 65, /** * FILLME */ MOVE_TO_WORKSPACE_LAST = 66, /** * FILLME */ MOVE_TO_MONITOR_LEFT = 67, /** * FILLME */ MOVE_TO_MONITOR_RIGHT = 68, /** * FILLME */ MOVE_TO_MONITOR_UP = 69, /** * FILLME */ MOVE_TO_MONITOR_DOWN = 70, /** * FILLME */ RAISE_OR_LOWER = 71, /** * FILLME */ RAISE = 72, /** * FILLME */ LOWER = 73, /** * FILLME */ MAXIMIZE_VERTICALLY = 74, /** * FILLME */ MAXIMIZE_HORIZONTALLY = 75, /** * FILLME */ MOVE_TO_CORNER_NW = 76, /** * FILLME */ MOVE_TO_CORNER_NE = 77, /** * FILLME */ MOVE_TO_CORNER_SW = 78, /** * FILLME */ MOVE_TO_CORNER_SE = 79, /** * FILLME */ MOVE_TO_SIDE_N = 80, /** * FILLME */ MOVE_TO_SIDE_S = 81, /** * FILLME */ MOVE_TO_SIDE_E = 82, /** * FILLME */ MOVE_TO_SIDE_W = 83, /** * FILLME */ MOVE_TO_CENTER = 84, /** * FILLME */ OVERLAY_KEY = 85, /** * FILLME */ LOCATE_POINTER_KEY = 86, ISO_NEXT_GROUP = 87, /** * FILLME */ ALWAYS_ON_TOP = 88, SWITCH_MONITOR = 89, ROTATE_MONITOR = 90, /** * FILLME */ LAST = 91, } /** * @gir-type Enum */ export namespace LaterType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum LaterType { /** * call in a resize processing phase that is done * before GTK+ repainting (including window borders) is done. */ RESIZE = 0, /** * used by Mutter to compute which windows should be mapped */ CALC_SHOWING = 1, /** * used by Mutter to see if there's a fullscreen window */ CHECK_FULLSCREEN = 2, /** * used by Mutter to send it's idea of the stacking order to the server */ SYNC_STACK = 3, /** * call before the stage is redrawn */ BEFORE_REDRAW = 4, /** * call at a very low priority (can be blocked * by running animations or redrawing applications) */ IDLE = 5, } /** * @gir-type Enum */ export namespace MonitorSwitchConfigType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum MonitorSwitchConfigType { ALL_MIRROR = 0, ALL_LINEAR = 1, EXTERNAL = 2, BUILTIN = 3, UNKNOWN = 4, } /** * @gir-type Enum */ export namespace MotionDirection { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum MotionDirection { /** * Upwards motion */ UP = -1, /** * Downwards motion */ DOWN = -2, /** * Motion to the left */ LEFT = -3, /** * Motion to the right */ RIGHT = -4, /** * Motion up and to the left */ UP_LEFT = -5, /** * Motion up and to the right */ UP_RIGHT = -6, /** * Motion down and to the left */ DOWN_LEFT = -7, /** * Motion down and to the right */ DOWN_RIGHT = -8, } /** * @gir-type Enum */ export namespace MultiTextureAlphaMode { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum MultiTextureAlphaMode { META_MULTI_TEXTURE_ALPHA_MODE_NONE = 0, META_MULTI_TEXTURE_ALPHA_MODE_PREMULT_ELECTRICAL = 1, META_MULTI_TEXTURE_ALPHA_MODE_STRAIGHT = 2, N_META_MULTI_TEXTURE_ALPHA_MODES = 3, } /** * @gir-type Enum */ export namespace MultiTextureChromaLoc { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum MultiTextureChromaLoc { NONE = 0, DEFINED = 1, } /** * @gir-type Enum */ export namespace MultiTextureCoefficients { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum MultiTextureCoefficients { META_MULTI_TEXTURE_COEFFICIENTS_NONE = 0, META_MULTI_TEXTURE_COEFFICIENTS_IDENTITY_FULL = 1, META_MULTI_TEXTURE_COEFFICIENTS_IDENTITY_LIMITED = 2, META_MULTI_TEXTURE_COEFFICIENTS_BT709_FULL = 3, META_MULTI_TEXTURE_COEFFICIENTS_BT709_LIMITED = 4, META_MULTI_TEXTURE_COEFFICIENTS_BT601_FULL = 5, META_MULTI_TEXTURE_COEFFICIENTS_BT601_LIMITED = 6, META_MULTI_TEXTURE_COEFFICIENTS_BT2020_FULL = 7, META_MULTI_TEXTURE_COEFFICIENTS_BT2020_LIMITED = 8, N_META_MULTI_TEXTURE_COEFFICIENTS = 9, } /** * @gir-type Enum */ export namespace MultiTextureFormat { export const $gtype: GObject.GType; } /** * A representation for complex pixel formats * * Some pixel formats that are used in the wild are a bit more complex than * just ARGB and all its variants. For example: a component might be put in a * different plane (i.e. at a different place in memory). Another example are * formats that use Y, U, and V components rather than RGB; if we composite them * onto an RGBA framebuffer, we have to make sure for example that these get * converted to the right color format first (using e.g. a shader). * @gir-type Enum */ enum MultiTextureFormat { /** * Invalid value */ META_MULTI_TEXTURE_FORMAT_INVALID = 0, /** * Any format supported by Cogl (see {@link Cogl.PixelFormat}) */ META_MULTI_TEXTURE_FORMAT_SIMPLE = 1, /** * YUYV, 32 bits, 16 bpc (Y), 8 bpc (U & V) */ META_MULTI_TEXTURE_FORMAT_YUYV = 2, META_MULTI_TEXTURE_FORMAT_YVYU = 3, META_MULTI_TEXTURE_FORMAT_UYVY = 4, META_MULTI_TEXTURE_FORMAT_VYUY = 5, /** * 2 planes: 1 Y-plane, 1 UV-plane (2x2 subsampled) */ META_MULTI_TEXTURE_FORMAT_NV12 = 6, META_MULTI_TEXTURE_FORMAT_NV21 = 7, META_MULTI_TEXTURE_FORMAT_NV16 = 8, META_MULTI_TEXTURE_FORMAT_NV61 = 9, META_MULTI_TEXTURE_FORMAT_NV24 = 10, META_MULTI_TEXTURE_FORMAT_NV42 = 11, META_MULTI_TEXTURE_FORMAT_P010 = 12, META_MULTI_TEXTURE_FORMAT_P012 = 13, META_MULTI_TEXTURE_FORMAT_P016 = 14, /** * 3 planes: 1 Y-plane, 1 U-plane (2x2 subsampled), 1 V-plane (2x2 subsampled) */ META_MULTI_TEXTURE_FORMAT_YUV420 = 15, META_MULTI_TEXTURE_FORMAT_YVU420 = 16, META_MULTI_TEXTURE_FORMAT_YUV422 = 17, META_MULTI_TEXTURE_FORMAT_YVU422 = 18, META_MULTI_TEXTURE_FORMAT_YUV444 = 19, META_MULTI_TEXTURE_FORMAT_YVU444 = 20, META_MULTI_TEXTURE_FORMAT_S010 = 21, META_MULTI_TEXTURE_FORMAT_S210 = 22, META_MULTI_TEXTURE_FORMAT_S410 = 23, META_MULTI_TEXTURE_FORMAT_S012 = 24, META_MULTI_TEXTURE_FORMAT_S212 = 25, META_MULTI_TEXTURE_FORMAT_S412 = 26, META_MULTI_TEXTURE_FORMAT_S016 = 27, META_MULTI_TEXTURE_FORMAT_S216 = 28, META_MULTI_TEXTURE_FORMAT_S416 = 29, N_META_MULTI_TEXTURE_FORMATS = 30, } /** * @gir-type Enum */ export namespace Orientation { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum Orientation { UNDEFINED = 0, NORMAL = 1, BOTTOM_UP = 2, LEFT_UP = 3, RIGHT_UP = 4, } /** * @gir-type Enum */ export namespace PadDirection { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum PadDirection { UP = 1, DOWN = 2, CW = 3, CCW = 4, } /** * @gir-type Enum */ export namespace PadFeatureType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum PadFeatureType { RING = 0, STRIP = 1, DIAL = 2, } /** * @gir-type Enum */ export namespace PowerSaveChangeReason { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum PowerSaveChangeReason { MODE_CHANGE = 0, HOTPLUG = 1, } /** * @gir-type Enum */ export namespace Preference { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum Preference { /** * mouse button modifiers */ MOUSE_BUTTON_MODS = 0, /** * focus mode */ FOCUS_MODE = 1, /** * focus new windows */ FOCUS_NEW_WINDOWS = 2, /** * attach modal dialogs */ ATTACH_MODAL_DIALOGS = 3, /** * raise on click */ RAISE_ON_CLICK = 4, /** * action double click titlebar */ ACTION_DOUBLE_CLICK_TITLEBAR = 5, /** * action middle click titlebar */ ACTION_MIDDLE_CLICK_TITLEBAR = 6, /** * action right click titlebar */ ACTION_RIGHT_CLICK_TITLEBAR = 7, /** * auto-raise */ AUTO_RAISE = 8, /** * auto-raise delay */ AUTO_RAISE_DELAY = 9, /** * focus change on pointer rest */ FOCUS_CHANGE_ON_POINTER_REST = 10, /** * number of workspaces */ NUM_WORKSPACES = 11, /** * dynamic workspaces */ DYNAMIC_WORKSPACES = 12, /** * keybindings */ KEYBINDINGS = 13, /** * disable workarounds */ DISABLE_WORKAROUNDS = 14, /** * button layout */ BUTTON_LAYOUT = 15, /** * workspace names */ WORKSPACE_NAMES = 16, /** * visual bell */ VISUAL_BELL = 17, /** * audible bell */ AUDIBLE_BELL = 18, /** * visual bell type */ VISUAL_BELL_TYPE = 19, /** * GNOME accessibility */ GNOME_ACCESSIBILITY = 20, /** * GNOME animations */ GNOME_ANIMATIONS = 21, /** * cursor theme */ CURSOR_THEME = 22, /** * cursor size */ CURSOR_SIZE = 23, /** * resize with right button */ RESIZE_WITH_RIGHT_BUTTON = 24, /** * edge tiling */ EDGE_TILING = 25, /** * force fullscreen */ FORCE_FULLSCREEN = 26, /** * workspaces only on primary */ WORKSPACES_ONLY_ON_PRIMARY = 27, /** * draggable border width */ DRAGGABLE_BORDER_WIDTH = 28, /** * auto-maximize */ AUTO_MAXIMIZE = 29, /** * center new windows */ CENTER_NEW_WINDOWS = 30, /** * drag threshold */ DRAG_THRESHOLD = 31, /** * show pointer location */ LOCATE_POINTER = 32, CHECK_ALIVE_TIMEOUT = 33, } /** * @gir-type Enum */ export namespace SelectionType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum SelectionType { SELECTION_PRIMARY = 0, SELECTION_CLIPBOARD = 1, SELECTION_DND = 2, N_SELECTION_TYPES = 3, } /** * @gir-type Enum */ export namespace Side { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum Side { /** * Left side */ LEFT = 1, /** * Right side */ RIGHT = 2, /** * Top side */ TOP = 4, /** * Bottom side */ BOTTOM = 8, } /** * @gir-type Enum */ export namespace SizeChange { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum SizeChange { MAXIMIZE = 0, UNMAXIMIZE = 1, FULLSCREEN = 2, UNFULLSCREEN = 3, MONITOR_MOVE = 4, } /** * @gir-type Enum */ export namespace StackLayer { export const $gtype: GObject.GType; } /** * Layers a window can be in. * These MUST be in the order of stacking. * @gir-type Enum */ enum StackLayer { /** * Desktop layer */ DESKTOP = 0, /** * Bottom layer */ BOTTOM = 1, /** * Normal layer */ NORMAL = 2, /** * Top layer */ TOP = 4, /** * Dock layer */ DOCK = 4, /** * Override-redirect layer */ OVERRIDE_REDIRECT = 7, /** * Marks the end of the {@link Meta.StackLayer} enumeration */ LAST = 8, } /** * @gir-type Enum */ export namespace TabList { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum TabList { /** * Normal windows */ NORMAL = 0, /** * Dock windows */ DOCKS = 1, /** * Groups */ GROUP = 2, /** * All windows */ NORMAL_ALL = 3, /** * All windows in pure MRU order */ NORMAL_ALL_MRU = 4, } /** * @gir-type Enum */ export namespace TabShowType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum TabShowType { /** * Show icon (Alt-Tab mode) */ ICON = 0, /** * Show instantly (Alt-Esc mode) */ INSTANTLY = 1, } /** * @gir-type Enum */ export namespace WindowClientType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum WindowClientType { /** * A Wayland based window */ WAYLAND = 0, /** * An X11 based window */ X11 = 1, } /** * @gir-type Enum */ export namespace WindowMenuType { export const $gtype: GObject.GType; } /** * Menu the compositor should display for a given window * @gir-type Enum */ enum WindowMenuType { /** * the window manager menu */ WM = 0, /** * the (fallback) app menu */ APP = 1, } /** * @gir-type Enum */ export namespace WindowType { export const $gtype: GObject.GType; } /** * @gir-type Enum */ enum WindowType { /** * Normal */ NORMAL = 0, /** * Desktop */ DESKTOP = 1, /** * Dock */ DOCK = 2, /** * Dialog */ DIALOG = 3, /** * Modal dialog */ MODAL_DIALOG = 4, /** * Toolbar */ TOOLBAR = 5, /** * Menu */ MENU = 6, /** * Utility */ UTILITY = 7, /** * Splashcreen */ SPLASHSCREEN = 8, /** * Dropdown menu */ DROPDOWN_MENU = 9, /** * Popup menu */ POPUP_MENU = 10, /** * Tooltip */ TOOLTIP = 11, /** * Notification */ NOTIFICATION = 12, /** * Combobox */ COMBO = 13, /** * Drag and drop */ DND = 14, /** * Other override-redirect window type */ OVERRIDE_OTHER = 15, } /** * @default 0 */ const CURRENT_TIME: number; /** * @default 5 */ const N_ORIENTATIONS: number; /** * @default 40 */ const PRIORITY_BEFORE_REDRAW: number; /** * @default 10 */ const PRIORITY_PREFS_NOTIFY: number; /** * @default 50 */ const PRIORITY_REDRAW: number; /** * @default 15 */ const PRIORITY_RESIZE: number; /** * @default 3 */ const VIRTUAL_CORE_KEYBOARD_ID: number; /** * @default 2 */ const VIRTUAL_CORE_POINTER_ID: number; /** * Convert an accelerator keyval and modifier mask into a string parsable by `meta_parse_accelerator`. * @param accelerator_mods Accelerator modifier mask. * @param accelerator_key Accelerator keyval. * @returns The accelerator name. */ function accelerator_name(accelerator_mods: Clutter.ModifierType, accelerator_key: number): string; /** * @param flag */ function add_debug_paint_flag(flag: DebugPaintFlag): void; /** * Ensure log messages for the given topic `topic` * will be printed. * @param topic Topic for which logging will be started */ function add_verbose_topic(topic: DebugTopic): void; /** * Create a context. * @param name Human readable name of display server or window manager * @returns A new context instance. */ function create_context(name: string): Context; /** * @param code */ function exit(code: ExitCode): void; /** * @param keybinding_action */ function external_binding_name_for_action(keybinding_action: number): string; /** * Converts a frame type enum value to the name string that would * appear in the theme definition file. * @param type a {@link Meta.FrameType} * @returns the string value */ function frame_type_to_string(type: FrameType): string; /** * @param src * @param n */ function g_utf8_strndup(src: string, n: bigint | number): string; function get_debug_paint_flags(): DebugPaintFlag; /** * @param gravity */ function gravity_to_string(gravity: Gravity): string; /** * Returns `true` if this instance of Mutter comes from Mutter * restarting itself (for example to enable/disable stereo.) * * See {@link Meta.restart}. If this is the case, any startup visuals * or animations should be suppressed. */ function is_restart(): boolean; /** * @param topic */ function is_topic_enabled(topic: DebugTopic): boolean; function is_verbose(): boolean; function is_wayland_compositor(): boolean; /** * Allows users to register a custom handler for a * builtin key binding. * @param name The name of the keybinding to set * @param handler The new handler function * @returns `true` if the binding known as `name` was found, `false` otherwise. */ function keybindings_set_custom_handler(name: string, handler: KeyHandlerFunc | null): boolean; /** * @param orientation */ function orientation_to_transform(orientation: Orientation): Mtk.MonitorTransform; function pop_no_msg_prefix(): void; /** * @param pref */ function preference_to_string(pref: Preference): string; function prefs_bell_is_audible(): boolean; /** * @param i * @param name */ function prefs_change_workspace_name(i: number, name: string): void; function prefs_get_action_double_click_titlebar(): GDesktopEnums.TitlebarAction; function prefs_get_action_middle_click_titlebar(): GDesktopEnums.TitlebarAction; function prefs_get_action_right_click_titlebar(): GDesktopEnums.TitlebarAction; function prefs_get_attach_modal_dialogs(): boolean; function prefs_get_auto_maximize(): boolean; function prefs_get_auto_raise(): boolean; function prefs_get_auto_raise_delay(): number; function prefs_get_button_layout(): ButtonLayout; function prefs_get_center_new_windows(): boolean; function prefs_get_check_alive_timeout(): number; function prefs_get_compositing_manager(): boolean; function prefs_get_cursor_size(): number; function prefs_get_cursor_theme(): string; function prefs_get_disable_workarounds(): boolean; function prefs_get_drag_threshold(): number; function prefs_get_draggable_border_width(): number; function prefs_get_dynamic_workspaces(): boolean; function prefs_get_edge_tiling(): boolean; function prefs_get_focus_change_on_pointer_rest(): boolean; function prefs_get_focus_mode(): GDesktopEnums.FocusMode; function prefs_get_focus_new_windows(): GDesktopEnums.FocusNewWindows; function prefs_get_force_fullscreen(): boolean; function prefs_get_gnome_accessibility(): boolean; function prefs_get_gnome_animations(): boolean; /** * @param name */ function prefs_get_keybinding_action(name: string): KeyBindingAction; /** * @param name */ function prefs_get_keybinding_label(name: string): string | null; function prefs_get_mouse_button_menu(): number; function prefs_get_mouse_button_mods(): Clutter.ModifierType; function prefs_get_mouse_button_resize(): number; function prefs_get_num_workspaces(): number; function prefs_get_raise_on_click(): boolean; function prefs_get_show_fallback_app_menu(): boolean; function prefs_get_visual_bell(): boolean; function prefs_get_visual_bell_type(): GDesktopEnums.VisualBellType; /** * @param i */ function prefs_get_workspace_name(i: number): string; function prefs_get_workspaces_only_on_primary(): boolean; /** * @param whether */ function prefs_set_force_fullscreen(whether: boolean): void; /** * @param n_workspaces */ function prefs_set_num_workspaces(n_workspaces: number): void; /** * @param whether */ function prefs_set_show_fallback_app_menu(whether: boolean): void; function push_no_msg_prefix(): void; /** * @param fd * @param offset * @param length */ function read_bytes(fd: number, offset: number, length: number): globalThis.Promise; /** * @param fd * @param offset * @param length * @param callback */ function read_bytes(fd: number, offset: number, length: number, callback: Gio.AsyncReadyCallback | null): void; /** * @param fd * @param offset * @param length * @param callback */ function read_bytes(fd: number, offset: number, length: number, callback: Gio.AsyncReadyCallback | null): globalThis.Promise | void; /** * @param result * @param bytes * @param length * @throws GLib.Error */ function read_bytes_finish(result: Gio.AsyncResult, bytes: number, length: number): boolean; /** * @param flag */ function remove_debug_paint_flag(flag: DebugPaintFlag): void; /** * Stop printing log messages for the given topic `topic`. * * Note that this method does not stack with {@link Meta.add_verbose_topic}; * i.e. if two calls to {@link Meta.add_verbose_topic} for the same * topic are made, one call to {@link Meta.remove_verbose_topic} will * remove it. * @param topic Topic for which logging will be stopped */ function remove_verbose_topic(topic: DebugTopic): void; /** * Starts the process of restarting the compositor. * * Note that Mutter's involvement here is to make the restart * visually smooth for the user - it cannot itself safely * reexec a program that embeds libmuttter. * * So in order for this to work, the compositor must handle two * signals * * - `Meta.Display::show-restart-message`, to display the * message passed here on the Clutter stage * - `Meta.Display::restart` to actually reexec the compositor. * @param message message to display to the user, or `null` * @param context a {@link Meta.Context} */ function restart(message: string | null, context: Context): void; /** * @param topic */ function topic_to_string(topic: DebugTopic): string; /** * @param v1 * @param v2 */ function unsigned_long_equal(v1: null, v2: null): number; /** * @param v */ function unsigned_long_hash(v: null): number; /** * @gir-type Callback */ interface IdleMonitorWatchFunc { (monitor: IdleMonitor, watch_id: number): void; } /** * @gir-type Callback */ interface KeyHandlerFunc { (display: Display, window: Window, event: Clutter.Event, binding: KeyBinding): void; } /** * @gir-type Callback */ interface PrefsChangedFunc { (pref: Preference): void; } /** * @gir-type Callback */ interface WindowForeachFunc { (window: Window): boolean; } /** * @gir-type Flags */ export namespace BackendCapabilities { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum BackendCapabilities { NONE = 0, BARRIERS = 1, } /** * @gir-type Flags */ export namespace BarrierDirection { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum BarrierDirection { /** * Positive direction in the X axis */ POSITIVE_X = 1, /** * Positive direction in the Y axis */ POSITIVE_Y = 2, /** * Negative direction in the X axis */ NEGATIVE_X = 4, /** * Negative direction in the Y axis */ NEGATIVE_Y = 8, } /** * @gir-type Flags */ export namespace BarrierFlags { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum BarrierFlags { NONE = 1, STICKY = 2, } /** * @gir-type Flags */ export namespace DebugPaintFlag { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum DebugPaintFlag { /** * default */ NONE = 0, /** * paint opaque regions */ OPAQUE_REGION = 1, /** * make cursor updates await compositing * frames */ SYNC_CURSOR_PRIMARY = 2, /** * always composite frames */ DISABLE_DIRECT_SCANOUT = 4, IGNORE_COLOR_STATE_FOR_DIRECT_SCANOUT = 8, } /** * @gir-type Flags */ export namespace DebugTopic { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum DebugTopic { /** * verbose logging */ VERBOSE = -1, /** * focus */ FOCUS = 1, /** * workarea */ WORKAREA = 2, /** * stack */ STACK = 4, /** * session management */ SM = 8, /** * events */ EVENTS = 16, /** * window state */ WINDOW_STATE = 32, /** * window operations */ WINDOW_OPS = 64, /** * geometry */ GEOMETRY = 128, /** * window placement */ PLACEMENT = 256, /** * display */ DISPLAY = 512, /** * keybindings */ KEYBINDINGS = 1024, /** * sync */ SYNC = 2048, /** * startup */ STARTUP = 4096, /** * preferences */ PREFS = 8192, /** * edge resistance */ EDGE_RESISTANCE = 16384, DBUS = 32768, INPUT = 65536, /** * Wayland */ WAYLAND = 131072, /** * kernel mode setting */ KMS = 262144, /** * screencasting */ SCREEN_CAST = 524288, /** * remote desktop */ REMOTE_DESKTOP = 1048576, /** * backend */ BACKEND = 2097152, /** * native backend rendering */ RENDER = 4194304, /** * color management */ COLOR = 8388608, /** * input events */ INPUT_EVENTS = 16777216, /** * eis state */ EIS = 33554432, /** * KMS deadline timers */ KMS_DEADLINE = 67108864, /** * session management */ SESSION_MANAGEMENT = 134217728, /** * X11 window management */ X11 = 268435456, WORKSPACES = 536870912, } /** * @gir-type Flags */ export namespace Direction { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum Direction { /** * Left */ LEFT = 1, /** * Right */ RIGHT = 2, /** * Top */ TOP = 4, /** * Bottom */ BOTTOM = 8, /** * Up */ UP = 4, /** * Down */ DOWN = 8, /** * Horizontal */ HORIZONTAL = 3, /** * Vertical */ VERTICAL = 12, } /** * @gir-type Flags */ export namespace KeyBindingFlags { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum KeyBindingFlags { /** * none */ NONE = 0, /** * per-window */ PER_WINDOW = 1, /** * built-in */ BUILTIN = 2, /** * is reversed */ IS_REVERSED = 4, /** * always active */ NON_MASKABLE = 8, /** * ignore autorepeat */ IGNORE_AUTOREPEAT = 16, /** * not grabbed automatically */ NO_AUTO_GRAB = 32, /** * uses a custom keybinding action */ CUSTOM_TRIGGER = 64, /** * notifies on release in addition to press */ TRIGGER_RELEASE = 128, } /** * @gir-type Flags */ export namespace KeyboardA11yFlags { export const $gtype: GObject.GType; } /** * Keyboard accessibility features. * @gir-type Flags */ enum KeyboardA11yFlags { KEYBOARD_ENABLED = 1, TIMEOUT_ENABLED = 2, MOUSE_KEYS_ENABLED = 4, SLOW_KEYS_ENABLED = 8, SLOW_KEYS_BEEP_PRESS = 16, SLOW_KEYS_BEEP_ACCEPT = 32, SLOW_KEYS_BEEP_REJECT = 64, BOUNCE_KEYS_ENABLED = 128, BOUNCE_KEYS_BEEP_REJECT = 256, TOGGLE_KEYS_ENABLED = 512, STICKY_KEYS_ENABLED = 1024, STICKY_KEYS_TWO_KEY_OFF = 2048, STICKY_KEYS_BEEP = 4096, FEATURE_STATE_CHANGE_BEEP = 8192, } /** * @gir-type Flags */ export namespace MaximizeFlags { export const $gtype: GObject.GType; } /** * @gir-type Flags */ enum MaximizeFlags { /** * Horizontal */ HORIZONTAL = 1, /** * Vertical */ VERTICAL = 2, /** * Both */ BOTH = 3, } namespace Backend { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "gpu-added": (gpu: null) => void; /** * @signal * @run-last */ "keymap-changed": () => void; /** * @signal * @run-last */ "keymap-layout-group-changed": (object: number) => void; /** * @signal * @run-last */ "last-device-changed": (object: Clutter.InputDevice) => void; /** * @signal * @run-last */ "lid-is-closed-changed": (object: boolean) => void; /** * @signal * @run-last */ "prepare-shutdown": () => void; "notify::capabilities": (pspec: GObject.ParamSpec) => void; "notify::context": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps, Gio.Initable.ConstructorProps { capabilities: BackendCapabilities; context: Context; } } /** * Handles monitor config, modesetting, cursor sprites, ... * * MetaBackend is the abstraction that deals with several things like: * * - Modesetting (depending on the backend, this can be done either by X or KMS) * - Initializing the {@link Meta.Settings} * - Setting up Monitor configuration * - Input device configuration (using the `ClutterDeviceManager`) * - Creating the `MetaRenderer` * - Setting up the stage of the scene graph (using {@link Meta.Stage}) * - Creating the object that deals with the cursor (using {@link Meta.CursorTracker}) * and its possible pointer constraint (using `MetaPointerConstraint`) * - Setting the cursor sprite (using `MetaCursorRenderer`) * - Interacting with logind (using the appropriate D-Bus interface) * - Querying logind (over D-Bus) to know when the lid is closed * - Setup Remote Desktop / Screencasting (`MetaRemoteDesktop`) * - Setup the `MetaEgl` object * * Note that the {@link Meta.Backend} is not a subclass of {@link Clutter.Backend}. * It is responsible for creating the correct one, based on the backend that is * used (`MetaBackendNative` or `MetaBackendX11`). * @gir-type Class */ abstract class Backend extends GObject.Object implements Gio.Initable { static $gtype: GObject.GType; // Properties /** * @read-only * @default Meta.BackendCapabilities.NONE */ get capabilities(): BackendCapabilities; /** * @construct-only */ get context(): Context; /** * 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: Backend.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param timestamp */ freeze_keyboard(timestamp: number): void; get_capabilities(): BackendCapabilities; /** * @returns The {@link Meta.Context} */ get_context(): Context; /** * @returns the {@link Meta.IdleMonitor} that tracks server-global idle time for all devices. */ get_core_idle_monitor(): IdleMonitor; /** * Returns the {@link Meta.LogicalMonitor} that currently has the mouse pointer. * @returns The current {@link Meta.LogicalMonitor}. */ get_current_logical_monitor(): LogicalMonitor | null; /** * @returns The cursor tracker corresponding to `backend` */ get_cursor_tracker(): CursorTracker; /** * Gets the global {@link Meta.Dnd} that's managed by this backend. * @returns the {@link Meta.Dnd} */ get_dnd(): Dnd; /** * @returns A {@link Meta.MonitorManager} */ get_monitor_manager(): MonitorManager; /** * @returns A {@link Meta.OrientationManager} */ get_orientation_manager(): OrientationManager; /** * @returns The {@link Meta.RemoteAccessController} */ get_remote_access_controller(): RemoteAccessController; /** * Gets the global {@link Clutter.Stage} that's managed by this backend. * @returns the {@link Clutter.Stage} */ get_stage(): Clutter.Actor; is_headless(): boolean; /** * @returns `true` if the rendering is hardware accelerated, otherwise `false`. */ is_rendering_hardware_accelerated(): boolean; renderdoc_capture(): void; /** * @param layouts * @param variants * @param options * @param model * @param cancellable */ set_keymap_async(layouts: string, variants: string, options: string, model: string, cancellable: Gio.Cancellable | null): globalThis.Promise; /** * @param layouts * @param variants * @param options * @param model * @param cancellable * @param callback */ set_keymap_async(layouts: string, variants: string, options: string, model: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void; /** * @param layouts * @param variants * @param options * @param model * @param cancellable * @param callback */ set_keymap_async(layouts: string, variants: string, options: string, model: string, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): globalThis.Promise | void; /** * @param result * @throws GLib.Error */ set_keymap_finish(result: Gio.AsyncResult): boolean; /** * @param idx * @param cancellable */ set_keymap_layout_group_async(idx: number, cancellable: Gio.Cancellable | null): globalThis.Promise; /** * @param idx * @param cancellable * @param callback */ set_keymap_layout_group_async(idx: number, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void; /** * @param idx * @param cancellable * @param callback */ set_keymap_layout_group_async(idx: number, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): globalThis.Promise | void; /** * @param result * @throws GLib.Error */ set_keymap_layout_group_finish(result: Gio.AsyncResult): boolean; /** * @param timestamp */ unfreeze_keyboard(timestamp: number): void; /** * @param timestamp */ ungrab_keyboard(timestamp: number): void; /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * `g_initable_new()` should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or `g_async_initable_init_async()`. * * Implementations may also support cancellation. If `cancellable` is not `null`, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * {@link Gio.IOErrorEnum.CANCELLED} will be returned. If `cancellable` is not `null` and * the object doesn't support cancellable initialization the error * {@link Gio.IOErrorEnum.NOT_SUPPORTED} will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except `g_object_ref()` and * `g_object_unref()` are considered to be invalid, and have undefined * behaviour. See the [description][iface@Gio.Initable#description] for more details. * * Callers should not assume that a class which implements {@link Gio.Initable} can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of `init()` can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all {@link Gio.Initable} implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * {@link GObject.ObjectClass}.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call `g_initable_init()` * on the result of `g_object_new()`, regardless of whether it is in fact a new * instance. * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore. * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present. * @since 2.22 * @throws GLib.Error */ init(cancellable: Gio.Cancellable | null): boolean; /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * `g_initable_new()` should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or `g_async_initable_init_async()`. * * Implementations may also support cancellation. If `cancellable` is not `null`, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * {@link Gio.IOErrorEnum.CANCELLED} will be returned. If `cancellable` is not `null` and * the object doesn't support cancellable initialization the error * {@link Gio.IOErrorEnum.NOT_SUPPORTED} will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except `g_object_ref()` and * `g_object_unref()` are considered to be invalid, and have undefined * behaviour. See the [description][iface@Gio.Initable#description] for more details. * * Callers should not assume that a class which implements {@link Gio.Initable} can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of `init()` can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all {@link Gio.Initable} implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * {@link GObject.ObjectClass}.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call `g_initable_init()` * on the result of `g_object_new()`, regardless of whether it is in fact a new * instance. * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore. * @since 2.22 * @virtual */ vfunc_init(cancellable: Gio.Cancellable | null): boolean; } namespace Background { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ changed: () => void; "notify::meta-display": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { meta_display: Display; metaDisplay: Display; } } /** * This class handles tracking and painting the root window background. * * By integrating with {@link Meta.WindowGroup} we can avoid painting parts of * the background that are obscured by other windows. * @gir-type Class */ class Background extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only */ get meta_display(): Display; /** * @construct-only */ get metaDisplay(): Display; /** * 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: Background.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](display: Display): Background; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Static methods static refresh_all(): void; // Methods /** * @param file1 * @param file2 * @param blend_factor * @param style */ set_blend(file1: Gio.File, file2: Gio.File, blend_factor: number, style: GDesktopEnums.BackgroundStyle): void; /** * @param color */ set_color(color: Cogl.Color): void; /** * Set the background to `file` * @param file a {@link Gio.File} representing the background file * @param style the background style to apply */ set_file(file: Gio.File | null, style: GDesktopEnums.BackgroundStyle): void; /** * @param shading_direction * @param color * @param second_color */ set_gradient(shading_direction: GDesktopEnums.BackgroundShading, color: Cogl.Color, second_color: Cogl.Color): void; } namespace BackgroundActor { // Signal signatures interface SignalSignatures extends Clutter.Actor.SignalSignatures { "notify::meta-display": (pspec: GObject.ParamSpec) => void; "notify::monitor": (pspec: GObject.ParamSpec) => void; "notify::accessible-name": (pspec: GObject.ParamSpec) => void; "notify::accessible-role": (pspec: GObject.ParamSpec) => void; "notify::actions": (pspec: GObject.ParamSpec) => void; "notify::allocation": (pspec: GObject.ParamSpec) => void; "notify::background-color": (pspec: GObject.ParamSpec) => void; "notify::background-color-set": (pspec: GObject.ParamSpec) => void; "notify::child-transform": (pspec: GObject.ParamSpec) => void; "notify::child-transform-set": (pspec: GObject.ParamSpec) => void; "notify::clip-rect": (pspec: GObject.ParamSpec) => void; "notify::clip-to-allocation": (pspec: GObject.ParamSpec) => void; "notify::color-state": (pspec: GObject.ParamSpec) => void; "notify::constraints": (pspec: GObject.ParamSpec) => void; "notify::content": (pspec: GObject.ParamSpec) => void; "notify::content-box": (pspec: GObject.ParamSpec) => void; "notify::content-gravity": (pspec: GObject.ParamSpec) => void; "notify::content-repeat": (pspec: GObject.ParamSpec) => void; "notify::context": (pspec: GObject.ParamSpec) => void; "notify::effect": (pspec: GObject.ParamSpec) => void; "notify::first-child": (pspec: GObject.ParamSpec) => void; "notify::fixed-position-set": (pspec: GObject.ParamSpec) => void; "notify::fixed-x": (pspec: GObject.ParamSpec) => void; "notify::fixed-y": (pspec: GObject.ParamSpec) => void; "notify::has-clip": (pspec: GObject.ParamSpec) => void; "notify::has-pointer": (pspec: GObject.ParamSpec) => void; "notify::height": (pspec: GObject.ParamSpec) => void; "notify::last-child": (pspec: GObject.ParamSpec) => void; "notify::layout-manager": (pspec: GObject.ParamSpec) => void; "notify::magnification-filter": (pspec: GObject.ParamSpec) => void; "notify::mapped": (pspec: GObject.ParamSpec) => void; "notify::margin-bottom": (pspec: GObject.ParamSpec) => void; "notify::margin-left": (pspec: GObject.ParamSpec) => void; "notify::margin-right": (pspec: GObject.ParamSpec) => void; "notify::margin-top": (pspec: GObject.ParamSpec) => void; "notify::min-height": (pspec: GObject.ParamSpec) => void; "notify::min-height-set": (pspec: GObject.ParamSpec) => void; "notify::min-width": (pspec: GObject.ParamSpec) => void; "notify::min-width-set": (pspec: GObject.ParamSpec) => void; "notify::minification-filter": (pspec: GObject.ParamSpec) => void; "notify::name": (pspec: GObject.ParamSpec) => void; "notify::natural-height": (pspec: GObject.ParamSpec) => void; "notify::natural-height-set": (pspec: GObject.ParamSpec) => void; "notify::natural-width": (pspec: GObject.ParamSpec) => void; "notify::natural-width-set": (pspec: GObject.ParamSpec) => void; "notify::offscreen-redirect": (pspec: GObject.ParamSpec) => void; "notify::opacity": (pspec: GObject.ParamSpec) => void; "notify::pivot-point": (pspec: GObject.ParamSpec) => void; "notify::pivot-point-z": (pspec: GObject.ParamSpec) => void; "notify::position": (pspec: GObject.ParamSpec) => void; "notify::reactive": (pspec: GObject.ParamSpec) => void; "notify::realized": (pspec: GObject.ParamSpec) => void; "notify::request-mode": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-x": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-y": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-z": (pspec: GObject.ParamSpec) => void; "notify::scale-x": (pspec: GObject.ParamSpec) => void; "notify::scale-y": (pspec: GObject.ParamSpec) => void; "notify::scale-z": (pspec: GObject.ParamSpec) => void; "notify::show-on-set-parent": (pspec: GObject.ParamSpec) => void; "notify::size": (pspec: GObject.ParamSpec) => void; "notify::text-direction": (pspec: GObject.ParamSpec) => void; "notify::transform": (pspec: GObject.ParamSpec) => void; "notify::transform-set": (pspec: GObject.ParamSpec) => void; "notify::translation-x": (pspec: GObject.ParamSpec) => void; "notify::translation-y": (pspec: GObject.ParamSpec) => void; "notify::translation-z": (pspec: GObject.ParamSpec) => void; "notify::visible": (pspec: GObject.ParamSpec) => void; "notify::width": (pspec: GObject.ParamSpec) => void; "notify::x": (pspec: GObject.ParamSpec) => void; "notify::x-align": (pspec: GObject.ParamSpec) => void; "notify::x-expand": (pspec: GObject.ParamSpec) => void; "notify::y": (pspec: GObject.ParamSpec) => void; "notify::y-align": (pspec: GObject.ParamSpec) => void; "notify::y-expand": (pspec: GObject.ParamSpec) => void; "notify::z-position": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Clutter.Actor.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Clutter.Animatable.ConstructorProps { meta_display: Display; metaDisplay: Display; monitor: number; } } /** * This class handles tracking and painting the root window background. * * By integrating with {@link Meta.WindowGroup} we can avoid painting parts of * the background that are obscured by other windows. * @gir-type Class */ class BackgroundActor extends Clutter.Actor implements Atk.ImplementorIface, Clutter.Animatable { static $gtype: GObject.GType; // Properties /** * @construct-only */ get meta_display(): Display; /** * @construct-only */ get metaDisplay(): Display; /** * @construct-only * @default 0 */ get monitor(): number; /** * 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: BackgroundActor.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](display: Display, monitor: number): BackgroundActor; // Conflicted with Clutter.Actor.new static ["new"](...args: never[]): any; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @returns The {@link GObject.ParamSpec} for the given property or `null` */ find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @returns a {@link Clutter.Actor} */ get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve */ get_initial_state(property_name: string, value: GObject.Value | any): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @returns `true` if the interpolation was successful, and `false` otherwise */ interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, unknown]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set */ set_final_state(property_name: string, value: GObject.Value | any): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @virtual */ vfunc_find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @virtual */ vfunc_get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve * @virtual */ vfunc_get_initial_state(property_name: string, value: unknown): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @virtual */ vfunc_interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, GObject.Value | any]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set * @virtual */ vfunc_set_final_state(property_name: string, value: unknown): void; } namespace BackgroundContent { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures, Clutter.Content.SignalSignatures { "notify::background": (pspec: GObject.ParamSpec) => void; "notify::brightness": (pspec: GObject.ParamSpec) => void; "notify::gradient": (pspec: GObject.ParamSpec) => void; "notify::gradient-height": (pspec: GObject.ParamSpec) => void; "notify::gradient-max-darkness": (pspec: GObject.ParamSpec) => void; "notify::meta-display": (pspec: GObject.ParamSpec) => void; "notify::monitor": (pspec: GObject.ParamSpec) => void; "notify::rounded-clip-radius": (pspec: GObject.ParamSpec) => void; "notify::vignette": (pspec: GObject.ParamSpec) => void; "notify::vignette-sharpness": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps, Clutter.Content.ConstructorProps { background: Background; brightness: number; gradient: boolean; gradient_height: number; gradientHeight: number; gradient_max_darkness: number; gradientMaxDarkness: number; meta_display: Display; metaDisplay: Display; monitor: number; rounded_clip_radius: number; roundedClipRadius: number; vignette: boolean; vignette_sharpness: number; vignetteSharpness: number; } } /** * This class handles tracking and painting the root window background. * * By integrating with {@link Meta.WindowGroup} we can avoid painting parts of * the background that are obscured by other windows. * * The overall model drawing model of this content is that we have one * texture, or two interpolated textures, possibly with alpha or * margins that let the underlying background show through, blended * over a solid color or a gradient. The result of that combination * can then be affected by a "vignette" that darkens the background * away from a central point (or as a no-GLSL fallback, simply darkens * the background) and by overall opacity. * * As of GNOME 3.14, GNOME is only using a fraction of this when the * user sets the background through the control center - what can be * set is: * * A single image without a border * An animation of images without a border that blend together, * with the blend changing every 4-5 minutes * A solid color with a repeated noise texture blended over it * * This all is pretty easy to do in a fragment shader, except when: * * A) We don't have GLSL - in this case, the operation of * interpolating the two textures and blending the result over the * background can't be expressed with Cogl's fixed-function layer * combining (which is confined to what GL's texture environment * combining can do) So we can only handle the above directly if * there are no margins or alpha. * * B) The image textures are sliced. Texture size limits on older * hardware (pre-965 intel hardware, r300, etc.) is often 2048, * and it would be common to use a texture larger than this for a * background and expect it to be scaled down. Cogl can compensate * for this by breaking the texture up into multiple textures, but * can't multitexture with sliced textures. So we can only handle * the above if there's a single texture. * * However, even when we *can* represent everything in a single pass, * it's not necessarily efficient. If we want to draw a 1024x768 * background, it's pretty inefficient to bilinearly texture from * two 2560x1440 images and mix that. So the drawing model we take * here is that MetaBackground generates a single texture (which * might be a 1x1 texture for a solid color, or a 1x2 texture for a * gradient, or a repeated texture for wallpaper, or a pre-rendered * texture the size of the screen), and we draw with that, possibly * adding the vignette and opacity. * @gir-type Class */ class BackgroundContent extends GObject.Object implements Clutter.Content { static $gtype: GObject.GType; // Properties get background(): Background; set background(val: Background); /** * @default 1 */ get brightness(): number; set brightness(val: number); /** * @default false */ get gradient(): boolean; set gradient(val: boolean); /** * @default 0 */ get gradient_height(): number; set gradient_height(val: number); /** * @default 0 */ get gradientHeight(): number; set gradientHeight(val: number); /** * @default 0 */ get gradient_max_darkness(): number; set gradient_max_darkness(val: number); /** * @default 0 */ get gradientMaxDarkness(): number; set gradientMaxDarkness(val: number); /** * @construct-only */ get meta_display(): Display; /** * @construct-only */ get metaDisplay(): Display; /** * @construct-only * @default 0 */ get monitor(): number; /** * @default 0 */ get rounded_clip_radius(): number; set rounded_clip_radius(val: number); /** * @default 0 */ get roundedClipRadius(): number; set roundedClipRadius(val: number); /** * @default false */ get vignette(): boolean; set vignette(val: boolean); /** * @default 0 */ get vignette_sharpness(): number; set vignette_sharpness(val: number); /** * @default 0 */ get vignetteSharpness(): number; set vignetteSharpness(val: number); /** * 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: BackgroundContent.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Static methods /** * Creates a new actor to draw the background for the given monitor. * @param display a {@link Meta.Display} * @param monitor Index of the monitor for which to draw the background */ static ["new"](display: Display, monitor: number): Clutter.Content; // Methods /** * @param background */ set_background(background: Background): void; /** * @param enabled * @param height * @param tone_start */ set_gradient(enabled: boolean, height: number, tone_start: number): void; /** * Sets the bounding clip rectangle of the {@link Meta.BackgroundContent} that's used * when a rounded clip set via `meta_background_content_set_rounded_clip_radius()` * is in effect, set it to `null` to use no bounding clip, rounding the edges * of the full texture. * @param bounds The new bounding clip rectangle, or `null` */ set_rounded_clip_bounds(bounds: Graphene.Rect | null): void; /** * @param radius */ set_rounded_clip_radius(radius: number): void; /** * @param enabled * @param brightness * @param sharpness */ set_vignette(enabled: boolean, brightness: number, sharpness: number): void; /** * Retrieves the natural size of the `content`, if any. * * The natural size of a {@link Clutter.Content} is defined as the size the content * would have regardless of the allocation of the actor that is painting it, * for instance the size of an image data. * @returns `true` if the content has a preferred size, and `false` otherwise */ get_preferred_size(): [boolean, number, number]; /** * Invalidates a {@link Clutter.Content}. * * This function should be called by {@link Clutter.Content} implementations when * they change the way a the content should be painted regardless of the * actor state. */ invalidate(): void; /** * Signals that `content`'s size changed. Attached actors with request mode * set to {@link Clutter.RequestMode.CONTENT_SIZE} will have a relayout queued. * * Attached actors with other request modes are not redrawn. To redraw them * too, use {@link Clutter.Content.invalidate}. */ invalidate_size(): void; /** * virtual function; called each time a {@link Clutter.Content} is attached * to a {@link Clutter.Actor}. * @param actor * @virtual */ vfunc_attached(actor: Clutter.Actor): void; /** * virtual function; called each time a {@link Clutter.Content} is detached * from a {@link Clutter.Actor}. * @param actor * @virtual */ vfunc_detached(actor: Clutter.Actor): void; /** * Retrieves the natural size of the `content`, if any. * * The natural size of a {@link Clutter.Content} is defined as the size the content * would have regardless of the allocation of the actor that is painting it, * for instance the size of an image data. * @virtual */ vfunc_get_preferred_size(): [boolean, number, number]; /** * Invalidates a {@link Clutter.Content}. * * This function should be called by {@link Clutter.Content} implementations when * they change the way a the content should be painted regardless of the * actor state. * @virtual */ vfunc_invalidate(): void; /** * Signals that `content`'s size changed. Attached actors with request mode * set to {@link Clutter.RequestMode.CONTENT_SIZE} will have a relayout queued. * * Attached actors with other request modes are not redrawn. To redraw them * too, use {@link Clutter.Content.invalidate}. * @virtual */ vfunc_invalidate_size(): void; /** * virtual function; called each time the content needs to * paint itself * @param actor * @param node * @param paint_context * @virtual */ vfunc_paint_content(actor: Clutter.Actor, node: Clutter.PaintNode, paint_context: Clutter.PaintContext): void; } namespace BackgroundGroup { // Signal signatures interface SignalSignatures extends Clutter.Actor.SignalSignatures { "notify::accessible-name": (pspec: GObject.ParamSpec) => void; "notify::accessible-role": (pspec: GObject.ParamSpec) => void; "notify::actions": (pspec: GObject.ParamSpec) => void; "notify::allocation": (pspec: GObject.ParamSpec) => void; "notify::background-color": (pspec: GObject.ParamSpec) => void; "notify::background-color-set": (pspec: GObject.ParamSpec) => void; "notify::child-transform": (pspec: GObject.ParamSpec) => void; "notify::child-transform-set": (pspec: GObject.ParamSpec) => void; "notify::clip-rect": (pspec: GObject.ParamSpec) => void; "notify::clip-to-allocation": (pspec: GObject.ParamSpec) => void; "notify::color-state": (pspec: GObject.ParamSpec) => void; "notify::constraints": (pspec: GObject.ParamSpec) => void; "notify::content": (pspec: GObject.ParamSpec) => void; "notify::content-box": (pspec: GObject.ParamSpec) => void; "notify::content-gravity": (pspec: GObject.ParamSpec) => void; "notify::content-repeat": (pspec: GObject.ParamSpec) => void; "notify::context": (pspec: GObject.ParamSpec) => void; "notify::effect": (pspec: GObject.ParamSpec) => void; "notify::first-child": (pspec: GObject.ParamSpec) => void; "notify::fixed-position-set": (pspec: GObject.ParamSpec) => void; "notify::fixed-x": (pspec: GObject.ParamSpec) => void; "notify::fixed-y": (pspec: GObject.ParamSpec) => void; "notify::has-clip": (pspec: GObject.ParamSpec) => void; "notify::has-pointer": (pspec: GObject.ParamSpec) => void; "notify::height": (pspec: GObject.ParamSpec) => void; "notify::last-child": (pspec: GObject.ParamSpec) => void; "notify::layout-manager": (pspec: GObject.ParamSpec) => void; "notify::magnification-filter": (pspec: GObject.ParamSpec) => void; "notify::mapped": (pspec: GObject.ParamSpec) => void; "notify::margin-bottom": (pspec: GObject.ParamSpec) => void; "notify::margin-left": (pspec: GObject.ParamSpec) => void; "notify::margin-right": (pspec: GObject.ParamSpec) => void; "notify::margin-top": (pspec: GObject.ParamSpec) => void; "notify::min-height": (pspec: GObject.ParamSpec) => void; "notify::min-height-set": (pspec: GObject.ParamSpec) => void; "notify::min-width": (pspec: GObject.ParamSpec) => void; "notify::min-width-set": (pspec: GObject.ParamSpec) => void; "notify::minification-filter": (pspec: GObject.ParamSpec) => void; "notify::name": (pspec: GObject.ParamSpec) => void; "notify::natural-height": (pspec: GObject.ParamSpec) => void; "notify::natural-height-set": (pspec: GObject.ParamSpec) => void; "notify::natural-width": (pspec: GObject.ParamSpec) => void; "notify::natural-width-set": (pspec: GObject.ParamSpec) => void; "notify::offscreen-redirect": (pspec: GObject.ParamSpec) => void; "notify::opacity": (pspec: GObject.ParamSpec) => void; "notify::pivot-point": (pspec: GObject.ParamSpec) => void; "notify::pivot-point-z": (pspec: GObject.ParamSpec) => void; "notify::position": (pspec: GObject.ParamSpec) => void; "notify::reactive": (pspec: GObject.ParamSpec) => void; "notify::realized": (pspec: GObject.ParamSpec) => void; "notify::request-mode": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-x": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-y": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-z": (pspec: GObject.ParamSpec) => void; "notify::scale-x": (pspec: GObject.ParamSpec) => void; "notify::scale-y": (pspec: GObject.ParamSpec) => void; "notify::scale-z": (pspec: GObject.ParamSpec) => void; "notify::show-on-set-parent": (pspec: GObject.ParamSpec) => void; "notify::size": (pspec: GObject.ParamSpec) => void; "notify::text-direction": (pspec: GObject.ParamSpec) => void; "notify::transform": (pspec: GObject.ParamSpec) => void; "notify::transform-set": (pspec: GObject.ParamSpec) => void; "notify::translation-x": (pspec: GObject.ParamSpec) => void; "notify::translation-y": (pspec: GObject.ParamSpec) => void; "notify::translation-z": (pspec: GObject.ParamSpec) => void; "notify::visible": (pspec: GObject.ParamSpec) => void; "notify::width": (pspec: GObject.ParamSpec) => void; "notify::x": (pspec: GObject.ParamSpec) => void; "notify::x-align": (pspec: GObject.ParamSpec) => void; "notify::x-expand": (pspec: GObject.ParamSpec) => void; "notify::y": (pspec: GObject.ParamSpec) => void; "notify::y-align": (pspec: GObject.ParamSpec) => void; "notify::y-expand": (pspec: GObject.ParamSpec) => void; "notify::z-position": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Clutter.Actor.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Clutter.Animatable.ConstructorProps {} } /** * Container for background actors * * This class is a subclass of ClutterActor with special handling for * MetaBackgroundActor/MetaBackgroundGroup when painting children. * It makes sure to only draw the parts of the backgrounds not * occluded by opaque windows. * * See {@link Meta.WindowGroup} for more information behind the motivation, * and details on implementation. * @gir-type Class */ class BackgroundGroup extends Clutter.Actor implements Atk.ImplementorIface, Clutter.Animatable { static $gtype: GObject.GType; /** * 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: BackgroundGroup.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](): BackgroundGroup; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @returns The {@link GObject.ParamSpec} for the given property or `null` */ find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @returns a {@link Clutter.Actor} */ get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve */ get_initial_state(property_name: string, value: GObject.Value | any): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @returns `true` if the interpolation was successful, and `false` otherwise */ interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, unknown]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set */ set_final_state(property_name: string, value: GObject.Value | any): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @virtual */ vfunc_find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @virtual */ vfunc_get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve * @virtual */ vfunc_get_initial_state(property_name: string, value: unknown): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @virtual */ vfunc_interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, GObject.Value | any]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set * @virtual */ vfunc_set_final_state(property_name: string, value: unknown): void; } namespace BackgroundImage { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ loaded: () => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * Represents a loaded or loading background image. * @gir-type Class */ class BackgroundImage extends GObject.Object { static $gtype: GObject.GType; /** * 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: BackgroundImage.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * This function is a convenience function for checking for success, * without having to call `meta_background_image_get_texture()` and * handle the return of a Cogl type. * @returns `true` if loading completed successfully, otherwise `false` */ get_success(): boolean; /** * @returns a {@link Cogl.Texture} if loading succeeded; if loading failed or has not yet finished, `null`. */ get_texture(): Cogl.Texture; /** * @returns `true` if loading has already completed, `false` otherwise */ is_loaded(): boolean; } namespace BackgroundImageCache { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * Caches loading of textures for backgrounds. * * There's actually nothing background specific about it, other than it is tuned * to work well for large images as typically are used for backgrounds. * @gir-type Class */ class BackgroundImageCache extends GObject.Object { static $gtype: GObject.GType; /** * 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: BackgroundImageCache.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Static methods static get_default(): BackgroundImageCache; // Methods /** * Loads an image to use as a background, or returns a reference to an * image that is already in the process of loading or loaded. * * In either case, what is returned is a {@link Meta.BackgroundImage} which can be dereferenced * to get a {@link Cogl.Texture}. If {@link Meta.BackgroundImage.is_loaded} returns `true`, * the background is loaded, otherwise the `Meta.BackgroundImage::loaded` * signal will be emitted exactly once. The 'loaded' state means that the * loading process finished, whether it succeeded or failed. * @param file {@link Gio.File} to load * @returns a {@link Meta.BackgroundImage} to dereference to get the loaded texture */ load(file: Gio.File): BackgroundImage; /** * Remove an entry from the cache; this would be used if monitoring * showed that the file changed. * @param file file to remove from the cache */ purge(file: Gio.File): void; } namespace Backlight { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { "notify::backend": (pspec: GObject.ParamSpec) => void; "notify::brightness": (pspec: GObject.ParamSpec) => void; "notify::brightness-max": (pspec: GObject.ParamSpec) => void; "notify::brightness-min": (pspec: GObject.ParamSpec) => void; "notify::name": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { backend: Backend; brightness: number; brightness_max: number; brightnessMax: number; brightness_min: number; brightnessMin: number; name: string; } } /** * @gir-type Class */ abstract class Backlight extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only */ get backend(): Backend; /** * @default 0 */ get brightness(): number; set brightness(val: number); /** * @construct-only * @default 0 */ get brightness_max(): number; /** * @construct-only * @default 0 */ get brightnessMax(): number; /** * @construct-only * @default 0 */ get brightness_min(): number; /** * @construct-only * @default 0 */ get brightnessMin(): number; /** * @construct-only * @default unknown */ get name(): string; /** * 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: Backlight.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Returns the brightness target of the backlight. The target is a value between * the minimum and maximum brightness of the backlight. * @returns The brightness target of the backlight. */ get_brightness(): number; /** * Returns the minimum and maximum supported brightness of the monitor. */ get_brightness_info(): [number, number]; /** * Sets the brightness target of the backlight. The target is a value between * the minimum and maximum brightness of the backlight. * @param brightness The brightness target */ set_brightness(brightness: number): void; } namespace Barrier { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * When a pointer barrier is hit, this will trigger. This * requires an XI2-enabled server. * @signal * @run-first */ hit: (event: BarrierEvent) => void; /** * When a pointer barrier hitbox was left, this will trigger. * This requires an XI2-enabled server. * @signal * @run-first */ left: (event: BarrierEvent) => void; "notify::backend": (pspec: GObject.ParamSpec) => void; "notify::directions": (pspec: GObject.ParamSpec) => void; "notify::flags": (pspec: GObject.ParamSpec) => void; "notify::x1": (pspec: GObject.ParamSpec) => void; "notify::x2": (pspec: GObject.ParamSpec) => void; "notify::y1": (pspec: GObject.ParamSpec) => void; "notify::y2": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps, Gio.Initable.ConstructorProps { backend: Backend; directions: BarrierDirection; flags: BarrierFlags; x1: number; x2: number; y1: number; y2: number; } } /** * Pointer barriers * @gir-type Class */ class Barrier extends GObject.Object implements Gio.Initable { static $gtype: GObject.GType; // Properties /** * @construct-only */ get backend(): Backend; /** * @construct-only * @default 0 */ get directions(): BarrierDirection; /** * @construct-only * @default Meta.BarrierFlags.NONE */ get flags(): BarrierFlags; /** * @construct-only * @default 0 */ get x1(): number; /** * @construct-only * @default 32767 */ get x2(): number; /** * @construct-only * @default 0 */ get y1(): number; /** * @construct-only * @default 32767 */ get y2(): number; /** * 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: Barrier.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](backend: Backend, x1: number, y1: number, x2: number, y2: number, directions: BarrierDirection, flags: BarrierFlags): Barrier; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods destroy(): void; is_active(): boolean; /** * In XI2.3, pointer barriers provide a feature where they can * be temporarily released so that the pointer goes through * them. Pass a {@link Meta.BarrierEvent} to release the barrier for * this event sequence. * @param event The event to release the pointer for */ release(event: BarrierEvent): void; /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * `g_initable_new()` should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or `g_async_initable_init_async()`. * * Implementations may also support cancellation. If `cancellable` is not `null`, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * {@link Gio.IOErrorEnum.CANCELLED} will be returned. If `cancellable` is not `null` and * the object doesn't support cancellable initialization the error * {@link Gio.IOErrorEnum.NOT_SUPPORTED} will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except `g_object_ref()` and * `g_object_unref()` are considered to be invalid, and have undefined * behaviour. See the [description][iface@Gio.Initable#description] for more details. * * Callers should not assume that a class which implements {@link Gio.Initable} can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of `init()` can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all {@link Gio.Initable} implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * {@link GObject.ObjectClass}.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call `g_initable_init()` * on the result of `g_object_new()`, regardless of whether it is in fact a new * instance. * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore. * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present. * @since 2.22 * @throws GLib.Error */ init(cancellable: Gio.Cancellable | null): boolean; /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * `g_initable_new()` should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or `g_async_initable_init_async()`. * * Implementations may also support cancellation. If `cancellable` is not `null`, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * {@link Gio.IOErrorEnum.CANCELLED} will be returned. If `cancellable` is not `null` and * the object doesn't support cancellable initialization the error * {@link Gio.IOErrorEnum.NOT_SUPPORTED} will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except `g_object_ref()` and * `g_object_unref()` are considered to be invalid, and have undefined * behaviour. See the [description][iface@Gio.Initable#description] for more details. * * Callers should not assume that a class which implements {@link Gio.Initable} can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of `init()` can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all {@link Gio.Initable} implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * {@link GObject.ObjectClass}.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call `g_initable_init()` * on the result of `g_object_new()`, regardless of whether it is in fact a new * instance. * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore. * @since 2.22 * @virtual */ vfunc_init(cancellable: Gio.Cancellable | null): boolean; } namespace Compositor { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { "notify::backend": (pspec: GObject.ParamSpec) => void; "notify::display": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { backend: Backend; display: Display; } } /** * Compositor API * * At a high-level, a window is not-visible or visible. When a * window is added (with `meta_compositor_add_window()`) it is not visible. * `meta_compositor_show_window()` indicates a transition from not-visible to * visible. Some of the reasons for this: * * - Window newly created * - Window is unminimized * - Window is moved to the current desktop * - Window was made sticky * * `meta_compositor_hide_window()` indicates that the window has transitioned from * visible to not-visible. Some reasons include: * * - Window was destroyed * - Window is minimized * - Window is moved to a different desktop * - Window no longer sticky. * * Note that combinations are possible - a window might have first * been minimized and then moved to a different desktop. The 'effect' parameter * to `meta_compositor_show_window()` and `meta_compositor_hide_window()` is a hint * as to the appropriate effect to show the user and should not * be considered to be indicative of a state change. * * When the active workspace is changed, `meta_compositor_switch_workspace()` is * called first, then `meta_compositor_show_window()` and * `meta_compositor_hide_window()` are called individually for each window * affected, with an effect of META_COMP_EFFECT_NONE. * If hiding windows will affect the switch workspace animation, the * compositor needs to delay hiding the windows until the switch * workspace animation completes. * * # Containers # * * There's two containers in the stage that are used to place window actors, here * are listed in the order in which they are painted: * * - window group, accessible with {@link Meta.Compositor.get_window_group} * - top window group, accessible with {@link Meta.Compositor.get_top_window_group} * * Mutter will place actors representing windows in the window group, except for * override-redirect windows (ie. popups and menus) which will be placed in the * top window group. * @gir-type Class */ abstract class Compositor extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only */ get backend(): Backend; /** * @construct-only */ get display(): Display; /** * 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: Compositor.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Disables unredirection, can be useful in situations where having * unredirected windows is undesirable like when recording a video. */ disable_unredirect(): void; /** * Enables unredirection which reduces the overhead for apps like games. */ enable_unredirect(): void; /** * @returns The backend corresponding to `compositor` */ get_backend(): Backend; /** * @returns The feedback group corresponding to `display` */ get_feedback_group(): Clutter.Actor; /** * @returns a {@link Meta.Laters} */ get_laters(): Laters; /** * @returns The stage corresponding to `compositor` */ get_stage(): Clutter.Stage; /** * @returns The top window group corresponding to `compositor` */ get_top_window_group(): Clutter.Actor; /** * @returns The set of {@link Meta.WindowActor} on `compositor` */ get_window_actors(): Clutter.Actor[]; /** * @returns The window group corresponding to `compositor` */ get_window_group(): Clutter.Actor; } namespace Context { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "prepare-shutdown": () => void; /** * @signal * @run-last */ started: () => void; "notify::name": (pspec: GObject.ParamSpec) => void; "notify::nick": (pspec: GObject.ParamSpec) => void; "notify::unsafe-mode": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { name: string; nick: string; unsafe_mode: boolean; unsafeMode: boolean; } } /** * @gir-type Class */ class Context extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only * @default null */ get name(): string; /** * @construct-only * @default null */ get nick(): string; /** * @default false */ get unsafe_mode(): boolean; set unsafe_mode(val: boolean); /** * @default false */ get unsafeMode(): boolean; set unsafeMode(val: boolean); /** * 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: Context.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * See `g_option_context_add_main_entries()` for more details. * @param entries a `null`-terminated array of `GOptionEntrys` * @param translation_domain a translation domain to use, or `null` */ add_option_entries(entries: GLib.OptionEntry[], translation_domain: string | null): void; /** * See `g_option_context_add_group()` for more details. * @param group the group to add */ add_option_group(group: GLib.OptionGroup): void; /** * @param argv Address of the`argv` parameter of `main()`, or `null`. * @returns `true` if the commandline arguments (if any) were valid and if the configuration has been successful, `false` otherwise * @throws GLib.Error */ configure(argv: string[] | null): [boolean, string[] | null]; destroy(): void; /** * @returns the {@link Meta.Backend} */ get_backend(): Backend; get_compositor_type(): CompositorType; /** * @returns the {@link Meta.DebugControl} */ get_debug_control(): DebugControl; /** * @returns the {@link Meta.Display} */ get_display(): Display; /** * Get the {@link Meta.WaylandCompositor} associated with the MetaContext. The might be * none currently associated if the context hasn't been started or if the * requested compositor type is not {@link Meta.CompositorType.WAYLAND}. * @returns the {@link Meta.WaylandCompositor} */ get_wayland_compositor(): WaylandCompositor | null; is_replacing(): boolean; notify_ready(): void; /** * Raises the RLIMIT_NOFILE limit value to the hard limit. * @throws GLib.Error */ raise_rlimit_nofile(): boolean; /** * Restores the RLIMIT_NOFILE limits from when the {@link Meta.Context} was created. * @throws GLib.Error */ restore_rlimit_nofile(): boolean; /** * @throws GLib.Error */ run_main_loop(): boolean; /** * @param wm_keybindings */ set_gnome_wm_keybindings(wm_keybindings: string): void; /** * @param plugin_gtype */ set_plugin_gtype(plugin_gtype: GObject.GType): void; /** * @param plugin_name */ set_plugin_name(plugin_name: string): void; /** * @throws GLib.Error */ setup(): boolean; /** * @throws GLib.Error */ start(): boolean; terminate(): void; /** * @param error */ terminate_with_error(error: GLib.Error): void; } namespace CursorTracker { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "cursor-changed": () => void; /** * @signal * @run-last */ "cursor-prefs-changed": () => void; /** * @signal * @run-last */ "position-invalidated": () => void; /** * @signal * @run-last */ "visibility-changed": () => void; "notify::backend": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { backend: Backend; } } /** * Mutter cursor tracking helper. Originally only tracking * the cursor image, now more of a "core pointer abstraction" * @gir-type Class */ class CursorTracker extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only */ get backend(): Backend; /** * 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: CursorTracker.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Get the hotspot of the current cursor sprite. */ get_hot(): [number, number]; /** * Get the current pointer position and state. */ get_pointer(): [Graphene.Point | null, Clutter.ModifierType | null]; get_pointer_visible(): boolean; /** * Get the scale factor of the cursor sprite * @returns The scale factor of the cursor sprite */ get_scale(): number; /** * Get the {@link Cogl.Texture} of the cursor sprite * @returns the {@link Cogl.Texture} of the cursor sprite */ get_sprite(): Cogl.Texture | null; inhibit_cursor_visibility(): void; uninhibit_cursor_visibility(): void; } namespace DebugControl { // Signal signatures interface SignalSignatures extends Gio.DBusInterfaceSkeleton.SignalSignatures { "notify::context": (pspec: GObject.ParamSpec) => void; "notify::exported": (pspec: GObject.ParamSpec) => void; "notify::g-flags": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Gio.DBusInterfaceSkeleton.ConstructorProps, Gio.DBusInterface.ConstructorProps { context: Context; exported: boolean; } } /** * @gir-type Class */ class DebugControl extends Gio.DBusInterfaceSkeleton implements Gio.DBusInterface { static $gtype: GObject.GType; // Properties /** * @construct-only */ get context(): Context; /** * @default false */ get exported(): boolean; set exported(val: boolean); /** * 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: DebugControl.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param exported */ set_exported(exported: boolean): void; /** * Gets the {@link Gio.DBusObject} that `interface_` belongs to, if any. * @returns A {@link Gio.DBusObject} or `null`. The returned reference should be freed with `g_object_unref()`. * @since 2.32 */ get_object(): Gio.DBusObject | null; /** * Gets D-Bus introspection information for the D-Bus interface * implemented by `interface_`. * * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during * construction of `interface_` and is also not made available otherwise. * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null` * {@link Gio.DBusInterfaceInfo}. * @returns A {@link Gio.DBusInterfaceInfo}. Do not free. * @since 2.30 */ get_info(): Gio.DBusInterfaceInfo | null; /** * @param args */ // Conflicted with Gio.DBusInterfaceSkeleton.get_info get_info(...args: never[]): any; /** * Sets the {@link Gio.DBusObject} for `interface_` to `object`. * * Note that `interface_` will hold a weak reference to `object`. * @param object A {@link Gio.DBusObject} or `null`. * @since 2.30 */ set_object(object: Gio.DBusObject | null): void; /** * Gets the {@link Gio.DBusObject} that `interface_` belongs to, if any. * @since 2.32 * @virtual */ vfunc_dup_object(): Gio.DBusObject | null; /** * Gets D-Bus introspection information for the D-Bus interface * implemented by `interface_`. * * This can return `null` if no {@link Gio.DBusInterfaceInfo} was provided during * construction of `interface_` and is also not made available otherwise. * For example, {@link Gio.DBusProxy} implements {@link Gio.DBusInterface} but allows for a `null` * {@link Gio.DBusInterfaceInfo}. * @since 2.30 * @virtual */ vfunc_get_info(): Gio.DBusInterfaceInfo | null; /** * @param args * @virtual */ // Conflicted with Gio.DBusInterfaceSkeleton.vfunc_get_info vfunc_get_info(...args: never[]): any; /** * Sets the {@link Gio.DBusObject} for `interface_` to `object`. * * Note that `interface_` will hold a weak reference to `object`. * @param object A {@link Gio.DBusObject} or `null`. * @since 2.30 * @virtual */ vfunc_set_object(object: Gio.DBusObject | null): void; } namespace Display { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "accelerator-activated": (object: number, p0: Clutter.InputDevice, p1: number) => void; /** * @signal * @run-last */ "accelerator-deactivated": (object: number, p0: Clutter.InputDevice, p1: number) => void; /** * @signal * @run-last */ closing: () => void; /** * @signal * @run-last */ "cursor-updated": () => void; /** * @signal * @run-last */ "focus-window": (object: Window, p0: number) => void; /** * @signal * @run-last */ "gl-video-memory-purged": () => void; /** * @signal * @run-last */ "grab-op-begin": (object: Window, p0: GrabOp) => void; /** * @signal * @run-last */ "grab-op-end": (object: Window, p0: GrabOp) => void; /** * @signal * @run-last */ "in-fullscreen-changed": () => void; /** * @signal * @run-last */ "init-xserver": (object: Gio.Task) => boolean | void; /** * The ::modifiers-accelerator-activated signal will be emitted when * a special modifiers-only keybinding is activated. * @signal * @run-last */ "modifiers-accelerator-activated": () => boolean | void; /** * @signal * @run-last */ "overlay-key": () => void; /** * @signal * @run-last */ "pad-mode-switch": (object: Clutter.InputDevice, p0: number, p1: number) => void; /** * @signal * @run-last */ restacked: () => void; /** * The signal is emitted to indicate that compositor * should reexec the process. * * This is emitted when {@link Meta.restart} is called, * either by Mutter internally or by the embedding compositor. * * See also `Meta.Display::show-restart-message`. * @signal * @run-last */ restart: () => boolean | void; /** * @signal * @run-last */ "show-osd": (object: number, p0: string, p1: string) => void; /** * Requests the pad button mapping OSD to be shown. * @signal * @run-last */ "show-pad-osd": (pad: Clutter.InputDevice, settings: Gio.Settings, layout_path: string, edition_mode: boolean, monitor_idx: number) => Clutter.Actor | null; /** * @signal * @run-last */ "show-resize-popup": (object: boolean, p0: Mtk.Rectangle, p1: number, p2: number) => boolean | void; /** * The signal will be emitted to indicate that the compositor * should show a message during restart. * * This is emitted when {@link Meta.restart} is called, either by Mutter * internally or by the embedding compositor. The message should be * immediately added to the Clutter stage in its final form - * `Meta.Display::restart` will be emitted to exit the application and leave the * stage contents frozen as soon as the the stage is painted again. * * On case of failure to restart, this signal will be emitted again * with `null` for `message`. * @signal * @run-last */ "show-restart-message": (message: string | null) => boolean | void; /** * @signal * @run-last */ "showing-desktop-changed": () => void; /** * @signal * @run-last */ "window-created": (object: Window) => void; /** * @signal * @run-last */ "window-demands-attention": (object: Window) => void; /** * @signal * @run-last */ "window-entered-monitor": (object: number, p0: Window) => void; /** * @signal * @run-last */ "window-left-monitor": (object: number, p0: Window) => void; /** * @signal * @run-last */ "window-marked-urgent": (object: Window) => void; /** * @signal * @run-last */ "window-visibility-updated": (object: null, p0: null, p1: null) => void; /** * @signal * @run-last */ "workareas-changed": () => void; /** * @signal * @run-last */ "x11-display-closing": () => void; /** * @signal * @run-last */ "x11-display-opened": () => void; /** * @signal * @run-last */ "x11-display-setup": () => void; "notify::compositor-modifiers": (pspec: GObject.ParamSpec) => void; "notify::focus-window": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { compositor_modifiers: Clutter.ModifierType; compositorModifiers: Clutter.ModifierType; focus_window: Window; focusWindow: Window; } } /** * Mutter display representation * * The display is represented as a {@link Meta.Display} struct. * @gir-type Class */ class Display extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @read-only * @default 0 */ get compositor_modifiers(): Clutter.ModifierType; /** * @read-only * @default 0 */ get compositorModifiers(): Clutter.ModifierType; /** * @read-only */ get focus_window(): Window; /** * @read-only */ get focusWindow(): Window; /** * 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: Display.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Add a keybinding at runtime. The key `name` in `schema` needs to be of * type `G_VARIANT_TYPE_STRING_ARRAY`, with each string describing a * keybinding in the form of "<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>". If the key is set to the empty list or a * list with a single element of either "" or "disabled", the keybinding is * disabled. * * Use `meta_display_remove_keybinding()` to remove the binding. * @param name the binding's name * @param settings the {@link Gio.Settings} object where `name` is stored * @param flags flags to specify binding details * @param handler function to run when the keybinding is invoked * @returns the corresponding keybinding action if the keybinding was added successfully, otherwise {@link Meta.KeyBindingAction.NONE} */ add_keybinding(name: string, settings: Gio.Settings, flags: KeyBindingFlags, handler: KeyHandlerFunc): number; /** * Sets the mouse-mode flag to `false`, which means that motion events are * no longer ignored in mouse or sloppy focus. * This is an internal function. It should be used only for reimplementing * keybindings, and only in a manner compatible with core code. */ clear_mouse_mode(): void; /** * @param timestamp */ close(timestamp: number): void; /** * @param timestamp */ focus_default_window(timestamp: number): void; /** * @returns the {@link Meta.Compositor} */ get_compositor(): Compositor; get_compositor_modifiers(): Clutter.ModifierType; /** * @returns the {@link Meta.Context} */ get_context(): Context; /** * Gets the index of the monitor that currently has the mouse pointer. * @returns a monitor index */ get_current_monitor(): number; get_current_time(): number; get_current_time_roundtrip(): number; /** * Get our best guess as to the "currently" focused window (that is, * the window that we expect will be focused at the point when the X * server processes our next request). * @returns The current focus window */ get_focus_window(): Window; /** * Get the keybinding action bound to `keycode`. Builtin keybindings * have a fixed associated {@link Meta.KeyBindingAction}, for bindings added * dynamically the function will return the keybinding action * `meta_display_add_keybinding()` returns on registration. * @param keycode Raw keycode * @param mask Event mask * @returns The action that should be taken for the given key, or {@link Meta.KeyBindingAction.NONE}. */ get_keybinding_action(keycode: number, mask: bigint | number): number; /** * @returns Timestamp of the last user interaction event with a window */ get_last_user_time(): number; /** * Stores the location and size of the indicated `monitor` in `geometry`. * @param monitor the monitor number */ get_monitor_geometry(monitor: number): Mtk.Rectangle; /** * Determines whether there is a fullscreen window obscuring the specified * monitor. If there is a fullscreen window, the desktop environment will * typically hide any controls that might obscure the fullscreen window. * * You can get notification when this changes by connecting to * MetaDisplay::in-fullscreen-changed. * @param monitor the monitor number * @returns `true` if there is a fullscreen window covering the specified monitor. */ get_monitor_in_fullscreen(monitor: number): boolean; /** * @param rect */ get_monitor_index_for_rect(rect: Mtk.Rectangle): number; /** * @param which_monitor * @param dir */ get_monitor_neighbor_index(which_monitor: number, dir: DisplayDirection): number; /** * Gets the monitor scaling value for the given `monitor`. * @param monitor the monitor number * @returns the monitor scaling value */ get_monitor_scale(monitor: number): number; /** * Gets the number of monitors that are joined together to form `display`. * @returns the number of monitors */ get_n_monitors(): number; /** * @param pad * @param button_number */ get_pad_button_label(pad: Clutter.InputDevice, button_number: number): string; /** * @param pad * @param feature * @param direction * @param feature_number */ get_pad_feature_label(pad: Clutter.InputDevice, feature: PadFeatureType, direction: PadDirection, feature_number: number): string; /** * Gets the index of the primary monitor on this `display`. * @returns a monitor index */ get_primary_monitor(): number; /** * @returns The selection manager of the display */ get_selection(): Selection; /** * Retrieve the size of the display. */ get_size(): [number, number]; /** * @returns The sound player of the display */ get_sound_player(): SoundPlayer; /** * Determine the active window that should be displayed for Alt-TAB. * @param type type of tab list * @param workspace origin workspace * @returns Current window */ get_tab_current(type: TabList, workspace: Workspace): Window; /** * Determine the list of windows that should be displayed for Alt-TAB * functionality. The windows are returned in most recently used order. * If `workspace` is not `null`, the list only contains windows that are on * `workspace` or have the demands-attention hint set; otherwise it contains * all windows. * @param type type of tab list * @param workspace origin workspace * @returns List of windows */ get_tab_list(type: TabList, workspace: Workspace | null): Window[]; /** * Determine the next window that should be displayed for Alt-TAB * functionality. * @param type type of tab list * @param workspace origin workspace * @param window starting window * @param backward If `true`, look for the previous window. * @returns Next window */ get_tab_next(type: TabList, workspace: Workspace, window: Window | null, backward: boolean): Window; /** * @returns The workspace manager of the display */ get_workspace_manager(): WorkspaceManager; /** * @param accelerator * @param flags */ grab_accelerator(accelerator: string, flags: KeyBindingFlags): number; /** * Returns `true` if there is an ongoing grab operation. * @returns Whether there is an active display grab operation. */ is_grabbed(): boolean; /** * Tells whether the event sequence is the used for pointer emulation * and single-touch interaction. * @param sequence a {@link Clutter.EventSequence} * @returns `TRUE` if the sequence emulates pointer behavior */ is_pointer_emulating_sequence(sequence: Clutter.EventSequence | null): boolean; /** * List all windows, including override-redirect ones. The windows are * in no particular order. * @returns List of windows */ list_all_windows(): Window[]; /** * Remove keybinding `name`; the function will fail if `name` is not a known * keybinding or has not been added with `meta_display_add_keybinding()`. * @param name name of the keybinding to remove * @returns `true` if the binding has been removed successfully, otherwise `false` */ remove_keybinding(name: string): boolean; /** * @param pad * @param edition_mode */ request_pad_osd(pad: Clutter.InputDevice, edition_mode: boolean): void; /** * @param cursor */ set_cursor(cursor: Cursor): void; /** * @param window * @param timestamp */ set_input_focus(window: Window, timestamp: number): void; /** * Sorts a set of windows according to their current stacking order. If windows * from multiple screens are present in the set of input windows, then all the * windows on screen 0 are sorted below all the windows on screen 1, and so forth. * Since the stacking order of override-redirect windows isn't controlled by * Metacity, if override-redirect windows are in the input, the result may not * correspond to the actual stacking order in the X server. * * An example of using this would be to sort the list of transient dialogs for a * window into their current stacking order. * @param windows Set of windows * @returns Input windows sorted by stacking order, from lowest to highest */ sort_windows_by_stacking(windows: Window[]): Window[]; /** * @param action_id */ ungrab_accelerator(action_id: number): boolean; /** * @param timestamp */ unset_input_focus(timestamp: number): void; /** * Xserver time can wraparound, thus comparing two timestamps needs to take * this into account. If no wraparound has occurred, this is equivalent to * time1 < time2 * Otherwise, we need to account for the fact that wraparound can occur * and the fact that a timestamp of 0 must be special-cased since it * means "older than anything else". * * Note that this is NOT an equivalent for time1 <= time2; if that's what * you need then you'll need to swap the order of the arguments and negate * the result. * @param time1 An event timestamp * @param time2 An event timestamp */ xserver_time_is_before(time1: number, time2: number): boolean; } namespace Dnd { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "dnd-enter": () => void; /** * @signal * @run-last */ "dnd-leave": () => void; /** * @signal * @run-last */ "dnd-position-change": (object: number, p0: number) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class Dnd extends GObject.Object { static $gtype: GObject.GType; /** * 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: Dnd.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; } namespace IdleMonitor { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * Mutter idle counter (similar to X's IDLETIME) * @gir-type Class */ class IdleMonitor extends GObject.Object { static $gtype: GObject.GType; /** * 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: IdleMonitor.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param interval_msec The idletime interval, in milliseconds * @param callback The callback to call when the user has accumulated `interval_msec` milliseconds of idle time. * @returns a watch id Adds a watch for a specific idle time. The callback will be called when the user has accumulated `interval_msec` milliseconds of idle time. This function will return an ID that can either be passed to `meta_idle_monitor_remove_watch()`, or can be used to tell idle time watches apart if you have more than one. Also note that this function will only care about positive transitions (user's idle time exceeding a certain time). If you want to know about when the user has become active, use `meta_idle_monitor_add_user_active_watch()`. */ add_idle_watch(interval_msec: bigint | number, callback: IdleMonitorWatchFunc | null): number; /** * @param callback The callback to call when the user is active again. * @returns a watch id Add a one-time watch to know when the user is active again. Note that this watch is one-time and will de-activate after the function is called, for efficiency purposes. It's most convenient to call this when an idle watch, as added by `meta_idle_monitor_add_idle_watch()`, has triggered. */ add_user_active_watch(callback: IdleMonitorWatchFunc | null): number; /** * @returns The current idle time, in milliseconds, or -1 for not supported */ get_idletime(): number; /** * Removes an idle time watcher, previously added by * `meta_idle_monitor_add_idle_watch()` or * `meta_idle_monitor_add_user_active_watch()`. * @param id A watch ID */ remove_watch(id: number): void; } namespace Laters { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class Laters extends GObject.Object { static $gtype: GObject.GType; /** * 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: Laters.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Sets up a callback to be called at some later time. `when` determines the * particular later occasion at which it is called. This is much like `g_idle_add()`, * except that the functions interact properly with clutter event handling. * If a "later" function is added from a clutter event handler, and is supposed * to be run before the stage is redrawn, it will be run before that redraw * of the stage, not the next one. * @param when enumeration value determining the phase at which to run the callback * @param func callback to run later * @returns an integer ID (guaranteed to be non-zero) that can be used to cancel the callback and prevent it from being run. */ add(when: LaterType, func: GLib.SourceFunc): number; /** * Removes a callback added with `meta_later_add()` * @param later_id the integer ID returned from `meta_later_add()` */ remove(later_id: number): void; } namespace LaunchContext { // Signal signatures interface SignalSignatures extends Gio.AppLaunchContext.SignalSignatures { "notify::display": (pspec: GObject.ParamSpec) => void; "notify::timestamp": (pspec: GObject.ParamSpec) => void; "notify::workspace": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Gio.AppLaunchContext.ConstructorProps { display: Display; timestamp: number; workspace: Workspace; } } /** * @gir-type Class */ class LaunchContext extends Gio.AppLaunchContext { static $gtype: GObject.GType; // Properties /** * @construct-only */ get display(): Display; /** * @default 0 */ get timestamp(): number; set timestamp(val: number); get workspace(): Workspace; set workspace(val: Workspace); /** * 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: LaunchContext.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param timestamp */ set_timestamp(timestamp: number): void; /** * @param workspace */ set_workspace(workspace: Workspace): void; } namespace LogicalMonitor { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * An abstraction for a monitor(set) and its configuration. * * A logical monitor is a group of one or more physical monitors that * must behave and be treated as single one. This happens, for example, * when 2 monitors are mirrored. Each physical monitor is represented * by a {@link Meta.Monitor}. * * {@link Meta.LogicalMonitor} has a single viewport, with its owns transformations * (such as scaling), that are applied to all the {@link Meta.Monitor}s that * are grouped by it. * * {@link Meta.LogicalMonitor} provides an abstraction that makes it easy to handle * the specifics of setting up different {@link Meta.Monitor}s. It then can * be used more easily by `MetaRendererView`. * @gir-type Class */ class LogicalMonitor extends GObject.Object { static $gtype: GObject.GType; /** * 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: LogicalMonitor.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Returns the list of {@link Meta.Monitor}s. * @returns The list of {@link Meta.Monitor}s. */ get_monitors(): Monitor[]; /** * Returns the {@link Meta.Monitor}s number which is compatible with the monitor * API on {@link Meta.Display} until the next monitors-changed. * @returns The {@link Meta.Monitor}s number */ get_number(): number; } namespace Monitor { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class Monitor extends GObject.Object { static $gtype: GObject.GType; /** * 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: Monitor.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Returns the {@link Meta.Backlight} of the monitor, or NULL if it has no * controllable backlight. * @returns The {@link Meta.Backlight}. */ get_backlight(): Backlight | null; /** * Get the connector name of the monitor. * @returns The connector name of the monitor. */ get_connector(): string; /** * Get the displayable name of the monitor. * @returns The displayable name of the monitor. */ get_display_name(): string; /** * Get the product name of the monitor. * @returns The product name of the monitor. */ get_product(): string; /** * Get the serial id of the monitor. * @returns The serial id of the monitor. */ get_serial(): string; /** * Get the vendor name of the monitor. * @returns The vendor name of the monitor. */ get_vendor(): string; /** * Returns whether the monitor is active. * @returns `true` if the monitor is active, `false` otherwise. */ is_active(): boolean; /** * Returns whether the monitor is a builtin monitor. * @returns `true` if no monitors is a builtin monitor, `false` otherwise. */ is_builtin(): boolean; /** * Returns whether the monitor is the primary monitor. * @returns `true` if no monitors is the primary monitor, `false` otherwise. */ is_primary(): boolean; /** * Returns whether the monitor is virtual. * @returns `true` if no monitors is virtual, `false` otherwise. */ is_virtual(): boolean; } namespace MonitorManager { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "confirm-display-change": () => void; /** * @signal * @run-last */ "monitor-privacy-screen-changed": (logical_monitor: LogicalMonitor, enabled: boolean) => void; /** * @signal * @run-last */ "monitors-changed": () => void; /** * @signal * @run-last */ "monitors-changed-internal": () => void; /** * @signal * @run-last */ "monitors-changing": () => void; /** * @signal * @run-last */ "power-save-mode-changed": (object: PowerSaveChangeReason) => void; "notify::backend": (pspec: GObject.ParamSpec) => void; "notify::has-builtin-panel": (pspec: GObject.ParamSpec) => void; "notify::night-light-supported": (pspec: GObject.ParamSpec) => void; "notify::panel-orientation-managed": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { backend: Backend; has_builtin_panel: boolean; hasBuiltinPanel: boolean; night_light_supported: boolean; nightLightSupported: boolean; panel_orientation_managed: boolean; panelOrientationManaged: boolean; } } /** * A manager for multiple monitors * * {@link Meta.MonitorManager} is an abstract class which contains methods to handle * multiple monitors (both {@link Meta.Monitor} and {@link Meta.LogicalMonitor}) and GPU's * (`MetaGpu`). Its functions include reading and/or changing the current * configuration and available capabiliies. * * The {@link Meta.MonitorManager} also provides the "org.gnome.Mutter.DisplayConfig" * DBus service, so apps like GNOME Settings can use this functionality. * @gir-type Class */ class MonitorManager extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only */ get backend(): Backend; /** * @read-only * @default false */ get has_builtin_panel(): boolean; /** * @read-only * @default false */ get hasBuiltinPanel(): boolean; /** * @read-only * @default false */ get night_light_supported(): boolean; /** * @read-only * @default false */ get nightLightSupported(): boolean; /** * @read-only * @default false */ get panel_orientation_managed(): boolean; /** * @read-only * @default false */ get panelOrientationManaged(): boolean; /** * 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: MonitorManager.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods can_switch_config(): boolean; get_display_configuration_timeout(): number; /** * Returns whether the built-in display (i.e. a laptop panel) is turned on. */ get_is_builtin_display_on(): boolean; /** * Returns the list of {@link Meta.LogicalMonitor}s. See also * `meta_monitor_manager_get_num_logical_monitors()` if you only need the size of * the list. * @returns The list of {@link Meta.LogicalMonitor}s. */ get_logical_monitors(): LogicalMonitor[] | null; /** * @param connector A valid connector name * @returns The monitor index or -1 if `id` isn't valid or the connector isn't associated with a logical monitor. */ get_monitor_for_connector(connector: string): number; /** * Returns the list of {@link Meta.Monitor}s. See also * `meta_monitor_manager_get_logical_monitors()` for a list of * {@link Meta.LogicalMonitor}s. * @returns The list of {@link Meta.Monitor}s. */ get_monitors(): Monitor[] | null; get_panel_orientation_managed(): boolean; get_switch_config(): MonitorSwitchConfigType; /** * @param config_type */ switch_config(config_type: MonitorSwitchConfigType): void; } namespace MultiTexture { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * A texture that can have multiple planes. * * {@link Meta.MultiTexture} allows one to deal with non-trivial formats that * have multiple planes, requires subsampling and/or aren't in RGB. A common * example of this are decoded video frames, which often use something in the * YUV colorspace, combined with subsampling. * * The basic idea of a {@link Meta.MultiTexture} is the following: * - Each plane is represented by a separate {@link Cogl.Texture}. That means that you * should add each of these planes as a layer to your CoglPipeline. * - When dealing with a color space that is not RGB, you can ask the * {@link Meta.MultiTexture} to create a shader for you that does the conversion * in the GPU. * - In case you need to deal with memory access in a format with subsampling, * you can use `meta_multi_texture_get_width()` and its analogous version * for the height to get the correct size of the texture. * @gir-type Class */ class MultiTexture extends GObject.Object { static $gtype: GObject.GType; /** * 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: MultiTexture.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](format: MultiTextureFormat, planes: Cogl.Texture, n_planes: number): MultiTexture; static new_simple(plane: Cogl.Texture): MultiTexture; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param coeffs * @param premult * @param pipeline */ add_pipeline_sampling(coeffs: MultiTextureCoefficients, premult: MultiTextureAlphaMode, pipeline: Cogl.Pipeline): void; /** * Returns the {@link Meta.MultiTextureFormat} that is used by this texture. * @returns The texture format that is used by this {@link Meta.MultiTexture}. */ get_format(): MultiTextureFormat; /** * Returns the height of the {@link Meta.MultiTexture}. Prefer this over calling * `cogl_texture_get_height()` on one of the textures, as that might give a * different size when dealing with subsampling. * @returns The height of the texture. */ get_height(): number; /** * Returns the number of planes for this texture. Note that this is entirely * dependent on the {@link Cogl.PixelFormat} that is used. For example, simple RGB * textures will have a single plane, while some more convoluted formats like * NV12 and YUV 4:4:4 can have 2 and 3 planes respectively. * @returns The number of planes in this {@link Meta.MultiTexture}. */ get_n_planes(): number; /** * Returns the n'th plane of the {@link Meta.MultiTexture}. Note that it's a programming * error to use with an index larger than `meta_multi_texture_get_n_planes()`. * @param index the index of the plane * @returns The plane at the given `index`. */ get_plane(index: number): Cogl.Texture; /** * Returns the width of the {@link Meta.MultiTexture}. Prefer this over calling * `cogl_texture_get_width()` on one of the textures, as that might give a * different size when dealing with subsampling. * @returns The width of the texture. */ get_width(): number; /** * A small function that checks whether the given multi texture uses a "simple" * format, i.e. one that can be represented by a {@link Cogl.PixelFormat}. * @returns Whether the texture format is #META_MULTI_TEXTURE_FORMAT_SIMPLE */ is_simple(): boolean; /** * Returns a string representation of `multi_texture`, useful for debugging * purposes. * @returns A string representation of `multi_texture`. Use `g_free()` when done with it. */ to_string(): string; } namespace OrientationManager { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "orientation-changed": () => void; /** * @signal * @run-last */ "sensor-active": () => void; "notify::has-accelerometer": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { has_accelerometer: boolean; hasAccelerometer: boolean; } } /** * A screen orientation manager * * {@link Meta.OrientationManager} is a final class which contains methods to * read the current screen orientation, as well as a signal that is * triggered whenever a screen changes its orientation. * @gir-type Class */ class OrientationManager extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @read-only * @default false */ get has_accelerometer(): boolean; /** * @read-only * @default false */ get hasAccelerometer(): boolean; /** * 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: OrientationManager.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods get_orientation(): Orientation; inhibit_tracking(): void; uninhibit_tracking(): void; } namespace Plugin { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * Entry point for plugins * @gir-type Class */ abstract class Plugin extends GObject.Object { static $gtype: GObject.GType; /** * 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: Plugin.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Static methods /** * @param gtype */ static manager_set_plugin_type(gtype: GObject.GType): void; // Virtual methods /** * @virtual */ vfunc_confirm_display_change(): void; /** * Virtual function called to create a "force quit" dialog * on non-responsive clients. * @param window a {@link Meta.Window} * @virtual */ vfunc_create_close_dialog(window: Window): CloseDialog | null; /** * Virtual function called to create a "inhibit shortcuts" dialog * when a client requests compositor shortcuts to be inhibited. * @param window a {@link Meta.Window} * @virtual */ vfunc_create_inhibit_shortcuts_dialog(window: Window): InhibitShortcutsDialog; /** * Virtual function called when the window represented by `actor` is destroyed. * @param actor a {@link Meta.WindowActor} * @virtual */ vfunc_destroy(actor: WindowActor): void; /** * @virtual */ vfunc_hide_tile_preview(): void; /** * Virtual function called when handling each keybinding. * @param binding a {@link Meta.KeyBinding} * @virtual */ vfunc_keybinding_filter(binding: KeyBinding): boolean; /** * Virtual function called when the workspace-switching effect needs to be * killed prematurely. * @virtual */ vfunc_kill_switch_workspace(): void; /** * Virtual function called when the effects on `actor` need to be killed * prematurely; the plugin must call the `completed()` callback as if the effect * terminated naturally. * @param actor a {@link Meta.WindowActor} * @virtual */ vfunc_kill_window_effects(actor: WindowActor): void; /** * Virtual function called when the user triggered the "locate-pointer" * mechanism. * The common way to implement this function is to show some animation * on screen to draw user attention on the pointer location. * @virtual */ vfunc_locate_pointer(): void; /** * Virtual function called when the window represented by `actor` is mapped. * @param actor a {@link Meta.WindowActor} * @virtual */ vfunc_map(actor: WindowActor): void; /** * Virtual function called when the window represented by `actor` is minimized. * @param actor a {@link Meta.WindowActor} * @virtual */ vfunc_minimize(actor: WindowActor): void; /** * @param window * @param tile_rect * @param tile_monitor_number * @virtual */ vfunc_show_tile_preview(window: Window, tile_rect: Mtk.Rectangle, tile_monitor_number: number): void; /** * @param window * @param menu * @param x * @param y * @virtual */ vfunc_show_window_menu(window: Window, menu: WindowMenuType, x: number, y: number): void; /** * @param window * @param menu * @param rect * @virtual */ vfunc_show_window_menu_for_rect(window: Window, menu: WindowMenuType, rect: Mtk.Rectangle): void; /** * virtual function called when a window changes size to/from constraints * @param actor * @param which_change * @param old_frame_rect * @param old_buffer_rect * @virtual */ vfunc_size_change(actor: WindowActor, which_change: SizeChange, old_frame_rect: Mtk.Rectangle, old_buffer_rect: Mtk.Rectangle): void; /** * @param actor * @virtual */ vfunc_size_changed(actor: WindowActor): void; /** * Virtual function called when the compositor starts managing a screen * @virtual */ vfunc_start(): void; /** * Virtual function called when the window represented by `actor` is destroyed. * @param from origin workspace * @param to destination workspace * @param direction a {@link Meta.MotionDirection} * @virtual */ vfunc_switch_workspace(from: number, to: number, direction: MotionDirection): void; /** * Virtual function called when the window represented by `actor` is unminimized. * @param actor a {@link Meta.WindowActor} * @virtual */ vfunc_unminimize(actor: WindowActor): void; /** * Virtual function called when handling each event. * @param event a xlib.XEvent * @virtual */ vfunc_xevent_filter(event: XEvent): boolean; // Methods /** * @param ok */ complete_display_change(ok: boolean): void; /** * @param actor */ destroy_completed(actor: WindowActor): void; /** * Gets the {@link Meta.Display} corresponding to a plugin. * @returns the {@link Meta.Display} for the plugin */ get_display(): Display; /** * @param actor */ map_completed(actor: WindowActor): void; /** * @param actor */ minimize_completed(actor: WindowActor): void; /** * @param actor */ size_change_completed(actor: WindowActor): void; switch_workspace_completed(): void; /** * @param actor */ unminimize_completed(actor: WindowActor): void; } namespace RemoteAccessController { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "new-handle": (object: RemoteAccessHandle) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class RemoteAccessController extends GObject.Object { static $gtype: GObject.GType; /** * 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: RemoteAccessController.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Inhibits remote access sessions from being created and running. Any active * remote access session will be terminated. */ inhibit_remote_access(): void; /** * Uninhibits remote access sessions from being created and running. If this was * the last inhibition that was inhibited, new remote access sessions can now * be created. */ uninhibit_remote_access(): void; } namespace RemoteAccessHandle { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ stopped: () => void; "notify::is-recording": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { is_recording: boolean; isRecording: boolean; } } /** * @gir-type Class */ class RemoteAccessHandle extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only * @default false */ get is_recording(): boolean; /** * @construct-only * @default false */ get isRecording(): boolean; /** * 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: RemoteAccessHandle.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Virtual methods /** * Stop the associated remote access session. * @virtual */ vfunc_stop(): void; // Methods get_disable_animations(): boolean; /** * Stop the associated remote access session. */ stop(): void; } namespace Selection { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "owner-changed": (object: number, p0: SelectionSource) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class Selection extends GObject.Object { static $gtype: GObject.GType; /** * 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: Selection.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](display: Display): Selection; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Returns the list of supported mimetypes for the given selection type. * @param selection_type Selection to query * @returns The supported mimetypes */ get_mimetypes(selection_type: SelectionType): string[]; /** * Sets `owner` as the owner of the selection given by `selection_type`, * unsets any previous owner there was. * @param selection_type Selection type * @param owner New selection owner */ set_owner(selection_type: SelectionType, owner: SelectionSource): void; /** * Requests a transfer of `mimetype` on the selection given by * `selection_type`. * @param selection_type Selection type * @param mimetype Mimetype to transfer * @param size Maximum size to transfer, -1 for unlimited * @param output Output stream to write contents to * @param cancellable Cancellable */ transfer_async(selection_type: SelectionType, mimetype: string, size: bigint | number, output: Gio.OutputStream, cancellable: Gio.Cancellable | null): globalThis.Promise; /** * Requests a transfer of `mimetype` on the selection given by * `selection_type`. * @param selection_type Selection type * @param mimetype Mimetype to transfer * @param size Maximum size to transfer, -1 for unlimited * @param output Output stream to write contents to * @param cancellable Cancellable * @param callback User callback */ transfer_async(selection_type: SelectionType, mimetype: string, size: bigint | number, output: Gio.OutputStream, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void; /** * Requests a transfer of `mimetype` on the selection given by * `selection_type`. * @param selection_type Selection type * @param mimetype Mimetype to transfer * @param size Maximum size to transfer, -1 for unlimited * @param output Output stream to write contents to * @param cancellable Cancellable * @param callback User callback */ transfer_async(selection_type: SelectionType, mimetype: string, size: bigint | number, output: Gio.OutputStream, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): globalThis.Promise | void; /** * Finishes the transfer of a queried mimetype. * @param result The async result * @returns `TRUE` if the transfer was successful. * @throws GLib.Error */ transfer_finish(result: Gio.AsyncResult): boolean; /** * Unsets `owner` as the owner the selection given by `selection_type`. If * `owner` does not own the selection, nothing is done. * @param selection_type Selection type * @param owner Owner to unset */ unset_owner(selection_type: SelectionType, owner: SelectionSource): void; } namespace SelectionSource { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @action * @run-last */ activated: () => void; /** * @signal * @action * @run-last */ deactivated: () => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class SelectionSource extends GObject.Object { static $gtype: GObject.GType; /** * 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: SelectionSource.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Virtual methods /** * @virtual */ vfunc_activated(): void; /** * @virtual */ vfunc_deactivated(): void; /** * Returns the list of supported mimetypes. * @virtual */ vfunc_get_mimetypes(): string[]; /** * @param mimetype * @param cancellable * @param callback * @virtual */ vfunc_read_async(mimetype: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void; /** * Finishes a read from the selection source. * @param result The async result * @virtual */ vfunc_read_finish(result: Gio.AsyncResult): Gio.InputStream; // Methods /** * Returns the list of supported mimetypes. * @returns The supported mimetypes */ get_mimetypes(): string[]; /** * Returns `TRUE` if the source is active on a selection. * @returns `TRUE` if the source owns a selection. */ is_active(): boolean; /** * @param mimetype * @param cancellable */ read_async(mimetype: string, cancellable: Gio.Cancellable | null): globalThis.Promise; /** * @param mimetype * @param cancellable * @param callback */ read_async(mimetype: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback | null): void; /** * @param mimetype * @param cancellable * @param callback */ read_async(mimetype: string, cancellable: Gio.Cancellable | null, callback?: Gio.AsyncReadyCallback | null): globalThis.Promise | void; /** * Finishes a read from the selection source. * @param result The async result * @returns The resulting {@link Gio.InputStream} * @throws GLib.Error */ read_finish(result: Gio.AsyncResult): Gio.InputStream; } namespace SelectionSourceMemory { // Signal signatures interface SignalSignatures extends SelectionSource.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends SelectionSource.ConstructorProps {} } /** * @gir-type Class */ class SelectionSourceMemory extends SelectionSource { static $gtype: GObject.GType; /** * 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: SelectionSourceMemory.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](mimetype: string, content: GLib.Bytes | Uint8Array): SelectionSourceMemory; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; } namespace ShapedTexture { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures, Clutter.Content.SignalSignatures { /** * @signal * @run-last */ "size-changed": () => void; "notify::clutter-context": (pspec: GObject.ParamSpec) => void; "notify::color-state": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps, Clutter.Content.ConstructorProps { clutter_context: Clutter.Context; clutterContext: Clutter.Context; color_state: Clutter.ColorState; colorState: Clutter.ColorState; } } /** * A ClutterContent which draws a shaped texture * * A MetaShapedTexture draws a {@link Cogl.Texture} (often provided from a client * surface) in such a way that it matches any required transformations that * give its final shape, such as a {@link Mtk.MonitorTransform}, y-invertedness, or a * crop-and-scale operation. * @gir-type Class */ class ShapedTexture extends GObject.Object implements Clutter.Content { static $gtype: GObject.GType; // Properties /** * @construct-only */ get clutter_context(): Clutter.Context; /** * @construct-only */ get clutterContext(): Clutter.Context; /** * @construct-only */ get color_state(): Clutter.ColorState; /** * @construct-only */ get colorState(): Clutter.ColorState; /** * 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: ShapedTexture.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Flattens the two layers of the shaped texture into one ARGB32 * image by alpha blending the two images, and returns the flattened * image. * @param clip A clipping rectangle, to help prevent extra processing. In the case that the clipping rectangle is partially or fully outside the bounds of the texture, the rectangle will be clipped. * @returns a new cairo surface to be freed with `cairo_surface_destroy()`. */ get_image(clip: Mtk.Rectangle | null): cairo.Surface | null; /** * @returns the unshaped texture */ get_texture(): MultiTexture; /** * @param create_mipmaps */ set_create_mipmaps(create_mipmaps: boolean): void; /** * @param mask_texture */ set_mask_texture(mask_texture: Cogl.Texture): void; /** * Retrieves the natural size of the `content`, if any. * * The natural size of a {@link Clutter.Content} is defined as the size the content * would have regardless of the allocation of the actor that is painting it, * for instance the size of an image data. * @returns `true` if the content has a preferred size, and `false` otherwise */ get_preferred_size(): [boolean, number, number]; /** * Invalidates a {@link Clutter.Content}. * * This function should be called by {@link Clutter.Content} implementations when * they change the way a the content should be painted regardless of the * actor state. */ invalidate(): void; /** * Signals that `content`'s size changed. Attached actors with request mode * set to {@link Clutter.RequestMode.CONTENT_SIZE} will have a relayout queued. * * Attached actors with other request modes are not redrawn. To redraw them * too, use {@link Clutter.Content.invalidate}. */ invalidate_size(): void; /** * virtual function; called each time a {@link Clutter.Content} is attached * to a {@link Clutter.Actor}. * @param actor * @virtual */ vfunc_attached(actor: Clutter.Actor): void; /** * virtual function; called each time a {@link Clutter.Content} is detached * from a {@link Clutter.Actor}. * @param actor * @virtual */ vfunc_detached(actor: Clutter.Actor): void; /** * Retrieves the natural size of the `content`, if any. * * The natural size of a {@link Clutter.Content} is defined as the size the content * would have regardless of the allocation of the actor that is painting it, * for instance the size of an image data. * @virtual */ vfunc_get_preferred_size(): [boolean, number, number]; /** * Invalidates a {@link Clutter.Content}. * * This function should be called by {@link Clutter.Content} implementations when * they change the way a the content should be painted regardless of the * actor state. * @virtual */ vfunc_invalidate(): void; /** * Signals that `content`'s size changed. Attached actors with request mode * set to {@link Clutter.RequestMode.CONTENT_SIZE} will have a relayout queued. * * Attached actors with other request modes are not redrawn. To redraw them * too, use {@link Clutter.Content.invalidate}. * @virtual */ vfunc_invalidate_size(): void; /** * virtual function; called each time the content needs to * paint itself * @param actor * @param node * @param paint_context * @virtual */ vfunc_paint_content(actor: Clutter.Actor, node: Clutter.PaintNode, paint_context: Clutter.PaintContext): void; } namespace SoundPlayer { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class SoundPlayer extends GObject.Object { static $gtype: GObject.GType; /** * 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: SoundPlayer.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Plays a sound from a file. * @param file file to play * @param description description of the played sound * @param cancellable cancellable for the request */ play_from_file(file: Gio.File, description: string, cancellable: Gio.Cancellable | null): void; /** * Plays a sound from the sound theme. * @param name sound theme name of the event * @param description description of the event * @param cancellable cancellable for the request */ play_from_theme(name: string, description: string, cancellable: Gio.Cancellable | null): void; } namespace Stage { // Signal signatures interface SignalSignatures extends Clutter.Stage.SignalSignatures { "notify::is-grabbed": (pspec: GObject.ParamSpec) => void; "notify::key-focus": (pspec: GObject.ParamSpec) => void; "notify::perspective": (pspec: GObject.ParamSpec) => void; "notify::accessible-name": (pspec: GObject.ParamSpec) => void; "notify::accessible-role": (pspec: GObject.ParamSpec) => void; "notify::actions": (pspec: GObject.ParamSpec) => void; "notify::allocation": (pspec: GObject.ParamSpec) => void; "notify::background-color": (pspec: GObject.ParamSpec) => void; "notify::background-color-set": (pspec: GObject.ParamSpec) => void; "notify::child-transform": (pspec: GObject.ParamSpec) => void; "notify::child-transform-set": (pspec: GObject.ParamSpec) => void; "notify::clip-rect": (pspec: GObject.ParamSpec) => void; "notify::clip-to-allocation": (pspec: GObject.ParamSpec) => void; "notify::color-state": (pspec: GObject.ParamSpec) => void; "notify::constraints": (pspec: GObject.ParamSpec) => void; "notify::content": (pspec: GObject.ParamSpec) => void; "notify::content-box": (pspec: GObject.ParamSpec) => void; "notify::content-gravity": (pspec: GObject.ParamSpec) => void; "notify::content-repeat": (pspec: GObject.ParamSpec) => void; "notify::context": (pspec: GObject.ParamSpec) => void; "notify::effect": (pspec: GObject.ParamSpec) => void; "notify::first-child": (pspec: GObject.ParamSpec) => void; "notify::fixed-position-set": (pspec: GObject.ParamSpec) => void; "notify::fixed-x": (pspec: GObject.ParamSpec) => void; "notify::fixed-y": (pspec: GObject.ParamSpec) => void; "notify::has-clip": (pspec: GObject.ParamSpec) => void; "notify::has-pointer": (pspec: GObject.ParamSpec) => void; "notify::height": (pspec: GObject.ParamSpec) => void; "notify::last-child": (pspec: GObject.ParamSpec) => void; "notify::layout-manager": (pspec: GObject.ParamSpec) => void; "notify::magnification-filter": (pspec: GObject.ParamSpec) => void; "notify::mapped": (pspec: GObject.ParamSpec) => void; "notify::margin-bottom": (pspec: GObject.ParamSpec) => void; "notify::margin-left": (pspec: GObject.ParamSpec) => void; "notify::margin-right": (pspec: GObject.ParamSpec) => void; "notify::margin-top": (pspec: GObject.ParamSpec) => void; "notify::min-height": (pspec: GObject.ParamSpec) => void; "notify::min-height-set": (pspec: GObject.ParamSpec) => void; "notify::min-width": (pspec: GObject.ParamSpec) => void; "notify::min-width-set": (pspec: GObject.ParamSpec) => void; "notify::minification-filter": (pspec: GObject.ParamSpec) => void; "notify::name": (pspec: GObject.ParamSpec) => void; "notify::natural-height": (pspec: GObject.ParamSpec) => void; "notify::natural-height-set": (pspec: GObject.ParamSpec) => void; "notify::natural-width": (pspec: GObject.ParamSpec) => void; "notify::natural-width-set": (pspec: GObject.ParamSpec) => void; "notify::offscreen-redirect": (pspec: GObject.ParamSpec) => void; "notify::opacity": (pspec: GObject.ParamSpec) => void; "notify::pivot-point": (pspec: GObject.ParamSpec) => void; "notify::pivot-point-z": (pspec: GObject.ParamSpec) => void; "notify::position": (pspec: GObject.ParamSpec) => void; "notify::reactive": (pspec: GObject.ParamSpec) => void; "notify::realized": (pspec: GObject.ParamSpec) => void; "notify::request-mode": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-x": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-y": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-z": (pspec: GObject.ParamSpec) => void; "notify::scale-x": (pspec: GObject.ParamSpec) => void; "notify::scale-y": (pspec: GObject.ParamSpec) => void; "notify::scale-z": (pspec: GObject.ParamSpec) => void; "notify::show-on-set-parent": (pspec: GObject.ParamSpec) => void; "notify::size": (pspec: GObject.ParamSpec) => void; "notify::text-direction": (pspec: GObject.ParamSpec) => void; "notify::transform": (pspec: GObject.ParamSpec) => void; "notify::transform-set": (pspec: GObject.ParamSpec) => void; "notify::translation-x": (pspec: GObject.ParamSpec) => void; "notify::translation-y": (pspec: GObject.ParamSpec) => void; "notify::translation-z": (pspec: GObject.ParamSpec) => void; "notify::visible": (pspec: GObject.ParamSpec) => void; "notify::width": (pspec: GObject.ParamSpec) => void; "notify::x": (pspec: GObject.ParamSpec) => void; "notify::x-align": (pspec: GObject.ParamSpec) => void; "notify::x-expand": (pspec: GObject.ParamSpec) => void; "notify::y": (pspec: GObject.ParamSpec) => void; "notify::y-align": (pspec: GObject.ParamSpec) => void; "notify::y-expand": (pspec: GObject.ParamSpec) => void; "notify::z-position": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Clutter.Stage.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Clutter.Animatable.ConstructorProps {} } /** * @gir-type Class */ class Stage extends Clutter.Stage implements Atk.ImplementorIface, Clutter.Animatable { static $gtype: GObject.GType; /** * 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: Stage.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; } namespace StartupNotification { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ changed: (object: StartupSequence) => void; "notify::display": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { display: Display; } } /** * @gir-type Class */ class StartupNotification extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only */ get display(): Display; /** * 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: StartupNotification.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Creates an app launch context. * @returns a launch context. */ create_launcher(): LaunchContext; /** * Get the list of startup sequences arrived in the startup notification object. * @returns a {@link GLib.SList} of {@link Meta.StartupSequence} in the {@link Meta.StartupNotification}. */ get_sequences(): StartupSequence[]; } namespace StartupSequence { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ complete: () => void; /** * @signal * @run-last */ timeout: () => void; "notify::application-id": (pspec: GObject.ParamSpec) => void; "notify::display": (pspec: GObject.ParamSpec) => void; "notify::icon-name": (pspec: GObject.ParamSpec) => void; "notify::id": (pspec: GObject.ParamSpec) => void; "notify::name": (pspec: GObject.ParamSpec) => void; "notify::timestamp": (pspec: GObject.ParamSpec) => void; "notify::wmclass": (pspec: GObject.ParamSpec) => void; "notify::workspace": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { application_id: string | null; applicationId: string | null; display: Display; icon_name: string | null; iconName: string | null; id: string; name: string; timestamp: bigint | number; wmclass: string | null; workspace: number; } } /** * @gir-type Class */ class StartupSequence extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @construct-only * @default null */ get application_id(): string | null; /** * @construct-only * @default null */ get applicationId(): string | null; /** * @construct-only */ get display(): Display; /** * @construct-only * @default null */ get icon_name(): string | null; /** * @construct-only * @default null */ get iconName(): string | null; /** * @construct-only * @default null */ get id(): string; /** * @construct-only * @default null */ get name(): string; /** * @construct-only * @default 0 */ get timestamp(): number; /** * @construct-only * @default null */ get wmclass(): string | null; /** * @construct-only * @default -1 */ get workspace(): number; /** * 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: StartupSequence.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods complete(): void; /** * Get the application id of the startup sequence. * @returns the application id or `null`. */ get_application_id(): string | null; get_completed(): boolean; /** * Get the icon name of the startup sequence. * @returns the icon name or `null`. */ get_icon_name(): string | null; get_id(): string; get_name(): string; get_timestamp(): number; /** * Get the wmclass of the startup sequence. * @returns the wmclass or `null`. */ get_wmclass(): string | null; get_workspace(): number; } namespace WaylandClient { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "client-destroyed": () => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * A class that allows to launch a trusted client and detect if an specific * Wayland window belongs to it. * @gir-type Class */ class WaylandClient extends GObject.Object { static $gtype: GObject.GType; /** * 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: WaylandClient.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static new_subprocess(context: Context, launcher: Gio.SubprocessLauncher, argv: string[]): WaylandClient; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods get_pid(): never; /** * Get the {@link Gio.Subprocess} which was created by meta_wayland_client_new_subprocess. * @returns The {@link Gio.Subprocess} */ get_subprocess(): Gio.Subprocess; /** * Checks whether `window` belongs to the process launched from `client` or not. * This only works under Wayland. If the window is an X11 window, an exception * will be triggered. * @param window a MetaWindow * @returns TRUE if the window was created by this process; FALSE if not. */ owns_window(window: Window): boolean; } namespace WaylandCompositor { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "prepare-shutdown": () => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * @gir-type Class */ class WaylandCompositor extends GObject.Object { static $gtype: GObject.GType; /** * 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: WaylandCompositor.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @returns the Wayland display object */ get_wayland_display(): null; } namespace WaylandSurface { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "actor-changed": () => void; /** * @signal * @run-last */ configure: () => void; /** * @signal * @run-last */ destroy: () => void; /** * @signal * @run-last */ "geometry-changed": () => void; /** * @signal * @run-last */ "pre-state-applied": () => void; /** * @signal * @run-last */ "shortcuts-inhibited": () => void; /** * @signal * @run-last */ "shortcuts-restored": () => void; /** * @signal * @run-last */ unmapped: () => void; "notify::main-monitor": (pspec: GObject.ParamSpec) => void; "notify::window": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { main_monitor: LogicalMonitor; mainMonitor: LogicalMonitor; window: Window | null; } } /** * @gir-type Class */ class WaylandSurface extends GObject.Object { static $gtype: GObject.GType; // Properties get main_monitor(): LogicalMonitor; set main_monitor(val: LogicalMonitor); get mainMonitor(): LogicalMonitor; set mainMonitor(val: LogicalMonitor); /** * @read-only */ get window(): Window | null; /** * 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: WaylandSurface.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Get the {@link Meta.Window} associated with this wayland surface. * @returns a {@link Meta.Window} */ get_window(): Window | null; } namespace Window { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ configure: (window_config: WindowConfig) => void; /** * @signal * @run-last */ focus: () => void; /** * This is emitted when the monitor with the highest scale * intersecting the window changes. * @signal * @run-last */ "highest-scale-monitor-changed": () => void; /** * This is emitted when the position of a window might * have changed. * * Specifically, this is emitted when the position of * the toplevel window has changed, or when the position * of the client window has changed. * @signal * @run-last */ "position-changed": () => void; /** * @signal * @run-last */ raised: () => void; /** * This is emitted after a window has been shown. * @signal * @run-last */ shown: () => void; /** * This is emitted when the size of a window might * have changed. * * Specifically, this is emitted when the size of * the toplevel window has changed, or when the * size of the client window has changed. * @signal * @run-last */ "size-changed": () => void; /** * @signal * @run-last */ unmanaged: () => void; /** * @signal * @run-last */ unmanaging: () => void; /** * @signal * @run-last */ "workspace-changed": () => void; "notify::above": (pspec: GObject.ParamSpec) => void; "notify::appears-focused": (pspec: GObject.ParamSpec) => void; "notify::decorated": (pspec: GObject.ParamSpec) => void; "notify::demands-attention": (pspec: GObject.ParamSpec) => void; "notify::display": (pspec: GObject.ParamSpec) => void; "notify::effect": (pspec: GObject.ParamSpec) => void; "notify::fullscreen": (pspec: GObject.ParamSpec) => void; "notify::gtk-app-menu-object-path": (pspec: GObject.ParamSpec) => void; "notify::gtk-application-id": (pspec: GObject.ParamSpec) => void; "notify::gtk-application-object-path": (pspec: GObject.ParamSpec) => void; "notify::gtk-menubar-object-path": (pspec: GObject.ParamSpec) => void; "notify::gtk-unique-bus-name": (pspec: GObject.ParamSpec) => void; "notify::gtk-window-object-path": (pspec: GObject.ParamSpec) => void; "notify::is-alive": (pspec: GObject.ParamSpec) => void; "notify::main-monitor": (pspec: GObject.ParamSpec) => void; "notify::mapped": (pspec: GObject.ParamSpec) => void; "notify::maximized-horizontally": (pspec: GObject.ParamSpec) => void; "notify::maximized-vertically": (pspec: GObject.ParamSpec) => void; "notify::minimized": (pspec: GObject.ParamSpec) => void; "notify::mutter-hints": (pspec: GObject.ParamSpec) => void; "notify::on-all-workspaces": (pspec: GObject.ParamSpec) => void; "notify::resizeable": (pspec: GObject.ParamSpec) => void; "notify::skip-taskbar": (pspec: GObject.ParamSpec) => void; "notify::tag": (pspec: GObject.ParamSpec) => void; "notify::title": (pspec: GObject.ParamSpec) => void; "notify::urgent": (pspec: GObject.ParamSpec) => void; "notify::user-time": (pspec: GObject.ParamSpec) => void; "notify::window-type": (pspec: GObject.ParamSpec) => void; "notify::wm-class": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps, Gio.Initable.ConstructorProps { above: boolean; appears_focused: boolean; appearsFocused: boolean; decorated: boolean; demands_attention: boolean; demandsAttention: boolean; display: Display; effect: number; fullscreen: boolean; gtk_app_menu_object_path: string | null; gtkAppMenuObjectPath: string | null; gtk_application_id: string | null; gtkApplicationId: string | null; gtk_application_object_path: string | null; gtkApplicationObjectPath: string | null; gtk_menubar_object_path: string | null; gtkMenubarObjectPath: string | null; gtk_unique_bus_name: string | null; gtkUniqueBusName: string | null; gtk_window_object_path: string | null; gtkWindowObjectPath: string | null; is_alive: boolean; isAlive: boolean; main_monitor: LogicalMonitor; mainMonitor: LogicalMonitor; mapped: boolean; maximized_horizontally: boolean; maximizedHorizontally: boolean; maximized_vertically: boolean; maximizedVertically: boolean; minimized: boolean; mutter_hints: string | null; mutterHints: string | null; on_all_workspaces: boolean; onAllWorkspaces: boolean; resizeable: boolean; skip_taskbar: boolean; skipTaskbar: boolean; tag: string | null; title: string; urgent: boolean; user_time: number; userTime: number; window_type: WindowType; windowType: WindowType; wm_class: string | null; wmClass: string | null; } } /** * A display-agnostic abstraction for a window. * * {@link Meta.Window} is the core abstraction in Mutter of a window. It has the * properties you'd expect, such as a title, whether it's fullscreen, * has decorations, etc. * * Since a lot of different kinds of windows exist, each window also a * {@link Meta.WindowType} which denotes which kind of window we're exactly dealing * with. For example, one expects slightly different behaviour from a dialog * than a "normal" window. The type of a window can be queried with * {@link Meta.Window.get_window_type}. * * Common API for windows include: * * - Minimizing: {@link Meta.Window.minimize} / {@link Meta.Window.unminimize} * - Maximizing: {@link Meta.Window.maximize} / {@link Meta.Window.unmaximize} * - Fullscreen: {@link Meta.Window.make_fullscreen} / {@link Meta.Window.unmake_fullscreen} * / {@link Meta.Window.is_fullscreen} * * Each {@link Meta.Window} is part of either one or all {@link Meta.Workspace}s of the * desktop. You can activate a window on a certain workspace using * {@link Meta.Window.activate_with_workspace}, and query on which workspace it is * located using {@link Meta.Window.located_on_workspace}. The workspace it is part * of can be obtained using {@link Meta.Window.get_workspace}. * * Each display protocol should make a subclass to be compatible with that * protocols' specifics, for example `MetaWindowX11` and `MetaWindowWayland`. * This is independent of the protocol that the client uses, which is modeled * using the {@link Meta.WindowClientType} enum. * * To integrate within the Clutter scene graph, which deals with the actual * rendering, each {@link Meta.Window} will be part of a {@link Meta.WindowActor}. * @gir-type Class */ abstract class Window extends GObject.Object implements Gio.Initable { static $gtype: GObject.GType; // Properties /** * @read-only * @default false */ get above(): boolean; /** * @read-only * @default false */ get appears_focused(): boolean; /** * @read-only * @default false */ get appearsFocused(): boolean; /** * @read-only * @default true */ get decorated(): boolean; /** * @read-only * @default false */ get demands_attention(): boolean; /** * @read-only * @default false */ get demandsAttention(): boolean; /** * @construct-only */ get display(): Display; /** * @construct-only * @default 4 */ get effect(): number; /** * @read-only * @default false */ get fullscreen(): boolean; /** * @read-only * @default null */ get gtk_app_menu_object_path(): string | null; /** * @read-only * @default null */ get gtkAppMenuObjectPath(): string | null; /** * @read-only * @default null */ get gtk_application_id(): string | null; /** * @read-only * @default null */ get gtkApplicationId(): string | null; /** * @read-only * @default null */ get gtk_application_object_path(): string | null; /** * @read-only * @default null */ get gtkApplicationObjectPath(): string | null; /** * @read-only * @default null */ get gtk_menubar_object_path(): string | null; /** * @read-only * @default null */ get gtkMenubarObjectPath(): string | null; /** * @read-only * @default null */ get gtk_unique_bus_name(): string | null; /** * @read-only * @default null */ get gtkUniqueBusName(): string | null; /** * @read-only * @default null */ get gtk_window_object_path(): string | null; /** * @read-only * @default null */ get gtkWindowObjectPath(): string | null; /** * @read-only * @default true */ get is_alive(): boolean; /** * @read-only * @default true */ get isAlive(): boolean; /** * @read-only */ get main_monitor(): LogicalMonitor; /** * @read-only */ get mainMonitor(): LogicalMonitor; /** * @read-only * @default false */ get mapped(): boolean; /** * @read-only * @default false */ get maximized_horizontally(): boolean; /** * @read-only * @default false */ get maximizedHorizontally(): boolean; /** * @read-only * @default false */ get maximized_vertically(): boolean; /** * @read-only * @default false */ get maximizedVertically(): boolean; /** * @read-only * @default false */ get minimized(): boolean; /** * @read-only * @default null */ get mutter_hints(): string | null; /** * @read-only * @default null */ get mutterHints(): string | null; /** * @read-only * @default false */ get on_all_workspaces(): boolean; /** * @read-only * @default false */ get onAllWorkspaces(): boolean; /** * @read-only * @default false */ get resizeable(): boolean; /** * @read-only * @default false */ get skip_taskbar(): boolean; /** * @read-only * @default false */ get skipTaskbar(): boolean; /** * @read-only * @default null */ get tag(): string | null; /** * @read-only * @default null */ get title(): string; /** * @read-only * @default false */ get urgent(): boolean; /** * @read-only * @default 0 */ get user_time(): number; /** * @read-only * @default 0 */ get userTime(): number; /** * @read-only * @default Meta.WindowType.NORMAL */ get window_type(): WindowType; /** * @read-only * @default Meta.WindowType.NORMAL */ get windowType(): WindowType; /** * @read-only * @default null */ get wm_class(): string | null; /** * @read-only * @default null */ get wmClass(): string | null; /** * 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: Window.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param current_time */ activate(current_time: number): void; /** * @param current_time * @param workspace */ activate_with_workspace(current_time: number, workspace: Workspace): void; allows_move(): boolean; allows_resize(): boolean; /** * @param op * @param sprite * @param timestamp * @param pos_hint */ begin_grab_op(op: GrabOp, sprite: Clutter.Sprite | null, timestamp: number, pos_hint: Graphene.Point | null): boolean; can_close(): boolean; can_maximize(): boolean; can_minimize(): boolean; /** * @param workspace */ change_workspace(workspace: Workspace): void; /** * @param space_index * @param append */ change_workspace_by_index(space_index: number, append: boolean): void; /** * @param timestamp */ check_alive(timestamp: number): void; /** * Converts a desired bounds of the client window into the corresponding bounds * of the window frame (excluding invisible borders and client side shadows.) * @param client_rect client rectangle in root coordinates */ client_rect_to_frame_rect(client_rect: Mtk.Rectangle): Mtk.Rectangle; /** * @param timestamp */ ["delete"](timestamp: number): void; /** * Follow the chain of parents of `window`, skipping transient windows, * and return the "root" window which has no non-transient parent. * @returns The root ancestor window */ find_root_ancestor(): Window; /** * @param timestamp */ focus(timestamp: number): void; /** * If `window` is transient, call `func` with the window for which it's transient, * repeatedly until either we find a non-transient window, or `func` returns `false`. * @param func Called for each window which is a transient parent of `window` */ foreach_ancestor(func: WindowForeachFunc): void; /** * Call `func` for every window which is either transient for `window`, or is * a transient of a window which is in turn transient for `window`. * The order of window enumeration is not defined. * * Iteration will stop if `func` at any point returns `false`. * @param func Called for each window which is a transient of `window` (transitively) */ foreach_transient(func: WindowForeachFunc): void; /** * Converts a desired frame bounds for a window into the bounds of the client * window. * @param frame_rect desired frame bounds for the window */ frame_rect_to_client_rect(frame_rect: Mtk.Rectangle): Mtk.Rectangle; /** * Gets the rectangle that the pixmap or buffer of `window` occupies. * * For X11 windows, this is the server-side geometry of the toplevel * window. * * For Wayland windows, this is the bounding rectangle of the attached * buffer. */ get_buffer_rect(): Mtk.Rectangle; /** * Gets the client rectangle that ATSPI window coordinates * are relative to. */ get_client_content_rect(): Mtk.Rectangle; /** * Returns the {@link Meta.WindowClientType} of the window. * @returns The root ancestor window */ get_client_type(): WindowClientType; /** * Gets the compositor's wrapper object for `window`. * @returns the wrapper object. */ get_compositor_private(): T; get_description(): string; /** * @returns The display for `window` */ get_display(): Display; /** * Gets the rectangle that bounds `window` that is what the user thinks of * as the edge of the window. * * This doesn't include any extra reactive area that we or the client * adds to the window, or any area that the client adds to draw a client-side shadow. */ get_frame_rect(): Mtk.Rectangle; /** * Gets the type of window decorations that should be used for this window. * @returns the frame type */ get_frame_type(): FrameType; /** * @returns the object path */ get_gtk_app_menu_object_path(): string | null; /** * @returns the application ID */ get_gtk_application_id(): string | null; /** * @returns the object path */ get_gtk_application_object_path(): string | null; /** * @returns the object path */ get_gtk_menubar_object_path(): string | null; /** * @returns the theme variant or `null` */ get_gtk_theme_variant(): string | null; /** * @returns the unique name */ get_gtk_unique_bus_name(): string | null; /** * @returns the object path */ get_gtk_window_object_path(): string | null; /** * Gets the location of the icon corresponding to the window. * * The location will be provided set by the task bar or other user interface * element displaying the icon, and is relative to the root window. * @returns `true` if the icon geometry was successfully retrieved. */ get_icon_geometry(): [boolean, Mtk.Rectangle]; /** * Returns the window id associated with window. * @returns The window id */ get_id(): number; get_layer(): StackLayer; /** * Gets the current maximization state of the window, as combination * of the {@link Meta.MaximizeFlags.HORIZONTAL} and {@link Meta.MaximizeFlags.VERTICAL} flags; * @returns current maximization state */ get_maximize_flags(): MaximizeFlags; /** * Gets index of the monitor that this window is on. * @returns The index of the monitor in the screens monitor list, or -1 if the window has been recently unmanaged and does not have a monitor. */ get_monitor(): number; /** * Gets the current value of the _MUTTER_HINTS property. * * The purpose of the hints is to allow fine-tuning of the Window Manager and * Compositor behaviour on per-window basis, and is intended primarily for * hints that are plugin-specific. * * The property is a list of colon-separated key=value pairs. The key names for * any plugin-specific hints must be suitably namespaced to allow for shared * use; 'mutter-' key prefix is reserved for internal use, and must not be used * by plugins. * @returns the _MUTTER_HINTS string, or `null` if no hints are set. */ get_mutter_hints(): string | null; /** * Returns the pid of the process that created this window, if available * to the windowing system. * * Note that the value returned by this is vulnerable to spoofing attacks * by the client. * @returns the pid, or 0 if not known. */ get_pid(): never; get_role(): string; /** * Gets an unique id for a sandboxed app (currently flatpaks and snaps are * supported). * @returns the sandboxed application ID or `null` */ get_sandboxed_app_id(): string | null; /** * The stable sequence number is a monotonicially increasing * unique integer assigned to each {@link Meta.Window} upon creation. * * This number can be useful for sorting windows in a stable * fashion. * @returns Internal sequence number for this window */ get_stable_sequence(): number; /** * Gets the startup id of the given {@link Meta.Window} * @returns the startup id */ get_startup_id(): string | null; /** * Get a tag associated to the window. * Under wayland the tag can be set using the toplevel tag protocol, * and under x11 it falls back to using `NET_WM_WINDOW_TAG` atom. * @returns An associated toplevel tag */ get_tag(): string | null; /** * Returns the matching tiled window on the same monitor as `window`. This is * the topmost tiled window in a complementary tile mode that is: * * - on the same monitor; * - on the same workspace; * - spanning the remaining monitor width; * - there is no 3rd window stacked between both tiled windows that's * partially visible in the common edge. * @returns the matching tiled window or `null` if it doesn't exist. */ get_tile_match(): Window | null; /** * @returns the current title of the window. */ get_title(): string; /** * Returns the {@link Meta.Window} for the window that is pointed to by the * WM_TRANSIENT_FOR hint on this window (see XGetTransientForHint() * or XSetTransientForHint()). Mutter keeps transient windows above their * parents. A typical usage of this hint is for a dialog that wants to stay * above its associated window. * @returns the window this window is transient for, or `null` if the WM_TRANSIENT_FOR hint is unset or does not point to a toplevel window that Mutter knows about. */ get_transient_for(): Window | null; /** * The user time represents a timestamp for the last time the user * interacted with this window. * * Note this property is only available for non-override-redirect windows. * * The property is set by Mutter initially upon window creation, * and updated thereafter on input events (key and button presses) seen by Mutter, * client updates to the _NET_WM_USER_TIME property (if later than the current time) * and when focusing the window. * @returns The last time the user interacted with this window. */ get_user_time(): number; get_window_type(): WindowType; /** * Return the current value of the name part of `WM_CLASS` X property. * @returns the current value of the name part of `WM_CLASS` X property */ get_wm_class(): string | null; /** * Return the current value of the instance part of `WM_CLASS` X property. * @returns the current value of the instance part of `WM_CLASS` X property. */ get_wm_class_instance(): string | null; /** * Get the work area for all monitors for `window`. */ get_work_area_all_monitors(): Mtk.Rectangle; /** * Get the work area for the monitor `window` is currently on. */ get_work_area_current_monitor(): Mtk.Rectangle; /** * Get the work area for `window`, given the monitor index * `which_monitor`. * @param which_monitor a moniotr to get the work area for */ get_work_area_for_monitor(which_monitor: number): Mtk.Rectangle; /** * Gets the {@link Meta.Workspace} that the window is currently displayed on. * * If the window is on all workspaces, returns the currently active * workspace. * @returns the {@link Meta.Workspace} for the window */ get_workspace(): Workspace; /** * Tests if `window` has any transients attached to it. * * If the `attach_modal_dialogs` option is not enabled, this will * always return `false`. * @returns whether `window` has attached transients */ has_attached_dialogs(): boolean; has_focus(): boolean; has_pointer(): boolean; /** * Hides this window from any window list, like taskbars, pagers... */ hide_from_window_list(): void; is_above(): boolean; is_always_on_all_workspaces(): boolean; /** * The function determines whether `window` is an ancestor of `transient`; it does * so by traversing the `transient`'s ancestors until it either locates `window` * or reaches an ancestor that is not transient. * @param _transient a {@link Meta.Window} * @returns `true` if window is an ancestor of transient. */ is_ancestor_of_transient(_transient: Window): boolean; /** * Tests if `window` should be attached to its parent window. * * If the `attach_modal_dialogs` option is not enabled, this will * always return `false`. * @returns whether `window` should be attached to its parent */ is_attached_dialog(): boolean; /** * @returns `true` if the window is currently fullscreen */ is_fullscreen(): boolean; is_hidden(): boolean; /** * @returns `true` if the window is maximized vertically and horizontally. */ is_maximized(): boolean; /** * @returns `true` if the window is occupies an entire monitor or the whole screen. */ is_monitor_sized(): boolean; is_on_all_workspaces(): boolean; /** * @returns `true` if the window is on the primary monitor */ is_on_primary_monitor(): boolean; /** * @returns `true` if this window isn't managed by mutter; it will control its own positioning and mutter won't draw decorations among other things. In X terminology this is "override redirect". */ is_override_redirect(): boolean; /** * @returns `true` if this window originates from a host different from the one running mutter. */ is_remote(): boolean; /** * @returns `true` if the window is occupies the the whole screen (all monitors). */ is_screen_sized(): boolean; /** * Gets whether this window should be ignored by task lists. * @returns `true` if the skip bar hint is set. */ is_skip_taskbar(): boolean; kill(): void; /** * @param workspace a {@link Meta.Workspace} * @returns whether `window` is displayed on `workspace`, or whether it will be displayed on all workspaces. */ located_on_workspace(workspace: Workspace): boolean; lower(): void; /** * @param timestamp */ lower_with_transients(timestamp: number): void; make_above(): void; make_fullscreen(): void; maximize(): void; minimize(): void; /** * Moves the window to the desired location on window's assigned * workspace, using the northwest edge of the frame as the reference, * instead of the actual window's origin, but only if a frame is present. * * Otherwise, acts identically to `meta_window_move()`. * @param user_op bool to indicate whether or not this is a user operation * @param root_x_nw desired x pos * @param root_y_nw desired y pos */ move_frame(user_op: boolean, root_x_nw: number, root_y_nw: number): void; /** * Resizes the window so that its outer bounds (including frame) * fit within the given rect * @param user_op bool to indicate whether or not this is a user operation * @param root_x_nw new x * @param root_y_nw new y * @param w desired width * @param h desired height */ move_resize_frame(user_op: boolean, root_x_nw: number, root_y_nw: number, w: number, h: number): void; /** * Moves the window to the monitor with index `monitor`, keeping * the relative position of the window's top left corner. * @param monitor desired monitor index */ move_to_monitor(monitor: number): void; /** * Transform the coordinates from protocol coordinates to coordinates expected * by the stage and internal window management logic. * @param protocol_rect rectangle in protocol coordinate space */ protocol_to_stage_rect(protocol_rect: Mtk.Rectangle): Mtk.Rectangle; raise(): void; /** * Raises a window and marks it as the most recently used window on the * workspace `target_workspace`. If the window exists on all workspaces, it will * become the most recently used sticky window on all other workspaces. This * ensures proper tracking among windows on all workspaces while not overriding * MRU for other windows. * @param workspace the {@link Meta.Workspace} to raise and make it most recent on */ raise_and_make_recent_on_workspace(workspace: Workspace): void; /** * @param priv */ set_compositor_private(priv: GObject.Object): void; set_demands_attention(): void; /** * Sets or unsets the location of the icon corresponding to the window. * * If set, the location should correspond to a dock, task bar or other user * interface element displaying the icon, and is relative to the root window. * @param rect rectangle with the desired geometry or `null`. */ set_icon_geometry(rect: Mtk.Rectangle | null): void; /** * @param directions */ set_maximize_flags(directions: MaximizeFlags): void; /** * Set the window type * @param type The {@link Meta.WindowType} */ set_type(type: WindowType): void; /** * @param directions */ set_unmaximize_flags(directions: MaximizeFlags): void; /** * Shows again this window in window lists, like taskbars, pagers... */ show_in_window_list(): void; /** * @returns `true` if window would be visible, if its workspace was current */ showing_on_its_workspace(): boolean; /** * Transform the coordinates from stage coordinates to protocol coordinates * @param stage_rect x {@link Mtk.Rectangle} in stage coordinate space */ stage_to_protocol_rect(stage_rect: Mtk.Rectangle): Mtk.Rectangle; stick(): void; unmake_above(): void; unmake_fullscreen(): void; unmaximize(): void; unminimize(): void; unset_demands_attention(): void; unstick(): void; /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * `g_initable_new()` should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or `g_async_initable_init_async()`. * * Implementations may also support cancellation. If `cancellable` is not `null`, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * {@link Gio.IOErrorEnum.CANCELLED} will be returned. If `cancellable` is not `null` and * the object doesn't support cancellable initialization the error * {@link Gio.IOErrorEnum.NOT_SUPPORTED} will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except `g_object_ref()` and * `g_object_unref()` are considered to be invalid, and have undefined * behaviour. See the [description][iface@Gio.Initable#description] for more details. * * Callers should not assume that a class which implements {@link Gio.Initable} can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of `init()` can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all {@link Gio.Initable} implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * {@link GObject.ObjectClass}.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call `g_initable_init()` * on the result of `g_object_new()`, regardless of whether it is in fact a new * instance. * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore. * @returns `true` if successful. If an error has occurred, this function will return `false` and set `error` appropriately if present. * @since 2.22 * @throws GLib.Error */ init(cancellable: Gio.Cancellable | null): boolean; /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * `g_initable_new()` should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or `g_async_initable_init_async()`. * * Implementations may also support cancellation. If `cancellable` is not `null`, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * {@link Gio.IOErrorEnum.CANCELLED} will be returned. If `cancellable` is not `null` and * the object doesn't support cancellable initialization the error * {@link Gio.IOErrorEnum.NOT_SUPPORTED} will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except `g_object_ref()` and * `g_object_unref()` are considered to be invalid, and have undefined * behaviour. See the [description][iface@Gio.Initable#description] for more details. * * Callers should not assume that a class which implements {@link Gio.Initable} can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of `init()` can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all {@link Gio.Initable} implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * {@link GObject.ObjectClass}.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call `g_initable_init()` * on the result of `g_object_new()`, regardless of whether it is in fact a new * instance. * @param cancellable optional {@link Gio.Cancellable} object, `null` to ignore. * @since 2.22 * @virtual */ vfunc_init(cancellable: Gio.Cancellable | null): boolean; } namespace WindowActor { // Signal signatures interface SignalSignatures extends Clutter.Actor.SignalSignatures { /** * Notify that one or more of the surfaces of the window have been damaged. * @signal * @run-last */ damaged: () => void; /** * The ::effects-completed signal will be emitted once all pending compositor * effects are completed. * @signal * @run-last */ "effects-completed": () => void; /** * The ::first-frame signal will be emitted the first time a frame * of window contents has been drawn by the application and Mutter * has had the chance to drawn that frame to the screen. If the * window starts off initially hidden, obscured, or on on a * different workspace, the ::first-frame signal will be emitted * even though the user doesn't see the contents. * * MetaDisplay::window-created is a good place to connect to this * signal - at that point, the MetaWindowActor for the window * exists, but the window has reliably not yet been drawn. * Connecting to an existing window that has already been drawn to * the screen is not useful. * @signal * @run-last */ "first-frame": () => void; /** * @signal * @run-last */ thawed: () => void; "notify::meta-window": (pspec: GObject.ParamSpec) => void; "notify::accessible-name": (pspec: GObject.ParamSpec) => void; "notify::accessible-role": (pspec: GObject.ParamSpec) => void; "notify::actions": (pspec: GObject.ParamSpec) => void; "notify::allocation": (pspec: GObject.ParamSpec) => void; "notify::background-color": (pspec: GObject.ParamSpec) => void; "notify::background-color-set": (pspec: GObject.ParamSpec) => void; "notify::child-transform": (pspec: GObject.ParamSpec) => void; "notify::child-transform-set": (pspec: GObject.ParamSpec) => void; "notify::clip-rect": (pspec: GObject.ParamSpec) => void; "notify::clip-to-allocation": (pspec: GObject.ParamSpec) => void; "notify::color-state": (pspec: GObject.ParamSpec) => void; "notify::constraints": (pspec: GObject.ParamSpec) => void; "notify::content": (pspec: GObject.ParamSpec) => void; "notify::content-box": (pspec: GObject.ParamSpec) => void; "notify::content-gravity": (pspec: GObject.ParamSpec) => void; "notify::content-repeat": (pspec: GObject.ParamSpec) => void; "notify::context": (pspec: GObject.ParamSpec) => void; "notify::effect": (pspec: GObject.ParamSpec) => void; "notify::first-child": (pspec: GObject.ParamSpec) => void; "notify::fixed-position-set": (pspec: GObject.ParamSpec) => void; "notify::fixed-x": (pspec: GObject.ParamSpec) => void; "notify::fixed-y": (pspec: GObject.ParamSpec) => void; "notify::has-clip": (pspec: GObject.ParamSpec) => void; "notify::has-pointer": (pspec: GObject.ParamSpec) => void; "notify::height": (pspec: GObject.ParamSpec) => void; "notify::last-child": (pspec: GObject.ParamSpec) => void; "notify::layout-manager": (pspec: GObject.ParamSpec) => void; "notify::magnification-filter": (pspec: GObject.ParamSpec) => void; "notify::mapped": (pspec: GObject.ParamSpec) => void; "notify::margin-bottom": (pspec: GObject.ParamSpec) => void; "notify::margin-left": (pspec: GObject.ParamSpec) => void; "notify::margin-right": (pspec: GObject.ParamSpec) => void; "notify::margin-top": (pspec: GObject.ParamSpec) => void; "notify::min-height": (pspec: GObject.ParamSpec) => void; "notify::min-height-set": (pspec: GObject.ParamSpec) => void; "notify::min-width": (pspec: GObject.ParamSpec) => void; "notify::min-width-set": (pspec: GObject.ParamSpec) => void; "notify::minification-filter": (pspec: GObject.ParamSpec) => void; "notify::name": (pspec: GObject.ParamSpec) => void; "notify::natural-height": (pspec: GObject.ParamSpec) => void; "notify::natural-height-set": (pspec: GObject.ParamSpec) => void; "notify::natural-width": (pspec: GObject.ParamSpec) => void; "notify::natural-width-set": (pspec: GObject.ParamSpec) => void; "notify::offscreen-redirect": (pspec: GObject.ParamSpec) => void; "notify::opacity": (pspec: GObject.ParamSpec) => void; "notify::pivot-point": (pspec: GObject.ParamSpec) => void; "notify::pivot-point-z": (pspec: GObject.ParamSpec) => void; "notify::position": (pspec: GObject.ParamSpec) => void; "notify::reactive": (pspec: GObject.ParamSpec) => void; "notify::realized": (pspec: GObject.ParamSpec) => void; "notify::request-mode": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-x": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-y": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-z": (pspec: GObject.ParamSpec) => void; "notify::scale-x": (pspec: GObject.ParamSpec) => void; "notify::scale-y": (pspec: GObject.ParamSpec) => void; "notify::scale-z": (pspec: GObject.ParamSpec) => void; "notify::show-on-set-parent": (pspec: GObject.ParamSpec) => void; "notify::size": (pspec: GObject.ParamSpec) => void; "notify::text-direction": (pspec: GObject.ParamSpec) => void; "notify::transform": (pspec: GObject.ParamSpec) => void; "notify::transform-set": (pspec: GObject.ParamSpec) => void; "notify::translation-x": (pspec: GObject.ParamSpec) => void; "notify::translation-y": (pspec: GObject.ParamSpec) => void; "notify::translation-z": (pspec: GObject.ParamSpec) => void; "notify::visible": (pspec: GObject.ParamSpec) => void; "notify::width": (pspec: GObject.ParamSpec) => void; "notify::x": (pspec: GObject.ParamSpec) => void; "notify::x-align": (pspec: GObject.ParamSpec) => void; "notify::x-expand": (pspec: GObject.ParamSpec) => void; "notify::y": (pspec: GObject.ParamSpec) => void; "notify::y-align": (pspec: GObject.ParamSpec) => void; "notify::y-expand": (pspec: GObject.ParamSpec) => void; "notify::z-position": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Clutter.Actor.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Clutter.Animatable.ConstructorProps { meta_window: Window | null; metaWindow: Window | null; } } /** * An actor representing a top-level window in the scene graph * * {@link Meta.WindowActor} is a {@link Clutter.Actor} that adds a notion of a window to the * Clutter scene graph. It contains a {@link Meta.Window} which provides the windowing * API, and the {@link Meta.Compositor} that handles it. For the actual content of the * window, it contains a `MetaSurfaceActor`. * * {@link Meta.WindowActor} takes care of the rendering features you need for your * window. For example, it will take the windows' requested opacity and use * that for `clutter_actor_set_opacity()`. Furthermore, it will also draw a * shadow around the window (using `MetaShadow`) and deal with synchronization * between events of the window and the actual render loop. See * MetaWindowActor::first-frame for an example of the latter. * @gir-type Class */ abstract class WindowActor extends Clutter.Actor implements Atk.ImplementorIface, Clutter.Animatable { static $gtype: GObject.GType; // Properties /** * @construct-only */ get meta_window(): Window | null; /** * @construct-only */ get metaWindow(): Window | null; /** * 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: WindowActor.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Freezes the {@link Meta.WindowActor}, which inhibits updates and geometry * changes of the window. This property is refcounted, so make sure * to call `meta_window_actor_thaw()` the exact same amount of times * as this function to allow updates again. */ freeze(): void; /** * Flattens the layers of `self` into one ARGB32 image by alpha blending * the images, and returns the flattened image. * @param clip A clipping rectangle, to help prevent extra processing. In the case that the clipping rectangle is partially or fully outside the bounds of the actor, the rectangle will be clipped. * @returns a new cairo surface to be freed with `cairo_surface_destroy()`. */ get_image(clip: Mtk.Rectangle | null): cairo.Surface | null; /** * Gets the {@link Meta.Window} object that the the {@link Meta.WindowActor} is displaying * @returns the displayed {@link Meta.Window} */ get_meta_window(): Window | null; /** * Gets the ClutterActor that is used to display the contents of the window, * or NULL if no texture is shown yet, because the window is not mapped. * @returns the {@link Clutter.Actor} for the contents */ get_texture(): ShapedTexture | null; /** * Gets whether the X window that the actor was displaying has been destroyed * @returns `true` when the window is destroyed, otherwise `false` */ is_destroyed(): boolean; /** * @param clip A clipping rectangle, in actor coordinates, to help prevent extra processing. In the case that the clipping rectangle is partially or fully outside the bounds of the actor, the rectangle will be clipped. * @returns a new {@link Clutter.Content} * @throws GLib.Error */ paint_to_content(clip: Mtk.Rectangle | null): Clutter.Content | null; sync_visibility(): void; /** * Thaws/unfreezes the {@link Meta.WindowActor} to allow updates and geometry * changes after a window was frozen using `meta_window_actor_freeze()`. */ thaw(): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @returns The {@link GObject.ParamSpec} for the given property or `null` */ find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @returns a {@link Clutter.Actor} */ get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve */ get_initial_state(property_name: string, value: GObject.Value | any): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @returns `true` if the interpolation was successful, and `false` otherwise */ interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, unknown]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set */ set_final_state(property_name: string, value: GObject.Value | any): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @virtual */ vfunc_find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @virtual */ vfunc_get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve * @virtual */ vfunc_get_initial_state(property_name: string, value: unknown): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @virtual */ vfunc_interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, GObject.Value | any]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set * @virtual */ vfunc_set_final_state(property_name: string, value: unknown): void; } namespace WindowConfig { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { "notify::is-fullscreen": (pspec: GObject.ParamSpec) => void; "notify::rect": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { is_fullscreen: boolean; isFullscreen: boolean; rect: Mtk.Rectangle; } } /** * An object representing the configuration of a top-level window * @gir-type Class */ class WindowConfig extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @default false */ get is_fullscreen(): boolean; set is_fullscreen(val: boolean); /** * @default false */ get isFullscreen(): boolean; set isFullscreen(val: boolean); get rect(): Mtk.Rectangle; set rect(val: Mtk.Rectangle); /** * 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: WindowConfig.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; static ["new"](): WindowConfig; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods get_is_fullscreen(): boolean; get_is_initial(): boolean; /** * @param x * @param y */ get_position(x: number, y: number): void; get_rect(): Mtk.Rectangle; /** * @param width * @param height */ get_size(width: number, height: number): void; /** * @param is_fullscreen */ set_is_fullscreen(is_fullscreen: boolean): void; /** * @param x * @param y */ set_position(x: number, y: number): void; /** * @param rect */ set_rect(rect: Mtk.Rectangle): void; /** * @param width * @param height */ set_size(width: number, height: number): void; } namespace WindowGroup { // Signal signatures interface SignalSignatures extends Clutter.Actor.SignalSignatures { "notify::accessible-name": (pspec: GObject.ParamSpec) => void; "notify::accessible-role": (pspec: GObject.ParamSpec) => void; "notify::actions": (pspec: GObject.ParamSpec) => void; "notify::allocation": (pspec: GObject.ParamSpec) => void; "notify::background-color": (pspec: GObject.ParamSpec) => void; "notify::background-color-set": (pspec: GObject.ParamSpec) => void; "notify::child-transform": (pspec: GObject.ParamSpec) => void; "notify::child-transform-set": (pspec: GObject.ParamSpec) => void; "notify::clip-rect": (pspec: GObject.ParamSpec) => void; "notify::clip-to-allocation": (pspec: GObject.ParamSpec) => void; "notify::color-state": (pspec: GObject.ParamSpec) => void; "notify::constraints": (pspec: GObject.ParamSpec) => void; "notify::content": (pspec: GObject.ParamSpec) => void; "notify::content-box": (pspec: GObject.ParamSpec) => void; "notify::content-gravity": (pspec: GObject.ParamSpec) => void; "notify::content-repeat": (pspec: GObject.ParamSpec) => void; "notify::context": (pspec: GObject.ParamSpec) => void; "notify::effect": (pspec: GObject.ParamSpec) => void; "notify::first-child": (pspec: GObject.ParamSpec) => void; "notify::fixed-position-set": (pspec: GObject.ParamSpec) => void; "notify::fixed-x": (pspec: GObject.ParamSpec) => void; "notify::fixed-y": (pspec: GObject.ParamSpec) => void; "notify::has-clip": (pspec: GObject.ParamSpec) => void; "notify::has-pointer": (pspec: GObject.ParamSpec) => void; "notify::height": (pspec: GObject.ParamSpec) => void; "notify::last-child": (pspec: GObject.ParamSpec) => void; "notify::layout-manager": (pspec: GObject.ParamSpec) => void; "notify::magnification-filter": (pspec: GObject.ParamSpec) => void; "notify::mapped": (pspec: GObject.ParamSpec) => void; "notify::margin-bottom": (pspec: GObject.ParamSpec) => void; "notify::margin-left": (pspec: GObject.ParamSpec) => void; "notify::margin-right": (pspec: GObject.ParamSpec) => void; "notify::margin-top": (pspec: GObject.ParamSpec) => void; "notify::min-height": (pspec: GObject.ParamSpec) => void; "notify::min-height-set": (pspec: GObject.ParamSpec) => void; "notify::min-width": (pspec: GObject.ParamSpec) => void; "notify::min-width-set": (pspec: GObject.ParamSpec) => void; "notify::minification-filter": (pspec: GObject.ParamSpec) => void; "notify::name": (pspec: GObject.ParamSpec) => void; "notify::natural-height": (pspec: GObject.ParamSpec) => void; "notify::natural-height-set": (pspec: GObject.ParamSpec) => void; "notify::natural-width": (pspec: GObject.ParamSpec) => void; "notify::natural-width-set": (pspec: GObject.ParamSpec) => void; "notify::offscreen-redirect": (pspec: GObject.ParamSpec) => void; "notify::opacity": (pspec: GObject.ParamSpec) => void; "notify::pivot-point": (pspec: GObject.ParamSpec) => void; "notify::pivot-point-z": (pspec: GObject.ParamSpec) => void; "notify::position": (pspec: GObject.ParamSpec) => void; "notify::reactive": (pspec: GObject.ParamSpec) => void; "notify::realized": (pspec: GObject.ParamSpec) => void; "notify::request-mode": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-x": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-y": (pspec: GObject.ParamSpec) => void; "notify::rotation-angle-z": (pspec: GObject.ParamSpec) => void; "notify::scale-x": (pspec: GObject.ParamSpec) => void; "notify::scale-y": (pspec: GObject.ParamSpec) => void; "notify::scale-z": (pspec: GObject.ParamSpec) => void; "notify::show-on-set-parent": (pspec: GObject.ParamSpec) => void; "notify::size": (pspec: GObject.ParamSpec) => void; "notify::text-direction": (pspec: GObject.ParamSpec) => void; "notify::transform": (pspec: GObject.ParamSpec) => void; "notify::transform-set": (pspec: GObject.ParamSpec) => void; "notify::translation-x": (pspec: GObject.ParamSpec) => void; "notify::translation-y": (pspec: GObject.ParamSpec) => void; "notify::translation-z": (pspec: GObject.ParamSpec) => void; "notify::visible": (pspec: GObject.ParamSpec) => void; "notify::width": (pspec: GObject.ParamSpec) => void; "notify::x": (pspec: GObject.ParamSpec) => void; "notify::x-align": (pspec: GObject.ParamSpec) => void; "notify::x-expand": (pspec: GObject.ParamSpec) => void; "notify::y": (pspec: GObject.ParamSpec) => void; "notify::y-align": (pspec: GObject.ParamSpec) => void; "notify::y-expand": (pspec: GObject.ParamSpec) => void; "notify::z-position": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends Clutter.Actor.ConstructorProps, Atk.ImplementorIface.ConstructorProps, Clutter.Animatable.ConstructorProps {} } /** * @gir-type Class */ class WindowGroup extends Clutter.Actor implements Atk.ImplementorIface, Clutter.Animatable { static $gtype: GObject.GType; /** * 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: WindowGroup.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @returns The {@link GObject.ParamSpec} for the given property or `null` */ find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @returns a {@link Clutter.Actor} */ get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve */ get_initial_state(property_name: string, value: GObject.Value | any): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @returns `true` if the interpolation was successful, and `false` otherwise */ interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, unknown]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set */ set_final_state(property_name: string, value: GObject.Value | any): void; /** * Finds the {@link GObject.ParamSpec} for `property_name` * @param property_name the name of the animatable property to find * @virtual */ vfunc_find_property(property_name: string): GObject.ParamSpec; /** * Get animated actor. * @virtual */ vfunc_get_actor(): Clutter.Actor; /** * Retrieves the current state of `property_name` and sets `value` with it * @param property_name the name of the animatable property to retrieve * @param value a {@link GObject.Value} initialized to the type of the property to retrieve * @virtual */ vfunc_get_initial_state(property_name: string, value: unknown): void; /** * Asks a {@link Clutter.Animatable} implementation to interpolate a * a named property between the initial and final values of * a {@link Clutter.Interval}, using `progress` as the interpolation * value, and store the result inside `value`. * * This function should be used for every property animation * involving {@link Clutter.Animatable}s. * @param property_name the name of the property to interpolate * @param interval a {@link Clutter.Interval} with the animation range * @param progress the progress to use to interpolate between the initial and final values of the `interval` * @virtual */ vfunc_interpolate_value(property_name: string, interval: Clutter.Interval, progress: number): [boolean, GObject.Value | any]; /** * Sets the current state of `property_name` to `value` * @param property_name the name of the animatable property to set * @param value the value of the animatable property to set * @virtual */ vfunc_set_final_state(property_name: string, value: unknown): void; } namespace Workspace { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "window-added": (object: Window) => void; /** * @signal * @run-last */ "window-removed": (object: Window) => void; "notify::active": (pspec: GObject.ParamSpec) => void; "notify::n-windows": (pspec: GObject.ParamSpec) => void; "notify::workspace-index": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { active: boolean; n_windows: number; nWindows: number; workspace_index: number; workspaceIndex: number; } } /** * Workspaces * * A workspace is a set of windows which all live on the same * screen. (You may also see the name "desktop" around the place, * which is the EWMH's name for the same thing.) Only one workspace * of a screen may be active at once; all windows on all other workspaces * are unmapped. * @gir-type Class */ class Workspace extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @read-only * @default false */ get active(): boolean; /** * @read-only * @default 0 */ get n_windows(): number; /** * @read-only * @default 0 */ get nWindows(): number; /** * @read-only * @default 0 */ get workspace_index(): number; /** * @read-only * @default 0 */ get workspaceIndex(): number; /** * 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: Workspace.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param timestamp */ activate(timestamp: number): void; /** * Switches to `workspace` and possibly activates the window `focus_this`. * * The window `focus_this` is activated by calling `meta_window_activate()` * which will unminimize it and transient parents, raise it and give it * the focus. * * If a window is currently being moved by the user, it will be * moved to `workspace`. * * The advantage of calling this function instead of `meta_workspace_activate()` * followed by `meta_window_activate()` is that it happens as a unit, so * no other window gets focused first before `focus_this`. * @param focus_this the {@link Meta.Window} to be focused, or `null` * @param timestamp timestamp for `focus_this` */ activate_with_focus(focus_this: Window, timestamp: number): void; /** * Gets the {@link Meta.Display} that the workspace is part of. * @returns the {@link Meta.Display} for the workspace */ get_display(): Display; /** * Calculate and retrieve the workspace that is next to `workspace`, * according to `direction` and the current workspace layout, as set * by `meta_screen_override_workspace_layout()`. * @param direction a {@link Meta.MotionDirection}, relative to `workspace` * @returns the workspace next to `workspace`, or `workspace` itself if the neighbor would be outside the layout */ get_neighbor(direction: MotionDirection): Workspace; /** * Stores the work area in `area`. */ get_work_area_all_monitors(): Mtk.Rectangle; /** * Stores the work area for `which_monitor` on `workspace` * in `area`. * @param which_monitor a monitor index */ get_work_area_for_monitor(which_monitor: number): Mtk.Rectangle; index(): number; /** * Gets windows contained on the workspace, including workspace->windows * and also sticky windows. Override-redirect windows are not included. * @returns the list of windows. */ list_windows(): Window[]; /** * Sets a list of struts that will be used in addition to the struts * of the windows in the workspace when computing the work area of * the workspace. * @param struts list of {@link Meta.Strut} */ set_builtin_struts(struts: Strut[]): void; } namespace WorkspaceManager { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures { /** * @signal * @run-last */ "active-workspace-changed": () => void; /** * @signal * @run-last */ "showing-desktop-changed": () => void; /** * @signal * @run-last */ "workspace-added": (object: number) => void; /** * @signal * @run-last */ "workspace-removed": (object: number) => void; /** * @signal * @run-last */ "workspace-switched": (object: number, p0: number, p1: MotionDirection) => void; /** * @signal * @run-last */ "workspaces-reordered": () => void; "notify::layout-columns": (pspec: GObject.ParamSpec) => void; "notify::layout-rows": (pspec: GObject.ParamSpec) => void; "notify::n-workspaces": (pspec: GObject.ParamSpec) => void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { layout_columns: number; layoutColumns: number; layout_rows: number; layoutRows: number; n_workspaces: number; nWorkspaces: number; } } /** * @gir-type Class */ class WorkspaceManager extends GObject.Object { static $gtype: GObject.GType; // Properties /** * @read-only * @default 1 */ get layout_columns(): number; /** * @read-only * @default 1 */ get layoutColumns(): number; /** * @read-only * @default -1 */ get layout_rows(): number; /** * @read-only * @default -1 */ get layoutRows(): number; /** * @read-only * @default 1 */ get n_workspaces(): number; /** * @read-only * @default 1 */ get nWorkspaces(): number; /** * 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: WorkspaceManager.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * Append a new workspace to the workspace manager and (optionally) switch to that * display. * @param activate `true` if the workspace should be switched to after creation * @param timestamp if switching to a new workspace, timestamp to be used when focusing a window on the new workspace. (Doesn't hurt to pass a valid timestamp when available even if not switching workspaces.) * @returns the newly appended workspace. */ append_new_workspace(activate: boolean, timestamp: number): Workspace; /** * @returns The current workspace */ get_active_workspace(): Workspace; get_active_workspace_index(): number; get_layout_columns(): number; get_layout_rows(): number; get_n_workspaces(): number; /** * Gets the workspace object for one of a workspace manager's workspaces given the workspace * index. It's valid to call this function with an out-of-range index and it * will robustly return `null`. * @param index index of one of the display's workspaces * @returns the workspace object with specified index, or `null` if the index is out of range. */ get_workspace_by_index(index: number): Workspace | null; /** * Explicitly set the layout of workspaces. Once this has been called, the contents of the * _NET_DESKTOP_LAYOUT property on the root window are completely ignored. * @param starting_corner the corner at which the first workspace is found * @param vertical_layout if `true` the workspaces are laid out in columns rather than rows * @param n_rows number of rows of workspaces, or -1 to determine the number of rows from `n_columns` and the total number of workspaces * @param n_columns number of columns of workspaces, or -1 to determine the number of columns from `n_rows` and the total number of workspaces */ override_workspace_layout(starting_corner: DisplayCorner, vertical_layout: boolean, n_rows: number, n_columns: number): void; /** * @param workspace * @param timestamp */ remove_workspace(workspace: Workspace, timestamp: number): void; /** * Reorder a workspace to a new index. If the workspace is currently active * the "active-workspace-changed" signal will be emitted. * If the workspace's index is the same as `new_index` or the workspace * will not be found in the list, this function will return. * * Calling this function will also emit the "workspaces-reordered" signal. * @param workspace a {@link Meta.Workspace} to reorder * @param new_index the new index of the passed workspace */ reorder_workspace(workspace: Workspace, new_index: number): void; } namespace X11Display { // Signal signatures interface SignalSignatures extends GObject.Object.SignalSignatures {} // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps {} } /** * Mutter X display handler * * The X11 display is represented as a {@link Meta.X11Display} struct. * @gir-type Class */ class X11Display extends GObject.Object { static $gtype: GObject.GType; /** * 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: X11Display.SignalSignatures; // Constructors constructor(properties?: Partial, ...args: any[]); _init(...args: any[]): void; // Signals /** @signal */ connect(signal: K, callback: GObject.SignalCallback): number; /** @signal */ connect_after(signal: K, callback: GObject.SignalCallback): number; /** @signal */ emit(signal: K, ...args: GObject.GjsParameters): void; // Methods /** * @param window */ lookup_xwindow(window: Window): xlib.Window; /** * @param display */ redirect_windows(display: Display): void; } /** * @gir-type Alias */ type BackendClass = typeof Backend; /** * @gir-type Alias */ type BackgroundActorClass = typeof BackgroundActor; /** * @gir-type Alias */ type BackgroundClass = typeof Background; /** * @gir-type Alias */ type BackgroundContentClass = typeof BackgroundContent; /** * @gir-type Alias */ type BackgroundGroupClass = typeof BackgroundGroup; /** * @gir-type Alias */ type BackgroundImageCacheClass = typeof BackgroundImageCache; /** * @gir-type Alias */ type BackgroundImageClass = typeof BackgroundImage; /** * @gir-type Alias */ type BacklightClass = typeof Backlight; /** * @gir-type Alias */ type BarrierClass = typeof Barrier; /** * @gir-type Struct */ class BarrierEvent { static $gtype: GObject.GType; // Fields event_id: number; dt: number; time: number; x: number; y: number; dx: number; dy: number; released: boolean; grabbed: boolean; // Constructors constructor(properties?: Partial<{ event_id: number; dt: number; time: number; x: number; y: number; dx: number; dy: number; released: boolean; grabbed: boolean; }>); } /** * @gir-type Struct */ class ButtonLayout { static $gtype: GObject.GType; // Fields left_buttons: ButtonFunction[]; left_buttons_has_spacer: boolean[]; right_buttons: ButtonFunction[]; right_buttons_has_spacer: boolean[]; } /** * @gir-type Alias */ type CloseDialogInterface = typeof CloseDialog; /** * @gir-type Alias */ type CompositorClass = typeof Compositor; /** * @gir-type Alias */ type ContextClass = typeof Context; /** * @gir-type Alias */ type CursorTrackerClass = typeof CursorTracker; /** * @gir-type Alias */ type DebugControlClass = typeof DebugControl; /** * @gir-type Alias */ type DisplayClass = typeof Display; /** * @gir-type Alias */ type DndClass = typeof Dnd; /** * @gir-type Struct */ class Edge { static $gtype: GObject.GType; // Fields rect: Mtk.Rectangle; side_type: Side; edge_type: EdgeType; } /** * @gir-type Struct */ class FrameBorder { static $gtype: GObject.GType; // Fields left: number; right: number; top: number; bottom: number; // Constructors constructor(properties?: Partial<{ left: number; right: number; top: number; bottom: number; }>); } /** * @gir-type Struct */ class FrameBorders { static $gtype: GObject.GType; // Fields visible: FrameBorder; invisible: FrameBorder; total: FrameBorder; // Constructors constructor(properties?: Partial<{ visible: FrameBorder; invisible: FrameBorder; total: FrameBorder; }>); // Methods clear(): void; } /** * @gir-type Alias */ type IdleMonitorClass = typeof IdleMonitor; /** * @gir-type Alias */ type InhibitShortcutsDialogInterface = typeof InhibitShortcutsDialog; /** * @gir-type Struct */ abstract class KeyBinding { static $gtype: GObject.GType; // Methods get_mask(): number; get_modifiers(): Clutter.ModifierType; get_name(): string; is_builtin(): boolean; is_reversed(): boolean; } /** * @gir-type Alias */ type LatersClass = typeof Laters; /** * @gir-type Alias */ type LaunchContextClass = typeof LaunchContext; /** * @gir-type Alias */ type LogicalMonitorClass = typeof LogicalMonitor; /** * @gir-type Alias */ type MonitorClass = typeof Monitor; /** * @gir-type Alias */ type MonitorManagerClass = typeof MonitorManager; /** * @gir-type Alias */ type MultiTextureClass = typeof MultiTexture; /** * @gir-type Alias */ type OrientationManagerClass = typeof OrientationManager; /** * @gir-type Alias */ type PluginClass = typeof Plugin; /** * @gir-type Alias */ type RemoteAccessControllerClass = typeof RemoteAccessController; /** * @gir-type Alias */ type RemoteAccessHandleClass = typeof RemoteAccessHandle; /** * @gir-type Alias */ type SelectionClass = typeof Selection; /** * @gir-type Alias */ type SelectionSourceClass = typeof SelectionSource; /** * @gir-type Alias */ type SelectionSourceMemoryClass = typeof SelectionSourceMemory; /** * @gir-type Struct */ abstract class Settings { static $gtype: GObject.GType; // Methods get_font_dpi(): number; get_ui_scaling_factor(): number; } /** * @gir-type Alias */ type ShapedTextureClass = typeof ShapedTexture; /** * @gir-type Alias */ type SoundPlayerClass = typeof SoundPlayer; /** * @gir-type Alias */ type StageClass = typeof Stage; /** * @gir-type Alias */ type StartupNotificationClass = typeof StartupNotification; /** * @gir-type Alias */ type StartupSequenceClass = typeof StartupSequence; /** * @gir-type Struct */ class Strut { static $gtype: GObject.GType; // Fields rect: Mtk.Rectangle; side: Side; } /** * @gir-type Alias */ type WaylandClientClass = typeof WaylandClient; /** * @gir-type Alias */ type WaylandCompositorClass = typeof WaylandCompositor; /** * @gir-type Alias */ type WaylandSurfaceClass = typeof WaylandSurface; /** * @gir-type Alias */ type WindowActorClass = typeof WindowActor; /** * @gir-type Alias */ type WindowClass = typeof Window; /** * @gir-type Alias */ type WindowConfigClass = typeof WindowConfig; /** * @gir-type Alias */ type WindowGroupClass = typeof WindowGroup; /** * @gir-type Alias */ type WorkspaceClass = typeof Workspace; /** * @gir-type Alias */ type WorkspaceManagerClass = typeof WorkspaceManager; /** * @gir-type Alias */ type X11DisplayClass = typeof X11Display; /** * @gir-type Struct */ abstract class _Monitor { static $gtype: GObject.GType<_Monitor>; } /** * @gir-type Struct */ class XEvent { static $gtype: GObject.GType; } namespace CloseDialog { // Signal signatures interface SignalSignatures { /** * @signal * @action * @run-last */ response: (object: CloseDialogResponse) => void; } /** * Interface for implementing CloseDialog. * Contains only the virtual methods that need to be implemented. */ interface Interface { // Virtual methods /** * Call whenever `dialog` should receive keyboard focus, * usually when the window would. * @virtual */ vfunc_focus(): void; /** * Hides the close dialog. * @virtual */ vfunc_hide(): void; /** * Shows the close dialog. * @virtual */ vfunc_show(): void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { window: Window; } } export interface CloseDialogNamespace { $gtype: GObject.GType; prototype: CloseDialog; } /** * @gir-type Interface */ interface CloseDialog extends GObject.Object, CloseDialog.Interface { // Properties /** * @construct-only */ get window(): Window; // Methods /** * Call whenever `dialog` should receive keyboard focus, * usually when the window would. */ focus(): void; /** * Hides the close dialog. */ hide(): void; /** * Returns whether `dialog` is currently visible. * @returns `TRUE` if `dialog` is visible. */ is_visible(): boolean; /** * Responds and closes the dialog. To be called by {@link Meta.CloseDialog} * implementations. * @param response a {@link Meta.CloseDialogResponse} */ response(response: CloseDialogResponse): void; /** * Shows the close dialog. */ show(): void; } export const CloseDialog: CloseDialogNamespace & { new (): CloseDialog; // This allows `obj instanceof CloseDialog` }; namespace InhibitShortcutsDialog { // Signal signatures interface SignalSignatures { /** * @signal * @action * @run-last */ response: (object: InhibitShortcutsDialogResponse) => void; } /** * Interface for implementing InhibitShortcutsDialog. * Contains only the virtual methods that need to be implemented. */ interface Interface { // Virtual methods /** * Hides the inhibit shortcuts dialog. * @virtual */ vfunc_hide(): void; /** * Shows the inhibit shortcuts dialog. * @virtual */ vfunc_show(): void; } // Constructor properties interface interface ConstructorProps extends GObject.Object.ConstructorProps { window: Window; } } export interface InhibitShortcutsDialogNamespace { $gtype: GObject.GType; prototype: InhibitShortcutsDialog; } /** * @gir-type Interface */ interface InhibitShortcutsDialog extends GObject.Object, InhibitShortcutsDialog.Interface { // Properties /** * @construct-only */ get window(): Window; // Methods /** * Hides the inhibit shortcuts dialog. */ hide(): void; /** * Responds and closes the dialog. To be called by {@link Meta.InhibitShortcutsDialog} * implementations. * @param response a {@link Meta.InhibitShortcutsDialogResponse} */ response(response: InhibitShortcutsDialogResponse): void; /** * Shows the inhibit shortcuts dialog. */ show(): void; } export const InhibitShortcutsDialog: InhibitShortcutsDialogNamespace & { new (): InhibitShortcutsDialog; // This allows `obj instanceof InhibitShortcutsDialog` }; /** * Name of the imported GIR library * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188 */ const __name__: string; /** * Version of the imported GIR library * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189 */ const __version__: string; } export default Meta; // END