mod game; mod labled_switch; mod ui; use crate::ui::menu::MenuScene; use gtk::{prelude::*, ApplicationWindow}; use gtk::{glib, Application, gio}; const APP_ID: &str = "org.foxarmy.learn-hieroglyph"; // const APP: Option> = None;//RefCell::new(Application::builder().application_id(APP_ID).build()); // pub const S: Stack = Stack::new(); fn main() -> glib::ExitCode { gio::resources_register_include!("compiled.gresource") .expect("Cannot include gresources"); // APP = Option::from(RefCell::new(Application::builder().application_id(APP_ID).build())); // *APP.unwrap().borrow_mut() = Application::builder().application_id(APP_ID).build(); let app: Application = Application::builder().application_id(APP_ID).build(); app.connect_activate(test_ui); app.run() } fn test_ui (app: &Application) { let window: ApplicationWindow = MenuScene::new(app).into(); window.present(); println!("{}", app.windows().len()); }