]>
Commit | Line | Data |
---|---|---|
5c6eb3a8 | 1 | /* |
fe1a36a7 | 2 | * Name: wx/osx/chkconf.h |
5c6eb3a8 SC |
3 | * Purpose: Mac-specific config settings checks |
4 | * Author: Vadim Zeitlin | |
5 | * Modified by: | |
6 | * Created: 2005-04-05 (extracted from wx/chkconf.h) | |
7 | * RCS-ID: $Id$ | |
8 | * Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org> | |
9 | * Licence: wxWindows licence | |
10 | */ | |
11 | ||
12 | /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ | |
13 | ||
fe1a36a7 SC |
14 | #ifndef _WX_OSX_CHKCONF_H_ |
15 | #define _WX_OSX_CHKCONF_H_ | |
16 | ||
5c6eb3a8 SC |
17 | |
18 | #if wxUSE_STACKWALKER | |
19 | /* not supported under Mac */ | |
20 | # undef wxUSE_STACKWALKER | |
21 | # define wxUSE_STACKWALKER 0 | |
22 | #endif /* wxUSE_STACKWALKER */ | |
23 | ||
fe1a36a7 SC |
24 | /* |
25 | * check graphics context option, must be on for every os x platform | |
26 | * we only use core graphics now on all builds, try to catch attempts | |
27 | * to configure the build otherwise and give error messages | |
28 | */ | |
03647350 | 29 | |
382c4ade VZ |
30 | #if wxUSE_GUI && (!wxUSE_GRAPHICS_CONTEXT || \ |
31 | ( defined( wxMAC_USE_CORE_GRAPHICS ) && !wxMAC_USE_CORE_GRAPHICS )) | |
fe1a36a7 SC |
32 | # error "OS X builds use CoreGraphics in this wx version, you cannot turn back to QuickDraw completely" |
33 | #endif | |
34 | ||
35 | /* | |
36 | * using mixins of cocoa functionality | |
37 | */ | |
03647350 | 38 | |
935e6c7d SC |
39 | #ifdef __WXOSX_COCOA__ |
40 | #define wxOSX_USE_COCOA 1 | |
41 | #else | |
fe1a36a7 SC |
42 | #define wxOSX_USE_COCOA 0 |
43 | #endif | |
44 | ||
935e6c7d SC |
45 | #ifdef __WXOSX_CARBON__ |
46 | #define wxOSX_USE_CARBON 1 | |
47 | #else | |
48 | #define wxOSX_USE_CARBON 0 | |
49 | #endif | |
50 | ||
fe1a36a7 SC |
51 | /* |
52 | * setting flags according to the platform | |
53 | */ | |
54 | ||
55 | #ifdef __LP64__ | |
56 | #if wxOSX_USE_COCOA == 0 | |
57 | #undef wxOSX_USE_COCOA | |
58 | #define wxOSX_USE_COCOA 1 | |
59 | #endif | |
490315f9 SC |
60 | #if wxOSX_USE_CARBON |
61 | #error "Carbon does not support 64bit" | |
62 | #endif | |
fe1a36a7 | 63 | #define wxOSX_USE_IPHONE 0 |
5c6eb3a8 | 64 | #else |
fe1a36a7 | 65 | #ifdef __WXOSX_IPHONE__ |
fe1a36a7 SC |
66 | #define wxOSX_USE_IPHONE 1 |
67 | #else | |
68 | #define wxOSX_USE_IPHONE 0 | |
fe1a36a7 | 69 | #endif |
5c6eb3a8 | 70 | #endif |
fe1a36a7 SC |
71 | |
72 | /* | |
73 | * combination flags | |
74 | */ | |
03647350 | 75 | |
fe1a36a7 SC |
76 | #if wxOSX_USE_COCOA || wxOSX_USE_CARBON |
77 | #define wxOSX_USE_COCOA_OR_CARBON 1 | |
78 | #else | |
79 | #define wxOSX_USE_COCOA_OR_CARBON 0 | |
80 | #endif | |
81 | ||
82 | #if wxOSX_USE_COCOA || wxOSX_USE_IPHONE | |
83 | #define wxOSX_USE_COCOA_OR_IPHONE 1 | |
84 | #else | |
85 | #define wxOSX_USE_COCOA_OR_IPHONE 0 | |
86 | #endif | |
87 | ||
88 | #if wxOSX_USE_IPHONE | |
89 | #include "wx/osx/iphone/chkconf.h" | |
90 | #elif wxOSX_USE_CARBON | |
91 | #include "wx/osx/carbon/chkconf.h" | |
92 | #elif wxOSX_USE_COCOA | |
93 | #include "wx/osx/cocoa/chkconf.h" | |
94 | #endif | |
95 | ||
e78c47e3 | 96 | #endif /* _WX_OSX_CHKCONF_H_ */ |