browser_window/core/
window.rs

1#[cfg(not(feature = "gtk"))]
2mod c;
3#[cfg(feature = "gtk")]
4mod gtk;
5
6#[cfg(not(feature = "gtk"))]
7pub use c::WindowImpl;
8#[cfg(feature = "gtk")]
9pub use gtk::WindowImpl;
10
11use crate::prelude::*;
12
13
14pub trait WindowExt: Clone {
15	fn app(&self) -> ApplicationImpl;
16
17	fn close(&self);
18	fn free(&self);
19
20	fn content_dimensions(&self) -> Dims2D;
21	fn opacity(&self) -> u8;
22	fn position(&self) -> Pos2D;
23	fn title(&self) -> String;
24	fn window_dimensions(&self) -> Dims2D;
25
26	fn hide(&self);
27
28	fn set_content_dimensions(&self, dimensions: Dims2D);
29	fn set_opacity(&self, opacity: u8);
30	fn set_position(&self, position: Pos2D);
31	fn set_title(&self, title: &str);
32	fn set_user_data(&self, user_data: *mut ());
33	fn set_window_dimensions(&self, dimensions: Dims2D);
34
35	fn show(&self);
36}
37
38pub type WindowOptions = cbw_WindowOptions;