Struct wayland_client::wayland::data_device::WlDataSource
[−]
[src]
pub struct WlDataSource { // some fields omitted }
offer to transfer data
The wl_data_source object is the source side of a wl_data_offer. It is created by the source client in a data transfer and provides a way to describe the offered data and a way to respond to requests to transfer the data.
Methods
impl WlDataSource
[src]
fn offer(&self, mime_type: String)
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.
fn set_actions(&self, dnd_actions: u32)
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.
Requires interface version >= 3
.
Trait Implementations
impl Sync for WlDataSource
[src]
impl Send for WlDataSource
[src]
impl Proxy for WlDataSource
[src]
fn ptr(&self) -> *mut wl_proxy
fn interface() -> *mut wl_interface
fn interface_name() -> &'static str
The internal name of this interface, as advertized by the registry if it is a global.
fn version() -> u32
The maximum version of this interface handled by the library.
fn id(&self) -> ProxyId
Get the id of this proxy
fn set_event_iterator(&mut self, evt: &EventIterator)
Set the event iterator associated to this proxy
impl Debug for WlDataSource
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.