Struct wayland_server::protocol::wl_data_device::WlDataDevice
[−]
[src]
pub struct WlDataDevice { /* fields omitted */ }
Methods
impl WlDataDevice
[src]
fn data_offer(&self, id: &WlDataOffer) -> EventResult<()>
[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.
fn enter(
&self,
serial: u32,
surface: &WlSurface,
x: f64,
y: f64,
id: Option<&WlDataOffer>
) -> EventResult<()>
[src]
&self,
serial: u32,
surface: &WlSurface,
x: f64,
y: f64,
id: Option<&WlDataOffer>
) -> EventResult<()>
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.
fn leave(&self) -> EventResult<()>
[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.
fn motion(&self, time: u32, x: f64, y: f64) -> EventResult<()>
[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.
fn drop(&self) -> EventResult<()>
[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.
fn selection(&self, id: Option<&WlDataOffer>) -> EventResult<()>
[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 Send for WlDataDevice
[src]
impl Sync for WlDataDevice
[src]
impl Resource for WlDataDevice
[src]
fn ptr(&self) -> *mut wl_resource
[src]
Pointer to the underlying wayland proxy object
unsafe fn from_ptr_new(ptr: *mut wl_resource) -> WlDataDevice
[src]
Create an instance from a wayland pointer Read more
unsafe fn from_ptr_initialized(ptr: *mut wl_resource) -> WlDataDevice
[src]
Create an instance from a wayland pointer Read more
fn interface_ptr() -> *const wl_interface
[src]
Pointer to the interface representation
fn interface_name() -> &'static str
[src]
Internal wayland name of this interface
fn supported_version() -> u32
[src]
Max version of this interface supported
fn version(&self) -> i32
[src]
Current version of the interface this resource is instantiated with
fn status(&self) -> Liveness
[src]
Check if the resource behind this handle is actually still alive
fn equals(&self, other: &WlDataDevice) -> bool
[src]
Check of two handles are actually the same wayland object Read more
fn set_user_data(&self, ptr: *mut ())
[src]
Set a pointer associated as user data on this resource Read more
fn get_user_data(&self) -> *mut ()
[src]
Get the pointer associated as user data on this resource Read more
unsafe fn clone_unchecked(&self) -> WlDataDevice
[src]
Unsafely clone this resource handle Read more
fn post_error(&self, error_code: u32, msg: String)
[src]
Posts a protocol error to this resource Read more
fn clone(&self) -> Option<Self> where
Self: Sized,
[src]
Self: Sized,
Clone this resource handle Read more
fn same_client_as<R: Resource>(&self, other: &R) -> bool
[src]
Checks wether this resource and the other are from the same client Read more
impl<ID: 'static> Implementable<ID> for WlDataDevice
[src]
type Implementation = Implementation<ID>
The type containing the implementation for the event callbacks
unsafe fn __dispatch_msg(
&self,
client: &Client,
opcode: u32,
args: *const wl_argument
) -> Result<(), ()>
[src]
&self,
client: &Client,
opcode: u32,
args: *const wl_argument
) -> Result<(), ()>