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
qwaylandpointergestures.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 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
9
11
12namespace QtWaylandClient {
13
18
26
32
38
44
49
51 struct ::wl_surface *surface,
53{
54#ifndef QT_NO_GESTURES
56 if (!mFocus || !mFocus->waylandWindow()) {
57 return;
58 }
61
62 const auto* pointer = mParent->pointer();
63
64 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_begin @ "
65 << pointer->mSurfacePos << "fingers" << fingers;
66
69 QPointF());
70
72#endif
73}
74
77{
78#ifndef QT_NO_GESTURES
79 if (!mFocus || !mFocus->waylandWindow()) {
80 return;
81 }
82 const auto* pointer = mParent->pointer();
83
85 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_update @ "
86 << pointer->mSurfacePos << "delta" << delta;
87
90
92#endif
93}
94
97{
98#ifndef QT_NO_GESTURES
99 if (!mFocus || !mFocus->waylandWindow()) {
100 return;
101 }
103 const auto* pointer = mParent->pointer();
104
105 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
106 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
107
109
112 QPointF());
113
115
116 mFocus.clear();
117 mFingers = 0;
118#endif
119}
120
126
131
133 struct ::wl_surface *surface,
135{
136#ifndef QT_NO_GESTURES
138 if (!mFocus || !mFocus->waylandWindow()) {
139 return;
140 }
143 mLastScale = 1;
144 const auto* pointer = mParent->pointer();
145
146 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_begin @ "
147 << pointer->mSurfacePos << "fingers" << fingers;
148
151 QPointF(), 0, 0);
152
154#endif
155}
156
161{
162#ifndef QT_NO_GESTURES
163 if (!mFocus || !mFocus->waylandWindow()) {
164 return;
165 }
166 const auto* pointer = mParent->pointer();
167
171 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_update @ "
172 << pointer->mSurfacePos << "delta" << delta
173 << "scale" << mLastScale << "->" << rscale
174 << "delta" << rscale - mLastScale << "rot" << rot;
175
179
181
183#endif
184}
185
188{
189#ifndef QT_NO_GESTURES
190 if (!mFocus || !mFocus->waylandWindow()) {
191 return;
192 }
194 const auto* pointer = mParent->pointer();
195
196 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
197 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
198
200
203 QPointF(), 0, 0);
204
206
207 mFocus.clear();
208 mFingers = 0;
209 mLastScale = 1;
210#endif
211}
212
213} // namespace QtWaylandClient
214
215QT_END_NAMESPACE
Combined button and popup list for selecting options.