screen_create_window_from_class()

Create a new window of a specified type based on a class

Synopsis:

#include <screen/screen.h>
int screen_create_window_from_class(screen_window_t *pwin,
                                    screen_context_t ctx,
                                    int type,
                                    const char *class_name)

Arguments:

pwin
A pointer to the newly created native window.
ctx
The connection to Screen. This context must have been created with screen_create_context().
type
The type of window to be created. type must be of type Screen window types.
class_name
The name of the class to create the window from. The class is defined in the configuration file and its properties will be applied to the window at creation time. An empty string will not apply any class. If class is NULL, it is equivalent to calling screen_create_window_type().

Library:

libscreen

Description:

Function Type: Immediate Execution

This function creates a window object of the specified type and applies a class's properties to it at creation time.

This function is associated with the preprocessor definition screen_create_window_from_class.

Returns:

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