btw, Thomas, have you got any reply to this? I would need to find a way of getting info from the gui layer, first in order to clone MouseState and mousefilter, then, possibly, with some other clones too -- although for mouse classes I would probably use a by-request method (polling), using something like "winfo pointerxy".
Yet I do not fully understand your code examples. With replacing tcl/tk bindings of gui events to a canvas (those defined in pd.tk), do you mean a canvas containing your gui object, or a canvas created by that object? If the former, are you going to pd_bind your gui object to the same symbol a containing canvas is bound to (declaring a dummy anything method, I guess)? Or, rather, pd_binding to a different symbol, then resending the gui messages you got in your object, up to a containing canvas?
Krzysztof
Thomas Grill wrote: ...
The desirable solution would be a interaction callback provided by PD to let a GUI object collect all possible interaction information. The latter can be obtained by e.g. using the following TCL/TK statements:
t_canvas *canvas; t_symbol *bindsym; sys_vgui("bind .x%x.c <Motion> {pd %s %s %%x %%y %%s \;}\n",canvas,bindsym,gensym("motion"));
(perhaps bindsym->s_name and "motion"?)