screen_create_display()

Graphics and Screen4.0 (8.x)Screen Graphics Subsystem Developer's GuideAPIProgrammingUtilities

Create a virtual display

Synopsis:

#include <screen/screen.h>
int screen_create_display(screen_display_t *pdisp,
                          screen_context_t cxt,
                          screen_display_mode_t *mode)

Arguments:

pdisp
A pointer to the address where the handle for the created display can be stored.
cxt
The handle of the context in which the virtual display is to be created. This context must have been created with the context type of SCREEN_DISPLAY_MANAGER_CONTEXT or SCREEN_WINDOW_MANAGER_CONTEXT using screen_create_context().
mode
A pointer to the buffer that contains the display mode.

Library:

libscreen

Description:

Function Type: Immediate Execution

This function creates a virtual display as specified by the provided mode. If the SCREEN_DISPLAY_MODE_FORMAT_VALID flag is set, then mode.format is used. You need to set both the mode.width and mode.height in your mode structure. If the SCREEN_DISPLAY_MODE_REFRESH_VALID flag is set, then mode.refresh is used.

Returns:

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

Page updated: