2009-02-15 10:34:31 +00:00
|
|
|
/********************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
Copyright (C) 2009 Lucas Murray <lmurray@undefinedfire.com>
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
#ifndef KWIN_SNAPHELPER_H
|
|
|
|
#define KWIN_SNAPHELPER_H
|
|
|
|
|
|
|
|
#include <kwineffects.h>
|
2013-02-26 08:00:51 +00:00
|
|
|
#include <QTimeLine>
|
2009-02-15 10:34:31 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class SnapHelperEffect
|
|
|
|
: public Effect
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-02-27 08:25:45 +00:00
|
|
|
Q_OBJECT
|
2011-01-30 14:34:42 +00:00
|
|
|
public:
|
|
|
|
SnapHelperEffect();
|
|
|
|
~SnapHelperEffect();
|
|
|
|
|
|
|
|
virtual void reconfigure(ReconfigureFlags);
|
|
|
|
|
|
|
|
virtual void prePaintScreen(ScreenPrePaintData &data, int time);
|
|
|
|
virtual void postPaintScreen();
|
2011-08-27 09:21:31 +00:00
|
|
|
virtual bool isActive() const;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2011-02-27 08:25:45 +00:00
|
|
|
public Q_SLOTS:
|
2012-01-29 11:29:24 +00:00
|
|
|
void slotWindowClosed(KWin::EffectWindow *w);
|
|
|
|
void slotWindowStartUserMovedResized(KWin::EffectWindow *w);
|
|
|
|
void slotWindowFinishUserMovedResized(KWin::EffectWindow *w);
|
2012-12-29 15:27:08 +00:00
|
|
|
void slotWindowResized(KWin::EffectWindow *w, const QRect &r);
|
2011-02-27 08:25:45 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
private:
|
|
|
|
bool m_active;
|
|
|
|
EffectWindow* m_window;
|
2011-03-14 21:50:05 +00:00
|
|
|
QTimeLine m_timeline;
|
2011-01-30 14:34:42 +00:00
|
|
|
//GC m_gc;
|
|
|
|
};
|
2009-02-15 10:34:31 +00:00
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|