1/********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5Copyright (C) 1999, 2000 Daniel M. Duley <mosfet@kde.org>
6Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program. If not, see <http://www.gnu.org/licenses/>.
20*********************************************************************/
21
22#ifndef KWIN_PLUGINS_H
23#define KWIN_PLUGINS_H
24
25#include <kdecoration_plugins_p.h>
26#include <kwinglobals.h>
27
28namespace KWin
29{
30
31class DecorationPlugin
32 : public QObject, public KDecorationPlugins
33{
34 Q_OBJECT
35public:
36 virtual ~DecorationPlugin();
37 virtual bool provides(Requirement);
38 /**
39 * @returns @c true if there is no decoration plugin.
40 **/
41 bool isDisabled() const;
42
43 bool hasShadows() const;
44 bool hasAlpha() const;
45 bool supportsAnnounceAlpha() const;
46 bool supportsTabbing() const;
47 bool supportsFrameOverlap() const;
48 bool supportsBlurBehind() const;
49 Qt::Corner closeButtonCorner();
50
51 QString supportInformation();
52
53 // D-Bus interface
54 /**
55 * @deprecated
56 * @todo: remove KDE5
57 **/
58 QList<int> supportedColors() const;
59
60public Q_SLOTS:
61 void resetCompositing();
62protected:
63 virtual void error(const QString& error_msg);
64private:
65 void setDisabled(bool noDecoration);
66 bool m_disabled;
67 KWIN_SINGLETON(DecorationPlugin)
68};
69
70inline DecorationPlugin *decorationPlugin() {
71 return DecorationPlugin::self();
72}
73
74} // namespace
75
76#endif
77