mod.rs

 1mod atlas;
 2mod dispatcher;
 3mod event;
 4mod fonts;
 5mod geometry;
 6mod platform;
 7mod renderer;
 8mod runner;
 9mod sprite_cache;
10mod window;
11
12use cocoa::base::{BOOL, NO, YES};
13pub use dispatcher::Dispatcher;
14pub use fonts::FontSystem;
15use platform::MacPlatform;
16pub use runner::Runner;
17use window::Window;
18
19pub fn app() -> impl super::Platform {
20    MacPlatform::new()
21}
22
23pub fn runner() -> impl super::Runner {
24    Runner::new()
25}
26
27trait BoolExt {
28    fn to_objc(self) -> BOOL;
29}
30
31impl BoolExt for bool {
32    fn to_objc(self) -> BOOL {
33        if self {
34            YES
35        } else {
36            NO
37        }
38    }
39}