summaryrefslogtreecommitdiff
path: root/gtk/gtkgesturemultipress.c
Commit message (Collapse)AuthorAgeFilesLines
* The big versioning cleanupMatthias Clasen2018-02-061-14/+0
| | | | | | | Remove all the old 2.x and 3.x version annotations. GTK+ 4 is a new start, and from the perspective of a GTK+ 4 developer all these APIs have been around since the beginning.
* Replace gdk_threads_add_timeout* with g_timeout_add()Emmanuele Bassi2018-02-031-3/+1
| | | | | | | | | | | | | | | The main GDK thread lock is not portable and deprecated. The only reason why gdk_threads_add_timeout() and gdk_threads_add_timeout_full() exist is to allow invoking a callback with the GDK lock held, in case 3rd party libraries still use the deprecated gdk_threads_enter()/gdk_threads_leave() API. Since we're removing the GDK lock, and we're releasing a new major API, such code cannot exist any more; this means we can use the GLib API for installing timeout callbacks. https://bugzilla.gnome.org/show_bug.cgi?id=793124
* GtkGestureMultiPress: check event state before emiting released signalJuan Pablo Ugarte2018-01-221-1/+3
| | | | | Fix bug 771986 "Inconsistent 'row-activated' signal emission before \ drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"
* gtkgesturemultipress: Add ::unpaired-release signalCarlos Garnacho2017-11-261-0/+56
| | | | | | | | | This signal will be emitted whenever the gesture received a button release or touch end event without a pairing button press or touch begin. This usually happens when grabs transfer input from one widget to another mid-press. https://bugzilla.gnome.org/show_bug.cgi?id=789163
* doc: Replace uses of #NULL with %NULLDaniel Boles2017-11-221-1/+1
|
* gesture: Update to using GdkEvent APICarlos Garnacho2017-09-191-3/+5
| | | | To some extent, pad and touchpad gesture events need extra API.
* Add names to more sourcesMatthias Clasen2017-08-131-4/+4
| | | | This makes debugging mainloop-related issues more pleasant.
* GtkGestureMultiPress: Remove superfluous NULL checkTimm Bäder2017-04-281-2/+1
| | | | | | The rect parameter in gtk_gesture_multi_press_set_area is annotated as nullable and the code handles the rect==NULL case, but the g_return_if_fail kept that case from ever happening.
* GtkGestureMultiPress: reset multi-press sequence if the source device changesCarlos Garnacho2016-02-231-0/+9
| | | | | | | | This prevents multipress sequences to possibly come from different mice. Now the accumulated number of presses will be reset if the device changes in the mean time. https://bugzilla.gnome.org/show_bug.cgi?id=723659
* Intern all signal names beforehandMatthias Clasen2015-09-121-3/+3
| | | | This avoids pointless allocations
* gesturesingle: Implement GtkGesture::cancel better than GtkEventController:resetCarlos Garnacho2014-06-131-0/+1
| | | | | | | | | | | | The former can be called individually on each sequence, and the latter will always call the former on all currently active sequences, so only implementing resetting on cancel() works for both cases. Also, chain up on subclasses implementing cancel. This fixes clicking on nautilus' file list after popping up a menu, as broken grabs are one of those situations where sequences get cancelled individually, the "current button" wasn't properly reset, and further clicks with button != 3 were ignored.
* Don't assert in gtk_event_controller_constructedMatthias Clasen2014-05-271-0/+2
| | | | | | 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.
* Docs: Cosmetic fixesMatthias Clasen2014-05-231-7/+9
|
* multipress: Add matching ::released signalCarlos Garnacho2014-05-231-1/+42
| | | | | | | This signal will always be paired with a ::pressed signal, unless the sequence is cancelled, or the controller is reset. the n_press argument in the signal always matches the ::press signal one, even if GtkGestureMultiPress::stopped was emitted in between.
* multipress: Protect against fleeting touches mistriggering eventsCarlos Garnacho2014-05-231-41/+51
| | | | | | | The current sequence (as per gtk_gesture_single_get_current_sequence) is used to find out the coordinates. And only emit ::pressed if the gesture began through a GDK_BUTTON_PRESS/TOUCH_BEGIN (eg. not due to an extra touch being lifted)
* gesture: Make gtk_gesture_check() privateCarlos Garnacho2014-05-231-1/+2
|
* Prevent subclassing of gesturesMatthias Clasen2014-05-231-0/+1
| | | | | For now, at least. We do this by hiding the instance and class structures in private headers.
* multipress: doc fixesCarlos Garnacho2014-05-231-4/+4
|
* multipress: Add missing documentationCarlos Garnacho2014-05-231-0/+37
|
* gesturemultipress: fix reentrancy on ::reset()Carlos Garnacho2014-05-231-3/+1
|
* multipress: Remove unused signal argumentCarlos Garnacho2014-05-231-11/+28
|
* multipress: Make a subclass of GtkGestureSingleCarlos Garnacho2014-05-231-140/+26
| | | | The redundant API has been removed here.
* Add GtkGestureMultiPressCarlos Garnacho2014-05-231-0/+472
This gesture handles any number of clicks, ensuring multiple presses stay within thresholds and timeouts. When anything of that happens, the gesture is reset and press count starts from 1 again. Optionally, the gesture can be given a rectangle, used in in presses > 1 to ensure the consecutive presses happen on user imposed areas.