|
|
|
@ -6,13 +6,14 @@ use serde::{Deserialize, Serialize}; |
|
|
|
|
|
|
|
|
|
|
|
pub type Id = u32; |
|
|
|
pub type Id = u32; |
|
|
|
pub type Dim = u16; |
|
|
|
pub type Dim = u16; |
|
|
|
|
|
|
|
pub type Pos = i16; // Position can be off-screen, so i16 instead of u16.
|
|
|
|
pub type Pid = u32; |
|
|
|
pub type Pid = u32; |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Deserialize, Debug)] |
|
|
|
#[derive(Deserialize, Debug)] |
|
|
|
#[allow(dead_code)] |
|
|
|
#[allow(dead_code)] |
|
|
|
pub struct Rect { |
|
|
|
pub struct Rect { |
|
|
|
pub x: Dim, |
|
|
|
pub x: Pos, |
|
|
|
pub y: Dim, |
|
|
|
pub y: Pos, |
|
|
|
pub width: Dim, |
|
|
|
pub width: Dim, |
|
|
|
pub height: Dim, |
|
|
|
pub height: Dim, |
|
|
|
} |
|
|
|
} |
|
|
|
|