Convert to plugins (and make it a test, since it's more or less useless).

svn path=/branches/work/kwin_composite/; revision=652928
icc-effect-5.14.5
Luboš Luňák 2007-04-12 10:16:02 +00:00
parent d45212d489
commit 6bf23a5c48
4 changed files with 16 additions and 10 deletions

View File

@ -18,6 +18,7 @@ SET(kwin4_effect_builtins_sources
SET(kwin4_effect_tests_sources
test_input.cpp
test_shiftworkspaceup.cpp
test_thumbnail.cpp
)
@ -59,6 +60,7 @@ install( FILES
diminactive.desktop
zoom.desktop
test_input.desktop
test_shiftworkspaceup.desktop
test_thumbnail.desktop
DESTINATION ${DATA_INSTALL_DIR}/kwin/effects )

View File

@ -8,13 +8,13 @@ You can Freely distribute this program under the GNU General Public
License. See the file "COPYING" for the exact licensing terms.
******************************************************************/
#include "shiftworkspaceup.h"
#include <workspace.h>
#include "test_shiftworkspaceup.h"
namespace KWin
{
KWIN_EFFECT( ShiftWorkspaceUp, ShiftWorkspaceUpEffect )
ShiftWorkspaceUpEffect::ShiftWorkspaceUpEffect()
: up( false )
, diff( 0 )
@ -30,7 +30,7 @@ void ShiftWorkspaceUpEffect::prePaintScreen( int* mask, QRegion* region, int tim
if( !up && diff > 0 )
diff = qBound( 0, diff - time, 1000 );
if( diff != 0 )
*mask |= Scene::PAINT_SCREEN_TRANSFORMED;
*mask |= PAINT_SCREEN_TRANSFORMED;
effects->prePaintScreen( mask, region, time );
}
@ -44,16 +44,16 @@ void ShiftWorkspaceUpEffect::paintScreen( int mask, QRegion region, ScreenPaintD
void ShiftWorkspaceUpEffect::postPaintScreen()
{
if( up ? diff < 1000 : diff > 0 )
workspace()->addRepaintFull(); // trigger next animation repaint
effects->addRepaintFull(); // trigger next animation repaint
effects->postPaintScreen();
}
void ShiftWorkspaceUpEffect::tick()
{
up = !up;
workspace()->addRepaintFull();
effects->addRepaintFull();
}
} // namespace
#include "shiftworkspaceup.moc"
#include "test_shiftworkspaceup.moc"

View File

@ -0,0 +1,4 @@
[Desktop Entry]
Encoding=UTF-8
Name=TestShiftWorkspaceUp
X-KDE-Library=kwin4_effect_tests

View File

@ -8,12 +8,12 @@ You can Freely distribute this program under the GNU General Public
License. See the file "COPYING" for the exact licensing terms.
******************************************************************/
#ifndef KWIN_SHIFTWORKSPACEUP_H
#define KWIN_SHIFTWORKSPACEUP_H
#ifndef KWIN_TEST_SHIFTWORKSPACEUP_H
#define KWIN_TEST_SHIFTWORKSPACEUP_H
#include <qtimer.h>
#include <effects.h>
#include <kwineffects.h>
namespace KWin
{