[Tuxpaint-devel] Tux Paint 'Magic' tools turning into plugin architecture
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Bill K. <nb...@so...> - 2007-07-04 05:55:18
|
I'm putting together a basic (for now) plugin API in Tux Paint 0.9.18 that will replace the hard-coded Magic tool code in tuxpaint.c. A new 'magic' subfolder has been added to the project, with its own Makefile and 'images' subfolder full of icons. I've ported the 'Negative' tool, so far. The code uses SDL's "SDL_LoadObject()" function, and friends (found prototyped in SDL_loadso.h). The 'magic' folder generates ".so" files on Linux, which are then placed in /usr/[local/]lib/tuxpaint/. That directory is scanned by Tux Paint at startup, and any object files it can find and open, and query for the proper set of functions, will appear as Magic tools in Tux Paint. It's all very rough, and somewhat broken, but it was all written while in transit on trains today, on my 100mi trek back from work. Comments? (Other than, "you're insane", thank you :) ) -- -bill! bi...@ne... http://www.newbreedsoftware.com/ |