pub struct WlDataDevice(/* private fields */);

Implementations§

source§

impl WlDataDevice

source

pub fn start_drag( &self, source: Option<&WlDataSource>, origin: &WlSurface, icon: Option<&WlSurface>, serial: u32 )

start drag-and-drop operation

This request asks the compositor to start a drag-and-drop operation on behalf of the client.

The source argument is the data source that provides the data for the eventual data transfer. If source is NULL, enter, leave and motion events are sent only to the client that initiated the drag and the client is expected to handle the data passing internally. If source is destroyed, the drag-and-drop session will be cancelled.

The origin surface is the surface where the drag originates and the client must have an active implicit grab that matches the serial.

The icon surface is an optional (can be NULL) surface that provides an icon to be moved around with the cursor. Initially, the top-left corner of the icon surface is placed at the cursor hotspot, but subsequent wl_surface.attach request can move the relative position. Attach requests must be confirmed with wl_surface.commit as usual. The icon surface is given the role of a drag-and-drop icon. If the icon surface already has another role, it raises a protocol error.

The current and pending input regions of the icon wl_surface are cleared, and wl_surface.set_input_region is ignored until the wl_surface is no longer used as the icon surface. When the use as an icon ends, the current and pending input regions become undefined, and the wl_surface is unmapped.

source

pub fn set_selection(&self, source: Option<&WlDataSource>, serial: u32)

copy data to the selection

This request asks the compositor to set the selection to the data from the source on behalf of the client.

To unset the selection, set the source to NULL.

source

pub fn release(&self)

destroy data device

This request destroys the data device.

This is a destructor, you cannot send requests to this object any longer once this method is called. Only available since version 2 of the interface.

Trait Implementations§

source§

impl AsRef<Proxy<WlDataDevice>> for WlDataDevice

source§

fn as_ref(&self) -> &Proxy<Self>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for WlDataDevice

source§

fn clone(&self) -> WlDataDevice

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WlDataDevice

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Proxy<WlDataDevice>> for WlDataDevice

source§

fn from(value: Proxy<Self>) -> Self

Converts to this type from the input type.
source§

impl From<WlDataDevice> for Proxy<WlDataDevice>

source§

fn from(value: WlDataDevice) -> Self

Converts to this type from the input type.
source§

impl Interface for WlDataDevice

§

type Request = Request

Set of requests associated to this interface Read more
§

type Event = Event

Set of events associated to this interface Read more
source§

const NAME: &'static str = "wl_data_device"

Name of this interface
source§

const VERSION: u32 = 3u32

Maximum supported version of this interface Read more
source§

fn c_interface() -> *const wl_interface

Pointer to the C representation of this interface
source§

impl PartialEq for WlDataDevice

source§

fn eq(&self, other: &WlDataDevice) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for WlDataDevice

source§

impl StructuralEq for WlDataDevice

source§

impl StructuralPartialEq for WlDataDevice

Auto Trait Implementations§

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.