autocommit 2022-02-05 18:14:24 CET
This commit is contained in:
parent
2d8b3a200e
commit
3a4ae99b9a
71 changed files with 1626 additions and 1306 deletions
|
|
@ -2,7 +2,7 @@ mod types;
|
|||
|
||||
use crate::client::{Client, DynEventFormatter};
|
||||
use crate::globals::{Global, GlobalName};
|
||||
use crate::object::{Interface, Object, ObjectId};
|
||||
use crate::object::Object;
|
||||
use crate::utils::buffd::MsgParser;
|
||||
use std::rc::Rc;
|
||||
pub use types::*;
|
||||
|
|
@ -62,32 +62,18 @@ impl WlRegistry {
|
|||
global.bind(&self.client, bind.id, bind.version)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_request_(
|
||||
&self,
|
||||
request: u32,
|
||||
parser: MsgParser<'_, '_>,
|
||||
) -> Result<(), WlRegistryError> {
|
||||
match request {
|
||||
BIND => self.bind(parser)?,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
handle_request!(WlRegistry);
|
||||
object_base! {
|
||||
WlRegistry, WlRegistryError;
|
||||
|
||||
BIND => bind,
|
||||
}
|
||||
|
||||
impl Object for WlRegistry {
|
||||
fn id(&self) -> ObjectId {
|
||||
self.id.into()
|
||||
}
|
||||
|
||||
fn interface(&self) -> Interface {
|
||||
Interface::WlRegistry
|
||||
}
|
||||
|
||||
fn num_requests(&self) -> u32 {
|
||||
BIND + 1
|
||||
}
|
||||
}
|
||||
|
||||
simple_add_obj!(WlRegistry);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue