[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Effects as plugins
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2007-04-06 18:14:00
Message-ID: 200704062114.00955.rivolaks () hot ! ee
[Download RAW message or body]

Hi!

The attached patch makes it possible to dynamically load effects from plugins.

A bit more detailed changelog:
* EffectWindow and EffectsHandler were split into two. The interface classes 
are now in lib/kwineffects.* , the actual implementation is in *Impl classes 
in effects.*
* glutils* files were moved to lib/kwinglutils*
* Some stuff from utils.* that effects use was moved to lib/kwinglobals.*
* The kwineffects.* , kwinglobals.* and kwinglutils* files are in kwineffects 
libraries, which both kwin and effects link to.
* Instead of being built in, every effect is in it's own library which can be 
loaded at runtime.
* EffectFactory stuff has been replaced by a macro for now. I'm not sure about 
whether or not the factory should still be used. I could use just three 
macros: one for creating effect and two optional ones for checking whether 
effect is supported and getting the config widget.

TODO:
* API additions for OpenGL stuff such as vertices or shaders. Vertex class 
will need to be moved to kwineffects.h
* Loading of default effects. Should be easy.

Questions:
* do I need to call library->unload();  after deleting an effect in 
EffectsHandler::unloadEffect() ?
* I hope *Impl class names are fine

I've also ported two effects to the new system: my presentwindows effect and 
the shadow effect. You can load them using the usual dbus loading methods, 
except that the effect name is either "presentwindows" or "shadow" (i.e. 
lowercase).

To try it, first apply the patch, then extract the other files into the kwin 
source dir.

Rivo

["effects-as-plugins.tar.bz2" (application/x-tbz)]

_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic