pub struct Snapshot { /* private fields */ }
Expand description
Snapshot
assists in creating gsk::RenderNode
s for widgets.
It functions in a similar way to a cairo context, and maintains a stack of render nodes and their associated transformations.
The node at the top of the stack is the one that gtk_snapshot_append_…()
functions operate on. Use the gtk_snapshot_push_…()
functions and
SnapshotExt::pop()
to change the current node.
The typical way to obtain a Snapshot
object is as an argument to
the WidgetImpl::snapshot()
vfunc. If you need to create your own
Snapshot
, use new()
.
§Implements
SnapshotExt
, [trait@gdk::prelude::SnapshotExt
], [trait@glib::ObjectExt
], SnapshotExtManual
GLib type: GObject with reference counted clone semantics.
Implementations§
Trait Implementations§
Source§impl HasParamSpec for Snapshot
impl HasParamSpec for Snapshot
Source§impl Ord for Snapshot
impl Ord for Snapshot
Source§fn cmp(&self, other: &Self) -> Ordering
fn cmp(&self, other: &Self) -> Ordering
Comparison for two GObjects.
Compares the memory addresses of the provided objects.
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<OT: ObjectType> PartialEq<OT> for Snapshot
impl<OT: ObjectType> PartialEq<OT> for Snapshot
Source§impl<OT: ObjectType> PartialOrd<OT> for Snapshot
impl<OT: ObjectType> PartialOrd<OT> for Snapshot
Source§impl StaticType for Snapshot
impl StaticType for Snapshot
Source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Eq for Snapshot
impl IsA<Snapshot> for Snapshot
impl IsA<Snapshot> for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl !Send for Snapshot
impl !Sync for Snapshot
impl Unpin for Snapshot
impl UnwindSafe for Snapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
Source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a superclass or interface
T
. Read moreSource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
Upcasts an object to a reference of its superclass or interface
T
. Read moreSource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
Tries to downcast to a subclass or interface implementor
T
. Read moreSource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
Tries to downcast to a reference of its subclass or interface implementor
T
. Read moreSource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
Tries to cast to an object of type
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast
will do many checks at compile-time already. downcast
will
perform the same checks at runtime as dynamic_cast
, but will also ensure some amount of
compile-time safety. Read moreSource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Tries to cast to reference to an object of type
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moreSource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
Casts to
T
unconditionally. Read moreSource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
Casts to
&T
unconditionally. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
Source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
Source§impl<O> GObjectPropertyExpressionExt for O
impl<O> GObjectPropertyExpressionExt for O
Source§fn property_expression(&self, property_name: &str) -> PropertyExpression
fn property_expression(&self, property_name: &str) -> PropertyExpression
Create an expression looking up an object’s property.
Source§fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
Create an expression looking up an object’s property with a weak
reference.
Source§fn this_expression(property_name: &str) -> PropertyExpression
fn this_expression(property_name: &str) -> PropertyExpression
Create an expression looking up a property in the bound
this
object.Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
Source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
Source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
Returns
true
if the object is an instance of (can be cast to) T
.Source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
Returns the
ObjectClass
of the object. Read moreSource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
Returns the class of the object in the given type
T
. Read moreSource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
Returns the interface
T
of the object. Read moreSource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
Source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
Sets multiple properties of the object at once. Read more
Source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
Sets multiple properties of the object at once. Read more
Source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
Gets the property
property_name
of the object and cast it to the type V. Read moreSource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
Gets the property
property_name
of the object. Read moreSource§fn has_property(&self, property_name: &str) -> bool
fn has_property(&self, property_name: &str) -> bool
Check if the object has a property
property_name
.Source§fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool
Check if the object has a property
property_name
of the given type_
.Source§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
Get the type of the property
property_name
of this object. Read moreSource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
Get the
ParamSpec
of the property property_name
of this object.Source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
Return all
ParamSpec
of the properties of this object.Source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
Freeze all property notifications until the return guard object is dropped. Read more
Source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
Set arbitrary data on this object with the given
key
. Read moreSource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
Return previously set arbitrary data of this object with the given
key
. Read moreSource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
Retrieve previously set arbitrary data of this object with the given
key
. Read moreSource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
Set arbitrary data on this object with the given
key
. Read moreSource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
Return previously set arbitrary data of this object with the given
key
. Read moreSource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
Retrieve previously set arbitrary data of this object with the given
key
. Read moreSource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
Block a given signal handler. Read more
Source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
Unblock a given signal handler.
Source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
Stop emission of the currently emitted signal.
Source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
Stop emission of the currently emitted signal by the (possibly detailed) signal name.
Source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
Connect to the signal
signal_name
on this object. Read moreSource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
Connect to the signal
signal_id
on this object. Read moreSource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
Connect to the signal
signal_name
on this object. Read moreSource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
Connect to the signal
signal_id
on this object. Read moreSource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
Connect to the signal
signal_name
on this object. Read moreSource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F,
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
Connect to the signal
signal_id
on this object. Read moreSource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId
Connect a closure to the signal
signal_name
on this object. Read moreSource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure,
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId
Connect a closure to the signal
signal_id
on this object. Read moreSource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
Limits the lifetime of
closure
to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values
, or
invoke
when using Rust closures.Source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Emit signal by signal id. Read more
Source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Same as
Self::emit
but takes Value
for the arguments.Source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
Emit signal by its name. Read more
Source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>
Emit signal by its name. Read more
Source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Emit signal by its name with details. Read more
Source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>
Emit signal by its name with details. Read more
Source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue],
) -> Rwhere
R: TryFromClosureReturnValue,
Emit signal by signal id with details. Read more
Source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value],
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>
Emit signal by signal id with details. Read more
Source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
Disconnect a previously connected signal handler.
Source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
Connect to the
notify
signal of the object. Read moreSource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
Connect to the
notify
signal of the object. Read moreSource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F,
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
Connect to the
notify
signal of the object. Read moreSource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
Notify that the given property has changed its value. Read more
Source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
Notify that the given property has changed its value. Read more
Source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
Add a callback to be notified when the Object is disposed.
Source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
Add a callback to be notified when the Object is disposed. Read more
Source§fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'a, 'f, 't, O>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str,
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
Source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
Runs the dispose mechanism of the object. Read more
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<O> SnapshotExt for O
impl<O> SnapshotExt for O
Source§fn append_cairo(&self, bounds: &Rect) -> Context
fn append_cairo(&self, bounds: &Rect) -> Context
Creates a new
gsk::CairoNode
and appends it to the current
render node of @self, without changing the current node. Read moreSource§fn append_color(&self, color: &RGBA, bounds: &Rect)
fn append_color(&self, color: &RGBA, bounds: &Rect)
Creates a new render node drawing the @color into the
given @bounds and appends it to the current render node
of @self. Read more
Source§fn append_conic_gradient(
&self,
bounds: &Rect,
center: &Point,
rotation: f32,
stops: &[ColorStop],
)
fn append_conic_gradient( &self, bounds: &Rect, center: &Point, rotation: f32, stops: &[ColorStop], )
Appends a conic gradient node with the given stops to @self. Read more
Source§fn append_fill(&self, path: &Path, fill_rule: FillRule, color: &RGBA)
fn append_fill(&self, path: &Path, fill_rule: FillRule, color: &RGBA)
Available on crate feature
v4_14
only.A convenience method to fill a path with a color. Read more
Source§fn append_inset_shadow(
&self,
outline: &RoundedRect,
color: &RGBA,
dx: f32,
dy: f32,
spread: f32,
blur_radius: f32,
)
fn append_inset_shadow( &self, outline: &RoundedRect, color: &RGBA, dx: f32, dy: f32, spread: f32, blur_radius: f32, )
Appends an inset shadow into the box given by @outline. Read more
Source§fn append_layout(&self, layout: &Layout, color: &RGBA)
fn append_layout(&self, layout: &Layout, color: &RGBA)
Creates render nodes for rendering @layout in the given foregound @color
and appends them to the current node of @self without changing the
current node. The current theme’s foreground color for a widget can be
obtained with
WidgetExt::color()
. Read moreSource§fn append_linear_gradient(
&self,
bounds: &Rect,
start_point: &Point,
end_point: &Point,
stops: &[ColorStop],
)
fn append_linear_gradient( &self, bounds: &Rect, start_point: &Point, end_point: &Point, stops: &[ColorStop], )
Appends a linear gradient node with the given stops to @self. Read more
Source§fn append_node(&self, node: impl AsRef<RenderNode>)
fn append_node(&self, node: impl AsRef<RenderNode>)
Appends @node to the current render node of @self,
without changing the current node. Read more
Source§fn append_outset_shadow(
&self,
outline: &RoundedRect,
color: &RGBA,
dx: f32,
dy: f32,
spread: f32,
blur_radius: f32,
)
fn append_outset_shadow( &self, outline: &RoundedRect, color: &RGBA, dx: f32, dy: f32, spread: f32, blur_radius: f32, )
Appends an outset shadow node around the box given by @outline. Read more
Source§fn append_radial_gradient(
&self,
bounds: &Rect,
center: &Point,
hradius: f32,
vradius: f32,
start: f32,
end: f32,
stops: &[ColorStop],
)
fn append_radial_gradient( &self, bounds: &Rect, center: &Point, hradius: f32, vradius: f32, start: f32, end: f32, stops: &[ColorStop], )
Appends a radial gradient node with the given stops to @self. Read more
Source§fn append_repeating_linear_gradient(
&self,
bounds: &Rect,
start_point: &Point,
end_point: &Point,
stops: &[ColorStop],
)
fn append_repeating_linear_gradient( &self, bounds: &Rect, start_point: &Point, end_point: &Point, stops: &[ColorStop], )
Appends a repeating linear gradient node with the given stops to @self. Read more
Source§fn append_repeating_radial_gradient(
&self,
bounds: &Rect,
center: &Point,
hradius: f32,
vradius: f32,
start: f32,
end: f32,
stops: &[ColorStop],
)
fn append_repeating_radial_gradient( &self, bounds: &Rect, center: &Point, hradius: f32, vradius: f32, start: f32, end: f32, stops: &[ColorStop], )
Appends a repeating radial gradient node with the given stops to @self. Read more
Source§fn append_scaled_texture(
&self,
texture: &impl IsA<Texture>,
filter: ScalingFilter,
bounds: &Rect,
)
fn append_scaled_texture( &self, texture: &impl IsA<Texture>, filter: ScalingFilter, bounds: &Rect, )
Available on crate feature
v4_10
only.Creates a new render node drawing the @texture
into the given @bounds and appends it to the
current render node of @self. Read more
Source§fn append_stroke(&self, path: &Path, stroke: &Stroke, color: &RGBA)
fn append_stroke(&self, path: &Path, stroke: &Stroke, color: &RGBA)
Available on crate feature
v4_14
only.A convenience method to stroke a path with a color. Read more
Source§fn append_texture(&self, texture: &impl IsA<Texture>, bounds: &Rect)
fn append_texture(&self, texture: &impl IsA<Texture>, bounds: &Rect)
Creates a new render node drawing the @texture
into the given @bounds and appends it to the
current render node of @self. Read more
Source§fn gl_shader_pop_texture(&self)
fn gl_shader_pop_texture(&self)
👎Deprecated: Since 4.16
Removes the top element from the stack of render nodes and
adds it to the nearest
gsk::GLShaderNode
below it. Read moreSource§fn perspective(&self, depth: f32)
fn perspective(&self, depth: f32)
Applies a perspective projection transform. Read more
Source§fn pop(&self)
fn pop(&self)
Removes the top element from the stack of render nodes,
and appends it to the node underneath it.
Source§fn push_blend(&self, blend_mode: BlendMode)
fn push_blend(&self, blend_mode: BlendMode)
Blends together two images with the given blend mode. Read more
Source§fn push_color_matrix(&self, color_matrix: &Matrix, color_offset: &Vec4)
fn push_color_matrix(&self, color_matrix: &Matrix, color_offset: &Vec4)
Modifies the colors of an image by applying an affine transformation
in RGB space. Read more
Source§fn push_cross_fade(&self, progress: f64)
fn push_cross_fade(&self, progress: f64)
Snapshots a cross-fade operation between two images with the
given @progress. Read more
Source§fn push_fill(&self, path: &Path, fill_rule: FillRule)
fn push_fill(&self, path: &Path, fill_rule: FillRule)
Available on crate feature
v4_14
only.Fills the area given by @path and @fill_rule with an image and discards everything
outside of it. Read more
Source§fn push_gl_shader(&self, shader: &GLShader, bounds: &Rect, take_args: Bytes)
fn push_gl_shader(&self, shader: &GLShader, bounds: &Rect, take_args: Bytes)
👎Deprecated: Since 4.16
Push a
gsk::GLShaderNode
. Read moreSource§fn push_opacity(&self, opacity: f64)
fn push_opacity(&self, opacity: f64)
Modifies the opacity of an image. Read more
Source§fn push_repeat(&self, bounds: &Rect, child_bounds: Option<&Rect>)
fn push_repeat(&self, bounds: &Rect, child_bounds: Option<&Rect>)
Creates a node that repeats the child node. Read more
Source§fn push_rounded_clip(&self, bounds: &RoundedRect)
fn push_rounded_clip(&self, bounds: &RoundedRect)
Clips an image to a rounded rectangle. Read more
Source§fn push_shadow(&self, shadow: &[Shadow])
fn push_shadow(&self, shadow: &[Shadow])
Applies a shadow to an image. Read more
Source§fn push_stroke(&self, path: &Path, stroke: &Stroke)
fn push_stroke(&self, path: &Path, stroke: &Stroke)
Available on crate feature
v4_14
only.Strokes the given @path with the attributes given by @stroke and
an image. Read more
Source§fn render_background(
&self,
context: &impl IsA<StyleContext>,
x: f64,
y: f64,
width: f64,
height: f64,
)
fn render_background( &self, context: &impl IsA<StyleContext>, x: f64, y: f64, width: f64, height: f64, )
👎Deprecated: Since 4.10
Creates a render node for the CSS background according to @context,
and appends it to the current node of @self, without changing
the current node. Read more
Source§fn render_focus(
&self,
context: &impl IsA<StyleContext>,
x: f64,
y: f64,
width: f64,
height: f64,
)
fn render_focus( &self, context: &impl IsA<StyleContext>, x: f64, y: f64, width: f64, height: f64, )
👎Deprecated: Since 4.10
Creates a render node for the focus outline according to @context,
and appends it to the current node of @self, without changing
the current node. Read more
Source§fn render_frame(
&self,
context: &impl IsA<StyleContext>,
x: f64,
y: f64,
width: f64,
height: f64,
)
fn render_frame( &self, context: &impl IsA<StyleContext>, x: f64, y: f64, width: f64, height: f64, )
👎Deprecated: Since 4.10
Creates a render node for the CSS border according to @context,
and appends it to the current node of @self, without changing
the current node. Read more
Source§fn render_insertion_cursor(
&self,
context: &impl IsA<StyleContext>,
x: f64,
y: f64,
layout: &Layout,
index: i32,
direction: Direction,
)
fn render_insertion_cursor( &self, context: &impl IsA<StyleContext>, x: f64, y: f64, layout: &Layout, index: i32, direction: Direction, )
👎Deprecated: Since 4.10
Draws a text caret using @self at the specified index of @layout. Read more
Source§fn render_layout(
&self,
context: &impl IsA<StyleContext>,
x: f64,
y: f64,
layout: &Layout,
)
fn render_layout( &self, context: &impl IsA<StyleContext>, x: f64, y: f64, layout: &Layout, )
👎Deprecated: Since 4.10
Creates a render node for rendering @layout according to the style
information in @context, and appends it to the current node of @self,
without changing the current node. Read more
Source§fn restore(&self)
fn restore(&self)
Restores @self to the state saved by a preceding call to
save()
and removes that state from the stack of
saved states.Source§fn rotate(&self, angle: f32)
fn rotate(&self, angle: f32)
Rotates @@self’s coordinate system by @angle degrees in 2D space -
or in 3D speak, rotates around the Z axis. The rotation happens around
the origin point of (0, 0) in the @self’s current coordinate system. Read more
Source§fn rotate_3d(&self, angle: f32, axis: &Vec3)
fn rotate_3d(&self, angle: f32, axis: &Vec3)
Rotates @self’s coordinate system by @angle degrees around @axis. Read more
Source§fn save(&self)
fn save(&self)
Makes a copy of the current state of @self and saves it
on an internal stack. Read more
Source§fn scale(&self, factor_x: f32, factor_y: f32)
fn scale(&self, factor_x: f32, factor_y: f32)
Scales @self’s coordinate system in 2-dimensional space by
the given factors. Read more
Source§fn scale_3d(&self, factor_x: f32, factor_y: f32, factor_z: f32)
fn scale_3d(&self, factor_x: f32, factor_y: f32, factor_z: f32)
Scales @self’s coordinate system by the given factors. Read more
Source§fn to_node(self) -> Option<RenderNode>
fn to_node(self) -> Option<RenderNode>
Returns the render node that was constructed
by @self. Read more
Source§fn to_paintable(self, size: Option<&Size>) -> Option<Paintable>
fn to_paintable(self, size: Option<&Size>) -> Option<Paintable>
Returns a paintable encapsulating the render node
that was constructed by @self. Read more
Source§fn transform(&self, transform: Option<&Transform>)
fn transform(&self, transform: Option<&Transform>)
Transforms @self’s coordinate system with the given @transform. Read more
Source§fn transform_matrix(&self, matrix: &Matrix)
fn transform_matrix(&self, matrix: &Matrix)
Transforms @self’s coordinate system with the given @matrix. Read more
Source§fn translate(&self, point: &Point)
fn translate(&self, point: &Point)
Translates @self’s coordinate system by @point in 2-dimensional space. Read more
Source§fn translate_3d(&self, point: &Point3D)
fn translate_3d(&self, point: &Point3D)
Translates @self’s coordinate system by @point. Read more
Source§impl<O> SnapshotExtManual for O
impl<O> SnapshotExtManual for O
Source§fn append_border(
&self,
outline: &RoundedRect,
border_width: &[f32; 4],
border_color: &[RGBA; 4],
)
fn append_border( &self, outline: &RoundedRect, border_width: &[f32; 4], border_color: &[RGBA; 4], )
Appends a stroked border rectangle inside the given @outline. Read more
Source§fn push_debug(&self, message: impl IntoGStr)
fn push_debug(&self, message: impl IntoGStr)
Inserts a debug node with a message. Read more
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.