Albrecht:

you and I had decided a few weeks ago to update the CMP
with a description of the preprocessor variables used in the
FLTK code. I suggest to add the following text, in file
www/trunk/cmp.php (I have no write access to it), just before
the (unique) Miscellaneous subheading. Changes/extensions welcome.



<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
the Xlib graphics system. When __CYGWIN__ is defined, WIN32 is also defined.

<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. Xlib-targetted code is also often delimited without
reference to the USE_X11 variable (thus without requirement
of inclusion of 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>

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to