screen_create_pixmap_buffer()

Send a request to the composition manager to add a new buffer to a pixmap

Function type:

Flushing execution

Synopsis:

#include <screen/screen.h>

int screen_create_pixmap_buffer( screen_pixmap_t pix );

Arguments:

pix
The handle of the pixmap for which a new buffer will be allocated.

Library:

screen

Description:

Call this function to add a buffer to a pixmap. Pixmaps are restricted to a single buffer. No rendering can be performed onto the pixmap until a buffer has been created or attached. If the buffer size hasn’t been set explicitly, the buffer size will default to the first display’s size. Trying to change the buffer size or the usage once a buffer has already been allocated will result in an error. Additionally, trying to change the pixel format once the buffer has been added will also result in an error, unless the depth is identical, e.g. changing between RGBA8888 and RGBX8888. Also, a buffer cannot be created if a buffer was previously attached using screen_attach_pixmap_buffer().

Returns:

If the function succeeds, it returns 0 and a new pixmap buffer is created. Otherwise, the function returns -1 and errno is set.

Classification:

Windowing API

Safety  Value  
Interrupt handler No
Signal handler No
Thread Yes