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 14.1 2004/11/16 19:42:10 morrison Exp $
00010  */
00011 
00012 #ifndef _TCLPLATDECLS
00013 #define _TCLPLATDECLS
00014 
00015 /*
00016  *  Pull in the typedef of TCHAR for windows.
00017  */
00018 #if defined(__CYGWIN__)
00019     typedef char TCHAR;
00020 #elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
00021 #   include <tchar.h>
00022 #   ifndef _TCHAR_DEFINED
00023         /* Borland seems to forget to set this. */
00024         typedef _TCHAR TCHAR;
00025 #       define _TCHAR_DEFINED
00026 #   endif
00027 #   if defined(_MSC_VER) && defined(__STDC__)
00028         /* MSVC++ misses this. */
00029         typedef _TCHAR TCHAR;
00030 #   endif
00031 #endif
00032 
00033 /* !BEGIN!: Do not edit below this line. */
00034 
00035 /*
00036  * Exported function declarations:
00037  */
00038 
00039 #ifdef __WIN32__
00040 /* 0 */
00041 EXTERN TCHAR *          Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str, 
00042                                 int len, Tcl_DString * dsPtr));
00043 /* 1 */
00044 EXTERN char *           Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str, 
00045                                 int len, Tcl_DString * dsPtr));
00046 #endif /* __WIN32__ */
00047 #ifdef MAC_TCL
00048 /* 0 */
00049 EXTERN void             Tcl_MacSetEventProc _ANSI_ARGS_((
00050                                 Tcl_MacConvertEventPtr procPtr));
00051 /* 1 */
00052 EXTERN char *           Tcl_MacConvertTextResource _ANSI_ARGS_((
00053                                 Handle resource));
00054 /* 2 */
00055 EXTERN int              Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp, 
00056                                 CONST char * resourceName, 
00057                                 int resourceNumber, CONST char * fileName));
00058 /* 3 */
00059 EXTERN Handle           Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp, 
00060                                 long resourceType, CONST char * resourceName, 
00061                                 int resourceNumber, CONST char * resFileRef, 
00062                                 int * releaseIt));
00063 /* 4 */
00064 EXTERN int              Tcl_GetOSTypeFromObj _ANSI_ARGS_((
00065                                 Tcl_Interp * interp, Tcl_Obj * objPtr, 
00066                                 OSType * osTypePtr));
00067 /* 5 */
00068 EXTERN void             Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr, 
00069                                 OSType osType));
00070 /* 6 */
00071 EXTERN Tcl_Obj *        Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
00072 /* 7 */
00073 EXTERN int              strncasecmp _ANSI_ARGS_((CONST char * s1, 
00074                                 CONST char * s2, size_t n));
00075 /* 8 */
00076 EXTERN int              strcasecmp _ANSI_ARGS_((CONST char * s1, 
00077                                 CONST char * s2));
00078 #endif /* MAC_TCL */
00079 #ifdef MAC_OSX_TCL
00080 /* 0 */
00081 EXTERN int              Tcl_MacOSXOpenBundleResources _ANSI_ARGS_((
00082                                 Tcl_Interp * interp, CONST char * bundleName, 
00083                                 int hasResourceFile, int maxPathLen, 
00084                                 char * libraryPath));
00085 /* 1 */
00086 EXTERN int              Tcl_MacOSXOpenVersionedBundleResources _ANSI_ARGS_((
00087                                 Tcl_Interp * interp, CONST char * bundleName, 
00088                                 CONST char * bundleVersion, 
00089                                 int hasResourceFile, int maxPathLen, 
00090                                 char * libraryPath));
00091 #endif /* MAC_OSX_TCL */
00092 
00093 typedef struct TclPlatStubs {
00094     int magic;
00095     struct TclPlatStubHooks *hooks;
00096 
00097 #ifdef __WIN32__
00098     TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); /* 0 */
00099     char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); /* 1 */
00100 #endif /* __WIN32__ */
00101 #ifdef MAC_TCL
00102     void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */
00103     char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); /* 1 */
00104     int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * resourceName, int resourceNumber, CONST char * fileName)); /* 2 */
00105     Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, CONST char * resourceName, int resourceNumber, CONST char * resFileRef, int * releaseIt)); /* 3 */
00106     int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr)); /* 4 */
00107     void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType)); /* 5 */
00108     Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); /* 6 */
00109     int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 7 */
00110     int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); /* 8 */
00111 #endif /* MAC_TCL */
00112 #ifdef MAC_OSX_TCL
00113     int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 0 */
00114     int (*tcl_MacOSXOpenVersionedBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 1 */
00115 #endif /* MAC_OSX_TCL */
00116 } TclPlatStubs;
00117 
00118 #ifdef __cplusplus
00119 extern "C" {
00120 #endif
00121 extern TclPlatStubs *tclPlatStubsPtr;
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 
00126 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
00127 
00128 /*
00129  * Inline function declarations:
00130  */
00131 
00132 #ifdef __WIN32__
00133 #ifndef Tcl_WinUtfToTChar
00134 #define Tcl_WinUtfToTChar \
00135         (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
00136 #endif
00137 #ifndef Tcl_WinTCharToUtf
00138 #define Tcl_WinTCharToUtf \
00139         (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
00140 #endif
00141 #endif /* __WIN32__ */
00142 #ifdef MAC_TCL
00143 #ifndef Tcl_MacSetEventProc
00144 #define Tcl_MacSetEventProc \
00145         (tclPlatStubsPtr->tcl_MacSetEventProc) /* 0 */
00146 #endif
00147 #ifndef Tcl_MacConvertTextResource
00148 #define Tcl_MacConvertTextResource \
00149         (tclPlatStubsPtr->tcl_MacConvertTextResource) /* 1 */
00150 #endif
00151 #ifndef Tcl_MacEvalResource
00152 #define Tcl_MacEvalResource \
00153         (tclPlatStubsPtr->tcl_MacEvalResource) /* 2 */
00154 #endif
00155 #ifndef Tcl_MacFindResource
00156 #define Tcl_MacFindResource \
00157         (tclPlatStubsPtr->tcl_MacFindResource) /* 3 */
00158 #endif
00159 #ifndef Tcl_GetOSTypeFromObj
00160 #define Tcl_GetOSTypeFromObj \
00161         (tclPlatStubsPtr->tcl_GetOSTypeFromObj) /* 4 */
00162 #endif
00163 #ifndef Tcl_SetOSTypeObj
00164 #define Tcl_SetOSTypeObj \
00165         (tclPlatStubsPtr->tcl_SetOSTypeObj) /* 5 */
00166 #endif
00167 #ifndef Tcl_NewOSTypeObj
00168 #define Tcl_NewOSTypeObj \
00169         (tclPlatStubsPtr->tcl_NewOSTypeObj) /* 6 */
00170 #endif
00171 #ifndef strncasecmp
00172 #define strncasecmp \
00173         (tclPlatStubsPtr->strncasecmp) /* 7 */
00174 #endif
00175 #ifndef strcasecmp
00176 #define strcasecmp \
00177         (tclPlatStubsPtr->strcasecmp) /* 8 */
00178 #endif
00179 #endif /* MAC_TCL */
00180 #ifdef MAC_OSX_TCL
00181 #ifndef Tcl_MacOSXOpenBundleResources
00182 #define Tcl_MacOSXOpenBundleResources \
00183         (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
00184 #endif
00185 #ifndef Tcl_MacOSXOpenVersionedBundleResources
00186 #define Tcl_MacOSXOpenVersionedBundleResources \
00187         (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
00188 #endif
00189 #endif /* MAC_OSX_TCL */
00190 
00191 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
00192 
00193 /* !END!: Do not edit above this line. */
00194 
00195 #endif /* _TCLPLATDECLS */
00196 
00197 
00198 
00199 /*
00200  * Local Variables:
00201  * mode: C
00202  * tab-width: 8
00203  * c-basic-offset: 4
00204  * indent-tabs-mode: t
00205  * End:
00206  * ex: shiftwidth=4 tabstop=8
00207  */

Generated on Mon Sep 18 01:24:44 2006 for BRL-CAD by  doxygen 1.4.6