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 is 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.

Returns:

0 if the buffer was used by the specified pixmap, or -1 if an error occurred (errno is set).