Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/overlaywindow_x11.h
- This file was copied from overlaywindow.h.
Show All 12 Lines | |||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 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/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | 20 | | |||
21 | #ifndef KWIN_OVERLAYWINDOW_H | 21 | #ifndef KWIN_OVERLAYWINDOW_X11_H | ||
22 | #define KWIN_OVERLAYWINDOW_H | 22 | #define KWIN_OVERLAYWINDOW_X11_H | ||
23 | 23 | | |||
24 | #include <QRegion> | 24 | #include "../../../../overlaywindow.h" | ||
25 | // xcb | | |||
26 | #include <xcb/xcb.h> | | |||
27 | | ||||
28 | #include <kwin_export.h> | | |||
29 | 25 | | |||
30 | namespace KWin { | 26 | namespace KWin { | ||
31 | class KWIN_EXPORT OverlayWindow { | 27 | class KWIN_EXPORT OverlayWindowX11 : public OverlayWindow { | ||
32 | public: | 28 | public: | ||
33 | OverlayWindow(); | 29 | OverlayWindowX11(); | ||
34 | ~OverlayWindow(); | 30 | ~OverlayWindowX11(); | ||
35 | /// Creates XComposite overlay window, call initOverlay() afterwards | 31 | /// Creates XComposite overlay window, call initOverlay() afterwards | ||
36 | bool create(); | 32 | bool create() override; | ||
37 | /// Init overlay and the destination window in it | 33 | /// Init overlay and the destination window in it | ||
38 | void setup(xcb_window_t window); | 34 | void setup(xcb_window_t window) override; | ||
39 | void show(); | 35 | void show() override; | ||
40 | void hide(); // hides and resets overlay window | 36 | void hide() override; // hides and resets overlay window | ||
41 | void setShape(const QRegion& reg); | 37 | void setShape(const QRegion& reg) override; | ||
42 | void resize(const QSize &size); | 38 | void resize(const QSize &size) override; | ||
43 | /// Destroys XComposite overlay window | 39 | /// Destroys XComposite overlay window | ||
44 | void destroy(); | 40 | void destroy() override; | ||
45 | xcb_window_t window() const; | 41 | xcb_window_t window() const override; | ||
46 | bool isVisible() const; | 42 | bool isVisible() const override; | ||
47 | void setVisibility(bool visible); | 43 | void setVisibility(bool visible) override; | ||
48 | private: | 44 | private: | ||
49 | void setNoneBackgroundPixmap(xcb_window_t window); | 45 | void setNoneBackgroundPixmap(xcb_window_t window); | ||
50 | void setupInputShape(xcb_window_t window); | 46 | void setupInputShape(xcb_window_t window); | ||
51 | bool m_visible; | 47 | bool m_visible; | ||
52 | bool m_shown; // For showOverlay() | 48 | bool m_shown; // For showOverlay() | ||
53 | QRegion m_shape; | 49 | QRegion m_shape; | ||
54 | xcb_window_t m_window; | 50 | xcb_window_t m_window; | ||
55 | }; | 51 | }; | ||
56 | } // namespace | 52 | } // namespace | ||
57 | 53 | | |||
58 | #endif //KWIN_OVERLAYWINDOW_H | 54 | #endif //KWIN_OVERLAYWINDOW_H |