pub trait ObjectExt: ObjectType {
Show 23 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, Global>;
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: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync;
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: 'static + Fn(&Self, &ParamSpec) + Send + Sync;
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
sourcefn is<T>(&self) -> boolwhere
T: StaticType,
fn is<T>(&self) -> boolwhere
T: StaticType,
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>(
fn set_property<'a, N>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError>where
N: Into<&'a str>,
sourcefn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError>where
fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError>where
N: Into<&'a str>,
sourcefn has_property<'a, N>(
fn has_property<'a, N>(
&self,
property_name: N,
type_: Option<Type>
) -> Result<(), BoolError>where
N: Into<&'a str>,
source
fn list_properties(&self) -> Vec<ParamSpec, Global>
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: 'static + Fn(&[Value]) -> Option<Value> + Send + Sync,
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>(
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)
sourcefn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: 'static + Fn(&Self, &ParamSpec) + Send + Sync,
sourceunsafe fn connect_notify_unsafe<F>(
unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerIdwhere
F: Fn(&Self, &ParamSpec),
source
fn notify_by_pspec(&self, pspec: &ParamSpec)
sourcefn bind_property<'a, O, N, M>(