Adding BarWidthArg, BarDrawArg, BarClickArg to keep the method signatures static

This commit is contained in:
bakkeby
2020-07-15 14:10:47 +02:00
parent f2da4d20d9
commit aa70728d00
27 changed files with 227 additions and 173 deletions

View File

@ -1,5 +1,5 @@
int
width_status(Monitor *m, int max_width)
width_status(Monitor *m, BarWidthArg *a)
{
#if BAR_PANGO_PATCH
return TEXTWM(stext) - lrpad + 2; /* 2px right padding */
@ -9,17 +9,17 @@ width_status(Monitor *m, int max_width)
}
int
draw_status(Monitor *m, int x, int w)
draw_status(Monitor *m, BarDrawArg *a)
{
#if BAR_PANGO_PATCH
return drw_text(drw, x, 0, w, bh, 0, stext, 0, True);
return drw_text(drw, a->x, 0, a->w, bh, 0, stext, 0, True);
#else
return drw_text(drw, x, 0, w, bh, 0, stext, 0);
return drw_text(drw, a->x, 0, a->w, bh, 0, stext, 0);
#endif // BAR_PANGO_PATCH
}
int
click_status(Monitor *m, Arg *arg, int rel_x, int rel_y, int rel_w, int rel_h)
click_status(Monitor *m, Arg *arg, BarClickArg *a)
{
return ClkStatusText;
}