KWin
Loading...
Searching...
No Matches
xdgforeign_v2.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2017 Marco Martin <notmart@gmail.com>
3 SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7#pragma once
8
9#include "kwin_export.h"
10
11#include <QObject>
12
13namespace KWin
14{
15class Display;
16class SurfaceInterface;
17class XdgForeignV2InterfacePrivate;
18
19class KWIN_EXPORT XdgExportedSurface : public QObject
20{
21 Q_OBJECT
22
23public:
25
26 QString handle() const;
27 SurfaceInterface *surface() const;
28
29private:
30 void handleSurfaceDestroyed();
31
32 const QString m_handle;
33 SurfaceInterface *m_surface;
34};
35
44class KWIN_EXPORT XdgForeignV2Interface : public QObject
45{
46 Q_OBJECT
47public:
48 XdgForeignV2Interface(Display *display, QObject *parent = nullptr);
49 ~XdgForeignV2Interface() override;
50
57 SurfaceInterface *transientFor(SurfaceInterface *surface);
58
64 XdgExportedSurface *exportSurface(SurfaceInterface *surface);
65
66Q_SIGNALS:
77
78private:
81 std::unique_ptr<XdgForeignV2InterfacePrivate> d;
82};
83
84}
Class holding the Wayland server display loop.
Definition display.h:34
Resource representing a wl_surface.
Definition surface.h:80
void transientChanged(KWin::SurfaceInterface *child, KWin::SurfaceInterface *parent)
struct _XDisplay Display