3 static void draw_win(wt_widget *w, struct wt_graphics *gfx);
4 static void use_theme(wt_widget *w, struct wt_theme *theme);
6 wt_widget *wt_window(wt_widget *par, const char *title, int style, int x, int y, int xsz, int ysz)
10 if(!(w = wt_alloc_widget(par))) {
13 w->type = WT_TYPE_WINDOW;
14 wt_set_text(w, title);
16 wt_resize(w, xsz, ysz);
19 use_theme(w, wt->theme);
23 static void draw_win(wt_widget *w, struct wt_graphics *gfx)
26 wt_gfx_fillrect(&w->rect);
29 static void use_theme(wt_widget *w, struct wt_theme *theme)
31 w->draw = theme && theme->draw_window ? theme->draw_window : draw_win;