wt->root = 0;
}
+struct wt_theme *wt_load_theme(const char *path)
+{
+ return 0; /* TODO */
+}
+
+void wt_unload_theme(struct wt_theme *theme)
+{
+}
+
+static void use_theme(wt_widget *w, struct wt_theme *theme)
+{
+ int i;
+
+ if(w->use_theme) {
+ w->use_theme(w, theme);
+ }
+
+ for(i=0; i<w->num_child; i++) {
+ use_theme(w->child[i], theme);
+ }
+}
+
+void wt_use_theme(struct wt_theme *theme)
+{
+ wt->theme = theme;
+ use_theme(wt->root, theme);
+}
+
void wt_viewport(int x, int y, int w, int h)
{
wt_setrect(&wt->vp, x, y, w, h);
int i;
if(tree->draw) {
- tree->draw(tree);
+ tree->draw(tree, &wt->gfx);
}
for(i=0; i<tree->num_child; i++) {