1
0
Fork 0
forked from wry/wry
wry/src/wl_usr/usr_ifs/usr_wl_shm_pool.rs
2022-07-30 13:16:58 +02:00

32 lines
578 B
Rust

use {
crate::{
wire::{wl_shm_pool::*, WlShmPoolId},
wl_usr::{usr_object::UsrObject, UsrCon},
},
std::rc::Rc,
};
pub struct UsrWlShmPool {
pub id: WlShmPoolId,
pub con: Rc<UsrCon>,
}
impl UsrWlShmPool {
#[allow(dead_code)]
pub fn resize(&self, size: i32) {
self.con.request(Resize {
self_id: self.id,
size,
});
}
}
usr_object_base! {
UsrWlShmPool, WlShmPool;
}
impl UsrObject for UsrWlShmPool {
fn destroy(&self) {
self.con.request(Destroy { self_id: self.id });
}
}