diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-08 21:47:11 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2006-10-08 21:47:11 (GMT) |
commit | c96616ae8a88b1fd0d595afb533be40147995dcf (patch) | |
tree | cea5ad8df778b3930e0baee419088c84f34ac05d /generic/tkWindow.c | |
parent | 5c25999ae1a7b55800fc818f52b730e61cd0e39d (diff) | |
download | tk-c96616ae8a88b1fd0d595afb533be40147995dcf.zip tk-c96616ae8a88b1fd0d595afb533be40147995dcf.tar.gz tk-c96616ae8a88b1fd0d595afb533be40147995dcf.tar.bz2 |
Implemented TIP #264 - Tk_Interp
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r-- | generic/tkWindow.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c index b73ea91..25624f9 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWindow.c,v 1.77 2006/09/22 19:02:07 andreas_kupries Exp $ + * RCS: @(#) $Id: tkWindow.c,v 1.78 2006/10/08 21:47:12 patthoyts Exp $ */ #include "tkPort.h" @@ -2382,6 +2382,31 @@ Tk_DisplayName(tkwin) /* *---------------------------------------------------------------------- * + * Tk_Interp -- + * + * Get the Tcl interpreter from a Tk window. + * + * Results: + * A pointer to the interpreter or NULL. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +Tcl_Interp * +Tk_Interp(Tk_Window tkwin) +{ + if (tkwin != NULL && ((TkWindow *)tkwin)->mainPtr != NULL) { + return ((TkWindow *)tkwin)->mainPtr->interp; + } + return NULL; +} + +/* + *---------------------------------------------------------------------- + * * UnlinkWindow -- * * This function removes a window from the childList of its parent. |