KWin
Loading...
Searching...
No Matches
xwaylandshell_v1.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include <kwin_export.h>
10
11#include <QObject>
12
13#include <memory>
14#include <optional>
15
16struct wl_client;
17
18namespace KWin
19{
20
21class Display;
22class SurfaceInterface;
23class SurfaceRole;
24class XwaylandShellV1Interface;
25class XwaylandShellV1InterfacePrivate;
26class XwaylandSurfaceV1InterfacePrivate;
27
28class KWIN_EXPORT XwaylandSurfaceV1Interface : public QObject
29{
30 Q_OBJECT
31
32public:
33 XwaylandSurfaceV1Interface(XwaylandShellV1Interface *shell, SurfaceInterface *surface, wl_client *client, uint32_t id, int version);
35
36 static SurfaceRole *role();
37
38 SurfaceInterface *surface() const;
39 std::optional<uint64_t> serial() const;
40
41private:
42 std::unique_ptr<XwaylandSurfaceV1InterfacePrivate> d;
43};
44
45class KWIN_EXPORT XwaylandShellV1Interface : public QObject
46{
47 Q_OBJECT
48
49public:
50 explicit XwaylandShellV1Interface(Display *display, QObject *parent = nullptr);
52
53 XwaylandSurfaceV1Interface *findSurface(uint64_t serial) const;
54
55Q_SIGNALS:
57
58private:
59 std::unique_ptr<XwaylandShellV1InterfacePrivate> d;
60};
61
62} // namespace KWin
Class holding the Wayland server display loop.
Definition display.h:34
Resource representing a wl_surface.
Definition surface.h:80
void surfaceAssociated(XwaylandSurfaceV1Interface *surface)
struct _XDisplay Display
constexpr int version