diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-11-10 13:59:36 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-11-10 13:59:36 +0000 |
commit | 93369788c907b9c61204ff377854729cd404e25f (patch) | |
tree | 7b952164ccebb6c46be79b1cbb38129f33a47332 /gtk/gtkbin.h | |
parent | d589170754af9620feabb0e598b626116470557f (diff) | |
download | gtk+-93369788c907b9c61204ff377854729cd404e25f.tar.gz |
Start recursively moving autocleanups macros to their headers
* Cover letter
Having a single header file for all autocleanups definitions was a
reasonable stop-gap measure, but now GTK+ is starting to use G_DECLARE_*
macros. This means that every class using a G_DECLARE_* macro will need
to include "gtk.h" to avoid compiler warnings, which is not acceptable.
By moving the G_DEFINE_AUTO* use to the header that defines the type we
allow using the G_DECLARE_* macros without sacrificing the ability to
include only the needed files when deriving from a class.
* Commit
This commit changes all includes relative to GtkWindow to define their
own autocleanup macros.
Diffstat (limited to 'gtk/gtkbin.h')
-rw-r--r-- | gtk/gtkbin.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkbin.h b/gtk/gtkbin.h index bca7885c5b..63221402fd 100644 --- a/gtk/gtkbin.h +++ b/gtk/gtkbin.h @@ -32,7 +32,6 @@ #include <gtk/gtkcontainer.h> - G_BEGIN_DECLS #define GTK_TYPE_BIN (gtk_bin_get_type ()) @@ -82,6 +81,10 @@ GtkWidget *gtk_bin_get_child (GtkBin *bin); void _gtk_bin_set_child (GtkBin *bin, GtkWidget *widget); +#ifndef __GI_SCANNER__ +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkBin, g_object_unref) +#endif + G_END_DECLS #endif /* __GTK_BIN_H__ */ |