Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
27
QT_BEGIN_NAMESPACE
28
29
namespace
QtWaylandClient
{
30
31
class
QWaylandDisplay;
32
class
QWaylandCursor;
33
34
class
Q_WAYLANDCLIENT_EXPORT
QWaylandXdgOutputManagerV1
:
public
QtWayland
::
zxdg_output_manager_v1
{
35
public
:
36
QWaylandXdgOutputManagerV1
(
QWaylandDisplay
*
display
,
uint
id
,
uint
version
);
37
~
QWaylandXdgOutputManagerV1
();
38
39
private
:
40
Q_DISABLE_COPY
(
QWaylandXdgOutputManagerV1
)
41
};
42
43
class
Q_WAYLANDCLIENT_EXPORT
QWaylandScreen
:
public
QPlatformScreen
,
44
QtWayland
::
wl_output
,
45
QtWayland
::
zxdg_output_v1
,
46
public
QNativeInterface
::
QWaylandScreen
47
{
48
public
:
49
QWaylandScreen
(
QWaylandDisplay
*
waylandDisplay
,
int
version
,
uint32_t
id
);
50
~
QWaylandScreen
()
override
;
51
52
void
maybeInitialize
();
53
54
void
initXdgOutput
(
QWaylandXdgOutputManagerV1
*
xdgOutputManager
);
55
56
QWaylandDisplay
*
display
()
const
;
57
58
QString
manufacturer
()
const
override
;
59
QString
model
()
const
override
;
60
61
QRect
geometry
()
const
override
;
62
int
depth
()
const
override
;
63
QImage
::
Format
format
()
const
override
;
64
65
QSizeF
physicalSize
()
const
override
;
66
67
QDpi
logicalDpi
()
const
override
;
68
QList
<
QPlatformScreen
*>
virtualSiblings
()
const
override
;
69
70
Qt
::
ScreenOrientation
orientation
()
const
override
;
71
int
scale
()
const
;
72
qreal
devicePixelRatio
()
const
override
;
73
qreal
refreshRate
()
const
override
;
74
75
QString
name
()
const
override
{
return
mOutputName
; }
76
77
#
if
QT_CONFIG
(
cursor
)
78
QPlatformCursor
*
cursor
()
const
override
;
79
#
endif
80
81
SubpixelAntialiasingType
subpixelAntialiasingTypeHint
()
const
override
;
82
83
uint32_t
outputId
()
const
{
return
m_outputId
; }
84
::
wl_output
*
output
()
const
override
85
{
86
return
const_cast
<::
wl_output
*>(
QtWayland
::
wl_output
::
object
());
87
}
88
89
static
QWaylandScreen
*
waylandScreenFromWindow
(
QWindow
*
window
);
90
static
QWaylandScreen
*
fromWlOutput
(::
wl_output
*
output
);
91
92
Qt
::
ScreenOrientation
toScreenOrientation
(
int
wlTransform
,
93
Qt
::
ScreenOrientation
fallback
)
const
;
94
95
protected
:
96
enum
Event
:
uint
{
97
XdgOutputDoneEvent
= 0x1,
98
OutputDoneEvent
= 0x2,
99
XdgOutputNameEvent
= 0x4,
100
OutputNameEvent
= 0x8,
101
};
102
uint
requiredEvents
()
const
;
103
104
void
output_mode
(
uint32_t
flags
,
int
width
,
int
height
,
int
refresh
)
override
;
105
void
output_geometry
(
int32_t
x
,
int32_t
y
,
106
int32_t
width
,
int32_t
height
,
107
int
subpixel
,
108
const
QString
&
make
,
109
const
QString
&
model
,
110
int32_t
transform
)
override
;
111
void
output_scale
(
int32_t
factor
)
override
;
112
void
output_done
()
override
;
113
void
output_name
(
const
QString
&
name
)
override
;
114
void
updateOutputProperties
();
115
116
// XdgOutput
117
void
zxdg_output_v1_logical_position
(
int32_t
x
,
int32_t
y
)
override
;
118
void
zxdg_output_v1_logical_size
(
int32_t
width
,
int32_t
height
)
override
;
119
void
zxdg_output_v1_done
()
override
;
120
void
zxdg_output_v1_name
(
const
QString
&
name
)
override
;
121
void
updateXdgOutputProperties
();
122
123
int
m_outputId
;
124
QWaylandDisplay
*
mWaylandDisplay
=
nullptr
;
125
QString
mManufacturer
;
126
QString
mModel
;
127
QRect
mGeometry
;
128
QRect
mXdgGeometry
;
129
int
mScale
= 1;
130
int
mDepth
= 32;
131
int
mRefreshRate
= 60000;
132
int
mSubpixel
= -1;
133
int
mTransform
= -1;
134
QImage
::
Format
mFormat
=
QImage
::
Format_ARGB32_Premultiplied
;
135
QSize
mPhysicalSize
;
136
QString
mOutputName
;
137
Qt
::
ScreenOrientation
m_orientation
=
Qt
::
PrimaryOrientation
;
138
uint
mProcessedEvents
= 0;
139
bool
mInitialized
=
false
;
140
141
private
:
142
Q_DISABLE_COPY
(
QWaylandScreen
)
143
};
144
145
}
146
147
QT_END_NAMESPACE
148
149
#
endif
// QWAYLANDSCREEN_H
QPaintEngine::QPainter
friend class QPainter
Definition
qpaintengine.h:220
QtWaylandClient::ColorManagementSurface
Definition
qwaylandcolormanagement_p.h:136
QtWaylandClient::Cutouts
Definition
qwaylandcutouts_p.h:28
QtWaylandClient::ImageDescription
Definition
qwaylandcolormanagement_p.h:102
QtWaylandClient::QWaylandAbstractDecorationPrivate
Definition
qwaylandabstractdecoration.cpp:21
QtWaylandClient::QWaylandAbstractDecorationPrivate::m_isDirty
bool m_isDirty
Definition
qwaylandabstractdecoration.cpp:31
QtWaylandClient::QWaylandAbstractDecorationPrivate::m_wayland_window
QWaylandWindow * m_wayland_window
Definition
qwaylandabstractdecoration.cpp:29
QtWaylandClient::QWaylandAbstractDecorationPrivate::m_mouseButtons
Qt::MouseButtons m_mouseButtons
Definition
qwaylandabstractdecoration.cpp:34
QtWaylandClient::QWaylandAbstractDecorationPrivate::~QWaylandAbstractDecorationPrivate
~QWaylandAbstractDecorationPrivate() override
Definition
qwaylandabstractdecoration.cpp:42
QtWaylandClient::QWaylandAbstractDecorationPrivate::m_window
QWindow * m_window
Definition
qwaylandabstractdecoration.cpp:28
QtWaylandClient::QWaylandAbstractDecorationPrivate::m_decorationContentImage
QImage m_decorationContentImage
Definition
qwaylandabstractdecoration.cpp:32
QtWaylandClient::QWaylandAbstractDecoration
Definition
qwaylandabstractdecoration_p.h:48
QtWaylandClient::QWaylandFractionalScale
Definition
qwaylandfractionalscale_p.h:31
QtWaylandClient::QWaylandPointerEvent
Definition
qwaylandinputdevice_p.h:443
QtWaylandClient::QWaylandPointerGesturePinchEvent
Definition
qwaylandinputdevice_p.h:520
QtWaylandClient::QWaylandPointerGestureSwipeEvent
Definition
qwaylandinputdevice_p.h:495
QtWaylandClient::QWaylandScreen
Definition
qwaylandscreen_p.h:47
QtWaylandClient::QWaylandShellSurface
Definition
qwaylandshellsurface_p.h:41
QtWaylandClient::QWaylandSurface
Definition
qwaylandsurface_p.h:37
QtWaylandClient::QWaylandViewport
Definition
qwaylandviewport_p.h:29
QtWaylandClient::QWaylandWindow
Definition
qwaylandwindow_p.h:73
QtWaylandClient::QWaylandXdgOutputManagerV1
Definition
qwaylandscreen_p.h:34
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtWaylandClient
Definition
qwaylandclientextension.h:16
qtbase
src
plugins
platforms
wayland
qwaylandscreen_p.h
Generated on
for Qt by
1.18.0