screen_create_pixmap_buffer()

Updated: October 26, 2022

Send a request to Screen to create a new buffer for 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 creates a buffer for a pixmap.

Before calling this function, ensure that you set the following properties on the specified pixmap (pix): Setting the usage indicates 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).