2021-02-20 17:02:34 +00:00
|
|
|
mod app;
|
2021-03-30 04:46:26 +00:00
|
|
|
mod atlas;
|
2021-02-20 23:05:36 +00:00
|
|
|
mod dispatcher;
|
2021-02-20 17:02:34 +00:00
|
|
|
mod event;
|
2021-03-24 15:51:28 +00:00
|
|
|
mod fonts;
|
2021-02-20 23:05:36 +00:00
|
|
|
mod geometry;
|
2021-03-20 15:38:36 +00:00
|
|
|
mod renderer;
|
2021-02-20 23:05:36 +00:00
|
|
|
mod runner;
|
2021-03-23 14:15:41 +00:00
|
|
|
mod sprite_cache;
|
2021-02-20 23:05:36 +00:00
|
|
|
mod window;
|
|
|
|
|
|
|
|
use crate::platform;
|
|
|
|
pub use app::App;
|
|
|
|
use cocoa::base::{BOOL, NO, YES};
|
|
|
|
pub use dispatcher::Dispatcher;
|
2021-03-24 15:51:28 +00:00
|
|
|
pub use fonts::FontSystem;
|
2021-02-20 23:05:36 +00:00
|
|
|
pub use runner::Runner;
|
|
|
|
use window::Window;
|
|
|
|
|
|
|
|
pub fn app() -> impl platform::App {
|
|
|
|
App::new()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn runner() -> impl platform::Runner {
|
|
|
|
Runner::new()
|
|
|
|
}
|
|
|
|
trait BoolExt {
|
|
|
|
fn to_objc(self) -> BOOL;
|
|
|
|
}
|
2021-02-20 17:02:34 +00:00
|
|
|
|
2021-02-20 23:05:36 +00:00
|
|
|
impl BoolExt for bool {
|
|
|
|
fn to_objc(self) -> BOOL {
|
|
|
|
if self {
|
|
|
|
YES
|
|
|
|
} else {
|
|
|
|
NO
|
|
|
|
}
|
|
|
|
}
|
2021-02-20 17:02:34 +00:00
|
|
|
}
|