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 * TCHAR is needed here for win32, so if it is not defined yet do it here.
26 * This way, we don't need to include <tchar.h> just for one define.
28 #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED)
29 # if defined(_UNICODE)
30 typedef wchar_t TCHAR
;
34 # define _TCHAR_DEFINED
37 /* !BEGIN!: Do not edit below this line. */
40 * Exported function declarations:
43 #if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */
44 #ifndef Tcl_WinUtfToTChar_TCL_DECLARED
45 #define Tcl_WinUtfToTChar_TCL_DECLARED
47 EXTERN TCHAR
* Tcl_WinUtfToTChar(CONST
char *str
, int len
,
50 #ifndef Tcl_WinTCharToUtf_TCL_DECLARED
51 #define Tcl_WinTCharToUtf_TCL_DECLARED
53 EXTERN
char * Tcl_WinTCharToUtf(CONST TCHAR
*str
, int len
,
57 #ifdef MAC_OSX_TCL /* MACOSX */
58 #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
59 #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
61 EXTERN
int Tcl_MacOSXOpenBundleResources(Tcl_Interp
*interp
,
62 CONST
char *bundleName
, int hasResourceFile
,
63 int maxPathLen
, char *libraryPath
);
65 #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
66 #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
68 EXTERN
int Tcl_MacOSXOpenVersionedBundleResources(
69 Tcl_Interp
*interp
, CONST
char *bundleName
,
70 CONST
char *bundleVersion
,
71 int hasResourceFile
, int maxPathLen
,
76 typedef struct TclPlatStubs
{
78 struct TclPlatStubHooks
*hooks
;
80 #if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */
81 TCHAR
* (*tcl_WinUtfToTChar
) (CONST
char *str
, int len
, Tcl_DString
*dsPtr
); /* 0 */
82 char * (*tcl_WinTCharToUtf
) (CONST TCHAR
*str
, int len
, Tcl_DString
*dsPtr
); /* 1 */
84 #ifdef MAC_OSX_TCL /* MACOSX */
85 int (*tcl_MacOSXOpenBundleResources
) (Tcl_Interp
*interp
, CONST
char *bundleName
, int hasResourceFile
, int maxPathLen
, char *libraryPath
); /* 0 */
86 int (*tcl_MacOSXOpenVersionedBundleResources
) (Tcl_Interp
*interp
, CONST
char *bundleName
, CONST
char *bundleVersion
, int hasResourceFile
, int maxPathLen
, char *libraryPath
); /* 1 */
93 extern TclPlatStubs
*tclPlatStubsPtr
;
98 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
101 * Inline function declarations:
104 #if defined(__WIN32__) || defined(__CYGWIN__) /* WIN */
105 #ifndef Tcl_WinUtfToTChar
106 #define Tcl_WinUtfToTChar \
107 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
109 #ifndef Tcl_WinTCharToUtf
110 #define Tcl_WinTCharToUtf \
111 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
114 #ifdef MAC_OSX_TCL /* MACOSX */
115 #ifndef Tcl_MacOSXOpenBundleResources
116 #define Tcl_MacOSXOpenBundleResources \
117 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
119 #ifndef Tcl_MacOSXOpenVersionedBundleResources
120 #define Tcl_MacOSXOpenVersionedBundleResources \
121 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
125 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
127 /* !END!: Do not edit above this line. */
129 #undef TCL_STORAGE_CLASS
130 #define TCL_STORAGE_CLASS DLLIMPORT
132 #endif /* _TCLPLATDECLS */