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 * RCS: @(#) $Id: tclPlatDecls.h,v 1.27.2.2 2010/05/21 12:18:17 nijtmans Exp $
10 */
11
12#ifndef _TCLPLATDECLS
13#define _TCLPLATDECLS
14
15#undef TCL_STORAGE_CLASS
16#ifdef BUILD_tcl
17#   define TCL_STORAGE_CLASS DLLEXPORT
18#else
19#   ifdef USE_TCL_STUBS
20#      define TCL_STORAGE_CLASS
21#   else
22#      define TCL_STORAGE_CLASS DLLIMPORT
23#   endif
24#endif
25
26/*
27 *  Pull in the typedef of TCHAR for windows.
28 */
29#if defined(__WIN32__) && !defined(_TCHAR_DEFINED)
30#   include <tchar.h>
31#   ifndef _TCHAR_DEFINED
32	/* Borland seems to forget to set this. */
33	typedef _TCHAR TCHAR;
34#	define _TCHAR_DEFINED
35#   endif
36#endif
37
38/* !BEGIN!: Do not edit below this line. */
39
40/*
41 * Exported function declarations:
42 */
43
44#ifdef __WIN32__ /* WIN */
45#ifndef Tcl_WinUtfToTChar_TCL_DECLARED
46#define Tcl_WinUtfToTChar_TCL_DECLARED
47/* 0 */
48EXTERN TCHAR *		Tcl_WinUtfToTChar(CONST char *str, int len,
49				Tcl_DString *dsPtr);
50#endif
51#ifndef Tcl_WinTCharToUtf_TCL_DECLARED
52#define Tcl_WinTCharToUtf_TCL_DECLARED
53/* 1 */
54EXTERN char *		Tcl_WinTCharToUtf(CONST TCHAR *str, int len,
55				Tcl_DString *dsPtr);
56#endif
57#endif /* WIN */
58#ifdef MAC_OSX_TCL /* MACOSX */
59#ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
60#define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
61/* 0 */
62EXTERN int		Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
63				CONST char *bundleName, int hasResourceFile,
64				int maxPathLen, char *libraryPath);
65#endif
66#ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
67#define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
68/* 1 */
69EXTERN int		Tcl_MacOSXOpenVersionedBundleResources(
70				Tcl_Interp *interp, CONST char *bundleName,
71				CONST char *bundleVersion,
72				int hasResourceFile, int maxPathLen,
73				char *libraryPath);
74#endif
75#endif /* MACOSX */
76
77typedef struct TclPlatStubs {
78    int magic;
79    struct TclPlatStubHooks *hooks;
80
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 */
84#endif /* WIN */
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 */
88#endif /* MACOSX */
89} TclPlatStubs;
90
91#ifdef __cplusplus
92extern "C" {
93#endif
94extern TclPlatStubs *tclPlatStubsPtr;
95#ifdef __cplusplus
96}
97#endif
98
99#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
100
101/*
102 * Inline function declarations:
103 */
104
105#ifdef __WIN32__ /* WIN */
106#ifndef Tcl_WinUtfToTChar
107#define Tcl_WinUtfToTChar \
108	(tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
109#endif
110#ifndef Tcl_WinTCharToUtf
111#define Tcl_WinTCharToUtf \
112	(tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
113#endif
114#endif /* WIN */
115#ifdef MAC_OSX_TCL /* MACOSX */
116#ifndef Tcl_MacOSXOpenBundleResources
117#define Tcl_MacOSXOpenBundleResources \
118	(tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
119#endif
120#ifndef Tcl_MacOSXOpenVersionedBundleResources
121#define Tcl_MacOSXOpenVersionedBundleResources \
122	(tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
123#endif
124#endif /* MACOSX */
125
126#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
127
128/* !END!: Do not edit above this line. */
129
130#undef TCL_STORAGE_CLASS
131#define TCL_STORAGE_CLASS DLLIMPORT
132
133#endif /* _TCLPLATDECLS */
134
135
136