File indexing completed on 2024-05-19 16:34:01

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2011 Arthur Arlt <a.arlt@stud.uni-heidelberg.de>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #pragma once
0011 
0012 #include <QRegion>
0013 // xcb
0014 #include <xcb/xcb.h>
0015 
0016 #include <kwin_export.h>
0017 
0018 namespace KWin
0019 {
0020 class KWIN_EXPORT OverlayWindow
0021 {
0022 public:
0023     virtual ~OverlayWindow();
0024     /// Creates XComposite overlay window, call initOverlay() afterwards
0025     virtual bool create() = 0;
0026     /// Init overlay and the destination window in it
0027     virtual void setup(xcb_window_t window) = 0;
0028     virtual void show() = 0;
0029     virtual void hide() = 0; // hides and resets overlay window
0030     virtual void setShape(const QRegion &reg) = 0;
0031     virtual void resize(const QSize &size) = 0;
0032     /// Destroys XComposite overlay window
0033     virtual void destroy() = 0;
0034     virtual xcb_window_t window() const = 0;
0035     virtual bool isVisible() const = 0;
0036     virtual void setVisibility(bool visible) = 0;
0037 
0038 protected:
0039     OverlayWindow();
0040 };
0041 } // namespace