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
qwaylanddecorationhandler_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025
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
QWAYLANDDECORATIONHANDLER_P_H
5
#
define
QWAYLANDDECORATIONHANDLER_P_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
"qwaylandsurface_p.h"
19
#
include
"qwaylandwindow_p.h"
20
21
#
include
<
QtWaylandClient
/
qtwaylandclientglobal
.
h
>
22
23
#
include
<
QtCore
/
QSize
>
24
#
include
<
memory
>
25
26
QT_BEGIN_NAMESPACE
27
28
namespace
QtWaylandClient
{
29
30
class
QWaylandWindow;
31
class
QWaylandShmBuffer;
32
class
QWaylandDisplay;
33
class
QWaylandAbstractDecoration;
34
35
class
Q_WAYLANDCLIENT_EXPORT
QWaylandDecorationSurface
36
{
37
public
:
38
enum
class
Part
{
Top
,
Left
,
Right
,
Bottom
};
39
40
QWaylandDecorationSurface
(
QWaylandWindow
*
parentWindow
,
QWaylandAbstractDecoration
*
decoration
,
41
Part
part
);
42
~
QWaylandDecorationSurface
();
43
44
void
setGeometry
(
const
QRect
&
windowGeometry
,
const
QRect
&
paintGeometry
);
45
bool
paint
();
46
47
void
handleMouse
(
QWaylandInputDevice
*
inputDevice
,
const
QWaylandPointerEvent
&
e
);
48
QPointF
mapToGlobal
(
const
QPointF
&
pointIn
);
49
50
private
:
51
struct
SubsurfaceDeleter
52
{
53
void
operator
()(
QtWayland
::
wl_subsurface
*
subsurface
)
const
;
54
};
55
56
void
createBuffer
(
const
QSize
&
size
);
57
QWaylandWindow
*
mParentWindow
=
nullptr
;
58
QWaylandAbstractDecoration
*
mWindowDecoration
;
59
Part
mPart
;
60
QRect
mWindowGeometry
;
61
QRect
mPaintGeometry
;
62
63
std
::
unique_ptr
<
QWaylandShmBuffer
>
mFrontBuffer
;
64
std
::
unique_ptr
<
QWaylandShmBuffer
>
mBackBuffer
;
65
66
std
::
unique_ptr
<
QWaylandSurface
>
mSurface
;
67
std
::
unique_ptr
<
QtWayland
::
wl_subsurface
,
SubsurfaceDeleter
>
mSubsurface
;
68
std
::
unique_ptr
<
QWaylandViewport
>
mViewport
;
69
};
70
71
class
Q_WAYLANDCLIENT_EXPORT
QWaylandDecorationHandler
:
public
QObject
72
{
73
Q_OBJECT
74
public
:
75
explicit
QWaylandDecorationHandler
(
QWaylandWindow
*
window
);
76
~
QWaylandDecorationHandler
();
77
78
// update the contents of the buffers/surfaces and commit them
79
void
update
();
80
81
void
reset
();
82
83
// the underlying decoration, may be null
84
QWaylandAbstractDecoration
*
decoration
()
const
;
85
86
// called when the window flags or hints change
87
void
updateNeedsDecoration
();
88
89
private
:
90
void
updateTile
(
std
::
unique_ptr
<
QWaylandDecorationSurface
> &
surface
,
91
const
QRect
&
windowGeometry
,
92
const
QRect
&
paintGeometry
,
93
QWaylandDecorationSurface
::
Part
part
);
94
QWaylandWindow
*
mWindow
=
nullptr
;
95
96
std
::
unique_ptr
<
QWaylandAbstractDecoration
>
mWindowDecoration
;
97
std
::
unique_ptr
<
QWaylandDecorationSurface
>
mTopDecorationSurface
;
98
std
::
unique_ptr
<
QWaylandDecorationSurface
>
mLeftDecorationSurface
;
99
std
::
unique_ptr
<
QWaylandDecorationSurface
>
mRightDecorationSurface
;
100
std
::
unique_ptr
<
QWaylandDecorationSurface
>
mBottomDecorationSurface
;
101
bool
mWindowDecorationEnabled
=
false
;
102
};
103
104
}
// namespace QtWaylandClient
105
106
QT_END_NAMESPACE
107
108
#
endif
// QWAYLANDDECORATIONHANDLER_P_H
QtWaylandClient::QWaylandDecorationHandler
Definition
qwaylanddecorationhandler_p.h:72
QtWaylandClient::QWaylandDecorationSurface
Definition
qwaylanddecorationhandler_p.h:36
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
qwaylanddecorationhandler_p.h
Generated on
for Qt by
1.18.0