summaryrefslogtreecommitdiffstats
path: root/generic/tclNotify.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclNotify.c')
-rw-r--r--generic/tclNotify.c34
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.