Merge branch 'gzlib-docs' into 'main'

gzlibcompressor: Convert docs to gi-docgen linking syntax

See merge request GNOME/glib!4633
This commit is contained in:
Michael Catanzaro
2025-05-14 11:35:03 -05:00
2 changed files with 33 additions and 35 deletions

View File

@@ -259,7 +259,9 @@ g_zlib_compressor_class_init (GZlibCompressorClass *klass)
* GZlibCompressor:level: * GZlibCompressor:level:
* *
* The level of compression from `0` (no compression) to `9` (most * The level of compression from `0` (no compression) to `9` (most
* compression). `-1` for the default level. * compression).
*
* `-1` for the default level.
* *
* Since: 2.24 * Since: 2.24
*/ */
@@ -275,9 +277,14 @@ g_zlib_compressor_class_init (GZlibCompressorClass *klass)
/** /**
* GZlibCompressor:file-info: * GZlibCompressor:file-info:
* *
* If set to a non-%NULL #GFileInfo object, and #GZlibCompressor:format is * A [class@Gio.FileInfo] containing file information to put into the gzip
* %G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name * header.
* and modification time from the file info to the GZIP header. *
* The file name and modification time from the file info will be used.
*
* This will only be used if non-`NULL` and
* [property@Gio.ZlibCompressor:format] is
* [enum@Gio.ZlibCompressorFormat.GZIP].
* *
* Since: 2.26 * Since: 2.26
*/ */
@@ -316,13 +323,12 @@ g_zlib_compressor_class_init (GZlibCompressorClass *klass)
/** /**
* g_zlib_compressor_new: * g_zlib_compressor_new:
* @format: The format to use for the compressed data * @format: the format to use for the compressed data
* @level: compression level (0-9), -1 for default * @level: compression level (`0`-`9`), `-1` for default
* *
* Creates a new #GZlibCompressor. * Creates a compressor.
*
* Returns: a new #GZlibCompressor
* *
* Returns: a new [class@Gio.ZlibCompressor]
* Since: 2.24 * Since: 2.24
**/ **/
GZlibCompressor * GZlibCompressor *
@@ -341,12 +347,11 @@ g_zlib_compressor_new (GZlibCompressorFormat format,
/** /**
* g_zlib_compressor_get_file_info: * g_zlib_compressor_get_file_info:
* @compressor: a #GZlibCompressor * @compressor: a compressor
* *
* Returns the #GZlibCompressor:file-info property. * Gets the [property@Gio.ZlibCompressor:file-info] property.
*
* Returns: (nullable) (transfer none): a #GFileInfo, or %NULL
* *
* Returns: (nullable) (transfer none): file info for the gzip header, if set
* Since: 2.26 * Since: 2.26
*/ */
GFileInfo * GFileInfo *
@@ -359,17 +364,14 @@ g_zlib_compressor_get_file_info (GZlibCompressor *compressor)
/** /**
* g_zlib_compressor_set_file_info: * g_zlib_compressor_set_file_info:
* @compressor: a #GZlibCompressor * @compressor: a compressor
* @file_info: (nullable): a #GFileInfo * @file_info: (nullable): file info for the gzip header
* *
* Sets @file_info in @compressor. If non-%NULL, and @compressor's * Sets the [property@Gio.ZlibCompressor:file-info] property.
* #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
* it will be used to set the file name and modification time in
* the GZIP header of the compressed data.
* *
* Note: it is an error to call this function while a compression is in * Note: it is an error to call this function while a compression is in
* progress; it may only be called immediately after creation of @compressor, * progress; it may only be called immediately after creation of @compressor,
* or after resetting it with g_converter_reset(). * or after resetting it with [method@Gio.Converter.reset].
* *
* Since: 2.26 * Since: 2.26
*/ */

View File

@@ -233,10 +233,12 @@ g_zlib_decompressor_class_init (GZlibDecompressorClass *klass)
/** /**
* GZlibDecompressor:file-info: * GZlibDecompressor:file-info:
* *
* A #GFileInfo containing the information found in the GZIP header * A [class@Gio.FileInfo] containing the information found in the gzip header
* of the data stream processed, or %NULL if the header was not yet * of the data stream processed.
* fully processed, is not present at all, or the compressor's *
* #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP. * This will be `NULL` if the header was not yet fully processed, is not
* present at all, or the compressors [property@Gio.ZlibDecompressor:format]
* property is not [enum@Gio.ZlibCompressorFormat.GZIP].
* *
* Since: 2.26 * Since: 2.26
*/ */
@@ -250,12 +252,11 @@ g_zlib_decompressor_class_init (GZlibDecompressorClass *klass)
/** /**
* g_zlib_decompressor_new: * g_zlib_decompressor_new:
* @format: The format to use for the compressed data * @format: the format to use for the compressed data
* *
* Creates a new #GZlibDecompressor. * Creates a new decompressor.
*
* Returns: a new #GZlibDecompressor
* *
* Returns: a new [class@Gio.ZlibDecompressor]
* Since: 2.24 * Since: 2.24
**/ **/
GZlibDecompressor * GZlibDecompressor *
@@ -274,14 +275,9 @@ g_zlib_decompressor_new (GZlibCompressorFormat format)
* g_zlib_decompressor_get_file_info: * g_zlib_decompressor_get_file_info:
* @decompressor: a #GZlibDecompressor * @decompressor: a #GZlibDecompressor
* *
* Retrieves the #GFileInfo constructed from the GZIP header data * Gets the [property@Gio.ZlibDecompressor:file-info] property.
* of compressed data processed by @compressor, or %NULL if @decompressor's
* #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP,
* or the header data was not fully processed yet, or it not present in the
* data stream at all.
*
* Returns: (nullable) (transfer none): a #GFileInfo, or %NULL
* *
* Returns: (nullable) (transfer none): file info from the gzip header, if available
* Since: 2.26 * Since: 2.26
*/ */
GFileInfo * GFileInfo *