Plus... SDL uses native types too (mostly int). Would you say that it doesn't work across platforms and languages, too?
No, that was my point. SDL works fine on many plateforms and many languages. But SFML is a clear improvement over SDL in its interface (better abstraction, handier to use, better performances). It doesn't means that if something works it cannot be improved. SDL works. SFML improved it anyway.
SFML binding works, they can be improved anyway.
The main problem, as long as we stay on plateforms with 32bits ints is long. Because if you use a constant size in a binding, it will compile without even a warning. The weird thing will happen at runtime and it will be plateform and compiler dependant.
It will works on plateforms where types are the same size. For different size types, you usually get completely inconsistent results.
Thoses thing will crash if any mistake is made in the conditionnal compilation part which define the type size. As thoses are not strictly defined.
Long size is very inconsistent, especially on 64bits systems. You'll find them in the inrterfaces of text, window and renderwindow. In both cases, the usage of long is not justoified anyway, because code cannot rely on the extra bits anyway or it will loose its portability. Producing code that will crash is some cases is pretty easy.
extern(C) sfWindow* sfWindow_Create(sfVideoMode mode, const char* title, uint style, const sfContextSettings* settings);
Voila !
Use that function in D and you'll be happy in x86 world and x86_64 on windows. You'll fail badly on linux or mac on x86_64. Note that you'll find that in the actual D binding of SFML (even if I did correct that during my update for D2/SFML2 of that binding, I'm still note sure my correction will work on any plateform). I'm pretty sure that similar errors exists in other binding. Because IT IS error prone and almost impossible to fully test for an individual as it require to run tests on many plateforms that may not be available.
Note that you'll not even get a warning as C object files do not contains any type information.
Int will cause the same problem for any attempt to port SFML on a non 32bits int plateform (I did experience that on PICs for exemple, but it is unlikely that SFML will be ported on thoses plateforms).
So I guess that we can assume that int are fixed size in our case. But We must note that some UNIX has 64bits int and SFML binding will probably never work on thoses plateforms (notably solaris on Sparc) if we assume that. It have the advantage to keep modification to the actual interface very limited.
wchar_t is also inconsistent. But I guess the whole wchar_t is the problem here, and that SFML can do very little about it.