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 use ctypes::{c_char, c_int, c_long, c_short, c_void};
7 use shared::basetsd::{DWORD_PTR, INT_PTR, LONG_PTR, UINT_PTR};
8 #[cfg(target_pointer_width = "64")] use shared::basetsd::PINT_PTR;
9 use shared::guiddef::{IID, REFIID};
10 use shared::minwindef::{
11 BOOL, BYTE, DWORD, HINSTANCE, HKEY, INT, LPARAM, LPINT, LRESULT, PUINT, UINT, ULONG, WORD,
12 WPARAM,
13 };
14 use shared::windef::{
15 COLORREF, HBITMAP, HBRUSH, HDC, HICON, HMENU, HPEN, HWND, LPCRECT, LPRECT, POINT, RECT, SIZE,
16 };
17 use um::commoncontrols::IImageList;
18 use um::minwinbase::SYSTEMTIME;
19 use um::winnt::{CHAR, LANGID, LONG, LPCSTR, LPCWSTR, LPSTR, LPWSTR, PCWSTR, PVOID, PWSTR, WCHAR};
20 use um::winuser::{
21 CB_DELETESTRING, IMAGE_BITMAP, LPSCROLLINFO, LPTRACKMOUSEEVENT, NMHDR,
22 WINDOWPOS, WM_USER,
23 };
24 use vc::vcruntime::size_t;
25 pub type HRESULT = c_long;
26 extern "system" {
InitCommonControls()27 pub fn InitCommonControls();
28 }
29 //138
30 STRUCT!{struct INITCOMMONCONTROLSEX {
31 dwSize: DWORD,
32 dwICC: DWORD,
33 }}
34 pub type LPINITCOMMONCONTROLSEX = *mut INITCOMMONCONTROLSEX;
35 pub const ICC_LISTVIEW_CLASSES: DWORD = 0x1;
36 pub const ICC_TREEVIEW_CLASSES: DWORD = 0x2;
37 pub const ICC_BAR_CLASSES: DWORD = 0x4;
38 pub const ICC_TAB_CLASSES: DWORD = 0x8;
39 pub const ICC_UPDOWN_CLASS: DWORD = 0x10;
40 pub const ICC_PROGRESS_CLASS: DWORD = 0x20;
41 pub const ICC_HOTKEY_CLASS: DWORD = 0x40;
42 pub const ICC_ANIMATE_CLASS: DWORD = 0x80;
43 pub const ICC_WIN95_CLASSES: DWORD = 0xFF;
44 pub const ICC_DATE_CLASSES: DWORD = 0x100;
45 pub const ICC_USEREX_CLASSES: DWORD = 0x200;
46 pub const ICC_COOL_CLASSES: DWORD = 0x400;
47 pub const ICC_INTERNET_CLASSES: DWORD = 0x800;
48 pub const ICC_PAGESCROLLER_CLASS: DWORD = 0x1000;
49 pub const ICC_NATIVEFNTCTL_CLASS: DWORD = 0x2000;
50 pub const ICC_STANDARD_CLASSES: DWORD = 0x4000;
51 pub const ICC_LINK_CLASS: DWORD = 0x8000;
52 extern "system" {
InitCommonControlsEx( lpInitCtrls: *const INITCOMMONCONTROLSEX, ) -> BOOL53 pub fn InitCommonControlsEx(
54 lpInitCtrls: *const INITCOMMONCONTROLSEX,
55 ) -> BOOL;
56 }
57 pub const ODT_HEADER: UINT = 100;
58 pub const ODT_TAB: UINT = 101;
59 pub const ODT_LISTVIEW: UINT = 102;
60 pub const LVM_FIRST: UINT = 0x1000;
61 pub const TV_FIRST: UINT = 0x1100;
62 pub const HDM_FIRST: UINT = 0x1200;
63 pub const TCM_FIRST: UINT = 0x1300;
64 pub const PGM_FIRST: UINT = 0x1400;
65 pub const ECM_FIRST: UINT = 0x1500;
66 pub const BCM_FIRST: UINT = 0x1600;
67 pub const CBM_FIRST: UINT = 0x1700;
68 pub const CCM_FIRST: UINT = 0x2000;
69 pub const CCM_LAST: UINT = CCM_FIRST + 0x200;
70 pub const CCM_SETBKCOLOR: UINT = CCM_FIRST + 1;
71 STRUCT!{struct COLORSCHEME {
72 dwSize: DWORD,
73 clrBtnHighlight: COLORREF,
74 clrBtnShadow: COLORREF,
75 }}
76 pub type LPCOLORSCHEME = *mut COLORSCHEME;
77 pub const CCM_SETCOLORSCHEME: UINT = CCM_FIRST + 2;
78 pub const CCM_GETCOLORSCHEME: UINT = CCM_FIRST + 3;
79 pub const CCM_GETDROPTARGET: UINT = CCM_FIRST + 4;
80 pub const CCM_SETUNICODEFORMAT: UINT = CCM_FIRST + 5;
81 pub const CCM_GETUNICODEFORMAT: UINT = CCM_FIRST + 6;
82 pub const CCM_SETVERSION: UINT = CCM_FIRST + 7;
83 pub const CCM_GETVERSION: UINT = CCM_FIRST + 8;
84 pub const CCM_SETNOTIFYWINDOW: UINT = CCM_FIRST + 9;
85 pub const CCM_SETWINDOWTHEME: UINT = CCM_FIRST + 0xb;
86 pub const CCM_DPISCALE: UINT = CCM_FIRST + 0xc;
87 pub const INFOTIPSIZE: c_int = 1024;
88 pub const NM_OUTOFMEMORY: UINT = (NM_FIRST as i32 - 1) as u32;
89 pub const NM_CLICK: UINT = (NM_FIRST as i32 - 2) as u32;
90 pub const NM_DBLCLK: UINT = (NM_FIRST as i32 - 3) as u32;
91 pub const NM_RETURN: UINT = (NM_FIRST as i32 - 4) as u32;
92 pub const NM_RCLICK: UINT = (NM_FIRST as i32 - 5) as u32;
93 pub const NM_RDBLCLK: UINT = (NM_FIRST as i32 - 6) as u32;
94 pub const NM_SETFOCUS: UINT = (NM_FIRST as i32 - 7) as u32;
95 pub const NM_KILLFOCUS: UINT = (NM_FIRST as i32 - 8) as u32;
96 pub const NM_CUSTOMDRAW: UINT = (NM_FIRST as i32 - 12) as u32;
97 pub const NM_HOVER: UINT = (NM_FIRST as i32 - 13) as u32;
98 pub const NM_NCHITTEST: UINT = (NM_FIRST as i32 - 14) as u32;
99 pub const NM_KEYDOWN: UINT = (NM_FIRST as i32 - 15) as u32;
100 pub const NM_RELEASEDCAPTURE: UINT = (NM_FIRST as i32 - 16) as u32;
101 pub const NM_SETCURSOR: UINT = (NM_FIRST as i32 - 17) as u32;
102 pub const NM_CHAR: UINT = (NM_FIRST as i32 - 18) as u32;
103 pub const NM_TOOLTIPSCREATED: UINT = (NM_FIRST as i32 - 19) as u32;
104 pub const NM_LDOWN: UINT = (NM_FIRST as i32 - 20) as u32;
105 pub const NM_RDOWN: UINT = (NM_FIRST as i32 - 21) as u32;
106 pub const NM_THEMECHANGED: UINT = (NM_FIRST as i32 - 22) as u32;
107 pub const NM_FONTCHANGED: UINT = (NM_FIRST as i32 - 23) as u32;
108 pub const NM_CUSTOMTEXT: UINT = (NM_FIRST as i32 - 24) as u32;
109 pub const NM_TVSTATEIMAGECHANGING: UINT = (NM_FIRST as i32 - 24) as u32;
110 STRUCT!{struct NMTOOLTIPSCREATED {
111 hdr: NMHDR,
112 hwndToolTips: HWND,
113 }}
114 pub type LPNMTOOLTIPSCREATED = *mut NMTOOLTIPSCREATED;
115 STRUCT!{struct NMMOUSE {
116 hdr: NMHDR,
117 dwItemSpec: DWORD_PTR,
118 dwItemData: DWORD_PTR,
119 pt: POINT,
120 dwHitInfo: LPARAM,
121 }}
122 pub type LPNMMOUSE = *mut NMMOUSE;
123 pub type NMCLICK = NMMOUSE;
124 pub type LPNMCLICK = LPNMMOUSE;
125 STRUCT!{struct NMOBJECTNOTIFY {
126 hdr: NMHDR,
127 iItem: c_int,
128 piid: *const IID,
129 pObject: *mut c_void,
130 hResult: HRESULT,
131 dwFlags: DWORD,
132 }}
133 pub type LPNMOBJECTNOTIFY = *mut NMOBJECTNOTIFY;
134 STRUCT!{struct NMKEY {
135 hdr: NMHDR,
136 nVKey: UINT,
137 uFlags: UINT,
138 }}
139 pub type LPNMKEY = *mut NMKEY;
140 STRUCT!{struct NMCHAR {
141 hdr: NMHDR,
142 ch: UINT,
143 dwItemPrev: DWORD,
144 dwItemNext: DWORD,
145 }}
146 pub type LPNMCHAR = *mut NMCHAR;
147 STRUCT!{struct NMCUSTOMTEXT {
148 hdr: NMHDR,
149 hDC: HDC,
150 lpString: LPCWSTR,
151 nCount: c_int,
152 lpRect: LPRECT,
153 uFormat: UINT,
154 fLink: BOOL,
155 }}
156 pub type LPNMCUSTOMTEXT = *mut NMCUSTOMTEXT;
157 pub const NM_FIRST: UINT = 0;
158 pub const NM_LAST: UINT = -99i32 as u32;
159 pub const LVN_FIRST: UINT = -100i32 as u32;
160 pub const LVN_LAST: UINT = -199i32 as u32;
161 pub const HDN_FIRST: UINT = -300i32 as u32;
162 pub const HDN_LAST: UINT = -399i32 as u32;
163 pub const TVN_FIRST: UINT = -400i32 as u32;
164 pub const TVN_LAST: UINT = -499i32 as u32;
165 pub const TTN_FIRST: UINT = -520i32 as u32;
166 pub const TTN_LAST: UINT = -549i32 as u32;
167 pub const TCN_FIRST: UINT = -550i32 as u32;
168 pub const TCN_LAST: UINT = -580i32 as u32;
169 pub const CDN_FIRST: UINT = -601i32 as u32;
170 pub const CDN_LAST: UINT = -699i32 as u32;
171 pub const TBN_FIRST: UINT = -700i32 as u32;
172 pub const TBN_LAST: UINT = -720i32 as u32;
173 pub const UDN_FIRST: UINT = -721i32 as u32;
174 pub const UDN_LAST: UINT = -729i32 as u32;
175 pub const DTN_FIRST: UINT = -740i32 as u32;
176 pub const DTN_LAST: UINT = -745i32 as u32;
177 pub const MCN_FIRST: UINT = -746i32 as u32;
178 pub const MCN_LAST: UINT = -752i32 as u32;
179 pub const DTN_FIRST2: UINT = -753i32 as u32;
180 pub const DTN_LAST2: UINT = -799i32 as u32;
181 pub const CBEN_FIRST: UINT = -800i32 as u32;
182 pub const CBEN_LAST: UINT = -830i32 as u32;
183 pub const RBN_FIRST: UINT = -831i32 as u32;
184 pub const RBN_LAST: UINT = -859i32 as u32;
185 pub const IPN_FIRST: UINT = -860i32 as u32;
186 pub const IPN_LAST: UINT = -879i32 as u32;
187 pub const SBN_FIRST: UINT = -880i32 as u32;
188 pub const SBN_LAST: UINT = -899i32 as u32;
189 pub const PGN_FIRST: UINT = -900i32 as u32;
190 pub const PGN_LAST: UINT = -950i32 as u32;
191 pub const WMN_FIRST: UINT = -1000i32 as u32;
192 pub const WMN_LAST: UINT = -1200i32 as u32;
193 pub const BCN_FIRST: UINT = -1250i32 as u32;
194 pub const BCN_LAST: UINT = -1350i32 as u32;
195 pub const TRBN_FIRST: UINT = -1501i32 as u32;
196 pub const TRBN_LAST: UINT = -1519i32 as u32;
197 pub const MSGF_COMMCTRL_BEGINDRAG: c_int = 0x4200;
198 pub const MSGF_COMMCTRL_SIZEHEADER: c_int = 0x4201;
199 pub const MSGF_COMMCTRL_DRAGSELECT: c_int = 0x4202;
200 pub const MSGF_COMMCTRL_TOOLBARCUST: c_int = 0x4203;
201 pub const CDRF_DODEFAULT: LRESULT = 0x00000000;
202 pub const CDRF_NEWFONT: LRESULT = 0x00000002;
203 pub const CDRF_SKIPDEFAULT: LRESULT = 0x00000004;
204 pub const CDRF_DOERASE: LRESULT = 0x00000008;
205 pub const CDRF_SKIPPOSTPAINT: LRESULT = 0x00000100;
206 pub const CDRF_NOTIFYPOSTPAINT: LRESULT = 0x00000010;
207 pub const CDRF_NOTIFYITEMDRAW: LRESULT = 0x00000020;
208 pub const CDRF_NOTIFYSUBITEMDRAW: LRESULT = 0x00000020;
209 pub const CDRF_NOTIFYPOSTERASE: LRESULT = 0x00000040;
210 pub const CDDS_PREPAINT: DWORD = 0x00000001;
211 pub const CDDS_POSTPAINT: DWORD = 0x00000002;
212 pub const CDDS_PREERASE: DWORD = 0x00000003;
213 pub const CDDS_POSTERASE: DWORD = 0x00000004;
214 pub const CDDS_ITEM: DWORD = 0x00010000;
215 pub const CDDS_ITEMPREPAINT: DWORD = CDDS_ITEM | CDDS_PREPAINT;
216 pub const CDDS_ITEMPOSTPAINT: DWORD = CDDS_ITEM | CDDS_POSTPAINT;
217 pub const CDDS_ITEMPREERASE: DWORD = CDDS_ITEM | CDDS_PREERASE;
218 pub const CDDS_ITEMPOSTERASE: DWORD = CDDS_ITEM | CDDS_POSTERASE;
219 pub const CDDS_SUBITEM: DWORD = 0x00020000;
220 pub const CDIS_SELECTED: UINT = 0x0001;
221 pub const CDIS_GRAYED: UINT = 0x0002;
222 pub const CDIS_DISABLED: UINT = 0x0004;
223 pub const CDIS_CHECKED: UINT = 0x0008;
224 pub const CDIS_FOCUS: UINT = 0x0010;
225 pub const CDIS_DEFAULT: UINT = 0x0020;
226 pub const CDIS_HOT: UINT = 0x0040;
227 pub const CDIS_MARKED: UINT = 0x0080;
228 pub const CDIS_INDETERMINATE: UINT = 0x0100;
229 pub const CDIS_SHOWKEYBOARDCUES: UINT = 0x0200;
230 pub const CDIS_NEARHOT: UINT = 0x0400;
231 pub const CDIS_OTHERSIDEHOT: UINT = 0x0800;
232 pub const CDIS_DROPHILITED: UINT = 0x1000;
233 STRUCT!{struct NMCUSTOMDRAW {
234 hdr: NMHDR,
235 dwDrawStage: DWORD,
236 hdc: HDC,
237 rc: RECT,
238 dwItemSpec: DWORD_PTR,
239 uItemState: UINT,
240 lItemlParam: LPARAM,
241 }}
242 pub type LPNMCUSTOMDRAW = *mut NMCUSTOMDRAW;
243 STRUCT!{struct NMTTCUSTOMDRAW {
244 nmcd: NMCUSTOMDRAW,
245 uDrawFlags: UINT,
246 }}
247 pub type LPNMTTCUSTOMDRAW = *mut NMTTCUSTOMDRAW;
248 STRUCT!{struct NMCUSTOMSPLITRECTINFO {
249 hdr: NMHDR,
250 rcClient: RECT,
251 rcButton: RECT,
252 rcSplit: RECT,
253 }}
254 pub type LPNMCUSTOMSPLITRECTINFO = *mut NMCUSTOMSPLITRECTINFO;
255 pub const NM_GETCUSTOMSPLITRECT: UINT = BCN_FIRST + 0x0003;
256 pub const CLR_NONE: DWORD = 0xFFFFFFFF;
257 pub const CLR_DEFAULT: DWORD = 0xFF000000;
258 pub enum IMAGELIST {}
259 pub type HIMAGELIST = *mut IMAGELIST;
260 STRUCT!{struct IMAGELISTDRAWPARAMS {
261 cbSize: DWORD,
262 himl: HIMAGELIST,
263 i: c_int,
264 hdcDst: HDC,
265 x: c_int,
266 y: c_int,
267 cx: c_int,
268 cy: c_int,
269 xBitmap: c_int,
270 yBitmap: c_int,
271 rgbBk: COLORREF,
272 rgbFg: COLORREF,
273 fStyle: UINT,
274 dwRop: DWORD,
275 fState: DWORD,
276 Frame: DWORD,
277 crEffect: COLORREF,
278 }}
279 pub type LPIMAGELISTDRAWPARAMS = *mut IMAGELISTDRAWPARAMS;
280 pub const ILC_MASK: UINT = 0x00000001;
281 pub const ILC_COLOR: UINT = 0x00000000;
282 pub const ILC_COLORDDB: UINT = 0x000000FE;
283 pub const ILC_COLOR4: UINT = 0x00000004;
284 pub const ILC_COLOR8: UINT = 0x00000008;
285 pub const ILC_COLOR16: UINT = 0x00000010;
286 pub const ILC_COLOR24: UINT = 0x00000018;
287 pub const ILC_COLOR32: UINT = 0x00000020;
288 pub const ILC_PALETTE: UINT = 0x00000800;
289 pub const ILC_MIRROR: UINT = 0x00002000;
290 pub const ILC_PERITEMMIRROR: UINT = 0x00008000;
291 pub const ILC_ORIGINALSIZE: UINT = 0x00010000;
292 pub const ILC_HIGHQUALITYSCALE: UINT = 0x00020000;
293 extern "system" {
ImageList_Create( cx: c_int, cy: c_int, flags: UINT, cInitial: c_int, cGrow: c_int, ) -> HIMAGELIST294 pub fn ImageList_Create(
295 cx: c_int,
296 cy: c_int,
297 flags: UINT,
298 cInitial: c_int,
299 cGrow: c_int,
300 ) -> HIMAGELIST;
ImageList_Destroy( himl: HIMAGELIST, ) -> BOOL301 pub fn ImageList_Destroy(
302 himl: HIMAGELIST,
303 ) -> BOOL;
ImageList_GetImageCount( himl: HIMAGELIST, ) -> c_int304 pub fn ImageList_GetImageCount(
305 himl: HIMAGELIST,
306 ) -> c_int;
ImageList_SetImageCount( himl: HIMAGELIST, uNewCount: UINT, ) -> BOOL307 pub fn ImageList_SetImageCount(
308 himl: HIMAGELIST,
309 uNewCount: UINT,
310 ) -> BOOL;
ImageList_Add( himl: HIMAGELIST, hbmImage: HBITMAP, hbmMask: HBITMAP, ) -> c_int311 pub fn ImageList_Add(
312 himl: HIMAGELIST,
313 hbmImage: HBITMAP,
314 hbmMask: HBITMAP,
315 ) -> c_int;
ImageList_ReplaceIcon( himl: HIMAGELIST, i: c_int, hicon: HICON, ) -> c_int316 pub fn ImageList_ReplaceIcon(
317 himl: HIMAGELIST,
318 i: c_int,
319 hicon: HICON,
320 ) -> c_int;
ImageList_SetBkColor( himl: HIMAGELIST, clrBk: COLORREF, ) -> COLORREF321 pub fn ImageList_SetBkColor(
322 himl: HIMAGELIST,
323 clrBk: COLORREF,
324 ) -> COLORREF;
ImageList_GetBkColor( himl: HIMAGELIST, ) -> COLORREF325 pub fn ImageList_GetBkColor(
326 himl: HIMAGELIST,
327 ) -> COLORREF;
ImageList_SetOverlayImage( himl: HIMAGELIST, iImage: c_int, iOverlay: c_int, ) -> BOOL328 pub fn ImageList_SetOverlayImage(
329 himl: HIMAGELIST,
330 iImage: c_int,
331 iOverlay: c_int,
332 ) -> BOOL;
333 }
334 #[inline]
ImageList_AddIcon(himl: HIMAGELIST, hicon: HICON) -> c_int335 pub unsafe fn ImageList_AddIcon(himl: HIMAGELIST, hicon: HICON) -> c_int {
336 ImageList_ReplaceIcon(himl, -1, hicon)
337 }
338 pub const ILD_NORMAL: UINT = 0x00000000;
339 pub const ILD_TRANSPARENT: UINT = 0x00000001;
340 pub const ILD_MASK: UINT = 0x00000010;
341 pub const ILD_IMAGE: UINT = 0x00000020;
342 pub const ILD_ROP: UINT = 0x00000040;
343 pub const ILD_BLEND25: UINT = 0x00000002;
344 pub const ILD_BLEND50: UINT = 0x00000004;
345 pub const ILD_OVERLAYMASK: UINT = 0x00000F00;
346 #[inline]
INDEXTOOVERLAYMASK(i: UINT) -> UINT347 pub fn INDEXTOOVERLAYMASK(i: UINT) -> UINT {
348 i << 8
349 }
350 pub const ILD_PRESERVEALPHA: UINT = 0x00001000;
351 pub const ILD_SCALE: UINT = 0x00002000;
352 pub const ILD_DPISCALE: UINT = 0x00004000;
353 pub const ILD_ASYNC: UINT = 0x00008000;
354 pub const ILD_SELECTED: UINT = ILD_BLEND50;
355 pub const ILD_FOCUS: UINT = ILD_BLEND25;
356 pub const ILD_BLEND: UINT = ILD_BLEND50;
357 pub const CLR_HILIGHT: DWORD = CLR_DEFAULT;
358 pub const ILS_NORMAL: DWORD = 0x00000000;
359 pub const ILS_GLOW: DWORD = 0x00000001;
360 pub const ILS_SHADOW: DWORD = 0x00000002;
361 pub const ILS_SATURATE: DWORD = 0x00000004;
362 pub const ILS_ALPHA: DWORD = 0x00000008;
363 pub const ILGT_NORMAL: DWORD = 0x00000000;
364 pub const ILGT_ASYNC : DWORD = 0x00000001;
365 extern "system" {
ImageList_Draw( himl: HIMAGELIST, i: c_int, hdcDst: HDC, x: c_int, y: c_int, fStyle: UINT, ) -> BOOL366 pub fn ImageList_Draw(
367 himl: HIMAGELIST,
368 i: c_int,
369 hdcDst: HDC,
370 x: c_int,
371 y: c_int,
372 fStyle: UINT,
373 ) -> BOOL;
374 }
375 pub const HBITMAP_CALLBACK: HBITMAP = -1isize as HBITMAP;
376 extern "system" {
ImageList_Replace( himl: HIMAGELIST, i: c_int, hbmImage: HBITMAP, hbmMask: HBITMAP, ) -> BOOL377 pub fn ImageList_Replace(
378 himl: HIMAGELIST,
379 i: c_int,
380 hbmImage: HBITMAP,
381 hbmMask: HBITMAP,
382 ) -> BOOL;
ImageList_AddMasked( himl: HIMAGELIST, hbmImage: HBITMAP, crMask: COLORREF, ) -> c_int383 pub fn ImageList_AddMasked(
384 himl: HIMAGELIST,
385 hbmImage: HBITMAP,
386 crMask: COLORREF,
387 ) -> c_int;
ImageList_DrawEx( himl: HIMAGELIST, i: c_int, hdcDst: HDC, x: c_int, y: c_int, dx: c_int, dy: c_int, rgbBk: COLORREF, rgbFg: COLORREF, fStyle: UINT, ) -> BOOL388 pub fn ImageList_DrawEx(
389 himl: HIMAGELIST,
390 i: c_int,
391 hdcDst: HDC,
392 x: c_int,
393 y: c_int,
394 dx: c_int,
395 dy: c_int,
396 rgbBk: COLORREF,
397 rgbFg: COLORREF,
398 fStyle: UINT,
399 ) -> BOOL;
ImageList_DrawIndirect( pimldp: *mut IMAGELISTDRAWPARAMS, ) -> BOOL400 pub fn ImageList_DrawIndirect(
401 pimldp: *mut IMAGELISTDRAWPARAMS,
402 ) -> BOOL;
ImageList_Remove( himl: HIMAGELIST, i: c_int, ) -> BOOL403 pub fn ImageList_Remove(
404 himl: HIMAGELIST,
405 i: c_int,
406 ) -> BOOL;
ImageList_GetIcon( himl: HIMAGELIST, i: c_int, flags: UINT, ) -> HICON407 pub fn ImageList_GetIcon(
408 himl: HIMAGELIST,
409 i: c_int,
410 flags: UINT,
411 ) -> HICON;
ImageList_LoadImageA( hi: HINSTANCE, lpbmp: LPCSTR, cx: c_int, cGrow: c_int, crMask: COLORREF, uType: UINT, uFlags: UINT, ) -> HIMAGELIST412 pub fn ImageList_LoadImageA(
413 hi: HINSTANCE,
414 lpbmp: LPCSTR,
415 cx: c_int,
416 cGrow: c_int,
417 crMask: COLORREF,
418 uType: UINT,
419 uFlags: UINT,
420 ) -> HIMAGELIST;
ImageList_LoadImageW( hi: HINSTANCE, lpbmp: LPCWSTR, cx: c_int, cGrow: c_int, crMask: COLORREF, uType: UINT, uFlags: UINT, ) -> HIMAGELIST421 pub fn ImageList_LoadImageW(
422 hi: HINSTANCE,
423 lpbmp: LPCWSTR,
424 cx: c_int,
425 cGrow: c_int,
426 crMask: COLORREF,
427 uType: UINT,
428 uFlags: UINT,
429 ) -> HIMAGELIST;
430 }
431 pub const ILCF_MOVE: UINT = 0x00000000;
432 pub const ILCF_SWAP: UINT = 0x00000001;
433 extern "system" {
ImageList_Copy( himlDst: HIMAGELIST, iDst: c_int, himlSrc: HIMAGELIST, iSrc: c_int, uFlags: UINT, ) -> BOOL434 pub fn ImageList_Copy(
435 himlDst: HIMAGELIST,
436 iDst: c_int,
437 himlSrc: HIMAGELIST,
438 iSrc: c_int,
439 uFlags: UINT,
440 ) -> BOOL;
ImageList_BeginDrag( himlTrack: HIMAGELIST, iTrack: c_int, dxHotspot: c_int, dyHotspot: c_int, ) -> BOOL441 pub fn ImageList_BeginDrag(
442 himlTrack: HIMAGELIST,
443 iTrack: c_int,
444 dxHotspot: c_int,
445 dyHotspot: c_int,
446 ) -> BOOL;
ImageList_EndDrag()447 pub fn ImageList_EndDrag();
ImageList_DragEnter( hwndLock: HWND, x: c_int, y: c_int, ) -> BOOL448 pub fn ImageList_DragEnter(
449 hwndLock: HWND,
450 x: c_int,
451 y: c_int,
452 ) -> BOOL;
ImageList_DragLeave( hwndLock: HWND, ) -> BOOL453 pub fn ImageList_DragLeave(
454 hwndLock: HWND,
455 ) -> BOOL;
ImageList_DragMove( x: c_int, y: c_int, ) -> BOOL456 pub fn ImageList_DragMove(
457 x: c_int,
458 y: c_int,
459 ) -> BOOL;
ImageList_SetDragCursorImage( himlDrag: HIMAGELIST, iDrag: c_int, dxHotspot: c_int, dyHotspot: c_int, ) -> BOOL460 pub fn ImageList_SetDragCursorImage(
461 himlDrag: HIMAGELIST,
462 iDrag: c_int,
463 dxHotspot: c_int,
464 dyHotspot: c_int,
465 ) -> BOOL;
ImageList_DragShowNolock( fShow: BOOL, ) -> BOOL466 pub fn ImageList_DragShowNolock(
467 fShow: BOOL,
468 ) -> BOOL;
ImageList_GetDragImage( ppt: *mut POINT, pptHotspot: *mut POINT, ) -> HIMAGELIST469 pub fn ImageList_GetDragImage(
470 ppt: *mut POINT,
471 pptHotspot: *mut POINT,
472 ) -> HIMAGELIST;
473 }
474 #[inline]
ImageList_RemoveAll(himl: HIMAGELIST) -> BOOL475 pub unsafe fn ImageList_RemoveAll(himl: HIMAGELIST) -> BOOL {
476 ImageList_Remove(himl, -1)
477 }
478 #[inline]
ImageList_ExtractIcon(_: HINSTANCE, himl: HIMAGELIST, i: c_int) -> HICON479 pub unsafe fn ImageList_ExtractIcon(_: HINSTANCE, himl: HIMAGELIST, i: c_int) -> HICON {
480 ImageList_GetIcon(himl, i, 0)
481 }
482 #[inline]
ImageList_LoadBitmap( hi: HINSTANCE, lpbmp: LPCWSTR, cx: c_int, cGrow: c_int, crMask: COLORREF, ) -> HIMAGELIST483 pub unsafe fn ImageList_LoadBitmap(
484 hi: HINSTANCE,
485 lpbmp: LPCWSTR,
486 cx: c_int,
487 cGrow: c_int,
488 crMask: COLORREF,
489 ) -> HIMAGELIST {
490 ImageList_LoadImageW(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0)
491 }
492 pub enum IStream {}
493 extern "system" {
ImageList_Read( pstm: *mut IStream, ) -> HIMAGELIST494 pub fn ImageList_Read(
495 pstm: *mut IStream,
496 ) -> HIMAGELIST;
ImageList_Write( himl: HIMAGELIST, pstm: *mut IStream, ) -> BOOL497 pub fn ImageList_Write(
498 himl: HIMAGELIST,
499 pstm: *mut IStream,
500 ) -> BOOL;
501 }
502 pub const ILP_NORMAL: DWORD = 0;
503 pub const ILP_DOWNLEVEL: DWORD = 0;
504 extern "system" {
ImageList_ReadEx( dwFlags: DWORD, pstm: *mut IStream, riid: REFIID, ppv: *mut PVOID, ) -> HRESULT505 pub fn ImageList_ReadEx(
506 dwFlags: DWORD,
507 pstm: *mut IStream,
508 riid: REFIID,
509 ppv: *mut PVOID,
510 ) -> HRESULT;
ImageList_WriteEx( himl: HIMAGELIST, dwFlags: DWORD, pstm: *mut IStream, ) -> HRESULT511 pub fn ImageList_WriteEx(
512 himl: HIMAGELIST,
513 dwFlags: DWORD,
514 pstm: *mut IStream,
515 ) -> HRESULT;
516 }
517 STRUCT!{struct IMAGEINFO {
518 hbmImage: HBITMAP,
519 hbmMask: HBITMAP,
520 Unused1: c_int,
521 Unused2: c_int,
522 rcImage: RECT,
523 }}
524 pub type LPIMAGEINFO = *mut IMAGEINFO;
525 extern "system" {
ImageList_GetIconSize( himl: HIMAGELIST, cx: *mut c_int, cy: *mut c_int, ) -> BOOL526 pub fn ImageList_GetIconSize(
527 himl: HIMAGELIST,
528 cx: *mut c_int,
529 cy: *mut c_int,
530 ) -> BOOL;
ImageList_SetIconSize( himl: HIMAGELIST, cx: c_int, cy: c_int, ) -> BOOL531 pub fn ImageList_SetIconSize(
532 himl: HIMAGELIST,
533 cx: c_int,
534 cy: c_int,
535 ) -> BOOL;
ImageList_GetImageInfo( himl: HIMAGELIST, i: c_int, pImageInfo: *mut IMAGEINFO, ) -> BOOL536 pub fn ImageList_GetImageInfo(
537 himl: HIMAGELIST,
538 i: c_int,
539 pImageInfo: *mut IMAGEINFO,
540 ) -> BOOL;
ImageList_Merge( himl1: HIMAGELIST, i1: c_int, himl2: HIMAGELIST, i2: c_int, dx: c_int, dy: c_int, ) -> HIMAGELIST541 pub fn ImageList_Merge(
542 himl1: HIMAGELIST,
543 i1: c_int,
544 himl2: HIMAGELIST,
545 i2: c_int,
546 dx: c_int,
547 dy: c_int,
548 ) -> HIMAGELIST;
ImageList_Duplicate( himl: HIMAGELIST, ) -> HIMAGELIST549 pub fn ImageList_Duplicate(
550 himl: HIMAGELIST,
551 ) -> HIMAGELIST;
HIMAGELIST_QueryInterface( himl: HIMAGELIST, riid: REFIID, ppv: *mut *mut c_void, ) -> HRESULT552 pub fn HIMAGELIST_QueryInterface(
553 himl: HIMAGELIST,
554 riid: REFIID,
555 ppv: *mut *mut c_void,
556 ) -> HRESULT;
557 }
558 #[inline]
IImageListToHIMAGELIST(himl: *mut IImageList) -> HIMAGELIST559 pub fn IImageListToHIMAGELIST(himl: *mut IImageList) -> HIMAGELIST {
560 himl as HIMAGELIST
561 }
562 pub const WC_HEADER: &'static str = "SysHeader32";
563 pub const HDS_HORZ: DWORD = 0x0000;
564 pub const HDS_BUTTONS: DWORD = 0x0002;
565 pub const HDS_HOTTRACK: DWORD = 0x0004;
566 pub const HDS_HIDDEN: DWORD = 0x0008;
567 pub const HDS_DRAGDROP: DWORD = 0x0040;
568 pub const HDS_FULLDRAG: DWORD = 0x0080;
569 pub const HDS_FILTERBAR: DWORD = 0x0100;
570 pub const HDS_FLAT: DWORD = 0x0200;
571 pub const HDS_CHECKBOXES: DWORD = 0x0400;
572 pub const HDS_NOSIZING: DWORD = 0x0800;
573 pub const HDS_OVERFLOW: DWORD = 0x1000;
574 pub const HDFT_ISSTRING: UINT = 0x0000;
575 pub const HDFT_ISNUMBER: UINT = 0x0001;
576 pub const HDFT_ISDATE: UINT = 0x0002;
577 pub const HDFT_HASNOVALUE: UINT = 0x8000;
578 STRUCT!{struct HD_TEXTFILTERA {
579 pszText: LPSTR,
580 cchTextMax: INT,
581 }}
582 pub type LPHD_TEXTFILTERA = *mut HD_TEXTFILTERA;
583 STRUCT!{struct HD_TEXTFILTERW {
584 pszText: LPWSTR,
585 cchTextMax: INT,
586 }}
587 pub type LPHD_TEXTFILTERW = *mut HD_TEXTFILTERW;
588 STRUCT!{struct HDITEMA {
589 mask: UINT,
590 cxy: c_int,
591 pszText: LPSTR,
592 hbm: HBITMAP,
593 cchTextMax: c_int,
594 fmt: c_int,
595 lParam: LPARAM,
596 iImage: c_int,
597 iOrder: c_int,
598 _type: UINT,
599 pvFilter: *mut c_void,
600 state: UINT,
601 }}
602 pub type LPHDITEMA = *mut HDITEMA;
603 STRUCT!{struct HDITEMW {
604 mask: UINT,
605 cxy: c_int,
606 pszText: LPWSTR,
607 hbm: HBITMAP,
608 cchTextMax: c_int,
609 fmt: c_int,
610 lParam: LPARAM,
611 iImage: c_int,
612 iOrder: c_int,
613 _type: UINT,
614 pvFilter: *mut c_void,
615 state: UINT,
616 }}
617 pub type LPHDITEMW = *mut HDITEMW;
618 pub const HDI_WIDTH: UINT = 0x0001;
619 pub const HDI_HEIGHT: UINT = HDI_WIDTH;
620 pub const HDI_TEXT: UINT = 0x0002;
621 pub const HDI_FORMAT: UINT = 0x0004;
622 pub const HDI_LPARAM: UINT = 0x0008;
623 pub const HDI_BITMAP: UINT = 0x0010;
624 pub const HDI_IMAGE: UINT = 0x0020;
625 pub const HDI_DI_SETITEM: UINT = 0x0040;
626 pub const HDI_ORDER: UINT = 0x0080;
627 pub const HDI_FILTER: UINT = 0x0100;
628 pub const HDI_STATE: UINT = 0x0200;
629 pub const HDF_LEFT: c_int = 0x0000;
630 pub const HDF_RIGHT: c_int = 0x0001;
631 pub const HDF_CENTER: c_int = 0x0002;
632 pub const HDF_JUSTIFYMASK: c_int = 0x0003;
633 pub const HDF_RTLREADING: c_int = 0x0004;
634 pub const HDF_BITMAP: c_int = 0x2000;
635 pub const HDF_STRING: c_int = 0x4000;
636 pub const HDF_OWNERDRAW: c_int = 0x8000;
637 pub const HDF_IMAGE: c_int = 0x0800;
638 pub const HDF_BITMAP_ON_RIGHT: c_int = 0x1000;
639 pub const HDF_SORTUP: c_int = 0x0400;
640 pub const HDF_SORTDOWN: c_int = 0x0200;
641 pub const HDF_CHECKBOX: c_int = 0x0040;
642 pub const HDF_CHECKED: c_int = 0x0080;
643 pub const HDF_FIXEDWIDTH: c_int = 0x0100;
644 pub const HDF_SPLITBUTTON: c_int = 0x1000000;
645 pub const HDIS_FOCUSED: UINT = 0x00000001;
646 pub const HDM_GETITEMCOUNT: UINT = HDM_FIRST + 0;
647 pub const HDM_INSERTITEMA: UINT = HDM_FIRST + 1;
648 pub const HDM_INSERTITEMW: UINT = HDM_FIRST + 10;
649 pub const HDM_DELETEITEM: UINT = HDM_FIRST + 2;
650 pub const HDM_GETITEMA: UINT = HDM_FIRST + 3;
651 pub const HDM_GETITEMW: UINT = HDM_FIRST + 11;
652 pub const HDM_SETITEMA: UINT = HDM_FIRST + 4;
653 pub const HDM_SETITEMW: UINT = HDM_FIRST + 12;
654 STRUCT!{struct HDLAYOUT {
655 prc: *mut RECT,
656 pwpos: *mut WINDOWPOS,
657 }}
658 pub type LPHDLAYOUT = *mut HDLAYOUT;
659 pub const HDM_LAYOUT: UINT = HDM_FIRST + 5;
660 pub const HHT_NOWHERE: UINT = 0x0001;
661 pub const HHT_ONHEADER: UINT = 0x0002;
662 pub const HHT_ONDIVIDER: UINT = 0x0004;
663 pub const HHT_ONDIVOPEN: UINT = 0x0008;
664 pub const HHT_ONFILTER: UINT = 0x0010;
665 pub const HHT_ONFILTERBUTTON: UINT = 0x0020;
666 pub const HHT_ABOVE: UINT = 0x0100;
667 pub const HHT_BELOW: UINT = 0x0200;
668 pub const HHT_TORIGHT: UINT = 0x0400;
669 pub const HHT_TOLEFT: UINT = 0x0800;
670 pub const HHT_ONITEMSTATEICON: UINT = 0x1000;
671 pub const HHT_ONDROPDOWN: UINT = 0x2000;
672 pub const HHT_ONOVERFLOW: UINT = 0x4000;
673 STRUCT!{struct HDHITTESTINFO {
674 pt: POINT,
675 flags: UINT,
676 iItem: c_int,
677 }}
678 pub type LPHDHITTESTINFO = *mut HDHITTESTINFO;
679 pub type HD_HITTESTINFO = HDHITTESTINFO;
680 pub const HDSIL_NORMAL: WPARAM = 0;
681 pub const HDSIL_STATE: WPARAM = 1;
682 pub const HDM_HITTEST: UINT = HDM_FIRST + 6;
683 pub const HDM_GETITEMRECT: UINT = HDM_FIRST + 7;
684 pub const HDM_SETIMAGELIST: UINT = HDM_FIRST + 8;
685 pub const HDM_GETIMAGELIST: UINT = HDM_FIRST + 9;
686 pub const HDM_ORDERTOINDEX: UINT = HDM_FIRST + 15;
687 pub const HDM_CREATEDRAGIMAGE: UINT = HDM_FIRST + 16;
688 pub const HDM_GETORDERARRAY: UINT = HDM_FIRST + 17;
689 pub const HDM_SETORDERARRAY: UINT = HDM_FIRST + 18;
690 pub const HDM_SETHOTDIVIDER: UINT = HDM_FIRST + 19;
691 pub const HDM_SETBITMAPMARGIN: UINT = HDM_FIRST + 20;
692 pub const HDM_GETBITMAPMARGIN: UINT = HDM_FIRST + 21;
693 pub const HDM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
694 pub const HDM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
695 pub const HDM_SETFILTERCHANGETIMEOUT: UINT = HDM_FIRST + 22;
696 pub const HDM_EDITFILTER: UINT = HDM_FIRST + 23;
697 pub const HDM_CLEARFILTER: UINT = HDM_FIRST + 24;
698 pub const HDM_GETITEMDROPDOWNRECT: UINT = HDM_FIRST + 25;
699 pub const HDM_GETOVERFLOWRECT: UINT = HDM_FIRST + 26;
700 pub const HDM_GETFOCUSEDITEM: UINT = HDM_FIRST + 27;
701 pub const HDM_SETFOCUSEDITEM: UINT = HDM_FIRST + 28;
702 pub const HDN_ITEMCHANGINGA: UINT = HDN_FIRST - 0;
703 pub const HDN_ITEMCHANGINGW: UINT = HDN_FIRST - 20;
704 pub const HDN_ITEMCHANGEDA: UINT = HDN_FIRST - 1;
705 pub const HDN_ITEMCHANGEDW: UINT = HDN_FIRST - 21;
706 pub const HDN_ITEMCLICKA: UINT = HDN_FIRST - 2;
707 pub const HDN_ITEMCLICKW: UINT = HDN_FIRST - 22;
708 pub const HDN_ITEMDBLCLICKA: UINT = HDN_FIRST - 3;
709 pub const HDN_ITEMDBLCLICKW: UINT = HDN_FIRST - 23;
710 pub const HDN_DIVIDERDBLCLICKA: UINT = HDN_FIRST - 5;
711 pub const HDN_DIVIDERDBLCLICKW: UINT = HDN_FIRST - 25;
712 pub const HDN_BEGINTRACKA: UINT = HDN_FIRST - 6;
713 pub const HDN_BEGINTRACKW: UINT = HDN_FIRST - 26;
714 pub const HDN_ENDTRACKA: UINT = HDN_FIRST - 7;
715 pub const HDN_ENDTRACKW: UINT = HDN_FIRST - 27;
716 pub const HDN_TRACKA: UINT = HDN_FIRST - 8;
717 pub const HDN_TRACKW: UINT = HDN_FIRST - 28;
718 pub const HDN_GETDISPINFOA: UINT = HDN_FIRST - 9;
719 pub const HDN_GETDISPINFOW: UINT = HDN_FIRST - 29;
720 pub const HDN_BEGINDRAG: UINT = HDN_FIRST - 10;
721 pub const HDN_ENDDRAG: UINT = HDN_FIRST - 11;
722 pub const HDN_FILTERCHANGE: UINT = HDN_FIRST - 12;
723 pub const HDN_FILTERBTNCLICK: UINT = HDN_FIRST - 13;
724 pub const HDN_BEGINFILTEREDIT: UINT = HDN_FIRST - 14;
725 pub const HDN_ENDFILTEREDIT: UINT = HDN_FIRST - 15;
726 pub const HDN_ITEMSTATEICONCLICK: UINT = HDN_FIRST - 16;
727 pub const HDN_ITEMKEYDOWN: UINT = HDN_FIRST - 17;
728 pub const HDN_DROPDOWN: UINT = HDN_FIRST - 18;
729 pub const HDN_OVERFLOWCLICK: UINT = HDN_FIRST - 19;
730 STRUCT!{struct NMHEADERA {
731 hdr: NMHDR,
732 iItem: c_int,
733 iButton: c_int,
734 pitem: *mut HDITEMA,
735 }}
736 pub type LPNMHEADERA = *mut NMHEADERA;
737 pub type HD_NOTIFYA = NMHEADERA;
738 STRUCT!{struct NMHEADERW {
739 hdr: NMHDR,
740 iItem: c_int,
741 iButton: c_int,
742 pitem: *mut HDITEMW,
743 }}
744 pub type LPNMHEADERW = *mut NMHEADERW;
745 pub type HD_NOTIFYW = NMHEADERW;
746 STRUCT!{struct NMHDDISPINFOW {
747 hdr: NMHDR,
748 iItem: c_int,
749 mask: UINT,
750 pszText: LPWSTR,
751 cchTextMax: c_int,
752 iImage: c_int,
753 lParam: LPARAM,
754 }}
755 pub type LPNMHDDISPINFOW = *mut NMHDDISPINFOW;
756 STRUCT!{struct NMHDDISPINFOA {
757 hdr: NMHDR,
758 iItem: c_int,
759 mask: UINT,
760 pszText: LPSTR,
761 cchTextMax: c_int,
762 iImage: c_int,
763 lParam: LPARAM,
764 }}
765 pub type LPNMHDDISPINFOA = *mut NMHDDISPINFOA;
766 STRUCT!{struct NMHDFILTERBTNCLICK {
767 hdr: NMHDR,
768 iItem: INT,
769 rc: RECT,
770 }}
771 pub type LPNMHDFILTERBTNCLICK = *mut NMHDFILTERBTNCLICK;
772 pub const TOOLBARCLASSNAME: &'static str = "ToolbarWindow32";
773 #[cfg(target_pointer_width = "32")]
774 STRUCT!{struct TBBUTTON {
775 iBitmap: c_int,
776 idCommand: c_int,
777 fsState: BYTE,
778 fsStyle: BYTE,
779 bReserved: [BYTE; 2],
780 dwData: DWORD_PTR,
781 iString: INT_PTR,
782 }}
783 #[cfg(target_pointer_width = "64")]
784 STRUCT!{struct TBBUTTON {
785 iBitmap: c_int,
786 idCommand: c_int,
787 fsState: BYTE,
788 fsStyle: BYTE,
789 bReserved: [BYTE; 6],
790 dwData: DWORD_PTR,
791 iString: INT_PTR,
792 }}
793 pub type PTBBUTTON = *mut TBBUTTON;
794 pub type LPTBBUTTON = *mut TBBUTTON;
795 pub type LPCTBBUTTON = *const TBBUTTON;
796 STRUCT!{struct COLORMAP {
797 from: COLORREF,
798 to: COLORREF,
799 }}
800 pub type LPCOLORMAP = *mut COLORMAP;
801 extern "system" {
CreateToolbarEx( hwnd: HWND, ws: DWORD, wID: UINT, nBitmaps: c_int, hBMInst: HINSTANCE, wBMID: UINT_PTR, lpButtons: LPCTBBUTTON, iNumButtons: c_int, dxButton: c_int, dyButton: c_int, dxBitmap: c_int, dyBitmap: c_int, uStructSize: UINT, ) -> HWND802 pub fn CreateToolbarEx(
803 hwnd: HWND,
804 ws: DWORD,
805 wID: UINT,
806 nBitmaps: c_int,
807 hBMInst: HINSTANCE,
808 wBMID: UINT_PTR,
809 lpButtons: LPCTBBUTTON,
810 iNumButtons: c_int,
811 dxButton: c_int,
812 dyButton: c_int,
813 dxBitmap: c_int,
814 dyBitmap: c_int,
815 uStructSize: UINT,
816 ) -> HWND;
CreateMappedBitmap( hInstance: HINSTANCE, idBitmap: INT_PTR, wFlags: UINT, lpColorMap: LPCOLORMAP, iNumMaps: c_int, ) -> HBITMAP817 pub fn CreateMappedBitmap(
818 hInstance: HINSTANCE,
819 idBitmap: INT_PTR,
820 wFlags: UINT,
821 lpColorMap: LPCOLORMAP,
822 iNumMaps: c_int,
823 ) -> HBITMAP;
824 }
825 pub const CMB_MASKED: UINT = 0x02;
826 pub const TBSTATE_CHECKED: BYTE = 0x01;
827 pub const TBSTATE_PRESSED: BYTE = 0x02;
828 pub const TBSTATE_ENABLED: BYTE = 0x04;
829 pub const TBSTATE_HIDDEN: BYTE = 0x08;
830 pub const TBSTATE_INDETERMINATE: BYTE = 0x10;
831 pub const TBSTATE_WRAP: BYTE = 0x20;
832 pub const TBSTATE_ELLIPSES: BYTE = 0x40;
833 pub const TBSTATE_MARKED: BYTE = 0x80;
834 pub const TBSTYLE_BUTTON: DWORD = 0x0000;
835 pub const TBSTYLE_SEP: DWORD = 0x0001;
836 pub const TBSTYLE_CHECK: DWORD = 0x0002;
837 pub const TBSTYLE_GROUP: DWORD = 0x0004;
838 pub const TBSTYLE_CHECKGROUP: DWORD = TBSTYLE_GROUP | TBSTYLE_CHECK;
839 pub const TBSTYLE_DROPDOWN: DWORD = 0x0008;
840 pub const TBSTYLE_AUTOSIZE: DWORD = 0x0010;
841 pub const TBSTYLE_NOPREFIX: DWORD = 0x0020;
842 pub const TBSTYLE_TOOLTIPS: DWORD = 0x0100;
843 pub const TBSTYLE_WRAPABLE: DWORD = 0x0200;
844 pub const TBSTYLE_ALTDRAG: DWORD = 0x0400;
845 pub const TBSTYLE_FLAT: DWORD = 0x0800;
846 pub const TBSTYLE_LIST: DWORD = 0x1000;
847 pub const TBSTYLE_CUSTOMERASE: DWORD = 0x2000;
848 pub const TBSTYLE_REGISTERDROP: DWORD = 0x4000;
849 pub const TBSTYLE_TRANSPARENT: DWORD = 0x8000;
850 pub const TBSTYLE_EX_DRAWDDARROWS: DWORD = 0x00000001;
851 pub const BTNS_BUTTON: DWORD = TBSTYLE_BUTTON;
852 pub const BTNS_SEP: DWORD = TBSTYLE_SEP;
853 pub const BTNS_CHECK: DWORD = TBSTYLE_CHECK;
854 pub const BTNS_GROUP: DWORD = TBSTYLE_GROUP;
855 pub const BTNS_CHECKGROUP: DWORD = TBSTYLE_CHECKGROUP;
856 pub const BTNS_DROPDOWN: DWORD = TBSTYLE_DROPDOWN;
857 pub const BTNS_AUTOSIZE: DWORD = TBSTYLE_AUTOSIZE;
858 pub const BTNS_NOPREFIX: DWORD = TBSTYLE_NOPREFIX;
859 pub const BTNS_SHOWTEXT: DWORD = 0x0040;
860 pub const BTNS_WHOLEDROPDOWN: DWORD = 0x0080;
861 pub const TBSTYLE_EX_MIXEDBUTTONS: DWORD = 0x00000008;
862 pub const TBSTYLE_EX_HIDECLIPPEDBUTTONS: DWORD = 0x00000010;
863 pub const TBSTYLE_EX_MULTICOLUMN: DWORD = 0x00000002;
864 pub const TBSTYLE_EX_VERTICAL: DWORD = 0x00000004;
865 pub const TBSTYLE_EX_DOUBLEBUFFER: DWORD = 0x00000080;
866 STRUCT!{struct NMTBCUSTOMDRAW {
867 nmcd: NMCUSTOMDRAW,
868 hbrMonoDither: HBRUSH,
869 hbrLines: HBRUSH,
870 hpenLines: HPEN,
871 clrText: COLORREF,
872 clrMark: COLORREF,
873 clrTextHighlight: COLORREF,
874 clrBtnFace: COLORREF,
875 clrBtnHighlight: COLORREF,
876 clrHighlightHotTrack: COLORREF,
877 rcText: RECT,
878 nStringBkMode: c_int,
879 nHLStringBkMode: c_int,
880 iListGap: c_int,
881 }}
882 pub type LPNMTBCUSTOMDRAW = *mut NMTBCUSTOMDRAW;
883 pub const TBCDRF_NOEDGES: LRESULT = 0x00010000;
884 pub const TBCDRF_HILITEHOTTRACK: LRESULT = 0x00020000;
885 pub const TBCDRF_NOOFFSET: LRESULT = 0x00040000;
886 pub const TBCDRF_NOMARK: LRESULT = 0x00080000;
887 pub const TBCDRF_NOETCHEDEFFECT: LRESULT = 0x00100000;
888 pub const TBCDRF_BLENDICON: LRESULT = 0x00200000;
889 pub const TBCDRF_NOBACKGROUND: LRESULT = 0x00400000;
890 pub const TBCDRF_USECDCOLORS: LRESULT = 0x00800000;
891 pub const TB_ENABLEBUTTON: UINT = WM_USER + 1;
892 pub const TB_CHECKBUTTON: UINT = WM_USER + 2;
893 pub const TB_PRESSBUTTON: UINT = WM_USER + 3;
894 pub const TB_HIDEBUTTON: UINT = WM_USER + 4;
895 pub const TB_INDETERMINATE: UINT = WM_USER + 5;
896 pub const TB_MARKBUTTON: UINT = WM_USER + 6;
897 pub const TB_ISBUTTONENABLED: UINT = WM_USER + 9;
898 pub const TB_ISBUTTONCHECKED: UINT = WM_USER + 10;
899 pub const TB_ISBUTTONPRESSED: UINT = WM_USER + 11;
900 pub const TB_ISBUTTONHIDDEN: UINT = WM_USER + 12;
901 pub const TB_ISBUTTONINDETERMINATE: UINT = WM_USER + 13;
902 pub const TB_ISBUTTONHIGHLIGHTED: UINT = WM_USER + 14;
903 pub const TB_SETSTATE: UINT = WM_USER + 17;
904 pub const TB_GETSTATE: UINT = WM_USER + 18;
905 pub const TB_ADDBITMAP: UINT = WM_USER + 19;
906 STRUCT!{struct TBADDBITMAP {
907 hInst: HINSTANCE,
908 nID: UINT_PTR,
909 }}
910 pub type LPTBADDBITMAP = *mut TBADDBITMAP;
911 pub const HINST_COMMCTRL: HINSTANCE = -1isize as HINSTANCE;
912 pub const IDB_STD_SMALL_COLOR: WPARAM = 0;
913 pub const IDB_STD_LARGE_COLOR: WPARAM = 1;
914 pub const IDB_VIEW_SMALL_COLOR: WPARAM = 4;
915 pub const IDB_VIEW_LARGE_COLOR: WPARAM = 5;
916 pub const IDB_HIST_SMALL_COLOR: WPARAM = 8;
917 pub const IDB_HIST_LARGE_COLOR: WPARAM = 9;
918 pub const IDB_HIST_NORMAL: WPARAM = 12;
919 pub const IDB_HIST_HOT: WPARAM = 13;
920 pub const IDB_HIST_DISABLED: WPARAM = 14;
921 pub const IDB_HIST_PRESSED: WPARAM = 15;
922 pub const STD_CUT: c_int = 0;
923 pub const STD_COPY: c_int = 1;
924 pub const STD_PASTE: c_int = 2;
925 pub const STD_UNDO: c_int = 3;
926 pub const STD_REDOW: c_int = 4;
927 pub const STD_DELETE: c_int = 5;
928 pub const STD_FILENEW: c_int = 6;
929 pub const STD_FILEOPEN: c_int = 7;
930 pub const STD_FILESAVE: c_int = 8;
931 pub const STD_PRINTPRE: c_int = 9;
932 pub const STD_PROPERTIES: c_int = 10;
933 pub const STD_HELP: c_int = 11;
934 pub const STD_FIND: c_int = 12;
935 pub const STD_REPLACE: c_int = 13;
936 pub const STD_PRINT: c_int = 14;
937 pub const VIEW_LARGEICONS: c_int = 0;
938 pub const VIEW_SMALLICONS: c_int = 1;
939 pub const VIEW_LIST: c_int = 2;
940 pub const VIEW_DETAILS: c_int = 3;
941 pub const VIEW_SORTNAME: c_int = 4;
942 pub const VIEW_SORTSIZE: c_int = 5;
943 pub const VIEW_SORTDATE: c_int = 6;
944 pub const VIEW_SORTTYPE: c_int = 7;
945 pub const VIEW_PARENTFOLDER: c_int = 8;
946 pub const VIEW_NETCONNECT: c_int = 9;
947 pub const VIEW_NETDISCONNECT: c_int = 10;
948 pub const VIEW_NEWFOLDER: c_int = 11;
949 pub const VIEW_VIEWMENU: c_int = 12;
950 pub const HIST_BACK: c_int = 0;
951 pub const HIST_FORWARD: c_int = 1;
952 pub const HIST_FAVORITES: c_int = 2;
953 pub const HIST_ADDTOFAVORITES: c_int = 3;
954 pub const HIST_VIEWTREE: c_int = 4;
955 pub const TB_ADDBUTTONSA: UINT = WM_USER + 20;
956 pub const TB_INSERTBUTTONA: UINT = WM_USER + 21;
957 pub const TB_DELETEBUTTON: UINT = WM_USER + 22;
958 pub const TB_GETBUTTON: UINT = WM_USER + 23;
959 pub const TB_BUTTONCOUNT: UINT = WM_USER + 24;
960 pub const TB_COMMANDTOINDEX: UINT = WM_USER + 25;
961 STRUCT!{struct TBSAVEPARAMSA {
962 hkr: HKEY,
963 pszSubKey: LPCSTR,
964 pszValueName: LPCSTR,
965 }}
966 pub type LPTBSAVEPARAMSA = *mut TBSAVEPARAMSA;
967 STRUCT!{struct TBSAVEPARAMSW {
968 hkr: HKEY,
969 pszSubKey: LPCWSTR,
970 pszValueName: LPCWSTR,
971 }}
972 pub type LPTBSAVEPARAMSW = *mut TBSAVEPARAMSW;
973 pub const TB_SAVERESTOREA: UINT = WM_USER + 26;
974 pub const TB_SAVERESTOREW: UINT = WM_USER + 76;
975 pub const TB_CUSTOMIZE: UINT = WM_USER + 27;
976 pub const TB_ADDSTRINGA: UINT = WM_USER + 28;
977 pub const TB_ADDSTRINGW: UINT = WM_USER + 77;
978 pub const TB_GETITEMRECT: UINT = WM_USER + 29;
979 pub const TB_BUTTONSTRUCTSIZE: UINT = WM_USER + 30;
980 pub const TB_SETBUTTONSIZE: UINT = WM_USER + 31;
981 pub const TB_SETBITMAPSIZE: UINT = WM_USER + 32;
982 pub const TB_AUTOSIZE: UINT = WM_USER + 33;
983 pub const TB_GETTOOLTIPS: UINT = WM_USER + 35;
984 pub const TB_SETTOOLTIPS: UINT = WM_USER + 36;
985 pub const TB_SETPARENT: UINT = WM_USER + 37;
986 pub const TB_SETROWS: UINT = WM_USER + 39;
987 pub const TB_GETROWS: UINT = WM_USER + 40;
988 pub const TB_SETCMDID: UINT = WM_USER + 42;
989 pub const TB_CHANGEBITMAP: UINT = WM_USER + 43;
990 pub const TB_GETBITMAP: UINT = WM_USER + 44;
991 pub const TB_GETBUTTONTEXTA: UINT = WM_USER + 45;
992 pub const TB_GETBUTTONTEXTW: UINT = WM_USER + 75;
993 pub const TB_REPLACEBITMAP: UINT = WM_USER + 46;
994 pub const TB_SETINDENT: UINT = WM_USER + 47;
995 pub const TB_SETIMAGELIST: UINT = WM_USER + 48;
996 pub const TB_GETIMAGELIST: UINT = WM_USER + 49;
997 pub const TB_LOADIMAGES: UINT = WM_USER + 50;
998 pub const TB_GETRECT: UINT = WM_USER + 51;
999 pub const TB_SETHOTIMAGELIST: UINT = WM_USER + 52;
1000 pub const TB_GETHOTIMAGELIST: UINT = WM_USER + 53;
1001 pub const TB_SETDISABLEDIMAGELIST: UINT = WM_USER + 54;
1002 pub const TB_GETDISABLEDIMAGELIST: UINT = WM_USER + 55;
1003 pub const TB_SETSTYLE: UINT = WM_USER + 56;
1004 pub const TB_GETSTYLE: UINT = WM_USER + 57;
1005 pub const TB_GETBUTTONSIZE: UINT = WM_USER + 58;
1006 pub const TB_SETBUTTONWIDTH: UINT = WM_USER + 59;
1007 pub const TB_SETMAXTEXTROWS: UINT = WM_USER + 60;
1008 pub const TB_GETTEXTROWS: UINT = WM_USER + 61;
1009 pub const TB_GETOBJECT: UINT = WM_USER + 62;
1010 pub const TB_GETHOTITEM: UINT = WM_USER + 71;
1011 pub const TB_SETHOTITEM: UINT = WM_USER + 72;
1012 pub const TB_SETANCHORHIGHLIGHT: UINT = WM_USER + 73;
1013 pub const TB_GETANCHORHIGHLIGHT: UINT = WM_USER + 74;
1014 pub const TB_MAPACCELERATORA: UINT = WM_USER + 78;
1015 STRUCT!{struct TBINSERTMARK {
1016 iButton: c_int,
1017 dwFlags: DWORD,
1018 }}
1019 pub type LPTBINSERTMARK = *mut TBINSERTMARK;
1020 pub const TBIMHT_AFTER: DWORD = 0x00000001;
1021 pub const TBIMHT_BACKGROUND: DWORD = 0x00000002;
1022 pub const TB_GETINSERTMARK: UINT = WM_USER + 79;
1023 pub const TB_SETINSERTMARK: UINT = WM_USER + 80;
1024 pub const TB_INSERTMARKHITTEST: UINT = WM_USER + 81;
1025 pub const TB_MOVEBUTTON: UINT = WM_USER + 82;
1026 pub const TB_GETMAXSIZE: UINT = WM_USER + 83;
1027 pub const TB_SETEXTENDEDSTYLE: UINT = WM_USER + 84;
1028 pub const TB_GETEXTENDEDSTYLE: UINT = WM_USER + 85;
1029 pub const TB_GETPADDING: UINT = WM_USER + 86;
1030 pub const TB_SETPADDING: UINT = WM_USER + 87;
1031 pub const TB_SETINSERTMARKCOLOR: UINT = WM_USER + 88;
1032 pub const TB_GETINSERTMARKCOLOR: UINT = WM_USER + 89;
1033 pub const TB_SETCOLORSCHEME: UINT = CCM_SETCOLORSCHEME;
1034 pub const TB_GETCOLORSCHEME: UINT = CCM_GETCOLORSCHEME;
1035 pub const TB_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
1036 pub const TB_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
1037 pub const TB_MAPACCELERATORW: UINT = WM_USER + 90;
1038 STRUCT!{struct TBREPLACEBITMAP {
1039 hInstOld: HINSTANCE,
1040 nIDOld: UINT_PTR,
1041 hInstNew: HINSTANCE,
1042 nIDNew: UINT_PTR,
1043 nButtons: c_int,
1044 }}
1045 pub type LPTBREPLACEBITMAP = *mut TBREPLACEBITMAP;
1046 pub const TBBF_LARGE: DWORD = 0x0001;
1047 pub const TB_GETBITMAPFLAGS: UINT = WM_USER + 41;
1048 pub const TBIF_IMAGE: DWORD = 0x00000001;
1049 pub const TBIF_TEXT: DWORD = 0x00000002;
1050 pub const TBIF_STATE: DWORD = 0x00000004;
1051 pub const TBIF_STYLE: DWORD = 0x00000008;
1052 pub const TBIF_LPARAM: DWORD = 0x00000010;
1053 pub const TBIF_COMMAND: DWORD = 0x00000020;
1054 pub const TBIF_SIZE: DWORD = 0x00000040;
1055 pub const TBIF_BYINDEX: DWORD = 0x80000000;
1056 STRUCT!{struct TBBUTTONINFOA {
1057 cbSize: UINT,
1058 dwMask: DWORD,
1059 idCommand: c_int,
1060 iImage: c_int,
1061 fsState: BYTE,
1062 fsStyle: BYTE,
1063 cx: WORD,
1064 lParam: DWORD_PTR,
1065 pszText: LPSTR,
1066 cchText: c_int,
1067 }}
1068 pub type LPTBBUTTONINFOA = *mut TBBUTTONINFOA;
1069 STRUCT!{struct TBBUTTONINFOW {
1070 cbSize: UINT,
1071 dwMask: DWORD,
1072 idCommand: c_int,
1073 iImage: c_int,
1074 fsState: BYTE,
1075 fsStyle: BYTE,
1076 cx: WORD,
1077 lParam: DWORD_PTR,
1078 pszText: LPWSTR,
1079 cchText: c_int,
1080 }}
1081 pub type LPTBBUTTONINFOW = *mut TBBUTTONINFOW;
1082 pub const TB_GETBUTTONINFOW: UINT = WM_USER + 63;
1083 pub const TB_SETBUTTONINFOW: UINT = WM_USER + 64;
1084 pub const TB_GETBUTTONINFOA: UINT = WM_USER + 65;
1085 pub const TB_SETBUTTONINFOA: UINT = WM_USER + 66;
1086 pub const TB_INSERTBUTTONW: UINT = WM_USER + 67;
1087 pub const TB_ADDBUTTONSW: UINT = WM_USER + 68;
1088 pub const TB_HITTEST: UINT = WM_USER + 69;
1089 pub const TB_SETDRAWTEXTFLAGS: UINT = WM_USER + 70;
1090 pub const TB_GETSTRINGW: UINT = WM_USER + 91;
1091 pub const TB_GETSTRINGA: UINT = WM_USER + 92;
1092 pub const TB_SETBOUNDINGSIZE: UINT = WM_USER + 93;
1093 pub const TB_SETHOTITEM2: UINT = WM_USER + 94;
1094 pub const TB_HASACCELERATOR: UINT = WM_USER + 95;
1095 pub const TB_SETLISTGAP: UINT = WM_USER + 96;
1096 pub const TB_GETIMAGELISTCOUNT: UINT = WM_USER + 98;
1097 pub const TB_GETIDEALSIZE: UINT = WM_USER + 99;
1098 pub const TBMF_PAD: DWORD = 0x00000001;
1099 pub const TBMF_BARPAD: DWORD = 0x00000002;
1100 pub const TBMF_BUTTONSPACING: DWORD = 0x00000004;
1101 STRUCT!{struct TBMETRICS {
1102 cbSize: UINT,
1103 dwMask: DWORD,
1104 cxPad: c_int,
1105 cyPad: c_int,
1106 cxBarPad: c_int,
1107 cyBarPad: c_int,
1108 cxButtonSpacing: c_int,
1109 cyButtonSpacing: c_int,
1110 }}
1111 pub type LPTBMETRICS = *mut TBMETRICS;
1112 pub const TB_GETMETRICS: UINT = WM_USER + 101;
1113 pub const TB_SETMETRICS: UINT = WM_USER + 102;
1114 pub const TB_GETITEMDROPDOWNRECT: UINT = WM_USER + 103;
1115 pub const TB_SETPRESSEDIMAGELIST: UINT = WM_USER + 104;
1116 pub const TB_GETPRESSEDIMAGELIST: UINT = WM_USER + 105;
1117 pub const TB_SETWINDOWTHEME: UINT = CCM_SETWINDOWTHEME;
1118 pub const TBN_GETBUTTONINFOA: UINT = TBN_FIRST - 0;
1119 pub const TBN_BEGINDRAG: UINT = TBN_FIRST - 1;
1120 pub const TBN_ENDDRAG: UINT = TBN_FIRST - 2;
1121 pub const TBN_BEGINADJUST: UINT = TBN_FIRST - 3;
1122 pub const TBN_ENDADJUST: UINT = TBN_FIRST - 4;
1123 pub const TBN_RESET: UINT = TBN_FIRST - 5;
1124 pub const TBN_QUERYINSERT: UINT = TBN_FIRST - 6;
1125 pub const TBN_QUERYDELETE: UINT = TBN_FIRST - 7;
1126 pub const TBN_TOOLBARCHANGE: UINT = TBN_FIRST - 8;
1127 pub const TBN_CUSTHELP: UINT = TBN_FIRST - 9;
1128 pub const TBN_DROPDOWN: UINT = TBN_FIRST - 10;
1129 pub const TBN_GETOBJECT: UINT = TBN_FIRST - 12;
1130 STRUCT!{struct NMTBHOTITEM {
1131 hdr: NMHDR,
1132 idOld: c_int,
1133 idNew: c_int,
1134 dwFlags: DWORD,
1135 }}
1136 pub type LPNMTBHOTITEM = *mut NMTBHOTITEM;
1137 pub const HICF_OTHER: DWORD = 0x00000000;
1138 pub const HICF_MOUSE: DWORD = 0x00000001;
1139 pub const HICF_ARROWKEYS: DWORD = 0x00000002;
1140 pub const HICF_ACCELERATOR: DWORD = 0x00000004;
1141 pub const HICF_DUPACCEL: DWORD = 0x00000008;
1142 pub const HICF_ENTERING: DWORD = 0x00000010;
1143 pub const HICF_LEAVING: DWORD = 0x00000020;
1144 pub const HICF_RESELECT: DWORD = 0x00000040;
1145 pub const HICF_LMOUSE: DWORD = 0x00000080;
1146 pub const HICF_TOGGLEDROPDOWN: DWORD = 0x00000100;
1147 pub const TBN_HOTITEMCHANGE: UINT = TBN_FIRST - 13;
1148 pub const TBN_DRAGOUT: UINT = TBN_FIRST - 14;
1149 pub const TBN_DELETINGBUTTON: UINT = TBN_FIRST - 15;
1150 pub const TBN_GETDISPINFOA: UINT = TBN_FIRST - 16;
1151 pub const TBN_GETDISPINFOW: UINT = TBN_FIRST - 17;
1152 pub const TBN_GETINFOTIPA: UINT = TBN_FIRST - 18;
1153 pub const TBN_GETINFOTIPW: UINT = TBN_FIRST - 19;
1154 pub const TBN_GETBUTTONINFOW: UINT = TBN_FIRST - 20;
1155 pub const TBN_RESTORE: UINT = TBN_FIRST - 21;
1156 pub const TBN_SAVE: UINT = TBN_FIRST - 22;
1157 pub const TBN_INITCUSTOMIZE: UINT = TBN_FIRST - 23;
1158 pub const TBNRF_HIDEHELP: LRESULT = 0x00000001;
1159 pub const TBNRF_ENDCUSTOMIZE: LRESULT = 0x00000002;
1160 pub const TBN_WRAPHOTITEM: UINT = TBN_FIRST - 24;
1161 pub const TBN_DUPACCELERATOR: UINT = TBN_FIRST - 25;
1162 pub const TBN_WRAPACCELERATOR: UINT = TBN_FIRST - 26;
1163 pub const TBN_DRAGOVER: UINT = TBN_FIRST - 27;
1164 pub const TBN_MAPACCELERATOR: UINT = TBN_FIRST - 28;
1165 STRUCT!{struct NMTBSAVE {
1166 hdr: NMHDR,
1167 pData: *mut DWORD,
1168 pCurrent: *mut DWORD,
1169 cbData: UINT,
1170 iItem: c_int,
1171 cButtons: c_int,
1172 tbButton: TBBUTTON,
1173 }}
1174 pub type LPNMTBSAVE = *mut NMTBSAVE;
1175 STRUCT!{struct NMTBRESTORE {
1176 hdr: NMHDR,
1177 pData: *mut DWORD,
1178 pCurrent: *mut DWORD,
1179 cbData: UINT,
1180 iItem: c_int,
1181 cButtons: c_int,
1182 cbBytesPerRecord: c_int,
1183 tbButton: TBBUTTON,
1184 }}
1185 pub type LPNMTBRESTORE = *mut NMTBRESTORE;
1186 STRUCT!{struct NMTBGETINFOTIPA {
1187 hdr: NMHDR,
1188 pszText: LPSTR,
1189 cchTextMax: c_int,
1190 iItem: c_int,
1191 lParal: LPARAM,
1192 }}
1193 pub type LPNMTBGETINFOTIPA = *mut NMTBGETINFOTIPA;
1194 STRUCT!{struct NMTBGETINFOTIPW {
1195 hdr: NMHDR,
1196 pszText: LPWSTR,
1197 cchTextMax: c_int,
1198 iItem: c_int,
1199 lParal: LPARAM,
1200 }}
1201 pub type LPNMTBGETINFOTIPW = *mut NMTBGETINFOTIPW;
1202 pub const TBNF_IMAGE: DWORD = 0x00000001;
1203 pub const TBNF_TEXT: DWORD = 0x00000002;
1204 pub const TBNF_DI_SETITEM: DWORD = 0x10000000;
1205 STRUCT!{struct NMTBDISPINFOA {
1206 hdr: NMHDR,
1207 dwMask: DWORD,
1208 idCommand: c_int,
1209 lParam: DWORD_PTR,
1210 iImage: c_int,
1211 pszText: LPSTR,
1212 cchText: c_int,
1213 }}
1214 pub type LPNMTBDISPINFOA = *mut NMTBDISPINFOA;
1215 STRUCT!{struct NMTBDISPINFOW {
1216 hdr: NMHDR,
1217 dwMask: DWORD,
1218 idCommand: c_int,
1219 lParam: DWORD_PTR,
1220 iImage: c_int,
1221 pszText: LPWSTR,
1222 cchText: c_int,
1223 }}
1224 pub type LPNMTBDISPINFOW = *mut NMTBDISPINFOW;
1225 pub const TBDDRET_DEFAULT: LRESULT = 0;
1226 pub const TBDDRET_NODEFAULT: LRESULT = 1;
1227 pub const TBDDRET_TREATPRESSED: LRESULT = 2;
1228 pub type TBNOTIFYA = NMTOOLBARA;
1229 pub type TBNOTIFYW = NMTOOLBARW;
1230 pub type LPTBNOTIFYA = LPNMTOOLBARA;
1231 pub type LPTBNOTIFYW = LPNMTOOLBARW;
1232 STRUCT!{struct NMTOOLBARA {
1233 hdr: NMHDR,
1234 iItem: c_int,
1235 tbButton: TBBUTTON,
1236 cchText: c_int,
1237 pszText: LPSTR,
1238 rcButton: RECT,
1239 }}
1240 pub type LPNMTOOLBARA = *mut NMTOOLBARA;
1241 STRUCT!{struct NMTOOLBARW {
1242 hdr: NMHDR,
1243 iItem: c_int,
1244 tbButton: TBBUTTON,
1245 cchText: c_int,
1246 pszText: LPWSTR,
1247 rcButton: RECT,
1248 }}
1249 pub type LPNMTOOLBARW = *mut NMTOOLBARW;
1250 pub const REBARCLASSNAME: &'static str = "ReBarWindow32";
1251 pub const RBIM_IMAGELIST: UINT = 0x00000001;
1252 pub const RBS_TOOLTIPS: DWORD = 0x00000100;
1253 pub const RBS_VARHEIGHT: DWORD = 0x00000200;
1254 pub const RBS_BANDBORDERS: DWORD = 0x00000400;
1255 pub const RBS_FIXEDORDER: DWORD = 0x00000800;
1256 pub const RBS_REGISTERDROP: DWORD = 0x00001000;
1257 pub const RBS_AUTOSIZE: DWORD = 0x00002000;
1258 pub const RBS_VERTICALGRIPPER: DWORD = 0x00004000;
1259 pub const RBS_DBLCLKTOGGLE: DWORD = 0x00008000;
1260 STRUCT!{struct REBARINFO {
1261 cbSize: UINT,
1262 fMask: UINT,
1263 himl: HIMAGELIST,
1264 }}
1265 pub type LPREBARINFO = *mut REBARINFO;
1266 pub const RBBS_BREAK: UINT = 0x00000001;
1267 pub const RBBS_FIXEDSIZE: UINT = 0x00000002;
1268 pub const RBBS_CHILDEDGE: UINT = 0x00000004;
1269 pub const RBBS_HIDDEN: UINT = 0x00000008;
1270 pub const RBBS_NOVERT: UINT = 0x00000010;
1271 pub const RBBS_FIXEDBMP: UINT = 0x00000020;
1272 pub const RBBS_VARIABLEHEIGHT: UINT = 0x00000040;
1273 pub const RBBS_GRIPPERALWAYS: UINT = 0x00000080;
1274 pub const RBBS_NOGRIPPER: UINT = 0x00000100;
1275 pub const RBBS_USECHEVRON: UINT = 0x00000200;
1276 pub const RBBS_HIDETITLE: UINT = 0x00000400;
1277 pub const RBBS_TOPALIGN: UINT = 0x00000800;
1278 pub const RBBIM_STYLE: UINT = 0x00000001;
1279 pub const RBBIM_COLORS: UINT = 0x00000002;
1280 pub const RBBIM_TEXT: UINT = 0x00000004;
1281 pub const RBBIM_IMAGE: UINT = 0x00000008;
1282 pub const RBBIM_CHILD: UINT = 0x00000010;
1283 pub const RBBIM_CHILDSIZE: UINT = 0x00000020;
1284 pub const RBBIM_SIZE: UINT = 0x00000040;
1285 pub const RBBIM_BACKGROUND: UINT = 0x00000080;
1286 pub const RBBIM_ID: UINT = 0x00000100;
1287 pub const RBBIM_IDEALSIZE: UINT = 0x00000200;
1288 pub const RBBIM_LPARAM: UINT = 0x00000400;
1289 pub const RBBIM_HEADERSIZE: UINT = 0x00000800;
1290 pub const RBBIM_CHEVRONLOCATION: UINT = 0x00001000;
1291 pub const RBBIM_CHEVRONSTATE: UINT = 0x00002000;
1292 STRUCT!{struct REBARBANDINFOA {
1293 cbSize: UINT,
1294 fMask: UINT,
1295 fStyle: UINT,
1296 clrFore: COLORREF,
1297 clrBack: COLORREF,
1298 lpText: LPSTR,
1299 cch: UINT,
1300 iImage: c_int,
1301 hwndChild: HWND,
1302 cxMinChild: UINT,
1303 cyMinChild: UINT,
1304 cx: UINT,
1305 hbmBack: HBITMAP,
1306 wID: UINT,
1307 cyChild: UINT,
1308 cyMaxChild: UINT,
1309 cyIntegral: UINT,
1310 cxIdeal: UINT,
1311 lParam: LPARAM,
1312 cxHeader: UINT,
1313 rcChevronLocation: RECT,
1314 uChevronState: UINT,
1315 }}
1316 pub type LPREBARBANDINFOA = *mut REBARBANDINFOA;
1317 pub type LPCREBARBANDINFOA = *const REBARBANDINFOA;
1318 STRUCT!{struct REBARBANDINFOW {
1319 cbSize: UINT,
1320 fMask: UINT,
1321 fStyle: UINT,
1322 clrFore: COLORREF,
1323 clrBack: COLORREF,
1324 lpText: LPWSTR,
1325 cch: UINT,
1326 iImage: c_int,
1327 hwndChild: HWND,
1328 cxMinChild: UINT,
1329 cyMinChild: UINT,
1330 cx: UINT,
1331 hbmBack: HBITMAP,
1332 wID: UINT,
1333 cyChild: UINT,
1334 cyMaxChild: UINT,
1335 cyIntegral: UINT,
1336 cxIdeal: UINT,
1337 lParam: LPARAM,
1338 cxHeader: UINT,
1339 rcChevronLocation: RECT,
1340 uChevronState: UINT,
1341 }}
1342 pub type LPREBARBANDINFOW = *mut REBARBANDINFOW;
1343 pub type LPCREBARBANDINFOW = *const REBARBANDINFOW;
1344 pub const RB_INSERTBANDA: UINT = WM_USER + 1;
1345 pub const RB_DELETEBAND: UINT = WM_USER + 2;
1346 pub const RB_GETBARINFO: UINT = WM_USER + 3;
1347 pub const RB_SETBARINFO: UINT = WM_USER + 4;
1348 pub const RB_SETBANDINFOA: UINT = WM_USER + 6;
1349 pub const RB_SETPARENT: UINT = WM_USER + 7;
1350 pub const RB_HITTEST: UINT = WM_USER + 8;
1351 pub const RB_GETRECT: UINT = WM_USER + 9;
1352 pub const RB_INSERTBANDW: UINT = WM_USER + 10;
1353 pub const RB_SETBANDINFOW: UINT = WM_USER + 11;
1354 pub const RB_GETBANDCOUNT: UINT = WM_USER + 12;
1355 pub const RB_GETROWCOUNT: UINT = WM_USER + 13;
1356 pub const RB_GETROWHEIGHT: UINT = WM_USER + 14;
1357 pub const RB_IDTOINDEX: UINT = WM_USER + 16;
1358 pub const RB_GETTOOLTIPS: UINT = WM_USER + 17;
1359 pub const RB_SETTOOLTIPS: UINT = WM_USER + 18;
1360 pub const RB_SETBKCOLOR: UINT = WM_USER + 19;
1361 pub const RB_GETBKCOLOR: UINT = WM_USER + 20;
1362 pub const RB_SETTEXTCOLOR: UINT = WM_USER + 21;
1363 pub const RB_GETTEXTCOLOR: UINT = WM_USER + 22;
1364 pub const RBSTR_CHANGERECT: WPARAM = 0x0001;
1365 pub const RB_SIZETORECT: UINT = WM_USER + 23;
1366 pub const RB_SETCOLORSCHEME: UINT = CCM_SETCOLORSCHEME;
1367 pub const RB_GETCOLORSCHEME: UINT = CCM_GETCOLORSCHEME;
1368 pub const RB_BEGINDRAG: UINT = WM_USER + 24;
1369 pub const RB_ENDDRAG: UINT = WM_USER + 25;
1370 pub const RB_DRAGMOVE: UINT = WM_USER + 26;
1371 pub const RB_GETBARHEIGHT: UINT = WM_USER + 27;
1372 pub const RB_GETBANDINFOW: UINT = WM_USER + 28;
1373 pub const RB_GETBANDINFOA: UINT = WM_USER + 29;
1374 pub const RB_MINIMIZEBAND: UINT = WM_USER + 30;
1375 pub const RB_MAXIMIZEBAND: UINT = WM_USER + 31;
1376 pub const RB_GETDROPTARGET: UINT = CCM_GETDROPTARGET;
1377 pub const RB_GETBANDBORDERS: UINT = WM_USER + 34;
1378 pub const RB_SHOWBAND: UINT = WM_USER + 35;
1379 pub const RB_SETPALETTE: UINT = WM_USER + 37;
1380 pub const RB_GETPALETTE: UINT = WM_USER + 38;
1381 pub const RB_MOVEBAND: UINT = WM_USER + 39;
1382 pub const RB_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
1383 pub const RB_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
1384 pub const RB_GETBANDMARGINS: UINT = WM_USER + 40;
1385 pub const RB_SETWINDOWTHEME: UINT = CCM_SETWINDOWTHEME;
1386 pub const RB_SETEXTENDEDSTYLE: UINT = WM_USER + 41;
1387 pub const RB_GETEXTENDEDSTYLE: UINT = WM_USER + 42;
1388 pub const RB_PUSHCHEVRON: UINT = WM_USER + 43;
1389 pub const RB_SETBANDWIDTH: UINT = WM_USER + 44;
1390 pub const RBN_HEIGHTCHANGE: UINT = RBN_FIRST - 0;
1391 pub const RBN_GETOBJECT: UINT = RBN_FIRST - 1;
1392 pub const RBN_LAYOUTCHANGED: UINT = RBN_FIRST - 2;
1393 pub const RBN_AUTOSIZE: UINT = RBN_FIRST - 3;
1394 pub const RBN_BEGINDRAG: UINT = RBN_FIRST - 4;
1395 pub const RBN_ENDDRAG: UINT = RBN_FIRST - 5;
1396 pub const RBN_DELETINGBAND: UINT = RBN_FIRST - 6;
1397 pub const RBN_DELETEDBAND: UINT = RBN_FIRST - 7;
1398 pub const RBN_CHILDSIZE: UINT = RBN_FIRST - 8;
1399 pub const RBN_CHEVRONPUSHED: UINT = RBN_FIRST - 10;
1400 pub const RBN_SPLITTERDRAG: UINT = RBN_FIRST - 11;
1401 pub const RBN_MINMAX: UINT = RBN_FIRST - 21;
1402 pub const RBN_AUTOBREAK: UINT = RBN_FIRST - 22;
1403 STRUCT!{struct NMREBARCHILDSIZE {
1404 hdr: NMHDR,
1405 uBand: UINT,
1406 wID: UINT,
1407 rcChild: RECT,
1408 rcBand: RECT,
1409 }}
1410 pub type LPNMREBARCHILDSIZE = *mut NMREBARCHILDSIZE;
1411 STRUCT!{struct NMREBAR {
1412 hdr: NMHDR,
1413 dwMask: DWORD,
1414 uBand: UINT,
1415 fStyle: UINT,
1416 wID: UINT,
1417 lParam: LPARAM,
1418 }}
1419 pub type LPNMREBAR = *mut NMREBAR;
1420 pub const RBNM_ID: DWORD = 0x00000001;
1421 pub const RBNM_STYLE: DWORD = 0x00000002;
1422 pub const RBNM_LPARAM: DWORD = 0x00000004;
1423 STRUCT!{struct NMRBAUTOSIZE {
1424 hdr: NMHDR,
1425 fChanged: BOOL,
1426 rcTarget: RECT,
1427 rcActual: RECT,
1428 }}
1429 pub type LPNMRBAUTOSIZE = *mut NMRBAUTOSIZE;
1430 STRUCT!{struct NMREBARCHEVRON {
1431 hdr: NMHDR,
1432 uBand: UINT,
1433 wID: UINT,
1434 lParam: LPARAM,
1435 rc: RECT,
1436 lParamNM: LPARAM,
1437 }}
1438 pub type LPNMREBARCHEVRON = *mut NMREBARCHEVRON;
1439 STRUCT!{struct NMREBARSPLITTER {
1440 hdr: NMHDR,
1441 rcSizing: RECT,
1442 }}
1443 pub type LPNMREBARSPLITTER = *mut NMREBARSPLITTER;
1444 pub const RBAB_AUTOSIZE: UINT = 0x0001;
1445 pub const RBAB_ADDBAND: UINT = 0x0002;
1446 STRUCT!{struct NMREBARAUTOBREAK {
1447 hdr: NMHDR,
1448 uBand: UINT,
1449 wID: UINT,
1450 lParam: LPARAM,
1451 uMsg: UINT,
1452 fStyleCurrent: UINT,
1453 fAutoBreak: UINT,
1454 }}
1455 pub type LPNMREBARAUTOBREAK = *mut NMREBARAUTOBREAK;
1456 pub const RBHT_NOWHERE: UINT = 0x0001;
1457 pub const RBHT_CAPTION: UINT = 0x0002;
1458 pub const RBHT_CLIENT: UINT = 0x0003;
1459 pub const RBHT_GRABBER: UINT = 0x0004;
1460 pub const RBHT_CHEVRON: UINT = 0x0008;
1461 pub const RBHT_SPLITTER: UINT = 0x0010;
1462 STRUCT!{struct RBHITTESTINFO {
1463 pt: POINT,
1464 flags: UINT,
1465 iBand: c_int,
1466 }}
1467 pub type LPRBHITTESTINFO = *mut RBHITTESTINFO;
1468 pub const TOOLTIPS_CLASS: &'static str = "tooltips_class32";
1469 pub type LPTOOLINFOA = LPTTTOOLINFOA;
1470 pub type LPTOOLINFOW = LPTTTOOLINFOW;
1471 pub type TOOLINFOA = TTTOOLINFOA;
1472 pub type TOOLINFOW = TTTOOLINFOW;
1473 STRUCT!{struct TTTOOLINFOA {
1474 cbSize: UINT,
1475 uFlags: UINT,
1476 hwnd: HWND,
1477 uId: UINT_PTR,
1478 rect: RECT,
1479 hinst: HINSTANCE,
1480 lpszText: LPSTR,
1481 lParam: LPARAM,
1482 lpReserved: *mut c_void,
1483 }}
1484 pub type PTTTOOLINFOA = *mut TTTOOLINFOA;
1485 pub type LPTTTOOLINFOA = *mut TTTOOLINFOA;
1486 STRUCT!{struct TTTOOLINFOW {
1487 cbSize: UINT,
1488 uFlags: UINT,
1489 hwnd: HWND,
1490 uId: UINT_PTR,
1491 rect: RECT,
1492 hinst: HINSTANCE,
1493 lpszText: LPWSTR,
1494 lParam: LPARAM,
1495 lpReserved: *mut c_void,
1496 }}
1497 pub type PTTTOOLINFOW = *mut TTTOOLINFOW;
1498 pub type LPTTTOOLINFOW = *mut TTTOOLINFOW;
1499 pub const TTS_ALWAYSTIP: DWORD = 0x01;
1500 pub const TTS_NOPREFIX: DWORD = 0x02;
1501 pub const TTS_NOANIMATE: DWORD = 0x10;
1502 pub const TTS_NOFADE: DWORD = 0x20;
1503 pub const TTS_BALLOON: DWORD = 0x40;
1504 pub const TTS_CLOSE: DWORD = 0x80;
1505 pub const TTS_USEVISUALSTYLE: DWORD = 0x100;
1506 pub const TTF_IDISHWND: UINT = 0x0001;
1507 pub const TTF_CENTERTIP: UINT = 0x0002;
1508 pub const TTF_RTLREADING: UINT = 0x0004;
1509 pub const TTF_SUBCLASS: UINT = 0x0010;
1510 pub const TTF_TRACK: UINT = 0x0020;
1511 pub const TTF_ABSOLUTE: UINT = 0x0080;
1512 pub const TTF_TRANSPARENT: UINT = 0x0100;
1513 pub const TTF_PARSELINKS: UINT = 0x1000;
1514 pub const TTF_DI_SETITEM: UINT = 0x8000;
1515 pub const TTDT_AUTOMATIC: WPARAM = 0;
1516 pub const TTDT_RESHOW: WPARAM = 1;
1517 pub const TTDT_AUTOPOP: WPARAM = 2;
1518 pub const TTDT_INITIAL: WPARAM = 3;
1519 pub const TTI_NONE: WPARAM = 0;
1520 pub const TTI_INFO: WPARAM = 1;
1521 pub const TTI_WARNING: WPARAM = 2;
1522 pub const TTI_ERROR: WPARAM = 3;
1523 pub const TTI_INFO_LARGE: WPARAM = 4;
1524 pub const TTI_WARNING_LARGE: WPARAM = 5;
1525 pub const TTI_ERROR_LARGE: WPARAM = 6;
1526 pub const TTM_ACTIVATE: UINT = WM_USER + 1;
1527 pub const TTM_SETDELAYTIME: UINT = WM_USER + 3;
1528 pub const TTM_ADDTOOLA: UINT = WM_USER + 4;
1529 pub const TTM_ADDTOOLW: UINT = WM_USER + 50;
1530 pub const TTM_DELTOOLA: UINT = WM_USER + 5;
1531 pub const TTM_DELTOOLW: UINT = WM_USER + 51;
1532 pub const TTM_NEWTOOLRECTA: UINT = WM_USER + 6;
1533 pub const TTM_NEWTOOLRECTW: UINT = WM_USER + 52;
1534 pub const TTM_RELAYEVENT: UINT = WM_USER + 7;
1535 pub const TTM_GETTOOLINFOA: UINT = WM_USER + 8;
1536 pub const TTM_GETTOOLINFOW: UINT = WM_USER + 53;
1537 pub const TTM_SETTOOLINFOA: UINT = WM_USER + 9;
1538 pub const TTM_SETTOOLINFOW: UINT = WM_USER + 54;
1539 pub const TTM_HITTESTA: UINT = WM_USER + 10;
1540 pub const TTM_HITTESTW: UINT = WM_USER + 55;
1541 pub const TTM_GETTEXTA: UINT = WM_USER + 11;
1542 pub const TTM_GETTEXTW: UINT = WM_USER + 56;
1543 pub const TTM_UPDATETIPTEXTA: UINT = WM_USER + 12;
1544 pub const TTM_UPDATETIPTEXTW: UINT = WM_USER + 57;
1545 pub const TTM_GETTOOLCOUNT: UINT = WM_USER + 13;
1546 pub const TTM_ENUMTOOLSA: UINT = WM_USER + 14;
1547 pub const TTM_ENUMTOOLSW: UINT = WM_USER + 58;
1548 pub const TTM_GETCURRENTTOOLA: UINT = WM_USER + 15;
1549 pub const TTM_GETCURRENTTOOLW: UINT = WM_USER + 59;
1550 pub const TTM_WINDOWFROMPOINT: UINT = WM_USER + 16;
1551 pub const TTM_TRACKACTIVATE: UINT = WM_USER + 17;
1552 pub const TTM_TRACKPOSITION: UINT = WM_USER + 18;
1553 pub const TTM_SETTIPBKCOLOR: UINT = WM_USER + 19;
1554 pub const TTM_SETTIPTEXTCOLOR: UINT = WM_USER + 20;
1555 pub const TTM_GETDELAYTIME: UINT = WM_USER + 21;
1556 pub const TTM_GETTIPBKCOLOR: UINT = WM_USER + 22;
1557 pub const TTM_GETTIPTEXTCOLOR: UINT = WM_USER + 23;
1558 pub const TTM_SETMAXTIPWIDTH: UINT = WM_USER + 24;
1559 pub const TTM_GETMAXTIPWIDTH: UINT = WM_USER + 25;
1560 pub const TTM_SETMARGIN: UINT = WM_USER + 26;
1561 pub const TTM_GETMARGIN: UINT = WM_USER + 27;
1562 pub const TTM_POP: UINT = WM_USER + 28;
1563 pub const TTM_UPDATE: UINT = WM_USER + 29;
1564 pub const TTM_GETBUBBLESIZE: UINT = WM_USER + 30;
1565 pub const TTM_ADJUSTRECT: UINT = WM_USER + 31;
1566 pub const TTM_SETTITLEA: UINT = WM_USER + 32;
1567 pub const TTM_SETTITLEW: UINT = WM_USER + 33;
1568 pub const TTM_POPUP: UINT = WM_USER + 34;
1569 pub const TTM_GETTITLE: UINT = WM_USER + 35;
1570 STRUCT!{struct TTGETTITLE {
1571 dwSize: DWORD,
1572 uTitleBitmap: UINT,
1573 cch: UINT,
1574 pszTitle: *mut WCHAR,
1575 }}
1576 pub type LPTTGETTITLE = *mut TTGETTITLE;
1577 pub const TTM_SETWINDOWTHEME: UINT = CCM_SETWINDOWTHEME;
1578 pub type LPHITTESTINFOW = LPTTHITTESTINFOW;
1579 pub type LPHITTESTINFOA = LPTTHITTESTINFOA;
1580 STRUCT!{struct TTHITTESTINFOA {
1581 hwnd: HWND,
1582 pt: POINT,
1583 ti: TTTOOLINFOA,
1584 }}
1585 pub type LPTTHITTESTINFOA = *mut TTHITTESTINFOA;
1586 STRUCT!{struct TTHITTESTINFOW {
1587 hwnd: HWND,
1588 pt: POINT,
1589 ti: TTTOOLINFOW,
1590 }}
1591 pub type LPTTHITTESTINFOW = *mut TTHITTESTINFOW;
1592 pub const TTN_GETDISPINFOA: UINT = TTN_FIRST - 0;
1593 pub const TTN_GETDISPINFOW: UINT = TTN_FIRST - 10;
1594 pub const TTN_SHOW: UINT = TTN_FIRST - 1;
1595 pub const TTN_POP: UINT = TTN_FIRST - 2;
1596 pub const TTN_LINKCLICK: UINT = TTN_FIRST - 3;
1597 pub const TTN_NEEDTEXTA: UINT = TTN_GETDISPINFOA;
1598 pub const TTN_NEEDTEXTW: UINT = TTN_GETDISPINFOW;
1599 pub type TOOLTIPTEXTW = NMTTDISPINFOW;
1600 pub type TOOLTIPTEXTA = NMTTDISPINFOA;
1601 pub type LPTOOLTIPTEXTA = LPNMTTDISPINFOA;
1602 pub type LPTOOLTIPTEXTW = LPNMTTDISPINFOW;
1603 STRUCT!{struct NMTTDISPINFOA {
1604 hdr: NMHDR,
1605 lpszText: LPSTR,
1606 szText: [c_char; 80],
1607 hinst: HINSTANCE,
1608 uFlags: UINT,
1609 lParam: LPARAM,
1610 }}
1611 pub type LPNMTTDISPINFOA = *mut NMTTDISPINFOA;
1612 STRUCT!{struct NMTTDISPINFOW {
1613 hdr: NMHDR,
1614 lpszText: LPWSTR,
1615 szText: [WCHAR; 80],
1616 hinst: HINSTANCE,
1617 uFlags: UINT,
1618 lParam: LPARAM,
1619 }}
1620 pub type LPNMTTDISPINFOW = *mut NMTTDISPINFOW;
1621 pub const SBARS_SIZEGRIP: DWORD = 0x0100;
1622 pub const SBARS_TOOLTIPS: DWORD = 0x0800;
1623 pub const SBT_TOOLTIPS: DWORD = 0x0800;
1624 extern "system" {
DrawStatusTextA( hDC: HDC, lprc: LPCRECT, pszText: LPCSTR, uFlags: UINT, )1625 pub fn DrawStatusTextA(
1626 hDC: HDC,
1627 lprc: LPCRECT,
1628 pszText: LPCSTR,
1629 uFlags: UINT,
1630 );
DrawStatusTextW( hDC: HDC, lprc: LPCRECT, pszText: LPCWSTR, uFlags: UINT, )1631 pub fn DrawStatusTextW(
1632 hDC: HDC,
1633 lprc: LPCRECT,
1634 pszText: LPCWSTR,
1635 uFlags: UINT,
1636 );
CreateStatusWindowA( style: LONG, lpszText: LPCSTR, hwndParent: HWND, wID: UINT, ) -> HWND1637 pub fn CreateStatusWindowA(
1638 style: LONG,
1639 lpszText: LPCSTR,
1640 hwndParent: HWND,
1641 wID: UINT,
1642 ) -> HWND;
CreateStatusWindowW( style: LONG, lpszText: LPCWSTR, hwndParent: HWND, wID: UINT, ) -> HWND1643 pub fn CreateStatusWindowW(
1644 style: LONG,
1645 lpszText: LPCWSTR,
1646 hwndParent: HWND,
1647 wID: UINT,
1648 ) -> HWND;
1649 }
1650 pub const STATUSCLASSNAME: &'static str = "msctls_statusbar32";
1651 pub const SB_SETTEXTA: UINT = WM_USER + 1;
1652 pub const SB_SETTEXTW: UINT = WM_USER + 11;
1653 pub const SB_GETTEXTA: UINT = WM_USER + 2;
1654 pub const SB_GETTEXTW: UINT = WM_USER + 13;
1655 pub const SB_GETTEXTLENGTHA: UINT = WM_USER + 3;
1656 pub const SB_GETTEXTLENGTHW: UINT = WM_USER + 12;
1657 pub const SB_SETPARTS: UINT = WM_USER + 4;
1658 pub const SB_GETPARTS: UINT = WM_USER + 6;
1659 pub const SB_GETBORDERS: UINT = WM_USER + 7;
1660 pub const SB_SETMINHEIGHT: UINT = WM_USER + 8;
1661 pub const SB_SIMPLE: UINT = WM_USER + 9;
1662 pub const SB_GETRECT: UINT = WM_USER + 10;
1663 pub const SB_ISSIMPLE: UINT = WM_USER + 14;
1664 pub const SB_SETICON: UINT = WM_USER + 15;
1665 pub const SB_SETTIPTEXTA: UINT = WM_USER + 16;
1666 pub const SB_SETTIPTEXTW: UINT = WM_USER + 17;
1667 pub const SB_GETTIPTEXTA: UINT = WM_USER + 18;
1668 pub const SB_GETTIPTEXTW: UINT = WM_USER + 19;
1669 pub const SB_GETICON: UINT = WM_USER + 20;
1670 pub const SB_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
1671 pub const SB_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
1672 pub const SBT_OWNERDRAW: WPARAM = 0x1000;
1673 pub const SBT_NOBORDERS: WPARAM = 0x0100;
1674 pub const SBT_POPOUT: WPARAM = 0x0200;
1675 pub const SBT_RTLREADING: WPARAM = 0x0400;
1676 pub const SBT_NOTABPARSING: WPARAM = 0x0800;
1677 pub const SB_SETBKCOLOR: UINT = CCM_SETBKCOLOR;
1678 pub const SBN_SIMPLEMODECHANGE: UINT = SBN_FIRST - 0;
1679 pub const SB_SIMPLEID: WPARAM = 0x00ff;
1680 extern "system" {
MenuHelp( uMsg: UINT, wParam: WPARAM, lParam: LPARAM, hMainMenu: HMENU, hInst: HINSTANCE, hwndStatus: HWND, lpwIDs: *mut UINT, )1681 pub fn MenuHelp(
1682 uMsg: UINT,
1683 wParam: WPARAM,
1684 lParam: LPARAM,
1685 hMainMenu: HMENU,
1686 hInst: HINSTANCE,
1687 hwndStatus: HWND,
1688 lpwIDs: *mut UINT,
1689 );
ShowHideMenuCtl( hWnd: HWND, uFlags: UINT_PTR, lpInfo: LPINT, ) -> BOOL1690 pub fn ShowHideMenuCtl(
1691 hWnd: HWND,
1692 uFlags: UINT_PTR,
1693 lpInfo: LPINT,
1694 ) -> BOOL;
GetEffectiveClientRect( hWnd: HWND, lprc: LPRECT, lpInfo: *const INT, )1695 pub fn GetEffectiveClientRect(
1696 hWnd: HWND,
1697 lprc: LPRECT,
1698 lpInfo: *const INT,
1699 );
1700 }
1701 pub const TRACKBAR_CLASS: &'static str = "msctls_trackbar32";
1702 pub const TBS_AUTOTICKS: DWORD = 0x0001;
1703 pub const TBS_VERT: DWORD = 0x0002;
1704 pub const TBS_HORZ: DWORD = 0x0000;
1705 pub const TBS_TOP: DWORD = 0x0004;
1706 pub const TBS_BOTTOM: DWORD = 0x0000;
1707 pub const TBS_LEFT: DWORD = 0x0004;
1708 pub const TBS_RIGHT: DWORD = 0x0000;
1709 pub const TBS_BOTH: DWORD = 0x0008;
1710 pub const TBS_NOTICKS: DWORD = 0x0010;
1711 pub const TBS_ENABLESELRANGE: DWORD = 0x0020;
1712 pub const TBS_FIXEDLENGTH: DWORD = 0x0040;
1713 pub const TBS_NOTHUMB: DWORD = 0x0080;
1714 pub const TBS_TOOLTIPS: DWORD = 0x0100;
1715 pub const TBS_REVERSED: DWORD = 0x0200;
1716 pub const TBS_DOWNISLEFT: DWORD = 0x0400;
1717 pub const TBS_NOTIFYBEFOREMOVE: DWORD = 0x0800;
1718 pub const TBS_TRANSPARENTBKGND: DWORD = 0x1000;
1719 pub const TBM_GETPOS: UINT = WM_USER;
1720 pub const TBM_GETRANGEMIN: UINT = WM_USER + 1;
1721 pub const TBM_GETRANGEMAX: UINT = WM_USER + 2;
1722 pub const TBM_GETTIC: UINT = WM_USER + 3;
1723 pub const TBM_SETTIC: UINT = WM_USER + 4;
1724 pub const TBM_SETPOS: UINT = WM_USER + 5;
1725 pub const TBM_SETRANGE: UINT = WM_USER + 6;
1726 pub const TBM_SETRANGEMIN: UINT = WM_USER + 7;
1727 pub const TBM_SETRANGEMAX: UINT = WM_USER + 8;
1728 pub const TBM_CLEARTICS: UINT = WM_USER + 9;
1729 pub const TBM_SETSEL: UINT = WM_USER + 10;
1730 pub const TBM_SETSELSTART: UINT = WM_USER + 11;
1731 pub const TBM_SETSELEND: UINT = WM_USER + 12;
1732 pub const TBM_GETPTICS: UINT = WM_USER + 14;
1733 pub const TBM_GETTICPOS: UINT = WM_USER + 15;
1734 pub const TBM_GETNUMTICS: UINT = WM_USER + 16;
1735 pub const TBM_GETSELSTART: UINT = WM_USER + 17;
1736 pub const TBM_GETSELEND: UINT = WM_USER + 18;
1737 pub const TBM_CLEARSEL: UINT = WM_USER + 19;
1738 pub const TBM_SETTICFREQ: UINT = WM_USER + 20;
1739 pub const TBM_SETPAGESIZE: UINT = WM_USER + 21;
1740 pub const TBM_GETPAGESIZE: UINT = WM_USER + 22;
1741 pub const TBM_SETLINESIZE: UINT = WM_USER + 23;
1742 pub const TBM_GETLINESIZE: UINT = WM_USER + 24;
1743 pub const TBM_GETTHUMBRECT: UINT = WM_USER + 25;
1744 pub const TBM_GETCHANNELRECT: UINT = WM_USER + 26;
1745 pub const TBM_SETTHUMBLENGTH: UINT = WM_USER + 27;
1746 pub const TBM_GETTHUMBLENGTH: UINT = WM_USER + 28;
1747 pub const TBM_SETTOOLTIPS: UINT = WM_USER + 29;
1748 pub const TBM_GETTOOLTIPS: UINT = WM_USER + 30;
1749 pub const TBM_SETTIPSIDE: UINT = WM_USER + 31;
1750 pub const TBTS_TOP: WPARAM = 0;
1751 pub const TBTS_LEFT: WPARAM = 1;
1752 pub const TBTS_BOTTOM: WPARAM = 2;
1753 pub const TBTS_RIGHT: WPARAM = 3;
1754 pub const TBM_SETBUDDY: UINT = WM_USER + 32;
1755 pub const TBM_GETBUDDY: UINT = WM_USER + 33;
1756 pub const TBM_SETPOSNOTIFY: UINT = WM_USER + 34;
1757 pub const TBM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
1758 pub const TBM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
1759 pub const TB_LINEUP: WPARAM = 0;
1760 pub const TB_LINEDOWN: WPARAM = 1;
1761 pub const TB_PAGEUP: WPARAM = 2;
1762 pub const TB_PAGEDOWN: WPARAM = 3;
1763 pub const TB_THUMBPOSITION: WPARAM = 4;
1764 pub const TB_THUMBTRACK: WPARAM = 5;
1765 pub const TB_TOP: WPARAM = 6;
1766 pub const TB_BOTTOM: WPARAM = 7;
1767 pub const TB_ENDTRACK: WPARAM = 8;
1768 pub const TBCD_TICS: DWORD_PTR = 0x0001;
1769 pub const TBCD_THUMB: DWORD_PTR = 0x0001;
1770 pub const TBCD_CHANNEL: DWORD_PTR = 0x0001;
1771 pub const TRBN_THUMBPOSCHANGING: UINT = TRBN_FIRST - 1;
1772 STRUCT!{struct NMTRBTHUMBPOSCHANGING {
1773 hdr: NMHDR,
1774 dwPos: DWORD,
1775 nReason: c_int,
1776 }}
1777 STRUCT!{struct DRAGLISTINFO {
1778 uNotification: UINT,
1779 hWnd: HWND,
1780 ptCursor: POINT,
1781 }}
1782 pub type LPDRAGLISTINFO = *mut DRAGLISTINFO;
1783 pub const DL_BEGINDRAG: UINT = WM_USER + 133;
1784 pub const DL_DRAGGING: UINT = WM_USER + 134;
1785 pub const DL_DROPPED: UINT = WM_USER + 135;
1786 pub const DL_CANCELDRAG: UINT = WM_USER + 136;
1787 pub const DL_CURSORSET: UINT = 0;
1788 pub const DL_STOPCURSOR: UINT = 1;
1789 pub const DL_COPYCURSOR: UINT = 2;
1790 pub const DL_MOVECURSOR: UINT = 3;
1791 pub const DRAGLISTMSGSTRING: &'static str = "commctrl_DragListMsg";
1792 extern "system" {
MakeDragList( hLB: HWND, ) -> BOOL1793 pub fn MakeDragList(
1794 hLB: HWND,
1795 ) -> BOOL;
DrawInsert( handParent: HWND, hLB: HWND, nItem: c_int, )1796 pub fn DrawInsert(
1797 handParent: HWND,
1798 hLB: HWND,
1799 nItem: c_int,
1800 );
LBItemFromPt( hLB: HWND, pt: POINT, bAutoScroll: BOOL, ) -> c_int1801 pub fn LBItemFromPt(
1802 hLB: HWND,
1803 pt: POINT,
1804 bAutoScroll: BOOL,
1805 ) -> c_int;
1806 }
1807 pub const UPDOWN_CLASS: &'static str = "msctls_updown32";
1808 STRUCT!{struct UDACCEL {
1809 nSec: UINT,
1810 nInc: UINT,
1811 }}
1812 pub type LPUDACCEL = *mut UDACCEL;
1813 pub const UD_MAXVAL: c_short = 0x7fff;
1814 pub const UD_MINVAL: c_short = 0 - UD_MAXVAL;
1815 pub const UDS_WRAP: DWORD = 0x0001;
1816 pub const UDS_SETBUDDYINT: DWORD = 0x0002;
1817 pub const UDS_ALIGNRIGHT: DWORD = 0x0004;
1818 pub const UDS_ALIGNLEFT: DWORD = 0x0008;
1819 pub const UDS_AUTOBUDDY: DWORD = 0x0010;
1820 pub const UDS_ARROWKEYS: DWORD = 0x0020;
1821 pub const UDS_HORZ: DWORD = 0x0040;
1822 pub const UDS_NOTHOUSANDS: DWORD = 0x0080;
1823 pub const UDS_HOTTRACK: DWORD = 0x0100;
1824 pub const UDM_SETRANGE: UINT = WM_USER + 101;
1825 pub const UDM_GETRANGE: UINT = WM_USER + 102;
1826 pub const UDM_SETPOS: UINT = WM_USER + 103;
1827 pub const UDM_GETPOS: UINT = WM_USER + 104;
1828 pub const UDM_SETBUDDY: UINT = WM_USER + 105;
1829 pub const UDM_GETBUDDY: UINT = WM_USER + 106;
1830 pub const UDM_SETACCEL: UINT = WM_USER + 107;
1831 pub const UDM_GETACCEL: UINT = WM_USER + 108;
1832 pub const UDM_SETBASE: UINT = WM_USER + 109;
1833 pub const UDM_GETBASE: UINT = WM_USER + 110;
1834 pub const UDM_SETRANGE32: UINT = WM_USER + 111;
1835 pub const UDM_GETRANGE32: UINT = WM_USER + 112;
1836 pub const UDM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
1837 pub const UDM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
1838 pub const UDM_SETPOS32: UINT = WM_USER + 113;
1839 pub const UDM_GETPOS32: UINT = WM_USER + 114;
1840 extern "system" {
CreateUpDownControl( dwStyle: DWORD, x: c_int, y: c_int, cx: c_int, cy: c_int, hParent: HWND, nID: c_int, hInst: HINSTANCE, nBuddy: HWND, nUpper: c_int, nLower: c_int, nPos: c_int, ) -> HWND1841 pub fn CreateUpDownControl(
1842 dwStyle: DWORD,
1843 x: c_int,
1844 y: c_int,
1845 cx: c_int,
1846 cy: c_int,
1847 hParent: HWND,
1848 nID: c_int,
1849 hInst: HINSTANCE,
1850 nBuddy: HWND,
1851 nUpper: c_int,
1852 nLower: c_int,
1853 nPos: c_int,
1854 ) -> HWND;
1855 }
1856 pub type NM_UPDOWN = NMUPDOWN;
1857 pub type LPNM_UPDOWN = LPNMUPDOWN;
1858 STRUCT!{struct NMUPDOWN {
1859 hdr: NMHDR,
1860 iPos: c_int,
1861 iDelta: c_int,
1862 }}
1863 pub type LPNMUPDOWN = *mut NMUPDOWN;
1864 pub const UDN_DELTAPOS: UINT = UDN_FIRST - 1;
1865 pub const PROGRESS_CLASS: &'static str = "msctls_progress32";
1866 pub const PBS_SMOOTH: DWORD = 0x01;
1867 pub const PBS_VERTICAL: DWORD = 0x04;
1868 pub const PBM_SETRANGE: UINT = WM_USER + 1;
1869 pub const PBM_SETPOS: UINT = WM_USER + 2;
1870 pub const PBM_DELTAPOS: UINT = WM_USER + 3;
1871 pub const PBM_SETSTEP: UINT = WM_USER + 4;
1872 pub const PBM_STEPIT: UINT = WM_USER + 5;
1873 pub const PBM_SETRANGE32: UINT = WM_USER + 6;
1874 STRUCT!{struct PBRANGE {
1875 iLow: c_int,
1876 iHigh: c_int,
1877 }}
1878 pub type LPPBRANGE = *mut PBRANGE;
1879 pub const PBM_GETRANGE: UINT = WM_USER + 7;
1880 pub const PBM_GETPOS: UINT = WM_USER + 8;
1881 pub const PBM_SETBARCOLOR: UINT = WM_USER + 9;
1882 pub const PBM_SETBKCOLOR: UINT = CCM_SETBKCOLOR;
1883 pub const PBS_MARQUEE: DWORD = 0x08;
1884 pub const PBM_SETMARQUEE: UINT = WM_USER + 10;
1885 pub const PBS_SMOOTHREVERSE: DWORD = 0x10;
1886 pub const PBM_GETSTEP: UINT = WM_USER + 13;
1887 pub const PBM_GETBKCOLOR: UINT = WM_USER + 14;
1888 pub const PBM_GETBARCOLOR: UINT = WM_USER + 15;
1889 pub const PBM_SETSTATE: UINT = WM_USER + 16;
1890 pub const PBM_GETSTATE: UINT = WM_USER + 17;
1891 pub const PBST_NORMAL: c_int = 0x0001;
1892 pub const PBST_ERROR: c_int = 0x0002;
1893 pub const PBST_PAUSED: c_int = 0x0003;
1894 pub const HOTKEYF_SHIFT: BYTE = 0x01;
1895 pub const HOTKEYF_CONTROL: BYTE = 0x02;
1896 pub const HOTKEYF_ALT: BYTE = 0x04;
1897 pub const HOTKEYF_EXT: BYTE = 0x08;
1898 pub const HKCOMB_NONE: WPARAM = 0x0001;
1899 pub const HKCOMB_S: WPARAM = 0x0002;
1900 pub const HKCOMB_C: WPARAM = 0x0004;
1901 pub const HKCOMB_A: WPARAM = 0x0008;
1902 pub const HKCOMB_SC: WPARAM = 0x0010;
1903 pub const HKCOMB_SA: WPARAM = 0x0020;
1904 pub const HKCOMB_CA: WPARAM = 0x0040;
1905 pub const HKCOMB_SCA: WPARAM = 0x0080;
1906 pub const HKM_SETHOTKEY: UINT = WM_USER + 1;
1907 pub const HKM_GETHOTKEY: UINT = WM_USER + 2;
1908 pub const HKM_SETRULES: UINT = WM_USER + 3;
1909 pub const HOTKEY_CLASS: &'static str = "msctls_hotkey32";
1910 pub const CCS_TOP: DWORD = 0x00000001;
1911 pub const CCS_NOMOVEY: DWORD = 0x00000002;
1912 pub const CCS_BOTTOM: DWORD = 0x00000003;
1913 pub const CCS_NORESIZE: DWORD = 0x00000004;
1914 pub const CCS_NOPARENTALIGN: DWORD = 0x00000008;
1915 pub const CCS_ADJUSTABLE: DWORD = 0x00000020;
1916 pub const CCS_NODIVIDER: DWORD = 0x00000040;
1917 pub const CCS_VERT: DWORD = 0x00000080;
1918 pub const CCS_LEFT: DWORD = CCS_VERT | CCS_TOP;
1919 pub const CCS_RIGHT: DWORD = CCS_VERT | CCS_BOTTOM;
1920 pub const CCS_NOMOVEX: DWORD = CCS_VERT | CCS_NOMOVEY;
1921 pub const INVALID_LINK_INDEX: c_int = -1;
1922 pub const MAX_LINKID_TEXT: usize = 48;
1923 pub const L_MAX_URL_LENGTH: usize = 2048 + 32 + 4;
1924 pub const WC_LINK: &'static str = "SysLink";
1925 pub const LWS_TRANSPARENT: DWORD = 0x0001;
1926 pub const LWS_IGNORERETURN: DWORD = 0x0002;
1927 pub const LWS_NOPREFIX: DWORD = 0x0004;
1928 pub const LWS_USEVISUALSTYLE: DWORD = 0x0008;
1929 pub const LWS_USECUSTOMTEXT: DWORD = 0x0010;
1930 pub const LWS_RIGHT: DWORD = 0x0020;
1931 pub const LIF_ITEMINDEX: UINT = 0x00000001;
1932 pub const LIF_STATE: UINT = 0x00000002;
1933 pub const LIF_ITEMID: UINT = 0x00000004;
1934 pub const LIF_URL: UINT = 0x00000008;
1935 pub const LIS_FOCUSED: UINT = 0x00000001;
1936 pub const LIS_ENABLED: UINT = 0x00000002;
1937 pub const LIS_VISITED: UINT = 0x00000004;
1938 pub const LIS_HOTTRACK: UINT = 0x00000008;
1939 pub const LIS_DEFAULTCOLORS: UINT = 0x00000010;
1940 STRUCT!{struct LITEM {
1941 mask: UINT,
1942 iLink: c_int,
1943 state: UINT,
1944 stateMask: UINT,
1945 szID: [WCHAR; MAX_LINKID_TEXT],
1946 szUrl: [WCHAR; L_MAX_URL_LENGTH],
1947 }}
1948 pub type PLITEM = *mut LITEM;
1949 STRUCT!{struct LHITTESTINFO {
1950 pt: POINT,
1951 item: LITEM,
1952 }}
1953 pub type PLHITTESTINFO = *mut LHITTESTINFO;
1954 STRUCT!{struct NMLINK {
1955 hdr: NMHDR,
1956 item: LITEM,
1957 }}
1958 pub type PNMLINK = *mut NMLINK;
1959 pub const LM_HITTEST: UINT = WM_USER + 0x300;
1960 pub const LM_GETIDEALHEIGHT: UINT = WM_USER + 0x301;
1961 pub const LM_SETITEM: UINT = WM_USER + 0x302;
1962 pub const LM_GETITEM: UINT = WM_USER + 0x303;
1963 pub const LM_GETIDEALSIZE: UINT = LM_GETIDEALHEIGHT;
1964 pub const WC_LISTVIEW: &'static str = "SysListView32";
1965 pub const LVS_ICON: DWORD = 0x0000;
1966 pub const LVS_REPORT: DWORD = 0x0001;
1967 pub const LVS_SMALLICON: DWORD = 0x0002;
1968 pub const LVS_LIST: DWORD = 0x0003;
1969 pub const LVS_TYPEMASK: DWORD = 0x0003;
1970 pub const LVS_SINGLESEL: DWORD = 0x0004;
1971 pub const LVS_SHOWSELALWAYS: DWORD = 0x0008;
1972 pub const LVS_SORTASCENDING: DWORD = 0x0010;
1973 pub const LVS_SORTDESCENDING: DWORD = 0x0020;
1974 pub const LVS_SHAREIMAGELISTS: DWORD = 0x0040;
1975 pub const LVS_NOLABELWRAP: DWORD = 0x0080;
1976 pub const LVS_AUTOARRANGE: DWORD = 0x0100;
1977 pub const LVS_EDITLABELS: DWORD = 0x0200;
1978 pub const LVS_OWNERDATA: DWORD = 0x1000;
1979 pub const LVS_NOSCROLL: DWORD = 0x2000;
1980 pub const LVS_TYPESTYLEMASK: DWORD = 0xfc00;
1981 pub const LVS_ALIGNTOP: DWORD = 0x0000;
1982 pub const LVS_ALIGNLEFT: DWORD = 0x0800;
1983 pub const LVS_ALIGNMASK: DWORD = 0x0c00;
1984 pub const LVS_OWNERDRAWFIXED: DWORD = 0x0400;
1985 pub const LVS_NOCOLUMNHEADER: DWORD = 0x4000;
1986 pub const LVS_NOSORTHEADER: DWORD = 0x8000;
1987 pub const LVM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
1988 pub const LVM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
1989 pub const LVM_GETBKCOLOR: UINT = LVM_FIRST + 0;
1990 pub const LVM_SETBKCOLOR: UINT = LVM_FIRST + 1;
1991 pub const LVM_GETIMAGELIST: UINT = LVM_FIRST + 2;
1992 pub const LVSIL_NORMAL: c_int = 0;
1993 pub const LVSIL_SMALL: c_int = 1;
1994 pub const LVSIL_STATE: c_int = 2;
1995 pub const LVSIL_GROUPHEADER: c_int = 3;
1996 pub const LVM_SETIMAGELIST: UINT = LVM_FIRST + 3;
1997 pub const LVM_GETITEMCOUNT: UINT = LVM_FIRST + 4;
1998 pub const LVIF_TEXT: UINT = 0x00000001;
1999 pub const LVIF_IMAGE: UINT = 0x00000002;
2000 pub const LVIF_PARAM: UINT = 0x00000004;
2001 pub const LVIF_STATE: UINT = 0x00000008;
2002 pub const LVIF_INDENT: UINT = 0x00000010;
2003 pub const LVIF_NORECOMPUTE: UINT = 0x00000800;
2004 pub const LVIF_GROUPID: UINT = 0x00000100;
2005 pub const LVIF_COLUMNS: UINT = 0x00000200;
2006 pub const LVIF_COLFMT: UINT = 0x00010000;
2007 pub const LVIS_FOCUSED: UINT = 0x0001;
2008 pub const LVIS_SELECTED: UINT = 0x0002;
2009 pub const LVIS_CUT: UINT = 0x0004;
2010 pub const LVIS_DROPHILITED: UINT = 0x0008;
2011 pub const LVIS_GLOW: UINT = 0x0010;
2012 pub const LVIS_ACTIVATING: UINT = 0x0020;
2013 pub const LVIS_OVERLAYMASK: UINT = 0x0F00;
2014 pub const LVIS_STATEIMAGEMASK: UINT = 0xF000;
2015 #[inline]
INDEXTOSTATEIMAGEMASK(i: UINT) -> UINT2016 pub fn INDEXTOSTATEIMAGEMASK(i: UINT) -> UINT {
2017 i << 12
2018 }
2019 pub const I_INDENTCALLBACK: c_int = -1;
2020 pub type LV_ITEMA = LVITEMA;
2021 pub type LV_ITEMW = LVITEMW;
2022 pub const I_GROUPIDCALLBACK: c_int = -1;
2023 pub const I_GROUPIDNONE: c_int = -2;
2024 STRUCT!{struct LVITEMA {
2025 mask: UINT,
2026 iItem: c_int,
2027 iSubItem: c_int,
2028 state: UINT,
2029 stateMask: UINT,
2030 pszText: LPSTR,
2031 cchTextMax: c_int,
2032 iImage: c_int,
2033 lParam: LPARAM,
2034 iIndent: c_int,
2035 iGroupId: c_int,
2036 cColumns: UINT,
2037 puColumns: PUINT,
2038 piColFmt: *mut c_int,
2039 iGroup: c_int,
2040 }}
2041 pub type LPLVITEMA = *mut LVITEMA;
2042 STRUCT!{struct LVITEMW {
2043 mask: UINT,
2044 iItem: c_int,
2045 iSubItem: c_int,
2046 state: UINT,
2047 stateMask: UINT,
2048 pszText: LPWSTR,
2049 cchTextMax: c_int,
2050 iImage: c_int,
2051 lParam: LPARAM,
2052 iIndent: c_int,
2053 iGroupId: c_int,
2054 cColumns: UINT,
2055 puColumns: PUINT,
2056 piColFmt: *mut c_int,
2057 iGroup: c_int,
2058 }}
2059 pub type LPLVITEMW = *mut LVITEMW;
2060 pub const LPSTR_TEXTCALLBACKW: LPWSTR = -1isize as LPWSTR;
2061 pub const LPSTR_TEXTCALLBACKA: LPSTR = -1isize as LPSTR;
2062 pub const I_IMAGECALLBACK: c_int = -1;
2063 pub const I_IMAGENONE: c_int = -2;
2064 pub const I_COLUMNSCALLBACK: UINT = -1i32 as u32;
2065 pub const LVM_GETITEMA: UINT = LVM_FIRST + 5;
2066 pub const LVM_GETITEMW: UINT = LVM_FIRST + 75;
2067 pub const LVM_SETITEMA: UINT = LVM_FIRST + 6;
2068 pub const LVM_SETITEMW: UINT = LVM_FIRST + 76;
2069 pub const LVM_INSERTITEMA: UINT = LVM_FIRST + 7;
2070 pub const LVM_INSERTITEMW: UINT = LVM_FIRST + 77;
2071 pub const LVM_DELETEITEM: UINT = LVM_FIRST + 8;
2072 pub const LVM_DELETEALLITEMS: UINT = LVM_FIRST + 9;
2073 pub const LVM_GETCALLBACKMASK: UINT = LVM_FIRST + 10;
2074 pub const LVM_SETCALLBACKMASK: UINT = LVM_FIRST + 11;
2075 pub const LVNI_ALL: LPARAM = 0x0000;
2076 pub const LVNI_FOCUSED: LPARAM = 0x0001;
2077 pub const LVNI_SELECTED: LPARAM = 0x0002;
2078 pub const LVNI_CUT: LPARAM = 0x0004;
2079 pub const LVNI_DROPHILITED: LPARAM = 0x0008;
2080 pub const LVNI_STATEMASK: LPARAM = LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED;
2081 pub const LVNI_VISIBLEORDER: LPARAM = 0x0010;
2082 pub const LVNI_PREVIOUS: LPARAM = 0x0020;
2083 pub const LVNI_VISIBLEONLY: LPARAM = 0x0040;
2084 pub const LVNI_SAMEGROUPONLY: LPARAM = 0x0080;
2085 pub const LVNI_ABOVE: LPARAM = 0x0100;
2086 pub const LVNI_BELOW: LPARAM = 0x0200;
2087 pub const LVNI_TOLEFT: LPARAM = 0x0400;
2088 pub const LVNI_TORIGHT: LPARAM = 0x0800;
2089 pub const LVNI_DIRECTIONMASK: LPARAM = LVNI_ABOVE | LVNI_BELOW | LVNI_TOLEFT | LVNI_TORIGHT;
2090 pub const LVM_GETNEXTITEM: UINT = LVM_FIRST + 12;
2091 pub const LVFI_PARAM: UINT = 0x0001;
2092 pub const LVFI_STRING: UINT = 0x0002;
2093 pub const LVFI_SUBSTRING: UINT = 0x0004;
2094 pub const LVFI_PARTIAL: UINT = 0x0008;
2095 pub const LVFI_WRAP: UINT = 0x0020;
2096 pub const LVFI_NEARESTXY: UINT = 0x0040;
2097 pub type LV_FINDINFOA = LVFINDINFOA;
2098 pub type LV_FINDINFOW = LVFINDINFOW;
2099 STRUCT!{struct LVFINDINFOA {
2100 flags: UINT,
2101 psz: LPCSTR,
2102 lParam: LPARAM,
2103 pt: POINT,
2104 vkDirection: UINT,
2105 }}
2106 pub type LPFINDINFOA = *mut LVFINDINFOA;
2107 STRUCT!{struct LVFINDINFOW {
2108 flags: UINT,
2109 psz: LPCWSTR,
2110 lParam: LPARAM,
2111 pt: POINT,
2112 vkDirection: UINT,
2113 }}
2114 pub type LPFINDINFOW = *mut LVFINDINFOW;
2115 pub const LVM_FINDITEMA: UINT = LVM_FIRST + 13;
2116 pub const LVM_FINDITEMW: UINT = LVM_FIRST + 83;
2117 pub const LVIR_BOUNDS: c_int = 0;
2118 pub const LVIR_ICON: c_int = 1;
2119 pub const LVIR_LABEL: c_int = 2;
2120 pub const LVIR_SELECTBOUNDS: c_int = 3;
2121 pub const LVM_GETITEMRECT: UINT = LVM_FIRST + 14;
2122 pub const LVM_SETITEMPOSITION: UINT = LVM_FIRST + 15;
2123 pub const LVM_GETITEMPOSITION: UINT = LVM_FIRST + 16;
2124 pub const LVM_GETSTRINGWIDTHA: UINT = LVM_FIRST + 17;
2125 pub const LVM_GETSTRINGWIDTHW: UINT = LVM_FIRST + 87;
2126 pub const LVHT_NOWHERE: UINT = 0x00000001;
2127 pub const LVHT_ONITEMICON: UINT = 0x00000002;
2128 pub const LVHT_ONITEMLABEL: UINT = 0x00000004;
2129 pub const LVHT_ONITEMSTATEICON: UINT = 0x00000008;
2130 pub const LVHT_ONITEM: UINT = LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON;
2131 pub const LVHT_ABOVE: UINT = 0x00000008;
2132 pub const LVHT_BELOW: UINT = 0x00000010;
2133 pub const LVHT_TORIGHT: UINT = 0x00000020;
2134 pub const LVHT_TOLEFT: UINT = 0x00000040;
2135 pub const LVHT_EX_GROUP_HEADER: UINT = 0x10000000;
2136 pub const LVHT_EX_GROUP_FOOTER: UINT = 0x20000000;
2137 pub const LVHT_EX_GROUP_COLLAPSE: UINT = 0x40000000;
2138 pub const LVHT_EX_GROUP_BACKGROUND: UINT = 0x80000000;
2139 pub const LVHT_EX_GROUP_STATEICON: UINT = 0x01000000;
2140 pub const LVHT_EX_GROUP_SUBSETLINK: UINT = 0x02000000;
2141 pub const LVHT_EX_GROUP: UINT = LVHT_EX_GROUP_BACKGROUND | LVHT_EX_GROUP_COLLAPSE
2142 | LVHT_EX_GROUP_FOOTER | LVHT_EX_GROUP_HEADER | LVHT_EX_GROUP_STATEICON
2143 | LVHT_EX_GROUP_SUBSETLINK;
2144 pub const LVHT_EX_ONCONTENTS: UINT = 0x04000000;
2145 pub const LVHT_EX_FOOTER: UINT = 0x08000000;
2146 pub type LV_HITTESTINFO = LVHITTESTINFO;
2147 STRUCT!{struct LVHITTESTINFO {
2148 pt: POINT,
2149 flags: UINT,
2150 iItem: c_int,
2151 iSubItem: c_int,
2152 iGroup: c_int,
2153 }}
2154 pub type LPLVHITTESTINFO = *mut LVHITTESTINFO;
2155 pub const LVM_HITTEST: UINT = LVM_FIRST + 18;
2156 pub const LVM_ENSUREVISIBLE: UINT = LVM_FIRST + 19;
2157 pub const LVM_SCROLL: UINT = LVM_FIRST + 20;
2158 pub const LVM_REDRAWITEMS: UINT = LVM_FIRST + 21;
2159 pub const LVA_DEFAULT: WPARAM = 0x0000;
2160 pub const LVA_ALIGNLEFT: WPARAM = 0x0001;
2161 pub const LVA_ALIGNTOP: WPARAM = 0x0002;
2162 pub const LVA_SNAPTOGRID: WPARAM = 0x0005;
2163 pub const LVM_ARRANGE: UINT = LVM_FIRST + 22;
2164 pub const LVM_EDITLABELA: UINT = LVM_FIRST + 23;
2165 pub const LVM_EDITLABELW: UINT = LVM_FIRST + 118;
2166 pub const LVM_GETEDITCONTROL: UINT = LVM_FIRST + 24;
2167 pub type LV_COLUMNA = LVCOLUMNA;
2168 pub type LV_COLUMNW = LVCOLUMNW;
2169 STRUCT!{struct LVCOLUMNA {
2170 mask: UINT,
2171 fmt: c_int,
2172 cx: c_int,
2173 pszText: LPSTR,
2174 cchTextMax: c_int,
2175 iSubItem: c_int,
2176 iImage: c_int,
2177 iOrder: c_int,
2178 cxMin: c_int,
2179 cxDefault: c_int,
2180 cxIdeal: c_int,
2181 }}
2182 pub type LPLVCOLUMNA = *mut LVCOLUMNA;
2183 STRUCT!{struct LVCOLUMNW {
2184 mask: UINT,
2185 fmt: c_int,
2186 cx: c_int,
2187 pszText: LPWSTR,
2188 cchTextMax: c_int,
2189 iSubItem: c_int,
2190 iImage: c_int,
2191 iOrder: c_int,
2192 cxMin: c_int,
2193 cxDefault: c_int,
2194 cxIdeal: c_int,
2195 }}
2196 pub type LPLVCOLUMNW = *mut LVCOLUMNW;
2197 pub const LVCF_FMT: UINT = 0x0001;
2198 pub const LVCF_WIDTH: UINT = 0x0002;
2199 pub const LVCF_TEXT: UINT = 0x0004;
2200 pub const LVCF_SUBITEM: UINT = 0x0008;
2201 pub const LVCF_IMAGE: UINT = 0x0010;
2202 pub const LVCF_ORDER: UINT = 0x0020;
2203 pub const LVCF_MINWIDTH: UINT = 0x0040;
2204 pub const LVCF_DEFAULTWIDTH: UINT = 0x0080;
2205 pub const LVCF_IDEALWIDTH: UINT = 0x0100;
2206 pub const LVCFMT_LEFT: c_int = 0x0000;
2207 pub const LVCFMT_RIGHT: c_int = 0x0001;
2208 pub const LVCFMT_CENTER: c_int = 0x0002;
2209 pub const LVCFMT_JUSTIFYMASK: c_int = 0x0003;
2210 pub const LVCFMT_IMAGE: c_int = 0x0800;
2211 pub const LVCFMT_BITMAP_ON_RIGHT: c_int = 0x1000;
2212 pub const LVCFMT_COL_HAS_IMAGES: c_int = 0x8000;
2213 pub const LVCFMT_FIXED_WIDTH: c_int = 0x00100;
2214 pub const LVCFMT_NO_DPI_SCALE: c_int = 0x40000;
2215 pub const LVCFMT_FIXED_RATIO: c_int = 0x80000;
2216 pub const LVCFMT_LINE_BREAK: c_int = 0x100000;
2217 pub const LVCFMT_FILL: c_int = 0x200000;
2218 pub const LVCFMT_WRAP: c_int = 0x400000;
2219 pub const LVCFMT_NO_TITLE: c_int = 0x800000;
2220 pub const LVCFMT_TILE_PLACEMENTMASK: c_int = LVCFMT_LINE_BREAK | LVCFMT_FILL;
2221 pub const LVCFMT_SPLITBUTTON: c_int = 0x1000000;
2222 pub const LVM_GETCOLUMNA: UINT = LVM_FIRST + 25;
2223 pub const LVM_GETCOLUMNW: UINT = LVM_FIRST + 95;
2224 pub const LVM_SETCOLUMNA: UINT = LVM_FIRST + 26;
2225 pub const LVM_SETCOLUMNW: UINT = LVM_FIRST + 96;
2226 pub const LVM_INSERTCOLUMNA: UINT = LVM_FIRST + 27;
2227 pub const LVM_INSERTCOLUMNW: UINT = LVM_FIRST + 97;
2228 pub const LVM_DELETECOLUMN: UINT = LVM_FIRST + 28;
2229 pub const LVM_GETCOLUMNWIDTH: UINT = LVM_FIRST + 29;
2230 pub const LVSCW_AUTOSIZE: c_int = -1;
2231 pub const LVSCW_AUTOSIZE_USEHEADER: c_int = -2;
2232 pub const LVM_SETCOLUMNWIDTH: UINT = LVM_FIRST + 30;
2233 pub const LVM_GETHEADER: UINT = LVM_FIRST + 31;
2234 pub const LVM_CREATEDRAGIMAGE: UINT = LVM_FIRST + 33;
2235 pub const LVM_GETVIEWRECT: UINT = LVM_FIRST + 34;
2236 pub const LVM_GETTEXTCOLOR: UINT = LVM_FIRST + 35;
2237 pub const LVM_SETTEXTCOLOR: UINT = LVM_FIRST + 36;
2238 pub const LVM_GETTEXTBKCOLOR: UINT = LVM_FIRST + 37;
2239 pub const LVM_SETTEXTBKCOLOR: UINT = LVM_FIRST + 38;
2240 pub const LVM_GETTOPINDEX: UINT = LVM_FIRST + 39;
2241 pub const LVM_GETCOUNTPERPAGE: UINT = LVM_FIRST + 40;
2242 pub const LVM_GETORIGIN: UINT = LVM_FIRST + 41;
2243 pub const LVM_UPDATE: UINT = LVM_FIRST + 42;
2244 pub const LVM_SETITEMSTATE: UINT = LVM_FIRST + 43;
2245 pub const LVM_GETITEMSTATE: UINT = LVM_FIRST + 44;
2246 pub const LVM_GETITEMTEXTA: UINT = LVM_FIRST + 45;
2247 pub const LVM_GETITEMTEXTW: UINT = LVM_FIRST + 115;
2248 pub const LVM_SETITEMTEXTA: UINT = LVM_FIRST + 46;
2249 pub const LVM_SETITEMTEXTW: UINT = LVM_FIRST + 116;
2250 pub const LVSICF_NOINVALIDATEALL: LPARAM = 0x00000001;
2251 pub const LVSICF_NOSCROLL: LPARAM = 0x00000002;
2252 pub const LVM_SETITEMCOUNT: UINT = LVM_FIRST + 47;
2253 FN!{stdcall PFNLVCOMPARE(
2254 LPARAM,
2255 LPARAM,
2256 LPARAM,
2257 ) -> c_int}
2258 pub const LVM_SORTITEMS: UINT = LVM_FIRST + 48;
2259 pub const LVM_SETITEMPOSITION32: UINT = LVM_FIRST + 49;
2260 pub const LVM_GETSELECTEDCOUNT: UINT = LVM_FIRST + 50;
2261 pub const LVM_GETITEMSPACING: UINT = LVM_FIRST + 51;
2262 pub const LVM_GETISEARCHSTRINGA: UINT = LVM_FIRST + 52;
2263 pub const LVM_GETISEARCHSTRINGW: UINT = LVM_FIRST + 117;
2264 pub const LVM_SETICONSPACING: UINT = LVM_FIRST + 53;
2265 pub const LVM_SETEXTENDEDLISTVIEWSTYLE: UINT = LVM_FIRST + 54;
2266 pub const LVM_GETEXTENDEDLISTVIEWSTYLE: UINT = LVM_FIRST + 55;
2267 pub const LVS_EX_GRIDLINES: DWORD = 0x00000001;
2268 pub const LVS_EX_SUBITEMIMAGES: DWORD = 0x00000002;
2269 pub const LVS_EX_CHECKBOXES: DWORD = 0x00000004;
2270 pub const LVS_EX_TRACKSELECT: DWORD = 0x00000008;
2271 pub const LVS_EX_HEADERDRAGDROP: DWORD = 0x00000010;
2272 pub const LVS_EX_FULLROWSELECT: DWORD = 0x00000020;
2273 pub const LVS_EX_ONECLICKACTIVATE: DWORD = 0x00000040;
2274 pub const LVS_EX_TWOCLICKACTIVATE: DWORD = 0x00000080;
2275 pub const LVS_EX_FLATSB: DWORD = 0x00000100;
2276 pub const LVS_EX_REGIONAL: DWORD = 0x00000200;
2277 pub const LVS_EX_INFOTIP: DWORD = 0x00000400;
2278 pub const LVS_EX_UNDERLINEHOT: DWORD = 0x00000800;
2279 pub const LVS_EX_UNDERLINECOLD: DWORD = 0x00001000;
2280 pub const LVS_EX_MULTIWORKAREAS: DWORD = 0x00002000;
2281 pub const LVS_EX_LABELTIP: DWORD = 0x00004000;
2282 pub const LVS_EX_BORDERSELECT: DWORD = 0x00008000;
2283 pub const LVS_EX_DOUBLEBUFFER: DWORD = 0x00010000;
2284 pub const LVS_EX_HIDELABELS: DWORD = 0x00020000;
2285 pub const LVS_EX_SINGLEROW: DWORD = 0x00040000;
2286 pub const LVS_EX_SNAPTOGRID: DWORD = 0x00080000;
2287 pub const LVS_EX_SIMPLESELECT: DWORD = 0x00100000;
2288 pub const LVS_EX_JUSTIFYCOLUMNS: DWORD = 0x00200000;
2289 pub const LVS_EX_TRANSPARENTBKGND: DWORD = 0x00400000;
2290 pub const LVS_EX_TRANSPARENTSHADOWTEXT: DWORD = 0x00800000;
2291 pub const LVS_EX_AUTOAUTOARRANGE: DWORD = 0x01000000;
2292 pub const LVS_EX_HEADERINALLVIEWS: DWORD = 0x02000000;
2293 pub const LVS_EX_AUTOCHECKSELECT: DWORD = 0x08000000;
2294 pub const LVS_EX_AUTOSIZECOLUMNS: DWORD = 0x10000000;
2295 pub const LVS_EX_COLUMNSNAPPOINTS: DWORD = 0x40000000;
2296 pub const LVS_EX_COLUMNOVERFLOW: DWORD = 0x80000000;
2297 pub const LVM_GETSUBITEMRECT: UINT = LVM_FIRST + 56;
2298 pub const LVM_SUBITEMHITTEST: UINT = LVM_FIRST + 57;
2299 pub const LVM_SETCOLUMNORDERARRAY: UINT = LVM_FIRST + 58;
2300 pub const LVM_GETCOLUMNORDERARRAY: UINT = LVM_FIRST + 59;
2301 pub const LVM_SETHOTITEM: UINT = LVM_FIRST + 60;
2302 pub const LVM_GETHOTITEM: UINT = LVM_FIRST + 61;
2303 pub const LVM_SETHOTCURSOR: UINT = LVM_FIRST + 62;
2304 pub const LVM_GETHOTCURSOR: UINT = LVM_FIRST + 63;
2305 pub const LVM_APPROXIMATEVIEWRECT: UINT = LVM_FIRST + 64;
2306 pub const LV_MAX_WORKAREAS: WPARAM = 16;
2307 pub const LVM_SETWORKAREAS: UINT = LVM_FIRST + 65;
2308 pub const LVM_GETWORKAREAS: UINT = LVM_FIRST + 70;
2309 pub const LVM_GETNUMBEROFWORKAREAS: UINT = LVM_FIRST + 73;
2310 pub const LVM_GETSELECTIONMARK: UINT = LVM_FIRST + 66;
2311 pub const LVM_SETSELECTIONMARK: UINT = LVM_FIRST + 67;
2312 pub const LVM_SETHOVERTIME: UINT = LVM_FIRST + 71;
2313 pub const LVM_GETHOVERTIME: UINT = LVM_FIRST + 72;
2314 pub const LVM_SETTOOLTIPS: UINT = LVM_FIRST + 74;
2315 pub const LVM_GETTOOLTIPS: UINT = LVM_FIRST + 78;
2316 pub const LVM_SORTITEMSEX: UINT = LVM_FIRST + 81;
2317 STRUCT!{struct LVBKIMAGEA {
2318 ulFlags: ULONG,
2319 hbm: HBITMAP,
2320 pszImage: LPSTR,
2321 cchImageMax: UINT,
2322 xOffsetPercent: c_int,
2323 yOffsetPercent: c_int,
2324 }}
2325 pub type LPLVBKIMAGEA = *mut LVBKIMAGEA;
2326 STRUCT!{struct LVBKIMAGEW {
2327 ulFlags: ULONG,
2328 hbm: HBITMAP,
2329 pszImage: LPWSTR,
2330 cchImageMax: UINT,
2331 xOffsetPercent: c_int,
2332 yOffsetPercent: c_int,
2333 }}
2334 pub type LPLVBKIMAGEW = *mut LVBKIMAGEW;
2335 pub const LVBKIF_SOURCE_NONE: ULONG = 0x00000000;
2336 pub const LVBKIF_SOURCE_HBITMAP: ULONG = 0x00000001;
2337 pub const LVBKIF_SOURCE_URL: ULONG = 0x00000002;
2338 pub const LVBKIF_SOURCE_MASK: ULONG = 0x00000003;
2339 pub const LVBKIF_STYLE_NORMAL: ULONG = 0x00000000;
2340 pub const LVBKIF_STYLE_TILE: ULONG = 0x00000010;
2341 pub const LVBKIF_STYLE_MASK: ULONG = 0x00000010;
2342 pub const LVBKIF_FLAG_TILEOFFSET: ULONG = 0x00000100;
2343 pub const LVBKIF_TYPE_WATERMARK: ULONG = 0x10000000;
2344 pub const LVBKIF_FLAG_ALPHABLEND: ULONG = 0x20000000;
2345 pub const LVM_SETBKIMAGEA: UINT = LVM_FIRST + 68;
2346 pub const LVM_SETBKIMAGEW: UINT = LVM_FIRST + 138;
2347 pub const LVM_GETBKIMAGEA: UINT = LVM_FIRST + 69;
2348 pub const LVM_GETBKIMAGEW: UINT = LVM_FIRST + 139;
2349 pub const LVM_SETSELECTEDCOLUMN: UINT = LVM_FIRST + 140;
2350 pub const LV_VIEW_ICON: DWORD = 0x0000;
2351 pub const LV_VIEW_DETAILS: DWORD = 0x0001;
2352 pub const LV_VIEW_SMALLICON: DWORD = 0x0002;
2353 pub const LV_VIEW_LIST: DWORD = 0x0003;
2354 pub const LV_VIEW_TILE: DWORD = 0x0004;
2355 pub const LV_VIEW_MAX: DWORD = 0x0004;
2356 pub const LVM_SETVIEW: UINT = LVM_FIRST + 142;
2357 pub const LVM_GETVIEW: UINT = LVM_FIRST + 143;
2358 pub const LVGF_NONE: UINT = 0x00000000;
2359 pub const LVGF_HEADER: UINT = 0x00000001;
2360 pub const LVGF_FOOTER: UINT = 0x00000002;
2361 pub const LVGF_STATE: UINT = 0x00000004;
2362 pub const LVGF_ALIGN: UINT = 0x00000008;
2363 pub const LVGF_GROUPID: UINT = 0x00000010;
2364 pub const LVGF_SUBTITLE: UINT = 0x00000100;
2365 pub const LVGF_TASK: UINT = 0x00000200;
2366 pub const LVGF_DESCRIPTIONTOP: UINT = 0x00000400;
2367 pub const LVGF_DESCRIPTIONBOTTOM: UINT = 0x00000800;
2368 pub const LVGF_TITLEIMAGE: UINT = 0x00001000;
2369 pub const LVGF_EXTENDEDIMAGE: UINT = 0x00002000;
2370 pub const LVGF_ITEMS: UINT = 0x00004000;
2371 pub const LVGF_SUBSET: UINT = 0x00008000;
2372 pub const LVGF_SUBSETITEMS: UINT = 0x00010000;
2373 pub const LVGS_NORMAL: UINT = 0x00000000;
2374 pub const LVGS_COLLAPSED: UINT = 0x00000001;
2375 pub const LVGS_HIDDEN: UINT = 0x00000002;
2376 pub const LVGS_NOHEADER: UINT = 0x00000004;
2377 pub const LVGS_COLLAPSIBLE: UINT = 0x00000008;
2378 pub const LVGS_FOCUSED: UINT = 0x00000010;
2379 pub const LVGS_SELECTED: UINT = 0x00000020;
2380 pub const LVGS_SUBSETED: UINT = 0x00000040;
2381 pub const LVGS_SUBSETLINKFOCUSED: UINT = 0x00000080;
2382 pub const LVGA_HEADER_LEFT: UINT = 0x00000001;
2383 pub const LVGA_HEADER_CENTER: UINT = 0x00000002;
2384 pub const LVGA_HEADER_RIGHT: UINT = 0x00000004;
2385 pub const LVGA_FOOTER_LEFT: UINT = 0x00000008;
2386 pub const LVGA_FOOTER_CENTER: UINT = 0x00000010;
2387 pub const LVGA_FOOTER_RIGHT: UINT = 0x00000020;
2388 STRUCT!{struct LVGROUP {
2389 cbSize: UINT,
2390 mask: UINT,
2391 pszHeader: LPWSTR,
2392 cchHeader: c_int,
2393 pszFooter: LPWSTR,
2394 cchFooter: c_int,
2395 iGroupId: c_int,
2396 stateMask: UINT,
2397 state: UINT,
2398 uAlign: UINT,
2399 pszSubtitle: LPWSTR,
2400 cchSubtitle: UINT,
2401 pszTask: LPWSTR,
2402 cchTask: UINT,
2403 pszDescriptionTop: LPWSTR,
2404 cchDescriptionTop: UINT,
2405 pszDescriptionBottom: LPWSTR,
2406 cchDescriptionBottom: UINT,
2407 iTitleImage: c_int,
2408 iExtendedImage: c_int,
2409 iFirstItem: c_int,
2410 cItems: UINT,
2411 pszSubsetTitle: LPWSTR,
2412 cchSubsetTitle: UINT,
2413 }}
2414 pub type PLVGROUP = *mut LVGROUP;
2415 pub const LVM_INSERTGROUP: UINT = LVM_FIRST + 145;
2416 pub const LVM_SETGROUPINFO: UINT = LVM_FIRST + 147;
2417 pub const LVM_GETGROUPINFO: UINT = LVM_FIRST + 149;
2418 pub const LVM_REMOVEGROUP: UINT = LVM_FIRST + 150;
2419 pub const LVM_MOVEGROUP: UINT = LVM_FIRST + 151;
2420 pub const LVM_GETGROUPCOUNT: UINT = LVM_FIRST + 152;
2421 pub const LVM_GETGROUPINFOBYINDEX: UINT = LVM_FIRST + 153;
2422 pub const LVM_MOVEITEMTOGROUP: UINT = LVM_FIRST + 154;
2423 pub const LVGGR_GROUP: LPARAM = 0;
2424 pub const LVGGR_HEADER: LPARAM = 1;
2425 pub const LVGGR_LABEL: LPARAM = 2;
2426 pub const LVGGR_SUBSETLINK: LPARAM = 3;
2427 pub const LVM_GETGROUPRECT: UINT = LVM_FIRST + 98;
2428 pub const LVGMF_NONE: UINT = 0x00000000;
2429 pub const LVGMF_BORDERSIZE: UINT = 0x00000001;
2430 pub const LVGMF_BORDERCOLOR: UINT = 0x00000002;
2431 pub const LVGMF_TEXTCOLOR: UINT = 0x00000004;
2432 STRUCT!{struct LVGROUPMETRICS {
2433 cbSize: UINT,
2434 mask: UINT,
2435 Left: UINT,
2436 Top: UINT,
2437 Right: UINT,
2438 Bottom: UINT,
2439 crLeft: COLORREF,
2440 crTop: COLORREF,
2441 crRight: COLORREF,
2442 crBottom: COLORREF,
2443 crHeader: COLORREF,
2444 crFooter: COLORREF,
2445 }}
2446 pub type PLVGROUPMETRICS = *mut LVGROUPMETRICS;
2447 pub const LVM_SETGROUPMETRICS: UINT = LVM_FIRST + 155;
2448 pub const LVM_GETGROUPMETRICS: UINT = LVM_FIRST + 156;
2449 pub const LVM_ENABLEGROUPVIEW: UINT = LVM_FIRST + 157;
2450 FN!{stdcall PFNLVGROUPCOMPARE(
2451 c_int,
2452 c_int,
2453 *mut c_void,
2454 ) -> c_int}
2455 pub const LVM_SORTGROUPS: UINT = LVM_FIRST + 158;
2456 STRUCT!{struct LVINSERTGROUPSORTED {
2457 pfnGroupCompare: PFNLVGROUPCOMPARE,
2458 pvData: *mut c_void,
2459 lvGroup: LVGROUP,
2460 }}
2461 pub type PLVINSERTGROUPSORTED = *mut LVINSERTGROUPSORTED;
2462 pub const LVM_INSERTGROUPSORTED: UINT = LVM_FIRST + 159;
2463 pub const LVM_REMOVEALLGROUPS: UINT = LVM_FIRST + 160;
2464 pub const LVM_HASGROUP: UINT = LVM_FIRST + 161;
2465 pub const LVM_GETGROUPSTATE: UINT = LVM_FIRST + 92;
2466 pub const LVM_GETFOCUSEDGROUP: UINT = LVM_FIRST + 93;
2467 pub const LVTVIF_AUTOSIZE: DWORD = 0x00000000;
2468 pub const LVTVIF_FIXEDWIDTH: DWORD = 0x00000001;
2469 pub const LVTVIF_FIXEDHEIGHT: DWORD = 0x00000002;
2470 pub const LVTVIF_FIXEDSIZE: DWORD = 0x00000003;
2471 pub const LVTVIF_EXTENDED: DWORD = 0x00000004;
2472 pub const LVTVIM_TILESIZE: DWORD = 0x00000001;
2473 pub const LVTVIM_COLUMNS: DWORD = 0x00000002;
2474 pub const LVTVIM_LABELMARGIN: DWORD = 0x00000004;
2475 STRUCT!{struct LVTILEVIEWINFO {
2476 cbSize: UINT,
2477 dwMask: DWORD,
2478 dwFlags: DWORD,
2479 sizeTile: SIZE,
2480 cLines: c_int,
2481 rcLabelMargin: RECT,
2482 }}
2483 pub type PLVTILEVIEWINFO = *mut LVTILEVIEWINFO;
2484 STRUCT!{struct LVTILEINFO {
2485 cbSize: UINT,
2486 iItem: c_int,
2487 cColumns: UINT,
2488 puColumns: PUINT,
2489 piColFmt: *mut c_int,
2490 }}
2491 pub type PLVTILEINFO = *mut LVTILEINFO;
2492 pub const LVM_SETTILEVIEWINFO: UINT = LVM_FIRST + 162;
2493 pub const LVM_GETTILEVIEWINFO: UINT = LVM_FIRST + 163;
2494 pub const LVM_SETTILEINFO: UINT = LVM_FIRST + 164;
2495 pub const LVM_GETTILEINFO: UINT = LVM_FIRST + 165;
2496 STRUCT!{struct LVINSERTMARK {
2497 cbSize: UINT,
2498 dwFlags: DWORD,
2499 iItem: c_int,
2500 dwReserved: DWORD,
2501 }}
2502 pub type LPLVINSERTMARK = *mut LVINSERTMARK;
2503 pub const LVIM_AFTER: DWORD = 0x00000001;
2504 pub const LVM_SETINSERTMARK: UINT = LVM_FIRST + 166;
2505 pub const LVM_GETINSERTMARK: UINT = LVM_FIRST + 167;
2506 pub const LVM_INSERTMARKHITTEST: UINT = LVM_FIRST + 168;
2507 pub const LVM_GETINSERTMARKRECT: UINT = LVM_FIRST + 169;
2508 pub const LVM_SETINSERTMARKCOLOR: UINT = LVM_FIRST + 170;
2509 pub const LVM_GETINSERTMARKCOLOR: UINT = LVM_FIRST + 171;
2510 STRUCT!{struct LVSETINFOTIP {
2511 cbSize: UINT,
2512 dwFlags: DWORD,
2513 pszText: LPWSTR,
2514 iItem: c_int,
2515 iSubItem: c_int,
2516 }}
2517 pub type PLVSETINFOTIP = *mut LVSETINFOTIP;
2518 pub const LVM_SETINFOTIP: UINT = LVM_FIRST + 173;
2519 pub const LVM_GETSELECTEDCOLUMN: UINT = LVM_FIRST + 174;
2520 pub const LVM_ISGROUPVIEWENABLED: UINT = LVM_FIRST + 175;
2521 pub const LVM_GETOUTLINECOLOR: UINT = LVM_FIRST + 176;
2522 pub const LVM_SETOUTLINECOLOR: UINT = LVM_FIRST + 177;
2523 pub const LVM_CANCELEDITLABEL: UINT = LVM_FIRST + 179;
2524 pub const LVM_MAPINDEXTOID: UINT = LVM_FIRST + 180;
2525 pub const LVM_MAPIDTOINDEX: UINT = LVM_FIRST + 181;
2526 pub const LVM_ISITEMVISIBLE: UINT = LVM_FIRST + 182;
2527 pub const LVM_GETEMPTYTEXT: UINT = LVM_FIRST + 204;
2528 pub const LVM_GETFOOTERRECT: UINT = LVM_FIRST + 205;
2529 pub const LVFF_ITEMCOUNT: UINT = 0x00000001;
2530 STRUCT!{struct LVFOOTERINFO {
2531 mask: UINT,
2532 pszText: LPWSTR,
2533 cchTextMax: c_int,
2534 cItems: UINT,
2535 }}
2536 pub type LPLVFOOTERINFO = *mut LVFOOTERINFO;
2537 pub const LVM_GETFOOTERINFO: UINT = LVM_FIRST + 206;
2538 pub const LVM_GETFOOTERITEMRECT: UINT = LVM_FIRST + 207;
2539 pub const LVFIF_TEXT: UINT = 0x00000001;
2540 pub const LVFIF_STATE: UINT = 0x00000002;
2541 pub const LVFIS_FOCUSED: UINT = 0x0001;
2542 STRUCT!{struct LVFOOTERITEM {
2543 mask: UINT,
2544 iItem: c_int,
2545 pszText: LPWSTR,
2546 cchTextMax: c_int,
2547 state: UINT,
2548 stateMask: UINT,
2549 }}
2550 pub type LPLVFOOTERITEM = *mut LVFOOTERITEM;
2551 pub const LVM_GETFOOTERITEM: UINT = LVM_FIRST + 208;
2552 STRUCT!{struct LVITEMINDEX {
2553 iItem: c_int,
2554 iGroup: c_int,
2555 }}
2556 pub type PLVITEMINDEX = *mut LVITEMINDEX;
2557 pub const LVM_GETITEMINDEXRECT: UINT = LVM_FIRST + 209;
2558 pub const LVM_SETITEMINDEXSTATE: UINT = LVM_FIRST + 210;
2559 pub const LVM_GETNEXTITEMINDEX: UINT = LVM_FIRST + 211;
2560 pub type LPNM_LISTVIEW = LPNMLISTVIEW;
2561 pub type NM_LISTVIEW = NMLISTVIEW;
2562 STRUCT!{struct NMLISTVIEW {
2563 hdr: NMHDR,
2564 iItem: c_int,
2565 iSubItem: c_int,
2566 uNewState: UINT,
2567 uOldState: UINT,
2568 uChanged: UINT,
2569 ptAction: POINT,
2570 lParam: LPARAM,
2571 }}
2572 pub type LPNMLISTVIEW = *mut NMLISTVIEW;
2573 STRUCT!{struct NMITEMACTIVATE {
2574 hdr: NMHDR,
2575 iItem: c_int,
2576 iSubItem: c_int,
2577 uNewState: UINT,
2578 uOldState: UINT,
2579 uChanged: UINT,
2580 ptAction: POINT,
2581 lParam: LPARAM,
2582 uKeyFlags: UINT,
2583 }}
2584 pub type LPNMITEMACTIVATE = *mut NMITEMACTIVATE;
2585 pub const LVKF_ALT: UINT = 0x0001;
2586 pub const LVKF_CONTROL: UINT = 0x0002;
2587 pub const LVKF_SHIFT: UINT = 0x0004;
2588 STRUCT!{struct NMLVCUSTOMDRAW {
2589 nmcd: NMCUSTOMDRAW,
2590 clrText: COLORREF,
2591 clrTextBk: COLORREF,
2592 iSubItem: c_int,
2593 dwItemType: DWORD,
2594 clrFace: COLORREF,
2595 iIconEffect: c_int,
2596 iIconPhase: c_int,
2597 iPartId: c_int,
2598 iStateId: c_int,
2599 rcText: RECT,
2600 uAlign: UINT,
2601 }}
2602 pub type LPNMLVCUSTOMDRAW = *mut NMLVCUSTOMDRAW;
2603 pub const LVCDI_ITEM: DWORD = 0x00000000;
2604 pub const LVCDI_GROUP: DWORD = 0x00000001;
2605 pub const LVCDI_ITEMSLIST: DWORD = 0x00000002;
2606 pub const LVCDRF_NOSELECT: LRESULT = 0x00010000;
2607 pub const LVCDRF_NOGROUPFRAME: LRESULT = 0x00020000;
2608 STRUCT!{struct NMLVCACHEHINT {
2609 hdr: NMHDR,
2610 iFrom: c_int,
2611 iTo: c_int,
2612 }}
2613 pub type LPNMLVCACHEHINT = *mut NMLVCACHEHINT;
2614 pub type LPNM_CACHEHINT = LPNMLVCACHEHINT;
2615 pub type PNM_CACHEHINT = LPNMLVCACHEHINT;
2616 pub type NM_CACHEHINT = NMLVCACHEHINT;
2617 STRUCT!{struct NMLVFINDITEMA {
2618 hdr: NMHDR,
2619 iStart: c_int,
2620 lvfi: LVFINDINFOA,
2621 }}
2622 pub type LPNMLVFINDITEMA = *mut NMLVFINDITEMA;
2623 STRUCT!{struct NMLVFINDITEMW {
2624 hdr: NMHDR,
2625 iStart: c_int,
2626 lvfi: LVFINDINFOW,
2627 }}
2628 pub type LPNMLVFINDITEMW = *mut NMLVFINDITEMW;
2629 pub type PNM_FINDITEMA = LPNMLVFINDITEMA;
2630 pub type LPNM_FINDITEMA = LPNMLVFINDITEMA;
2631 pub type NM_FINDITEMA = NMLVFINDITEMA;
2632 pub type PNM_FINDITEMW = LPNMLVFINDITEMW;
2633 pub type LPNM_FINDITEMW = LPNMLVFINDITEMW;
2634 pub type NM_FINDITEMW = NMLVFINDITEMW;
2635 STRUCT!{struct NMLVODSTATECHANGE {
2636 hdr: NMHDR,
2637 iFrom: c_int,
2638 iTo: c_int,
2639 uNewState: UINT,
2640 uOldState: UINT,
2641 }}
2642 pub type LPNMLVODSTATECHANGE = *mut NMLVODSTATECHANGE;
2643 pub type PNM_ODSTATECHANGE = LPNMLVODSTATECHANGE;
2644 pub type LPNM_ODSTATECHANGE = LPNMLVODSTATECHANGE;
2645 pub type NM_ODSTATECHANGE = NMLVODSTATECHANGE;
2646 pub const LVN_ITEMCHANGING: UINT = LVN_FIRST - 0;
2647 pub const LVN_ITEMCHANGED: UINT = LVN_FIRST - 1;
2648 pub const LVN_INSERTITEM: UINT = LVN_FIRST - 2;
2649 pub const LVN_DELETEITEM: UINT = LVN_FIRST - 3;
2650 pub const LVN_DELETEALLITEMS: UINT = LVN_FIRST - 4;
2651 pub const LVN_BEGINLABELEDITA: UINT = LVN_FIRST - 5;
2652 pub const LVN_BEGINLABELEDITW: UINT = LVN_FIRST - 75;
2653 pub const LVN_ENDLABELEDITA: UINT = LVN_FIRST - 6;
2654 pub const LVN_ENDLABELEDITW: UINT = LVN_FIRST - 76;
2655 pub const LVN_COLUMNCLICK: UINT = LVN_FIRST - 8;
2656 pub const LVN_BEGINDRAG: UINT = LVN_FIRST - 9;
2657 pub const LVN_BEGINRDRAG: UINT = LVN_FIRST - 11;
2658 pub const LVN_ODCACHEHINT: UINT = LVN_FIRST - 13;
2659 pub const LVN_ODFINDITEMA: UINT = LVN_FIRST - 52;
2660 pub const LVN_ODFINDITEMW: UINT = LVN_FIRST - 79;
2661 pub const LVN_ITEMACTIVATE: UINT = LVN_FIRST - 14;
2662 pub const LVN_ODSTATECHANGED: UINT = LVN_FIRST - 15;
2663 pub const LVN_HOTTRACK: UINT = LVN_FIRST - 21;
2664 pub const LVN_GETDISPINFOA: UINT = LVN_FIRST - 50;
2665 pub const LVN_GETDISPINFOW: UINT = LVN_FIRST - 77;
2666 pub const LVN_SETDISPINFOA: UINT = LVN_FIRST - 51;
2667 pub const LVN_SETDISPINFOW: UINT = LVN_FIRST - 78;
2668 pub const LVIF_DI_SETITEM: UINT = 0x1000;
2669 pub type LV_DISPINFOA = NMLVDISPINFOA;
2670 pub type LV_DISPINFOW = NMLVDISPINFOW;
2671 STRUCT!{struct NMLVDISPINFOA {
2672 hdr: NMHDR,
2673 item: LVITEMA,
2674 }}
2675 pub type LPNMLVDISPINFOA = *mut NMLVDISPINFOA;
2676 STRUCT!{struct NMLVDISPINFOW {
2677 hdr: NMHDR,
2678 item: LVITEMW,
2679 }}
2680 pub type LPNMLVDISPINFOW = *mut NMLVDISPINFOW;
2681 pub const LVN_KEYDOWN: UINT = LVN_FIRST - 55;
2682 pub type LV_KEYDOWN = NMLVKEYDOWN;
2683 STRUCT!{#[repr(packed)] struct NMLVKEYDOWN {
2684 hdr: NMHDR,
2685 wVKey: WORD,
2686 flags: UINT,
2687 }}
2688 pub type LPNMLVKEYDOWN = *mut NMLVKEYDOWN;
2689 pub const LVN_MARQUEEBEGIN: UINT = LVN_FIRST - 56;
2690 STRUCT!{struct NMLVLINK {
2691 hdr: NMHDR,
2692 link: LITEM,
2693 iItem: c_int,
2694 iSubItem: c_int,
2695 }}
2696 pub type PNMLVLINK = *mut NMLVLINK;
2697 STRUCT!{struct NMLVGETINFOTIPA {
2698 hdr: NMHDR,
2699 dwFlags: DWORD,
2700 pszText: LPSTR,
2701 cchTextMax: c_int,
2702 iItem: c_int,
2703 iSubItem: c_int,
2704 lParam: LPARAM,
2705 }}
2706 pub type LPNMLVGETINFOTIPA = *mut NMLVGETINFOTIPA;
2707 STRUCT!{struct NMLVGETINFOTIPW {
2708 hdr: NMHDR,
2709 dwFlags: DWORD,
2710 pszText: LPWSTR,
2711 cchTextMax: c_int,
2712 iItem: c_int,
2713 iSubItem: c_int,
2714 lParam: LPARAM,
2715 }}
2716 pub type LPNMLVGETINFOTIPW = *mut NMLVGETINFOTIPW;
2717 pub const LVGIT_UNFOLDED: DWORD = 0x0001;
2718 pub const LVN_GETINFOTIPA: UINT = LVN_FIRST - 57;
2719 pub const LVN_GETINFOTIPW: UINT = LVN_FIRST - 58;
2720 pub const LVNSCH_DEFAULT: LPARAM = -1;
2721 pub const LVNSCH_ERROR: LPARAM = -2;
2722 pub const LVNSCH_IGNORE: LPARAM = -3;
2723 pub const LVN_INCREMENTALSEARCHA: UINT = LVN_FIRST - 62;
2724 pub const LVN_INCREMENTALSEARCHW: UINT = LVN_FIRST - 63;
2725 pub const LVN_COLUMNDROPDOWN: UINT = LVN_FIRST - 64;
2726 pub const LVN_COLUMNOVERFLOWCLICK: UINT = LVN_FIRST - 66;
2727 STRUCT!{struct NMLVSCROLL {
2728 hdr: NMHDR,
2729 dx: c_int,
2730 dy: c_int,
2731 }}
2732 pub type LPNMLVSCROLL = *mut NMLVSCROLL;
2733 pub const LVN_BEGINSCROLL: UINT = LVN_FIRST - 80;
2734 pub const LVN_ENDSCROLL: UINT = LVN_FIRST - 81;
2735 pub const LVN_LINKCLICK: UINT = LVN_FIRST - 84;
2736 pub const EMF_CENTERED: DWORD = 0x00000001;
2737 STRUCT!{struct NMLVEMPTYMARKUP {
2738 hdr: NMHDR,
2739 dwFlags: DWORD,
2740 szMarkup: [WCHAR; L_MAX_URL_LENGTH],
2741 }}
2742 pub const LVN_GETEMPTYMARKUP: UINT = LVN_FIRST - 87;
2743 pub const WC_TREEVIEW: &'static str = "SysTreeView32";
2744 pub const TVS_HASBUTTONS: DWORD = 0x0001;
2745 pub const TVS_HASLINES: DWORD = 0x0002;
2746 pub const TVS_LINESATROOT: DWORD = 0x0004;
2747 pub const TVS_EDITLABELS: DWORD = 0x0008;
2748 pub const TVS_DISABLEDRAGDROP: DWORD = 0x0010;
2749 pub const TVS_SHOWSELALWAYS: DWORD = 0x0020;
2750 pub const TVS_RTLREADING: DWORD = 0x0040;
2751 pub const TVS_NOTOOLTIPS: DWORD = 0x0080;
2752 pub const TVS_CHECKBOXES: DWORD = 0x0100;
2753 pub const TVS_TRACKSELECT: DWORD = 0x0200;
2754 pub const TVS_SINGLEEXPAND: DWORD = 0x0400;
2755 pub const TVS_INFOTIP: DWORD = 0x0800;
2756 pub const TVS_FULLROWSELECT: DWORD = 0x1000;
2757 pub const TVS_NOSCROLL: DWORD = 0x2000;
2758 pub const TVS_NONEVENHEIGHT: DWORD = 0x4000;
2759 pub const TVS_NOHSCROLL: DWORD = 0x8000;
2760 pub const TVS_EX_NOSINGLECOLLAPSE: DWORD = 0x0001;
2761 pub const TVS_EX_MULTISELECT: DWORD = 0x0002;
2762 pub const TVS_EX_DOUBLEBUFFER: DWORD = 0x0004;
2763 pub const TVS_EX_NOINDENTSTATE: DWORD = 0x0008;
2764 pub const TVS_EX_RICHTOOLTIP: DWORD = 0x0010;
2765 pub const TVS_EX_AUTOHSCROLL: DWORD = 0x0020;
2766 pub const TVS_EX_FADEINOUTEXPANDOS: DWORD = 0x0040;
2767 pub const TVS_EX_PARTIALCHECKBOXES: DWORD = 0x0080;
2768 pub const TVS_EX_EXCLUSIONCHECKBOXES: DWORD = 0x0100;
2769 pub const TVS_EX_DIMMEDCHECKBOXES: DWORD = 0x0200;
2770 pub const TVS_EX_DRAWIMAGEASYNC: DWORD = 0x0400;
2771 pub enum TREEITEM {}
2772 pub type HTREEITEM = *mut TREEITEM;
2773 pub const TVIF_TEXT: UINT = 0x0001;
2774 pub const TVIF_IMAGE: UINT = 0x0002;
2775 pub const TVIF_PARAM: UINT = 0x0004;
2776 pub const TVIF_STATE: UINT = 0x0008;
2777 pub const TVIF_HANDLE: UINT = 0x0010;
2778 pub const TVIF_SELECTEDIMAGE: UINT = 0x0020;
2779 pub const TVIF_CHILDREN: UINT = 0x0040;
2780 pub const TVIF_INTEGRAL: UINT = 0x0080;
2781 pub const TVIF_STATEEX: UINT = 0x0100;
2782 pub const TVIF_EXPANDEDIMAGE: UINT = 0x0200;
2783 pub const TVIS_SELECTED: UINT = 0x0002;
2784 pub const TVIS_CUT: UINT = 0x0004;
2785 pub const TVIS_DROPHILITED: UINT = 0x0008;
2786 pub const TVIS_BOLD: UINT = 0x0010;
2787 pub const TVIS_EXPANDED: UINT = 0x0020;
2788 pub const TVIS_EXPANDEDONCE: UINT = 0x0040;
2789 pub const TVIS_EXPANDPARTIAL: UINT = 0x0080;
2790 pub const TVIS_OVERLAYMASK: UINT = 0x0F00;
2791 pub const TVIS_STATEIMAGEMASK: UINT = 0xF000;
2792 pub const TVIS_USERMASK: UINT = 0xF000;
2793 pub const TVIS_EX_FLAT: UINT = 0x0001;
2794 pub const TVIS_EX_DISABLED: UINT = 0x0002;
2795 pub const TVIS_EX_ALL: UINT = 0x0002;
2796 STRUCT!{struct NMTVSTATEIMAGECHANGING {
2797 hdr: NMHDR,
2798 hti: HTREEITEM,
2799 iOldStateImageIndex: c_int,
2800 iNewStateImageIndex: c_int,
2801 }}
2802 pub type LPNMTVSTATEIMAGECHANGING = *mut NMTVSTATEIMAGECHANGING;
2803 pub const I_CHILDRENCALLBACK: c_int = -1;
2804 pub const I_CHILDRENAUTO: c_int = -2;
2805 pub type LPTV_ITEMW = LPTVITEMW;
2806 pub type LPTV_ITEMA = LPTVITEMA;
2807 pub type TV_ITEMW = TVITEMW;
2808 pub type TV_ITEMA = TVITEMA;
2809 STRUCT!{struct TVITEMA {
2810 mask: UINT,
2811 hItem: HTREEITEM,
2812 state: UINT,
2813 stateMask: UINT,
2814 pszText: LPSTR,
2815 cchTextMax: c_int,
2816 iImage: c_int,
2817 iSelectedImage: c_int,
2818 cChildren: c_int,
2819 lParam: LPARAM,
2820 }}
2821 pub type LPTVITEMA = *mut TVITEMA;
2822 STRUCT!{struct TVITEMW {
2823 mask: UINT,
2824 hItem: HTREEITEM,
2825 state: UINT,
2826 stateMask: UINT,
2827 pszText: LPWSTR,
2828 cchTextMax: c_int,
2829 iImage: c_int,
2830 iSelectedImage: c_int,
2831 cChildren: c_int,
2832 lParam: LPARAM,
2833 }}
2834 pub type LPTVITEMW = *mut TVITEMW;
2835 STRUCT!{struct TVITEMEXA {
2836 mask: UINT,
2837 hItem: HTREEITEM,
2838 state: UINT,
2839 stateMask: UINT,
2840 pszText: LPSTR,
2841 cchTextMax: c_int,
2842 iImage: c_int,
2843 iSelectedImage: c_int,
2844 cChildren: c_int,
2845 lParam: LPARAM,
2846 iIntegral: c_int,
2847 uStateEx: UINT,
2848 hwnd: HWND,
2849 iExpandedImage: c_int,
2850 iReserved: c_int,
2851 }}
2852 pub type LPTVITEMEXA = *mut TVITEMEXA;
2853 STRUCT!{struct TVITEMEXW {
2854 mask: UINT,
2855 hItem: HTREEITEM,
2856 state: UINT,
2857 stateMask: UINT,
2858 pszText: LPWSTR,
2859 cchTextMax: c_int,
2860 iImage: c_int,
2861 iSelectedImage: c_int,
2862 cChildren: c_int,
2863 lParam: LPARAM,
2864 iIntegral: c_int,
2865 uStateEx: UINT,
2866 hwnd: HWND,
2867 iExpandedImage: c_int,
2868 iReserved: c_int,
2869 }}
2870 pub type LPTVITEMEXW = *mut TVITEMEXW;
2871 pub const TVI_ROOT: HTREEITEM = -0x10000isize as HTREEITEM;
2872 pub const TVI_FIRST: HTREEITEM = -0x0FFFFisize as HTREEITEM;
2873 pub const TVI_LAST: HTREEITEM = -0x0FFFEisize as HTREEITEM;
2874 pub const TVI_SORT: HTREEITEM = -0x0FFFDisize as HTREEITEM;
2875 pub type LPTV_INSERTSTRUCTA = LPTVINSERTSTRUCTA;
2876 pub type LPTV_INSERTSTRUCTW = LPTVINSERTSTRUCTW;
2877 pub type TV_INSERTSTRUCTA = TVINSERTSTRUCTA;
2878 pub type TV_INSERTSTRUCTW = TVINSERTSTRUCTW;
2879 UNION!{union TVINSERTSTRUCTA_u {
2880 [u32; 15] [u64; 10],
2881 itemex itemex_mut: TVITEMEXA,
2882 item item_mut: TV_ITEMA,
2883 }}
2884 STRUCT!{struct TVINSERTSTRUCTA {
2885 hParent: HTREEITEM,
2886 hInsertAfter: HTREEITEM,
2887 u: TVINSERTSTRUCTA_u,
2888 }}
2889 pub type LPTVINSERTSTRUCTA = *mut TVINSERTSTRUCTA;
2890 UNION!{union TVINSERTSTRUCTW_u {
2891 [u32; 15] [u64; 10],
2892 itemex itemex_mut: TVITEMEXW,
2893 item item_mut: TV_ITEMW,
2894 }}
2895 STRUCT!{struct TVINSERTSTRUCTW {
2896 hParent: HTREEITEM,
2897 hInsertAfter: HTREEITEM,
2898 u: TVINSERTSTRUCTW_u,
2899 }}
2900 pub type LPTVINSERTSTRUCTW = *mut TVINSERTSTRUCTW;
2901 pub const TVM_INSERTITEMA: UINT = TV_FIRST + 0;
2902 pub const TVM_INSERTITEMW: UINT = TV_FIRST + 50;
2903 pub const TVM_DELETEITEM: UINT = TV_FIRST + 1;
2904 pub const TVM_EXPAND: UINT = TV_FIRST + 2;
2905 pub const TVE_COLLAPSE: WPARAM = 0x0001;
2906 pub const TVE_EXPAND: WPARAM = 0x0002;
2907 pub const TVE_TOGGLE: WPARAM = 0x0003;
2908 pub const TVE_EXPANDPARTIAL: WPARAM = 0x4000;
2909 pub const TVE_COLLAPSERESET: WPARAM = 0x8000;
2910 pub const TVM_GETITEMRECT: UINT = TV_FIRST + 4;
2911 pub const TVM_GETCOUNT: UINT = TV_FIRST + 5;
2912 pub const TVM_GETINDENT: UINT = TV_FIRST + 6;
2913 pub const TVM_SETINDENT: UINT = TV_FIRST + 7;
2914 pub const TVM_GETIMAGELIST: UINT = TV_FIRST + 8;
2915 pub const TVSIL_NORMAL: WPARAM = 0;
2916 pub const TVSIL_STATE: WPARAM = 2;
2917 pub const TVM_SETIMAGELIST: UINT = TV_FIRST + 9;
2918 pub const TVM_GETNEXTITEM: UINT = TV_FIRST + 10;
2919 pub const TVGN_ROOT: WPARAM = 0x0000;
2920 pub const TVGN_NEXT: WPARAM = 0x0001;
2921 pub const TVGN_PREVIOUS: WPARAM = 0x0002;
2922 pub const TVGN_PARENT: WPARAM = 0x0003;
2923 pub const TVGN_CHILD: WPARAM = 0x0004;
2924 pub const TVGN_FIRSTVISIBLE: WPARAM = 0x0005;
2925 pub const TVGN_NEXTVISIBLE: WPARAM = 0x0006;
2926 pub const TVGN_PREVIOUSVISIBLE: WPARAM = 0x0007;
2927 pub const TVGN_DROPHILITE: WPARAM = 0x0008;
2928 pub const TVGN_CARET: WPARAM = 0x0009;
2929 pub const TVGN_LASTVISIBLE: WPARAM = 0x000A;
2930 pub const TVGN_NEXTSELECTED: WPARAM = 0x000B;
2931 pub const TVSI_NOSINGLEEXPAND: WPARAM = 0x8000;
2932 pub const TVM_SELECTITEM: UINT = TV_FIRST + 11;
2933 pub const TVM_GETITEMA: UINT = TV_FIRST + 12;
2934 pub const TVM_GETITEMW: UINT = TV_FIRST + 62;
2935 pub const TVM_SETITEMA: UINT = TV_FIRST + 13;
2936 pub const TVM_SETITEMW: UINT = TV_FIRST + 63;
2937 pub const TVM_EDITLABELA: UINT = TV_FIRST + 14;
2938 pub const TVM_EDITLABELW: UINT = TV_FIRST + 65;
2939 pub const TVM_GETEDITCONTROL: UINT = TV_FIRST + 15;
2940 pub const TVM_GETVISIBLECOUNT: UINT = TV_FIRST + 16;
2941 pub const TVM_HITTEST: UINT = TV_FIRST + 17;
2942 pub type LPTV_HITTESTINFO = LPTVHITTESTINFO;
2943 pub type TV_HITTESTINFO = TVHITTESTINFO;
2944 STRUCT!{struct TVHITTESTINFO {
2945 pt: POINT,
2946 flags: UINT,
2947 hItem: HTREEITEM,
2948 }}
2949 pub type LPTVHITTESTINFO = *mut TVHITTESTINFO;
2950 pub const TVHT_NOWHERE: UINT = 0x0001;
2951 pub const TVHT_ONITEMICON: UINT = 0x0002;
2952 pub const TVHT_ONITEMLABEL: UINT = 0x0004;
2953 pub const TVHT_ONITEM: UINT = TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON;
2954 pub const TVHT_ONITEMINDENT: UINT = 0x0008;
2955 pub const TVHT_ONITEMBUTTON: UINT = 0x0010;
2956 pub const TVHT_ONITEMRIGHT: UINT = 0x0020;
2957 pub const TVHT_ONITEMSTATEICON: UINT = 0x0040;
2958 pub const TVHT_ABOVE: UINT = 0x0100;
2959 pub const TVHT_BELOW: UINT = 0x0200;
2960 pub const TVHT_TORIGHT: UINT = 0x0400;
2961 pub const TVHT_TOLEFT: UINT = 0x0800;
2962 pub const TVM_CREATEDRAGIMAGE: UINT = TV_FIRST + 18;
2963 pub const TVM_SORTCHILDREN: UINT = TV_FIRST + 19;
2964 pub const TVM_ENSUREVISIBLE: UINT = TV_FIRST + 20;
2965 pub const TVM_SORTCHILDRENCB: UINT = TV_FIRST + 21;
2966 pub const TVM_ENDEDITLABELNOW: UINT = TV_FIRST + 22;
2967 pub const TVM_GETISEARCHSTRINGA: UINT = TV_FIRST + 23;
2968 pub const TVM_GETISEARCHSTRINGW: UINT = TV_FIRST + 64;
2969 pub const TVM_SETTOOLTIPS: UINT = TV_FIRST + 24;
2970 pub const TVM_GETTOOLTIPS: UINT = TV_FIRST + 25;
2971 pub const TVM_SETINSERTMARK: UINT = TV_FIRST + 26;
2972 pub const TVM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
2973 pub const TVM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
2974 pub const TVM_SETITEMHEIGHT: UINT = TV_FIRST + 27;
2975 pub const TVM_GETITEMHEIGHT: UINT = TV_FIRST + 28;
2976 pub const TVM_SETBKCOLOR: UINT = TV_FIRST + 29;
2977 pub const TVM_SETTEXTCOLOR: UINT = TV_FIRST + 30;
2978 pub const TVM_GETBKCOLOR: UINT = TV_FIRST + 31;
2979 pub const TVM_GETTEXTCOLOR: UINT = TV_FIRST + 32;
2980 pub const TVM_SETSCROLLTIME: UINT = TV_FIRST + 33;
2981 pub const TVM_GETSCROLLTIME: UINT = TV_FIRST + 34;
2982 pub const TVM_SETINSERTMARKCOLOR: UINT = TV_FIRST + 37;
2983 pub const TVM_GETINSERTMARKCOLOR: UINT = TV_FIRST + 38;
2984 pub const TVM_SETBORDER: UINT = TV_FIRST + 35;
2985 pub const TVSBF_XBORDER: WPARAM = 0x00000001;
2986 pub const TVSBF_YBORDER: WPARAM = 0x00000002;
2987 pub const TVM_GETITEMSTATE: UINT = TV_FIRST + 39;
2988 pub const TVM_SETLINECOLOR: UINT = TV_FIRST + 40;
2989 pub const TVM_GETLINECOLOR: UINT = TV_FIRST + 41;
2990 pub const TVM_MAPACCIDTOHTREEITEM: UINT = TV_FIRST + 42;
2991 pub const TVM_MAPHTREEITEMTOACCID: UINT = TV_FIRST + 43;
2992 pub const TVM_SETEXTENDEDSTYLE: UINT = TV_FIRST + 44;
2993 pub const TVM_GETEXTENDEDSTYLE: UINT = TV_FIRST + 45;
2994 pub const TVM_SETAUTOSCROLLINFO: UINT = TV_FIRST + 59;
2995 pub const TVM_SETHOT: UINT = TV_FIRST + 58;
2996 pub const TVM_GETSELECTEDCOUNT: UINT = TV_FIRST + 70;
2997 pub const TVM_SHOWINFOTIP: UINT = TV_FIRST + 71;
2998 ENUM!{enum TVITEMPART {
2999 TVGIPR_BUTTON = 0x0001,
3000 }}
3001 STRUCT!{struct TVGETITEMPARTRECTINFO {
3002 hti: HTREEITEM,
3003 prc: *mut RECT,
3004 partID: TVITEMPART,
3005 }}
3006 pub const TVM_GETITEMPARTRECT: UINT = TV_FIRST + 72;
3007 FN!{stdcall PFNTVCOMPARE(
3008 lParam1: LPARAM,
3009 lParam2: LPARAM,
3010 lParamSort: LPARAM,
3011 ) -> c_int}
3012 pub type LPTV_SORTCB = LPTVSORTCB;
3013 pub type TV_SORTCB = TVSORTCB;
3014 STRUCT!{struct TVSORTCB {
3015 hParent: HTREEITEM,
3016 lpfnCompare: PFNTVCOMPARE,
3017 lParam: LPARAM,
3018 }}
3019 pub type LPTVSORTCB = *mut TVSORTCB;
3020 pub type LPNM_TREEVIEWA = LPNMTREEVIEWA;
3021 pub type LPNM_TREEVIEWW = LPNMTREEVIEWW;
3022 pub type NM_TREEVIEWA = NMTREEVIEWA;
3023 pub type NM_TREEVIEWW = NMTREEVIEWW;
3024 STRUCT!{struct NMTREEVIEWA {
3025 hdr: NMHDR,
3026 action: UINT,
3027 itemOld: TVITEMA,
3028 itemNew: TVITEMA,
3029 ptDrag: POINT,
3030 }}
3031 pub type LPNMTREEVIEWA = *mut NMTREEVIEWA;
3032 STRUCT!{struct NMTREEVIEWW {
3033 hdr: NMHDR,
3034 action: UINT,
3035 itemOld: TVITEMW,
3036 itemNew: TVITEMW,
3037 ptDrag: POINT,
3038 }}
3039 pub type LPNMTREEVIEWW = *mut NMTREEVIEWW;
3040 pub const TVN_SELCHANGINGA: UINT = TVN_FIRST - 1;
3041 pub const TVN_SELCHANGINGW: UINT = TVN_FIRST - 50;
3042 pub const TVN_SELCHANGEDA: UINT = TVN_FIRST - 2;
3043 pub const TVN_SELCHANGEDW: UINT = TVN_FIRST - 51;
3044 pub const TVC_UNKNOWN: LPARAM = 0x0000;
3045 pub const TVC_BYMOUSE: LPARAM = 0x0001;
3046 pub const TVC_BYKEYBOARD: LPARAM = 0x0002;
3047 pub const TVN_GETDISPINFOA: UINT = TVN_FIRST - 3;
3048 pub const TVN_GETDISPINFOW: UINT = TVN_FIRST - 52;
3049 pub const TVN_SETDISPINFOA: UINT = TVN_FIRST - 4;
3050 pub const TVN_SETDISPINFOW: UINT = TVN_FIRST - 53;
3051 pub const TVIF_DI_SETITEM: UINT = 0x1000;
3052 pub type TV_DISPINFOA = NMTVDISPINFOA;
3053 pub type TV_DISPINFOW = NMTVDISPINFOW;
3054 STRUCT!{struct NMTVDISPINFOA {
3055 hdr: NMHDR,
3056 item: TVITEMA,
3057 }}
3058 pub type LPNMTVDISPINFOA = *mut NMTVDISPINFOA;
3059 STRUCT!{struct NMTVDISPINFOW {
3060 hdr: NMHDR,
3061 item: TVITEMW,
3062 }}
3063 pub type LPNMTVDISPINFOW = *mut NMTVDISPINFOW;
3064 STRUCT!{struct NMTVDISPINFOEXA {
3065 hdr: NMHDR,
3066 item: TVITEMEXA,
3067 }}
3068 pub type LPNMTVDISPINFOEXA = *mut NMTVDISPINFOEXA;
3069 STRUCT!{struct NMTVDISPINFOEXW {
3070 hdr: NMHDR,
3071 item: TVITEMEXW,
3072 }}
3073 pub type LPNMTVDISPINFOEXW = *mut NMTVDISPINFOEXW;
3074 pub type TV_DISPINFOEXA = NMTVDISPINFOEXA;
3075 pub type TV_DISPINFOEXW = NMTVDISPINFOEXW;
3076 pub const TVN_ITEMEXPANDINGA: UINT = TVN_FIRST - 5;
3077 pub const TVN_ITEMEXPANDINGW: UINT = TVN_FIRST - 54;
3078 pub const TVN_ITEMEXPANDEDA: UINT = TVN_FIRST - 6;
3079 pub const TVN_ITEMEXPANDEDW: UINT = TVN_FIRST - 55;
3080 pub const TVN_BEGINDRAGA: UINT = TVN_FIRST - 7;
3081 pub const TVN_BEGINDRAGW: UINT = TVN_FIRST - 56;
3082 pub const TVN_BEGINRDRAGA: UINT = TVN_FIRST - 8;
3083 pub const TVN_BEGINRDRAGW: UINT = TVN_FIRST - 57;
3084 pub const TVN_DELETEITEMA: UINT = TVN_FIRST - 9;
3085 pub const TVN_DELETEITEMW: UINT = TVN_FIRST - 58;
3086 pub const TVN_BEGINLABELEDITA: UINT = TVN_FIRST - 10;
3087 pub const TVN_BEGINLABELEDITW: UINT = TVN_FIRST - 59;
3088 pub const TVN_ENDLABELEDITA: UINT = TVN_FIRST - 11;
3089 pub const TVN_ENDLABELEDITW: UINT = TVN_FIRST - 60;
3090 pub const TVN_KEYDOWN: UINT = TVN_FIRST - 12;
3091 pub const TVN_GETINFOTIPA: UINT = TVN_FIRST - 13;
3092 pub const TVN_GETINFOTIPW: UINT = TVN_FIRST - 14;
3093 pub const TVN_SINGLEEXPAND: UINT = TVN_FIRST - 15;
3094 pub const TVNRET_DEFAULT: LRESULT = 0;
3095 pub const TVNRET_SKIPOLD: LRESULT = 1;
3096 pub const TVNRET_SKIPNEW: LRESULT = 2;
3097 pub const TVN_ITEMCHANGINGA: UINT = TVN_FIRST - 16;
3098 pub const TVN_ITEMCHANGINGW: UINT = TVN_FIRST - 17;
3099 pub const TVN_ITEMCHANGEDA: UINT = TVN_FIRST - 18;
3100 pub const TVN_ITEMCHANGEDW: UINT = TVN_FIRST - 19;
3101 pub const TVN_ASYNCDRAW: UINT = TVN_FIRST - 20;
3102 pub type TV_KEYDOWN = NMTVKEYDOWN;
3103 STRUCT!{#[repr(packed)] struct NMTVKEYDOWN {
3104 hdr: NMHDR,
3105 wVKey: WORD,
3106 flags: UINT,
3107 }}
3108 pub type LPNMTVKEYDOWN = *mut NMTVKEYDOWN;
3109 STRUCT!{struct NMTVCUSTOMDRAW {
3110 nmcd: NMCUSTOMDRAW,
3111 clrText: COLORREF,
3112 clrTextBk: COLORREF,
3113 iLevel: c_int,
3114 }}
3115 pub type LPNMTVCUSTOMDRAW = *mut NMTVCUSTOMDRAW;
3116 STRUCT!{struct NMTVGETINFOTIPA {
3117 hdr: NMHDR,
3118 pszText: LPSTR,
3119 cchTextMax: c_int,
3120 hItem: HTREEITEM,
3121 lParam: LPARAM,
3122 }}
3123 pub type LPNMTVGETINFOTIPA = *mut NMTVGETINFOTIPA;
3124 STRUCT!{struct NMTVGETINFOTIPW {
3125 hdr: NMHDR,
3126 pszText: LPWSTR,
3127 cchTextMax: c_int,
3128 hItem: HTREEITEM,
3129 lParam: LPARAM,
3130 }}
3131 pub type LPNMTVGETINFOTIPW = *mut NMTVGETINFOTIPW;
3132 pub const TVCDRF_NOIMAGES: LRESULT = 0x00010000;
3133 STRUCT!{struct NMTVITEMCHANGE {
3134 hdr: NMHDR,
3135 uChanged: UINT,
3136 hItem: HTREEITEM,
3137 uStateNew: UINT,
3138 uStateOld: UINT,
3139 lParam: LPARAM,
3140 }}
3141 STRUCT!{struct NMTVASYNCDRAW {
3142 hdr: NMHDR,
3143 pimldp: *mut IMAGELISTDRAWPARAMS,
3144 hr: HRESULT,
3145 hItem: HTREEITEM,
3146 lParam: LPARAM,
3147 dwRetFlags: DWORD,
3148 iRetImageIndex: c_int,
3149 }}
3150 pub const WC_COMBOBOXEX: &'static str = "ComboBoxEx32";
3151 pub const CBEIF_TEXT: UINT = 0x00000001;
3152 pub const CBEIF_IMAGE: UINT = 0x00000002;
3153 pub const CBEIF_SELECTEDIMAGE: UINT = 0x00000004;
3154 pub const CBEIF_OVERLAY: UINT = 0x00000008;
3155 pub const CBEIF_INDENT: UINT = 0x00000010;
3156 pub const CBEIF_LPARAM: UINT = 0x00000020;
3157 pub const CBEIF_DI_SETITEM: UINT = 0x10000000;
3158 STRUCT!{struct COMBOBOXEXITEMA {
3159 mask: UINT,
3160 iItem: INT_PTR,
3161 pszText: LPSTR,
3162 cchTextMax: c_int,
3163 iImage: c_int,
3164 iSelectedImage: c_int,
3165 iOverlay: c_int,
3166 iIndent: c_int,
3167 lParam: LPARAM,
3168 }}
3169 pub type PCOMBOBOXEXITEMA = *mut COMBOBOXEXITEMA;
3170 pub type PCCOMBOBOXEXITEMA = *const COMBOBOXEXITEMA;
3171 STRUCT!{struct COMBOBOXEXITEMW {
3172 mask: UINT,
3173 iItem: INT_PTR,
3174 pszText: LPWSTR,
3175 cchTextMax: c_int,
3176 iImage: c_int,
3177 iSelectedImage: c_int,
3178 iOverlay: c_int,
3179 iIndent: c_int,
3180 lParam: LPARAM,
3181 }}
3182 pub type PCOMBOBOXEXITEMW = *mut COMBOBOXEXITEMW;
3183 pub type PCCOMBOBOXEXITEMW = *const COMBOBOXEXITEMW;
3184 pub const CBEM_INSERTITEMA: UINT = WM_USER + 1;
3185 pub const CBEM_SETIMAGELIST: UINT = WM_USER + 2;
3186 pub const CBEM_GETIMAGELIST: UINT = WM_USER + 3;
3187 pub const CBEM_GETITEMA: UINT = WM_USER + 4;
3188 pub const CBEM_SETITEMA: UINT = WM_USER + 5;
3189 pub const CBEM_DELETEITEM: UINT = CB_DELETESTRING;
3190 pub const CBEM_GETCOMBOCONTROL: UINT = WM_USER + 6;
3191 pub const CBEM_GETEDITCONTROL: UINT = WM_USER + 7;
3192 pub const CBEM_SETEXSTYLE: UINT = WM_USER + 8;
3193 pub const CBEM_SETEXTENDEDSTYLE: UINT = WM_USER + 14;
3194 pub const CBEM_GETEXSTYLE: UINT = WM_USER + 9;
3195 pub const CBEM_GETEXTENDEDSTYLE: UINT = WM_USER + 9;
3196 pub const CBEM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
3197 pub const CBEM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
3198 pub const CBEM_HASEDITCHANGED: UINT = WM_USER + 10;
3199 pub const CBEM_INSERTITEMW: UINT = WM_USER + 11;
3200 pub const CBEM_SETITEMW: UINT = WM_USER + 12;
3201 pub const CBEM_GETITEMW: UINT = WM_USER + 13;
3202 pub const CBEM_SETWINDOWTHEME: UINT = CCM_SETWINDOWTHEME;
3203 pub const CBES_EX_NOEDITIMAGE: DWORD = 0x00000001;
3204 pub const CBES_EX_NOEDITIMAGEINDENT: DWORD = 0x00000002;
3205 pub const CBES_EX_PATHWORDBREAKPROC: DWORD = 0x00000004;
3206 pub const CBES_EX_NOSIZELIMIT: DWORD = 0x00000008;
3207 pub const CBES_EX_CASESENSITIVE: DWORD = 0x00000010;
3208 pub const CBES_EX_TEXTENDELLIPSIS: DWORD = 0x00000020;
3209 STRUCT!{struct NMCOMBOBOXEXA {
3210 hdr: NMHDR,
3211 ceItem: COMBOBOXEXITEMA,
3212 }}
3213 pub type PNMCOMBOBOXEXA = *mut NMCOMBOBOXEXA;
3214 STRUCT!{struct NMCOMBOBOXEXW {
3215 hdr: NMHDR,
3216 ceItem: COMBOBOXEXITEMW,
3217 }}
3218 pub type PNMCOMBOBOXEXW = *mut NMCOMBOBOXEXW;
3219 pub const CBEN_GETDISPINFOA: UINT = CBEN_FIRST - 0;
3220 pub const CBEN_INSERTITEM: UINT = CBEN_FIRST - 1;
3221 pub const CBEN_DELETEITEM: UINT = CBEN_FIRST - 2;
3222 pub const CBEN_BEGINEDIT: UINT = CBEN_FIRST - 4;
3223 pub const CBEN_ENDEDITA: UINT = CBEN_FIRST - 5;
3224 pub const CBEN_ENDEDITW: UINT = CBEN_FIRST - 6;
3225 pub const CBEN_GETDISPINFOW: UINT = CBEN_FIRST - 7;
3226 pub const CBEN_DRAGBEGINA: UINT = CBEN_FIRST - 8;
3227 pub const CBEN_DRAGBEGINW: UINT = CBEN_FIRST - 9;
3228 pub const CBENF_KILLFOCUS: c_int = 1;
3229 pub const CBENF_RETURN: c_int = 2;
3230 pub const CBENF_ESCAPE: c_int = 3;
3231 pub const CBENF_DROPDOWN: c_int = 4;
3232 pub const CBEMAXSTRLEN: usize = 260;
3233 STRUCT!{struct NMCBEDRAGBEGINW {
3234 hdr: NMHDR,
3235 iItemid: c_int,
3236 szText: [WCHAR; CBEMAXSTRLEN],
3237 }}
3238 pub type PNMCBEDRAGBEGINW = *mut NMCBEDRAGBEGINW;
3239 pub type LPNMCBEDRAGBEGINW = *mut NMCBEDRAGBEGINW;
3240 STRUCT!{struct NMCBEDRAGBEGINA {
3241 hdr: NMHDR,
3242 iItemid: c_int,
3243 szText: [c_char; CBEMAXSTRLEN],
3244 }}
3245 pub type PNMCBEDRAGBEGINA = *mut NMCBEDRAGBEGINA;
3246 pub type LPNMCBEDRAGBEGINA = *mut NMCBEDRAGBEGINA;
3247 STRUCT!{struct NMCBEENDEDITW {
3248 hdr: NMHDR,
3249 fChanged: BOOL,
3250 iNewSelection: c_int,
3251 szText: [WCHAR; CBEMAXSTRLEN],
3252 iWhy: c_int,
3253 }}
3254 pub type PNMCBEENDEDITW = *mut NMCBEENDEDITW;
3255 pub type LPNMCBEENDEDITW = *mut NMCBEENDEDITW;
3256 STRUCT!{struct NMCBEENDEDITA {
3257 hdr: NMHDR,
3258 fChanged: BOOL,
3259 iNewSelection: c_int,
3260 szText: [c_char; CBEMAXSTRLEN],
3261 iWhy: c_int,
3262 }}
3263 pub type PNMCBEENDEDITA = *mut NMCBEENDEDITA;
3264 pub type LPNMCBEENDEDITA = *mut NMCBEENDEDITA;
3265 pub const WC_TABCONTROL: &'static str = "SysTabControl32";
3266 pub const TCS_SCROLLOPPOSITE: DWORD = 0x0001;
3267 pub const TCS_BOTTOM: DWORD = 0x0002;
3268 pub const TCS_RIGHT: DWORD = 0x0002;
3269 pub const TCS_MULTISELECT: DWORD = 0x0004;
3270 pub const TCS_FLATBUTTONS: DWORD = 0x0008;
3271 pub const TCS_FORCEICONLEFT: DWORD = 0x0010;
3272 pub const TCS_FORCELABELLEFT: DWORD = 0x0020;
3273 pub const TCS_HOTTRACK: DWORD = 0x0040;
3274 pub const TCS_VERTICAL: DWORD = 0x0080;
3275 pub const TCS_TABS: DWORD = 0x0000;
3276 pub const TCS_BUTTONS: DWORD = 0x0100;
3277 pub const TCS_SINGLELINE: DWORD = 0x0000;
3278 pub const TCS_MULTILINE: DWORD = 0x0200;
3279 pub const TCS_RIGHTJUSTIFY: DWORD = 0x0000;
3280 pub const TCS_FIXEDWIDTH: DWORD = 0x0400;
3281 pub const TCS_RAGGEDRIGHT: DWORD = 0x0800;
3282 pub const TCS_FOCUSONBUTTONDOWN: DWORD = 0x1000;
3283 pub const TCS_OWNERDRAWFIXED: DWORD = 0x2000;
3284 pub const TCS_TOOLTIPS: DWORD = 0x4000;
3285 pub const TCS_FOCUSNEVER: DWORD = 0x8000;
3286 pub const TCS_EX_FLATSEPARATORS: DWORD = 0x00000001;
3287 pub const TCS_EX_REGISTERDROP: DWORD = 0x00000002;
3288 pub const TCM_GETIMAGELIST: UINT = TCM_FIRST + 2;
3289 pub const TCM_SETIMAGELIST: UINT = TCM_FIRST + 3;
3290 pub const TCM_GETITEMCOUNT: UINT = TCM_FIRST + 4;
3291 pub const TCIF_TEXT: UINT = 0x0001;
3292 pub const TCIF_IMAGE: UINT = 0x0002;
3293 pub const TCIF_RTLREADING: UINT = 0x0004;
3294 pub const TCIF_PARAM: UINT = 0x0008;
3295 pub const TCIF_STATE: UINT = 0x0010;
3296 pub const TCIS_BUTTONPRESSED: DWORD = 0x0001;
3297 pub const TCIS_HIGHLIGHTED: DWORD = 0x0002;
3298 pub type TC_ITEMHEADERA = TCITEMHEADERA;
3299 pub type TC_ITEMHEADERW = TCITEMHEADERW;
3300 STRUCT!{struct TCITEMHEADERA {
3301 mask: UINT,
3302 lpReserved1: UINT,
3303 lpReserved2: UINT,
3304 pszText: LPSTR,
3305 cchTextMax: c_int,
3306 iImage: c_int,
3307 }}
3308 pub type LPTCITEMHEADERA = *mut TCITEMHEADERA;
3309 STRUCT!{struct TCITEMHEADERW {
3310 mask: UINT,
3311 lpReserved1: UINT,
3312 lpReserved2: UINT,
3313 pszText: LPWSTR,
3314 cchTextMax: c_int,
3315 iImage: c_int,
3316 }}
3317 pub type LPTCITEMHEADERW = *mut TCITEMHEADERW;
3318 pub type TC_ITEMA = TCITEMA;
3319 pub type TC_ITEMW = TCITEMW;
3320 STRUCT!{struct TCITEMA {
3321 mask: UINT,
3322 dwState: DWORD,
3323 dwStateMask: DWORD,
3324 pszText: LPSTR,
3325 cchTextMax: c_int,
3326 iImage: c_int,
3327 lParam: LPARAM,
3328 }}
3329 pub type LPTCITEMA = *mut TCITEMA;
3330 STRUCT!{struct TCITEMW {
3331 mask: UINT,
3332 dwState: DWORD,
3333 dwStateMask: DWORD,
3334 pszText: LPWSTR,
3335 cchTextMax: c_int,
3336 iImage: c_int,
3337 lParam: LPARAM,
3338 }}
3339 pub type LPTCITEMW = *mut TCITEMW;
3340 pub const TCM_GETITEMA: UINT = TCM_FIRST + 5;
3341 pub const TCM_GETITEMW: UINT = TCM_FIRST + 60;
3342 pub const TCM_SETITEMA: UINT = TCM_FIRST + 6;
3343 pub const TCM_SETITEMW: UINT = TCM_FIRST + 61;
3344 pub const TCM_INSERTITEMA: UINT = TCM_FIRST + 7;
3345 pub const TCM_INSERTITEMW: UINT = TCM_FIRST + 62;
3346 pub const TCM_DELETEITEM: UINT = TCM_FIRST + 8;
3347 pub const TCM_DELETEALLITEMS: UINT = TCM_FIRST + 9;
3348 pub const TCM_GETITEMRECT: UINT = TCM_FIRST + 10;
3349 pub const TCM_GETCURSEL: UINT = TCM_FIRST + 11;
3350 pub const TCM_SETCURSEL: UINT = TCM_FIRST + 12;
3351 pub const TCHT_NOWHERE: UINT = 0x0001;
3352 pub const TCHT_ONITEMICON: UINT = 0x0002;
3353 pub const TCHT_ONITEMLABEL: UINT = 0x0004;
3354 pub const TCHT_ONITEM: UINT = TCHT_ONITEMICON | TCHT_ONITEMLABEL;
3355 pub type LPTC_HITTESTINFO = LPTCHITTESTINFO;
3356 pub type TC_HITTESTINFO = TCHITTESTINFO;
3357 STRUCT!{struct TCHITTESTINFO {
3358 pt: POINT,
3359 flags: UINT,
3360 }}
3361 pub type LPTCHITTESTINFO = *mut TCHITTESTINFO;
3362 pub const TCM_HITTEST: UINT = TCM_FIRST + 13;
3363 pub const TCM_SETITEMEXTRA: UINT = TCM_FIRST + 14;
3364 pub const TCM_ADJUSTRECT: UINT = TCM_FIRST + 40;
3365 pub const TCM_SETITEMSIZE: UINT = TCM_FIRST + 41;
3366 pub const TCM_REMOVEIMAGE: UINT = TCM_FIRST + 42;
3367 pub const TCM_SETPADDING: UINT = TCM_FIRST + 43;
3368 pub const TCM_GETROWCOUNT: UINT = TCM_FIRST + 44;
3369 pub const TCM_GETTOOLTIPS: UINT = TCM_FIRST + 45;
3370 pub const TCM_SETTOOLTIPS: UINT = TCM_FIRST + 46;
3371 pub const TCM_GETCURFOCUS: UINT = TCM_FIRST + 47;
3372 pub const TCM_SETCURFOCUS: UINT = TCM_FIRST + 48;
3373 pub const TCM_SETMINTABWIDTH: UINT = TCM_FIRST + 49;
3374 pub const TCM_DESELECTALL: UINT = TCM_FIRST + 50;
3375 pub const TCM_HIGHLIGHTITEM: UINT = TCM_FIRST + 51;
3376 pub const TCM_SETEXTENDEDSTYLE: UINT = TCM_FIRST + 52;
3377 pub const TCM_GETEXTENDEDSTYLE: UINT = TCM_FIRST + 53;
3378 pub const TCM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
3379 pub const TCM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
3380 pub const TCN_KEYDOWN: UINT = TCN_FIRST - 0;
3381 pub type TC_KEYDOWN = NMTCKEYDOWN;
3382 STRUCT!{#[repr(packed)] struct NMTCKEYDOWN {
3383 hdr: NMHDR,
3384 wVKey: WORD,
3385 flags: UINT,
3386 }}
3387 pub const TCN_SELCHANGE: UINT = TCN_FIRST - 1;
3388 pub const TCN_SELCHANGING: UINT = TCN_FIRST - 2;
3389 pub const TCN_GETOBJECT: UINT = TCN_FIRST - 3;
3390 pub const TCN_FOCUSCHANGE: UINT = TCN_FIRST - 4;
3391 pub const ANIMATE_CLASS: &'static str = "SysAnimate32";
3392 pub const ACS_CENTER: DWORD = 0x0001;
3393 pub const ACS_TRANSPARENT: DWORD = 0x0002;
3394 pub const ACS_AUTOPLAY: DWORD = 0x0004;
3395 pub const ACS_TIMER: DWORD = 0x0008;
3396 pub const ACM_OPENA: UINT = WM_USER + 100;
3397 pub const ACM_OPENW: UINT = WM_USER + 103;
3398 pub const ACM_PLAY: UINT = WM_USER + 101;
3399 pub const ACM_STOP: UINT = WM_USER + 102;
3400 pub const ACM_ISPLAYING: UINT = WM_USER + 104;
3401 pub const ACN_START: WPARAM = 1;
3402 pub const ACN_STOP: WPARAM = 2;
3403 pub const MONTHCAL_CLASS: &'static str = "SysMonthCal32";
3404 pub type MONTHDAYSTATE = DWORD;
3405 pub type LPMONTHDAYSTATE = *mut DWORD;
3406 pub const MCM_FIRST: UINT = 0x1000;
3407 pub const MCM_GETCURSEL: UINT = MCM_FIRST + 1;
3408 pub const MCM_SETCURSEL: UINT = MCM_FIRST + 2;
3409 pub const MCM_GETMAXSELCOUNT: UINT = MCM_FIRST + 3;
3410 pub const MCM_SETMAXSELCOUNT: UINT = MCM_FIRST + 4;
3411 pub const MCM_GETSELRANGE: UINT = MCM_FIRST + 5;
3412 pub const MCM_SETSELRANGE: UINT = MCM_FIRST + 6;
3413 pub const MCM_GETMONTHRANGE: UINT = MCM_FIRST + 7;
3414 pub const MCM_SETDAYSTATE: UINT = MCM_FIRST + 8;
3415 pub const MCM_GETMINREQRECT: UINT = MCM_FIRST + 9;
3416 pub const MCM_SETCOLOR: UINT = MCM_FIRST + 10;
3417 pub const MCM_GETCOLOR: UINT = MCM_FIRST + 11;
3418 pub const MCSC_BACKGROUND: WPARAM = 0;
3419 pub const MCSC_TEXT: WPARAM = 1;
3420 pub const MCSC_TITLEBK: WPARAM = 2;
3421 pub const MCSC_TITLETEXT: WPARAM = 3;
3422 pub const MCSC_MONTHBK: WPARAM = 4;
3423 pub const MCSC_TRAILINGTEXT: WPARAM = 5;
3424 pub const MCM_SETTODAY: UINT = MCM_FIRST + 12;
3425 pub const MCM_GETTODAY: UINT = MCM_FIRST + 13;
3426 pub const MCM_HITTEST: UINT = MCM_FIRST + 14;
3427 STRUCT!{struct MCHITTESTINFO {
3428 cbSize: UINT,
3429 pt: POINT,
3430 uHit: UINT,
3431 st: SYSTEMTIME,
3432 rc: RECT,
3433 iOffset: c_int,
3434 iRow: c_int,
3435 iCol: c_int,
3436 }}
3437 pub type PMCHITTESTINFO = *mut MCHITTESTINFO;
3438 pub const MCHT_TITLE: UINT = 0x00010000;
3439 pub const MCHT_CALENDAR: UINT = 0x00020000;
3440 pub const MCHT_TODAYLINK: UINT = 0x00030000;
3441 pub const MCHT_CALENDARCONTROL: UINT = 0x00100000;
3442 pub const MCHT_NEXT: UINT = 0x01000000;
3443 pub const MCHT_PREV: UINT = 0x02000000;
3444 pub const MCHT_NOWHERE: UINT = 0x00000000;
3445 pub const MCHT_TITLEBK: UINT = MCHT_TITLE;
3446 pub const MCHT_TITLEMONTH: UINT = MCHT_TITLE | 0x0001;
3447 pub const MCHT_TITLEYEAR: UINT = MCHT_TITLE | 0x0002;
3448 pub const MCHT_TITLEBTNNEXT: UINT = MCHT_TITLE | MCHT_NEXT | 0x0003;
3449 pub const MCHT_TITLEBTNPREV: UINT = MCHT_TITLE | MCHT_PREV | 0x0003;
3450 pub const MCHT_CALENDARBK: UINT = MCHT_CALENDAR;
3451 pub const MCHT_CALENDARDATE: UINT = MCHT_CALENDAR | 0x0001;
3452 pub const MCHT_CALENDARDATENEXT: UINT = MCHT_CALENDARDATE | MCHT_NEXT;
3453 pub const MCHT_CALENDARDATEPREV: UINT = MCHT_CALENDARDATE | MCHT_PREV;
3454 pub const MCHT_CALENDARDAY: UINT = MCHT_CALENDAR | 0x0002;
3455 pub const MCHT_CALENDARWEEKNUM: UINT = MCHT_CALENDAR | 0x0003;
3456 pub const MCHT_CALENDARDATEMIN: UINT = MCHT_CALENDAR | 0x0004;
3457 pub const MCHT_CALENDARDATEMAX: UINT = MCHT_CALENDAR | 0x0005;
3458 pub const MCM_SETFIRSTDAYOFWEEK: UINT = MCM_FIRST + 15;
3459 pub const MCM_GETFIRSTDAYOFWEEK: UINT = MCM_FIRST + 16;
3460 pub const MCM_GETRANGE: UINT = MCM_FIRST + 17;
3461 pub const MCM_SETRANGE: UINT = MCM_FIRST + 18;
3462 pub const MCM_GETMONTHDELTA: UINT = MCM_FIRST + 19;
3463 pub const MCM_SETMONTHDELTA: UINT = MCM_FIRST + 20;
3464 pub const MCM_GETMAXTODAYWIDTH: UINT = MCM_FIRST + 21;
3465 pub const MCM_SETUNICODEFORMAT: UINT = CCM_SETUNICODEFORMAT;
3466 pub const MCM_GETUNICODEFORMAT: UINT = CCM_GETUNICODEFORMAT;
3467 pub const MCMV_MONTH: DWORD = 0;
3468 pub const MCMV_YEAR: DWORD = 1;
3469 pub const MCMV_DECADE: DWORD = 2;
3470 pub const MCMV_CENTURY: DWORD = 3;
3471 pub const MCMV_MAX: DWORD = MCMV_CENTURY;
3472 pub const MCM_GETCURRENTVIEW: UINT = MCM_FIRST + 22;
3473 pub const MCM_GETCALENDARCOUNT: UINT = MCM_FIRST + 23;
3474 pub const MCGIP_CALENDARCONTROL: DWORD = 0;
3475 pub const MCGIP_NEXT: DWORD = 1;
3476 pub const MCGIP_PREV: DWORD = 2;
3477 pub const MCGIP_FOOTER: DWORD = 3;
3478 pub const MCGIP_CALENDAR: DWORD = 4;
3479 pub const MCGIP_CALENDARHEADER: DWORD = 5;
3480 pub const MCGIP_CALENDARBODY: DWORD = 6;
3481 pub const MCGIP_CALENDARROW: DWORD = 7;
3482 pub const MCGIP_CALENDARCELL: DWORD = 8;
3483 pub const MCGIF_DATE: DWORD = 0x00000001;
3484 pub const MCGIF_RECT: DWORD = 0x00000002;
3485 pub const MCGIF_NAME: DWORD = 0x00000004;
3486 STRUCT!{struct MCGRIDINFO {
3487 cbSize: UINT,
3488 dwPart: DWORD,
3489 dwFlags: DWORD,
3490 iCalendar: c_int,
3491 iRow: c_int,
3492 iCol: c_int,
3493 bSelected: BOOL,
3494 stStart: SYSTEMTIME,
3495 stEnd: SYSTEMTIME,
3496 rc: RECT,
3497 pszName: PWSTR,
3498 cchName: size_t,
3499 }}
3500 pub type PMCGRIDINFO = *mut MCGRIDINFO;
3501 pub const MCM_GETCALENDARGRIDINFO: UINT = MCM_FIRST + 24;
3502 pub const MCM_GETCALID: UINT = MCM_FIRST + 27;
3503 pub const MCM_SETCALID: UINT = MCM_FIRST + 28;
3504 pub const MCM_SIZERECTTOMIN: UINT = MCM_FIRST + 29;
3505 pub const MCM_SETCALENDARBORDER: UINT = MCM_FIRST + 30;
3506 pub const MCM_GETCALENDARBORDER: UINT = MCM_FIRST + 31;
3507 pub const MCM_SETCURRENTVIEW: UINT = MCM_FIRST + 32;
3508 STRUCT!{struct NMSELCHANGE {
3509 nmhdr: NMHDR,
3510 stSelStart: SYSTEMTIME,
3511 stSelEnd: SYSTEMTIME,
3512 }}
3513 pub type LPNMSELCHANGE = *mut NMSELCHANGE;
3514 pub const MCN_SELCHANGE: UINT = MCN_FIRST - 3;
3515 STRUCT!{struct NMDAYSTATE {
3516 nmhdr: NMHDR,
3517 stStart: SYSTEMTIME,
3518 cDayState: c_int,
3519 prgDayState: LPMONTHDAYSTATE,
3520 }}
3521 pub type LPNMDAYSTATE = *mut NMDAYSTATE;
3522 pub const MCN_GETDAYSTATE: UINT = MCN_FIRST - 1;
3523 pub type NMSELECT = NMSELCHANGE;
3524 pub type LPNMSELECT = *mut NMSELCHANGE;
3525 pub const MCN_SELECT: UINT = MCN_FIRST;
3526 STRUCT!{struct NMVIEWCHANGE {
3527 nmhdr: NMHDR,
3528 dwOldView: DWORD,
3529 dwNewView: DWORD,
3530 }}
3531 pub type LPNMVIEWCHANGE = *mut NMVIEWCHANGE;
3532 pub const MCN_VIEWCHANGE: UINT = MCN_FIRST - 4;
3533 pub const MCS_DAYSTATE: DWORD = 0x0001;
3534 pub const MCS_MULTISELECT: DWORD = 0x0002;
3535 pub const MCS_WEEKNUMBERS: DWORD = 0x0004;
3536 pub const MCS_NOTODAYCIRCLE: DWORD = 0x0008;
3537 pub const MCS_NOTODAY: DWORD = 0x0010;
3538 pub const MCS_NOTRAILINGDATES: DWORD = 0x0040;
3539 pub const MCS_SHORTDAYSOFWEEK: DWORD = 0x0080;
3540 pub const MCS_NOSELCHANGEONNAV: DWORD = 0x0100;
3541 pub const GMR_VISIBLE: DWORD = 0;
3542 pub const GMR_DAYSTATE: DWORD = 1;
3543 pub const DATETIMEPICK_CLASS: &'static str = "SysDateTimePick32";
3544 STRUCT!{struct DATETIMEPICKERINFO {
3545 cbSize: UINT,
3546 rcCheck: RECT,
3547 stateCheck: DWORD,
3548 rcButton: RECT,
3549 stateButton: DWORD,
3550 hwndEdit: HWND,
3551 hwndUD: HWND,
3552 hwndDropDown: HWND,
3553 }}
3554 pub type LPDATETIMEPICKERINFO = *mut DATETIMEPICKERINFO;
3555 pub const DTM_FIRST: UINT = 0x1000;
3556 pub const DTM_GETSYSTEMTIME: UINT = DTM_FIRST + 1;
3557 pub const DTM_SETSYSTEMTIME: UINT = DTM_FIRST + 2;
3558 pub const DTM_GETRANGE: UINT = DTM_FIRST + 3;
3559 pub const DTM_SETRANGE: UINT = DTM_FIRST + 4;
3560 pub const DTM_SETFORMATA: UINT = DTM_FIRST + 5;
3561 pub const DTM_SETFORMATW: UINT = DTM_FIRST + 50;
3562 pub const DTM_SETMCCOLOR: UINT = DTM_FIRST + 6;
3563 pub const DTM_GETMCCOLOR: UINT = DTM_FIRST + 7;
3564 pub const DTM_GETMONTHCAL: UINT = DTM_FIRST + 8;
3565 pub const DTM_SETMCFONT: UINT = DTM_FIRST + 9;
3566 pub const DTM_GETMCFONT: UINT = DTM_FIRST + 10;
3567 pub const DTM_SETMCSTYLE: UINT = DTM_FIRST + 11;
3568 pub const DTM_GETMCSTYLE: UINT = DTM_FIRST + 12;
3569 pub const DTM_CLOSEMONTHCAL: UINT = DTM_FIRST + 13;
3570 pub const DTM_GETDATETIMEPICKERINFO: UINT = DTM_FIRST + 14;
3571 pub const DTM_GETIDEALSIZE: UINT = DTM_FIRST + 15;
3572 pub const DTS_UPDOWN: DWORD = 0x0001;
3573 pub const DTS_SHOWNONE: DWORD = 0x0002;
3574 pub const DTS_SHORTDATEFORMAT: DWORD = 0x0000;
3575 pub const DTS_LONGDATEFORMAT: DWORD = 0x0004;
3576 pub const DTS_SHORTDATECENTURYFORMAT: DWORD = 0x000C;
3577 pub const DTS_TIMEFORMAT: DWORD = 0x0009;
3578 pub const DTS_APPCANPARSE: DWORD = 0x0010;
3579 pub const DTS_RIGHTALIGN: DWORD = 0x0020;
3580 pub const DTN_DATETIMECHANGE: UINT = DTN_FIRST2 - 6;
3581 STRUCT!{struct NMDATETIMECHANGE {
3582 nmhdr: NMHDR,
3583 dwFlags: DWORD,
3584 st: SYSTEMTIME,
3585 }}
3586 pub type LPNMDATETIMECHANGE = *mut NMDATETIMECHANGE;
3587 pub const DTN_USERSTRINGA: UINT = DTN_FIRST2 - 5;
3588 pub const DTN_USERSTRINGW: UINT = DTN_FIRST - 5;
3589 STRUCT!{struct NMDATETIMESTRINGA {
3590 nmhdr: NMHDR,
3591 pszUserString: LPCSTR,
3592 st: SYSTEMTIME,
3593 dwFlags: DWORD,
3594 }}
3595 pub type LPNMDATETIMESTRINGA = *mut NMDATETIMESTRINGA;
3596 STRUCT!{struct NMDATETIMESTRINGW {
3597 nmhdr: NMHDR,
3598 pszUserString: LPCWSTR,
3599 st: SYSTEMTIME,
3600 dwFlags: DWORD,
3601 }}
3602 pub type LPNMDATETIMESTRINGW = *mut NMDATETIMESTRINGW;
3603 pub const DTN_WMKEYDOWNA: UINT = DTN_FIRST2 - 4;
3604 pub const DTN_WMKEYDOWNW: UINT = DTN_FIRST - 4;
3605 STRUCT!{struct NMDATETIMEWMKEYDOWNA {
3606 nmhdr: NMHDR,
3607 nVirtKey: c_int,
3608 pszFormat: LPCSTR,
3609 st: SYSTEMTIME,
3610 }}
3611 pub type LPNMDATETIMEWMKEYDOWNA = *mut NMDATETIMEWMKEYDOWNA;
3612 STRUCT!{struct NMDATETIMEWMKEYDOWNW {
3613 nmhdr: NMHDR,
3614 nVirtKey: c_int,
3615 pszFormat: LPCWSTR,
3616 st: SYSTEMTIME,
3617 }}
3618 pub type LPNMDATETIMEWMKEYDOWNW = *mut NMDATETIMEWMKEYDOWNW;
3619 pub const DTN_FORMATA: UINT = DTN_FIRST2 - 3;
3620 pub const DTN_FORMATW: UINT = DTN_FIRST - 3;
3621 STRUCT!{struct NMDATETIMEFORMATA {
3622 nmhdr: NMHDR,
3623 pszFormat: LPCSTR,
3624 st: SYSTEMTIME,
3625 pszDisplay: LPCSTR,
3626 szDisplay: [CHAR; 64],
3627 }}
3628 pub type LPNMDATETIMEFORMATA = *mut NMDATETIMEFORMATA;
3629 STRUCT!{struct NMDATETIMEFORMATW {
3630 nmhdr: NMHDR,
3631 pszFormat: LPCWSTR,
3632 st: SYSTEMTIME,
3633 pszDisplay: LPCWSTR,
3634 szDisplay: [WCHAR; 64],
3635 }}
3636 pub type LPNMDATETIMEFORMATW = *mut NMDATETIMEFORMATW;
3637 pub const DTN_FORMATQUERYA: UINT = DTN_FIRST2 - 2;
3638 pub const DTN_FORMATQUERYW: UINT = DTN_FIRST - 2;
3639 STRUCT!{struct NMDATETIMEFORMATQUERYA {
3640 nmhdr: NMHDR,
3641 pszFormat: LPCSTR,
3642 szMax: SIZE,
3643 }}
3644 pub type LPNMDATETIMEFORMATQUERYA = *mut NMDATETIMEFORMATQUERYA;
3645 STRUCT!{struct NMDATETIMEFORMATQUERYW {
3646 nmhdr: NMHDR,
3647 pszFormat: LPCWSTR,
3648 szMax: SIZE,
3649 }}
3650 pub type LPNMDATETIMEFORMATQUERYW = *mut NMDATETIMEFORMATQUERYW;
3651 pub const DTN_DROPDOWN: UINT = DTN_FIRST2 - 1;
3652 pub const DTN_CLOSEUP: UINT = DTN_FIRST2;
3653 pub const GDTR_MIN: WPARAM = 0x0001;
3654 pub const GDTR_MAX: WPARAM = 0x0002;
3655 pub const GDT_ERROR: LRESULT = -1;
3656 pub const GDT_VALID: LRESULT = 0;
3657 pub const GDT_NONE: LRESULT = 1;
3658 pub const IPM_CLEARADDRESS: UINT = WM_USER + 100;
3659 pub const IPM_SETADDRESS: UINT = WM_USER + 101;
3660 pub const IPM_GETADDRESS: UINT = WM_USER + 102;
3661 pub const IPM_SETRANGE: UINT = WM_USER + 103;
3662 pub const IPM_SETFOCUS: UINT = WM_USER + 104;
3663 pub const IPM_ISBLANK: UINT = WM_USER + 105;
3664 pub const WC_IPADDRESS: &'static str = "SysIPAddress32";
3665 pub const IPN_FIELDCHANGED: UINT = IPN_FIRST - 0;
3666 STRUCT!{struct NMIPADDRESS {
3667 hdr: NMHDR,
3668 iField: c_int,
3669 iValue: c_int,
3670 }}
3671 pub type LPNMIPADDRESS = *mut NMIPADDRESS;
3672 #[inline]
MAKEIPRANGE(low: BYTE, high: BYTE) -> LPARAM3673 pub fn MAKEIPRANGE(low: BYTE, high: BYTE) -> LPARAM {
3674 (((high as WORD) << 8) + low as WORD) as LPARAM
3675 }
3676 #[inline]
MAKEIPADDRESS(b1: DWORD, b2: DWORD, b3: DWORD, b4: DWORD) -> LPARAM3677 pub fn MAKEIPADDRESS(b1: DWORD, b2: DWORD, b3: DWORD, b4: DWORD) -> LPARAM {
3678 ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4) as LPARAM
3679 }
3680 #[inline]
FIRST_IPADDRESS(x: LPARAM) -> BYTE3681 pub fn FIRST_IPADDRESS(x: LPARAM) -> BYTE {
3682 ((x >> 24) & 0xff) as BYTE
3683 }
3684 #[inline]
SECOND_IPADDRESS(x: LPARAM) -> BYTE3685 pub fn SECOND_IPADDRESS(x: LPARAM) -> BYTE {
3686 ((x >> 16) & 0xff) as BYTE
3687 }
3688 #[inline]
THIRD_IPADDRESS(x: LPARAM) -> BYTE3689 pub fn THIRD_IPADDRESS(x: LPARAM) -> BYTE {
3690 ((x >> 8) & 0xff) as BYTE
3691 }
3692 #[inline]
FOURTH_IPADDRESS(x: LPARAM) -> BYTE3693 pub fn FOURTH_IPADDRESS(x: LPARAM) -> BYTE {
3694 (x & 0xff) as BYTE
3695 }
3696 pub const WC_PAGESCROLLER: &'static str = "SysPager";
3697 pub const PGS_VERT: DWORD = 0x00000000;
3698 pub const PGS_HORZ: DWORD = 0x00000001;
3699 pub const PGS_AUTOSCROLL: DWORD = 0x00000002;
3700 pub const PGS_DRAGNDROP: DWORD = 0x00000004;
3701 pub const PGF_INVISIBLE: DWORD = 0;
3702 pub const PGF_NORMAL: DWORD = 1;
3703 pub const PGF_GRAYED: DWORD = 2;
3704 pub const PGF_DEPRESSED: DWORD = 4;
3705 pub const PGF_HOT: DWORD = 8;
3706 pub const PGB_TOPORLEFT: c_int = 0;
3707 pub const PGB_BOTTOMORRIGHT: c_int = 1;
3708 pub const PGM_SETCHILD: UINT = PGM_FIRST + 1;
3709 pub const PGM_RECALCSIZE: UINT = PGM_FIRST + 2;
3710 pub const PGM_FORWARDMOUSE: UINT = PGM_FIRST + 3;
3711 pub const PGM_SETBKCOLOR: UINT = PGM_FIRST + 4;
3712 pub const PGM_GETBKCOLOR: UINT = PGM_FIRST + 5;
3713 pub const PGM_SETBORDER: UINT = PGM_FIRST + 6;
3714 pub const PGM_GETBORDER: UINT = PGM_FIRST + 7;
3715 pub const PGM_SETPOS: UINT = PGM_FIRST + 8;
3716 pub const PGM_GETPOS: UINT = PGM_FIRST + 9;
3717 pub const PGM_SETBUTTONSIZE: UINT = PGM_FIRST + 10;
3718 pub const PGM_GETBUTTONSIZE: UINT = PGM_FIRST + 11;
3719 pub const PGM_GETBUTTONSTATE: UINT = PGM_FIRST + 12;
3720 pub const PGM_GETDROPTARGET: UINT = CCM_GETDROPTARGET;
3721 pub const PGM_SETSCROLLINFO: UINT = PGM_FIRST + 13;
3722 pub const PGN_SCROLL: UINT = PGN_FIRST - 1;
3723 pub const PGF_SCROLLUP: c_int = 1;
3724 pub const PGF_SCROLLDOWN: c_int = 2;
3725 pub const PGF_SCROLLLEFT: c_int = 4;
3726 pub const PGF_SCROLLRIGHT: c_int = 8;
3727 pub const PGK_SHIFT: BOOL = 1;
3728 pub const PGK_CONTROL: BOOL = 2;
3729 pub const PGK_MENU: BOOL = 4;
3730 STRUCT!{#[repr(packed)] struct NMPGSCROLL {
3731 hdr: NMHDR,
3732 fwKeys: WORD,
3733 rcParent: RECT,
3734 iDir: c_int,
3735 iXpos: c_int,
3736 iYpos: c_int,
3737 iScroll: c_int,
3738 }}
3739 pub type LPNMPGSCROLL = *mut NMPGSCROLL;
3740 pub const PGN_CALCSIZE: UINT = PGN_FIRST - 2;
3741 pub const PGF_CALCWIDTH: DWORD = 1;
3742 pub const PGF_CALCHEIGHT: DWORD = 2;
3743 STRUCT!{struct NMPGCALCSIZE {
3744 hdr: NMHDR,
3745 dwFlag: DWORD,
3746 iWidth: c_int,
3747 iHeight: c_int,
3748 }}
3749 pub type LPNMPGCALCSIZE = *mut NMPGCALCSIZE;
3750 pub const PGN_HOTITEMCHANGE: UINT = PGN_FIRST - 3;
3751 STRUCT!{struct NMPGHOTITEM {
3752 hdr: NMHDR,
3753 idOld: c_int,
3754 idNew: c_int,
3755 dwFlags: DWORD,
3756 }}
3757 pub type LPNMPGHOTITEM = *mut NMPGHOTITEM;
3758 pub const WC_NATIVEFONTCTL: &'static str = "NativeFontCtl";
3759 pub const NFS_EDIT: DWORD = 0x0001;
3760 pub const NFS_STATIC: DWORD = 0x0002;
3761 pub const NFS_LISTCOMBO: DWORD = 0x0004;
3762 pub const NFS_BUTTON: DWORD = 0x0008;
3763 pub const NFS_ALL: DWORD = 0x0010;
3764 pub const NFS_USEFONTASSOC: DWORD = 0x0020;
3765 pub const WC_BUTTONA: &'static str = "Button";
3766 pub const BUTTON_IMAGELIST_ALIGN_LEFT: UINT = 0;
3767 pub const BUTTON_IMAGELIST_ALIGN_RIGHT: UINT = 1;
3768 pub const BUTTON_IMAGELIST_ALIGN_TOP: UINT = 2;
3769 pub const BUTTON_IMAGELIST_ALIGN_BOTTOM: UINT = 3;
3770 pub const BUTTON_IMAGELIST_ALIGN_CENTER: UINT = 4;
3771 STRUCT!{struct BUTTON_IMAGELIST {
3772 himl: HIMAGELIST,
3773 margin: RECT,
3774 uAlign: UINT,
3775 }}
3776 pub type PBUTTON_IMAGELIST = *mut BUTTON_IMAGELIST;
3777 pub const BCM_GETIDEALSIZE: UINT = BCM_FIRST + 0x0001;
3778 pub const BCM_SETIMAGELIST: UINT = BCM_FIRST + 0x0002;
3779 pub const BCM_GETIMAGELIST: UINT = BCM_FIRST + 0x0003;
3780 pub const BCM_SETTEXTMARGIN: UINT = BCM_FIRST + 0x0004;
3781 pub const BCM_GETTEXTMARGIN: UINT = BCM_FIRST + 0x0005;
3782 STRUCT!{struct NMBCHOTITEM {
3783 hdr: NMHDR,
3784 dwFlags: DWORD,
3785 }}
3786 pub type LPNMBCHOTITEM = *mut NMBCHOTITEM;
3787 pub const BCN_HOTITEMCHANGE: UINT = BCN_FIRST + 0x0001;
3788 pub const BS_SPLITBUTTON: UINT = 0x0000000C;
3789 pub const BS_DEFSPLITBUTTON: UINT = 0x0000000D;
3790 pub const BS_COMMANDLINK: UINT = 0x0000000E;
3791 pub const BS_DEFCOMMANDLINK: UINT = 0x0000000F;
3792 pub const BCSIF_GLYPH: UINT = 0x0001;
3793 pub const BCSIF_IMAGE: UINT = 0x0002;
3794 pub const BCSIF_STYLE: UINT = 0x0004;
3795 pub const BCSIF_SIZE: UINT = 0x0008;
3796 pub const BCSS_NOSPLIT: UINT = 0x0001;
3797 pub const BCSS_STRETCH: UINT = 0x0002;
3798 pub const BCSS_ALIGNLEFT: UINT = 0x0004;
3799 pub const BCSS_IMAGE: UINT = 0x0008;
3800 STRUCT!{struct BUTTON_SPLITINFO {
3801 mask: UINT,
3802 himlGlyph: HIMAGELIST,
3803 uSplitStyle: UINT,
3804 size: SIZE,
3805 }}
3806 pub type PBUTTON_SPLITINFO = *mut BUTTON_SPLITINFO;
3807 pub const BCM_SETDROPDOWNSTATE: UINT = BCM_FIRST + 0x0006;
3808 pub const BCM_SETSPLITINFO: UINT = BCM_FIRST + 0x0007;
3809 pub const BCM_GETSPLITINFO: UINT = BCM_FIRST + 0x0008;
3810 pub const BCM_SETNOTE: UINT = BCM_FIRST + 0x0009;
3811 pub const BCM_GETNOTE: UINT = BCM_FIRST + 0x000A;
3812 pub const BCM_GETNOTELENGTH: UINT = BCM_FIRST + 0x000B;
3813 pub const BCM_SETSHIELD: UINT = BCM_FIRST + 0x000C;
3814 pub const BCCL_NOGLYPH: HIMAGELIST = -1isize as HIMAGELIST;
3815 STRUCT!{struct NMBCDROPDOWN {
3816 hdr: NMHDR,
3817 rcButton: RECT,
3818 }}
3819 pub type LPNMBCDROPDOWN = *mut NMBCDROPDOWN;
3820 pub const BCN_DROPDOWN: UINT = BCN_FIRST + 0x0002;
3821 pub const WC_STATIC: &'static str = "Static";
3822 pub const WC_EDIT: &'static str = "Edit";
3823 pub const EM_SETCUEBANNER: UINT = ECM_FIRST + 1;
3824 pub const EM_GETCUEBANNER: UINT = ECM_FIRST + 2;
3825 STRUCT!{struct EDITBALLOONTIP {
3826 cbStruct: DWORD,
3827 pszTitle: LPCWSTR,
3828 pszText: LPCWSTR,
3829 ttiIcon: INT,
3830 }}
3831 pub type PEDITBALLOONTIP = *mut EDITBALLOONTIP;
3832 pub const EM_SHOWBALLOONTIP: UINT = ECM_FIRST + 3;
3833 pub const EM_HIDEBALLOONTIP: UINT = ECM_FIRST + 4;
3834 pub const EM_SETHILITE: UINT = ECM_FIRST + 5;
3835 pub const EM_GETHILITE: UINT = ECM_FIRST + 6;
3836 pub const EM_NOSETFOCUS: UINT = ECM_FIRST + 7;
3837 pub const EM_TAKEFOCUS: UINT = ECM_FIRST + 8;
3838 pub const WC_LISTBOX: &'static str = "ListBox";
3839 pub const WC_COMBOBOX: &'static str = "ComboBox";
3840 pub const CB_SETMINVISIBLE: UINT = CBM_FIRST + 1;
3841 pub const CB_GETMINVISIBLE: UINT = CBM_FIRST + 2;
3842 pub const CB_SETCUEBANNER: UINT = CBM_FIRST + 3;
3843 pub const CB_GETCUEBANNER: UINT = CBM_FIRST + 4;
3844 pub const WC_SCROLLBAR: &'static str = "ScrollBar";
3845 FN!{stdcall PFTASKDIALOGCALLBACK(
3846 hwnd: HWND,
3847 msg: UINT,
3848 wParam: WPARAM,
3849 lParam: LPARAM,
3850 lpRefData: LONG_PTR,
3851 ) -> HRESULT}
3852 ENUM!{enum TASKDIALOG_FLAGS {
3853 TDF_ENABLE_HYPERLINKS = 0x0001,
3854 TDF_USE_HICON_MAIN = 0x0002,
3855 TDF_USE_HICON_FOOTER = 0x0004,
3856 TDF_ALLOW_DIALOG_CANCELLATION = 0x0008,
3857 TDF_USE_COMMAND_LINKS = 0x0010,
3858 TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020,
3859 TDF_EXPAND_FOOTER_AREA = 0x0040,
3860 TDF_EXPANDED_BY_DEFAULT = 0x0080,
3861 TDF_VERIFICATION_FLAG_CHECKED = 0x0100,
3862 TDF_SHOW_PROGRESS_BAR = 0x0200,
3863 TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400,
3864 TDF_CALLBACK_TIMER = 0x0800,
3865 TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000,
3866 TDF_RTL_LAYOUT = 0x2000,
3867 TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000,
3868 TDF_CAN_BE_MINIMIZED = 0x8000,
3869 TDF_NO_SET_FOREGROUND = 0x00010000,
3870 TDF_SIZE_TO_CONTENT = 0x01000000,
3871 }}
3872 ENUM!{enum TASKDIALOG_MESSAGES {
3873 TDM_NAVIGATE_PAGE = WM_USER + 101,
3874 TDM_CLICK_BUTTON = WM_USER + 102,
3875 TDM_SET_MARQUEE_PROGRESS_BAR = WM_USER + 103,
3876 TDM_SET_PROGRESS_BAR_STATE = WM_USER + 104,
3877 TDM_SET_PROGRESS_BAR_RANGE = WM_USER + 105,
3878 TDM_SET_PROGRESS_BAR_POS = WM_USER + 106,
3879 TDM_SET_PROGRESS_BAR_MARQUEE = WM_USER + 107,
3880 TDM_SET_ELEMENT_TEXT = WM_USER + 108,
3881 TDM_CLICK_RADIO_BUTTON = WM_USER + 110,
3882 TDM_ENABLE_BUTTON = WM_USER + 111,
3883 TDM_ENABLE_RADIO_BUTTON = WM_USER + 112,
3884 TDM_CLICK_VERIFICATION = WM_USER + 113,
3885 TDM_UPDATE_ELEMENT_TEXT = WM_USER + 114,
3886 TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = WM_USER + 115,
3887 TDM_UPDATE_ICON = WM_USER + 116,
3888 }}
3889 ENUM!{enum TASKDIALOG_NOTIFICATIONS {
3890 TDN_CREATED = 0,
3891 TDN_NAVIGATED = 1,
3892 TDN_BUTTON_CLICKED = 2,
3893 TDN_HYPERLINK_CLICKED = 3,
3894 TDN_TIMER = 4,
3895 TDN_DESTROYED = 5,
3896 TDN_RADIO_BUTTON_CLICKED = 6,
3897 TDN_DIALOG_CONSTRUCTED = 7,
3898 TDN_VERIFICATION_CLICKED = 8,
3899 TDN_HELP = 9,
3900 TDN_EXPANDO_BUTTON_CLICKED = 10,
3901 }}
3902 STRUCT!{#[repr(packed)] struct TASKDIALOG_BUTTON {
3903 nButtonID: c_int,
3904 pszButtonText: PCWSTR,
3905 }}
3906 ENUM!{enum TASKDIALOG_ELEMENTS {
3907 TDE_CONTENT,
3908 TDE_EXPANDED_INFORMATION,
3909 TDE_FOOTER,
3910 TDE_MAIN_INSTRUCTION,
3911 }}
3912 ENUM!{enum TASKDIALOG_ICON_ELEMENTS {
3913 TDIE_ICON_MAIN,
3914 TDIE_ICON_FOOTER,
3915 }}
3916 pub const TD_WARNING_ICON: LPWSTR = MAKEINTRESOURCE!(-1i16);
3917 pub const TD_ERROR_ICON: LPWSTR = MAKEINTRESOURCE!(-2i16);
3918 pub const TD_INFORMATION_ICON: LPWSTR = MAKEINTRESOURCE!(-3i16);
3919 pub const TD_SHIELD_ICON: LPWSTR = MAKEINTRESOURCE!(-4i16);
3920 ENUM!{enum TASKDIALOG_COMMON_BUTTON_FLAGS {
3921 TDCBF_OK_BUTTON = 0x0001,
3922 TDCBF_YES_BUTTON = 0x0002,
3923 TDCBF_NO_BUTTON = 0x0004,
3924 TDCBF_CANCEL_BUTTON = 0x0008,
3925 TDCBF_RETRY_BUTTON = 0x0010,
3926 TDCBF_CLOSE_BUTTON = 0x0020,
3927 }}
3928 UNION!{#[repr(packed)] union TASKDIALOGCONFIG_u1 {
3929 [usize; 1],
3930 hMainIcon hMainIcon_mut: HICON,
3931 pszMainIcon pszMainIcon_mut: PCWSTR,
3932 }}
3933 UNION!{#[repr(packed)] union TASKDIALOGCONFIG_u2 {
3934 [usize; 1],
3935 hFooterIcon hFooterIcon_mut: HICON,
3936 pszFooterIcon pszFooterIcon_mut: PCWSTR,
3937 }}
3938 STRUCT!{#[repr(packed)] struct TASKDIALOGCONFIG {
3939 cbSize: UINT,
3940 hwndParent: HWND,
3941 hInstance: HINSTANCE,
3942 dwFlags: TASKDIALOG_FLAGS,
3943 dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS,
3944 pszWindowTitle: PCWSTR,
3945 u1: TASKDIALOGCONFIG_u1,
3946 pszMainInstruction: PCWSTR,
3947 pszContent: PCWSTR,
3948 cButtons: UINT,
3949 pButtons: *const TASKDIALOG_BUTTON,
3950 nDefaultButton: c_int,
3951 cRadioButtons: UINT,
3952 pRadioButtons: *const TASKDIALOG_BUTTON,
3953 nDefaultRadioButton: c_int,
3954 pszVerificationText: PCWSTR,
3955 pszExpandedInformation: PCWSTR,
3956 pszExpandedControlText: PCWSTR,
3957 pszCollapsedControlText: PCWSTR,
3958 u2: TASKDIALOGCONFIG_u2,
3959 pszFooter: PCWSTR,
3960 pfCallback: PFTASKDIALOGCALLBACK,
3961 lpCallbackData: LONG_PTR,
3962 cxWidth: UINT,
3963 }}
3964 extern "system" {
TaskDialogIndirect( pTaskConfig: *const TASKDIALOGCONFIG, pnButton: *mut c_int, pnRadioButton: *mut c_int, pfVerificationFlagChecked: *mut BOOL, ) -> HRESULT3965 pub fn TaskDialogIndirect(
3966 pTaskConfig: *const TASKDIALOGCONFIG,
3967 pnButton: *mut c_int,
3968 pnRadioButton: *mut c_int,
3969 pfVerificationFlagChecked: *mut BOOL,
3970 ) -> HRESULT;
TaskDialog( hwndOwner: HWND, hInstance: HINSTANCE, pszWindowTitle: PCWSTR, pszMainInstruction: PCWSTR, pszContent: PCWSTR, dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS, pszIcon: PCWSTR, pnButton: *mut c_int, ) -> HRESULT3971 pub fn TaskDialog(
3972 hwndOwner: HWND,
3973 hInstance: HINSTANCE,
3974 pszWindowTitle: PCWSTR,
3975 pszMainInstruction: PCWSTR,
3976 pszContent: PCWSTR,
3977 dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS,
3978 pszIcon: PCWSTR,
3979 pnButton: *mut c_int,
3980 ) -> HRESULT;
InitMUILanguage( uiLang: LANGID, )3981 pub fn InitMUILanguage(
3982 uiLang: LANGID,
3983 );
GetMUILanguage() -> LANGID3984 pub fn GetMUILanguage() -> LANGID;
_TrackMouseEvent( lpEventTrack: LPTRACKMOUSEEVENT, ) -> BOOL3985 pub fn _TrackMouseEvent(
3986 lpEventTrack: LPTRACKMOUSEEVENT,
3987 ) -> BOOL;
3988 }
3989 pub const WSB_PROP_CYVSCROLL: UINT = 0x00000001;
3990 pub const WSB_PROP_CXHSCROLL: UINT = 0x00000002;
3991 pub const WSB_PROP_CYHSCROLL: UINT = 0x00000004;
3992 pub const WSB_PROP_CXVSCROLL: UINT = 0x00000008;
3993 pub const WSB_PROP_CXHTHUMB: UINT = 0x00000010;
3994 pub const WSB_PROP_CYVTHUMB: UINT = 0x00000020;
3995 pub const WSB_PROP_VBKGCOLOR: UINT = 0x00000040;
3996 pub const WSB_PROP_HBKGCOLOR: UINT = 0x00000080;
3997 pub const WSB_PROP_VSTYLE: UINT = 0x00000100;
3998 pub const WSB_PROP_HSTYLE: UINT = 0x00000200;
3999 pub const WSB_PROP_WINSTYLE: UINT = 0x00000400;
4000 pub const WSB_PROP_PALETTE: UINT = 0x00000800;
4001 pub const WSB_PROP_MASK: UINT = 0x00000FFF;
4002 pub const FSB_FLAT_MODE: INT_PTR = 2;
4003 pub const FSB_ENCARTA_MODE: INT_PTR = 1;
4004 pub const FSB_REGULAR_MODE: INT_PTR = 0;
4005 extern "system" {
FlatSB_EnableScrollBar( hWnd: HWND, wSBflags: c_int, wArrows: UINT, ) -> BOOL4006 pub fn FlatSB_EnableScrollBar(
4007 hWnd: HWND,
4008 wSBflags: c_int,
4009 wArrows: UINT,
4010 ) -> BOOL;
FlatSB_ShowScrollBar( hWnd: HWND, code: c_int, fShow: BOOL, ) -> BOOL4011 pub fn FlatSB_ShowScrollBar(
4012 hWnd: HWND,
4013 code: c_int,
4014 fShow: BOOL,
4015 ) -> BOOL;
FlatSB_GetScrollRange( hWnd: HWND, code: c_int, lpMinPos: LPINT, lpMaxPos: LPINT, ) -> BOOL4016 pub fn FlatSB_GetScrollRange(
4017 hWnd: HWND,
4018 code: c_int,
4019 lpMinPos: LPINT,
4020 lpMaxPos: LPINT,
4021 ) -> BOOL;
FlatSB_GetScrollInfo( hwnd: HWND, code: c_int, lpsi: LPSCROLLINFO, ) -> BOOL4022 pub fn FlatSB_GetScrollInfo(
4023 hwnd: HWND,
4024 code: c_int,
4025 lpsi: LPSCROLLINFO,
4026 ) -> BOOL;
FlatSB_GetScrollPos( hWnd: HWND, code: c_int, ) -> c_int4027 pub fn FlatSB_GetScrollPos(
4028 hWnd: HWND,
4029 code: c_int,
4030 ) -> c_int;
FlatSB_GetScrollProp(hWnd: HWND, propIndex: c_int, pValue: LPINT, ) -> BOOL4031 pub fn FlatSB_GetScrollProp(hWnd: HWND,
4032 propIndex: c_int,
4033 pValue: LPINT,
4034 ) -> BOOL;
4035 #[cfg(target_pointer_width = "64")]
FlatSB_GetScrollPropPtr( hWnd: HWND, propIndex: c_int, pValue: PINT_PTR, ) -> BOOL4036 pub fn FlatSB_GetScrollPropPtr(
4037 hWnd: HWND,
4038 propIndex: c_int,
4039 pValue: PINT_PTR,
4040 ) -> BOOL;
FlatSB_SetScrollPos( hWnd: HWND, code: c_int, pos: c_int, fRedraw: BOOL, ) -> c_int4041 pub fn FlatSB_SetScrollPos(
4042 hWnd: HWND,
4043 code: c_int,
4044 pos: c_int,
4045 fRedraw: BOOL,
4046 ) -> c_int;
FlatSB_SetScrollInfo( hWnd: HWND, code: c_int, psi: LPSCROLLINFO, fRedraw: BOOL, ) -> c_int4047 pub fn FlatSB_SetScrollInfo(
4048 hWnd: HWND,
4049 code: c_int,
4050 psi: LPSCROLLINFO,
4051 fRedraw: BOOL,
4052 ) -> c_int;
FlatSB_SetScrollRange( hWnd: HWND, code: c_int, min: c_int, max: c_int, fRedraw: BOOL, ) -> c_int4053 pub fn FlatSB_SetScrollRange(
4054 hWnd: HWND,
4055 code: c_int,
4056 min: c_int,
4057 max: c_int,
4058 fRedraw: BOOL,
4059 ) -> c_int;
FlatSB_SetScrollProp( hWnd: HWND, index: UINT, newValue: INT_PTR, fRedraw: BOOL, ) -> BOOL4060 pub fn FlatSB_SetScrollProp(
4061 hWnd: HWND,
4062 index: UINT,
4063 newValue: INT_PTR,
4064 fRedraw: BOOL,
4065 ) -> BOOL;
InitializeFlatSB( hWnd: HWND, ) -> BOOL4066 pub fn InitializeFlatSB(
4067 hWnd: HWND,
4068 ) -> BOOL;
UninitializeFlatSB( hWnd: HWND, ) -> HRESULT4069 pub fn UninitializeFlatSB(
4070 hWnd: HWND,
4071 ) -> HRESULT;
4072 }
4073 FN!{stdcall SUBCLASSPROC(
4074 hWnd: HWND,
4075 uMsg: UINT,
4076 wParam: WPARAM,
4077 lParam: LPARAM,
4078 uIdSubclass: UINT_PTR,
4079 dwRefData: DWORD_PTR,
4080 ) -> LRESULT}
4081 extern "system" {
SetWindowSubclass( hWnd: HWND, pfnSubclass: SUBCLASSPROC, uIdSubclass: UINT_PTR, dwRefData: DWORD_PTR, ) -> BOOL4082 pub fn SetWindowSubclass(
4083 hWnd: HWND,
4084 pfnSubclass: SUBCLASSPROC,
4085 uIdSubclass: UINT_PTR,
4086 dwRefData: DWORD_PTR,
4087 ) -> BOOL;
GetWindowSubclass( hWnd: HWND, pfnSubclass: SUBCLASSPROC, uIdSubclass: UINT_PTR, pdwRefData: *mut DWORD_PTR, ) -> BOOL4088 pub fn GetWindowSubclass(
4089 hWnd: HWND,
4090 pfnSubclass: SUBCLASSPROC,
4091 uIdSubclass: UINT_PTR,
4092 pdwRefData: *mut DWORD_PTR,
4093 ) -> BOOL;
RemoveWindowSubclass( hWnd: HWND, pfnSubclass: SUBCLASSPROC, uIdSubclass: UINT_PTR, ) -> BOOL4094 pub fn RemoveWindowSubclass(
4095 hWnd: HWND,
4096 pfnSubclass: SUBCLASSPROC,
4097 uIdSubclass: UINT_PTR,
4098 ) -> BOOL;
DefSubclassProc( hWnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM, ) -> LRESULT4099 pub fn DefSubclassProc(
4100 hWnd: HWND,
4101 uMsg: UINT,
4102 wParam: WPARAM,
4103 lParam: LPARAM,
4104 ) -> LRESULT;
4105 }
4106 ENUM!{enum REGCLS {
4107 LIM_SMALL,
4108 LIM_LARGE,
4109 }}
4110 extern "system" {
LoadIconMetric( hinst: HINSTANCE, pszName: PCWSTR, lims: c_int, phico: *mut HICON, ) -> HRESULT4111 pub fn LoadIconMetric(
4112 hinst: HINSTANCE,
4113 pszName: PCWSTR,
4114 lims: c_int,
4115 phico: *mut HICON,
4116 ) -> HRESULT;
LoadIconWithScaleDown( hinst: HINSTANCE, pszName: PCWSTR, cx: c_int, cy: c_int, phico: *mut HICON, ) -> HRESULT4117 pub fn LoadIconWithScaleDown(
4118 hinst: HINSTANCE,
4119 pszName: PCWSTR,
4120 cx: c_int,
4121 cy: c_int,
4122 phico: *mut HICON,
4123 ) -> HRESULT;
DrawShadowText( hdc: HDC, pszText: LPCWSTR, cch: UINT, prc: *mut RECT, dwFlags: DWORD, crText: COLORREF, crShadow: COLORREF, ixOffset: c_int, iyOffset: c_int, ) -> c_int4124 pub fn DrawShadowText(
4125 hdc: HDC,
4126 pszText: LPCWSTR,
4127 cch: UINT,
4128 prc: *mut RECT,
4129 dwFlags: DWORD,
4130 crText: COLORREF,
4131 crShadow: COLORREF,
4132 ixOffset: c_int,
4133 iyOffset: c_int,
4134 ) -> c_int;
4135 }
4136