active_win_pos_rs/common/window_position.rs
1#[derive(Debug, Clone, PartialEq)]
2pub struct WindowPosition {
3 pub x: f64,
4 pub y: f64,
5 pub width: f64,
6 pub height: f64,
7}
8
9impl WindowPosition {
10 pub fn new(x: f64, y: f64, w: f64, h: f64) -> Self {
11 Self {
12 x,
13 y,
14 width: w,
15 height: h,
16 }
17 }
18}
19
20impl Default for WindowPosition {
21 fn default() -> Self {
22 Self::new(0.0, 0.0, 0.0, 0.0)
23 }
24}