home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / harbb30g.zip / INCLUDE / itemapi.h < prev    next >
C/C++ Source or Header  |  1999-09-18  |  5KB  |  103 lines

  1. /*
  2.  * $Id: itemapi.h,v 1.29 1999/09/18 01:49:19 vszel Exp $
  3.  */
  4.  
  5. /*
  6.  * Harbour Project source code:
  7.  * Header file for the Item API
  8.  *
  9.  * Copyright 1999 Antonio Linares <alinares@fivetech.com>
  10.  * www - http://www.harbour-project.org
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version, with one exception:
  16.  *
  17.  * The exception is that if you link the Harbour Runtime Library (HRL)
  18.  * and/or the Harbour Virtual Machine (HVM) with other files to produce
  19.  * an executable, this does not by itself cause the resulting executable
  20.  * to be covered by the GNU General Public License. Your use of that
  21.  * executable is in no way restricted on account of linking the HRL
  22.  * and/or HVM code into it.
  23.  *
  24.  * This program is distributed in the hope that it will be useful,
  25.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27.  * GNU General Public License for more details.
  28.  *
  29.  * You should have received a copy of the GNU General Public License
  30.  * along with this program; if not, write to the Free Software
  31.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
  32.  * their web site at http://www.gnu.org/).
  33.  *
  34.  */
  35.  
  36. #ifndef HB_ITEMAPI_H_
  37. #define HB_ITEMAPI_H_
  38.  
  39. #include "extend.h"
  40.  
  41. #define HB_EVAL_PARAM_MAX_ 9
  42.  
  43. typedef struct
  44. {
  45.    USHORT   paramCount;
  46.    PHB_ITEM pItems[ HB_EVAL_PARAM_MAX_ + 1 ];
  47. } EVALINFO, * PEVALINFO, * EVALINFO_PTR;
  48.  
  49. extern PHB_ITEM hb_evalLaunch   ( PEVALINFO pEvalInfo );
  50. extern BOOL     hb_evalNew      ( PEVALINFO pEvalInfo, PHB_ITEM pItem );
  51. extern BOOL     hb_evalPutParam ( PEVALINFO pEvalInfo, PHB_ITEM pItem );
  52. extern BOOL     hb_evalRelease  ( PEVALINFO pEvalInfo );
  53.  
  54. extern PHB_ITEM hb_itemDo       ( PHB_ITEM pItem, USHORT uiPCount, PHB_ITEM pItemArg1, ... );
  55. extern PHB_ITEM hb_itemDoC      ( char * szFunc, USHORT uiPCount, PHB_ITEM pItemArg1, ... );
  56.  
  57. extern PHB_ITEM hb_itemArrayGet ( PHB_ITEM pArray, ULONG ulIndex );
  58. extern PHB_ITEM hb_itemArrayNew ( ULONG ulLen );
  59. extern PHB_ITEM hb_itemArrayPut ( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem );
  60. extern ULONG    hb_itemCopyC    ( PHB_ITEM pItem, char * szBuffer, ULONG ulLen );
  61. extern BOOL     hb_itemFreeC    ( char * szText );
  62. extern char *   hb_itemGetC     ( PHB_ITEM pItem );
  63. extern char *   hb_itemGetCPtr  ( PHB_ITEM pItem );
  64. extern ULONG    hb_itemGetCLen  ( PHB_ITEM pItem );
  65. extern char *   hb_itemGetDS    ( PHB_ITEM pItem, char * szDate );
  66. extern BOOL     hb_itemGetL     ( PHB_ITEM pItem );
  67. extern double   hb_itemGetND    ( PHB_ITEM pItem );
  68. extern int      hb_itemGetNI    ( PHB_ITEM pItem );
  69. extern long     hb_itemGetNL    ( PHB_ITEM pItem );
  70. extern void     hb_itemGetNLen  ( PHB_ITEM pItem, int * piWidth, int * piDec );
  71. extern PHB_ITEM hb_itemNew      ( PHB_ITEM pNull );
  72. extern USHORT   hb_itemPCount   ( void );
  73. extern PHB_ITEM hb_itemParam    ( USHORT uiParam );
  74. extern PHB_ITEM hb_itemPutC     ( PHB_ITEM pItem, char * szText );
  75. extern PHB_ITEM hb_itemPutCPtr  ( PHB_ITEM pItem, char * szText, ULONG ulLen );
  76. extern PHB_ITEM hb_itemPutCL    ( PHB_ITEM pItem, char * szText, ULONG ulLen );
  77. extern PHB_ITEM hb_itemPutDS    ( PHB_ITEM pItem, char * szDate );
  78. extern PHB_ITEM hb_itemPutDL    ( PHB_ITEM pItem, long lJulian );
  79. extern PHB_ITEM hb_itemPutL     ( PHB_ITEM pItem, BOOL bValue );
  80. extern PHB_ITEM hb_itemPutND    ( PHB_ITEM pItem, double dNumber );
  81. extern PHB_ITEM hb_itemPutNI    ( PHB_ITEM pItem, int iNumber );
  82. extern PHB_ITEM hb_itemPutNL    ( PHB_ITEM pItem, long lNumber );
  83. extern PHB_ITEM hb_itemPutNLen  ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
  84. extern PHB_ITEM hb_itemPutNDLen ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
  85. extern PHB_ITEM hb_itemPutNILen ( PHB_ITEM pItem, int iNumber, int iWidth );
  86. extern PHB_ITEM hb_itemPutNLLen ( PHB_ITEM pItem, long lNumber, int iWidth );
  87. extern BOOL     hb_itemRelease  ( PHB_ITEM pItem );
  88. extern PHB_ITEM hb_itemReturn   ( PHB_ITEM pItem );
  89. extern ULONG    hb_itemSize     ( PHB_ITEM pItem );
  90. extern USHORT   hb_itemType     ( PHB_ITEM pItem );
  91.  
  92. /* Non Clipper compliant internal API */
  93.  
  94. extern PHB_ITEM hb_itemParamPtr ( USHORT uiParam, int iMask );
  95. extern PHB_ITEM hb_itemReturnPtr( void );
  96. extern int      hb_itemStrCmp   ( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */
  97. extern void     hb_itemCopy     ( PHB_ITEM pDest, PHB_ITEM pSource ); /* copies an item to one place to another respecting its containts */
  98. extern void     hb_itemClear    ( PHB_ITEM pItem );
  99. extern PHB_ITEM hb_itemUnRef    ( PHB_ITEM pItem ); /* de-references passed variable */
  100. extern char *   hb_itemStr      ( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ); /* convert number to string */
  101.  
  102. #endif /* HB_ITEMAPI_H_ */
  103.