Struct gdk4_wayland::WaylandToplevel
source · #[repr(transparent)]pub struct WaylandToplevel { /* private fields */ }
Expand description
The Wayland implementation of gdk::Toplevel
.
Beyond the gdk::Toplevel
API, the Wayland implementation
has API to set up cross-process parent-child relationships between
surfaces with export_handle()
and
set_transient_for_exported()
.
Implements
[WaylandSurfaceExt
][trait@crate::prelude::WaylandSurfaceExt], gdk::prelude::SurfaceExt
, gdk::prelude::ToplevelExt
, WaylandSurfaceExtManual
Implementations§
source§impl WaylandToplevel
impl WaylandToplevel
sourcepub fn drop_exported_handle(&self, handle: &str)
Available on crate feature v4_12
only.
pub fn drop_exported_handle(&self, handle: &str)
v4_12
only.Destroy a handle that was obtained with gdk_wayland_toplevel_export_handle().
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
handle
the handle to drop
sourcepub fn export_handle<P: Fn(&WaylandToplevel, &str) + 'static>(
&self,
callback: P
) -> bool
pub fn export_handle<P: Fn(&WaylandToplevel, &str) + 'static>( &self, callback: P ) -> bool
Asynchronously obtains a handle for a surface that can be passed to other processes.
When the handle has been obtained, @callback will be called.
It is an error to call this function on a surface that is already exported.
When the handle is no longer needed, unexport_handle()
should be called to clean up resources.
The main purpose for obtaining a handle is to mark a surface
from another surface as transient for this one, see
set_transient_for_exported()
.
Before 4.12, this API could not safely be used multiple times,
since there was no reference counting for handles. Starting with
4.12, every call to this function obtains a new handle, and every
call to drop_exported_handle()
drops
just the handle that it is given.
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
callback
callback to call with the handle
Returns
true
if the handle has been requested, false
if
an error occurred.
sourcepub fn set_application_id(&self, application_id: &str)
pub fn set_application_id(&self, application_id: &str)
sourcepub fn set_transient_for_exported(&self, parent_handle_str: &str) -> bool
pub fn set_transient_for_exported(&self, parent_handle_str: &str) -> bool
Marks @self as transient for the surface to which the given @parent_handle_str refers.
Typically, the handle will originate from a
export_handle()
call in another process.
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
parent_handle_str
an exported handle for a surface
Returns
true
if the surface has been marked as transient,
false
if an error occurred.
sourcepub fn unexport_handle(&self)
👎Deprecated: Since 4.12
pub fn unexport_handle(&self)
Destroys the handle that was obtained with gdk_wayland_toplevel_export_handle().
It is an error to call this function on a surface that does not have a handle.
Since 4.12, this function does nothing. Use
drop_exported_handle()
instead to drop a
handle that was obtained with export_handle()
.
Note that this API depends on an unstable Wayland protocol, and thus may require changes in the future.
Deprecated since 4.12
Use drop_exported_handle()
instead, this function does nothing
Trait Implementations§
source§impl Clone for WaylandToplevel
impl Clone for WaylandToplevel
source§impl Debug for WaylandToplevel
impl Debug for WaylandToplevel
source§impl Display for WaylandToplevel
impl Display for WaylandToplevel
source§impl HasParamSpec for WaylandToplevel
impl HasParamSpec for WaylandToplevel
type ParamSpec = ParamSpecObject
§type SetValue = WaylandToplevel
type SetValue = WaylandToplevel
type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, WaylandToplevel>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for WaylandToplevel
impl Hash for WaylandToplevel
source§impl Ord for WaylandToplevel
impl Ord for WaylandToplevel
source§impl ParentClassIs for WaylandToplevel
impl ParentClassIs for WaylandToplevel
type Parent = WaylandSurface
source§impl<OT: ObjectType> PartialEq<OT> for WaylandToplevel
impl<OT: ObjectType> PartialEq<OT> for WaylandToplevel
source§impl<OT: ObjectType> PartialOrd<OT> for WaylandToplevel
impl<OT: ObjectType> PartialOrd<OT> for WaylandToplevel
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for WaylandToplevel
impl StaticType for WaylandToplevel
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for WaylandToplevel
impl IsA<Surface> for WaylandToplevel
impl IsA<Toplevel> for WaylandToplevel
impl IsA<WaylandSurface> for WaylandToplevel
Auto Trait Implementations§
impl RefUnwindSafe for WaylandToplevel
impl !Send for WaylandToplevel
impl !Sync for WaylandToplevel
impl Unpin for WaylandToplevel
impl UnwindSafe for WaylandToplevel
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
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>,
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>,
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>,
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>,
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,
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,
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,
T
unconditionally. Read moresource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere T: ObjectType,
&T
unconditionally. Read more§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.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>,
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>,
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>,
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>,
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>,
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>,
source§impl<T> IntoClosureReturnValue for Twhere
T: Into<Value>,
impl<T> IntoClosureReturnValue for Twhere T: Into<Value>,
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>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<T>,
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<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,
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>
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,
T
. Read moresource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where U: IsInterface,
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)])
source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
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,
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
property_name
of the object. Read moresource§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
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>
ParamSpec
of the property property_name
of this object.source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec
of the properties of this object.source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
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,
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,
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,
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,
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,
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,
key
. Read moresource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
signal_name
on this object. Read moresource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
signal_id
on this object. Read moresource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + 'static,
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,
signal_name
on this object. Read moresource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value> + 'static,
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,
signal_id
on this object. Read moresource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,
signal_name
on this object. Read moresource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerIdwhere
F: Fn(&[Value]) -> Option<Value>,
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,
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
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
signal_id
on this object. Read moresource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
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,
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>
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,
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>
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,
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>
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,
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>
source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec) + Send + Sync + 'static,
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + Send + Sync + 'static,
notify
signal of the object. Read moresource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec) + 'static,
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + 'static,
notify
signal of the object. Read moresource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerIdwhere
F: Fn(&T, &ParamSpec),
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec),
notify
signal of the object. Read moresource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + Send + 'static,
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where F: FnOnce() + Send + 'static,
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,
source§fn bind_property<'f, 't, O, 'a>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'f, 't, O, 'a>( &'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)
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<O> SurfaceExt for Owhere
O: IsA<Surface>,
impl<O> SurfaceExt for Owhere O: IsA<Surface>,
source§fn create_cairo_context(&self) -> CairoContext
fn create_cairo_context(&self) -> CairoContext
CairoContext
for rendering on @self. Read moresource§fn create_vulkan_context(&self) -> Result<VulkanContext, Error>
fn create_vulkan_context(&self) -> Result<VulkanContext, Error>
VulkanContext
for rendering on @self. Read morefn destroy(&self)
source§fn device_position(
&self,
device: &impl IsA<Device>
) -> Option<(f64, f64, ModifierType)>
fn device_position( &self, device: &impl IsA<Device> ) -> Option<(f64, f64, ModifierType)>
source§fn frame_clock(&self) -> FrameClock
fn frame_clock(&self) -> FrameClock
source§fn scale(&self) -> f64
fn scale(&self) -> f64
v4_12
only.source§fn scale_factor(&self) -> i32
fn scale_factor(&self) -> i32
source§fn is_destroyed(&self) -> bool
fn is_destroyed(&self) -> bool
source§fn queue_render(&self)
fn queue_render(&self)
source§fn request_layout(&self)
fn request_layout(&self)
source§fn set_cursor(&self, cursor: Option<&Cursor>)
fn set_cursor(&self, cursor: Option<&Cursor>)
source§fn set_input_region(&self, region: &Region)
fn set_input_region(&self, region: &Region)
source§fn set_opaque_region(&self, region: Option<&Region>)
fn set_opaque_region(&self, region: Option<&Region>)
source§fn connect_enter_monitor<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, &Monitor) + 'static,
fn connect_enter_monitor<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self, &Monitor) + 'static,
source§fn connect_event<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, &Event) -> bool + 'static,
fn connect_event<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self, &Event) -> bool + 'static,
source§fn connect_layout<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, i32, i32) + 'static,
fn connect_layout<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self, i32, i32) + 'static,
source§fn connect_leave_monitor<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, &Monitor) + 'static,
fn connect_leave_monitor<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self, &Monitor) + 'static,
source§fn connect_render<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self, &Region) -> bool + 'static,
fn connect_render<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self, &Region) -> bool + 'static,
fn connect_cursor_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_height_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_mapped_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
source§fn connect_scale_notify<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Self) + 'static,
fn connect_scale_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
v4_12
only.fn connect_scale_factor_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_width_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
source§impl<O> SurfaceExtManual for Owhere
O: IsA<Surface>,
impl<O> SurfaceExtManual for Owhere O: IsA<Surface>,
source§impl<O> ToplevelExt for Owhere
O: IsA<Toplevel>,
impl<O> ToplevelExt for Owhere O: IsA<Toplevel>,
source§fn begin_move(
&self,
device: &impl IsA<Device>,
button: i32,
x: f64,
y: f64,
timestamp: u32
)
fn begin_move( &self, device: &impl IsA<Device>, button: i32, x: f64, y: f64, timestamp: u32 )
source§fn begin_resize(
&self,
edge: SurfaceEdge,
device: Option<&impl IsA<Device>>,
button: i32,
x: f64,
y: f64,
timestamp: u32
)
fn begin_resize( &self, edge: SurfaceEdge, device: Option<&impl IsA<Device>>, button: i32, x: f64, y: f64, timestamp: u32 )
source§fn state(&self) -> ToplevelState
fn state(&self) -> ToplevelState
ToplevelState
enumeration. Read moresource§fn inhibit_system_shortcuts(&self, event: Option<impl AsRef<Event>>)
fn inhibit_system_shortcuts(&self, event: Option<impl AsRef<Event>>)
source§fn present(&self, layout: &ToplevelLayout)
fn present(&self, layout: &ToplevelLayout)
ToplevelLayout
rules. Read moresource§fn restore_system_shortcuts(&self)
fn restore_system_shortcuts(&self)
source§fn set_decorated(&self, decorated: bool)
fn set_decorated(&self, decorated: bool)
source§fn set_deletable(&self, deletable: bool)
fn set_deletable(&self, deletable: bool)
source§fn set_icon_list(&self, surfaces: &[Texture])
fn set_icon_list(&self, surfaces: &[Texture])
source§fn set_startup_id(&self, startup_id: &str)
fn set_startup_id(&self, startup_id: &str)
source§fn set_transient_for(&self, parent: &impl IsA<Surface>)
fn set_transient_for(&self, parent: &impl IsA<Surface>)
source§fn supports_edge_constraints(&self) -> bool
fn supports_edge_constraints(&self) -> bool
source§fn titlebar_gesture(&self, gesture: TitlebarGesture) -> bool
fn titlebar_gesture(&self, gesture: TitlebarGesture) -> bool
v4_4
only.gesture
Read moresource§fn is_decorated(&self) -> bool
fn is_decorated(&self) -> bool
source§fn is_deletable(&self) -> bool
fn is_deletable(&self) -> bool
source§fn fullscreen_mode(&self) -> FullscreenMode
fn fullscreen_mode(&self) -> FullscreenMode
source§fn set_fullscreen_mode(&self, fullscreen_mode: FullscreenMode)
fn set_fullscreen_mode(&self, fullscreen_mode: FullscreenMode)
source§fn is_shortcuts_inhibited(&self) -> bool
fn is_shortcuts_inhibited(&self) -> bool
source§fn transient_for(&self) -> Option<Surface>
fn transient_for(&self) -> Option<Surface>
fn connect_decorated_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_deletable_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_fullscreen_mode_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_icon_list_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_modal_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_shortcuts_inhibited_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_startup_id_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_state_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_title_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
fn connect_transient_for_notify<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Self) + 'static,
source§impl<O> ToplevelExtManual for Owhere
O: IsA<Toplevel>,
impl<O> ToplevelExtManual for Owhere O: IsA<Toplevel>,
source§fn connect_compute_size<F>(&self, f: F) -> SignalHandlerIdwhere
F: Fn(&Toplevel, &mut ToplevelSize) + 'static,
fn connect_compute_size<F>(&self, f: F) -> SignalHandlerIdwhere F: Fn(&Toplevel, &mut ToplevelSize) + 'static,
source§impl<T> TransparentType for Twhere
T: TransparentPtrType,
impl<T> TransparentType for Twhere T: TransparentPtrType,
type GlibType = <T as GlibPtrDefault>::GlibType
source§impl<T> TryFromClosureReturnValue for Twhere
T: for<'a> FromValue<'a> + StaticType + 'static,
impl<T> TryFromClosureReturnValue for Twhere T: for<'a> FromValue<'a> + StaticType + 'static,
source§impl<O> WaylandSurfaceExtManual for Owhere
O: IsA<WaylandSurface>,
impl<O> WaylandSurfaceExtManual for Owhere O: IsA<WaylandSurface>,
source§fn wl_surface(&self) -> Option<WlSurface>
fn wl_surface(&self) -> Option<WlSurface>
wayland_crate
only.