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