screen_create_context()

Establish a connection with Screen

Synopsis:

#include <screen/screen.h>
int screen_create_context(screen_context_t *pctx,
                          int flags)

Arguments:

pctx
A pointer to a screen_context_t where a handle for the new context can be stored.
flags
The type of context to be created. This integer is a bitmask that represents the combination of Screen context types.

Library:

libscreen

Description:

Function type: Immediate Execution

This function establishes communication with Screen. This function opens /dev/screen and sends the proper connect sequence. If the call succeeds, memory is allocated to store the context state. Screen creates an event queue and associates it with the connecting process.

Returns:

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