1mod builder;
4
5pub use builder::WindowBuilder;
6
7pub use super::core::window::WindowExt;
8use super::prelude::*;
9
10
11pub struct WindowHandle(pub(super) WindowImpl);
13
14
15impl WindowHandle {
16 #[cfg(feature = "threadsafe")]
17 pub(crate) unsafe fn clone(&self) -> Self { Self(self.0.clone()) }
18
19 pub(super) fn new(inner: WindowImpl) -> Self { Self(inner) }
20
21 pub fn content_dimensions(&self) -> Dims2D { self.0.content_dimensions() }
22
23 pub fn opacity(&self) -> u8 { self.0.opacity() }
24
25 pub fn position(&self) -> Pos2D { self.0.position() }
26
27 pub fn title(&self) -> String { self.0.title() }
28
29 pub fn window_dimensions(&self) -> Dims2D { self.0.window_dimensions() }
30
31 pub fn hide(&self) { self.0.hide(); }
37
38 pub fn set_content_dimensions(&self, dimensions: Dims2D) {
39 self.0.set_content_dimensions(dimensions);
40 }
41
42 pub fn set_opacity(&self, opacity: u8) { self.0.set_opacity(opacity); }
43
44 pub fn set_position(&self, position: Pos2D) { self.0.set_position(position); }
45
46 pub fn set_title(&self, title: &str) { self.0.set_title(title); }
47
48 pub fn set_window_dimensions(&self, dimensions: Dims2D) {
49 self.0.set_window_dimensions(dimensions);
50 }
51
52 pub fn show(&self) { self.0.show(); }
56}