Author: AlbrechtS Date: 2011-03-02 06:50:00 -0800 (Wed, 02 Mar 2011) New Revision: 594 Log: Added first part of "Preprocessor Variables" section on behalf of Manolo.
Modified: trunk/cmp.php Modified: trunk/cmp.php =================================================================== --- trunk/cmp.php 2011-02-27 15:13:38 UTC (rev 593) +++ trunk/cmp.php 2011-03-02 14:50:00 UTC (rev 594) @@ -1137,6 +1137,60 @@ constants are prohibited aside from the include guard definitions. + +<h2>Preprocessor Variables</h2> + +File config.h and the C++ compilers define a few preprocessor variables +that help organizing platform-specific code +and control access to a few internal classes. Only code internal +to the FLTK library can include the config.h header file. Thus, +FLTK header files that are part of the public API +must not, directly or indirectly, include config.h. + +<ul> +<li>WIN32. This variable identifies the MS-Windows platform (both +for the 32- and 64-bit versions). Don't use _WIN32. + +<li>__CYGWIN__ is defined when FLTK runs on the MS-Windows OS but uses +Cygwin's POSIX emulation features (cygwin1.dll). [more to come...] + +<li>__APPLE__. This variable identifies the Mac OS X platform. + +<li>__APPLE_QUARTZ__ is defined by config.h for the Mac OS X +platform. At present, use of __APPLE_QUARTZ__ is equivalent to +using __APPLE__. This may change in the future if other graphics +systems than Quartz are supported on the Mac OS platform. + +<li>USE_X11. This variable is defined by config.h when Xlib is the +graphics system used. Thus, USE_X11 is defined on all Unix and Linux +platforms, and on Windows, if configure used <tt>--enable-cygwin</tt> +<b>and</b> <tt>--enable-x11</tt>. Xlib-targetted code is also often +delimited without reference to the USE_X11 variable (thus without the +requirement to include config.h) as follows: +<pre><tt>#if defined(WIN32) +#elif defined(__APPLE__) +#else +.. Xlib specific code ... +#endif +</tt></pre> + +<li>USE_XFT is defined by config.h when USE_X11 is defined. +It is set to 1 when the Xft library of scalable, anti-aliased +fonts is used, and to 0 otherwise. + +<li>FL_LIBRARY is defined by the various FLTK library build tools +when the FLTK library itself is compiled. +Application program developers should not define it when compiling +their programs. + +<li>FL_INTERNALS. Application program developers can define +this variable to get access to some internal classes (e.g., the +Fl_X class) if they need it. APIs to these internal classes are +highly subject to changes, though. + +</ul> + + <h2>Miscellaneous</h2> When using <tt>switch</tt> - <tt>case</tt> statements, and your _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
