module

Egui::SystemPorts::Window

Class methods

fullscreen?
Source
implementation
Source
maximize
Source
minimize
Source
position

Current window position — top-left corner in screen coordinates, physical pixels (the units #set_position expects). Nil when the platform (or headless default) cannot report it.

Source
restore
Source
set_decorations(decorated : Bool) : Nil

Toggle the system window chrome (title bar + borders) at runtime. false gives a borderless window — the app then draws its own title bar and drives close/minimize/move/resize through this port (the eframe decorations: false setup). The default (headless) implementation is a no-op.

Source
set_icon(rgba : Bytes, width : Int32, height : Int32) : Nil

Set the window icon from straight (non-premultiplied) RGBA8 pixels, row-major, width×height. Win32 only today — the default (and other platforms') implementation is a no-op.

Source
set_opacity(alpha : Float64) : Nil

Uniform runtime opacity for the WHOLE window — chrome and content together — the terminal-emulator idiom. alpha is 0.0..1.0; 1.0 restores a fully opaque window. Goes through the platform's own window-opacity channel (X11 _NET_WM_WINDOW_OPACITY — needs a running compositor; Win32 layered windows; macOS NSWindow.alphaValue), so it works both ways at runtime, any number of times. The default (headless) implementation is a no-op.

Source
set_position(x : Int32, y : Int32) : Nil
Source
set_shape(mask : Bytes, width : Int32, height : Int32) : Nil

Shape the window from an 8-bit alpha mask (255 = pixel belongs to the window, 0 = hole) — the splash-screen primitive: the GL swap chain loses framebuffer alpha before the compositor on several X11 stacks, so a server-side binary shape (X11 XShape, Win32 SetWindowRgn) is the deterministic cross-platform way to get a non-rectangular window. It clips input as well. macOS is a no-op — its native per-pixel alpha already composites. Call once per shape change, after the window exists. The default (headless) implementation is a no-op.

Source
set_size(width : Int32, height : Int32) : Nil
Source
set_title(title : String) : Nil
Source
start_drag

Hand an in-progress title-bar drag to the platform's native window-move loop (WM/compositor tracks the pointer — jitter-free, unlike a client-side loop measured in window-local coordinates, which feeds back on its own moves). Call once, on drag start, while the button is held. The native loop consumes the button release; the backend injects a synthetic one so egui does not keep the button pressed. The default (headless) implementation is a no-op.

Source
start_resize(edge : Symbol) : Nil

The resize counterpart of #start_drag: edge is one of :top_left, :top, :top_right, :right, :bottom_right, :bottom, :bottom_left, :left. Call once, on drag start, while the button is held. The default (headless) implementation is a no-op.

Source
toggle_fullscreen
Source
use(implementation : Implementation) : Nil

Install a platform implementation (called by the backend).

Source

Nested types