2020-08-02 22:22:19 +00:00
|
|
|
/*
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
2011-07-06 09:58:23 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2011 Arthur Arlt <a.arlt@stud.uni-heidelberg.de>
|
2011-07-06 09:58:23 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2011-07-06 09:58:23 +00:00
|
|
|
|
|
|
|
#ifndef KWIN_OVERLAYWINDOW_H
|
|
|
|
#define KWIN_OVERLAYWINDOW_H
|
|
|
|
|
|
|
|
#include <QRegion>
|
2012-12-13 02:02:20 +00:00
|
|
|
// xcb
|
|
|
|
#include <xcb/xcb.h>
|
2011-07-06 09:58:23 +00:00
|
|
|
|
2016-04-12 13:03:07 +00:00
|
|
|
#include <kwin_export.h>
|
|
|
|
|
2022-03-23 10:13:38 +00:00
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
class KWIN_EXPORT OverlayWindow
|
|
|
|
{
|
2011-07-06 09:58:23 +00:00
|
|
|
public:
|
2017-08-07 15:54:56 +00:00
|
|
|
virtual ~OverlayWindow();
|
2011-07-06 09:58:23 +00:00
|
|
|
/// Creates XComposite overlay window, call initOverlay() afterwards
|
2017-08-07 15:54:56 +00:00
|
|
|
virtual bool create() = 0;
|
2011-07-06 09:58:23 +00:00
|
|
|
/// Init overlay and the destination window in it
|
2017-08-07 15:54:56 +00:00
|
|
|
virtual void setup(xcb_window_t window) = 0;
|
|
|
|
virtual void show() = 0;
|
|
|
|
virtual void hide() = 0; // hides and resets overlay window
|
2022-03-23 10:13:38 +00:00
|
|
|
virtual void setShape(const QRegion ®) = 0;
|
2017-08-07 15:54:56 +00:00
|
|
|
virtual void resize(const QSize &size) = 0;
|
2011-07-06 09:58:23 +00:00
|
|
|
/// Destroys XComposite overlay window
|
2017-08-07 15:54:56 +00:00
|
|
|
virtual void destroy() = 0;
|
|
|
|
virtual xcb_window_t window() const = 0;
|
|
|
|
virtual bool isVisible() const = 0;
|
|
|
|
virtual void setVisibility(bool visible) = 0;
|
2022-03-23 10:13:38 +00:00
|
|
|
|
2017-08-07 15:54:56 +00:00
|
|
|
protected:
|
|
|
|
OverlayWindow();
|
2011-07-06 09:58:23 +00:00
|
|
|
};
|
|
|
|
} // namespace
|
|
|
|
|
2022-03-23 10:13:38 +00:00
|
|
|
#endif // KWIN_OVERLAYWINDOW_H
|