~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kwin/effects/logout/logout.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/********************************************************************
 
2
 KWin - the KDE window manager
 
3
 This file is part of the KDE project.
 
4
 
 
5
Copyright (C) 2007 Lubos Lunak <l.lunak@kde.org>
 
6
Copyright (C) 2009 Martin Gräßlin <kde@martin-graesslin.com>
 
7
Copyright (C) 2009, 2010 Lucas Murray <lmurray@undefinedfire.com>
 
8
 
 
9
This program is free software; you can redistribute it and/or modify
 
10
it under the terms of the GNU General Public License as published by
 
11
the Free Software Foundation; either version 2 of the License, or
 
12
(at your option) any later version.
 
13
 
 
14
This program is distributed in the hope that it will be useful,
 
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
GNU General Public License for more details.
 
18
 
 
19
You should have received a copy of the GNU General Public License
 
20
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
*********************************************************************/
 
22
 
 
23
#ifndef KWIN_LOGOUT_H
 
24
#define KWIN_LOGOUT_H
 
25
 
 
26
#include <kwineffects.h>
 
27
 
 
28
 
 
29
namespace KWin
 
30
{
 
31
 
 
32
class GLRenderTarget;
 
33
class GLTexture;
 
34
 
 
35
class LogoutEffect
 
36
    : public Effect
 
37
{
 
38
    Q_OBJECT
 
39
public:
 
40
    LogoutEffect();
 
41
    ~LogoutEffect();
 
42
    virtual void reconfigure(ReconfigureFlags);
 
43
    virtual void prePaintScreen(ScreenPrePaintData& data, int time);
 
44
    virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
 
45
    virtual void postPaintScreen();
 
46
    virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);
 
47
public Q_SLOTS:
 
48
    void slotWindowAdded(EffectWindow* w);
 
49
    void slotWindowClosed(EffectWindow *w);
 
50
    void slotWindowDeleted(EffectWindow *w);
 
51
    void slotPropertyNotify(EffectWindow *w, long a);
 
52
private:
 
53
    bool isLogoutDialog(EffectWindow* w);
 
54
    double progress; // 0-1
 
55
    bool displayEffect;
 
56
    EffectWindow* logoutWindow;
 
57
    bool logoutWindowClosed;
 
58
    bool logoutWindowPassed;
 
59
 
 
60
    // Persistent effect
 
61
    long logoutAtom;
 
62
    bool canDoPersistent;
 
63
    EffectWindowList ignoredWindows;
 
64
 
 
65
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
 
66
    void renderVignetting();
 
67
    int frameDelay;
 
68
    bool blurSupported, useBlur;
 
69
    GLTexture* blurTexture;
 
70
    GLRenderTarget* blurTarget;
 
71
    double windowOpacity;
 
72
    EffectWindowList windows;
 
73
    QHash< EffectWindow*, double > windowsOpacities;
 
74
#endif
 
75
};
 
76
 
 
77
} // namespace
 
78
 
 
79
#endif