viewport: Remove API to query GdkWindows

This commit is contained in:
Benjamin Otte 2017-01-07 17:09:25 +01:00
parent d50b73f66d
commit c1f1dae997
4 changed files with 2 additions and 48 deletions

View File

@ -4418,8 +4418,6 @@ GtkViewportClass
gtk_viewport_new
gtk_viewport_set_shadow_type
gtk_viewport_get_shadow_type
gtk_viewport_get_bin_window
gtk_viewport_get_view_window
<SUBSECTION Standard>
GTK_VIEWPORT
GTK_IS_VIEWPORT

View File

@ -2749,18 +2749,14 @@ get_view_rect (GtkFlowBox *box,
{
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
GtkWidget *parent;
GdkWindow *view;
parent = gtk_widget_get_parent (GTK_WIDGET (box));
if (GTK_IS_VIEWPORT (parent))
{
view = gtk_viewport_get_view_window (GTK_VIEWPORT (parent));
rect->x = rect->y = 0;
rect->x = gtk_adjustment_get_value (priv->hadjustment);
rect->y = gtk_adjustment_get_value (priv->vadjustment);
rect->width = gdk_window_get_width (view);
rect->height = gdk_window_get_height (view);
rect->width = gtk_widget_get_allocated_width (parent);
rect->height = gtk_widget_get_allocated_height (parent);
return TRUE;
}

View File

@ -615,42 +615,6 @@ gtk_viewport_get_shadow_type (GtkViewport *viewport)
return viewport->priv->shadow_type;
}
/**
* gtk_viewport_get_bin_window:
* @viewport: a #GtkViewport
*
* Gets the bin window of the #GtkViewport.
*
* Returns: (transfer none): 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->priv->bin_window;
}
/**
* gtk_viewport_get_view_window:
* @viewport: a #GtkViewport
*
* Gets the view window of the #GtkViewport.
*
* Returns: (transfer none): a #GdkWindow
*
* Since: 2.22
**/
GdkWindow*
gtk_viewport_get_view_window (GtkViewport *viewport)
{
g_return_val_if_fail (GTK_IS_VIEWPORT (viewport), NULL);
return viewport->priv->view_window;
}
static void
gtk_viewport_realize (GtkWidget *widget)
{

View File

@ -85,10 +85,6 @@ void gtk_viewport_set_shadow_type (GtkViewport *viewport,
GtkShadowType type);
GDK_AVAILABLE_IN_ALL
GtkShadowType gtk_viewport_get_shadow_type (GtkViewport *viewport);
GDK_AVAILABLE_IN_ALL
GdkWindow* gtk_viewport_get_bin_window (GtkViewport *viewport);
GDK_AVAILABLE_IN_ALL
GdkWindow* gtk_viewport_get_view_window (GtkViewport *viewport);
G_END_DECLS