pub struct App { /* private fields */ }
Expand description
The container for all the GTK widgets of the app – window, webview, etc. All of these are reference-counted, so should be cheap to clone.
Implementations§
Source§impl App
impl App
Sourcepub fn init(
config: Config,
input_file: InputFile,
assets: Assets,
) -> Result<Self>
pub fn init( config: Config, input_file: InputFile, assets: Assets, ) -> Result<Self>
Construct a new app. Input params:
- input_file: Used as the window title and for other actions on the file.
- assets: Encapsulates the HTML layout that will be wrapping the rendered markdown.
Initialization could fail due to a WebContext
failure.
Sourcepub fn init_render_loop(&self, ui_receiver: Receiver<Event>)
pub fn init_render_loop(&self, ui_receiver: Receiver<Event>)
Start listening to events from the ui_receiver
and trigger the relevant methods on the
App
. Doesn’t block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl !Send for App
impl !Sync for App
impl Unpin for App
impl UnwindSafe for App
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more