[glib: 3/4] gboxed: Add GBookmarkFile as Boxed types




commit 60c935a9c422c6bc0eeb3db3e578cc6ce7cb4133
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Oct 12 16:02:28 2022 +0200

    gboxed: Add GBookmarkFile as Boxed types
    
    Now that we've a copy function we can define it as a boxed type, making
    it fully introspectable.

 docs/reference/gobject/gobject-sections.txt |  2 ++
 gobject/gboxed.c                            |  1 +
 gobject/glib-types.h                        | 11 +++++++++++
 3 files changed, 14 insertions(+)
---
diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt
index 6fd6503940..9acbd7de7c 100644
--- a/docs/reference/gobject/gobject-sections.txt
+++ b/docs/reference/gobject/gobject-sections.txt
@@ -417,6 +417,7 @@ G_TYPE_OPTION_GROUP
 G_TYPE_URI
 G_TYPE_TREE
 G_TYPE_PATTERN_SPEC
+G_TYPE_BOOKMARK_FILE
 
 <SUBSECTION Standard>
 G_TYPE_IS_BOXED
@@ -453,6 +454,7 @@ g_option_group_get_type
 g_uri_get_type
 g_tree_get_type
 g_pattern_spec_get_type
+g_bookmark_file_get_type
 </SECTION>
 
 <SECTION>
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index 44da11bf61..04d283a7e9 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -166,6 +166,7 @@ G_DEFINE_BOXED_TYPE (GDateTime, g_date_time, g_date_time_ref, g_date_time_unref)
 G_DEFINE_BOXED_TYPE (GTimeZone, g_time_zone, g_time_zone_ref, g_time_zone_unref)
 G_DEFINE_BOXED_TYPE (GKeyFile, g_key_file, g_key_file_ref, g_key_file_unref)
 G_DEFINE_BOXED_TYPE (GMappedFile, g_mapped_file, g_mapped_file_ref, g_mapped_file_unref)
+G_DEFINE_BOXED_TYPE (GBookmarkFile, g_bookmark_file, g_bookmark_file_copy, g_bookmark_file_free)
 
 G_DEFINE_BOXED_TYPE (GMainLoop, g_main_loop, g_main_loop_ref, g_main_loop_unref)
 G_DEFINE_BOXED_TYPE (GMainContext, g_main_context, g_main_context_ref, g_main_context_unref)
diff --git a/gobject/glib-types.h b/gobject/glib-types.h
index 020f5d4f77..21081d2b5f 100644
--- a/gobject/glib-types.h
+++ b/gobject/glib-types.h
@@ -326,6 +326,15 @@ typedef gsize GType;
  */
 #define G_TYPE_PATTERN_SPEC (g_pattern_spec_get_type ())
 
+/**
+ * G_TYPE_BOOKMARK_FILE:
+ *
+ * The #GType for a boxed type holding a #GBookmarkFile.
+ *
+ * Since: 2.76
+ */
+#define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type ())
+
 GOBJECT_AVAILABLE_IN_ALL
 GType   g_date_get_type            (void) G_GNUC_CONST;
 GOBJECT_AVAILABLE_IN_ALL
@@ -388,6 +397,8 @@ GOBJECT_AVAILABLE_IN_2_68
 GType   g_tree_get_type            (void) G_GNUC_CONST;
 GOBJECT_AVAILABLE_IN_2_70
 GType g_pattern_spec_get_type (void) G_GNUC_CONST;
+GOBJECT_AVAILABLE_IN_2_76
+GType   g_bookmark_file_get_type   (void) G_GNUC_CONST;
 
 GOBJECT_DEPRECATED_FOR('G_TYPE_VARIANT')
 GType   g_variant_get_gtype        (void) G_GNUC_CONST;


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