diff options
author | welch <welch> | 1999-07-02 06:04:26 (GMT) |
---|---|---|
committer | welch <welch> | 1999-07-02 06:04:26 (GMT) |
commit | 7a43ce50025a2bc85e4ff7342ef981a5ad47a898 (patch) | |
tree | bb0eb2e8443b9c77795a05524c0b47ea91d556ca /generic/tclNotify.c | |
parent | acb6f56b857e610cc16e61dfcc376446e1e8dac8 (diff) | |
download | tcl-7a43ce50025a2bc85e4ff7342ef981a5ad47a898.zip tcl-7a43ce50025a2bc85e4ff7342ef981a5ad47a898.tar.gz tcl-7a43ce50025a2bc85e4ff7342ef981a5ad47a898.tar.bz2 |
Added Tcl_SetNotifier and associated typedef.
This lets you hook the notifier procs.
Diffstat (limited to 'generic/tclNotify.c')
-rw-r--r-- | generic/tclNotify.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 15553b9..8d4d270 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.c @@ -13,12 +13,14 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNotify.c,v 1.4 1999/04/16 00:46:50 stanton Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.5 1999/07/02 06:04:26 welch Exp $ */ #include "tclInt.h" #include "tclPort.h" +extern TclStubs tclStubs; + /* * For each event source (created with Tcl_CreateEventSource) there * is a structure of the following type: @@ -163,6 +165,36 @@ TclFinalizeNotifier() /* *---------------------------------------------------------------------- * + * Tcl_SetNotifier -- + * + * Install a set of alternate functions for use with the notifier. + # In particular, this can be used to install the Xt-based + * notifier for use with the Browser plugin. + * + * Results: + * None. + * + * Side effects: + * Overstomps part of the stub vector. This relies on hooks + * added to the default procedures in case those are called + * directly (i.e., not through the stub table.) + * + *---------------------------------------------------------------------- + */ + +void +Tcl_SetNotifier(notifierProcPtr) + Tcl_NotifierProcs *notifierProcPtr; +{ + tclStubs.tcl_CreateFileHandler = notifierProcPtr->createFileHandlerProc; + tclStubs.tcl_DeleteFileHandler = notifierProcPtr->deleteFileHandlerProc; + tclStubs.tcl_SetTimer = notifierProcPtr->setTimerProc; + tclStubs.tcl_WaitForEvent = notifierProcPtr->waitForEventProc; +} + +/* + *---------------------------------------------------------------------- + * * Tcl_CreateEventSource -- * * This procedure is invoked to create a new source of events. |