]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/features.h
3 * Purpose: test macros for the features which might be available in some
4 * wxWidgets ports but not others
5 * Author: Vadim Zeitlin
6 * Modified by: Ryan Norton (Converted to C)
9 * Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
10 * Licence: wxWindows licence
13 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
15 #ifndef _WX_FEATURES_H_
16 #define _WX_FEATURES_H_
18 /* radio menu items are currently not implemented in wxMotif, use this
19 symbol (kept for compatibility from the time when they were not implemented
20 under other platforms as well) to test for this */
21 #if !defined(__WXMOTIF__)
22 #define wxHAS_RADIO_MENU_ITEMS
24 #undef wxHAS_RADIO_MENU_ITEMS
27 /* the raw keyboard codes are generated under wxGTK and wxMSW only */
28 #if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__) \
30 #define wxHAS_RAW_KEY_CODES
32 #undef wxHAS_RAW_KEY_CODES
35 /* taskbar is implemented in the major ports */
36 #if defined(__WXMSW__) || defined(__WXCOCOA__) \
37 || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) \
38 || defined(__WXOSX_MAC__) || defined(__WXCOCOA__)
39 #define wxHAS_TASK_BAR_ICON
41 #undef wxUSE_TASKBARICON
42 #define wxUSE_TASKBARICON 0
43 #undef wxHAS_TASK_BAR_ICON
46 /* wxIconLocation appeared in the middle of 2.5.0 so it's handy to have a */
47 /* separate define for it */
48 #define wxHAS_ICON_LOCATION
50 /* same for wxCrashReport */
52 #define wxHAS_CRASH_REPORT
54 #undef wxHAS_CRASH_REPORT
57 /* wxRE_ADVANCED is not always available, depending on regex library used
58 * (it's unavailable only if compiling via configure against system library) */
59 #ifndef WX_NO_REGEX_ADVANCED
60 #define wxHAS_REGEX_ADVANCED
62 #undef wxHAS_REGEX_ADVANCED
65 /* Pango-based ports and wxDFB use UTF-8 for text and font encodings
66 * internally and so their fonts can handle any encodings: */
67 #if wxUSE_PANGO || defined(__WXDFB__)
68 #define wxHAS_UTF8_FONTS
71 /* This is defined when the underlying toolkit handles tab traversal natively.
72 Otherwise we implement it ourselves in wxControlContainer. */
74 #define wxHAS_NATIVE_TAB_TRAVERSAL
77 /* This is defined when the compiler provides some type of extended locale
78 functions. Otherwise, we implement them ourselves to only support the
80 #if defined(HAVE_LOCALE_T) || \
81 (wxCHECK_VISUALC_VERSION(8) && !defined(__WXWINCE__))
82 #define wxHAS_XLOCALE_SUPPORT
84 #undef wxHAS_XLOCALE_SUPPORT
87 /* Direct access to bitmap data is not implemented in all ports yet */
88 #if defined(__WXGTK20__) || defined(__WXMAC__) || defined(__WXDFB__) || \
92 These compilers can't deal with templates in wx/rawbmp.h:
96 #if !wxONLY_WATCOM_EARLIER_THAN(1, 8) && \
97 !(defined(__HP_aCC) && defined(__hppa))
98 #define wxHAS_RAW_BITMAP
102 /* also define deprecated synonym which exists for compatibility only */
103 #ifdef wxHAS_RAW_BITMAP
104 #define wxHAVE_RAW_BITMAP
108 If this is defined, wxEvtHandler::Bind<>() is available (not all compilers
109 have the required template support for this and in particular under Windows
110 where only g++ and MSVC >= 7 currently support it.
112 Recent Sun CC versions support this but perhaps older ones can compile this
113 code too, adjust the version check if this is the case (unfortunately we
114 can't easily test for the things used in wx/event.h in configure so we have
115 to maintain these checks manually). The same applies to xlC 7: perhaps
116 earlier versions can compile this code too but they were not tested.
118 #if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \
119 || (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \
120 || (defined(__xlC__) && __xlC__ >= 0x700)
121 #define wxHAS_EVENT_BIND
125 #endif /* _WX_FEATURES_H_ */