repair brokeness provided by a foolish Makefile
[manmower/obtheme.git] / main.c
1 #include <assert.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <glib.h>
5 #include "obtheme.h"
6
7 struct obthemedata themedata;
8
9 int main(int argc, char **argv)
10 {
11         Rect r;
12         Strut s;
13         int err;
14         struct theme *thm;
15
16         themedata.themes = g_hash_table_new(g_str_hash, g_str_equal);
17         themedata.materials = g_hash_table_new(g_str_hash, g_str_equal);
18         err = obtheme_parse(&themedata, argv[1]);
19         if (err) {
20                 printf("Fix the script\n");
21                 exit(1);
22         }
23         printf("err = %d\n", err);
24
25 //      g_hash_table_foreach(themedata.materials, material_print, NULL);
26
27 //      g_hash_table_foreach(themedata.themes, theme_print, NULL);
28
29         thm = g_hash_table_lookup(themedata.themes, "awesome");
30         obtheme_decorate_window(thm, "regular_window");
31         obtheme_calc_bound(thm, "regular_window", &r, &s);
32         printf("bounding rectangle: (%d %d) - (%d %d)\n", r.x, r.y, r.width, r.height);
33
34         return 0;
35 }