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
71 if (auto ww = mFocus->waylandWindow()) {
73 }
74#endif
75}
76
79{
80#ifndef QT_NO_GESTURES
81 if (!mFocus || !mFocus->waylandWindow()) {
82 return;
83 }
84 const auto* pointer = mParent->pointer();
85
87 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_update @ "
88 << pointer->mSurfacePos << "delta" << delta;
89
92
93 if (auto ww = mFocus->waylandWindow()) {
95 }
96#endif
97}
98
101{
102#ifndef QT_NO_GESTURES
103 if (!mFocus || !mFocus->waylandWindow()) {
104 return;
105 }
107 const auto* pointer = mParent->pointer();
108
109 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
110 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
111
113
116 QPointF());
117
118 if (auto ww = mFocus->waylandWindow()) {
120 }
121
122 mFocus.clear();
123 mFingers = 0;
124#endif
125}
126
132
137
139 struct ::wl_surface *surface,
141{
142#ifndef QT_NO_GESTURES
144 if (!mFocus || !mFocus->waylandWindow()) {
145 return;
146 }
149 mLastScale = 1;
150 const auto* pointer = mParent->pointer();
151
152 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_begin @ "
153 << pointer->mSurfacePos << "fingers" << fingers;
154
157 QPointF(), 0, 0);
158
159 if (auto ww = mFocus->waylandWindow()) {
161 }
162#endif
163}
164
169{
170#ifndef QT_NO_GESTURES
171 if (!mFocus || !mFocus->waylandWindow()) {
172 return;
173 }
174 const auto* pointer = mParent->pointer();
175
179 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_pinch_v1_update @ "
180 << pointer->mSurfacePos << "delta" << delta
181 << "scale" << mLastScale << "->" << rscale
182 << "delta" << rscale - mLastScale << "rot" << rot;
183
187
188 if (auto ww = mFocus->waylandWindow()) {
190 }
191
193#endif
194}
195
198{
199#ifndef QT_NO_GESTURES
200 if (!mFocus || !mFocus->waylandWindow()) {
201 return;
202 }
204 const auto* pointer = mParent->pointer();
205
206 qCDebug(lcQpaWaylandInput) << "zwp_pointer_gesture_swipe_v1_end @ "
207 << pointer->mSurfacePos << (cancelled ? "CANCELED" : "");
208
210
213 QPointF(), 0, 0);
214
215 if (auto ww = mFocus->waylandWindow()) {
217 }
218 mFocus.clear();
219 mFingers = 0;
220 mLastScale = 1;
221#endif
222}
223
224} // namespace QtWaylandClient
225
226QT_END_NAMESPACE
Combined button and popup list for selecting options.