Struct Dnd

Source
pub struct Dnd {
    pub atoms: DndAtoms,
    pub display: *mut _XDisplay,
    pub type_list: Option<Vec<u64>>,
    pub selection: Option<CString>,
}

Fields§

§atoms: DndAtoms§display: *mut _XDisplay§type_list: Option<Vec<u64>>§selection: Option<CString>

Implementations§

Source§

impl Dnd

Source

pub unsafe fn new(display: *mut _XDisplay) -> Dnd

Source

pub unsafe fn enable_for_window(&mut self, window: u64)

Enables drag-and-drop for the given window.

Source

pub unsafe fn handle_enter_event(&mut self, event: &XClientMessageEvent)

Handles a XDndEnter event.

Source

pub unsafe fn handle_drop_event(&mut self, event: &XClientMessageEvent)

Handles a XDndDrop event.

Source

pub unsafe fn handle_leave_event(&mut self, _event: &XClientMessageEvent)

Handles a XDndLeave event.

Source

pub unsafe fn handle_position_event(&mut self, event: &XClientMessageEvent)

Handles a XDndPosition event.

Source

pub unsafe fn handle_selection_event(&mut self, _event: &XSelectionEvent)

Handles a XSelectionEvent.

Source

pub unsafe fn get_selection_property(&mut self, source_window: u64) -> Vec<u8>

Gets the XDndSelection property from the source window.

Source

pub unsafe fn get_type_list_property(&mut self, source_window: u64) -> Vec<u64>

Gets the XDndTypeList property from the source window.

Source

pub unsafe fn send_status_event( &mut self, source_window: u64, target_window: u64, accepted: bool, )

Sends a XDndStatus event to the target window.

Source

pub unsafe fn convert_selection(&self, target_window: u64)

Auto Trait Implementations§

§

impl Freeze for Dnd

§

impl RefUnwindSafe for Dnd

§

impl !Send for Dnd

§

impl !Sync for Dnd

§

impl Unpin for Dnd

§

impl UnwindSafe for Dnd

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.