.TH TICKIT_WINDOW_NEW 3 .SH NAME tickit_window_new \- create a new sub-window .SH SYNOPSIS .EX .B #include .sp .BI "TickitWindow *tickit_window_new(TickitWindow *" parent ", TickitRect " rect , .BI " TickitWindowFlags " flags ); .EE .sp Link with \fI\-ltickit\fP. .SH DESCRIPTION \fBtickit_window_new\fP() creates a new sub-window as a child of the given parent, using the given rectangle as its initial geometry relative to its parent. The \fIflags\fP argument is a bitmask of flags influencing the initial behaviour of the child window. .in .TP .B TICKIT_WINDOW_HIDDEN The new child window will be created in the hidden state initially. No pending expose event will occur because of it. It can later be shown by calling \fBtickit_window_show\fP(3). .TP .B TICKIT_WINDOW_LOWEST Normally the most recently-added child window is ordered at the top of the list in its parent, making it appear front-most in the display. This flag causes it to be added at the bottom of the list, appearing lowest-most instead. .TP .B TICKIT_WINDOW_ROOT_PARENT The new child window will have the root window of the window tree as its parent, instead of the given window. The position will be automatically adjusted so that the new window still appears at the given geometry position relative to the window passed as the \fIparent\fP argument. .TP .B TICKIT_WINDOW_STEAL_INPUT The new child window will initially be set to steal input events; see \fBtickit_window_set_steal_input\fP(3). .IP This flag is not useful when combined with \fBTICKIT_WINDOW_LOWEST\fP, as the input-stealing behaviour only applies while the window is front-most within its parent. .TP .B TICKIT_WINDOW_POPUP A convenient shortcut to specifying both \fBTICKIT_WINDOW_ROOT_PARENT\fP and \fBTICKIT_WINDOW_STEAL_INPUT\fP flags. This is useful for implementing popup dialog windows, menus, and other such UI behaviours. .PP The reference count of a newly-constructed window instance will be one. This can be incremented or decremented using \fBtickit_window_ref\fP(3) and \fBtickit_window_unref\fP(3). When its reference count reaches zero it is destroyed. .SH "RETURN VALUE" If successful, \fBtickit_window_new\fP() returns a pointer to the new instance. .SH "SEE ALSO" .BR tickit_window_new_root (3), .BR tickit_window_bind_event (3), .BR tickit_window_expose (3), .BR tickit_window_close (3), .BR tickit_window (7), .BR tickit (7)