aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas O Fredericks <mrtof@users.sourceforge.net>2009-09-18 22:01:46 +0000
committerThomas O Fredericks <mrtof@users.sourceforge.net>2009-09-18 22:01:46 +0000
commitdcbd2547e31e9fd6f2c736bea8ffd082eded7c97 (patch)
treecc00d6ef2aa2485362a082f97769cd20d976d126
parent6c2dc661c28e5f3e49ed7879a298d4e80e68bb80 (diff)
Changes to tof
svn path=/trunk/externals/tof/; revision=12399
-rw-r--r--src/tof.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/tof.h b/src/tof.h
index 8b382a8..a2b3238 100644
--- a/src/tof.h
+++ b/src/tof.h
@@ -27,10 +27,16 @@ static void tof_copy_atoms(t_atom *src, t_atom *dst, int n)
*dst++ = *src++;
}
+
+
+
static t_symbol* tof_get_dollar(t_canvas* canvas, t_symbol* dollar) {
return canvas_realizedollar(canvas, dollar);
}
+static t_symbol* tof_get_dollarzero(t_canvas* canvas) {
+ return canvas_realizedollar(canvas, gensym("$0"));
+}
static int tof_path_is_absolute(char *dir, int length)
@@ -125,10 +131,19 @@ static int tof_anything_to_string( t_symbol* s, int ac, t_atom* av,char* buffer
}
+// returns the last canvas before the root canvas
+static t_canvas* tof_get_canvas_before_root(t_canvas* canvas)
+{
+ // Find the proper parent canvas
+ while ( canvas->gl_owner && canvas->gl_owner->gl_owner) {
+ canvas = canvas->gl_owner;
+ }
+ return canvas;
+}
static t_canvas* tof_get_root_canvas(t_canvas* canvas)
{
- // Find the proper parent canvas
+ // Find the root canvas
while ( canvas->gl_owner) {
canvas = canvas->gl_owner;