[gtk+/wip/baedert/gtk-widget-destroy: 143/149] widget: Remove gtk_widget_destroy



commit 4f576f6d7cb4769b75801f846b011784bc8c0f65
Author: Timm Bäder <mail baedert org>
Date:   Tue Sep 26 14:52:23 2017 +0200

    widget: Remove gtk_widget_destroy

 docs/reference/gtk/gtk4-sections.txt |    1 -
 gtk/gtkwidget.c                      |   45 ----------------------------------
 gtk/gtkwidget.h                      |    2 -
 3 files changed, 0 insertions(+), 48 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 4fb980b..3519e89 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4485,7 +4485,6 @@ GtkCallback
 GtkRequisition
 GtkAllocation
 gtk_widget_new
-gtk_widget_destroy
 gtk_widget_in_destruction
 gtk_widget_destroyed
 gtk_widget_unparent
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 84c2b85..07407d1 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4106,51 +4106,6 @@ gtk_widget_unparent (GtkWidget *widget)
 }
 
 /**
- * gtk_widget_destroy:
- * @widget: a #GtkWidget
- *
- * Destroys a widget.
- *
- * When a widget is destroyed all references it holds on other objects
- * will be released:
- *
- *  - if the widget is inside a container, it will be removed from its
- *  parent
- *  - if the widget is a container, all its children will be destroyed,
- *  recursively
- *  - if the widget is a top level, it will be removed from the list
- *  of top level widgets that GTK+ maintains internally
- *
- * It's expected that all references held on the widget will also
- * be released; you should connect to the #GtkWidget::destroy signal
- * if you hold a reference to @widget and you wish to remove it when
- * this function is called. It is not necessary to do so if you are
- * implementing a #GtkContainer, as you'll be able to use the
- * #GtkContainerClass.remove() virtual function for that.
- *
- * It's important to notice that gtk_widget_destroy() will only cause
- * the @widget to be finalized if no additional references, acquired
- * using g_object_ref(), are held on it. In case additional references
- * are in place, the @widget will be in an "inert" state after calling
- * this function; @widget will still point to valid memory, allowing you
- * to release the references you hold, but you may not query the widget's
- * own state.
- *
- * You should typically call this function on top level widgets, and
- * rarely on child widgets.
- *
- * See also: gtk_container_remove()
- */
-void
-gtk_widget_destroy (GtkWidget *widget)
-{
-  g_return_if_fail (GTK_IS_WIDGET (widget));
-
-  if (!widget->priv->in_destruction)
-    g_object_run_dispose (G_OBJECT (widget));
-}
-
-/**
  * gtk_widget_destroyed:
  * @widget: a #GtkWidget
  * @widget_pointer: (inout) (transfer none): address of a variable that contains @widget
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index ff2aa77..e6ba873 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -494,8 +494,6 @@ GtkWidget* gtk_widget_new             (GType                type,
                                           const gchar         *first_property_name,
                                           ...);
 GDK_AVAILABLE_IN_ALL
-void      gtk_widget_destroy             (GtkWidget           *widget);
-GDK_AVAILABLE_IN_ALL
 void      gtk_widget_destroyed           (GtkWidget           *widget,
                                           GtkWidget          **widget_pointer);
 GDK_AVAILABLE_IN_ALL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]