[theme] remove a needless out-param
This commit is contained in:
parent
153c084419
commit
d78b6cc828
2
src/ax.h
2
src/ax.h
|
@ -26,7 +26,7 @@ void ax_log(struct ax_ctxt* ax, const char* string);
|
||||||
* -------------------------------------------------------------------------- */
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void ax_begin_theme(struct ax_ctxt* ax);
|
void ax_begin_theme(struct ax_ctxt* ax);
|
||||||
void ax_end_theme(struct ax_ctxt* ax, struct ax_theme** out_thm);
|
struct ax_theme* ax_end_theme(struct ax_ctxt* ax);
|
||||||
|
|
||||||
void ax_set_theme_color(
|
void ax_set_theme_color(
|
||||||
struct ax_ctxt* ax, const char* cat, int64_t rgb);
|
struct ax_ctxt* ax, const char* cat, int64_t rgb);
|
||||||
|
|
|
@ -107,7 +107,7 @@ void ax_begin_theme(struct ax_ctxt* ax)
|
||||||
ax->thmb = ax__theme_builder_new(ax->thmb_rgn);
|
ax->thmb = ax__theme_builder_new(ax->thmb_rgn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ax_end_theme(struct ax_ctxt* ax, struct ax_theme** out_thm)
|
struct ax_theme* ax_end_theme(struct ax_ctxt* ax)
|
||||||
{
|
{
|
||||||
ASSERT(ax->thmb != NULL, "`ax_end_theme' called while not building a theme");
|
ASSERT(ax->thmb != NULL, "`ax_end_theme' called while not building a theme");
|
||||||
|
|
||||||
|
@ -116,10 +116,7 @@ void ax_end_theme(struct ax_ctxt* ax, struct ax_theme** out_thm)
|
||||||
rgn_clear(ax->thmb_rgn);
|
rgn_clear(ax->thmb_rgn);
|
||||||
|
|
||||||
ax__theme_load(thm, ax__backend_msgq(ax->bac));
|
ax__theme_load(thm, ax__backend_msgq(ax->bac));
|
||||||
|
return thm;
|
||||||
if (out_thm != NULL) {
|
|
||||||
*out_thm = thm;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ax_set_theme_color(
|
void ax_set_theme_color(
|
||||||
|
|
|
@ -27,9 +27,7 @@ static struct ax_theme* make_example_theme()
|
||||||
ax_set_theme_color(ax, "primary", 0x00ff00);
|
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, "default", "/usr/share/fonts/TTF/DejaVuSans.ttf", 0);
|
||||||
ax_set_theme_font(ax, "h1", NULL, 95);
|
ax_set_theme_font(ax, "h1", NULL, 95);
|
||||||
struct ax_theme* thm;
|
return ax_end_theme(ax);
|
||||||
ax_end_theme(ax, &thm);
|
|
||||||
return thm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
|
|
Loading…
Reference in New Issue