Splendid
I’ve almost reached a usable setup. I’ve tried to make it as simple and seamless as possible.
There’s a singleton class GraphicsTabletSystem which handles all the system callbacks and what-not. That’s not something you have to worry about, it will get created and destroyed automatically as it is required.
All you have to do is create somewhere a TabletContext, and configure it (the configuration controls need a bit of work to be more useful, but so far they are functional). Then a simple call to myContext.open() will create a context for the device and start recieving messages. All you have to do to access these messages is myContext.addListener( TabletContextListener* ). There, you have callbacks for things like the cursor moving, buttons pressed/released, proximity changes (e.g. pen being lifted away from the tablet), pressure changes, cursor changes (e.g. pen/eraser) etc…
It’ll be pretty damned simple compared to the WinTab interface! Hopefully someone would be able to port it over to the other platforms. There are WinTab implementations for the others, afaik, but i have no alternative system to build on!