From dcbd2547e31e9fd6f2c736bea8ffd082eded7c97 Mon Sep 17 00:00:00 2001 From: Thomas O Fredericks Date: Fri, 18 Sep 2009 22:01:46 +0000 Subject: Changes to tof svn path=/trunk/externals/tof/; revision=12399 --- src/tof.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/tof.h') 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; -- cgit v1.2.1