1. 27 May, 2014 1 commit
  2. 23 May, 2014 12 commits
    • Carlos Garnacho's avatar
    • Carlos Garnacho's avatar
      8ab35016
    • Carlos Garnacho's avatar
      gesture: Simplify gesture/widget interaction public API · 5369c770
      Carlos Garnacho authored
      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.
      5369c770
    • 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.
      42df9eda
    • 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.
      b0a23dbf
    • 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
      yourself.
      6433a545
    • 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.
      25ece220
    • Carlos Garnacho's avatar
      gesture: Remove the touch-only property · c4944b03
      Carlos Garnacho authored
      This is handled in GtkGestureSingle.
      c4944b03
    • Matthias Clasen's avatar
      ...and add the right include instead · 49e9ba12
      Matthias Clasen authored
      49e9ba12
    • Matthias Clasen's avatar
      Remove a doubled line · a1aeaa6b
      Matthias Clasen authored
      a1aeaa6b
    • 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
         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.
      a9fa0151
    • 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.
      8f113e07