]>
Commit | Line | Data |
---|---|---|
7391216e | 1 | ///////////////////////////////////////////////////////////////////////////// |
05e3a383 | 2 | // Name: wx/msw/missing.h |
7391216e | 3 | // Purpose: Declarations for parts of the Win32 SDK that are missing in |
05e3a383 | 4 | // the versions that come with some compilers |
7391216e VS |
5 | // Created: 2002/04/23 |
6 | // RCS-ID: $Id$ | |
05e3a383 | 7 | // Copyright: (c) 2002 Mattia Barbon |
65571936 | 8 | // Licence: wxWindows licence |
7391216e VS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_MISSING_H_ | |
12 | #define _WX_MISSING_H_ | |
13 | ||
90a752c2 JS |
14 | /* |
15 | * The following are required for VC++ 6. | |
16 | */ | |
7391216e | 17 | |
8003f8de DS |
18 | // Needed by cursor.cpp |
19 | #ifndef IDC_HAND | |
20 | #define IDC_HAND MAKEINTRESOURCE(32649) | |
21 | #endif | |
22 | ||
90a752c2 JS |
23 | // Needed by strconv.cpp |
24 | #ifndef WC_NO_BEST_FIT_CHARS | |
25 | #define WC_NO_BEST_FIT_CHARS 0x400 | |
7391216e VS |
26 | #endif |
27 | ||
90a752c2 JS |
28 | #ifndef WM_CONTEXTMENU |
29 | #define WM_CONTEXTMENU 0x007B | |
3bce6687 JS |
30 | #endif |
31 | ||
2f0312f0 VZ |
32 | #ifndef WM_CHANGEUISTATE |
33 | #define WM_CHANGEUISTATE 0x0127 | |
34 | #endif | |
35 | ||
90a752c2 JS |
36 | #ifndef WM_UPDATEUISTATE |
37 | #define WM_UPDATEUISTATE 0x0128 | |
3bce6687 JS |
38 | #endif |
39 | ||
2f0312f0 VZ |
40 | #ifndef WM_QUERYUISTATE |
41 | #define WM_QUERYUISTATE 0x0129 | |
1ca78aa1 JS |
42 | #endif |
43 | ||
90a752c2 JS |
44 | #ifndef WM_PRINTCLIENT |
45 | #define WM_PRINTCLIENT 0x318 | |
3bce6687 JS |
46 | #endif |
47 | ||
2f0312f0 VZ |
48 | #ifndef DT_HIDEPREFIX |
49 | #define DT_HIDEPREFIX 0x00100000 | |
50 | #endif | |
51 | ||
90a752c2 | 52 | // Needed by toplevel.cpp |
3ef092d6 VZ |
53 | #ifndef UIS_SET |
54 | #define UIS_SET 1 | |
55 | #define UIS_CLEAR 2 | |
90a752c2 | 56 | #define UIS_INITIALIZE 3 |
3bce6687 JS |
57 | #endif |
58 | ||
90a752c2 JS |
59 | #ifndef UISF_HIDEFOCUS |
60 | #define UISF_HIDEFOCUS 1 | |
7391216e VS |
61 | #endif |
62 | ||
90a752c2 JS |
63 | #ifndef UISF_HIDEACCEL |
64 | #define UISF_HIDEACCEL 2 | |
49bbd59b | 65 | #endif |
2b5f62a0 | 66 | |
90a752c2 JS |
67 | #ifndef OFN_EXPLORER |
68 | #define OFN_EXPLORER 0x00080000 | |
521e585f VZ |
69 | #endif |
70 | ||
90a752c2 JS |
71 | #ifndef OFN_ENABLESIZING |
72 | #define OFN_ENABLESIZING 0x00800000 | |
8318f30f CE |
73 | #endif |
74 | ||
90a752c2 JS |
75 | // Needed by window.cpp |
76 | #if wxUSE_MOUSEWHEEL | |
77 | #ifndef WM_MOUSEWHEEL | |
78 | #define WM_MOUSEWHEEL 0x020A | |
79 | #endif | |
80 | #ifndef WHEEL_DELTA | |
81 | #define WHEEL_DELTA 120 | |
82 | #endif | |
83 | #ifndef SPI_GETWHEELSCROLLLINES | |
84 | #define SPI_GETWHEELSCROLLLINES 104 | |
85 | #endif | |
86 | #endif // wxUSE_MOUSEWHEEL | |
8318f30f | 87 | |
90a752c2 JS |
88 | // Needed by window.cpp |
89 | #ifndef VK_OEM_1 | |
90 | #define VK_OEM_1 0xBA | |
91 | #define VK_OEM_2 0xBF | |
92 | #define VK_OEM_3 0xC0 | |
93 | #define VK_OEM_4 0xDB | |
94 | #define VK_OEM_5 0xDC | |
95 | #define VK_OEM_6 0xDD | |
96 | #define VK_OEM_7 0xDE | |
8318f30f CE |
97 | #endif |
98 | ||
90a752c2 JS |
99 | #ifndef VK_OEM_COMMA |
100 | #define VK_OEM_PLUS 0xBB | |
101 | #define VK_OEM_COMMA 0xBC | |
102 | #define VK_OEM_MINUS 0xBD | |
103 | #define VK_OEM_PERIOD 0xBE | |
dd54f5d3 | 104 | #endif |
7391216e | 105 | |
ddec9f1e JS |
106 | #ifndef SM_TABLETPC |
107 | #define SM_TABLETPC 86 | |
108 | #endif | |
109 | ||
110 | #ifndef INKEDIT_CLASS | |
111 | # define INKEDIT_CLASSW L"INKEDIT" | |
112 | # ifdef UNICODE | |
113 | # define INKEDIT_CLASS INKEDIT_CLASSW | |
114 | # else | |
115 | # define INKEDIT_CLASS "INKEDIT" | |
116 | # endif | |
117 | #endif | |
118 | ||
119 | #ifndef EM_SETINKINSERTMODE | |
120 | # define EM_SETINKINSERTMODE (WM_USER + 0x0204) | |
121 | #endif | |
122 | ||
123 | #ifndef EM_SETUSEMOUSEFORINPUT | |
124 | #define EM_SETUSEMOUSEFORINPUT (WM_USER + 0x224) | |
125 | #endif | |
126 | ||
e7b8da22 JS |
127 | #ifndef TPM_RECURSE |
128 | #define TPM_RECURSE 1 | |
129 | #endif | |
130 | ||
50f3c41d | 131 | |
801a5441 VZ |
132 | #ifndef WS_EX_LAYOUTRTL |
133 | #define WS_EX_LAYOUTRTL 0x00400000 | |
134 | #endif | |
135 | ||
2e992e06 VZ |
136 | #ifndef WS_EX_COMPOSITED |
137 | #define WS_EX_COMPOSITED 0x02000000L | |
138 | #endif | |
139 | ||
50f3c41d | 140 | #ifndef WS_EX_LAYERED |
801a5441 | 141 | #define WS_EX_LAYERED 0x00080000 |
50f3c41d RD |
142 | #endif |
143 | ||
144 | #ifndef LWA_ALPHA | |
145 | #define LWA_ALPHA 2 | |
146 | #endif | |
147 | ||
261fb041 WS |
148 | #ifndef QS_ALLPOSTMESSAGE |
149 | #define QS_ALLPOSTMESSAGE 0 | |
150 | #endif | |
151 | ||
a87f2821 MW |
152 | /* |
153 | * The following are required for VC++ 5 when the PSDK is not available. | |
154 | */ | |
155 | ||
156 | #if defined __VISUALC__ && __VISUALC__ <= 1100 | |
157 | ||
158 | #ifndef VER_NT_WORKSTATION | |
159 | ||
160 | typedef struct _OSVERSIONINFOEXA { | |
161 | DWORD dwOSVersionInfoSize; | |
162 | DWORD dwMajorVersion; | |
163 | DWORD dwMinorVersion; | |
164 | DWORD dwBuildNumber; | |
165 | DWORD dwPlatformId; | |
166 | CHAR szCSDVersion[128]; | |
167 | WORD wServicePackMajor; | |
168 | WORD wServicePackMinor; | |
169 | WORD wSuiteMask; | |
170 | BYTE wProductType; | |
171 | BYTE wReserved; | |
172 | } OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA; | |
173 | typedef struct _OSVERSIONINFOEXW { | |
174 | DWORD dwOSVersionInfoSize; | |
175 | DWORD dwMajorVersion; | |
176 | DWORD dwMinorVersion; | |
177 | DWORD dwBuildNumber; | |
178 | DWORD dwPlatformId; | |
179 | WCHAR szCSDVersion[128]; | |
180 | WORD wServicePackMajor; | |
181 | WORD wServicePackMinor; | |
182 | WORD wSuiteMask; | |
183 | BYTE wProductType; | |
184 | BYTE wReserved; | |
185 | } OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW; | |
186 | ||
187 | #ifdef UNICODE | |
188 | typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; | |
189 | typedef OSVERSIONINFOEXW OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; | |
190 | #else | |
191 | typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO; | |
192 | typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX; | |
193 | #endif | |
194 | ||
195 | #endif // defined VER_NT_WORKSTATION | |
196 | ||
197 | #ifndef CP_SYMBOL | |
198 | #define CP_SYMBOL 42 | |
199 | #endif | |
200 | ||
201 | // NMLVCUSTOMDRAW originally didn't have the iSubItem member. It was added | |
202 | // with IE4, as was IPN_FIRST which is used as a test :-(. | |
203 | // | |
1b88201f | 204 | #ifndef IPN_FIRST |
a87f2821 MW |
205 | |
206 | typedef struct wxtagNMLVCUSTOMDRAW_ { | |
207 | NMCUSTOMDRAW nmcd; | |
208 | COLORREF clrText; | |
209 | COLORREF clrTextBk; | |
210 | int iSubItem; | |
211 | } wxNMLVCUSTOMDRAW_, *wxLPNMLVCUSTOMDRAW_; | |
212 | ||
213 | #define NMLVCUSTOMDRAW wxNMLVCUSTOMDRAW_ | |
214 | #define LPNMLVCUSTOMDRAW wxLPNMLVCUSTOMDRAW_ | |
215 | ||
1b88201f | 216 | #endif // defined IPN_FIRST |
a87f2821 MW |
217 | |
218 | #endif // defined __VISUALC__ && __VISUALC__ <= 1100 | |
219 | ||
33f4afdb VZ |
220 | // ---------------------------------------------------------------------------- |
221 | // menu stuff | |
222 | // ---------------------------------------------------------------------------- | |
223 | ||
224 | #ifndef MIIM_BITMAP | |
225 | #define MIIM_STRING 0x00000040 | |
226 | #define MIIM_BITMAP 0x00000080 | |
227 | #define MIIM_FTYPE 0x00000100 | |
228 | #define HBMMENU_CALLBACK ((HBITMAP) -1) | |
229 | ||
230 | typedef struct tagMENUINFO | |
231 | { | |
232 | DWORD cbSize; | |
233 | DWORD fMask; | |
234 | DWORD dwStyle; | |
235 | UINT cyMax; | |
236 | HBRUSH hbrBack; | |
237 | DWORD dwContextHelpID; | |
238 | DWORD dwMenuData; | |
239 | } MENUINFO, FAR *LPMENUINFO; | |
240 | #endif // MIIM_BITMAP &c | |
241 | ||
e2478fde | 242 | // ---------------------------------------------------------------------------- |
659d0ee8 VZ |
243 | // definitions related to ListView and Header common controls, needed by |
244 | // msw/listctrl.cpp and msw/headerctrl.cpp | |
e2478fde VZ |
245 | // ---------------------------------------------------------------------------- |
246 | ||
659d0ee8 VZ |
247 | #ifndef I_IMAGENONE |
248 | #define I_IMAGENONE (-2) | |
249 | #endif | |
250 | ||
aec26358 WS |
251 | #ifndef LVS_EX_FULLROWSELECT |
252 | #define LVS_EX_FULLROWSELECT 0x00000020 | |
253 | #endif | |
254 | ||
2036bdd3 VZ |
255 | // LVS_EX_LABELTIP is not supported by Windows CE, don't define it there |
256 | #if !defined(LVS_EX_LABELTIP) && !defined(__WXWINCE__) | |
90a752c2 | 257 | #define LVS_EX_LABELTIP 0x00004000 |
e2478fde VZ |
258 | #endif |
259 | ||
05886ed3 RD |
260 | #ifndef LVS_EX_SUBITEMIMAGES |
261 | #define LVS_EX_SUBITEMIMAGES 0x00000002 | |
262 | #endif | |
263 | ||
06525673 JS |
264 | #ifndef HDN_GETDISPINFOW |
265 | #define HDN_GETDISPINFOW (HDN_FIRST-29) | |
266 | #endif | |
267 | ||
a58c5d3e VZ |
268 | #ifndef HDS_HOTTRACK |
269 | #define HDS_HOTTRACK 4 | |
270 | #endif | |
8eb4d1a1 VZ |
271 | #ifndef HDS_FLAT |
272 | #define HDS_FLAT 0x0200 | |
273 | #endif | |
a58c5d3e | 274 | |
9e06a15f VZ |
275 | #ifndef HDF_SORTUP |
276 | #define HDF_SORTUP 0x0400 | |
277 | #define HDF_SORTDOWN 0x0200 | |
278 | #endif | |
279 | ||
90a752c2 | 280 | /* |
c6c2445d JS |
281 | * In addition to the above, the following are required for several compilers. |
282 | */ | |
283 | ||
284 | #if !defined(CCS_VERT) | |
285 | #define CCS_VERT 0x00000080L | |
286 | #endif | |
287 | ||
664f15dc JS |
288 | #if !defined(CCS_RIGHT) |
289 | #define CCS_RIGHT (CCS_VERT|CCS_BOTTOM) | |
290 | #endif | |
291 | ||
c6c2445d JS |
292 | #if !defined(TB_SETDISABLEDIMAGELIST) |
293 | #define TB_SETDISABLEDIMAGELIST (WM_USER + 54) | |
294 | #endif // !defined(TB_SETDISABLEDIMAGELIST) | |
295 | ||
296 | #ifndef CFM_BACKCOLOR | |
297 | #define CFM_BACKCOLOR 0x04000000 | |
298 | #endif | |
299 | ||
8b5d41cc MW |
300 | #ifndef HANGUL_CHARSET |
301 | #define HANGUL_CHARSET 129 | |
302 | #endif | |
303 | ||
304 | #ifndef CCM_SETUNICODEFORMAT | |
305 | #define CCM_SETUNICODEFORMAT 8197 | |
306 | #endif | |
307 | ||
308 | // ---------------------------------------------------------------------------- | |
309 | // Tree control | |
310 | // ---------------------------------------------------------------------------- | |
311 | ||
312 | #ifndef TV_FIRST | |
313 | #define TV_FIRST 0x1100 | |
314 | #endif | |
315 | ||
316 | #ifndef TVS_FULLROWSELECT | |
317 | #define TVS_FULLROWSELECT 0x1000 | |
318 | #endif | |
319 | ||
320 | #ifndef TVM_SETBKCOLOR | |
321 | #define TVM_SETBKCOLOR (TV_FIRST + 29) | |
322 | #define TVM_SETTEXTCOLOR (TV_FIRST + 30) | |
323 | #endif | |
324 | ||
c6c2445d JS |
325 | /* |
326 | * The following are required for BC++ 5.5 (none at present.) | |
90a752c2 | 327 | */ |
e2478fde | 328 | |
90a752c2 | 329 | /* |
c6c2445d | 330 | * The following are specifically required for Digital Mars C++ |
90a752c2 | 331 | */ |
e2478fde | 332 | |
90a752c2 | 333 | #ifdef __DMC__ |
e2478fde | 334 | |
1c7ae45a | 335 | #ifndef VER_NT_WORKSTATION |
4aa14001 WS |
336 | typedef struct _OSVERSIONINFOEX { |
337 | DWORD dwOSVersionInfoSize; | |
338 | DWORD dwMajorVersion; | |
339 | DWORD dwMinorVersion; | |
340 | DWORD dwBuildNumber; | |
341 | DWORD dwPlatformId; | |
342 | TCHAR szCSDVersion[ 128 ]; | |
343 | WORD wServicePackMajor; | |
344 | WORD wServicePackMinor; | |
345 | WORD wSuiteMask; | |
346 | BYTE wProductType; | |
347 | BYTE wReserved; | |
348 | } OSVERSIONINFOEX; | |
1c7ae45a | 349 | #endif // !defined(VER_NT_WORKSTATION) |
4aa14001 WS |
350 | |
351 | #ifndef _TrackMouseEvent | |
352 | #define _TrackMouseEvent TrackMouseEvent | |
e2478fde VZ |
353 | #endif |
354 | ||
90a752c2 JS |
355 | #ifndef LVM_SETEXTENDEDLISTVIEWSTYLE |
356 | #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54) | |
e2478fde VZ |
357 | #endif |
358 | ||
a6f7daee WS |
359 | #ifndef LVM_GETSUBITEMRECT |
360 | #define LVM_GETSUBITEMRECT (0x1000 + 56) | |
361 | #endif | |
362 | ||
90a752c2 JS |
363 | #ifndef LVCF_IMAGE |
364 | #define LVCF_IMAGE 0x0010 | |
e2478fde VZ |
365 | #endif |
366 | ||
90a752c2 JS |
367 | #ifndef Header_GetItemRect |
368 | #define Header_GetItemRect(w,i,r) \ | |
369 | (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r)) | |
3ec4107d MB |
370 | #endif |
371 | ||
90a752c2 JS |
372 | #ifndef HDM_GETITEMRECT |
373 | #define HDM_GETITEMRECT (HDM_FIRST+7) | |
3ec4107d MB |
374 | #endif |
375 | ||
90a752c2 JS |
376 | #ifndef ListView_GetHeader |
377 | #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0) | |
3ec4107d MB |
378 | #endif |
379 | ||
a6f7daee WS |
380 | #ifndef ListView_GetSubItemRect |
381 | #define ListView_GetSubItemRect(w, i, s, c, p) (HWND)SendMessage(w,LVM_GETSUBITEMRECT,i, ((p) ? ((((LPRECT)(p))->top = s), (((LPRECT)(p))->left = c), (LPARAM)(p)) : (LPARAM)(LPRECT)NULL)) | |
382 | #endif | |
383 | ||
90a752c2 JS |
384 | #ifndef LVM_GETHEADER |
385 | #define LVM_GETHEADER (LVM_FIRST+31) | |
3ec4107d MB |
386 | #endif |
387 | ||
e229d82e VS |
388 | #ifndef HDLAYOUT |
389 | #define HDLAYOUT HD_LAYOUT | |
390 | #endif | |
391 | ||
392 | #ifndef HDITEM | |
393 | #define HDITEM HD_ITEM | |
394 | #endif | |
395 | ||
396 | #ifndef NMHEADER | |
397 | #define NMHEADER HD_NOTIFY | |
398 | #endif | |
399 | ||
56873923 VZ |
400 | #ifndef HDS_DRAGDROP |
401 | #define HDS_DRAGDROP 0x0040 | |
402 | #endif | |
e229d82e | 403 | #ifndef HDS_FULLDRAG |
56873923 | 404 | #define HDS_FULLDRAG 0x0080 |
e229d82e VS |
405 | #endif |
406 | ||
56873923 | 407 | |
e229d82e VS |
408 | #ifndef HDN_BEGINDRAG |
409 | #define HDN_BEGINDRAG (HDN_FIRST - 11) | |
410 | #endif | |
411 | ||
412 | #ifndef HDN_ENDDRAG | |
413 | #define HDN_ENDDRAG (HDN_FIRST - 10) | |
414 | #endif | |
415 | ||
90a752c2 JS |
416 | #ifndef LVSICF_NOSCROLL |
417 | #define LVSICF_NOINVALIDATEALL 0x0001 | |
418 | #define LVSICF_NOSCROLL 0x0002 | |
3ec4107d MB |
419 | #endif |
420 | ||
4aa14001 WS |
421 | #ifndef CP_SYMBOL |
422 | #define CP_SYMBOL 42 | |
423 | #endif | |
424 | ||
3ea19afd WS |
425 | // ---------------------------------------------------------------------------- |
426 | // wxDisplay | |
427 | // ---------------------------------------------------------------------------- | |
428 | ||
429 | // The windows headers with Digital Mars lack some typedefs. | |
430 | // typedef them as my_XXX and then #define to rename to XXX in case | |
431 | // a newer version of Digital Mars fixes the headers | |
432 | // (or up to date PSDK is in use with older version) | |
433 | // also we use any required definition (MONITOR_DEFAULTTONULL) to recognize | |
434 | // whether whole missing block needs to be included | |
435 | ||
436 | #ifndef MONITOR_DEFAULTTONULL | |
437 | ||
438 | #define HMONITOR_DECLARED | |
439 | DECLARE_HANDLE(HMONITOR); | |
440 | typedef BOOL(CALLBACK* my_MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM); | |
441 | #define MONITORENUMPROC my_MONITORENUMPROC | |
442 | typedef struct my_tagMONITORINFO { | |
443 | DWORD cbSize; | |
444 | RECT rcMonitor; | |
445 | RECT rcWork; | |
446 | DWORD dwFlags; | |
447 | } my_MONITORINFO,*my_LPMONITORINFO; | |
448 | #define MONITORINFO my_MONITORINFO | |
449 | #define LPMONITORINFO my_LPMONITORINFO | |
450 | ||
451 | typedef struct my_MONITORINFOEX : public my_tagMONITORINFO | |
452 | { | |
453 | TCHAR szDevice[CCHDEVICENAME]; | |
454 | } my_MONITORINFOEX, *my_LPMONITORINFOEX; | |
455 | #define MONITORINFOEX my_MONITORINFOEX | |
456 | #define LPMONITORINFOEX my_LPMONITORINFOEX | |
457 | ||
458 | #ifndef MONITOR_DEFAULTTONULL | |
459 | #define MONITOR_DEFAULTTONULL 0 | |
460 | #endif // MONITOR_DEFAULTTONULL | |
461 | ||
462 | #ifndef MONITORINFOF_PRIMARY | |
463 | #define MONITORINFOF_PRIMARY 1 | |
464 | #endif // MONITORINFOF_PRIMARY | |
465 | ||
466 | #ifndef DDENUM_ATTACHEDSECONDARYDEVICES | |
467 | #define DDENUM_ATTACHEDSECONDARYDEVICES 1 | |
468 | #endif | |
469 | ||
470 | #endif // MONITOR_DEFAULTTONULL | |
471 | ||
05e3a383 VZ |
472 | // ---------------------------------------------------------------------------- |
473 | // Tree control | |
474 | // ---------------------------------------------------------------------------- | |
475 | ||
476 | #ifndef TVIS_FOCUSED | |
477 | #define TVIS_FOCUSED 0x0001 | |
478 | #endif | |
479 | ||
05e3a383 VZ |
480 | #ifndef TVS_CHECKBOXES |
481 | #define TVS_CHECKBOXES 0x0100 | |
482 | #endif | |
483 | ||
03de0ad4 WS |
484 | #ifndef TVITEM |
485 | #define TVITEM TV_ITEM | |
486 | #endif | |
487 | ||
446ea107 | 488 | #endif |
90a752c2 | 489 | // DMC++ |
446ea107 | 490 | |
90a752c2 | 491 | /* |
c6c2445d | 492 | * The following are specifically required for OpenWatcom C++ (none at present) |
90a752c2 | 493 | */ |
446ea107 | 494 | |
90a752c2 | 495 | #if defined(__WATCOMC__) |
4a6619bb | 496 | #endif |
ae54422d | 497 | |
90a752c2 | 498 | /* |
c6c2445d | 499 | * The following are specifically required for MinGW (none at present) |
90a752c2 | 500 | */ |
23fbd31a | 501 | |
90a752c2 | 502 | #if defined (__MINGW32__) |
aad7e71c JS |
503 | |
504 | #if !wxCHECK_W32API_VERSION(3,1) | |
505 | ||
506 | #include <windows.h> | |
507 | #include "wx/msw/winundef.h" | |
508 | ||
509 | typedef struct | |
510 | { | |
511 | RECT rgrc[3]; | |
512 | WINDOWPOS *lppos; | |
513 | } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS; | |
514 | ||
515 | #endif | |
516 | ||
1d7d04d7 JS |
517 | #endif |
518 | ||
a1a17906 SL |
519 | //Various defines that will be needed by mingw and possibly VC++6 |
520 | //Used by the webview library | |
1d7d04d7 JS |
521 | #ifdef __MINGW32__ |
522 | typedef enum CommandStateChangeConstants { | |
523 | CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF, | |
524 | CSC_NAVIGATEFORWARD = 0x1, | |
525 | CSC_NAVIGATEBACK = 0x2 | |
526 | } CommandStateChangeConstants; | |
a1a17906 | 527 | #endif |
1d7d04d7 | 528 | |
a1a17906 | 529 | #ifndef DISPID_COMMANDSTATECHANGE |
1d7d04d7 | 530 | #define DISPID_COMMANDSTATECHANGE 105 |
a1a17906 SL |
531 | #endif |
532 | ||
533 | #ifndef DISPID_NAVIGATECOMPLETE2 | |
1d7d04d7 | 534 | #define DISPID_NAVIGATECOMPLETE2 252 |
a1a17906 SL |
535 | #endif |
536 | ||
537 | #ifndef DISPID_NAVIGATEERROR | |
1d7d04d7 | 538 | #define DISPID_NAVIGATEERROR 271 |
a1a17906 SL |
539 | #endif |
540 | ||
541 | #ifndef DISPID_NEWWINDOW3 | |
1d7d04d7 | 542 | #define DISPID_NEWWINDOW3 273 |
a1a17906 SL |
543 | #endif |
544 | ||
545 | #ifndef INET_E_ERROR_FIRST | |
1d7d04d7 | 546 | #define INET_E_ERROR_FIRST 0x800C0002L |
a1a17906 SL |
547 | #endif |
548 | ||
549 | #ifndef INET_E_INVALID_URL | |
1d7d04d7 | 550 | #define INET_E_INVALID_URL 0x800C0002L |
a1a17906 SL |
551 | #endif |
552 | ||
553 | #ifndef INET_E_NO_SESSION | |
1d7d04d7 | 554 | #define INET_E_NO_SESSION 0x800C0003L |
a1a17906 SL |
555 | #endif |
556 | ||
557 | #ifndef INET_E_CANNOT_CONNECT | |
1d7d04d7 | 558 | #define INET_E_CANNOT_CONNECT 0x800C0004L |
a1a17906 SL |
559 | #endif |
560 | ||
561 | #ifndef INET_E_RESOURCE_NOT_FOUND | |
1d7d04d7 | 562 | #define INET_E_RESOURCE_NOT_FOUND 0x800C0005L |
a1a17906 SL |
563 | #endif |
564 | ||
565 | #ifndef INET_E_OBJECT_NOT_FOUND | |
1d7d04d7 | 566 | #define INET_E_OBJECT_NOT_FOUND 0x800C0006L |
a1a17906 SL |
567 | #endif |
568 | ||
569 | #ifndef INET_E_DATA_NOT_AVAILABLE | |
1d7d04d7 | 570 | #define INET_E_DATA_NOT_AVAILABLE 0x800C0007L |
a1a17906 SL |
571 | #endif |
572 | ||
573 | #ifndef INET_E_DOWNLOAD_FAILURE | |
1d7d04d7 | 574 | #define INET_E_DOWNLOAD_FAILURE 0x800C0008L |
a1a17906 SL |
575 | #endif |
576 | ||
577 | #ifndef INET_E_AUTHENTICATION_REQUIRED | |
1d7d04d7 | 578 | #define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L |
a1a17906 SL |
579 | #endif |
580 | ||
581 | #ifndef INET_E_NO_VALID_MEDIA | |
1d7d04d7 | 582 | #define INET_E_NO_VALID_MEDIA 0x800C000AL |
a1a17906 SL |
583 | #endif |
584 | ||
585 | #ifndef INET_E_CONNECTION_TIMEOUT | |
1d7d04d7 | 586 | #define INET_E_CONNECTION_TIMEOUT 0x800C000BL |
a1a17906 SL |
587 | #endif |
588 | ||
589 | #ifndef INET_E_INVALID_REQUEST | |
1d7d04d7 | 590 | #define INET_E_INVALID_REQUEST 0x800C000CL |
a1a17906 SL |
591 | #endif |
592 | ||
593 | #ifndef INET_E_UNKNOWN_PROTOCOL | |
1d7d04d7 | 594 | #define INET_E_UNKNOWN_PROTOCOL 0x800C000DL |
a1a17906 SL |
595 | #endif |
596 | ||
597 | #ifndef INET_E_SECURITY_PROBLEM | |
1d7d04d7 | 598 | #define INET_E_SECURITY_PROBLEM 0x800C000EL |
a1a17906 SL |
599 | #endif |
600 | ||
601 | #ifndef INET_E_CANNOT_LOAD_DATA | |
1d7d04d7 | 602 | #define INET_E_CANNOT_LOAD_DATA 0x800C000FL |
a1a17906 SL |
603 | #endif |
604 | ||
605 | #ifndef INET_E_CANNOT_INSTANTIATE_OBJECT | |
1d7d04d7 | 606 | #define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L |
a1a17906 SL |
607 | #endif |
608 | ||
609 | #ifndef INET_E_QUERYOPTION_UNKNOWN | |
1d7d04d7 | 610 | #define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L |
a1a17906 SL |
611 | #endif |
612 | ||
613 | #ifndef INET_E_REDIRECT_FAILED | |
1d7d04d7 | 614 | #define INET_E_REDIRECT_FAILED 0x800C0014L |
a1a17906 SL |
615 | #endif |
616 | ||
617 | #ifndef INET_E_REDIRECT_TO_DIR | |
1d7d04d7 | 618 | #define INET_E_REDIRECT_TO_DIR 0x800C0015L |
a1a17906 SL |
619 | #endif |
620 | ||
621 | #ifndef INET_E_CANNOT_LOCK_REQUEST | |
1d7d04d7 | 622 | #define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L |
a1a17906 SL |
623 | #endif |
624 | ||
625 | #ifndef INET_E_USE_EXTEND_BINDING | |
1d7d04d7 | 626 | #define INET_E_USE_EXTEND_BINDING 0x800C0017L |
a1a17906 SL |
627 | #endif |
628 | ||
629 | #ifndef INET_E_TERMINATED_BIND | |
1d7d04d7 | 630 | #define INET_E_TERMINATED_BIND 0x800C0018L |
a1a17906 SL |
631 | #endif |
632 | ||
633 | #ifndef INET_E_INVALID_CERTIFICATE | |
1d7d04d7 | 634 | #define INET_E_INVALID_CERTIFICATE 0x800C0019L |
a1a17906 SL |
635 | #endif |
636 | ||
637 | #ifndef INET_E_CODE_DOWNLOAD_DECLINED | |
1d7d04d7 | 638 | #define INET_E_CODE_DOWNLOAD_DECLINED 0x800C0100L |
a1a17906 | 639 | #endif |
1d7d04d7 | 640 | |
a1a17906 SL |
641 | #ifndef INET_E_RESULT_DISPATCHED |
642 | #define INET_E_RESULT_DISPATCHED 0x800C0200L | |
1d7d04d7 JS |
643 | #endif |
644 | ||
a1a17906 SL |
645 | #ifndef INET_E_CANNOT_REPLACE_SFP_FILE |
646 | #define INET_E_CANNOT_REPLACE_SFP_FILE 0x800C0300L | |
1d7d04d7 JS |
647 | #endif |
648 | ||
649 | #ifndef INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY | |
650 | #define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY 0x800C0500L | |
651 | #endif | |
652 | ||
653 | #ifndef INET_E_CODE_INSTALL_SUPPRESSED | |
654 | #define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L | |
655 | #endif | |
656 | ||
ad410224 SL |
657 | //We need to check if we are using MinGW which doesn't inlcude the urlmon |
658 | //defintions as opposed to MinGW-64 which does | |
659 | ||
660 | #ifdef __MINGW32__ | |
661 | #include <_mingw.h> | |
662 | #endif | |
663 | ||
664 | //Definitions from w64 mingw-runtime package, in the public domain | |
665 | //Used by webview | |
666 | #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) | |
667 | ||
a1a17906 SL |
668 | #define REFRESH_NORMAL 0 |
669 | #define REFRESH_COMPLETELY 3 | |
670 | ||
ad410224 SL |
671 | EXTERN_C const IID CLSID_FileProtocol; |
672 | ||
673 | DEFINE_GUID(IID_IInternetProtocolRoot,0x79eac9e3,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb); | |
674 | DEFINE_GUID(IID_IInternetProtocol,0x79eac9e4,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb); | |
675 | ||
676 | typedef enum __MIDL_IBindStatusCallback_0006 | |
677 | { | |
678 | BSCF_FIRSTDATANOTIFICATION = 0x1, | |
679 | BSCF_INTERMEDIATEDATANOTIFICATION = 0x2, | |
680 | BSCF_LASTDATANOTIFICATION = 0x4, | |
681 | BSCF_DATAFULLYAVAILABLE = 0x8, | |
682 | BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10 | |
683 | } BSCF; | |
684 | ||
685 | typedef struct _tagPROTOCOLDATA | |
686 | { | |
687 | DWORD grfFlags; | |
688 | DWORD dwState; | |
689 | LPVOID pData; | |
690 | ULONG cbData; | |
691 | } PROTOCOLDATA; | |
692 | ||
693 | typedef struct _tagBINDINFO | |
694 | { | |
695 | ULONG cbSize; | |
696 | LPWSTR szExtraInfo; | |
697 | STGMEDIUM stgmedData; | |
698 | DWORD grfBindInfoF; | |
699 | DWORD dwBindVerb; | |
700 | LPWSTR szCustomVerb; | |
701 | DWORD cbstgmedData; | |
702 | DWORD dwOptions; | |
703 | DWORD dwOptionsFlags; | |
704 | DWORD dwCodePage; | |
705 | SECURITY_ATTRIBUTES securityAttributes; | |
706 | IID iid; | |
707 | IUnknown *pUnk; | |
708 | DWORD dwReserved; | |
709 | } BINDINFO; | |
710 | ||
711 | ||
712 | struct IInternetBindInfo : public IUnknown | |
713 | { | |
714 | public: | |
715 | virtual HRESULT WINAPI GetBindInfo(DWORD *grfBINDF,BINDINFO *pbindinfo) = 0; | |
716 | virtual HRESULT WINAPI GetBindString(ULONG ulStringType,LPOLESTR *ppwzStr, | |
717 | ULONG cEl,ULONG *pcElFetched) = 0; | |
718 | }; | |
719 | ||
720 | struct IInternetProtocolSink : public IUnknown | |
721 | { | |
722 | public: | |
723 | virtual HRESULT WINAPI Switch(PROTOCOLDATA *pProtocolData) = 0; | |
724 | virtual HRESULT WINAPI ReportProgress(ULONG ulStatusCode, | |
725 | LPCWSTR szStatusText) = 0; | |
726 | virtual HRESULT WINAPI ReportData(DWORD grfBSCF,ULONG ulProgress, | |
727 | ULONG ulProgressMax) = 0; | |
728 | virtual HRESULT WINAPI ReportResult(HRESULT hrResult,DWORD dwError, | |
729 | LPCWSTR szResult) = 0; | |
730 | }; | |
731 | ||
732 | struct IInternetProtocolRoot : public IUnknown | |
733 | { | |
734 | public: | |
735 | virtual HRESULT WINAPI Start(LPCWSTR szUrl,IInternetProtocolSink *pOIProtSink, | |
736 | IInternetBindInfo *pOIBindInfo,DWORD grfPI, | |
737 | HANDLE_PTR dwReserved) = 0; | |
738 | virtual HRESULT WINAPI Continue(PROTOCOLDATA *pProtocolData) = 0; | |
739 | virtual HRESULT WINAPI Abort(HRESULT hrReason,DWORD dwOptions) = 0; | |
740 | virtual HRESULT WINAPI Terminate(DWORD dwOptions) = 0; | |
741 | virtual HRESULT WINAPI Suspend(void) = 0; | |
742 | virtual HRESULT WINAPI Resume(void) = 0; | |
743 | }; | |
744 | ||
745 | struct IInternetProtocol : public IInternetProtocolRoot | |
746 | { | |
747 | public: | |
748 | virtual HRESULT WINAPI Read(void *pv,ULONG cb,ULONG *pcbRead) = 0; | |
749 | virtual HRESULT WINAPI Seek(LARGE_INTEGER dlibMove,DWORD dwOrigin, | |
750 | ULARGE_INTEGER *plibNewPosition) = 0; | |
751 | virtual HRESULT WINAPI LockRequest(DWORD dwOptions) = 0; | |
752 | virtual HRESULT WINAPI UnlockRequest(void) = 0; | |
753 | }; | |
754 | ||
755 | struct IInternetSession : public IUnknown | |
756 | { | |
757 | public: | |
758 | virtual HRESULT WINAPI RegisterNameSpace(IClassFactory *pCF,REFCLSID rclsid, | |
759 | LPCWSTR pwzProtocol, | |
760 | ULONG cPatterns, | |
761 | const LPCWSTR *ppwzPatterns, | |
762 | DWORD dwReserved) = 0; | |
763 | virtual HRESULT WINAPI UnregisterNameSpace(IClassFactory *pCF, | |
764 | LPCWSTR pszProtocol) = 0; | |
765 | virtual HRESULT WINAPI RegisterMimeFilter(IClassFactory *pCF, | |
766 | REFCLSID rclsid, | |
767 | LPCWSTR pwzType) = 0; | |
768 | virtual HRESULT WINAPI UnregisterMimeFilter(IClassFactory *pCF, | |
769 | LPCWSTR pwzType) = 0; | |
770 | virtual HRESULT WINAPI CreateBinding(LPBC pBC,LPCWSTR szUrl, | |
771 | IUnknown *pUnkOuter,IUnknown **ppUnk, | |
772 | IInternetProtocol **ppOInetProt, | |
773 | DWORD dwOption) = 0; | |
774 | virtual HRESULT WINAPI SetSessionOption(DWORD dwOption,LPVOID pBuffer, | |
775 | DWORD dwBufferLength, | |
776 | DWORD dwReserved) = 0; | |
777 | virtual HRESULT WINAPI GetSessionOption(DWORD dwOption,LPVOID pBuffer, | |
778 | DWORD *pdwBufferLength, | |
779 | DWORD dwReserved) = 0; | |
780 | }; | |
781 | ||
41b8fe99 WS |
782 | #endif |
783 | ||
90a752c2 JS |
784 | /* |
785 | * In addition to the declarations for VC++, the following are required for WinCE | |
786 | */ | |
1a838ff5 | 787 | |
fe5c9b3e VZ |
788 | #ifdef __WXWINCE__ |
789 | #include "wx/msw/wince/missing.h" | |
d61c1a6f JS |
790 | #endif |
791 | ||
24aab8e8 MW |
792 | /* |
793 | * The following are specifically required for Wine | |
794 | */ | |
795 | ||
796 | #ifdef __WINE__ | |
797 | #ifndef ENUM_CURRENT_SETTINGS | |
798 | #define ENUM_CURRENT_SETTINGS ((DWORD)-1) | |
799 | #endif | |
800 | #ifndef BROADCAST_QUERY_DENY | |
801 | #define BROADCAST_QUERY_DENY 1112363332 | |
802 | #endif | |
803 | #endif // defined __WINE__ | |
804 | ||
6235846c VZ |
805 | #ifndef INVALID_FILE_ATTRIBUTES |
806 | #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) | |
807 | #endif | |
808 | ||
7391216e VS |
809 | #endif |
810 | // _WX_MISSING_H_ |