2009-02-15 10:34:31 +00:00
|
|
|
/********************************************************************
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
2020-08-02 22:10:35 +00:00
|
|
|
SPDX-FileCopyrightText: 2009 Lucas Murray <lmurray@undefinedfire.com>
|
|
|
|
SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
2009-02-15 10:34:31 +00:00
|
|
|
|
2020-08-02 22:10:35 +00:00
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
2009-02-15 10:34:31 +00:00
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
#ifndef KWIN_SNAPHELPER_H
|
|
|
|
#define KWIN_SNAPHELPER_H
|
|
|
|
|
|
|
|
#include <kwineffects.h>
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2018-07-02 19:16:21 +00:00
|
|
|
class SnapHelperEffect : public Effect
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2011-02-27 08:25:45 +00:00
|
|
|
Q_OBJECT
|
2018-07-02 19:16:21 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
public:
|
|
|
|
SnapHelperEffect();
|
2018-07-02 19:16:21 +00:00
|
|
|
~SnapHelperEffect() override;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2018-07-02 19:16:21 +00:00
|
|
|
void reconfigure(ReconfigureFlags flags) override;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2018-07-02 19:16:21 +00:00
|
|
|
void prePaintScreen(ScreenPrePaintData &data, int time) override;
|
2019-10-29 22:04:15 +00:00
|
|
|
void paintScreen(int mask, const QRegion ®ion, ScreenPaintData &data) override;
|
2018-07-02 19:16:21 +00:00
|
|
|
void postPaintScreen() override;
|
|
|
|
|
|
|
|
bool isActive() const override;
|
2011-01-30 14:34:42 +00:00
|
|
|
|
2018-07-02 19:16:21 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void slotWindowClosed(EffectWindow *w);
|
|
|
|
void slotWindowStartUserMovedResized(EffectWindow *w);
|
|
|
|
void slotWindowFinishUserMovedResized(EffectWindow *w);
|
2020-02-11 17:03:38 +00:00
|
|
|
void slotWindowFrameGeometryChanged(EffectWindow *w, const QRect &old);
|
2011-02-27 08:25:45 +00:00
|
|
|
|
2011-01-30 14:34:42 +00:00
|
|
|
private:
|
2018-07-02 19:16:21 +00:00
|
|
|
QRect m_geometry;
|
|
|
|
EffectWindow *m_window = nullptr;
|
|
|
|
|
|
|
|
struct Animation {
|
|
|
|
bool active = false;
|
|
|
|
TimeLine timeLine;
|
|
|
|
};
|
|
|
|
|
|
|
|
Animation m_animation;
|
2011-01-30 14:34:42 +00:00
|
|
|
};
|
2009-02-15 10:34:31 +00:00
|
|
|
|
2018-07-02 19:16:21 +00:00
|
|
|
} // namespace KWin
|
2009-02-15 10:34:31 +00:00
|
|
|
|
|
|
|
#endif
|