[gtk+] No accessor for GtkAccessible.widget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] No accessor for GtkAccessible.widget
- Date: Wed, 14 Apr 2010 01:49:51 +0000 (UTC)
commit 9b34203cb6b384448ba1f48c196c4af27ea56ddd
Author: Vincent Untz <vuntz gnome org>
Date: Thu Mar 11 00:02:57 2010 +0100
No accessor for GtkAccessible.widget
Add gtk_accessible_get_widget().
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=612509
gtk/gtk.symbols | 1 +
gtk/gtkaccessible.c | 20 ++++++++++++++++++++
gtk/gtkaccessible.h | 3 ++-
3 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 167936d..311875f 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -138,6 +138,7 @@ gtk_accel_map_unlock_path
#if IN_FILE(__GTK_ACCESSIBLE_C__)
gtk_accessible_connect_widget_destroyed
gtk_accessible_get_type G_GNUC_CONST
+gtk_accessible_get_widget
#endif
#endif
diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c
index e3d6ea3..aa3b260 100644
--- a/gtk/gtkaccessible.c
+++ b/gtk/gtkaccessible.c
@@ -48,6 +48,26 @@ gtk_accessible_class_init (GtkAccessibleClass *klass)
}
/**
+ * gtk_accessible_get_widget:
+ * @accessible: a #GtkAccessible
+ *
+ * Gets the #GtkWidget corresponding to the #GtkAccessible. The returned widget
+ * does not have a reference added, so you do not need to unref it.
+ *
+ * Returns: (transfer none): pointer to the #GtkWidget corresponding to
+ * the #GtkAccessible, or %NULL.
+ *
+ * Since: 2.22
+ **/
+GtkWidget*
+gtk_accessible_get_widget (GtkAccessible *accessible)
+{
+ g_return_val_if_fail (GTK_IS_ACCESSIBLE (accessible), NULL);
+
+ return accessible->widget;
+}
+
+/**
* gtk_accessible_connect_widget_destroyed
* @accessible: a #GtkAccessible
*
diff --git a/gtk/gtkaccessible.h b/gtk/gtkaccessible.h
index 5654a47..a9d21bc 100644
--- a/gtk/gtkaccessible.h
+++ b/gtk/gtkaccessible.h
@@ -68,7 +68,8 @@ struct _GtkAccessibleClass
GType gtk_accessible_get_type (void) G_GNUC_CONST;
-void gtk_accessible_connect_widget_destroyed (GtkAccessible *accessible);
+GtkWidget* gtk_accessible_get_widget (GtkAccessible *accessible);
+void gtk_accessible_connect_widget_destroyed (GtkAccessible *accessible);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]