Move C API glue to a librsvg_c_api crate

Now, the dependencies are like this:

      rsvg_internals
       ^           ^
       |             \
       |               \
librsvg_crate     librsvg_c_api
                         ^
			 |
                    librsvg.so

This will eventually let us build rsvg_internals without a Cargo
feature (the "c-library") feature, so it will only be built *once* for
the whole librsvg compilation.
parent d8495a0f
This diff is collapsed.
[workspace]
members = [
"librsvg",
"librsvg_crate",
"rsvg_internals",
]
......
......@@ -4,7 +4,7 @@ NULL =
BUILT_SOURCES =
lib_LTLIBRARIES = librsvg-@RSVG_API_MAJOR_VERSION@.la
noinst_LTLIBRARIES = librsvg_internals.la
noinst_LTLIBRARIES = librsvg_c_api.la
bin_PROGRAMS = rsvg-convert
......@@ -14,7 +14,7 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_SOURCES = \
$(librsvg_c_srcs) \
$(NULL)
librsvg_internals_la_SOURCES = \
LIBRSVG_INTERNALS_SOURCES = \
Cargo.toml \
rsvg_internals/Cargo.toml \
rsvg_internals/build.rs \
......@@ -22,7 +22,6 @@ librsvg_internals_la_SOURCES = \
rsvg_internals/src/angle.rs \
rsvg_internals/src/aspect_ratio.rs \
rsvg_internals/src/bbox.rs \
rsvg_internals/src/c_api.rs \
rsvg_internals/src/clip_path.rs \
rsvg_internals/src/color.rs \
rsvg_internals/src/cond.rs \
......@@ -98,7 +97,8 @@ librsvg_internals_la_SOURCES = \
rsvg_internals/src/viewbox.rs \
rsvg_internals/src/xml.rs \
rsvg_internals/src/xml2.rs \
rsvg_internals/src/xml2_load.rs
rsvg_internals/src/xml2_load.rs \
$(NULL)
LIBRSVG_CRATE_SOURCES = \
librsvg_crate/Cargo.toml \
......@@ -110,7 +110,15 @@ LIBRSVG_CRATE_SOURCES = \
librsvg_crate/tests/render_to_viewport.rs \
librsvg_crate/tests/primitives.rs \
librsvg_crate/tests/utils/mod.rs \
librsvg_crate/tests/utils/compare_surfaces.rs
librsvg_crate/tests/utils/compare_surfaces.rs \
$(NULL)
LIBRSVG_C_API_SOURCES = \
librsvg/Cargo.toml \
librsvg/build.rs \
librsvg/c_api.rs \
librsvg/lib.rs \
$(NULL)
RUST_EXTRA = \
Cargo.lock \
......@@ -119,7 +127,8 @@ RUST_EXTRA = \
rsvg_internals/benches/composite.rs \
rsvg_internals/benches/lighting.rs \
rsvg_internals/benches/pixel_iterators.rs \
rsvg_internals/benches/srgb.rs
rsvg_internals/benches/srgb.rs \
$(NULL)
if DEBUG_RELEASE
CARGO_RELEASE_ARGS=
......@@ -140,7 +149,7 @@ LIBRSVG_BUILD_DIR=@abs_top_builddir@
CARGO_TARGET_DIR=$(LIBRSVG_BUILD_DIR)/target
LIBRSVG_TARGET_DIR=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)
RUST_LIB=$(LIBRSVG_BUILD_DIR)/.libs/librsvg_internals.a
RUST_LIB=$(LIBRSVG_BUILD_DIR)/.libs/librsvg_c_api.a
check-local:
cd $(srcdir) && \
......@@ -169,8 +178,8 @@ dist-hook:
mkdir .cargo && \
cp cargo-vendor-config .cargo/config)
librsvg_internals.la: $(librsvg_internals_la_SOURCES)
+cd $(top_srcdir)/rsvg_internals && \
librsvg_c_api.la: $(LIBRSVG_INTERNALS_SOURCES) $(LIBRSVG_C_API_SOURCES)
+cd $(top_srcdir)/librsvg && \
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG='$(PKG_CONFIG)' \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
......@@ -205,7 +214,7 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = \
$(AM_LDFLAGS)
librsvg_@RSVG_API_MAJOR_VERSION@_la_LIBADD = \
librsvg_internals.la \
librsvg_c_api.la \
$(LIBRSVG_LIBS) \
$(LIBM) \
$(DLOPEN_LIBS)
......@@ -246,7 +255,8 @@ dist_doc_DATA = \
code-of-conduct.md
EXTRA_DIST = \
$(librsvg_internals_la_SOURCES) \
$(LIBRSVG_INTERNALS_SOURCES) \
$(LIBRSVG_C_API_SOURCES) \
$(RUST_EXTRA) \
$(LIBRSVG_CRATE_SOURCES) \
librsvg.doap \
......
[package]
name = "librsvg_c_api"
version = "0.0.1"
authors = ["Federico Mena Quintero <federico@gnome.org>"]
workspace = "../"
build = "build.rs"
edition = "2018"
[lib]
name = "rsvg_c_api"
path = "lib.rs"
crate-type = [ "staticlib" ]
[features]
# Enables calling g_warning() when built as part of librsvg.so
c-library = []
[dependencies]
bitflags = "1.0"
cairo-rs = { version="0.7.0", features=["v1_16"] }
cairo-sys-rs = "0.9.0"
gdk-pixbuf = "0.7.0"
gdk-pixbuf-sys = "0.9.0"
glib = { version="0.8.0", features=["subclassing"] }
glib-sys = "0.9.0"
gio = { version="0.7.0", features=["v2_48"] } # per configure.ac
gio-sys = "0.9.0"
gobject-sys = "0.9.0"
libc = "0.2"
rsvg_internals = { path = "../rsvg_internals" }
url = "2"
use std::env;
use std::fs::File;
use std::io::prelude::*;
#[cfg(all(unix, feature = "c-library"))]
use std::os::unix::fs::symlink;
#[cfg(all(windows, not(target_env = "msvc"), feature="c-library"))]
use std::os::windows::fs::symlink_file as symlink;
#[cfg(all(not(target_env = "msvc"), feature="c-library"))]
use std::fs;
#[cfg(all(not(target_env = "msvc"), feature="c-library"))]
use std::path::PathBuf;
fn main() {
generate_convenience_lib().unwrap();
}
/// Generate libtool archive file librsvg_c_api.la
/// From: https://docs.rs/libtool/0.1.1/libtool/
#[cfg(all(feature = "c-library", not(target_env = "msvc")))]
pub fn generate_convenience_lib() -> std::io::Result<()> {
let target = env::var("TARGET").expect("TARGET was not set");
let build_dir = env::var("LIBRSVG_BUILD_DIR").expect("LIBRSVG_BUILD_DIR was not set");
let target_dir = env::var("LIBRSVG_TARGET_DIR").expect("LIBRSVG_TARGET_DIR was not set");
let libs_dir = format!("{}/.libs", build_dir);
let libs_path = PathBuf::from(&libs_dir);
let la_path = PathBuf::from(format!("{}/librsvg_c_api.la", build_dir));
let rust_lib = if target.contains("windows") {
/* https://github.com/rust-lang/rust/issues/43749 */
"rsvg_c_api.lib"
} else {
"librsvg_c_api.a"
};
let old_lib_path = PathBuf::from(format!("{}/{}", target_dir, rust_lib));
let new_lib_path = PathBuf::from(format!("{}/librsvg_c_api.a", libs_dir));
match fs::create_dir_all(&libs_path) {
Ok(()) => println!("libs_path created"),
_ => panic!("Failed to create libs_path"),
}
if la_path.exists() {
fs::remove_file(&la_path)?;
}
/* PathBuf.exists() traverses symlinks so just try and remove it */
match fs::remove_file(&new_lib_path) {
Ok(_v) => {},
Err(e) => println!("Error removing symlink: {:?}", e),
}
let mut file = File::create(&la_path).unwrap();
writeln!(file, "# librsvg_c_api.la - a libtool library file")?;
writeln!(file, "# Generated by libtool-rust")?;
writeln!(file, "dlname=''")?;
writeln!(file, "library_names=''")?;
writeln!(file, "old_library='librsvg_c_api.a'")?;
writeln!(file, "inherited_linker_flags=''")?;
writeln!(file, "installed=no")?;
writeln!(file, "shouldnotlink=no")?;
symlink(&old_lib_path, &new_lib_path)?;
Ok(())
}
#[cfg(not(all(feature = "c-library", not(target_env = "msvc"))))]
pub fn generate_convenience_lib() -> std::io::Result<()> {
Ok(())
}
......@@ -8,13 +8,16 @@ use std::sync::Once;
use std::{f64, i32};
use cairo;
use cairo_sys;
use gdk_pixbuf::Pixbuf;
use gdk_pixbuf_sys;
use libc;
use url::Url;
use bitflags::bitflags;
use gio::prelude::*;
use gio_sys;
use glib::object::ObjectClass;
use glib::subclass;
......@@ -30,12 +33,11 @@ use glib::{
use glib_sys;
use gobject_sys::{self, GEnumValue, GFlagsValue};
use crate::dpi::Dpi;
use crate::drawing_ctx::RsvgRectangle;
use crate::error::{set_gerror, DefsLookupErrorKind, LoadingError, RenderingError, RSVG_ERROR_FAILED};
use crate::handle::{Handle, LoadOptions};
use crate::length::RsvgLength;
use crate::structure::IntrinsicDimensions;
use rsvg_internals::{
rsvg_log, set_gerror, DefsLookupErrorKind, Dpi, Handle, IntrinsicDimensions, LoadOptions,
LoadingError, RenderingError, RsvgDimensionData, RsvgLength, RsvgPositionData, RsvgRectangle,
RsvgSizeFunc, SizeCallback, RSVG_ERROR_FAILED,
};
mod handle_flags {
// The following is entirely stolen from the auto-generated code
......@@ -127,45 +129,6 @@ impl From<LoadFlags> for HandleFlags {
}
}
// Keep in sync with rsvg.h:RsvgDimensionData
#[repr(C)]
pub struct RsvgDimensionData {
pub width: libc::c_int,
pub height: libc::c_int,
pub em: f64,
pub ex: f64,
}
impl RsvgDimensionData {
// This is not #[derive(Default)] to make it clear that it
// shouldn't be the default value for anything; it is actually a
// special case we use to indicate an error to the public API.
pub fn empty() -> RsvgDimensionData {
RsvgDimensionData {
width: 0,
height: 0,
em: 0.0,
ex: 0.0,
}
}
}
// 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(
inout_width: *mut libc::c_int,
inout_height: *mut libc::c_int,
user_data: glib_sys::gpointer,
),
>;
// Keep this in sync with rsvg.h:RsvgHandleClass
#[repr(C)]
pub struct RsvgHandleClass {
......@@ -182,63 +145,6 @@ pub struct RsvgHandle {
_abi_padding: [glib_sys::gpointer; 16],
}
pub struct SizeCallback {
size_func: RsvgSizeFunc,
user_data: glib_sys::gpointer,
destroy_notify: glib_sys::GDestroyNotify,
in_loop: Cell<bool>,
}
impl SizeCallback {
pub fn call(&self, width: libc::c_int, height: libc::c_int) -> (libc::c_int, libc::c_int) {
unsafe {
let mut w = width;
let mut h = height;
if let Some(ref f) = self.size_func {
f(&mut w, &mut h, self.user_data);
};
(w, h)
}
}
pub fn start_loop(&self) {
assert!(!self.in_loop.get());
self.in_loop.set(true);
}
pub fn end_loop(&self) {
assert!(self.in_loop.get());
self.in_loop.set(false);
}
pub fn get_in_loop(&self) -> bool {
self.in_loop.get()
}
}
impl Default for SizeCallback {
fn default() -> SizeCallback {
SizeCallback {
size_func: None,
user_data: ptr::null_mut(),
destroy_notify: None,
in_loop: Cell::new(false),
}
}
}
impl Drop for SizeCallback {
fn drop(&mut self) {
unsafe {
if let Some(ref f) = self.destroy_notify {
f(self.user_data);
};
}
}
}
enum LoadState {
// Just created the CHandle
Start,
......@@ -534,12 +440,7 @@ impl CHandle {
user_data: glib_sys::gpointer,
destroy_notify: glib_sys::GDestroyNotify,
) {
*self.size_callback.borrow_mut() = SizeCallback {
size_func,
user_data,
destroy_notify,
in_loop: Cell::new(false),
};
*self.size_callback.borrow_mut() = SizeCallback::new(size_func, user_data, destroy_notify);
}
fn write(&self, buf: &[u8]) {
......@@ -1538,8 +1439,7 @@ pub fn rsvg_g_critical(msg: &str) {
}
#[cfg(not(feature = "c-library"))]
pub fn rsvg_g_critical(_msg: &str) {
}
pub fn rsvg_g_critical(_msg: &str) {}
#[cfg(test)]
mod tests {
......
#![allow(clippy::clone_on_ref_ptr)]
#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![allow(clippy::too_many_arguments)]
#![warn(unused)]
pub use crate::c_api::{
rsvg_rust_error_get_type,
rsvg_rust_handle_close,
rsvg_rust_handle_flags_get_type,
rsvg_rust_handle_get_base_url,
rsvg_rust_handle_get_dimensions,
rsvg_rust_handle_get_dimensions_sub,
rsvg_rust_handle_get_dpi_x,
rsvg_rust_handle_get_dpi_y,
rsvg_rust_handle_get_flags,
rsvg_rust_handle_get_geometry_for_element,
rsvg_rust_handle_get_geometry_for_layer,
rsvg_rust_handle_get_intrinsic_dimensions,
rsvg_rust_handle_get_pixbuf_sub,
rsvg_rust_handle_get_position_sub,
rsvg_rust_handle_has_sub,
rsvg_rust_handle_new_from_data,
rsvg_rust_handle_new_from_file,
rsvg_rust_handle_new_from_gfile_sync,
rsvg_rust_handle_new_from_stream_sync,
rsvg_rust_handle_new_with_flags,
rsvg_rust_handle_read_stream_sync,
rsvg_rust_handle_render_cairo_sub,
rsvg_rust_handle_render_element,
rsvg_rust_handle_render_document,
rsvg_rust_handle_render_layer,
rsvg_rust_handle_set_base_gfile,
rsvg_rust_handle_set_base_url,
rsvg_rust_handle_set_dpi_x,
rsvg_rust_handle_set_dpi_y,
rsvg_rust_handle_set_flags,
rsvg_rust_handle_set_size_callback,
rsvg_rust_handle_set_testing,
rsvg_rust_handle_write,
};
mod c_api;
......@@ -18,7 +18,6 @@ edition = "2018"
# from there into cargo-fetcher/Cargo.toml.
[dependencies]
bitflags = "1.0"
cairo-rs = { version="0.7.0", features=["v1_16"] }
cairo-sys-rs = "0.9.0"
cssparser = "0.25.5"
......@@ -30,9 +29,8 @@ gdk-pixbuf = "0.7.0"
gdk-pixbuf-sys = "0.9.0"
gio = { version="0.7.0", features=["v2_48"] } # per configure.ac
gio-sys = "0.9.0"
glib = { version="0.8.0", features=["subclassing"] }
glib = { version="0.8.0" }
glib-sys = "0.9.0"
gobject-sys = "0.9.0"
itertools = "0.8"
language-tags = "0.2.2"
lazy_static = "1.0.0"
......@@ -56,7 +54,6 @@ criterion = "0.2"
[lib]
name = "rsvg_internals"
crate-type = ["staticlib", "lib"]
[[bench]]
name = "box_blur"
......@@ -77,7 +74,3 @@ harness = false
[[bench]]
name = "srgb"
harness = false
[features]
# Enables calling g_warning() when built as part of librsvg.so
c-library = []
......@@ -3,21 +3,8 @@ use std::fs::File;
use std::io::{BufWriter, Write};
use std::path::Path;
#[cfg(all(unix, feature = "c-library"))]
use std::os::unix::fs::symlink;
#[cfg(all(windows, not(target_env = "msvc"), feature="c-library"))]
use std::os::windows::fs::symlink_file as symlink;
#[cfg(all(not(target_env = "msvc"), feature="c-library"))]
use std::fs;
#[cfg(all(not(target_env = "msvc"), feature="c-library"))]
use std::path::PathBuf;
fn main() {
generate_srgb_tables();
generate_convenience_lib().unwrap();
}
/// Converts an sRGB color value to a linear sRGB color value (undoes the gamma correction).
......@@ -76,55 +63,3 @@ fn generate_srgb_tables() {
print_table(&mut file, "LINEARIZE", &linearize_table);
print_table(&mut file, "UNLINEARIZE", &unlinearize_table);
}
/// Generate libtool archive file librsvg_internals.la
/// From: https://docs.rs/libtool/0.1.1/libtool/
#[cfg(all(feature = "c-library", not(target_env = "msvc")))]
pub fn generate_convenience_lib() -> std::io::Result<()> {
let target = env::var("TARGET").expect("TARGET was not set");
let build_dir = env::var("LIBRSVG_BUILD_DIR").expect("LIBRSVG_BUILD_DIR was not set");
let target_dir = env::var("LIBRSVG_TARGET_DIR").expect("LIBRSVG_TARGET_DIR was not set");
let libs_dir = format!("{}/.libs", build_dir);
let libs_path = PathBuf::from(&libs_dir);
let la_path = PathBuf::from(format!("{}/librsvg_internals.la", build_dir));
let rust_lib = if target.contains("windows") {
/* https://github.com/rust-lang/rust/issues/43749 */
"rsvg_internals.lib"
} else {
"librsvg_internals.a"
};
let old_lib_path = PathBuf::from(format!("{}/{}", target_dir, rust_lib));
let new_lib_path = PathBuf::from(format!("{}/librsvg_internals.a", libs_dir));
match fs::create_dir_all(&libs_path) {
Ok(()) => println!("libs_path created"),
_ => panic!("Failed to create libs_path"),
}
if la_path.exists() {
fs::remove_file(&la_path)?;
}
/* PathBuf.exists() traverses symlinks so just try and remove it */
match fs::remove_file(&new_lib_path) {
Ok(_v) => {},
Err(e) => println!("Error removing symlink: {:?}", e),
}
let mut file = File::create(&la_path).unwrap();
writeln!(file, "# librsvg_internals.la - a libtool library file")?;
writeln!(file, "# Generated by libtool-rust")?;
writeln!(file, "dlname=''")?;
writeln!(file, "library_names=''")?;
writeln!(file, "old_library='librsvg_internals.a'")?;
writeln!(file, "inherited_linker_flags=''")?;
writeln!(file, "installed=no")?;
writeln!(file, "shouldnotlink=no")?;
symlink(&old_lib_path, &new_lib_path)?;
Ok(())
}
#[cfg(not(all(feature = "c-library", not(target_env = "msvc"))))]
pub fn generate_convenience_lib() -> std::io::Result<()> {
Ok(())
}
use std::cell::Cell;
use std::ptr;
use std::rc::Rc;
use cairo::{self, ImageSurface, Status};
......@@ -9,7 +11,6 @@ use locale_config::{LanguageRange, Locale};
use crate::allowed_url::{AllowedUrl, Href};
use crate::bbox::BoundingBox;
use crate::c_api::{RsvgDimensionData, RsvgPositionData, SizeCallback};
use crate::dpi::Dpi;
use crate::drawing_ctx::{DrawingCtx, RsvgRectangle};
use crate::error::{DefsLookupErrorKind, LoadingError, RenderingError};
......@@ -68,6 +69,115 @@ impl LoadOptions {
}
}
// Keep in sync with rsvg.h:RsvgDimensionData
#[repr(C)]
pub struct RsvgDimensionData {
pub width: libc::c_int,
pub height: libc::c_int,
pub em: f64,
pub ex: f64,
}
impl RsvgDimensionData {
// This is not #[derive(Default)] to make it clear that it
// shouldn't be the default value for anything; it is actually a
// special case we use to indicate an error to the public API.
pub fn empty() -> RsvgDimensionData {
RsvgDimensionData {
width: 0,
height: 0,
em: 0.0,
ex: 0.0,
}
}
}
// 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(
inout_width: *mut libc::c_int,
inout_height: *mut libc::c_int,
user_data: glib_sys::gpointer,
),
>;
pub struct SizeCallback {
pub size_func: RsvgSizeFunc,
pub user_data: glib_sys::gpointer,
pub destroy_notify: glib_sys::GDestroyNotify,
pub in_loop: Cell<bool>,
}
impl SizeCallback {
pub fn new(
size_func: RsvgSizeFunc,
user_data: glib_sys::gpointer,
destroy_notify: glib_sys::GDestroyNotify,
) -> Self {
SizeCallback {
size_func,
user_data,
destroy_notify,
in_loop: Cell::new(false),
}
}
pub fn call(&self, width: libc::c_int, height: libc::c_int) -> (libc::c_int, libc::c_int) {
unsafe {
let mut w = width;
let mut h = height;
if let Some(ref f) = self.size_func {
f(&mut w, &mut h, self.user_data);
};
(w, h)
}
}
pub fn start_loop(&self) {
assert!(!self.in_loop.get());
self.in_loop.set(true);
}
pub fn end_loop(&self) {
assert!(self.in_loop.get());
self.in_loop.set(false);
}
pub fn get_in_loop(&self) -> bool {
self.in_loop.get()
}
}
impl Default for SizeCallback {
fn default() -> SizeCallback {
SizeCallback {
size_func: None,
user_data: ptr::null_mut(),
destroy_notify: None,
in_loop: Cell::new(false),
}
}
}
impl Drop for SizeCallback {
fn drop(&mut self) {
unsafe {
if let Some(ref f) = self.destroy_notify {
f(self.user_data);
};
}
}
}
pub struct Handle {
svg: Rc<Svg>,
}
......
......@@ -5,42 +5,6 @@
use ::xml as xml_rs;
pub use crate::c_api::{
rsvg_rust_error_get_type,
rsvg_rust_handle_close,
rsvg_rust_handle_flags_get_type,
rsvg_rust_handle_get_base_url,
rsvg_rust_handle_get_dimensions,
rsvg_rust_handle_get_dimensions_sub,
rsvg_rust_handle_get_dpi_x,
rsvg_rust_handle_get_dpi_y,
rsvg_rust_handle_get_flags,
rsvg_rust_handle_get_geometry_for_element,
rsvg_rust_handle_get_geometry_for_layer,
rsvg_rust_handle_get_intrinsic_dimensions,
rsvg_rust_handle_get_pixbuf_sub,
rsvg_rust_handle_get_position_sub,
rsvg_rust_handle_has_sub,
rsvg_rust_handle_new_from_data,
rsvg_rust_handle_new_from_file,
rsvg_rust_handle_new_from_gfile_sync,
rsvg_rust_handle_new_from_stream_sync,
rsvg_rust_handle_new_with_flags,
rsvg_rust_handle_read_stream_sync,
rsvg_rust_handle_render_cairo_sub,
rsvg_rust_handle_render_element,
rsvg_rust_handle_render_document,
rsvg_rust_handle_render_layer,
rsvg_rust_handle_set_base_gfile,
rsvg_rust_handle_set_base_url,
rsvg_rust_handle_set_dpi_x,
rsvg_rust_handle_set_dpi_y,
rsvg_rust_handle_set_flags,
rsvg_rust_handle_set_size_callback,
rsvg_rust_handle_set_testing,
rsvg_rust_handle_write,
};
pub use crate::color::{rsvg_css_parse_color, ColorKind, ColorSpec};
pub use crate::dpi::{rsvg_rust_set_default_dpi_x_y, Dpi};
......@@ -48,28 +12,27 @@ pub use crate::dpi::{rsvg_rust_set_default_dpi_x_y, Dpi};
pub use crate::drawing_ctx::RsvgRectangle;
pub use crate::error::{
rsvg_rust_error_quark,
DefsLookupErrorKind,
HrefError,
LoadingError,
RenderingError,
rsvg_rust_error_quark, set_gerror, DefsLookupErrorKind, HrefError, LoadingError,
RenderingError, RSVG_ERROR_FAILED,
};
pub use crate::handle::{Handle, LoadOptions};
pub use crate::handle::{
Handle, LoadOptions, RsvgDimensionData, RsvgPositionData, RsvgSizeFunc, SizeCallback,
};
pub use crate::length::{Length, LengthUnit};
pub use crate::length::{Length, LengthUnit, RsvgLength};
pub use crate::pixbuf_utils::{
rsvg_rust_pixbuf_from_file_at_max_size,
rsvg_rust_pixbuf_from_file_at_size,
rsvg_rust_pixbuf_from_file_at_zoom,
rsvg_rust_pixbuf_from_file_at_zoom_with_max,
rsvg_rust_pixbuf_from_file_at_max_size, rsvg_rust_pixbuf_from_file_at_size,
rsvg_rust_pixbuf_from_file_at_zoom, rsvg_rust_pixbuf_from_file_at_zoom_with_max,
};
pub use crate::rect::IRect;
pub use crate::structure::IntrinsicDimensions;
#[macro_use]
mod log;
pub mod log;
#[macro_use]
mod coord_units;
......@@ -84,7 +47,6 @@ mod allowed_url;
mod angle;
mod aspect_ratio;
mod bbox;
mod c_api;
mod clip_path;
mod color;