[gtk+] viewport: Remove API to query GdkWindows
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] viewport: Remove API to query GdkWindows
- Date: Sat, 7 Jan 2017 23:48:38 +0000 (UTC)
commit c1f1dae997194cb0d1f10b7af34b400d770563ec
Author: Benjamin Otte <otte redhat com>
Date: Sat Jan 7 17:09:25 2017 +0100
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 52ee414..286d5f3 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
<SUBSECTION Standard>
GTK_VIEWPORT
GTK_IS_VIEWPORT
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index f365f29..6a6a4a6 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 a068fe9..2e0ec50 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 9fb2abf..aa4ec1c 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]