Hi!
I just have a suggestion how to get rid of the windows.h-includes in the sfml-header-files (like in thread.hpp or mutex.hpp).
The problem I have is that the windows.h massively pollutes the global namespaces, first by hundreds of functions and types and second, even worse, by dozens of macros like "max" (which prohibits the use of std::max).
The solution I propose is the following:
The windows.h in the header-files is needed only (as far as I see it) for win-types like "HANDLE" or "CRITICAL_SECTION" which are class-members of classes like sf::Thread or sf::Mutex.
So, if we want to get rid of the windows.h in the header-files, we'll have to replace those variable-types by types which aren't declared in the windows.h.
Replacing the HANDLE-type is easy since it's just a typedef to a pointer to something. We just would have to replace "HANDLE" in the header-file by "void*", include the windows.h in the cpp-file instead of the header and cast around (cast a lot, I admit) the void* to HANDLE in the cpp-file at every access to this variable.
Replacing ODTs like CRITICAL_SECTION is quite more complicated since this is a structure with actual members. My suggestion is to declare a private binary-equal structure inside the class; the substitude-structure of course must contain types like long, int and whatever. Since the winapi-functions always take pointers to structures like CRITICAL_SECTION, a simple cast again should do the thing as long as our replacement-structure is at least as big (in size in bytes) as the original CRITICAL_SECTION.
So: What do you think of this?
edit: I suppose that replacing the "CRITICAL_SECTION"-type could be done by just using "char[24]" and something equal to "BOOST_STATIC_ASSERT( sizeof(cs_mem_var) >= sizeof(CRITICAL_SECTION )" in the implementation-file.
edit: As far as I can see, only 3 header-files include the windows.h (SocketHelper, Mutex, Thread). I could do it and send someone the new sources if someone would like that.
edit: Ok, at least the the min- and max- macros from windows.h are prohibited with #define NOMINMAX, nevertheless there are enough other macros.