KWin::EffectPluginFactory Class
| Header: | #include <effect/effect.h> |
| CMake: | find_package(KWin REQUIRED)target_link_libraries(mytarget PRIVATE KWin::kwin) |
Public Functions
| EffectPluginFactory() | |
| virtual KWin::Effect * | createEffect() const = 0 |
| virtual bool | enabledByDefault() const |
| virtual bool | isSupported() const |
Detailed Description
Prefer the KWIN_EFFECT_FACTORY macros.
Member Function Documentation
EffectPluginFactory::EffectPluginFactory()
Default constructs the plugin factory.
[pure virtual] KWin::Effect *EffectPluginFactory::createEffect() const
This method returns the created Effect.
[virtual] bool EffectPluginFactory::enabledByDefault() const
Returns whether the Effect should get enabled by default.
This function provides a way for an effect to override the default at runtime, e.g. based on the capabilities of the hardware.
This method is optional; the effect doesn't have to provide it.
Note that this function is only called if the supported() function returns true, and if X-KDE-PluginInfo-EnabledByDefault is set to true in the .desktop file.
This method is optional, by default true is returned.
[virtual] bool EffectPluginFactory::isSupported() const
Returns whether the Effect is supported.
An Effect can implement this method to determine at runtime whether the Effect is supported.
If the current compositing backend is not supported it should return false.
This method is optional, by default true is returned.