void _twin_clock_init (twin_clock_t *clock, twin_box_t *parent, twin_dispatch_proc_t dispatch) { static const twin_widget_layout_t preferred = { 0, 0, 1, 1 }; _twin_widget_init (&clock->widget, parent, 0, preferred, dispatch); clock->timeout = twin_set_timeout (_twin_clock_timeout, _twin_clock_interval(), clock); }
void _twin_box_init (twin_box_t *box, twin_box_t *parent, twin_window_t *window, twin_box_dir_t dir, twin_dispatch_proc_t dispatch) { static twin_widget_layout_t preferred = { 0, 0, 0, 0 }; _twin_widget_init (&box->widget, parent, window, preferred, dispatch); box->dir = dir; box->children = NULL; box->button_down = NULL; box->focus = NULL; }