• Skip to content
  • Skip to link menu
KDE 4.1 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::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::ScreenPaintData
class  KWin::ScreenPrePaintData
class  KWin::TimeLine
 Wrapper class for using timelines 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   21
#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::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)
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
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 ()
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 ()
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
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
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::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::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
virtual EffectWindowList KWin::EffectWindowGroup::members () const =0
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)
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 QPoint &center, int maxwidth, const QColor &color, const QFont &font=QFont())
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 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
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::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)
virtual void KWin::EffectsHandler::setTabBoxDesktop (int)=0
virtual void KWin::EffectsHandler::setTabBoxWindow (EffectWindow *)=0
void KWin::WindowPrePaintData::setTransformed ()
void KWin::WindowPrePaintData::setTranslucent ()
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
virtual void KWin::Effect::tabBoxAdded (int mode)
virtual void KWin::Effect::tabBoxClosed ()
virtual void KWin::Effect::tabBoxUpdated ()
int KWin::TimeLine::time () const
 KWin::TimeLine::TimeLine (const TimeLine &other)
 KWin::TimeLine::TimeLine (const int duration=250)
double KWin::WindowQuad::top () 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
virtual void KWin::EffectsHandler::unrefTabBox ()=0
virtual void KWin::EffectWindow::unrefWindow ()=0
virtual void KWin::EffectsHandler::unreserveElectricBorder (ElectricBorder border)=0
double KWin::TimeLine::value () const
double KWin::TimeLine::valueForTime (const int msec) const
virtual int KWin::EffectWindow::width () const =0
virtual void KWin::Effect::windowActivated (EffectWindow *c)
virtual void KWin::Effect::windowAdded (EffectWindow *c)
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::PaintClipper::~PaintClipper ()
 KWin::TimeLine::~TimeLine ()

Variables

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
double KWin::WindowPaintData::saturation
GLShader * KWin::WindowPaintData::shader
double KWin::ScreenPaintData::xScale
double KWin::WindowPaintData::xScale
int KWin::ScreenPaintData::xTranslate
int KWin::WindowPaintData::xTranslate
double KWin::ScreenPaintData::yScale
double KWin::WindowPaintData::yScale
int KWin::ScreenPaintData::yTranslate
int KWin::WindowPaintData::yTranslate

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 400 of file kwineffects.h.

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

Definition at line 163 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 166 of file kwineffects.h.

#define KWIN_EFFECT_API_VERSION_MAJOR   0

Definition at line 164 of file kwineffects.h.

#define KWIN_EFFECT_API_VERSION_MINOR   21

Definition at line 165 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 417 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 424 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 409 of file kwineffects.h.


Enumeration Type Documentation

enum KWin::WindowQuadType

Enumerator:
WindowQuadError 
WindowQuadContents 
WindowQuadDecoration 

Definition at line 785 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 971 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,
int  w,
int  h 
) [pure virtual, inherited]

virtual void KWin::EffectsHandler::addRepaint ( const QRegion &  r  )  [pure virtual, inherited]

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

virtual void KWin::EffectWindow::addRepaintFull (  )  [pure virtual, inherited]

virtual void KWin::EffectsHandler::addRepaintFull (  )  [pure virtual, inherited]

Schedules the entire workspace to be repainted next time.

If you call it during painting (including prepaint) then it does not affect the current painting.

void KWin::TimeLine::addTime ( const int  msec  )  [inherited]

Increases the internal counter, this is usually done in prePaintWindow().

Definition at line 943 of file kwineffects.cpp.

bool KWin::Effect::borderActivated ( ElectricBorder  border  )  [virtual, inherited]

Definition at line 163 of file kwineffects.cpp.

double KWin::WindowQuad::bottom (  )  const [inline, inherited]

Definition at line 1259 of file kwineffects.h.

QRect KWin::PaintClipper::Iterator::boundingRect (  )  const [inherited]

Definition at line 871 of file kwineffects.cpp.

virtual WindowQuadList KWin::EffectWindow::buildQuads (  )  const [pure virtual, inherited]

virtual void KWin::EffectsHandler::calcDesktopLayout ( int *  x,
int *  y,
Qt::Orientation *  orientation 
) const [pure virtual, inherited]

virtual QString KWin::EffectWindow::caption (  )  const [pure virtual, inherited]

virtual void KWin::EffectsHandler::checkElectricBorder ( const QPoint &  pos,
Time  time 
) [pure virtual, inherited]

virtual QRect KWin::EffectsHandler::clientArea ( clientAreaOption  ,
const QPoint &  p,
int  desktop 
) const [pure virtual, inherited]

virtual QRect KWin::EffectsHandler::clientArea ( clientAreaOption  ,
const EffectWindow *  c 
) const [pure virtual, inherited]

virtual QRect KWin::EffectsHandler::clientArea ( clientAreaOption  ,
int  screen,
int  desktop 
) const [pure virtual, inherited]

bool KWin::PaintClipper::clip (  )  [static, inherited]

Returns true if any clipping should be performed.

Definition at line 784 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::closeTabBox (  )  [pure virtual, inherited]

CompositingType KWin::EffectsHandler::compositingType (  )  const [inherited]

Definition at line 288 of file kwineffects.cpp.

virtual QRect KWin::EffectWindow::contentsRect (  )  const [pure virtual, inherited]

Geometry of the actual window contents inside the whole (including decorations) window.

Window KWin::EffectsHandler::createFullScreenInputWindow ( Effect *  e,
const QCursor &  cursor 
) [virtual, inherited]

Definition at line 283 of file kwineffects.cpp.

Window KWin::EffectsHandler::createInputWindow ( Effect *  e,
const QRect &  r,
const QCursor &  cursor 
) [inherited]

Definition at line 278 of file kwineffects.cpp.

virtual Window KWin::EffectsHandler::createInputWindow ( Effect *  e,
int  x,
int  y,
int  w,
int  h,
const QCursor &  cursor 
) [pure virtual, inherited]

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

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

virtual QList< int > KWin::EffectsHandler::currentTabBoxDesktopList (  )  const [pure virtual, inherited]

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

virtual EffectWindowList KWin::EffectsHandler::currentTabBoxWindowList (  )  const [pure virtual, inherited]

virtual QPoint KWin::EffectsHandler::cursorPos (  )  const [pure virtual, inherited]

QPoint KWin::Effect::cursorPos (  )  [static, inherited]

Definition at line 239 of file kwineffects.cpp.

bool KWin::WindowQuad::decoration (  )  const [inline, inherited]

Definition at line 1225 of file kwineffects.h.

virtual int KWin::EffectWindow::desktop (  )  const [pure virtual, inherited]

void KWin::Effect::desktopChanged ( int  old  )  [virtual, inherited]

Definition at line 140 of file kwineffects.cpp.

virtual int KWin::EffectsHandler::desktopDown ( int  desktop,
bool  wrap 
) const [pure virtual, inherited]

virtual QString KWin::EffectsHandler::desktopName ( int  desktop  )  const [pure virtual, inherited]

virtual int KWin::EffectsHandler::desktopToLeft ( int  desktop,
bool  wrap 
) const [pure virtual, inherited]

virtual int KWin::EffectsHandler::desktopToRight ( int  desktop,
bool  wrap 
) const [pure virtual, inherited]

virtual int KWin::EffectsHandler::desktopUp ( int  desktop,
bool  wrap 
) const [pure virtual, inherited]

virtual void KWin::EffectsHandler::destroyInputWindow ( Window  w  )  [pure virtual, inherited]

virtual void KWin::EffectWindow::disablePainting ( int  reason  )  [pure virtual, inherited]

int KWin::Effect::displayHeight (  )  [static, inherited]

Definition at line 234 of file kwineffects.cpp.

int KWin::Effect::displayWidth (  )  [static, inherited]

Definition at line 229 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::drawWindow ( EffectWindow *  w,
int  mask,
QRegion  region,
WindowPaintData &  data 
) [pure virtual, inherited]

void KWin::Effect::drawWindow ( EffectWindow *  w,
int  mask,
QRegion  region,
WindowPaintData &  data 
) [virtual, inherited]

Can be called to draw multiple copies (e.g.

thumbnails) of a window. You can change window's opacity/brightness/etc here, but you can't do any transformations

Definition at line 203 of file kwineffects.cpp.

int KWin::TimeLine::duration (  )  const [inherited]

Returns the duration of the timeline in msec.

Definition at line 918 of file kwineffects.cpp.

KWin::Effect::Effect (  )  [inherited]

Constructs new Effect object.

Definition at line 88 of file kwineffects.cpp.

KConfigGroup KWin::EffectsHandler::effectConfig ( const QString &  effectname  )  [static, inherited]

Returns:
KConfigGroup which holds given effect's config options

Definition at line 315 of file kwineffects.cpp.

KWin::EffectsHandler::EffectsHandler ( CompositingType  type  )  [inherited]

Definition at line 248 of file kwineffects.cpp.

KWin::EffectWindow::EffectWindow (  )  [inherited]

Definition at line 426 of file kwineffects.cpp.

virtual void KWin::EffectWindow::enablePainting ( int  reason  )  [pure virtual, inherited]

WindowQuadList KWin::WindowQuadList::filterOut ( WindowQuadType  type  )  const [inherited]

Definition at line 718 of file kwineffects.cpp.

virtual EffectWindow* KWin::EffectWindow::findModal (  )  [pure virtual, inherited]

virtual EffectWindow* KWin::EffectsHandler::findWindow ( WId  id  )  const [pure virtual, inherited]

virtual QRect KWin::EffectWindow::geometry (  )  const [pure virtual, inherited]

void KWin::Effect::grabbedKeyboardEvent ( QKeyEvent *  e  )  [virtual, inherited]

Definition at line 132 of file kwineffects.cpp.

virtual bool KWin::EffectsHandler::grabKeyboard ( Effect *  effect  )  [pure virtual, inherited]

virtual const EffectWindowGroup* KWin::EffectWindow::group (  )  const [pure virtual, inherited]

bool KWin::EffectWindow::hasDecoration (  )  const [inherited]

Definition at line 444 of file kwineffects.cpp.

virtual bool KWin::EffectWindow::hasOwnShape (  )  const [pure virtual, inherited]

virtual int KWin::EffectWindow::height (  )  const [pure virtual, inherited]

virtual QPixmap KWin::EffectWindow::icon (  )  const [pure virtual, inherited]

virtual QRect KWin::EffectWindow::iconGeometry (  )  const [pure virtual, inherited]

KWIN_EXPORT QRect KWin::infiniteRegion (  )  [inline]

Infinite region (i.e.

a special region type saying that everything needs to be painted).

Definition at line 173 of file kwineffects.h.

static double KWin::Effect::interpolate ( double  x,
double  y,
double  a 
) [inline, static, inherited]

Linearly interpolates between x and y.

Returns x when a = 0; returns y when a = 1.

Definition at line 379 of file kwineffects.h.

virtual bool KWin::EffectWindow::isComboBox (  )  const [pure virtual, inherited]

Returns whether the window is a combobox popup.

See _NET_WM_WINDOW_TYPE_COMBO at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isDeleted (  )  const [pure virtual, inherited]

virtual bool KWin::EffectWindow::isDesktop (  )  const [pure virtual, inherited]

Returns whether the window is a desktop background window (the one with wallpaper).

See _NET_WM_WINDOW_TYPE_DESKTOP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isDialog (  )  const [pure virtual, inherited]

Returns whether the window is a dialog window.

See _NET_WM_WINDOW_TYPE_DIALOG at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isDNDIcon (  )  const [pure virtual, inherited]

Returns whether the window is a Drag&Drop icon.

See _NET_WM_WINDOW_TYPE_DND at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isDock (  )  const [pure virtual, inherited]

Returns whether the window is a dock (i.e.

a panel). See _NET_WM_WINDOW_TYPE_DOCK at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

bool KWin::PaintClipper::Iterator::isDone (  )  [inherited]

Definition at line 843 of file kwineffects.cpp.

virtual bool KWin::EffectWindow::isDropdownMenu (  )  const [pure virtual, inherited]

Returns whether the window is a dropdown menu (i.e.

a popup directly or indirectly open from the applications menubar). See _NET_WM_WINDOW_TYPE_DROPDOWN_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isManaged (  )  const [pure virtual, inherited]

Returns whether the window is managed by KWin (it has control over its placement and other aspects, as opposed to override-redirect windows that are entirely handled by the application).

virtual bool KWin::EffectWindow::isMenu (  )  const [pure virtual, inherited]

Returns whether the window is a torn-off menu.

See _NET_WM_WINDOW_TYPE_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isMinimized (  )  const [pure virtual, inherited]

virtual bool KWin::EffectWindow::isModal (  )  const [pure virtual, inherited]

virtual bool KWin::EffectWindow::isMovable (  )  const [pure virtual, inherited]

virtual bool KWin::EffectWindow::isNormalWindow (  )  const [pure virtual, inherited]

Returns whether the window is a "normal" window, i.e.

an application or any other window for which none of the specialized window types fit. See _NET_WM_WINDOW_TYPE_NORMAL at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isNotification (  )  const [pure virtual, inherited]

Returns whether the window is a window with a notification.

See _NET_WM_WINDOW_TYPE_NOTIFICATION at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isOnAllDesktops (  )  const [pure virtual, inherited]

bool KWin::EffectWindow::isOnCurrentDesktop (  )  const [virtual, inherited]

Definition at line 434 of file kwineffects.cpp.

bool KWin::EffectWindow::isOnDesktop ( int  d  )  const [virtual, inherited]

Definition at line 439 of file kwineffects.cpp.

virtual bool KWin::EffectWindow::isPaintingEnabled (  )  [pure virtual, inherited]

virtual bool KWin::EffectWindow::isPopupMenu (  )  const [pure virtual, inherited]

Returns whether the window is a popup menu (that is not a torn-off or dropdown menu).

See _NET_WM_WINDOW_TYPE_POPUP_MENU at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isSpecialWindow (  )  const [pure virtual, inherited]

Returns whether the window is any of special windows types (desktop, dock, splash, .

..), i.e. window types that usually don't have a window frame and the user does not use window management (moving, raising,...) on them.

virtual bool KWin::EffectWindow::isSplash (  )  const [pure virtual, inherited]

Returns whether the window is a splashscreen.

Note that many (especially older) applications do not support marking their splash windows with this type. See _NET_WM_WINDOW_TYPE_SPLASH at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isToolbar (  )  const [pure virtual, inherited]

Returns whether the window is a standalone (detached) toolbar window.

See _NET_WM_WINDOW_TYPE_TOOLBAR at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isTooltip (  )  const [pure virtual, inherited]

Returns whether the window is a tooltip.

See _NET_WM_WINDOW_TYPE_TOOLTIP at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

virtual bool KWin::EffectWindow::isTopMenu (  )  const [pure virtual, inherited]

Returns whether the window is standalone menubar (AKA macmenu).

This window type is a KDE extension.

bool KWin::WindowQuad::isTransformed (  )  const [inline, inherited]

Definition at line 1232 of file kwineffects.h.

virtual bool KWin::EffectWindow::isUserMove (  )  const [pure virtual, inherited]

virtual bool KWin::EffectWindow::isUserResize (  )  const [pure virtual, inherited]

virtual bool KWin::EffectWindow::isUtility (  )  const [pure virtual, inherited]

Returns whether the window is a utility window, such as a tool window.

See _NET_WM_WINDOW_TYPE_UTILITY at http://standards.freedesktop.org/wm-spec/wm-spec-latest.html .

double KWin::WindowQuad::left (  )  const [inline, inherited]

Definition at line 1241 of file kwineffects.h.

virtual EffectWindowList KWin::EffectWindow::mainWindows (  )  const [pure virtual, inherited]

void KWin::WindowQuadList::makeArrays ( float **  vertices,
float **  texcoords 
) const [inherited]

Definition at line 680 of file kwineffects.cpp.

WindowQuadList KWin::WindowQuadList::makeGrid ( int  maxquadsize  )  const [inherited]

Definition at line 591 of file kwineffects.cpp.

WindowQuadList KWin::WindowQuadList::makeRegularGrid ( int  xSubdivisions,
int  ySubdivisions 
) const [inherited]

Definition at line 634 of file kwineffects.cpp.

WindowQuad KWin::WindowQuad::makeSubQuad ( double  x1,
double  y1,
double  x2,
double  y2 
) const [inherited]

Definition at line 471 of file kwineffects.cpp.

virtual EffectWindowList KWin::EffectWindowGroup::members (  )  const [pure virtual, inherited]

void KWin::Effect::mouseChanged ( const QPoint &  pos,
const QPoint &  oldpos,
Qt::MouseButtons  buttons,
Qt::MouseButtons  oldbuttons,
Qt::KeyboardModifiers  modifiers,
Qt::KeyboardModifiers  oldmodifiers 
) [virtual, inherited]

Definition at line 168 of file kwineffects.cpp.

void KWin::WindowVertex::move ( double  x,
double  y 
) [inline, inherited]

Definition at line 1182 of file kwineffects.h.

virtual void KWin::EffectsHandler::moveWindow ( EffectWindow *  w,
const QPoint &  pos 
) [pure virtual, inherited]

void KWin::PaintClipper::Iterator::next (  )  [inherited]

Definition at line 858 of file kwineffects.cpp.

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

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

virtual double KWin::EffectWindow::opacity (  )  const [pure virtual, inherited]

const WindowVertex & KWin::WindowQuad::operator[] ( int  index  )  const [inline, inherited]

Definition at line 1218 of file kwineffects.h.

WindowVertex & KWin::WindowQuad::operator[] ( int  index  )  [inline, inherited]

Definition at line 1211 of file kwineffects.h.

virtual bool KWin::EffectsHandler::optionRollOverDesktops (  )  const [pure virtual, inherited]

double KWin::WindowQuad::originalBottom (  )  const [inline, inherited]

Definition at line 1283 of file kwineffects.h.

double KWin::WindowQuad::originalLeft (  )  const [inline, inherited]

Definition at line 1265 of file kwineffects.h.

double KWin::WindowQuad::originalRight (  )  const [inline, inherited]

Definition at line 1271 of file kwineffects.h.

double KWin::WindowQuad::originalTop (  )  const [inline, inherited]

Definition at line 1277 of file kwineffects.h.

double KWin::WindowVertex::originalX (  )  const [inline, inherited]

Definition at line 1170 of file kwineffects.h.

double KWin::WindowVertex::originalY (  )  const [inline, inherited]

Definition at line 1176 of file kwineffects.h.

QRegion KWin::PaintClipper::paintArea (  )  [static, inherited]

If clip() returns true, this function gives the resulting area in which painting is allowed.

It is usually simpler to use the helper Iterator class.

Definition at line 789 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::paintScreen ( int  mask,
QRegion  region,
ScreenPaintData &  data 
) [pure virtual, inherited]

void KWin::Effect::paintScreen ( int  mask,
QRegion  region,
ScreenPaintData &  data 
) [virtual, inherited]

In this method you can:.

  • paint something on top of the windows (by painting after calling effects->paintScreen())
  • paint multiple desktops and/or multiple copies of the same desktop by calling effects->paintScreen() multiple times

Definition at line 178 of file kwineffects.cpp.

bool KWin::EffectsHandler::paintText ( const QString &  text,
const QPoint &  center,
int  maxwidth,
const QColor &  color,
const QFont &  font = QFont() 
) [inherited]

Paints given text onto screen, possibly in elided form.

Parameters:
text 
center center point of the painted text
maxwidth if text is longer than this, is will be elided
color color of the text, may contain alpha
font font for the text

Definition at line 321 of file kwineffects.cpp.

bool KWin::EffectsHandler::paintTextWithBackground ( const QString &  text,
const QPoint &  center,
int  maxwidth,
const QColor &  color,
const QColor &  bgcolor,
const QFont &  font = QFont() 
) [inherited]

Definition at line 387 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::paintWindow ( EffectWindow *  w,
int  mask,
QRegion  region,
WindowPaintData &  data 
) [pure virtual, inherited]

void KWin::Effect::paintWindow ( EffectWindow *  w,
int  mask,
QRegion  region,
WindowPaintData &  data 
) [virtual, inherited]

This is the main method for painting windows.

In this method you can:

  • do various transformations
  • change opacity of the window
  • change brightness and/or saturation, if it's supported

Definition at line 193 of file kwineffects.cpp.

void KWin::PaintClipper::pop ( const QRegion &  allowed_area  )  [static, inherited]

Removes the given area.

It must match the top item in the stack.

Definition at line 770 of file kwineffects.cpp.

virtual GLRenderTarget* KWin::EffectsHandler::popRenderTarget (  )  [pure virtual, inherited]

virtual QPoint KWin::EffectWindow::pos (  )  const [pure virtual, inherited]

virtual void KWin::EffectsHandler::postPaintScreen (  )  [pure virtual, inherited]

void KWin::Effect::postPaintScreen (  )  [virtual, inherited]

Called after all the painting has been finished.

In this method you can:

  • schedule next repaint in case of animations You shouldn't paint anything here.

Definition at line 183 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::postPaintWindow ( EffectWindow *  w  )  [pure virtual, inherited]

void KWin::Effect::postPaintWindow ( EffectWindow *  w  )  [virtual, inherited]

Called for every window after all painting has been finished.

In this method you can:

  • schedule next repaint for individual window(s) in case of animations You shouldn't paint anything here.

Definition at line 198 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::prePaintScreen ( ScreenPrePaintData &  data,
int  time 
) [pure virtual, inherited]

void KWin::Effect::prePaintScreen ( ScreenPrePaintData &  data,
int  time 
) [virtual, inherited]

Called before starting to paint the screen.

In this method you can:

  • set whether the windows or the entire screen will be transformed
  • change the region of the screen that will be painted
  • do various housekeeping tasks such as initing your effect's variables for the upcoming paint pass or updating animation's progress

Definition at line 173 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::prePaintWindow ( EffectWindow *  w,
WindowPrePaintData &  data,
int  time 
) [pure virtual, inherited]

void KWin::Effect::prePaintWindow ( EffectWindow *  w,
WindowPrePaintData &  data,
int  time 
) [virtual, inherited]

Called for every window before the actual paint pass In this method you can:.

  • enable or disable painting of the window (e.g. enable paiting of minimized window)
  • set window to be painted with translucency
  • set window to be transformed
  • request the window to be divided into multiple parts

Definition at line 188 of file kwineffects.cpp.

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

Returns the progress of the TimeLine, between 0.0 and 1.0.

The value returned is equivalent to the y-axis on a curve.

Definition at line 961 of file kwineffects.cpp.

void KWin::Effect::propertyNotify ( EffectWindow *  w,
long  atom 
) [virtual, inherited]

Receives events registered for using EffectsHandler::registerPropertyType().

Use readProperty() to get the property data. Note that the property may be already set on the window, so doing the same processing from windowAdded() (e.g. simply calling propertyNotify() from it) is usually needed.

Definition at line 136 of file kwineffects.cpp.

void KWin::PaintClipper::push ( const QRegion &  allowed_area  )  [static, inherited]

Allows painting only in the given area.

When areas have been already specified, painting is allowed only in the intersection of all areas.

Definition at line 761 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::pushRenderTarget ( GLRenderTarget *  target  )  [pure virtual, inherited]

virtual QByteArray KWin::EffectWindow::readProperty ( long  atom,
long  type,
int  format 
) const [pure virtual, inherited]

virtual void KWin::EffectsHandler::reconfigure (  )  [pure virtual, inherited]

virtual QRect KWin::EffectWindow::rect (  )  const [pure virtual, inherited]

virtual void KWin::EffectsHandler::refTabBox (  )  [pure virtual, inherited]

virtual void KWin::EffectWindow::refWindow (  )  [pure virtual, inherited]

virtual void KWin::EffectsHandler::registerPropertyType ( long  atom,
bool  reg 
) [pure virtual, inherited]

Makes KWin core watch PropertyNotify events for the given atom, or stops watching if reg is false (must be called the same number of times as registering).

Events are sent using Effect::propertyNotify(). Note that even events that haven't been registered for can be received.

void KWin::TimeLine::removeTime ( const int  msec  )  [inherited]

Decreases the internal counter, this is usually done in prePaintWindow().

This function comes handy for reverse animations.

Definition at line 949 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::reserveElectricBorder ( ElectricBorder  border  )  [pure virtual, inherited]

virtual void KWin::EffectsHandler::reserveElectricBorderSwitching ( bool  reserve  )  [pure virtual, inherited]

double KWin::WindowQuad::right (  )  const [inline, inherited]

Definition at line 1247 of file kwineffects.h.

bool KWin::EffectsHandler::saturationSupported (  )  const [inherited]

Definition at line 293 of file kwineffects.cpp.

virtual int KWin::EffectWindow::screen (  )  const [pure virtual, inherited]

virtual int KWin::EffectsHandler::screenNumber ( const QPoint &  pos  )  const [pure virtual, inherited]

WindowQuadList KWin::WindowQuadList::select ( WindowQuadType  type  )  const [inherited]

Definition at line 700 of file kwineffects.cpp.

void KWin::EffectsHandler::sendReloadMessage ( const QString &  effectname  )  [static, inherited]

Sends message over DCOP to reload given effect.

Parameters:
effectname effect's name without "kwin4_effect_" prefix. Can be called from effect's config module to apply config changes.

Definition at line 308 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::setActiveFullScreenEffect ( Effect *  e  )  [pure virtual, inherited]

virtual void KWin::EffectsHandler::setCurrentDesktop ( int  desktop  )  [pure virtual, inherited]

void KWin::TimeLine::setCurveShape ( CurveShape  curveShape  )  [inherited]

Set the CurveShape.

The CurveShape describes the relation between the value and the time. progress is between 0 and 1 It's used as input for the timeline, the x axis of the curve.

Definition at line 977 of file kwineffects.cpp.

void KWin::TimeLine::setDuration ( const int  msec  )  [inherited]

Set the duration of the TimeLine.

Definition at line 923 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::setElevatedWindow ( EffectWindow *  w,
bool  set 
) [pure virtual, inherited]

void KWin::Effect::setPositionTransformations ( WindowPaintData &  data,
QRect &  region,
EffectWindow *  w,
const QRect &  r,
Qt::AspectRatioMode  aspect 
) [static, inherited]

Helper to set WindowPaintData and QRegion to necessary transformations so that a following drawWindow() would put the window at the requested geometry (useful for thumbnails).

Definition at line 213 of file kwineffects.cpp.

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

Set the time to progress * duration.

This will change the internal time in the TimeLine. It's usually used in prePaintWindow() or prePaintScreen() so the value() taken in paint* is increased.

Definition at line 955 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::setTabBoxDesktop ( int   )  [pure virtual, inherited]

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

void KWin::WindowPrePaintData::setTransformed (  )  [inherited]

Helper to mark that this window will be transformed.

Definition at line 55 of file kwineffects.cpp.

void KWin::WindowPrePaintData::setTranslucent (  )  [inherited]

Simple helper that sets data to say the window will be painted as non-opaque.

Takes also care of changing the regions.

Definition at line 48 of file kwineffects.cpp.

void KWin::WindowVertex::setX ( double  x  )  [inline, inherited]

Definition at line 1189 of file kwineffects.h.

void KWin::WindowVertex::setY ( double  y  )  [inline, inherited]

Definition at line 1195 of file kwineffects.h.

virtual QRegion KWin::EffectWindow::shape (  )  const [pure virtual, inherited]

virtual QSize KWin::EffectWindow::size (  )  const [pure virtual, inherited]

bool KWin::WindowQuadList::smoothNeeded (  )  const [inherited]

Definition at line 736 of file kwineffects.cpp.

bool KWin::WindowQuad::smoothNeeded (  )  const [inherited]

Definition at line 516 of file kwineffects.cpp.

WindowQuadList KWin::WindowQuadList::splitAtY ( double  y  )  const [inherited]

Definition at line 560 of file kwineffects.cpp.

virtual EffectWindowList KWin::EffectsHandler::stackingOrder (  )  const [pure virtual, inherited]

void KWin::Effect::tabBoxAdded ( int  mode  )  [virtual, inherited]

Definition at line 152 of file kwineffects.cpp.

void KWin::Effect::tabBoxClosed (  )  [virtual, inherited]

Definition at line 156 of file kwineffects.cpp.

void KWin::Effect::tabBoxUpdated (  )  [virtual, inherited]

Definition at line 160 of file kwineffects.cpp.

int KWin::TimeLine::time (  )  const [inherited]

Returns the current time of the TimeLine, between 0 and duration() The value returned is equivalent to the x-axis on a curve.

Definition at line 966 of file kwineffects.cpp.

KWin::TimeLine::TimeLine ( const TimeLine &  other  )  [inherited]

Creates a copy of the TimeLine so we can have the state copied as well.

Definition at line 902 of file kwineffects.cpp.

KWin::TimeLine::TimeLine ( const int  duration = 250  )  [explicit, inherited]

Creates a TimeLine and computes the progress data.

The default duration can be overridden from the Effect. Usually, for larger animations you want to choose values more towards 300 milliseconds. For small animations, values around 150 milliseconds are sensible.

Definition at line 892 of file kwineffects.cpp.

double KWin::WindowQuad::top (  )  const [inline, inherited]

Definition at line 1253 of file kwineffects.h.

QRect KWin::EffectsHandler::transformWindowDamage ( EffectWindow *  w,
const QRect &  r 
) [virtual, inherited]

Definition at line 266 of file kwineffects.cpp.

QRect KWin::Effect::transformWindowDamage ( EffectWindow *  w,
const QRect &  r 
) [virtual, inherited]

This function is used e.g.

by the shadow effect which adds area around windows that needs to be painted as well - e.g. when a window is hidden and the workspace needs to be repainted at that area, shadow's transformWindowDamage() adds the shadow area to it, so that it is repainted as well.

Definition at line 208 of file kwineffects.cpp.

virtual void KWin::EffectsHandler::ungrabKeyboard (  )  [pure virtual, inherited]

virtual void KWin::EffectsHandler::unrefTabBox (  )  [pure virtual, inherited]

virtual void KWin::EffectWindow::unrefWindow (  )  [pure virtual, inherited]

virtual void KWin::EffectsHandler::unreserveElectricBorder ( ElectricBorder  border  )  [pure virtual, inherited]

double KWin::TimeLine::value (  )  const [inherited]

Returns the Value at the time set, this method will usually be used to get the progress in the paintWindow() and related methods.

The value represents the y-axis' value corresponding to the current progress (or time) set by setProgress(), addProgress(), addTime(), removeTime()

Definition at line 929 of file kwineffects.cpp.

double KWin::TimeLine::valueForTime ( const int  msec  )  const [inherited]

Returns the Value at the time provided, this method will usually be used to get the progress in the paintWindow() and related methods, the y value of the current state x.

Definition at line 934 of file kwineffects.cpp.

virtual int KWin::EffectWindow::width (  )  const [pure virtual, inherited]

void KWin::Effect::windowActivated ( EffectWindow *  c  )  [virtual, inherited]

Definition at line 116 of file kwineffects.cpp.

void KWin::Effect::windowAdded ( EffectWindow *  c  )  [virtual, inherited]

Definition at line 104 of file kwineffects.cpp.

virtual QString KWin::EffectWindow::windowClass (  )  const [pure virtual, inherited]

void KWin::Effect::windowClosed ( EffectWindow *  c  )  [virtual, inherited]

Definition at line 108 of file kwineffects.cpp.

void KWin::Effect::windowDamaged ( EffectWindow *  w,
const QRect &  r 
) [virtual, inherited]

Definition at line 144 of file kwineffects.cpp.

void KWin::Effect::windowDeleted ( EffectWindow *  c  )  [virtual, inherited]

Definition at line 112 of file kwineffects.cpp.

void KWin::Effect::windowGeometryShapeChanged ( EffectWindow *  w,
const QRect &  old 
) [virtual, inherited]

Definition at line 148 of file kwineffects.cpp.

void KWin::Effect::windowInputMouseEvent ( Window  w,
QEvent *  e 
) [virtual, inherited]

Definition at line 128 of file kwineffects.cpp.

void KWin::Effect::windowMinimized ( EffectWindow *  c  )  [virtual, inherited]

Definition at line 120 of file kwineffects.cpp.

void KWin::Effect::windowOpacityChanged ( EffectWindow *  c,
double  old_opacity 
) [virtual, inherited]

Definition at line 100 of file kwineffects.cpp.

KWin::WindowQuad::WindowQuad ( WindowQuadType  type  )  [inline, explicit, inherited]

Definition at line 1205 of file kwineffects.h.

virtual QString KWin::EffectWindow::windowRole (  )  const [pure virtual, inherited]

virtual void KWin::EffectsHandler::windowToDesktop ( EffectWindow *  w,
int  desktop 
) [pure virtual, inherited]

void KWin::Effect::windowUnminimized ( EffectWindow *  c  )  [virtual, inherited]

Definition at line 124 of file kwineffects.cpp.

void KWin::Effect::windowUserMovedResized ( EffectWindow *  c,
bool  first,
bool  last 
) [virtual, inherited]

called when moved/resized or once after it's finished

Definition at line 96 of file kwineffects.cpp.

KWin::WindowVertex::WindowVertex ( double  x,
double  y,
double  tx,
double  ty 
) [inline, inherited]

Definition at line 1152 of file kwineffects.h.

KWin::WindowVertex::WindowVertex (  )  [inline, inherited]

Definition at line 1146 of file kwineffects.h.

double KWin::WindowVertex::x (  )  const [inline, inherited]

Definition at line 1158 of file kwineffects.h.

virtual int KWin::EffectWindow::x (  )  const [pure virtual, inherited]

virtual unsigned long KWin::EffectsHandler::xrenderBufferPicture (  )  [pure virtual, inherited]

double KWin::WindowVertex::y (  )  const [inline, inherited]

Definition at line 1164 of file kwineffects.h.

virtual int KWin::EffectWindow::y (  )  const [pure virtual, inherited]

KWin::Effect::~Effect (  )  [virtual, inherited]

Destructs the Effect object.

Definition at line 92 of file kwineffects.cpp.

KWin::EffectsHandler::~EffectsHandler (  )  [virtual, inherited]

Definition at line 260 of file kwineffects.cpp.

KWin::EffectWindow::~EffectWindow (  )  [virtual, inherited]

Definition at line 430 of file kwineffects.cpp.

KWin::PaintClipper::Iterator::~Iterator (  )  [inherited]

Definition at line 830 of file kwineffects.cpp.

KWin::PaintClipper::~PaintClipper (  )  [inherited]

Calls pop().

Definition at line 756 of file kwineffects.cpp.

KWin::TimeLine::~TimeLine (  )  [inherited]

Cleans up.

Definition at line 913 of file kwineffects.cpp.


Variable Documentation

double KWin::WindowPaintData::brightness [inherited]

Brightness of the window, in range [0; 1] 1 means that the window is unchanged, 0 means that it's completely black.

0.5 would make it 50% darker than usual

Definition at line 891 of file kwineffects.h.

QRegion KWin::WindowPrePaintData::clip [inherited]

The clip region will be substracted from paint region of following windows.

I.e. window will definitely cover it's clip region

Definition at line 848 of file kwineffects.h.

CompositingType KWin::EffectsHandler::compositing_type [protected, inherited]

Definition at line 571 of file kwineffects.h.

double KWin::WindowPaintData::contents_opacity [inherited]

Definition at line 871 of file kwineffects.h.

int KWin::EffectsHandler::current_draw_window [protected, inherited]

Definition at line 569 of file kwineffects.h.

int KWin::EffectsHandler::current_paint_screen [protected, inherited]

Definition at line 567 of file kwineffects.h.

int KWin::EffectsHandler::current_paint_window [protected, inherited]

Definition at line 568 of file kwineffects.h.

int KWin::EffectsHandler::current_transform [protected, inherited]

Definition at line 570 of file kwineffects.h.

double KWin::WindowPaintData::decoration_opacity [inherited]

Definition at line 872 of file kwineffects.h.

QHash< QString, KLibrary* > KWin::EffectsHandler::effect_libraries [protected, inherited]

Definition at line 564 of file kwineffects.h.

KWIN_EXPORT EffectsHandler * KWin::effects = 0

Pointer to the global EffectsHandler object.

Definition at line 419 of file kwineffects.cpp.

QList< InputWindowPair > KWin::EffectsHandler::input_windows [protected, inherited]

Definition at line 565 of file kwineffects.h.

QVector< EffectPair > KWin::EffectsHandler::loaded_effects [protected, inherited]

Definition at line 563 of file kwineffects.h.

double KWin::WindowPaintData::opacity [inherited]

Window opacity, in range 0 = transparent to 1 = fully opaque Opacity for contents is opacity*contents_opacity, the same way for decoration.

Definition at line 870 of file kwineffects.h.

QRegion KWin::ScreenPrePaintData::paint [inherited]

Definition at line 913 of file kwineffects.h.

QRegion KWin::WindowPrePaintData::paint [inherited]

Region that will be painted, in screen coordinates.

Definition at line 843 of file kwineffects.h.

WindowQuadList KWin::WindowPaintData::quads [inherited]

Definition at line 892 of file kwineffects.h.

WindowQuadList KWin::WindowPrePaintData::quads [inherited]

Definition at line 849 of file kwineffects.h.

double KWin::WindowPaintData::saturation [inherited]

Saturation of the window, in range [0; 1] 1 means that the window is unchanged, 0 means that it's completely unsaturated (greyscale).

0.5 would make the colors less intense, but not completely grey Use EffectsHandler::saturationSupported() to find out whether saturation is supported by the system, otherwise this value has no effect.

Definition at line 885 of file kwineffects.h.

GLShader* KWin::WindowPaintData::shader [inherited]

Shader to be used for rendering, if any.

Definition at line 896 of file kwineffects.h.

double KWin::ScreenPaintData::xScale [inherited]

Definition at line 903 of file kwineffects.h.

double KWin::WindowPaintData::xScale [inherited]

Definition at line 873 of file kwineffects.h.

int KWin::ScreenPaintData::xTranslate [inherited]

Definition at line 905 of file kwineffects.h.

int KWin::WindowPaintData::xTranslate [inherited]

Definition at line 875 of file kwineffects.h.

double KWin::ScreenPaintData::yScale [inherited]

Definition at line 904 of file kwineffects.h.

double KWin::WindowPaintData::yScale [inherited]

Definition at line 874 of file kwineffects.h.

int KWin::ScreenPaintData::yTranslate [inherited]

Definition at line 906 of file kwineffects.h.

int KWin::WindowPaintData::yTranslate [inherited]

Definition at line 876 of file kwineffects.h.

KWinLibraries

Skip menu "KWinLibraries"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal