pub enum Request {
    CreateBuffer {
        id: NewObject<WlBuffer>,
        offset: i32,
        width: i32,
        height: i32,
        stride: i32,
        format: Enum<Format>,
    },
    Destroy,
    Resize {
        size: i32,
    },
}

Variants§

§

CreateBuffer

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

§id: NewObject<WlBuffer>

buffer to create

§offset: i32

buffer byte offset within the pool

§width: i32

buffer width, in pixels

§height: i32

buffer height, in pixels

§stride: i32

number of bytes from the beginning of one row to the beginning of the next row

§format: Enum<Format>

buffer pixel format

§

Destroy

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.

§

Resize

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

§size: i32

new size of the pool, in bytes

Trait Implementations§

source§

impl Debug for Request

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromArgs for Request

source§

fn from_args(op: u16, args: Vec<Arg>) -> Result<Self, Error>

Consumes |args| creates an instance of self.
source§

impl MessageType for Request

source§

fn log(&self, this: ObjectId) -> String

Generates a string suitable for protocol logging this message.
source§

fn message_name(&self) -> &'static CStr

Returns a static CStr reference that describes the interface/method of this message. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V