1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! GDI procedure declarations, constant definitions and macros
7 use ctypes::{c_char, c_int, c_long, c_short, c_ushort, c_void};
8 use shared::basetsd::{UINT16, UINT32, UINT64, ULONG_PTR};
9 use shared::minwindef::{
10 BOOL, BYTE, DWORD, FLOAT, HGLOBAL, HMETAFILE, HMODULE, HRGN, INT, LOBYTE, LPARAM, LPBYTE,
11 LPDWORD, LPINT, LPVOID, LPWORD, MAX_PATH, PFLOAT, PROC, UINT, ULONG, USHORT, WORD,
12 };
13 use shared::windef::{
14 COLORREF, HBITMAP, HBRUSH, HCOLORSPACE, HDC, HENHMETAFILE, HFONT, HGDIOBJ, HGLRC, HPALETTE,
15 HPEN, HWND, LPPOINT, LPRECT, LPSIZE, POINT, POINTL, POINTS, RECT, RECTL, SIZEL,
16 };
17 use um::winnt::{
18 CHAR, HANDLE, LONG, LPCSTR, LPCWSTR, LPSTR, LPWSTR, LUID, PSTR, PVOID, SHORT, VOID, WCHAR,
19 };
20 pub const R2_BLACK: c_int = 1;
21 pub const R2_NOTMERGEPEN: c_int = 2;
22 pub const R2_MASKNOTPEN: c_int = 3;
23 pub const R2_NOTCOPYPEN: c_int = 4;
24 pub const R2_MASKPENNOT: c_int = 5;
25 pub const R2_NOT: c_int = 6;
26 pub const R2_XORPEN: c_int = 7;
27 pub const R2_NOTMASKPEN: c_int = 8;
28 pub const R2_MASKPEN: c_int = 9;
29 pub const R2_NOTXORPEN: c_int = 10;
30 pub const R2_NOP: c_int = 11;
31 pub const R2_MERGENOTPEN: c_int = 12;
32 pub const R2_COPYPEN: c_int = 13;
33 pub const R2_MERGEPENNOT: c_int = 14;
34 pub const R2_MERGEPEN: c_int = 15;
35 pub const R2_WHITE: c_int = 16;
36 pub const R2_LAST: c_int = 16;
37 pub const SRCCOPY: DWORD = 0x00CC0020;
38 pub const SRCPAINT: DWORD = 0x00EE0086;
39 pub const SRCAND: DWORD = 0x008800C6;
40 pub const SRCINVERT: DWORD = 0x00660046;
41 pub const SRCERASE: DWORD = 0x00440328;
42 pub const NOTSRCCOPY: DWORD = 0x00330008;
43 pub const NOTSRCERASE: DWORD = 0x001100A6;
44 pub const MERGECOPY: DWORD = 0x00C000CA;
45 pub const MERGEPAINT: DWORD = 0x00BB0226;
46 pub const PATCOPY: DWORD = 0x00F00021;
47 pub const PATPAINT: DWORD = 0x00FB0A09;
48 pub const PATINVERT: DWORD = 0x005A0049;
49 pub const DSTINVERT: DWORD = 0x00550009;
50 pub const BLACKNESS: DWORD = 0x00000042;
51 pub const WHITENESS: DWORD = 0x00FF0062;
52 pub const NOMIRRORBITMAP: DWORD = 0x80000000;
53 pub const CAPTUREBLT: DWORD = 0x40000000;
54 #[inline]
MAKEROP4(fore: DWORD, back: DWORD) -> DWORD55 pub fn MAKEROP4(fore: DWORD, back: DWORD) -> DWORD {
56 ((back << 8) & 0xFF000000) | fore
57 }
58 pub const GDI_ERROR: ULONG = 0xFFFFFFFF;
59 pub const HGDI_ERROR: HANDLE = -1isize as HANDLE;
60 pub const ERROR: c_int = 0;
61 pub const NULLREGION: c_int = 1;
62 pub const SIMPLEREGION: c_int = 2;
63 pub const COMPLEXREGION: c_int = 3;
64 pub const RGN_ERROR: c_int = ERROR;
65 pub const RGN_AND: c_int = 1;
66 pub const RGN_OR: c_int = 2;
67 pub const RGN_XOR: c_int = 3;
68 pub const RGN_DIFF: c_int = 4;
69 pub const RGN_COPY: c_int = 5;
70 pub const RGN_MIN: c_int = RGN_AND;
71 pub const RGN_MAX: c_int = RGN_COPY;
72 pub const BLACKONWHITE: c_int = 1;
73 pub const WHITEONBLACK: c_int = 2;
74 pub const COLORONCOLOR: c_int = 3;
75 pub const HALFTONE: c_int = 4;
76 pub const MAXSTRETCHBLTMODE: c_int = 4;
77 pub const STRETCH_ANDSCANS: c_int = BLACKONWHITE;
78 pub const STRETCH_ORSCANS: c_int = WHITEONBLACK;
79 pub const STRETCH_DELETESCANS: c_int = COLORONCOLOR;
80 pub const STRETCH_HALFTONE: c_int = HALFTONE;
81 pub const ALTERNATE: c_int = 1;
82 pub const WINDING: c_int = 2;
83 pub const POLYFILL_LAST: c_int = 2;
84 pub const LAYOUT_RTL: DWORD = 0x00000001;
85 pub const LAYOUT_BTT: DWORD = 0x00000002;
86 pub const LAYOUT_VBH: DWORD = 0x00000004;
87 pub const LAYOUT_ORIENTATIONMASK: DWORD = LAYOUT_RTL | LAYOUT_BTT | LAYOUT_VBH;
88 pub const LAYOUT_BITMAPORIENTATIONPRESERVED: DWORD = 0x00000008;
89 pub const TA_NOUPDATECP: UINT = 0;
90 pub const TA_UPDATECP: UINT = 1;
91 pub const TA_LEFT: UINT = 0;
92 pub const TA_RIGHT: UINT = 2;
93 pub const TA_CENTER: UINT = 6;
94 pub const TA_TOP: UINT = 0;
95 pub const TA_BOTTOM: UINT = 8;
96 pub const TA_BASELINE: UINT = 24;
97 pub const TA_RTLREADING: UINT = 256;
98 pub const TA_MASK: UINT = TA_BASELINE + TA_CENTER + TA_UPDATECP + TA_RTLREADING;
99 pub const VTA_BASELINE: UINT = TA_BASELINE;
100 pub const VTA_LEFT: UINT = TA_BOTTOM;
101 pub const VTA_RIGHT: UINT = TA_TOP;
102 pub const VTA_CENTER: UINT = TA_CENTER;
103 pub const VTA_BOTTOM: UINT = TA_RIGHT;
104 pub const VTA_TOP: UINT = TA_LEFT;
105 pub const ETO_OPAQUE: UINT = 0x0002;
106 pub const ETO_CLIPPED: UINT = 0x0004;
107 pub const ETO_GLYPH_INDEX: UINT = 0x0010;
108 pub const ETO_RTLREADING: UINT = 0x0080;
109 pub const ETO_NUMERICSLOCAL: UINT = 0x0400;
110 pub const ETO_NUMERICSLATIN: UINT = 0x0800;
111 pub const ETO_IGNORELANGUAGE: UINT = 0x1000;
112 pub const ETO_PDY: UINT = 0x2000;
113 pub const ETO_REVERSE_INDEX_MAP: UINT = 0x10000;
114 pub const ASPECT_FILTERING: UINT = 0x0001;
115 pub const DCB_RESET: UINT = 0x0001;
116 pub const DCB_ACCUMULATE: UINT = 0x0002;
117 pub const DCB_DIRTY: UINT = DCB_ACCUMULATE;
118 pub const DCB_SET: UINT = DCB_RESET | DCB_ACCUMULATE;
119 pub const DCB_ENABLE: UINT = 0x0004;
120 pub const DCB_DISABLE: UINT = 0x0008;
121 pub const META_SETBKCOLOR: WORD = 0x0201;
122 pub const META_SETBKMODE: WORD = 0x0102;
123 pub const META_SETMAPMODE: WORD = 0x0103;
124 pub const META_SETROP2: WORD = 0x0104;
125 pub const META_SETRELABS: WORD = 0x0105;
126 pub const META_SETPOLYFILLMODE: WORD = 0x0106;
127 pub const META_SETSTRETCHBLTMODE: WORD = 0x0107;
128 pub const META_SETTEXTCHAREXTRA: WORD = 0x0108;
129 pub const META_SETTEXTCOLOR: WORD = 0x0209;
130 pub const META_SETTEXTJUSTIFICATION: WORD = 0x020A;
131 pub const META_SETWINDOWORG: WORD = 0x020B;
132 pub const META_SETWINDOWEXT: WORD = 0x020C;
133 pub const META_SETVIEWPORTORG: WORD = 0x020D;
134 pub const META_SETVIEWPORTEXT: WORD = 0x020E;
135 pub const META_OFFSETWINDOWORG: WORD = 0x020F;
136 pub const META_SCALEWINDOWEXT: WORD = 0x0410;
137 pub const META_OFFSETVIEWPORTORG: WORD = 0x0211;
138 pub const META_SCALEVIEWPORTEXT: WORD = 0x0412;
139 pub const META_LINETO: WORD = 0x0213;
140 pub const META_MOVETO: WORD = 0x0214;
141 pub const META_EXCLUDECLIPRECT: WORD = 0x0415;
142 pub const META_INTERSECTCLIPRECT: WORD = 0x0416;
143 pub const META_ARC: WORD = 0x0817;
144 pub const META_ELLIPSE: WORD = 0x0418;
145 pub const META_FLOODFILL: WORD = 0x0419;
146 pub const META_PIE: WORD = 0x081A;
147 pub const META_RECTANGLE: WORD = 0x041B;
148 pub const META_ROUNDRECT: WORD = 0x061C;
149 pub const META_PATBLT: WORD = 0x061D;
150 pub const META_SAVEDC: WORD = 0x001E;
151 pub const META_SETPIXEL: WORD = 0x041F;
152 pub const META_OFFSETCLIPRGN: WORD = 0x0220;
153 pub const META_TEXTOUT: WORD = 0x0521;
154 pub const META_BITBLT: WORD = 0x0922;
155 pub const META_STRETCHBLT: WORD = 0x0B23;
156 pub const META_POLYGON: WORD = 0x0324;
157 pub const META_POLYLINE: WORD = 0x0325;
158 pub const META_ESCAPE: WORD = 0x0626;
159 pub const META_RESTOREDC: WORD = 0x0127;
160 pub const META_FILLREGION: WORD = 0x0228;
161 pub const META_FRAMEREGION: WORD = 0x0429;
162 pub const META_INVERTREGION: WORD = 0x012A;
163 pub const META_PAINTREGION: WORD = 0x012B;
164 pub const META_SELECTCLIPREGION: WORD = 0x012C;
165 pub const META_SELECTOBJECT: WORD = 0x012D;
166 pub const META_SETTEXTALIGN: WORD = 0x012E;
167 pub const META_CHORD: WORD = 0x0830;
168 pub const META_SETMAPPERFLAGS: WORD = 0x0231;
169 pub const META_EXTTEXTOUT: WORD = 0x0a32;
170 pub const META_SETDIBTODEV: WORD = 0x0d33;
171 pub const META_SELECTPALETTE: WORD = 0x0234;
172 pub const META_REALIZEPALETTE: WORD = 0x0035;
173 pub const META_ANIMATEPALETTE: WORD = 0x0436;
174 pub const META_SETPALENTRIES: WORD = 0x0037;
175 pub const META_POLYPOLYGON: WORD = 0x0538;
176 pub const META_RESIZEPALETTE: WORD = 0x0139;
177 pub const META_DIBBITBLT: WORD = 0x0940;
178 pub const META_DIBSTRETCHBLT: WORD = 0x0b41;
179 pub const META_DIBCREATEPATTERNBRUSH: WORD = 0x0142;
180 pub const META_STRETCHDIB: WORD = 0x0f43;
181 pub const META_EXTFLOODFILL: WORD = 0x0548;
182 pub const META_SETLAYOUT: WORD = 0x0149;
183 pub const META_DELETEOBJECT: WORD = 0x01f0;
184 pub const META_CREATEPALETTE: WORD = 0x00f7;
185 pub const META_CREATEPATTERNBRUSH: WORD = 0x01F9;
186 pub const META_CREATEPENINDIRECT: WORD = 0x02FA;
187 pub const META_CREATEFONTINDIRECT: WORD = 0x02FB;
188 pub const META_CREATEBRUSHINDIRECT: WORD = 0x02FC;
189 pub const META_CREATEREGION: WORD = 0x06FF;
190 STRUCT!{struct DRAWPATRECT {
191 ptPosition: POINT,
192 ptSize: POINT,
193 wStyle: WORD,
194 wPattern: WORD,
195 }}
196 pub type PDRAWPATRECT = *mut DRAWPATRECT;
197 pub const NEWFRAME: c_int = 1;
198 pub const ABORTDOC: c_int = 2;
199 pub const NEXTBAND: c_int = 3;
200 pub const SETCOLORTABLE: c_int = 4;
201 pub const GETCOLORTABLE: c_int = 5;
202 pub const FLUSHOUTPUT: c_int = 6;
203 pub const DRAFTMODE: c_int = 7;
204 pub const QUERYESCSUPPORT: c_int = 8;
205 pub const SETABORTPROC: c_int = 9;
206 pub const STARTDOC: c_int = 10;
207 pub const ENDDOC: c_int = 11;
208 pub const GETPHYSPAGESIZE: c_int = 12;
209 pub const GETPRINTINGOFFSET: c_int = 13;
210 pub const GETSCALINGFACTOR: c_int = 14;
211 pub const MFCOMMENT: c_int = 15;
212 pub const GETPENWIDTH: c_int = 16;
213 pub const SETCOPYCOUNT: c_int = 17;
214 pub const SELECTPAPERSOURCE: c_int = 18;
215 pub const DEVICEDATA: c_int = 19;
216 pub const PASSTHROUGH: c_int = 19;
217 pub const GETTECHNOLGY: c_int = 20;
218 pub const GETTECHNOLOGY: c_int = 20;
219 pub const SETLINECAP: c_int = 21;
220 pub const SETLINEJOIN: c_int = 22;
221 pub const SETMITERLIMIT: c_int = 23;
222 pub const BANDINFO: c_int = 24;
223 pub const DRAWPATTERNRECT: c_int = 25;
224 pub const GETVECTORPENSIZE: c_int = 26;
225 pub const GETVECTORBRUSHSIZE: c_int = 27;
226 pub const ENABLEDUPLEX: c_int = 28;
227 pub const GETSETPAPERBINS: c_int = 29;
228 pub const GETSETPRINTORIENT: c_int = 30;
229 pub const ENUMPAPERBINS: c_int = 31;
230 pub const SETDIBSCALING: c_int = 32;
231 pub const EPSPRINTING: c_int = 33;
232 pub const ENUMPAPERMETRICS: c_int = 34;
233 pub const GETSETPAPERMETRICS: c_int = 35;
234 pub const POSTSCRIPT_DATA: c_int = 37;
235 pub const POSTSCRIPT_IGNORE: c_int = 38;
236 pub const MOUSETRAILS: c_int = 39;
237 pub const GETDEVICEUNITS: c_int = 42;
238 pub const GETEXTENDEDTEXTMETRICS: c_int = 256;
239 pub const GETEXTENTTABLE: c_int = 257;
240 pub const GETPAIRKERNTABLE: c_int = 258;
241 pub const GETTRACKKERNTABLE: c_int = 259;
242 pub const EXTTEXTOUT: c_int = 512;
243 pub const GETFACENAME: c_int = 513;
244 pub const DOWNLOADFACE: c_int = 514;
245 pub const ENABLERELATIVEWIDTHS: c_int = 768;
246 pub const ENABLEPAIRKERNING: c_int = 769;
247 pub const SETKERNTRACK: c_int = 770;
248 pub const SETALLJUSTVALUES: c_int = 771;
249 pub const SETCHARSET: c_int = 772;
250 pub const STRETCHBLT: c_int = 2048;
251 pub const METAFILE_DRIVER: c_int = 2049;
252 pub const GETSETSCREENPARAMS: c_int = 3072;
253 pub const QUERYDIBSUPPORT: c_int = 3073;
254 pub const BEGIN_PATH: c_int = 4096;
255 pub const CLIP_TO_PATH: c_int = 4097;
256 pub const END_PATH: c_int = 4098;
257 pub const EXT_DEVICE_CAPS: c_int = 4099;
258 pub const RESTORE_CTM: c_int = 4100;
259 pub const SAVE_CTM: c_int = 4101;
260 pub const SET_ARC_DIRECTION: c_int = 4102;
261 pub const SET_BACKGROUND_COLOR: c_int = 4103;
262 pub const SET_POLY_MODE: c_int = 4104;
263 pub const SET_SCREEN_ANGLE: c_int = 4105;
264 pub const SET_SPREAD: c_int = 4106;
265 pub const TRANSFORM_CTM: c_int = 4107;
266 pub const SET_CLIP_BOX: c_int = 4108;
267 pub const SET_BOUNDS: c_int = 4109;
268 pub const SET_MIRROR_MODE: c_int = 4110;
269 pub const OPENCHANNEL: c_int = 4110;
270 pub const DOWNLOADHEADER: c_int = 4111;
271 pub const CLOSECHANNEL: c_int = 4112;
272 pub const POSTSCRIPT_PASSTHROUGH: c_int = 4115;
273 pub const ENCAPSULATED_POSTSCRIPT: c_int = 4116;
274 pub const POSTSCRIPT_IDENTIFY: c_int = 4117;
275 pub const POSTSCRIPT_INJECTION: c_int = 4118;
276 pub const CHECKJPEGFORMAT: c_int = 4119;
277 pub const CHECKPNGFORMAT: c_int = 4120;
278 pub const GET_PS_FEATURESETTING: c_int = 4121;
279 pub const GDIPLUS_TS_QUERYVER: c_int = 4122;
280 pub const GDIPLUS_TS_RECORD: c_int = 4123;
281 pub const MILCORE_TS_QUERYVER_RESULT_FALSE: c_int = 0x0;
282 pub const MILCORE_TS_QUERYVER_RESULT_TRUE: c_int = 0x7FFFFFFF;
283 pub const SPCLPASSTHROUGH2: c_int = 4568;
284 pub const PSIDENT_GDICENTRIC: c_int = 0;
285 pub const PSIDENT_PSCENTRIC: c_int = 1;
286 STRUCT!{struct PSINJECTDATA {
287 DataBytes: DWORD,
288 InjectionPoint: WORD,
289 PageNumber: WORD,
290 }}
291 pub type PPSINJECTDATA = *mut PSINJECTDATA;
292 pub const PSINJECT_BEGINSTREAM: WORD = 1;
293 pub const PSINJECT_PSADOBE: WORD = 2;
294 pub const PSINJECT_PAGESATEND: WORD = 3;
295 pub const PSINJECT_PAGES: WORD = 4;
296 pub const PSINJECT_DOCNEEDEDRES: WORD = 5;
297 pub const PSINJECT_DOCSUPPLIEDRES: WORD = 6;
298 pub const PSINJECT_PAGEORDER: WORD = 7;
299 pub const PSINJECT_ORIENTATION: WORD = 8;
300 pub const PSINJECT_BOUNDINGBOX: WORD = 9;
301 pub const PSINJECT_DOCUMENTPROCESSCOLORS: WORD = 10;
302 pub const PSINJECT_COMMENTS: WORD = 11;
303 pub const PSINJECT_BEGINDEFAULTS: WORD = 12;
304 pub const PSINJECT_ENDDEFAULTS: WORD = 13;
305 pub const PSINJECT_BEGINPROLOG: WORD = 14;
306 pub const PSINJECT_ENDPROLOG: WORD = 15;
307 pub const PSINJECT_BEGINSETUP: WORD = 16;
308 pub const PSINJECT_ENDSETUP: WORD = 17;
309 pub const PSINJECT_TRAILER: WORD = 18;
310 pub const PSINJECT_EOF: WORD = 19;
311 pub const PSINJECT_ENDSTREAM: WORD = 20;
312 pub const PSINJECT_DOCUMENTPROCESSCOLORSATEND: WORD = 21;
313 pub const PSINJECT_PAGENUMBER: WORD = 100;
314 pub const PSINJECT_BEGINPAGESETUP: WORD = 101;
315 pub const PSINJECT_ENDPAGESETUP: WORD = 102;
316 pub const PSINJECT_PAGETRAILER: WORD = 103;
317 pub const PSINJECT_PLATECOLOR: WORD = 104;
318 pub const PSINJECT_SHOWPAGE: WORD = 105;
319 pub const PSINJECT_PAGEBBOX: WORD = 106;
320 pub const PSINJECT_ENDPAGECOMMENTS: WORD = 107;
321 pub const PSINJECT_VMSAVE: WORD = 200;
322 pub const PSINJECT_VMRESTORE: WORD = 201;
323 pub const PSINJECT_DLFONT: DWORD = 0xdddddddd;
324 pub const FEATURESETTING_NUP: WORD = 0;
325 pub const FEATURESETTING_OUTPUT: WORD = 1;
326 pub const FEATURESETTING_PSLEVEL: WORD = 2;
327 pub const FEATURESETTING_CUSTPAPER: WORD = 3;
328 pub const FEATURESETTING_MIRROR: WORD = 4;
329 pub const FEATURESETTING_NEGATIVE: WORD = 5;
330 pub const FEATURESETTING_PROTOCOL: WORD = 6;
331 pub const FEATURESETTING_PRIVATE_BEGIN: WORD = 0x1000;
332 pub const FEATURESETTING_PRIVATE_END: WORD = 0x1FFF;
333 STRUCT!{struct PSFEATURE_OUTPUT {
334 bPageIndependent: BOOL,
335 bSetPageDevice: BOOL,
336 }}
337 pub type PPSFEATURE_OUTPUT = *mut PSFEATURE_OUTPUT;
338 STRUCT!{struct PSFEATURE_CUSTPAPER {
339 lOrientation: LONG,
340 lWidth: LONG,
341 lHeight: LONG,
342 lWidthOffset: LONG,
343 lHeightOffset: LONG,
344 }}
345 pub type PPSFEATURE_CUSTPAPER = *mut PSFEATURE_CUSTPAPER;
346 pub const PSPROTOCOL_ASCII: c_int = 0;
347 pub const PSPROTOCOL_BCP: c_int = 1;
348 pub const PSPROTOCOL_TBCP: c_int = 2;
349 pub const PSPROTOCOL_BINARY: c_int = 3;
350 pub const QDI_SETDIBITS: c_int = 1;
351 pub const QDI_GETDIBITS: c_int = 2;
352 pub const QDI_DIBTOSCREEN: c_int = 4;
353 pub const QDI_STRETCHDIB: c_int = 8;
354 pub const SP_NOTREPORTED: c_int = 0x4000;
355 pub const SP_ERROR: c_int = -1;
356 pub const SP_APPABORT: c_int = -2;
357 pub const SP_USERABORT: c_int = -3;
358 pub const SP_OUTOFDISK: c_int = -4;
359 pub const SP_OUTOFMEMORY: c_int = -5;
360 pub const PR_JOBSTATUS: c_int = 0x0000;
361 pub const OBJ_PEN: UINT = 1;
362 pub const OBJ_BRUSH: UINT = 2;
363 pub const OBJ_DC: UINT = 3;
364 pub const OBJ_METADC: UINT = 4;
365 pub const OBJ_PAL: UINT = 5;
366 pub const OBJ_FONT: UINT = 6;
367 pub const OBJ_BITMAP: UINT = 7;
368 pub const OBJ_REGION: UINT = 8;
369 pub const OBJ_METAFILE: UINT = 9;
370 pub const OBJ_MEMDC: UINT = 10;
371 pub const OBJ_EXTPEN: UINT = 11;
372 pub const OBJ_ENHMETADC: UINT = 12;
373 pub const OBJ_ENHMETAFILE: UINT = 13;
374 pub const OBJ_COLORSPACE: UINT = 14;
375 pub const GDI_OBJ_LAST: UINT = OBJ_COLORSPACE;
376 pub const MWT_IDENTITY: c_int = 1;
377 pub const MWT_LEFTMULTIPLY: c_int = 2;
378 pub const MWT_RIGHTMULTIPLY: c_int = 3;
379 pub const MWT_MIN: c_int = MWT_IDENTITY;
380 pub const MWT_MAX: c_int = MWT_RIGHTMULTIPLY;
381 STRUCT!{struct XFORM {
382 eM11: FLOAT,
383 eM12: FLOAT,
384 eM21: FLOAT,
385 eM22: FLOAT,
386 eDx: FLOAT,
387 eDy: FLOAT,
388 }}
389 pub type PXFORM = *mut XFORM;
390 pub type LPXFORM = *mut XFORM;
391 STRUCT!{struct BITMAP {
392 bmType: LONG,
393 bmWidth: LONG,
394 bmHeight: LONG,
395 bmWidthBytes: LONG,
396 bmPlanes: WORD,
397 bmBitsPixel: WORD,
398 bmBits: LPVOID,
399 }}
400 pub type PBITMAP = *mut BITMAP;
401 pub type NPBITMAP = *mut BITMAP;
402 pub type LPBITMAP = *mut BITMAP;
403 STRUCT!{#[debug] struct RGBTRIPLE {
404 rgbtBlue: BYTE,
405 rgbtGreen: BYTE,
406 rgbtRed: BYTE,
407 }}
408 pub type PRGBTRIPLE = *mut RGBTRIPLE;
409 pub type NPRGBTRIPLE = *mut RGBTRIPLE;
410 pub type LPRGBTRIPLE = *mut RGBTRIPLE;
411 STRUCT!{#[debug] struct RGBQUAD {
412 rgbBlue: BYTE,
413 rgbGreen: BYTE,
414 rgbRed: BYTE,
415 rgbReserved: BYTE,
416 }}
417 pub type LPRGBQUAD = *mut RGBQUAD;
418 pub const CS_ENABLE: DWORD = 0x00000001;
419 pub const CS_DISABLE: DWORD = 0x00000002;
420 pub const CS_DELETE_TRANSFORM: DWORD = 0x00000003;
421 pub const LCS_SIGNATURE: DWORD = 0x5053_4F43; // 'PSOC'
422 pub const LCS_sRGB: LCSCSTYPE = 0x7352_4742; // 'sRGB'
423 pub const LCS_WINDOWS_COLOR_SPACE: LCSCSTYPE = 0x5769_6E20; // 'Win '
424 pub type LCSCSTYPE = LONG;
425 pub const LCS_CALIBRATED_RGB: LCSCSTYPE = 0x00000000;
426 pub type LCSGAMUTMATCH = LONG;
427 pub const LCS_GM_BUSINESS: LCSGAMUTMATCH = 0x00000001;
428 pub const LCS_GM_GRAPHICS: LCSGAMUTMATCH = 0x00000002;
429 pub const LCS_GM_IMAGES: LCSGAMUTMATCH = 0x00000004;
430 pub const LCS_GM_ABS_COLORIMETRIC: LCSGAMUTMATCH = 0x00000008;
431 pub const CM_OUT_OF_GAMUT: BYTE = 255;
432 pub const CM_IN_GAMUT: BYTE = 0;
433 pub const ICM_ADDPROFILE: UINT = 1;
434 pub const ICM_DELETEPROFILE: UINT = 2;
435 pub const ICM_QUERYPROFILE: UINT = 3;
436 pub const ICM_SETDEFAULTPROFILE: UINT = 4;
437 pub const ICM_REGISTERICMATCHER: UINT = 5;
438 pub const ICM_UNREGISTERICMATCHER: UINT = 6;
439 pub const ICM_QUERYMATCH: UINT = 7;
440 #[inline]
GetKValue(cmyk: COLORREF) -> BYTE441 pub fn GetKValue(cmyk: COLORREF) -> BYTE {
442 cmyk as BYTE
443 }
444 #[inline]
GetYValue(cmyk: COLORREF) -> BYTE445 pub fn GetYValue(cmyk: COLORREF) -> BYTE {
446 (cmyk >> 8) as BYTE
447 }
448 #[inline]
GetMValue(cmyk: COLORREF) -> BYTE449 pub fn GetMValue(cmyk: COLORREF) -> BYTE {
450 (cmyk >> 16) as BYTE
451 }
452 #[inline]
GetCValue(cmyk: COLORREF) -> BYTE453 pub fn GetCValue(cmyk: COLORREF) -> BYTE {
454 (cmyk >> 24) as BYTE
455 }
456 #[inline]
CMYK(c: BYTE, m: BYTE, y: BYTE, k: BYTE) -> COLORREF457 pub fn CMYK(c: BYTE, m: BYTE, y: BYTE, k: BYTE) -> COLORREF {
458 (k as COLORREF) | ((y as COLORREF) << 8) | ((m as COLORREF) << 16) | ((c as COLORREF) << 24)
459 }
460 pub type FXPT16DOT16 = c_long;
461 pub type LPFXPT16DOT16 = *mut c_long;
462 pub type FXPT2DOT30 = c_long;
463 pub type LPFXPT2DOT30 = *mut c_long;
464 STRUCT!{#[debug] struct CIEXYZ {
465 ciexyzX: FXPT2DOT30,
466 ciexyzY: FXPT2DOT30,
467 ciexyzZ: FXPT2DOT30,
468 }}
469 pub type LPCIEXYZ = *mut CIEXYZ;
470 STRUCT!{#[debug] struct CIEXYZTRIPLE {
471 ciexyzRed: CIEXYZ,
472 ciexyzGreen: CIEXYZ,
473 ciexyzBlue: CIEXYZ,
474 }}
475 pub type LPCIEXYZTRIPLE = *mut CIEXYZTRIPLE;
476 STRUCT!{struct LOGCOLORSPACEA {
477 lcsSignature: DWORD,
478 lcsVersion: DWORD,
479 lcsSize: DWORD,
480 lcsCSType: LCSCSTYPE,
481 lcsIntent: LCSGAMUTMATCH,
482 lcsEndpoints: CIEXYZTRIPLE,
483 lcsGammaRed: DWORD,
484 lcsGammaGreen: DWORD,
485 lcsGammaBlue: DWORD,
486 lcsFilename: [CHAR; MAX_PATH],
487 }}
488 pub type LPLOGCOLORSPACEA = *mut LOGCOLORSPACEA;
489 STRUCT!{struct LOGCOLORSPACEW {
490 lcsSignature: DWORD,
491 lcsVersion: DWORD,
492 lcsSize: DWORD,
493 lcsCSType: LCSCSTYPE,
494 lcsIntent: LCSGAMUTMATCH,
495 lcsEndpoints: CIEXYZTRIPLE,
496 lcsGammaRed: DWORD,
497 lcsGammaGreen: DWORD,
498 lcsGammaBlue: DWORD,
499 lcsFilename: [WCHAR; MAX_PATH],
500 }}
501 pub type LPLOGCOLORSPACEW = *mut LOGCOLORSPACEW;
502 STRUCT!{#[debug] struct BITMAPCOREHEADER {
503 bcSize: DWORD,
504 bcWidth: WORD,
505 bcHeight: WORD,
506 bcPlanes: WORD,
507 bcBitCount: WORD,
508 }}
509 pub type LPBITMAPCOREHEADER = *mut BITMAPCOREHEADER;
510 pub type PBITMAPCOREHEADER = *mut BITMAPCOREHEADER;
511 STRUCT!{#[debug] struct BITMAPINFOHEADER {
512 biSize: DWORD,
513 biWidth: LONG,
514 biHeight: LONG,
515 biPlanes: WORD,
516 biBitCount: WORD,
517 biCompression: DWORD,
518 biSizeImage: DWORD,
519 biXPelsPerMeter: LONG,
520 biYPelsPerMeter: LONG,
521 biClrUsed: DWORD,
522 biClrImportant: DWORD,
523 }}
524 pub type LPBITMAPINFOHEADER = *mut BITMAPINFOHEADER;
525 pub type PBITMAPINFOHEADER = *mut BITMAPINFOHEADER;
526 STRUCT!{#[debug] struct BITMAPV4HEADER {
527 bV4Size: DWORD,
528 bV4Width: LONG,
529 bV4Height: LONG,
530 bV4Planes: WORD,
531 bV4BitCount: WORD,
532 bV4V4Compression: DWORD,
533 bV4SizeImage: DWORD,
534 bV4XPelsPerMeter: LONG,
535 bV4YPelsPerMeter: LONG,
536 bV4ClrUsed: DWORD,
537 bV4ClrImportant: DWORD,
538 bV4RedMask: DWORD,
539 bV4GreenMask: DWORD,
540 bV4BlueMask: DWORD,
541 bV4AlphaMask: DWORD,
542 bV4CSType: DWORD,
543 bV4Endpoints: CIEXYZTRIPLE,
544 bV4GammaRed: DWORD,
545 bV4GammaGreen: DWORD,
546 bV4GammaBlue: DWORD,
547 }}
548 pub type LPBITMAPV4HEADER = *mut BITMAPV4HEADER;
549 pub type PBITMAPV4HEADER = *mut BITMAPV4HEADER;
550 STRUCT!{#[debug] struct BITMAPV5HEADER {
551 bV5Size: DWORD,
552 bV5Width: LONG,
553 bV5Height: LONG,
554 bV5Planes: WORD,
555 bV5BitCount: WORD,
556 bV5Compression: DWORD,
557 bV5SizeImage: DWORD,
558 bV5XPelsPerMeter: LONG,
559 bV5YPelsPerMeter: LONG,
560 bV5ClrUsed: DWORD,
561 bV5ClrImportant: DWORD,
562 bV5RedMask: DWORD,
563 bV5GreenMask: DWORD,
564 bV5BlueMask: DWORD,
565 bV5AlphaMask: DWORD,
566 bV5CSType: DWORD,
567 bV5Endpoints: CIEXYZTRIPLE,
568 bV5GammaRed: DWORD,
569 bV5GammaGreen: DWORD,
570 bV5GammaBlue: DWORD,
571 bV5Intent: DWORD,
572 bV5ProfileData: DWORD,
573 bV5ProfileSize: DWORD,
574 bV5Reserved: DWORD,
575 }}
576 pub type LPBITMAPV5HEADER = *mut BITMAPV5HEADER;
577 pub type PBITMAPV5HEADER = *mut BITMAPV5HEADER;
578 pub const PROFILE_LINKED: LONG = 0x4C49_4E4B; // 'LINK'
579 pub const PROFILE_EMBEDDED: LONG = 0x4D42_4544; // 'MBED'
580 pub const BI_RGB: DWORD = 0;
581 pub const BI_RLE8: DWORD = 1;
582 pub const BI_RLE4: DWORD = 2;
583 pub const BI_BITFIELDS: DWORD = 3;
584 pub const BI_JPEG: DWORD = 4;
585 pub const BI_PNG: DWORD = 5;
586 STRUCT!{#[debug] struct BITMAPINFO {
587 bmiHeader: BITMAPINFOHEADER,
588 bmiColors: [RGBQUAD; 1],
589 }}
590 pub type LPBITMAPINFO = *mut BITMAPINFO;
591 pub type PBITMAPINFO = *mut BITMAPINFO;
592 STRUCT!{#[debug] struct BITMAPCOREINFO {
593 bmciHeader: BITMAPCOREHEADER,
594 bmciColors: [RGBTRIPLE; 1],
595 }}
596 pub type LPBITMAPCOREINFO = *mut BITMAPCOREINFO;
597 pub type PBITMAPCOREINFO = *mut BITMAPCOREINFO;
598 STRUCT!{#[debug] #[repr(packed)] struct BITMAPFILEHEADER {
599 bfType: WORD,
600 bfSize: DWORD,
601 bfReserved1: WORD,
602 bfReserved2: WORD,
603 bfOffBits: DWORD,
604 }}
605 pub type LPBITMAPFILEHEADER = *mut BITMAPFILEHEADER;
606 pub type PBITMAPFILEHEADER = *mut BITMAPFILEHEADER;
607 #[inline]
MAKEPOINTS(l: DWORD) -> POINTS608 pub fn MAKEPOINTS(l: DWORD) -> POINTS {
609 unsafe { ::core::mem::transmute::<DWORD, POINTS>(l) }
610 }
611 STRUCT!{#[debug] struct FONTSIGNATURE {
612 fsUsb: [DWORD; 4],
613 fsCsb: [DWORD; 2],
614 }}
615 pub type LPFONTSIGNATURE = *mut FONTSIGNATURE;
616 pub type PFONTSIGNATURE = *mut FONTSIGNATURE;
617 STRUCT!{#[debug] struct CHARSETINFO {
618 ciCharset: UINT,
619 ciACP: UINT,
620 fs: FONTSIGNATURE,
621 }}
622 pub type PCHARSETINFO = *mut CHARSETINFO;
623 pub type NPCHARSETINFO = *mut CHARSETINFO;
624 pub type LPCHARSETINFO = *mut CHARSETINFO;
625 pub const TCI_SRCCHARSET: c_int = 1;
626 pub const TCI_SRCCODEPAGE: c_int = 2;
627 pub const TCI_SRCFONTSIG: c_int = 3;
628 pub const TCI_SRCLOCALE: c_int = 0x1000;
629 STRUCT!{#[debug] struct LOCALESIGNATURE {
630 lsUsb: [DWORD; 4],
631 lsCsbDefault: [DWORD; 2],
632 lsCsbSupported: [DWORD; 2],
633 }}
634 pub type PLOCALESIGNATURE = *mut LOCALESIGNATURE;
635 pub type LPLOCALESIGNATURE = *mut LOCALESIGNATURE;
636 STRUCT!{struct HANDLETABLE {
637 objectHandle: [HGDIOBJ; 1],
638 }}
639 pub type LPHANDLETABLE = *mut HANDLETABLE;
640 pub type PHANDLETABLE = *mut HANDLETABLE;
641 STRUCT!{struct METARECORD {
642 rdSize: DWORD,
643 rdFunction: WORD,
644 rdParm: [WORD; 1],
645 }}
646 pub type PMETARECORD = *mut METARECORD;
647 pub type LPMETARECORD = *mut METARECORD;
648 STRUCT!{struct METAFILEPICT {
649 mm: LONG,
650 xExt: LONG,
651 yExt: LONG,
652 hMF: HMETAFILE,
653 }}
654 pub type LPMETAFILEPICT = *mut METAFILEPICT;
655 STRUCT!{struct METAHEADER {
656 mtType: WORD,
657 mtHeaderSize: WORD,
658 mtVersion: WORD,
659 mtSize: DWORD,
660 mtNoObjects: WORD,
661 mtMaxRecord: DWORD,
662 mtNoParameters: WORD,
663 }}
664 pub type PMETAHEADER = *mut METAHEADER;
665 pub type LPMETAHEADER = *mut METAHEADER;
666 STRUCT!{struct ENHMETARECORD {
667 iType: DWORD,
668 nSize: DWORD,
669 dParm: [DWORD; 1],
670 }}
671 pub type PENHMETARECORD = *mut ENHMETARECORD;
672 pub type LPENHMETARECORD = *mut ENHMETARECORD;
673 STRUCT!{struct ENHMETAHEADER {
674 iType: DWORD,
675 nSize: DWORD,
676 rclBounds: RECTL,
677 rclFrame: RECTL,
678 dSignature: DWORD,
679 nVersion: DWORD,
680 nBytes: DWORD,
681 nRecords: DWORD,
682 nHandles: WORD,
683 sReserved: WORD,
684 nDescription: DWORD,
685 offDescription: DWORD,
686 nPalEntries: DWORD,
687 szlDevice: SIZEL,
688 szlMillimeters: SIZEL,
689 cbPixelFormat: DWORD,
690 offPixelFormat: DWORD,
691 bOpenGL: DWORD,
692 szlMicrometers: SIZEL,
693 }}
694 pub type PENHMETAHEADER = *mut ENHMETAHEADER;
695 pub type LPENHMETAHEADER = *mut ENHMETAHEADER;
696 pub const TMPF_FIXED_PITCH: BYTE = 0x01;
697 pub const TMPF_VECTOR: BYTE = 0x02;
698 pub const TMPF_DEVICE: BYTE = 0x08;
699 pub const TMPF_TRUETYPE: BYTE = 0x04;
700 // BCHAR
701 STRUCT!{struct TEXTMETRICA {
702 tmHeight: LONG,
703 tmAscent: LONG,
704 tmDescent: LONG,
705 tmInternalLeading: LONG,
706 tmExternalLeading: LONG,
707 tmAveCharWidth: LONG,
708 tmMaxCharWidth: LONG,
709 tmWeight: LONG,
710 tmOverhang: LONG,
711 tmDigitizedAspectX: LONG,
712 tmDigitizedAspectY: LONG,
713 tmFirstChar: BYTE,
714 tmLastChar: BYTE,
715 tmDefaultChar: BYTE,
716 tmBreakChar: BYTE,
717 tmItalic: BYTE,
718 tmUnderlined: BYTE,
719 tmStruckOut: BYTE,
720 tmPitchAndFamily: BYTE,
721 tmCharSet: BYTE,
722 }}
723 pub type PTEXTMETRICA = *mut TEXTMETRICA;
724 pub type NPTEXTMETRICA = *mut TEXTMETRICA;
725 pub type LPTEXTMETRICA = *mut TEXTMETRICA;
726 STRUCT!{struct TEXTMETRICW {
727 tmHeight: LONG,
728 tmAscent: LONG,
729 tmDescent: LONG,
730 tmInternalLeading: LONG,
731 tmExternalLeading: LONG,
732 tmAveCharWidth: LONG,
733 tmMaxCharWidth: LONG,
734 tmWeight: LONG,
735 tmOverhang: LONG,
736 tmDigitizedAspectX: LONG,
737 tmDigitizedAspectY: LONG,
738 tmFirstChar: WCHAR,
739 tmLastChar: WCHAR,
740 tmDefaultChar: WCHAR,
741 tmBreakChar: WCHAR,
742 tmItalic: BYTE,
743 tmUnderlined: BYTE,
744 tmStruckOut: BYTE,
745 tmPitchAndFamily: BYTE,
746 tmCharSet: BYTE,
747 }}
748 pub type PTEXTMETRICW = *mut TEXTMETRICW;
749 pub type NPTEXTMETRICW = *mut TEXTMETRICW;
750 pub type LPTEXTMETRICW = *mut TEXTMETRICW;
751 pub const NTM_REGULAR: DWORD = 0x00000040;
752 pub const NTM_BOLD: DWORD = 0x00000020;
753 pub const NTM_ITALIC: DWORD = 0x00000001;
754 pub const NTM_NONNEGATIVE_AC: DWORD = 0x00010000;
755 pub const NTM_PS_OPENTYPE: DWORD = 0x00020000;
756 pub const NTM_TT_OPENTYPE: DWORD = 0x00040000;
757 pub const NTM_MULTIPLEMASTER: DWORD = 0x00080000;
758 pub const NTM_TYPE1: DWORD = 0x00100000;
759 pub const NTM_DSIG: DWORD = 0x00200000;
760 STRUCT!{struct NEWTEXTMETRICA {
761 tmHeight: LONG,
762 tmAscent: LONG,
763 tmDescent: LONG,
764 tmInternalLeading: LONG,
765 tmExternalLeading: LONG,
766 tmAveCharWidth: LONG,
767 tmMaxCharWidth: LONG,
768 tmWeight: LONG,
769 tmOverhang: LONG,
770 tmDigitizedAspectX: LONG,
771 tmDigitizedAspectY: LONG,
772 tmFirstChar: BYTE,
773 tmLastChar: BYTE,
774 tmDefaultChar: BYTE,
775 tmBreakChar: BYTE,
776 tmItalic: BYTE,
777 tmUnderlined: BYTE,
778 tmStruckOut: BYTE,
779 tmPitchAndFamily: BYTE,
780 tmCharSet: BYTE,
781 ntmFlags: DWORD,
782 ntmSizeEM: UINT,
783 ntmCellHeight: UINT,
784 ntmAvgWidth: UINT,
785 }}
786 pub type PNEWTEXTMETRICA = *mut NEWTEXTMETRICA;
787 pub type NPNEWTEXTMETRICA = *mut NEWTEXTMETRICA;
788 pub type LPNEWTEXTMETRICA = *mut NEWTEXTMETRICA;
789 STRUCT!{struct NEWTEXTMETRICW {
790 tmHeight: LONG,
791 tmAscent: LONG,
792 tmDescent: LONG,
793 tmInternalLeading: LONG,
794 tmExternalLeading: LONG,
795 tmAveCharWidth: LONG,
796 tmMaxCharWidth: LONG,
797 tmWeight: LONG,
798 tmOverhang: LONG,
799 tmDigitizedAspectX: LONG,
800 tmDigitizedAspectY: LONG,
801 tmFirstChar: WCHAR,
802 tmLastChar: WCHAR,
803 tmDefaultChar: WCHAR,
804 tmBreakChar: WCHAR,
805 tmItalic: BYTE,
806 tmUnderlined: BYTE,
807 tmStruckOut: BYTE,
808 tmPitchAndFamily: BYTE,
809 tmCharSet: BYTE,
810 ntmFlags: DWORD,
811 ntmSizeEM: UINT,
812 ntmCellHeight: UINT,
813 ntmAvgWidth: UINT,
814 }}
815 pub type PNEWTEXTMETRICW = *mut NEWTEXTMETRICW;
816 pub type NPNEWTEXTMETRICW = *mut NEWTEXTMETRICW;
817 pub type LPNEWTEXTMETRICW = *mut NEWTEXTMETRICW;
818 STRUCT!{struct NEWTEXTMETRICEXA {
819 ntmTm: NEWTEXTMETRICA,
820 ntmFontSig: FONTSIGNATURE,
821 }}
822 STRUCT!{struct NEWTEXTMETRICEXW {
823 ntmTm: NEWTEXTMETRICW,
824 ntmFontSig: FONTSIGNATURE,
825 }}
826 STRUCT!{struct PELARRAY {
827 paXCount: LONG,
828 paYCount: LONG,
829 paXExt: LONG,
830 paYExt: LONG,
831 paRGBs: BYTE,
832 }}
833 pub type PPELARRAY = *mut PELARRAY;
834 pub type NPPELARRAY = *mut PELARRAY;
835 pub type LPPELARRAY = *mut PELARRAY;
836 STRUCT!{struct LOGBRUSH {
837 lbStyle: UINT,
838 lbColor: COLORREF,
839 lbHatch: ULONG_PTR,
840 }}
841 pub type PLOGBRUSH = *mut LOGBRUSH;
842 pub type NPLOGBRUSH = *mut LOGBRUSH;
843 pub type LPLOGBRUSH = *mut LOGBRUSH;
844 STRUCT!{struct LOGBRUSH32 {
845 lbStyle: UINT,
846 lbColor: COLORREF,
847 lbHatch: ULONG,
848 }}
849 pub type PLOGBRUSH32 = *mut LOGBRUSH32;
850 pub type NPLOGBRUSH32 = *mut LOGBRUSH32;
851 pub type LPLOGBRUSH32 = *mut LOGBRUSH32;
852 pub type PATTERN = LOGBRUSH;
853 pub type PPATTERN = *mut PATTERN;
854 pub type NPPATTERN = *mut PATTERN;
855 pub type LPPATTERN = *mut PATTERN;
856 STRUCT!{struct LOGPEN {
857 lopnStyle: UINT,
858 lopnWidth: POINT,
859 lopnColor: COLORREF,
860 }}
861 pub type PLOGPEN = *mut LOGPEN;
862 pub type NPLOGPEN = *mut LOGPEN;
863 pub type LPLOGPEN = *mut LOGPEN;
864 STRUCT!{struct EXTLOGPEN {
865 elpPenStyle: DWORD,
866 elpWidth: DWORD,
867 elpBrushStyle: UINT,
868 elpColor: COLORREF,
869 elpHatch: ULONG_PTR,
870 elpNumEntries: DWORD,
871 elpStyleEntry: [DWORD; 1],
872 }}
873 pub type PEXTLOGPEN = *mut EXTLOGPEN;
874 pub type NPEXTLOGPEN = *mut EXTLOGPEN;
875 pub type LPEXTLOGPEN = *mut EXTLOGPEN;
876 STRUCT!{struct EXTLOGPEN32 {
877 elpPenStyle: DWORD,
878 elpWidth: DWORD,
879 elpBrushStyle: UINT,
880 elpColor: COLORREF,
881 elpHatch: ULONG,
882 elpNumEntries: DWORD,
883 elpStyleEntry: [DWORD; 1],
884 }}
885 pub type PEXTLOGPEN32 = *mut EXTLOGPEN32;
886 pub type NPEXTLOGPEN32 = *mut EXTLOGPEN32;
887 pub type LPEXTLOGPEN32 = *mut EXTLOGPEN32;
888 STRUCT!{struct PALETTEENTRY {
889 peRed: BYTE,
890 peGreen: BYTE,
891 peBlue: BYTE,
892 peFlags: BYTE,
893 }}
894 pub type PPALETTEENTRY = *mut PALETTEENTRY;
895 pub type LPPALETTEENTRY = *mut PALETTEENTRY;
896 STRUCT!{struct LOGPALETTE {
897 palVersion: WORD,
898 palNumEntries: WORD,
899 palPalEntry: [PALETTEENTRY; 1],
900 }}
901 pub type PLOGPALETTE = *mut LOGPALETTE;
902 pub type NPLOGPALETTE = *mut LOGPALETTE;
903 pub type LPLOGPALETTE = *mut LOGPALETTE;
904 pub const LF_FACESIZE: usize = 32;
905 STRUCT!{struct LOGFONTA {
906 lfHeight: LONG,
907 lfWidth: LONG,
908 lfEscapement: LONG,
909 lfOrientation: LONG,
910 lfWeight: LONG,
911 lfItalic: BYTE,
912 lfUnderline: BYTE,
913 lfStrikeOut: BYTE,
914 lfCharSet: BYTE,
915 lfOutPrecision: BYTE,
916 lfClipPrecision: BYTE,
917 lfQuality: BYTE,
918 lfPitchAndFamily: BYTE,
919 lfFaceName: [CHAR; LF_FACESIZE],
920 }}
921 pub type PLOGFONTA = *mut LOGFONTA;
922 pub type NPLOGFONTA = *mut LOGFONTA;
923 pub type LPLOGFONTA = *mut LOGFONTA;
924 STRUCT!{struct LOGFONTW {
925 lfHeight: LONG,
926 lfWidth: LONG,
927 lfEscapement: LONG,
928 lfOrientation: LONG,
929 lfWeight: LONG,
930 lfItalic: BYTE,
931 lfUnderline: BYTE,
932 lfStrikeOut: BYTE,
933 lfCharSet: BYTE,
934 lfOutPrecision: BYTE,
935 lfClipPrecision: BYTE,
936 lfQuality: BYTE,
937 lfPitchAndFamily: BYTE,
938 lfFaceName: [WCHAR; LF_FACESIZE],
939 }}
940 pub type PLOGFONTW = *mut LOGFONTW;
941 pub type NPLOGFONTW = *mut LOGFONTW;
942 pub type LPLOGFONTW = *mut LOGFONTW;
943 pub const LF_FULLFACESIZE: usize = 64;
944 STRUCT!{struct ENUMLOGFONTA {
945 elfLogFont: LOGFONTA,
946 elfFullName: [BYTE; LF_FULLFACESIZE],
947 elfStyle: [BYTE; LF_FACESIZE],
948 }}
949 pub type LPENUMLOGFONTA = *mut ENUMLOGFONTA;
950 STRUCT!{struct ENUMLOGFONTW {
951 elfLogFont: LOGFONTW,
952 elfFullName: [WCHAR; LF_FULLFACESIZE],
953 elfStyle: [WCHAR; LF_FACESIZE],
954 }}
955 pub type LPENUMLOGFONTW = *mut ENUMLOGFONTW;
956 STRUCT!{struct ENUMLOGFONTEXA {
957 elfLogFont: LOGFONTA,
958 elfFullName: [BYTE; LF_FULLFACESIZE],
959 elfStyle: [BYTE; LF_FACESIZE],
960 elfScript: [BYTE; LF_FACESIZE],
961 }}
962 pub type LPENUMLOGFONTEXA = *mut ENUMLOGFONTEXA;
963 STRUCT!{struct ENUMLOGFONTEXW {
964 elfLogFont: LOGFONTW,
965 elfFullName: [WCHAR; LF_FULLFACESIZE],
966 elfStyle: [WCHAR; LF_FACESIZE],
967 elfScript: [WCHAR; LF_FACESIZE],
968 }}
969 pub type LPENUMLOGFONTEXW = *mut ENUMLOGFONTEXW;
970 pub const OUT_DEFAULT_PRECIS: DWORD = 0;
971 pub const OUT_STRING_PRECIS: DWORD = 1;
972 pub const OUT_CHARACTER_PRECIS: DWORD = 2;
973 pub const OUT_STROKE_PRECIS: DWORD = 3;
974 pub const OUT_TT_PRECIS: DWORD = 4;
975 pub const OUT_DEVICE_PRECIS: DWORD = 5;
976 pub const OUT_RASTER_PRECIS: DWORD = 6;
977 pub const OUT_TT_ONLY_PRECIS: DWORD = 7;
978 pub const OUT_OUTLINE_PRECIS: DWORD = 8;
979 pub const OUT_SCREEN_OUTLINE_PRECIS: DWORD = 9;
980 pub const OUT_PS_ONLY_PRECIS: DWORD = 10;
981 pub const CLIP_DEFAULT_PRECIS: DWORD = 0;
982 pub const CLIP_CHARACTER_PRECIS: DWORD = 1;
983 pub const CLIP_STROKE_PRECIS: DWORD = 2;
984 pub const CLIP_MASK: DWORD = 0xf;
985 pub const CLIP_LH_ANGLES: DWORD = 1 << 4;
986 pub const CLIP_TT_ALWAYS: DWORD = 2 << 4;
987 pub const CLIP_DFA_DISABLE: DWORD = 4 << 4;
988 pub const CLIP_EMBEDDED: DWORD = 8 << 4;
989 pub const DEFAULT_QUALITY: DWORD = 0;
990 pub const DRAFT_QUALITY: DWORD = 1;
991 pub const PROOF_QUALITY: DWORD = 2;
992 pub const NONANTIALIASED_QUALITY: DWORD = 3;
993 pub const ANTIALIASED_QUALITY: DWORD = 4;
994 pub const CLEARTYPE_QUALITY: DWORD = 5;
995 pub const CLEARTYPE_NATURAL_QUALITY: DWORD = 6;
996 pub const DEFAULT_PITCH: DWORD = 0;
997 pub const FIXED_PITCH: DWORD = 1;
998 pub const VARIABLE_PITCH: DWORD = 2;
999 pub const MONO_FONT: DWORD = 8;
1000 pub const ANSI_CHARSET: DWORD = 0;
1001 pub const DEFAULT_CHARSET: DWORD = 1;
1002 pub const SYMBOL_CHARSET: DWORD = 2;
1003 pub const SHIFTJIS_CHARSET: DWORD = 128;
1004 pub const HANGEUL_CHARSET: DWORD = 129;
1005 pub const HANGUL_CHARSET: DWORD = 129;
1006 pub const GB2312_CHARSET: DWORD = 134;
1007 pub const CHINESEBIG5_CHARSET: DWORD = 136;
1008 pub const OEM_CHARSET: DWORD = 255;
1009 pub const JOHAB_CHARSET: DWORD = 130;
1010 pub const HEBREW_CHARSET: DWORD = 177;
1011 pub const ARABIC_CHARSET: DWORD = 178;
1012 pub const GREEK_CHARSET: DWORD = 161;
1013 pub const TURKISH_CHARSET: DWORD = 162;
1014 pub const VIETNAMESE_CHARSET: DWORD = 163;
1015 pub const THAI_CHARSET: DWORD = 222;
1016 pub const EASTEUROPE_CHARSET: DWORD = 238;
1017 pub const RUSSIAN_CHARSET: DWORD = 204;
1018 pub const MAC_CHARSET: DWORD = 77;
1019 pub const BALTIC_CHARSET: DWORD = 186;
1020 pub const FS_LATIN1: DWORD = 0x00000001;
1021 pub const FS_LATIN2: DWORD = 0x00000002;
1022 pub const FS_CYRILLIC: DWORD = 0x00000004;
1023 pub const FS_GREEK: DWORD = 0x00000008;
1024 pub const FS_TURKISH: DWORD = 0x00000010;
1025 pub const FS_HEBREW: DWORD = 0x00000020;
1026 pub const FS_ARABIC: DWORD = 0x00000040;
1027 pub const FS_BALTIC: DWORD = 0x00000080;
1028 pub const FS_VIETNAMESE: DWORD = 0x00000100;
1029 pub const FS_THAI: DWORD = 0x00010000;
1030 pub const FS_JISJAPAN: DWORD = 0x00020000;
1031 pub const FS_CHINESESIMP: DWORD = 0x00040000;
1032 pub const FS_WANSUNG: DWORD = 0x00080000;
1033 pub const FS_CHINESETRAD: DWORD = 0x00100000;
1034 pub const FS_JOHAB: DWORD = 0x00200000;
1035 pub const FS_SYMBOL: DWORD = 0x80000000;
1036 pub const FF_DONTCARE: DWORD = 0 << 4;
1037 pub const FF_ROMAN: DWORD = 1 << 4;
1038 pub const FF_SWISS: DWORD = 2 << 4;
1039 pub const FF_MODERN: DWORD = 3 << 4;
1040 pub const FF_SCRIPT: DWORD = 4 << 4;
1041 pub const FF_DECORATIVE: DWORD = 5 << 4;
1042 pub const FW_DONTCARE: c_int = 0;
1043 pub const FW_THIN: c_int = 100;
1044 pub const FW_EXTRALIGHT: c_int = 200;
1045 pub const FW_LIGHT: c_int = 300;
1046 pub const FW_NORMAL: c_int = 400;
1047 pub const FW_MEDIUM: c_int = 500;
1048 pub const FW_SEMIBOLD: c_int = 600;
1049 pub const FW_BOLD: c_int = 700;
1050 pub const FW_EXTRABOLD: c_int = 800;
1051 pub const FW_HEAVY: c_int = 900;
1052 pub const FW_ULTRALIGHT: c_int = FW_EXTRALIGHT;
1053 pub const FW_REGULAR: c_int = FW_NORMAL;
1054 pub const FW_DEMIBOLD: c_int = FW_SEMIBOLD;
1055 pub const FW_ULTRABOLD: c_int = FW_EXTRABOLD;
1056 pub const FW_BLACK: c_int = FW_HEAVY;
1057 pub const PANOSE_COUNT: DWORD = 10;
1058 pub const PAN_FAMILYTYPE_INDEX: DWORD = 0;
1059 pub const PAN_SERIFSTYLE_INDEX: DWORD = 1;
1060 pub const PAN_WEIGHT_INDEX: DWORD = 2;
1061 pub const PAN_PROPORTION_INDEX: DWORD = 3;
1062 pub const PAN_CONTRAST_INDEX: DWORD = 4;
1063 pub const PAN_STROKEVARIATION_INDEX: DWORD = 5;
1064 pub const PAN_ARMSTYLE_INDEX: DWORD = 6;
1065 pub const PAN_LETTERFORM_INDEX: DWORD = 7;
1066 pub const PAN_MIDLINE_INDEX: DWORD = 8;
1067 pub const PAN_XHEIGHT_INDEX: DWORD = 9;
1068 pub const PAN_CULTURE_LATIN: DWORD = 0;
1069 STRUCT!{struct PANOSE {
1070 bFamilyType: BYTE,
1071 bSerifStyle: BYTE,
1072 bWeight: BYTE,
1073 bProportion: BYTE,
1074 bContrast: BYTE,
1075 bStrokeVariation: BYTE,
1076 bArmStyle: BYTE,
1077 bLetterform: BYTE,
1078 bMidline: BYTE,
1079 bXHeight: BYTE,
1080 }}
1081 pub type LPPANOSE = *mut PANOSE;
1082 pub const PAN_ANY: BYTE = 0;
1083 pub const PAN_NO_FIT: BYTE = 1;
1084 pub const PAN_FAMILY_TEXT_DISPLAY: BYTE = 2;
1085 pub const PAN_FAMILY_SCRIPT: BYTE = 3;
1086 pub const PAN_FAMILY_DECORATIVE: BYTE = 4;
1087 pub const PAN_FAMILY_PICTORIAL: BYTE = 5;
1088 pub const PAN_SERIF_COVE: BYTE = 2;
1089 pub const PAN_SERIF_OBTUSE_COVE: BYTE = 3;
1090 pub const PAN_SERIF_SQUARE_COVE: BYTE = 4;
1091 pub const PAN_SERIF_OBTUSE_SQUARE_COVE: BYTE = 5;
1092 pub const PAN_SERIF_SQUARE: BYTE = 6;
1093 pub const PAN_SERIF_THIN: BYTE = 7;
1094 pub const PAN_SERIF_BONE: BYTE = 8;
1095 pub const PAN_SERIF_EXAGGERATED: BYTE = 9;
1096 pub const PAN_SERIF_TRIANGLE: BYTE = 10;
1097 pub const PAN_SERIF_NORMAL_SANS: BYTE = 11;
1098 pub const PAN_SERIF_OBTUSE_SANS: BYTE = 12;
1099 pub const PAN_SERIF_PERP_SANS: BYTE = 13;
1100 pub const PAN_SERIF_FLARED: BYTE = 14;
1101 pub const PAN_SERIF_ROUNDED: BYTE = 15;
1102 pub const PAN_WEIGHT_VERY_LIGHT: BYTE = 2;
1103 pub const PAN_WEIGHT_LIGHT: BYTE = 3;
1104 pub const PAN_WEIGHT_THIN: BYTE = 4;
1105 pub const PAN_WEIGHT_BOOK: BYTE = 5;
1106 pub const PAN_WEIGHT_MEDIUM: BYTE = 6;
1107 pub const PAN_WEIGHT_DEMI: BYTE = 7;
1108 pub const PAN_WEIGHT_BOLD: BYTE = 8;
1109 pub const PAN_WEIGHT_HEAVY: BYTE = 9;
1110 pub const PAN_WEIGHT_BLACK: BYTE = 10;
1111 pub const PAN_WEIGHT_NORD: BYTE = 11;
1112 pub const PAN_PROP_OLD_STYLE: BYTE = 2;
1113 pub const PAN_PROP_MODERN: BYTE = 3;
1114 pub const PAN_PROP_EVEN_WIDTH: BYTE = 4;
1115 pub const PAN_PROP_EXPANDED: BYTE = 5;
1116 pub const PAN_PROP_CONDENSED: BYTE = 6;
1117 pub const PAN_PROP_VERY_EXPANDED: BYTE = 7;
1118 pub const PAN_PROP_VERY_CONDENSED: BYTE = 8;
1119 pub const PAN_PROP_MONOSPACED: BYTE = 9;
1120 pub const PAN_CONTRAST_NONE: BYTE = 2;
1121 pub const PAN_CONTRAST_VERY_LOW: BYTE = 3;
1122 pub const PAN_CONTRAST_LOW: BYTE = 4;
1123 pub const PAN_CONTRAST_MEDIUM_LOW: BYTE = 5;
1124 pub const PAN_CONTRAST_MEDIUM: BYTE = 6;
1125 pub const PAN_CONTRAST_MEDIUM_HIGH: BYTE = 7;
1126 pub const PAN_CONTRAST_HIGH: BYTE = 8;
1127 pub const PAN_CONTRAST_VERY_HIGH: BYTE = 9;
1128 pub const PAN_STROKE_GRADUAL_DIAG: BYTE = 2;
1129 pub const PAN_STROKE_GRADUAL_TRAN: BYTE = 3;
1130 pub const PAN_STROKE_GRADUAL_VERT: BYTE = 4;
1131 pub const PAN_STROKE_GRADUAL_HORZ: BYTE = 5;
1132 pub const PAN_STROKE_RAPID_VERT: BYTE = 6;
1133 pub const PAN_STROKE_RAPID_HORZ: BYTE = 7;
1134 pub const PAN_STROKE_INSTANT_VERT: BYTE = 8;
1135 pub const PAN_STRAIGHT_ARMS_HORZ: BYTE = 2;
1136 pub const PAN_STRAIGHT_ARMS_WEDGE: BYTE = 3;
1137 pub const PAN_STRAIGHT_ARMS_VERT: BYTE = 4;
1138 pub const PAN_STRAIGHT_ARMS_SINGLE_SERIF: BYTE = 5;
1139 pub const PAN_STRAIGHT_ARMS_DOUBLE_SERIF: BYTE = 6;
1140 pub const PAN_BENT_ARMS_HORZ: BYTE = 7;
1141 pub const PAN_BENT_ARMS_WEDGE: BYTE = 8;
1142 pub const PAN_BENT_ARMS_VERT: BYTE = 9;
1143 pub const PAN_BENT_ARMS_SINGLE_SERIF: BYTE = 10;
1144 pub const PAN_BENT_ARMS_DOUBLE_SERIF: BYTE = 11;
1145 pub const PAN_LETT_NORMAL_CONTACT: BYTE = 2;
1146 pub const PAN_LETT_NORMAL_WEIGHTED: BYTE = 3;
1147 pub const PAN_LETT_NORMAL_BOXED: BYTE = 4;
1148 pub const PAN_LETT_NORMAL_FLATTENED: BYTE = 5;
1149 pub const PAN_LETT_NORMAL_ROUNDED: BYTE = 6;
1150 pub const PAN_LETT_NORMAL_OFF_CENTER: BYTE = 7;
1151 pub const PAN_LETT_NORMAL_SQUARE: BYTE = 8;
1152 pub const PAN_LETT_OBLIQUE_CONTACT: BYTE = 9;
1153 pub const PAN_LETT_OBLIQUE_WEIGHTED: BYTE = 10;
1154 pub const PAN_LETT_OBLIQUE_BOXED: BYTE = 11;
1155 pub const PAN_LETT_OBLIQUE_FLATTENED: BYTE = 12;
1156 pub const PAN_LETT_OBLIQUE_ROUNDED: BYTE = 13;
1157 pub const PAN_LETT_OBLIQUE_OFF_CENTER: BYTE = 14;
1158 pub const PAN_LETT_OBLIQUE_SQUARE: BYTE = 15;
1159 pub const PAN_MIDLINE_STANDARD_TRIMMED: BYTE = 2;
1160 pub const PAN_MIDLINE_STANDARD_POINTED: BYTE = 3;
1161 pub const PAN_MIDLINE_STANDARD_SERIFED: BYTE = 4;
1162 pub const PAN_MIDLINE_HIGH_TRIMMED: BYTE = 5;
1163 pub const PAN_MIDLINE_HIGH_POINTED: BYTE = 6;
1164 pub const PAN_MIDLINE_HIGH_SERIFED: BYTE = 7;
1165 pub const PAN_MIDLINE_CONSTANT_TRIMMED: BYTE = 8;
1166 pub const PAN_MIDLINE_CONSTANT_POINTED: BYTE = 9;
1167 pub const PAN_MIDLINE_CONSTANT_SERIFED: BYTE = 10;
1168 pub const PAN_MIDLINE_LOW_TRIMMED: BYTE = 11;
1169 pub const PAN_MIDLINE_LOW_POINTED: BYTE = 12;
1170 pub const PAN_MIDLINE_LOW_SERIFED: BYTE = 13;
1171 pub const PAN_XHEIGHT_CONSTANT_SMALL: BYTE = 2;
1172 pub const PAN_XHEIGHT_CONSTANT_STD: BYTE = 3;
1173 pub const PAN_XHEIGHT_CONSTANT_LARGE: BYTE = 4;
1174 pub const PAN_XHEIGHT_DUCKING_SMALL: BYTE = 5;
1175 pub const PAN_XHEIGHT_DUCKING_STD: BYTE = 6;
1176 pub const PAN_XHEIGHT_DUCKING_LARGE: BYTE = 7;
1177 pub const ELF_VENDOR_SIZE: usize = 4;
1178 STRUCT!{struct EXTLOGFONTA {
1179 elfLogFont: LOGFONTA,
1180 elfFullName: [BYTE; LF_FULLFACESIZE],
1181 elfStyle: [BYTE; LF_FACESIZE],
1182 elfVersion: DWORD,
1183 elfStyleSize: DWORD,
1184 elfMatch: DWORD,
1185 elfReserved: DWORD,
1186 elfVendorId: [BYTE; ELF_VENDOR_SIZE],
1187 elfCulture: DWORD,
1188 elfPanose: PANOSE,
1189 }}
1190 pub type PEXTLOGFONTA = *mut EXTLOGFONTA;
1191 pub type NPEXTLOGFONTA = *mut EXTLOGFONTA;
1192 pub type LPEXTLOGFONTA = *mut EXTLOGFONTA;
1193 STRUCT!{struct EXTLOGFONTW {
1194 elfLogFont: LOGFONTW,
1195 elfFullNam: [WCHAR; LF_FULLFACESIZE],
1196 elfStyle: [WCHAR; LF_FACESIZE],
1197 elfVersion: DWORD,
1198 elfStyleSize: DWORD,
1199 elfMatch: DWORD,
1200 elfReserved: DWORD,
1201 elfVendorId: [BYTE; ELF_VENDOR_SIZE],
1202 elfCulture: DWORD,
1203 elfPanose: PANOSE,
1204 }}
1205 pub type PEXTLOGFONTW = *mut EXTLOGFONTW;
1206 pub type NPEXTLOGFONTW = *mut EXTLOGFONTW;
1207 pub type LPEXTLOGFONTW = *mut EXTLOGFONTW;
1208 pub const ELF_VERSION: DWORD = 0;
1209 pub const ELF_CULTURE_LATIN: DWORD = 0;
1210 pub const RASTER_FONTTYPE: DWORD = 0x0001;
1211 pub const DEVICE_FONTTYPE: DWORD = 0x0002;
1212 pub const TRUETYPE_FONTTYPE: DWORD = 0x0004;
1213 #[inline]
RGB(r: BYTE, g: BYTE, b: BYTE) -> COLORREF1214 pub fn RGB(r: BYTE, g: BYTE, b: BYTE) -> COLORREF {
1215 r as COLORREF | ((g as COLORREF) << 8) | ((b as COLORREF) << 16)
1216 }
1217 #[inline]
PALETTERGB(r: BYTE, g: BYTE, b: BYTE) -> COLORREF1218 pub fn PALETTERGB(r: BYTE, g: BYTE, b: BYTE) -> COLORREF {
1219 0x02000000 | RGB(r, g, b)
1220 }
1221 #[inline]
PALETTEINDEX(i: WORD) -> COLORREF1222 pub fn PALETTEINDEX(i: WORD) -> COLORREF {
1223 0x01000000 | i as DWORD
1224 }
1225 pub const PC_RESERVED: DWORD = 0x01;
1226 pub const PC_EXPLICIT: DWORD = 0x02;
1227 pub const PC_NOCOLLAPSE: DWORD = 0x04;
1228 #[inline]
GetRValue(rgb: COLORREF) -> BYTE1229 pub fn GetRValue(rgb: COLORREF) -> BYTE {
1230 LOBYTE(rgb as WORD)
1231 }
1232 #[inline]
GetGValue(rgb: COLORREF) -> BYTE1233 pub fn GetGValue(rgb: COLORREF) -> BYTE {
1234 LOBYTE((rgb as WORD) >> 8)
1235 }
1236 #[inline]
GetBValue(rgb: COLORREF) -> BYTE1237 pub fn GetBValue(rgb: COLORREF) -> BYTE {
1238 LOBYTE((rgb >> 16) as WORD)
1239 }
1240 pub const TRANSPARENT: DWORD = 1;
1241 pub const OPAQUE: DWORD = 2;
1242 pub const BKMODE_LAST: DWORD = 2;
1243 pub const GM_COMPATIBLE: DWORD = 1;
1244 pub const GM_ADVANCED: DWORD = 2;
1245 pub const GM_LAST: DWORD = 2;
1246 pub const PT_CLOSEFIGURE: DWORD = 0x01;
1247 pub const PT_LINETO: DWORD = 0x02;
1248 pub const PT_BEZIERTO: DWORD = 0x04;
1249 pub const PT_MOVETO: DWORD = 0x06;
1250 pub const MM_TEXT: DWORD = 1;
1251 pub const MM_LOMETRIC: DWORD = 2;
1252 pub const MM_HIMETRIC: DWORD = 3;
1253 pub const MM_LOENGLISH: DWORD = 4;
1254 pub const MM_HIENGLISH: DWORD = 5;
1255 pub const MM_TWIPS: DWORD = 6;
1256 pub const MM_ISOTROPIC: DWORD = 7;
1257 pub const MM_ANISOTROPIC: DWORD = 8;
1258 pub const MM_MIN: DWORD = MM_TEXT;
1259 pub const MM_MAX: DWORD = MM_ANISOTROPIC;
1260 pub const MM_MAX_FIXEDSCALE: DWORD = MM_TWIPS;
1261 pub const ABSOLUTE: DWORD = 1;
1262 pub const RELATIVE: DWORD = 2;
1263 pub const WHITE_BRUSH: DWORD = 0;
1264 pub const LTGRAY_BRUSH: DWORD = 1;
1265 pub const GRAY_BRUSH: DWORD = 2;
1266 pub const DKGRAY_BRUSH: DWORD = 3;
1267 pub const BLACK_BRUSH: DWORD = 4;
1268 pub const NULL_BRUSH: DWORD = 5;
1269 pub const HOLLOW_BRUSH: DWORD = NULL_BRUSH;
1270 pub const WHITE_PEN: DWORD = 6;
1271 pub const BLACK_PEN: DWORD = 7;
1272 pub const NULL_PEN: DWORD = 8;
1273 pub const OEM_FIXED_FONT: DWORD = 10;
1274 pub const ANSI_FIXED_FONT: DWORD = 11;
1275 pub const ANSI_VAR_FONT: DWORD = 12;
1276 pub const SYSTEM_FONT: DWORD = 13;
1277 pub const DEVICE_DEFAULT_FONT: DWORD = 14;
1278 pub const DEFAULT_PALETTE: DWORD = 15;
1279 pub const SYSTEM_FIXED_FONT: DWORD = 16;
1280 pub const DEFAULT_GUI_FONT: DWORD = 17;
1281 pub const DC_BRUSH: DWORD = 18;
1282 pub const DC_PEN: DWORD = 19;
1283 pub const STOCK_LAST: DWORD = 19;
1284 pub const CLR_INVALID: COLORREF = 0xFFFFFFFF;
1285 pub const BS_SOLID: DWORD = 0;
1286 pub const BS_NULL: DWORD = 1;
1287 pub const BS_HOLLOW: DWORD = BS_NULL;
1288 pub const BS_HATCHED: DWORD = 2;
1289 pub const BS_PATTERN: DWORD = 3;
1290 pub const BS_INDEXED: DWORD = 4;
1291 pub const BS_DIBPATTERN: DWORD = 5;
1292 pub const BS_DIBPATTERNPT: DWORD = 6;
1293 pub const BS_PATTERN8X8: DWORD = 7;
1294 pub const BS_DIBPATTERN8X8: DWORD = 8;
1295 pub const BS_MONOPATTERN: DWORD = 9;
1296 pub const HS_HORIZONTAL: DWORD = 0;
1297 pub const HS_VERTICAL: DWORD = 1;
1298 pub const HS_FDIAGONAL: DWORD = 2;
1299 pub const HS_BDIAGONAL: DWORD = 3;
1300 pub const HS_CROSS: DWORD = 4;
1301 pub const HS_DIAGCROSS: DWORD = 5;
1302 pub const HS_API_MAX: DWORD = 12;
1303 pub const PS_SOLID: DWORD = 0;
1304 pub const PS_DASH: DWORD = 1;
1305 pub const PS_DOT: DWORD = 2;
1306 pub const PS_DASHDOT: DWORD = 3;
1307 pub const PS_DASHDOTDOT: DWORD = 4;
1308 pub const PS_NULL: DWORD = 5;
1309 pub const PS_INSIDEFRAME: DWORD = 6;
1310 pub const PS_USERSTYLE: DWORD = 7;
1311 pub const PS_ALTERNATE: DWORD = 8;
1312 pub const PS_STYLE_MASK: DWORD = 0x0000000F;
1313 pub const PS_ENDCAP_ROUND: DWORD = 0x00000000;
1314 pub const PS_ENDCAP_SQUARE: DWORD = 0x00000100;
1315 pub const PS_ENDCAP_FLAT: DWORD = 0x00000200;
1316 pub const PS_ENDCAP_MASK: DWORD = 0x00000F00;
1317 pub const PS_JOIN_ROUND: DWORD = 0x00000000;
1318 pub const PS_JOIN_BEVEL: DWORD = 0x00001000;
1319 pub const PS_JOIN_MITER: DWORD = 0x00002000;
1320 pub const PS_JOIN_MASK: DWORD = 0x0000F000;
1321 pub const PS_COSMETIC: DWORD = 0x00000000;
1322 pub const PS_GEOMETRIC: DWORD = 0x00010000;
1323 pub const PS_TYPE_MASK: DWORD = 0x000F0000;
1324 pub const AD_COUNTERCLOCKWISE: DWORD = 1;
1325 pub const AD_CLOCKWISE: DWORD = 2;
1326 pub const DRIVERVERSION: c_int = 0;
1327 pub const TECHNOLOGY: c_int = 2;
1328 pub const HORZSIZE: c_int = 4;
1329 pub const VERTSIZE: c_int = 6;
1330 pub const HORZRES: c_int = 8;
1331 pub const VERTRES: c_int = 10;
1332 pub const BITSPIXEL: c_int = 12;
1333 pub const PLANES: c_int = 14;
1334 pub const NUMBRUSHES: c_int = 16;
1335 pub const NUMPENS: c_int = 18;
1336 pub const NUMMARKERS: c_int = 20;
1337 pub const NUMFONTS: c_int = 22;
1338 pub const NUMCOLORS: c_int = 24;
1339 pub const PDEVICESIZE: c_int = 26;
1340 pub const CURVECAPS: c_int = 28;
1341 pub const LINECAPS: c_int = 30;
1342 pub const POLYGONALCAPS: c_int = 32;
1343 pub const TEXTCAPS: c_int = 34;
1344 pub const CLIPCAPS: c_int = 36;
1345 pub const RASTERCAPS: c_int = 38;
1346 pub const ASPECTX: c_int = 40;
1347 pub const ASPECTY: c_int = 42;
1348 pub const ASPECTXY: c_int = 44;
1349 pub const LOGPIXELSX: c_int = 88;
1350 pub const LOGPIXELSY: c_int = 90;
1351 pub const SIZEPALETTE: c_int = 104;
1352 pub const NUMRESERVED: c_int = 106;
1353 pub const COLORRES: c_int = 108;
1354 pub const PHYSICALWIDTH: c_int = 110;
1355 pub const PHYSICALHEIGHT: c_int = 111;
1356 pub const PHYSICALOFFSETX: c_int = 112;
1357 pub const PHYSICALOFFSETY: c_int = 113;
1358 pub const SCALINGFACTORX: c_int = 114;
1359 pub const SCALINGFACTORY: c_int = 115;
1360 pub const VREFRESH: c_int = 116;
1361 pub const DESKTOPVERTRES: c_int = 117;
1362 pub const DESKTOPHORZRES: c_int = 118;
1363 pub const BLTALIGNMENT: c_int = 119;
1364 pub const SHADEBLENDCAPS: c_int = 120;
1365 pub const COLORMGMTCAPS: c_int = 121;
1366 pub const DT_PLOTTER: DWORD = 0;
1367 pub const DT_RASDISPLAY: DWORD = 1;
1368 pub const DT_RASPRINTER: DWORD = 2;
1369 pub const DT_RASCAMERA: DWORD = 3;
1370 pub const DT_CHARSTREAM: DWORD = 4;
1371 pub const DT_METAFILE: DWORD = 5;
1372 pub const DT_DISPFILE: DWORD = 6;
1373 pub const CC_NONE: DWORD = 0;
1374 pub const CC_CIRCLES: DWORD = 1;
1375 pub const CC_PIE: DWORD = 2;
1376 pub const CC_CHORD: DWORD = 4;
1377 pub const CC_ELLIPSES: DWORD = 8;
1378 pub const CC_WIDE: DWORD = 16;
1379 pub const CC_STYLED: DWORD = 32;
1380 pub const CC_WIDESTYLED: DWORD = 64;
1381 pub const CC_INTERIORS: DWORD = 128;
1382 pub const CC_ROUNDRECT: DWORD = 256;
1383 pub const LC_NONE: DWORD = 0;
1384 pub const LC_POLYLINE: DWORD = 2;
1385 pub const LC_MARKER: DWORD = 4;
1386 pub const LC_POLYMARKER: DWORD = 8;
1387 pub const LC_WIDE: DWORD = 16;
1388 pub const LC_STYLED: DWORD = 32;
1389 pub const LC_WIDESTYLED: DWORD = 64;
1390 pub const LC_INTERIORS: DWORD = 128;
1391 pub const PC_NONE: DWORD = 0;
1392 pub const PC_POLYGON: DWORD = 1;
1393 pub const PC_RECTANGLE: DWORD = 2;
1394 pub const PC_WINDPOLYGON: DWORD = 4;
1395 pub const PC_TRAPEZOID: DWORD = 4;
1396 pub const PC_SCANLINE: DWORD = 8;
1397 pub const PC_WIDE: DWORD = 16;
1398 pub const PC_STYLED: DWORD = 32;
1399 pub const PC_WIDESTYLED: DWORD = 64;
1400 pub const PC_INTERIORS: DWORD = 128;
1401 pub const PC_POLYPOLYGON: DWORD = 256;
1402 pub const PC_PATHS: DWORD = 512;
1403 pub const CP_NONE: DWORD = 0;
1404 pub const CP_RECTANGLE: DWORD = 1;
1405 pub const CP_REGION: DWORD = 2;
1406 pub const TC_OP_CHARACTER: DWORD = 0x00000001;
1407 pub const TC_OP_STROKE: DWORD = 0x00000002;
1408 pub const TC_CP_STROKE: DWORD = 0x00000004;
1409 pub const TC_CR_90: DWORD = 0x00000008;
1410 pub const TC_CR_ANY: DWORD = 0x00000010;
1411 pub const TC_SF_X_YINDEP: DWORD = 0x00000020;
1412 pub const TC_SA_DOUBLE: DWORD = 0x00000040;
1413 pub const TC_SA_INTEGER: DWORD = 0x00000080;
1414 pub const TC_SA_CONTIN: DWORD = 0x00000100;
1415 pub const TC_EA_DOUBLE: DWORD = 0x00000200;
1416 pub const TC_IA_ABLE: DWORD = 0x00000400;
1417 pub const TC_UA_ABLE: DWORD = 0x00000800;
1418 pub const TC_SO_ABLE: DWORD = 0x00001000;
1419 pub const TC_RA_ABLE: DWORD = 0x00002000;
1420 pub const TC_VA_ABLE: DWORD = 0x00004000;
1421 pub const TC_RESERVED: DWORD = 0x00008000;
1422 pub const TC_SCROLLBLT: DWORD = 0x00010000;
1423 pub const RC_BITBLT: DWORD = 1;
1424 pub const RC_BANDING: DWORD = 2;
1425 pub const RC_SCALING: DWORD = 4;
1426 pub const RC_BITMAP64: DWORD = 8;
1427 pub const RC_GDI20_OUTPUT: DWORD = 0x0010;
1428 pub const RC_GDI20_STATE: DWORD = 0x0020;
1429 pub const RC_SAVEBITMAP: DWORD = 0x0040;
1430 pub const RC_DI_BITMAP: DWORD = 0x0080;
1431 pub const RC_PALETTE: DWORD = 0x0100;
1432 pub const RC_DIBTODEV: DWORD = 0x0200;
1433 pub const RC_BIGFONT: DWORD = 0x0400;
1434 pub const RC_STRETCHBLT: DWORD = 0x0800;
1435 pub const RC_FLOODFILL: DWORD = 0x1000;
1436 pub const RC_STRETCHDIB: DWORD = 0x2000;
1437 pub const RC_OP_DX_OUTPUT: DWORD = 0x4000;
1438 pub const RC_DEVBITS: DWORD = 0x8000;
1439 pub const SB_NONE: DWORD = 0x00000000;
1440 pub const SB_CONST_ALPHA: DWORD = 0x00000001;
1441 pub const SB_PIXEL_ALPHA: DWORD = 0x00000002;
1442 pub const SB_PREMULT_ALPHA: DWORD = 0x00000004;
1443 pub const SB_GRAD_RECT: DWORD = 0x00000010;
1444 pub const SB_GRAD_TRI: DWORD = 0x00000020;
1445 pub const CM_NONE: DWORD = 0x00000000;
1446 pub const CM_DEVICE_ICM: DWORD = 0x00000001;
1447 pub const CM_GAMMA_RAMP: DWORD = 0x00000002;
1448 pub const CM_CMYK_COLOR: DWORD = 0x00000004;
1449 pub const DIB_RGB_COLORS: DWORD = 0;
1450 pub const DIB_PAL_COLORS: DWORD = 1;
1451 pub const SYSPAL_ERROR: DWORD = 0;
1452 pub const SYSPAL_STATIC: DWORD = 1;
1453 pub const SYSPAL_NOSTATIC: DWORD = 2;
1454 pub const SYSPAL_NOSTATIC256: DWORD = 3;
1455 pub const CBM_INIT: DWORD = 0x04;
1456 pub const FLOODFILLBORDER: DWORD = 0;
1457 pub const FLOODFILLSURFACE: DWORD = 1;
1458 pub const CCHDEVICENAME: usize = 32;
1459 pub const CCHFORMNAME: usize = 32;
1460 STRUCT!{struct DEVMODE_u1_s1 {
1461 dmOrientation: c_short,
1462 dmPaperSize: c_short,
1463 dmPaperLength: c_short,
1464 dmPaperWidth: c_short,
1465 dmScale: c_short,
1466 dmCopies: c_short,
1467 dmDefaultSource: c_short,
1468 dmPrintQuality: c_short,
1469 }}
1470 STRUCT!{struct DEVMODE_u1_s2 {
1471 dmPosition: POINTL,
1472 dmDisplayOrientation: DWORD,
1473 dmDisplayFixedOutput: DWORD,
1474 }}
1475 UNION!{union DEVMODE_u1 {
1476 [u32; 4],
1477 s1 s1_mut: DEVMODE_u1_s1,
1478 s2 s2_mut: DEVMODE_u1_s2,
1479 }}
1480 UNION!{union DEVMODE_u2 {
1481 [u32; 1],
1482 dmDisplayFlags dmDisplayFlags_mut: DWORD,
1483 dmNup dmNup_mut: DWORD,
1484 }}
1485 STRUCT!{struct DEVMODEA {
1486 dmDeviceName: [CHAR; CCHDEVICENAME],
1487 dmSpecVersion: WORD,
1488 dmDriverVersion: WORD,
1489 dmSize: WORD,
1490 dmDriverExtra: WORD,
1491 dmFields: DWORD,
1492 u1: DEVMODE_u1,
1493 dmColor: c_short,
1494 dmDuplex: c_short,
1495 dmYResolution: c_short,
1496 dmTTOption: c_short,
1497 dmCollate: c_short,
1498 dmFormName: [CHAR; CCHFORMNAME],
1499 dmLogPixels: WORD,
1500 dmBitsPerPel: DWORD,
1501 dmPelsWidth: DWORD,
1502 dmPelsHeight: DWORD,
1503 u2: DEVMODE_u2,
1504 dmDisplayFrequency: DWORD,
1505 dmICMMethod: DWORD,
1506 dmICMIntent: DWORD,
1507 dmMediaType: DWORD,
1508 dmDitherType: DWORD,
1509 dmReserved1: DWORD,
1510 dmReserved2: DWORD,
1511 dmPanningWidth: DWORD,
1512 dmPanningHeight: DWORD,
1513 }}
1514 pub type PDEVMODEA = *mut DEVMODEA;
1515 pub type NPDEVMODEA = *mut DEVMODEA;
1516 pub type LPDEVMODEA = *mut DEVMODEA;
1517 STRUCT!{struct DEVMODEW {
1518 dmDeviceName: [WCHAR; CCHDEVICENAME],
1519 dmSpecVersion: WORD,
1520 dmDriverVersion: WORD,
1521 dmSize: WORD,
1522 dmDriverExtra: WORD,
1523 dmFields: DWORD,
1524 u1: DEVMODE_u1,
1525 dmColor: c_short,
1526 dmDuplex: c_short,
1527 dmYResolution: c_short,
1528 dmTTOption: c_short,
1529 dmCollate: c_short,
1530 dmFormName: [WCHAR; CCHFORMNAME],
1531 dmLogPixels: WORD,
1532 dmBitsPerPel: DWORD,
1533 dmPelsWidth: DWORD,
1534 dmPelsHeight: DWORD,
1535 u2: DEVMODE_u2,
1536 dmDisplayFrequency: DWORD,
1537 dmICMMethod: DWORD,
1538 dmICMIntent: DWORD,
1539 dmMediaType: DWORD,
1540 dmDitherType: DWORD,
1541 dmReserved1: DWORD,
1542 dmReserved2: DWORD,
1543 dmPanningWidth: DWORD,
1544 dmPanningHeight: DWORD,
1545 }}
1546 pub type PDEVMODEW = *mut DEVMODEW;
1547 pub type NPDEVMODEW = *mut DEVMODEW;
1548 pub type LPDEVMODEW = *mut DEVMODEW;
1549 pub const DM_SPECVERSION: DWORD = 0x0401;
1550 pub const DM_ORIENTATION: DWORD = 0x00000001;
1551 pub const DM_PAPERSIZE: DWORD = 0x00000002;
1552 pub const DM_PAPERLENGTH: DWORD = 0x00000004;
1553 pub const DM_PAPERWIDTH: DWORD = 0x00000008;
1554 pub const DM_SCALE: DWORD = 0x00000010;
1555 pub const DM_POSITION: DWORD = 0x00000020;
1556 pub const DM_NUP: DWORD = 0x00000040;
1557 pub const DM_DISPLAYORIENTATION: DWORD = 0x00000080;
1558 pub const DM_COPIES: DWORD = 0x00000100;
1559 pub const DM_DEFAULTSOURCE: DWORD = 0x00000200;
1560 pub const DM_PRINTQUALITY: DWORD = 0x00000400;
1561 pub const DM_COLOR: DWORD = 0x00000800;
1562 pub const DM_DUPLEX: DWORD = 0x00001000;
1563 pub const DM_YRESOLUTION: DWORD = 0x00002000;
1564 pub const DM_TTOPTION: DWORD = 0x00004000;
1565 pub const DM_COLLATE: DWORD = 0x00008000;
1566 pub const DM_FORMNAME: DWORD = 0x00010000;
1567 pub const DM_LOGPIXELS: DWORD = 0x00020000;
1568 pub const DM_BITSPERPEL: DWORD = 0x00040000;
1569 pub const DM_PELSWIDTH: DWORD = 0x00080000;
1570 pub const DM_PELSHEIGHT: DWORD = 0x00100000;
1571 pub const DM_DISPLAYFLAGS: DWORD = 0x00200000;
1572 pub const DM_DISPLAYFREQUENCY: DWORD = 0x00400000;
1573 pub const DM_ICMMETHOD: DWORD = 0x00800000;
1574 pub const DM_ICMINTENT: DWORD = 0x01000000;
1575 pub const DM_MEDIATYPE: DWORD = 0x02000000;
1576 pub const DM_DITHERTYPE: DWORD = 0x04000000;
1577 pub const DM_PANNINGWIDTH: DWORD = 0x08000000;
1578 pub const DM_PANNINGHEIGHT: DWORD = 0x10000000;
1579 pub const DM_DISPLAYFIXEDOUTPUT: DWORD = 0x20000000;
1580 pub const DMORIENT_PORTRAIT: DWORD = 1;
1581 pub const DMORIENT_LANDSCAPE: DWORD = 2;
1582 pub const DMPAPER_FIRST: DWORD = DMPAPER_LETTER;
1583 pub const DMPAPER_LETTER: DWORD = 1;
1584 pub const DMPAPER_LETTERSMALL: DWORD = 2;
1585 pub const DMPAPER_TABLOID: DWORD = 3;
1586 pub const DMPAPER_LEDGER: DWORD = 4;
1587 pub const DMPAPER_LEGAL: DWORD = 5;
1588 pub const DMPAPER_STATEMENT: DWORD = 6;
1589 pub const DMPAPER_EXECUTIVE: DWORD = 7;
1590 pub const DMPAPER_A3: DWORD = 8;
1591 pub const DMPAPER_A4: DWORD = 9;
1592 pub const DMPAPER_A4SMALL: DWORD = 10;
1593 pub const DMPAPER_A5: DWORD = 11;
1594 pub const DMPAPER_B4: DWORD = 12;
1595 pub const DMPAPER_B5: DWORD = 13;
1596 pub const DMPAPER_FOLIO: DWORD = 14;
1597 pub const DMPAPER_QUARTO: DWORD = 15;
1598 pub const DMPAPER_10X14: DWORD = 16;
1599 pub const DMPAPER_11X17: DWORD = 17;
1600 pub const DMPAPER_NOTE: DWORD = 18;
1601 pub const DMPAPER_ENV_9: DWORD = 19;
1602 pub const DMPAPER_ENV_10: DWORD = 20;
1603 pub const DMPAPER_ENV_11: DWORD = 21;
1604 pub const DMPAPER_ENV_12: DWORD = 22;
1605 pub const DMPAPER_ENV_14: DWORD = 23;
1606 pub const DMPAPER_CSHEET: DWORD = 24;
1607 pub const DMPAPER_DSHEET: DWORD = 25;
1608 pub const DMPAPER_ESHEET: DWORD = 26;
1609 pub const DMPAPER_ENV_DL: DWORD = 27;
1610 pub const DMPAPER_ENV_C5: DWORD = 28;
1611 pub const DMPAPER_ENV_C3: DWORD = 29;
1612 pub const DMPAPER_ENV_C4: DWORD = 30;
1613 pub const DMPAPER_ENV_C6: DWORD = 31;
1614 pub const DMPAPER_ENV_C65: DWORD = 32;
1615 pub const DMPAPER_ENV_B4: DWORD = 33;
1616 pub const DMPAPER_ENV_B5: DWORD = 34;
1617 pub const DMPAPER_ENV_B6: DWORD = 35;
1618 pub const DMPAPER_ENV_ITALY: DWORD = 36;
1619 pub const DMPAPER_ENV_MONARCH: DWORD = 37;
1620 pub const DMPAPER_ENV_PERSONAL: DWORD = 38;
1621 pub const DMPAPER_FANFOLD_US: DWORD = 39;
1622 pub const DMPAPER_FANFOLD_STD_GERMAN: DWORD = 40;
1623 pub const DMPAPER_FANFOLD_LGL_GERMAN: DWORD = 41;
1624 pub const DMPAPER_ISO_B4: DWORD = 42;
1625 pub const DMPAPER_JAPANESE_POSTCARD: DWORD = 43;
1626 pub const DMPAPER_9X11: DWORD = 44;
1627 pub const DMPAPER_10X11: DWORD = 45;
1628 pub const DMPAPER_15X11: DWORD = 46;
1629 pub const DMPAPER_ENV_INVITE: DWORD = 47;
1630 pub const DMPAPER_RESERVED_48: DWORD = 48;
1631 pub const DMPAPER_RESERVED_49: DWORD = 49;
1632 pub const DMPAPER_LETTER_EXTRA: DWORD = 50;
1633 pub const DMPAPER_LEGAL_EXTRA: DWORD = 51;
1634 pub const DMPAPER_TABLOID_EXTRA: DWORD = 52;
1635 pub const DMPAPER_A4_EXTRA: DWORD = 53;
1636 pub const DMPAPER_LETTER_TRANSVERSE: DWORD = 54;
1637 pub const DMPAPER_A4_TRANSVERSE: DWORD = 55;
1638 pub const DMPAPER_LETTER_EXTRA_TRANSVERSE: DWORD = 56;
1639 pub const DMPAPER_A_PLUS: DWORD = 57;
1640 pub const DMPAPER_B_PLUS: DWORD = 58;
1641 pub const DMPAPER_LETTER_PLUS: DWORD = 59;
1642 pub const DMPAPER_A4_PLUS: DWORD = 60;
1643 pub const DMPAPER_A5_TRANSVERSE: DWORD = 61;
1644 pub const DMPAPER_B5_TRANSVERSE: DWORD = 62;
1645 pub const DMPAPER_A3_EXTRA: DWORD = 63;
1646 pub const DMPAPER_A5_EXTRA: DWORD = 64;
1647 pub const DMPAPER_B5_EXTRA: DWORD = 65;
1648 pub const DMPAPER_A2: DWORD = 66;
1649 pub const DMPAPER_A3_TRANSVERSE: DWORD = 67;
1650 pub const DMPAPER_A3_EXTRA_TRANSVERSE: DWORD = 68;
1651 pub const DMPAPER_DBL_JAPANESE_POSTCARD: DWORD = 69;
1652 pub const DMPAPER_A6: DWORD = 70;
1653 pub const DMPAPER_JENV_KAKU2: DWORD = 71;
1654 pub const DMPAPER_JENV_KAKU3: DWORD = 72;
1655 pub const DMPAPER_JENV_CHOU3: DWORD = 73;
1656 pub const DMPAPER_JENV_CHOU4: DWORD = 74;
1657 pub const DMPAPER_LETTER_ROTATED: DWORD = 75;
1658 pub const DMPAPER_A3_ROTATED: DWORD = 76;
1659 pub const DMPAPER_A4_ROTATED: DWORD = 77;
1660 pub const DMPAPER_A5_ROTATED: DWORD = 78;
1661 pub const DMPAPER_B4_JIS_ROTATED: DWORD = 79;
1662 pub const DMPAPER_B5_JIS_ROTATED: DWORD = 80;
1663 pub const DMPAPER_JAPANESE_POSTCARD_ROTATED: DWORD = 81;
1664 pub const DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED: DWORD = 82;
1665 pub const DMPAPER_A6_ROTATED: DWORD = 83;
1666 pub const DMPAPER_JENV_KAKU2_ROTATED: DWORD = 84;
1667 pub const DMPAPER_JENV_KAKU3_ROTATED: DWORD = 85;
1668 pub const DMPAPER_JENV_CHOU3_ROTATED: DWORD = 86;
1669 pub const DMPAPER_JENV_CHOU4_ROTATED: DWORD = 87;
1670 pub const DMPAPER_B6_JIS: DWORD = 88;
1671 pub const DMPAPER_B6_JIS_ROTATED: DWORD = 89;
1672 pub const DMPAPER_12X11: DWORD = 90;
1673 pub const DMPAPER_JENV_YOU4: DWORD = 91;
1674 pub const DMPAPER_JENV_YOU4_ROTATED: DWORD = 92;
1675 pub const DMPAPER_P16K: DWORD = 93;
1676 pub const DMPAPER_P32K: DWORD = 94;
1677 pub const DMPAPER_P32KBIG: DWORD = 95;
1678 pub const DMPAPER_PENV_1: DWORD = 96;
1679 pub const DMPAPER_PENV_2: DWORD = 97;
1680 pub const DMPAPER_PENV_3: DWORD = 98;
1681 pub const DMPAPER_PENV_4: DWORD = 99;
1682 pub const DMPAPER_PENV_5: DWORD = 100;
1683 pub const DMPAPER_PENV_6: DWORD = 101;
1684 pub const DMPAPER_PENV_7: DWORD = 102;
1685 pub const DMPAPER_PENV_8: DWORD = 103;
1686 pub const DMPAPER_PENV_9: DWORD = 104;
1687 pub const DMPAPER_PENV_10: DWORD = 105;
1688 pub const DMPAPER_P16K_ROTATED: DWORD = 106;
1689 pub const DMPAPER_P32K_ROTATED: DWORD = 107;
1690 pub const DMPAPER_P32KBIG_ROTATED: DWORD = 108;
1691 pub const DMPAPER_PENV_1_ROTATED: DWORD = 109;
1692 pub const DMPAPER_PENV_2_ROTATED: DWORD = 110;
1693 pub const DMPAPER_PENV_3_ROTATED: DWORD = 111;
1694 pub const DMPAPER_PENV_4_ROTATED: DWORD = 112;
1695 pub const DMPAPER_PENV_5_ROTATED: DWORD = 113;
1696 pub const DMPAPER_PENV_6_ROTATED: DWORD = 114;
1697 pub const DMPAPER_PENV_7_ROTATED: DWORD = 115;
1698 pub const DMPAPER_PENV_8_ROTATED: DWORD = 116;
1699 pub const DMPAPER_PENV_9_ROTATED: DWORD = 117;
1700 pub const DMPAPER_PENV_10_ROTATED: DWORD = 118;
1701 pub const DMPAPER_LAST: DWORD = DMPAPER_PENV_10_ROTATED;
1702 pub const DMPAPER_USER: DWORD = 256;
1703 pub const DMBIN_FIRST: DWORD = DMBIN_UPPER;
1704 pub const DMBIN_UPPER: DWORD = 1;
1705 pub const DMBIN_ONLYONE: DWORD = 1;
1706 pub const DMBIN_LOWER: DWORD = 2;
1707 pub const DMBIN_MIDDLE: DWORD = 3;
1708 pub const DMBIN_MANUAL: DWORD = 4;
1709 pub const DMBIN_ENVELOPE: DWORD = 5;
1710 pub const DMBIN_ENVMANUAL: DWORD = 6;
1711 pub const DMBIN_AUTO: DWORD = 7;
1712 pub const DMBIN_TRACTOR: DWORD = 8;
1713 pub const DMBIN_SMALLFMT: DWORD = 9;
1714 pub const DMBIN_LARGEFMT: DWORD = 10;
1715 pub const DMBIN_LARGECAPACITY: DWORD = 11;
1716 pub const DMBIN_CASSETTE: DWORD = 14;
1717 pub const DMBIN_FORMSOURCE: DWORD = 15;
1718 pub const DMBIN_LAST: DWORD = DMBIN_FORMSOURCE;
1719 pub const DMBIN_USER: DWORD = 256;
1720 pub const DMRES_DRAFT: c_int = -1;
1721 pub const DMRES_LOW: c_int = -2;
1722 pub const DMRES_MEDIUM: c_int = -3;
1723 pub const DMRES_HIGH: c_int = -4;
1724 pub const DMCOLOR_MONOCHROME: DWORD = 1;
1725 pub const DMCOLOR_COLOR: DWORD = 2;
1726 pub const DMDUP_SIMPLEX: DWORD = 1;
1727 pub const DMDUP_VERTICAL: DWORD = 2;
1728 pub const DMDUP_HORIZONTAL: DWORD = 3;
1729 pub const DMTT_BITMAP: DWORD = 1;
1730 pub const DMTT_DOWNLOAD: DWORD = 2;
1731 pub const DMTT_SUBDEV: DWORD = 3;
1732 pub const DMTT_DOWNLOAD_OUTLINE: DWORD = 4;
1733 pub const DMCOLLATE_FALSE: DWORD = 0;
1734 pub const DMCOLLATE_TRUE: DWORD = 1;
1735 pub const DMDO_DEFAULT: DWORD = 0;
1736 pub const DMDO_90: DWORD = 1;
1737 pub const DMDO_180: DWORD = 2;
1738 pub const DMDO_270: DWORD = 3;
1739 pub const DMDFO_DEFAULT: DWORD = 0;
1740 pub const DMDFO_STRETCH: DWORD = 1;
1741 pub const DMDFO_CENTER: DWORD = 2;
1742 pub const DM_INTERLACED: DWORD = 0x00000002;
1743 pub const DMDISPLAYFLAGS_TEXTMODE: DWORD = 0x00000004;
1744 pub const DMNUP_SYSTEM: DWORD = 1;
1745 pub const DMNUP_ONEUP: DWORD = 2;
1746 pub const DMICMMETHOD_NONE: DWORD = 1;
1747 pub const DMICMMETHOD_SYSTEM: DWORD = 2;
1748 pub const DMICMMETHOD_DRIVER: DWORD = 3;
1749 pub const DMICMMETHOD_DEVICE: DWORD = 4;
1750 pub const DMICMMETHOD_USER: DWORD = 256;
1751 pub const DMICM_SATURATE: DWORD = 1;
1752 pub const DMICM_CONTRAST: DWORD = 2;
1753 pub const DMICM_COLORIMETRIC: DWORD = 3;
1754 pub const DMICM_ABS_COLORIMETRIC: DWORD = 4;
1755 pub const DMICM_USER: DWORD = 256;
1756 pub const DMMEDIA_STANDARD: DWORD = 1;
1757 pub const DMMEDIA_TRANSPARENCY: DWORD = 2;
1758 pub const DMMEDIA_GLOSSY: DWORD = 3;
1759 pub const DMMEDIA_USER: DWORD = 256;
1760 pub const DMDITHER_NONE: DWORD = 1;
1761 pub const DMDITHER_COARSE: DWORD = 2;
1762 pub const DMDITHER_FINE: DWORD = 3;
1763 pub const DMDITHER_LINEART: DWORD = 4;
1764 pub const DMDITHER_ERRORDIFFUSION: DWORD = 5;
1765 pub const DMDITHER_RESERVED6: DWORD = 6;
1766 pub const DMDITHER_RESERVED7: DWORD = 7;
1767 pub const DMDITHER_RESERVED8: DWORD = 8;
1768 pub const DMDITHER_RESERVED9: DWORD = 9;
1769 pub const DMDITHER_GRAYSCALE: DWORD = 10;
1770 pub const DMDITHER_USER: DWORD = 256;
1771 STRUCT!{struct DISPLAY_DEVICEA {
1772 cb: DWORD,
1773 DeviceName: [CHAR; 32],
1774 DeviceString: [CHAR; 128],
1775 StateFlags: DWORD,
1776 DeviceID: [CHAR; 128],
1777 DeviceKey: [CHAR; 128],
1778 }}
1779 pub type PDISPLAY_DEVICEA = *mut DISPLAY_DEVICEA;
1780 pub type LPDISPLAY_DEVICEA = *mut DISPLAY_DEVICEA;
1781 STRUCT!{struct DISPLAY_DEVICEW {
1782 cb: DWORD,
1783 DeviceName: [WCHAR; 32],
1784 DeviceString: [WCHAR; 128],
1785 StateFlags: DWORD,
1786 DeviceID: [WCHAR; 128],
1787 DeviceKey: [WCHAR; 128],
1788 }}
1789 pub type PDISPLAY_DEVICEW = *mut DISPLAY_DEVICEW;
1790 pub type LPDISPLAY_DEVICEW = *mut DISPLAY_DEVICEW;
1791 pub const DISPLAY_DEVICE_ATTACHED_TO_DESKTOP: DWORD = 0x00000001;
1792 pub const DISPLAY_DEVICE_MULTI_DRIVER: DWORD = 0x00000002;
1793 pub const DISPLAY_DEVICE_PRIMARY_DEVICE: DWORD = 0x00000004;
1794 pub const DISPLAY_DEVICE_MIRRORING_DRIVER: DWORD = 0x00000008;
1795 pub const DISPLAY_DEVICE_VGA_COMPATIBLE: DWORD = 0x00000010;
1796 pub const DISPLAY_DEVICE_REMOVABLE: DWORD = 0x00000020;
1797 pub const DISPLAY_DEVICE_ACC_DRIVER: DWORD = 0x00000040;
1798 pub const DISPLAY_DEVICE_MODESPRUNED: DWORD = 0x08000000;
1799 pub const DISPLAY_DEVICE_RDPUDD: DWORD = 0x01000000;
1800 pub const DISPLAY_DEVICE_REMOTE: DWORD = 0x04000000;
1801 pub const DISPLAY_DEVICE_DISCONNECT: DWORD = 0x02000000;
1802 pub const DISPLAY_DEVICE_TS_COMPATIBLE: DWORD = 0x00200000;
1803 pub const DISPLAY_DEVICE_UNSAFE_MODES_ON: DWORD = 0x00080000;
1804 pub const DISPLAY_DEVICE_ACTIVE: DWORD = 0x00000001;
1805 pub const DISPLAY_DEVICE_ATTACHED: DWORD = 0x00000002;
1806 pub const DISPLAYCONFIG_MAXPATH: usize = 1024;
1807 STRUCT!{struct DISPLAYCONFIG_RATIONAL {
1808 Numerator: UINT32,
1809 Denominator: UINT32,
1810 }}
1811 ENUM!{enum DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY {
1812 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER = -1i32 as u32,
1813 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = 0,
1814 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO = 1,
1815 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO = 2,
1816 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO = 3,
1817 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI = 4,
1818 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = 5,
1819 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = 6,
1820 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN = 8,
1821 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI = 9,
1822 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = 10,
1823 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = 11,
1824 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = 12,
1825 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = 13,
1826 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE = 14,
1827 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_MIRACAST = 15,
1828 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INDIRECT_WIRED = 16,
1829 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = 0x80000000,
1830 DISPLAYCONFIG_OUTPUT_TECHNOLOGY_FORCE_UINT32 = 0xFFFFFFFF,
1831 }}
1832 ENUM!{enum DISPLAYCONFIG_SCANLINE_ORDERING {
1833 DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED = 0,
1834 DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE = 1,
1835 DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2,
1836 DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST =
1837 DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED,
1838 DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3,
1839 DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32 = 0xFFFFFFFF,
1840 }}
1841 STRUCT!{struct DISPLAYCONFIG_2DREGION {
1842 cx: UINT32,
1843 cy: UINT32,
1844 }}
1845 STRUCT!{struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO_AdditionalSignalInfo {
1846 bitfield: UINT32,
1847 }}
1848 BITFIELD!{DISPLAYCONFIG_VIDEO_SIGNAL_INFO_AdditionalSignalInfo bitfield: UINT32 [
1849 videoStandard set_videoStandard[0..16],
1850 vSyncFreqDivider set_vSyncFreqDivider[16..22],
1851 ]}
1852 UNION!{union DISPLAYCONFIG_VIDEO_SIGNAL_INFO_u {
1853 [u32; 1],
1854 AdditionalSignalInfo AdditionalSignalInfo_mut:
1855 DISPLAYCONFIG_VIDEO_SIGNAL_INFO_AdditionalSignalInfo,
1856 videoStandard videoStandard_mut: UINT32,
1857 }}
1858 STRUCT!{struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO {
1859 pixelRate: UINT64,
1860 hSyncFreq: DISPLAYCONFIG_RATIONAL,
1861 vSyncFreq: DISPLAYCONFIG_RATIONAL,
1862 activeSize: DISPLAYCONFIG_2DREGION,
1863 totalSize: DISPLAYCONFIG_2DREGION,
1864 u: DISPLAYCONFIG_VIDEO_SIGNAL_INFO_u,
1865 scanLineOrdering: DISPLAYCONFIG_SCANLINE_ORDERING,
1866 }}
1867 ENUM!{enum DISPLAYCONFIG_SCALING {
1868 DISPLAYCONFIG_SCALING_IDENTITY = 1,
1869 DISPLAYCONFIG_SCALING_CENTERED = 2,
1870 DISPLAYCONFIG_SCALING_STRETCHED = 3,
1871 DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4,
1872 DISPLAYCONFIG_SCALING_CUSTOM = 5,
1873 DISPLAYCONFIG_SCALING_PREFERRED = 128,
1874 DISPLAYCONFIG_SCALING_FORCE_UINT32 = 0xFFFFFFFF,
1875 }}
1876 ENUM!{enum DISPLAYCONFIG_ROTATION {
1877 DISPLAYCONFIG_ROTATION_IDENTITY = 1,
1878 DISPLAYCONFIG_ROTATION_ROTATE90 = 2,
1879 DISPLAYCONFIG_ROTATION_ROTATE180 = 3,
1880 DISPLAYCONFIG_ROTATION_ROTATE270 = 4,
1881 DISPLAYCONFIG_ROTATION_FORCE_UINT32 = 0xFFFFFFFF,
1882 }}
1883 ENUM!{enum DISPLAYCONFIG_MODE_INFO_TYPE {
1884 DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1,
1885 DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2,
1886 DISPLAYCONFIG_MODE_INFO_TYPE_DESKTOP_IMAGE = 3,
1887 DISPLAYCONFIG_MODE_INFO_TYPE_FORCE_UINT32 = 0xFFFFFFFF,
1888 }}
1889 ENUM!{enum DISPLAYCONFIG_PIXELFORMAT {
1890 DISPLAYCONFIG_PIXELFORMAT_8BPP = 1,
1891 DISPLAYCONFIG_PIXELFORMAT_16BPP = 2,
1892 DISPLAYCONFIG_PIXELFORMAT_24BPP = 3,
1893 DISPLAYCONFIG_PIXELFORMAT_32BPP = 4,
1894 DISPLAYCONFIG_PIXELFORMAT_NONGDI = 5,
1895 DISPLAYCONFIG_PIXELFORMAT_FORCE_UINT32 = 0xffffffff,
1896 }}
1897 STRUCT!{struct DISPLAYCONFIG_SOURCE_MODE {
1898 width: UINT32,
1899 height: UINT32,
1900 pixelFormat: DISPLAYCONFIG_PIXELFORMAT,
1901 position: POINTL,
1902 }}
1903 STRUCT!{struct DISPLAYCONFIG_TARGET_MODE {
1904 targetVideoSignalInfo: DISPLAYCONFIG_VIDEO_SIGNAL_INFO,
1905 }}
1906 STRUCT!{struct DISPLAYCONFIG_DESKTOP_IMAGE_INFO {
1907 PathSourceSize: POINTL,
1908 DesktopImageRegion: RECTL,
1909 DesktopImageClip: RECTL,
1910 }}
1911 UNION!{union DISPLAYCONFIG_MODE_INFO_u {
1912 [u64; 6],
1913 targetMode targetMode_mut: DISPLAYCONFIG_TARGET_MODE,
1914 sourceMode sourceMode_mut: DISPLAYCONFIG_SOURCE_MODE,
1915 desktopImageInfo desktopImageInfo_mut: DISPLAYCONFIG_DESKTOP_IMAGE_INFO,
1916 }}
1917 STRUCT!{struct DISPLAYCONFIG_MODE_INFO {
1918 infoType: DISPLAYCONFIG_MODE_INFO_TYPE,
1919 id: UINT32,
1920 adapterId: LUID,
1921 u: DISPLAYCONFIG_MODE_INFO_u,
1922 }}
1923 pub const DISPLAYCONFIG_PATH_MODE_IDX_INVALID: DWORD = 0xffffffff;
1924 pub const DISPLAYCONFIG_PATH_TARGET_MODE_IDX_INVALID: DWORD = 0xffff;
1925 pub const DISPLAYCONFIG_PATH_DESKTOP_IMAGE_IDX_INVALID: DWORD = 0xffff;
1926 pub const DISPLAYCONFIG_PATH_SOURCE_MODE_IDX_INVALID: DWORD = 0xffff;
1927 pub const DISPLAYCONFIG_PATH_CLONE_GROUP_INVALID: DWORD = 0xffff;
1928 STRUCT!{struct DISPLAYCONFIG_PATH_SOURCE_INFO {
1929 adapterId: LUID,
1930 id: UINT32,
1931 modeInfoIdx: UINT32,
1932 statusFlags: UINT32,
1933 }}
1934 BITFIELD!{DISPLAYCONFIG_PATH_SOURCE_INFO modeInfoIdx: UINT32 [
1935 cloneGroupId set_cloneGroupId[0..16],
1936 sourceModeInfoIdx set_sourceModeInfoIdx[16..32],
1937 ]}
1938 pub const DISPLAYCONFIG_SOURCE_IN_USE: DWORD = 0x00000001;
1939 STRUCT!{struct DISPLAYCONFIG_PATH_TARGET_INFO {
1940 adapterId: LUID,
1941 id: UINT32,
1942 modeInfoIdx: UINT32,
1943 outputTechnology: DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY,
1944 rotation: DISPLAYCONFIG_ROTATION,
1945 scaling: DISPLAYCONFIG_SCALING,
1946 refreshRate: DISPLAYCONFIG_RATIONAL,
1947 scanLineOrdering: DISPLAYCONFIG_SCANLINE_ORDERING,
1948 targetAvailable: BOOL,
1949 statusFlags: UINT32,
1950 }}
1951 BITFIELD!{DISPLAYCONFIG_PATH_TARGET_INFO modeInfoIdx: UINT32 [
1952 desktopModeInfoIdx set_desktopModeInfoIdx[0..16],
1953 targetModeInfoIdx set_targetModeInfoIdx[16..32],
1954 ]}
1955 pub const DISPLAYCONFIG_TARGET_IN_USE: DWORD = 0x00000001;
1956 pub const DISPLAYCONFIG_TARGET_FORCIBLE: DWORD = 0x00000002;
1957 pub const DISPLAYCONFIG_TARGET_FORCED_AVAILABILITY_BOOT: DWORD = 0x00000004;
1958 pub const DISPLAYCONFIG_TARGET_FORCED_AVAILABILITY_PATH: DWORD = 0x00000008;
1959 pub const DISPLAYCONFIG_TARGET_FORCED_AVAILABILITY_SYSTEM: DWORD = 0x00000010;
1960 pub const DISPLAYCONFIG_TARGET_IS_HMD: DWORD = 0x00000020;
1961 STRUCT!{struct DISPLAYCONFIG_PATH_INFO {
1962 sourceInfo: DISPLAYCONFIG_PATH_SOURCE_INFO,
1963 targetInfo: DISPLAYCONFIG_PATH_TARGET_INFO,
1964 flags: UINT32,
1965 }}
1966 pub const DISPLAYCONFIG_PATH_ACTIVE: DWORD = 0x00000001;
1967 pub const DISPLAYCONFIG_PATH_PREFERRED_UNSCALED: DWORD = 0x00000004;
1968 pub const DISPLAYCONFIG_PATH_SUPPORT_VIRTUAL_MODE: DWORD = 0x00000008;
1969 pub const DISPLAYCONFIG_PATH_VALID_FLAGS: DWORD = 0x0000000D;
1970 ENUM!{enum DISPLAYCONFIG_TOPOLOGY_ID {
1971 DISPLAYCONFIG_TOPOLOGY_INTERNAL = 0x00000001,
1972 DISPLAYCONFIG_TOPOLOGY_CLONE = 0x00000002,
1973 DISPLAYCONFIG_TOPOLOGY_EXTEND = 0x00000004,
1974 DISPLAYCONFIG_TOPOLOGY_EXTERNAL = 0x00000008,
1975 DISPLAYCONFIG_TOPOLOGY_FORCE_UINT32 = 0xFFFFFFFF,
1976 }}
1977 ENUM!{enum DISPLAYCONFIG_DEVICE_INFO_TYPE {
1978 DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1,
1979 DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME = 2,
1980 DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE = 3,
1981 DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME = 4,
1982 DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE = 5,
1983 DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_BASE_TYPE = 6,
1984 DISPLAYCONFIG_DEVICE_INFO_GET_SUPPORT_VIRTUAL_RESOLUTION = 7,
1985 DISPLAYCONFIG_DEVICE_INFO_SET_SUPPORT_VIRTUAL_RESOLUTION = 8,
1986 DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO = 9,
1987 DISPLAYCONFIG_DEVICE_INFO_SET_ADVANCED_COLOR_STATE = 10,
1988 DISPLAYCONFIG_DEVICE_INFO_FORCE_UINT32 = 0xFFFFFFFF,
1989 }}
1990 STRUCT!{struct DISPLAYCONFIG_DEVICE_INFO_HEADER {
1991 _type: DISPLAYCONFIG_DEVICE_INFO_TYPE,
1992 size: UINT32,
1993 adapterId: LUID,
1994 id: UINT32,
1995 }}
1996 STRUCT!{struct DISPLAYCONFIG_SOURCE_DEVICE_NAME {
1997 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
1998 viewGdiDeviceName: [WCHAR; CCHDEVICENAME],
1999 }}
2000 STRUCT!{struct DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS {
2001 value: UINT32,
2002 }}
2003 BITFIELD!{DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS value: UINT32 [
2004 friendlyNameFromEdid set_friendlyNameFromEdid[0..1],
2005 friendlyNameForced set_friendlyNameForced[1..2],
2006 edidIdsValid set_edidIdsValid[2..3],
2007 ]}
2008 STRUCT!{struct DISPLAYCONFIG_TARGET_DEVICE_NAME {
2009 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2010 flags: DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS,
2011 outputTechnology: DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY,
2012 edidManufactureId: UINT16,
2013 edidProductCodeId: UINT16,
2014 connectorInstance: UINT32,
2015 monitorFriendlyDeviceName: [WCHAR; 64],
2016 monitorDevicePath: [WCHAR; 128],
2017 }}
2018 STRUCT!{struct DISPLAYCONFIG_TARGET_PREFERRED_MODE {
2019 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2020 width: UINT32,
2021 height: UINT32,
2022 targetMode: DISPLAYCONFIG_TARGET_MODE,
2023 }}
2024 STRUCT!{struct DISPLAYCONFIG_ADAPTER_NAME {
2025 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2026 adapterDevicePath: [WCHAR; 128],
2027 }}
2028 STRUCT!{struct DISPLAYCONFIG_TARGET_BASE_TYPE {
2029 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2030 baseOutputTechnology: DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY,
2031 }}
2032 STRUCT!{struct DISPLAYCONFIG_SET_TARGET_PERSISTENCE {
2033 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2034 value: UINT32,
2035 }}
2036 BITFIELD!{DISPLAYCONFIG_SET_TARGET_PERSISTENCE value: UINT32 [
2037 bootPersistenceOn set_bootPersistenceOn[0..1],
2038 ]}
2039 STRUCT!{struct DISPLAYCONFIG_SUPPORT_VIRTUAL_RESOLUTION {
2040 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2041 value: UINT32,
2042 }}
2043 BITFIELD!{DISPLAYCONFIG_SUPPORT_VIRTUAL_RESOLUTION value: UINT32 [
2044 disableMonitorVirtualResolution set_disableMonitorVirtualResolution[0..1],
2045 ]}
2046 ENUM!{enum DISPLAYCONFIG_COLOR_ENCODING {
2047 DISPLAYCONFIG_COLOR_ENCODING_RGB = 0,
2048 DISPLAYCONFIG_COLOR_ENCODING_YCBCR444 = 1,
2049 DISPLAYCONFIG_COLOR_ENCODING_YCBCR422 = 2,
2050 DISPLAYCONFIG_COLOR_ENCODING_YCBCR420 = 3,
2051 DISPLAYCONFIG_COLOR_ENCODING_INTENSITY = 4,
2052 DISPLAYCONFIG_COLOR_ENCODING_FORCE_UINT32 = 0xFFFFFFFF,
2053 }}
2054 STRUCT!{struct DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO {
2055 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2056 value: UINT32,
2057 colorEncoding: DISPLAYCONFIG_COLOR_ENCODING,
2058 bitsPerColorChannel: UINT32,
2059 }}
2060 BITFIELD!{DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO value: UINT32 [
2061 advancedColorSupported set_advancedColorSupported[0..1],
2062 advancedColorEnabled set_advancedColorEnabled[1..2],
2063 reserved set_reserved[2..32],
2064 ]}
2065 STRUCT!{struct DISPLAYCONFIG_SET_ADVANCED_COLOR_STATE {
2066 header: DISPLAYCONFIG_DEVICE_INFO_HEADER,
2067 value: UINT32,
2068 }}
2069 BITFIELD!{DISPLAYCONFIG_SET_ADVANCED_COLOR_STATE value: UINT32 [
2070 enableAdvancedColor set_enableAdvancedColor[0..1],
2071 reserved set_reserved[1..32],
2072 ]}
2073 pub const QDC_ALL_PATHS: DWORD = 0x00000001;
2074 pub const QDC_ONLY_ACTIVE_PATHS: DWORD = 0x00000002;
2075 pub const QDC_DATABASE_CURRENT: DWORD = 0x00000004;
2076 pub const QDC_VIRTUAL_MODE_AWARE: DWORD = 0x00000010;
2077 pub const QDC_INCLUDE_HMD: DWORD = 0x00000020;
2078 pub const SDC_TOPOLOGY_INTERNAL: DWORD = 0x00000001;
2079 pub const SDC_TOPOLOGY_CLONE: DWORD = 0x00000002;
2080 pub const SDC_TOPOLOGY_EXTEND: DWORD = 0x00000004;
2081 pub const SDC_TOPOLOGY_EXTERNAL: DWORD = 0x00000008;
2082 pub const SDC_TOPOLOGY_SUPPLIED: DWORD = 0x00000010;
2083 pub const SDC_USE_DATABASE_CURRENT: DWORD = SDC_TOPOLOGY_INTERNAL | SDC_TOPOLOGY_CLONE
2084 | SDC_TOPOLOGY_EXTEND | SDC_TOPOLOGY_EXTERNAL;
2085 pub const SDC_USE_SUPPLIED_DISPLAY_CONFIG: DWORD = 0x00000020;
2086 pub const SDC_VALIDATE: DWORD = 0x00000040;
2087 pub const SDC_APPLY: DWORD = 0x00000080;
2088 pub const SDC_NO_OPTIMIZATION: DWORD = 0x00000100;
2089 pub const SDC_SAVE_TO_DATABASE: DWORD = 0x00000200;
2090 pub const SDC_ALLOW_CHANGES: DWORD = 0x00000400;
2091 pub const SDC_PATH_PERSIST_IF_REQUIRED: DWORD = 0x00000800;
2092 pub const SDC_FORCE_MODE_ENUMERATION: DWORD = 0x00001000;
2093 pub const SDC_ALLOW_PATH_ORDER_CHANGES: DWORD = 0x00002000;
2094 pub const SDC_VIRTUAL_MODE_AWARE: DWORD = 0x00008000;
2095 pub const RDH_RECTANGLES: DWORD = 1;
2096 STRUCT!{struct RGNDATAHEADER {
2097 dwSize: DWORD,
2098 iType: DWORD,
2099 nCount: DWORD,
2100 nRgnSize: DWORD,
2101 rcBound: RECT,
2102 }}
2103 pub type PRGNDATAHEADER = *mut RGNDATAHEADER;
2104 STRUCT!{struct RGNDATA {
2105 rdh: RGNDATAHEADER,
2106 Buffer: [c_char; 1],
2107 }}
2108 pub type PRGNDATA = *mut RGNDATA;
2109 pub type NPRGNDATA = *mut RGNDATA;
2110 pub type LPRGNDATA = *mut RGNDATA;
2111 pub const SYSRGN: INT = 4;
2112 STRUCT!{struct ABC {
2113 abcA: c_int,
2114 abcB: UINT,
2115 abcC: c_int,
2116 }}
2117 pub type PABC = *mut ABC;
2118 pub type NPABC = *mut ABC;
2119 pub type LPABC = *mut ABC;
2120 STRUCT!{struct ABCFLOAT {
2121 abcfA: FLOAT,
2122 abcfB: FLOAT,
2123 abcfC: FLOAT,
2124 }}
2125 pub type PABCFLOAT = *mut ABCFLOAT;
2126 pub type NPABCFLOAT = *mut ABCFLOAT;
2127 pub type LPABCFLOAT = *mut ABCFLOAT;
2128 STRUCT!{struct OUTLINETEXTMETRICA {
2129 otmSize: UINT,
2130 otmTextMetrics: TEXTMETRICA,
2131 otmFiller: BYTE,
2132 otmPanoseNumber: PANOSE,
2133 otmfsSelection: UINT,
2134 otmfsType: UINT,
2135 otmsCharSlopeRise: c_int,
2136 otmsCharSlopeRun: c_int,
2137 otmItalicAngle: c_int,
2138 otmEMSquare: UINT,
2139 otmAscent: c_int,
2140 otmDescent: c_int,
2141 otmLineGap: UINT,
2142 otmsCapEmHeight: UINT,
2143 otmsXHeight: UINT,
2144 otmrcFontBox: RECT,
2145 otmMacAscent: c_int,
2146 otmMacDescent: c_int,
2147 otmMacLineGap: UINT,
2148 otmusMinimumPPEM: UINT,
2149 otmptSubscriptSize: POINT,
2150 otmptSubscriptOffset: POINT,
2151 otmptSuperscriptSize: POINT,
2152 otmptSuperscriptOffset: POINT,
2153 otmsStrikeoutSize: UINT,
2154 otmsStrikeoutPosition: c_int,
2155 otmsUnderscoreSize: c_int,
2156 otmsUnderscorePosition: c_int,
2157 otmpFamilyName: PSTR,
2158 otmpFaceName: PSTR,
2159 otmpStyleName: PSTR,
2160 otmpFullName: PSTR,
2161 }}
2162 pub type POUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA;
2163 pub type NPOUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA;
2164 pub type LPOUTLINETEXTMETRICA = *mut OUTLINETEXTMETRICA;
2165 STRUCT!{struct OUTLINETEXTMETRICW {
2166 otmSize: UINT,
2167 otmTextMetrics: TEXTMETRICW,
2168 otmFiller: BYTE,
2169 otmPanoseNumber: PANOSE,
2170 otmfsSelection: UINT,
2171 otmfsType: UINT,
2172 otmsCharSlopeRise: c_int,
2173 otmsCharSlopeRun: c_int,
2174 otmItalicAngle: c_int,
2175 otmEMSquare: UINT,
2176 otmAscent: c_int,
2177 otmDescent: c_int,
2178 otmLineGap: UINT,
2179 otmsCapEmHeight: UINT,
2180 otmsXHeight: UINT,
2181 otmrcFontBox: RECT,
2182 otmMacAscent: c_int,
2183 otmMacDescent: c_int,
2184 otmMacLineGap: UINT,
2185 otmusMinimumPPEM: UINT,
2186 otmptSubscriptSize: POINT,
2187 otmptSubscriptOffset: POINT,
2188 otmptSuperscriptSize: POINT,
2189 otmptSuperscriptOffset: POINT,
2190 otmsStrikeoutSize: UINT,
2191 otmsStrikeoutPosition: c_int,
2192 otmsUnderscoreSize: c_int,
2193 otmsUnderscorePosition: c_int,
2194 otmpFamilyName: PSTR,
2195 otmpFaceName: PSTR,
2196 otmpStyleName: PSTR,
2197 otmpFullName: PSTR,
2198 }}
2199 pub type POUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW;
2200 pub type NPOUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW;
2201 pub type LPOUTLINETEXTMETRICW = *mut OUTLINETEXTMETRICW;
2202 STRUCT!{struct POLYTEXTA {
2203 x: c_int,
2204 y: c_int,
2205 n: UINT,
2206 lpstr: LPCSTR,
2207 uiFlags: UINT,
2208 rcl: RECT,
2209 pdx: *mut c_int,
2210 }}
2211 pub type PPOLYTEXTA = *mut POLYTEXTA;
2212 pub type NPPOLYTEXTA = *mut POLYTEXTA;
2213 pub type LPPOLYTEXTA = *mut POLYTEXTA;
2214 STRUCT!{struct POLYTEXTW {
2215 x: c_int,
2216 y: c_int,
2217 n: UINT,
2218 lpstr: LPCWSTR,
2219 uiFlags: UINT,
2220 rcl: RECT,
2221 pdx: *mut c_int,
2222 }}
2223 pub type PPOLYTEXTW = *mut POLYTEXTW;
2224 pub type NPPOLYTEXTW = *mut POLYTEXTW;
2225 pub type LPPOLYTEXTW = *mut POLYTEXTW;
2226 STRUCT!{struct FIXED {
2227 fract: WORD,
2228 value: c_short,
2229 }}
2230 STRUCT!{struct MAT2 {
2231 eM11: FIXED,
2232 eM12: FIXED,
2233 eM21: FIXED,
2234 eM22: FIXED,
2235 }}
2236 pub type LPMAT2 = *mut MAT2;
2237 STRUCT!{struct GLYPHMETRICS {
2238 gmBlackBoxX: UINT,
2239 gmBlackBoxY: UINT,
2240 gmptGlyphOrigin: POINT,
2241 gmCellIncX: c_short,
2242 gmCellIncY: c_short,
2243 }}
2244 pub type LPGLYPHMETRICS = *mut GLYPHMETRICS;
2245 pub const GGO_METRICS: DWORD = 0;
2246 pub const GGO_BITMAP: DWORD = 1;
2247 pub const GGO_NATIVE: DWORD = 2;
2248 pub const GGO_BEZIER: DWORD = 3;
2249 pub const GGO_GRAY2_BITMAP: DWORD = 4;
2250 pub const GGO_GRAY4_BITMAP: DWORD = 5;
2251 pub const GGO_GRAY8_BITMAP: DWORD = 6;
2252 pub const GGO_GLYPH_INDEX: DWORD = 0x0080;
2253 pub const GGO_UNHINTED: DWORD = 0x0100;
2254 pub const TT_POLYGON_TYPE: DWORD = 24;
2255 pub const TT_PRIM_LINE: DWORD = 1;
2256 pub const TT_PRIM_QSPLINE: DWORD = 2;
2257 pub const TT_PRIM_CSPLINE: DWORD = 3;
2258 STRUCT!{struct POINTFX {
2259 x: FIXED,
2260 y: FIXED,
2261 }}
2262 pub type LPPOINTFX = *mut POINTFX;
2263 STRUCT!{struct TTPOLYCURVE {
2264 wType: WORD,
2265 cpfx: WORD,
2266 apfx: [POINTFX; 1],
2267 }}
2268 pub type LPTTPOLYCURVE = *mut TTPOLYCURVE;
2269 STRUCT!{struct TTPOLYGONHEADER {
2270 cb: DWORD,
2271 dwType: DWORD,
2272 pfxStart: POINTFX,
2273 }}
2274 pub type LPTTPOLYGONHEADER = *mut TTPOLYGONHEADER;
2275 pub const GCP_DBCS: DWORD = 0x0001;
2276 pub const GCP_REORDER: DWORD = 0x0002;
2277 pub const GCP_USEKERNING: DWORD = 0x0008;
2278 pub const GCP_GLYPHSHAPE: DWORD = 0x0010;
2279 pub const GCP_LIGATE: DWORD = 0x0020;
2280 pub const GCP_DIACRITIC: DWORD = 0x0100;
2281 pub const GCP_KASHIDA: DWORD = 0x0400;
2282 pub const GCP_ERROR: DWORD = 0x8000;
2283 pub const FLI_MASK: DWORD = 0x103B;
2284 pub const GCP_JUSTIFY: DWORD = 0x00010000;
2285 pub const FLI_GLYPHS: DWORD = 0x00040000;
2286 pub const GCP_CLASSIN: DWORD = 0x00080000;
2287 pub const GCP_MAXEXTENT: DWORD = 0x00100000;
2288 pub const GCP_JUSTIFYIN: DWORD = 0x00200000;
2289 pub const GCP_DISPLAYZWG: DWORD = 0x00400000;
2290 pub const GCP_SYMSWAPOFF: DWORD = 0x00800000;
2291 pub const GCP_NUMERICOVERRIDE: DWORD = 0x01000000;
2292 pub const GCP_NEUTRALOVERRIDE: DWORD = 0x02000000;
2293 pub const GCP_NUMERICSLATIN: DWORD = 0x04000000;
2294 pub const GCP_NUMERICSLOCAL: DWORD = 0x08000000;
2295 pub const GCPCLASS_LATIN: DWORD = 1;
2296 pub const GCPCLASS_HEBREW: DWORD = 2;
2297 pub const GCPCLASS_ARABIC: DWORD = 2;
2298 pub const GCPCLASS_NEUTRAL: DWORD = 3;
2299 pub const GCPCLASS_LOCALNUMBER: DWORD = 4;
2300 pub const GCPCLASS_LATINNUMBER: DWORD = 5;
2301 pub const GCPCLASS_LATINNUMERICTERMINATOR: DWORD = 6;
2302 pub const GCPCLASS_LATINNUMERICSEPARATOR: DWORD = 7;
2303 pub const GCPCLASS_NUMERICSEPARATOR: DWORD = 8;
2304 pub const GCPCLASS_PREBOUNDLTR: DWORD = 0x80;
2305 pub const GCPCLASS_PREBOUNDRTL: DWORD = 0x40;
2306 pub const GCPCLASS_POSTBOUNDLTR: DWORD = 0x20;
2307 pub const GCPCLASS_POSTBOUNDRTL: DWORD = 0x10;
2308 pub const GCPGLYPH_LINKBEFORE: DWORD = 0x8000;
2309 pub const GCPGLYPH_LINKAFTER: DWORD = 0x4000;
2310 STRUCT!{struct GCP_RESULTSA {
2311 lStructSize: DWORD,
2312 lpOutString: LPSTR,
2313 lpOrder: *mut UINT,
2314 lpDx: *mut c_int,
2315 lpCaretPos: *mut c_int,
2316 lpClass: LPSTR,
2317 lpGlyphs: LPWSTR,
2318 nGlyphs: UINT,
2319 nMaxFit: c_int,
2320 }}
2321 pub type LPGCP_RESULTSA = *mut GCP_RESULTSA;
2322 STRUCT!{struct GCP_RESULTSW {
2323 lStructSize: DWORD,
2324 lpOutString: LPWSTR,
2325 lpOrder: *mut UINT,
2326 lpDx: *mut c_int,
2327 lpCaretPos: *mut c_int,
2328 lpClass: LPSTR,
2329 lpGlyphs: LPWSTR,
2330 nGlyphs: UINT,
2331 nMaxFit: c_int,
2332 }}
2333 pub type LPGCP_RESULTSW = *mut GCP_RESULTSW;
2334 STRUCT!{struct RASTERIZER_STATUS {
2335 nSize: c_short,
2336 wFlags: c_short,
2337 nLanguageID: c_short,
2338 }}
2339 pub type LPRASTERIZER_STATUS = *mut RASTERIZER_STATUS;
2340 pub const TT_AVAILABLE: DWORD = 0x0001;
2341 pub const TT_ENABLED: DWORD = 0x0002;
2342 STRUCT!{struct PIXELFORMATDESCRIPTOR {
2343 nSize: WORD,
2344 nVersion: WORD,
2345 dwFlags: DWORD,
2346 iPixelType: BYTE,
2347 cColorBits: BYTE,
2348 cRedBits: BYTE,
2349 cRedShift: BYTE,
2350 cGreenBits: BYTE,
2351 cGreenShift: BYTE,
2352 cBlueBits: BYTE,
2353 cBlueShift: BYTE,
2354 cAlphaBits: BYTE,
2355 cAlphaShift: BYTE,
2356 cAccumBits: BYTE,
2357 cAccumRedBits: BYTE,
2358 cAccumGreenBits: BYTE,
2359 cAccumBlueBits: BYTE,
2360 cAccumAlphaBits: BYTE,
2361 cDepthBits: BYTE,
2362 cStencilBits: BYTE,
2363 cAuxBuffers: BYTE,
2364 iLayerType: BYTE,
2365 bReserved: BYTE,
2366 dwLayerMask: DWORD,
2367 dwVisibleMask: DWORD,
2368 dwDamageMask: DWORD,
2369 }}
2370 pub type PPIXELFORMATDESCRIPTOR = *mut PIXELFORMATDESCRIPTOR;
2371 pub type LPPIXELFORMATDESCRIPTOR = *mut PIXELFORMATDESCRIPTOR;
2372 pub const PFD_TYPE_RGBA: BYTE = 0;
2373 pub const PFD_TYPE_COLORINDEX: BYTE = 1;
2374 pub const PFD_MAIN_PLANE: BYTE = 0;
2375 pub const PFD_OVERLAY_PLANE: BYTE = 1;
2376 pub const PFD_UNDERLAY_PLANE: BYTE = -1i8 as u8;
2377 pub const PFD_DOUBLEBUFFER: DWORD = 0x00000001;
2378 pub const PFD_STEREO: DWORD = 0x00000002;
2379 pub const PFD_DRAW_TO_WINDOW: DWORD = 0x00000004;
2380 pub const PFD_DRAW_TO_BITMAP: DWORD = 0x00000008;
2381 pub const PFD_SUPPORT_GDI: DWORD = 0x00000010;
2382 pub const PFD_SUPPORT_OPENGL: DWORD = 0x00000020;
2383 pub const PFD_GENERIC_FORMAT: DWORD = 0x00000040;
2384 pub const PFD_NEED_PALETTE: DWORD = 0x00000080;
2385 pub const PFD_NEED_SYSTEM_PALETTE: DWORD = 0x00000100;
2386 pub const PFD_SWAP_EXCHANGE: DWORD = 0x00000200;
2387 pub const PFD_SWAP_COPY: DWORD = 0x00000400;
2388 pub const PFD_SWAP_LAYER_BUFFERS: DWORD = 0x00000800;
2389 pub const PFD_GENERIC_ACCELERATED: DWORD = 0x00001000;
2390 pub const PFD_SUPPORT_DIRECTDRAW: DWORD = 0x00002000;
2391 pub const PFD_DIRECT3D_ACCELERATED: DWORD = 0x00004000;
2392 pub const PFD_SUPPORT_COMPOSITION: DWORD = 0x00008000;
2393 pub const PFD_DEPTH_DONTCARE: DWORD = 0x20000000;
2394 pub const PFD_DOUBLEBUFFER_DONTCARE: DWORD = 0x40000000;
2395 pub const PFD_STEREO_DONTCARE: DWORD = 0x80000000;
2396 FN!{stdcall OLDFONTENUMPROCA(
2397 *const LOGFONTA,
2398 *const TEXTMETRICA,
2399 DWORD,
2400 LPARAM,
2401 ) -> c_int}
2402 FN!{stdcall OLDFONTENUMPROCW(
2403 *const LOGFONTW,
2404 *const TEXTMETRICW,
2405 DWORD,
2406 LPARAM,
2407 ) -> c_int}
2408 pub type FONTENUMPROCA = OLDFONTENUMPROCA;
2409 pub type FONTENUMPROCW = OLDFONTENUMPROCW;
2410 FN!{stdcall GOBJENUMPROC(
2411 LPVOID,
2412 LPARAM,
2413 ) -> c_int}
2414 FN!{stdcall LINEDDAPROC(
2415 c_int,
2416 c_int,
2417 LPARAM,
2418 ) -> ()}
2419 extern "system" {
AddFontResourceA( _: LPCSTR, ) -> c_int2420 pub fn AddFontResourceA(
2421 _: LPCSTR,
2422 ) -> c_int;
AddFontResourceW( _: LPCWSTR, ) -> c_int2423 pub fn AddFontResourceW(
2424 _: LPCWSTR,
2425 ) -> c_int;
AnimatePalette( hPal: HPALETTE, iStartIndex: UINT, cEntries: UINT, ppe: *const PALETTEENTRY, ) -> BOOL2426 pub fn AnimatePalette(
2427 hPal: HPALETTE,
2428 iStartIndex: UINT,
2429 cEntries: UINT,
2430 ppe: *const PALETTEENTRY,
2431 ) -> BOOL;
Arc( hdc: HDC, x1: c_int, y1: c_int, x2: c_int, y2: c_int, x3: c_int, y3: c_int, x4: c_int, y4: c_int, ) -> BOOL2432 pub fn Arc(
2433 hdc: HDC,
2434 x1: c_int,
2435 y1: c_int,
2436 x2: c_int,
2437 y2: c_int,
2438 x3: c_int,
2439 y3: c_int,
2440 x4: c_int,
2441 y4: c_int,
2442 ) -> BOOL;
BitBlt( hdc: HDC, x: c_int, y: c_int, cx: c_int, cy: c_int, hdcSrc: HDC, x1: c_int, y1: c_int, rop: DWORD, ) -> BOOL2443 pub fn BitBlt(
2444 hdc: HDC,
2445 x: c_int,
2446 y: c_int,
2447 cx: c_int,
2448 cy: c_int,
2449 hdcSrc: HDC,
2450 x1: c_int,
2451 y1: c_int,
2452 rop: DWORD,
2453 ) -> BOOL;
CancelDC( hdc: HDC, ) -> BOOL2454 pub fn CancelDC(
2455 hdc: HDC,
2456 ) -> BOOL;
Chord( hdc: HDC, x1: c_int, y1: c_int, x2: c_int, y2: c_int, x3: c_int, y3: c_int, x4: c_int, y4: c_int, ) -> BOOL2457 pub fn Chord(
2458 hdc: HDC,
2459 x1: c_int,
2460 y1: c_int,
2461 x2: c_int,
2462 y2: c_int,
2463 x3: c_int,
2464 y3: c_int,
2465 x4: c_int,
2466 y4: c_int,
2467 ) -> BOOL;
ChoosePixelFormat( hdc: HDC, ppfd: *const PIXELFORMATDESCRIPTOR, ) -> c_int2468 pub fn ChoosePixelFormat(
2469 hdc: HDC,
2470 ppfd: *const PIXELFORMATDESCRIPTOR,
2471 ) -> c_int;
CloseMetaFile( hdc: HDC, ) -> HMETAFILE2472 pub fn CloseMetaFile(
2473 hdc: HDC,
2474 ) -> HMETAFILE;
CombineRgn( hrgnDst: HRGN, hrgnSrc1: HRGN, hrgnSrc2: HRGN, iMode: c_int, ) -> c_int2475 pub fn CombineRgn(
2476 hrgnDst: HRGN,
2477 hrgnSrc1: HRGN,
2478 hrgnSrc2: HRGN,
2479 iMode: c_int,
2480 ) -> c_int;
CopyMetaFileA( _: HMETAFILE, _: LPCSTR, ) -> HMETAFILE2481 pub fn CopyMetaFileA(
2482 _: HMETAFILE,
2483 _: LPCSTR,
2484 ) -> HMETAFILE;
CopyMetaFileW( _: HMETAFILE, _: LPCWSTR, ) -> HMETAFILE2485 pub fn CopyMetaFileW(
2486 _: HMETAFILE,
2487 _: LPCWSTR,
2488 ) -> HMETAFILE;
CreateBitmap( nWidth: c_int, nHeight: c_int, nPlanes: UINT, nBitCount: UINT, lpBits: *const c_void, ) -> HBITMAP2489 pub fn CreateBitmap(
2490 nWidth: c_int,
2491 nHeight: c_int,
2492 nPlanes: UINT,
2493 nBitCount: UINT,
2494 lpBits: *const c_void,
2495 ) -> HBITMAP;
CreateBitmapIndirect( pbm: *const BITMAP, ) -> HBITMAP2496 pub fn CreateBitmapIndirect(
2497 pbm: *const BITMAP,
2498 ) -> HBITMAP;
CreateBrushIndirect( plbrush: *const LOGBRUSH, ) -> HBRUSH2499 pub fn CreateBrushIndirect(
2500 plbrush: *const LOGBRUSH,
2501 ) -> HBRUSH;
CreateCompatibleBitmap( hdc: HDC, cx: c_int, cy: c_int, ) -> HBITMAP2502 pub fn CreateCompatibleBitmap(
2503 hdc: HDC,
2504 cx: c_int,
2505 cy: c_int,
2506 ) -> HBITMAP;
CreateDiscardableBitmap( hdc: HDC, cx: c_int, cy: c_int, ) -> HBITMAP2507 pub fn CreateDiscardableBitmap(
2508 hdc: HDC,
2509 cx: c_int,
2510 cy: c_int,
2511 ) -> HBITMAP;
CreateCompatibleDC( hdc: HDC, ) -> HDC2512 pub fn CreateCompatibleDC(
2513 hdc: HDC,
2514 ) -> HDC;
CreateDCA( pwszDriver: LPCSTR, pwszDevice: LPCSTR, pszPort: LPCSTR, pdm: *const DEVMODEA, ) -> HDC2515 pub fn CreateDCA(
2516 pwszDriver: LPCSTR,
2517 pwszDevice: LPCSTR,
2518 pszPort: LPCSTR,
2519 pdm: *const DEVMODEA,
2520 ) -> HDC;
CreateDCW( pwszDriver: LPCWSTR, pwszDevice: LPCWSTR, pszPort: LPCWSTR, pdm: *const DEVMODEW, ) -> HDC2521 pub fn CreateDCW(
2522 pwszDriver: LPCWSTR,
2523 pwszDevice: LPCWSTR,
2524 pszPort: LPCWSTR,
2525 pdm: *const DEVMODEW,
2526 ) -> HDC;
CreateDIBitmap( hdc: HDC, pbmih: *const BITMAPINFOHEADER, flInit: DWORD, pjBits: *const c_void, pbmi: *const BITMAPINFO, iUsage: UINT, ) -> HBITMAP2527 pub fn CreateDIBitmap(
2528 hdc: HDC,
2529 pbmih: *const BITMAPINFOHEADER,
2530 flInit: DWORD,
2531 pjBits: *const c_void,
2532 pbmi: *const BITMAPINFO,
2533 iUsage: UINT,
2534 ) -> HBITMAP;
CreateDIBPatternBrush( h: HGLOBAL, iUsage: UINT, ) -> HBRUSH2535 pub fn CreateDIBPatternBrush(
2536 h: HGLOBAL,
2537 iUsage: UINT,
2538 ) -> HBRUSH;
CreateDIBPatternBrushPt( lpPackedDIB: *const c_void, iUsage: UINT, ) -> HBRUSH2539 pub fn CreateDIBPatternBrushPt(
2540 lpPackedDIB: *const c_void,
2541 iUsage: UINT,
2542 ) -> HBRUSH;
CreateEllipticRgn( x1: c_int, y1: c_int, x2: c_int, y2: c_int, ) -> HRGN2543 pub fn CreateEllipticRgn(
2544 x1: c_int,
2545 y1: c_int,
2546 x2: c_int,
2547 y2: c_int,
2548 ) -> HRGN;
CreateEllipticRgnIndirect( lprect: *const RECT, ) -> HRGN2549 pub fn CreateEllipticRgnIndirect(
2550 lprect: *const RECT,
2551 ) -> HRGN;
CreateFontIndirectA( lplf: *const LOGFONTA, ) -> HFONT2552 pub fn CreateFontIndirectA(
2553 lplf: *const LOGFONTA,
2554 ) -> HFONT;
CreateFontIndirectW( lplf: *const LOGFONTW, ) -> HFONT2555 pub fn CreateFontIndirectW(
2556 lplf: *const LOGFONTW,
2557 ) -> HFONT;
CreateFontA( cHeight: c_int, cWidth: c_int, cEscapement: c_int, cOrientation: c_int, cWeight: c_int, bItalic: DWORD, bUnderline: DWORD, bStrikeOut: DWORD, iCharSet: DWORD, iOutPrecision: DWORD, iClipPrecision: DWORD, iQuality: DWORD, iPitchAndFamily: DWORD, pszFaceName: LPCSTR, ) -> HFONT2558 pub fn CreateFontA(
2559 cHeight: c_int,
2560 cWidth: c_int,
2561 cEscapement: c_int,
2562 cOrientation: c_int,
2563 cWeight: c_int,
2564 bItalic: DWORD,
2565 bUnderline: DWORD,
2566 bStrikeOut: DWORD,
2567 iCharSet: DWORD,
2568 iOutPrecision: DWORD,
2569 iClipPrecision: DWORD,
2570 iQuality: DWORD,
2571 iPitchAndFamily: DWORD,
2572 pszFaceName: LPCSTR,
2573 ) -> HFONT;
CreateFontW( cHeight: c_int, cWidth: c_int, cEscapement: c_int, cOrientation: c_int, cWeight: c_int, bItalic: DWORD, bUnderline: DWORD, bStrikeOut: DWORD, iCharSet: DWORD, iOutPrecision: DWORD, iClipPrecision: DWORD, iQuality: DWORD, iPitchAndFamily: DWORD, pszFaceName: LPCWSTR, ) -> HFONT2574 pub fn CreateFontW(
2575 cHeight: c_int,
2576 cWidth: c_int,
2577 cEscapement: c_int,
2578 cOrientation: c_int,
2579 cWeight: c_int,
2580 bItalic: DWORD,
2581 bUnderline: DWORD,
2582 bStrikeOut: DWORD,
2583 iCharSet: DWORD,
2584 iOutPrecision: DWORD,
2585 iClipPrecision: DWORD,
2586 iQuality: DWORD,
2587 iPitchAndFamily: DWORD,
2588 pszFaceName: LPCWSTR,
2589 ) -> HFONT;
CreateHatchBrush( iHatch: c_int, color: COLORREF, ) -> HBRUSH2590 pub fn CreateHatchBrush(
2591 iHatch: c_int,
2592 color: COLORREF,
2593 ) -> HBRUSH;
CreateICA( pszDriver: LPCSTR, pszDevice: LPCSTR, pszPort: LPCSTR, pdm: *const DEVMODEA, ) -> HDC2594 pub fn CreateICA(
2595 pszDriver: LPCSTR,
2596 pszDevice: LPCSTR,
2597 pszPort: LPCSTR,
2598 pdm: *const DEVMODEA,
2599 ) -> HDC;
CreateICW( pszDriver: LPCWSTR, pszDevice: LPCWSTR, pszPort: LPCWSTR, pdm: *const DEVMODEW, ) -> HDC2600 pub fn CreateICW(
2601 pszDriver: LPCWSTR,
2602 pszDevice: LPCWSTR,
2603 pszPort: LPCWSTR,
2604 pdm: *const DEVMODEW,
2605 ) -> HDC;
CreateMetaFileA( pszFile: LPCSTR, ) -> HDC2606 pub fn CreateMetaFileA(
2607 pszFile: LPCSTR,
2608 ) -> HDC;
CreateMetaFileW( pszFile: LPCWSTR, ) -> HDC2609 pub fn CreateMetaFileW(
2610 pszFile: LPCWSTR,
2611 ) -> HDC;
CreatePalette( plpal: *const LOGPALETTE, ) -> HPALETTE2612 pub fn CreatePalette(
2613 plpal: *const LOGPALETTE,
2614 ) -> HPALETTE;
CreatePen( iStyle: c_int, cWidth: c_int, color: COLORREF, ) -> HPEN2615 pub fn CreatePen(
2616 iStyle: c_int,
2617 cWidth: c_int,
2618 color: COLORREF,
2619 ) -> HPEN;
CreatePenIndirect( plpen: *const LOGPEN, ) -> HPEN2620 pub fn CreatePenIndirect(
2621 plpen: *const LOGPEN,
2622 ) -> HPEN;
CreatePolyPolygonRgn( pptl: *const POINT, pc: *const INT, cPoly: c_int, iMode: c_int, ) -> HRGN2623 pub fn CreatePolyPolygonRgn(
2624 pptl: *const POINT,
2625 pc: *const INT,
2626 cPoly: c_int,
2627 iMode: c_int,
2628 ) -> HRGN;
CreatePatternBrush( hbm: HBITMAP, ) -> HBRUSH2629 pub fn CreatePatternBrush(
2630 hbm: HBITMAP,
2631 ) -> HBRUSH;
CreateRectRgn( x1: c_int, y1: c_int, x2: c_int, y2: c_int, ) -> HRGN2632 pub fn CreateRectRgn(
2633 x1: c_int,
2634 y1: c_int,
2635 x2: c_int,
2636 y2: c_int,
2637 ) -> HRGN;
CreateRectRgnIndirect( lprect: *const RECT, ) -> HRGN2638 pub fn CreateRectRgnIndirect(
2639 lprect: *const RECT,
2640 ) -> HRGN;
CreateRoundRectRgn( x1: c_int, y1: c_int, x2: c_int, y2: c_int, w: c_int, h: c_int, ) -> HRGN2641 pub fn CreateRoundRectRgn(
2642 x1: c_int,
2643 y1: c_int,
2644 x2: c_int,
2645 y2: c_int,
2646 w: c_int,
2647 h: c_int,
2648 ) -> HRGN;
CreateScalableFontResourceA( fdwHidden: DWORD, lpszFont: LPCSTR, lpszFile: LPCSTR, lpszPath: LPCSTR, ) -> BOOL2649 pub fn CreateScalableFontResourceA(
2650 fdwHidden: DWORD,
2651 lpszFont: LPCSTR,
2652 lpszFile: LPCSTR,
2653 lpszPath: LPCSTR,
2654 ) -> BOOL;
CreateScalableFontResourceW( fdwHidden: DWORD, lpszFont: LPCWSTR, lpszFile: LPCWSTR, lpszPath: LPCWSTR, ) -> BOOL2655 pub fn CreateScalableFontResourceW(
2656 fdwHidden: DWORD,
2657 lpszFont: LPCWSTR,
2658 lpszFile: LPCWSTR,
2659 lpszPath: LPCWSTR,
2660 ) -> BOOL;
CreateSolidBrush( color: COLORREF, ) -> HBRUSH2661 pub fn CreateSolidBrush(
2662 color: COLORREF,
2663 ) -> HBRUSH;
DeleteDC( hdc: HDC, ) -> BOOL2664 pub fn DeleteDC(
2665 hdc: HDC,
2666 ) -> BOOL;
DeleteMetaFile( hmf: HMETAFILE, ) -> BOOL2667 pub fn DeleteMetaFile(
2668 hmf: HMETAFILE,
2669 ) -> BOOL;
DeleteObject( ho: HGDIOBJ, ) -> BOOL2670 pub fn DeleteObject(
2671 ho: HGDIOBJ,
2672 ) -> BOOL;
DescribePixelFormat( hdc: HDC, iPixelFormat: c_int, nBytes: UINT, ppfd: LPPIXELFORMATDESCRIPTOR, ) -> c_int2673 pub fn DescribePixelFormat(
2674 hdc: HDC,
2675 iPixelFormat: c_int,
2676 nBytes: UINT,
2677 ppfd: LPPIXELFORMATDESCRIPTOR,
2678 ) -> c_int;
2679 }
2680 FN!{stdcall LPFNDEVMODE(
2681 HWND,
2682 HMODULE,
2683 LPDEVMODEA,
2684 LPSTR,
2685 LPSTR,
2686 LPDEVMODEA,
2687 LPSTR,
2688 UINT,
2689 ) -> UINT}
2690 FN!{stdcall LPFNDEVCAPS(
2691 LPSTR,
2692 LPSTR,
2693 UINT,
2694 LPSTR,
2695 LPDEVMODEA,
2696 ) -> DWORD}
2697 pub const DM_UPDATE: DWORD = 1;
2698 pub const DM_COPY: DWORD = 2;
2699 pub const DM_PROMPT: DWORD = 4;
2700 pub const DM_MODIFY: DWORD = 8;
2701 pub const DM_IN_BUFFER: DWORD = DM_MODIFY;
2702 pub const DM_IN_PROMPT: DWORD = DM_PROMPT;
2703 pub const DM_OUT_BUFFER: DWORD = DM_COPY;
2704 pub const DM_OUT_DEFAULT: DWORD = DM_UPDATE;
2705 pub const DC_FIELDS: WORD = 1;
2706 pub const DC_PAPERS: WORD = 2;
2707 pub const DC_PAPERSIZE: WORD = 3;
2708 pub const DC_MINEXTENT: WORD = 4;
2709 pub const DC_MAXEXTENT: WORD = 5;
2710 pub const DC_BINS: WORD = 6;
2711 pub const DC_DUPLEX: WORD = 7;
2712 pub const DC_SIZE: WORD = 8;
2713 pub const DC_EXTRA: WORD = 9;
2714 pub const DC_VERSION: WORD = 10;
2715 pub const DC_DRIVER: WORD = 11;
2716 pub const DC_BINNAMES: WORD = 12;
2717 pub const DC_ENUMRESOLUTIONS: WORD = 13;
2718 pub const DC_FILEDEPENDENCIES: WORD = 14;
2719 pub const DC_TRUETYPE: WORD = 15;
2720 pub const DC_PAPERNAMES: WORD = 16;
2721 pub const DC_ORIENTATION: WORD = 17;
2722 pub const DC_COPIES: WORD = 18;
2723 pub const DC_BINADJUST: WORD = 19;
2724 pub const DC_EMF_COMPLIANT: WORD = 20;
2725 pub const DC_DATATYPE_PRODUCED: WORD = 21;
2726 pub const DC_COLLATE: WORD = 22;
2727 pub const DC_MANUFACTURER: WORD = 23;
2728 pub const DC_MODEL: WORD = 24;
2729 pub const DC_PERSONALITY: WORD = 25;
2730 pub const DC_PRINTRATE: WORD = 26;
2731 pub const DC_PRINTRATEUNIT: WORD = 27;
2732 pub const PRINTRATEUNIT_PPM: WORD = 1;
2733 pub const PRINTRATEUNIT_CPS: WORD = 2;
2734 pub const PRINTRATEUNIT_LPM: WORD = 3;
2735 pub const PRINTRATEUNIT_IPM: WORD = 4;
2736 pub const DC_PRINTERMEM: WORD = 28;
2737 pub const DC_MEDIAREADY: WORD = 29;
2738 pub const DC_STAPLE: WORD = 30;
2739 pub const DC_PRINTRATEPPM: WORD = 31;
2740 pub const DC_COLORDEVICE: WORD = 32;
2741 pub const DC_NUP: WORD = 33;
2742 pub const DC_MEDIATYPENAMES: WORD = 34;
2743 pub const DC_MEDIATYPES: WORD = 35;
2744 pub const DCTT_BITMAP: DWORD = 0x0000001;
2745 pub const DCTT_DOWNLOAD: DWORD = 0x0000002;
2746 pub const DCTT_SUBDEV: DWORD = 0x0000004;
2747 pub const DCTT_DOWNLOAD_OUTLINE: DWORD = 0x0000008;
2748 pub const DCBA_FACEUPNONE: DWORD = 0x0000;
2749 pub const DCBA_FACEUPCENTER: DWORD = 0x0001;
2750 pub const DCBA_FACEUPLEFT: DWORD = 0x0002;
2751 pub const DCBA_FACEUPRIGHT: DWORD = 0x0003;
2752 pub const DCBA_FACEDOWNNONE: DWORD = 0x0100;
2753 pub const DCBA_FACEDOWNCENTER: DWORD = 0x0101;
2754 pub const DCBA_FACEDOWNLEFT: DWORD = 0x0102;
2755 pub const DCBA_FACEDOWNRIGHT: DWORD = 0x0103;
2756 extern "system" {
DeviceCapabilitiesA( pDevice: LPCSTR, pPort: LPCSTR, fwCapability: WORD, pOutput: LPSTR, pDevMode: *const DEVMODEA, ) -> c_int2757 pub fn DeviceCapabilitiesA(
2758 pDevice: LPCSTR,
2759 pPort: LPCSTR,
2760 fwCapability: WORD,
2761 pOutput: LPSTR,
2762 pDevMode: *const DEVMODEA,
2763 ) -> c_int;
DeviceCapabilitiesW( pDevice: LPCWSTR, pPort: LPCWSTR, fwCapability: WORD, pOutput: LPWSTR, pDevMode: *const DEVMODEW, ) -> c_int2764 pub fn DeviceCapabilitiesW(
2765 pDevice: LPCWSTR,
2766 pPort: LPCWSTR,
2767 fwCapability: WORD,
2768 pOutput: LPWSTR,
2769 pDevMode: *const DEVMODEW,
2770 ) -> c_int;
DrawEscape( hdc: HDC, iEscape: c_int, cjIn: c_int, lpIn: LPCSTR, ) -> c_int2771 pub fn DrawEscape(
2772 hdc: HDC,
2773 iEscape: c_int,
2774 cjIn: c_int,
2775 lpIn: LPCSTR,
2776 ) -> c_int;
Ellipse( hdc: HDC, left: c_int, top: c_int, right: c_int, bottom: c_int, ) -> BOOL2777 pub fn Ellipse(
2778 hdc: HDC,
2779 left: c_int,
2780 top: c_int,
2781 right: c_int,
2782 bottom: c_int,
2783 ) -> BOOL;
EnumFontFamiliesExA( hdc: HDC, lpLogfont: LPLOGFONTA, lpProc: FONTENUMPROCA, lParam: LPARAM, dwFlags: DWORD, ) -> c_int2784 pub fn EnumFontFamiliesExA(
2785 hdc: HDC,
2786 lpLogfont: LPLOGFONTA,
2787 lpProc: FONTENUMPROCA,
2788 lParam: LPARAM,
2789 dwFlags: DWORD,
2790 ) -> c_int;
EnumFontFamiliesExW( hdc: HDC, lpLogfont: LPLOGFONTW, lpProc: FONTENUMPROCW, lParam: LPARAM, dwFlags: DWORD, ) -> c_int2791 pub fn EnumFontFamiliesExW(
2792 hdc: HDC,
2793 lpLogfont: LPLOGFONTW,
2794 lpProc: FONTENUMPROCW,
2795 lParam: LPARAM,
2796 dwFlags: DWORD,
2797 ) -> c_int;
EnumFontFamiliesA( hdc: HDC, lpLogfont: LPCSTR, lpProc: FONTENUMPROCA, lParam: LPARAM, ) -> c_int2798 pub fn EnumFontFamiliesA(
2799 hdc: HDC,
2800 lpLogfont: LPCSTR,
2801 lpProc: FONTENUMPROCA,
2802 lParam: LPARAM,
2803 ) -> c_int;
EnumFontFamiliesW( hdc: HDC, lpLogfont: LPCWSTR, lpProc: FONTENUMPROCW, lParam: LPARAM, ) -> c_int2804 pub fn EnumFontFamiliesW(
2805 hdc: HDC,
2806 lpLogfont: LPCWSTR,
2807 lpProc: FONTENUMPROCW,
2808 lParam: LPARAM,
2809 ) -> c_int;
EnumFontsA( hdc: HDC, lpLogfont: LPCSTR, lpProc: FONTENUMPROCA, lParam: LPARAM, ) -> c_int2810 pub fn EnumFontsA(
2811 hdc: HDC,
2812 lpLogfont: LPCSTR,
2813 lpProc: FONTENUMPROCA,
2814 lParam: LPARAM,
2815 ) -> c_int;
EnumFontsW( hdc: HDC, lpLogfont: LPCWSTR, lpProc: FONTENUMPROCW, lParam: LPARAM, ) -> c_int2816 pub fn EnumFontsW(
2817 hdc: HDC,
2818 lpLogfont: LPCWSTR,
2819 lpProc: FONTENUMPROCW,
2820 lParam: LPARAM,
2821 ) -> c_int;
EnumObjects( hdc: HDC, nType: c_int, lpFunc: GOBJENUMPROC, lParam: LPARAM, ) -> c_int2822 pub fn EnumObjects(
2823 hdc: HDC,
2824 nType: c_int,
2825 lpFunc: GOBJENUMPROC,
2826 lParam: LPARAM,
2827 ) -> c_int;
EqualRgn( hrgn1: HRGN, hrgn2: HRGN, ) -> BOOL2828 pub fn EqualRgn(
2829 hrgn1: HRGN,
2830 hrgn2: HRGN,
2831 ) -> BOOL;
Escape( hdc: HDC, iEscape: c_int, cjIn: c_int, pvIn: LPCSTR, pvOut: LPVOID, ) -> c_int2832 pub fn Escape(
2833 hdc: HDC,
2834 iEscape: c_int,
2835 cjIn: c_int,
2836 pvIn: LPCSTR,
2837 pvOut: LPVOID,
2838 ) -> c_int;
ExtEscape( hdc: HDC, iEscape: c_int, cjInput: c_int, lpInData: LPCSTR, cjOutput: c_int, lpOutData: LPSTR, ) -> c_int2839 pub fn ExtEscape(
2840 hdc: HDC,
2841 iEscape: c_int,
2842 cjInput: c_int,
2843 lpInData: LPCSTR,
2844 cjOutput: c_int,
2845 lpOutData: LPSTR,
2846 ) -> c_int;
ExcludeClipRect( hdc: HDC, left: c_int, top: c_int, right: c_int, bottom: c_int, ) -> c_int2847 pub fn ExcludeClipRect(
2848 hdc: HDC,
2849 left: c_int,
2850 top: c_int,
2851 right: c_int,
2852 bottom: c_int,
2853 ) -> c_int;
ExtCreateRegion( lpx: *const XFORM, nCount: DWORD, lpData: *const RGNDATA, ) -> HRGN2854 pub fn ExtCreateRegion(
2855 lpx: *const XFORM,
2856 nCount: DWORD,
2857 lpData: *const RGNDATA,
2858 ) -> HRGN;
ExtFloodFill( hdc: HDC, x: c_int, y: c_int, color: COLORREF, utype: UINT, ) -> BOOL2859 pub fn ExtFloodFill(
2860 hdc: HDC,
2861 x: c_int,
2862 y: c_int,
2863 color: COLORREF,
2864 utype: UINT,
2865 ) -> BOOL;
FillRgn( hdc: HDC, hrgn: HRGN, hbr: HBRUSH, ) -> BOOL2866 pub fn FillRgn(
2867 hdc: HDC,
2868 hrgn: HRGN,
2869 hbr: HBRUSH,
2870 ) -> BOOL;
FloodFill( hdc: HDC, x: c_int, y: c_int, color: COLORREF, ) -> BOOL2871 pub fn FloodFill(
2872 hdc: HDC,
2873 x: c_int,
2874 y: c_int,
2875 color: COLORREF,
2876 ) -> BOOL;
FrameRgn( hdc: HDC, hrgn: HRGN, hbr: HBRUSH, w: c_int, h: c_int, ) -> BOOL2877 pub fn FrameRgn(
2878 hdc: HDC,
2879 hrgn: HRGN,
2880 hbr: HBRUSH,
2881 w: c_int,
2882 h: c_int,
2883 ) -> BOOL;
GetROP2( hdc: HDC, ) -> c_int2884 pub fn GetROP2(
2885 hdc: HDC,
2886 ) -> c_int;
GetAspectRatioFilterEx( hdc: HDC, lpsize: LPSIZE, ) -> BOOL2887 pub fn GetAspectRatioFilterEx(
2888 hdc: HDC,
2889 lpsize: LPSIZE,
2890 ) -> BOOL;
GetBkColor( hdc: HDC, ) -> COLORREF2891 pub fn GetBkColor(
2892 hdc: HDC,
2893 ) -> COLORREF;
GetDCBrushColor( hdc: HDC, ) -> COLORREF2894 pub fn GetDCBrushColor(
2895 hdc: HDC,
2896 ) -> COLORREF;
GetDCPenColor( hdc: HDC, ) -> COLORREF2897 pub fn GetDCPenColor(
2898 hdc: HDC,
2899 ) -> COLORREF;
GetBkMode( hdc: HDC, ) -> c_int2900 pub fn GetBkMode(
2901 hdc: HDC,
2902 ) -> c_int;
GetBitmapBits( hbit: HBITMAP, cb: LONG, lpvBits: LPVOID, ) -> LONG2903 pub fn GetBitmapBits(
2904 hbit: HBITMAP,
2905 cb: LONG,
2906 lpvBits: LPVOID,
2907 ) -> LONG;
GetBitmapDimensionEx( hbit: HBITMAP, lpsize: LPSIZE, ) -> BOOL2908 pub fn GetBitmapDimensionEx(
2909 hbit: HBITMAP,
2910 lpsize: LPSIZE,
2911 ) -> BOOL;
GetBoundsRect( hdc: HDC, lprect: LPRECT, flags: UINT, ) -> UINT2912 pub fn GetBoundsRect(
2913 hdc: HDC,
2914 lprect: LPRECT,
2915 flags: UINT,
2916 ) -> UINT;
GetBrushOrgEx( hdc: HDC, lppt: LPPOINT, ) -> BOOL2917 pub fn GetBrushOrgEx(
2918 hdc: HDC,
2919 lppt: LPPOINT,
2920 ) -> BOOL;
GetCharWidthA( hdc: HDC, iFirst: UINT, iLast: UINT, lpBuffer: LPINT, ) -> BOOL2921 pub fn GetCharWidthA(
2922 hdc: HDC,
2923 iFirst: UINT,
2924 iLast: UINT,
2925 lpBuffer: LPINT,
2926 ) -> BOOL;
GetCharWidthW( hdc: HDC, iFirst: UINT, iLast: UINT, lpBuffer: LPINT, ) -> BOOL2927 pub fn GetCharWidthW(
2928 hdc: HDC,
2929 iFirst: UINT,
2930 iLast: UINT,
2931 lpBuffer: LPINT,
2932 ) -> BOOL;
GetCharWidth32A( hdc: HDC, iFirst: UINT, iLast: UINT, lpBuffer: LPINT, ) -> BOOL2933 pub fn GetCharWidth32A(
2934 hdc: HDC,
2935 iFirst: UINT,
2936 iLast: UINT,
2937 lpBuffer: LPINT,
2938 ) -> BOOL;
GetCharWidth32W( hdc: HDC, iFirst: UINT, iLast: UINT, lpBuffer: LPINT, ) -> BOOL2939 pub fn GetCharWidth32W(
2940 hdc: HDC,
2941 iFirst: UINT,
2942 iLast: UINT,
2943 lpBuffer: LPINT,
2944 ) -> BOOL;
GetCharWidthFloatA( hdc: HDC, iFirst: UINT, iLast: UINT, lpBuffer: PFLOAT, ) -> BOOL2945 pub fn GetCharWidthFloatA(
2946 hdc: HDC,
2947 iFirst: UINT,
2948 iLast: UINT,
2949 lpBuffer: PFLOAT,
2950 ) -> BOOL;
GetCharWidthFloatW( hdc: HDC, iFirst: UINT, iLast: UINT, lpBuffer: PFLOAT, ) -> BOOL2951 pub fn GetCharWidthFloatW(
2952 hdc: HDC,
2953 iFirst: UINT,
2954 iLast: UINT,
2955 lpBuffer: PFLOAT,
2956 ) -> BOOL;
GetCharABCWidthsA( hdc: HDC, wFirst: UINT, wLast: UINT, lpABC: LPABC, ) -> BOOL2957 pub fn GetCharABCWidthsA(
2958 hdc: HDC,
2959 wFirst: UINT,
2960 wLast: UINT,
2961 lpABC: LPABC,
2962 ) -> BOOL;
GetCharABCWidthsW( hdc: HDC, wFirst: UINT, wLast: UINT, lpABC: LPABC, ) -> BOOL2963 pub fn GetCharABCWidthsW(
2964 hdc: HDC,
2965 wFirst: UINT,
2966 wLast: UINT,
2967 lpABC: LPABC,
2968 ) -> BOOL;
GetCharABCWidthsFloatA( hdc: HDC, iFirst: UINT, iLast: UINT, lpABC: LPABCFLOAT, ) -> BOOL2969 pub fn GetCharABCWidthsFloatA(
2970 hdc: HDC,
2971 iFirst: UINT,
2972 iLast: UINT,
2973 lpABC: LPABCFLOAT,
2974 ) -> BOOL;
GetCharABCWidthsFloatW( hdc: HDC, iFirst: UINT, iLast: UINT, lpABC: LPABCFLOAT, ) -> BOOL2975 pub fn GetCharABCWidthsFloatW(
2976 hdc: HDC,
2977 iFirst: UINT,
2978 iLast: UINT,
2979 lpABC: LPABCFLOAT,
2980 ) -> BOOL;
GetClipBox( hdc: HDC, lprect: LPRECT, ) -> c_int2981 pub fn GetClipBox(
2982 hdc: HDC,
2983 lprect: LPRECT,
2984 ) -> c_int;
GetClipRgn( hdc: HDC, hrgn: HRGN, ) -> c_int2985 pub fn GetClipRgn(
2986 hdc: HDC,
2987 hrgn: HRGN,
2988 ) -> c_int;
GetMetaRgn( hdc: HDC, hrgn: HRGN, ) -> c_int2989 pub fn GetMetaRgn(
2990 hdc: HDC,
2991 hrgn: HRGN,
2992 ) -> c_int;
GetCurrentObject( hdc: HDC, tp: UINT, ) -> HGDIOBJ2993 pub fn GetCurrentObject(
2994 hdc: HDC,
2995 tp: UINT,
2996 ) -> HGDIOBJ;
GetCurrentPositionEx( hdc: HDC, lppt: LPPOINT, ) -> BOOL2997 pub fn GetCurrentPositionEx(
2998 hdc: HDC,
2999 lppt: LPPOINT,
3000 ) -> BOOL;
GetDeviceCaps( hdc: HDC, nIndex: c_int, ) -> c_int3001 pub fn GetDeviceCaps(
3002 hdc: HDC,
3003 nIndex: c_int,
3004 ) -> c_int;
GetDIBits( hdc: HDC, hbm: HBITMAP, start: UINT, cLines: UINT, lpvBits: LPVOID, lpbmi: LPBITMAPINFO, usage: UINT, ) -> c_int3005 pub fn GetDIBits(
3006 hdc: HDC,
3007 hbm: HBITMAP,
3008 start: UINT,
3009 cLines: UINT,
3010 lpvBits: LPVOID,
3011 lpbmi: LPBITMAPINFO,
3012 usage: UINT,
3013 ) -> c_int;
GetFontData( hdc: HDC, dwTable: DWORD, dwOffset: DWORD, pvBuffer: PVOID, cjBuffer: DWORD, ) -> DWORD3014 pub fn GetFontData(
3015 hdc: HDC,
3016 dwTable: DWORD,
3017 dwOffset: DWORD,
3018 pvBuffer: PVOID,
3019 cjBuffer: DWORD,
3020 ) -> DWORD;
GetGlyphOutlineA( hdc: HDC, uChar: UINT, fuFormat: UINT, lpgm: LPGLYPHMETRICS, cjBuffer: DWORD, pvBuffer: LPVOID, lpmat2: *const MAT2, ) -> DWORD3021 pub fn GetGlyphOutlineA(
3022 hdc: HDC,
3023 uChar: UINT,
3024 fuFormat: UINT,
3025 lpgm: LPGLYPHMETRICS,
3026 cjBuffer: DWORD,
3027 pvBuffer: LPVOID,
3028 lpmat2: *const MAT2,
3029 ) -> DWORD;
GetGlyphOutlineW( hdc: HDC, uChar: UINT, fuFormat: UINT, lpgm: LPGLYPHMETRICS, cjBuffer: DWORD, pvBuffer: LPVOID, lpmat2: *const MAT2, ) -> DWORD3030 pub fn GetGlyphOutlineW(
3031 hdc: HDC,
3032 uChar: UINT,
3033 fuFormat: UINT,
3034 lpgm: LPGLYPHMETRICS,
3035 cjBuffer: DWORD,
3036 pvBuffer: LPVOID,
3037 lpmat2: *const MAT2,
3038 ) -> DWORD;
GetGraphicsMode( hdc: HDC, ) -> c_int3039 pub fn GetGraphicsMode(
3040 hdc: HDC,
3041 ) -> c_int;
GetMapMode( hdc: HDC, ) -> c_int3042 pub fn GetMapMode(
3043 hdc: HDC,
3044 ) -> c_int;
GetMetaFileBitsEx( hMF: HMETAFILE, cbBuffer: UINT, lpData: LPVOID, ) -> UINT3045 pub fn GetMetaFileBitsEx(
3046 hMF: HMETAFILE,
3047 cbBuffer: UINT,
3048 lpData: LPVOID,
3049 ) -> UINT;
GetMetaFileA( lpName: LPCSTR, ) -> HMETAFILE3050 pub fn GetMetaFileA(
3051 lpName: LPCSTR,
3052 ) -> HMETAFILE;
GetMetaFileW( lpName: LPCWSTR, ) -> HMETAFILE3053 pub fn GetMetaFileW(
3054 lpName: LPCWSTR,
3055 ) -> HMETAFILE;
GetNearestColor( hdc: HDC, color: COLORREF, ) -> COLORREF3056 pub fn GetNearestColor(
3057 hdc: HDC,
3058 color: COLORREF,
3059 ) -> COLORREF;
GetNearestPaletteIndex( h: HPALETTE, color: COLORREF, ) -> UINT3060 pub fn GetNearestPaletteIndex(
3061 h: HPALETTE,
3062 color: COLORREF,
3063 ) -> UINT;
GetObjectType( h: HGDIOBJ, ) -> DWORD3064 pub fn GetObjectType(
3065 h: HGDIOBJ,
3066 ) -> DWORD;
GetOutlineTextMetricsA( hdc: HDC, cjCopy: UINT, potm: LPOUTLINETEXTMETRICA, ) -> UINT3067 pub fn GetOutlineTextMetricsA(
3068 hdc: HDC,
3069 cjCopy: UINT,
3070 potm: LPOUTLINETEXTMETRICA,
3071 ) -> UINT;
GetOutlineTextMetricsW( hdc: HDC, cjCopy: UINT, potm: LPOUTLINETEXTMETRICW, ) -> UINT3072 pub fn GetOutlineTextMetricsW(
3073 hdc: HDC,
3074 cjCopy: UINT,
3075 potm: LPOUTLINETEXTMETRICW,
3076 ) -> UINT;
GetPaletteEntries( hpal: HPALETTE, iStart: UINT, cEntries: UINT, pPalEntries: LPPALETTEENTRY, ) -> UINT3077 pub fn GetPaletteEntries(
3078 hpal: HPALETTE,
3079 iStart: UINT,
3080 cEntries: UINT,
3081 pPalEntries: LPPALETTEENTRY,
3082 ) -> UINT;
GetPixel( hdc: HDC, x: c_int, y: c_int, ) -> COLORREF3083 pub fn GetPixel(
3084 hdc: HDC,
3085 x: c_int,
3086 y: c_int,
3087 ) -> COLORREF;
GetPixelFormat( hdc: HDC, ) -> c_int3088 pub fn GetPixelFormat(
3089 hdc: HDC,
3090 ) -> c_int;
GetPolyFillMode( hdc: HDC, ) -> c_int3091 pub fn GetPolyFillMode(
3092 hdc: HDC,
3093 ) -> c_int;
GetRasterizerCaps( lpraststat: LPRASTERIZER_STATUS, cjBytes: UINT, ) -> BOOL3094 pub fn GetRasterizerCaps(
3095 lpraststat: LPRASTERIZER_STATUS,
3096 cjBytes: UINT,
3097 ) -> BOOL;
GetRandomRgn( hdc: HDC, hrgn: HRGN, i: INT, ) -> c_int3098 pub fn GetRandomRgn (
3099 hdc: HDC,
3100 hrgn: HRGN,
3101 i: INT,
3102 ) -> c_int;
GetRegionData( hrgn: HRGN, nCount: DWORD, lpRgnData: LPRGNDATA, ) -> DWORD3103 pub fn GetRegionData(
3104 hrgn: HRGN,
3105 nCount: DWORD,
3106 lpRgnData: LPRGNDATA,
3107 ) -> DWORD;
GetRgnBox( hrgn: HRGN, lprc: LPRECT, ) -> c_int3108 pub fn GetRgnBox(
3109 hrgn: HRGN,
3110 lprc: LPRECT,
3111 ) -> c_int;
GetStockObject( i: c_int, ) -> HGDIOBJ3112 pub fn GetStockObject(
3113 i: c_int,
3114 ) -> HGDIOBJ;
GetStretchBltMode( hdc: HDC, ) -> c_int3115 pub fn GetStretchBltMode(
3116 hdc: HDC,
3117 ) -> c_int;
GetSystemPaletteEntries( hdc: HDC, iStart: UINT, cEntries: UINT, pPalEntries: LPPALETTEENTRY, ) -> UINT3118 pub fn GetSystemPaletteEntries(
3119 hdc: HDC,
3120 iStart: UINT,
3121 cEntries: UINT,
3122 pPalEntries: LPPALETTEENTRY,
3123 ) -> UINT;
GetSystemPaletteUse( hdc: HDC, ) -> UINT3124 pub fn GetSystemPaletteUse(
3125 hdc: HDC,
3126 ) -> UINT;
GetTextCharacterExtra( hdc: HDC, ) -> c_int3127 pub fn GetTextCharacterExtra(
3128 hdc: HDC,
3129 ) -> c_int;
GetTextAlign( hdc: HDC, ) -> UINT3130 pub fn GetTextAlign(
3131 hdc: HDC,
3132 ) -> UINT;
GetTextColor( hdc: HDC, ) -> COLORREF3133 pub fn GetTextColor(
3134 hdc: HDC,
3135 ) -> COLORREF;
GetTextExtentPointA( hdc: HDC, lpString: LPCSTR, c: c_int, lpsz: LPSIZE, ) -> BOOL3136 pub fn GetTextExtentPointA(
3137 hdc: HDC,
3138 lpString: LPCSTR,
3139 c: c_int,
3140 lpsz: LPSIZE,
3141 ) -> BOOL;
GetTextExtentPointW( hdc: HDC, lpString: LPCWSTR, c: c_int, lpsz: LPSIZE, ) -> BOOL3142 pub fn GetTextExtentPointW(
3143 hdc: HDC,
3144 lpString: LPCWSTR,
3145 c: c_int,
3146 lpsz: LPSIZE,
3147 ) -> BOOL;
GetTextExtentPoint32A( hdc: HDC, lpString: LPCSTR, c: c_int, psizl: LPSIZE, ) -> BOOL3148 pub fn GetTextExtentPoint32A(
3149 hdc: HDC,
3150 lpString: LPCSTR,
3151 c: c_int,
3152 psizl: LPSIZE,
3153 ) -> BOOL;
GetTextExtentPoint32W( hdc: HDC, lpString: LPCWSTR, c: c_int, psizl: LPSIZE, ) -> BOOL3154 pub fn GetTextExtentPoint32W(
3155 hdc: HDC,
3156 lpString: LPCWSTR,
3157 c: c_int,
3158 psizl: LPSIZE,
3159 ) -> BOOL;
GetTextExtentExPointA( hdc: HDC, lpszString: LPCSTR, cchString: c_int, nMaxExtent: c_int, lpnFit: LPINT, lpnDx: LPINT, lpSize: LPSIZE, ) -> BOOL3160 pub fn GetTextExtentExPointA(
3161 hdc: HDC,
3162 lpszString: LPCSTR,
3163 cchString: c_int,
3164 nMaxExtent: c_int,
3165 lpnFit: LPINT,
3166 lpnDx: LPINT,
3167 lpSize: LPSIZE,
3168 ) -> BOOL;
GetTextExtentExPointW( hdc: HDC, lpszString: LPCWSTR, cchString: c_int, nMaxExtent: c_int, lpnFit: LPINT, lpnDx: LPINT, lpSize: LPSIZE, ) -> BOOL3169 pub fn GetTextExtentExPointW(
3170 hdc: HDC,
3171 lpszString: LPCWSTR,
3172 cchString: c_int,
3173 nMaxExtent: c_int,
3174 lpnFit: LPINT,
3175 lpnDx: LPINT,
3176 lpSize: LPSIZE,
3177 ) -> BOOL;
GetTextCharset( hdc: HDC, ) -> c_int3178 pub fn GetTextCharset(
3179 hdc: HDC,
3180 ) -> c_int;
GetTextCharsetInfo( hdc: HDC, lpSig: LPFONTSIGNATURE, dwFlags: DWORD, ) -> c_int3181 pub fn GetTextCharsetInfo(
3182 hdc: HDC,
3183 lpSig: LPFONTSIGNATURE,
3184 dwFlags: DWORD,
3185 ) -> c_int;
TranslateCharsetInfo( lpSrc: *const DWORD, lpCs: LPCHARSETINFO, dwFlags: DWORD, ) -> BOOL3186 pub fn TranslateCharsetInfo(
3187 lpSrc: *const DWORD,
3188 lpCs: LPCHARSETINFO,
3189 dwFlags: DWORD,
3190 ) -> BOOL;
GetFontLanguageInfo( hdc: HDC, ) -> DWORD3191 pub fn GetFontLanguageInfo(
3192 hdc: HDC,
3193 ) -> DWORD;
GetCharacterPlacementA( hdc: HDC, lpString: LPCSTR, nCount: c_int, nMexExtent: c_int, lpResults: LPGCP_RESULTSA, dwFlags: DWORD, ) -> DWORD3194 pub fn GetCharacterPlacementA(
3195 hdc: HDC,
3196 lpString: LPCSTR,
3197 nCount: c_int,
3198 nMexExtent: c_int,
3199 lpResults: LPGCP_RESULTSA,
3200 dwFlags: DWORD,
3201 ) -> DWORD;
GetCharacterPlacementW( hdc: HDC, lpString: LPCWSTR, nCount: c_int, nMexExtent: c_int, lpResults: LPGCP_RESULTSW, dwFlags: DWORD, ) -> DWORD3202 pub fn GetCharacterPlacementW(
3203 hdc: HDC,
3204 lpString: LPCWSTR,
3205 nCount: c_int,
3206 nMexExtent: c_int,
3207 lpResults: LPGCP_RESULTSW,
3208 dwFlags: DWORD,
3209 ) -> DWORD;
3210 }
3211 STRUCT!{struct WCRANGE {
3212 wcLow: WCHAR,
3213 cGlyphs: USHORT,
3214 }}
3215 pub type PWCRANGE = *mut WCRANGE;
3216 pub type LPWCRANGE = *mut WCRANGE;
3217 STRUCT!{struct GLYPHSET {
3218 cbThis: DWORD,
3219 flAccel: DWORD,
3220 cGlyphsSupported: DWORD,
3221 cRanges: DWORD,
3222 ranges: [WCRANGE;1],
3223 }}
3224 pub type PGLYPHSET = *mut GLYPHSET;
3225 pub type LPGLYPHSET = *mut GLYPHSET;
3226 pub const GS_8BIT_INDICES: DWORD = 0x00000001;
3227 pub const GGI_MARK_NONEXISTING_GLYPHS: DWORD = 0x0001;
3228 extern "system" {
GetFontUnicodeRanges( hdc: HDC, lpgs: LPGLYPHSET, ) -> DWORD3229 pub fn GetFontUnicodeRanges(
3230 hdc: HDC,
3231 lpgs: LPGLYPHSET,
3232 ) -> DWORD;
GetGlyphIndicesA( hdc: HDC, lpstr: LPCSTR, c: c_int, pgi: LPWORD, fl: DWORD, ) -> DWORD3233 pub fn GetGlyphIndicesA(
3234 hdc: HDC,
3235 lpstr: LPCSTR,
3236 c: c_int,
3237 pgi: LPWORD,
3238 fl: DWORD,
3239 ) -> DWORD;
GetGlyphIndicesW( hdc: HDC, lpstr: LPCWSTR, c: c_int, pgi: LPWORD, fl: DWORD, ) -> DWORD3240 pub fn GetGlyphIndicesW(
3241 hdc: HDC,
3242 lpstr: LPCWSTR,
3243 c: c_int,
3244 pgi: LPWORD,
3245 fl: DWORD,
3246 ) -> DWORD;
GetTextExtentPointI( hdc: HDC, pgiIn: LPWORD, cgi: c_int, psize: LPSIZE, ) -> BOOL3247 pub fn GetTextExtentPointI(
3248 hdc: HDC,
3249 pgiIn: LPWORD,
3250 cgi: c_int,
3251 psize: LPSIZE,
3252 ) -> BOOL;
GetTextExtentExPointI( hdc: HDC, lpwszString: LPWORD, cwchString: c_int, nMaxExtent: c_int, lpnFit: LPINT, lpnDx: LPINT, lpSize: LPSIZE, ) -> BOOL3253 pub fn GetTextExtentExPointI(
3254 hdc: HDC,
3255 lpwszString: LPWORD,
3256 cwchString: c_int,
3257 nMaxExtent: c_int,
3258 lpnFit: LPINT,
3259 lpnDx: LPINT,
3260 lpSize: LPSIZE,
3261 ) -> BOOL;
GetCharWidthI( hdc: HDC, giFirst: UINT, cgi: UINT, pgi: LPWORD, piWidths: LPINT, ) -> BOOL3262 pub fn GetCharWidthI(
3263 hdc: HDC,
3264 giFirst: UINT,
3265 cgi: UINT,
3266 pgi: LPWORD,
3267 piWidths: LPINT,
3268 ) -> BOOL;
GetCharABCWidthsI( hdc: HDC, giFirst: UINT, cgi: UINT, pgi: LPWORD, pabc: LPABC, ) -> BOOL3269 pub fn GetCharABCWidthsI(
3270 hdc: HDC,
3271 giFirst: UINT,
3272 cgi: UINT,
3273 pgi: LPWORD,
3274 pabc: LPABC,
3275 ) -> BOOL;
3276 }
3277 pub const STAMP_DESIGNVECTOR: DWORD = 0x8000000 + 0x64 + (0x76 << 8);
3278 pub const STAMP_AXESLIST: DWORD = 0x8000000 + 0x61 + (0x6c << 8);
3279 pub const STAMP_TRUETYPE_VARIATION: DWORD = 0x8000000 + 0x74 + (0x76 << 8);
3280 pub const MM_MAX_NUMAXES: usize = 16;
3281 STRUCT!{struct DESIGNVECTOR {
3282 dvReserved: DWORD,
3283 dvNumAxes: DWORD,
3284 dvValues: [LONG; MM_MAX_NUMAXES],
3285 }}
3286 pub type PDESIGNVECTOR = *mut DESIGNVECTOR;
3287 pub type LPDESIGNVECTOR = *mut DESIGNVECTOR;
3288 extern "system" {
AddFontResourceExA( lpszFilename: LPCSTR, fl: DWORD, pdv: PVOID, ) -> c_int3289 pub fn AddFontResourceExA(
3290 lpszFilename: LPCSTR,
3291 fl: DWORD,
3292 pdv: PVOID,
3293 ) -> c_int;
AddFontResourceExW( lpszFilename: LPCWSTR, fl: DWORD, pdv: PVOID, ) -> c_int3294 pub fn AddFontResourceExW(
3295 lpszFilename: LPCWSTR,
3296 fl: DWORD,
3297 pdv: PVOID,
3298 ) -> c_int;
RemoveFontResourceExA( name: LPCSTR, fl: DWORD, pdv: PVOID, ) -> BOOL3299 pub fn RemoveFontResourceExA(
3300 name: LPCSTR,
3301 fl: DWORD,
3302 pdv: PVOID,
3303 ) -> BOOL;
RemoveFontResourceExW( name: LPCWSTR, fl: DWORD, pdv: PVOID, ) -> BOOL3304 pub fn RemoveFontResourceExW(
3305 name: LPCWSTR,
3306 fl: DWORD,
3307 pdv: PVOID,
3308 ) -> BOOL;
AddFontMemResourceEx( pbFont: PVOID, cbSize: DWORD, pdv: PVOID, pcFonts: *mut DWORD, ) -> HANDLE3309 pub fn AddFontMemResourceEx(
3310 pbFont: PVOID,
3311 cbSize: DWORD,
3312 pdv: PVOID,
3313 pcFonts: *mut DWORD,
3314 ) -> HANDLE;
RemoveFontMemResourceEx( h: HANDLE, ) -> BOOL3315 pub fn RemoveFontMemResourceEx(
3316 h: HANDLE,
3317 ) -> BOOL;
3318 }
3319 pub const FR_PRIVATE: DWORD = 0x10;
3320 pub const FR_NOT_ENUM: DWORD = 0x20;
3321 pub const MM_MAX_AXES_NAMELEN: usize = 16;
3322 STRUCT!{struct AXISINFOA {
3323 axMinValue: LONG,
3324 axMaxValue: LONG,
3325 axAxisName: [BYTE; MM_MAX_AXES_NAMELEN],
3326 }}
3327 pub type PAXISINFOA = *mut AXISINFOA;
3328 pub type LPAXISINFOA = *mut AXISINFOA;
3329 STRUCT!{struct AXISINFOW {
3330 axMinValue: LONG,
3331 axMaxValue: LONG,
3332 axAxisName: [WCHAR; MM_MAX_AXES_NAMELEN],
3333 }}
3334 pub type PAXISINFOW = *mut AXISINFOW;
3335 pub type LPAXISINFOW = *mut AXISINFOW;
3336 STRUCT!{struct AXESLISTA {
3337 axlReserved: DWORD,
3338 axlNumAxes: DWORD,
3339 axlAxisInfo: [AXISINFOA; MM_MAX_AXES_NAMELEN],
3340 }}
3341 pub type PAXESLISTA = *mut AXESLISTA;
3342 pub type LPAXESLISTA = *mut AXESLISTA;
3343 STRUCT!{struct AXESLISTW {
3344 axlReserved: DWORD,
3345 axlNumAxes: DWORD,
3346 axlAxisInfo: [AXISINFOW; MM_MAX_AXES_NAMELEN],
3347 }}
3348 pub type PAXESLISTW = *mut AXESLISTW;
3349 pub type LPAXESLISTW = *mut AXESLISTW;
3350 STRUCT!{struct ENUMLOGFONTEXDVA {
3351 elfEnumLogfontEx: ENUMLOGFONTEXA,
3352 elfDesignVector: DESIGNVECTOR,
3353 }}
3354 pub type PENUMLOGFONTEXDVA = *mut ENUMLOGFONTEXDVA;
3355 pub type LPENUMLOGFONTEXDVA = *mut ENUMLOGFONTEXDVA;
3356 STRUCT!{struct ENUMLOGFONTEXDVW {
3357 elfEnumLogfontEx: ENUMLOGFONTEXW,
3358 elfDesignVector: DESIGNVECTOR,
3359 }}
3360 pub type PENUMLOGFONTEXDVW = *mut ENUMLOGFONTEXDVW;
3361 pub type LPENUMLOGFONTEXDVW = *mut ENUMLOGFONTEXDVW;
3362 extern "system" {
CreateFontIndirectExA( penumlfex: *const ENUMLOGFONTEXDVA, ) -> HFONT3363 pub fn CreateFontIndirectExA(
3364 penumlfex: *const ENUMLOGFONTEXDVA,
3365 ) -> HFONT;
CreateFontIndirectExW( penumlfex: *const ENUMLOGFONTEXDVW, ) -> HFONT3366 pub fn CreateFontIndirectExW(
3367 penumlfex: *const ENUMLOGFONTEXDVW,
3368 ) -> HFONT;
3369 }
3370 STRUCT!{struct ENUMTEXTMETRICA {
3371 etmNewTextMetricEx: NEWTEXTMETRICEXA,
3372 etmAxesList: AXESLISTA,
3373 }}
3374 pub type PENUMTEXTMETRICA = *mut ENUMTEXTMETRICA;
3375 pub type LPENUMTEXTMETRICA = *mut ENUMTEXTMETRICA;
3376 STRUCT!{struct ENUMTEXTMETRICW {
3377 etmNewTextMetricEx: NEWTEXTMETRICEXW,
3378 etmAxesList: AXESLISTW,
3379 }}
3380 pub type PENUMTEXTMETRICW = *mut ENUMTEXTMETRICW;
3381 pub type LPENUMTEXTMETRICW = *mut ENUMTEXTMETRICW;
3382 extern "system" {
GetViewportExtEx( hdc: HDC, lpsize: LPSIZE, ) -> BOOL3383 pub fn GetViewportExtEx(
3384 hdc: HDC,
3385 lpsize: LPSIZE,
3386 ) -> BOOL;
GetViewportOrgEx( hdc: HDC, lppoint: LPPOINT, ) -> BOOL3387 pub fn GetViewportOrgEx(
3388 hdc: HDC,
3389 lppoint: LPPOINT,
3390 ) -> BOOL;
GetWindowExtEx( hdc: HDC, lpsize: LPSIZE, ) -> BOOL3391 pub fn GetWindowExtEx(
3392 hdc: HDC,
3393 lpsize: LPSIZE,
3394 ) -> BOOL;
GetWindowOrgEx( hdc: HDC, lppoint: LPPOINT, ) -> BOOL3395 pub fn GetWindowOrgEx(
3396 hdc: HDC,
3397 lppoint: LPPOINT,
3398 ) -> BOOL;
IntersectClipRect( hdc: HDC, left: c_int, top: c_int, right: c_int, bottom: c_int, ) -> c_int3399 pub fn IntersectClipRect(
3400 hdc: HDC,
3401 left: c_int,
3402 top: c_int,
3403 right: c_int,
3404 bottom: c_int,
3405 ) -> c_int;
InvertRgn( hdc: HDC, hrgn: HRGN, ) -> BOOL3406 pub fn InvertRgn(
3407 hdc: HDC,
3408 hrgn: HRGN,
3409 ) -> BOOL;
LineDDA( nXStart: c_int, nYStart: c_int, nXEnd: c_int, nYEnd: c_int, lpLineFunc: LINEDDAPROC, lpData: LPARAM, ) -> BOOL3410 pub fn LineDDA(
3411 nXStart: c_int,
3412 nYStart: c_int,
3413 nXEnd: c_int,
3414 nYEnd: c_int,
3415 lpLineFunc: LINEDDAPROC,
3416 lpData: LPARAM,
3417 ) -> BOOL;
LineTo( hdc: HDC, nXEnd: c_int, nYEnd: c_int, ) -> BOOL3418 pub fn LineTo(
3419 hdc: HDC,
3420 nXEnd: c_int,
3421 nYEnd: c_int,
3422 ) -> BOOL;
MaskBlt( hdcDest: HDC, xDest: c_int, yDest: c_int, width: c_int, height: c_int, hdcSrc: HDC, xSrc: c_int, ySrc: c_int, hbmMask: HBITMAP, xMask: c_int, yMask: c_int, rop: DWORD, ) -> BOOL3423 pub fn MaskBlt(
3424 hdcDest: HDC,
3425 xDest: c_int,
3426 yDest: c_int,
3427 width: c_int,
3428 height: c_int,
3429 hdcSrc: HDC,
3430 xSrc: c_int,
3431 ySrc: c_int,
3432 hbmMask: HBITMAP,
3433 xMask: c_int,
3434 yMask: c_int,
3435 rop: DWORD,
3436 ) -> BOOL;
PlgBlt( hdcDest: HDC, lpPoint: *const POINT, hdcSrc: HDC, xSrc: c_int, ySrc: c_int, width: c_int, height: c_int, hbmMask: HBITMAP, xMask: c_int, yMask: c_int, ) -> BOOL3437 pub fn PlgBlt(
3438 hdcDest: HDC,
3439 lpPoint: *const POINT,
3440 hdcSrc: HDC,
3441 xSrc: c_int,
3442 ySrc: c_int,
3443 width: c_int,
3444 height: c_int,
3445 hbmMask: HBITMAP,
3446 xMask: c_int,
3447 yMask: c_int,
3448 ) -> BOOL;
OffsetClipRgn( hdc: HDC, x: c_int, y: c_int, ) -> c_int3449 pub fn OffsetClipRgn(
3450 hdc: HDC,
3451 x: c_int,
3452 y: c_int,
3453 ) -> c_int;
OffsetRgn( hrgn: HRGN, x: c_int, y: c_int, ) -> c_int3454 pub fn OffsetRgn(
3455 hrgn: HRGN,
3456 x: c_int,
3457 y: c_int,
3458 ) -> c_int;
PatBlt( hdc: HDC, nXLeft: c_int, nYLeft: c_int, nWidth: c_int, nHeight: c_int, dwRop: DWORD, ) -> BOOL3459 pub fn PatBlt(
3460 hdc: HDC,
3461 nXLeft: c_int,
3462 nYLeft: c_int,
3463 nWidth: c_int,
3464 nHeight: c_int,
3465 dwRop: DWORD,
3466 ) -> BOOL;
Pie( hdc: HDC, nLeftRect: c_int, nTopRect: c_int, nRightRect: c_int, nBottomRect: c_int, nXRadial1: c_int, nYRadial1: c_int, nXRadial2: c_int, nYRadial2: c_int, ) -> BOOL3467 pub fn Pie(
3468 hdc: HDC,
3469 nLeftRect: c_int,
3470 nTopRect: c_int,
3471 nRightRect: c_int,
3472 nBottomRect: c_int,
3473 nXRadial1: c_int,
3474 nYRadial1: c_int,
3475 nXRadial2: c_int,
3476 nYRadial2: c_int,
3477 ) -> BOOL;
PlayMetaFile( hdc: HDC, hmf: HMETAFILE, ) -> BOOL3478 pub fn PlayMetaFile(
3479 hdc: HDC,
3480 hmf: HMETAFILE,
3481 ) -> BOOL;
PaintRgn( hdc: HDC, hrgn: HRGN, ) -> BOOL3482 pub fn PaintRgn(
3483 hdc: HDC,
3484 hrgn: HRGN,
3485 ) -> BOOL;
PolyPolygon( hdc: HDC, lpPoints: *const POINT, lpPolyCounts: *const INT, cCount: DWORD, ) -> BOOL3486 pub fn PolyPolygon(
3487 hdc: HDC,
3488 lpPoints: *const POINT,
3489 lpPolyCounts: *const INT,
3490 cCount: DWORD,
3491 ) -> BOOL;
PtInRegion( hrgn: HRGN, x: c_int, y: c_int, ) -> BOOL3492 pub fn PtInRegion(
3493 hrgn: HRGN,
3494 x: c_int,
3495 y: c_int,
3496 ) -> BOOL;
PtVisible( hdc: HDC, x: c_int, y: c_int, ) -> BOOL3497 pub fn PtVisible(
3498 hdc: HDC,
3499 x: c_int,
3500 y: c_int,
3501 ) -> BOOL;
RectInRegion( hrgn: HRGN, lprect: *const RECT, ) -> BOOL3502 pub fn RectInRegion(
3503 hrgn: HRGN,
3504 lprect: *const RECT,
3505 ) -> BOOL;
RectVisible( hdc: HDC, lprect: *const RECT, ) -> BOOL3506 pub fn RectVisible(
3507 hdc: HDC,
3508 lprect: *const RECT,
3509 ) -> BOOL;
Rectangle( hdc: HDC, left: c_int, top: c_int, right: c_int, bottom: c_int, ) -> BOOL3510 pub fn Rectangle(
3511 hdc: HDC,
3512 left: c_int,
3513 top: c_int,
3514 right: c_int,
3515 bottom: c_int,
3516 ) -> BOOL;
RestoreDC( hdc: HDC, nSavedDC: c_int, ) -> BOOL3517 pub fn RestoreDC(
3518 hdc: HDC,
3519 nSavedDC: c_int,
3520 ) -> BOOL;
ResetDCA( hdc: HDC, lpdm: *const DEVMODEA, ) -> HDC3521 pub fn ResetDCA(
3522 hdc: HDC,
3523 lpdm: *const DEVMODEA,
3524 ) -> HDC;
ResetDCW( hdc: HDC, lpdm: *const DEVMODEW, ) -> HDC3525 pub fn ResetDCW(
3526 hdc: HDC,
3527 lpdm: *const DEVMODEW,
3528 ) -> HDC;
RealizePalette( hdc: HDC, ) -> UINT3529 pub fn RealizePalette(
3530 hdc: HDC,
3531 ) -> UINT;
RemoveFontResourceA( lpFileName: LPCSTR, ) -> BOOL3532 pub fn RemoveFontResourceA(
3533 lpFileName: LPCSTR,
3534 ) -> BOOL;
RemoveFontResourceW( lpFileName: LPCWSTR, ) -> BOOL3535 pub fn RemoveFontResourceW(
3536 lpFileName: LPCWSTR,
3537 ) -> BOOL;
RoundRect( hdc: HDC, nLeftRect: c_int, nTopRect: c_int, nRightRect: c_int, nBottomRect: c_int, nWidth: c_int, nHeight: c_int, ) -> BOOL3538 pub fn RoundRect(
3539 hdc: HDC,
3540 nLeftRect: c_int,
3541 nTopRect: c_int,
3542 nRightRect: c_int,
3543 nBottomRect: c_int,
3544 nWidth: c_int,
3545 nHeight: c_int,
3546 ) -> BOOL;
ResizePalette( hpal: HPALETTE, n: UINT, ) -> BOOL3547 pub fn ResizePalette(
3548 hpal: HPALETTE,
3549 n: UINT,
3550 ) -> BOOL;
SaveDC( hdc: HDC, ) -> c_int3551 pub fn SaveDC(
3552 hdc: HDC,
3553 ) -> c_int;
SelectClipRgn( hdc: HDC, hrgn: HRGN, ) -> c_int3554 pub fn SelectClipRgn(
3555 hdc: HDC,
3556 hrgn: HRGN,
3557 ) -> c_int;
ExtSelectClipRgn( hdc: HDC, hrgn: HRGN, mode: c_int, ) -> c_int3558 pub fn ExtSelectClipRgn(
3559 hdc: HDC,
3560 hrgn: HRGN,
3561 mode: c_int,
3562 ) -> c_int;
SetMetaRgn( hdc: HDC, ) -> c_int3563 pub fn SetMetaRgn(
3564 hdc: HDC,
3565 ) -> c_int;
SelectObject( hdc: HDC, h: HGDIOBJ, ) -> HGDIOBJ3566 pub fn SelectObject(
3567 hdc: HDC,
3568 h: HGDIOBJ,
3569 ) -> HGDIOBJ;
SelectPalette( hdc: HDC, hPal: HPALETTE, bForceBkgd: BOOL, ) -> HPALETTE3570 pub fn SelectPalette(
3571 hdc: HDC,
3572 hPal: HPALETTE,
3573 bForceBkgd: BOOL,
3574 ) -> HPALETTE;
SetBkColor( hdc: HDC, color: COLORREF, ) -> COLORREF3575 pub fn SetBkColor(
3576 hdc: HDC,
3577 color: COLORREF,
3578 ) -> COLORREF;
SetDCBrushColor( hdc: HDC, color: COLORREF, ) -> COLORREF3579 pub fn SetDCBrushColor(
3580 hdc: HDC,
3581 color: COLORREF,
3582 ) -> COLORREF;
SetDCPenColor( hdc: HDC, color: COLORREF, ) -> COLORREF3583 pub fn SetDCPenColor(
3584 hdc: HDC,
3585 color: COLORREF,
3586 ) -> COLORREF;
SetBkMode( hdc: HDC, mode: c_int, ) -> c_int3587 pub fn SetBkMode(
3588 hdc: HDC,
3589 mode: c_int,
3590 ) -> c_int;
SetBitmapBits( hbm: HBITMAP, cb: DWORD, pvBits: *const VOID, ) -> LONG3591 pub fn SetBitmapBits(
3592 hbm: HBITMAP,
3593 cb: DWORD,
3594 pvBits: *const VOID,
3595 ) -> LONG;
SetBoundsRect( hdc: HDC, lprect: *const RECT, flags: UINT, ) -> UINT3596 pub fn SetBoundsRect(
3597 hdc: HDC,
3598 lprect: *const RECT,
3599 flags: UINT,
3600 ) -> UINT;
SetDIBits( hdc: HDC, hbm: HBITMAP, start: UINT, cLines: UINT, lpBits: *const VOID, lpbmi: *const BITMAPINFO, ColorUse: UINT, ) -> c_int3601 pub fn SetDIBits(
3602 hdc: HDC,
3603 hbm: HBITMAP,
3604 start: UINT,
3605 cLines: UINT,
3606 lpBits: *const VOID,
3607 lpbmi: *const BITMAPINFO,
3608 ColorUse: UINT,
3609 ) -> c_int;
SetDIBitsToDevice( hdc: HDC, xDest: c_int, yDest: c_int, w: DWORD, h: DWORD, xSrc: c_int, ySrc: c_int, StartScan: UINT, cLines: UINT, lpvBits: *const VOID, lpbmi: *const BITMAPINFO, ColorUse: UINT, ) -> c_int3610 pub fn SetDIBitsToDevice(
3611 hdc: HDC,
3612 xDest: c_int,
3613 yDest: c_int,
3614 w: DWORD,
3615 h: DWORD,
3616 xSrc: c_int,
3617 ySrc: c_int,
3618 StartScan: UINT,
3619 cLines: UINT,
3620 lpvBits: *const VOID,
3621 lpbmi: *const BITMAPINFO,
3622 ColorUse: UINT,
3623 ) -> c_int;
SetMapperFlags( hdc: HDC, flags: DWORD, ) -> DWORD3624 pub fn SetMapperFlags(
3625 hdc: HDC,
3626 flags: DWORD,
3627 ) -> DWORD;
SetGraphicsMode( hdc: HDC, iMode: c_int, ) -> c_int3628 pub fn SetGraphicsMode(
3629 hdc: HDC,
3630 iMode: c_int,
3631 ) -> c_int;
SetMapMode( hdc: HDC, mode: c_int, ) -> c_int3632 pub fn SetMapMode(
3633 hdc: HDC,
3634 mode: c_int,
3635 ) -> c_int;
SetLayout( hdc: HDC, l: DWORD, ) -> DWORD3636 pub fn SetLayout(
3637 hdc: HDC,
3638 l: DWORD,
3639 ) -> DWORD;
GetLayout( hdc: HDC, ) -> DWORD3640 pub fn GetLayout(
3641 hdc: HDC,
3642 ) -> DWORD;
SetMetaFileBitsEx( cbBuffer: UINT, lpData: *const BYTE, ) -> HMETAFILE3643 pub fn SetMetaFileBitsEx(
3644 cbBuffer: UINT,
3645 lpData: *const BYTE,
3646 ) -> HMETAFILE;
SetPaletteEntries( hpal: HPALETTE, iStart: UINT, cEntries: UINT, pPalEntries: *const PALETTEENTRY, ) -> UINT3647 pub fn SetPaletteEntries(
3648 hpal: HPALETTE,
3649 iStart: UINT,
3650 cEntries: UINT,
3651 pPalEntries: *const PALETTEENTRY,
3652 ) -> UINT;
SetPixel( hdc: HDC, x: c_int, y: c_int, color: COLORREF, ) -> COLORREF3653 pub fn SetPixel(
3654 hdc: HDC,
3655 x: c_int,
3656 y: c_int,
3657 color: COLORREF,
3658 ) -> COLORREF;
SetPixelV( hdc: HDC, x: c_int, y: c_int, color: COLORREF, ) -> BOOL3659 pub fn SetPixelV(
3660 hdc: HDC,
3661 x: c_int,
3662 y: c_int,
3663 color: COLORREF,
3664 ) -> BOOL;
SetPixelFormat( hdc: HDC, iPixelFormat: c_int, ppfd: *const PIXELFORMATDESCRIPTOR, ) -> BOOL3665 pub fn SetPixelFormat(
3666 hdc: HDC,
3667 iPixelFormat: c_int,
3668 ppfd: *const PIXELFORMATDESCRIPTOR,
3669 ) -> BOOL;
SetPolyFillMode( hdc: HDC, iPolyFillMode: c_int, ) -> c_int3670 pub fn SetPolyFillMode(
3671 hdc: HDC,
3672 iPolyFillMode: c_int,
3673 ) -> c_int;
StretchBlt( hdcDest: HDC, xDest: c_int, yDest: c_int, wDest: c_int, hDest: c_int, hdcSrc: HDC, xSrc: c_int, ySrc: c_int, wSrc: c_int, hSrc: c_int, rop: DWORD, ) -> BOOL3674 pub fn StretchBlt(
3675 hdcDest: HDC,
3676 xDest: c_int,
3677 yDest: c_int,
3678 wDest: c_int,
3679 hDest: c_int,
3680 hdcSrc: HDC,
3681 xSrc: c_int,
3682 ySrc: c_int,
3683 wSrc: c_int,
3684 hSrc: c_int,
3685 rop: DWORD,
3686 ) -> BOOL;
SetRectRgn( hrgn: HRGN, left: c_int, top: c_int, right: c_int, bottom: c_int, ) -> BOOL3687 pub fn SetRectRgn(
3688 hrgn: HRGN,
3689 left: c_int,
3690 top: c_int,
3691 right: c_int,
3692 bottom: c_int,
3693 ) -> BOOL;
StretchDIBits( hdc: HDC, XDest: c_int, YDest: c_int, nDestWidth: c_int, nDestHeight: c_int, XSrc: c_int, YSrc: c_int, nSrcWidth: c_int, nSrcHeight: c_int, lpBits: *const VOID, lpBitsInfo: *const BITMAPINFO, iUsage: UINT, dwRop: DWORD, ) -> c_int3694 pub fn StretchDIBits(
3695 hdc: HDC,
3696 XDest: c_int,
3697 YDest: c_int,
3698 nDestWidth: c_int,
3699 nDestHeight: c_int,
3700 XSrc: c_int,
3701 YSrc: c_int,
3702 nSrcWidth: c_int,
3703 nSrcHeight: c_int,
3704 lpBits: *const VOID,
3705 lpBitsInfo: *const BITMAPINFO,
3706 iUsage: UINT,
3707 dwRop: DWORD,
3708 ) -> c_int;
SetROP2( hdc: HDC, rop2: c_int, ) -> c_int3709 pub fn SetROP2(
3710 hdc: HDC,
3711 rop2: c_int,
3712 ) -> c_int;
SetStretchBltMode( hdc: HDC, mode: c_int, ) -> c_int3713 pub fn SetStretchBltMode(
3714 hdc: HDC,
3715 mode: c_int,
3716 ) -> c_int;
SetSystemPaletteUse( hdc: HDC, uuse: UINT, ) -> UINT3717 pub fn SetSystemPaletteUse(
3718 hdc: HDC,
3719 uuse: UINT,
3720 ) -> UINT;
SetTextCharacterExtra( hdc: HDC, extra: c_int, ) -> c_int3721 pub fn SetTextCharacterExtra(
3722 hdc: HDC,
3723 extra: c_int,
3724 ) -> c_int;
SetTextColor( hdc: HDC, color: COLORREF, ) -> COLORREF3725 pub fn SetTextColor(
3726 hdc: HDC,
3727 color: COLORREF,
3728 ) -> COLORREF;
SetTextAlign( hdc: HDC, align: UINT, ) -> UINT3729 pub fn SetTextAlign(
3730 hdc: HDC,
3731 align: UINT,
3732 ) -> UINT;
SetTextJustification( hdc: HDC, extra: c_int, count: c_int, ) -> BOOL3733 pub fn SetTextJustification(
3734 hdc: HDC,
3735 extra: c_int,
3736 count: c_int,
3737 ) -> BOOL;
UpdateColors( hdc: HDC, ) -> BOOL3738 pub fn UpdateColors(
3739 hdc: HDC,
3740 ) -> BOOL;
3741 }
3742 pub type COLOR16 = c_ushort;
3743 STRUCT!{struct TRIVERTEX {
3744 x: LONG,
3745 y: LONG,
3746 Red: COLOR16,
3747 Green: COLOR16,
3748 Blue: COLOR16,
3749 Alpha: COLOR16,
3750 }}
3751 pub type PTRIVERTEX = *mut TRIVERTEX;
3752 pub type LPTRIVERTEX = *mut TRIVERTEX;
3753 STRUCT!{struct GRADIENT_RECT {
3754 UpperLeft: ULONG,
3755 LowerRight: ULONG,
3756 }}
3757 pub type PGRADIENT_RECT = *mut GRADIENT_RECT;
3758 pub type LPGRADIENT_RECT = *mut GRADIENT_RECT;
3759 STRUCT!{struct BLENDFUNCTION {
3760 BlendOp: BYTE,
3761 BlendFlags: BYTE,
3762 SourceConstantAlpha: BYTE,
3763 AlphaFormat: BYTE,
3764 }}
3765 pub type PBLENDFUNCTION = *mut BLENDFUNCTION;
3766 pub const AC_SRC_OVER: BYTE = 0x00;
3767 pub const AC_SRC_ALPHA: BYTE = 0x01;
3768 extern "system" {
AlphaBlend( hdcDest: HDC, xoriginDest: c_int, yoriginDest: c_int, wDest: c_int, hDest: c_int, hdcSrc: HDC, xoriginSrc: c_int, yoriginSrc: c_int, wSrc: c_int, hSrc: c_int, ftn: BLENDFUNCTION, ) -> BOOL3769 pub fn AlphaBlend(
3770 hdcDest: HDC,
3771 xoriginDest: c_int,
3772 yoriginDest: c_int,
3773 wDest: c_int,
3774 hDest: c_int,
3775 hdcSrc: HDC,
3776 xoriginSrc: c_int,
3777 yoriginSrc: c_int,
3778 wSrc: c_int,
3779 hSrc: c_int,
3780 ftn: BLENDFUNCTION,
3781 ) -> BOOL;
TransparentBlt( hdcDest: HDC, xoriginDest: c_int, yoriginDest: c_int, wDest: c_int, hDest: c_int, hdcSrc: HDC, xoriginSrc: c_int, yoriginSrc: c_int, wSrc: c_int, hSrc: c_int, crTransparent: UINT, ) -> BOOL3782 pub fn TransparentBlt(
3783 hdcDest: HDC,
3784 xoriginDest: c_int,
3785 yoriginDest: c_int,
3786 wDest: c_int,
3787 hDest: c_int,
3788 hdcSrc: HDC,
3789 xoriginSrc: c_int,
3790 yoriginSrc: c_int,
3791 wSrc: c_int,
3792 hSrc: c_int,
3793 crTransparent: UINT,
3794 ) -> BOOL;
3795 }
3796 pub const GRADIENT_FILL_RECT_H: ULONG = 0x00000000;
3797 pub const GRADIENT_FILL_RECT_V: ULONG = 0x00000001;
3798 pub const GRADIENT_FILL_TRIANGLE: ULONG = 0x00000002;
3799 pub const GRADIENT_FILL_OP_FLAG: ULONG = 0x000000ff;
3800 extern "system" {
GradientFill( hdc: HDC, pVertex: PTRIVERTEX, nVertex: ULONG, pMesh: PVOID, nMesh: ULONG, ulMode: ULONG, ) -> BOOL3801 pub fn GradientFill(
3802 hdc: HDC,
3803 pVertex: PTRIVERTEX,
3804 nVertex: ULONG,
3805 pMesh: PVOID,
3806 nMesh: ULONG,
3807 ulMode: ULONG,
3808 ) -> BOOL;
GdiAlphaBlend( hdcDest: HDC, xoriginDest: c_int, yoriginDest: c_int, wDest: c_int, hDest: c_int, hdcSrc: HDC, xoriginSrc: c_int, yoriginSrc: c_int, wSrc: c_int, hSrc: c_int, ftn: BLENDFUNCTION, ) -> BOOL3809 pub fn GdiAlphaBlend(
3810 hdcDest: HDC,
3811 xoriginDest: c_int,
3812 yoriginDest: c_int,
3813 wDest: c_int,
3814 hDest: c_int,
3815 hdcSrc: HDC,
3816 xoriginSrc: c_int,
3817 yoriginSrc: c_int,
3818 wSrc: c_int,
3819 hSrc: c_int,
3820 ftn: BLENDFUNCTION,
3821 ) -> BOOL;
GdiTransparentBlt( hdcDest: HDC, xoriginDest: c_int, yoriginDest: c_int, wDest: c_int, hDest: c_int, hdcSrc: HDC, xoriginSrc: c_int, yoriginSrc: c_int, wSrc: c_int, hSrc: c_int, crTransparent: UINT, ) -> BOOL3822 pub fn GdiTransparentBlt(
3823 hdcDest: HDC,
3824 xoriginDest: c_int,
3825 yoriginDest: c_int,
3826 wDest: c_int,
3827 hDest: c_int,
3828 hdcSrc: HDC,
3829 xoriginSrc: c_int,
3830 yoriginSrc: c_int,
3831 wSrc: c_int,
3832 hSrc: c_int,
3833 crTransparent: UINT,
3834 ) -> BOOL;
GdiGradientFill( hdc: HDC, pVertex: PTRIVERTEX, nVertex: ULONG, pMesh: PVOID, nCount: ULONG, ulMode: ULONG, ) -> BOOL3835 pub fn GdiGradientFill(
3836 hdc: HDC,
3837 pVertex: PTRIVERTEX,
3838 nVertex: ULONG,
3839 pMesh: PVOID,
3840 nCount: ULONG,
3841 ulMode: ULONG,
3842 ) -> BOOL;
PlayMetaFileRecord( hdc: HDC, lpHandleTable: LPHANDLETABLE, lpMR: LPMETARECORD, noObjs: UINT, ) -> BOOL3843 pub fn PlayMetaFileRecord(
3844 hdc: HDC,
3845 lpHandleTable: LPHANDLETABLE,
3846 lpMR: LPMETARECORD,
3847 noObjs: UINT,
3848 ) -> BOOL;
3849 }
3850 FN!{stdcall MFENUMPROC(
3851 hdc: HDC,
3852 lpht: *mut HANDLETABLE,
3853 lpMR: *mut METARECORD,
3854 nObj: c_int,
3855 param: LPARAM,
3856 ) -> c_int}
3857 extern "system" {
EnumMetaFile( hdc: HDC, hmf: HMETAFILE, mproc: MFENUMPROC, param: LPARAM, ) -> BOOL3858 pub fn EnumMetaFile(
3859 hdc: HDC,
3860 hmf: HMETAFILE,
3861 mproc: MFENUMPROC,
3862 param: LPARAM,
3863 ) -> BOOL;
3864 }
3865 FN!{stdcall ENHMFENUMPROC(
3866 hdc: HDC,
3867 lpht: *mut HANDLETABLE,
3868 lpmr: *const ENHMETARECORD,
3869 nHandles: c_int,
3870 data: LPARAM,
3871 ) -> c_int}
3872 extern "system" {
CloseEnhMetaFile( hdc: HDC, ) -> HENHMETAFILE3873 pub fn CloseEnhMetaFile(
3874 hdc: HDC,
3875 ) -> HENHMETAFILE;
CopyEnhMetaFileA( hemfSrc: HENHMETAFILE, lpszFile: LPCSTR, ) -> HENHMETAFILE3876 pub fn CopyEnhMetaFileA(
3877 hemfSrc: HENHMETAFILE,
3878 lpszFile: LPCSTR,
3879 ) -> HENHMETAFILE;
CopyEnhMetaFileW( hemfSrc: HENHMETAFILE, lpszFile: LPCWSTR, ) -> HENHMETAFILE3880 pub fn CopyEnhMetaFileW(
3881 hemfSrc: HENHMETAFILE,
3882 lpszFile: LPCWSTR,
3883 ) -> HENHMETAFILE;
CreateEnhMetaFileA( hdcRef: HDC, lpFilename: LPCSTR, lpRect: *const RECT, lpDescription: LPCSTR, ) -> HDC3884 pub fn CreateEnhMetaFileA(
3885 hdcRef: HDC,
3886 lpFilename: LPCSTR,
3887 lpRect: *const RECT,
3888 lpDescription: LPCSTR,
3889 ) -> HDC;
CreateEnhMetaFileW( hdcRef: HDC, lpFilename: LPCWSTR, lpRect: *const RECT, lpDescription: LPCWSTR, ) -> HDC3890 pub fn CreateEnhMetaFileW(
3891 hdcRef: HDC,
3892 lpFilename: LPCWSTR,
3893 lpRect: *const RECT,
3894 lpDescription: LPCWSTR,
3895 ) -> HDC;
DeleteEnhMetaFile( hmf: HENHMETAFILE, ) -> BOOL3896 pub fn DeleteEnhMetaFile(
3897 hmf: HENHMETAFILE,
3898 ) -> BOOL;
EnumEnhMetaFile( hdc: HDC, hmf: HENHMETAFILE, lpProc: ENHMFENUMPROC, param: LPVOID, lpRect: *const RECT, ) -> BOOL3899 pub fn EnumEnhMetaFile(
3900 hdc: HDC,
3901 hmf: HENHMETAFILE,
3902 lpProc: ENHMFENUMPROC,
3903 param: LPVOID,
3904 lpRect: *const RECT,
3905 ) -> BOOL;
GetEnhMetaFileA( lpName: LPCSTR, ) -> HENHMETAFILE3906 pub fn GetEnhMetaFileA(
3907 lpName: LPCSTR,
3908 ) -> HENHMETAFILE;
GetEnhMetaFileW( lpName: LPCWSTR, ) -> HENHMETAFILE3909 pub fn GetEnhMetaFileW(
3910 lpName: LPCWSTR,
3911 ) -> HENHMETAFILE;
GetEnhMetaFileBits( hEMF: HENHMETAFILE, nSize: UINT, lpData: LPBYTE, ) -> UINT3912 pub fn GetEnhMetaFileBits(
3913 hEMF: HENHMETAFILE,
3914 nSize: UINT,
3915 lpData: LPBYTE,
3916 ) -> UINT;
GetEnhMetaFileDescriptionA( hemf: HENHMETAFILE, cchBuffer: UINT, lpDescription: LPSTR, ) -> UINT3917 pub fn GetEnhMetaFileDescriptionA(
3918 hemf: HENHMETAFILE,
3919 cchBuffer: UINT,
3920 lpDescription: LPSTR,
3921 ) -> UINT;
GetEnhMetaFileDescriptionW( hemf: HENHMETAFILE, cchBuffer: UINT, lpDescription: LPWSTR, ) -> UINT3922 pub fn GetEnhMetaFileDescriptionW(
3923 hemf: HENHMETAFILE,
3924 cchBuffer: UINT,
3925 lpDescription: LPWSTR,
3926 ) -> UINT;
GetEnhMetaFileHeader( hemf: HENHMETAFILE, nSize: UINT, lpEnhMetaHeader: LPENHMETAHEADER, ) -> UINT3927 pub fn GetEnhMetaFileHeader(
3928 hemf: HENHMETAFILE,
3929 nSize: UINT,
3930 lpEnhMetaHeader: LPENHMETAHEADER,
3931 ) -> UINT;
GetEnhMetaFilePaletteEntries( hemf: HENHMETAFILE, nNumEntries: UINT, lpPaletteEntries: LPPALETTEENTRY, ) -> UINT3932 pub fn GetEnhMetaFilePaletteEntries(
3933 hemf: HENHMETAFILE,
3934 nNumEntries: UINT,
3935 lpPaletteEntries: LPPALETTEENTRY,
3936 ) -> UINT;
GetEnhMetaFilePixelFormat( hemf: HENHMETAFILE, cbBuffer: UINT, ppfd: *mut PIXELFORMATDESCRIPTOR, ) -> UINT3937 pub fn GetEnhMetaFilePixelFormat(
3938 hemf: HENHMETAFILE,
3939 cbBuffer: UINT,
3940 ppfd: *mut PIXELFORMATDESCRIPTOR,
3941 ) -> UINT;
GetWinMetaFileBits( hemf: HENHMETAFILE, cbData16: UINT, pData16: LPBYTE, iMapMode: INT, hdcRef: HDC, ) -> UINT3942 pub fn GetWinMetaFileBits(
3943 hemf: HENHMETAFILE,
3944 cbData16: UINT,
3945 pData16: LPBYTE,
3946 iMapMode: INT,
3947 hdcRef: HDC,
3948 ) -> UINT;
PlayEnhMetaFile( hdc: HDC, hmf: HENHMETAFILE, lprect: *const RECT, ) -> BOOL3949 pub fn PlayEnhMetaFile(
3950 hdc: HDC,
3951 hmf: HENHMETAFILE,
3952 lprect: *const RECT,
3953 ) -> BOOL;
PlayEnhMetaFileRecord( hdc: HDC, pht: LPHANDLETABLE, pmr: *const ENHMETARECORD, cht: UINT, ) -> BOOL3954 pub fn PlayEnhMetaFileRecord(
3955 hdc: HDC,
3956 pht: LPHANDLETABLE,
3957 pmr: *const ENHMETARECORD,
3958 cht: UINT,
3959 ) -> BOOL;
SetEnhMetaFileBits( nSize: UINT, pb: *const BYTE, ) -> HENHMETAFILE3960 pub fn SetEnhMetaFileBits(
3961 nSize: UINT,
3962 pb: *const BYTE,
3963 ) -> HENHMETAFILE;
SetWinMetaFileBits( nSize: UINT, lpMeta16Data: *const BYTE, hdcRef: HDC, lpMFP: *const METAFILEPICT, ) -> HENHMETAFILE3964 pub fn SetWinMetaFileBits(
3965 nSize: UINT,
3966 lpMeta16Data: *const BYTE,
3967 hdcRef: HDC,
3968 lpMFP: *const METAFILEPICT,
3969 ) -> HENHMETAFILE;
GdiComment( hdc: HDC, nSize: UINT, lpData: *const BYTE, ) -> BOOL3970 pub fn GdiComment(
3971 hdc: HDC,
3972 nSize: UINT,
3973 lpData: *const BYTE,
3974 ) -> BOOL;
GetTextMetricsA( hdc: HDC, lptm: LPTEXTMETRICA, ) -> BOOL3975 pub fn GetTextMetricsA(
3976 hdc: HDC,
3977 lptm: LPTEXTMETRICA,
3978 ) -> BOOL;
GetTextMetricsW( hdc: HDC, lptm: *mut TEXTMETRICW, ) -> BOOL3979 pub fn GetTextMetricsW(
3980 hdc: HDC,
3981 lptm: *mut TEXTMETRICW,
3982 ) -> BOOL;
3983 }
3984 STRUCT!{struct DIBSECTION {
3985 dsBm: BITMAP,
3986 dsBmih: BITMAPINFOHEADER,
3987 dsBitfields: [DWORD; 3],
3988 dshSection: HANDLE,
3989 dsOffset: DWORD,
3990 }}
3991 pub type PDIBSECTION = *mut DIBSECTION;
3992 pub type LPDIBSECTION = *mut DIBSECTION;
3993 extern "system" {
AngleArc( hdc: HDC, X: c_int, Y: c_int, dwRadius: DWORD, eStartAngle: FLOAT, eSweepAngle: FLOAT, ) -> BOOL3994 pub fn AngleArc(
3995 hdc: HDC,
3996 X: c_int,
3997 Y: c_int,
3998 dwRadius: DWORD,
3999 eStartAngle: FLOAT,
4000 eSweepAngle: FLOAT,
4001 ) -> BOOL;
PolyPolyline( hdc: HDC, lppt: *const POINT, lpdwPolyPoints: *const DWORD, cCount: DWORD, ) -> BOOL4002 pub fn PolyPolyline(
4003 hdc: HDC,
4004 lppt: *const POINT,
4005 lpdwPolyPoints: *const DWORD,
4006 cCount: DWORD,
4007 ) -> BOOL;
GetWorldTransform( hdc: HDC, lpxf: LPXFORM, ) -> BOOL4008 pub fn GetWorldTransform(
4009 hdc: HDC,
4010 lpxf: LPXFORM,
4011 ) -> BOOL;
SetWorldTransform( hdc: HDC, lpxf: *const XFORM, ) -> BOOL4012 pub fn SetWorldTransform(
4013 hdc: HDC,
4014 lpxf: *const XFORM,
4015 ) -> BOOL;
ModifyWorldTransform( hdc: HDC, lpxf: *const XFORM, mode: DWORD, ) -> BOOL4016 pub fn ModifyWorldTransform(
4017 hdc: HDC,
4018 lpxf: *const XFORM,
4019 mode: DWORD,
4020 ) -> BOOL;
CombineTransform( lpxformResult: LPXFORM, lpxform1: *const XFORM, lpxform2: *const XFORM, ) -> BOOL4021 pub fn CombineTransform(
4022 lpxformResult: LPXFORM,
4023 lpxform1: *const XFORM,
4024 lpxform2: *const XFORM,
4025 ) -> BOOL;
4026 }
4027 #[inline]
GDI_WIDTHBYTES(bits: DWORD) -> DWORD4028 pub fn GDI_WIDTHBYTES(bits: DWORD) -> DWORD {
4029 ((bits + 31) & !31) / 8
4030 }
4031 #[inline]
GDI_DIBWIDTHBYTES(bi: &BITMAPINFOHEADER) -> DWORD4032 pub fn GDI_DIBWIDTHBYTES(bi: &BITMAPINFOHEADER) -> DWORD {
4033 GDI_WIDTHBYTES((bi.biWidth as DWORD) * (bi.biBitCount as DWORD))
4034 }
4035 #[inline]
GDI__DIBSIZE(bi: &BITMAPINFOHEADER) -> DWORD4036 pub fn GDI__DIBSIZE(bi: &BITMAPINFOHEADER) -> DWORD {
4037 GDI_DIBWIDTHBYTES(bi) * bi.biHeight as DWORD
4038 }
4039 #[inline]
GDI_DIBSIZE(bi: &BITMAPINFOHEADER) -> DWORD4040 pub fn GDI_DIBSIZE(bi: &BITMAPINFOHEADER) -> DWORD {
4041 if bi.biHeight < 0 {
4042 GDI__DIBSIZE(bi) * -1i32 as u32
4043 } else {
4044 GDI__DIBSIZE(bi)
4045 }
4046 }
4047 extern "system" {
CreateDIBSection( hdc: HDC, lpbmi: *const BITMAPINFO, usage: UINT, ppvBits: *mut *mut c_void, hSection: HANDLE, offset: DWORD, ) -> HBITMAP4048 pub fn CreateDIBSection(
4049 hdc: HDC,
4050 lpbmi: *const BITMAPINFO,
4051 usage: UINT,
4052 ppvBits: *mut *mut c_void,
4053 hSection: HANDLE,
4054 offset: DWORD,
4055 ) -> HBITMAP;
GetDIBColorTable( hdc: HDC, iStart: UINT, cEntries: UINT, prgbq: *mut RGBQUAD, ) -> UINT4056 pub fn GetDIBColorTable(
4057 hdc: HDC,
4058 iStart: UINT,
4059 cEntries: UINT,
4060 prgbq: *mut RGBQUAD,
4061 ) -> UINT;
SetDIBColorTable( hdc: HDC, iStart: UINT, cEntries: UINT, prgbq: *const RGBQUAD, ) -> UINT4062 pub fn SetDIBColorTable(
4063 hdc: HDC,
4064 iStart: UINT,
4065 cEntries: UINT,
4066 prgbq: *const RGBQUAD,
4067 ) -> UINT;
4068 }
4069 pub const CA_NEGATIVE: WORD = 0x0001;
4070 pub const CA_LOG_FILTER: WORD = 0x0002;
4071 pub const ILLUMINANT_DEVICE_DEFAULT: WORD = 0;
4072 pub const ILLUMINANT_A: WORD = 1;
4073 pub const ILLUMINANT_B: WORD = 2;
4074 pub const ILLUMINANT_C: WORD = 3;
4075 pub const ILLUMINANT_D50: WORD = 4;
4076 pub const ILLUMINANT_D55: WORD = 5;
4077 pub const ILLUMINANT_D65: WORD = 6;
4078 pub const ILLUMINANT_D75: WORD = 7;
4079 pub const ILLUMINANT_F2: WORD = 8;
4080 pub const ILLUMINANT_MAX_INDEX: WORD = ILLUMINANT_F2;
4081 pub const ILLUMINANT_TUNGSTEN: WORD = ILLUMINANT_A;
4082 pub const ILLUMINANT_DAYLIGHT: WORD = ILLUMINANT_C;
4083 pub const ILLUMINANT_FLUORESCENT: WORD = ILLUMINANT_F2;
4084 pub const ILLUMINANT_NTSC: WORD = ILLUMINANT_C;
4085 pub const RGB_GAMMA_MIN: WORD = 0o2500; // FIXME It is octal in the headers but are the headers actually right?
4086 pub const RGB_GAMMA_MAX: WORD = 65000;
4087 pub const REFERENCE_WHITE_MIN: WORD = 6000;
4088 pub const REFERENCE_WHITE_MAX: WORD = 10000;
4089 pub const REFERENCE_BLACK_MIN: WORD = 0;
4090 pub const REFERENCE_BLACK_MAX: WORD = 4000;
4091 pub const COLOR_ADJ_MIN: SHORT = -100;
4092 pub const COLOR_ADJ_MAX: SHORT = 100;
4093 STRUCT!{struct COLORADJUSTMENT {
4094 caSize: WORD,
4095 caFlags: WORD,
4096 caIlluminantIndex: WORD,
4097 caRedGamma: WORD,
4098 caGreenGamma: WORD,
4099 caBlueGamma: WORD,
4100 caReferenceBlack: WORD,
4101 caReferenceWhite: WORD,
4102 caContrast: SHORT,
4103 caBrightness: SHORT,
4104 caColorfulness: SHORT,
4105 caRedGreenTint: SHORT,
4106 }}
4107 pub type PCOLORADJUSTMENT = *mut COLORADJUSTMENT;
4108 pub type LPCOLORADJUSTMENT = *mut COLORADJUSTMENT;
4109 extern "system" {
SetColorAdjustment( hdc: HDC, lpca: *const COLORADJUSTMENT, ) -> BOOL4110 pub fn SetColorAdjustment(
4111 hdc: HDC,
4112 lpca: *const COLORADJUSTMENT,
4113 ) -> BOOL;
GetColorAdjustment( hdc: HDC, lpca: LPCOLORADJUSTMENT, ) -> BOOL4114 pub fn GetColorAdjustment(
4115 hdc: HDC,
4116 lpca: LPCOLORADJUSTMENT,
4117 ) -> BOOL;
CreateHalftonePalette( hdc: HDC, ) -> HPALETTE4118 pub fn CreateHalftonePalette(
4119 hdc: HDC,
4120 ) -> HPALETTE;
4121 }
4122 FN!{stdcall ABORTPROC(
4123 HDC,
4124 c_int,
4125 ) -> BOOL}
4126 STRUCT!{struct DOCINFOA {
4127 cbSize: c_int,
4128 lpszDocName: LPCSTR,
4129 lpszOutput: LPCSTR,
4130 lpszDatatype: LPCSTR,
4131 fwType: DWORD,
4132 }}
4133 pub type LPDOCINFOA = *mut DOCINFOA;
4134 STRUCT!{struct DOCINFOW {
4135 cbSize: c_int,
4136 lpszDocName: LPCWSTR,
4137 lpszOutput: LPCWSTR,
4138 lpszDatatype: LPCWSTR,
4139 fwType: DWORD,
4140 }}
4141 pub type LPDOCINFOW = *mut DOCINFOW;
4142 pub const DI_APPBANDING: DWORD = 0x00000001;
4143 pub const DI_ROPS_READ_DESTINATION: DWORD = 0x00000002;
4144 extern "system" {
StartDocA( hdc: HDC, lpdi: *const DOCINFOA, ) -> c_int4145 pub fn StartDocA(
4146 hdc: HDC,
4147 lpdi: *const DOCINFOA,
4148 ) -> c_int;
StartDocW( hdc: HDC, lpdi: *const DOCINFOW, ) -> c_int4149 pub fn StartDocW(
4150 hdc: HDC,
4151 lpdi: *const DOCINFOW,
4152 ) -> c_int;
EndDoc( hdc: HDC, ) -> c_int4153