pub enum AppMessage {
Show 13 variants
Hello {
version: u16,
},
Ring,
CreateSurface {
surface: SurfaceId,
opaque: bool,
formats: Vec<DmabufFormat>,
},
DestroySurface {
surface: SurfaceId,
},
Frame {
sequence: u64,
offset: u64,
len: u32,
},
Released {
surface: SurfaceId,
generation: u32,
buffer: u32,
},
RegisterImage {
image: ImageId,
width: u32,
height: u32,
format: ImageFormat,
alpha: AlphaType,
},
DropImage {
image: ImageId,
},
RegisterFontFile {
font: FontId,
path: String,
index: u32,
},
RegisterFontData {
font: FontId,
index: u32,
},
DropFont {
font: FontId,
},
Presented {
surface: SurfaceId,
sequence: u64,
presented_ns: u64,
refresh_ns: u64,
discarded: bool,
},
RegisterCatalogFont {
font: FontId,
sha256: String,
index: u32,
},
}Expand description
What an app sends.
Variants§
Hello
The first message, with the ring’s memfd. version is the newest the
app speaks.
Ring
A new ring, with its memfd, replacing the current one; sent only when the service holds no frame of the old one (a frame outgrew it).
CreateSurface
A surface the app renders through the service. formats are the
linear formats the compositor accepts from this app; opaque says
whether the surface ignores alpha.
DestroySurface
Frame
Frame sequence of a surface is the record at offset..offset + len
in the ring.
Released
The compositor released buffer of surface: the service may draw
into it again.
RegisterImage
An image’s pixels, in the sealed memfd that comes with this message, tightly packed.
DropImage
RegisterFontFile
A font from the shared read-only view, by its path there.
RegisterFontData
A font the app holds in memory, in the sealed memfd that comes with this message.
DropFont
Presented
The compositor presented (or discarded) frame sequence; for the
app’s frame timeline in the service.
RegisterCatalogFont
A file of the product font catalog, by the SHA-256 its manifest pins (lowercase hex), from the digests the service’s welcome lists. Every process names a catalog face the same way wherever its own namespace put the catalog, and the service maps its own copy of the file.
Trait Implementations§
Source§impl Clone for AppMessage
impl Clone for AppMessage
Source§impl Debug for AppMessage
impl Debug for AppMessage
Source§impl<'de> Deserialize<'de> for AppMessage
impl<'de> Deserialize<'de> for AppMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for AppMessage
impl PartialEq for AppMessage
Source§impl Serialize for AppMessage
impl Serialize for AppMessage
impl StructuralPartialEq for AppMessage
Auto Trait Implementations§
impl Forget for AppMessage
impl Freeze for AppMessage
impl Move for AppMessage
impl RefUnwindSafe for AppMessage
impl Send for AppMessage
impl Sync for AppMessage
impl Unpin for AppMessage
impl UnsafeUnpin for AppMessage
impl UnwindSafe for AppMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more