1
0
Fork 0
forked from wry/wry

autocommit 2022-01-02 15:13:33 CET

This commit is contained in:
Julian Orth 2022-01-02 15:13:33 +01:00
commit d6172b273f
50 changed files with 5807 additions and 0 deletions

View file

@ -0,0 +1,47 @@
mod types;
use crate::objects::{Interface, Object, ObjectError, ObjectId};
use crate::utils::buffd::WlParser;
use crate::wl_client::DynEventFormatter;
use std::rc::Rc;
use types::*;
const DONE: u32 = 0;
pub struct WlCallback {
id: ObjectId,
}
impl WlCallback {
pub fn new(id: ObjectId) -> Self {
Self { id }
}
pub fn done(self: &Rc<Self>) -> DynEventFormatter {
Box::new(Done { obj: self.clone() })
}
async fn handle_request_(
&self,
_request: u32,
_parser: WlParser<'_, '_>,
) -> Result<(), ObjectError> {
unreachable!();
}
}
handle_request!(WlCallback);
impl Object for WlCallback {
fn id(&self) -> ObjectId {
self.id
}
fn interface(&self) -> Interface {
Interface::WlCallback
}
fn num_requests(&self) -> u32 {
0
}
}