[atk/atk-autocleanup] Add autocleanup definitions



commit db8df0487b3726db603e064966d274edd339f2af
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Apr 20 16:03:44 2020 +0100

    Add autocleanup definitions
    
    The G_DEFINE_AUTOPTR_* macros are used to define various symbols needed
    in order to use the g_autoptr() macro in GLib, which are a requirement
    in order to use the G_DECLARE_* macros to cut down the GObject
    boilerplate in the headers.

 atk/atk-autocleanups.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 atk/atk.h              |  2 ++
 atk/meson.build        |  1 +
 3 files changed, 57 insertions(+)
---
diff --git a/atk/atk-autocleanups.h b/atk/atk-autocleanups.h
new file mode 100644
index 0000000..f928f70
--- /dev/null
+++ b/atk/atk-autocleanups.h
@@ -0,0 +1,54 @@
+/* ATK -  Accessibility Toolkit
+ * Copyright 2020 GNOME Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+#ifndef __GI_SCANNER__
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkAction, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkComponent, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkDocument, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkEditableText, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkGObjectAccessible, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkHyperlink, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkHyperlinkImpl, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkHypertext, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkImage, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkImplementor, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkMisc, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkNoOpObjectFactory, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkNoOpObject, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkObjectFactory, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkObject, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkPlug, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkRegistry, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkRelationSet, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkRelation, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkSelection, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkSocket, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkStateSet, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkStreamableContent, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkTableCell, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkTable, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkText, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkUtil, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkValue, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AtkWindow, g_object_unref)
+
+#endif /* __GI_SCANNER__ */
diff --git a/atk/atk.h b/atk/atk.h
index dc121a5..0bc900d 100644
--- a/atk/atk.h
+++ b/atk/atk.h
@@ -56,6 +56,8 @@
 #include <atk/atkversion.h>
 #include <atk/atkwindow.h>
 
+#include <atk/atk-autocleanups.h>
+
 #undef __ATK_H_INSIDE__
 
 #endif /* __ATK_H__ */
diff --git a/atk/meson.build b/atk/meson.build
index 79f37f6..5dd736a 100644
--- a/atk/meson.build
+++ b/atk/meson.build
@@ -65,6 +65,7 @@ atk_headers = [
   'atkutil.h',
   'atkvalue.h',
   'atkwindow.h',
+  'atk-autocleanups.h',
 ]
 
 install_headers(atk_headers + ['atk.h'], subdir: atk_api_path)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]