jpayne@69
|
1 /*
|
jpayne@69
|
2 * tclPlatDecls.h --
|
jpayne@69
|
3 *
|
jpayne@69
|
4 * Declarations of platform specific Tcl APIs.
|
jpayne@69
|
5 *
|
jpayne@69
|
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
|
jpayne@69
|
7 * All rights reserved.
|
jpayne@69
|
8 */
|
jpayne@69
|
9
|
jpayne@69
|
10 #ifndef _TCLPLATDECLS
|
jpayne@69
|
11 #define _TCLPLATDECLS
|
jpayne@69
|
12
|
jpayne@69
|
13 #undef TCL_STORAGE_CLASS
|
jpayne@69
|
14 #ifdef BUILD_tcl
|
jpayne@69
|
15 # define TCL_STORAGE_CLASS DLLEXPORT
|
jpayne@69
|
16 #else
|
jpayne@69
|
17 # ifdef USE_TCL_STUBS
|
jpayne@69
|
18 # define TCL_STORAGE_CLASS
|
jpayne@69
|
19 # else
|
jpayne@69
|
20 # define TCL_STORAGE_CLASS DLLIMPORT
|
jpayne@69
|
21 # endif
|
jpayne@69
|
22 #endif
|
jpayne@69
|
23
|
jpayne@69
|
24 /*
|
jpayne@69
|
25 * WARNING: This file is automatically generated by the tools/genStubs.tcl
|
jpayne@69
|
26 * script. Any modifications to the function declarations below should be made
|
jpayne@69
|
27 * in the generic/tcl.decls script.
|
jpayne@69
|
28 */
|
jpayne@69
|
29
|
jpayne@69
|
30 /*
|
jpayne@69
|
31 * TCHAR is needed here for win32, so if it is not defined yet do it here.
|
jpayne@69
|
32 * This way, we don't need to include <tchar.h> just for one define.
|
jpayne@69
|
33 */
|
jpayne@69
|
34 #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED)
|
jpayne@69
|
35 # if defined(_UNICODE)
|
jpayne@69
|
36 typedef wchar_t TCHAR;
|
jpayne@69
|
37 # else
|
jpayne@69
|
38 typedef char TCHAR;
|
jpayne@69
|
39 # endif
|
jpayne@69
|
40 # define _TCHAR_DEFINED
|
jpayne@69
|
41 #endif
|
jpayne@69
|
42
|
jpayne@69
|
43 /* !BEGIN!: Do not edit below this line. */
|
jpayne@69
|
44
|
jpayne@69
|
45 #ifdef __cplusplus
|
jpayne@69
|
46 extern "C" {
|
jpayne@69
|
47 #endif
|
jpayne@69
|
48
|
jpayne@69
|
49 /*
|
jpayne@69
|
50 * Exported function declarations:
|
jpayne@69
|
51 */
|
jpayne@69
|
52
|
jpayne@69
|
53 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
|
jpayne@69
|
54 /* 0 */
|
jpayne@69
|
55 EXTERN TCHAR * Tcl_WinUtfToTChar(const char *str, int len,
|
jpayne@69
|
56 Tcl_DString *dsPtr);
|
jpayne@69
|
57 /* 1 */
|
jpayne@69
|
58 EXTERN char * Tcl_WinTCharToUtf(const TCHAR *str, int len,
|
jpayne@69
|
59 Tcl_DString *dsPtr);
|
jpayne@69
|
60 /* Slot 2 is reserved */
|
jpayne@69
|
61 /* 3 */
|
jpayne@69
|
62 EXTERN void TclUnusedStubEntry(void);
|
jpayne@69
|
63 #endif /* WIN */
|
jpayne@69
|
64 #ifdef MAC_OSX_TCL /* MACOSX */
|
jpayne@69
|
65 /* 0 */
|
jpayne@69
|
66 EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
|
jpayne@69
|
67 const char *bundleName, int hasResourceFile,
|
jpayne@69
|
68 int maxPathLen, char *libraryPath);
|
jpayne@69
|
69 /* 1 */
|
jpayne@69
|
70 EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
|
jpayne@69
|
71 Tcl_Interp *interp, const char *bundleName,
|
jpayne@69
|
72 const char *bundleVersion,
|
jpayne@69
|
73 int hasResourceFile, int maxPathLen,
|
jpayne@69
|
74 char *libraryPath);
|
jpayne@69
|
75 /* 2 */
|
jpayne@69
|
76 EXTERN void TclUnusedStubEntry(void);
|
jpayne@69
|
77 #endif /* MACOSX */
|
jpayne@69
|
78
|
jpayne@69
|
79 typedef struct TclPlatStubs {
|
jpayne@69
|
80 int magic;
|
jpayne@69
|
81 void *hooks;
|
jpayne@69
|
82
|
jpayne@69
|
83 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
|
jpayne@69
|
84 TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr); /* 0 */
|
jpayne@69
|
85 char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */
|
jpayne@69
|
86 void (*reserved2)(void);
|
jpayne@69
|
87 void (*tclUnusedStubEntry) (void); /* 3 */
|
jpayne@69
|
88 #endif /* WIN */
|
jpayne@69
|
89 #ifdef MAC_OSX_TCL /* MACOSX */
|
jpayne@69
|
90 int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */
|
jpayne@69
|
91 int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */
|
jpayne@69
|
92 void (*tclUnusedStubEntry) (void); /* 2 */
|
jpayne@69
|
93 #endif /* MACOSX */
|
jpayne@69
|
94 } TclPlatStubs;
|
jpayne@69
|
95
|
jpayne@69
|
96 extern const TclPlatStubs *tclPlatStubsPtr;
|
jpayne@69
|
97
|
jpayne@69
|
98 #ifdef __cplusplus
|
jpayne@69
|
99 }
|
jpayne@69
|
100 #endif
|
jpayne@69
|
101
|
jpayne@69
|
102 #if defined(USE_TCL_STUBS)
|
jpayne@69
|
103
|
jpayne@69
|
104 /*
|
jpayne@69
|
105 * Inline function declarations:
|
jpayne@69
|
106 */
|
jpayne@69
|
107
|
jpayne@69
|
108 #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
|
jpayne@69
|
109 #define Tcl_WinUtfToTChar \
|
jpayne@69
|
110 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
|
jpayne@69
|
111 #define Tcl_WinTCharToUtf \
|
jpayne@69
|
112 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
|
jpayne@69
|
113 /* Slot 2 is reserved */
|
jpayne@69
|
114 #define TclUnusedStubEntry \
|
jpayne@69
|
115 (tclPlatStubsPtr->tclUnusedStubEntry) /* 3 */
|
jpayne@69
|
116 #endif /* WIN */
|
jpayne@69
|
117 #ifdef MAC_OSX_TCL /* MACOSX */
|
jpayne@69
|
118 #define Tcl_MacOSXOpenBundleResources \
|
jpayne@69
|
119 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
|
jpayne@69
|
120 #define Tcl_MacOSXOpenVersionedBundleResources \
|
jpayne@69
|
121 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
|
jpayne@69
|
122 #define TclUnusedStubEntry \
|
jpayne@69
|
123 (tclPlatStubsPtr->tclUnusedStubEntry) /* 2 */
|
jpayne@69
|
124 #endif /* MACOSX */
|
jpayne@69
|
125
|
jpayne@69
|
126 #endif /* defined(USE_TCL_STUBS) */
|
jpayne@69
|
127
|
jpayne@69
|
128 /* !END!: Do not edit above this line. */
|
jpayne@69
|
129
|
jpayne@69
|
130 #undef TclUnusedStubEntry
|
jpayne@69
|
131 #ifdef MAC_OSX_TCL /* MACOSX */
|
jpayne@69
|
132 #undef Tcl_MacOSXOpenBundleResources
|
jpayne@69
|
133 #define Tcl_MacOSXOpenBundleResources(a,b,c,d,e) Tcl_MacOSXOpenVersionedBundleResources(a,b,NULL,c,d,e)
|
jpayne@69
|
134 #endif
|
jpayne@69
|
135
|
jpayne@69
|
136 #undef TCL_STORAGE_CLASS
|
jpayne@69
|
137 #define TCL_STORAGE_CLASS DLLIMPORT
|
jpayne@69
|
138
|
jpayne@69
|
139 #endif /* _TCLPLATDECLS */
|
jpayne@69
|
140
|
jpayne@69
|
141
|