1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Windows definitions.

use super::*;

pub use winapi::shared::windef::{
  HBRUSH, HCURSOR, HDC, HICON, HMENU, HWND, POINT, RECT,
};

/// A 2D point.
///
/// Laid out like [`POINT`](winapi::shared::windef::POINT), this just lets me
/// put more trail impls on the type.
#[repr(C)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
#[allow(missing_docs)]
pub struct Point {
  pub x: i32,
  pub y: i32,
}

/// A rectangle that stores an origin and two offsets.
#[repr(C)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
#[allow(missing_docs)]
pub struct PointSizeRect {
  pub x: i32,
  pub y: i32,
  pub width: i32,
  pub height: i32,
}

/// A rectangle that stores four edge locations.
///
/// Laid out like [`RECT`](winapi::shared::windef::RECT), this just lets me
/// put more trail impls on the type.
#[repr(C)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
#[allow(missing_docs)]
pub struct EdgeRect {
  pub left: i32,
  pub top: i32,
  pub right: i32,
  pub bottom: i32,
}