[−][src]Struct wayland_server::protocol::wl_data_device::WlDataDevice
Implementations
impl WlDataDevice
[src]
pub fn data_offer(&self, id: &WlDataOffer)
[src]
introduce a new wl_data_offer
The data_offer event introduces a new wl_data_offer object, which will subsequently be used in either the data_device.enter event (for drag-and-drop) or the data_device.selection event (for selections). Immediately following the data_device_data_offer event, the new data_offer object will send out data_offer.offer events to describe the mime types it offers.
pub fn enter(
&self,
serial: u32,
surface: &WlSurface,
x: f64,
y: f64,
id: Option<&WlDataOffer>
)
[src]
&self,
serial: u32,
surface: &WlSurface,
x: f64,
y: f64,
id: Option<&WlDataOffer>
)
initiate drag-and-drop session
This event is sent when an active drag-and-drop pointer enters a surface owned by the client. The position of the pointer at enter time is provided by the x and y arguments, in surface-local coordinates.
pub fn leave(&self)
[src]
end drag-and-drop session
This event is sent when the drag-and-drop pointer leaves the surface and the session ends. The client must destroy the wl_data_offer introduced at enter time at this point.
pub fn motion(&self, time: u32, x: f64, y: f64)
[src]
drag-and-drop session motion
This event is sent when the drag-and-drop pointer moves within the currently focused surface. The new position of the pointer is provided by the x and y arguments, in surface-local coordinates.
pub fn drop(&self)
[src]
end drag-and-drop session successfully
The event is sent when a drag-and-drop operation is ended because the implicit grab is removed.
The drag-and-drop destination is expected to honor the last action received through wl_data_offer.action, if the resulting action is "copy" or "move", the destination can still perform wl_data_offer.receive requests, and is expected to end all transfers with a wl_data_offer.finish request.
If the resulting action is "ask", the action will not be considered final. The drag-and-drop destination is expected to perform one last wl_data_offer.set_actions request, or wl_data_offer.destroy in order to cancel the operation.
pub fn selection(&self, id: Option<&WlDataOffer>)
[src]
advertise new selection
The selection event is sent out to notify the client of a new wl_data_offer for the selection for this device. The data_device.data_offer and the data_offer.offer events are sent out immediately before this event to introduce the data offer object. The selection event is sent to a client immediately before receiving keyboard focus and when a new selection is set while the client has keyboard focus. The data_offer is valid until a new data_offer or NULL is received or until the client loses keyboard focus. The client must destroy the previous selection data_offer, if any, upon receiving this event.
Trait Implementations
impl AsRef<Resource<WlDataDevice>> for WlDataDevice
[src]
impl Clone for WlDataDevice
[src]
fn clone(&self) -> WlDataDevice
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WlDataDevice
[src]
impl Eq for WlDataDevice
[src]
impl From<Resource<WlDataDevice>> for WlDataDevice
[src]
impl From<WlDataDevice> for Resource<WlDataDevice>
[src]
fn from(value: WlDataDevice) -> Self
[src]
impl Interface for WlDataDevice
[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
const NAME: &'static str
[src]
const VERSION: u32
[src]
fn c_interface() -> *const wl_interface
[src]
impl PartialEq<WlDataDevice> for WlDataDevice
[src]
fn eq(&self, other: &WlDataDevice) -> bool
[src]
fn ne(&self, other: &WlDataDevice) -> bool
[src]
impl StructuralEq for WlDataDevice
[src]
impl StructuralPartialEq for WlDataDevice
[src]
Auto Trait Implementations
impl !RefUnwindSafe for WlDataDevice
impl Send for WlDataDevice
impl Sync for WlDataDevice
impl Unpin for WlDataDevice
impl !UnwindSafe for WlDataDevice
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,