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);
GDK_AVAILABLE_IN_3_14
void gtk_widget_add_gesture (GtkWidget *widget,
GtkGesture *gesture,
GtkPropagationPhase phase);
GDK_AVAILABLE_IN_3_14
void gtk_widget_remove_gesture (GtkWidget *widget,
GtkGesture *gesture);
GDK_AVAILABLE_IN_3_14
GList * gtk_widget_list_gestures (GtkWidget *widget,
GtkPropagationPhase phase);
GDK_AVAILABLE_IN_3_14
GtkEventSequenceState gtk_widget_get_sequence_state (GtkWidget *widget,
GdkEventSequence *sequence);
void gtk_widget_add_controller (GtkWidget *widget,
GtkEventController *controller);
GDK_AVAILABLE_IN_3_14
void gtk_widget_set_sequence_state (GtkWidget *widget,
GdkEventSequence *sequence,
GtkEventSequenceState state);
void gtk_widget_remove_controller (GtkWidget *widget,
GtkEventController *controller);
GDK_AVAILABLE_IN_3_14
void gtk_widget_set_gesture_state (GtkWidget *widget,
GtkGesture *gesture,
GtkEventSequenceState state);
GList * gtk_widget_list_controllers (GtkWidget *widget);
G_END_DECLS
......
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