Debian Codegraph @

generic/tclPlatDecls.h

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