| 1 |
#define TCL_EVENT_IMPLEMENT |
| 2 |
#ifdef WIN32 |
| 3 |
#include "../pTk/tclWinNotify.c" |
| 4 |
|
| 5 |
void |
| 6 |
Tcl_WatchHandle(HANDLE h, Tcl_HandleProc *proc, ClientData clientData) |
| 7 |
{ |
| 8 |
#if 0 |
| 9 |
int i = 0; |
| 10 |
while (i < notifier.hCount) |
| 11 |
{ |
| 12 |
if (notifier.hArray[i] == h) |
| 13 |
break; |
| 14 |
i++; |
| 15 |
} |
| 16 |
if (i == notifier.hCount) |
| 17 |
{ |
| 18 |
if (notifier.hCount < MAXIMUM_WAIT_OBJECTS) |
| 19 |
{ |
| 20 |
notifier.hArray[i] = h; |
| 21 |
notifier.hCount++; |
| 22 |
} |
| 23 |
} |
| 24 |
if (i < notifier.hCount) |
| 25 |
{ |
| 26 |
notifier.pArray[i].proc = proc; |
| 27 |
notifier.pArray[i].clientData = clientData; |
| 28 |
} |
| 29 |
#endif |
| 30 |
} |
| 31 |
|
| 32 |
|
| 33 |
#else |
| 34 |
#include "../pTk/tclUnixNotfy.c" |
| 35 |
#endif |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
Tcl_NotifierProcs tclOriginalNotifier = { |
| 46 |
Tcl_SetTimer, |
| 47 |
Tcl_WaitForEvent, |
| 48 |
#if !defined(__WIN32__) && !defined(MAC_TCL) |
| 49 |
Tcl_CreateFileHandler, |
| 50 |
Tcl_DeleteFileHandler, |
| 51 |
#else |
| 52 |
NULL, |
| 53 |
NULL, |
| 54 |
#endif |
| 55 |
NULL, |
| 56 |
NULL, |
| 57 |
NULL, |
| 58 |
NULL |
| 59 |
}; |
| 60 |
|
| 61 |
|