From c167e87a54010687abfdc2d5b09862cce3f0387b Mon Sep 17 00:00:00 2001 From: mescalinum Date: Sun, 30 Aug 2009 17:47:51 +0000 Subject: add of proxyinlet svn path=/trunk/externals/tclpd/; revision=12145 --- tcl_class.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tcl_class.cxx') diff --git a/tcl_class.cxx b/tcl_class.cxx index 1c57b3e..8349f58 100644 --- a/tcl_class.cxx +++ b/tcl_class.cxx @@ -79,16 +79,21 @@ void tclpd_anything(t_tcl *self, t_symbol *s, int ac, t_atom *at) { /* Tcl glue: */ -void tclpd_add_proxyinlet(t_object* o, t_proxyinlet* i) { - inlet_new(o, &i->pd, 0, 0); +t_proxyinlet* tclpd_add_proxyinlet(t_tcl* x, t_symbol* s) { + t_proxyinlet* proxy = (t_proxyinlet*)pd_new(proxyinlet_class); + proxyinlet_init(proxy); + proxy->target = x; + proxy->sel = s; + inlet_new(&x->o, &proxy->obj.ob_pd, 0, 0); + return proxy; } -t_pd* tclpd_get_instance(const char* objectSequentialId) { - return object_table[objectSequentialId]; +t_tcl* tclpd_get_instance(const char* objectSequentialId) { + return (t_tcl*)object_table[objectSequentialId]; } t_object* tclpd_get_object(const char* objectSequentialId) { - t_tcl* x = (t_tcl*)tclpd_get_instance(objectSequentialId); + t_tcl* x = tclpd_get_instance(objectSequentialId); return &x->o; } -- cgit v1.2.1