4 * Declarations of platform specific Tcl APIs.
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
13 #undef TCL_STORAGE_CLASS
15 # define TCL_STORAGE_CLASS DLLEXPORT
18 # define TCL_STORAGE_CLASS
20 # define TCL_STORAGE_CLASS DLLIMPORT
25 * Pull in the typedef of TCHAR for windows.
27 #if defined(__WIN32__) && !defined(_TCHAR_DEFINED)
29 # ifndef _TCHAR_DEFINED
30 /* Borland seems to forget to set this. */
32 # define _TCHAR_DEFINED
34 # if defined(_MSC_VER) && defined(__STDC__)
35 /* VS2005 SP1 misses this. See [Bug #3110161] */
40 /* !BEGIN!: Do not edit below this line. */
43 * Exported function declarations:
46 #ifdef __WIN32__ /* WIN */
47 #ifndef Tcl_WinUtfToTChar_TCL_DECLARED
48 #define Tcl_WinUtfToTChar_TCL_DECLARED
50 EXTERN TCHAR
* Tcl_WinUtfToTChar(CONST
char *str
, int len
,
53 #ifndef Tcl_WinTCharToUtf_TCL_DECLARED
54 #define Tcl_WinTCharToUtf_TCL_DECLARED
56 EXTERN
char * Tcl_WinTCharToUtf(CONST TCHAR
*str
, int len
,
60 #ifdef MAC_OSX_TCL /* MACOSX */
61 #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
62 #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
64 EXTERN
int Tcl_MacOSXOpenBundleResources(Tcl_Interp
*interp
,
65 CONST
char *bundleName
, int hasResourceFile
,
66 int maxPathLen
, char *libraryPath
);
68 #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
69 #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
71 EXTERN
int Tcl_MacOSXOpenVersionedBundleResources(
72 Tcl_Interp
*interp
, CONST
char *bundleName
,
73 CONST
char *bundleVersion
,
74 int hasResourceFile
, int maxPathLen
,
79 typedef struct TclPlatStubs
{
81 struct TclPlatStubHooks
*hooks
;
83 #ifdef __WIN32__ /* WIN */
84 TCHAR
* (*tcl_WinUtfToTChar
) (CONST
char *str
, int len
, Tcl_DString
*dsPtr
); /* 0 */
85 char * (*tcl_WinTCharToUtf
) (CONST TCHAR
*str
, int len
, Tcl_DString
*dsPtr
); /* 1 */
87 #ifdef MAC_OSX_TCL /* MACOSX */
88 int (*tcl_MacOSXOpenBundleResources
) (Tcl_Interp
*interp
, CONST
char *bundleName
, int hasResourceFile
, int maxPathLen
, char *libraryPath
); /* 0 */
89 int (*tcl_MacOSXOpenVersionedBundleResources
) (Tcl_Interp
*interp
, CONST
char *bundleName
, CONST
char *bundleVersion
, int hasResourceFile
, int maxPathLen
, char *libraryPath
); /* 1 */
96 extern TclPlatStubs
*tclPlatStubsPtr
;
101 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
104 * Inline function declarations:
107 #ifdef __WIN32__ /* WIN */
108 #ifndef Tcl_WinUtfToTChar
109 #define Tcl_WinUtfToTChar \
110 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
112 #ifndef Tcl_WinTCharToUtf
113 #define Tcl_WinTCharToUtf \
114 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
117 #ifdef MAC_OSX_TCL /* MACOSX */
118 #ifndef Tcl_MacOSXOpenBundleResources
119 #define Tcl_MacOSXOpenBundleResources \
120 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
122 #ifndef Tcl_MacOSXOpenVersionedBundleResources
123 #define Tcl_MacOSXOpenVersionedBundleResources \
124 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
128 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
130 /* !END!: Do not edit above this line. */
132 #undef TCL_STORAGE_CLASS
133 #define TCL_STORAGE_CLASS DLLIMPORT
135 #endif /* _TCLPLATDECLS */