X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fwindtk.h;fp=src%2Fwindtk.h;h=56535c91632db656aa1034586efbf63eb0f81caa;hb=b012c112e391964e63247dcbb55988855b0fc95e;hp=6b6724cfa66de07f1d7b96bdf83b0565eecb01c3;hpb=487b4f073cfbec280ed91e001c51cb32814ee4b5;p=windtk diff --git a/src/windtk.h b/src/windtk.h index 6b6724c..56535c9 100644 --- a/src/windtk.h +++ b/src/windtk.h @@ -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);