Add keybind.c

This commit is contained in:
Johan Malm 2020-06-16 07:21:53 +01:00
parent 5bd55570ba
commit 40f01ed3c9
10 changed files with 114 additions and 11 deletions

View file

@ -1,9 +1,18 @@
lib_xml2 = library('libxml-2.0')
lib_wayland_server = library('wayland-server')
lib_xkbcommon = library('xkbcommon')
lib_glib = library('glib-2.0')
rcxml_lib = static_library(
'rcxml',
sources: files('../src/config/rcxml.c', '../src/common/buf.c'),
dependencies: xml2,
sources: files(
'../src/config/rcxml.c',
'../src/config/keybind.c',
'../src/common/buf.c'
),
dependencies: [xml2, wayland_server, xkbcommon, glib],
include_directories: [labwc_inc],
link_with: library('libxml-2.0'),
link_with: [lib_xml2, lib_wayland_server, lib_xkbcommon, lib_glib],
)
rcxml_tests = [
@ -17,7 +26,7 @@ foreach t : rcxml_tests
testname,
sources: [t, 'tap.c'],
include_directories: [labwc_inc],
link_with: rcxml_lib,
link_with: [rcxml_lib],
)
test(testname, exe)
endforeach

View file

@ -27,7 +27,7 @@ int main(int argc, char **argv)
exit(1);
write(fd, src, sizeof(src) - 1);
rcxml_init(&rc);
rcxml_init();
rcxml_read(template);
unlink(template);

View file

@ -35,7 +35,7 @@ int main(int argc, char **argv)
plan(1);
diag("Parse simple rc.xml and read nodenames");
rcxml_init(&rc);
rcxml_init();
rcxml_get_nodenames(&actual);
rcxml_parse_xml(&source);
printf("%s\n", actual.buf);