diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2008-09-20 00:30:48 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2008-09-20 00:30:48 +0000 |
commit | 4f51fe6574a7d46ddb95bb85e1053e86c2fb805a (patch) | |
tree | 79dbdbd418f6755bd22ee5437e56f897bcab4ffc /pd/src/g_scalar.c | |
parent | 59c8e59dce8fc86ba4d07e91984c6a3dd43bc73e (diff) |
pd 0.42-0 test 05
svn path=/trunk/; revision=10301
Diffstat (limited to 'pd/src/g_scalar.c')
-rw-r--r-- | pd/src/g_scalar.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c index 675df500..fe80de44 100644 --- a/pd/src/g_scalar.c +++ b/pd/src/g_scalar.c @@ -325,6 +325,9 @@ void scalar_redraw(t_scalar *x, t_glist *glist) sys_queuegui(x, glist, scalar_doredraw); } +extern void template_notifyforscalar(t_template *template, t_glist *owner, + t_scalar *sc, t_symbol *s, int argc, t_atom *argv); + int scalar_doclick(t_word *data, t_template *template, t_scalar *sc, t_array *ap, struct _glist *owner, t_float xloc, t_float yloc, int xpix, int ypix, @@ -333,8 +336,14 @@ int scalar_doclick(t_word *data, t_template *template, t_scalar *sc, int hit = 0; t_canvas *templatecanvas = template_findcanvas(template); t_gobj *y; + t_atom at[2]; t_float basex = template_getfloat(template, gensym("x"), data, 0); t_float basey = template_getfloat(template, gensym("y"), data, 0); + SETFLOAT(at, basex + xloc); + SETFLOAT(at+1, basey + yloc); + if (doit) + template_notifyforscalar(template, owner, + sc, gensym("click"), 2, at); for (y = templatecanvas->gl_list; y; y = y->g_next) { t_parentwidgetbehavior *wb = pd_getparentwidget(&y->g_pd); |