X-Git-Url: http://git.openbox.org/?p=manmower%2Fobtheme.git;a=blobdiff_plain;f=obtheme.h;h=6ebaeec737c003883ffa78826b61ba75616599af;hp=d98d335edb0479a64081508852f7e00f167913b7;hb=HEAD;hpb=1070c0e142f6064b7db2dd285503282a13a70857 diff --git a/obtheme.h b/obtheme.h index d98d335..6ebaeec 100644 --- a/obtheme.h +++ b/obtheme.h @@ -4,6 +4,7 @@ #include #include "frame.h" #include "misc.h" +#include "geom.h" #undef YY_DECL #define YY_DECL int obthemelex(YYSTYPE *yylval, struct parser_control *pc) @@ -16,6 +17,28 @@ extern int themedebug; +typedef enum { + OB_THEME_INV, + OB_THEME_ADD, + OB_THEME_SUB, + OB_THEME_MUL, + OB_THEME_DIV, + OB_THEME_EQL +} ObThemeOp; + +struct variable { + char *base; + char *member; + double number; +}; + +struct expression { + ObThemeOp op; + struct expression *a; + struct expression *b; + struct variable v; +}; + struct material { float opacity; }; @@ -36,9 +59,9 @@ struct theme { }; struct vector { - int x; - int y; - int z; + struct expression x; + struct expression y; + struct expression z; }; struct space { @@ -46,12 +69,30 @@ struct space { struct vector up; }; +struct texture { + gboolean present; + gboolean internal; + char *name; +}; + +struct box { + struct vector start; + struct vector end; +}; + +struct geometry { + struct box box; +}; + struct decor { char *name; GSList *children; struct space space; ObDirection cursor; ObFrameContext context; + struct texture texture; + struct material *material; + struct geometry geometry; }; struct parser_control { @@ -68,5 +109,7 @@ int obtheme_parse(struct obthemedata *td, const char *filename); struct parser_control *parser_init(struct obthemedata *td); int obthemeparse(struct parser_control *); void parser_finish(struct parser_control *); +void obtheme_calc_bound(struct theme *thm, char *name, Rect *r, Strut *s); +void obtheme_decorate_window(struct theme *thm, char *name); #endif /* __THEME_PARSE_H__ */