API referencestd/window

std/window/linux

Public declarations, types, methods, and source contracts for std/window/linux.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/window/linux"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
dylib std/dylib linux.dodo
handle std/window/handle linux.dodo
heap std/window/heap linux.dodo
mem core/mem linux.dodo
ptr core/ptr linux.dodo
raw std/window/raw linux.dodo
x11 std/window/x11 linux.dodo

SHORTCUT_IS_META

Constant · Source

Shortcuts use Control on Linux.

pub const SHORTCUT_IS_META: bool = false

Backend

Struct · Source

The std/window adapter: the process’s connection and its windows by id.

pub struct Backend {

}

Backend.connect

Function · Source

pub fn connect() -> void!raw.Error

Backend.disconnect

Function · Source

pub fn disconnect()

Backend.open

Function · Source

pub fn open(title: &str, width: u32, height: u32, resizable: bool, pixel_buffer: bool) -> u32!raw.Error

Backend.close

Function · Source

pub fn close(id: u32)

Backend.size

Function · Source

pub fn size(id: u32, width: &mut u32, height: &mut u32) -> bool

Backend.attach

Function · Source

pub fn attach(id: u32, pixels: *mut u8, width: u32, height: u32)

Backend.native_handle

Function · Source

The X11 window and a libxcb connection to its server, for GPU APIs.

pub fn native_handle(id: u32) -> handle.NativeHandle!raw.Error

Backend.metal_layer

Function · Source

Metal layers are macOS only.

pub fn metal_layer(id: u32) -> usize!raw.Error

Backend.scale_percent

Function · Source

X11 has no system-wide scale.

pub fn scale_percent(id: u32) -> u32

Backend.next_event

Function · Source

pub fn next_event(milliseconds: u32, event: &mut raw.Event) -> bool!raw.Error

Backend.present

Function · Source

pub fn present(id: u32, x: i32, y: i32, width: u32, height: u32) -> void!raw.Error

Backend.clock

Function · Source

Monotonic nanoseconds, the clock of next_vblank and frame pacing.

pub fn clock() -> u64

Backend.frame_period

Function · Source

Nanoseconds per display refresh, or 0 while unknown: Present’s reports give it after about half a second of frames.

pub fn frame_period(id: u32) -> u64

Backend.next_vblank

Function · Source

X11 reports refreshes as they happen instead; 0 means unknown.

pub fn next_vblank(id: u32, now: u64) -> u64

Backend.request_frame

Function · Source

Ask for a FRAME event at the window’s next refresh. False without Present.

pub fn request_frame(id: u32) -> bool!raw.Error

Backend.set_animating

Function · Source

Nothing throttles an X11 client in the background.

pub fn set_animating(animating: bool)

Backend.set_title

Function · Source

pub fn set_title(id: u32, title: &str) -> void!raw.Error

Backend.set_cursor_visible

Function · Source

pub fn set_cursor_visible(id: u32, visible: bool) -> void!raw.Error

Backend.set_cursor

Function · Source

pub fn set_cursor(id: u32, shape: u32) -> void!raw.Error

Backend.set_size

Function · Source

pub fn set_size(id: u32, width: u32, height: u32) -> void!raw.Error

Backend.set_size_limits

Function · Source

pub fn set_size_limits(id: u32, min_width: u32, min_height: u32, max_width: u32, max_height: u32) -> void!raw.Error

Backend.set_fullscreen

Function · Source

pub fn set_fullscreen(id: u32, fullscreen: bool) -> void!raw.Error

Backend.fullscreen

Function · Source

What the program last asked for; the window manager is not asked.

pub fn fullscreen(id: u32) -> bool

Backend.set_clipboard

Function · Source

pub fn set_clipboard(text: &[u8]) -> void!raw.Error

Backend.clipboard

Function · Source

pub fn clipboard() -> heap.Bytes!raw.Error

Search every guide, reference page, and API declaration.