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
qwaylandxdgshellintegration_p.h
Go to the documentation of this file.
1
// Copyright (C) 2018 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QWAYLANDXDGSHELLINTEGRATION_H
6
#
define
QWAYLANDXDGSHELLINTEGRATION_H
7
8
#
include
<
QtWaylandCompositor
/
private
/
qwaylandquickshellsurfaceitem_p
.
h
>
9
#
include
<
QtWaylandCompositor
/
QWaylandQuickShellSurfaceItem
>
10
#
include
<
QtWaylandCompositor
/
QWaylandXdgToplevel
>
11
12
QT_BEGIN_NAMESPACE
13
14
//
15
// W A R N I N G
16
// -------------
17
//
18
// This file is not part of the Qt API. It exists purely as an
19
// implementation detail. This header file may change from version to
20
// version without notice, or even be removed.
21
//
22
// We mean it.
23
//
24
25
class
QWaylandXdgSurface;
26
27
namespace
QtWayland
{
28
29
class
XdgToplevelIntegration
:
public
QWaylandQuickShellIntegration
30
{
31
Q_OBJECT
32
public
:
33
XdgToplevelIntegration
(
QWaylandQuickShellSurfaceItem
*
item
);
34
35
protected
:
36
bool
eventFilter
(QObject *object, QEvent *event)
override
;
37
38
private
Q_SLOTS
:
39
void
handleStartMove
(
QWaylandSeat
*
seat
);
40
void
handleStartResize(QWaylandSeat *seat, Qt::Edges edges);
41
void
handleSetMaximized();
42
void
handleUnsetMaximized();
43
void
handleMaximizedChanged();
44
void
handleSetFullscreen();
45
void
handleUnsetFullscreen();
46
void
handleFullscreenChanged();
47
void
handleActivatedChanged();
48
void
handleSurfaceSizeChanged();
49
void
handleToplevelDestroyed();
50
void
handleMaximizedSizeChanged();
51
void
handleFullscreenSizeChanged();
52
53
private
:
54
QWaylandQuickShellSurfaceItem *m_item =
nullptr
;
55
QWaylandXdgSurface *m_xdgSurface =
nullptr
;
56
QWaylandXdgToplevel *m_toplevel =
nullptr
;
57
58
enum
class
GrabberState {
59
Default,
60
Resize,
61
Move
62
};
63
GrabberState grabberState;
64
65
struct
{
66
QWaylandSeat *seat =
nullptr
;
67
QPointF initialOffset;
68
bool
initialized;
69
} moveState;
70
71
struct
{
72
QWaylandSeat *seat =
nullptr
;
73
Qt::Edges resizeEdges;
74
QSizeF initialWindowSize;
75
QPointF initialMousePos;
76
QPointF initialPosition;
77
QSize initialSurfaceSize;
78
bool
initialized;
79
} resizeState;
80
81
struct
{
82
QSize initialWindowSize;
83
QPointF initialPosition;
84
} windowedGeometry;
85
86
struct
{
87
QWaylandOutput *output =
nullptr
;
88
QMetaObject::Connection sizeChangedConnection;
// Depending on whether maximized or fullscreen,
89
// will be hooked to geometry-changed or available-
90
// geometry-changed.
91
} nonwindowedState;
92
93
bool
filterPointerMoveEvent(
const
QPointF &scenePosition);
94
bool
filterMouseMoveEvent(QMouseEvent *event);
95
bool
filterPointerReleaseEvent();
96
bool
filterTouchUpdateEvent(QTouchEvent *event);
97
};
98
99
class
XdgPopupIntegration
:
public
QWaylandQuickShellIntegration
100
{
101
Q_OBJECT
102
public
:
103
XdgPopupIntegration
(
QWaylandQuickShellSurfaceItem
*
item
);
104
105
private
Q_SLOTS
:
106
void
handleGeometryChanged
();
107
108
private
:
109
QWaylandQuickShellSurfaceItem *m_item =
nullptr
;
110
QWaylandXdgSurface *m_xdgSurface =
nullptr
;
111
QWaylandXdgPopup *m_popup =
nullptr
;
112
};
113
114
}
115
116
QT_END_NAMESPACE
117
118
#
endif
// QWAYLANDXDGSHELLINTEGRATION_H
QtWayland::XdgPopupIntegration
Definition
qwaylandxdgshellintegration_p.h:100
QtWayland::XdgToplevelIntegration
Definition
qwaylandxdgshellintegration_p.h:30
QtWayland::XdgToplevelIntegration::eventFilter
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
Definition
qwaylandxdgshellintegration.cpp:48
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtWayland
Definition
qwaylanddisplay_p.h:54
QtWayland::handlePopupCreated
static void handlePopupCreated(QWaylandQuickShellSurfaceItem *parentItem, QWaylandXdgPopup *popup)
Definition
qwaylandxdgshellintegration.cpp:15
qtwayland
src
compositor
extensions
qwaylandxdgshellintegration_p.h
Generated on
for Qt by
1.18.0