[gtk+/wip/matthiasc/linkbutton-dnd: 2/3] button: Add private api to get the gesture
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/linkbutton-dnd: 2/3] button: Add private api to get the gesture
- Date: Mon, 11 Dec 2017 02:26:48 +0000 (UTC)
commit e7f85dab5a98953b43f37e79c844069c261edec8
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 10 21:24:29 2017 -0500
button: Add private api to get the gesture
This may be used by subclasses who need to group
their gestures with the button gesture.
gtk/gtkbutton.c | 9 ++++++++-
gtk/gtkbuttonprivate.h | 1 +
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 99bca66..820d015 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -435,7 +435,6 @@ gtk_button_init (GtkButton *button)
g_signal_connect (priv->gesture, "update", G_CALLBACK (multipress_gesture_update_cb), button);
g_signal_connect (priv->gesture, "cancel", G_CALLBACK (multipress_gesture_cancel_cb), button);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->gesture), GTK_PHASE_CAPTURE);
-
}
static void
@@ -1146,3 +1145,11 @@ gtk_button_get_icon_name (GtkButton *button)
return NULL;
}
+
+GtkGesture *
+gtk_button_get_gesture (GtkButton *button)
+{
+ GtkButtonPrivate *priv = gtk_button_get_instance_private (button);
+
+ return priv->gesture;
+}
diff --git a/gtk/gtkbuttonprivate.h b/gtk/gtkbuttonprivate.h
index ebb8ec6..cfc44dc 100644
--- a/gtk/gtkbuttonprivate.h
+++ b/gtk/gtkbuttonprivate.h
@@ -41,6 +41,7 @@ struct _GtkButtonPrivate
guint child_type : 2;
};
+GtkGesture *gtk_button_get_gesture (GtkButton *button);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]