#include <screen/screen.h> int screen_attach_pixmap_buffer( screen_pixmap_t pix, screen_buffer_t buf );
- A valid handle for a pixmap that doesn’t have a buffer associated or created for it already.
- A buffer that was allocated by the application.
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.
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.