[gtk+/wip/baedert/children: 21/44] Remove gtk_container_snapshot_child
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/children: 21/44] Remove gtk_container_snapshot_child
- Date: Sun, 4 Dec 2016 11:00:59 +0000 (UTC)
commit d23975f464f9d9f8249112ee59cf35ff4df199fd
Author: Timm Bäder <mail baedert org>
Date: Thu Nov 17 17:55:46 2016 +0100
Remove gtk_container_snapshot_child
gtk/gtkbbox.c | 6 +++---
gtk/gtkboxgadget.c | 2 +-
gtk/gtkcombobox.c | 4 ++--
gtk/gtkcontainer.c | 25 +++----------------------
gtk/gtkcontainerprivate.h | 5 -----
gtk/gtkfixed.c | 8 ++++----
gtk/gtkmodelbutton.c | 2 +-
gtk/gtkpopover.c | 2 +-
gtk/gtkwindow.c | 6 +++---
9 files changed, 18 insertions(+), 42 deletions(-)
---
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index ab0e367..d8f4012 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -214,9 +214,9 @@ static void
gtk_button_box_snapshot_forall (GtkWidget *child,
gpointer snapshot)
{
- gtk_container_snapshot_child (GTK_CONTAINER (gtk_widget_get_parent (child)),
- child,
- snapshot);
+ gtk_widget_snapshot_child (gtk_widget_get_parent (child),
+ child,
+ snapshot);
}
static gboolean
diff --git a/gtk/gtkboxgadget.c b/gtk/gtkboxgadget.c
index 40e7aa9..cfc67c3 100644
--- a/gtk/gtkboxgadget.c
+++ b/gtk/gtkboxgadget.c
@@ -537,7 +537,7 @@ gtk_box_gadget_snapshot (GtkCssGadget *gadget,
GtkBoxGadgetChild *child = &g_array_index (priv->children, GtkBoxGadgetChild, draw_index);
if (GTK_IS_WIDGET (child->object))
- gtk_container_snapshot_child (GTK_CONTAINER (owner), GTK_WIDGET (child->object), snapshot);
+ gtk_widget_snapshot_child (owner, GTK_WIDGET (child->object), snapshot);
else
gtk_css_gadget_snapshot (GTK_CSS_GADGET (child->object), snapshot);
}
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index fdf975a..2a54bc0 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -476,8 +476,8 @@ gtk_combo_box_render (GtkCssGadget *gadget,
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
GtkComboBoxPrivate *priv = combo_box->priv;
- gtk_container_snapshot_child (GTK_CONTAINER (widget),
- priv->box, snapshot);
+ gtk_widget_snapshot_child (widget,
+ priv->box, snapshot);
return FALSE;
}
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 4c57c23..6efc2a9 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -3067,9 +3067,9 @@ static void
gtk_container_snapshot_forall (GtkWidget *child,
gpointer snapshot)
{
- gtk_container_snapshot_child (GTK_CONTAINER (_gtk_widget_get_parent (child)),
- child,
- snapshot);
+ gtk_widget_snapshot_child (_gtk_widget_get_parent (child),
+ child,
+ snapshot);
}
static void
@@ -3232,25 +3232,6 @@ gtk_container_propagate_draw (GtkContainer *container,
cairo_restore (cr);
}
-void
-gtk_container_snapshot_child (GtkContainer *container,
- GtkWidget *child,
- GtkSnapshot *snapshot)
-{
- int x, y;
-
- g_return_if_fail (GTK_IS_CONTAINER (container));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (_gtk_widget_get_parent (child) == GTK_WIDGET (container));
- g_return_if_fail (snapshot != NULL);
-
- gtk_container_get_translation_to_child (container, child, &x, &y);
-
- gtk_snapshot_translate_2d (snapshot, x, y);
- gtk_widget_snapshot (child, snapshot);
- gtk_snapshot_translate_2d (snapshot, -x, -y);
-}
-
/**
* gtk_container_get_path_for_child:
* @container: a #GtkContainer
diff --git a/gtk/gtkcontainerprivate.h b/gtk/gtkcontainerprivate.h
index c505d55..9a865d6 100644
--- a/gtk/gtkcontainerprivate.h
+++ b/gtk/gtkcontainerprivate.h
@@ -42,11 +42,6 @@ void _gtk_container_stop_idle_sizer (GtkContainer *container);
void _gtk_container_maybe_start_idle_sizer (GtkContainer *container);
void gtk_container_get_children_clip (GtkContainer *container,
GtkAllocation *out_clip);
-
-void gtk_container_snapshot_child (GtkContainer *container,
- GtkWidget *child,
- GtkSnapshot *snapshot);
-
G_END_DECLS
#endif /* __GTK_CONTAINER_PRIVATE_H__ */
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index 6e6e584..5084e55 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -70,7 +70,7 @@
#include "gtkfixed.h"
-#include "gtkcontainerprivate.h"
+#include "gtkwidgetprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"
@@ -531,9 +531,9 @@ gtk_fixed_snapshot (GtkWidget *widget,
{
child = list->data;
- gtk_container_snapshot_child (GTK_CONTAINER (fixed),
- child->widget,
- snapshot);
+ gtk_widget_snapshot_child (widget,
+ child->widget,
+ snapshot);
}
}
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index aabd8e8..0b94a47 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -935,7 +935,7 @@ gtk_model_button_render (GtkCssGadget *gadget,
child = gtk_bin_get_child (GTK_BIN (widget));
if (child)
- gtk_container_snapshot_child (GTK_CONTAINER (widget), child, snapshot);
+ gtk_widget_snapshot_child (widget, child, snapshot);
return gtk_widget_has_visible_focus (widget);
}
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index fce815a..b4a84c9 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -1197,7 +1197,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
child = gtk_bin_get_child (GTK_BIN (widget));
if (child)
- gtk_container_snapshot_child (GTK_CONTAINER (widget), child, snapshot);
+ gtk_widget_snapshot_child (widget, child, snapshot);
gtk_snapshot_pop (snapshot);
}
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 0e9678e..2b8c52c 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -9468,15 +9468,15 @@ gtk_window_snapshot (GtkWidget *widget,
(window_border.top + window_border.bottom + title_height));
if (priv->title_box != NULL)
- gtk_container_snapshot_child (GTK_CONTAINER (widget), priv->title_box, snapshot);
+ gtk_widget_snapshot_child (widget, priv->title_box, snapshot);
if (gtk_bin_get_child (GTK_BIN (widget)))
- gtk_container_snapshot_child (GTK_CONTAINER (widget), gtk_bin_get_child (GTK_BIN (widget)), snapshot);
+ gtk_widget_snapshot_child (widget, gtk_bin_get_child (GTK_BIN (widget)), snapshot);
for (l = priv->popovers; l; l = l->next)
{
GtkWindowPopover *data = l->data;
- gtk_container_snapshot_child (GTK_CONTAINER (widget), data->widget, snapshot);
+ gtk_widget_snapshot_child (widget, data->widget, snapshot);
}
gtk_debug_updates_snapshot (widget, snapshot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]