diff --git a/include/theme/xbm/parse.h b/include/xbm/parse.h similarity index 95% rename from include/theme/xbm/parse.h rename to include/xbm/parse.h index 4bd4c942..5ce59d1b 100644 --- a/include/theme/xbm/parse.h +++ b/include/xbm/parse.h @@ -8,7 +8,7 @@ #define __LABWC_PARSE_H #include -#include "theme/xbm/tokenize.h" +#include "xbm/tokenize.h" struct pixmap { uint32_t *data; diff --git a/include/theme/xbm/tokenize.h b/include/xbm/tokenize.h similarity index 100% rename from include/theme/xbm/tokenize.h rename to include/xbm/tokenize.h diff --git a/include/theme/xbm/xbm.h b/include/xbm/xbm.h similarity index 88% rename from include/theme/xbm/xbm.h rename to include/xbm/xbm.h index 47907f24..1ddb6212 100644 --- a/include/theme/xbm/xbm.h +++ b/include/xbm/xbm.h @@ -3,7 +3,7 @@ #include -#include "theme/xbm/parse.h" +#include "xbm/parse.h" /** * xbm_load - load theme xbm files into global theme struct diff --git a/src/main.c b/src/main.c index b9e330c6..b42f02c2 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ #include "labwc.h" #include "theme/theme.h" -#include "theme/xbm/xbm.h" +#include "xbm/xbm.h" #include "common/spawn.h" #include diff --git a/src/meson.build b/src/meson.build index 0678cd9f..2e4a3cb9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -16,3 +16,4 @@ subdir('common') subdir('config') subdir('theme') subdir('debug') +subdir('xbm') diff --git a/src/theme/meson.build b/src/theme/meson.build index e7181a06..a9bef667 100644 --- a/src/theme/meson.build +++ b/src/theme/meson.build @@ -2,4 +2,3 @@ labwc_sources += files( 'theme.c', ) -subdir('xbm') diff --git a/src/theme/xbm/meson.build b/src/xbm/meson.build similarity index 100% rename from src/theme/xbm/meson.build rename to src/xbm/meson.build diff --git a/src/theme/xbm/parse.c b/src/xbm/parse.c similarity index 98% rename from src/theme/xbm/parse.c rename to src/xbm/parse.c index dae2ced0..1b36e574 100644 --- a/src/theme/xbm/parse.c +++ b/src/xbm/parse.c @@ -11,7 +11,7 @@ #include #include -#include "theme/xbm/parse.h" +#include "xbm/parse.h" #include "common/bug-on.h" static uint32_t color; diff --git a/src/theme/xbm/tokenize.c b/src/xbm/tokenize.c similarity index 98% rename from src/theme/xbm/tokenize.c rename to src/xbm/tokenize.c index 9cc74a83..d01d7038 100644 --- a/src/theme/xbm/tokenize.c +++ b/src/xbm/tokenize.c @@ -8,7 +8,7 @@ #include #include -#include "theme/xbm/tokenize.h" +#include "xbm/tokenize.h" static char *current_buffer_position; static struct token *tokens; diff --git a/src/theme/xbm/xbm.c b/src/xbm/xbm.c similarity index 97% rename from src/theme/xbm/xbm.c rename to src/xbm/xbm.c index 895047c5..4da5e84b 100644 --- a/src/theme/xbm/xbm.c +++ b/src/xbm/xbm.c @@ -8,8 +8,8 @@ #include #include "theme/theme.h" -#include "theme/xbm/xbm.h" -#include "theme/xbm/parse.h" +#include "xbm/xbm.h" +#include "xbm/parse.h" #include "config/rcxml.h" #include "common/dir.h" #include "common/grab-file.h" diff --git a/tools/rcxml/Makefile b/tools/rcxml/Makefile index c1ef9beb..1b4dbf26 100644 --- a/tools/rcxml/Makefile +++ b/tools/rcxml/Makefile @@ -15,6 +15,7 @@ SRC = \ ../../src/common/dir.c \ ../../src/common/buf.c \ ../../src/common/font.c \ + ../../src/common/log.c \ ../../src/config/keybind.c diff --git a/tools/rcxml/rcxml-print-nodenames.c b/tools/rcxml/rcxml-print-nodenames.c index 6fd3c5e6..9e6b03a6 100644 --- a/tools/rcxml/rcxml-print-nodenames.c +++ b/tools/rcxml/rcxml-print-nodenames.c @@ -1,9 +1,12 @@ #include #include #include +#include +#include #include "config/rcxml.h" #include "common/buf.h" +#include "common/log.h" struct rcxml rc = { 0 }; @@ -20,4 +23,5 @@ int main(int argc, char **argv) rcxml_read(argv[1]); printf("%s", b.buf); free(b.buf); + pango_cairo_font_map_set_default(NULL); } diff --git a/tools/theme/Makefile b/tools/theme/Makefile index cbfeb893..643d154d 100644 --- a/tools/theme/Makefile +++ b/tools/theme/Makefile @@ -10,7 +10,8 @@ LDFLAGS += -DWLR_USE_UNSTABLE SRCS = \ theme-helper.c \ ../../src/theme/theme.c \ - ../../src/common/dir.c + ../../src/common/dir.c \ + ../../src/common/log.c all: gcc $(CFLAGS) -o theme-helper $(SRCS) $(LDFLAGS) diff --git a/tools/xbm/Makefile b/tools/xbm/Makefile index 938753d1..6810ef3b 100644 --- a/tools/xbm/Makefile +++ b/tools/xbm/Makefile @@ -7,10 +7,10 @@ PROGS = xbm-tokenize xbm-parse DEP_TOKENIZE = \ ../../src/common/buf.c \ - ../../src/theme/xbm/tokenize.c + ../../src/xbm/tokenize.c DEP_PARSE = $(DEP_TOKENIZE) \ - ../../src/theme/xbm/parse.c \ + ../../src/xbm/parse.c \ ../../src/common/grab-file.c all: $(PROGS) diff --git a/tools/xbm/xbm-parse.c b/tools/xbm/xbm-parse.c index 5bdbf28f..84a7c4ae 100644 --- a/tools/xbm/xbm-parse.c +++ b/tools/xbm/xbm-parse.c @@ -3,9 +3,11 @@ #include #include -#include "theme/xbm/parse.h" +#include "xbm/parse.h" #include "common/grab-file.h" +static float red[] = { 1.0, 0.0, 0.0, 1.0 }; + int main(int argc, char **argv) { struct token *tokens; @@ -20,6 +22,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); tokens = tokenize_xbm(buffer); free(buffer); + parse_set_color(red); struct pixmap pixmap = parse_xbm_tokens(tokens); free(tokens); diff --git a/tools/xbm/xbm-tokenize.c b/tools/xbm/xbm-tokenize.c index c299464b..a5bc4f69 100644 --- a/tools/xbm/xbm-tokenize.c +++ b/tools/xbm/xbm-tokenize.c @@ -4,7 +4,7 @@ #include #include "common/buf.h" -#include "theme/xbm/tokenize.h" +#include "xbm/tokenize.h" /* Read file into buffer, because it's easier to tokenize that way */ char *read_file(const char *filename)