]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/chkconf.h
Harmonize wxDataViewCtrl::GetSelection() behaviour in all ports.
[wxWidgets.git] / include / wx / osx / chkconf.h
CommitLineData
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 * disable the settings which don't work for some compilers
26 */
27
28#if defined(__MWERKS__)
29 #undef wxUSE_DEBUG_NEW_ALWAYS
30 #define wxUSE_DEBUG_NEW_ALWAYS 0
31
32 /* DS: Fixes compilation when wxUSE_ON_FATAL_EXCEPTION is 1 */
33 #ifndef wxTYPE_SA_HANDLER
34 #define wxTYPE_SA_HANDLER int
35 #endif
36#endif
37
38/*
39 * check graphics context option, must be on for every os x platform
40 * we only use core graphics now on all builds, try to catch attempts
41 * to configure the build otherwise and give error messages
42 */
03647350 43
382c4ade
VZ
44#if wxUSE_GUI && (!wxUSE_GRAPHICS_CONTEXT || \
45 ( defined( wxMAC_USE_CORE_GRAPHICS ) && !wxMAC_USE_CORE_GRAPHICS ))
fe1a36a7
SC
46# error "OS X builds use CoreGraphics in this wx version, you cannot turn back to QuickDraw completely"
47#endif
48
49/*
50 * using mixins of cocoa functionality
51 */
03647350 52
935e6c7d
SC
53#ifdef __WXOSX_COCOA__
54 #define wxOSX_USE_COCOA 1
55#else
fe1a36a7
SC
56 #define wxOSX_USE_COCOA 0
57#endif
58
935e6c7d
SC
59#ifdef __WXOSX_CARBON__
60 #define wxOSX_USE_CARBON 1
61#else
62 #define wxOSX_USE_CARBON 0
63#endif
64
fe1a36a7
SC
65/*
66 * setting flags according to the platform
67 */
68
69#ifdef __LP64__
70 #if wxOSX_USE_COCOA == 0
71 #undef wxOSX_USE_COCOA
72 #define wxOSX_USE_COCOA 1
73 #endif
490315f9
SC
74 #if wxOSX_USE_CARBON
75 #error "Carbon does not support 64bit"
76 #endif
fe1a36a7 77 #define wxOSX_USE_IPHONE 0
5c6eb3a8 78#else
fe1a36a7 79 #ifdef __WXOSX_IPHONE__
fe1a36a7
SC
80 #define wxOSX_USE_IPHONE 1
81 #else
82 #define wxOSX_USE_IPHONE 0
fe1a36a7 83 #endif
5c6eb3a8 84#endif
fe1a36a7
SC
85
86/*
87 * combination flags
88 */
03647350 89
fe1a36a7
SC
90#if wxOSX_USE_COCOA || wxOSX_USE_CARBON
91 #define wxOSX_USE_COCOA_OR_CARBON 1
92#else
93 #define wxOSX_USE_COCOA_OR_CARBON 0
94#endif
95
96#if wxOSX_USE_COCOA || wxOSX_USE_IPHONE
97 #define wxOSX_USE_COCOA_OR_IPHONE 1
98#else
99 #define wxOSX_USE_COCOA_OR_IPHONE 0
100#endif
101
102#if wxOSX_USE_IPHONE
103 #include "wx/osx/iphone/chkconf.h"
104#elif wxOSX_USE_CARBON
105 #include "wx/osx/carbon/chkconf.h"
106#elif wxOSX_USE_COCOA
107 #include "wx/osx/cocoa/chkconf.h"
108#endif
109
e78c47e3 110#endif /* _WX_OSX_CHKCONF_H_ */