From 249f4423ee1c28e7f8ad6fdfff6c61a1f3e6d53d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 25 Nov 2019 01:14:39 +1100 Subject: Cleanup: doxygen comments Also correct some outdated symbol references, add missing 'name' commands. --- source/blender/imbuf/IMB_metadata.h | 18 +++++++++++------- source/blender/imbuf/IMB_thumbs.h | 3 ++- source/blender/imbuf/intern/rectop.c | 11 ++++++++--- source/blender/imbuf/intern/thumbs.c | 14 +++++++++++--- 4 files changed, 32 insertions(+), 14 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/IMB_metadata.h b/source/blender/imbuf/IMB_metadata.h index 64a8db6c526..fc08e17dd96 100644 --- a/source/blender/imbuf/IMB_metadata.h +++ b/source/blender/imbuf/IMB_metadata.h @@ -28,7 +28,8 @@ struct IDProperty; struct ImBuf; struct anim; -/** The metadata is a list of key/value pairs (both char *) that can me +/** + * The metadata is a list of key/value pairs (both char *) that can me * saved in the header of several image formats. * Apart from some common keys like * 'Software' and 'Description' (png standard) we'll use keys within the @@ -38,29 +39,32 @@ struct anim; * The keys & values are stored in ID properties, in the group "metadata". */ -/** Ensure that the metadata property is a valid IDProperty object. +/** + * Ensure that the metadata property is a valid #IDProperty object. * This is a no-op when *metadata != NULL. */ void IMB_metadata_ensure(struct IDProperty **metadata); void IMB_metadata_free(struct IDProperty *metadata); -/** Read the field from the image info into the field. - * \param metadata: the IDProperty that contains the metadata +/** + * Read the field from the image info into the field. + * \param metadata: the #IDProperty that contains the metadata * \param key: the key of the field * \param value: the data in the field, first one found with key is returned, * memory has to be allocated by user. * \param len: length of value buffer allocated by user. - * \return - 1 (true) if metadata is present and value for the key found, 0 (false) otherwise + * \return 1 (true) if metadata is present and value for the key found, 0 (false) otherwise. */ bool IMB_metadata_get_field(struct IDProperty *metadata, const char *key, char *value, const size_t len); -/** Set user data in the metadata. +/** + * Set user data in the metadata. * If the field already exists its value is overwritten, otherwise the field * will be added with the given value. - * \param metadata: the IDProperty that contains the metadata + * \param metadata: the #IDProperty that contains the metadata * \param key: the key of the field * \param value: the data to be written to the field. zero terminated string */ diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h index 5c7a60bbdcf..00e9a810ef3 100644 --- a/source/blender/imbuf/IMB_thumbs.h +++ b/source/blender/imbuf/IMB_thumbs.h @@ -30,7 +30,8 @@ extern "C" { struct ImBuf; -/** Thumbnail creation and retrieval according to the 'Thumbnail Management Standard' +/** + * Thumbnail creation and retrieval according to the 'Thumbnail Management Standard' * supported by Gimp, Gnome (Nautilus), KDE etc. * Reference: http://jens.triq.net/thumbnail-spec/index.html */ diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index 7150e41841b..7915f04b74e 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -213,7 +213,9 @@ void IMB_blend_color_float(float dst[4], } } -/** Crop */ +/* -------------------------------------------------------------------- */ +/** \name Crop + * \{ */ static void rect_crop_4bytes(void **buf_p, const int size_src[2], const rcti *crop) { @@ -279,8 +281,9 @@ void IMB_rect_crop(ImBuf *ibuf, const rcti *crop) ibuf->y = size_dst[1]; } -/** Re-alloc buffers at a new size */ - +/** + * Re-alloc buffers at a new size. + */ static void rect_realloc_4bytes(void **buf_p, const uint size[2]) { if (*buf_p == NULL) { @@ -318,6 +321,8 @@ void IMB_rect_size_set(ImBuf *ibuf, const uint size[2]) ibuf->y = size[1]; } +/** \} */ + /* clipping */ void IMB_rectclip(ImBuf *dbuf, diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 06b8019a24d..eb4b29e81c1 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -132,11 +132,17 @@ static bool get_thumb_dir(char *dir, ThumbSize size) #undef THUMBNAILS -/** ----- begin of adapted code from glib --- +/* --- Begin of adapted code from glib. --- */ + +/* -------------------------------------------------------------------- */ +/** \name Escape URI String + * * The following code is adapted from function g_escape_uri_string from the gnome glib * Source: http://svn.gnome.org/viewcvs/glib/trunk/glib/gconvert.c?view=markup * released under the Gnu General Public License. - */ + * + * \{ */ + typedef enum { UNSAFE_ALL = 0x1, /* Escape all unsafe characters */ UNSAFE_ALLOW_PLUS = 0x2, /* Allows '+' */ @@ -295,7 +301,9 @@ static void escape_uri_string(const char *string, *q = '\0'; } -/** ----- end of adapted code from glib --- */ +/** \} */ + +/* --- End of adapted code from glib. --- */ static bool thumbhash_from_path(const char *UNUSED(path), ThumbSource source, char *r_hash) { -- cgit v1.2.3