aboutsummaryrefslogtreecommitdiff
path: root/shared/toxy
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2005-05-10 18:02:20 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2005-05-10 18:02:20 +0000
commitcdd23c6b9523654eb3bf03542021404888fdbcba (patch)
tree1d3c3747faecfb2453eb05cc06087d9a22a0b063 /shared/toxy
parentff7abbbf9d312c021f2aee9b4e73c31ab15e8e50 (diff)
toxy alpha17 and pddp alpha1 (see notes.txt for toxy, pddp and shared)
svn path=/trunk/externals/miXed/; revision=2940
Diffstat (limited to 'shared/toxy')
-rw-r--r--shared/toxy/scriptlet.c18
-rw-r--r--shared/toxy/scriptlet.h9
2 files changed, 19 insertions, 8 deletions
diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c
index bf207c1..42e3c02 100644
--- a/shared/toxy/scriptlet.c
+++ b/shared/toxy/scriptlet.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003-2004 krzYszcz and others.
+/* Copyright (c) 2003-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
@@ -46,7 +46,7 @@ struct _scriptlet
t_glist *s_glist; /* containing glist (empty allowed) */
t_symbol *s_rptarget; /* reply target */
t_symbol *s_cbtarget; /* callback target */
- t_symbol *s_item;
+ t_symbol *s_item; /* item's name (readable part of its path) */
t_scriptlet_cvfn s_cvfn; /* if empty, passing resolveall is a bug */
t_canvas *s_cv; /* as returned by cvfn */
int s_cvstate;
@@ -1048,8 +1048,10 @@ void scriptlet_free(t_scriptlet *sp)
/* The parameter 'gl' (null accepted) is necessary, because the 's_glist'
field, if implicitly set, would be dangerous (after a glist is gone)
and confusing (current directory used for i/o of a global scriptlet). */
-t_scriptlet *scriptlet_new(t_pd *owner, t_symbol *rptarget, t_symbol *cbtarget,
- t_symbol *item, t_glist *gl, t_scriptlet_cvfn cvfn)
+t_scriptlet *scriptlet_new(t_pd *owner,
+ t_symbol *rptarget, t_symbol *cbtarget,
+ t_symbol *item, t_glist *glist,
+ t_scriptlet_cvfn cvfn)
{
t_scriptlet *sp = getbytes(sizeof(*sp));
if (sp)
@@ -1065,7 +1067,7 @@ t_scriptlet *scriptlet_new(t_pd *owner, t_symbol *rptarget, t_symbol *cbtarget,
configured = 1;
}
sp->s_owner = owner;
- sp->s_glist = gl;
+ sp->s_glist = glist;
sp->s_rptarget = rptarget;
sp->s_cbtarget = cbtarget;
sp->s_item = item;
@@ -1079,3 +1081,9 @@ t_scriptlet *scriptlet_new(t_pd *owner, t_symbol *rptarget, t_symbol *cbtarget,
}
return (sp);
}
+
+t_scriptlet *scriptlet_newalike(t_scriptlet *sp)
+{
+ return (scriptlet_new(sp->s_owner, sp->s_rptarget, sp->s_cbtarget,
+ sp->s_item, sp->s_glist, sp->s_cvfn));
+}
diff --git a/shared/toxy/scriptlet.h b/shared/toxy/scriptlet.h
index c9411ae..5887950 100644
--- a/shared/toxy/scriptlet.h
+++ b/shared/toxy/scriptlet.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003-2004 krzYszcz and others.
+/* Copyright (c) 2003-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
@@ -41,7 +41,10 @@ void scriptlet_setowner(t_scriptlet *sp, t_pd *owner);
void scriptlet_clone(t_scriptlet *to, t_scriptlet *from);
void scriptlet_append(t_scriptlet *to, t_scriptlet *from);
void scriptlet_free(t_scriptlet *sp);
-t_scriptlet *scriptlet_new(t_pd *owner, t_symbol *rptarget, t_symbol *cbtarget,
- t_symbol *item, t_glist *gl, t_scriptlet_cvfn cvfn);
+t_scriptlet *scriptlet_new(t_pd *owner,
+ t_symbol *rptarget, t_symbol *cbtarget,
+ t_symbol *item, t_glist *glist,
+ t_scriptlet_cvfn cvfn);
+t_scriptlet *scriptlet_newalike(t_scriptlet *sp);
#endif