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/gtkaccelgroup.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/gtkaccelgroup.h')
-rw-r--r-- | gtk/gtkaccelgroup.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkaccelgroup.h b/gtk/gtkaccelgroup.h index 7e5eaf1cb0..ce117f182a 100644 --- a/gtk/gtkaccelgroup.h +++ b/gtk/gtkaccelgroup.h @@ -242,6 +242,10 @@ struct _GtkAccelGroupEntry GQuark accel_path_quark; }; +#ifndef __GI_SCANNER__ +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAccelGroup, g_object_unref) +#endif + G_END_DECLS #endif /* __GTK_ACCEL_GROUP_H__ */ |