autocommit 2022-01-04 15:30:21 CET
This commit is contained in:
parent
30376c595c
commit
cbbc41a463
40 changed files with 725 additions and 189 deletions
|
|
@ -12,13 +12,15 @@ pub use types::*;
|
|||
const CREATE_SURFACE: u32 = 0;
|
||||
const CREATE_REGION: u32 = 1;
|
||||
|
||||
id!(WlCompositorId);
|
||||
|
||||
pub struct WlCompositorGlobal {
|
||||
name: GlobalName,
|
||||
}
|
||||
|
||||
pub struct WlCompositorObj {
|
||||
global: Rc<WlCompositorGlobal>,
|
||||
id: ObjectId,
|
||||
id: WlCompositorId,
|
||||
client: Rc<Client>,
|
||||
version: u32,
|
||||
}
|
||||
|
|
@ -30,7 +32,7 @@ impl WlCompositorGlobal {
|
|||
|
||||
async fn bind_(
|
||||
self: Rc<Self>,
|
||||
id: ObjectId,
|
||||
id: WlCompositorId,
|
||||
client: &Rc<Client>,
|
||||
version: u32,
|
||||
) -> Result<(), WlCompositorError> {
|
||||
|
|
@ -98,7 +100,7 @@ handle_request!(WlCompositorObj);
|
|||
|
||||
impl Object for WlCompositorObj {
|
||||
fn id(&self) -> ObjectId {
|
||||
self.id
|
||||
self.id.into()
|
||||
}
|
||||
|
||||
fn interface(&self) -> Interface {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
use crate::client::{ClientError, RequestParser};
|
||||
use crate::object::ObjectId;
|
||||
use crate::ifs::wl_region::WlRegionId;
|
||||
use crate::ifs::wl_surface::WlSurfaceId;
|
||||
use crate::utils::buffd::{MsgParser, MsgParserError};
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use thiserror::Error;
|
||||
|
|
@ -41,7 +42,7 @@ efrom!(CreateRegionError, ParseFailed, MsgParserError);
|
|||
efrom!(CreateRegionError, ClientError, ClientError);
|
||||
|
||||
pub(super) struct CreateSurface {
|
||||
pub id: ObjectId,
|
||||
pub id: WlSurfaceId,
|
||||
}
|
||||
impl RequestParser<'_> for CreateSurface {
|
||||
fn parse(parser: &mut MsgParser<'_, '_>) -> Result<Self, MsgParserError> {
|
||||
|
|
@ -57,7 +58,7 @@ impl Debug for CreateSurface {
|
|||
}
|
||||
|
||||
pub(super) struct CreateRegion {
|
||||
pub id: ObjectId,
|
||||
pub id: WlRegionId,
|
||||
}
|
||||
impl RequestParser<'_> for CreateRegion {
|
||||
fn parse(parser: &mut MsgParser<'_, '_>) -> Result<Self, MsgParserError> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue