diff options
Diffstat (limited to 'guifs.h')
-rw-r--r-- | guifs.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -5,15 +5,18 @@ enum { Ppadding, Porientation, Pbordercolour, + Ptext, + Ptextcolour, Pmax, }; enum { - nbaseprops = 4 + nbaseprops = 5 }; enum { Gcontainer, + Gtextbox, Gmax, }; @@ -46,11 +49,12 @@ union PropVal { Colour *colour; Spacing *spacing; int orientation; + Rune *text; }; struct PropSpec { char *name; - PropVal (*def)(void); + PropVal (*def)(int, int); char *(*print)(PropVal); char *(*parse)(char *, PropVal *); }; @@ -65,6 +69,7 @@ struct GuiSpec { char *name; void (*draw)(GuiElement *); void (*layout)(GuiElement *, Rectangle); + int leafnode; int nprops; int *proptags; }; @@ -91,6 +96,7 @@ struct GuiElement { Rectangle border; Rectangle rect; + Rectangle content; }; extern GuiElement *root; @@ -99,14 +105,17 @@ extern GuiSpec guispecs[Gmax]; extern int baseprops[nbaseprops]; void *emalloc(ulong); +int allspace(char *); Colour *mkcolour(ulong); void initgraphics(void); void layout(GuiElement *, Rectangle); void updategui(int); void drawcontainer(GuiElement *); +void drawtextbox(GuiElement *); void layoutcontainer(GuiElement *, Rectangle); +void layouttextbox(GuiElement *, Rectangle); PropVal getprop(GuiElement *, int); void setprop(GuiElement *, int, PropVal);
\ No newline at end of file |