Screen window types

Updated: May 27, 2022

Types of windows that can be created

Synopsis:

#include <screen/screen.h>
enum {
    SCREEN_APPLICATION_WINDOW = 0,
    SCREEN_CHILD_WINDOW = 1,
    SCREEN_EMBEDDED_WINDOW = 2,
    SCREEN_ROOT_WINDOW = 4
};

Data:

SCREEN_APPLICATION_WINDOW
The window type that's used to display the main application.

Its x and y coordinates are always relative to the dimensions of the display.

SCREEN_CHILD_WINDOW
The window type that's commonly used to display a dialog.

You must add a child window to an application's window group; otherwise, the child window is invisible. A child window's display properties are relative to the application window to which it belongs. For example, the x and y coordinates of the child window are all relative to the top left corner of the application window. This window type has its property, SCREEN_PROPERTY_FLOATING, defaulted to indicate that the window is floating.

SCREEN_EMBEDDED_WINDOW
The window type that's used to embed a window control within an object.

Like the child window, the x and y coordinates of the embedded window are all relative to the top left corner of the application window. You must add an embedded window to an application's window group; otherwise, the embedded window is invisible. This window type has its property, SCREEN_PROPERTY_FLOATING, defaulted to indicate that the window is non-floating.

SCREEN_ROOT_WINDOW
The flag that's used to indicate that the window is responsible for consuming the content of all windows in its group.

Screen performs compositing with the root window, but won't composite any window below the root window. This flag must be used in a logical OR expression with one of the Screen window types.

Library:

libscreen