Emulith, my
ETH / Diser Lilith emulator [...]
Don't use xlib. Use a real toolkit.
You're wasting a lot of time in
both reinventing old wheels and in code terms by handling stuff
that's already dealt with by nice quick libraries...
Xlib-based code can't be faster than toolkit-based code, unless the
former has inefficiencies; this is obvious because the tookits
themselves are Xlib-based. (Well, unless the toolkit is written in a
more efficient language than the implementation; since Xlib is a C
binding, this is unlikely to be the case, especially here.)
There is some force to the wheel-reinvention argument, but it's also
often the case that the wheels provided by the toolkit are a bad match
to the application (to varying degrees), so it's a question of whether
it's better to build a wheel that does just what the application wants
or to use a preexisting wheel that doesn't quite. Without knowing more
about the specifics of this case, I couldn't offer an opinion on which
this is.
Also, the toolkits often are themselves pretty horrible code; I recall
the shudders that came over me, years ago, when I looked at the Xt API
and saw that it depended on casting from a pointer to an integer and
back to preserve the pointer (or was it the other way around, integer
to pointer and back? I forget).
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at
rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B