From: Marius Nita Date: Tue, 15 Apr 2003 04:03:52 +0000 (+0000) Subject: more processor bummy X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=70f63e4c9e6d47a51345d19f40ebf9aebab5553e;p=chaz%2Fopenbox more processor bummy --- diff --git a/obcl/foo.conf b/obcl/foo.conf index b1fc57f4..a5890554 100644 --- a/obcl/foo.conf +++ b/obcl/foo.conf @@ -2,3 +2,8 @@ foo "marius", 23; foo "kyle", 15; foo "soren", 7; bah "blef","bummy"; +meh { + foo "marius", 24; + foo "blef", 542; + bah "hi"; +} diff --git a/obcl/main.c b/obcl/main.c index a38b4cf6..7c84b5e7 100644 --- a/obcl/main.c +++ b/obcl/main.c @@ -25,6 +25,7 @@ int main() CLProc *p = cl_proc_new(); cl_proc_add_handler_func(p, "foo", process_foo); cl_proc_add_handler_func(p, "bah", process_bah); + cl_proc_add_handler_proc(p,"meh",p); cl_process(lst, p); diff --git a/obcl/obcl.h b/obcl/obcl.h index 37a04161..78415c1b 100644 --- a/obcl/obcl.h +++ b/obcl/obcl.h @@ -90,6 +90,8 @@ void cl_proc_add_handler(CLProc *proc, gchar *str, CLProcHandler *handler); void cl_proc_add_handler_func(CLProc *proc, gchar *str, CLProcFunc func); +void cl_proc_add_handler_proc(CLProc *proc, gchar *str, + CLProc *hproc); void cl_proc_set_default(CLProc *proc, CLProcHandler *pf); void cl_proc_register_keywords(CLProc *proc, ...); void cl_process(GList *tree, CLProc *proc); diff --git a/obcl/process.c b/obcl/process.c index f79fc631..eb7cafd2 100644 --- a/obcl/process.c +++ b/obcl/process.c @@ -61,6 +61,16 @@ void cl_proc_add_handler_func(CLProc *proc, gchar *str, cl_proc_add_handler(proc, str, ph); } +void cl_proc_add_handler_proc(CLProc *proc, gchar *str, + CLProc *hproc) +{ + CLProcHandler *ph; + + g_assert(proc != NULL); + ph = cl_proc_handler_new_proc(hproc); + cl_proc_add_handler(proc, str, ph); +} + void cl_proc_set_default(CLProc *proc, CLProcHandler *ph) { g_assert(proc != NULL);