screen_attach_pixmap_buffer()

Associate an externally allocated buffer with a pixmap

Synopsis:

#include <screen/screen.h>
int screen_attach_pixmap_buffer(screen_pixmap_t pix,
                                screen_buffer_t buf)

Arguments:

pix
The handle of a pixmap that does not already have a buffer created or associated to it.
buf
A buffer that was allocated by the application.

Library:

libscreen

Description:

Function Type: Flushing Execution

This function can be used to force a pixmap to use a buffer that was allocated by the application. Since pixmaps can have only one buffer, it's not possible to call this function or screen_create_pixmap_buffer() more than once. Whoever allocates the buffer is required to meet all alignment and granularity constraints required for the usage flags. The buffer buf must have been created with the function screen_create_buffer(), screen_create_pixmap_buffer(), or screen_create_window_buffers().

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).