Module librsvg_c::handle

source ·
Expand description

Main API for RsvgHandle.

The C API of librsvg revolves around an RsvgHandle GObject class, which is implemented as follows:

  • RsvgHandle and RsvgHandleClass are derivatives of GObject and GObjectClass. 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 in CHandle.

  • Public C ABI functions are the #[no_mangle] functions with an rsvg_ 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§

Structs§

Enums§

Statics§

Traits§

Functions§

Type Aliases§