1 | /******************************************************************** |
2 | KWin - the KDE window manager |
3 | This file is part of the KDE project. |
4 | |
5 | Copyright (C) 2009 Marco Martin notmart@gmail.com |
6 | |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. |
11 | |
12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. |
16 | |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | *********************************************************************/ |
20 | |
21 | #ifndef KWIN_SLIDINGPOPUPS_H |
22 | #define KWIN_SLIDINGPOPUPS_H |
23 | |
24 | // Include with base class for effects. |
25 | #include <kwineffects.h> |
26 | |
27 | class QTimeLine; |
28 | |
29 | namespace KWin |
30 | { |
31 | |
32 | class |
33 | : public Effect |
34 | { |
35 | Q_OBJECT |
36 | Q_PROPERTY(int fadeInTime READ fadeInTime) |
37 | Q_PROPERTY(int fadeOutTime READ fadeOutTime) |
38 | public: |
39 | (); |
40 | (); |
41 | virtual void (ScreenPrePaintData& data, int time); |
42 | virtual void (EffectWindow* w, WindowPrePaintData& data, int time); |
43 | virtual void (EffectWindow* w, int mask, QRegion region, WindowPaintData& data); |
44 | virtual void (EffectWindow* w); |
45 | virtual void (ReconfigureFlags flags); |
46 | virtual bool () const; |
47 | // TODO react also on virtual desktop changes |
48 | |
49 | // for properties |
50 | int () const { |
51 | return mFadeInTime; |
52 | } |
53 | int () const { |
54 | return mFadeOutTime; |
55 | } |
56 | public Q_SLOTS: |
57 | void (KWin::EffectWindow *c); |
58 | void (KWin::EffectWindow *c); |
59 | void (KWin::EffectWindow *w); |
60 | void (KWin::EffectWindow *w, long a); |
61 | private: |
62 | enum { |
63 | = 0, |
64 | = 1, |
65 | = 2, |
66 | = 3 |
67 | }; |
68 | struct { |
69 | int ; //point in screen coordinates where the window starts |
70 | //to animate, from decides if this point is an x or an y |
71 | Position ; |
72 | int ; |
73 | int ; |
74 | }; |
75 | long ; |
76 | QHash< const EffectWindow*, QTimeLine* > ; |
77 | QHash< const EffectWindow*, QTimeLine* > ; |
78 | QHash< const EffectWindow*, Data > ; |
79 | int ; |
80 | int ; |
81 | }; |
82 | |
83 | } // namespace |
84 | |
85 | #endif |
86 | |