browser_window_core/
prelude.rs1pub use browser_window_c::*;
2
3pub use crate::cookie::*;
4
5
6
7pub struct Dims2D(pub(crate) cbw_Dims2D);
8pub struct Pos2D(pub(crate) cbw_Pos2D);
9
10
11
12pub use crate::application::{ApplicationExt, ApplicationImpl};
13pub use crate::browser_window::{BrowserWindowExt, BrowserWindowImpl};
14pub use crate::window::{WindowExt, WindowImpl};
15
16
17
18impl Dims2D {
19 pub fn new(width: u16, height: u16) -> Dims2D {
20 Dims2D(cbw_Dims2D { width: width, height: height })
21 }
22
23 pub fn width(&self) -> u16 { self.0.width }
24 pub fn height(&self) -> u16 { self.0.height }
25}
26
27impl Pos2D {
28 pub fn new(x: u16, y: u16) -> Pos2D {
29 Pos2D(cbw_Pos2D {x: x, y: y})
30 }
31
32 pub fn x(&self) -> u16 { self.0.x }
33 pub fn y(&self) -> u16 { self.0.y }
34}