pub struct MemoryDndGuard { /* private fields */ }Expand description
Guard that removes the window’s attachment record on drop, so
ExternalDndHandle::detach is observable in tests via
MemoryExternalDndBackend::attached_windows.
Trait Implementations§
Source§impl Drop for MemoryDndGuard
impl Drop for MemoryDndGuard
Source§impl ExternalDndGuard for MemoryDndGuard
impl ExternalDndGuard for MemoryDndGuard
Source§fn begin_drag(
&self,
data: &OutboundDragData,
_image: Option<&DragImageData>,
pointer: PointerKind,
) -> OsDragStart
fn begin_drag( &self, data: &OutboundDragData, _image: Option<&DragImageData>, pointer: PointerKind, ) -> OsDragStart
Start a native OS drag session (app → OS, “outbound”) for this window,
exporting
data and optionally drawing image as the drag cursor.
Called when an in-app drag carrying an OS-exportable payload is handed
to the platform (at the window boundary, or on the first pointer move
for OsHandoff::Eager). Read moreSource§fn set_drop_accepted(&self, accepted: bool)
fn set_drop_accepted(&self, accepted: bool)
Revise the OS’s accept state for an inbound drag over this window
from the widget tree’s verdict. Read more
Source§fn cancel_drag(&self)
fn cancel_drag(&self)
Cancel an outbound OS drag: the user pressed Escape, or released the
pointer before a pending start (
OsDragStart::Pending) was confirmed. Read moreSource§fn set_scale_factor(&self, _scale: f64)
fn set_scale_factor(&self, _scale: f64)
Tell the backend this window’s HiDPI scale factor. Read more
Source§fn run_pending_outbound_drag(&self, _on_start: &mut dyn FnMut(OsDragId))
fn run_pending_outbound_drag(&self, _on_start: &mut dyn FnMut(OsDragId))
Run a previously-requested blocking outbound drag for this window,
synchronously. Called by
ExternalDndHandle::run_pending_outbound_drag
from a teksilo-app event-loop turn AFTER Self::begin_drag answered
OsDragStart::Pending and stashed the payload, so a blocking platform
drag loop (Windows OLE DoDragDrop) runs outside the dispatch that
started it. Read moreAuto Trait Implementations§
impl Freeze for MemoryDndGuard
impl RefUnwindSafe for MemoryDndGuard
impl Send for MemoryDndGuard
impl Sync for MemoryDndGuard
impl Unpin for MemoryDndGuard
impl UnsafeUnpin for MemoryDndGuard
impl UnwindSafe for MemoryDndGuard
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.