tclPlatDecls.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. #ifndef _TCLPLATDECLS
  10. #define _TCLPLATDECLS
  11. #undef TCL_STORAGE_CLASS
  12. #ifdef BUILD_tcl
  13. # define TCL_STORAGE_CLASS DLLEXPORT
  14. #else
  15. # ifdef USE_TCL_STUBS
  16. # define TCL_STORAGE_CLASS
  17. # else
  18. # define TCL_STORAGE_CLASS DLLIMPORT
  19. # endif
  20. #endif
  21. /*
  22. * WARNING: This file is automatically generated by the tools/genStubs.tcl
  23. * script. Any modifications to the function declarations below should be made
  24. * in the generic/tcl.decls script.
  25. */
  26. /*
  27. * TCHAR is needed here for win32, so if it is not defined yet do it here.
  28. * This way, we don't need to include <tchar.h> just for one define.
  29. */
  30. #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(_TCHAR_DEFINED)
  31. # if defined(_UNICODE)
  32. typedef wchar_t TCHAR;
  33. # else
  34. typedef char TCHAR;
  35. # endif
  36. # define _TCHAR_DEFINED
  37. #endif
  38. /* !BEGIN!: Do not edit below this line. */
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. /*
  43. * Exported function declarations:
  44. */
  45. #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
  46. /* 0 */
  47. EXTERN TCHAR * Tcl_WinUtfToTChar(const char *str, int len,
  48. Tcl_DString *dsPtr);
  49. /* 1 */
  50. EXTERN char * Tcl_WinTCharToUtf(const TCHAR *str, int len,
  51. Tcl_DString *dsPtr);
  52. #endif /* WIN */
  53. #ifdef MAC_OSX_TCL /* MACOSX */
  54. /* 0 */
  55. EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
  56. const char *bundleName, int hasResourceFile,
  57. int maxPathLen, char *libraryPath);
  58. /* 1 */
  59. EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
  60. Tcl_Interp *interp, const char *bundleName,
  61. const char *bundleVersion,
  62. int hasResourceFile, int maxPathLen,
  63. char *libraryPath);
  64. /* 2 */
  65. EXTERN void TclUnusedStubEntry(void);
  66. #endif /* MACOSX */
  67. typedef struct TclPlatStubs {
  68. int magic;
  69. void *hooks;
  70. #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
  71. TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr); /* 0 */
  72. char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */
  73. #endif /* WIN */
  74. #ifdef MAC_OSX_TCL /* MACOSX */
  75. int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */
  76. int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */
  77. void (*tclUnusedStubEntry) (void); /* 2 */
  78. #endif /* MACOSX */
  79. } TclPlatStubs;
  80. extern const TclPlatStubs *tclPlatStubsPtr;
  81. #ifdef __cplusplus
  82. }
  83. #endif
  84. #if defined(USE_TCL_STUBS)
  85. /*
  86. * Inline function declarations:
  87. */
  88. #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
  89. #define Tcl_WinUtfToTChar \
  90. (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
  91. #define Tcl_WinTCharToUtf \
  92. (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
  93. #endif /* WIN */
  94. #ifdef MAC_OSX_TCL /* MACOSX */
  95. #define Tcl_MacOSXOpenBundleResources \
  96. (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
  97. #define Tcl_MacOSXOpenVersionedBundleResources \
  98. (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
  99. #define TclUnusedStubEntry \
  100. (tclPlatStubsPtr->tclUnusedStubEntry) /* 2 */
  101. #endif /* MACOSX */
  102. #endif /* defined(USE_TCL_STUBS) */
  103. /* !END!: Do not edit above this line. */
  104. #undef TclUnusedStubEntry
  105. #ifdef MAC_OSX_TCL /* MACOSX */
  106. #undef Tcl_MacOSXOpenBundleResources
  107. #define Tcl_MacOSXOpenBundleResources(a,b,c,d,e) Tcl_MacOSXOpenVersionedBundleResources(a,b,NULL,c,d,e)
  108. #endif
  109. #undef TCL_STORAGE_CLASS
  110. #define TCL_STORAGE_CLASS DLLIMPORT
  111. #endif /* _TCLPLATDECLS */