Expand description
Main API for RsvgHandle
.
The C API of librsvg revolves around an RsvgHandle
GObject class, which is
implemented as follows:
-
RsvgHandle
andRsvgHandleClass
are derivatives ofGObject
andGObjectClass
. These are coded explicitly, instead of using [glib::subclass::prelude::InstanceStruct<T>
] and [glib::subclass::prelude::ClassStruct<T>
], as the structs need need to be kept ABI-compatible with the traditional C API/ABI. -
The actual data for a handle (e.g. the
RsvgHandle
’s private data, in GObject parlance) is inCHandle
. -
Public C ABI functions are the
#[no_mangle]
functions with anrsvg_
prefix.
The C API is implemented in terms of the Rust API in librsvg_crate
. In effect,
RsvgHandle
is a rather convoluted builder or adapter pattern that translates all the
historical idiosyncrasies of the C API into the simple Rust API.
Modules§
- imp 🔒
Structs§
- BaseUrl 🔒Holds the base URL for loading a handle, and the C-accessible version of it
- Used as a generic error to translate to glib::Error
- GObject instance struct for RsvgHandle.
- GObject class struct for RsvgHandle.
Enums§
- Error 🔒
- State machine for
RsvgHandle
. - Detects whether a
*const libc::c_char
is a path or a URI
Statics§
Traits§
Functions§
- is_gfile 🔒
- set_out_param 🔒 ⚠
Type Aliases§
- Type alias used to pass flags in the C API functions.