screen_create_pixmap_buffer()

Send a request to Screen to add a new buffer to a pixmap

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

Library:

libscreen

Description:

Function Type: Flushing Execution

This function to adds a buffer to a pixmap. A buffer can't be created if a buffer was previously attached using screen_attach_pixmap_buffer().

Before calling this function, ensure that you set the SCREEN_PROPERTY_USAGE property on the pixmap to indicate your intended usage of the pixmap's buffer. For example, to retrieve SCREEN_PROPERTY_POINTER from the buffer, you must have set the SCREEN_PROPERTY_USAGE property to include the SCREEN_USAGE_READ and/or SCREEN_USAGE_WRITE flags on the pixmap prior to calling screen_create_pixmap_buffer().

Returns:

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