Commit Graph

15 Commits

Author SHA1 Message Date
Carlos Garnacho
7545b908de gesture: Update to using GdkEvent API
To some extent, pad and touchpad gesture events need extra API.
2017-09-19 18:39:02 +02:00
Matthias Clasen
66f0bdee0a Intern all signal names beforehand
This avoids pointless allocations
2015-09-12 12:50:39 -04:00
Carlos Garnacho
5d17338b4d gtkgestureswipe: Handle touchpad swipe events
These will only trigger the gesture if it's been created with
the same GtkGesture::n-points than n_fingers in the event.
2015-08-12 23:20:25 +02:00
Matthias Clasen
3bb404f40c Don't assert in gtk_event_controller_constructed
This prevents some of our generic object implementation tests
from working with gesture objects. Instead, add g_return_if_fail
checks in all the gesture constructors.
2014-05-27 14:33:32 -04:00
Benjamin Otte
4bbca44512 gestureswipe: Fix return value 2014-05-24 16:16:41 +02:00
Matthias Clasen
0442431943 Docs: Cosmetic fixes 2014-05-23 19:54:33 +02:00
Carlos Garnacho
44a960199b gesture: Make gtk_gesture_get_last_update_time() private 2014-05-23 19:54:29 +02:00
Carlos Garnacho
cbe47c02a1 swipe: Don't emit ::swipe if there are still active touches
Avoids sending spurious signals when an extra touch happens.
2014-05-23 19:54:28 +02:00
Matthias Clasen
42df9eda2d Prevent subclassing of gestures
For now, at least. We do this by hiding the instance and
class structures in private headers.
2014-05-23 19:54:28 +02:00
Carlos Garnacho
ad2346f762 swipe: doc fixes 2014-05-23 19:54:28 +02:00
Carlos Garnacho
2df48ba886 swipe: Add missing documentation 2014-05-23 19:54:27 +02:00
Carlos Garnacho
2166be96d2 swipe: Add function to retrieve the current velocity
This can be used to fetch the current velocity on update(), as opposed
to swipe() which happens after the sequence is finished.
2014-05-23 19:54:26 +02:00
Carlos Garnacho
c49ac32393 swipe: Dont emit swipe() if the gesture was denied rather than finished 2014-05-23 19:54:24 +02:00
Carlos Garnacho
dca169d9f1 swipe: Make a subclass of GtkGestureSingle 2014-05-23 19:54:23 +02:00
Carlos Garnacho
8733e2a918 Add GtkGestureSwipe
This gesture implementation recognices swipes on any direction.
The "swipe" signal has the X/Y velocity vector components, so
those can be used for direction guessing and velocity thresholds.
2014-05-23 19:54:21 +02:00