Files
docs/versioned_docs/version-0.0.9/b_screen.md
T
2025-06-30 22:19:19 +02:00

947 B

title, slug
title slug
Screen /screen

Screen is a OSUI structure that allows the program to use osui elements and it's extensions. Diagram

Screen::new()

Creates a new Screen structure with empty widgets and extensions.

draw(&mut self, element: E) -> &Arc<Widget>

Adds a element to the widgets array and returns the widget for extra parameters.

extension(&mut self, ext: E)

Adds a extension to the extensions array.

run(&mut self) -> std::io::Result<()>

Runs the app with the elements and extension provided.

render(&self) -> std::io::Result<()>

:::warning Do not run this function if you don't know what you're doing, this function may cause a mutex deadlock.

render_extension(&self, wi: Arc<Widget>) -> std::io::Result<()>

:::warning Do not run this function if you don't know what you're doing, this function may cause a mutex deadlock.