Commit 7a71c163 authored by Carlos Garnacho's avatar Carlos Garnacho

widget: refactor gesture integration

Listen for notify::sequence-state-changed on the controller, so the
only way to manipulate a sequence state are gtk_gesture_set_sequence_state()
and gtk_gesture_set_state().

Also, make use of gesture groups, so the sequence state is set at once
on all gestures pertaining to a single group. Within a widget, if a sequence
is claimed on one group, it is made to be denied on every other group.
parent b0a23dbf
This diff is collapsed.
......@@ -1469,29 +1469,14 @@ void gtk_widget_class_bind_template_child_full (GtkWidgetClass *
const gchar *name,
gboolean internal_child,
gssize struct_offset);
void gtk_widget_add_gesture (GtkWidget *widget,
GtkGesture *gesture,
GtkPropagationPhase phase);
void gtk_widget_remove_gesture (GtkWidget *widget,
GtkGesture *gesture);
GList * gtk_widget_list_gestures (GtkWidget *widget,
GtkPropagationPhase phase);
GtkEventSequenceState gtk_widget_get_sequence_state (GtkWidget *widget,
GdkEventSequence *sequence);
void gtk_widget_add_controller (GtkWidget *widget,
GtkEventController *controller);
void gtk_widget_set_sequence_state (GtkWidget *widget,
GdkEventSequence *sequence,
GtkEventSequenceState state);
void gtk_widget_remove_controller (GtkWidget *widget,
GtkEventController *controller);
void gtk_widget_set_gesture_state (GtkWidget *widget,
GtkGesture *gesture,
GtkEventSequenceState state);
GList * gtk_widget_list_controllers (GtkWidget *widget);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment