button: refactor xbm code

- Rename src/xbm/ to src/button/
- Combine xbm.c parse.c tokenize.c into button-xbm.c

No functional change
This commit is contained in:
Johan Malm 2023-08-10 15:50:25 +01:00 committed by Johan Malm
parent 3111c57d6f
commit 03bc2ada47
12 changed files with 315 additions and 391 deletions

View file

@ -25,8 +25,8 @@
#include "common/string-helpers.h"
#include "config/rcxml.h"
#include "button-png.h"
#include "button/button-xbm.h"
#include "theme.h"
#include "xbm/xbm.h"
#include "buffer.h"
#include "ssd.h"
@ -106,11 +106,11 @@ load_buttons(struct theme *theme)
/* If there were no png buttons, use xbm */
snprintf(filename, sizeof(filename), "%s.xbm", b->name);
if (!*b->active.buffer) {
xbm_load_button(filename, b->active.buffer,
button_xbm_load(filename, b->active.buffer,
b->fallback_button, b->active.rgba);
}
if (!*b->inactive.buffer) {
xbm_load_button(filename, b->inactive.buffer,
button_xbm_load(filename, b->inactive.buffer,
b->fallback_button, b->inactive.rgba);
}
}