]> git.proxmox.com Git - rustc.git/blame - vendor/winapi-0.2.8/src/commdlg.rs
New upstream version 1.42.0+dfsg1
[rustc.git] / vendor / winapi-0.2.8 / src / commdlg.rs
CommitLineData
e1599b0c
XL
1// Copyright © 2015, skdltmxn
2// Licensed under the MIT License <LICENSE.md>
3//! 32-Bit Common Dialog APIs
4pub type LPOFNHOOKPROC = Option<unsafe extern "system" fn(
5 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
6) -> ::UINT_PTR>;
7STRUCT!{nodebug struct OPENFILENAME_NT4A {
8 lStructSize: ::DWORD,
9 hwndOwner: ::HWND,
10 hInstance: ::HINSTANCE,
11 lpstrFilter: ::LPCSTR,
12 lpstrCustomFilter: ::LPSTR,
13 nMaxCustFilter: ::DWORD,
14 nFilterIndex: ::DWORD,
15 lpstrFile: ::LPSTR,
16 nMaxFile: ::DWORD,
17 lpstrFileTitle: ::LPSTR,
18 nMaxFileTitle: ::DWORD,
19 lpstrInitialDir: ::LPCSTR,
20 lpstrTitle: ::LPCSTR,
21 Flags: ::DWORD,
22 nFileOffset: ::WORD,
23 nFileExtension: ::WORD,
24 lpstrDefExt: ::LPCSTR,
25 lCustData: ::LPARAM,
26 lpfnHook: LPOFNHOOKPROC,
27 lpTemplateName: ::LPCSTR,
28}}
29pub type LPOPENFILENAME_NT4A = *mut OPENFILENAME_NT4A;
30STRUCT!{nodebug struct OPENFILENAME_NT4W {
31 lStructSize: ::DWORD,
32 hwndOwner: ::HWND,
33 hInstance: ::HINSTANCE,
34 lpstrFilter: ::LPCWSTR,
35 lpstrCustomFilter: ::LPWSTR,
36 nMaxCustFilter: ::DWORD,
37 nFilterIndex: ::DWORD,
38 lpstrFile: ::LPWSTR,
39 nMaxFile: ::DWORD,
40 lpstrFileTitle: ::LPWSTR,
41 nMaxFileTitle: ::DWORD,
42 lpstrInitialDir: ::LPCWSTR,
43 lpstrTitle: ::LPCWSTR,
44 Flags: ::DWORD,
45 nFileOffset: ::WORD,
46 nFileExtension: ::WORD,
47 lpstrDefExt: ::LPCWSTR,
48 lCustData: ::LPARAM,
49 lpfnHook: LPOFNHOOKPROC,
50 lpTemplateName: ::LPCWSTR,
51}}
52pub type LPOPENFILENAME_NT4W = *mut OPENFILENAME_NT4W;
53STRUCT!{nodebug struct OPENFILENAMEA {
54 lStructSize: ::DWORD,
55 hwndOwner: ::HWND,
56 hInstance: ::HINSTANCE,
57 lpstrFilter: ::LPCSTR,
58 lpstrCustomFilter: ::LPSTR,
59 nMaxCustFilter: ::DWORD,
60 nFilterIndex: ::DWORD,
61 lpstrFile: ::LPSTR,
62 nMaxFile: ::DWORD,
63 lpstrFileTitle: ::LPSTR,
64 nMaxFileTitle: ::DWORD,
65 lpstrInitialDir: ::LPCSTR,
66 lpstrTitle: ::LPCSTR,
67 Flags: ::DWORD,
68 nFileOffset: ::WORD,
69 nFileExtension: ::WORD,
70 lpstrDefExt: ::LPCSTR,
71 lCustData: ::LPARAM,
72 lpfnHook: LPOFNHOOKPROC,
73 lpTemplateName: ::LPCSTR,
74 pvReserved: *mut ::c_void,
75 dwReserved: ::DWORD,
76 FlagsEx: ::DWORD,
77}}
78pub type LPOPENFILENAMEA = *mut OPENFILENAMEA;
79STRUCT!{nodebug struct OPENFILENAMEW {
80 lStructSize: ::DWORD,
81 hwndOwner: ::HWND,
82 hInstance: ::HINSTANCE,
83 lpstrFilter: ::LPCWSTR,
84 lpstrCustomFilter: ::LPWSTR,
85 nMaxCustFilter: ::DWORD,
86 nFilterIndex: ::DWORD,
87 lpstrFile: ::LPWSTR,
88 nMaxFile: ::DWORD,
89 lpstrFileTitle: ::LPWSTR,
90 nMaxFileTitle: ::DWORD,
91 lpstrInitialDir: ::LPCWSTR,
92 lpstrTitle: ::LPCWSTR,
93 Flags: ::DWORD,
94 nFileOffset: ::WORD,
95 nFileExtension: ::WORD,
96 lpstrDefExt: ::LPCWSTR,
97 lCustData: ::LPARAM,
98 lpfnHook: LPOFNHOOKPROC,
99 lpTemplateName: ::LPCWSTR,
100 pvReserved: *mut ::c_void,
101 dwReserved: ::DWORD,
102 FlagsEx: ::DWORD,
103}}
104pub type LPOPENFILENAMEW = *mut OPENFILENAMEW;
105pub const OFN_READONLY: ::DWORD = 0x00000001;
106pub const OFN_OVERWRITEPROMPT: ::DWORD = 0x00000002;
107pub const OFN_HIDEREADONLY: ::DWORD = 0x00000004;
108pub const OFN_NOCHANGEDIR: ::DWORD = 0x00000008;
109pub const OFN_SHOWHELP: ::DWORD = 0x00000010;
110pub const OFN_ENABLEHOOK: ::DWORD = 0x00000020;
111pub const OFN_ENABLETEMPLATE: ::DWORD = 0x00000040;
112pub const OFN_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000080;
113pub const OFN_NOVALIDATE: ::DWORD = 0x00000100;
114pub const OFN_ALLOWMULTISELECT: ::DWORD = 0x00000200;
115pub const OFN_EXTENSIONDIFFERENT: ::DWORD = 0x00000400;
116pub const OFN_PATHMUSTEXIST: ::DWORD = 0x00000800;
117pub const OFN_FILEMUSTEXIST: ::DWORD = 0x00001000;
118pub const OFN_CREATEPROMPT: ::DWORD = 0x00002000;
119pub const OFN_SHAREAWARE: ::DWORD = 0x00004000;
120pub const OFN_NOREADONLYRETURN: ::DWORD = 0x00008000;
121pub const OFN_NOTESTFILECREATE: ::DWORD = 0x00010000;
122pub const OFN_NONETWORKBUTTON: ::DWORD = 0x00020000;
123pub const OFN_NOLONGNAMES: ::DWORD = 0x00040000;
124pub const OFN_EXPLORER: ::DWORD = 0x00080000;
125pub const OFN_NODEREFERENCELINKS: ::DWORD = 0x00100000;
126pub const OFN_LONGNAMES: ::DWORD = 0x00200000;
127pub const OFN_ENABLEINCLUDENOTIFY: ::DWORD = 0x00400000;
128pub const OFN_ENABLESIZING: ::DWORD = 0x00800000;
129pub const OFN_DONTADDTORECENT: ::DWORD = 0x02000000;
130pub const OFN_FORCESHOWHIDDEN: ::DWORD = 0x10000000;
131pub const OFN_EX_NOPLACESBAR: ::DWORD = 0x00000001;
132pub const OFN_SHAREFALLTHROUGH: ::UINT_PTR = 2;
133pub const OFN_SHARENOWARN: ::UINT_PTR = 1;
134pub const OFN_SHAREWARN: ::UINT_PTR = 0;
135pub type LPCCHOOKPROC = Option<unsafe extern "system" fn(
136 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
137) -> ::UINT_PTR>;
138STRUCT!{struct OFNOTIFYA {
139 hdr: ::NMHDR,
140 lpOFN: LPOPENFILENAMEA,
141 pszFile: ::LPSTR,
142}}
143pub type LPOFNOTIFYA = *mut OFNOTIFYA;
144STRUCT!{struct OFNOTIFYW {
145 hdr: ::NMHDR,
146 lpOFN: LPOPENFILENAMEW,
147 pszFile: ::LPWSTR,
148}}
149pub type LPOFNOTIFYW = *mut OFNOTIFYW;
150STRUCT!{struct OFNOTIFYEXA {
151 hdr: ::NMHDR,
152 lpOFN: LPOPENFILENAMEA,
153 psf: ::LPVOID,
154 pidl: ::LPVOID,
155}}
156pub type LPOFNOTIFYEXA = *mut OFNOTIFYEXA;
157STRUCT!{struct OFNOTIFYEXW {
158 hdr: ::NMHDR,
159 lpOFN: LPOPENFILENAMEW,
160 psf: ::LPVOID,
161 pidl: ::LPVOID,
162}}
163pub type LPOFNOTIFYEXW = *mut OFNOTIFYEXW;
164pub const CDN_FIRST: ::UINT = -601i32 as ::UINT;
165pub const CDN_LAST: ::UINT = -699i32 as ::UINT;
166pub const CDN_INITDONE: ::UINT = CDN_FIRST - 0x0000;
167pub const CDN_SELCHANGE: ::UINT = CDN_FIRST - 0x0001;
168pub const CDN_FOLDERCHANGE: ::UINT = CDN_FIRST - 0x0002;
169pub const CDN_SHAREVIOLATION: ::UINT = CDN_FIRST - 0x0003;
170pub const CDN_HELP: ::UINT = CDN_FIRST - 0x0004;
171pub const CDN_FILEOK: ::UINT = CDN_FIRST - 0x0005;
172pub const CDN_TYPECHANGE: ::UINT = CDN_FIRST - 0x0006;
173pub const CDN_INCLUDEITEM: ::UINT = CDN_FIRST - 0x0007;
174pub const CDM_FIRST: ::UINT = ::WM_USER + 100;
175pub const CDM_LAST: ::UINT = ::WM_USER + 200;
176pub const CDM_GETSPEC: ::UINT = CDM_FIRST + 0x0000;
177pub const CDM_GETFILEPATH: ::UINT = CDM_FIRST + 0x0001;
178pub const CDM_GETFOLDERPATH: ::UINT = CDM_FIRST + 0x0002;
179pub const CDM_GETFOLDERIDLIST: ::UINT = CDM_FIRST + 0x0003;
180pub const CDM_SETCONTROLTEXT: ::UINT = CDM_FIRST + 0x0004;
181pub const CDM_HIDECONTROL: ::UINT = CDM_FIRST + 0x0005;
182pub const CDM_SETDEFEXT: ::UINT = CDM_FIRST + 0x0006;
183STRUCT!{nodebug struct CHOOSECOLORA {
184 lStructSize: ::DWORD,
185 hwndOwner: ::HWND,
186 hInstance: ::HWND,
187 rgbResult: ::COLORREF,
188 lpCustColors: *mut ::COLORREF,
189 Flags: ::DWORD,
190 lCustData: ::LPARAM,
191 lpfnHook: LPCCHOOKPROC,
192 lpTemplateName: ::LPCSTR,
193}}
194pub type LPCHOOSECOLORA = *mut CHOOSECOLORA;
195STRUCT!{nodebug struct CHOOSECOLORW {
196 lStructSize: ::DWORD,
197 hwndOwner: ::HWND,
198 hInstance: ::HWND,
199 rgbResult: ::COLORREF,
200 lpCustColors: *mut ::COLORREF,
201 Flags: ::DWORD,
202 lCustData: ::LPARAM,
203 lpfnHook: LPCCHOOKPROC,
204 lpTemplateName: ::LPCWSTR,
205}}
206pub type LPCHOOSECOLORW = *mut CHOOSECOLORW;
207pub const CC_RGBINIT: ::DWORD = 0x00000001;
208pub const CC_FULLOPEN: ::DWORD = 0x00000002;
209pub const CC_PREVENTFULLOPEN: ::DWORD = 0x00000004;
210pub const CC_SHOWHELP: ::DWORD = 0x00000008;
211pub const CC_ENABLEHOOK: ::DWORD = 0x00000010;
212pub const CC_ENABLETEMPLATE: ::DWORD = 0x00000020;
213pub const CC_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000040;
214pub const CC_SOLIDCOLOR: ::DWORD = 0x00000080;
215pub const CC_ANYCOLOR: ::DWORD = 0x00000100;
216pub type LPFRHOOKPROC = Option<unsafe extern "system" fn(
217 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
218) -> ::UINT_PTR>;
219STRUCT!{nodebug struct FINDREPLACEA {
220 lStructSize: ::DWORD,
221 hwndOwner: ::HWND,
222 hInstance: ::HINSTANCE,
223 Flags: ::DWORD,
224 lpstrFindWhat: ::LPSTR,
225 lpstrReplaceWith: ::LPSTR,
226 wFindWhatLen: ::WORD,
227 wReplaceWithLen: ::WORD,
228 lCustData: ::LPARAM,
229 lpfnHook: LPFRHOOKPROC,
230 lpTemplateName: ::LPCSTR,
231}}
232pub type LPFINDREPLACEA = *mut FINDREPLACEA;
233STRUCT!{nodebug struct FINDREPLACEW {
234 lStructSize: ::DWORD,
235 hwndOwner: ::HWND,
236 hInstance: ::HINSTANCE,
237 Flags: ::DWORD,
238 lpstrFindWhat: ::LPWSTR,
239 lpstrReplaceWith: ::LPWSTR,
240 wFindWhatLen: ::WORD,
241 wReplaceWithLen: ::WORD,
242 lCustData: ::LPARAM,
243 lpfnHook: LPFRHOOKPROC,
244 lpTemplateName: ::LPCWSTR,
245}}
246pub type LPFINDREPLACEW = *mut FINDREPLACEW;
247pub const FR_DOWN: ::DWORD = 0x00000001;
248pub const FR_WHOLEWORD: ::DWORD = 0x00000002;
249pub const FR_MATCHCASE: ::DWORD = 0x00000004;
250pub const FR_FINDNEXT: ::DWORD = 0x00000008;
251pub const FR_REPLACE: ::DWORD = 0x00000010;
252pub const FR_REPLACEALL: ::DWORD = 0x00000020;
253pub const FR_DIALOGTERM: ::DWORD = 0x00000040;
254pub const FR_SHOWHELP: ::DWORD = 0x00000080;
255pub const FR_ENABLEHOOK: ::DWORD = 0x00000100;
256pub const FR_ENABLETEMPLATE: ::DWORD = 0x00000200;
257pub const FR_NOUPDOWN: ::DWORD = 0x00000400;
258pub const FR_NOMATCHCASE: ::DWORD = 0x00000800;
259pub const FR_NOWHOLEWORD: ::DWORD = 0x00001000;
260pub const FR_ENABLETEMPLATEHANDLE: ::DWORD = 0x00002000;
261pub const FR_HIDEUPDOWN: ::DWORD = 0x00004000;
262pub const FR_HIDEMATCHCASE: ::DWORD = 0x00008000;
263pub const FR_HIDEWHOLEWORD: ::DWORD = 0x00010000;
264pub const FR_RAW: ::DWORD = 0x00020000;
265pub const FR_MATCHDIAC: ::DWORD = 0x20000000;
266pub const FR_MATCHKASHIDA: ::DWORD = 0x40000000;
267pub const FR_MATCHALEFHAMZA: ::DWORD = 0x80000000;
268pub type LPCFHOOKPROC = Option<unsafe extern "system" fn(
269 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
270) -> ::UINT_PTR>;
271STRUCT!{nodebug struct CHOOSEFONTA {
272 lStructSize: ::DWORD,
273 hwndOwner: ::HWND,
274 hDC: ::HDC,
275 lpLogFont: ::LPLOGFONTA,
276 iPointSize: ::INT,
277 Flags: ::DWORD,
278 rgbColors: ::COLORREF,
279 lCustData: ::LPARAM,
280 lpfnHook: LPCFHOOKPROC,
281 lpTemplateName: ::LPCSTR,
282 hInstance: ::HINSTANCE,
283 lpszStyle: ::LPSTR,
284 nFontType: ::WORD,
285 ___MISSING_ALIGNMENT__: ::WORD,
286 nSizeMin: ::INT,
287 nSizeMax: ::INT,
288}}
289pub type LPCHOOSEFONTA = *mut CHOOSEFONTA;
290STRUCT!{nodebug struct CHOOSEFONTW {
291 lStructSize: ::DWORD,
292 hwndOwner: ::HWND,
293 hDC: ::HDC,
294 lpLogFont: ::LPLOGFONTW,
295 iPointSize: ::INT,
296 Flags: ::DWORD,
297 rgbColors: ::COLORREF,
298 lCustData: ::LPARAM,
299 lpfnHook: LPCFHOOKPROC,
300 lpTemplateName: ::LPCWSTR,
301 hInstance: ::HINSTANCE,
302 lpszStyle: ::LPWSTR,
303 nFontType: ::WORD,
304 ___MISSING_ALIGNMENT__: ::WORD,
305 nSizeMin: ::INT,
306 nSizeMax: ::INT,
307}}
308pub type LPCHOOSEFONTW = *mut CHOOSEFONTW;
309pub const CF_SCREENFONTS: ::DWORD = 0x00000001;
310pub const CF_PRINTERFONTS: ::DWORD = 0x00000002;
311pub const CF_BOTH: ::DWORD = CF_SCREENFONTS | CF_PRINTERFONTS;
312pub const CF_SHOWHELP: ::DWORD = 0x00000004;
313pub const CF_ENABLEHOOK: ::DWORD = 0x00000008;
314pub const CF_ENABLETEMPLATE: ::DWORD = 0x00000010;
315pub const CF_ENABLETEMPLATEHANDLE: ::DWORD = 0x00000020;
316pub const CF_INITTOLOGFONTSTRUCT: ::DWORD = 0x00000040;
317pub const CF_USESTYLE: ::DWORD = 0x00000080;
318pub const CF_EFFECTS: ::DWORD = 0x00000100;
319pub const CF_APPLY: ::DWORD = 0x00000200;
320pub const CF_ANSIONLY: ::DWORD = 0x00000400;
321pub const CF_SCRIPTSONLY: ::DWORD = CF_ANSIONLY;
322pub const CF_NOVECTORFONTS: ::DWORD = 0x00000800;
323pub const CF_NOOEMFONTS: ::DWORD = CF_NOVECTORFONTS;
324pub const CF_NOSIMULATIONS: ::DWORD = 0x00001000;
325pub const CF_LIMITSIZE: ::DWORD = 0x00002000;
326pub const CF_FIXEDPITCHONLY: ::DWORD = 0x00004000;
327pub const CF_WYSIWYG: ::DWORD = 0x00008000;
328pub const CF_FORCEFONTEXIST: ::DWORD = 0x00010000;
329pub const CF_SCALABLEONLY: ::DWORD = 0x00020000;
330pub const CF_TTONLY: ::DWORD = 0x00040000;
331pub const CF_NOFACESEL: ::DWORD = 0x00080000;
332pub const CF_NOSTYLESEL: ::DWORD = 0x00100000;
333pub const CF_NOSIZESEL: ::DWORD = 0x00200000;
334pub const CF_SELECTSCRIPT: ::DWORD = 0x00400000;
335pub const CF_NOSCRIPTSEL: ::DWORD = 0x00800000;
336pub const CF_NOVERTFONTS: ::DWORD = 0x01000000;
337pub const CF_INACTIVEFONTS: ::DWORD = 0x02000000;
338pub const SIMULATED_FONTTYPE: ::WORD = 0x8000;
339pub const PRINTER_FONTTYPE: ::WORD = 0x4000;
340pub const SCREEN_FONTTYPE: ::WORD = 0x2000;
341pub const BOLD_FONTTYPE: ::WORD = 0x0100;
342pub const ITALIC_FONTTYPE: ::WORD = 0x0200;
343pub const REGULAR_FONTTYPE: ::WORD = 0x0400;
344pub const PS_OPENTYPE_FONTTYPE: ::DWORD = 0x10000;
345pub const TT_OPENTYPE_FONTTYPE: ::DWORD = 0x20000;
346pub const TYPE1_FONTTYPE: ::DWORD = 0x40000;
347pub const SYMBOL_FONTTYPE: ::DWORD = 0x80000;
348pub const WM_CHOOSEFONT_GETLOGFONT: ::UINT = ::WM_USER + 1;
349pub const WM_CHOOSEFONT_SETLOGFONT: ::UINT = ::WM_USER + 101;
350pub const WM_CHOOSEFONT_SETFLAGS: ::UINT = ::WM_USER + 102;
351pub const CD_LBSELNOITEMS: ::WORD = -1i16 as ::WORD;
352pub const CD_LBSELCHANGE: ::WORD = 0;
353pub const CD_LBSELSUB: ::WORD = 1;
354pub const CD_LBSELADD: ::WORD = 2;
355pub type LPPRINTHOOKPROC = Option<unsafe extern "system" fn(
356 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
357) -> ::UINT_PTR>;
358pub type LPSETUPHOOKPROC = Option<unsafe extern "system" fn(
359 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
360) -> ::UINT_PTR>;
361STRUCT!{nodebug struct PRINTDLGA {
362 lStructSize: ::DWORD,
363 hwndOwner: ::HWND,
364 hDevMode: ::HGLOBAL,
365 hDevNames: ::HGLOBAL,
366 hDC: ::HDC,
367 Flags: ::DWORD,
368 nFromPage: ::WORD,
369 nToPage: ::WORD,
370 nMinPage: ::WORD,
371 nMaxPage: ::WORD,
372 nCopies: ::WORD,
373 hInstance: ::HINSTANCE,
374 lCustData: ::LPARAM,
375 lpfnPrintHook: LPPRINTHOOKPROC,
376 lpfnSetupHook: LPSETUPHOOKPROC,
377 lpPrintTemplateName: ::LPCSTR,
378 lpSetupTemplateName: ::LPCSTR,
379 hPrintTemplate: ::HGLOBAL,
380 hSetupTemplate: ::HGLOBAL,
381}}
382pub type LPPRINTDLGA = *mut PRINTDLGA;
383STRUCT!{nodebug struct PRINTDLGW {
384 lStructSize: ::DWORD,
385 hwndOwner: ::HWND,
386 hDevMode: ::HGLOBAL,
387 hDevNames: ::HGLOBAL,
388 hDC: ::HDC,
389 Flags: ::DWORD,
390 nFromPage: ::WORD,
391 nToPage: ::WORD,
392 nMinPage: ::WORD,
393 nMaxPage: ::WORD,
394 nCopies: ::WORD,
395 hInstance: ::HINSTANCE,
396 lCustData: ::LPARAM,
397 lpfnPrintHook: LPPRINTHOOKPROC,
398 lpfnSetupHook: LPSETUPHOOKPROC,
399 lpPrintTemplateName: ::LPCWSTR,
400 lpSetupTemplateName: ::LPCWSTR,
401 hPrintTemplate: ::HGLOBAL,
402 hSetupTemplate: ::HGLOBAL,
403}}
404pub type LPPRINTDLGW = *mut PRINTDLGW;
405RIDL!(
406interface IPrintDialogCallback(IPrintDialogCallbackVtbl) : IUnknown(IUnknownVtbl) {
407 fn InitDone(&mut self) -> ::HRESULT,
408 fn SelectionChange(&mut self) -> ::HRESULT,
409 fn HandleMessage(
410 &mut self, hDlg: ::HWND, uMsg: ::UINT, wParam: ::WPARAM, lParam: ::LPARAM,
411 pResult: *mut ::LRESULT
412 ) -> ::HRESULT
413}
414);
415RIDL!(
416interface IPrintDialogServices(IPrintDialogServicesVtbl) : IUnknown(IUnknownVtbl) {
417 fn GetCurrentDevMode(&mut self, pDevMode: ::LPDEVMODEW, pcbSize: *mut ::UINT) -> ::HRESULT,
418 fn GetCurrentPrinterName(&mut self, pPrinterName: ::LPWSTR, pcchSize: *mut ::UINT) -> ::HRESULT,
419 fn GetCurrentPortName(&mut self, pPortName: ::LPWSTR, pcchSize: *mut ::UINT) -> ::HRESULT
420}
421);
422STRUCT!{struct PRINTPAGERANGE {
423 nFromPage: ::DWORD,
424 nToPage: ::DWORD,
425}}
426pub type LPPRINTPAGERANGE = *mut PRINTPAGERANGE;
427pub type PCPRINTPAGERANGE = *const PRINTPAGERANGE;
428STRUCT!{struct PRINTDLGEXA {
429 lStructSize: ::DWORD,
430 hwndOwner: ::HWND,
431 hDevMode: ::HGLOBAL,
432 hDevNames: ::HGLOBAL,
433 hDC: ::HDC,
434 Flags: ::DWORD,
435 Flags2: ::DWORD,
436 ExclusionFlags: ::DWORD,
437 nPageRanges: ::DWORD,
438 nMaxPageRanges: ::DWORD,
439 lpPageRanges: LPPRINTPAGERANGE,
440 nMinPage: ::DWORD,
441 nMaxPage: ::DWORD,
442 nCopies: ::DWORD,
443 hInstance: ::HINSTANCE,
444 lpPrintTemplateName: ::LPCSTR,
445 lpCallback: ::LPUNKNOWN,
446 nPropertyPages: ::DWORD,
447 lphPropertyPages: *mut ::HPROPSHEETPAGE,
448 nStartPage: ::DWORD,
449 dwResultAction: ::DWORD,
450}}
451pub type LPPRINTDLGEXA = *mut PRINTDLGEXA;
452STRUCT!{struct PRINTDLGEXW {
453 lStructSize: ::DWORD,
454 hwndOwner: ::HWND,
455 hDevMode: ::HGLOBAL,
456 hDevNames: ::HGLOBAL,
457 hDC: ::HDC,
458 Flags: ::DWORD,
459 Flags2: ::DWORD,
460 ExclusionFlags: ::DWORD,
461 nPageRanges: ::DWORD,
462 nMaxPageRanges: ::DWORD,
463 lpPageRanges: LPPRINTPAGERANGE,
464 nMinPage: ::DWORD,
465 nMaxPage: ::DWORD,
466 nCopies: ::DWORD,
467 hInstance: ::HINSTANCE,
468 lpPrintTemplateName: ::LPCWSTR,
469 lpCallback: ::LPUNKNOWN,
470 nPropertyPages: ::DWORD,
471 lphPropertyPages: *mut ::HPROPSHEETPAGE,
472 nStartPage: ::DWORD,
473 dwResultAction: ::DWORD,
474}}
475pub type LPPRINTDLGEXW = *mut PRINTDLGEXW;
476pub const PD_ALLPAGES: ::DWORD = 0x00000000;
477pub const PD_SELECTION: ::DWORD = 0x00000001;
478pub const PD_PAGENUMS: ::DWORD = 0x00000002;
479pub const PD_NOSELECTION: ::DWORD = 0x00000004;
480pub const PD_NOPAGENUMS: ::DWORD = 0x00000008;
481pub const PD_COLLATE: ::DWORD = 0x00000010;
482pub const PD_PRINTTOFILE: ::DWORD = 0x00000020;
483pub const PD_PRINTSETUP: ::DWORD = 0x00000040;
484pub const PD_NOWARNING: ::DWORD = 0x00000080;
485pub const PD_RETURNDC: ::DWORD = 0x00000100;
486pub const PD_RETURNIC: ::DWORD = 0x00000200;
487pub const PD_RETURNDEFAULT: ::DWORD = 0x00000400;
488pub const PD_SHOWHELP: ::DWORD = 0x00000800;
489pub const PD_ENABLEPRINTHOOK: ::DWORD = 0x00001000;
490pub const PD_ENABLESETUPHOOK: ::DWORD = 0x00002000;
491pub const PD_ENABLEPRINTTEMPLATE: ::DWORD = 0x00004000;
492pub const PD_ENABLESETUPTEMPLATE: ::DWORD = 0x00008000;
493pub const PD_ENABLEPRINTTEMPLATEHANDLE: ::DWORD = 0x00010000;
494pub const PD_ENABLESETUPTEMPLATEHANDLE: ::DWORD = 0x00020000;
495pub const PD_USEDEVMODECOPIES: ::DWORD = 0x00040000;
496pub const PD_USEDEVMODECOPIESANDCOLLATE: ::DWORD = 0x00040000;
497pub const PD_DISABLEPRINTTOFILE: ::DWORD = 0x00080000;
498pub const PD_HIDEPRINTTOFILE: ::DWORD = 0x00100000;
499pub const PD_NONETWORKBUTTON: ::DWORD = 0x00200000;
500pub const PD_CURRENTPAGE: ::DWORD = 0x00400000;
501pub const PD_NOCURRENTPAGE: ::DWORD = 0x00800000;
502pub const PD_EXCLUSIONFLAGS: ::DWORD = 0x01000000;
503pub const PD_USELARGETEMPLATE: ::DWORD = 0x10000000;
504pub const PD_EXCL_COPIESANDCOLLATE: ::DWORD = ::DM_COPIES | ::DM_COLLATE;
505pub const START_PAGE_GENERAL: ::DWORD = 0xffffffff;
506pub const PD_RESULT_CANCEL: ::DWORD = 0;
507pub const PD_RESULT_PRINT: ::DWORD = 1;
508pub const PD_RESULT_APPLY: ::DWORD = 2;
509STRUCT!{struct DEVNAMES {
510 wDriverOffset: ::WORD,
511 wDeviceOffset: ::WORD,
512 wOutputOffset: ::WORD,
513 wDefault: ::WORD,
514}}
515pub type LPDEVNAMES = *mut DEVNAMES;
516pub type PCDEVNAMES = *const DEVNAMES;
517pub const DN_DEFAULTPRN: ::WORD = 0x0001;
518pub const WM_PSD_PAGESETUPDLG: ::UINT = ::WM_USER;
519pub const WM_PSD_FULLPAGERECT: ::UINT = ::WM_USER + 1;
520pub const WM_PSD_MINMARGINRECT: ::UINT = ::WM_USER + 2;
521pub const WM_PSD_MARGINRECT: ::UINT = ::WM_USER + 3;
522pub const WM_PSD_GREEKTEXTRECT: ::UINT = ::WM_USER + 4;
523pub const WM_PSD_ENVSTAMPRECT: ::UINT = ::WM_USER + 5;
524pub const WM_PSD_YAFULLPAGERECT: ::UINT = ::WM_USER + 6;
525pub type LPPAGEPAINTHOOK = Option<unsafe extern "system" fn(
526 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
527) -> ::UINT_PTR>;
528pub type LPPAGESETUPHOOK = Option<unsafe extern "system" fn(
529 ::HWND, ::UINT, ::WPARAM, ::LPARAM,
530) -> ::UINT_PTR>;
531STRUCT!{nodebug struct PAGESETUPDLGA {
532 lStructSize: ::DWORD,
533 hwndOwner: ::HWND,
534 hDevMode: ::HGLOBAL,
535 hDevNames: ::HGLOBAL,
536 Flags: ::DWORD,
537 ptPaperSize: ::POINT,
538 rtMinMargin: ::RECT,
539 rtMargin: ::RECT,
540 hInstance: ::HINSTANCE,
541 lCustData: ::LPARAM,
542 lpfnPageSetupHook: LPPAGESETUPHOOK,
543 lpfnPagePaintHook: LPPAGEPAINTHOOK,
544 lpPageSetupTemplateName: ::LPCSTR,
545 hPageSetupTemplate: ::HGLOBAL,
546}}
547pub type LPPAGESETUPDLGA = *mut PAGESETUPDLGA;
548STRUCT!{nodebug struct PAGESETUPDLGW {
549 lStructSize: ::DWORD,
550 hwndOwner: ::HWND,
551 hDevMode: ::HGLOBAL,
552 hDevNames: ::HGLOBAL,
553 Flags: ::DWORD,
554 ptPaperSize: ::POINT,
555 rtMinMargin: ::RECT,
556 rtMargin: ::RECT,
557 hInstance: ::HINSTANCE,
558 lCustData: ::LPARAM,
559 lpfnPageSetupHook: LPPAGESETUPHOOK,
560 lpfnPagePaintHook: LPPAGEPAINTHOOK,
561 lpPageSetupTemplateName: ::LPCWSTR,
562 hPageSetupTemplate: ::HGLOBAL,
563}}
564pub type LPPAGESETUPDLGW = *mut PAGESETUPDLGW;
565pub const PSD_DEFAULTMINMARGINS: ::DWORD = 0x00000000;
566pub const PSD_INWININIINTLMEASURE: ::DWORD = 0x00000000;
567pub const PSD_MINMARGINS: ::DWORD = 0x00000001;
568pub const PSD_MARGINS: ::DWORD = 0x00000002;
569pub const PSD_INTHOUSANDTHSOFINCHES: ::DWORD = 0x00000004;
570pub const PSD_INHUNDREDTHSOFMILLIMETERS: ::DWORD = 0x00000008;
571pub const PSD_DISABLEMARGINS: ::DWORD = 0x00000010;
572pub const PSD_DISABLEPRINTER: ::DWORD = 0x00000020;
573pub const PSD_NOWARNING: ::DWORD = 0x00000080;
574pub const PSD_DISABLEORIENTATION: ::DWORD = 0x00000100;
575pub const PSD_RETURNDEFAULT: ::DWORD = 0x00000400;
576pub const PSD_DISABLEPAPER: ::DWORD = 0x00000200;
577pub const PSD_SHOWHELP: ::DWORD = 0x00000800;
578pub const PSD_ENABLEPAGESETUPHOOK: ::DWORD = 0x00002000;
579pub const PSD_ENABLEPAGESETUPTEMPLATE: ::DWORD = 0x00008000;
580pub const PSD_ENABLEPAGESETUPTEMPLATEHANDLE: ::DWORD = 0x00020000;
581pub const PSD_ENABLEPAGEPAINTHOOK: ::DWORD = 0x00040000;
582pub const PSD_DISABLEPAGEPAINTING: ::DWORD = 0x00080000;
583pub const PSD_NONETWORKBUTTON: ::DWORD = 0x00200000;