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
qplatformwindow_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
QPLATFORMWINDOW_P_H
6
#
define
QPLATFORMWINDOW_P_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
<
QtGui
/
private
/
qtguiglobal_p
.
h
>
20
#
include
<
QtCore
/
qbasictimer
.
h
>
21
#
include
<
QtCore
/
qrect
.
h
>
22
#
include
<
QtCore
/
qnativeinterface
.
h
>
23
#
include
<
QtGui
/
qwindow
.
h
>
24
25
#
if
QT_CONFIG
(
wayland
)
26
#
include
<
any
>
27
#
include
<
QtCore
/
qobject
.
h
>
28
29
struct
wl_surface
;
30
#
endif
31
32
#
if
defined
(
Q_OS_MACOS
)
33
Q_FORWARD_DECLARE_OBJC_CLASS
(
CALayer
);
34
typedef
long
NSInteger
;
35
enum
NSVisualEffectMaterial
:
NSInteger
;
36
enum
NSVisualEffectBlendingMode
:
NSInteger
;
37
enum
NSVisualEffectState
:
NSInteger
;
38
#
endif
39
40
#
if
defined
(
Q_OS_HARMONY
)
41
#
include
<
optional
>
42
43
typedef
struct
ArkUI_Node
*
ArkUI_NodeHandle
;
44
#
endif
45
46
QT_BEGIN_NAMESPACE
47
48
class
QMargins
;
49
50
class
QPlatformWindowPrivate
51
{
52
public
:
53
QRect
rect
;
54
QBasicTimer
updateTimer
;
55
};
56
57
// ----------------- QNativeInterface -----------------
58
59
namespace
QNativeInterface::
Private
{
60
61
#
if
defined
(
Q_OS_WASM
)
||
defined
(
Q_QDOC
)
62
struct
Q_GUI_EXPORT
QWasmWindow
63
{
64
QT_DECLARE_NATIVE_INTERFACE
(
QWasmWindow
, 1,
QWindow
)
65
virtual
emscripten
::
val
document
()
const
= 0;
66
virtual
emscripten
::
val
clientArea
()
const
= 0;
67
virtual
emscripten
::
val
canvas
()
const
= 0;
68
};
69
#
endif
70
71
#
if
defined
(
Q_OS_MACOS
)
||
defined
(
Q_QDOC
)
72
struct
Q_GUI_EXPORT
QCocoaWindow
73
{
74
QT_DECLARE_NATIVE_INTERFACE
(
QCocoaWindow
, 3,
QWindow
)
75
virtual
QPoint
bottomLeftClippedByNSWindowOffset
()
const
= 0;
76
virtual
CALayer
*
contentLayer
()
const
= 0;
77
virtual
void
manageVisualEffectArea
(
quintptr
identifier
,
const
QRect
&
rect
,
78
NSVisualEffectMaterial
material
,
NSVisualEffectBlendingMode
blendMode
,
79
NSVisualEffectState
activationState
) = 0;
80
};
81
#
endif
82
83
#
if
QT_CONFIG
(
xcb
)
||
defined
(
Q_QDOC
)
84
struct
Q_GUI_EXPORT
QXcbWindow
85
{
86
QT_DECLARE_NATIVE_INTERFACE
(
QXcbWindow
, 1,
QWindow
)
87
88
enum
WindowType
{
89
None
= 0x000000,
90
Normal
= 0x000001,
91
Desktop
= 0x000002,
92
Dock
= 0x000004,
93
Toolbar
= 0x000008,
94
Menu
= 0x000010,
95
Utility
= 0x000020,
96
Splash
= 0x000040,
97
Dialog
= 0x000080,
98
DropDownMenu
= 0x000100,
99
PopupMenu
= 0x000200,
100
Tooltip
= 0x000400,
101
Notification
= 0x000800,
102
Combo
= 0x001000,
103
Dnd
= 0x002000,
104
KdeOverride
= 0x004000
105
};
106
Q_DECLARE_FLAGS
(
WindowTypes
,
WindowType
)
107
108
virtual
void
setWindowType
(
WindowTypes
type
) = 0;
109
virtual
void
setWindowRole
(
const
QString
&
role
) = 0;
110
virtual
void
setWindowIconText
(
const
QString
&
text
) = 0;
111
virtual
uint
visualId
()
const
= 0;
112
};
113
#
endif
// xcb
114
115
#
if
defined
(
Q_OS_WIN
)
||
defined
(
Q_QDOC
)
116
struct
Q_GUI_EXPORT
QWindowsWindow
117
{
118
QT_DECLARE_NATIVE_INTERFACE
(
QWindowsWindow
, 1,
QWindow
)
119
120
virtual
void
setHasBorderInFullScreen
(
bool
border
) = 0;
121
virtual
bool
hasBorderInFullScreen
()
const
= 0;
122
123
virtual
QMargins
customMargins
()
const
= 0;
124
virtual
void
setCustomMargins
(
const
QMargins
&
margins
) = 0;
125
};
126
#
endif
// Q_OS_WIN
127
128
#
if
QT_CONFIG
(
wayland
)
129
struct
Q_GUI_EXPORT
QWaylandWindow
:
public
QObject
130
{
131
Q_OBJECT
132
public
:
133
QT_DECLARE_NATIVE_INTERFACE
(
QWaylandWindow
, 1,
QWindow
)
134
135
enum
WindowType
{
136
Default
,
137
ToolTip
,
138
ComboBox
,
139
Menu
,
140
SubMenu
,
141
};
142
143
virtual
wl_surface
*
surface
()
const
= 0;
144
virtual
void
setCustomMargins
(
const
QMargins
&
margins
) = 0;
145
virtual
void
requestXdgActivationToken
(
uint
serial
) = 0;
146
template
<
typename
T
>
147
T
*
surfaceRole
()
const
148
{
149
std
::
any
anyRole
=
_surfaceRole
();
150
auto
role
=
std
::
any_cast
<
T
*>(&
anyRole
);
151
return
role
? *
role
:
nullptr
;
152
}
153
virtual
void
setSessionRestoreId
(
const
QString
&
role
) = 0;
154
155
virtual
void
setExtendedWindowType
(
WindowType
windowType
) = 0;
156
virtual
void
setParentControlGeometry
(
const
QRect
&
parentAnchor
) = 0;
157
158
Q_SIGNALS
:
159
void
surfaceCreated
();
160
void
surfaceDestroyed
();
161
void
surfaceRoleCreated
();
162
void
surfaceRoleDestroyed
();
163
void
xdgActivationTokenCreated
(
const
QString
&
token
);
164
165
protected
:
166
virtual
std
::
any
_surfaceRole
()
const
= 0;
167
};
168
#
endif
169
170
#
if
defined
(
Q_OS_HARMONY
)
171
struct
Q_GUI_EXPORT
QOhosWindow
172
{
173
QT_DECLARE_NATIVE_INTERFACE
(
QOhosWindow
, 1,
QWindow
)
174
static
QWindow
*
fromNative
(
ArkUI_NodeHandle
content
);
175
virtual
std
::
optional
<
double
>
windowId
()
const
= 0;
176
};
177
178
struct
Q_GUI_EXPORT
QOhosIntegration
179
{
180
QT_DECLARE_NATIVE_INTERFACE
(
QOhosIntegration
)
181
virtual
WId
windowHandle
(
ArkUI_NodeHandle
content
) = 0;
182
virtual
void
setMainWindowGeometryPersistenceEnabled
(
std
::
optional
<
bool
>
enabled
) = 0;
183
};
184
#
endif
// defined(Q_OS_HARMONY)
185
186
}
// QNativeInterface::Private
187
188
QT_END_NAMESPACE
189
190
#
endif
// QPLATFORMWINDOW_P_H
QMargins
\inmodule QtCore
Definition
qmargins.h:27
QPlatformWindowPrivate
Definition
qplatformwindow_p.h:51
QPlatformWindowPrivate::rect
QRect rect
Definition
qplatformwindow_p.h:53
QPlatformWindowPrivate::updateTimer
QBasicTimer updateTimer
Definition
qplatformwindow_p.h:54
QNativeInterface
Definition
qnativeinterface.h:51
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
fixInitialSize
static QSize fixInitialSize(QSize size, const QWindow *w, int deviceIndependentDefaultWidth, int deviceIndependentDefaultHeight)
Definition
qplatformwindow.cpp:670
effectiveScreen
static const QScreen * effectiveScreen(const QWindow *window)
Definition
qplatformwindow.cpp:634
QWINDOWSIZE_MAX
#define QWINDOWSIZE_MAX
Definition
qplatformwindow.h:28
qtbase
src
gui
kernel
qplatformwindow_p.h
Generated on
for Qt by
1.16.1