]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/carbon/chkconf.h
OSX reshuffling
[wxWidgets.git] / include / wx / osx / carbon / chkconf.h
1 /*
2 * Name: wx/mac/chkconf.h
3 * Purpose: Compiler-specific configuration checking
4 * Author: Julian Smart
5 * Modified by:
6 * Created: 01/02/97
7 * RCS-ID: $Id$
8 * Copyright: (c) Julian Smart
9 * Licence: wxWindows licence
10 */
11
12 #ifndef _WX_MAC_CHKCONF_H_
13 #define _WX_MAC_CHKCONF_H_
14
15 /*
16 * disable the settings which don't work for some compilers
17 */
18
19 #if defined(__MWERKS__)
20 #undef wxUSE_DEBUG_NEW_ALWAYS
21 #define wxUSE_DEBUG_NEW_ALWAYS 0
22
23 /* DS: Fixes compilation when wxUSE_ON_FATAL_EXCEPTION is 1 */
24 #ifndef wxTYPE_SA_HANDLER
25 #define wxTYPE_SA_HANDLER int
26 #endif
27 #endif
28
29 /*
30 * use OS X CoreGraphics (1) or QuickDraw (0) for rendering
31 */
32
33 #ifndef wxOSX_USE_CORE_GRAPHICS
34 #define wxOSX_USE_CORE_GRAPHICS 1
35 #endif
36
37 /*
38 * wxOSX_USE_CORE_GRAPHICS is now implemented in terms of wxUSE_GRAPHICS_CONTEXT
39 */
40
41 #if wxOSX_USE_CORE_GRAPHICS
42 #undef wxUSE_GRAPHICS_CONTEXT
43 #define wxUSE_GRAPHICS_CONTEXT 1
44 #endif
45
46 /*
47 * check graphics context option
48 */
49 #if wxUSE_GRAPHICS_CONTEXT && !wxOSX_USE_CORE_GRAPHICS
50 # error "wxUSE_GRAPHICS_CONTEXT on wxMac requires wxOSX_USE_CORE_GRAPHICS"
51 #endif
52
53 /*
54 * native (1) or emulated (0) toolbar
55 */
56
57 #ifndef wxMAC_USE_NATIVE_TOOLBAR
58 #define wxMAC_USE_NATIVE_TOOLBAR 1
59 #endif
60
61 /*
62 * using mixins of cocoa functionality
63 */
64
65 #ifndef wxOSX_USE_COCOA
66 #define wxOSX_USE_COCOA 0
67 #endif
68
69 /*
70 * setting flags according to the platform
71 */
72
73 #ifdef __LP64__
74 #if wxOSX_USE_COCOA == 0
75 #undef wxOSX_USE_COCOA
76 #define wxOSX_USE_COCOA 1
77 #endif
78 #define wxOSX_USE_QUICKDRAW 0
79 #define wxOSX_USE_CARBON 0
80 #define wxOSX_USE_IPHONE 0
81 #else
82 #ifdef __WXOSX_IPHONE__
83 #define wxOSX_USE_QUICKDRAW 0
84 #define wxOSX_USE_CARBON 0
85 #define wxOSX_USE_IPHONE 1
86 #else
87 #define wxOSX_USE_IPHONE 0
88 #if wxOSX_USE_COCOA
89 #define wxOSX_USE_QUICKDRAW 0
90 #define wxOSX_USE_CARBON 0
91 #else
92 #define wxOSX_USE_QUICKDRAW 1
93 #define wxOSX_USE_CARBON 1
94 #endif
95 #endif
96 #endif
97
98 #if wxOSX_USE_COCOA || wxOSX_USE_CARBON
99 #define wxOSX_USE_COCOA_OR_CARBON 1
100 #else
101 #define wxOSX_USE_COCOA_OR_CARBON 0
102 #endif
103
104 #if wxOSX_USE_COCOA || wxOSX_USE_IPHONE
105 #define wxOSX_USE_COCOA_OR_IPHONE 1
106 #else
107 #define wxOSX_USE_COCOA_OR_IPHONE 0
108 #endif
109
110 /*
111 * text rendering system
112 */
113
114 /* we have different options and we turn on all that make sense
115 * under a certain platform
116 */
117
118 #ifdef __WXOSX_IPHONE__
119 #define wxMAC_USE_CG_TEXT 1
120 #define wxMAC_USE_CORE_TEXT 0
121 #define wxMAC_USE_ATSU_TEXT 0
122 #else // !__WXOSX_IPHONE__
123
124 #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
125
126 #define wxMAC_USE_CORE_TEXT 1
127 #define wxMAC_USE_ATSU_TEXT 0
128 #define wxMAC_USE_CG_TEXT 0
129
130 #else // platform < 10.5
131
132 #define wxMAC_USE_CG_TEXT 0
133
134 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
135 #define wxMAC_USE_CORE_TEXT 1
136 #else
137 #define wxMAC_USE_CORE_TEXT 0
138 #endif
139 #define wxMAC_USE_ATSU_TEXT 1
140
141 #endif
142
143 #endif // !__WXOSX_IPHONE__
144
145 /*
146 * turning off capabilities that don't work under 64 bit yet
147 */
148
149 #if wxOSX_USE_COCOA_OR_IPHONE
150
151 #if wxUSE_MDI
152 #undef wxUSE_MDI
153 #define wxUSE_MDI 0
154 #endif
155
156 #if wxUSE_MDI_ARCHITECTURE
157 #undef wxUSE_MDI_ARCHITECTURE
158 #define wxUSE_MDI_ARCHITECTURE 0
159 #endif
160
161 #if wxUSE_DRAG_AND_DROP
162 #undef wxUSE_DRAG_AND_DROP
163 #define wxUSE_DRAG_AND_DROP 0
164 #endif
165
166 #if wxUSE_TASKBARICON
167 #undef wxUSE_TASKBARICON
168 #define wxUSE_TASKBARICON 0
169 #endif
170
171 #if wxUSE_TOOLTIPS
172 #undef wxUSE_TOOLTIPS
173 #define wxUSE_TOOLTIPS 0
174 #endif
175
176 #if wxUSE_DATAVIEWCTRL
177 #undef wxUSE_DATAVIEWCTRL
178 #define wxUSE_DATAVIEWCTRL 0
179 #endif
180
181 #if wxUSE_DRAG_AND_DROP
182 #undef wxUSE_DRAG_AND_DROP
183 #define wxUSE_DRAG_AND_DROP 0
184 #endif
185
186 #if wxUSE_TASKBARICON
187 #undef wxUSE_TASKBARICON
188 #define wxUSE_TASKBARICON 0
189 #endif
190
191 /*
192 #if wxUSE_POPUPWIN
193 #undef wxUSE_POPUPWIN
194 #define wxUSE_POPUPWIN 0
195 #endif
196
197 #if wxUSE_COMBOBOX
198 #undef wxUSE_COMBOBOX
199 #define wxUSE_COMBOBOX 0
200 #endif
201
202
203 #if wxUSE_MENUS
204 #undef wxUSE_MENUS
205 #define wxUSE_MENUS 0
206 #endif
207
208 #if wxUSE_CALENDARCTRL
209 #undef wxUSE_CALENDARCTRL
210 #define wxUSE_CALENDARCTRL 0
211 #endif
212
213 #if wxUSE_WXHTML_HELP
214 #undef wxUSE_WXHTML_HELP
215 #define wxUSE_WXHTML_HELP 0
216 #endif
217
218 #if wxUSE_DOC_VIEW_ARCHITECTURE
219 #undef wxUSE_DOC_VIEW_ARCHITECTURE
220 #define wxUSE_DOC_VIEW_ARCHITECTURE 0
221 #endif
222
223 #if wxUSE_PRINTING_ARCHITECTURE
224 #undef wxUSE_PRINTING_ARCHITECTURE
225 #define wxUSE_PRINTING_ARCHITECTURE 0
226 #endif
227
228 */
229
230
231 #endif // wxOSX_USE_COCOA_OR_IPHON
232
233 #if wxOSX_USE_IPHONE
234
235 #if wxUSE_CLIPBOARD
236 #undef wxUSE_CLIPBOARD
237 #define wxUSE_CLIPBOARD 0
238 #endif // wxUSE_CLIPBOARD
239
240 #endif //wxOSX_USE_IPHONE
241
242 #endif
243 /* _WX_MAC_CHKCONF_H_ */
244