[SDL] adding wacom tablet support to sdl
Danni Coy
danni.coy at gmail.com
Fri Nov 3 17:09:57 PST 2006
I have recently finished doing this for an app I am working on....
It is reasonably easy if not that straight forward...
There is a header file called SDL_syswm.h
This has functions necessary to access events from the underlying
windowing system.... Which means you have to use xlib to initiliase
the tablet and get the input...
http://www.bolthole.com/solaris/drivers/xopen.c
is the only example I can find in the wild.
There are several things you must then do
1) enable WM events that SDL does not understand code should look like this...
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if (( SDL_GetWMInfo(&info) == -1))
{printf("could not get WM Info: %s.\n", SDL_GetError()); use_tablet = 0;}
SDL_EventState(SDL_SYSWMEVENT,SDL_ENABLE);
2) you can now receive wacom events via the SDL_SYSWMEVENT event
remember to use the lock and unlock functions while initialising the Tablet.
Hope that is enough to get you started feel free to ask further questions
More information about the SDL
mailing list