### Struct

# Phosh WlBuffer

since: 0

#### Description [src]

    struct PhoshWlBuffer {
      void* data;
      uint32_t width;
      uint32_t height;
      uint32_t stride;
      wl_shm_format format;
      wl_buffer* wl_buffer;
    }

A buffer received from the Wayland compositor containing image data.

###### Structure members

`data`

  The actual data.

`width`

  The buffer width in pixels.

`height`

  The buffer height in pixels.

`stride`

  The buffer stride in bytes.

`format`

  The buffer format.

`wl_buffer`
  No description available.

Available since: 0

#### Functions

###### phosh_wl_buffer_new

Creates a new memory buffer to be shared with the Wayland compositor.

since: 0

#### Instance methods

###### phosh_wl_buffer_destroy

Invokes `munmap` on the data and frees associated memory and data structures.

since: 0

###### phosh_wl_buffer_get_bytes

Get a copy of the buffer data.

since: 0

###### phosh_wl_buffer_get_size

Get the size of the buffer in bytes.

since: 0