Skip to main content

Module runner

Module runner 

Source

Functions§

build_surface_handler
Build a driven-ready EventHandler for a secondary surface from an App, boxed so a multi-surface backend can hold it alongside its statically-declared handlers. Mirrors what run_multi_with_platform’s factory produces — a handler carrying its own ui_core::Surface world — but for surfaces opened at runtime (via a SurfaceHost), so the backend can enqueue the handler into its single UI-thread loop instead of spawning a thread. Builds no renderer and touches no thread-local reactive state; the loop drives it.
open_window
Opens a full App in its own top-level window on the already-running single-thread multi-surface runner — the app is moved in (so it may be !Send, e.g. hold Rc state), keeps the one shared reactive runtime, and gets its own Surface world and on_frame driven. Unlike open_surface (which hosts a content closure), this hosts a real App, so a caller can move a live sub-app (a detached tab, with its state and background work) into a window. Returns a token; dropping it, or the window’s own close, tears the window down. Only meaningful while run_app_windowed/the multi-surface runner is running.
run_app_windowed
Runs one app in a native window (like run_app_with_name) but under the single-thread multi-surface runner with a real SurfaceHost installed — so the app can call telar::open_surface to spawn further top-level windows that share its one reactive runtime (e.g. a detached tab). The app may be !Send.
run_app_with_name
run_multi_app_with_name
Open several native windows at once on the winit backend — the desktop counterpart to crate::run_app_with_name, and the multi-window entry a bar-per-monitor shell (or any multi-window app) uses on a normal desktop. Each surface (id, config) gets a fresh app from app_factory(id) running on its own thread, so it has a fully isolated reactive/theme/overlay/focus world. Returns once every window has closed.
run_multi_with_platform
Drive N independent rsx apps on a MultiSurfacePlatform backend — one reactive tree per surface, the shape a multi-window app or a desktop shell (a bar/OSD/notification per monitor) needs.
run_with_platform
Drive a full rsx app on an arbitrary Platform backend. This is the backend-agnostic entry point: an out-of-tree backend (e.g. a Wayland layer-shell Platform) constructs its own platform and paths provider and calls this, with no winit dependency. crate::run_app_with_name is the winit-defaulting convenience wrapper over it.
set_default_font_family
Sets the process-wide default font family every surface’s text renders in (its sans-serif face). None restores the platform default. Call once before building surfaces — e.g. a shell passing its theme’s font_family; a later call takes effect on surfaces built afterwards (a config reload rebuilds them).