[librsvg: 7/23] Add a few missing Returns:




commit f1c0096c37b066149f257da8a7e8d51e7e9ab158
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Jan 6 14:05:43 2022 -0600

    Add a few missing Returns:
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/650>

 include/librsvg/rsvg-cairo.h | 15 +++++++++++++++
 include/librsvg/rsvg.h       |  7 +++++++
 2 files changed, 22 insertions(+)
---
diff --git a/include/librsvg/rsvg-cairo.h b/include/librsvg/rsvg-cairo.h
index 7153e5e7a..b3756f1e4 100644
--- a/include/librsvg/rsvg-cairo.h
+++ b/include/librsvg/rsvg-cairo.h
@@ -167,6 +167,9 @@ gboolean rsvg_handle_render_cairo_sub (RsvgHandle *handle, cairo_t *cr, const ch
  * The @cr must be in a `CAIRO_STATUS_SUCCESS` state, or this function will not
  * render anything, and instead will return an error.
  *
+ * Returns: `TRUE` on success, `FALSE` on error.  Errors are returned
+ * in the @error argument.
+ *
  * API ordering: This function must be called on a fully-loaded @handle.  See
  * the section "API ordering" for details.
  *
@@ -215,6 +218,9 @@ gboolean rsvg_handle_render_document (RsvgHandle           *handle,
  * This operation is not constant-time, as it involves going through all
  * the child elements.
  *
+ * Returns: `TRUE` if the geometry could be obtained, or `FALSE` on error.  Errors
+ * are returned in the @error argument.
+ *
  * API ordering: This function must be called on a fully-loaded @handle.  See
  * the section "API ordering" for details.
  *
@@ -261,6 +267,9 @@ gboolean rsvg_handle_get_geometry_for_layer (RsvgHandle     *handle,
  * the elements in the SVG, i.e. to render everything from the
  * root element.
  *
+ * Returns: `TRUE` on success, `FALSE` on error.  Errors are returned
+ * in the @error argument.
+ *
  * API ordering: This function must be called on a fully-loaded @handle.  See
  * the section "API ordering" for details.
  *
@@ -315,6 +324,9 @@ gboolean rsvg_handle_render_layer (RsvgHandle           *handle,
  * This operation is not constant-time, as it involves going through all
  * the child elements.
  *
+ * Returns: `TRUE` if the geometry could be obtained, or `FALSE` on error.  Errors
+ * are returned in the @error argument.
+ *
  * API ordering: This function must be called on a fully-loaded @handle.  See
  * the section "API ordering" for details.
  *
@@ -357,6 +369,9 @@ gboolean rsvg_handle_get_geometry_for_element (RsvgHandle     *handle,
  * The `element_viewport` gives the position and size at which the named element will
  * be rendered.  FIXME: mention proportional scaling.
  *
+ * Returns: `TRUE` on success, `FALSE` on error.  Errors are returned
+ * in the @error argument.
+ *
  * API ordering: This function must be called on a fully-loaded @handle.  See
  * the section "API ordering" for details.
  *
diff --git a/include/librsvg/rsvg.h b/include/librsvg/rsvg.h
index 00d41b7b0..94baa9e19 100644
--- a/include/librsvg/rsvg.h
+++ b/include/librsvg/rsvg.h
@@ -721,6 +721,8 @@ void rsvg_handle_get_dimensions (RsvgHandle *handle, RsvgDimensionData *dimensio
  * `#foo` (hash `foo`) to get the geometry of the element that
  * has an `id="foo"` attribute.
  *
+ * Returns: `TRUE` if the dimensions could be obtained, `FALSE` if there was an error.
+ *
  * Deprecated: 2.46.  Use rsvg_handle_get_geometry_for_layer() instead.
  *
  * Since: 2.22
@@ -748,6 +750,8 @@ gboolean rsvg_handle_get_dimensions_sub (RsvgHandle        *handle,
  * `#foo` (hash `foo`) to get the geometry of the element that
  * has an `id="foo"` attribute.
  *
+ * Returns: `TRUE` if the position could be obtained, `FALSE` if there was an error.
+ *
  * Deprecated: 2.46.  Use rsvg_handle_get_geometry_for_layer() instead.  This function is
  * deprecated since it is not able to return exact floating-point positions, only integer
  * pixels.
@@ -1154,6 +1158,9 @@ RsvgHandle *rsvg_handle_new_from_file (const gchar *filename, GError **error);
  *
  * Note that `@import` rules will not be resolved, except for `data:` URLs.
  *
+ * Returns: `TRUE` on success, `FALSE` on error.  Errors are returned
+ * in the @error argument.
+ *
  * Since: 2.48
  */
 RSVG_API


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]