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
qwaylandscreen_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWAYLANDSCREEN_H
5#define QWAYLANDSCREEN_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qpa/qplatformscreen.h>
19#include <QtGui/qscreen_platform.h>
20#include <QtWaylandClient/qtwaylandclientglobal.h>
21
22#include <QtWaylandClient/private/qwayland-wayland.h>
23#include <QtWaylandClient/private/qwayland-xdg-output-unstable-v1.h>
24#include <QtCore/private/qglobal_p.h>
25
27
28namespace QtWaylandClient {
29
30class QWaylandDisplay;
31class QWaylandCursor;
32
38
39class Q_WAYLANDCLIENT_EXPORT QWaylandScreen : public QPlatformScreen,
43{
44public:
47
48 void maybeInitialize();
49
51
52 QWaylandDisplay *display() const;
53
55 QString model() const override;
56
57 QRect geometry() const override;
58 int depth() const override;
60
62
63 QDpi logicalDpi() const override;
65
67 int scale() const;
70
71 QString name() const override { return mOutputName; }
72
73#if QT_CONFIG(cursor)
75#endif
76
78
79 uint32_t outputId() const { return m_outputId; }
81 {
82 return const_cast<::wl_output *>(QtWayland::wl_output::object());
83 }
84
87
90
91protected:
98 uint requiredEvents() const;
99
103 int subpixel,
104 const QString &make,
105 const QString &model,
108 void output_done() override;
109 void output_name(const QString &name) override;
111
112 // XdgOutput
118
125 int mScale = 1;
126 int mDepth = 32;
127 int mRefreshRate = 60000;
128 int mSubpixel = -1;
129 int mTransform = -1;
135 bool mInitialized = false;
136};
137
138}
139
140QT_END_NAMESPACE
141
142#endif // QWAYLANDSCREEN_H
friend class QPainter
static QRegion marginsRegion(const QSize &size, const QMargins &margins)
Q_DECLARE_LOGGING_CATEGORY(lcQpaWaylandInput)