4 * Declarations of platform specific Tcl APIs.
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
9 * RCS: @(#) $Id: tclPlatDecls.h,v 1.27 2007/12/13 15:23:20 dgp Exp $
15 #undef TCL_STORAGE_CLASS
17 # define TCL_STORAGE_CLASS DLLEXPORT
20 # define TCL_STORAGE_CLASS
22 # define TCL_STORAGE_CLASS DLLIMPORT
27 * Pull in the typedef of TCHAR for windows.
29 #if defined(__CYGWIN__)
31 #elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
33 # ifndef _TCHAR_DEFINED
34 /* Borland seems to forget to set this. */
36 # define _TCHAR_DEFINED
38 # if defined(_MSC_VER) && defined(__STDC__)
39 /* MSVC++ misses this. */
44 /* !BEGIN!: Do not edit below this line. */
47 * Exported function declarations:
50 #ifdef __WIN32__ /* WIN */
51 #ifndef Tcl_WinUtfToTChar_TCL_DECLARED
52 #define Tcl_WinUtfToTChar_TCL_DECLARED
54 EXTERN TCHAR
* Tcl_WinUtfToTChar (CONST
char * str
, int len
,
57 #ifndef Tcl_WinTCharToUtf_TCL_DECLARED
58 #define Tcl_WinTCharToUtf_TCL_DECLARED
60 EXTERN
char * Tcl_WinTCharToUtf (CONST TCHAR
* str
, int len
,
64 #ifdef MAC_OSX_TCL /* MACOSX */
65 #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
66 #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
68 EXTERN
int Tcl_MacOSXOpenBundleResources (Tcl_Interp
* interp
,
69 CONST
char * bundleName
, int hasResourceFile
,
70 int maxPathLen
, char * libraryPath
);
72 #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
73 #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
75 EXTERN
int Tcl_MacOSXOpenVersionedBundleResources (
76 Tcl_Interp
* interp
, CONST
char * bundleName
,
77 CONST
char * bundleVersion
,
78 int hasResourceFile
, int maxPathLen
,
83 typedef struct TclPlatStubs
{
85 struct TclPlatStubHooks
*hooks
;
87 #ifdef __WIN32__ /* WIN */
88 TCHAR
* (*tcl_WinUtfToTChar
) (CONST
char * str
, int len
, Tcl_DString
* dsPtr
); /* 0 */
89 char * (*tcl_WinTCharToUtf
) (CONST TCHAR
* str
, int len
, Tcl_DString
* dsPtr
); /* 1 */
91 #ifdef MAC_OSX_TCL /* MACOSX */
92 int (*tcl_MacOSXOpenBundleResources
) (Tcl_Interp
* interp
, CONST
char * bundleName
, int hasResourceFile
, int maxPathLen
, char * libraryPath
); /* 0 */
93 int (*tcl_MacOSXOpenVersionedBundleResources
) (Tcl_Interp
* interp
, CONST
char * bundleName
, CONST
char * bundleVersion
, int hasResourceFile
, int maxPathLen
, char * libraryPath
); /* 1 */
100 extern TclPlatStubs
*tclPlatStubsPtr
;
105 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
108 * Inline function declarations:
111 #ifdef __WIN32__ /* WIN */
112 #ifndef Tcl_WinUtfToTChar
113 #define Tcl_WinUtfToTChar \
114 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
116 #ifndef Tcl_WinTCharToUtf
117 #define Tcl_WinTCharToUtf \
118 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
121 #ifdef MAC_OSX_TCL /* MACOSX */
122 #ifndef Tcl_MacOSXOpenBundleResources
123 #define Tcl_MacOSXOpenBundleResources \
124 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
126 #ifndef Tcl_MacOSXOpenVersionedBundleResources
127 #define Tcl_MacOSXOpenVersionedBundleResources \
128 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
132 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
134 /* !END!: Do not edit above this line. */
136 #undef TCL_STORAGE_CLASS
137 #define TCL_STORAGE_CLASS DLLIMPORT
139 #endif /* _TCLPLATDECLS */