Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/generic/tclPlatDecls.h @ 63

Last change on this file since 63 was 25, checked in by landauf, 17 years ago

added tcl to libs

File size: 3.7 KB
Line 
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 2007/12/13 15:23:20 dgp 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(__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
43
44/* !BEGIN!: Do not edit below this line. */
45
46/*
47 * Exported function declarations:
48 */
49
50#ifdef __WIN32__ /* WIN */
51#ifndef Tcl_WinUtfToTChar_TCL_DECLARED
52#define Tcl_WinUtfToTChar_TCL_DECLARED
53/* 0 */
54EXTERN 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 */
60EXTERN 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 */
68EXTERN 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 */
75EXTERN 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 */
82
83typedef struct TclPlatStubs {
84    int magic;
85    struct TclPlatStubHooks *hooks;
86
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;
96
97#ifdef __cplusplus
98extern "C" {
99#endif
100extern TclPlatStubs *tclPlatStubsPtr;
101#ifdef __cplusplus
102}
103#endif
104
105#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
106
107/*
108 * Inline function declarations:
109 */
110
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 */
131
132#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
133
134/* !END!: Do not edit above this line. */
135
136#undef TCL_STORAGE_CLASS
137#define TCL_STORAGE_CLASS DLLIMPORT
138
139#endif /* _TCLPLATDECLS */
140
141
Note: See TracBrowser for help on using the repository browser.