screen_attach_pixmap_buffer()

Associate an externally allocated buffer with a pixmap

Function type:

Flushing execution

Synopsis:

#include <screen/screen.h>

int screen_attach_pixmap_buffer( screen_pixmap_t pix, 
                                 screen_buffer_t buf );

Arguments:

pix
A valid handle for a pixmap that doesn’t have a buffer associated or created for it already.
buf
A buffer that was allocated by the application.

Library:

screen

Description:

This function can be used to force a pixmap to use a buffer that was allocated by the application. Pixmaps can have only one buffer. Therefore calling screen_attach_pixmap_buffer() or screen_create_pixmap_buffer() more than once is not allowed. Whoever allocates the buffer is required to meet all alignment and granularity constraints required for the usage flags. Buffers cannot be detached from pixmaps.

Returns:

If the function succeeds, it returns 0 and the specified buffer will be used by the composited windowing system. Otherwise, the function returns -1 and errno is set.

Classification:

Windowing API

Safety  Value  
Interrupt handler No
Signal handler No
Thread Yes