screen_create_context()

Establish a connection with the composited windowing system.

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. The value must be of type Screen context types.

Library:

libscreen

Description:

Function type: Immediate Execution

The screen_create_context() function tries to establish communication with the composited windowing system resource manager (Screen). To do this, the function opens /dev/screen and sends the proper connect sequence. If the call succeeds, memory is allocated to store context state. The composition manager then creates an event queue and associates it with the connecting process.

Returns:

0 if the context was created, or -1 if an error occurred (errno is set; refer to /usr/include/errno.h for more details).