On 02.04.2010, at 15:21, Ian MacArthur wrote:
Albrecht's commit asked:
> 
> New Revision: 7408
> Log:
> Some Linux-specific fixes, but doesn't compile anyway.
> 
> Todo: fltk3/x.H needs a typedef for NativeWindow, but I don't know what
> would be the right one ("Window", "XID", or anything else?).
> 
> 
> -- My take on this, and I could well be wrong, is that for X11, the typedef 
> for NativeWindow would be an X11 Window...
> 
> But that's a bit of a pain, since we already have an object called Window, so 
> we need to disambiguate that everywhere...
> 
> e.g. if I apply the typedef, then make, the lib does build (very noisily) and 
> if I then try and make hello....

Looking at fltk-2, Bill already saw (and solved) the issue:

/** \file

Declarations of FLTK symbols and interfaces that only exist if FLTK
is compiled to use X11, as it is by default on Unix. It is recommended
you avoid using this header file, and that you segregate code requiring
it to it's own source file.

This header includes the Xlib.h, Xutil.h, Xatom.h, XInput.h, and XI.h
header files, with sufficent wrappers to avoid conflicts with FLTK.
In particular a macro is used so that "Window" is replaced by "XWindow"
in these headers. You should use this rather than including the X
header files directly.

*/

#ifndef fltk_x11_h
# define fltk_x11_h

////////////////////////////////////////////////////////////////
// Try to get the parts of Xlib.h included while avoiding warnings:

#  ifndef DOXYGEN
#   define Window XWindow
#   include <X11/Xlib.h>
#   include <X11/Xutil.h>
#   include <X11/Xatom.h>
(...)
#   include <X11/extensions/XInput.h>
#   include <X11/extensions/XI.h>
#   undef Window
#  endif // !DOXYGEN
#include "draw.h"

namespace fltk {

(...)



> (I bloody hate "using namespace blah" by the way... It completely negates the 
> usefulness of namespaces...)

It is entirely optional. The better option is probably to write something like 
"namespace fl = fltk3;" and easily upgrade to fltk4 later... .

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

Reply via email to