girepository: Update docs for GITypelib for gi-docgen

Move the SECTION into the struct docs, update the documentation comment
syntax, and add `Since: 2.80` everywhere.

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

Helps: #3155
This commit is contained in:
Philip Withnall 2023-11-09 00:06:57 +00:00
parent 85bed115d8
commit 2d2263fa4f
2 changed files with 30 additions and 25 deletions

View File

@ -32,6 +32,15 @@
#include "gitypelib-internal.h"
#include "gitypelib.h"
/**
* GITypelib:
*
* `GITypelib` represents a loaded `.typelib` file, which contains a description
* of a single modules API.
*
* Since: 2.80
*/
typedef struct {
GITypelib *typelib;
GSList *context_stack;
@ -2373,11 +2382,13 @@ gi_typelib_ensure_open (GITypelib *typelib)
* @len: length of memory chunk containing the typelib
* @error: a #GError
*
* Creates a new #GITypelib from a memory location. The memory block
* pointed to by @typelib will be automatically g_free()d when the
* Creates a new `GITypelib` from a memory location.
*
* The memory block pointed to by @typelib will be automatically freed when the
* repository is destroyed.
*
* Returns: the new #GITypelib
* Since: 2.80
*/
GITypelib *
gi_typelib_new_from_memory (guint8 *memory,
@ -2402,11 +2413,12 @@ gi_typelib_new_from_memory (guint8 *memory,
* gi_typelib_new_from_const_memory: (skip)
* @memory: address of memory chunk containing the typelib
* @len: length of memory chunk containing the typelib
* @error: A #GError
* @error: a #GError
*
* Creates a new #GITypelib from a memory location.
* Creates a new `GITypelib` from a memory location.
*
* Returns: the new #GITypelib
* Since: 2.80
*/
GITypelib *
gi_typelib_new_from_const_memory (const guchar *memory,
@ -2429,12 +2441,14 @@ gi_typelib_new_from_const_memory (const guchar *memory,
/**
* gi_typelib_new_from_mapped_file: (skip)
* @mfile: a #GMappedFile, that will be free'd when the repository is destroyed
* @mfile: a [type@GLib.MappedFile], that will be freed when the repository is
* destroyed
* @error: a #GError
*
* Creates a new #GITypelib from a #GMappedFile.
* Creates a new `GITypelib` from a [type@GLib.MappedFile].
*
* Returns: the new #GITypelib
* Since: 2.80
*/
GITypelib *
gi_typelib_new_from_mapped_file (GMappedFile *mfile,
@ -2460,7 +2474,9 @@ gi_typelib_new_from_mapped_file (GMappedFile *mfile,
* gi_typelib_free:
* @typelib: a #GITypelib
*
* Free a #GITypelib.
* Free a `GITypelib`.
*
* Since: 2.80
*/
void
gi_typelib_free (GITypelib *typelib)
@ -2480,11 +2496,12 @@ gi_typelib_free (GITypelib *typelib)
/**
* gi_typelib_get_namespace:
* @typelib: TODO
* @typelib: a #GITypelib
*
* TODO
* Get the name of the namespace represented by @typelib.
*
* Returns: TODO
* Returns: name of the namespace represented by @typelib
* Since: 2.80
*/
const gchar *
gi_typelib_get_namespace (GITypelib *typelib)
@ -2498,9 +2515,10 @@ gi_typelib_get_namespace (GITypelib *typelib)
* @symbol_name: name of symbol to be loaded
* @symbol: returns a pointer to the symbol value
*
* Loads a symbol from #GITypelib.
* Loads a symbol from a `GITypelib`.
*
* Returns: #TRUE on success
* Returns: true on success
* Since: 2.80
*/
gboolean
gi_typelib_symbol (GITypelib *typelib, const char *symbol_name, gpointer *symbol)

View File

@ -34,19 +34,6 @@
G_BEGIN_DECLS
/**
* SECTION:gitypelib
* @title: GITypelib
* @short_description: TODO
*
* TODO
*/
/**
* GITypelib:
*
* TODO
*/
typedef struct _GITypelib GITypelib;
GI_AVAILABLE_IN_ALL