App - Garland-g/perl6-libui GitHub Wiki

App

Libui::App

App facilitates the creation of a GUI application with Libui, providing methods to run() and exit() an application.

Methods

new(Str $title, UInt $width = 640, UInt $height = 480, Bool(Int) $has-menubar = 1) or new(Libui::Window:D $window)

Creates a new App.

root() returns Libui::Window or window() returns Libui::Window

Returns the Window.

show()

Calls show() on the window.

run()

Runs the App. The method blocks the main thread. Other threads can be run, but Libui methods that modify objects cannot be run from a separate thread. Channels and Supplies can be used to send data that the main thread responds to.

exit()

Closes the App, but does not terminate the program.

set-content(Libui::Control:D $control)

Sets the content of the Window.