2007-03-27 14:26:30 +00:00
|
|
|
/*****************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2007 Rivo Laks <rivolaks@hot.ee>
|
|
|
|
|
|
|
|
You can Freely distribute this program under the GNU General Public
|
|
|
|
License. See the file "COPYING" for the exact licensing terms.
|
|
|
|
******************************************************************/
|
|
|
|
|
2007-04-16 19:52:21 +00:00
|
|
|
#ifndef KWIN_DEMO_TASKBARTHUMBNAIL_H
|
|
|
|
#define KWIN_DEMO_TASKBARTHUMBNAIL_H
|
2007-03-27 14:26:30 +00:00
|
|
|
|
|
|
|
// Include with base class for effects.
|
2007-04-12 13:12:11 +00:00
|
|
|
#include <kwineffects.h>
|
2007-03-27 14:26:30 +00:00
|
|
|
|
|
|
|
|
2007-04-05 12:07:35 +00:00
|
|
|
namespace KWin
|
2007-03-27 14:26:30 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render small thumbnail of window next to it's taskbar entry when the cursor
|
|
|
|
* is above the taskbar entry.
|
|
|
|
* Note that this functionality will be replaced in the future so that taskbar
|
|
|
|
* itself can request a thumbnail to be rendered in a give location with a
|
|
|
|
* given size.
|
|
|
|
**/
|
|
|
|
class TaskbarThumbnailEffect
|
|
|
|
: public Effect
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TaskbarThumbnailEffect();
|
|
|
|
|
|
|
|
virtual void prePaintScreen( int* mask, QRegion* region, int time );
|
|
|
|
virtual void prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QRegion* clip, int time );
|
|
|
|
virtual void postPaintScreen();
|
2007-04-16 19:55:28 +00:00
|
|
|
virtual void cursorMoved( const QPoint& pos, Qt::MouseButtons buttons );
|
2007-03-27 14:26:30 +00:00
|
|
|
|
|
|
|
protected:
|
2007-04-12 13:12:11 +00:00
|
|
|
QRect getThumbnailPosition( EffectWindow* c, int* space ) const;
|
2007-03-27 14:26:30 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QList< EffectWindow* > mThumbnails;
|
|
|
|
QPoint mLastCursorPos;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|