[compiz] BCOP: The Beryl/Compiz XML options parser

Dennis Kasprzyk onestone at beryl-project.org
Mon Mar 5 10:17:45 PST 2007


Adding new options to a plugin is a pain. There is a lot of code that has 
allways to be changed for that. This is the reason why I've created the 
Beryl/Compiz XML options parser (bcop). Bcop allows you easily to describe 
options in XML and will autogenerate the needed Beryl/Compiz C code for you. 
The only think that needs to be changed in a existing plugins is to include 
the xxx_options.h file. The autogenerated code appends the new options to the 
existing options, this gives the possibility to handle some special cases in 
the plugin directly.

I have not found the time to write a README that describes the functionality, 
but there is a "example.options" file ("bcop [--compiz] example.options" will 
generate example_options.h and example_options.c). The most interesting parts 
are the automatic handling of restricted strings (type="enum") as enum and 
the handling of restricted string lists (type="selection") as masks. Reading 
the autogenerated code should not be that hard.

The group,subgroup and hints XML keys are only used for beryl code generation.

I have also added a new version of my generic plugins Makefile that now 
handles Beryl and Compiz, multiple source files and the bcop interface.

You can checkout the code from Beryl svn with:
svn co svn://svn.beryl-project.org/beryl/trunk/bcop/ 

The whole system is not well tested yet. I've created a bcop component in the 
beryl bug tracker at http://bugs.beryl-project.org please report bugs and 
problems there.

Dennis "onestone" Kasprzyk



More information about the compiz mailing list