[compiz] Extension languages and Compiz.

Robert Carr racarr at beryl-project.org
Thu Apr 26 03:08:08 PDT 2007


My recent work on Compiz-scheme has brought to my attention several
problems preventing a real compiz extension language.

Note that when I refer to an extension language, I am not referring to
the ability to add plugins in some other languages, but more of
something in the vein of emacs lisp.

The major problem right now is extension languages are locked in to
one plugin and what core exposes. What I mean by this is it's easy to
add support for something like:
(window-rule (make-rule (set-opacity-when (window-is tooltipp) 0.5)))
However it's impossible to add support for something like:
(scale-window-when (window-is negativep)).

There are two possible solutions to this:

1. Add basic support for a specific interpreter in core. Core would
expose wrapper functions around the interpreter to easily enable
plugins to add C functions to the interpreter. On one hand, we
probably want to avoid binding core to a specific interpreter, on the
other hand this sounds rather pleasant compared to the alternative.

2. Add an interpreter interface, with wrappable functions for plugins
embedding a specific interpreter to wrap. I think it is abundantly
obvious why such an interface would be unreasonably complex and likely
bug ridden, exposing no specifics of an interpreter to individual
plugins, but still having conversion from interpreter types->native
types (a variable number of arguments per function + return types),
plus adding new types and other constructs is exceedingly difficult,
and complex to the point where I don't think we would want it.

Does anyone else have any thoughts?

Regards,
Robert


More information about the compiz mailing list