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
43
48
50 struct ::wl_surface *surface,
52{
53#ifndef QT_NO_GESTURES
55 if (!mFocus || !mFocus->waylandWindow()) {
56 return;
57 }
60
61 const auto* pointer = mParent->pointer();
62
63 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_begin @ "
64 << pointer->mSurfacePos << "fingers" << fingers;
65
68 QPointF());
69
71#endif
72}
73
76{
77#ifndef QT_NO_GESTURES
78 if (!mFocus || !mFocus->waylandWindow()) {
79 return;
80 }
81 const auto* pointer = mParent->pointer();
82
84 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_update @ "
85 << pointer->mSurfacePos << "delta" << delta;
86
89
91#endif
92}
93
96{
97#ifndef QT_NO_GESTURES
98 if (!mFocus || !mFocus->waylandWindow()) {
99 return;
100 }
102 const auto* pointer = mParent->pointer();
103
104 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
105 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
106
108
111 QPointF());
112
114
115 mFocus.clear();
116 mFingers = 0;
117#endif
118}
119
124
129
131 struct ::wl_surface *surface,
133{
134#ifndef QT_NO_GESTURES
136 if (!mFocus || !mFocus->waylandWindow()) {
137 return;
138 }
141 mLastScale = 1;
142 const auto* pointer = mParent->pointer();
143
144 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_begin @ "
145 << pointer->mSurfacePos << "fingers" << fingers;
146
149 QPointF(), 0, 0);
150
152#endif
153}
154
159{
160#ifndef QT_NO_GESTURES
161 if (!mFocus || !mFocus->waylandWindow()) {
162 return;
163 }
164 const auto* pointer = mParent->pointer();
165
169 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_update @ "
170 << pointer->mSurfacePos << "delta" << delta
171 << "scale" << mLastScale << "->" << rscale
172 << "delta" << rscale - mLastScale << "rot" << rot;
173
177
179
181#endif
182}
183
186{
187#ifndef QT_NO_GESTURES
188 if (!mFocus || !mFocus->waylandWindow()) {
189 return;
190 }
192 const auto* pointer = mParent->pointer();
193
194 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
195 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
196
198
201 QPointF(), 0, 0);
202
204
205 mFocus.clear();
206 mFingers = 0;
207 mLastScale = 1;
208#endif
209}
210
211} // namespace QtWaylandClient
212
213QT_END_NAMESPACE
Combined button and popup list for selecting options.