Changeset View
Changeset View
Standalone View
Standalone View
decorations/decorationrenderer.h
- This file was copied to plugins/platforms/x11/standalone/x11_decoration_renderer.h.
Show All 17 Lines | |||||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_DECORATION_RENDERER_H | 20 | #ifndef KWIN_DECORATION_RENDERER_H | ||
21 | #define KWIN_DECORATION_RENDERER_H | 21 | #define KWIN_DECORATION_RENDERER_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QRegion> | 24 | #include <QRegion> | ||
25 | 25 | | |||
26 | #include <xcb/xcb.h> | 26 | #include <kwin_export.h> | ||
27 | | ||||
28 | class QTimer; | | |||
29 | 27 | | |||
30 | namespace KWin | 28 | namespace KWin | ||
31 | { | 29 | { | ||
32 | 30 | | |||
33 | class Deleted; | 31 | class Deleted; | ||
34 | 32 | | |||
35 | namespace Decoration | 33 | namespace Decoration | ||
36 | { | 34 | { | ||
37 | 35 | | |||
38 | class DecoratedClientImpl; | 36 | class DecoratedClientImpl; | ||
39 | 37 | | |||
40 | class Renderer : public QObject | 38 | class KWIN_EXPORT Renderer : public QObject | ||
41 | { | 39 | { | ||
42 | Q_OBJECT | 40 | Q_OBJECT | ||
43 | public: | 41 | public: | ||
44 | virtual ~Renderer(); | 42 | virtual ~Renderer(); | ||
45 | 43 | | |||
46 | void schedule(const QRect &rect); | 44 | void schedule(const QRect &rect); | ||
47 | 45 | | |||
48 | /** | 46 | /** | ||
Show All 28 Lines | 56 | protected: | |||
77 | QImage renderToImage(const QRect &geo); | 75 | QImage renderToImage(const QRect &geo); | ||
78 | 76 | | |||
79 | private: | 77 | private: | ||
80 | DecoratedClientImpl *m_client; | 78 | DecoratedClientImpl *m_client; | ||
81 | QRegion m_scheduled; | 79 | QRegion m_scheduled; | ||
82 | bool m_imageSizesDirty; | 80 | bool m_imageSizesDirty; | ||
83 | }; | 81 | }; | ||
84 | 82 | | |||
85 | class X11Renderer : public Renderer | | |||
86 | { | | |||
87 | Q_OBJECT | | |||
88 | public: | | |||
89 | explicit X11Renderer(DecoratedClientImpl *client); | | |||
90 | virtual ~X11Renderer(); | | |||
91 | | ||||
92 | void reparent(Deleted *deleted) override; | | |||
93 | | ||||
94 | protected: | | |||
95 | void render() override; | | |||
96 | | ||||
97 | private: | | |||
98 | QTimer *m_scheduleTimer; | | |||
99 | xcb_gcontext_t m_gc; | | |||
100 | }; | | |||
101 | | ||||
102 | } | 83 | } | ||
103 | } | 84 | } | ||
104 | 85 | | |||
105 | #endif | 86 | #endif |