kwin/src/wayland/xdgdecoration_v1_interface_p.h
Vlad Zahorodnii e3ad23ccd8 xdg-shell: Rewrite wrappers for the xdg-shell protocol
The current xdg-shell wrappers don't match existing abstractions in the
xdg-shell protocol well, which makes it more difficult to refactor code
that is responsible for managing configure events and geometry in kwin.

Given that the xdg_decoration and the xdg_shell protocols are tightly
coupled together, I had to rewrite our wrappers for the xdg_decoration
protocol as well.
2020-06-01 14:48:51 +03:00

44 lines
1.5 KiB
C++

/*
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#pragma once
#include "xdgdecoration_v1_interface.h"
#include "qwayland-server-xdg-decoration-unstable-v1.h"
namespace KWaylandServer
{
class XdgDecorationManagerV1InterfacePrivate : public QtWaylandServer::zxdg_decoration_manager_v1
{
public:
XdgDecorationManagerV1InterfacePrivate(XdgDecorationManagerV1Interface *manager);
XdgDecorationManagerV1Interface *q;
protected:
void zxdg_decoration_manager_v1_destroy(Resource *resource) override;
void zxdg_decoration_manager_v1_get_toplevel_decoration(Resource *resource, uint32_t id, ::wl_resource *toplevel) override;
};
class XdgToplevelDecorationV1InterfacePrivate : public QtWaylandServer::zxdg_toplevel_decoration_v1
{
public:
XdgToplevelDecorationV1InterfacePrivate(XdgToplevelDecorationV1Interface *decoration);
XdgToplevelDecorationV1Interface *q;
XdgToplevelInterface *toplevel;
XdgToplevelDecorationV1Interface::Mode preferredMode = XdgToplevelDecorationV1Interface::Mode::Undefined;
protected:
void zxdg_toplevel_decoration_v1_destroy_resource(Resource *resource) override;
void zxdg_toplevel_decoration_v1_destroy(Resource *resource) override;
void zxdg_toplevel_decoration_v1_set_mode(Resource *resource, uint32_t mode) override;
void zxdg_toplevel_decoration_v1_unset_mode(Resource *resource) override;
};
} // namespace KWaylandServer