Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David MacDonald
purr-data
Commits
6f8fc1ed
Commit
6f8fc1ed
authored
Oct 24, 2015
by
Jonathan Wilkes
Browse files
add a hack for sending event notifications out the rightmost outlet of [draw group]
parent
cf3d8ac5
Changes
2
Hide whitespace changes
Inline
Side-by-side
pd/src/g_template.c
View file @
6f8fc1ed
...
...
@@ -1175,6 +1175,8 @@ typedef struct _drawimage
t_pd *x_attr;
} t_drawimage;
extern t_outlet *obj_rightmost_outlet(t_object *x);
void draw_notifyforscalar(t_object *x, t_glist *owner,
t_scalar *sc, t_symbol *s, int argc, t_atom *argv)
{
...
...
@@ -1187,8 +1189,15 @@ void draw_notifyforscalar(t_object *x, t_glist *owner,
binbuf_add(b, 1, at);
binbuf_add(b, argc, argv);
if (x)
outlet_anything(x->ob_outlet, s, binbuf_getnatom(b),
{
t_outlet *out;
if (pd_class(&x->te_pd) == canvas_class)
out = obj_rightmost_outlet(x);
else
out = x->ob_outlet;
outlet_anything(out, s, binbuf_getnatom(b),
binbuf_getvec(b));
}
gpointer_unset(&gp);
binbuf_free(b);
}
...
...
pd/src/m_obj.c
View file @
6f8fc1ed
...
...
@@ -579,6 +579,20 @@ int obj_noutlets(t_object *x)
return
(
n
);
}
/* used for draw_notify */
t_outlet
*
obj_rightmost_outlet
(
t_object
*
x
)
{
t_outlet
*
o
=
x
->
ob_outlet
;
if
(
o
)
{
while
(
o
->
o_next
)
o
=
o
->
o_next
;
return
o
;
}
else
return
0
;
}
int
obj_ninlets
(
t_object
*
x
)
{
int
n
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment