gdir: Add refcounting support and a boxed type

This allows the methods for `GDir` to be introspected. While we don’t
expect languages which use the introspection bindings to use `GDir`,
full introspection support is necessary for the `GDir` documentation to
be correctly built with gi-docgen.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
This commit is contained in:
Philip Withnall
2023-11-15 16:09:44 +00:00
parent c7a02280f5
commit 3c42b9c3ee
5 changed files with 128 additions and 15 deletions

View File

@@ -345,6 +345,15 @@ typedef gsize GType;
*/
#define G_TYPE_HMAC (g_hmac_get_type ())
/**
* G_TYPE_DIR:
*
* The #GType for a boxed type holding a #GDir.
*
* Since: 2.80
*/
#define G_TYPE_DIR (g_dir_get_type ())
GOBJECT_AVAILABLE_IN_ALL
GType g_date_get_type (void) G_GNUC_CONST;
GOBJECT_AVAILABLE_IN_ALL
@@ -411,6 +420,8 @@ GOBJECT_AVAILABLE_IN_2_76
GType g_bookmark_file_get_type (void) G_GNUC_CONST;
GOBJECT_AVAILABLE_IN_2_80
GType g_hmac_get_type (void) G_GNUC_CONST;
GOBJECT_AVAILABLE_IN_2_80
GType g_dir_get_type (void) G_GNUC_CONST;
GOBJECT_DEPRECATED_FOR('G_TYPE_VARIANT')
GType g_variant_get_gtype (void) G_GNUC_CONST;