From b95c7a04225777f5aa8c488e07dda13ccf298d77 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Sat, 1 May 2021 00:14:54 +0200 Subject: [PATCH] doc: add missing docblocks --- src/cpml/cpml-gobject.c | 12 +++++++++++ src/cpml/cpml-primitive.c | 54 +++++++++++++++++++++++++++++++++++++++-------- src/cpml/cpml-segment.c | 2 +- 3 files changed, 58 insertions(+), 10 deletions(-) diff --git a/src/cpml/cpml-gobject.c b/src/cpml/cpml-gobject.c index 2b4ddfdf..09fcf526 100644 --- a/src/cpml/cpml-gobject.c +++ b/src/cpml/cpml-gobject.c @@ -31,6 +31,18 @@ * Since: 1.0 **/ +/** + * cpml_memdup: + * @src: the memory to copy. + * @size: the number of bytes to copy. + * + * A backward compatibility wrapper that calls g_memdup2() (if present) + * or g_memdup(). Needed because the latter has been deprecated because + * of a unfixable vulnerability (the size was guint instead of gsize). + * + * Since: 1.0 + **/ + #include "cpml-internal.h" diff --git a/src/cpml/cpml-primitive.c b/src/cpml/cpml-primitive.c index d0491f6d..129dc0e8 100644 --- a/src/cpml/cpml-primitive.c +++ b/src/cpml/cpml-primitive.c @@ -36,11 +36,6 @@ /** * CpmlPrimitiveType: - * @CPML_MOVE: equivalent to %CAIRO_PATH_MOVE_TO - * @CPML_LINE: equivalent to %CAIRO_PATH_LINE_TO - * @CPML_CURVE: equivalent to %CAIRO_PATH_CURVE_TO - * @CPML_CLOSE: equivalent to %CAIRO_PATH_CLOSE_PATH - * @CPML_ARC: an arc representation at CPML level * * This is a type compatible with #cairo_path_data_type_t type. It is * basically the same enum but it embodies an important difference: @@ -61,6 +56,47 @@ **/ /** + * CPML_MOVE: + * + * A #CpmlPrimitiveType value equivalent to CAIRO_PATH_MOVE_TO. + * + * Since: 1.0 + **/ + +/** + * CPML_LINE: + * + * A #CpmlPrimitiveType value equivalent to CAIRO_PATH_LINE_TO. + * + * Since: 1.0 + **/ + +/** + * CPML_CURVE: + * + * A #CpmlPrimitiveType value equivalent to CAIRO_PATH_CURVE_TO. + * + * Since: 1.0 + **/ + +/** + * CPML_CLOSE: + * + * A #CpmlPrimitiveType value equivalent to CAIRO_PATH_CLOSE_PATH. + * + * Since: 1.0 + **/ + +/** + * CPML_ARC: + * + * A #CpmlPrimitiveType value that represents an arc representation at + * CPML level. + * + * Since: 1.0 + **/ + +/** * CpmlPrimitive: * @segment: the source #CpmlSegment * @org: a pointer to the first point of the primitive @@ -127,7 +163,7 @@ cpml_primitive_type_get_n_points(CpmlPrimitiveType type) * * Returns the type of @primitive, i.e. %CPML_LINE for lines, * %CPML_ARC for arcs or circles, %CPML_CURVE for cubic Bézier - * curves and %CPML_CLOSE for closing lines. The %CPML_MOVE is + * curves and CPML_CLOSE for closing lines. The %CPML_MOVE is * used extensively *between* segments but it is not considered * by itself a primitive, so it should never been returned. * @@ -356,7 +392,7 @@ cpml_primitive_put_extents(const CpmlPrimitive *primitive, * that -1 is the end point, -2 the point before the end point and * so on. * - * #CPML_CLOSE is managed in a special way: if @n_point + * CPML_CLOSE is managed in a special way: if @n_point * is -1 or 1 and @primitive is a close-path, this function cycles * the source #CpmlSegment and returns the first point. This is * needed because requesting the end point (or the second point) @@ -756,7 +792,7 @@ cpml_primitive_join(CpmlPrimitive *primitive, CpmlPrimitive *primitive2) * @cr: (inout): the destination cairo context * * Renders a single @primitive to the @cr cairo context. - * As a special case, if the primitive is a #CPML_CLOSE, an + * As a special case, if the primitive is a CPML_CLOSE, an * equivalent line is rendered, because a close path left alone * is not renderable. * @@ -867,7 +903,7 @@ _cpml_class_from_obj(const CpmlPrimitive *primitive) * so that -1 is the end point, -2 the point before the end point * and so on. * - * #CPML_CLOSE is managed in a special way: if @n_point + * CPML_CLOSE is managed in a special way: if @n_point * is -1 or 1 and @primitive is a close-path, this function cycles * the source #CpmlSegment and returns the first point. This is * needed because requesting the end point (or the second point) diff --git a/src/cpml/cpml-segment.c b/src/cpml/cpml-segment.c index 3eebc498..ad3aba03 100644 --- a/src/cpml/cpml-segment.c +++ b/src/cpml/cpml-segment.c @@ -93,7 +93,7 @@ static int reshape (CpmlSegment *segment); * cairo context (to know the current position) is needed. * * This function will fail if @path is empty or if its - * status member is not %CAIRO_STATUS_SUCCESS. + * status member is not CAIRO_STATUS_SUCCESS. * * Returns: (type gboolean): 1 if @segment has been succesfully computed, 0 on errors. * -- 2.11.4.GIT