Commit 9b34203c authored by Vincent Untz's avatar Vincent Untz Committed by Javier Jardón

No accessor for GtkAccessible.widget

Add gtk_accessible_get_widget().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=612509
parent 7dcb7ec3
......@@ -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
......
......@@ -47,6 +47,26 @@ gtk_accessible_class_init (GtkAccessibleClass *klass)
klass->connect_widget_destroyed = gtk_accessible_real_connect_widget_destroyed;
}
/**
* 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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment