tclPlatDecls.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. /* Slot 2 is reserved */
  53. /* 3 */
  54. EXTERN void TclUnusedStubEntry(void);
  55. #endif /* WIN */
  56. #ifdef MAC_OSX_TCL /* MACOSX */
  57. /* 0 */
  58. EXTERN int Tcl_MacOSXOpenBundleResources(Tcl_Interp *interp,
  59. const char *bundleName, int hasResourceFile,
  60. int maxPathLen, char *libraryPath);
  61. /* 1 */
  62. EXTERN int Tcl_MacOSXOpenVersionedBundleResources(
  63. Tcl_Interp *interp, const char *bundleName,
  64. const char *bundleVersion,
  65. int hasResourceFile, int maxPathLen,
  66. char *libraryPath);
  67. /* 2 */
  68. EXTERN void TclUnusedStubEntry(void);
  69. #endif /* MACOSX */
  70. typedef struct TclPlatStubs {
  71. int magic;
  72. void *hooks;
  73. #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
  74. TCHAR * (*tcl_WinUtfToTChar) (const char *str, int len, Tcl_DString *dsPtr); /* 0 */
  75. char * (*tcl_WinTCharToUtf) (const TCHAR *str, int len, Tcl_DString *dsPtr); /* 1 */
  76. void (*reserved2)(void);
  77. void (*tclUnusedStubEntry) (void); /* 3 */
  78. #endif /* WIN */
  79. #ifdef MAC_OSX_TCL /* MACOSX */
  80. int (*tcl_MacOSXOpenBundleResources) (Tcl_Interp *interp, const char *bundleName, int hasResourceFile, int maxPathLen, char *libraryPath); /* 0 */
  81. int (*tcl_MacOSXOpenVersionedBundleResources) (Tcl_Interp *interp, const char *bundleName, const char *bundleVersion, int hasResourceFile, int maxPathLen, char *libraryPath); /* 1 */
  82. void (*tclUnusedStubEntry) (void); /* 2 */
  83. #endif /* MACOSX */
  84. } TclPlatStubs;
  85. extern const TclPlatStubs *tclPlatStubsPtr;
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #if defined(USE_TCL_STUBS)
  90. /*
  91. * Inline function declarations:
  92. */
  93. #if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
  94. #define Tcl_WinUtfToTChar \
  95. (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
  96. #define Tcl_WinTCharToUtf \
  97. (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
  98. /* Slot 2 is reserved */
  99. #define TclUnusedStubEntry \
  100. (tclPlatStubsPtr->tclUnusedStubEntry) /* 3 */
  101. #endif /* WIN */
  102. #ifdef MAC_OSX_TCL /* MACOSX */
  103. #define Tcl_MacOSXOpenBundleResources \
  104. (tclPlatStubsPtr->tcl_MacOSXOpenBundleResources) /* 0 */
  105. #define Tcl_MacOSXOpenVersionedBundleResources \
  106. (tclPlatStubsPtr->tcl_MacOSXOpenVersionedBundleResources) /* 1 */
  107. #define TclUnusedStubEntry \
  108. (tclPlatStubsPtr->tclUnusedStubEntry) /* 2 */
  109. #endif /* MACOSX */
  110. #endif /* defined(USE_TCL_STUBS) */
  111. /* !END!: Do not edit above this line. */
  112. #undef TclUnusedStubEntry
  113. #ifdef MAC_OSX_TCL /* MACOSX */
  114. #undef Tcl_MacOSXOpenBundleResources
  115. #define Tcl_MacOSXOpenBundleResources(a,b,c,d,e) Tcl_MacOSXOpenVersionedBundleResources(a,b,NULL,c,d,e)
  116. #endif
  117. #undef TCL_STORAGE_CLASS
  118. #define TCL_STORAGE_CLASS DLLIMPORT
  119. #endif /* _TCLPLATDECLS */