• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KWinLibraries

KWin effects library


Detailed Description

KWin effects library contains necessary classes for creating new KWin compositing effects.

Creating new effects

This example will demonstrate the basics of creating an effect. We'll use CoolEffect as the class name, cooleffect as internal name and "Cool Effect" as user-visible name of the effect.

This example doesn't demonstrate how to write the effect's code. For that, see the documentation of the Effect class.

CoolEffect class

First you need to create CoolEffect class which has to be a subclass of KWin::Effect. In that class you can reimplement various virtual methods to control how and where the windows are drawn.

KWIN_EFFECT macro

To make KWin aware of your new effect, you first need to use the KWIN_EFFECT macro to connect your effect's class to it's internal name. The internal name is used by KWin to identify your effect. It can be freely chosen (although it must be a single word), must be unique and won't be shown to the user. For our example, you would use the macro like this:
 KWIN_EFFECT(cooleffect, CoolEffect)

Buildsystem

To build the effect, you can use the KWIN_ADD_EFFECT() cmake macro which can be found in effects/CMakeLists.txt file in KWin's source. First argument of the macro is the name of the library that will contain your effect. Although not strictly required, it is usually a good idea to use the same name as your effect's internal name there. Following arguments to the macro are the files containing your effect's source. If our effect's source is in cooleffect.cpp, we'd use following:
  KWIN_ADD_EFFECT(cooleffect cooleffect.cpp)

This macro takes care of compiling your effect. You'll also need to install your effect's .desktop file, so the example CMakeLists.txt file would be as follows:

  KWIN_ADD_EFFECT(cooleffect cooleffect.cpp)
  install( FILES cooleffect.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin )

Effect's .desktop file

You will also need to create .desktop file to set name, description, icon and other properties of your effect. Important fields of the .desktop file are:
  • Name User-visible name of your effect
  • Icon Name of the icon of the effect
  • Comment Short description of the effect
  • Type must be "Service"
  • X-KDE-ServiceTypes must be "KWin/Effect"
  • X-KDE-PluginInfo-Name effect's internal name as passed to the KWIN_EFFECT macro plus "kwin4_effect_" prefix
  • X-KDE-PluginInfo-Category effect's category. Should be one of Appearance, Accessibility, Window Management, Demos, Tests, Misc
  • X-KDE-PluginInfo-EnabledByDefault whether the effect should be enabled by default (use sparingly). Default is false
  • X-KDE-Library name of the library containing the effect. This is the first argument passed to the KWIN_ADD_EFFECT macro in cmake file plus "kwin4_effect_" prefix.
Example cooleffect.desktop file follows:
[Desktop Entry]
Name=Cool Effect
Comment=The coolest effect you've ever seen
Icon=preferences-system-windows-effect-cooleffect

Type=Service
X-KDE-ServiceTypes=KWin/Effect
X-KDE-PluginInfo-Author=My Name
X-KDE-PluginInfo-Email=my@email.here
X-KDE-PluginInfo-Name=kwin4_effect_cooleffect
X-KDE-PluginInfo-Category=Misc
X-KDE-Library=kwin4_effect_cooleffect

Accessing windows and workspace

Effects can gain access to the properties of windows and workspace via EffectWindow and EffectsHandler classes.

There is one global EffectsHandler object which you can access using the effects pointer. For each window, there is an EffectWindow object which can be used to read window properties such as position and also to change them.

For more information about this, see the documentation of the corresponding classes.


Classes

class  KWin::Effect
 Base class for all KWin effects. More...
class  KWin::EffectsHandler
 Manager class that handles all the effects. More...
class  KWin::EffectWindow
 Representation of a window used by/for Effect classes. More...
class  KWin::EffectWindowGroup
class  KWin::GlobalShortcutsEditor
class  KWin::Motion< T >
 A single motion dynamics object. More...
class  KWin::PaintClipper
 Helper class for restricting painting area only to allowed area. More...
class  KWin::PaintClipper::Iterator
 Helper class to perform the clipped painting. More...
class  KWin::RotationData
class  KWin::ScreenPaintData
class  KWin::ScreenPrePaintData
class  KWin::TimeLine
 Wrapper class for using timelines in KWin effects. More...
class  KWin::WindowMotionManager
 Helper class for motion dynamics in KWin effects. More...
class  KWin::WindowPaintData
class  KWin::WindowPrePaintData
class  KWin::WindowQuad
 Class representing one area of a window. More...
class  KWin::WindowQuadList
class  KWin::WindowVertex
 Vertex class. More...

Defines

#define KWIN_EFFECT(name, classname)
#define KWIN_EFFECT_API_MAKE_VERSION(major, minor)   (( major ) << 8 | ( minor ))
#define KWIN_EFFECT_API_VERSION
#define KWIN_EFFECT_API_VERSION_MAJOR   0
#define KWIN_EFFECT_API_VERSION_MINOR   56
#define KWIN_EFFECT_CONFIG(name, classname)
#define KWIN_EFFECT_CONFIG_FACTORY   K_PLUGIN_FACTORY_DECLARATION(EffectFactory)
#define KWIN_EFFECT_SUPPORTED(name, function)

Enumerations

enum  KWin::Effect::ReconfigureFlag { KWin::Effect::ReconfigureAll = 1 << 0 }
enum  KWin::RotationData::RotationAxis { KWin::RotationData::XAxis, KWin::RotationData::YAxis, KWin::RotationData::ZAxis }
enum  KWin::WindowQuadType { KWin::WindowQuadError, KWin::WindowQuadContents, KWin::WindowQuadDecoration }

Functions

virtual void KWin::EffectsHandler::activateWindow (EffectWindow *c)=0
virtual Effect * KWin::EffectsHandler::activeFullScreenEffect () const =0
virtual int KWin::EffectsHandler::activeScreen () const =0
virtual EffectWindow * KWin::EffectsHandler::activeWindow () const =0
void KWin::TimeLine::addProgress (const double progress)
virtual void KWin::EffectWindow::addRepaint (int x, int y, int w, int h)=0
virtual void KWin::EffectWindow::addRepaint (const QRect &r)=0
virtual void KWin::EffectsHandler::addRepaint (int x, int y, int w, int h)=0
virtual void KWin::EffectsHandler::addRepaint (const QRegion &r)=0
virtual void KWin::EffectsHandler::addRepaint (const QRect &r)=0
virtual void KWin::EffectWindow::addRepaintFull ()=0
virtual void KWin::EffectsHandler::addRepaintFull ()=0
void KWin::TimeLine::addTime (const int msec)
static double KWin::Effect::animationTime (int defaultTime)
static double KWin::Effect::animationTime (const KConfigGroup &cfg, const QString &key, int defaultTime)
virtual double KWin::EffectsHandler::animationTimeFactor () const =0
void KWin::WindowMotionManager::apply (EffectWindow *w, WindowPaintData &data)
bool KWin::WindowMotionManager::areWindowsMoving ()
virtual bool KWin::Effect::borderActivated (ElectricBorder border)
double KWin::WindowQuad::bottom () const
QRect KWin::PaintClipper::Iterator::boundingRect () const
virtual WindowQuadList KWin::EffectWindow::buildQuads () const =0
virtual void KWin::EffectsHandler::calcDesktopLayout (int *x, int *y, Qt::Orientation *orientation) const =0
void KWin::WindowMotionManager::calculate (int time)
void KWin::Motion::calculate (const int msec)
virtual QString KWin::EffectWindow::caption () const =0
virtual void KWin::EffectsHandler::checkElectricBorder (const QPoint &pos, Time time)=0
virtual QRect KWin::EffectsHandler::clientArea (clientAreaOption, const QPoint &p, int desktop) const =0
virtual QRect KWin::EffectsHandler::clientArea (clientAreaOption, const EffectWindow *c) const =0
virtual QRect KWin::EffectsHandler::clientArea (clientAreaOption, int screen, int desktop) const =0
static bool KWin::PaintClipper::clip ()
virtual void KWin::EffectsHandler::closeTabBox ()=0
CompositingType KWin::EffectsHandler::compositingType () const
virtual QRect KWin::EffectWindow::contentsRect () const =0
virtual Window KWin::EffectsHandler::createFullScreenInputWindow (Effect *e, const QCursor &cursor)
Window KWin::EffectsHandler::createInputWindow (Effect *e, const QRect &r, const QCursor &cursor)
virtual Window KWin::EffectsHandler::createInputWindow (Effect *e, int x, int y, int w, int h, const QCursor &cursor)=0
virtual int KWin::EffectsHandler::currentDesktop () const =0
virtual int KWin::EffectsHandler::currentTabBoxDesktop () const =0
virtual QList< int > KWin::EffectsHandler::currentTabBoxDesktopList () const =0
virtual EffectWindow * KWin::EffectsHandler::currentTabBoxWindow () const =0
virtual EffectWindowList KWin::EffectsHandler::currentTabBoxWindowList () const =0
virtual QPoint KWin::EffectsHandler::cursorPos () const =0
static QPoint KWin::Effect::cursorPos ()
double KWin::Motion::decay () const
bool KWin::WindowQuad::decoration () const
virtual int KWin::EffectWindow::desktop () const =0
virtual void KWin::Effect::desktopChanged (int old)
virtual int KWin::EffectsHandler::desktopDown (int desktop, bool wrap) const =0
virtual QString KWin::EffectsHandler::desktopName (int desktop) const =0
virtual int KWin::EffectsHandler::desktopToLeft (int desktop, bool wrap) const =0
virtual int KWin::EffectsHandler::desktopToRight (int desktop, bool wrap) const =0
virtual int KWin::EffectsHandler::desktopUp (int desktop, bool wrap) const =0
virtual void KWin::EffectsHandler::destroyInputWindow (Window w)=0
virtual void KWin::EffectWindow::disablePainting (int reason)=0
static int KWin::Effect::displayHeight ()
static int KWin::Effect::displayWidth ()
T KWin::Motion::distance () const
virtual void KWin::EffectsHandler::drawWindow (EffectWindow *w, int mask, QRegion region, WindowPaintData &data)=0
virtual void KWin::Effect::drawWindow (EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
int KWin::TimeLine::duration () const
 KWin::Effect::Effect ()
static KConfigGroup KWin::EffectsHandler::effectConfig (const QString &effectname)
 KWin::EffectsHandler::EffectsHandler (CompositingType type)
 KWin::EffectWindow::EffectWindow ()
virtual void KWin::EffectWindow::enablePainting (int reason)=0
WindowQuadList KWin::WindowQuadList::filterOut (WindowQuadType type) const
virtual EffectWindow * KWin::EffectWindow::findModal ()=0
virtual EffectWindow * KWin::EffectsHandler::findWindow (WId id) const =0
void KWin::Motion::finish ()
virtual QRect KWin::EffectWindow::geometry () const =0
virtual void KWin::Effect::grabbedKeyboardEvent (QKeyEvent *e)
virtual bool KWin::EffectsHandler::grabKeyboard (Effect *effect)=0
virtual const EffectWindowGroup * KWin::EffectWindow::group () const =0
bool KWin::EffectWindow::hasDecoration () const
virtual bool KWin::EffectWindow::hasOwnShape () const =0
virtual int KWin::EffectWindow::height () const =0
virtual QPixmap KWin::EffectWindow::icon () const =0
virtual QRect KWin::EffectWindow::iconGeometry () const =0
KWIN_EXPORT QRect KWin::infiniteRegion ()
static double KWin::Effect::interpolate (double x, double y, double a)
virtual bool KWin::EffectWindow::isComboBox () const =0
virtual bool KWin::EffectWindow::isDeleted () const =0
virtual bool KWin::EffectWindow::isDesktop () const =0
virtual bool KWin::EffectWindow::isDialog () const =0
virtual bool KWin::EffectWindow::isDNDIcon () const =0
virtual bool KWin::EffectWindow::isDock () const =0
bool KWin::PaintClipper::Iterator::isDone ()
virtual bool KWin::EffectWindow::isDropdownMenu () const =0
virtual bool KWin::EffectWindow::isManaged () const =0
bool KWin::WindowMotionManager::isManaging (EffectWindow *w)
virtual bool KWin::EffectWindow::isMenu () const =0
virtual bool KWin::EffectWindow::isMinimized () const =0
virtual bool KWin::EffectWindow::isModal () const =0
virtual bool KWin::EffectWindow::isMovable () const =0
virtual bool KWin::EffectWindow::isMovableAcrossScreens () const =0
virtual bool KWin::EffectWindow::isNormalWindow () const =0
virtual bool KWin::EffectWindow::isNotification () const =0
virtual bool KWin::EffectWindow::isOnAllDesktops () const =0
virtual bool KWin::EffectWindow::isOnCurrentDesktop () const
virtual bool KWin::EffectWindow::isOnDesktop (int d) const
virtual bool KWin::EffectWindow::isPaintingEnabled ()=0
virtual bool KWin::EffectWindow::isPopupMenu () const =0
virtual bool KWin::EffectWindow::isSpecialWindow () const =0
virtual bool KWin::EffectWindow::isSplash () const =0
virtual bool KWin::EffectWindow::isToolbar () const =0
virtual bool KWin::EffectWindow::isTooltip () const =0
virtual bool KWin::EffectWindow::isTopMenu () const =0
bool KWin::WindowQuadList::isTransformed () const
bool KWin::WindowQuad::isTransformed () const
virtual bool KWin::EffectWindow::isUserMove () const =0
virtual bool KWin::EffectWindow::isUserResize () const =0
virtual bool KWin::EffectWindow::isUtility () const =0
double KWin::WindowQuad::left () const
virtual EffectWindowList KWin::EffectWindow::mainWindows () const =0
void KWin::WindowQuadList::makeArrays (float **vertices, float **texcoords) const
WindowQuadList KWin::WindowQuadList::makeGrid (int maxquadsize) const
WindowQuadList KWin::WindowQuadList::makeRegularGrid (int xSubdivisions, int ySubdivisions) const
WindowQuad KWin::WindowQuad::makeSubQuad (double x1, double y1, double x2, double y2) const
void KWin::WindowMotionManager::manage (EffectWindowList list)
void KWin::WindowMotionManager::manage (EffectWindow *w)
EffectWindowList KWin::WindowMotionManager::managedWindows () const
bool KWin::WindowMotionManager::managingWindows ()
virtual EffectWindowList KWin::EffectWindowGroup::members () const =0
 KWin::Motion::Motion (T initial=T(), double strength=7.5, double decay=0.5)
 KWin::Motion::Motion (const Motion< T > &other)
virtual void KWin::Effect::mouseChanged (const QPoint &pos, const QPoint &oldpos, Qt::MouseButtons buttons, Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers)
void KWin::WindowVertex::move (double x, double y)
void KWin::WindowMotionManager::moveWindow (EffectWindow *w, QRect target)
void KWin::WindowMotionManager::moveWindow (EffectWindow *w, QPoint target, double scale=1.0, double yScale=0.0)
virtual void KWin::EffectsHandler::moveWindow (EffectWindow *w, const QPoint &pos)=0
void KWin::PaintClipper::Iterator::next ()
virtual int KWin::EffectsHandler::numberOfDesktops () const =0
virtual int KWin::EffectsHandler::numScreens () const =0
virtual double KWin::EffectWindow::opacity () const =0
const WindowVertex & KWin::WindowQuad::operator[] (int index) const
WindowVertex & KWin::WindowQuad::operator[] (int index)
virtual bool KWin::EffectsHandler::optionRollOverDesktops () const =0
double KWin::WindowQuad::originalBottom () const
double KWin::WindowQuad::originalLeft () const
double KWin::WindowQuad::originalRight () const
double KWin::WindowQuad::originalTop () const
double KWin::WindowVertex::originalX () const
double KWin::WindowVertex::originalY () const
static QRegion KWin::PaintClipper::paintArea ()
virtual void KWin::EffectsHandler::paintScreen (int mask, QRegion region, ScreenPaintData &data)=0
virtual void KWin::Effect::paintScreen (int mask, QRegion region, ScreenPaintData &data)
bool KWin::EffectsHandler::paintText (const QString &text, const QRect &rect, const QColor &color, const QFont &font=QFont(), const Qt::Alignment &alignment=Qt::AlignCenter)
bool KWin::EffectsHandler::paintText (const QString &text, const QPoint &center, int maxwidth, const QColor &color, const QFont &font=QFont())
bool KWin::EffectsHandler::paintTextWithBackground (const QString &text, const QRect &rect, const QColor &color, const QColor &bgcolor, const QFont &font=QFont(), const Qt::Alignment &alignment=Qt::AlignCenter)
bool KWin::EffectsHandler::paintTextWithBackground (const QString &text, const QPoint &center, int maxwidth, const QColor &color, const QColor &bgcolor, const QFont &font=QFont())
virtual void KWin::EffectsHandler::paintWindow (EffectWindow *w, int mask, QRegion region, WindowPaintData &data)=0
virtual void KWin::Effect::paintWindow (EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
static void KWin::PaintClipper::pop (const QRegion &allowed_area)
virtual GLRenderTarget * KWin::EffectsHandler::popRenderTarget ()=0
virtual QPoint KWin::EffectWindow::pos () const =0
virtual void KWin::EffectsHandler::postPaintScreen ()=0
virtual void KWin::Effect::postPaintScreen ()
virtual void KWin::EffectsHandler::postPaintWindow (EffectWindow *w)=0
virtual void KWin::Effect::postPaintWindow (EffectWindow *w)
virtual void KWin::EffectsHandler::prePaintScreen (ScreenPrePaintData &data, int time)=0
virtual void KWin::Effect::prePaintScreen (ScreenPrePaintData &data, int time)
virtual void KWin::EffectsHandler::prePaintWindow (EffectWindow *w, WindowPrePaintData &data, int time)=0
virtual void KWin::Effect::prePaintWindow (EffectWindow *w, WindowPrePaintData &data, int time)
double KWin::TimeLine::progress () const
virtual void KWin::Effect::propertyNotify (EffectWindow *w, long atom)
static void KWin::PaintClipper::push (const QRegion &allowed_area)
virtual void KWin::EffectsHandler::pushRenderTarget (GLRenderTarget *target)=0
virtual QByteArray KWin::EffectWindow::readProperty (long atom, long type, int format) const =0
virtual void KWin::EffectsHandler::reconfigure ()=0
virtual void KWin::Effect::reconfigure (ReconfigureFlags flags)
virtual QRect KWin::EffectWindow::rect () const =0
virtual void KWin::EffectsHandler::refTabBox ()=0
virtual void KWin::EffectWindow::refWindow ()=0
virtual void KWin::EffectsHandler::registerPropertyType (long atom, bool reg)=0
void KWin::TimeLine::removeTime (const int msec)
virtual void KWin::EffectsHandler::reserveElectricBorder (ElectricBorder border)=0
virtual void KWin::EffectsHandler::reserveElectricBorderSwitching (bool reserve)=0
void KWin::WindowMotionManager::reset (EffectWindow *w)
void KWin::WindowMotionManager::reset ()
double KWin::WindowQuad::right () const
bool KWin::EffectsHandler::saturationSupported () const
virtual int KWin::EffectWindow::screen () const =0
virtual int KWin::EffectsHandler::screenNumber (const QPoint &pos) const =0
WindowQuadList KWin::WindowQuadList::select (WindowQuadType type) const
static void KWin::EffectsHandler::sendReloadMessage (const QString &effectname)
virtual void KWin::EffectsHandler::setActiveFullScreenEffect (Effect *e)=0
virtual void KWin::EffectsHandler::setCurrentDesktop (int desktop)=0
void KWin::TimeLine::setCurveShape (CurveShape curveShape)
void KWin::Motion::setDecay (const double decay)
void KWin::TimeLine::setDuration (const int msec)
virtual void KWin::EffectsHandler::setElevatedWindow (EffectWindow *w, bool set)=0
static void KWin::Effect::setPositionTransformations (WindowPaintData &data, QRect &region, EffectWindow *w, const QRect &r, Qt::AspectRatioMode aspect)
void KWin::TimeLine::setProgress (const double progress)
void KWin::Motion::setStrength (const double strength)
void KWin::Motion::setStrengthDecay (const double strength, const double decay)
virtual void KWin::EffectsHandler::setTabBoxDesktop (int)=0
virtual void KWin::EffectsHandler::setTabBoxWindow (EffectWindow *)=0
void KWin::Motion::setTarget (const T target)
void KWin::WindowPrePaintData::setTransformed ()
void KWin::WindowPrePaintData::setTranslucent ()
void KWin::Motion::setValue (const T value)
void KWin::Motion::setVelocity (const T velocity)
void KWin::WindowVertex::setX (double x)
void KWin::WindowVertex::setY (double y)
virtual QRegion KWin::EffectWindow::shape () const =0
virtual QSize KWin::EffectWindow::size () const =0
bool KWin::WindowQuadList::smoothNeeded () const
bool KWin::WindowQuad::smoothNeeded () const
WindowQuadList KWin::WindowQuadList::splitAtY (double y) const
virtual EffectWindowList KWin::EffectsHandler::stackingOrder () const =0
double KWin::Motion::strength () const
virtual void KWin::Effect::tabBoxAdded (int mode)
virtual void KWin::Effect::tabBoxClosed ()
virtual void KWin::Effect::tabBoxUpdated ()
T KWin::Motion::target () const
int KWin::TimeLine::time () const
 KWin::TimeLine::TimeLine (const TimeLine &other)
 KWin::TimeLine::TimeLine (int duration=0)
double KWin::WindowQuad::top () const
QRectF KWin::WindowMotionManager::transformedGeometry (EffectWindow *w) const
virtual QRect KWin::EffectsHandler::transformWindowDamage (EffectWindow *w, const QRect &r)
virtual QRect KWin::Effect::transformWindowDamage (EffectWindow *w, const QRect &r)
virtual void KWin::EffectsHandler::ungrabKeyboard ()=0
void KWin::WindowMotionManager::unmanage (EffectWindow *w)
void KWin::WindowMotionManager::unmanageAll ()
virtual void KWin::EffectsHandler::unrefTabBox ()=0
virtual void KWin::EffectWindow::unrefWindow ()=0
virtual void KWin::EffectsHandler::unreserveElectricBorder (ElectricBorder border)=0
T KWin::Motion::value () const
double KWin::TimeLine::value () const
double KWin::TimeLine::valueForTime (const int msec) const
T KWin::Motion::velocity () const
virtual int KWin::EffectWindow::width () const =0
virtual void KWin::Effect::windowActivated (EffectWindow *c)
virtual void KWin::Effect::windowAdded (EffectWindow *c)
EffectWindow * KWin::WindowMotionManager::windowAtPoint (QPoint point, bool useStackingOrder=true) const
virtual QString KWin::EffectWindow::windowClass () const =0
virtual void KWin::Effect::windowClosed (EffectWindow *c)
virtual void KWin::Effect::windowDamaged (EffectWindow *w, const QRect &r)
virtual void KWin::Effect::windowDeleted (EffectWindow *c)
virtual void KWin::Effect::windowGeometryShapeChanged (EffectWindow *w, const QRect &old)
virtual void KWin::Effect::windowInputMouseEvent (Window w, QEvent *e)
virtual void KWin::Effect::windowMinimized (EffectWindow *c)
virtual void KWin::Effect::windowOpacityChanged (EffectWindow *c, double old_opacity)
 KWin::WindowQuad::WindowQuad (WindowQuadType type)
virtual QString KWin::EffectWindow::windowRole () const =0
virtual void KWin::EffectsHandler::windowToDesktop (EffectWindow *w, int desktop)=0
virtual void KWin::Effect::windowUnminimized (EffectWindow *c)
virtual void KWin::Effect::windowUserMovedResized (EffectWindow *c, bool first, bool last)
 KWin::WindowVertex::WindowVertex (double x, double y, double tx, double ty)
 KWin::WindowVertex::WindowVertex ()
double KWin::WindowVertex::x () const
virtual int KWin::EffectWindow::x () const =0
virtual unsigned long KWin::EffectsHandler::xrenderBufferPicture ()=0
double KWin::WindowVertex::y () const
virtual int KWin::EffectWindow::y () const =0
virtual KWin::Effect::~Effect ()
virtual KWin::EffectsHandler::~EffectsHandler ()
virtual KWin::EffectWindow::~EffectWindow ()
 KWin::PaintClipper::Iterator::~Iterator ()
 KWin::Motion::~Motion ()
 KWin::PaintClipper::~PaintClipper ()
 KWin::TimeLine::~TimeLine ()
 KWin::WindowMotionManager::~WindowMotionManager ()

Variables

float KWin::RotationData::angle
RotationAxis KWin::RotationData::axis
double KWin::WindowPaintData::brightness
QRegion KWin::WindowPrePaintData::clip
CompositingType KWin::EffectsHandler::compositing_type
double KWin::WindowPaintData::contents_opacity
int KWin::EffectsHandler::current_draw_window
int KWin::EffectsHandler::current_paint_screen
int KWin::EffectsHandler::current_paint_window
int KWin::EffectsHandler::current_transform
double KWin::WindowPaintData::decoration_opacity
QHash< QString, KLibrary * > KWin::EffectsHandler::effect_libraries
EffectsHandler * KWin::effects = 0
QList< InputWindowPair > KWin::EffectsHandler::input_windows
QVector< EffectPair > KWin::EffectsHandler::loaded_effects
double KWin::WindowPaintData::opacity
QRegion KWin::ScreenPrePaintData::paint
QRegion KWin::WindowPrePaintData::paint
WindowQuadList KWin::WindowPaintData::quads
WindowQuadList KWin::WindowPrePaintData::quads
RotationData * KWin::ScreenPaintData::rotation
RotationData * KWin::WindowPaintData::rotation
double KWin::WindowPaintData::saturation
Motion< QPointF > KWin::WindowMotionManager::WindowMotion::scale
GLShader * KWin::WindowPaintData::shader
float KWin::RotationData::xRotationPoint
double KWin::ScreenPaintData::xScale
double KWin::WindowPaintData::xScale
int KWin::ScreenPaintData::xTranslate
int KWin::WindowPaintData::xTranslate
float KWin::RotationData::yRotationPoint
double KWin::ScreenPaintData::yScale
double KWin::WindowPaintData::yScale
int KWin::ScreenPaintData::yTranslate
int KWin::WindowPaintData::yTranslate
float KWin::RotationData::zRotationPoint
double KWin::ScreenPaintData::zScale
double KWin::WindowPaintData::zScale
double KWin::ScreenPaintData::zTranslate
double KWin::WindowPaintData::zTranslate

Define Documentation

#define KWIN_EFFECT ( name,
classname   ) 

Value:

extern "C" { \
        KWIN_EXPORT Effect* effect_create_kwin4_effect_##name() { return new classname; } \
        KWIN_EXPORT int effect_version_kwin4_effect_##name() { return KWIN_EFFECT_API_VERSION; } \
    }
Defines the class to be used for effect with given name.

The name must be same as effect's X-KDE-PluginInfo-Name values in .desktop file, but without the "kwin4_effect_" prefix. E.g. KWIN_EFFECT( flames, MyFlameEffect ) In this case object of MyFlameEffect class would be created when effect "flames" (which has X-KDE-PluginInfo-Name=kwin4_effect_flames in .desktop file) is loaded.

Definition at line 431 of file kwineffects.h.

#define KWIN_EFFECT_API_MAKE_VERSION ( major,
minor   )     (( major ) << 8 | ( minor ))

Definition at line 164 of file kwineffects.h.

#define KWIN_EFFECT_API_VERSION

Value:

KWIN_EFFECT_API_MAKE_VERSION( \
    KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR )

Definition at line 167 of file kwineffects.h.

#define KWIN_EFFECT_API_VERSION_MAJOR   0

Definition at line 165 of file kwineffects.h.

#define KWIN_EFFECT_API_VERSION_MINOR   56

Definition at line 166 of file kwineffects.h.

#define KWIN_EFFECT_CONFIG ( name,
classname   ) 

Value:

K_PLUGIN_FACTORY(name##_factory, registerPlugin<classname>();) \
    K_EXPORT_PLUGIN(name##_factory("kcm_kwineffect_" #name))
Defines the function used to retrieve an effect's config widget E.g.

KWIN_EFFECT_CONFIG( flames, MyFlameEffectConfig )

Definition at line 448 of file kwineffects.h.

#define KWIN_EFFECT_CONFIG_FACTORY   K_PLUGIN_FACTORY_DECLARATION(EffectFactory)

The declaration of the factory to export the effect.

Definition at line 455 of file kwineffects.h.

#define KWIN_EFFECT_SUPPORTED ( name,
function   ) 

Value:

extern "C" { \
        KWIN_EXPORT bool effect_supported_kwin4_effect_##name() { return function; } \
    }
Defines the function used to check whether an effect is supported E.g.

KWIN_EFFECT_SUPPORTED( flames, MyFlameEffect::supported() )

Definition at line 440 of file kwineffects.h.


Enumeration Type Documentation

enum KWin::Effect::ReconfigureFlag [inherited]

Flags describing which parts of configuration have changed.

Enumerator:
ReconfigureAll 

Definition at line 279 of file kwineffects.h.

enum KWin::RotationData::RotationAxis [inherited]

Enumerator:
XAxis 
YAxis 
ZAxis 

Definition at line 972 of file kwineffects.h.

enum KWin::WindowQuadType

Enumerator:
WindowQuadError 
WindowQuadContents 
WindowQuadDecoration 

Definition at line 830 of file kwineffects.h.


Function Documentation

virtual void KWin::EffectsHandler::activateWindow ( EffectWindow *  c  )  [pure virtual, inherited]

virtual Effect* KWin::EffectsHandler::activeFullScreenEffect (  )  const [pure virtual, inherited]

virtual int KWin::EffectsHandler::activeScreen (  )  const [pure virtual, inherited]

virtual EffectWindow* KWin::EffectsHandler::activeWindow (  )  const [pure virtual, inherited]

void KWin::TimeLine::addProgress ( const double  progress  )  [inherited]

Increases the internal progress accounting of the timeline.

Definition at line 1026 of file kwineffects.cpp.

virtual void KWin::EffectWindow::addRepaint ( int  x,
int  y,
int  w,
int  h 
) [pure virtual, inherited]

virtual void KWin::EffectWindow::addRepaint ( const QRect &  r  )  [pure virtual, inherited]

virtual void KWin::EffectsHandler::addRepaint ( int  x,
int  y,