Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandviewporter_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:critical reason:network-protocol
4
5#ifndef QWAYLANDVIEWPORTER_P_H
6#define QWAYLANDVIEWPORTER_P_H
7
9
10#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
11#include <QtWaylandCompositor/private/qwayland-server-viewporter.h>
12
13#include <QtCore/qpointer.h>
14
15//
16// W A R N I N G
17// -------------
18//
19// This file is not part of the Qt API. It exists purely as an
20// implementation detail. This header file may change from version to
21// version without notice, or even be removed.
22//
23// We mean it.
24//
25
27
28class QWaylandSurface;
29
30class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandViewporterPrivate
31 : public QWaylandCompositorExtensionPrivate
32 , public QtWaylandServer::wp_viewporter
33{
34 Q_DECLARE_PUBLIC(QWaylandViewporter)
35public:
36 explicit QWaylandViewporterPrivate() = default;
37
38 class Q_WAYLANDCOMPOSITOR_EXPORT Viewport
39 : public QtWaylandServer::wp_viewport
40 {
41 public:
42 explicit Viewport(QWaylandSurface *surface, wl_client *client, int id);
43 ~Viewport() override;
44 void checkCommittedState();
45
46 protected:
47 void wp_viewport_destroy_resource(Resource *resource) override;
48 void wp_viewport_destroy(Resource *resource) override;
49 void wp_viewport_set_source(Resource *resource, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height) override;
50 void wp_viewport_set_destination(Resource *resource, int32_t width, int32_t height) override;
51
52 private:
53 QPointer<QWaylandSurface> m_surface = nullptr;
54 };
55
56protected:
57 void wp_viewporter_destroy(Resource *resource) override;
58 void wp_viewporter_get_viewport(Resource *resource, uint32_t id, wl_resource *surface) override;
59};
60
61QT_END_NAMESPACE
62
63#endif // QWAYLANDVIEWPORTER_P_H
Combined button and popup list for selecting options.