You can use the screen_create_window_type() function to create a
child window.
To create a child window:
-
Create a variable for each of the context and window instances.
screen_context_t screen_context = 0;
screen_window_t screen_child_window = 0;
-
Create a context. The context describes the relationship between the
application and the underlying windowing system.
screen_create_context(&screen_context, SCREEN_APPLICATION_CONTEXT);
-
Create a child window. The screen_create_window_type()
function takes the window and context variables and an integer representing the
window type. In this case, the window is of type
SCREEN_CHILD_WINDOW.
int wintype = SCREEN_CHILD_WINDOW;
screen_create_window_type(&screen_child_window, screen_context, wintype );
-
Join a window group. The window_group_name should be the name of the
window group created by the parent (or main) window through the screen_create_window_group() function.
screen_join_window_group(screen_child_window, window_group_name);