### Function

# Phosh WlBuffer new

#### Declaration [src]

    PhoshWlBuffer*
    phosh_wl_buffer_new (
      wl_shm_format format,
      uint32_t width,
      uint32_t height,
      uint32_t stride
    )

#### Description [src]

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

This function is not directly available to language bindings.

#### Parameters

`format`

  Type: `wl_shm_format`

  The buffer format.

`width`

  Type: `uint32_t`

  The buffer’s width in pixels.

`height`

  Type: `uint32_t`

  The buffer’s height in lines.

`stride`

  Type: `uint32_t`

  The buffer’s stride in bytes.

#### Return value

Type: `PhoshWlBuffer`

The new buffer.

The data is owned by the called function.