screen_join_window_group()

Cause a window to join a window group.

Synopsis:

#include <screen/screen.h>
 
int screen_join_window_group(screen_window_t win, const char *name)

Arguments:

win

The handle for the window that is to join the group. This window must have been created with screen_create_window_type() with a type of either SCREEN_CHILD_WINDOW or SCREEN_EMBEDDED_WINDOW.

name

A unique string that identifies the group. This string must have been communicated down from the parent window.

Library:

libscreen

Description:

Function Type: Delayed Execution

This function is used to add a window to a group. Child and embedded windows will remain invisible until they're properly parented.

Until the window joins a group, a window of any type behaves like an application window. The window's positioning and visibility are not relative to any other window on the display. In order to join a group parented by an application window, a window must have a type of SCREEN_CHILD_WINDOW or SCREEN_EMBEDDED_WINDOW. Windows with a type of SCREEN_EMBEDDED_WINDOW can join only groups parented by windows of type SCREEN_CHILD_WINDOW.

Once a window successfully joins a group, its position on the screen will be relative to the parent. The type of the window determines exactly how the window will be positioned. Child windows are positioned relative to their parent (i.e., their window position is added to the parent's window position. Embedded windows are positioned relative to the source viewport of the parent.

Windows in a group inherit the visibility and the global transparency of their parent.

Returns:

0 if the request for the window joining the specified group was queued, or -1 if an error occurred (errno is set).