/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2008 Martin Gräßlin .
*********************************************************************/
#ifndef KWIN_DIMSCREEN_H
#define KWIN_DIMSCREEN_H
#include
#include
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
#include
#endif
namespace KWin
{
class DimScreenEffect
: public Effect
{
public:
DimScreenEffect();
~DimScreenEffect();
virtual void prePaintScreen( ScreenPrePaintData& data, int time );
virtual void paintScreen( int mask, QRegion region, ScreenPaintData& data );
virtual void postPaintScreen();
virtual void paintWindow( EffectWindow *w, int mask, QRegion region, WindowPaintData &data );
virtual void windowActivated( EffectWindow *w );
private:
bool mActivated;
QTime animationTime;
int animationDuration;
bool animation;
bool deactivate;
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
XRenderPictFormat* alphaFormat;
#endif
};
} // namespace
#endif