screen_flush_context()

Flush a context, given a context and a set of flags

Synopsis:

#include <screen/screen.h>
int screen_flush_context(screen_context_t ctx,
                         int flags)

Arguments:

ctx
The connection to Screen that is to be flushed. This context must have been created with screen_create_context().
flags
The indication of how you want this function to behave. Valid values for this parameter are:
  • SCREEN_WAIT_IDLE: When you use SCREEN_WAIT_IDLE, this function blocks, and returns only after Screen has updated the contents of all affected displays.
  • 0: When you use 0, this function returns immediately; blits may not be completed.

Library:

libscreen

Description:

Function type: Apply Execution

This function flushes any delayed command and causes the contents of displays to be updated, when applicable.

If debugging, you can call this function after all delayed function calls as a way to determine the exact function call which may have caused an error.

Returns:

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