screen_wait_post()

Add a wait for a post on a window

Synopsis:

#include <screen/screen.h>
int screen_wait_post(screen_window_t win, int flags)

Arguments:

win
The handle for the window whose post you are waiting on.
flags
The indication of how you want this function to behave. Valid values for this parameter are:

Library:

libscreen

Description:

Function Type: Immediate Execution

This call blocks until there is a post event for the window you are waiting on, unless SCREEN_DONT_BLOCK is specified.

This function is typically used in conjunction with screen_share_display_buffers() and/or screen_share_window_buffers(). When using either function, Screen sends a post event to the window you are waiting on (the consumer) after a buffer is posted to share or display by the producer. The SCREEN_PROPERTY_FRONT_BUFFER property contains the posted buffer, even if this buffer hasn't been displayed yet.

When SCREEN_DONT_BLOCK is specified, the function returns immediately instead of waiting for the next post to the window. In this case, SCREEN_PROPERTY_FRONT_BUFFER contains the most recently posted buffer. If no buffers have been posted to share or display, SCREEN_PROPERTY_FRONT_BUFFER is NULL.

Returns:

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

Page updated: