[librsvg] Add deprecation annotations to rsvg_handle_get_{position, dimensions}_sub
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Add deprecation annotations to rsvg_handle_get_{position, dimensions}_sub
- Date: Tue, 11 Dec 2018 00:30:46 +0000 (UTC)
commit c46f7470c0eb757d423569a8938231117f2a08e2
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Dec 10 18:17:49 2018 -0600
Add deprecation annotations to rsvg_handle_get_{position,dimensions}_sub
librsvg/rsvg-handle.c | 4 ++--
librsvg/rsvg.h | 8 ++++++--
rsvg-convert.c | 2 ++
tests/dimensions.c | 2 ++
tests/loading.c | 2 ++
tests/render-crash.c | 2 ++
tools/rsvg-dimensions.c | 2 ++
7 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/librsvg/rsvg-handle.c b/librsvg/rsvg-handle.c
index fc108750..0e481ac8 100644
--- a/librsvg/rsvg-handle.c
+++ b/librsvg/rsvg-handle.c
@@ -1234,7 +1234,7 @@ get_node_geometry(RsvgHandle *handle, RsvgNode *node, RsvgRectangle *ink_rect, R
* Get the size of a subelement of the SVG file. Do not call from within the
* size_func callback, because an infinite loop will occur.
*
- * Deprecated: Use rsvg_handle_get_geometry_sub() instead.
+ * Deprecated: 2.46. Use rsvg_handle_get_geometry_sub() instead.
*
* Since: 2.22
*/
@@ -1359,7 +1359,7 @@ out:
* Get the position of a subelement of the SVG file. Do not call from within
* the size_func callback, because an infinite loop will occur.
*
- * Deprecated: Use rsvg_handle_get_geometry_sub() instead.
+ * Deprecated: 2.46. Use rsvg_handle_get_geometry_sub() instead.
*
* Since: 2.22
*/
diff --git a/librsvg/rsvg.h b/librsvg/rsvg.h
index 3a66eaf3..db9f8f7f 100644
--- a/librsvg/rsvg.h
+++ b/librsvg/rsvg.h
@@ -109,7 +109,7 @@ struct _RsvgHandle {
* @em: em
* @ex: ex
*
- * Deprecated: 2.46
+ * Deprecated: 2.46. Please use rsvg_handle_get_geometry_sub().
*/
struct _RsvgDimensionData {
int width;
@@ -125,7 +125,7 @@ struct _RsvgDimensionData {
*
* Position of an SVG fragment.
*
- * Deprecated: 2.46
+ * Deprecated: 2.46. Please use rsvg_handle_get_geometry_sub().
*/
struct _RsvgPositionData {
int x;
@@ -178,8 +178,12 @@ void rsvg_handle_set_base_uri (RsvgHandle * handle, const char *base_uri
void rsvg_handle_get_dimensions (RsvgHandle * handle, RsvgDimensionData * dimension_data);
+RSVG_DEPRECATED_FOR(rsvg_handle_get_geometry_sub)
gboolean rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimension_data, const char
*id);
+
+RSVG_DEPRECATED_FOR(rsvg_handle_get_geometry_sub)
gboolean rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_data, const char
*id);
+
gboolean rsvg_handle_get_geometry_sub (RsvgHandle * handle, RsvgRectangle * ink_rect, RsvgRectangle *
logical_rect, const char *id);
gboolean rsvg_handle_has_sub (RsvgHandle * handle, const char *id);
diff --git a/rsvg-convert.c b/rsvg-convert.c
index cdd9b5da..77d0fe92 100644
--- a/rsvg-convert.c
+++ b/rsvg-convert.c
@@ -28,6 +28,8 @@
Dom Lachowicz <cinamod hotmail com>
*/
+#define RSVG_DISABLE_DEPRECATION_WARNINGS
+
#include "config.h"
#include <errno.h>
diff --git a/tests/dimensions.c b/tests/dimensions.c
index 1928d44e..9f99a09d 100644
--- a/tests/dimensions.c
+++ b/tests/dimensions.c
@@ -1,6 +1,8 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: set ts=4 nowrap ai expandtab sw=4: */
+#define RSVG_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
#include <cairo.h>
#include "librsvg/rsvg.h"
diff --git a/tests/loading.c b/tests/loading.c
index d856a456..1cf79d2f 100644
--- a/tests/loading.c
+++ b/tests/loading.c
@@ -1,6 +1,8 @@
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: set ts=4 nowrap ai expandtab sw=4: */
+#define RSVG_DISABLE_DEPRECATION_WARNINGS
+
#include "config.h"
#include <stdio.h>
diff --git a/tests/render-crash.c b/tests/render-crash.c
index cf9c704e..105c35de 100644
--- a/tests/render-crash.c
+++ b/tests/render-crash.c
@@ -1,5 +1,7 @@
/* vim: set ts=4 nowrap ai expandtab sw=4: */
+#define RSVG_DISABLE_DEPRECATION_WARNINGS
+
#include <glib.h>
#include "librsvg/rsvg.h"
#include "test-utils.h"
diff --git a/tools/rsvg-dimensions.c b/tools/rsvg-dimensions.c
index e3c5203d..9816e67c 100644
--- a/tools/rsvg-dimensions.c
+++ b/tools/rsvg-dimensions.c
@@ -5,6 +5,8 @@
* Author: Robert Staudinger <robsta gnome org>.
*/
+#define RSVG_DISABLE_DEPRECATION_WARNINGS
+
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]