tickit_window_new - Man Page

create a new sub-window


#include <tickit.h>

TickitWindow *tickit_window_new(TickitWindow *parent, TickitRect rect,
         TickitWindowFlags flags);

Link with -ltickit.


tickit_window_new() 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 flags argument is a bitmask of flags influencing the initial behaviour of the child window.


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 tickit_window_show(3).


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.


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 parent argument.


The new child window will initially be set to steal input events; see tickit_window_set_steal_input(3).

This flag is not useful when combined with TICKIT_WINDOW_LOWEST, as the input-stealing behaviour only applies while the window is front-most within its parent.


A convenient shortcut to specifying both TICKIT_WINDOW_ROOT_PARENT and TICKIT_WINDOW_STEAL_INPUT flags. This is useful for implementing popup dialog windows, menus, and other such UI behaviours.

The reference count of a newly-constructed window instance will be one. This can be incremented or decremented using tickit_window_ref(3) and tickit_window_unref(3). When its reference count reaches zero it is destroyed.

Return Value

If successful, tickit_window_new() returns a pointer to the new instance.

See Also

tickit_window_new_root(3), tickit_window_bind_event(3), tickit_window_expose(3), tickit_window_close(3), tickit_window(7), tickit(7)

Referenced By

tickit(7), tickit_window(7), tickit_window_bind_event(3), tickit_window_children(3), tickit_window_close(3), tickit_window_destroy(3), tickit_window_expose(3), tickit_window_flush(3), tickit_window_get_abs_geometry(3), tickit_window_get_geometry(3), tickit_window_get_pen(3), tickit_window_new_root(3), tickit_window_parent(3), tickit_window_raise(3), tickit_window_ref(3), tickit_window_scroll(3), tickit_window_set_cursor_position(3), tickit_window_set_focus_child_notify(3), tickit_window_set_geometry(3), tickit_window_set_steal_input(3), tickit_window_show(3), tickit_window_take_focus(3).