Function flo_draw::with_2d_graphics
source · pub fn with_2d_graphics<TAppFn: 'static + Send + FnOnce()>(app_fn: TAppFn)
Expand description
Steals the current thread to run the UI event loop and calls the application function back to continue execution
This is required because some operating systems (OS X) can’t handle UI events from any
thread other than the one that’s created when the app starts. flo_draw
will work
without this call on operating systems with more robust event handling designs.
This will also ensure that any graphics are displayed until the user closes the window, which may be useful behaviour even on operating systems where the thread takeover is not required.