Git for Windows Git-1.6.5.1-preview20100112-with-cheetah
[msysgit.git] / mingw / include / tclPlatDecls.h
blobc5812743d0b792e7ce442d4d54324221f5781d52
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 2007/12/13 15:23:20 dgp 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(__CYGWIN__)
30 typedef char TCHAR;
31 #elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
32 # include <tchar.h>
33 # ifndef _TCHAR_DEFINED
34 /* Borland seems to forget to set this. */
35 typedef _TCHAR TCHAR;
36 # define _TCHAR_DEFINED
37 # endif
38 # if defined(_MSC_VER) && defined(__STDC__)
39 /* MSVC++ misses this. */
40 typedef _TCHAR TCHAR;
41 # endif
42 #endif
44 /* !BEGIN!: Do not edit below this line. */
47 * Exported function declarations:
50 #ifdef __WIN32__ /* WIN */
51 #ifndef Tcl_WinUtfToTChar_TCL_DECLARED
52 #define Tcl_WinUtfToTChar_TCL_DECLARED
53 /* 0 */
54 EXTERN TCHAR * Tcl_WinUtfToTChar (CONST char * str, int len,
55 Tcl_DString * dsPtr);
56 #endif
57 #ifndef Tcl_WinTCharToUtf_TCL_DECLARED
58 #define Tcl_WinTCharToUtf_TCL_DECLARED
59 /* 1 */
60 EXTERN char * Tcl_WinTCharToUtf (CONST TCHAR * str, int len,
61 Tcl_DString * dsPtr);
62 #endif
63 #endif /* WIN */
64 #ifdef MAC_OSX_TCL /* MACOSX */
65 #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED
66 #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED
67 /* 0 */
68 EXTERN int Tcl_MacOSXOpenBundleResources (Tcl_Interp * interp,
69 CONST char * bundleName, int hasResourceFile,
70 int maxPathLen, char * libraryPath);
71 #endif
72 #ifndef Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
73 #define Tcl_MacOSXOpenVersionedBundleResources_TCL_DECLARED
74 /* 1 */
75 EXTERN int Tcl_MacOSXOpenVersionedBundleResources (
76 Tcl_Interp * interp, CONST char * bundleName,
77 CONST char * bundleVersion,
78 int hasResourceFile, int maxPathLen,
79 char * libraryPath);
80 #endif
81 #endif /* MACOSX */
83 typedef struct TclPlatStubs {
84 int magic;
85 struct TclPlatStubHooks *hooks;
87 #ifdef __WIN32__ /* WIN */
88 TCHAR * (*tcl_WinUtfToTChar) (CONST char * str, int len, Tcl_DString * dsPtr); /* 0 */
89 char * (*tcl_WinTCharToUtf) (CONST TCHAR * str, int len, Tcl_DString * dsPtr); /* 1 */
90 #endif /* WIN */
91 #ifdef MAC_OSX_TCL /* MACOSX */
92 int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath); /* 0 */
93 int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath); /* 1 */
94 #endif /* MACOSX */
95 } TclPlatStubs;
97 #ifdef __cplusplus
98 extern "C" {
99 #endif
100 extern TclPlatStubs *tclPlatStubsPtr;
101 #ifdef __cplusplus
103 #endif
105 #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
108 * Inline function declarations:
111 #ifdef __WIN32__ /* WIN */
112 #ifndef Tcl_WinUtfToTChar
113 #define Tcl_WinUtfToTChar \
114 (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
115 #endif
116 #ifndef Tcl_WinTCharToUtf
117 #define Tcl_WinTCharToUtf \
118 (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
119 #endif
120 #endif /* WIN */
121 #ifdef MAC_OSX_TCL /* MACOSX */
122 #ifndef Tcl_MacOSXOpenBundleResources
123 #define Tcl_MacOSXOpenBundleResources \
124 (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
125 #endif
126 #ifndef Tcl_MacOSXOpenVersionedBundleResources
127 #define Tcl_MacOSXOpenVersionedBundleResources \
128 (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
129 #endif
130 #endif /* MACOSX */
132 #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
134 /* !END!: Do not edit above this line. */
136 #undef TCL_STORAGE_CLASS
137 #define TCL_STORAGE_CLASS DLLIMPORT
139 #endif /* _TCLPLATDECLS */