[gtk+] Move GtkWindow g_autoptr macros in the class header
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Move GtkWindow g_autoptr macros in the class header
- Date: Tue, 10 Nov 2015 14:17:13 +0000 (UTC)
commit 40d6321b4cf3d229934ea60b6fede530db50161f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Nov 10 13:34:33 2015 +0000
Move GtkWindow g_autoptr macros in the class header
Otherwise we won't be able to use G_DECLARE_* macros internally to GTK
without generating warnings, or without including gtk.h itself.
gtk/gtk-autocleanups.h | 2 --
gtk/gtkwindow.h | 5 +++++
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtk-autocleanups.h b/gtk/gtk-autocleanups.h
index 5361872..4a9e621 100644
--- a/gtk/gtk-autocleanups.h
+++ b/gtk/gtk-autocleanups.h
@@ -205,8 +205,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTreeViewColumn, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkViewport, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkVolumeButton, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWidget, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWindow, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWindowGroup, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkBorder, gtk_border_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkPaperSize, gtk_paper_size_free)
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index bd73697..9ca45bd 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -497,6 +497,11 @@ gboolean gtk_window_is_maximized (GtkWindow *window);
GDK_AVAILABLE_IN_3_14
void gtk_window_set_interactive_debugging (gboolean enable);
+#ifndef __GI_SCANNER__
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWindow, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWindowGroup, g_object_unref)
+#endif
+
G_END_DECLS
#endif /* __GTK_WINDOW_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]