KWin
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
viewporter_p.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2020 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 "qwayland-server-viewporter.h"
10
11#include <QPointer>
12
13namespace KWin
14{
15class SurfaceInterface;
16
17class ViewportInterface : public QtWaylandServer::wp_viewport
18{
19public:
20 ViewportInterface(SurfaceInterface *surface, wl_resource *resource);
21 ~ViewportInterface() override;
22
24
25 QPointer<SurfaceInterface> surface;
26
27protected:
28 void wp_viewport_destroy_resource(Resource *resource) override;
29 void wp_viewport_destroy(Resource *resource) override;
30 void wp_viewport_set_source(Resource *resource, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height) override;
31 void wp_viewport_set_destination(Resource *resource, int32_t width, int32_t height) override;
32};
33
34} // namespace KWin
Resource representing a wl_surface.
Definition surface.h:80
void wp_viewport_set_source(Resource *resource, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height) override
ViewportInterface(SurfaceInterface *surface, wl_resource *resource)
~ViewportInterface() override
void wp_viewport_destroy(Resource *resource) override
void wp_viewport_set_destination(Resource *resource, int32_t width, int32_t height) override
void wp_viewport_destroy_resource(Resource *resource) override
static ViewportInterface * get(SurfaceInterface *surface)
QPointer< SurfaceInterface > surface