simpledisplay.d now works on as 64 bit on X
Adam D. Ruppe
destructionator at gmail.com
Sun Jun 2 12:01:50 PDT 2013
I know someone here was asking about my simpledisplay.d on 64 bit
a while ago.. I don't remember who so here's a general
announcement.
I got it working for at least the parts I tried (display image,
get keyboard input) compiled with -m64:
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/simpledisplay.d
Quite a hassle, my xlib binding was apparently almost completely
wrong, and it worked on 32 bit just by sheer luck. Many of the
structs were the wrong sizes even there! General tip to C
porters: do a static assert(S.sizeof) and make sure it matches
what your C program gives. I got snagged in part here because
unsigned long in X is apparently 64 bit. I thought it was the
same as D's uint in all cases.
The file it also depends on color.d from the same repo. Another
minor change is the key event used to take a delegate (int
key){}. Now it takes (int key, bool pressed) instead. There's a
static assert with a reminder message too, so just compile and if
you need it, it will tell you. The (dchar){} event remains the
same as before.
Been a few random bug fixes in the last few months too, timer
events now work right on windows and linux is the big one that
comes to mind.
More information about the Digitalmars-d-announce
mailing list