Struct gdk::DragContext
source · [−]pub struct DragContext(_, _);Implementations
sourceimpl DragContext
impl DragContext
pub fn get_actions(&self) -> DragAction
pub fn get_dest_window(&self) -> Window
pub fn get_device(&self) -> Device
pub fn get_drag_window(&self) -> Option<Window>
pub fn get_protocol(&self) -> DragProtocol
pub fn get_selected_action(&self) -> DragAction
pub fn get_source_window(&self) -> Window
pub fn get_suggested_action(&self) -> DragAction
pub fn list_targets(&self) -> Vec<Atom>
pub fn manage_dnd<P: IsA<Window>>(
&self,
ipc_window: &P,
actions: DragAction
) -> bool
pub fn set_device(&self, device: &Device)
pub fn set_hotspot(&self, hot_x: i32, hot_y: i32)
pub fn connect_action_changed<F: Fn(&DragContext, DragAction) + 'static>(
&self,
f: F
) -> SignalHandlerId
pub fn connect_cancel<F: Fn(&DragContext, DragCancelReason) + 'static>(
&self,
f: F
) -> SignalHandlerId
pub fn connect_dnd_finished<F: Fn(&DragContext) + 'static>(
&self,
f: F
) -> SignalHandlerId
pub fn connect_drop_performed<F: Fn(&DragContext, i32) + 'static>(
&self,
f: F
) -> SignalHandlerId
sourceimpl DragContext
impl DragContext
pub fn drag_get_selection(&self) -> Atom
pub fn drag_abort(&self, time_: u32)
pub fn drop_reply(&self, accepted: bool, time_: u32)
pub fn drop(&self, time_: u32)
pub fn drag_find_window_for_screen(
&self,
drag_window: &Window,
screen: &Screen,
x_root: i32,
y_root: i32
) -> (Option<Window>, DragProtocol)
pub fn drag_motion(
&self,
dest_window: &Window,
protocol: DragProtocol,
x_root: i32,
y_root: i32,
suggested_action: DragAction,
possible_actions: DragAction,
time_: u32
) -> bool
pub fn drop_finish(&self, success: bool, time_: u32)
pub fn drag_status(&self, action: DragAction, time_: u32)
pub fn drag_drop_succeeded(&self) -> bool
pub fn drag_begin(window: &Window, targets: &[&Atom]) -> Option<DragContext>
pub fn drag_begin_for_device<P: IsA<Device>>(
window: &Window,
device: &P,
targets: &[&Atom]
) -> Option<DragContext>
pub fn drag_begin_from_point<P: IsA<Device>>(
window: &Window,
device: &P,
targets: &[&Atom],
x_root: i32,
y_root: i32
) -> Option<DragContext>
pub fn drag_drop_done(&self, success: bool)
Trait Implementations
sourceimpl Clone for DragContext
impl Clone for DragContext
sourcefn clone(&self) -> DragContext
fn clone(&self) -> DragContext
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for DragContext
impl Debug for DragContext
sourceimpl Display for DragContext
impl Display for DragContext
sourceimpl Hash for DragContext
impl Hash for DragContext
sourceimpl Ord for DragContext
impl Ord for DragContext
sourcefn cmp(&self, other: &DragContext) -> Ordering
fn cmp(&self, other: &DragContext) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: ObjectType> PartialEq<T> for DragContext
impl<T: ObjectType> PartialEq<T> for DragContext
sourceimpl<T: ObjectType> PartialOrd<T> for DragContext
impl<T: ObjectType> PartialOrd<T> for DragContext
sourcefn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl StaticType for DragContext
impl StaticType for DragContext
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self.impl Eq for DragContext
Auto Trait Implementations
impl RefUnwindSafe for DragContext
impl !Send for DragContext
impl !Sync for DragContext
impl Unpin for DragContext
impl UnwindSafe for DragContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
sourcefn 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 moresourcefn 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 moresourcefn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a subclass or interface implementor
T. Read moresourcefn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: CanDowncast<T>,
Tries to downcast to a reference of its subclass or interface implementor
T. Read moresourcefn 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 downcast and upcast will do many checks at compile-time already. Read moresourcefn 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 moresourceunsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
Casts to
T unconditionally. Read moresourceunsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
Casts to
&T unconditionally. Read moresourceimpl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
sourcefn 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.