From b0114d623806df53bce55158e4ef89d62648da68 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 14 Nov 2007 03:51:35 +0000 Subject: got a quick working example pretty much straight from ggee's image.c; I need to get the shared dylib working before working on a new objectclass svn path=/trunk/externals/tkwidgets/; revision=9002 --- shared/tkwidgets.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'shared/tkwidgets.c') diff --git a/shared/tkwidgets.c b/shared/tkwidgets.c index 13fe311..6439842 100644 --- a/shared/tkwidgets.c +++ b/shared/tkwidgets.c @@ -22,6 +22,7 @@ #include "tkwidgets.h" #include +#include /* this should be part of the Pd API */ t_symbol *canvas_getname(t_canvas *canvas) @@ -31,6 +32,21 @@ t_symbol *canvas_getname(t_canvas *canvas) return gensym(buf); } +/* +I think I'll probably have to follow Krzsztof and make structs to make this work +tkwidgets_setcallbackname(void *x, char *widget_name) +{ + char buf[MAXPDSTRING]; + + sprintf(buf,"%s%lx", widget_name, (long unsigned int)x); + x->tcl_namespace = getbytes(strlen(buf)); + strcpy(x->tcl_namespace, buf); + + sprintf(buf,"#%s", x->tcl_namespace); + x->receive_name = gensym(buf); + pd_bind(&x->x_obj.ob_pd, x->receive_name); +} +*/ void draw_inlets(t_object *x, t_glist *glist, int firsttime, int total_inlets, int total_outlets) -- cgit v1.2.1