I have register a ClientMessageHandler for a Tk_Window, with
Tk_CreateClientMessageHandler. My event gets handled,
and my callback function gets called. But how can I get the
Tcl_Interp that this Tk_Window has been created in?
(It seems that Tk keeps this information internally, in the
TkWindow structure. But how can I get this information from
an extension?)
George
For tkvideo it seems I just included an interp pointer in the widget
structure and set it when the widget gets created :(
--
Pat Thoyts http://www.patthoyts.tk/
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
But, if I include the Tk internal headers, and convert the Tk_Window
into a TkWindow pointer, I can get it with:
TkWindow *winPtr = (TkWindow *) tkwin;
if (winPtr->mainPtr != NULL) interp = winPtr->mainPtr->interp;
It is a pitty since Tk keeps this information, to not have a function
like Tk_GetInterp(Tk_Window *) in the public API.
George
"Pat Thoyts" <cngg...@hfref.fbheprsbetr.arg> wrote in message
news:87ek0iq...@users.sourceforge.net...