]> Dogcows Code - chaz/openbox/blob - obcl/main.c
watch out for not loading the timed_menu plugin
[chaz/openbox] / obcl / main.c
1 #include "obcl.h"
2
3 void process_foo(CLNode *node)
4 {
5 if (CL_IS_NODE(node)) {
6 printf("foo name: %s\n"
7 "foo age: %.2f\n",
8 CL_STRVAL(CL_LIST_NTH(node,0)),
9 CL_NUMVAL(CL_LIST_NTH(node,1)));
10 }
11 }
12
13 void process_bah(CLNode *node)
14 {
15 printf("handling bah\n");
16 }
17
18 int main()
19 {
20 GList *lst = cl_parse("foo.conf");
21 /* cl_tree_print(lst,0); */
22 /* cl_tree_free(lst); */
23
24
25 CLProc *p = cl_proc_new();
26 cl_proc_add_handler_func(p, "foo", process_foo);
27 cl_proc_add_handler_func(p, "bah", process_bah);
28 cl_proc_add_handler_proc(p,"meh",p);
29
30 cl_process(lst, p);
31
32 return 0;
33 }
This page took 0.038511 seconds and 4 git commands to generate.