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

@ -4,21 +4,12 @@ use crate::object::Object;
use crate::utils::buffd::MsgParser;
use std::ffi::CString;
use std::rc::Rc;
use bstr::ByteSlice;
pub use types::*;
use crate::wire::wl_drm::*;
mod types;
id!(WlDrmId);
const AUTHENTICATE: u32 = 0;
const CREATE_BUFFER: u32 = 1;
const CREATE_PLANAR_BUFFER: u32 = 2;
const DEVICE: u32 = 0;
const FORMAT: u32 = 1;
const AUTHENTICATED: u32 = 2;
const CAPABILITIES: u32 = 3;
const PRIME: u32 = 1;
pub struct WlDrmGlobal {
@ -72,19 +63,19 @@ pub struct WlDrm {
impl WlDrm {
fn device(self: &Rc<Self>, device: &Rc<CString>) -> DynEventFormatter {
Box::new(Device {
obj: self.clone(),
name: device.clone(),
Box::new(DeviceOut {
self_id: self.id,
name: device.as_bytes().as_bstr().to_owned(),
})
}
fn authenticated(self: &Rc<Self>) -> DynEventFormatter {
Box::new(Authenticated { obj: self.clone() })
Box::new(Authenticated { self_id: self.id })
}
fn capabilities(self: &Rc<Self>, value: u32) -> DynEventFormatter {
Box::new(Capabilities {
obj: self.clone(),
self_id: self.id,
value,
})
}