simvx.core.ui.clipboard

System clipboard access — GLFW-first with subprocess fallback.

The graphics backend sets set_backend(copy_fn, paste_fn) at startup. Widgets call copy(text) and paste() -> str which route to the backend or fall back to xclip/xsel/wl-copy subprocess calls.

Module Contents

Functions

set_backend

Set clipboard backend (called by graphics App at startup).

copy

Copy text to the system clipboard.

paste

Return text from the system clipboard.

API

simvx.core.ui.clipboard.set_backend(copy_fn: collections.abc.Callable[[str], None], paste_fn: collections.abc.Callable[[], str]) None

Set clipboard backend (called by graphics App at startup).

simvx.core.ui.clipboard.copy(text: str) None

Copy text to the system clipboard.

simvx.core.ui.clipboard.paste() str

Return text from the system clipboard.