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_OHOS
)
41
typedef
struct
ArkUI_Node
*
ArkUI_NodeHandle
;
42
#
endif
43
44
QT_BEGIN_NAMESPACE
45
46
class
QMargins
;
47
48
class
QPlatformWindowPrivate
49
{
50
public
:
51
QRect
rect
;
52
QBasicTimer
updateTimer
;
53
};
54
55
// ----------------- QNativeInterface -----------------
56
57
namespace
QNativeInterface::
Private
{
58
59
#
if
defined
(
Q_OS_WASM
)
||
defined
(
Q_QDOC
)
60
struct
Q_GUI_EXPORT
QWasmWindow
61
{
62
QT_DECLARE_NATIVE_INTERFACE
(
QWasmWindow
, 1,
QWindow
)
63
virtual
emscripten
::
val
document
()
const
= 0;
64
virtual
emscripten
::
val
clientArea
()
const
= 0;
65
virtual
emscripten
::
val
canvas
()
const
= 0;
66
};
67
#
endif
68
69
#
if
defined
(
Q_OS_MACOS
)
||
defined
(
Q_QDOC
)
70
struct
Q_GUI_EXPORT
QCocoaWindow
71
{
72
QT_DECLARE_NATIVE_INTERFACE
(
QCocoaWindow
, 3,
QWindow
)
73
virtual
QPoint
bottomLeftClippedByNSWindowOffset
()
const
= 0;
74
virtual
CALayer
*
contentLayer
()
const
= 0;
75
virtual
void
manageVisualEffectArea
(
quintptr
identifier
,
const
QRect
&
rect
,
76
NSVisualEffectMaterial
material
,
NSVisualEffectBlendingMode
blendMode
,
77
NSVisualEffectState
activationState
) = 0;
78
};
79
#
endif
80
81
#
if
QT_CONFIG
(
xcb
)
||
defined
(
Q_QDOC
)
82
struct
Q_GUI_EXPORT
QXcbWindow
83
{
84
QT_DECLARE_NATIVE_INTERFACE
(
QXcbWindow
, 1,
QWindow
)
85
86
enum
WindowType
{
87
None
= 0x000000,
88
Normal
= 0x000001,
89
Desktop
= 0x000002,
90
Dock
= 0x000004,
91
Toolbar
= 0x000008,
92
Menu
= 0x000010,
93
Utility
= 0x000020,
94
Splash
= 0x000040,
95
Dialog
= 0x000080,
96
DropDownMenu
= 0x000100,
97
PopupMenu
= 0x000200,
98
Tooltip
= 0x000400,
99
Notification
= 0x000800,
100
Combo
= 0x001000,
101
Dnd
= 0x002000,
102
KdeOverride
= 0x004000
103
};
104
Q_DECLARE_FLAGS
(
WindowTypes
,
WindowType
)
105
106
virtual
void
setWindowType
(
WindowTypes
type
) = 0;
107
virtual
void
setWindowRole
(
const
QString
&
role
) = 0;
108
virtual
void
setWindowIconText
(
const
QString
&
text
) = 0;
109
virtual
uint
visualId
()
const
= 0;
110
};
111
#
endif
// xcb
112
113
#
if
defined
(
Q_OS_WIN
)
||
defined
(
Q_QDOC
)
114
struct
Q_GUI_EXPORT
QWindowsWindow
115
{
116
QT_DECLARE_NATIVE_INTERFACE
(
QWindowsWindow
, 1,
QWindow
)
117
118
virtual
void
setHasBorderInFullScreen
(
bool
border
) = 0;
119
virtual
bool
hasBorderInFullScreen
()
const
= 0;
120
121
virtual
QMargins
customMargins
()
const
= 0;
122
virtual
void
setCustomMargins
(
const
QMargins
&
margins
) = 0;
123
};
124
#
endif
// Q_OS_WIN
125
126
#
if
QT_CONFIG
(
wayland
)
127
struct
Q_GUI_EXPORT
QWaylandWindow
:
public
QObject
128
{
129
Q_OBJECT
130
public
:
131
QT_DECLARE_NATIVE_INTERFACE
(
QWaylandWindow
, 1,
QWindow
)
132
133
enum
WindowType
{
134
Default
,
135
ToolTip
,
136
ComboBox
,
137
Menu
,
138
SubMenu
,
139
};
140
141
virtual
wl_surface
*
surface
()
const
= 0;
142
virtual
void
setCustomMargins
(
const
QMargins
&
margins
) = 0;
143
virtual
void
requestXdgActivationToken
(
uint
serial
) = 0;
144
template
<
typename
T
>
145
T
*
surfaceRole
()
const
146
{
147
std
::
any
anyRole
=
_surfaceRole
();
148
auto
role
=
std
::
any_cast
<
T
*>(&
anyRole
);
149
return
role
? *
role
:
nullptr
;
150
}
151
virtual
void
setSessionRestoreId
(
const
QString
&
role
) = 0;
152
153
virtual
void
setExtendedWindowType
(
WindowType
windowType
) = 0;
154
virtual
void
setParentControlGeometry
(
const
QRect
&
parentAnchor
) = 0;
155
156
Q_SIGNALS
:
157
void
surfaceCreated
();
158
void
surfaceDestroyed
();
159
void
surfaceRoleCreated
();
160
void
surfaceRoleDestroyed
();
161
void
xdgActivationTokenCreated
(
const
QString
&
token
);
162
163
protected
:
164
virtual
std
::
any
_surfaceRole
()
const
= 0;
165
};
166
#
endif
167
168
#
if
defined
(
Q_OS_OHOS
)
169
struct
Q_GUI_EXPORT
QOhosWindow
170
{
171
QT_DECLARE_NATIVE_INTERFACE
(
QOhosWindow
, 1,
QWindow
)
172
static
QWindow
*
fromNative
(
ArkUI_NodeHandle
content
);
173
};
174
175
struct
Q_GUI_EXPORT
QOhosIntegration
176
{
177
QT_DECLARE_NATIVE_INTERFACE
(
QOhosIntegration
)
178
virtual
WId
windowHandle
(
ArkUI_NodeHandle
content
) = 0;
179
};
180
#
endif
// defined(Q_OS_OHOS)
181
182
}
// QNativeInterface::Private
183
184
QT_END_NAMESPACE
185
186
#
endif
// QPLATFORMWINDOW_P_H
QMargins
\inmodule QtCore
Definition
qmargins.h:27
QPlatformWindowPrivate
Definition
qplatformwindow_p.h:49
QPlatformWindowPrivate::rect
QRect rect
Definition
qplatformwindow_p.h:51
QPlatformWindowPrivate::updateTimer
QBasicTimer updateTimer
Definition
qplatformwindow_p.h:52
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