1
0
Fork 0
forked from wry/wry

autocommit 2022-02-06 03:46:03 CET

This commit is contained in:
Julian Orth 2022-02-06 03:46:03 +01:00
parent 59ce74681a
commit c92346324b
60 changed files with 1292 additions and 1958 deletions

View file

@ -8,23 +8,11 @@ use crate::object::Object;
use crate::utils::buffd::MsgParser;
use std::rc::Rc;
pub use types::*;
const START_DRAG: u32 = 0;
const SET_SELECTION: u32 = 1;
const RELEASE: u32 = 2;
const DATA_OFFER: u32 = 0;
const ENTER: u32 = 1;
const LEAVE: u32 = 2;
const MOTION: u32 = 4;
const DROP: u32 = 5;
const SELECTION: u32 = 5;
use crate::wire::wl_data_device::*;
#[allow(dead_code)]
const ROLE: u32 = 0;
id!(WlDataDeviceId);
pub struct WlDataDevice {
pub id: WlDataDeviceId,
pub manager: Rc<WlDataDeviceManager>,
@ -42,14 +30,14 @@ impl WlDataDevice {
pub fn data_offer(self: &Rc<Self>, id: WlDataOfferId) -> DynEventFormatter {
Box::new(DataOffer {
obj: self.clone(),
self_id: self.id,
id,
})
}
pub fn selection(self: &Rc<Self>, id: WlDataOfferId) -> DynEventFormatter {
Box::new(Selection {
obj: self.clone(),
self_id: self.id,
id,
})
}