#include "obtheme.h"
struct obthemedata themedata;
-struct boundrect {
- double x1, y1;
- double x2, y2;
-};
int main(int argc, char **argv)
{
+ Rect r;
+ Strut s;
int err;
struct theme *thm;
- struct boundrect br;
+
themedata.themes = g_hash_table_new(g_str_hash, g_str_equal);
themedata.materials = g_hash_table_new(g_str_hash, g_str_equal);
err = obtheme_parse(&themedata, argv[1]);
thm = g_hash_table_lookup(themedata.themes, "awesome");
obtheme_decorate_window(thm, "regular_window");
- obtheme_calc_bound(thm, "regular_window", &br);
- printf("bounding rectangle: (%f %f) - (%f %f)\n", br.x1, br.y1, br.x2, br.y2);
+ obtheme_calc_bound(thm, "regular_window", &r, &s);
+ printf("bounding rectangle: (%d %d) - (%d %d)\n", r.x, r.y, r.width, r.height);
return 0;
}