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
46extern "C" {
47#endif
48
49/*
50 * Exported function declarations:
51 */
52
53#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
54/* 0 */
55EXTERN TCHAR * Tcl_WinUtfToTChar(const char *str, int len,
56 Tcl_DString *dsPtr);
57/* 1 */
58EXTERN char * Tcl_WinTCharToUtf(const TCHAR *str, int len,
59 Tcl_DString *dsPtr);
60#endif /* WIN */
61#ifdef MAC_OSX_TCL /* MACOSX */
62/* 0 */
63EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
64 const char *bundleName, int hasResourceFile,
65 int maxPathLen, char *libraryPath);
66/* 1 */
67EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
68 Tcl_Interp *interp, const char *bundleName,
69 const char *bundleVersion,
70 int hasResourceFile, int maxPathLen,
71 char *libraryPath);
72#endif /* MACOSX */
73
74typedef struct TclPlatStubs {
75 int magic;
76 void *hooks;
77
78#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
79 TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr); /* 0 */
80 char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */
81#endif /* WIN */
82#ifdef MAC_OSX_TCL /* MACOSX */
83 int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */
84 int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */
85#endif /* MACOSX */
86} TclPlatStubs;
87
88extern const TclPlatStubs *tclPlatStubsPtr;
89
90#ifdef __cplusplus
91}
92#endif
93
94#if defined(USE_TCL_STUBS)
95
96/*
97 * Inline function declarations:
98 */
99
100#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
101#define Tcl_WinUtfToTChar \
102 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
103#define Tcl_WinTCharToUtf \
104 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
105#endif /* WIN */
106#ifdef MAC_OSX_TCL /* MACOSX */
107#define Tcl_MacOSXOpenBundleResources \
108 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
109#define Tcl_MacOSXOpenVersionedBundleResources \
110 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
111#endif /* MACOSX */
112
113#endif /* defined(USE_TCL_STUBS) */
114
115/* !END!: Do not edit above this line. */
116
117#undef TCL_STORAGE_CLASS
118#define TCL_STORAGE_CLASS DLLIMPORT
119
120#endif /* _TCLPLATDECLS */
121
122
123