chore: refresco desde el monorepo (pin tawasuyu.git v0.2.0)
1//! Various utilities functions and types
2
3mod geometry;
4pub mod signaling;
5
6#[cfg(feature = "x11rb_event_source")]
7pub mod x11rb;
8
9pub(crate) mod ids;
10pub mod user_data;
11
12pub(crate) mod alive_tracker;
13pub use self::alive_tracker::IsAlive;
14
15#[cfg(feature = "wayland_frontend")]
16pub(crate) mod iter;
17
18mod fd;
19pub use fd::*;
20
21mod sealed_file;
22pub use sealed_file::SealedFile;
23
24#[cfg(feature = "wayland_frontend")]
25pub(crate) use self::geometry::Client;
26pub use self::geometry::{
27 Buffer, Coordinate, Logical, Physical, Point, Raw, Rectangle, Scale, Size, Transform,
28};
29
30mod serial;
31pub use serial::*;
32
33mod clock;
34pub use clock::*;
35
36#[cfg(feature = "wayland_frontend")]
37pub(crate) mod hook;
38#[cfg(feature = "wayland_frontend")]
39pub use hook::HookId;
40
41/// This resource is not managed by Smithay
42#[derive(Debug)]
43pub struct UnmanagedResource;
44
45impl std::fmt::Display for UnmanagedResource {
46 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
47 f.write_str("This resource is not managed by Smithay.")
48 }
49}
50
51impl std::error::Error for UnmanagedResource {}
52
53/// This resource has been destroyed and can no longer be used.
54#[derive(Debug)]
55pub struct DeadResource;
56
57impl std::fmt::Display for DeadResource {
58 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
59 f.write_str("This resource has been destroyed and can no longer be used.")
60 }
61}
62
63impl std::error::Error for DeadResource {}