Skip to content

Wayland

import { Aside } from “@astrojs/starlight/components”; import TypeSignature from “@components/TypeSignature.astro”;

<TypeSignature typeName={ “WaylandWindowExclusivity” } typePrefix={ “class” } typeArgList={ ”(*values)” }> WaylandWindowExclusivity

Bases: Enum

<TypeSignature typeName={ “NONE” } typePrefix={ “member” } returnType={ “1” }> NONE

do not reserve any space for this window

<TypeSignature typeName={ “NORMAL” } typePrefix={ “member” } returnType={ “2” }> NORMAL

should reserve space for this window

<TypeSignature typeName={ “AUTO” } typePrefix={ “member” } returnType={ “3” }> AUTO

automatically decide whether to reserve space or not

<TypeSignature typeName={ “WaylandWindow” } typePrefix={ “class” } typeArgList={ “(layer: Literal[‘background’, ‘bottom’, ‘top’, ‘overlay’] | Layer = GtkLayerShell.Layer.TOP, anchor: str = ”, margin: str | Iterable[int] = ‘0px 0px 0px 0px’, exclusivity: Literal[‘none’, ‘normal’, ‘auto’] | WaylandWindowExclusivity = WaylandWindowExclusivity.NONE, keyboard_mode: Literal[‘none’, ‘exclusive’, ‘on-demand’] | KeyboardMode = GtkLayerShell.KeyboardMode.NONE, pass_through: bool = False, monitor: int | Monitor | None = None, title: str = ‘fabric’, type: Literal[‘top-level’, ‘popup’] | WindowType = Gtk.WindowType.TOPLEVEL, child: Widget | None = None, name: str | None = None, visible: bool = True, all_visible: bool = False, style: str | None = None, style_classes: Iterable[str] | str | None = None, tooltip_text: str | None = None, tooltip_markup: str | None = None, h_align: Literal[‘fill’, ‘start’, ‘end’, ‘center’, ‘baseline’] | Align | None = None, v_align: Literal[‘fill’, ‘start’, ‘end’, ‘center’, ‘baseline’] | Align | None = None, h_expand: bool = False, v_expand: bool = False, size: Iterable[int] | int | None = None, **kwargs)” }> WaylandWindow

Bases: Window

A wayland specific window for docking purposes (works as a layer)

  • Parameters:
    • layer (Literal [ “background” , “bottom” , “top” , “overlay” ] | GtkLayerShell.Layer , optional) — the layer on which this window should sit on, defaults to GtkLayerShell.Layer.TOP
    • anchor (str , optional) — anchor edges for this window (e.g. “top right bottom”), defaults to ""
    • margin (str | Iterable *[*int ] , optional) — margen values for each edge (in the format of “top right bottom left”), defaults to “0px 0px 0px 0px”
    • exclusivity (Literal [ “auto” , “normal” , “none” ] | WaylandWindowExclusivity , optional) — the way should this window reserve its surrounding space, defaults to WaylandWindowExclusivity.NONE
    • keyboard_mode (Literal [ “none” , “exclusive” , “on-demand” ] | GtkLayerShell.KeyboardMode , optional) — select the way this window should handle keyboard input, defaults to GtkLayerShell.KeyboardMode.NONE
    • pass_through (bool , optional) — whether to pass mouse events to the below window or not, defaults to False
    • monitor (int | Gdk.Monitor | None , optional) — the monitor in which this window should be displayed at, defaults to None
    • title (str , optional) — the title of this window (used for window manager scoping), defaults to “fabric”
    • type (Literal [ “top-level” , “popup” ] | Gtk.WindowType , optional) — the type of this window (useful with some window managers), defaults to Gtk.WindowType.TOPLEVEL
    • child (Gtk.Widget | None , optional) — a child widget to add into this window, defaults to None
    • name (str | None , optional) — the name identifer for this widget (useful for styling), defaults to None
    • visible (bool , optional) — whether should this widget be visible or not once initialized, defaults to True
    • all_visible (bool , optional) — whether should this widget and all of its children be visible or not once initialized, defaults to False
    • style (str | None , optional) — inline stylesheet to be applied on this widget, defaults to None
    • style_classes (Iterable *[*str ] | str | None , optional) — a list of style classes to be added into this widget once initialized, defaults to None
    • tooltip_text (str | None , optional) — the text that should be rendered inside the tooltip, defaults to None
    • tooltip_markup (str | None , optional) — same as tooltip_text but it accepts simple markup expressions, defaults to None
    • h_align (Literal [ “fill” , “start” , “end” , “center” , “baseline” ] | Gtk.Align | None , optional) — horizontal alignment of this widget (compared to its parent), defaults to None
    • v_align (Literal [ “fill” , “start” , “end” , “center” , “baseline” ] | Gtk.Align | None , optional) — vertical alignment of this widget (compared to its parent), defaults to None
    • h_expand (bool , optional) — whether should this widget fill in all the available horizontal space or not, defaults to False
    • v_expand (bool , optional) — whether should this widget fill in all the available vertical space or not, defaults to False
    • size (Iterable *[*int ] | int | None , optional) — a fixed size for this widget (not guranteed to get applied), defaults to None

<TypeSignature typeName={ “monitor” } typePrefix={ “property” } returnType={ “int” }> monitor

This window’s current monitor

  • Returns: the monitor id of this window
  • Return type: int

<TypeSignature typeName={ “layer” } typePrefix={ “property” } returnType={ “Layer” }> layer

The layer in which this window sits on

  • Returns: the layer type for this window
  • Return type: GtkLayerShell.Layer

<TypeSignature typeName={ “anchor” } typePrefix={ “property” } returnType={ “tuple[Edge, …]” }> anchor

The list of anchor edges of this window (e.g. “top left bottom”)

  • Return type: tuple[GtkLayerShell.Edge, …]

<TypeSignature typeName={ “margin” } typePrefix={ “property” } returnType={ “tuple[int, …]” }> margin

This window’s margin (formatted as (top, right, bottom, left))

  • Return type: tuple[int, …]

<TypeSignature typeName={ “keyboard_mode” } typePrefix={ “property” } returnType={ “KeyboardMode” }> keyboard_mode

This window’s keybaord input mode

  • Return type: GtkLayerShell.KeyboardMode

<TypeSignature typeName={ “exclusivity” } typePrefix={ “property” } returnType={ “WaylandWindowExclusivity” }> exclusivity

Exclusivity (space reserving) mode for this window

  • Return type: WaylandWindowExclusivity

<TypeSignature typeName={ “pass_through” } typePrefix={ “property” } returnType={ “bool” }> pass_through

Whether should this window be pass-through (pass mouse events what’s below it) or not

  • Return type: bool

<TypeSignature typeName={ “steal_input” } typePrefix={ “def” } typeArgList={ ”()” } returnType={ “None” }> steal_input

Ask the compositor to set this window to have the keyboard interactivity

Not guranteed to work with all Wayland compositors!

<TypeSignature typeName={ “return_input” } typePrefix={ “def” } typeArgList={ ”()” } returnType={ “None” }> return_input

Tell the compositor to remove keyboard interactivity from this window

<TypeSignature typeName={ “show” } typePrefix={ “def” } typeArgList={ “(self)” }> show

<TypeSignature typeName={ “show_all” } typePrefix={ “def” } typeArgList={ “(self)” }> show_all

<TypeSignature typeName={ “extract_anchor_values” } typePrefix={ “static” } typeArgList={ “(string: str)” } returnType={ “tuple[str, …]” }> extract_anchor_values

Extracts the geometry values from a given geometry string.

  • Parameters: string (str) — the string containing the geometry values.
  • Returns: a list of unique directions extracted from the geometry string.
  • Return type: list

<TypeSignature typeName={ “extract_edges_from_string” } typePrefix={ “static” } typeArgList={ “(string: str)” } returnType={ “dict[Edge, bool]” }> extract_edges_from_string

<TypeSignature typeName={ “extract_margin” } typePrefix={ “static” } typeArgList={ “(input: str | Iterable[int])” } returnType={ “dict[Edge, int]” }> extract_margin