Update tcl to version 8.5.13
[msysgit/kirr.git] / mingw / include / tclPlatDecls.h
blob8652e8d7f0ec38567a356031025a89eda5b91435
1 /*
2 * tclPlatDecls.h --
4 * Declarations of platform specific Tcl APIs.
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
7 * All rights reserved.
8 */
10 #ifndef _TCLPLATDECLS
11 #define _TCLPLATDECLS
13 #undef TCL_STORAGE_CLASS
14 #ifdef BUILD_tcl
15 # define TCL_STORAGE_CLASS DLLEXPORT
16 #else
17 # ifdef USE_TCL_STUBS
18 # define TCL_STORAGE_CLASS
19 # else
20 # define TCL_STORAGE_CLASS DLLIMPORT
21 # endif
22 #endif
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;
31 # else
32 typedef char TCHAR;
33 # endif
34 # define _TCHAR_DEFINED
35 #endif
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
46 /* 0 */
47 EXTERN TCHAR * Tcl_WinUtfToTChar(CONST char *str, int len,
48 Tcl_DString *dsPtr);
49 #endif
50 #ifndef Tcl_WinTCharToUtf_TCL_DECLARED
51 #define Tcl_WinTCharToUtf_TCL_DECLARED
52 /* 1 */
53 EXTERN char * Tcl_WinTCharToUtf(CONST TCHAR *str, int len,
54 Tcl_DString *dsPtr);
55 #endif
56 #endif /* WIN */
57 #ifdef MAC_OSX_TCL /* MACOSX */
58 #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
59 #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
60 /* 0 */
61 EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
62 CONST char *bundleName, int hasResourceFile,
63 int maxPathLen, char *libraryPath);
64 #endif
65 #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
66 #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
67 /* 1 */
68 EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
69 Tcl_Interp *interp, CONST char *bundleName,
70 CONST char *bundleVersion,
71 int hasResourceFile, int maxPathLen,
72 char *libraryPath);
73 #endif
74 #endif /* MACOSX */
76 typedef struct TclPlatStubs {
77 int magic;
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 */
83 #endif /* WIN */
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 */
87 #endif /* MACOSX */
88 } TclPlatStubs;
90 #ifdef __cplusplus
91 extern "C" {
92 #endif
93 extern TclPlatStubs *tclPlatStubsPtr;
94 #ifdef __cplusplus
96 #endif
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 */
108 #endif
109 #ifndef Tcl_WinTCharToUtf
110 #define Tcl_WinTCharToUtf \
111 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
112 #endif
113 #endif /* WIN */
114 #ifdef MAC_OSX_TCL /* MACOSX */
115 #ifndef Tcl_MacOSXOpenBundleResources
116 #define Tcl_MacOSXOpenBundleResources \
117 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
118 #endif
119 #ifndef Tcl_MacOSXOpenVersionedBundleResources
120 #define Tcl_MacOSXOpenVersionedBundleResources \
121 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
122 #endif
123 #endif /* MACOSX */
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 */