button: Add private api to get at the gesture
authorMatthias Clasen <mclasen@redhat.com>
Wed, 13 Dec 2017 03:18:19 +0000 (22:18 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 13 Dec 2017 03:18:19 +0000 (22:18 -0500)
Attaching another gesture from the outside does not
work currently, so let widgets share their button's
gesture for now.

gtk/gtkbutton.c
gtk/gtkbuttonprivate.h

index 99bca66ec55fc4219a95735bc3773d65827f436f..b89ac609d1572ce3273958669cc08a6cfa123369 100644 (file)
@@ -1146,3 +1146,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;
+}
index ebb8ec6cb341255b0590319a38c4c50c1df7184d..b0f79fc07bcc52e368134c97f9e0c31685f26ebe 100644 (file)
@@ -41,6 +41,7 @@ struct _GtkButtonPrivate
   guint          child_type            : 2;
 };
 
+GtkGesture * gtk_button_get_gesture (GtkButton *button);
 
 G_END_DECLS