zed/gpui/src/platform/mac/mod.rs

35 lines
531 B
Rust
Raw Normal View History

mod app;
2021-02-20 23:05:36 +00:00
mod dispatcher;
mod event;
2021-02-20 23:05:36 +00:00
mod geometry;
mod runner;
mod window;
use crate::platform;
pub use app::App;
use cocoa::base::{BOOL, NO, YES};
pub use dispatcher::Dispatcher;
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 23:05:36 +00:00
impl BoolExt for bool {
fn to_objc(self) -> BOOL {
if self {
YES
} else {
NO
}
}
}