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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Take a look at the license at the top of the repository in the LICENSE file.

#![doc = include_str!("../README.md")]
#![cfg_attr(feature = "dox", feature(doc_cfg))]

pub use ffi;
pub use gdk;
pub use gio;
pub use glib;
#[cfg(any(feature = "win32", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "win32")))]
pub use windows;

#[macro_use]
mod rt;

#[allow(clippy::upper_case_acronyms)]
#[allow(unused_imports)]
mod auto;

pub use auto::*;

mod win32_display;
pub use win32_display::Win32DisplayFilterHandle;

mod win32_hcursor;
mod win32_surface;

#[cfg(not(feature = "win32"))]
pub struct HANDLE(pub isize);
#[cfg(not(feature = "win32"))]
pub struct HCURSOR(pub isize);
#[cfg(not(feature = "win32"))]
pub struct HICON(pub isize);
#[cfg(not(feature = "win32"))]
pub struct HWND(pub isize);

#[cfg(not(feature = "win32"))]
#[repr(transparent)]
pub struct WPARAM(pub usize);
#[cfg(not(feature = "win32"))]
#[repr(transparent)]
pub struct LPARAM(pub isize);

#[cfg(not(feature = "win32"))]
#[repr(C)]
pub struct POINT {
    pub x: i32,
    pub y: i32,
}

#[allow(non_snake_case)]
#[cfg(not(feature = "win32"))]
#[repr(C)]
pub struct MSG {
    pub hwnd: HWND,
    pub message: u32,
    pub wParam: WPARAM,
    pub lParam: LPARAM,
    pub time: u32,
    pub pt: POINT,
}

#[cfg(feature = "win32")]
pub use windows::Win32::Foundation::{HANDLE, HWND};
#[cfg(feature = "win32")]
pub use windows::Win32::UI::WindowsAndMessaging::{HCURSOR, HICON, MSG};