[compiz] new meta data system

David Reveman davidr at novell.com
Wed Apr 25 09:21:04 PDT 2007


The most important parts of the new meta data system is now in place.
Some of you might have seen that all core options, the annotate plugin
and the resize plugin have been updated to use it.

The meta data system allow us to reduce the amount of code in the core
and plugins. It makes adding new options much easier. It allows plugin
and application developers to add any additional meta data they find
useful without the need to modify the core. It makes it easy and
convenient to provide meta data in a separate file that can be used by
configuration systems for offline reading.

All this without removing any flexibility previously provided. Plugins
are not required to use this new meta data system but it's highly
recommended. You're not required to provide an xml file with meta data
for your plugins. You can put all meta data you like to provide in the
source code and only allow reading of it at run time but for
configuration systems that allow manipulation of options when compiz
isn't running the xml file is useful and it is recommended to provide
one.

Commit 5c97749750e150187775e90b1c7fb2a6f47241bd (Update resize plugin to
use new metadata system) is a good example of how to update a plugin to
use the new meta data system.

Commit 08126fab8609a3289943e64308bfba1b1e61d89d (Add resize mode option
to resize plugin) shows how easy it is to add a new option when you're
using the meta data system.

To do:

- All plugins in the fdo repo should be updated to use the meta data
system.
- Option description fields should be removed from the CompOption struct
and only provided through the meta data system. Requires minor updates
to some plugins (e.g. dbus).
- Plugin description fields should be removed from the plugin VTable
struct and only provided through the meta data system.
- Plugin dependencies should be removed from the plugin VTable struct
and only provided through the meta data system.
- Methods that allow reading of meta data for core and plugins at
run-time should be added to the dbus plugin.
- gconf-dump plugin and gconf schema generation should be replaced by a
simple XSLT description.

- David



More information about the compiz mailing list