2006-07-04 20:51:01 +00:00
|
|
|
/*****************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2006 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
|
|
|
You can Freely distribute this program under the GNU General Public
|
|
|
|
License. See the file "COPYING" for the exact licensing terms.
|
|
|
|
******************************************************************/
|
|
|
|
|
|
|
|
#include "effects.h"
|
|
|
|
|
|
|
|
namespace KWinInternal
|
|
|
|
{
|
|
|
|
|
2006-07-05 12:56:04 +00:00
|
|
|
//****************************************
|
|
|
|
// Matrix
|
|
|
|
//****************************************
|
|
|
|
|
|
|
|
Matrix::Matrix()
|
|
|
|
{
|
|
|
|
m[ 0 ][ 0 ] = 1;
|
|
|
|
m[ 0 ][ 1 ] = 0;
|
|
|
|
m[ 0 ][ 2 ] = 0;
|
|
|
|
m[ 0 ][ 3 ] = 0;
|
|
|
|
m[ 1 ][ 0 ] = 0;
|
|
|
|
m[ 1 ][ 1 ] = 1;
|
|
|
|
m[ 1 ][ 2 ] = 0;
|
|
|
|
m[ 1 ][ 3 ] = 0;
|
|
|
|
m[ 2 ][ 0 ] = 0;
|
|
|
|
m[ 2 ][ 1 ] = 0;
|
|
|
|
m[ 2 ][ 2 ] = 1;
|
|
|
|
m[ 2 ][ 3 ] = 0;
|
|
|
|
m[ 3 ][ 0 ] = 0;
|
|
|
|
m[ 3 ][ 1 ] = 0;
|
|
|
|
m[ 3 ][ 2 ] = 0;
|
|
|
|
m[ 3 ][ 3 ] = 1;
|
|
|
|
}
|
|
|
|
|
2006-07-04 20:51:01 +00:00
|
|
|
//****************************************
|
|
|
|
// Effect
|
|
|
|
//****************************************
|
|
|
|
|
|
|
|
Effect::~Effect()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Effect::windowUserMoved( Toplevel* )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Effect::windowUserResized( Toplevel* )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-07-05 12:56:04 +00:00
|
|
|
void Effect::paintWindow( Toplevel*, EffectData& )
|
2006-07-04 20:51:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-07-05 12:56:04 +00:00
|
|
|
void Effect::paintWorkspace( Workspace*, EffectData& )
|
2006-07-04 20:51:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//****************************************
|
|
|
|
// EffectsHandler
|
|
|
|
//****************************************
|
|
|
|
|
2006-07-06 09:55:10 +00:00
|
|
|
class MakeHalfTransparent
|
|
|
|
: public Effect
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void paintWindow( Toplevel* c, EffectData& data );
|
|
|
|
};
|
|
|
|
|
|
|
|
void MakeHalfTransparent::paintWindow( Toplevel*, EffectData& data )
|
|
|
|
{
|
|
|
|
data.opacity *= 0.8;
|
|
|
|
}
|
|
|
|
|
|
|
|
static MakeHalfTransparent* mht;
|
|
|
|
EffectsHandler::EffectsHandler()
|
|
|
|
{
|
|
|
|
mht = new MakeHalfTransparent;
|
|
|
|
}
|
|
|
|
|
2006-07-05 12:56:04 +00:00
|
|
|
void EffectsHandler::windowUserMoved( Toplevel* )
|
2006-07-04 20:51:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-07-05 12:56:04 +00:00
|
|
|
void EffectsHandler::windowUserResized( Toplevel* )
|
2006-07-04 20:51:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-07-06 09:55:10 +00:00
|
|
|
void EffectsHandler::paintWindow( Toplevel* c, EffectData& data )
|
2006-07-04 20:51:01 +00:00
|
|
|
{
|
2006-07-06 09:55:10 +00:00
|
|
|
mht->paintWindow( c, data );
|
2006-07-04 20:51:01 +00:00
|
|
|
}
|
|
|
|
|
2006-07-05 12:56:04 +00:00
|
|
|
void EffectsHandler::paintWorkspace( Workspace*, EffectData& )
|
2006-07-04 20:51:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
EffectsHandler* effects;
|
|
|
|
|
|
|
|
} // namespace
|