PhoshWlBuffer

PhoshWlBuffer — A wayland buffer

Functions

Types and Values

Description

A buffer received from the Wayland compositor containing image data.

Functions

phosh_wl_buffer_new ()

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

phosh_wl_buffer_destroy ()

void
phosh_wl_buffer_destroy (PhoshWlBuffer *self);

phosh_wl_buffer_get_size ()

gsize
phosh_wl_buffer_get_size (PhoshWlBuffer *self);

phosh_wl_buffer_get_bytes ()

GBytes *
phosh_wl_buffer_get_bytes (PhoshWlBuffer *self);

Parameters

self

The PhoshWlBuffer

 

Returns

A copy of data as GBytes.

[transfer full]

Types and Values

PhoshWlBuffer

typedef struct {
  void              *data;
  uint32_t           width, height, stride;
  enum wl_shm_format format;
} PhoshWlBuffer;

A buffer received from the Wayland compositor containing image data.

Members

void *data;

The actual data

 

uint32_t width;

The buffer width in pixels

 

uint32_t height;

The buffer height in pixels

 

uint32_t stride;

The buffer stride in bytes

 

enum wl_shm_format format;

The buffer format