2007-11-27 19:40:25 +00:00
|
|
|
/********************************************************************
|
2007-04-29 17:35:43 +00:00
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
|
2007-11-13 16:20:52 +00:00
|
|
|
Copyright (C) 2007 Christian Nitschkowski <christian.nitschkowski@kdemail.net>
|
2007-04-29 17:35:43 +00:00
|
|
|
|
2007-11-27 19:40:25 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*********************************************************************/
|
2007-04-29 17:35:43 +00:00
|
|
|
|
|
|
|
#ifndef KWIN_DIMINACTIVE_H
|
|
|
|
#define KWIN_DIMINACTIVE_H
|
|
|
|
|
|
|
|
// Include with base class for effects.
|
|
|
|
#include <kwineffects.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class DimInactiveEffect
|
|
|
|
: public Effect
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DimInactiveEffect();
|
2008-10-02 09:27:32 +00:00
|
|
|
virtual void reconfigure( ReconfigureFlags );
|
2009-02-07 09:48:20 +00:00
|
|
|
virtual void prePaintScreen( ScreenPrePaintData& data, int time );
|
2007-04-29 17:35:43 +00:00
|
|
|
virtual void paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data );
|
2009-02-09 14:36:47 +00:00
|
|
|
virtual void windowDeleted( EffectWindow* w );
|
2007-04-29 17:35:43 +00:00
|
|
|
virtual void windowActivated( EffectWindow* c );
|
|
|
|
private:
|
2008-01-02 15:17:58 +00:00
|
|
|
bool dimWindow( const EffectWindow* w ) const;
|
2009-02-07 09:48:20 +00:00
|
|
|
TimeLine timeline;
|
2007-04-29 17:35:43 +00:00
|
|
|
EffectWindow* active;
|
2009-02-07 09:48:20 +00:00
|
|
|
EffectWindow* previousActive;
|
|
|
|
TimeLine previousActiveTimeline;
|
2007-11-13 16:20:52 +00:00
|
|
|
int dim_strength; // reduce saturation and brightness by this percentage
|
2007-04-29 17:35:43 +00:00
|
|
|
bool dim_panels; // do/don't dim also all panels
|
2008-09-05 09:01:44 +00:00
|
|
|
bool dim_desktop; // do/don't dim the desktop
|
2010-04-13 18:42:05 +00:00
|
|
|
bool dim_keepabove; // do/don't dim keep-above windows
|
2007-04-29 17:35:43 +00:00
|
|
|
bool dim_by_group; // keep visible all windows from the active window's group or only the active window
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|