[gtk+] container: Remove gtk_container_propagate_draw
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] container: Remove gtk_container_propagate_draw
- Date: Mon, 21 Aug 2017 10:27:37 +0000 (UTC)
commit b24535ea7542c505e100faad25f9fa53da773440
Author: Timm Bäder <mail baedert org>
Date: Mon Aug 21 09:33:14 2017 +0200
container: Remove gtk_container_propagate_draw
It's superseded by gtk_widget_snapshot_child now.
docs/reference/gtk/gtk4-sections.txt | 1 -
gtk/gtkcontainer.c | 65 ----------------------------------
2 files changed, 0 insertions(+), 66 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 8df123c..d84ddf5 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -760,7 +760,6 @@ gtk_container_child_set_valist
gtk_container_child_notify
gtk_container_child_notify_by_pspec
gtk_container_forall
-gtk_container_propagate_draw
gtk_container_get_focus_chain
gtk_container_set_focus_chain
gtk_container_unset_focus_chain
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index b24bef8..2c51cdb 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2921,71 +2921,6 @@ gtk_container_get_focus_hadjustment (GtkContainer *container)
return hadjustment;
}
-typedef struct {
- GtkWidget *child;
- int window_depth;
-} ChildOrderInfo;
-
-static gboolean
-gtk_container_should_propagate_draw (GtkContainer *container,
- GtkWidget *child,
- cairo_t *cr)
-{
- if (!_gtk_widget_is_drawable (child))
- return FALSE;
-
- return TRUE;
-}
-
-/**
- * gtk_container_propagate_draw:
- * @container: a #GtkContainer
- * @child: a child of @container
- * @cr: Cairo context as passed to the container. If you want to use @cr
- * in container’s draw function, consider using cairo_save() and
- * cairo_restore() before calling this function.
- *
- * When a container receives a call to the draw function, it must send
- * synthetic #GtkWidget::draw calls to all children that don’t have their
- * own #GdkWindows. This function provides a convenient way of doing this.
- * A container, when it receives a call to its #GtkWidget::draw function,
- * calls gtk_container_propagate_draw() once for each child, passing in
- * the @cr the container received.
- *
- * gtk_container_propagate_draw() takes care of translating the origin of @cr,
- * and deciding whether the draw needs to be sent to the child. It is a
- * convenient and optimized way of getting the same effect as calling
- * gtk_widget_draw() on the child directly.
- *
- * In most cases, a container can simply either inherit the
- * #GtkWidget::draw implementation from #GtkContainer, or do some drawing
- * and then chain to the ::draw implementation from #GtkContainer.
- **/
-void
-gtk_container_propagate_draw (GtkContainer *container,
- GtkWidget *child,
- cairo_t *cr)
-{
- GtkAllocation child_allocation;
-
- g_return_if_fail (GTK_IS_CONTAINER (container));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (cr != NULL);
- g_return_if_fail (_gtk_widget_get_parent (child) == GTK_WIDGET (container));
-
- if (!gtk_container_should_propagate_draw (container, child, cr))
- return;
-
- gtk_widget_get_allocation (child, &child_allocation);
-
- cairo_save (cr);
- cairo_translate (cr, child_allocation.x, child_allocation.y);
-
- gtk_widget_draw_internal (child, cr, TRUE);
-
- cairo_restore (cr);
-}
-
/**
* gtk_container_get_path_for_child:
* @container: a #GtkContainer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]