4 * Declarations of platform specific Tcl APIs.
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
9 * RCS: @(#) $Id: tclPlatDecls.h,v 1.27.2.2 2010/05/21 12:18:17 nijtmans 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(__WIN32__) && !defined(_TCHAR_DEFINED)
31 # ifndef _TCHAR_DEFINED
32 /* Borland seems to forget to set this. */
34 # define _TCHAR_DEFINED
38 /* !BEGIN!: Do not edit below this line. */
41 * Exported function declarations:
44 #ifdef __WIN32__ /* WIN */
45 #ifndef Tcl_WinUtfToTChar_TCL_DECLARED
46 #define Tcl_WinUtfToTChar_TCL_DECLARED
48 EXTERN TCHAR
* Tcl_WinUtfToTChar(CONST
char *str
, int len
,
51 #ifndef Tcl_WinTCharToUtf_TCL_DECLARED
52 #define Tcl_WinTCharToUtf_TCL_DECLARED
54 EXTERN
char * Tcl_WinTCharToUtf(CONST TCHAR
*str
, int len
,
58 #ifdef MAC_OSX_TCL /* MACOSX */
59 #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
60 #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
62 EXTERN
int Tcl_MacOSXOpenBundleResources(Tcl_Interp
*interp
,
63 CONST
char *bundleName
, int hasResourceFile
,
64 int maxPathLen
, char *libraryPath
);
66 #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
67 #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
69 EXTERN
int Tcl_MacOSXOpenVersionedBundleResources(
70 Tcl_Interp
*interp
, CONST
char *bundleName
,
71 CONST
char *bundleVersion
,
72 int hasResourceFile
, int maxPathLen
,
77 typedef struct TclPlatStubs
{
79 struct TclPlatStubHooks
*hooks
;
81 #ifdef __WIN32__ /* WIN */
82 TCHAR
* (*tcl_WinUtfToTChar
) (CONST
char *str
, int len
, Tcl_DString
*dsPtr
); /* 0 */
83 char * (*tcl_WinTCharToUtf
) (CONST TCHAR
*str
, int len
, Tcl_DString
*dsPtr
); /* 1 */
85 #ifdef MAC_OSX_TCL /* MACOSX */
86 int (*tcl_MacOSXOpenBundleResources
) (Tcl_Interp
*interp
, CONST
char *bundleName
, int hasResourceFile
, int maxPathLen
, char *libraryPath
); /* 0 */
87 int (*tcl_MacOSXOpenVersionedBundleResources
) (Tcl_Interp
*interp
, CONST
char *bundleName
, CONST
char *bundleVersion
, int hasResourceFile
, int maxPathLen
, char *libraryPath
); /* 1 */
94 extern TclPlatStubs
*tclPlatStubsPtr
;
99 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
102 * Inline function declarations:
105 #ifdef __WIN32__ /* WIN */
106 #ifndef Tcl_WinUtfToTChar
107 #define Tcl_WinUtfToTChar \
108 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
110 #ifndef Tcl_WinTCharToUtf
111 #define Tcl_WinTCharToUtf \
112 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
115 #ifdef MAC_OSX_TCL /* MACOSX */
116 #ifndef Tcl_MacOSXOpenBundleResources
117 #define Tcl_MacOSXOpenBundleResources \
118 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
120 #ifndef Tcl_MacOSXOpenVersionedBundleResources
121 #define Tcl_MacOSXOpenVersionedBundleResources \
122 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
126 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
128 /* !END!: Do not edit above this line. */
130 #undef TCL_STORAGE_CLASS
131 #define TCL_STORAGE_CLASS DLLIMPORT
133 #endif /* _TCLPLATDECLS */