1#![no_std]
2#![forbid(unsafe_code)]
3#![doc = include_str!("../README.md")]
4#![doc(issue_tracker_base_url = "https://github.com/SCLorentz/Walkie-Talkie/issues")]
5
6struct MatrixClient;
7
8impl app::EventHandler for MatrixClient
9{
10 fn handle_events(e: app::Event)
11 {
12 use app::Event;
13 match e {
14 Event::CloseRequest => log::info!("closing now"),
15 Event::WindowResized { window: w, .. } => log::info!("Resizing window: {:?}", w.title),
16 Event::OsThemeChange { new_theme: theme } => log::info!("changed: {:?}", theme),
17 _ => {}
18 }
19 }
20}
21
22fn main()
23{
24 use app::App;
25 simple_logger::SimpleLogger::new()
26 .init()
27 .unwrap();
28
29 let mut app = App::new(MatrixClient, "Walkie Talkie");
30 let mut theme = app.get_global_theme();
31 theme.blur = true;
32 theme.has_title = true;
33 app.set_global_theme(theme);
34
35 if let Ok(mut window) = app.new_window("walkie talkie", (600.0, 500.0))
36 {
37 let renderer = vk_renderer::Renderer::new(window.get_backend())
38 .expect("Vulkan inicialization failed");
39 let _ = window.connect_surface(renderer.get_surface());
40 };
41
42 let _ = app.new_window("window 2", (500.0, 500.0));
43
44 app.init();
45}
46
47