[][src]Struct wayland_client::protocol::wl_data_source::WlDataSource

pub struct WlDataSource(_);

Implementations

impl WlDataSource[src]

pub fn offer(&self, mime_type: String)[src]

add an offered mime type

This request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types.

pub fn destroy(&self)[src]

destroy the data source

Destroy the data source.

This is a destructor, you cannot send requests to this object any longer once this method is called.

pub fn set_actions(&self, dnd_actions: u32)[src]

set the available drag-and-drop actions

Sets the actions that the source side client supports for this operation. This request may trigger wl_data_source.action and wl_data_offer.action events if the compositor needs to change the selected action.

The dnd_actions argument must contain only values expressed in the wl_data_device_manager.dnd_actions enum, otherwise it will result in a protocol error.

This request must be made once only, and can only be made on sources used in drag-and-drop, so it must be performed before wl_data_device.start_drag. Attempting to use the source other than for drag-and-drop will raise a protocol error.

Only available since version 3 of the interface.

Trait Implementations

impl AsRef<Proxy<WlDataSource>> for WlDataSource[src]

impl Clone for WlDataSource[src]

impl Eq for WlDataSource[src]

impl From<Proxy<WlDataSource>> for WlDataSource[src]

impl From<WlDataSource> for Proxy<WlDataSource>[src]

impl<T: EventHandler> HandledBy<T> for WlDataSource[src]

impl Interface for WlDataSource[src]

type Request = Request

Set of requests associated to this interface Read more

type Event = Event

Set of events associated to this interface Read more

impl PartialEq<WlDataSource> for WlDataSource[src]

impl StructuralEq for WlDataSource[src]

impl StructuralPartialEq for WlDataSource[src]

Auto Trait Implementations

impl !RefUnwindSafe for WlDataSource

impl Send for WlDataSource

impl Sync for WlDataSource

impl Unpin for WlDataSource

impl !UnwindSafe for WlDataSource

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.