[gtk/window-destroy: 47/55] window: Add gtk_window_destroy
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/window-destroy: 47/55] window: Add gtk_window_destroy
- Date: Mon, 11 May 2020 16:26:20 +0000 (UTC)
commit 48821a64d0a55895bcf511ea5fe50431d193acd2
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 9 09:30:29 2020 -0400
window: Add gtk_window_destroy
This is a replacement for gtk_widget_destroy for toplevels.
For now, it is just a wrapper.
docs/reference/gtk/gtk4-sections.txt | 1 +
gtk/gtkwindow.c | 14 ++++++++++++++
gtk/gtkwindow.h | 3 +++
3 files changed, 18 insertions(+)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index d6995e8f4f..d03861889d 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4190,6 +4190,7 @@ gtk_requisition_get_type
GtkWindow
GtkWindowClass
gtk_window_new
+gtk_window_destroy
gtk_window_get_child
gtk_window_set_child
gtk_window_set_title
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index decfa1778b..965d006397 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7516,3 +7516,17 @@ gtk_window_get_child (GtkWindow *window)
return priv->child;
}
+
+/**
+ * gtk_window_destroy:
+ * @window: The window to destroy
+ *
+ * Drop the internal reference GTK holds on toplevel windows.
+ */
+void
+gtk_window_destroy (GtkWindow *window)
+{
+ g_return_if_fail (GTK_IS_WINDOW (window));
+
+ gtk_widget_destroy (GTK_WIDGET (window));
+}
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index 488a37c792..8a94876c95 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -254,6 +254,9 @@ GtkWidget *gtk_window_get_titlebar (GtkWindow *window);
GDK_AVAILABLE_IN_ALL
gboolean gtk_window_is_maximized (GtkWindow *window);
+GDK_AVAILABLE_IN_ALL
+void gtk_window_destroy (GtkWindow *window);
+
GDK_AVAILABLE_IN_ALL
void gtk_window_set_interactive_debugging (gboolean enable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]