Added accesor for GTK_VIEWPORT (widget)->bin_window

Although, you can use:
gtk_widget_get_parent_window (gtk_bin_get_child (GTK_BIN (widget)))
there already are gtk_tree_view_get_bin_window() and
gtk_layout_get_bin_window() in GTK+ api.

https://bugzilla.gnome.org/show_bug.cgi?id=594960
This commit is contained in:
Christian Dywan 2009-10-21 18:12:01 +02:00 committed by Javier Jardón
parent 6f6746389c
commit f5df4e05e2
3 changed files with 20 additions and 0 deletions

View File

@ -4909,6 +4909,7 @@ gtk_viewport_get_hadjustment
gtk_viewport_get_shadow_type
gtk_viewport_get_type G_GNUC_CONST
gtk_viewport_get_vadjustment
gtk_viewport_get_bin_window
gtk_viewport_new
gtk_viewport_set_hadjustment
gtk_viewport_set_shadow_type

View File

@ -556,6 +556,24 @@ gtk_viewport_get_shadow_type (GtkViewport *viewport)
return viewport->shadow_type;
}
/**
* gtk_viewport_get_bin_window:
* @viewport: a #GtkViewport
*
* Gets the bin window of the #GtkViewport.
*
* Return value: a #GdkWindow
*
* Since: 2.20
**/
GdkWindow*
gtk_viewport_get_bin_window (GtkViewport *viewport)
{
g_return_val_if_fail (GTK_IS_VIEWPORT (viewport), NULL);
return viewport->bin_window;
}
static void
gtk_viewport_realize (GtkWidget *widget)
{

View File

@ -83,6 +83,7 @@ void gtk_viewport_set_vadjustment (GtkViewport *viewport,
void gtk_viewport_set_shadow_type (GtkViewport *viewport,
GtkShadowType type);
GtkShadowType gtk_viewport_get_shadow_type (GtkViewport *viewport);
GdkWindow* gtk_viewport_get_bin_window (GtkViewport *viewport);
G_END_DECLS