PageRenderTime 28ms CodeModel.GetById 37ms RepoModel.GetById 0ms app.codeStats 0ms

/Dependencies/wxWidgets/docs/doxygen/mainpages/const_cpp.h

https://github.com/goofoo/Helium
C Header | 299 lines | 0 code | 2 blank | 297 comment | 0 complexity | f3d88835e1dccec6aa04a7b388755894 MD5 | raw file
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: const_cpp.h
  3. // Purpose: Preprocessor symbols
  4. // Author: Vadim Zeitlin
  5. // RCS-ID: $Id$
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. /**
  9. @page page_cppconst Preprocessor symbols defined by wxWidgets
  10. These are preprocessor symbols used in the wxWidgets source, grouped
  11. by category (and sorted by alphabetical order inside each category).
  12. All of these macros except for the @c wxUSE_XXX variety is defined if the
  13. corresponding condition is @true and undefined if it isn't, so they should be
  14. always tested using @ifdef_ and not @if_.
  15. @li @ref page_cppconst_guisystem
  16. @li @ref page_cppconst_os
  17. @li @ref page_cppconst_cpu
  18. @li @ref page_cppconst_hardware
  19. @li @ref page_cppconst_compiler
  20. @li @ref page_cppconst_featuretests
  21. @li @ref page_cppconst_msvc_setup_h
  22. @li @ref page_cppconst_miscellaneous
  23. <hr>
  24. @section page_cppconst_guisystem GUI system
  25. @beginDefList
  26. @itemdef{__WINDOWS__, any Windows, you may also use __WXMSW__}
  27. @itemdef{__WIN16__, Win16 API (not supported since wxWidgets 2.6)}
  28. @itemdef{__WIN32__, Win32 API}
  29. @itemdef{__WXBASE__, Only wxBase, no GUI features (same as @c wxUSE_GUI == 0)}
  30. @itemdef{__WXCOCOA__, OS X using wxCocoa Port}
  31. @itemdef{__WXDFB__, wxUniversal using DirectFB}
  32. @itemdef{__WXWINCE__, Windows CE}
  33. @itemdef{__WXGTK__, GTK+}
  34. @itemdef{__WXGTK12__, GTK+ 1.2 or higher}
  35. @itemdef{__WXGTK20__, GTK+ 2.0 or higher}
  36. @itemdef{__WXGTK24__, GTK+ 2.4 or higher}
  37. @itemdef{__WXGTK26__, GTK+ 2.6 or higher}
  38. @itemdef{__WXGTK210__, GTK+ 2.10 or higher}
  39. @itemdef{__WXMAC__, old define for Mac OS X}
  40. @itemdef{__WXMOTIF__, Motif}
  41. @itemdef{__WXMOTIF20__, Motif 2.0 or higher}
  42. @itemdef{__WXMGL__, SciTech Soft MGL (__WXUNIVERSAL__ will be also defined)}
  43. @itemdef{__WXMSW__, Any Windows}
  44. @itemdef{__WXOSX__, any OS X}
  45. @itemdef{__WXOSX_IPHONE__, OS X iPhone}
  46. @itemdef{__WXOSX_CARBON__, Mac OS X using Carbon}
  47. @itemdef{__WXOSX_COCOA__, Mac OS X using Cocoa}
  48. @itemdef{__WXOSX_MAC__, Mac OS X (Carbon or Cocoa)}
  49. @itemdef{__WXOSX_OR_COCOA__, Any Mac OS X port (wxOSX-Carbon, wxOSX-Cocoa or
  50. wxCocoa)}
  51. @itemdef{__WXPALMOS__, PalmOS}
  52. @itemdef{__WXPM__, OS/2 native Presentation Manager}
  53. @itemdef{__WXSTUBS__, Stubbed version ('template' wxWin implementation)}
  54. @itemdef{__WXXT__, Xt; mutually exclusive with WX_MOTIF, not implemented in wxWidgets 2.x}
  55. @itemdef{__WXX11__, wxX11 (__WXUNIVERSAL__ will be also defined)}
  56. @itemdef{__WXWINE__, WINE (i.e. WIN32 on Unix)}
  57. @itemdef{__WXUNIVERSAL__, wxUniversal port, always defined in addition
  58. to one of the symbols above so this should be tested first.}
  59. @itemdef{__X__, any X11-based GUI toolkit except GTK+}
  60. @endDefList
  61. There are two wxWidgets ports to Mac OS X. One of them, wxOSX is the successor of the
  62. venerable wxMac, it currently exists in three versions: Carbon and Cocoa for the
  63. desktop and a very early iPhone port. And there is the Cocoa port named wxCocoa
  64. which has not been updated very actively since beginning 2008. To summarize:
  65. @li If you want to test for wxOSX on the desktop, use
  66. @c __WXOSX_MAC__.
  67. @li If you want to test for wxOSX on the iPhone, use
  68. @c __WXOSX_IPHONE__.
  69. @li If you want to test for any GUI Mac port under OS X, use
  70. @c __WXOSX_OR_COCOA__.
  71. @li If you want to test for any port under Mac OS X, including, for
  72. example, wxGTK and also wxBase, use @c __DARWIN__ (see below).
  73. The convention is to use the @c __WX prefix for these
  74. symbols, although this has not always been followed.
  75. @section page_cppconst_os Operating systems
  76. @beginDefList
  77. @itemdef{__APPLE__, any Mac OS version}
  78. @itemdef{__AIX__, AIX}
  79. @itemdef{__BSD__, Any *BSD system}
  80. @itemdef{__CYGWIN__, Cygwin: Unix on Win32}
  81. @itemdef{__DARWIN__, Mac OS X using the BSD Unix C library
  82. (as opposed to using the Metrowerks MSL C/C++ library)}
  83. @itemdef{__DATA_GENERAL__, DG-UX}
  84. @itemdef{__DOS_GENERAL__, DOS (used with wxMGL only)}
  85. @itemdef{__FREEBSD__, FreeBSD}
  86. @itemdef{__HPUX__, HP-UX (Unix)}
  87. @itemdef{__GNU__, GNU Hurd}
  88. @itemdef{__LINUX__, Linux}
  89. @itemdef{__MACH__, Mach-O Architecture (Mac OS X only builds)}
  90. @itemdef{__OSF__, OSF/1}
  91. @itemdef{__QNX__, QNX Neutrino RTOS}
  92. @itemdef{__PALMOS__, PalmOS}
  93. @itemdef{__SGI__, IRIX}
  94. @itemdef{__SOLARIS__, Solaris}
  95. @itemdef{__SUN__, Any Sun}
  96. @itemdef{__SUNOS__, Sun OS}
  97. @itemdef{__SVR4__, SystemV R4}
  98. @itemdef{__SYSV__, SystemV generic}
  99. @itemdef{__ULTRIX__, Ultrix}
  100. @itemdef{__UNIX__, any Unix}
  101. @itemdef{__UNIX_LIKE__, Unix, BeOS or VMS}
  102. @itemdef{__VMS__, VMS}
  103. @itemdef{__WINDOWS__, any Windows}
  104. @itemdef{__WINE__, Wine}
  105. @itemdef{_WIN32_WCE, Windows CE version}
  106. @endDefList
  107. @section page_cppconst_cpu Hardware architectures (CPU)
  108. Note that not all of these symbols are always defined, it depends on the
  109. compiler used.
  110. @beginDefList
  111. @itemdef{__ALPHA__, DEC Alpha architecture}
  112. @itemdef{__INTEL__, Intel i386 or compatible}
  113. @itemdef{__IA64__, Intel 64 bit architecture}
  114. @itemdef{__POWERPC__, Motorola Power PC}
  115. @endDefList
  116. @section page_cppconst_hardware Hardware type
  117. @beginDefList
  118. @itemdef{__SMARTPHONE__, Generic mobile devices with phone buttons and a small display}
  119. @itemdef{__PDA__, Personal digital assistant, usually with touch screen}
  120. @itemdef{__HANDHELD__, Small but powerful computer, usually with a keyboard}
  121. @itemdef{__POCKETPC__, Microsoft-powered PocketPC devices with touch-screen}
  122. @itemdef{__WINCE_STANDARDSDK__, Microsoft-powered Windows CE devices, for generic Windows CE applications}
  123. @itemdef{__WINCE_NET__, Microsoft-powered Windows CE .NET devices (_WIN32_WCE is 400 or greater)}
  124. @itemdef{WIN32_PLATFORM_WFSP, Microsoft-powered smartphone}
  125. @endDefList
  126. @section page_cppconst_compiler Compilers
  127. @beginDefList
  128. @itemdef{__BORLANDC__, Borland C++. The value of the macro corresponds
  129. to the compiler version: 500 is 5.0.}
  130. @itemdef{__DJGPP__, DJGPP}
  131. @itemdef{__DIGITALMARS__, Digital Mars}
  132. @itemdef{__EVC4__, Embedded Visual C++ 4 (can be only used for building wxWinCE)}
  133. @itemdef{__GNUG__, Gnu C++ on any platform, see also wxCHECK_GCC_VERSION}
  134. @itemdef{__GNUWIN32__, Gnu-Win32 compiler, see also wxCHECK_W32API_VERSION}
  135. @itemdef{__MINGW32__, MinGW}
  136. @itemdef{__MWERKS__, CodeWarrior MetroWerks compiler}
  137. @itemdef{__SUNCC__, Sun CC, see also wxCHECK_SUNCC_VERSION}
  138. @itemdef{__SYMANTECC__, Symantec C++}
  139. @itemdef{__VISAGECPP__, IBM Visual Age (OS/2)}
  140. @itemdef{__VISUALC__, Microsoft Visual C++, see also ::wxCHECK_VISUALC_VERSION.
  141. The value of this macro corresponds to the compiler version:
  142. @c 1020 for @c 4.2 (the first supported version), @c 1100 for
  143. @c 5.0, @c 1200 for @c 6.0 and so on. For convenience, the symbols
  144. __VISUALCn__ are also defined for each major compiler version from
  145. 5 to 10, i.e. you can use tests such @ifdef_ __VISUALC7__ to test
  146. for compiler version being precisely 7.}
  147. @itemdef{__XLC__, AIX compiler}
  148. @itemdef{__WATCOMC__, Watcom C++. The value of this macro corresponds to
  149. the compiler version, @c 1100 is @c 11.0 and @c 1200 is OpenWatcom.}
  150. @endDefList
  151. @section page_cppconst_featuretests Feature tests
  152. Some library features may not be always available even if they were selected
  153. by the user. To make it possible to check if this is the case, the library
  154. predefines the symbols in the form @c wxHAS_FEATURE. Unlike
  155. @c wxUSE_FEATURE symbols which are defined by the library user (directly
  156. in @c setup.h or by running configure script) and which must be always
  157. defined as either 0 or 1, the @c wxHAS symbols are only defined if
  158. the corresponding feature is available and not defined at all otherwise.
  159. Currently the following symbols exist:
  160. @beginDefList
  161. @itemdef{wxHAS_ATOMIC_OPS, Defined if wxAtomicInc() and wxAtomicDec() functions
  162. have an efficient (CPU-specific) implementation. Notice that the functions
  163. themselves are always available but can be prohibitively slow to use when
  164. implemented in a generic way, using a critical section.}
  165. @itemdef{wxHAS_CONFIG_TEMPLATE_RW, Defined if the currently used compiler
  166. supports template Read() and Write() methods in wxConfig.}
  167. @itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in
  168. size (notice that you must include @c wx/filefn.h before testing for this
  169. symbol).}
  170. @itemdef{wxHAS_LARGE_FFILES, Defined if wxFFile supports files more than 4GB in
  171. size (notice that you must include @c wx/filefn.h before testing for this
  172. symbol).}
  173. @itemdef{wxHAS_MULTIPLE_FILEDLG_FILTERS, Defined if wxFileDialog supports multiple ('|'-separated) filters.}
  174. @itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.}
  175. @itemdef{wxHAS_RADIO_MENU_ITEMS,
  176. Defined if the current port supports radio menu items (see wxMenu::AppendRadioItem).}
  177. @itemdef{wxHAS_RAW_BITMAP, Defined if direct access to bitmap data using the classes in @c wx/rawbmp.h is supported.}
  178. @itemdef{wxHAS_RAW_KEY_CODES, Defined if raw key codes (see wxKeyEvent::GetRawKeyCode are supported.}
  179. @itemdef{wxHAS_REGEX_ADVANCED, Defined if advanced syntax is available in wxRegEx.}
  180. @itemdef{wxHAS_TASK_BAR_ICON, Defined if wxTaskBarIcon is available on the current platform.}
  181. @endDefList
  182. @section page_cppconst_msvc_setup_h Libraries selection for MSVC setup.h
  183. Microsoft Visual C++ users may use the special @c wx/setup.h file for this
  184. compiler in @c include/msvc subdirectory. This file implicitly links in all the
  185. wxWidgets libraries using MSVC-specific pragmas which usually is much more
  186. convenient than manually specifying the libraries list in all of the project
  187. configurations. However sometimes linking with all the libraries is not
  188. desirable, for example because some of them were not built and this is where
  189. the symbols in this section can be helpful: defining them allows to not link
  190. with the corresponding library. The following symbols are honoured:
  191. - wxNO_ADV_LIB
  192. - wxNO_AUI_LIB
  193. - wxNO_HTML_LIB
  194. - wxNO_MEDIA_LIB
  195. - wxNO_NET_LIB
  196. - wxNO_PROPGRID_LIB
  197. - wxNO_QA_LIB
  198. - wxNO_RICHTEXT_LIB
  199. - wxNO_XML_LIB
  200. - wxNO_REGEX_LIB
  201. - wxNO_EXPAT_LIB
  202. - wxNO_JPEG_LIB
  203. - wxNO_PNG_LIB
  204. - wxNO_TIFF_LIB
  205. - wxNO_ZLIB_LIB
  206. Notice that the base library is always included and the core is always included
  207. for the GUI applications (i.e. those which don't define @c wxUSE_GUI as 0).
  208. @section page_cppconst_miscellaneous Miscellaneous
  209. @beginDefList
  210. @itemdef{__WXWINDOWS__,
  211. always defined in wxWidgets applications, see also wxCHECK_VERSION}
  212. @itemdef{wxDEBUG_LEVEL, defined as 1 by default, may be pre-defined as 0 before
  213. including wxWidgets headers to disable generation of any code at all
  214. for the assertion macros, see @ref overview_debugging}
  215. @itemdef{__WXDEBUG__, defined if wxDEBUG_LEVEL is 1 or more, undefined otherwise}
  216. @itemdef{wxUSE_XXX,
  217. if defined as 1, feature XXX is active, see the
  218. @ref page_wxusedef (the symbols of this form are always defined,
  219. use @if_ and not @ifdef_ to test for them)}
  220. @itemdef{WX_PRECOMP,
  221. is defined if precompiled headers (PCH) are in use. In
  222. this case, @c wx/wxprec.h includes @c wx/wx.h which, in turn,
  223. includes a number of wxWidgets headers thus making it unnecessary to include
  224. them explicitly. However if this is not defined, you do need to include them
  225. and so the usual idiom which allows to support both cases is to first include
  226. @c wx/wxprec.h} and then, inside @ifndef_ WX_PRECOMP, individual
  227. headers you need.}
  228. @itemdef{_UNICODE and UNICODE, both are defined if wxUSE_UNICODE is set to @c 1}
  229. @itemdef{wxUSE_GUI,
  230. this particular feature test macro is defined to 1
  231. when compiling or using the library with the GUI features activated,
  232. if it is defined as @c 0, only wxBase is available.}
  233. @itemdef{wxUSE_BASE,
  234. only used by wxWidgets internally (defined as 1 when
  235. building wxBase code, either as a standalone library or as part of the
  236. monolithic wxWidgets library, defined as 0 when building GUI library only)}
  237. @itemdef{wxNO_RTTI, is defined if the compiler RTTI support has been switched off}
  238. @itemdef{wxNO_EXCEPTIONS,
  239. is defined if the compiler support for C++ exceptions has been switched off}
  240. @itemdef{wxNO_THREADS,
  241. if this macro is defined, the compilation options
  242. don't include compiler flags needed for multithreaded code generation. This
  243. implies that wxUSE_THREADS is 0 and also that other (non-wx-based) threading
  244. packages cannot be used neither.}
  245. @itemdef{WXMAKINGDLL_XXX,
  246. used internally and defined when building the
  247. library @c XXX as a DLL; when a monolithic wxWidgets build is used only a
  248. single @c WXMAKINGDLL symbol is defined}
  249. @itemdef{WXUSINGDLL,
  250. defined when compiling code which uses wxWidgets as a DLL/shared library}
  251. @itemdef{WXBUILDING,
  252. defined when building wxWidgets itself, whether as a static or shared library}
  253. @itemdef{wxNO_T,
  254. may be predefined to prevent the library from defining _T() macro}
  255. @endDefList
  256. */