Changeset View
Changeset View
Standalone View
Standalone View
src/client/pointer.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 49 | public: | |||
---|---|---|---|---|---|
50 | enum class ButtonState { | 50 | enum class ButtonState { | ||
51 | Released, | 51 | Released, | ||
52 | Pressed | 52 | Pressed | ||
53 | }; | 53 | }; | ||
54 | enum class Axis { | 54 | enum class Axis { | ||
55 | Vertical, | 55 | Vertical, | ||
56 | Horizontal | 56 | Horizontal | ||
57 | }; | 57 | }; | ||
58 | enum class AxisSource { | ||||
59 | Wheel, | ||||
60 | Finger, | ||||
61 | Continuous, | ||||
62 | WheelTilt | ||||
63 | }; | ||||
58 | explicit Pointer(QObject *parent = nullptr); | 64 | explicit Pointer(QObject *parent = nullptr); | ||
59 | virtual ~Pointer(); | 65 | virtual ~Pointer(); | ||
60 | 66 | | |||
61 | /** | 67 | /** | ||
62 | * @returns @c true if managing a wl_pointer. | 68 | * @returns @c true if managing a wl_pointer. | ||
63 | **/ | 69 | **/ | ||
64 | bool isValid() const; | 70 | bool isValid() const; | ||
65 | /** | 71 | /** | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 132 | Q_SIGNALS: | |||
164 | /** | 170 | /** | ||
165 | * Scroll and other axis notifications. | 171 | * Scroll and other axis notifications. | ||
166 | * | 172 | * | ||
167 | * @param time timestamp with millisecond granularity | 173 | * @param time timestamp with millisecond granularity | ||
168 | * @param axis @c Vertical or @c Horizontal | 174 | * @param axis @c Vertical or @c Horizontal | ||
169 | * @param delta | 175 | * @param delta | ||
170 | **/ | 176 | **/ | ||
171 | void axisChanged(quint32 time, KWayland::Client::Pointer::Axis axis, qreal delta); | 177 | void axisChanged(quint32 time, KWayland::Client::Pointer::Axis axis, qreal delta); | ||
178 | /** | ||||
179 | * Indicates the source of scroll and other axes. | ||||
180 | * | ||||
181 | * @since 5.XX | ||||
182 | **/ | ||||
183 | void axisSourceChanged(KWayland::Client::Pointer::AxisSource source); | ||||
184 | /** | ||||
185 | * Discrete step information for scroll and other axes. | ||||
186 | * | ||||
187 | * @since 5.XX | ||||
188 | **/ | ||||
189 | void axisDiscreteChanged(KWayland::Client::Pointer::Axis axis, qint32 deltaDiscrete); | ||||
190 | /** | ||||
191 | * Stop notification for scroll and other axes. | ||||
192 | * | ||||
193 | * @since 5.XX | ||||
194 | **/ | ||||
195 | void axisStopped(quint32 time, KWayland::Client::Pointer::Axis axis); | ||||
172 | 196 | | |||
173 | /** | 197 | /** | ||
174 | * Indicates the end of a set of events that logically belong together. | 198 | * Indicates the end of a set of events that logically belong together. | ||
175 | * A client is expected to accumulate the data in all events within the | 199 | * A client is expected to accumulate the data in all events within the | ||
176 | * frame before proceeding. | 200 | * frame before proceeding. | ||
177 | * @since 5.45 | 201 | * @since 5.45 | ||
178 | **/ | 202 | **/ | ||
179 | void frame(); | 203 | void frame(); | ||
180 | 204 | | |||
181 | private: | 205 | private: | ||
182 | class Private; | 206 | class Private; | ||
183 | QScopedPointer<Private> d; | 207 | QScopedPointer<Private> d; | ||
184 | }; | 208 | }; | ||
185 | 209 | | |||
186 | } | 210 | } | ||
187 | } | 211 | } | ||
188 | 212 | | |||
189 | Q_DECLARE_METATYPE(KWayland::Client::Pointer::ButtonState) | 213 | Q_DECLARE_METATYPE(KWayland::Client::Pointer::ButtonState) | ||
190 | Q_DECLARE_METATYPE(KWayland::Client::Pointer::Axis) | 214 | Q_DECLARE_METATYPE(KWayland::Client::Pointer::Axis) | ||
215 | Q_DECLARE_METATYPE(KWayland::Client::Pointer::AxisSource) | ||||
191 | 216 | | |||
192 | #endif | 217 | #endif |