1 | /******************************************************************** |
2 | KWin - the KDE window manager |
3 | This file is part of the KDE project. |
4 | |
5 | Copyright (C) 1999, 2000 Daniel M. Duley <mosfet@kde.org> |
6 | Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org> |
7 | |
8 | This program is free software; you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by |
10 | the Free Software Foundation; either version 2 of the License, or |
11 | (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along 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 | |
28 | namespace KWin |
29 | { |
30 | |
31 | class DecorationPlugin |
32 | : public QObject, public KDecorationPlugins |
33 | { |
34 | Q_OBJECT |
35 | public: |
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 | |
60 | public Q_SLOTS: |
61 | void resetCompositing(); |
62 | protected: |
63 | virtual void error(const QString& error_msg); |
64 | private: |
65 | void setDisabled(bool noDecoration); |
66 | bool m_disabled; |
67 | KWIN_SINGLETON(DecorationPlugin) |
68 | }; |
69 | |
70 | inline DecorationPlugin *decorationPlugin() { |
71 | return DecorationPlugin::self(); |
72 | } |
73 | |
74 | } // namespace |
75 | |
76 | #endif |
77 | |