Update of /cvsroot/pure-data/externals/tkwidgets/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6801/shared
Modified Files: tkwidgets.c tkwidgets.h Log Message: 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
Index: tkwidgets.c =================================================================== RCS file: /cvsroot/pure-data/externals/tkwidgets/shared/tkwidgets.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tkwidgets.c 14 Nov 2007 02:47:49 -0000 1.1 --- tkwidgets.c 14 Nov 2007 03:51:35 -0000 1.2 *************** *** 23,26 **** --- 23,27 ---- #include "tkwidgets.h" #include <stdio.h> + #include <string.h>
/* this should be part of the Pd API */ *************** *** 32,35 **** --- 33,51 ---- }
+ /* + 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,
Index: tkwidgets.h =================================================================== RCS file: /cvsroot/pure-data/externals/tkwidgets/shared/tkwidgets.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tkwidgets.h 14 Nov 2007 02:47:49 -0000 1.1 --- tkwidgets.h 14 Nov 2007 03:51:35 -0000 1.2 *************** *** 41,44 **** --- 41,46 ---- /* this should be part of the Pd API */ t_symbol *canvas_getname(t_canvas *canvas); + void tkwidgets_setcallbackname(void *x, char *widget_name); + // TODO perhaps I should try to use glist_drawiofor() from g_text.c void draw_inlets(t_object *x, t_glist *glist, int firsttime,