From c1f1dae997194cb0d1f10b7af34b400d770563ec Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 7 Jan 2017 17:09:25 +0100 Subject: [PATCH] viewport: Remove API to query GdkWindows --- docs/reference/gtk/gtk4-sections.txt | 2 -- gtk/gtkflowbox.c | 8 ++----- gtk/gtkviewport.c | 36 ---------------------------- gtk/gtkviewport.h | 4 ---- 4 files changed, 2 insertions(+), 48 deletions(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 52ee4142f8..286d5f3be5 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -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 GTK_VIEWPORT GTK_IS_VIEWPORT diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index f365f298c9..6a6a4a6611 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -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; } diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index a068fe94b9..2e0ec507bb 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -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) { diff --git a/gtk/gtkviewport.h b/gtk/gtkviewport.h index 9fb2abf713..aa4ec1c381 100644 --- a/gtk/gtkviewport.h +++ b/gtk/gtkviewport.h @@ -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