Rewrote timed_thread library in C++ using fancy new C++0x features. The
main reason for this is to phase out poor encapsulation and C-style
function pointers.
Besides improving performance when updating stuff, we ideally have no
text object specific code in update_stuff() anymore (aside some
leftovers).
The macros in construct_text_object() have gotten a bit crazier than
they were before:
* using CALLBACK(&func) instead of an INFO_* parameter to OBJ() will
make it add the given callback to the list of callbacks to be iterated
over at each update interval.
* BEWARE: the above assumes function pointer values to be > 0!
* This implicitly fixes a bug in the code: passing 0 as INFO_* value
led to selecting INFO_MAIL (1 << 0 == 1).
* Now it would select INFO_CPU (== 0), which got unused and therefore is
not a problem at all (the 0 value should be unused in enums anyway).
This needs some more work, then we should be able to drop the whole
INFO_* enum. Then CALLBACK() can die again and with it goes the ugly
casting stuff done to distinguish callbacks from INFO_* values.
Since there is no choice of which moc player to get information from,
all moc objects' data source can be identical. Also hide some internal
data (the thread e.g.). Since from now on there can only be one moc
thread (not highlander ;), we don't need to treat the thread object
specially.
While here, fix indenting.