Trait ObjectExt

Source
pub trait ObjectExt: ObjectType {
Show 23 methods // Required methods fn is<T>(&self) -> bool where T: StaticType; fn get_type(&self) -> Type; fn get_object_class(&self) -> &ObjectClass; fn set_property<'a, N>( &self, property_name: N, value: &dyn ToValue, ) -> Result<(), BoolError> where N: Into<&'a str>; fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where N: Into<&'a str>; fn has_property<'a, N>( &self, property_name: N, type_: Option<Type>, ) -> Result<(), BoolError> where N: Into<&'a str>; fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type> where N: Into<&'a str>; fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where N: Into<&'a str>; fn list_properties(&self) -> Vec<ParamSpec>; fn block_signal(&self, handler_id: &SignalHandlerId); fn unblock_signal(&self, handler_id: &SignalHandlerId); fn stop_signal_emission(&self, signal_name: &str); fn connect<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError> where N: Into<&'a str>, F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static; unsafe fn connect_unsafe<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError> where N: Into<&'a str>, F: Fn(&[Value]) -> Option<Value>; fn emit<'a, N>( &self, signal_name: N, args: &[&dyn ToValue], ) -> Result<Option<Value>, BoolError> where N: Into<&'a str>; fn disconnect(&self, handler_id: SignalHandlerId); fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where F: Fn(&Self, &ParamSpec) + Send + Sync + 'static; unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId where F: Fn(&Self, &ParamSpec); fn notify<'a, N>(&self, property_name: N) where N: Into<&'a str>; fn notify_by_pspec(&self, pspec: &ParamSpec); fn downgrade(&self) -> WeakRef<Self>; fn bind_property<'a, O, N, M>( &'a self, source_property: N, target: &'a O, target_property: M, ) -> BindingBuilder<'a> where O: ObjectType, N: Into<&'a str>, M: Into<&'a str>; fn ref_count(&self) -> u32;
}

Required Methods§

Source

fn is<T>(&self) -> bool
where T: StaticType,

Returns true if the object is an instance of (can be cast to) T.

Source

fn get_type(&self) -> Type

Source

fn get_object_class(&self) -> &ObjectClass

Source

fn set_property<'a, N>( &self, property_name: N, value: &dyn ToValue, ) -> Result<(), BoolError>
where N: Into<&'a str>,

Source

fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError>
where N: Into<&'a str>,

Source

fn has_property<'a, N>( &self, property_name: N, type_: Option<Type>, ) -> Result<(), BoolError>
where N: Into<&'a str>,

Source

fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type>
where N: Into<&'a str>,

Source

fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec>
where N: Into<&'a str>,

Source

fn list_properties(&self) -> Vec<ParamSpec>

Source

fn block_signal(&self, handler_id: &SignalHandlerId)

Source

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Source

fn stop_signal_emission(&self, signal_name: &str)

Source

fn connect<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
where N: Into<&'a str>, F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Source

unsafe fn connect_unsafe<'a, N, F>( &self, signal_name: N, after: bool, callback: F, ) -> Result<SignalHandlerId, BoolError>
where N: Into<&'a str>, F: Fn(&[Value]) -> Option<Value>,

Source

fn emit<'a, N>( &self, signal_name: N, args: &[&dyn ToValue], ) -> Result<Option<Value>, BoolError>
where N: Into<&'a str>,

Source

fn disconnect(&self, handler_id: SignalHandlerId)

Source

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&Self, &ParamSpec) + Send + Sync + 'static,

Source

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&Self, &ParamSpec),

Source

fn notify<'a, N>(&self, property_name: N)
where N: Into<&'a str>,

Source

fn notify_by_pspec(&self, pspec: &ParamSpec)

Source

fn downgrade(&self) -> WeakRef<Self>

Source

fn bind_property<'a, O, N, M>( &'a self, source_property: N, target: &'a O, target_property: M, ) -> BindingBuilder<'a>
where O: ObjectType, N: Into<&'a str>, M: Into<&'a str>,

Source

fn ref_count(&self) -> u32

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ObjectExt for T
where T: ObjectType,