#include #include "../src/ax.h" #include "../src/ctxt.h" #include "../src/backend.h" int main(void) { struct ax_ctxt* ax = ax_new(); ax_set_logger(ax, 0, false); int rv = 0; #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); ax_log(ax, "Got here\n"); bool shutdown = false; ax__backend_wait_for_event(ax->bac); ax__backend_step(ax->bac, &shutdown); //cleanup: if (rv != 0) { printf("error: %s\n", ax_get_error(ax)); } ax_free(ax); return rv; }