]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: defs.h | |
3 | // Purpose: Declarations/definitions common to all wx source files | |
4 | // Author: Julian Smart and others | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) | |
3f4a0c5b | 9 | // Licence: wxWindows licence |
c801d85f KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
34138703 JS |
12 | #ifndef _WX_DEFS_H_ |
13 | #define _WX_DEFS_H_ | |
c801d85f KB |
14 | |
15 | #ifdef __GNUG__ | |
16 | #pragma interface "defs.h" | |
17 | #endif | |
18 | ||
c801d85f KB |
19 | #include <stddef.h> |
20 | ||
21 | #include "wx/setup.h" | |
22 | #include "wx/version.h" | |
23 | ||
3f4a0c5b VZ |
24 | // ---------------------------------------------------------------------------- |
25 | // compiler and OS identification | |
26 | // ---------------------------------------------------------------------------- | |
c801d85f | 27 | |
3f4a0c5b VZ |
28 | // OS |
29 | #if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || defined(__unix__) | |
30 | #ifndef __UNIX__ | |
31 | #define __UNIX__ | |
32 | #endif // Unix | |
33 | ||
34 | // Helps SGI compilation, apparently | |
35 | #ifdef __SGI__ | |
36 | #ifdef __GNUG__ | |
37 | #define __need_wchar_t | |
38 | #else // !gcc | |
39 | // Note I use the term __SGI_CC__ for both cc and CC, its not a good | |
40 | // idea to mix gcc and cc/CC, the name mangling is different | |
41 | #define __SGI_CC__ | |
42 | #endif // gcc/!gcc | |
43 | #endif // SGI | |
44 | ||
45 | #if defined(sun) || defined(__SUN__) | |
46 | #ifndef __GNUG__ | |
47 | #ifndef __SUNCC__ | |
48 | #define __SUNCC__ | |
49 | #endif // Sun CC | |
50 | #endif | |
51 | #endif // Sun | |
8be97d65 SC |
52 | #elif defined(applec) || defined(THINK_C) || ( defined( __MWERKS__ ) && !defined(__INTEL__) ) |
53 | // MacOS | |
3f4a0c5b VZ |
54 | #else // Windows |
55 | #ifndef __WINDOWS__ | |
56 | #define __WINDOWS__ | |
57 | #endif // Windows | |
58 | ||
59 | // define another standard symbol for Microsoft Visual C++: the standard one | |
60 | // (_MSC_VER) is also defined by Metrowerks compiler | |
61 | #if defined(_MSC_VER) && !defined(__MWERKS__) | |
858f7d66 | 62 | #define __VISUALC__ _MSC_VER |
3f4a0c5b VZ |
63 | #elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__) |
64 | #define __BORLANDC__ | |
65 | #elif defined(__WATCOMC__) | |
66 | //#define __WATCOMC__ | |
67 | #elif defined(__SC__) | |
68 | #define __SYMANTECC__ | |
69 | #endif // compiler | |
70 | #endif // OS | |
5dcf05ae | 71 | |
fd3f686c | 72 | // suppress some Visual C++ warnings |
3f4a0c5b | 73 | #ifdef __VISUALC__ |
fd3f686c VZ |
74 | # pragma warning(disable:4244) // cobversion from double to float |
75 | # pragma warning(disable:4100) // unreferenced formal parameter | |
c801d85f KB |
76 | #endif |
77 | ||
a3ef5bf5 JS |
78 | // suppress some Salford C++ warnings |
79 | #ifdef __SALFORDC__ | |
80 | # pragma suppress 353 // Possible nested comments | |
81 | # pragma suppress 593 // Define not used | |
82 | # pragma suppress 61 // enum has no name (doesn't suppress!) | |
83 | # pragma suppress 106 // unnamed, unused parameter | |
84 | # pragma suppress 571 // Virtual function hiding | |
85 | #endif | |
86 | ||
c801d85f KB |
87 | ////////////////////////////////////////////////////////////////////////////////// |
88 | // Currently Only MS-Windows/NT, XView and Motif are supported | |
89 | // | |
2049ba38 KB |
90 | #if defined(__HPUX__) && !defined(__WXMOTIF__) |
91 | # define __WXMOTIF__ | |
c801d85f | 92 | #endif |
2049ba38 | 93 | #if defined(__WXMOTIF__) |
c801d85f | 94 | # define __X__ |
c801d85f KB |
95 | #endif |
96 | ||
16ee7f42 | 97 | #ifdef __WXMSW__ |
c801d85f | 98 | // wxWindows checks for WIN32, not __WIN32__ |
34138703 | 99 | #if ((defined(WIN32) || defined(__NT__)) && !defined(__WIN32__) && !defined(__WXSTUBS__)) |
c801d85f KB |
100 | #define __WIN32__ |
101 | #endif | |
102 | ||
103 | #ifndef __WIN32__ | |
104 | #define __WIN16__ | |
105 | #endif | |
106 | ||
107 | #if !defined(__WIN95__) && (WINVER >= 0x0400) | |
108 | #define __WIN95__ | |
109 | #endif | |
110 | ||
57c208c5 JS |
111 | #if defined(TWIN32) && !defined(__TWIN32__) |
112 | #define __TWIN32__ | |
113 | #endif | |
114 | ||
16ee7f42 VZ |
115 | #endif // wxMSW |
116 | ||
c801d85f | 117 | // Make sure the environment is set correctly |
2049ba38 | 118 | #if defined(__WXMSW__) && defined(__X__) |
c801d85f | 119 | # error "Target can't be both X and Windows" |
b4e76e0d | 120 | #elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \ |
34138703 JS |
121 | !defined(__WXMAC__) && !defined(__X__) && !defined(__WXQT__) && !defined(__WXSTUBS__) |
122 | #error "No Target! Use -D[__WXMOTIF__|__WXGTK__|__WXMSW__|__WXMAC__|__WXQT__|__WXSTUBS__]" | |
c801d85f KB |
123 | #endif |
124 | ||
34138703 | 125 | #if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXQT__) || defined(__WXSTUBS__) |
c801d85f KB |
126 | |
127 | // Bool is now obsolete, use bool instead | |
128 | // typedef int Bool; | |
129 | ||
130 | #ifndef TRUE | |
131 | # define TRUE 1 | |
132 | # define FALSE 0 | |
133 | # define Bool_DEFINED | |
134 | #endif | |
135 | ||
2049ba38 | 136 | #elif defined(__WXMSW__) |
c801d85f KB |
137 | |
138 | #ifndef TRUE | |
139 | # define TRUE 1 | |
140 | # define FALSE 0 | |
141 | #endif | |
142 | ||
143 | #endif | |
144 | ||
145 | // VC++ 4.0 is 1000. | |
146 | ||
147 | // Add more tests here for compilers that don't already define bool. | |
9ac65416 SC |
148 | #if defined( __MWERKS__ ) |
149 | #if (__MWERKS__ < 0x1000) || !__option(bool) | |
150 | typedef unsigned int bool; | |
151 | #endif | |
2432b92d JS |
152 | #elif defined(__SC__) |
153 | typedef unsigned int bool; | |
a3ef5bf5 JS |
154 | #elif defined(__SALFORDC__) |
155 | typedef unsigned int bool; | |
3f4a0c5b | 156 | #elif defined(__VISUALC__) && (__VISUALC__ <= 1000) |
dc9e1e56 | 157 | typedef unsigned int bool; |
3f4a0c5b | 158 | #elif defined(__VISUALC__) && (__VISUALC__ == 1020) |
dc9e1e56 VZ |
159 | #define bool unsigned int |
160 | #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500) | |
161 | typedef unsigned int bool; | |
7be1f0d9 | 162 | #elif defined(__WATCOMC__) |
818e52c2 JS |
163 | // typedef unsigned int bool; |
164 | ||
dbda9e86 JS |
165 | #if (__WATCOMC__ < 1100) |
166 | typedef unsigned int bool; | |
818e52c2 JS |
167 | #endif |
168 | ||
5dcf05ae | 169 | #elif defined(__SUNCC__) |
e0543d2a | 170 | #ifdef __SUNPRO_CC |
6c82a1fd | 171 | // starting from version 5.0 Sun CC understands 'bool' |
e0543d2a | 172 | #if __SUNPRO_CC <= 0x0420 |
6c82a1fd VZ |
173 | // If we use int, we get identically overloaded functions in config.cpp |
174 | typedef unsigned char bool; | |
175 | #endif // Sun CC version | |
176 | #else | |
1f112209 | 177 | #error "Unknown compiler: only Sun's CC and gcc are currently recognised." |
6c82a1fd | 178 | #endif // Sun CC |
16c1f7f3 JS |
179 | #endif |
180 | ||
3f4a0c5b | 181 | #if ( defined(__VISUALC__) && (__VISUALC__ <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__) |
57c208c5 JS |
182 | // Not a good idea, because later system files (e.g. windows.h) |
183 | // may try to define it. Use wxByte instead. | |
184 | // #define byte unsigned char | |
c801d85f KB |
185 | #endif |
186 | ||
57c208c5 | 187 | typedef unsigned char wxByte; |
c801d85f KB |
188 | typedef short int WXTYPE; |
189 | typedef int wxWindowID; | |
190 | ||
191 | // Macro to cut down on compiler warnings. | |
192 | #if REMOVE_UNUSED_ARG | |
193 | #define WXUNUSED(identifier) /* identifier */ | |
194 | #else // stupid, broken compiler | |
195 | #define WXUNUSED(identifier) identifier | |
196 | #endif | |
197 | ||
198 | /* | |
199 | * Making or using wxWindows as a Windows DLL | |
200 | */ | |
201 | ||
2049ba38 | 202 | #ifdef __WXMSW__ |
c801d85f | 203 | |
aed0ed3c | 204 | /* |
c801d85f KB |
205 | #ifdef __BORLANDC__ |
206 | ||
207 | # ifdef WXMAKINGDLL | |
208 | # define WXDLLEXPORT __export | |
209 | # define WXDLLEXPORT_DATA(type) type __export | |
210 | # define WXDLLEXPORT_CTORFN __export | |
211 | # elif defined(WXUSINGDLL) | |
212 | # define WXDLLEXPORT __import | |
213 | # define WXDLLEXPORT_DATA(type) type __import | |
214 | # define WXDLLEXPORT_CTORFN | |
215 | # else | |
216 | # define WXDLLEXPORT | |
217 | # define WXDLLEXPORT_DATA(type) type | |
218 | # define WXDLLEXPORT_CTORFN | |
219 | # endif | |
220 | ||
221 | #else | |
aed0ed3c JS |
222 | */ |
223 | ||
224 | // _declspec works in BC++ 5 and later, as well as VC++ | |
225 | #if defined(__VISUALC__) || defined(__BORLANDC__) | |
c801d85f KB |
226 | |
227 | # ifdef WXMAKINGDLL | |
aed0ed3c JS |
228 | # define WXDLLEXPORT _declspec( dllexport ) |
229 | # define WXDLLEXPORT_DATA(type) _declspec( dllexport ) type | |
230 | # define WXDLLEXPORT_CTORFN | |
c801d85f | 231 | # elif defined(WXUSINGDLL) |
aed0ed3c JS |
232 | # define WXDLLEXPORT _declspec( dllimport ) |
233 | # define WXDLLEXPORT_DATA(type) _declspec( dllimport ) type | |
c801d85f KB |
234 | # define WXDLLEXPORT_CTORFN |
235 | # else | |
236 | # define WXDLLEXPORT | |
237 | # define WXDLLEXPORT_DATA(type) type | |
238 | # define WXDLLEXPORT_CTORFN | |
239 | # endif | |
240 | ||
aed0ed3c JS |
241 | #else |
242 | # define WXDLLEXPORT | |
243 | # define WXDLLEXPORT_DATA(type) type | |
244 | # define WXDLLEXPORT_CTORFN | |
c801d85f KB |
245 | #endif |
246 | ||
247 | #else | |
248 | // Non-Windows | |
249 | # define WXDLLEXPORT | |
250 | # define WXDLLEXPORT_DATA(type) type | |
251 | # define WXDLLEXPORT_CTORFN | |
252 | #endif | |
253 | ||
254 | // For ostream, istream ofstream | |
255 | #if defined(__BORLANDC__) && defined( _RTLDLL ) | |
256 | # define WXDLLIMPORT __import | |
257 | #else | |
258 | # define WXDLLIMPORT | |
259 | #endif | |
260 | ||
261 | class WXDLLEXPORT wxObject; | |
262 | class WXDLLEXPORT wxEvent; | |
263 | ||
c86f1403 | 264 | /** symbolic constant used by all Find()-like functions returning positive |
c801d85f | 265 | integer on success as failure indicator */ |
3c67202d | 266 | #define wxNOT_FOUND (-1) |
c801d85f KB |
267 | |
268 | // ---------------------------------------------------------------------------- | |
269 | // Error codes | |
270 | // ---------------------------------------------------------------------------- | |
271 | ||
57c208c5 JS |
272 | #ifdef ERR_PARAM |
273 | #undef ERR_PARAM | |
274 | #endif | |
275 | ||
c801d85f KB |
276 | /// Standard error codes |
277 | enum ErrCode | |
278 | { | |
279 | /// invalid parameter (in broad sense) | |
280 | ERR_PARAM = (-4000), | |
281 | /// no more data (iteration functions usually return this) | |
282 | ERR_NODATA, | |
283 | /// user cancelled the operation | |
284 | ERR_CANCEL, | |
285 | /// no error (the only non negative error code) | |
286 | ERR_SUCCESS = 0 | |
287 | }; | |
288 | ||
289 | // ---------------------------------------------------------------------------- | |
290 | /** @name Very common macros */ | |
291 | // ---------------------------------------------------------------------------- | |
292 | //@{ | |
a3622daa VZ |
293 | /// delete pointer if it is not NULL and NULL it afterwards |
294 | // (checking that it's !NULL before passing it to delete is just a | |
295 | // a question of style, because delete will do it itself anyhow, but it might | |
296 | // be considered as an error by some overzealous debugging implementations of | |
297 | // the library, so we do it ourselves) | |
c67daf87 | 298 | #if defined(__SGI_CC__) |
d4b67f95 | 299 | // Okay this is bad styling, but the native SGI compiler is very picky, it |
c67daf87 | 300 | // wont let you compare/assign between a NULL (void *) and another pointer |
d4b67f95 RD |
301 | // type. To be really clean we'd need to pass in another argument, the type |
302 | // of p. | |
303 | // Also note the use of 0L, this would allow future possible 64bit support | |
304 | // (as yet untested) by ensuring that we zero all the bits in a pointer | |
305 | // (which is always the same length as a long (at least with the LP64 standard) | |
c67daf87 | 306 | // --- offer aug 98 |
d8260b2f | 307 | #define wxDELETE(p) if ( (p) ) { delete (p); p = 0L; } |
c67daf87 | 308 | #else |
d8260b2f | 309 | #define wxDELETE(p) if ( (p) != NULL ) { delete p; p = NULL; } |
c67daf87 | 310 | #endif /* __SGI__CC__ */ |
a3622daa VZ |
311 | |
312 | // delete an array and NULL it (see comments above) | |
c67daf87 UR |
313 | #if defined(__SGI_CC__) |
314 | // see above comment. | |
315 | #define wxDELETEA(p) if ( (p) ) { delete [] (p); p = 0L; } | |
316 | #else | |
d8260b2f | 317 | #define wxDELETEA(p) if ( ((void *) (p)) != NULL ) { delete [] p; p = NULL; } |
c67daf87 | 318 | #endif /* __SGI__CC__ */ |
c801d85f KB |
319 | |
320 | /// size of statically declared array | |
321 | #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) | |
322 | ||
8cb50e4b JS |
323 | // Use of these suppresses some compiler warnings |
324 | WXDLLEXPORT_DATA(extern const bool) wxTrue; | |
325 | WXDLLEXPORT_DATA(extern const bool) wxFalse; | |
326 | ||
c801d85f KB |
327 | // ---------------------------------------------------------------------------- |
328 | // compiler specific settings | |
329 | // ---------------------------------------------------------------------------- | |
330 | ||
331 | // to allow compiling with warning level 4 under Microsoft Visual C++ some | |
332 | // warnings just must be disabled | |
333 | #ifdef __VISUALC__ | |
334 | #pragma warning(disable: 4514) // unreferenced inline func has been removed | |
d4b67f95 | 335 | /* |
c801d85f | 336 | you might be tempted to disable this one also: triggered by CHECK and FAIL |
3f4a0c5b VZ |
337 | macros in debug.h, but it's, overall, a rather useful one, so I leave it and |
338 | will try to find some way to disable this warning just for CHECK/FAIL. Anyone? | |
c801d85f KB |
339 | */ |
340 | #pragma warning(disable: 4127) // conditional expression is constant | |
c801d85f KB |
341 | #endif // VC++ |
342 | ||
3f4a0c5b VZ |
343 | #if defined(__MWERKS__) |
344 | #undef try | |
345 | #undef except | |
346 | #undef finally | |
347 | #define except(x) catch(...) | |
348 | #endif // Metrowerks | |
8a60ae88 | 349 | |
85ee3474 UU |
350 | // where should i put this? we need to make sure of this as it breaks |
351 | // the <iostream> code. | |
ea57084d | 352 | #if !wxUSE_IOSTREAMH && defined(__WXDEBUG__) |
518f33a4 | 353 | #ifndef __MWERKS__ |
ea57084d | 354 | #undef __WXDEBUG__ |
85ee3474 | 355 | #endif |
518f33a4 | 356 | #endif |
85ee3474 | 357 | |
c801d85f KB |
358 | // Callback function type definition |
359 | typedef void (*wxFunction) (wxObject&, wxEvent&); | |
360 | ||
361 | /* | |
362 | * Window style flags. | |
363 | * Values are chosen so they can be |'ed in a bit list. | |
364 | * Some styles are used across more than one group, | |
365 | * so the values mustn't clash with others in the group. | |
366 | * Otherwise, numbers can be reused across groups. | |
367 | * | |
368 | * From version 1.66: | |
369 | * Window (cross-group) styles now take up the first half | |
370 | * of the flag, and control-specific styles the | |
371 | * second half. | |
d4b67f95 | 372 | * |
c801d85f KB |
373 | */ |
374 | ||
375 | /* | |
376 | * Window (Frame/dialog/subwindow/panel item) style flags | |
377 | */ | |
378 | #define wxVSCROLL 0x80000000 | |
379 | #define wxHSCROLL 0x40000000 | |
380 | #define wxCAPTION 0x20000000 | |
381 | ||
382 | // New styles | |
383 | #define wxDOUBLE_BORDER 0x10000000 | |
384 | #define wxSUNKEN_BORDER 0x08000000 | |
385 | #define wxRAISED_BORDER 0x04000000 | |
386 | #define wxBORDER 0x02000000 | |
387 | #define wxSIMPLE_BORDER 0x02000000 | |
388 | #define wxSTATIC_BORDER 0x01000000 | |
389 | #define wxTRANSPARENT_WINDOW 0x00100000 | |
390 | #define wxNO_BORDER 0x00200000 | |
391 | ||
392 | #define wxUSER_COLOURS 0x00800000 | |
393 | // Override CTL3D etc. control colour processing to | |
394 | // allow own background colour | |
64693098 | 395 | // OBSOLETE - use wxNO_3D instead |
c801d85f KB |
396 | #define wxNO_3D 0x00800000 |
397 | // Override CTL3D or native 3D styles for children | |
565215b2 JS |
398 | #define wxCLIP_CHILDREN 0x00400000 |
399 | // Clip children when painting, which reduces flicker in | |
400 | // e.g. frames and splitter windows, but can't be used in | |
401 | // a panel where a static box must be 'transparent' (panel | |
402 | // paints the background for it) | |
c801d85f KB |
403 | |
404 | // Add this style to a panel to get tab traversal working | |
405 | // outside of dialogs. | |
406 | #define wxTAB_TRAVERSAL 0x00080000 | |
407 | ||
408 | // Orientations | |
409 | #define wxHORIZONTAL 0x01 | |
410 | #define wxVERTICAL 0x02 | |
411 | #define wxBOTH (wxVERTICAL|wxHORIZONTAL) | |
412 | #define wxCENTER_FRAME 0x04 /* centering into frame rather than screen */ | |
413 | ||
414 | /* | |
415 | * Frame/dialog style flags | |
416 | */ | |
3f4a0c5b VZ |
417 | #define wxSTAY_ON_TOP 0x8000 |
418 | #define wxICONIZE 0x4000 | |
419 | #define wxMINIMIZE wxICONIZE | |
420 | #define wxMAXIMIZE 0x2000 | |
421 | #define wxTHICK_FRAME 0x1000 | |
422 | #define wxSYSTEM_MENU 0x0800 | |
423 | #define wxMINIMIZE_BOX 0x0400 | |
424 | #define wxMAXIMIZE_BOX 0x0200 | |
425 | #define wxTINY_CAPTION_HORIZ 0x0100 | |
426 | #define wxTINY_CAPTION_VERT 0x0080 | |
427 | #define wxRESIZE_BOX wxMAXIMIZE_BOX | |
428 | #define wxRESIZE_BORDER 0x0040 | |
429 | #define wxDIALOG_MODAL 0x0020 | |
430 | #define wxDIALOG_MODELESS 0x0000 | |
c801d85f | 431 | |
565215b2 | 432 | #define wxDEFAULT_FRAME_STYLE (wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN) |
c801d85f KB |
433 | |
434 | #if WXWIN_COMPATIBILITY | |
435 | #define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE | |
436 | #endif | |
437 | ||
3f4a0c5b | 438 | #define wxDEFAULT_DIALOG_STYLE (wxSYSTEM_MENU|wxCAPTION|wxTHICK_FRAME) |
c801d85f KB |
439 | |
440 | /* | |
441 | * Subwindow style flags | |
442 | */ | |
443 | #define wxRETAINED 0x0001 | |
444 | #define wxBACKINGSTORE wxRETAINED | |
445 | // wxCanvas or wxPanel can optionally have a thick frame under MS Windows. | |
446 | // #define wxTHICK_FRAME 0x1000 | |
447 | ||
448 | /* | |
449 | * wxToolBar style flags | |
450 | */ | |
c801d85f | 451 | #define wxTB_3DBUTTONS 0x8000 |
81d66cf3 JS |
452 | #define wxTB_HORIZONTAL 0x0002 |
453 | #define wxTB_VERTICAL 0x0004 | |
bb6290e3 | 454 | // Flatbar/Coolbar under Win98 |
81d66cf3 | 455 | #define wxTB_FLAT 0x0008 |
3502e687 RR |
456 | // use native docking |
457 | #define wxTB_DOCKABLE 0x0010 | |
c801d85f KB |
458 | |
459 | /* | |
3502e687 | 460 | * wxMenuBar style flags |
c801d85f | 461 | */ |
3502e687 RR |
462 | // use native docking |
463 | #define wxMB_DOCKABLE 0x0001 | |
464 | ||
d4b67f95 | 465 | |
3502e687 RR |
466 | /* |
467 | * Apply to all panel items | |
468 | */ | |
c801d85f KB |
469 | #define wxCOLOURED 0x0800 |
470 | // Alignment for panel item labels: replaces characters with zeros | |
471 | // when creating label, so spaces can be included in string for alignment. | |
472 | #define wxFIXED_LENGTH 0x0400 | |
473 | #define wxALIGN_LEFT 0x0000 | |
474 | #define wxALIGN_CENTER 0x0100 | |
475 | #define wxALIGN_CENTRE 0x0100 | |
476 | #define wxALIGN_RIGHT 0x0200 | |
477 | ||
478 | /* | |
479 | * Styles for wxListBox | |
480 | */ | |
c801d85f | 481 | #define wxLB_SORT 0x0010 |
9c331ded | 482 | #define wxLB_SINGLE 0x0020 |
c801d85f KB |
483 | #define wxLB_MULTIPLE 0x0040 |
484 | #define wxLB_EXTENDED 0x0080 | |
485 | // wxLB_OWNERDRAW is Windows-only | |
486 | #define wxLB_OWNERDRAW 0x0100 | |
9c331ded JS |
487 | #define wxLB_NEEDED_SB 0x0200 |
488 | #define wxLB_ALWAYS_SB 0x0400 | |
c801d85f KB |
489 | #define wxLB_HSCROLL wxHSCROLL |
490 | ||
491 | /* | |
492 | * wxTextCtrl style flags | |
493 | */ | |
494 | #define wxPROCESS_ENTER 0x0004 | |
495 | #define wxPASSWORD 0x0008 | |
496 | #define wxTE_PROCESS_ENTER wxPROCESS_ENTER | |
497 | #define wxTE_PASSWORD wxPASSWORD | |
498 | #define wxTE_READONLY 0x0010 | |
499 | #define wxTE_MULTILINE 0x0020 | |
2004484f | 500 | #define wxTE_PROCESS_TAB 0x0040 |
c801d85f KB |
501 | |
502 | /* | |
503 | * wxComboBox style flags | |
504 | */ | |
505 | #define wxCB_SIMPLE 0x0004 | |
c801d85f | 506 | #define wxCB_SORT 0x0008 |
9c331ded JS |
507 | #define wxCB_READONLY 0x0010 |
508 | #define wxCB_DROPDOWN 0x0020 | |
c801d85f KB |
509 | |
510 | /* | |
511 | * wxRadioBox/wxRadioButton style flags | |
512 | */ | |
fa18b757 JS |
513 | |
514 | // New, more intuitive names to specify majorDim argument | |
515 | ||
516 | // Same as wxRA_HORIZONTAL | |
517 | #define wxRA_SPECIFY_COLS 0x0001 | |
518 | // Same as wxRA_VERTICAL | |
519 | #define wxRA_SPECIFY_ROWS 0x0002 | |
520 | ||
521 | // Old names for compatibility | |
c801d85f KB |
522 | #define wxRA_HORIZONTAL wxHORIZONTAL |
523 | #define wxRA_VERTICAL wxVERTICAL | |
524 | #define wxRB_GROUP 0x0004 | |
525 | ||
526 | /* | |
527 | * wxGauge flags | |
528 | */ | |
529 | #define wxGA_PROGRESSBAR 0x0004 | |
530 | #define wxGA_HORIZONTAL wxHORIZONTAL | |
531 | #define wxGA_VERTICAL wxVERTICAL | |
532 | ||
533 | /* | |
534 | * wxSlider flags | |
535 | */ | |
c801d85f KB |
536 | #define wxSL_HORIZONTAL wxHORIZONTAL |
537 | #define wxSL_VERTICAL wxVERTICAL | |
538 | // The next one is obsolete - use scroll events instead | |
539 | #define wxSL_NOTIFY_DRAG 0x0000 | |
540 | #define wxSL_AUTOTICKS 0x0008 | |
541 | // #define wxSL_MANUALTICKS 0x0010 | |
542 | #define wxSL_LABELS 0x0020 | |
543 | #define wxSL_LEFT 0x0040 | |
544 | #define wxSL_TOP 0x0080 | |
545 | #define wxSL_RIGHT 0x0100 | |
546 | #define wxSL_BOTTOM 0x0200 | |
547 | #define wxSL_BOTH 0x0400 | |
548 | #define wxSL_SELRANGE 0x0800 | |
549 | ||
550 | /* | |
551 | * wxScrollBar flags | |
552 | */ | |
c801d85f KB |
553 | #define wxSB_HORIZONTAL wxHORIZONTAL |
554 | #define wxSB_VERTICAL wxVERTICAL | |
555 | ||
556 | /* | |
557 | * wxButton flags | |
558 | */ | |
c801d85f KB |
559 | #define wxBU_AUTODRAW 0x0004 |
560 | #define wxBU_NOAUTODRAW 0x0000 | |
561 | ||
562 | /* | |
563 | * wxTreeCtrl flags | |
564 | */ | |
c801d85f KB |
565 | #define wxTR_HAS_BUTTONS 0x0004 |
566 | #define wxTR_EDIT_LABELS 0x0008 | |
64693098 | 567 | #define wxTR_LINES_AT_ROOT 0x0010 |
c801d85f KB |
568 | |
569 | /* | |
570 | * wxListCtrl flags | |
571 | */ | |
c801d85f KB |
572 | #define wxLC_ICON 0x0004 |
573 | #define wxLC_SMALL_ICON 0x0008 | |
574 | #define wxLC_LIST 0x0010 | |
575 | #define wxLC_REPORT 0x0020 | |
576 | #define wxLC_ALIGN_TOP 0x0040 | |
577 | #define wxLC_ALIGN_LEFT 0x0080 | |
578 | #define wxLC_AUTOARRANGE 0x0100 | |
579 | #define wxLC_USER_TEXT 0x0200 | |
580 | #define wxLC_EDIT_LABELS 0x0400 | |
581 | #define wxLC_NO_HEADER 0x0800 | |
582 | #define wxLC_NO_SORT_HEADER 0x1000 | |
583 | #define wxLC_SINGLE_SEL 0x2000 | |
584 | #define wxLC_SORT_ASCENDING 0x4000 | |
585 | #define wxLC_SORT_DESCENDING 0x8000 | |
586 | ||
587 | #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT) | |
588 | #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT) | |
589 | #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING) | |
590 | ||
591 | // Omitted because (a) too much detail (b) not enough style flags | |
592 | // #define wxLC_NO_SCROLL | |
593 | // #define wxLC_NO_LABEL_WRAP | |
594 | // #define wxLC_OWNERDRAW_FIXED | |
595 | // #define wxLC_SHOW_SEL_ALWAYS | |
596 | ||
597 | /* | |
598 | * wxSpinButton flags | |
599 | */ | |
600 | ||
601 | #define wxSP_VERTICAL 0x0004 | |
602 | #define wxSP_HORIZONTAL 0x0008 | |
603 | #define wxSP_ARROW_KEYS 0x0010 | |
604 | #define wxSP_WRAP 0x0020 | |
605 | ||
606 | /* | |
cd2df130 | 607 | * wxSplitterWindow flags |
c801d85f KB |
608 | */ |
609 | ||
610 | #define wxSP_NOBORDER 0x0000 | |
611 | #define wxSP_3D 0x0004 | |
612 | #define wxSP_BORDER 0x0008 | |
613 | ||
cd2df130 JS |
614 | /* |
615 | * wxFrame extra flags | |
616 | */ | |
617 | ||
618 | // No title on taskbar | |
619 | #define wxFRAME_TOOL_WINDOW 0x0004 | |
620 | ||
c801d85f KB |
621 | /* |
622 | * wxTabCtrl flags | |
623 | */ | |
624 | ||
625 | #define wxTAB_MULTILINE 0x0000 | |
626 | #define wxTAB_RIGHTJUSTIFY 0x0004 | |
627 | #define wxTAB_FIXEDWIDTH 0x0008 | |
628 | #define wxTAB_OWNERDRAW 0x0010 | |
629 | ||
10b959e3 JS |
630 | // Sorry, I changed my mind about these names... |
631 | #define wxTC_MULTILINE 0x0000 | |
632 | #define wxTC_RIGHTJUSTIFY 0x0004 | |
633 | #define wxTC_FIXEDWIDTH 0x0008 | |
634 | #define wxTC_OWNERDRAW 0x0010 | |
635 | ||
c801d85f KB |
636 | /* |
637 | * wxStatusBar95 flags | |
638 | */ | |
639 | ||
565215b2 | 640 | #define wxST_SIZEGRIP 0x0002 |
c801d85f KB |
641 | |
642 | /* | |
643 | * GDI descriptions | |
644 | */ | |
645 | ||
646 | enum { | |
647 | // Text font families | |
648 | wxDEFAULT = 70, | |
649 | wxDECORATIVE, | |
650 | wxROMAN, | |
651 | wxSCRIPT, | |
652 | wxSWISS, | |
653 | wxMODERN, | |
654 | wxTELETYPE, /* @@@@ */ | |
655 | ||
656 | // Proportional or Fixed width fonts (not yet used) | |
657 | wxVARIABLE = 80, | |
658 | wxFIXED, | |
659 | ||
660 | wxNORMAL = 90, | |
661 | wxLIGHT, | |
662 | wxBOLD, | |
663 | // Also wxNORMAL for normal (non-italic text) | |
664 | wxITALIC, | |
665 | wxSLANT, | |
666 | ||
667 | // Pen styles | |
668 | wxSOLID = 100, | |
669 | wxDOT, | |
670 | wxLONG_DASH, | |
671 | wxSHORT_DASH, | |
672 | wxDOT_DASH, | |
673 | wxUSER_DASH, | |
674 | ||
675 | wxTRANSPARENT, | |
676 | ||
677 | // Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! | |
678 | // Note also that stippling a Pen IS meaningfull, because a Line is | |
679 | // drawn with a Pen, and without any Brush -- and it can be stippled. | |
680 | wxSTIPPLE = 110, | |
681 | wxBDIAGONAL_HATCH, | |
682 | wxCROSSDIAG_HATCH, | |
683 | wxFDIAGONAL_HATCH, | |
684 | wxCROSS_HATCH, | |
685 | wxHORIZONTAL_HATCH, | |
686 | wxVERTICAL_HATCH, | |
3f4a0c5b | 687 | #define IS_HATCH(s) ((s)>=wxBDIAGONAL_HATCH && (s)<=wxVERTICAL_HATCH) |
c801d85f KB |
688 | |
689 | wxJOIN_BEVEL = 120, | |
690 | wxJOIN_MITER, | |
691 | wxJOIN_ROUND, | |
692 | ||
693 | wxCAP_ROUND = 130, | |
694 | wxCAP_PROJECTING, | |
695 | wxCAP_BUTT | |
696 | }; | |
697 | ||
698 | ||
699 | // Logical ops | |
3f4a0c5b | 700 | typedef enum |
83624f79 | 701 | { |
c801d85f KB |
702 | wxCLEAR, // 0 |
703 | wxXOR, // src XOR dst | |
704 | wxINVERT, // NOT dst | |
705 | wxOR_REVERSE, // src OR (NOT dst) | |
706 | wxAND_REVERSE,// src AND (NOT dst) | |
707 | wxCOPY, // src | |
708 | wxAND, // src AND dst | |
709 | wxAND_INVERT, // (NOT src) AND dst | |
710 | wxNO_OP, // dst | |
711 | wxNOR, // (NOT src) AND (NOT dst) | |
712 | wxEQUIV, // (NOT src) XOR dst | |
713 | wxSRC_INVERT, // (NOT src) | |
714 | wxOR_INVERT, // (NOT src) OR dst | |
715 | wxNAND, // (NOT src) OR (NOT dst) | |
716 | wxOR, // src OR dst | |
717 | wxSET, // 1 | |
718 | wxSRC_OR, // source _bitmap_ OR destination | |
719 | wxSRC_AND // source _bitmap_ AND destination | |
720 | } form_ops_t; | |
721 | ||
722 | // Flood styles | |
723 | #define wxFLOOD_SURFACE 1 | |
724 | #define wxFLOOD_BORDER 2 | |
725 | ||
726 | // Polygon filling mode | |
727 | #define wxODDEVEN_RULE 1 | |
728 | #define wxWINDING_RULE 2 | |
729 | ||
730 | // ToolPanel in wxFrame | |
3f4a0c5b VZ |
731 | #define wxTOOL_TOP 1 |
732 | #define wxTOOL_BOTTOM 2 | |
733 | #define wxTOOL_LEFT 3 | |
734 | #define wxTOOL_RIGHT 4 | |
c801d85f KB |
735 | |
736 | // Dialog specifiers/return values | |
737 | ||
738 | #define wxOK 0x0001 | |
739 | #define wxYES_NO 0x0002 | |
740 | #define wxCANCEL 0x0004 | |
741 | #define wxYES 0x0008 | |
742 | #define wxNO 0x0010 | |
743 | ||
744 | #define wxICON_EXCLAMATION 0x0020 | |
745 | #define wxICON_HAND 0x0040 | |
746 | #define wxICON_QUESTION 0x0080 | |
747 | #define wxICON_INFORMATION 0x0100 | |
748 | ||
749 | #define wxICON_STOP wxICON_HAND | |
750 | #define wxICON_ASTERISK wxICON_INFORMATION | |
751 | #define wxICON_MASK (0x0020|0x0040|0x0080|0x0100) | |
752 | ||
753 | #define wxCENTRE 0x0200 | |
754 | #define wxCENTER wxCENTRE | |
755 | ||
756 | // Possible SetSize flags | |
757 | ||
758 | // Use internally-calculated width if -1 | |
81d66cf3 | 759 | #define wxSIZE_AUTO_WIDTH 0x0001 |
c801d85f | 760 | // Use internally-calculated height if -1 |
81d66cf3 | 761 | #define wxSIZE_AUTO_HEIGHT 0x0002 |
c801d85f | 762 | // Use internally-calculated width and height if each is -1 |
81d66cf3 | 763 | #define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT) |
c801d85f KB |
764 | // Ignore missing (-1) dimensions (use existing). |
765 | // For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code. | |
81d66cf3 | 766 | #define wxSIZE_USE_EXISTING 0x0000 |
c801d85f | 767 | // Allow -1 as a valid position |
81d66cf3 JS |
768 | #define wxSIZE_ALLOW_MINUS_ONE 0x0004 |
769 | // Don't do parent client adjustments (for implementation only) | |
770 | #define wxSIZE_NO_ADJUSTMENTS 0x0008 | |
c801d85f | 771 | |
0d2a2b60 RR |
772 | #ifndef __WXGTK__ |
773 | ||
e3e65dac RR |
774 | enum wxDataFormat |
775 | { | |
06e43511 | 776 | wxDF_INVALID = 0, |
e3e65dac RR |
777 | wxDF_TEXT = 1, /* CF_TEXT */ |
778 | wxDF_BITMAP = 2, /* CF_BITMAP */ | |
779 | wxDF_METAFILE = 3, /* CF_METAFILEPICT */ | |
06e43511 JS |
780 | wxDF_SYLK = 4, |
781 | wxDF_DIF = 5, | |
782 | wxDF_TIFF = 6, | |
e3e65dac | 783 | wxDF_OEMTEXT = 7, /* CF_OEMTEXT */ |
06e43511 JS |
784 | wxDF_DIB = 8, /* CF_DIB */ |
785 | wxDF_PALETTE = 9, | |
786 | wxDF_PENDATA = 10, | |
787 | wxDF_RIFF = 11, | |
788 | wxDF_WAVE = 12, | |
789 | wxDF_UNICODETEXT = 13, | |
790 | wxDF_ENHMETAFILE = 14, | |
8b53e5a2 | 791 | wxDF_FILENAME = 15, /* CF_HDROP */ |
06e43511 | 792 | wxDF_LOCALE = 16, |
8b53e5a2 | 793 | wxDF_PRIVATE = 20 |
e3e65dac | 794 | }; |
c801d85f | 795 | |
0d2a2b60 RR |
796 | #endif |
797 | ||
83624f79 | 798 | /* Virtual keycodes */ |
e3e65dac | 799 | |
3f4a0c5b | 800 | enum wxKeyCode |
83624f79 | 801 | { |
c801d85f KB |
802 | WXK_BACK = 8, |
803 | WXK_TAB = 9, | |
3f4a0c5b VZ |
804 | WXK_RETURN = 13, |
805 | WXK_ESCAPE = 27, | |
806 | WXK_SPACE = 32, | |
c801d85f KB |
807 | WXK_DELETE = 127, |
808 | ||
809 | WXK_START = 300, | |
810 | WXK_LBUTTON, | |
811 | WXK_RBUTTON, | |
812 | WXK_CANCEL, | |
813 | WXK_MBUTTON, | |
814 | WXK_CLEAR, | |
815 | WXK_SHIFT, | |
816 | WXK_CONTROL, | |
817 | WXK_MENU, | |
818 | WXK_PAUSE, | |
819 | WXK_CAPITAL, | |
83624f79 RR |
820 | WXK_PRIOR, /* Page up */ |
821 | WXK_NEXT, /* Page down */ | |
c801d85f KB |
822 | WXK_END, |
823 | WXK_HOME, | |
824 | WXK_LEFT, | |
825 | WXK_UP, | |
826 | WXK_RIGHT, | |
827 | WXK_DOWN, | |
828 | WXK_SELECT, | |
829 | WXK_PRINT, | |
830 | WXK_EXECUTE, | |
831 | WXK_SNAPSHOT, | |
832 | WXK_INSERT, | |
833 | WXK_HELP, | |
834 | WXK_NUMPAD0, | |
835 | WXK_NUMPAD1, | |
836 | WXK_NUMPAD2, | |
837 | WXK_NUMPAD3, | |
838 | WXK_NUMPAD4, | |
839 | WXK_NUMPAD5, | |
840 | WXK_NUMPAD6, | |
841 | WXK_NUMPAD7, | |
842 | WXK_NUMPAD8, | |
843 | WXK_NUMPAD9, | |
844 | WXK_MULTIPLY, | |
845 | WXK_ADD, | |
846 | WXK_SEPARATOR, | |
847 | WXK_SUBTRACT, | |
848 | WXK_DECIMAL, | |
849 | WXK_DIVIDE, | |
850 | WXK_F1, | |
851 | WXK_F2, | |
852 | WXK_F3, | |
853 | WXK_F4, | |
854 | WXK_F5, | |
855 | WXK_F6, | |
856 | WXK_F7, | |
857 | WXK_F8, | |
858 | WXK_F9, | |
859 | WXK_F10, | |
860 | WXK_F11, | |
861 | WXK_F12, | |
862 | WXK_F13, | |
863 | WXK_F14, | |
864 | WXK_F15, | |
865 | WXK_F16, | |
866 | WXK_F17, | |
867 | WXK_F18, | |
868 | WXK_F19, | |
869 | WXK_F20, | |
870 | WXK_F21, | |
871 | WXK_F22, | |
872 | WXK_F23, | |
873 | WXK_F24, | |
874 | WXK_NUMLOCK, | |
875 | WXK_SCROLL, | |
876 | WXK_PAGEUP, | |
877 | WXK_PAGEDOWN | |
878 | }; | |
879 | ||
83624f79 RR |
880 | /* OS mnemonics -- Identify the running OS (useful for Windows) |
881 | * [Not all platforms are currently available or supported] */ | |
3f4a0c5b | 882 | enum |
83624f79 | 883 | { |
34138703 | 884 | wxUNKNOWN_PLATFORM, |
3f4a0c5b VZ |
885 | wxCURSES, // Text-only CURSES |
886 | wxXVIEW_X, // Sun's XView OpenLOOK toolkit | |
887 | wxMOTIF_X, // OSF Motif 1.x.x | |
888 | wxCOSE_X, // OSF Common Desktop Environment | |
889 | wxNEXTSTEP, // NeXTStep | |
890 | wxMACINTOSH, // Apple System 7 | |
891 | wxGTK, // GTK | |
892 | wxQT, // Qt | |
893 | wxGEOS, // GEOS | |
894 | wxOS2_PM, // OS/2 Workplace | |
895 | wxWINDOWS, // Windows or WfW | |
896 | wxPENWINDOWS, // Windows for Pen Computing | |
897 | wxWINDOWS_NT, // Windows NT | |
898 | wxWIN32S, // Windows 32S API | |
899 | wxWIN95, // Windows 95 | |
900 | wxWIN386 // Watcom 32-bit supervisor modus | |
c801d85f KB |
901 | }; |
902 | ||
83624f79 | 903 | /* Printing */ |
c801d85f KB |
904 | #ifndef wxPORTRAIT |
905 | #define wxPORTRAIT 1 | |
906 | #define wxLANDSCAPE 2 | |
907 | #endif | |
908 | ||
83624f79 | 909 | /* Standard menu identifiers */ |
1f112209 JS |
910 | #define wxID_LOWEST 4999 |
911 | ||
c801d85f KB |
912 | #define wxID_OPEN 5000 |
913 | #define wxID_CLOSE 5001 | |
914 | #define wxID_NEW 5002 | |
915 | #define wxID_SAVE 5003 | |
916 | #define wxID_SAVEAS 5004 | |
917 | #define wxID_REVERT 5005 | |
918 | #define wxID_EXIT 5006 | |
919 | #define wxID_UNDO 5007 | |
920 | #define wxID_REDO 5008 | |
921 | #define wxID_HELP 5009 | |
922 | #define wxID_PRINT 5010 | |
923 | #define wxID_PRINT_SETUP 5011 | |
924 | #define wxID_PREVIEW 5012 | |
925 | #define wxID_ABOUT 5013 | |
926 | #define wxID_HELP_CONTENTS 5014 | |
927 | #define wxID_HELP_COMMANDS 5015 | |
928 | #define wxID_HELP_PROCEDURES 5016 | |
929 | #define wxID_HELP_CONTEXT 5017 | |
930 | ||
931 | #define wxID_CUT 5030 | |
932 | #define wxID_COPY 5031 | |
933 | #define wxID_PASTE 5032 | |
934 | #define wxID_CLEAR 5033 | |
935 | #define wxID_FIND 5034 | |
7f555861 | 936 | #define wxID_DUPLICATE 5035 |
77e3eac5 | 937 | #define wxID_SELECTALL 5036 |
c801d85f KB |
938 | |
939 | #define wxID_FILE1 5050 | |
940 | #define wxID_FILE2 5051 | |
941 | #define wxID_FILE3 5052 | |
942 | #define wxID_FILE4 5053 | |
943 | #define wxID_FILE5 5054 | |
944 | #define wxID_FILE6 5055 | |
945 | #define wxID_FILE7 5056 | |
946 | #define wxID_FILE8 5057 | |
947 | #define wxID_FILE9 5058 | |
948 | ||
949 | #define wxID_OK 5100 | |
950 | #define wxID_CANCEL 5101 | |
951 | #define wxID_APPLY 5102 | |
952 | #define wxID_YES 5103 | |
953 | #define wxID_NO 5104 | |
5de76427 | 954 | #define wxID_STATIC 5105 |
c801d85f | 955 | |
dfad0599 JS |
956 | #define wxID_HIGHEST 5999 |
957 | ||
e3065973 JS |
958 | // Mapping modes (as per Windows) |
959 | #define wxMM_TEXT 1 | |
960 | #define wxMM_LOMETRIC 2 | |
961 | #define wxMM_HIMETRIC 3 | |
962 | #define wxMM_LOENGLISH 4 | |
963 | #define wxMM_HIENGLISH 5 | |
964 | #define wxMM_TWIPS 6 | |
965 | #define wxMM_ISOTROPIC 7 | |
966 | #define wxMM_ANISOTROPIC 8 | |
967 | ||
968 | #define wxMM_POINTS 9 | |
969 | #define wxMM_METRIC 10 | |
970 | ||
83624f79 | 971 | /* Shortcut for easier dialog-unit-to-pixel conversion */ |
387a3b02 | 972 | #define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt) |
fd71308f | 973 | |
2049ba38 | 974 | #ifdef __WXMSW__ |
83624f79 RR |
975 | /* Stand-ins for Windows types, to avoid |
976 | * #including all of windows.h */ | |
c801d85f KB |
977 | typedef unsigned long WXHWND; |
978 | typedef unsigned long WXHANDLE; | |
979 | typedef unsigned long WXHICON; | |
980 | typedef unsigned long WXHFONT; | |
981 | typedef unsigned long WXHMENU; | |
982 | typedef unsigned long WXHPEN; | |
983 | typedef unsigned long WXHBRUSH; | |
984 | typedef unsigned long WXHPALETTE; | |
985 | typedef unsigned long WXHCURSOR; | |
986 | typedef unsigned long WXHRGN; | |
57a7b7c1 | 987 | typedef unsigned long WXHACCEL; |
c801d85f KB |
988 | typedef unsigned long WXHINSTANCE; |
989 | typedef unsigned long WXHBITMAP; | |
990 | typedef unsigned long WXHIMAGELIST; | |
991 | typedef unsigned long WXHGLOBAL; | |
992 | typedef unsigned long WXHDC; | |
993 | typedef unsigned int WXUINT; | |
994 | typedef unsigned long WXDWORD; | |
995 | typedef unsigned short WXWORD; | |
996 | typedef unsigned int WXWPARAM; | |
997 | typedef long WXLPARAM; | |
998 | typedef unsigned long WXCOLORREF; | |
c801d85f KB |
999 | typedef void * WXRGNDATA; |
1000 | typedef void * WXMSG; | |
1001 | typedef unsigned long WXHCONV; | |
0d8d91a9 | 1002 | typedef unsigned long WXHKEY; |
ef366d32 | 1003 | typedef unsigned long WXHTREEITEM; |
c801d85f KB |
1004 | typedef void * WXDRAWITEMSTRUCT; |
1005 | typedef void * WXMEASUREITEMSTRUCT; | |
1006 | typedef void * WXLPCREATESTRUCT; | |
14b72bf5 JS |
1007 | #ifdef __GNUWIN32__ |
1008 | typedef int (*WXFARPROC)(); | |
1e6d9499 | 1009 | #elif defined(__WIN32__) |
b039c367 | 1010 | typedef int (__stdcall *WXFARPROC)(); |
1e6d9499 JS |
1011 | #else |
1012 | typedef int (*WXFARPROC)(); | |
14b72bf5 | 1013 | #endif |
c801d85f KB |
1014 | |
1015 | #endif | |
1016 | ||
589f0e3e | 1017 | #ifdef __WXMOTIF__ |
83624f79 | 1018 | /* Stand-ins for X/Xt/Motif types */ |
589f0e3e JS |
1019 | typedef void* WXWindow; |
1020 | typedef void* WXWidget; | |
1021 | typedef void* WXAppContext; | |
46ccb510 | 1022 | typedef void* WXColormap; |
589f0e3e JS |
1023 | typedef void WXDisplay; |
1024 | typedef void WXEvent; | |
46ccb510 | 1025 | typedef void* WXCursor; |
50414e24 | 1026 | typedef void* WXPixmap; |
dfc54541 JS |
1027 | typedef void* WXFontStructPtr; |
1028 | typedef void* WXGC; | |
1029 | typedef void* WXRegion; | |
e97f20a0 | 1030 | typedef void* WXFont; |
f97c9854 JS |
1031 | typedef void* WXImage; |
1032 | typedef void* WXCursor; | |
1033 | typedef void* WXFontList; | |
589f0e3e JS |
1034 | #endif |
1035 | ||
83624f79 RR |
1036 | #ifdef __WXGTK__ |
1037 | /* Stand-ins for GLIB types */ | |
1038 | typedef int gint; | |
1039 | typedef unsigned guint; | |
1040 | typedef unsigned long gulong; | |
1041 | typedef void* gpointer; | |
1042 | ||
1043 | /* Stand-ins for GDK types */ | |
1044 | typedef gulong GdkAtom; | |
1045 | typedef struct _GdkColor GdkColor; | |
1046 | typedef struct _GdkColormap GdkColormap; | |
1047 | typedef struct _GdkFont GdkFont; | |
1048 | typedef struct _GdkGC GdkGC; | |
1049 | typedef struct _GdkWindow GdkWindow; | |
1050 | typedef struct _GdkWindow GdkBitmap; | |
1051 | typedef struct _GdkWindow GdkPixmap; | |
1052 | typedef struct _GdkCursor GdkCursor; | |
1053 | typedef struct _GdkRegion GdkRegion; | |
1054 | ||
1055 | /* Stand-ins for GTK types */ | |
1056 | typedef struct _GtkWidget GtkWidget; | |
1057 | typedef struct _GtkStyle GtkStyle; | |
1058 | typedef struct _GtkAdjustment GtkAdjustment; | |
1059 | typedef struct _GtkList GtkList; | |
1060 | typedef struct _GtkToolbar GtkToolbar; | |
b1170810 | 1061 | typedef struct _GtkTooltips GtkTooltips; |
83624f79 RR |
1062 | typedef struct _GtkNotebook GtkNotebook; |
1063 | typedef struct _GtkNotebookPage GtkNotebookPage; | |
ad5c34f3 JS |
1064 | |
1065 | #endif | |
1066 | ||
1067 | // This is required because of clashing macros in windows.h, which may be | |
1068 | // included before or after wxWindows classes, and therefore must be | |
1069 | // disabled here before any significant wxWindows headers are included. | |
1070 | #ifdef __WXMSW__ | |
1071 | #ifdef GetClassInfo | |
1072 | #undef GetClassInfo | |
1073 | #endif | |
1074 | ||
1075 | #ifdef GetClassName | |
1076 | #undef GetClassName | |
1077 | #endif | |
1078 | ||
1079 | #ifdef DrawText | |
1080 | #undef DrawText | |
1081 | #endif | |
1082 | ||
1083 | #ifdef GetCharWidth | |
1084 | #undef GetCharWidth | |
1085 | #endif | |
1086 | ||
1087 | #ifdef StartDoc | |
1088 | #undef StartDoc | |
1089 | #endif | |
1090 | ||
1091 | #ifdef FindWindow | |
1092 | #undef FindWindow | |
1093 | #endif | |
1094 | ||
1095 | #ifdef FindResource | |
1096 | #undef FindResource | |
1097 | #endif | |
83624f79 | 1098 | #endif |
ad5c34f3 | 1099 | // __WXMSW__ |
83624f79 | 1100 | |
c801d85f | 1101 | #endif |
34138703 | 1102 | // _WX_DEFS_H_ |