Woopsi Version 2 Ideas #4 and Subversion Updates

I’ve updated the Subversion repository with some bugfixes. Nothing particularly exciting, so no new distribution yet. Bugfixes are:

  • Screens can now be the active gadget
  • The system can now only have one active gadget at a time (previously, each screen could have an active window)
  • Doubled the speed of active window switching (system was redrawing twice)
  • Lid events now sent to all gadgets
  • Pad input re-enabled
  • Fixed null pointer crashes if no active gadget was available in some events
  • Replaced mario picture with Simian Zombie logo
  • Added handleFocus() and handleBlur() events
  • Misc other minor fixes

Another version 2 idea - interfaces described by XML files, that Woopsi automatically loads, parses, and turns into functional GUIs. Means writing a basic XML parser, which is a job and a half when you’re used to working with real strings instead of char arrays, but it would make interface creation easier. Not sure how it’d work with wiring up events, though.


ant on 2007-10-21 at 21:58 said:

Hmm, interesting point! I hadn’t considered that.

Jeff on 2007-10-21 at 22:39 said:

(XML is easy to parse, if you use something like libexpat)

Personally, I think this is not a sensible path to pursue, primarily because you end up forcing all of Woopsi to be loaded into every application, even if it does not actually use every last gadget type, because the compiler can’t tell, at compile or even link time, what will be requested in the XML. All applications will end up with the WoopsiAviGadget (if/when it happens :)

If you look at PALib, it is very careful to spread its real functions out over lots of individual source files because thats the granularity provided by the linker for dead-code removal. It tries to only reference a function if your application really wants to use it.

Now, if you had an XML-to-CPP converter, that read in your requested GUI, and wrote out the appropriate C++ classes in much the same way as PGAfx reads in .bmp files and writes out C structs, you’d be on safer ground.