Associate an externally allocated buffer with a pixmap.
#include <screen/screen.h>
int screen_attach_pixmap_buffer(screen_pixmap_t pix, screen_buffer_t buf)
The handle of a pixmap that does not already have a buffer created or associated to it.
A buffer that was allocated by the application.
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.
0 if the buffer was used by the specified pixmap, or -1 if an error occurred (errno is set).