summaryrefslogtreecommitdiff
path: root/gtk/gtkgesture.h
Commit message (Collapse)AuthorAgeFilesLines
* gesture: Replace gtk_gesture_attach/detach with event controller APICarlos Garnacho2014-05-271-6/+0
| | | | | | | | Event controllers now auto-attach, and the GtkCapturePhase only determines when are events dispatched, but all controllers are managed by the widget wrt grabs. All callers have been updated.
* gesture: Make gtk_gesture_get_last_update_time() privateCarlos Garnacho2014-05-231-5/+0
|
* gesture: make gtk_gesture_cancel_sequence() privateCarlos Garnacho2014-05-231-6/+0
|
* gesture: Simplify gesture/widget interaction public APICarlos Garnacho2014-05-231-0/+6
| | | | | | | | | | | The propagation phase property/methods in GtkEventController are gone, This is now set directly on the GtkWidget add/remove controller API, which has been made private. The only public bit now are the new functions gtk_gesture_attach() and gtk_gesture_detach() that will use the private API underneath. All callers have been updated.
* Prevent subclassing of gesturesMatthias Clasen2014-05-231-29/+0
| | | | | For now, at least. We do this by hiding the instance and class structures in private headers.
* gesture: Add grouping APICarlos Garnacho2014-05-231-0/+13
| | | | | | | This API eliminates the need for overriding GtkWidget::sequence-state-changed virtually everywhere. Grouped gestures share common states for a same GdkEventSequence, so the state of sequences stay in sync across those.
* gesture: Add gtk_gesture_set_state() helper.Carlos Garnacho2014-05-231-2/+5
| | | | | | This function sets the state on all sequences where it actually can, just a helper function to avoid iterating over sequences yourself.
* gesture: Add gtk_gesture_[sg]et_window()Carlos Garnacho2014-05-231-0/+7
| | | | | This can be used to restrict a gesture to an specific GdkWindow, all events will be checked to happen on/within that window.
* gesture: Remove the touch-only propertyCarlos Garnacho2014-05-231-7/+0
| | | | This is handled in GtkGestureSingle.
* ...and add the right include insteadMatthias Clasen2014-05-231-0/+1
|
* Remove a doubled lineMatthias Clasen2014-05-231-1/+0
|
* widget: Implement hierarchy-level mechanism to claim/deny sequencesCarlos Garnacho2014-05-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The policy of sequence states has been made tighter on GtkGesture, so gestures can never return to a "none" state, nor get out of a "denied" state, a "claimed" sequence can go "denied" though. The helper API at the widget level will first emit GtkWidget::sequence-state-changed on the called widget, and then notify through the same signal to every other widget in the captured event chain. So the effect of that signal is twofold, on one hand it lets the original widget set the state on its attached controllers, and on the other hand it lets the other widgets freely adapt to the sequence state changing elsewhere in the event widget chain. By default, that signal updates every controller on the first usecase, and propagates the default gesture policy to every other widget in the chain on the second. This means that, by default: 1) Sequences start out on the "none" state, and get propagated through all the event widget chain. 2) If a widget in the chain denies the sequence, all other widgets are unaffected. 3) If a widget in the chain claims the sequence, then: 3.1) Every widget below the claiming widget (ie. towards the event widget) will get the sequence cancelled. 3.2) Every widget above the claiming widget that had the sequence as "none" will remain as such, if it was claimed it will go denied, but that should rarely happen. This behavior can be tweaked through the GtkWidget::sequence-state-changed and GtkGesture::event-handled vmethods, although this should be very rarely done.
* Add GtkGestureCarlos Garnacho2014-05-231-0/+133
This a more specific abstract type that handles one or multiple streams of pointer/touch events.