theme
[windtk] / src / windtk.h
index 6b6724c..56535c9 100644 (file)
@@ -68,11 +68,29 @@ struct wt_graphics {
        int (*baseline)(int font);
 };
 
+typedef void (*wt_draw_func)(wt_widget*, struct wt_graphics*);
+
+struct wt_theme {
+       char *name;
+       void *so;
+       wt_draw_func draw_window;
+       wt_draw_func draw_label;
+       wt_draw_func draw_button;
+       wt_draw_func draw_checkbox;
+       wt_draw_func draw_textfield;
+
+       struct wt_theme *next;
+};
+
 void wt_allocator(void *(*allocfunc)(size_t), void (*freefunc)(void*));
 
 int wt_init(int w, int h, struct wt_graphics *gfx);
 void wt_destroy(void);
 
+struct wt_theme *wt_load_theme(const char *path);      /* load dynamically, where applicable */
+void wt_unload_theme(struct wt_theme *theme);
+void wt_use_theme(struct wt_theme *theme);
+
 void wt_viewport(int x, int y, int w, int h);
 void wt_graphics(struct wt_graphics *gfx);