pub trait DataDeviceHandler: Sized {
// Required methods
fn enter(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
x: f64,
y: f64,
wl_surface: &WlSurface,
);
fn leave(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
);
fn motion(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
x: f64,
y: f64,
);
fn selection(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
);
fn drop_performed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
);
}
Expand description
Handler trait for DataDevice events.
The functions defined in this trait are called as DataDevice events are received from the compositor.
Required Methods§
Sourcefn enter(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
x: f64,
y: f64,
wl_surface: &WlSurface,
)
fn enter( &mut self, conn: &Connection, qh: &QueueHandle<Self>, data_device: &WlDataDevice, x: f64, y: f64, wl_surface: &WlSurface, )
The data device pointer has entered a surface at the provided location
Sourcefn leave(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
)
fn leave( &mut self, conn: &Connection, qh: &QueueHandle<Self>, data_device: &WlDataDevice, )
The drag and drop pointer has left the surface and the session ends. The offer will be destroyed unless it was previously dropped. In the case of a dropped offer, the client must destroy it manually after it is finished.
Sourcefn motion(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
x: f64,
y: f64,
)
fn motion( &mut self, conn: &Connection, qh: &QueueHandle<Self>, data_device: &WlDataDevice, x: f64, y: f64, )
Drag and Drop motion.
Sourcefn selection(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
)
fn selection( &mut self, conn: &Connection, qh: &QueueHandle<Self>, data_device: &WlDataDevice, )
Advertises a new selection.
Sourcefn drop_performed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
data_device: &WlDataDevice,
)
fn drop_performed( &mut self, conn: &Connection, qh: &QueueHandle<Self>, data_device: &WlDataDevice, )
Drop performed. After the next data offer action event, data may be able to be received, unless the action is “ask”.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.