autocommit 2022-01-29 15:55:49 CET
This commit is contained in:
parent
3d7c8ccdbf
commit
11d3604de4
40 changed files with 576 additions and 180 deletions
|
|
@ -1,3 +1,5 @@
|
|||
pub mod org_kde_kwin_server_decoration;
|
||||
pub mod org_kde_kwin_server_decoration_manager;
|
||||
pub mod wl_buffer;
|
||||
pub mod wl_callback;
|
||||
pub mod wl_compositor;
|
||||
|
|
|
|||
93
src/ifs/org_kde_kwin_server_decoration/mod.rs
Normal file
93
src/ifs/org_kde_kwin_server_decoration/mod.rs
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
use crate::client::{Client, DynEventFormatter};
|
||||
use crate::object::{Interface, Object, ObjectId};
|
||||
use crate::utils::buffd::MsgParser;
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
pub use types::*;
|
||||
|
||||
mod types;
|
||||
|
||||
const RELEASE: u32 = 0;
|
||||
const REQUEST_MODE: u32 = 1;
|
||||
|
||||
const MODE: u32 = 0;
|
||||
|
||||
#[allow(dead_code)]
|
||||
const NONE: u32 = 0;
|
||||
#[allow(dead_code)]
|
||||
const CLIENT: u32 = 1;
|
||||
const SERVER: u32 = 2;
|
||||
|
||||
id!(OrgKdeKwinServerDecorationId);
|
||||
|
||||
pub struct OrgKdeKwinServerDecoration {
|
||||
id: OrgKdeKwinServerDecorationId,
|
||||
client: Rc<Client>,
|
||||
requested: Cell<bool>,
|
||||
}
|
||||
|
||||
impl OrgKdeKwinServerDecoration {
|
||||
pub fn new(id: OrgKdeKwinServerDecorationId, client: &Rc<Client>) -> Self {
|
||||
Self {
|
||||
id,
|
||||
client: client.clone(),
|
||||
requested: Cell::new(false),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn mode(self: &Rc<Self>, mode: u32) -> DynEventFormatter {
|
||||
Box::new(Mode {
|
||||
obj: self.clone(),
|
||||
mode,
|
||||
})
|
||||
}
|
||||
|
||||
fn release(&self, parser: MsgParser<'_, '_>) -> Result<(), ReleaseError> {
|
||||
let _req: Release = self.client.parse(self, parser)?;
|
||||
self.client.remove_obj(self)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn request_mode(self: &Rc<Self>, parser: MsgParser<'_, '_>) -> Result<(), RequestModeError> {
|
||||
let req: RequestMode = self.client.parse(&**self, parser)?;
|
||||
if req.mode > SERVER {
|
||||
return Err(RequestModeError::InvalidMode(req.mode));
|
||||
}
|
||||
let mode = if self.requested.replace(true) {
|
||||
req.mode
|
||||
} else {
|
||||
SERVER
|
||||
};
|
||||
self.client.event(self.mode(mode));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_request_(
|
||||
self: &Rc<Self>,
|
||||
request: u32,
|
||||
parser: MsgParser<'_, '_>,
|
||||
) -> Result<(), OrgKdeKwinServerDecorationError> {
|
||||
match request {
|
||||
RELEASE => self.release(parser)?,
|
||||
REQUEST_MODE => self.request_mode(parser)?,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
handle_request!(OrgKdeKwinServerDecoration);
|
||||
|
||||
impl Object for OrgKdeKwinServerDecoration {
|
||||
fn id(&self) -> ObjectId {
|
||||
self.id.into()
|
||||
}
|
||||
|
||||
fn interface(&self) -> Interface {
|
||||
Interface::OrgKdeKwinServerDecoration
|
||||
}
|
||||
|
||||
fn num_requests(&self) -> u32 {
|
||||
REQUEST_MODE + 1
|
||||
}
|
||||
}
|
||||
86
src/ifs/org_kde_kwin_server_decoration/types.rs
Normal file
86
src/ifs/org_kde_kwin_server_decoration/types.rs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
use crate::client::{ClientError, EventFormatter, RequestParser};
|
||||
use crate::ifs::org_kde_kwin_server_decoration::{OrgKdeKwinServerDecoration, MODE};
|
||||
use crate::object::Object;
|
||||
use crate::utils::buffd::{MsgFormatter, MsgParser, MsgParserError};
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::rc::Rc;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum OrgKdeKwinServerDecorationError {
|
||||
#[error("Could not process a `release` request")]
|
||||
ReleaseError(#[from] ReleaseError),
|
||||
#[error("Could not process a `request_mode` request")]
|
||||
RequestModeError(#[from] RequestModeError),
|
||||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(OrgKdeKwinServerDecorationError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ReleaseError {
|
||||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
#[error("Parsing failed")]
|
||||
ParseError(#[source] Box<MsgParserError>),
|
||||
}
|
||||
efrom!(ReleaseError, ClientError);
|
||||
efrom!(ReleaseError, ParseError, MsgParserError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum RequestModeError {
|
||||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
#[error("Parsing failed")]
|
||||
ParseError(#[source] Box<MsgParserError>),
|
||||
#[error("Mode {0} does not exist")]
|
||||
InvalidMode(u32),
|
||||
}
|
||||
efrom!(RequestModeError, ClientError);
|
||||
efrom!(RequestModeError, ParseError, MsgParserError);
|
||||
|
||||
pub(super) struct Release;
|
||||
impl RequestParser<'_> for Release {
|
||||
fn parse(_parser: &mut MsgParser<'_, '_>) -> Result<Self, MsgParserError> {
|
||||
Ok(Self)
|
||||
}
|
||||
}
|
||||
impl Debug for Release {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "release()")
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) struct RequestMode {
|
||||
pub mode: u32,
|
||||
}
|
||||
impl RequestParser<'_> for RequestMode {
|
||||
fn parse(parser: &mut MsgParser<'_, '_>) -> Result<Self, MsgParserError> {
|
||||
Ok(Self {
|
||||
mode: parser.uint()?,
|
||||
})
|
||||
}
|
||||
}
|
||||
impl Debug for RequestMode {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "request_mode(mode: {})", self.mode)
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) struct Mode {
|
||||
pub obj: Rc<OrgKdeKwinServerDecoration>,
|
||||
pub mode: u32,
|
||||
}
|
||||
impl EventFormatter for Mode {
|
||||
fn format(self: Box<Self>, fmt: &mut MsgFormatter<'_>) {
|
||||
fmt.header(self.obj.id, MODE).uint(self.mode);
|
||||
}
|
||||
fn obj(&self) -> &dyn Object {
|
||||
&*self.obj
|
||||
}
|
||||
}
|
||||
impl Debug for Mode {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "mode(mode: {})", self.mode)
|
||||
}
|
||||
}
|
||||
119
src/ifs/org_kde_kwin_server_decoration_manager/mod.rs
Normal file
119
src/ifs/org_kde_kwin_server_decoration_manager/mod.rs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
use crate::client::{Client, DynEventFormatter};
|
||||
use crate::globals::{Global, GlobalName};
|
||||
use crate::ifs::org_kde_kwin_server_decoration::OrgKdeKwinServerDecoration;
|
||||
use crate::object::{Interface, Object, ObjectId};
|
||||
use crate::utils::buffd::MsgParser;
|
||||
use std::rc::Rc;
|
||||
pub use types::*;
|
||||
|
||||
mod types;
|
||||
|
||||
const CREATE: u32 = 0;
|
||||
|
||||
const DEFAULT_MODE: u32 = 0;
|
||||
|
||||
#[allow(dead_code)]
|
||||
const NONE: u32 = 0;
|
||||
#[allow(dead_code)]
|
||||
const CLIENT: u32 = 1;
|
||||
const SERVER: u32 = 2;
|
||||
|
||||
id!(OrgKdeKwinServerDecorationManagerGlobalId);
|
||||
|
||||
pub struct OrgKdeKwinServerDecorationManagerGlobal {
|
||||
name: GlobalName,
|
||||
}
|
||||
impl OrgKdeKwinServerDecorationManagerGlobal {
|
||||
pub fn new(name: GlobalName) -> Self {
|
||||
Self { name }
|
||||
}
|
||||
|
||||
fn bind_(
|
||||
self: Rc<Self>,
|
||||
id: OrgKdeKwinServerDecorationManagerGlobalId,
|
||||
client: &Rc<Client>,
|
||||
version: u32,
|
||||
) -> Result<(), OrgKdeKwinServerDecorationManagerError> {
|
||||
let obj = Rc::new(OrgKdeKwinServerDecorationManagerObj {
|
||||
id,
|
||||
client: client.clone(),
|
||||
_version: version,
|
||||
});
|
||||
client.add_client_obj(&obj)?;
|
||||
client.event(obj.default_mode(SERVER));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
bind!(OrgKdeKwinServerDecorationManagerGlobal);
|
||||
|
||||
impl Global for OrgKdeKwinServerDecorationManagerGlobal {
|
||||
fn name(&self) -> GlobalName {
|
||||
self.name
|
||||
}
|
||||
|
||||
fn singleton(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn interface(&self) -> Interface {
|
||||
Interface::OrgKdeKwinServerDecorationManager
|
||||
}
|
||||
|
||||
fn version(&self) -> u32 {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OrgKdeKwinServerDecorationManagerObj {
|
||||
id: OrgKdeKwinServerDecorationManagerGlobalId,
|
||||
client: Rc<Client>,
|
||||
_version: u32,
|
||||
}
|
||||
|
||||
impl OrgKdeKwinServerDecorationManagerObj {
|
||||
fn default_mode(self: &Rc<Self>, mode: u32) -> DynEventFormatter {
|
||||
Box::new(DefaultMode {
|
||||
obj: self.clone(),
|
||||
mode,
|
||||
})
|
||||
}
|
||||
|
||||
fn create(&self, parser: MsgParser<'_, '_>) -> Result<(), CreateError> {
|
||||
let req: Create = self.client.parse(self, parser)?;
|
||||
let _ = self.client.get_surface(req.surface)?;
|
||||
let obj = Rc::new(OrgKdeKwinServerDecoration::new(req.id, &self.client));
|
||||
self.client.add_client_obj(&obj)?;
|
||||
self.client.event(obj.mode(SERVER));
|
||||
log::info!("ayo");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn handle_request_(
|
||||
self: &Rc<Self>,
|
||||
request: u32,
|
||||
parser: MsgParser<'_, '_>,
|
||||
) -> Result<(), OrgKdeKwinServerDecorationManagerError> {
|
||||
match request {
|
||||
CREATE => self.create(parser)?,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
handle_request!(OrgKdeKwinServerDecorationManagerObj);
|
||||
|
||||
impl Object for OrgKdeKwinServerDecorationManagerObj {
|
||||
fn id(&self) -> ObjectId {
|
||||
self.id.into()
|
||||
}
|
||||
|
||||
fn interface(&self) -> Interface {
|
||||
Interface::OrgKdeKwinServerDecorationManager
|
||||
}
|
||||
|
||||
fn num_requests(&self) -> u32 {
|
||||
CREATE + 1
|
||||
}
|
||||
}
|
||||
70
src/ifs/org_kde_kwin_server_decoration_manager/types.rs
Normal file
70
src/ifs/org_kde_kwin_server_decoration_manager/types.rs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
use crate::client::{ClientError, EventFormatter, RequestParser};
|
||||
use crate::ifs::org_kde_kwin_server_decoration::OrgKdeKwinServerDecorationId;
|
||||
use crate::ifs::org_kde_kwin_server_decoration_manager::{
|
||||
OrgKdeKwinServerDecorationManagerObj, DEFAULT_MODE,
|
||||
};
|
||||
use crate::ifs::wl_surface::WlSurfaceId;
|
||||
use crate::object::Object;
|
||||
use crate::utils::buffd::{MsgFormatter, MsgParser, MsgParserError};
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::rc::Rc;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum OrgKdeKwinServerDecorationManagerError {
|
||||
#[error("Could not process a `create` request")]
|
||||
CreateError(#[from] CreateError),
|
||||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(
|
||||
OrgKdeKwinServerDecorationManagerError,
|
||||
ClientError,
|
||||
ClientError
|
||||
);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreateError {
|
||||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
#[error("Parsing failed")]
|
||||
ParseError(#[source] Box<MsgParserError>),
|
||||
}
|
||||
efrom!(CreateError, ClientError);
|
||||
efrom!(CreateError, ParseError, MsgParserError);
|
||||
|
||||
pub(super) struct Create {
|
||||
pub id: OrgKdeKwinServerDecorationId,
|
||||
pub surface: WlSurfaceId,
|
||||
}
|
||||
impl RequestParser<'_> for Create {
|
||||
fn parse(parser: &mut MsgParser<'_, '_>) -> Result<Self, MsgParserError> {
|
||||
Ok(Self {
|
||||
id: parser.object()?,
|
||||
surface: parser.object()?,
|
||||
})
|
||||
}
|
||||
}
|
||||
impl Debug for Create {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "create(id: {}, surface: {})", self.id, self.surface)
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) struct DefaultMode {
|
||||
pub obj: Rc<OrgKdeKwinServerDecorationManagerObj>,
|
||||
pub mode: u32,
|
||||
}
|
||||
impl EventFormatter for DefaultMode {
|
||||
fn format(self: Box<Self>, fmt: &mut MsgFormatter<'_>) {
|
||||
fmt.header(self.obj.id, DEFAULT_MODE).uint(self.mode);
|
||||
}
|
||||
fn obj(&self) -> &dyn Object {
|
||||
&*self.obj
|
||||
}
|
||||
}
|
||||
impl Debug for DefaultMode {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "default_mode(mode: {})", self.mode)
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ pub enum WlBufferError {
|
|||
#[error("GLES could not import the client image")]
|
||||
GlesError(#[source] Box<RenderError>),
|
||||
}
|
||||
efrom!(WlBufferError, ClientMemError, ClientMemError);
|
||||
efrom!(WlBufferError, ClientMemError);
|
||||
efrom!(WlBufferError, GlesError, RenderError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
@ -32,7 +32,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
pub(super) struct Destroy;
|
||||
impl RequestParser<'_> for Destroy {
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ pub enum WlCompositorError {
|
|||
CreateRegionError(#[source] Box<CreateRegionError>),
|
||||
}
|
||||
|
||||
efrom!(WlCompositorError, ClientError, ClientError);
|
||||
efrom!(WlCompositorError, CreateSurfaceError, CreateSurfaceError);
|
||||
efrom!(WlCompositorError, CreateRegionError, CreateRegionError);
|
||||
efrom!(WlCompositorError, ClientError);
|
||||
efrom!(WlCompositorError, CreateSurfaceError);
|
||||
efrom!(WlCompositorError, CreateRegionError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreateSurfaceError {
|
||||
|
|
@ -28,7 +28,7 @@ pub enum CreateSurfaceError {
|
|||
}
|
||||
|
||||
efrom!(CreateSurfaceError, ParseFailed, MsgParserError);
|
||||
efrom!(CreateSurfaceError, ClientError, ClientError);
|
||||
efrom!(CreateSurfaceError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreateRegionError {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ pub enum WlDataDeviceError {
|
|||
#[error("Could not process `release` request")]
|
||||
ReleaseError(#[from] ReleaseError),
|
||||
}
|
||||
efrom!(WlDataDeviceError, ClientError, ClientError);
|
||||
efrom!(WlDataDeviceError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum StartDragError {
|
||||
|
|
@ -31,7 +31,7 @@ pub enum StartDragError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(StartDragError, ParseFailed, MsgParserError);
|
||||
efrom!(StartDragError, ClientError, ClientError);
|
||||
efrom!(StartDragError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetSelectionError {
|
||||
|
|
@ -41,7 +41,7 @@ pub enum SetSelectionError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetSelectionError, ParseFailed, MsgParserError);
|
||||
efrom!(SetSelectionError, ClientError, ClientError);
|
||||
efrom!(SetSelectionError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ReleaseError {
|
||||
|
|
@ -51,7 +51,7 @@ pub enum ReleaseError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ReleaseError, ParseFailed, MsgParserError);
|
||||
efrom!(ReleaseError, ClientError, ClientError);
|
||||
efrom!(ReleaseError, ClientError);
|
||||
|
||||
pub(super) struct StartDrag {
|
||||
pub source: WlDataSourceId,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ pub enum WlDataDeviceManagerError {
|
|||
#[error("Could not process `get_data_device` request")]
|
||||
GetDataDeviceError(#[from] GetDataDeviceError),
|
||||
}
|
||||
efrom!(WlDataDeviceManagerError, ClientError, ClientError);
|
||||
efrom!(WlDataDeviceManagerError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreateDataSourceError {
|
||||
|
|
@ -25,7 +25,7 @@ pub enum CreateDataSourceError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(CreateDataSourceError, ParseFailed, MsgParserError);
|
||||
efrom!(CreateDataSourceError, ClientError, ClientError);
|
||||
efrom!(CreateDataSourceError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GetDataDeviceError {
|
||||
|
|
@ -35,7 +35,7 @@ pub enum GetDataDeviceError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(GetDataDeviceError, ParseFailed, MsgParserError);
|
||||
efrom!(GetDataDeviceError, ClientError, ClientError);
|
||||
efrom!(GetDataDeviceError, ClientError);
|
||||
|
||||
pub(super) struct CreateDataSource {
|
||||
pub id: WlDataSourceId,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ pub enum WlDataOfferError {
|
|||
#[error("Could not process `set_actions` request")]
|
||||
SetActionsError(#[from] SetActionsError),
|
||||
}
|
||||
efrom!(WlDataOfferError, ClientError, ClientError);
|
||||
efrom!(WlDataOfferError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum AcceptError {
|
||||
|
|
@ -33,7 +33,7 @@ pub enum AcceptError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(AcceptError, ParseFailed, MsgParserError);
|
||||
efrom!(AcceptError, ClientError, ClientError);
|
||||
efrom!(AcceptError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ReceiveError {
|
||||
|
|
@ -43,7 +43,7 @@ pub enum ReceiveError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ReceiveError, ParseFailed, MsgParserError);
|
||||
efrom!(ReceiveError, ClientError, ClientError);
|
||||
efrom!(ReceiveError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -53,7 +53,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum FinishError {
|
||||
|
|
@ -63,7 +63,7 @@ pub enum FinishError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(FinishError, ParseFailed, MsgParserError);
|
||||
efrom!(FinishError, ClientError, ClientError);
|
||||
efrom!(FinishError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetActionsError {
|
||||
|
|
@ -73,7 +73,7 @@ pub enum SetActionsError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetActionsError, ParseFailed, MsgParserError);
|
||||
efrom!(SetActionsError, ClientError, ClientError);
|
||||
efrom!(SetActionsError, ClientError);
|
||||
|
||||
pub(super) struct Accept<'a> {
|
||||
pub serial: u32,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ pub enum WlDataSourceError {
|
|||
#[error("Could not process `set_actions` request")]
|
||||
SetActionsError(#[from] SetActionsError),
|
||||
}
|
||||
efrom!(WlDataSourceError, ClientError, ClientError);
|
||||
efrom!(WlDataSourceError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum OfferError {
|
||||
|
|
@ -31,7 +31,7 @@ pub enum OfferError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(OfferError, ParseFailed, MsgParserError);
|
||||
efrom!(OfferError, ClientError, ClientError);
|
||||
efrom!(OfferError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -41,7 +41,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetActionsError {
|
||||
|
|
@ -51,7 +51,7 @@ pub enum SetActionsError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetActionsError, ParseFailed, MsgParserError);
|
||||
efrom!(SetActionsError, ClientError, ClientError);
|
||||
efrom!(SetActionsError, ClientError);
|
||||
|
||||
pub(super) struct Offer<'a> {
|
||||
pub mime_type: &'a BStr,
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ use thiserror::Error;
|
|||
#[derive(Debug, Error)]
|
||||
pub enum WlDisplayError {
|
||||
#[error("Could not process a get_registry request")]
|
||||
GetRegistry(#[source] Box<GetRegistryError>),
|
||||
GetRegistryError(#[source] Box<GetRegistryError>),
|
||||
#[error("A client error occurred")]
|
||||
SyncError(#[source] Box<SyncError>),
|
||||
}
|
||||
|
||||
efrom!(WlDisplayError, GetRegistry, GetRegistryError);
|
||||
efrom!(WlDisplayError, SyncError, SyncError);
|
||||
efrom!(WlDisplayError, GetRegistryError);
|
||||
efrom!(WlDisplayError, SyncError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GetRegistryError {
|
||||
|
|
@ -31,8 +31,8 @@ pub enum GetRegistryError {
|
|||
}
|
||||
|
||||
efrom!(GetRegistryError, ParseFailed, MsgParserError);
|
||||
efrom!(GetRegistryError, GlobalError, GlobalError);
|
||||
efrom!(GetRegistryError, ClientError, ClientError);
|
||||
efrom!(GetRegistryError, GlobalError);
|
||||
efrom!(GetRegistryError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SyncError {
|
||||
|
|
@ -43,7 +43,7 @@ pub enum SyncError {
|
|||
}
|
||||
|
||||
efrom!(SyncError, ParseFailed, MsgParserError);
|
||||
efrom!(SyncError, ClientError, ClientError);
|
||||
efrom!(SyncError, ClientError);
|
||||
|
||||
pub(super) struct GetRegistry {
|
||||
pub registry: WlRegistryId,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use std::ffi::CString;
|
||||
use crate::client::{Client, DynEventFormatter};
|
||||
use crate::globals::{Global, GlobalName};
|
||||
use crate::object::{Interface, Object, ObjectId};
|
||||
use crate::utils::buffd::MsgParser;
|
||||
use std::ffi::CString;
|
||||
use std::rc::Rc;
|
||||
pub use types::*;
|
||||
|
||||
|
|
@ -85,9 +85,7 @@ impl WlDrmObj {
|
|||
}
|
||||
|
||||
fn authenticated(self: &Rc<Self>) -> DynEventFormatter {
|
||||
Box::new(Authenticated {
|
||||
obj: self.clone(),
|
||||
})
|
||||
Box::new(Authenticated { obj: self.clone() })
|
||||
}
|
||||
|
||||
fn capabilities(self: &Rc<Self>, value: u32) -> DynEventFormatter {
|
||||
|
|
@ -108,7 +106,10 @@ impl WlDrmObj {
|
|||
Err(CreateBufferError::Unsupported)
|
||||
}
|
||||
|
||||
fn create_planar_buffer(self: &Rc<Self>, parser: MsgParser<'_, '_>) -> Result<(), CreatePlanarBufferError> {
|
||||
fn create_planar_buffer(
|
||||
self: &Rc<Self>,
|
||||
parser: MsgParser<'_, '_>,
|
||||
) -> Result<(), CreatePlanarBufferError> {
|
||||
let _req: CreatePlanarBuffer = self.client.parse(&**self, parser)?;
|
||||
Err(CreatePlanarBufferError::Unsupported)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
use std::ffi::CString;
|
||||
use crate::client::{ClientError, EventFormatter, RequestParser};
|
||||
use crate::ifs::wl_buffer::WlBufferId;
|
||||
use crate::ifs::wl_drm::{WlDrmObj, AUTHENTICATED, CAPABILITIES, DEVICE, FORMAT};
|
||||
use crate::object::Object;
|
||||
use crate::utils::buffd::{MsgFormatter, MsgParser, MsgParserError};
|
||||
use std::ffi::CString;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::rc::Rc;
|
||||
use thiserror::Error;
|
||||
use crate::ifs::wl_drm::{AUTHENTICATED, CAPABILITIES, DEVICE, FORMAT, WlDrmObj};
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum WlDrmError {
|
||||
|
|
@ -19,7 +19,7 @@ pub enum WlDrmError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(WlDrmError, ClientError, ClientError);
|
||||
efrom!(WlDrmError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum AuthenticateError {
|
||||
|
|
@ -162,8 +162,7 @@ pub(super) struct Format {
|
|||
}
|
||||
impl EventFormatter for Format {
|
||||
fn format(self: Box<Self>, fmt: &mut MsgFormatter<'_>) {
|
||||
fmt.header(self.obj.id, FORMAT)
|
||||
.uint(self.format);
|
||||
fmt.header(self.obj.id, FORMAT).uint(self.format);
|
||||
}
|
||||
fn obj(&self) -> &dyn Object {
|
||||
&*self.obj
|
||||
|
|
@ -171,11 +170,7 @@ impl EventFormatter for Format {
|
|||
}
|
||||
impl Debug for Format {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"format(format: {})",
|
||||
self.format,
|
||||
)
|
||||
write!(f, "format(format: {})", self.format,)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -192,10 +187,7 @@ impl EventFormatter for Authenticated {
|
|||
}
|
||||
impl Debug for Authenticated {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"authenticated()",
|
||||
)
|
||||
write!(f, "authenticated()",)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -205,8 +197,7 @@ pub(super) struct Capabilities {
|
|||
}
|
||||
impl EventFormatter for Capabilities {
|
||||
fn format(self: Box<Self>, fmt: &mut MsgFormatter<'_>) {
|
||||
fmt.header(self.obj.id, CAPABILITIES)
|
||||
.uint(self.value);
|
||||
fmt.header(self.obj.id, CAPABILITIES).uint(self.value);
|
||||
}
|
||||
fn obj(&self) -> &dyn Object {
|
||||
&*self.obj
|
||||
|
|
@ -214,10 +205,6 @@ impl EventFormatter for Capabilities {
|
|||
}
|
||||
impl Debug for Capabilities {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"capabilities(value: {})",
|
||||
self.value,
|
||||
)
|
||||
write!(f, "capabilities(value: {})", self.value,)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ pub enum WlOutputError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(WlOutputError, ClientError, ClientError);
|
||||
efrom!(WlOutputError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ReleaseError {
|
||||
|
|
@ -22,7 +22,7 @@ pub enum ReleaseError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ReleaseError, ClientError, ClientError);
|
||||
efrom!(ReleaseError, ClientError);
|
||||
efrom!(ReleaseError, ParseError, MsgParserError);
|
||||
|
||||
pub(super) struct Release;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum AddError {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub enum WlRegistryError {
|
|||
BindError(#[source] Box<BindError>),
|
||||
}
|
||||
|
||||
efrom!(WlRegistryError, BindError, BindError);
|
||||
efrom!(WlRegistryError, BindError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum BindError {
|
||||
|
|
@ -44,7 +44,7 @@ pub struct VersionError {
|
|||
}
|
||||
|
||||
efrom!(BindError, ParseError, MsgParserError);
|
||||
efrom!(BindError, GlobalError, GlobalError);
|
||||
efrom!(BindError, GlobalError);
|
||||
|
||||
pub(super) struct GlobalE {
|
||||
pub obj: Rc<WlRegistry>,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use crate::backend::{KeyState, OutputId, ScrollAxis, Seat, SeatEvent};
|
|||
use crate::client::{Client, ClientId, DynEventFormatter};
|
||||
use crate::fixed::Fixed;
|
||||
use crate::globals::{Global, GlobalName};
|
||||
use crate::ifs::wl_seat::wl_keyboard::{REPEAT_INFO_SINCE, WlKeyboard, WlKeyboardId};
|
||||
use crate::ifs::wl_seat::wl_keyboard::{WlKeyboard, WlKeyboardId, REPEAT_INFO_SINCE};
|
||||
use crate::ifs::wl_seat::wl_pointer::{WlPointer, WlPointerId, POINTER_FRAME_SINCE_VERSION};
|
||||
use crate::ifs::wl_seat::wl_touch::WlTouch;
|
||||
use crate::ifs::wl_surface::xdg_surface::xdg_toplevel::{XdgToplevel, XdgToplevelId};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub enum WlSeatError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(WlSeatError, ClientError, ClientError);
|
||||
efrom!(WlSeatError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GetPointerError {
|
||||
|
|
@ -31,7 +31,7 @@ pub enum GetPointerError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(GetPointerError, ClientError, ClientError);
|
||||
efrom!(GetPointerError, ClientError);
|
||||
efrom!(GetPointerError, ParseError, MsgParserError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
@ -43,7 +43,7 @@ pub enum GetKeyboardError {
|
|||
#[error(transparent)]
|
||||
WlKeyboardError(Box<WlKeyboardError>),
|
||||
}
|
||||
efrom!(GetKeyboardError, ClientError, ClientError);
|
||||
efrom!(GetKeyboardError, ClientError);
|
||||
efrom!(GetKeyboardError, ParseError, MsgParserError);
|
||||
efrom!(GetKeyboardError, WlKeyboardError, WlKeyboardError);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ pub enum WlPointerError {
|
|||
#[error("Could not process a `release` request")]
|
||||
ReleaseError(#[from] ReleaseError),
|
||||
}
|
||||
efrom!(WlPointerError, ClientError, ClientError);
|
||||
efrom!(WlPointerError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetCursorError {
|
||||
|
|
@ -30,7 +30,7 @@ pub enum SetCursorError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetCursorError, ParseError, MsgParserError);
|
||||
efrom!(SetCursorError, ClientError, ClientError);
|
||||
efrom!(SetCursorError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ReleaseError {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ pub enum WlTouchError {
|
|||
#[error("Could not process a `release` request")]
|
||||
ReleaseError(#[from] ReleaseError),
|
||||
}
|
||||
efrom!(WlTouchError, ClientError, ClientError);
|
||||
efrom!(WlTouchError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ReleaseError {
|
||||
|
|
@ -20,7 +20,7 @@ pub enum ReleaseError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ReleaseError, ParseError, MsgParserError);
|
||||
efrom!(ReleaseError, ClientError, ClientError);
|
||||
efrom!(ReleaseError, ClientError);
|
||||
|
||||
pub(super) struct Release;
|
||||
impl RequestParser<'_> for Release {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ pub enum WlShmError {
|
|||
#[error("Could not process a `create_pool` request")]
|
||||
CreatePoolError(#[from] CreatePoolError),
|
||||
}
|
||||
efrom!(WlShmError, ClientError, ClientError);
|
||||
efrom!(WlShmError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreatePoolError {
|
||||
|
|
@ -30,8 +30,8 @@ pub enum CreatePoolError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(CreatePoolError, ParseError, MsgParserError);
|
||||
efrom!(CreatePoolError, WlShmPoolError, WlShmPoolError);
|
||||
efrom!(CreatePoolError, ClientError, ClientError);
|
||||
efrom!(CreatePoolError, WlShmPoolError);
|
||||
efrom!(CreatePoolError, ClientError);
|
||||
|
||||
pub(super) struct CreatePool {
|
||||
pub id: WlShmPoolId,
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ pub enum WlShmPoolError {
|
|||
#[error(transparent)]
|
||||
ClientMemError(Box<ClientMemError>),
|
||||
}
|
||||
efrom!(WlShmPoolError, ClientError, ClientError);
|
||||
efrom!(WlShmPoolError, ClientMemError, ClientMemError);
|
||||
efrom!(WlShmPoolError, ClientError);
|
||||
efrom!(WlShmPoolError, ClientMemError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreateBufferError {
|
||||
|
|
@ -35,8 +35,8 @@ pub enum CreateBufferError {
|
|||
WlBufferError(Box<WlBufferError>),
|
||||
}
|
||||
efrom!(CreateBufferError, ParseError, MsgParserError);
|
||||
efrom!(CreateBufferError, ClientError, ClientError);
|
||||
efrom!(CreateBufferError, WlBufferError, WlBufferError);
|
||||
efrom!(CreateBufferError, ClientError);
|
||||
efrom!(CreateBufferError, WlBufferError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -46,7 +46,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseError, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ResizeError {
|
||||
|
|
@ -60,7 +60,7 @@ pub enum ResizeError {
|
|||
ClientMemError(Box<ClientMemError>),
|
||||
}
|
||||
efrom!(ResizeError, ParseError, MsgParserError);
|
||||
efrom!(ResizeError, ClientMemError, ClientMemError);
|
||||
efrom!(ResizeError, ClientMemError);
|
||||
|
||||
pub(super) struct CreateBuffer {
|
||||
pub id: WlBufferId,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub enum WlSubcompositorError {
|
|||
#[error("Could not process `get_subsurface` request")]
|
||||
GetSubsurfaceError(#[from] GetSubsurfaceError),
|
||||
}
|
||||
efrom!(WlSubcompositorError, ClientError, ClientError);
|
||||
efrom!(WlSubcompositorError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -24,7 +24,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GetSubsurfaceError {
|
||||
|
|
@ -36,7 +36,7 @@ pub enum GetSubsurfaceError {
|
|||
SubsurfaceError(Box<WlSubsurfaceError>),
|
||||
}
|
||||
efrom!(GetSubsurfaceError, ParseFailed, MsgParserError);
|
||||
efrom!(GetSubsurfaceError, ClientError, ClientError);
|
||||
efrom!(GetSubsurfaceError, ClientError);
|
||||
efrom!(GetSubsurfaceError, SubsurfaceError, WlSubsurfaceError);
|
||||
|
||||
pub(super) struct Destroy;
|
||||
|
|
|
|||
|
|
@ -37,21 +37,21 @@ pub enum WlSurfaceError {
|
|||
new: SurfaceRole,
|
||||
},
|
||||
}
|
||||
efrom!(WlSurfaceError, ClientError, ClientError);
|
||||
efrom!(WlSurfaceError, DestroyError, DestroyError);
|
||||
efrom!(WlSurfaceError, AttachError, AttachError);
|
||||
efrom!(WlSurfaceError, DamageError, DamageError);
|
||||
efrom!(WlSurfaceError, FrameError, FrameError);
|
||||
efrom!(WlSurfaceError, SetOpaqueRegionError, SetOpaqueRegionError);
|
||||
efrom!(WlSurfaceError, SetInputRegionError, SetInputRegionError);
|
||||
efrom!(WlSurfaceError, CommitError, CommitError);
|
||||
efrom!(WlSurfaceError, ClientError);
|
||||
efrom!(WlSurfaceError, DestroyError);
|
||||
efrom!(WlSurfaceError, AttachError);
|
||||
efrom!(WlSurfaceError, DamageError);
|
||||
efrom!(WlSurfaceError, FrameError);
|
||||
efrom!(WlSurfaceError, SetOpaqueRegionError);
|
||||
efrom!(WlSurfaceError, SetInputRegionError);
|
||||
efrom!(WlSurfaceError, CommitError);
|
||||
efrom!(
|
||||
WlSurfaceError,
|
||||
SetBufferTransformError,
|
||||
SetBufferTransformError
|
||||
);
|
||||
efrom!(WlSurfaceError, SetBufferScaleError, SetBufferScaleError);
|
||||
efrom!(WlSurfaceError, DamageBufferError, DamageBufferError);
|
||||
efrom!(WlSurfaceError, SetBufferScaleError);
|
||||
efrom!(WlSurfaceError, DamageBufferError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -63,7 +63,7 @@ pub enum DestroyError {
|
|||
ReloObjectStillExists,
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum AttachError {
|
||||
|
|
@ -73,7 +73,7 @@ pub enum AttachError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(AttachError, ParseFailed, MsgParserError);
|
||||
efrom!(AttachError, ClientError, ClientError);
|
||||
efrom!(AttachError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DamageError {
|
||||
|
|
@ -90,7 +90,7 @@ pub enum FrameError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(FrameError, ParseFailed, MsgParserError);
|
||||
efrom!(FrameError, ClientError, ClientError);
|
||||
efrom!(FrameError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetOpaqueRegionError {
|
||||
|
|
@ -100,7 +100,7 @@ pub enum SetOpaqueRegionError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetOpaqueRegionError, ParseFailed, MsgParserError);
|
||||
efrom!(SetOpaqueRegionError, ClientError, ClientError);
|
||||
efrom!(SetOpaqueRegionError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetInputRegionError {
|
||||
|
|
@ -110,7 +110,7 @@ pub enum SetInputRegionError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetInputRegionError, ParseFailed, MsgParserError);
|
||||
efrom!(SetInputRegionError, ClientError, ClientError);
|
||||
efrom!(SetInputRegionError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CommitError {
|
||||
|
|
@ -121,9 +121,9 @@ pub enum CommitError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(CommitError, WlSurfaceError, WlSurfaceError);
|
||||
efrom!(CommitError, WlSurfaceError);
|
||||
efrom!(CommitError, ParseFailed, MsgParserError);
|
||||
efrom!(CommitError, ClientError, ClientError);
|
||||
efrom!(CommitError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetBufferTransformError {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ pub enum WlSubsurfaceError {
|
|||
#[error(transparent)]
|
||||
WlSurfaceError(Box<WlSurfaceError>),
|
||||
}
|
||||
efrom!(WlSubsurfaceError, WlSurfaceError, WlSurfaceError);
|
||||
efrom!(WlSubsurfaceError, WlSurfaceError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -39,7 +39,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetPositionError {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ pub enum XdgSurfaceError {
|
|||
#[error(transparent)]
|
||||
WlSurfaceError(Box<WlSurfaceError>),
|
||||
}
|
||||
efrom!(XdgSurfaceError, WlSurfaceError, WlSurfaceError);
|
||||
efrom!(XdgSurfaceError, WlSurfaceError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -39,7 +39,7 @@ pub enum DestroyError {
|
|||
RoleNotYetDestroyed(XdgSurfaceId),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GetToplevelError {
|
||||
|
|
@ -53,8 +53,8 @@ pub enum GetToplevelError {
|
|||
WlSurfaceError(Box<WlSurfaceError>),
|
||||
}
|
||||
efrom!(GetToplevelError, ParseFailed, MsgParserError);
|
||||
efrom!(GetToplevelError, ClientError, ClientError);
|
||||
efrom!(GetToplevelError, WlSurfaceError, WlSurfaceError);
|
||||
efrom!(GetToplevelError, ClientError);
|
||||
efrom!(GetToplevelError, WlSurfaceError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GetPopupError {
|
||||
|
|
@ -68,8 +68,8 @@ pub enum GetPopupError {
|
|||
WlSurfaceError(Box<WlSurfaceError>),
|
||||
}
|
||||
efrom!(GetPopupError, ParseFailed, MsgParserError);
|
||||
efrom!(GetPopupError, ClientError, ClientError);
|
||||
efrom!(GetPopupError, WlSurfaceError, WlSurfaceError);
|
||||
efrom!(GetPopupError, ClientError);
|
||||
efrom!(GetPopupError, WlSurfaceError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetWindowGeometryError {
|
||||
|
|
@ -81,7 +81,7 @@ pub enum SetWindowGeometryError {
|
|||
NonPositiveWidthHeight,
|
||||
}
|
||||
efrom!(SetWindowGeometryError, ParseFailed, MsgParserError);
|
||||
efrom!(SetWindowGeometryError, ClientError, ClientError);
|
||||
efrom!(SetWindowGeometryError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum AckConfigureError {
|
||||
|
|
@ -91,7 +91,7 @@ pub enum AckConfigureError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(AckConfigureError, ParseFailed, MsgParserError);
|
||||
efrom!(AckConfigureError, ClientError, ClientError);
|
||||
efrom!(AckConfigureError, ClientError);
|
||||
|
||||
pub(super) struct Destroy;
|
||||
impl RequestParser<'_> for Destroy {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GrabError {
|
||||
|
|
@ -38,7 +38,7 @@ pub enum GrabError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(GrabError, ParseFailed, MsgParserError);
|
||||
efrom!(GrabError, ClientError, ClientError);
|
||||
efrom!(GrabError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum RepositionError {
|
||||
|
|
@ -48,7 +48,7 @@ pub enum RepositionError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(RepositionError, ParseFailed, MsgParserError);
|
||||
efrom!(RepositionError, ClientError, ClientError);
|
||||
efrom!(RepositionError, ClientError);
|
||||
|
||||
pub(super) struct Destroy;
|
||||
impl RequestParser<'_> for Destroy {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseFailed, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetParentError {
|
||||
|
|
@ -59,7 +59,7 @@ pub enum SetParentError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetParentError, ParseFailed, MsgParserError);
|
||||
efrom!(SetParentError, ClientError, ClientError);
|
||||
efrom!(SetParentError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetTitleError {
|
||||
|
|
@ -69,7 +69,7 @@ pub enum SetTitleError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetTitleError, ParseFailed, MsgParserError);
|
||||
efrom!(SetTitleError, ClientError, ClientError);
|
||||
efrom!(SetTitleError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetAppIdError {
|
||||
|
|
@ -79,7 +79,7 @@ pub enum SetAppIdError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetAppIdError, ParseFailed, MsgParserError);
|
||||
efrom!(SetAppIdError, ClientError, ClientError);
|
||||
efrom!(SetAppIdError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ShowWindowMenuError {
|
||||
|
|
@ -89,7 +89,7 @@ pub enum ShowWindowMenuError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ShowWindowMenuError, ParseFailed, MsgParserError);
|
||||
efrom!(ShowWindowMenuError, ClientError, ClientError);
|
||||
efrom!(ShowWindowMenuError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum MoveError {
|
||||
|
|
@ -99,7 +99,7 @@ pub enum MoveError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(MoveError, ParseFailed, MsgParserError);
|
||||
efrom!(MoveError, ClientError, ClientError);
|
||||
efrom!(MoveError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ResizeError {
|
||||
|
|
@ -109,7 +109,7 @@ pub enum ResizeError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ResizeError, ParseFailed, MsgParserError);
|
||||
efrom!(ResizeError, ClientError, ClientError);
|
||||
efrom!(ResizeError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetMaxSizeError {
|
||||
|
|
@ -119,7 +119,7 @@ pub enum SetMaxSizeError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetMaxSizeError, ParseFailed, MsgParserError);
|
||||
efrom!(SetMaxSizeError, ClientError, ClientError);
|
||||
efrom!(SetMaxSizeError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetMinSizeError {
|
||||
|
|
@ -129,7 +129,7 @@ pub enum SetMinSizeError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetMinSizeError, ParseFailed, MsgParserError);
|
||||
efrom!(SetMinSizeError, ClientError, ClientError);
|
||||
efrom!(SetMinSizeError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetMaximizedError {
|
||||
|
|
@ -139,7 +139,7 @@ pub enum SetMaximizedError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetMaximizedError, ParseFailed, MsgParserError);
|
||||
efrom!(SetMaximizedError, ClientError, ClientError);
|
||||
efrom!(SetMaximizedError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum UnsetMaximizedError {
|
||||
|
|
@ -149,7 +149,7 @@ pub enum UnsetMaximizedError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(UnsetMaximizedError, ParseFailed, MsgParserError);
|
||||
efrom!(UnsetMaximizedError, ClientError, ClientError);
|
||||
efrom!(UnsetMaximizedError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetFullscreenError {
|
||||
|
|
@ -159,7 +159,7 @@ pub enum SetFullscreenError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(SetFullscreenError, ParseFailed, MsgParserError);
|
||||
efrom!(SetFullscreenError, ClientError, ClientError);
|
||||
efrom!(SetFullscreenError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum UnsetFullscreenError {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseError, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum SetSizeError {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub enum XdgWmBaseError {
|
|||
#[error("Could not process a `pong` request")]
|
||||
PongError(#[from] PongError),
|
||||
}
|
||||
efrom!(XdgWmBaseError, ClientError, ClientError);
|
||||
efrom!(XdgWmBaseError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -34,7 +34,7 @@ pub enum DestroyError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ParseError, MsgParserError);
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreatePositionerError {
|
||||
|
|
@ -44,7 +44,7 @@ pub enum CreatePositionerError {
|
|||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(CreatePositionerError, ParseError, MsgParserError);
|
||||
efrom!(CreatePositionerError, ClientError, ClientError);
|
||||
efrom!(CreatePositionerError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum GetXdgSurfaceError {
|
||||
|
|
@ -56,8 +56,8 @@ pub enum GetXdgSurfaceError {
|
|||
XdgSurfaceError(Box<XdgSurfaceError>),
|
||||
}
|
||||
efrom!(GetXdgSurfaceError, ParseError, MsgParserError);
|
||||
efrom!(GetXdgSurfaceError, ClientError, ClientError);
|
||||
efrom!(GetXdgSurfaceError, XdgSurfaceError, XdgSurfaceError);
|
||||
efrom!(GetXdgSurfaceError, ClientError);
|
||||
efrom!(GetXdgSurfaceError, XdgSurfaceError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum PongError {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub enum ZwpLinuxBufferParamsV1Error {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ZwpLinuxBufferParamsV1Error, ClientError, ClientError);
|
||||
efrom!(ZwpLinuxBufferParamsV1Error, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -31,7 +31,7 @@ pub enum DestroyError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
efrom!(DestroyError, ParseError, MsgParserError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
@ -47,7 +47,7 @@ pub enum AddError {
|
|||
#[error("The plane {0} was already set")]
|
||||
AlreadySet(u32),
|
||||
}
|
||||
efrom!(AddError, ClientError, ClientError);
|
||||
efrom!(AddError, ClientError);
|
||||
efrom!(AddError, ParseError, MsgParserError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
@ -63,7 +63,7 @@ pub enum DoCreateError {
|
|||
#[error("Could not import the buffer")]
|
||||
ImportError(#[from] RenderError),
|
||||
}
|
||||
efrom!(DoCreateError, ClientError, ClientError);
|
||||
efrom!(DoCreateError, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum CreateError {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ pub enum ZwpLinuxDmabufV1Error {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(ZwpLinuxDmabufV1Error, ClientError, ClientError);
|
||||
efrom!(ZwpLinuxDmabufV1Error, ClientError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum DestroyError {
|
||||
|
|
@ -25,7 +25,7 @@ pub enum DestroyError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(DestroyError, ClientError, ClientError);
|
||||
efrom!(DestroyError, ClientError);
|
||||
efrom!(DestroyError, ParseError, MsgParserError);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
@ -35,7 +35,7 @@ pub enum CreateParamsError {
|
|||
#[error(transparent)]
|
||||
ClientError(Box<ClientError>),
|
||||
}
|
||||
efrom!(CreateParamsError, ClientError, ClientError);
|
||||
efrom!(CreateParamsError, ClientError);
|
||||
efrom!(CreateParamsError, ParseError, MsgParserError);
|
||||
|
||||
pub(super) struct Destroy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue