#include #include "../src/ax.h" #include "../src/ctxt/theme.h" int main(void) { struct ax_ctxt* ax = ax_new(); int rv; #define GUARD(f, ...) if ((rv = f(__VA_ARGS__)) != 0) goto cleanup ax_begin_theme(ax); ax_set_theme_color(ax, "primary", 0x00ff00); ax_set_theme_font(ax, "default", "/usr/share/fonts/TTF/DejaVuSans.ttf", 0); ax_set_theme_font(ax, "h1", NULL, 95); struct ax_theme* thm; ax_end_theme(ax, &thm); printf("----\ngot here\n----\n"); if ((rv = ax_select_theme(ax, thm)) != 0) { goto cleanup; } ax__debug_theme(thm); cleanup: if (rv != 0) { printf("error: %s\n", ax_get_error(ax)); } ax_free(ax); return rv; }