diff options
Diffstat (limited to 'generic/tkBind.c')
-rw-r--r-- | generic/tkBind.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index d77718a..7f6fc04 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.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: tkBind.c,v 1.28 2003/02/28 15:55:33 dkf Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.29 2003/04/14 23:34:41 mdejong Exp $ */ #include "tkPort.h" @@ -4675,5 +4675,31 @@ TkCopyAndGlobalEval(interp, script) Tcl_DStringFree(&buffer); return code; } + +/* + *---------------------------------------------------------------------- + * + * TkpGetBindingXEvent -- + * + * This procedure returns the XEvent associated with the + * currently executing binding. This procedure can only + * be invoked while a binding is executing. + * + * Results: + * Returns a pointer to the XEvent that caused the + * current binding code to be run. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ - +XEvent * +TkpGetBindingXEvent(interp) + Tcl_Interp *interp; /* Interpreter. */ +{ + TkWindow *winPtr = (TkWindow *) Tk_MainWindow(interp); + BindingTable *bindPtr = (BindingTable *) winPtr->mainPtr->bindingTable; + return &(bindPtr->eventRing[bindPtr->curEvent]); +} |