home *** CD-ROM | disk | FTP | other *** search
/ Chip: Linux Special / CorelLinux_CHIP.iso / StarOffice / office51 / f_524_1 / inc / addin.h next >
Encoding:
C/C++ Source or Header  |  1999-08-11  |  3.0 KB  |  142 lines

  1. /*------------------------------------------------------------------------
  2.  
  3.  
  4.  
  5. $Workfile:   ADDIN.H  $
  6.  
  7.  
  8.  
  9. $Header:   T:/sc/addin/inc/addin.h_v   1.4   10 Aug 1999 14:49:52   NN  $
  10.  
  11.  
  12.  
  13. Description:    StarCalc AddIn general header definitions
  14.  
  15.  
  16.  
  17. (c) Copyright 1998 - 2000, Sun Microsystems, Inc.
  18.  
  19.  
  20.  
  21. ------------------------------------------------------------------------*/
  22.  
  23.  
  24.  
  25. #ifndef _ADDIN_H
  26.  
  27. #define _ADDIN_H
  28.  
  29.  
  30.  
  31. #ifndef _SOLAR_H
  32.  
  33.  
  34.  
  35. #ifndef TRUE
  36.  
  37. #define TRUE            1
  38.  
  39. #endif
  40.  
  41. #ifndef FALSE
  42.  
  43. #define FALSE           0
  44.  
  45. #endif
  46.  
  47.  
  48.  
  49. #undef NULL
  50.  
  51. #define NULL            0
  52.  
  53.  
  54.  
  55. typedef unsigned char        BOOL;
  56.  
  57. typedef unsigned char        BYTE;
  58.  
  59. typedef unsigned short        USHORT;
  60.  
  61. typedef unsigned long        ULONG;
  62.  
  63.  
  64.  
  65. #endif
  66.  
  67.  
  68.  
  69. #ifndef SUPD
  70.  
  71. /* enable all new interface features */
  72.  
  73. #define SUPD 9999
  74.  
  75. #endif
  76.  
  77.  
  78.  
  79. /* all character string returns are limited to 255+1 chars */
  80.  
  81. #define SO_CHARSTRING_MAX        256
  82.  
  83. #define SO_StringCopy( dst, src ) \
  84.  
  85.     (strncpy( dst, src, SO_CHARSTRING_MAX ), dst[SO_CHARSTRING_MAX-1] = '\0')
  86.  
  87.  
  88.  
  89. typedef enum
  90.  
  91. {
  92.  
  93.     PTR_DOUBLE,
  94.  
  95.     PTR_STRING,
  96.  
  97.     PTR_DOUBLE_ARR,
  98.  
  99.     PTR_STRING_ARR,
  100.  
  101.     PTR_CELL_ARR,
  102.  
  103.     NONE
  104.  
  105. } ParamType;
  106.  
  107.  
  108.  
  109. #ifndef WIN
  110.  
  111. #ifdef WNT
  112.  
  113. #define CALLTYPE        __cdecl
  114.  
  115. #else
  116.  
  117. #define CALLTYPE
  118.  
  119. #endif
  120.  
  121. #else
  122.  
  123. #define PASCAL            _pascal
  124.  
  125. #define FAR                _far
  126.  
  127. #define CALLTYPE        FAR PASCAL
  128.  
  129. #endif
  130.  
  131.  
  132.  
  133.  
  134.  
  135. #ifdef __cplusplus
  136.  
  137.  
  138.  
  139. extern "C" {
  140.  
  141.  
  142.  
  143. typedef void (CALLTYPE* AdvData)( double& nHandle, void* pData );
  144.  
  145.  
  146.  
  147. extern void CALLTYPE GetFunctionCount( USHORT& nCount );
  148.  
  149.  
  150.  
  151. extern void CALLTYPE GetFunctionData( USHORT&    nNo,
  152.  
  153.                    char*      pFuncName,
  154.  
  155.                    USHORT&    nParamCount,
  156.  
  157.                    ParamType* peType,
  158.  
  159.                    char*      pInternalName );
  160.  
  161.  
  162.  
  163. extern void CALLTYPE IsAsync( USHORT& nNo, ParamType* peType );
  164.  
  165.  
  166.  
  167. extern void CALLTYPE Advice( USHORT& nNo, AdvData& pfCallback );
  168.  
  169.  
  170.  
  171. extern void CALLTYPE Unadvice( double& nHandle );
  172.  
  173.  
  174.  
  175.  
  176.  
  177. #if (SUPD>=398)
  178.  
  179. /* new in StarOffice 5.0 */
  180.  
  181.  
  182.  
  183. extern void CALLTYPE GetParameterDescription( USHORT& nNo, USHORT& nParam,
  184.  
  185. char* pName, char* pDesc );
  186.  
  187.  
  188.  
  189. #endif
  190.  
  191.  
  192.  
  193. #if (SUPD>=506)
  194.  
  195. /* new in StarOffice 5.1 */
  196.  
  197.  
  198.  
  199. extern void CALLTYPE SetLanguage( USHORT& nLanguage );
  200.  
  201.  
  202.  
  203. #endif
  204.  
  205.  
  206.  
  207. };
  208.  
  209.  
  210.  
  211. #else
  212.  
  213.  
  214.  
  215. typedef void (CALLTYPE* AdvData)( double* nHandle, void* pData );
  216.  
  217.  
  218.  
  219. extern void CALLTYPE GetFunctionCount( USHORT * nCount );
  220.  
  221.  
  222.  
  223. extern void CALLTYPE GetFunctionData( USHORT * nNo,
  224.  
  225.                    char *      pFuncName,
  226.  
  227.                    USHORT *    nParamCount,
  228.  
  229.                    ParamType *  peType,
  230.  
  231.                    char *      pInternalName );
  232.  
  233.  
  234.  
  235. extern void CALLTYPE IsAsync( USHORT * nNo, ParamType * peType );
  236.  
  237.  
  238.  
  239. extern void CALLTYPE Advice( USHORT * nNo, AdvData * pfCallback );
  240.  
  241.  
  242.  
  243. extern void CALLTYPE Unadvice( double * nHandle );
  244.  
  245.  
  246.  
  247. #if (SUPD>=398)
  248.  
  249. /* new in StarOffice 5.0 */
  250.  
  251.  
  252.  
  253. extern void CALLTYPE GetParameterDescription( USHORT* nNo, USHORT* nParam,
  254.  
  255.             char* pName, char* pDesc );
  256.  
  257.  
  258.  
  259. #endif
  260.  
  261.  
  262.  
  263. #if (SUPD>=506)
  264.  
  265. /* new in StarOffice 5.1 */
  266.  
  267.  
  268.  
  269. extern void CALLTYPE SetLanguage( USHORT* nLanguage );
  270.  
  271.  
  272.  
  273. #endif
  274.  
  275.  
  276.  
  277. #endif
  278.  
  279.  
  280.  
  281. #endif
  282.  
  283.