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// Qt-Security score:significant reason:default
4
5#ifndef QWAYLANDSCREEN_H
6#define QWAYLANDSCREEN_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <qpa/qplatformscreen.h>
20#include <QtGui/qscreen_platform.h>
21#include <QtWaylandClient/qtwaylandclientglobal.h>
22
23#include <QtWaylandClient/private/qwayland-wayland.h>
24#include <QtWaylandClient/private/qwayland-xdg-output-unstable-v1.h>
25#include <QtCore/private/qglobal_p.h>
26
28
29namespace QtWaylandClient {
30
31class QWaylandDisplay;
32class QWaylandCursor;
33
42
43class Q_WAYLANDCLIENT_EXPORT QWaylandScreen : public QPlatformScreen,
47{
48public:
51
52 void maybeInitialize();
53
55
56 QWaylandDisplay *display() const;
57
59 QString model() const override;
60
61 QRect geometry() const override;
62 int depth() const override;
64
66
67 QDpi logicalDpi() const override;
69
71 int scale() const;
74
75 QString name() const override { return mOutputName; }
76
77#if QT_CONFIG(cursor)
79#endif
80
82
83 uint32_t outputId() const { return m_outputId; }
85 {
86 return const_cast<::wl_output *>(QtWayland::wl_output::object());
87 }
88
91
94
95protected:
102 uint requiredEvents() const;
103
107 int subpixel,
108 const QString &make,
109 const QString &model,
112 void output_done() override;
113 void output_name(const QString &name) override;
115
116 // XdgOutput
122
129 int mScale = 1;
130 int mDepth = 32;
131 int mRefreshRate = 60000;
132 int mSubpixel = -1;
133 int mTransform = -1;
139 bool mInitialized = false;
140
141private:
143};
144
145}
146
147QT_END_NAMESPACE
148
149#endif // QWAYLANDSCREEN_H
friend class QPainter
Combined button and popup list for selecting options.
static QRegion marginsRegion(const QSize &size, const QMargins &margins)
Q_DECLARE_LOGGING_CATEGORY(lcQpaWaylandInput)