aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-11-14 03:51:35 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-11-14 03:51:35 +0000
commitb0114d623806df53bce55158e4ef89d62648da68 (patch)
tree94261d8e1af36e692ef54fff1f610e2e0bd48a6a /shared
parent3afde3d7dbb730999164405ce1e781ef35e66465 (diff)
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
Diffstat (limited to 'shared')
-rw-r--r--shared/tkwidgets.c16
-rw-r--r--shared/tkwidgets.h2
2 files changed, 18 insertions, 0 deletions
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 <stdio.h>
+#include <string.h>
/* 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)
diff --git a/shared/tkwidgets.h b/shared/tkwidgets.h
index 7ecd521..9365a7c 100644
--- a/shared/tkwidgets.h
+++ b/shared/tkwidgets.h
@@ -40,6 +40,8 @@
/* 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,
int total_inlets, int total_outlets);