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