chkconf.h 2.0 KB

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