diff options
author | das <das> | 2009-04-10 18:02:36 (GMT) |
---|---|---|
committer | das <das> | 2009-04-10 18:02:36 (GMT) |
commit | 2858f83307b48cadf03d1ae69cb92820edf3e1cc (patch) | |
tree | 73c1d2c98db1bdf47db23cff6bb36aad46156ef8 /generic | |
parent | 9bdf20b285315e722860d65d2ada928f6ece07f0 (diff) | |
download | tcl-2858f83307b48cadf03d1ae69cb92820edf3e1cc.zip tcl-2858f83307b48cadf03d1ae69cb92820edf3e1cc.tar.gz tcl-2858f83307b48cadf03d1ae69cb92820edf3e1cc.tar.bz2 |
* macosx/tclMacOSXNotify.c: revise CoreFoundation notifier to allow
* unix/tclUnixChan.c: embedding into applications that
* unix/tclUnixEvent.c: already have a CFRunLoop running and
want to run the tcl event loop via
Tcl_ServiceModeHook(TCL_SERVICE_ALL).
* macosx/tclMacOSXNotify.c: add CFRunLoop based Tcl_Sleep() and
* unix/tclUnixChan.c: TclUnixWaitForFile() implementations
* unix/tclUnixEvent.c: and disable select() based ones in
CoreFoundation builds.
* unix/tclUnixNotify.c: simplify, sync with tclMacOSXNotify.c.
* generic/tclInt.decls: add TclMacOSXNotifierAddRunLoopMode()
* generic/tclIntPlatDecls.h: internal API, regen.
* generic/tclStubInit.c:
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclInt.decls | 5 | ||||
-rw-r--r-- | generic/tclIntPlatDecls.h | 13 | ||||
-rw-r--r-- | generic/tclStubInit.c | 3 |
3 files changed, 18 insertions, 3 deletions
diff --git a/generic/tclInt.decls b/generic/tclInt.decls index b464b91..0db9059 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.137 2009/02/27 23:03:42 nijtmans Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.138 2009/04/10 18:02:36 das Exp $ library tcl @@ -1181,3 +1181,6 @@ declare 18 macosx { const char *fileName, Tcl_StatBuf *statBufPtr, Tcl_GlobTypeData *types) } +declare 19 macosx { + void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode) +} diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 35c7e52..b3a55ac 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.38 2008/10/22 20:23:59 nijtmans Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.39 2009/04/10 18:02:36 das Exp $ */ #ifndef _TCLINTPLATDECLS @@ -368,6 +368,12 @@ EXTERN int TclMacOSXMatchType (Tcl_Interp * interp, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); #endif +#ifndef TclMacOSXNotifierAddRunLoopMode_TCL_DECLARED +#define TclMacOSXNotifierAddRunLoopMode_TCL_DECLARED +/* 19 */ +EXTERN void TclMacOSXNotifierAddRunLoopMode ( + const void * runLoopMode); +#endif #endif /* MACOSX */ typedef struct TclIntPlatStubs { @@ -443,6 +449,7 @@ typedef struct TclIntPlatStubs { int (*tclMacOSXSetFileAttribute) (Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr); /* 16 */ int (*tclMacOSXCopyFileAttributes) (const char * src, const char * dst, const Tcl_StatBuf * statBufPtr); /* 17 */ int (*tclMacOSXMatchType) (Tcl_Interp * interp, const char * pathName, const char * fileName, Tcl_StatBuf * statBufPtr, Tcl_GlobTypeData * types); /* 18 */ + void (*tclMacOSXNotifierAddRunLoopMode) (const void * runLoopMode); /* 19 */ #endif /* MACOSX */ } TclIntPlatStubs; @@ -693,6 +700,10 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr; #define TclMacOSXMatchType \ (tclIntPlatStubsPtr->tclMacOSXMatchType) /* 18 */ #endif +#ifndef TclMacOSXNotifierAddRunLoopMode +#define TclMacOSXNotifierAddRunLoopMode \ + (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */ +#endif #endif /* MACOSX */ #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f33086d..fb032ea 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.179 2009/02/10 23:09:08 nijtmans Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.180 2009/04/10 18:02:36 das Exp $ */ #include "tclInt.h" @@ -362,6 +362,7 @@ static const TclIntPlatStubs tclIntPlatStubs = { TclMacOSXSetFileAttribute, /* 16 */ TclMacOSXCopyFileAttributes, /* 17 */ TclMacOSXMatchType, /* 18 */ + TclMacOSXNotifierAddRunLoopMode, /* 19 */ #endif /* MACOSX */ }; |