Updated for Git 1.7.3.2
[msysgit/mtrensch.git] / mingw / include / tclPlatDecls.h
blob75975273e5b7cfbfc8ca6eee1a2de0dbdb730daa
1 /*
2 * tclPlatDecls.h --
4 * Declarations of platform specific Tcl APIs.
6 * Copyright (c) 1998-1999 by Scriptics Corporation.
7 * All rights reserved.
9 * RCS: @(#) $Id: tclPlatDecls.h,v 1.27.2.2 2010/05/21 12:18:17 nijtmans Exp $
12 #ifndef _TCLPLATDECLS
13 #define _TCLPLATDECLS
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
27 * Pull in the typedef of TCHAR for windows.
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
38 /* !BEGIN!: Do not edit below this line. */
41 * Exported function declarations:
44 #ifdef __WIN32__ /* WIN */
45 #ifndef Tcl_WinUtfToTChar_TCL_DECLARED
46 #define Tcl_WinUtfToTChar_TCL_DECLARED
47 /* 0 */
48 EXTERN 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 */
54 EXTERN 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 */
62 EXTERN 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 */
69 EXTERN 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 */
77 typedef struct TclPlatStubs {
78 int magic;
79 struct TclPlatStubHooks *hooks;
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;
91 #ifdef __cplusplus
92 extern "C" {
93 #endif
94 extern TclPlatStubs *tclPlatStubsPtr;
95 #ifdef __cplusplus
97 #endif
99 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
102 * Inline function declarations:
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 */
126 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
128 /* !END!: Do not edit above this line. */
130 #undef TCL_STORAGE_CLASS
131 #define TCL_STORAGE_CLASS DLLIMPORT
133 #endif /* _TCLPLATDECLS */