screen_dequeue_window_render_buffer()
Graphics and Screen4.0 (8.x)Screen Graphics Subsystem Developer's GuideAPIProgrammingUtilities
Acquire the next available render buffer
Synopsis:
#include <screen/screen.h>
int screen_dequeue_window_render_buffer(screen_buffer_t *pbuf,
screen_window_t win,
int flags)
Arguments:
- pbuf
- A pointer to a location where this function will store a reference to the render buffer it finds.
- win
- The handle of a window from which a render buffer is to be obtained.
- flags
- The indication of how you want this function to behave. This integer is a bitmask that represents the combination of Screen flushing types:
- SCREEN_DONT_BLOCK: When you use SCREEN_DONT_BLOCK, this function returns immediately regardless of whether a render buffer is currently available. If there are no buffers available, the function returns with an
EWOULDBLOCK
error.
- SCREEN_DONT_BLOCK: When you use SCREEN_DONT_BLOCK, this function returns immediately regardless of whether a render buffer is currently available. If there are no buffers available, the function returns with an
Library:
libscreenDescription:
This function should be used instead of SCREEN_PROPERTY_RENDER_BUFFERS when screen_post_window() is called with the SCREEN_DONT_BLOCK flag. SCREEN_PROPERTY_RENDER_BUFFERS is not updated when screen_post_window() is called with the SCREEN_DONT_BLOCK flag. This function takes a buffer from the render buffers. The buffer will not be available as a render buffer again until one of the following occurs for the buffer:
- The producer calls screen_post_window() with the SCREEN_EXPLICIT_ENQUEUE flag, the producer calls screen_enqueue_render_buffer() and all consumers call screen_release_buffer().
- The producer calls screen_post_window() without the SCREEN_EXPLICIT_ENQUEUE flag and all consumers call screen_release_buffer.
- The producer does NOT call screen_post_window(). Instead, the producer simply calls screen_enqueue_render_buffer().
Returns:
0
if successful, or -1
if an error occurred (errno
is set; refer to errno.h
for more details).
Page updated: