[gtk+/gtk-2-22] Add an accessor for the GSEALed Gtkbutton's event_window attribute



commit 1607efc0b54e5ea72b496a4ab4541e1729900341
Author: Mirsal Ennaime <mirsal ennaime gmail com>
Date:   Sat Jun 26 21:22:02 2010 -0400

    Add an accessor for the GSEALed Gtkbutton's event_window attribute
    
     * Add the gtk_button_get_event_window() function
    
    Closes: bgo#622581
    (cherry picked from commit 23a61525f6f21248b151bfb2cd1c1dfa5a132c43)

 docs/reference/gtk/gtk-sections.txt |    1 +
 gtk/gtk.symbols                     |    1 +
 gtk/gtkbutton.c                     |   19 +++++++++++++++++++
 gtk/gtkbutton.h                     |    2 ++
 4 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index a8d2a7a..118ea50 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -576,6 +576,7 @@ gtk_button_set_image
 gtk_button_get_image
 gtk_button_set_image_position
 gtk_button_get_image_position
+gtk_button_get_event_window
 
 <SUBSECTION Standard>
 GTK_BUTTON
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index bd4f3af..2e33334 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -551,6 +551,7 @@ gtk_button_clicked
 gtk_button_enter
 #endif
 gtk_button_get_alignment
+gtk_button_get_event_window
 gtk_button_get_focus_on_click
 gtk_button_get_image
 gtk_button_get_image_position
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 5b328ae..80f555e 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -2322,5 +2322,24 @@ gtk_button_get_image_position (GtkButton *button)
 }
 
 
+/**
+ * gtk_button_get_event_window:
+ * @button: a #GtkButton
+ *
+ * Returns the button's event window if it is realized, %NULL otherwise.
+ * This function should be rarely needed.
+ *
+ * Return value: (transfer none): @button's event window.
+ *
+ * Since: 2.22
+ */
+GdkWindow*
+gtk_button_get_event_window (GtkButton *button)
+{
+  g_return_val_if_fail (GTK_IS_BUTTON (button), NULL);
+
+  return button->event_window;
+}
+
 #define __GTK_BUTTON_C__
 #include "gtkaliasdef.c"  
diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h
index 7a67ddc..576dceb 100644
--- a/gtk/gtkbutton.h
+++ b/gtk/gtkbutton.h
@@ -131,6 +131,8 @@ void                  gtk_button_set_image_position (GtkButton      *button,
 						     GtkPositionType position);
 GtkPositionType       gtk_button_get_image_position (GtkButton      *button);
 
+GdkWindow*            gtk_button_get_event_window   (GtkButton      *button);
+
 void _gtk_button_set_depressed             (GtkButton          *button,
 					    gboolean            depressed);
 void _gtk_button_paint                     (GtkButton          *button,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]