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
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
4#ifndef QWAYLANDXDGSHELLINTEGRATION_H
5#define QWAYLANDXDGSHELLINTEGRATION_H
6
7#include <QtWaylandCompositor/private/qwaylandquickshellsurfaceitem_p.h>
8#include <QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
9#include <QtWaylandCompositor/QWaylandXdgToplevel>
10
11QT_BEGIN_NAMESPACE
12
13//
14// W A R N I N G
15// -------------
16//
17// This file is not part of the Qt API. It exists purely as an
18// implementation detail. This header file may change from version to
19// version without notice, or even be removed.
20//
21// We mean it.
22//
23
24class QWaylandXdgSurface;
25
26namespace QtWayland {
27
29{
31public:
33
34protected:
35 bool eventFilter(QObject *object, QEvent *event) override;
36
37private Q_SLOTS:
39 void handleStartResize(QWaylandSeat *seat, Qt::Edges edges);
40 void handleSetMaximized();
41 void handleUnsetMaximized();
42 void handleMaximizedChanged();
43 void handleSetFullscreen();
44 void handleUnsetFullscreen();
45 void handleFullscreenChanged();
46 void handleActivatedChanged();
47 void handleSurfaceSizeChanged();
48 void handleToplevelDestroyed();
49 void handleMaximizedSizeChanged();
50 void handleFullscreenSizeChanged();
51
52private:
53 QWaylandQuickShellSurfaceItem *m_item = nullptr;
54 QWaylandXdgSurface *m_xdgSurface = nullptr;
55 QWaylandXdgToplevel *m_toplevel = nullptr;
56
57 enum class GrabberState {
58 Default,
59 Resize,
60 Move
61 };
62 GrabberState grabberState;
63
64 struct {
65 QWaylandSeat *seat = nullptr;
68 } moveState;
69
70 struct {
71 QWaylandSeat *seat = nullptr;
77 bool initialized;
78 } resizeState;
79
80 struct {
82 QPointF initialPosition;
83 } windowedGeometry;
84
85 struct {
87 QMetaObject::Connection sizeChangedConnection; // Depending on whether maximized or fullscreen,
88 // will be hooked to geometry-changed or available-
89 // geometry-changed.
90 } nonwindowedState;
91
92 bool filterPointerMoveEvent(const QPointF &scenePosition);
93 bool filterMouseMoveEvent(QMouseEvent *event);
94 bool filterPointerReleaseEvent();
95 bool filterTouchUpdateEvent(QTouchEvent *event);
96};
97
99{
101public:
103
104private Q_SLOTS:
106
107private:
108 QWaylandQuickShellSurfaceItem *m_item = nullptr;
109 QWaylandXdgSurface *m_xdgSurface = nullptr;
110 QWaylandXdgPopup *m_popup = nullptr;
111};
112
113}
114
115QT_END_NAMESPACE
116
117#endif // QWAYLANDXDGSHELLINTEGRATION_H
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
static void handlePopupCreated(QWaylandQuickShellSurfaceItem *parentItem, QWaylandXdgPopup *popup)