]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/gccpriv.h
Make wxComboCtrlBase::Set*groundColour() methods public.
[wxWidgets.git] / include / wx / msw / gccpriv.h
1 /*
2 Name: wx/msw/gccpriv.h
3 Purpose: MinGW/Cygwin definitions
4 Author: Vadim Zeitlin
5 Modified by:
6 Created:
7 Copyright: (c) Vadim Zeitlin
8 Licence: wxWindows Licence
9 */
10
11 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
12
13 #ifndef _WX_MSW_GCCPRIV_H_
14 #define _WX_MSW_GCCPRIV_H_
15
16 #if defined(__MINGW32__) && !defined(__GNUWIN32__)
17 #define __GNUWIN32__
18 #endif
19
20 #if defined(__MINGW32__) && ( ( __GNUC__ > 2 ) || ( ( __GNUC__ == 2 ) && ( __GNUC_MINOR__ >= 95 ) ) )
21 #include <_mingw.h>
22 #endif
23
24 #if defined( __MINGW32__ ) && !defined(__WINE__) && !defined( HAVE_W32API_H )
25 #if __MINGW32_MAJOR_VERSION >= 1
26 #define HAVE_W32API_H
27 #endif
28 #elif defined( __CYGWIN__ ) && !defined( HAVE_W32API_H )
29 #if ( __GNUC__ > 2 )
30 #define HAVE_W32API_H
31 #endif
32 #endif
33
34 #if wxCHECK_WATCOM_VERSION(1,0)
35 #define HAVE_W32API_H
36 #endif
37
38 /* check for MinGW/Cygwin w32api version ( releases >= 0.5, only ) */
39 #if defined( HAVE_W32API_H )
40 #include <w32api.h>
41 #endif
42
43 /* Watcom can't handle defined(xxx) here: */
44 #if defined(__W32API_MAJOR_VERSION) && defined(__W32API_MINOR_VERSION)
45 #define wxCHECK_W32API_VERSION( major, minor ) \
46 ( ( ( __W32API_MAJOR_VERSION > (major) ) \
47 || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor) ) ) )
48 #else
49 #define wxCHECK_W32API_VERSION( major, minor ) (0)
50 #endif
51
52 /* Cygwin / Mingw32 with gcc >= 2.95 use new windows headers which
53 are more ms-like (header author is Anders Norlander, hence the name) */
54 #if (defined(__MINGW32__) || defined(__CYGWIN__) || defined(__WINE__)) && ((__GNUC__>2) || ((__GNUC__==2) && (__GNUC_MINOR__>=95)))
55 #ifndef wxUSE_NORLANDER_HEADERS
56 #define wxUSE_NORLANDER_HEADERS 1
57 #endif
58 #else
59 #ifndef wxUSE_NORLANDER_HEADERS
60 #define wxUSE_NORLANDER_HEADERS 0
61 #endif
62 #endif
63
64 /* "old" GNUWIN32 is the one without Norlander's headers: it lacks the
65 standard Win32 headers and we define the used stuff ourselves for it
66 in wx/msw/gnuwin32/extra.h */
67 #if defined(__GNUC__) && !wxUSE_NORLANDER_HEADERS
68 #define __GNUWIN32_OLD__
69 #endif
70
71 /* Cygwin 1.0 */
72 #if defined(__CYGWIN__) && ((__GNUC__==2) && (__GNUC_MINOR__==9))
73 #define __CYGWIN10__
74 #endif
75
76 /* Mingw runtime 1.0-20010604 has some missing _tXXXX functions,
77 so let's define them ourselves: */
78 #if defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 1, 0 ) \
79 && !wxCHECK_W32API_VERSION( 1, 1 )
80 #ifndef _tsetlocale
81 #if wxUSE_UNICODE
82 #define _tsetlocale _wsetlocale
83 #else
84 #define _tsetlocale setlocale
85 #endif
86 #endif
87 #ifndef _tgetenv
88 #if wxUSE_UNICODE
89 #define _tgetenv _wgetenv
90 #else
91 #define _tgetenv getenv
92 #endif
93 #endif
94 #ifndef _tfopen
95 #if wxUSE_UNICODE
96 #define _tfopen _wfopen
97 #else
98 #define _tfopen fopen
99 #endif
100 #endif
101 #endif
102
103 /* current (= before mingw-runtime 3.3) mingw32 headers forget to
104 define _puttchar, this will probably be fixed in the next versions but
105 for now do it ourselves
106 */
107 #if defined( __MINGW32__ ) && \
108 !wxCHECK_MINGW32_VERSION(3,3) && !defined( _puttchar )
109 #ifdef wxUSE_UNICODE
110 #define _puttchar putwchar
111 #else
112 #define _puttchar puttchar
113 #endif
114 #endif
115
116 #endif
117 /* _WX_MSW_GCCPRIV_H_ */