X-Git-Url: http://git.openbox.org/?p=manmower%2Fobtheme.git;a=blobdiff_plain;f=obtheme.h;h=6ebaeec737c003883ffa78826b61ba75616599af;hp=6c67788bf56c149f016c9cc30a662d156df499fa;hb=HEAD;hpb=6dd728bcb59e330a8d2d7c637e69435f9d6c8bad diff --git a/obtheme.h b/obtheme.h index 6c67788..6ebaeec 100644 --- a/obtheme.h +++ b/obtheme.h @@ -2,6 +2,9 @@ #define __THEME_PARSE_H__ #include +#include "frame.h" +#include "misc.h" +#include "geom.h" #undef YY_DECL #define YY_DECL int obthemelex(YYSTYPE *yylval, struct parser_control *pc) @@ -14,11 +17,33 @@ 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; }; -struct class { +struct style { char *name; GSList *tree; }; @@ -30,13 +55,13 @@ struct obthemedata { struct theme { char *name; - GHashTable *classes; + GHashTable *styles; }; struct vector { - int x; - int y; - int z; + struct expression x; + struct expression y; + struct expression z; }; struct space { @@ -44,10 +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 { @@ -64,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__ */