screen_create_buffer()

Updated: October 26, 2022

Create a buffer handle that can later be attached to a window or a pixmap

Synopsis:

#include <screen/screen.h>
int screen_create_buffer(screen_buffer_t *pbuf)

Arguments:

pbuf
An address where the function can store a handle for the native buffer.

Library:

libscreen

Description:

Function Type: Immediate Execution

This function creates a buffer object, which describes memory where pixels can be drawn to or read from. Applications must use screen_destroy_buffer() when a buffer is no longer used.

Returns:

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