pub trait ObjectExt: ObjectType {
Show 23 methods
fn is<T: StaticType>(&self) -> bool;
fn get_type(&self) -> Type;
fn get_object_class(&self) -> &ObjectClass;
fn set_property<'a, N: Into<&'a str>>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError>;
fn get_property<'a, N: Into<&'a str>>(
&self,
property_name: N
) -> Result<Value, BoolError>;
fn has_property<'a, N: Into<&'a str>>(
&self,
property_name: N,
type_: Option<Type>
) -> Result<(), BoolError>;
fn get_property_type<'a, N: Into<&'a str>>(
&self,
property_name: N
) -> Option<Type>;
fn find_property<'a, N: Into<&'a str>>(
&self,
property_name: N
) -> Option<ParamSpec>;
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: Into<&'a str>>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>;
fn disconnect(&self, handler_id: SignalHandlerId);
fn connect_notify<F: Fn(&Self, &ParamSpec) + Send + Sync + 'static>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId;
unsafe fn connect_notify_unsafe<F: Fn(&Self, &ParamSpec)>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId;
fn notify<'a, N: Into<&'a str>>(&self, property_name: N);
fn notify_by_pspec(&self, pspec: &ParamSpec);
fn downgrade(&self) -> WeakRef<Self>;
fn bind_property<'a, O: ObjectType, N: Into<&'a str>, M: Into<&'a str>>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a>;
fn ref_count(&self) -> u32;
}Required Methods
sourcefn is<T: StaticType>(&self) -> bool
fn is<T: StaticType>(&self) -> bool
Returns true if the object is an instance of (can be cast to) T.
source
fn get_object_class(&self) -> &ObjectClass
sourcefn set_property<'a, N: Into<&'a str>>(
fn set_property<'a, N: Into<&'a str>>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError>
sourcefn has_property<'a, N: Into<&'a str>>(
fn has_property<'a, N: Into<&'a str>>(
&self,
property_name: N,
type_: Option<Type>
) -> Result<(), BoolError>
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)
sourcefn connect<'a, N, F>(
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,
sourceunsafe fn connect_unsafe<'a, N, F>(
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>,
sourcefn emit<'a, N: Into<&'a str>>(
fn emit<'a, N: Into<&'a str>>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError>
source
fn disconnect(&self, handler_id: SignalHandlerId)
sourcefn connect_notify<F: Fn(&Self, &ParamSpec) + Send + Sync + 'static>(
fn connect_notify<F: Fn(&Self, &ParamSpec) + Send + Sync + 'static>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId
sourceunsafe fn connect_notify_unsafe<F: Fn(&Self, &ParamSpec)>(
unsafe fn connect_notify_unsafe<F: Fn(&Self, &ParamSpec)>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId
source
fn notify_by_pspec(&self, pspec: &ParamSpec)
sourcefn bind_property<'a, O: ObjectType, N: Into<&'a str>, M: Into<&'a str>>(