features.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /**
  2. * Name: 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)
  7. * Created: 18.03.02
  8. * Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
  9. * Licence: wxWindows licence
  10. */
  11. /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
  12. #ifndef _WX_FEATURES_H_
  13. #define _WX_FEATURES_H_
  14. /* radio menu items are currently not implemented in wxMotif, use this
  15. symbol (kept for compatibility from the time when they were not implemented
  16. under other platforms as well) to test for this */
  17. #if !defined(__WXMOTIF__)
  18. #define wxHAS_RADIO_MENU_ITEMS
  19. #else
  20. #undef wxHAS_RADIO_MENU_ITEMS
  21. #endif
  22. /* the raw keyboard codes are generated under wxGTK and wxMSW only */
  23. #if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__) \
  24. || defined(__WXDFB__)
  25. #define wxHAS_RAW_KEY_CODES
  26. #else
  27. #undef wxHAS_RAW_KEY_CODES
  28. #endif
  29. /* taskbar is implemented in the major ports */
  30. #if defined(__WXMSW__) || defined(__WXCOCOA__) \
  31. || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) \
  32. || defined(__WXOSX_MAC__) || defined(__WXCOCOA__)
  33. #define wxHAS_TASK_BAR_ICON
  34. #else
  35. #undef wxUSE_TASKBARICON
  36. #define wxUSE_TASKBARICON 0
  37. #undef wxHAS_TASK_BAR_ICON
  38. #endif
  39. /* wxIconLocation appeared in the middle of 2.5.0 so it's handy to have a */
  40. /* separate define for it */
  41. #define wxHAS_ICON_LOCATION
  42. /* same for wxCrashReport */
  43. #ifdef __WXMSW__
  44. #define wxHAS_CRASH_REPORT
  45. #else
  46. #undef wxHAS_CRASH_REPORT
  47. #endif
  48. /* wxRE_ADVANCED is not always available, depending on regex library used
  49. * (it's unavailable only if compiling via configure against system library) */
  50. #ifndef WX_NO_REGEX_ADVANCED
  51. #define wxHAS_REGEX_ADVANCED
  52. #else
  53. #undef wxHAS_REGEX_ADVANCED
  54. #endif
  55. /* Pango-based ports and wxDFB use UTF-8 for text and font encodings
  56. * internally and so their fonts can handle any encodings: */
  57. #if wxUSE_PANGO || defined(__WXDFB__)
  58. #define wxHAS_UTF8_FONTS
  59. #endif
  60. /* This is defined when the underlying toolkit handles tab traversal natively.
  61. Otherwise we implement it ourselves in wxControlContainer. */
  62. #ifdef __WXGTK20__
  63. #define wxHAS_NATIVE_TAB_TRAVERSAL
  64. #endif
  65. /* This is defined when the compiler provides some type of extended locale
  66. functions. Otherwise, we implement them ourselves to only support the
  67. 'C' locale */
  68. #if defined(HAVE_LOCALE_T) || \
  69. (wxCHECK_VISUALC_VERSION(8) && !defined(__WXWINCE__))
  70. #define wxHAS_XLOCALE_SUPPORT
  71. #else
  72. #undef wxHAS_XLOCALE_SUPPORT
  73. #endif
  74. /* Direct access to bitmap data is not implemented in all ports yet */
  75. #if defined(__WXGTK20__) || defined(__WXMAC__) || defined(__WXDFB__) || \
  76. defined(__WXMSW__)
  77. /*
  78. These compilers can't deal with templates in wx/rawbmp.h:
  79. - HP aCC for PA-RISC
  80. - Watcom < 1.8
  81. */
  82. #if !wxONLY_WATCOM_EARLIER_THAN(1, 8) && \
  83. !(defined(__HP_aCC) && defined(__hppa))
  84. #define wxHAS_RAW_BITMAP
  85. #endif
  86. #endif
  87. /* also define deprecated synonym which exists for compatibility only */
  88. #ifdef wxHAS_RAW_BITMAP
  89. #define wxHAVE_RAW_BITMAP
  90. #endif
  91. /*
  92. If this is defined, wxEvtHandler::Bind<>() is available (not all compilers
  93. have the required template support for this and in particular under Windows
  94. where only g++ and MSVC >= 7 currently support it.
  95. Recent Sun CC versions support this but perhaps older ones can compile this
  96. code too, adjust the version check if this is the case (unfortunately we
  97. can't easily test for the things used in wx/event.h in configure so we have
  98. to maintain these checks manually). The same applies to xlC 7: perhaps
  99. earlier versions can compile this code too but they were not tested.
  100. */
  101. #if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \
  102. || (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \
  103. || (defined(__xlC__) && __xlC__ >= 0x700) \
  104. || defined(__INTELC__)
  105. #define wxHAS_EVENT_BIND
  106. #endif
  107. #endif /* _WX_FEATURES_H_ */