[gtk+] button: Add private api to get at the gesture



commit 05fbd32c4d22aee569786d916131af3d10f63542
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 12 22:18:19 2017 -0500

    button: Add private api to get at the gesture
    
    Attaching another gesture from the outside does not
    work currently, so let widgets share their button's
    gesture for now.

 gtk/gtkbutton.c        |    8 ++++++++
 gtk/gtkbuttonprivate.h |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 99bca66..b89ac60 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -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;
+}
diff --git a/gtk/gtkbuttonprivate.h b/gtk/gtkbuttonprivate.h
index ebb8ec6..b0f79fc 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]