Struct librsvg_c::handle::imp::CHandle

source ·
pub struct CHandle {
    pub(super) inner: RefCell<CHandleInner>,
    base_uri: PhantomData<Option<String>>,
    width: PhantomData<i32>,
    height: PhantomData<i32>,
    em: PhantomData<f64>,
    ex: PhantomData<f64>,
    title: PhantomData<Option<String>>,
    desc: PhantomData<Option<String>>,
    metadata: PhantomData<Option<String>>,
    pub(super) load_state: RefCell<LoadState>,
    pub(super) session: Session,
}
Expand description

Contains all the interior mutability for a RsvgHandle to be called from the C API.

Fields§

§inner: RefCell<CHandleInner>§base_uri: PhantomData<Option<String>>§width: PhantomData<i32>§height: PhantomData<i32>§em: PhantomData<f64>§ex: PhantomData<f64>§title: PhantomData<Option<String>>§desc: PhantomData<Option<String>>§metadata: PhantomData<Option<String>>§load_state: RefCell<LoadState>§session: Session

Implementations§

source§

impl CHandle

source

fn register_type()

Registers the type only once.

source§

impl CHandle

source

pub fn downgrade(&self) -> <Self as Downgrade>::Weak

source§

impl CHandle

source

fn get_base_url(&self) -> Option<String>

source

fn set_dpi_x(&self, dpi_x: f64)

source

fn set_dpi_y(&self, dpi_y: f64)

source

fn get_dpi_x(&self) -> f64

source

fn get_dpi_y(&self) -> f64

source

fn set_base_url(&self, url: Option<&str>)

Trait Implementations§

source§

impl Default for CHandle

source§

fn default() -> CHandle

Returns the “default value” for a type. Read more
source§

impl DerivedObjectProperties for CHandle

source§

fn derived_properties() -> &'static [ParamSpec]

Properties installed for this type.
source§

fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value

Similar to ObjectImpl but auto-generated by the [Properties] macro to allow handling more complex use-cases.
source§

fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)

Similar to ObjectImpl but auto-generated by the [Properties] macro to allow handling more complex use-cases.
source§

impl ObjectImpl for CHandle

source§

fn properties() -> &'static [ParamSpec]

Properties installed for this type.
source§

fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)

Property setter. Read more
source§

fn property(&self, id: usize, pspec: &ParamSpec) -> Value

Property getter. Read more
§

fn signals() -> &'static [Signal]

Signals installed for this type.
§

fn constructed(&self)

Constructed. Read more
§

fn dispose(&self)

Disposes of the object. Read more
§

fn notify(&self, pspec: &ParamSpec)

Function to be called when property change is notified for with self.notify("property").
§

fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])

source§

impl ObjectSubclass for CHandle

§

type ParentType = Object

Parent Rust type to inherit from.
§

type Interfaces = ()

List of interfaces implemented by this type.
source§

fn new() -> Self

Constructor. Read more
source§

const NAME: &'static str = "RsvgHandle"

GObject type name. Read more
§

type Type = CHandle

Wrapper around this subclass defined with wrapper!
§

type Instance = RsvgHandle

The C instance struct. Read more
§

type Class = RsvgHandleClass

The C class struct. Read more
§

const ABSTRACT: bool = false

If this subclass is an abstract class or not. Read more
§

fn type_init(_type_: &mut InitializingType<Self>)

Additional type initialization. Read more
§

fn class_init(_klass: &mut Self::Class)

Class initialization. Read more
§

fn with_class(_klass: &Self::Class) -> Self

Constructor. Read more
§

fn instance_init(_obj: &InitializingObject<Self>)

Performs additional instance initialization. Read more
source§

impl ObjectSubclassType for CHandle

source§

fn type_data() -> NonNull<TypeData>

Storage for the type-specific data used during registration.
source§

fn type_() -> Type

Returns the glib::Type ID of the subclass. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for CHandle

§

impl !Send for CHandle

§

impl !Sync for CHandle

§

impl Unpin for CHandle

§

impl !UnwindSafe for CHandle

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> ObjectImplExt for T
where T: ObjectImpl,

§

fn parent_constructed(&self)

Chain up to the parent class’ implementation of glib::Object::constructed().
§

fn parent_notify(&self, pspec: &ParamSpec)

Chain up to the parent class’ implementation of glib::Object::notify().
§

fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])

Chain up to the parent class’ implementation of glib::Object::dispatch_properties_changed().
§

fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value] ) -> Option<Value>

Chain up to parent class signal handler.
§

impl<T> ObjectSubclassExt for T
where T: ObjectSubclass,

§

fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>

👎Deprecated: Use obj() instead
Returns the corresponding object instance.
§

fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T

👎Deprecated: Use from_obj() instead
Returns the implementation from an instance.
§

fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>

Returns the corresponding object instance. Read more
§

fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T

Returns the implementation from an instance. Read more
§

fn ref_counted(&self) -> ObjectImplRef<T>

Returns a new reference-counted wrapper around self.
§

fn instance_data<U>(&self, type_: Type) -> Option<&U>
where U: Any + Send + Sync + 'static,

Returns a pointer to the instance implementation specific data. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.