pub enum Request {
CreateBuffer {
id: NewResource<WlBuffer>,
offset: i32,
width: i32,
height: i32,
stride: i32,
format: Format,
},
Destroy,
Resize {
size: i32,
},
}
create a buffer from the pool
Create a wl_buffer object from the pool.
The buffer is created offset bytes into the pool and has
width and height as specified. The stride argument specifies
the number of bytes from the beginning of one row to the beginning
of the next. The format is the pixel format of the buffer and
must be one of those advertised through the wl_shm.format event.
A buffer will keep a reference to the pool it was created from
so it is valid to destroy the pool immediately after creating
a buffer from it.
Fields of CreateBuffer
destroy the pool
Destroy the shared memory pool.
The mmapped memory will be released when all
buffers that have been created from this pool
are gone.
This is a destructor, once received this object cannot be used any longer.
change the size of the pool mapping
This request will cause the server to remap the backing memory
for the pool from the file descriptor passed when the pool was
created, but using the new size. This request can only be
used to make the pool bigger.
Fields of Resize
Wire representation of this MessageGroup
The wrapper type for ObjectMap allowing the mapping of Object and NewId arguments to the object map during parsing. Read more
Whether this message is a destructor Read more
The opcode of this message
Retrieve the child Object
associated with this message if any
Construct a message from its raw representation
Turn this message into its raw representation
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Convert Box<Trait>
(where Trait: Downcast
) to Box<Any>
. Box<Any>
can then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot generate &Any
's vtable from &Trait
's. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot generate &mut Any
's vtable from &mut Trait
's. Read more