[clutter] Add autocleanup macros for Clutter types
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Add autocleanup macros for Clutter types
- Date: Tue, 7 Jul 2015 15:05:42 +0000 (UTC)
commit cffa243fbe675d0025a53cbc069e29ecfcc65176
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Jul 7 14:52:20 2015 +0100
Add autocleanup macros for Clutter types
So that people can use the g_auto* macros, as well as the G_DECLARE_*
ones, from GLib 2.44.
clutter/Makefile.am | 2 +-
clutter/clutter-autocleanups.h | 106 ++++++++++++++++++++++++++++++++++++++++
clutter/clutter.h | 2 +
3 files changed, 109 insertions(+), 1 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index d81ced8..7be3ab7 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -834,7 +834,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
DISTCLEANFILES += $(pc_files)
-clutter_include_HEADERS = $(source_h) clutter.h clutter-version.h
+clutter_include_HEADERS = $(source_h) clutter.h clutter-version.h clutter-autocleanups.h
nodist_clutter_include_HEADERS = clutter-config.h $(built_source_h)
clutter_deprecated_HEADERS = $(deprecated_h)
diff --git a/clutter/clutter-autocleanups.h b/clutter/clutter-autocleanups.h
new file mode 100644
index 0000000..10c73fd
--- /dev/null
+++ b/clutter/clutter-autocleanups.h
@@ -0,0 +1,106 @@
+/*
+ * Clutter.
+ *
+ * An OpenGL based 'interactive canvas' library.
+ *
+ * Copyright 2015 Emmanuele Bassi
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ */
+
+#ifndef __CLUTTER_AUTO_CLEANUPS_H__
+#define __CLUTTER_AUTO_CLEANUPS_H__
+
+#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
+#error "Only <clutter/clutter.h> can be included directly."
+#endif
+
+#ifndef __GI_SCANNER__
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActor, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorMeta, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAlignConstraint, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterAnimatable, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBackend, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindConstraint, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBindingPool, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBinLayout, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBlurEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBoxLayout, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterBrightnessContrastEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterCanvas, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterChildMeta, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterClickAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterClone, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColorizeEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterConstraint, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterContainer, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterContent, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDeformEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDesaturateEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDeviceManager, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDragAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterDropAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterFixedLayout, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterFlowLayout, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterGestureAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterGridLayout, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterImage, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterInputDevice, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterInterval, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterKeyframeTransition, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterLayoutManager, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterLayoutMeta, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterOffscreenEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPageTurnEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPanAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathConstraint, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPath, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPropertyTransition, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterRotateAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterScriptable, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterScript, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterScrollActor, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSettings, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterShaderEffect, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSnapConstraint, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterStage, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSwipeAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterTapAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterTextBuffer, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterText, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterTimeline, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterTransitionGroup, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterTransition, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterZoomAction, g_object_unref)
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorBox, clutter_actor_box_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColor, clutter_color_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMargin, clutter_margin_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMatrix, clutter_matrix_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintNode, clutter_paint_node_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintVolume, clutter_paint_volume_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathNode, clutter_path_node_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPoint, clutter_point_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterRect, clutter_rect_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSize, clutter_size_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterVertex, clutter_vertex_free)
+
+#endif /* __GI_SCANNER__ */
+
+#endif /* __CLUTTER_AUTO_CLEANUPS_H__ */
diff --git a/clutter/clutter.h b/clutter/clutter.h
index 37ef515..7d5c750 100644
--- a/clutter/clutter.h
+++ b/clutter/clutter.h
@@ -110,6 +110,8 @@
#include "clutter-deprecated.h"
+#include "clutter-autocleanups.h"
+
#undef __CLUTTER_H_INSIDE__
#endif /* __CLUTTER_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]