Nine months ago, I published WacomWebPlugin , a project aiming to implement the Wacom Tablet Plugin API on the Linux OS where the official browser plugin isn't available. The plugin allows websites to make use of tablet features such as pressure-sensitivity. The most well known user of this API is DeviantART's Muro web app.
My initial proof-of-concept was hacked together using the FireBreath framework, which makes it easy to implement cross-platform and cross-browser plugins. I was able to get enough of a plugin working to allow basic pressure-sensitive drawing on Muro. However, the code was crap and was full of repetition and global state. I published it nonetheless.
Over the last couple of days I've had some interest from a curious Githubber wanting to port his notetaking program (hoodle ) to the web, so I've decided to revive and rewrite the project. After updating my copy of FireBreath and being unable to compile the plugin without some modifications, I realised that I don't really need the large FireBreath dependency after all (the plugin will likely only ever target Linux).
I tried out the Nixysa code generator which did work very well in my trials, but ultimately I decided that targetting the NPAPI directly would be the best way forward.
Writing for the NPAPI directly seemed like hell at first; it's hard to find any decent examples, and different browsers have their own subtle differences in implementation. However I managed to get a basic plugin working in Chrome and Firefox, with the only dependencies being the NPAPI and X11 headers. I use the XInput API in a thread to update the tablet properties.
Now I have a plugin that I'm happy to support and maintain into the future.
Once I'm satisfied that it hasn't regressed from the original FireBreath version I will merge the code into
master, but for now it lives on the
NPAPI branch, and is only a
make away from being yours to try out.
Update: This code has now been merged into
master for all to enjoy, see the README for instructions on compiling for your system.