tclPlatDecls.h

Go to the documentation of this file.
00001 /*
00002  * tclPlatDecls.h --
00003  *
00004  *      Declarations of platform specific Tcl APIs.
00005  *
00006  * Copyright (c) 1998-1999 by Scriptics Corporation.
00007  * All rights reserved.
00008  *
00009  * RCS: @(#) $Id: tclPlatDecls.h,v 1.27 2007/12/13 15:23:20 dgp Exp $
00010  */
00011 
00012 #ifndef _TCLPLATDECLS
00013 #define _TCLPLATDECLS
00014 
00015 #undef TCL_STORAGE_CLASS
00016 #ifdef BUILD_tcl
00017 #   define TCL_STORAGE_CLASS DLLEXPORT
00018 #else
00019 #   ifdef USE_TCL_STUBS
00020 #      define TCL_STORAGE_CLASS
00021 #   else
00022 #      define TCL_STORAGE_CLASS DLLIMPORT
00023 #   endif
00024 #endif
00025 
00026 /*
00027  *  Pull in the typedef of TCHAR for windows.
00028  */
00029 #if defined(__CYGWIN__)
00030     typedef char TCHAR;
00031 #elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
00032 #   include <tchar.h>
00033 #   ifndef _TCHAR_DEFINED
00034         /* Borland seems to forget to set this. */
00035         typedef _TCHAR TCHAR;
00036 #       define _TCHAR_DEFINED
00037 #   endif
00038 #   if defined(_MSC_VER) && defined(__STDC__)
00039         /* MSVC++ misses this. */
00040         typedef _TCHAR TCHAR;
00041 #   endif
00042 #endif
00043 
00044 /* !BEGIN!: Do not edit below this line. */
00045 
00046 /*
00047  * Exported function declarations:
00048  */
00049 
00050 #ifdef __WIN32__ /* WIN */
00051 #ifndef Tcl_WinUtfToTChar_TCL_DECLARED
00052 #define Tcl_WinUtfToTChar_TCL_DECLARED
00053 /* 0 */
00054 EXTERN TCHAR *          Tcl_WinUtfToTChar (CONST char * str, int len, 
00055                                 Tcl_DString * dsPtr);
00056 #endif
00057 #ifndef Tcl_WinTCharToUtf_TCL_DECLARED
00058 #define Tcl_WinTCharToUtf_TCL_DECLARED
00059 /* 1 */
00060 EXTERN char *           Tcl_WinTCharToUtf (CONST TCHAR * str, int len, 
00061                                 Tcl_DString * dsPtr);
00062 #endif
00063 #endif /* WIN */
00064 #ifdef MAC_OSX_TCL /* MACOSX */
00065 #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
00066 #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
00067 /* 0 */
00068 EXTERN int              Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp, 
00069                                 CONST char * bundleName, int hasResourceFile, 
00070                                 int maxPathLen, char * libraryPath);
00071 #endif
00072 #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
00073 #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
00074 /* 1 */
00075 EXTERN int              Tcl_MacOSXOpenVersionedBundleResources (
00076                                 Tcl_Interp * interp, CONST char * bundleName, 
00077                                 CONST char * bundleVersion, 
00078                                 int hasResourceFile, int maxPathLen, 
00079                                 char * libraryPath);
00080 #endif
00081 #endif /* MACOSX */
00082 
00083 typedef struct TclPlatStubs {
00084     int magic;
00085     struct TclPlatStubHooks *hooks;
00086 
00087 #ifdef __WIN32__ /* WIN */
00088     TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */
00089     char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */
00090 #endif /* WIN */
00091 #ifdef MAC_OSX_TCL /* MACOSX */
00092     int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */
00093     int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */
00094 #endif /* MACOSX */
00095 } TclPlatStubs;
00096 
00097 #ifdef __cplusplus
00098 extern "C" {
00099 #endif
00100 extern TclPlatStubs *tclPlatStubsPtr;
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104 
00105 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
00106 
00107 /*
00108  * Inline function declarations:
00109  */
00110 
00111 #ifdef __WIN32__ /* WIN */
00112 #ifndef Tcl_WinUtfToTChar
00113 #define Tcl_WinUtfToTChar \
00114         (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
00115 #endif
00116 #ifndef Tcl_WinTCharToUtf
00117 #define Tcl_WinTCharToUtf \
00118         (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
00119 #endif
00120 #endif /* WIN */
00121 #ifdef MAC_OSX_TCL /* MACOSX */
00122 #ifndef Tcl_MacOSXOpenBundleResources
00123 #define Tcl_MacOSXOpenBundleResources \
00124         (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
00125 #endif
00126 #ifndef Tcl_MacOSXOpenVersionedBundleResources
00127 #define Tcl_MacOSXOpenVersionedBundleResources \
00128         (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
00129 #endif
00130 #endif /* MACOSX */
00131 
00132 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
00133 
00134 /* !END!: Do not edit above this line. */
00135 
00136 #undef TCL_STORAGE_CLASS
00137 #define TCL_STORAGE_CLASS DLLIMPORT
00138 
00139 #endif /* _TCLPLATDECLS */
00140 
00141 



Generated on Wed Mar 12 12:18:20 2008 by  doxygen 1.5.1