home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Software / TemaCD / activetcltk / ActiveTcl8.3.4.1-8.win32-ix86.exe / ActiveTcl8.3.4.1-win32-ix86 / include / tclPlatDecls.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-22  |  4.7 KB  |  162 lines

  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.5.12.1 2001/04/03 22:54:38 hobbs Exp $
  10.  */
  11.  
  12. #ifndef _TCLPLATDECLS
  13. #define _TCLPLATDECLS
  14.  
  15. /*
  16.  *  Pull in the definition of TCHAR.  Hopefully the compile flags
  17.  *  of the core are matching against your project build for these
  18.  *  public functions.  BE AWARE.
  19.  */
  20. #if defined(__WIN32__) && !defined(_INC_TCHAR)
  21. #include <tchar.h>
  22. #endif
  23.  
  24. /* !BEGIN!: Do not edit below this line. */
  25.  
  26. /*
  27.  * Exported function declarations:
  28.  */
  29.  
  30. #ifdef __WIN32__
  31. /* 0 */
  32. EXTERN TCHAR *        Tcl_WinUtfToTChar _ANSI_ARGS_((CONST char * str, 
  33.                 int len, Tcl_DString * dsPtr));
  34. /* 1 */
  35. EXTERN char *        Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str, 
  36.                 int len, Tcl_DString * dsPtr));
  37. #endif /* __WIN32__ */
  38. #ifdef MAC_TCL
  39. /* 0 */
  40. EXTERN void        Tcl_MacSetEventProc _ANSI_ARGS_((
  41.                 Tcl_MacConvertEventPtr procPtr));
  42. /* 1 */
  43. EXTERN char *        Tcl_MacConvertTextResource _ANSI_ARGS_((
  44.                 Handle resource));
  45. /* 2 */
  46. EXTERN int        Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp, 
  47.                 char * resourceName, int resourceNumber, 
  48.                 char * fileName));
  49. /* 3 */
  50. EXTERN Handle        Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp, 
  51.                 long resourceType, char * resourceName, 
  52.                 int resourceNumber, char * resFileRef, 
  53.                 int * releaseIt));
  54. /* 4 */
  55. EXTERN int        Tcl_GetOSTypeFromObj _ANSI_ARGS_((
  56.                 Tcl_Interp * interp, Tcl_Obj * objPtr, 
  57.                 OSType * osTypePtr));
  58. /* 5 */
  59. EXTERN void        Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr, 
  60.                 OSType osType));
  61. /* 6 */
  62. EXTERN Tcl_Obj *    Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
  63. /* 7 */
  64. EXTERN int        strncasecmp _ANSI_ARGS_((CONST char * s1, 
  65.                 CONST char * s2, size_t n));
  66. /* 8 */
  67. EXTERN int        strcasecmp _ANSI_ARGS_((CONST char * s1, 
  68.                 CONST char * s2));
  69. #endif /* MAC_TCL */
  70.  
  71. typedef struct TclPlatStubs {
  72.     int magic;
  73.     struct TclPlatStubHooks *hooks;
  74.  
  75. #ifdef __WIN32__
  76.     TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); /* 0 */
  77.     char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); /* 1 */
  78. #endif /* __WIN32__ */
  79. #ifdef MAC_TCL
  80.     void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */
  81.     char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); /* 1 */
  82.     int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, char * resourceName, int resourceNumber, char * fileName)); /* 2 */
  83.     Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, char * resourceName, int resourceNumber, char * resFileRef, int * releaseIt)); /* 3 */
  84.     int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr)); /* 4 */
  85.     void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType)); /* 5 */
  86.     Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); /* 6 */
  87.     int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 7 */
  88.     int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); /* 8 */
  89. #endif /* MAC_TCL */
  90. } TclPlatStubs;
  91.  
  92. #ifdef __cplusplus
  93. extern "C" {
  94. #endif
  95. extern TclPlatStubs *tclPlatStubsPtr;
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99.  
  100. #if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
  101.  
  102. /*
  103.  * Inline function declarations:
  104.  */
  105.  
  106. #ifdef __WIN32__
  107. #ifndef Tcl_WinUtfToTChar
  108. #define Tcl_WinUtfToTChar \
  109.     (tclPlatStubsPtr->tcl_WinUtfToTChar) /* 0 */
  110. #endif
  111. #ifndef Tcl_WinTCharToUtf
  112. #define Tcl_WinTCharToUtf \
  113.     (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */
  114. #endif
  115. #endif /* __WIN32__ */
  116. #ifdef MAC_TCL
  117. #ifndef Tcl_MacSetEventProc
  118. #define Tcl_MacSetEventProc \
  119.     (tclPlatStubsPtr->tcl_MacSetEventProc) /* 0 */
  120. #endif
  121. #ifndef Tcl_MacConvertTextResource
  122. #define Tcl_MacConvertTextResource \
  123.     (tclPlatStubsPtr->tcl_MacConvertTextResource) /* 1 */
  124. #endif
  125. #ifndef Tcl_MacEvalResource
  126. #define Tcl_MacEvalResource \
  127.     (tclPlatStubsPtr->tcl_MacEvalResource) /* 2 */
  128. #endif
  129. #ifndef Tcl_MacFindResource
  130. #define Tcl_MacFindResource \
  131.     (tclPlatStubsPtr->tcl_MacFindResource) /* 3 */
  132. #endif
  133. #ifndef Tcl_GetOSTypeFromObj
  134. #define Tcl_GetOSTypeFromObj \
  135.     (tclPlatStubsPtr->tcl_GetOSTypeFromObj) /* 4 */
  136. #endif
  137. #ifndef Tcl_SetOSTypeObj
  138. #define Tcl_SetOSTypeObj \
  139.     (tclPlatStubsPtr->tcl_SetOSTypeObj) /* 5 */
  140. #endif
  141. #ifndef Tcl_NewOSTypeObj
  142. #define Tcl_NewOSTypeObj \
  143.     (tclPlatStubsPtr->tcl_NewOSTypeObj) /* 6 */
  144. #endif
  145. #ifndef strncasecmp
  146. #define strncasecmp \
  147.     (tclPlatStubsPtr->strncasecmp) /* 7 */
  148. #endif
  149. #ifndef strcasecmp
  150. #define strcasecmp \
  151.     (tclPlatStubsPtr->strcasecmp) /* 8 */
  152. #endif
  153. #endif /* MAC_TCL */
  154.  
  155. #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */
  156.  
  157. /* !END!: Do not edit above this line. */
  158.  
  159. #endif /* _TCLPLATDECLS */
  160.  
  161.  
  162.