1. 23 May, 2014 9 commits
    • Matthias Clasen's avatar
      Prevent subclassing of gestures · 42df9eda
      Matthias Clasen authored
      For now, at least. We do this by hiding the instance and
      class structures in private headers.
    • Carlos Garnacho's avatar
      gesture: Add grouping API · b0a23dbf
      Carlos Garnacho authored
      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.
    • Carlos Garnacho's avatar
      gesture: Add gtk_gesture_set_state() helper. · 6433a545
      Carlos Garnacho authored
      This function sets the state on all sequences where it actually
      can, just a helper function to avoid iterating over sequences
    • Carlos Garnacho's avatar
      gesture: Add gtk_gesture_[sg]et_window() · 25ece220
      Carlos Garnacho authored
      This can be used to restrict a gesture to an specific GdkWindow,
      all events will be checked to happen on/within that window.
    • Carlos Garnacho's avatar
      gesture: Remove the touch-only property · c4944b03
      Carlos Garnacho authored
      This is handled in GtkGestureSingle.
    • Matthias Clasen's avatar
      ...and add the right include instead · 49e9ba12
      Matthias Clasen authored
    • Matthias Clasen's avatar
      Remove a doubled line · a1aeaa6b
      Matthias Clasen authored
    • Carlos Garnacho's avatar
      widget: Implement hierarchy-level mechanism to claim/deny sequences · a9fa0151
      Carlos Garnacho authored
      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
      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.
    • Carlos Garnacho's avatar
      Add GtkGesture · 8f113e07
      Carlos Garnacho authored
      This a more specific abstract type that handles one or multiple
      streams of pointer/touch events.