2020-03-20 14:07:44 +11:00
|
|
|
//! This example showcases setting up a basic application and window.
|
|
|
|
|
2021-02-08 15:51:40 +11:00
|
|
|
use cacao::macos::{App, AppDelegate};
|
2020-03-30 16:33:51 +11:00
|
|
|
use cacao::macos::window::Window;
|
2020-03-20 14:07:44 +11:00
|
|
|
|
|
|
|
#[derive(Default)]
|
|
|
|
struct BasicApp {
|
|
|
|
window: Window
|
|
|
|
}
|
|
|
|
|
|
|
|
impl AppDelegate for BasicApp {
|
|
|
|
fn did_finish_launching(&self) {
|
2021-02-08 15:51:40 +11:00
|
|
|
App::activate();
|
|
|
|
|
2020-03-20 14:07:44 +11:00
|
|
|
self.window.set_minimum_content_size(400., 400.);
|
|
|
|
self.window.set_title("A Basic Window");
|
|
|
|
self.window.show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
App::new("com.test.window", BasicApp::default()).run();
|
|
|
|
}
|