Data like transf. matrix that the effects can affect.

svn path=/branches/work/kwin_composite/; revision=558454
This commit is contained in:
Luboš Luňák 2006-07-05 12:56:04 +00:00
parent afcc9b6897
commit 7d67cf42c4
2 changed files with 50 additions and 10 deletions

View file

@ -13,6 +13,30 @@ License. See the file "COPYING" for the exact licensing terms.
namespace KWinInternal
{
//****************************************
// 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;
}
//****************************************
// Effect
//****************************************
@ -29,11 +53,11 @@ void Effect::windowUserResized( Toplevel* )
{
}
void Effect::paintWindow( Toplevel* )
void Effect::paintWindow( Toplevel*, EffectData& )
{
}
void Effect::paintWorkspace( Workspace* )
void Effect::paintWorkspace( Workspace*, EffectData& )
{
}
@ -41,19 +65,19 @@ void Effect::paintWorkspace( Workspace* )
// EffectsHandler
//****************************************
void EffectsHandler::windowUserMoved( Toplevel* c )
void EffectsHandler::windowUserMoved( Toplevel* )
{
}
void EffectsHandler::windowUserResized( Toplevel* c )
void EffectsHandler::windowUserResized( Toplevel* )
{
}
void EffectsHandler::paintWindow( Toplevel* c )
void EffectsHandler::paintWindow( Toplevel*, EffectData& )
{
}
void EffectsHandler::paintWorkspace( Workspace* )
void EffectsHandler::paintWorkspace( Workspace*, EffectData& )
{
}

View file

@ -8,6 +8,8 @@ You can Freely distribute this program under the GNU General Public
License. See the file "COPYING" for the exact licensing terms.
******************************************************************/
// TODO MIT or some other licence, perhaps move to some lib
#ifndef KWIN_EFFECTS_H
#define KWIN_EFFECTS_H
@ -17,14 +19,28 @@ namespace KWinInternal
class Toplevel;
class Workspace;
class Matrix
{
public:
Matrix();
float m[ 4 ][ 4 ];
};
class EffectData
{
public:
Matrix matrix;
float opacity;
};
class Effect
{
public:
virtual ~Effect();
virtual void windowUserMoved( Toplevel* c );
virtual void windowUserResized( Toplevel* c );
virtual void paintWindow( Toplevel* c );
virtual void paintWorkspace( Workspace* );
virtual void paintWindow( Toplevel* c, EffectData& data );
virtual void paintWorkspace( Workspace*, EffectData& data );
};
class EffectsHandler
@ -32,8 +48,8 @@ class EffectsHandler
public:
void windowUserMoved( Toplevel* c );
void windowUserResized( Toplevel* c );
void paintWindow( Toplevel* c );
void paintWorkspace( Workspace* );
void paintWindow( Toplevel* c, EffectData& data );
void paintWorkspace( Workspace*, EffectData& data );
};
extern EffectsHandler* effects;