b3-core 0.4.0

A cross-platform framework that provides access and management of the main elements of a graphical application.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{Error, EventHandler, Icon, Menu};

pub trait ActiveApplicationApi {
    fn set_menu(&mut self, menu: Option<&Menu>);

    fn set_icon(&mut self, icon: Option<&Icon>);

    fn stop(&mut self);
}

pub(crate) trait ApplicationApi {
    fn new() -> Result<Self, Error>
    where
        Self: Sized;
    fn run(&mut self, handler: impl EventHandler + 'static);
}