1#![allow(missing_docs)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6
7pub use core::ffi::c_void;
8pub type c_char = i8;
9pub type c_schar = i8;
10pub type c_uchar = u8;
11pub type c_short = i16;
12pub type c_ushort = u16;
13pub type c_int = i32;
14pub type c_uint = u32;
15pub type c_long = i32;
16pub type c_ulong = u32;
17pub type c_longlong = i64;
18pub type c_ulonglong = u64;
19pub type c_float = f32;
20pub type c_double = f64;
21pub type __int8 = i8;
22pub type __uint8 = u8;
23pub type __int16 = i16;
24pub type __uint16 = u16;
25pub type __int32 = i32;
26pub type __uint32 = u32;
27pub type __int64 = i64;
28pub type __uint64 = u64;
29pub type wchar_t = u16;
30pub type HANDLE = *mut c_void;
31pub type HGLOBAL = HANDLE;
32pub type BOOL = c_int;
33pub type ULONG_PTR = usize;
34pub type SIZE_T = ULONG_PTR;
35pub type HWND = HANDLE;
36pub type WORD = c_ushort;
37pub type DWORD = c_ulong;
38pub type LONG = c_long;
39pub type LPVOID = *mut c_void;
40pub type HDC = *mut c_void;
41pub type HDROP = *mut c_void;
42pub type HBITMAP = *mut c_void;
43
44#[repr(C)]
45#[derive(Copy, Clone)]
46pub struct POINT {
47 pub x: c_long,
48 pub y: c_long,
49}
50
51#[repr(C)]
52#[derive(Copy, Clone)]
53pub struct BITMAPINFOHEADER {
54 pub biSize: DWORD,
55 pub biWidth: LONG,
56 pub biHeight: LONG,
57 pub biPlanes: WORD,
58 pub biBitCount: WORD,
59 pub biCompression: DWORD,
60 pub biSizeImage: DWORD,
61 pub biXPelsPerMeter: LONG,
62 pub biYPelsPerMeter: LONG,
63 pub biClrUsed: DWORD,
64 pub biClrImportant: DWORD,
65}
66
67#[repr(C)]
68#[derive(Copy, Clone)]
69pub struct RGBQUAD {
70 pub rgbBlue: c_uchar,
71 pub rgbGreen: c_uchar,
72 pub rgbRed: c_uchar,
73 pub rgbReserved: c_uchar,
74}
75
76#[repr(C)]
77#[derive(Copy, Clone)]
78pub struct BITMAPINFO {
79 pub bmiHeader: BITMAPINFOHEADER,
80 pub bmiColors: [RGBQUAD; 1],
81}
82
83#[repr(C)]
84#[derive(Copy, Clone)]
85pub struct BITMAP {
86 pub bmType: LONG,
87 pub bmWidth: LONG,
88 pub bmHeight: LONG,
89 pub bmWidthBytes: LONG,
90 pub bmPlanes: WORD,
91 pub bmBitsPixel: WORD,
92 pub bmBits: LPVOID,
93}
94
95#[repr(C)]
96#[repr(packed)]
97#[derive(Copy, Clone)]
98pub struct BITMAPFILEHEADER {
99 pub bfType: WORD,
100 pub bfSize: DWORD,
101 pub bfReserved1: WORD,
102 pub bfReserved2: WORD,
103 pub bfOffBits: DWORD,
104}