[librsvg: 2/4] Move RsvgPositionData to c_api



commit e6e0a8801c71bc46e34d7ddf2a99b64d563093c8
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Apr 30 20:22:37 2020 -0500

    Move RsvgPositionData to c_api
    
    It's not used in rsvg_internals anymore.

 librsvg/c_api.rs             | 11 +++++++++--
 rsvg_internals/src/handle.rs |  7 -------
 rsvg_internals/src/lib.rs    |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/librsvg/c_api.rs b/librsvg/c_api.rs
index 9ce4c37f..3291c1fc 100644
--- a/librsvg/c_api.rs
+++ b/librsvg/c_api.rs
@@ -34,8 +34,8 @@ use gobject_sys::{GEnumValue, GFlagsValue};
 
 use rsvg_internals::{
     rsvg_log, DefsLookupErrorKind, Dpi, Handle, IntrinsicDimensions, LoadOptions, LoadingError,
-    RenderingError, RsvgLength, RsvgPositionData, RsvgSizeFunc, SharedImageSurface, SizeCallback,
-    SurfaceType, ViewBox,
+    RenderingError, RsvgLength, RsvgSizeFunc, SharedImageSurface, SizeCallback, SurfaceType,
+    ViewBox,
 };
 
 use crate::messages::{rsvg_g_critical, rsvg_g_warning};
@@ -468,6 +468,13 @@ pub fn checked_i32(x: f64) -> Result<i32, cairo::Status> {
     cast::i32(x).map_err(|_| cairo::Status::InvalidSize)
 }
 
+// Keep in sync with rsvg.h:RsvgPositionData
+#[repr(C)]
+pub struct RsvgPositionData {
+    pub x: libc::c_int,
+    pub y: libc::c_int,
+}
+
 // Keep in sync with rsvg.h:RsvgDimensionData
 #[repr(C)]
 pub struct RsvgDimensionData {
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index 82a3d107..0cf51ea1 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -72,13 +72,6 @@ impl LoadOptions {
     }
 }
 
-// Keep in sync with rsvg.h:RsvgPositionData
-#[repr(C)]
-pub struct RsvgPositionData {
-    pub x: libc::c_int,
-    pub y: libc::c_int,
-}
-
 // Keep in sync with rsvg.h:RsvgSizeFunc
 pub type RsvgSizeFunc = Option<
     unsafe extern "C" fn(
diff --git a/rsvg_internals/src/lib.rs b/rsvg_internals/src/lib.rs
index 95d17a43..fafbdc15 100644
--- a/rsvg_internals/src/lib.rs
+++ b/rsvg_internals/src/lib.rs
@@ -53,7 +53,7 @@ pub use crate::dpi::{rsvg_rust_set_default_dpi_x_y, Dpi};
 
 pub use crate::error::{DefsLookupErrorKind, HrefError, LoadingError, RenderingError};
 
-pub use crate::handle::{Handle, LoadOptions, RsvgPositionData, RsvgSizeFunc, SizeCallback};
+pub use crate::handle::{Handle, LoadOptions, RsvgSizeFunc, SizeCallback};
 
 pub use crate::length::{Length, LengthUnit, RsvgLength};
 


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