Files
harbour-core/harbour/include/hbgtcore.h
Przemyslaw Czerpak c3e1436da0 2009-06-26 02:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
  * harbour/include/hbrdddbf.h
  * harbour/include/hbapidbg.h
  * harbour/include/hbset.h
  * harbour/include/hbcomp.h
  * harbour/include/hbapirdd.h
  * harbour/include/hbstack.h
  * harbour/include/hbsxfunc.h
  * harbour/include/hbapilng.h
  * harbour/include/hbgtcore.h
  * harbour/include/hbapifs.h
  * harbour/include/hbdbsort.h
  * harbour/include/hbapigt.h
  * harbour/include/hbapi.h
  * harbour/include/hbapierr.h
  * harbour/include/hbapiitm.h
  * harbour/include/hbrddfpt.h
  * harbour/contrib/hbmysql/mysql.c
  * harbour/contrib/hbct/bitnum.c
  * harbour/contrib/hbct/token2.c
  * harbour/contrib/hbct/charsprd.c
  * harbour/contrib/hbct/ctnet.c
  * harbour/contrib/hbct/charonly.c
  * harbour/contrib/hbct/atadjust.c
  * harbour/contrib/hbct/ctwin.c
  * harbour/contrib/hbct/charsort.c
  * harbour/contrib/hbct/ctwin.h
  * harbour/contrib/hbct/charmix.c
  * harbour/contrib/hbct/charevod.c
  * harbour/contrib/hbct/maxline.c
  * harbour/contrib/hbct/wordrepl.c
  * harbour/contrib/hbct/charrepl.c
  * harbour/contrib/hbct/files.c
  * harbour/contrib/hbct/video.c
  * harbour/contrib/hbct/charswap.c
  * harbour/contrib/hbct/dattime3.c
  * harbour/contrib/hbct/charop.c
  * harbour/contrib/hbct/misc2.c
  * harbour/contrib/hbct/charone.c
  * harbour/contrib/hbct/ctstr.c
  * harbour/contrib/hbct/screen1.c
  * harbour/contrib/hbct/token1.c
  * harbour/contrib/hbct/ctstr.h
  * harbour/contrib/hbct/charmirr.c
  * harbour/contrib/hbct/relation.c
  * harbour/contrib/hbct/atnum.c
  * harbour/contrib/hbct/like.c
  * harbour/contrib/hbct/count.c
  * harbour/contrib/hbct/disk.c
  * harbour/contrib/hbct/ctstrfil.c
  * harbour/contrib/hbct/posdiff.c
  * harbour/contrib/hbct/addascii.c
  * harbour/contrib/hbct/tab.c
  * harbour/contrib/hbct/numline.c
  * harbour/contrib/hbct/dattime2.c
  * harbour/contrib/hbct/asciisum.c
  * harbour/contrib/hbct/expand.c
  * harbour/contrib/hbct/pos2.c
  * harbour/contrib/hbct/numat.c
  * harbour/contrib/hbct/atrepl.c
  * harbour/contrib/hbct/wordtoch.c
  * harbour/contrib/hbct/print.c
  * harbour/contrib/hbct/justify.c
  * harbour/contrib/xhb/hbxml.c
  * harbour/contrib/xhb/dbf2txt.c
  * harbour/contrib/xhb/xhbis.c
  * harbour/contrib/xhb/fparse.c
  * harbour/contrib/xhb/xstrdel.c
  * harbour/contrib/xhb/hbcomprs.c
  * harbour/contrib/xhb/datesxhb.c
  * harbour/contrib/xhb/xhbmsgs.c
  * harbour/contrib/xhb/freadlin.c
  * harbour/contrib/xhb/txtline.c
  * harbour/contrib/xhb/xhbtrim.c
  * harbour/contrib/xhb/xhbcopyf.c
  * harbour/contrib/xhb/cstructc.c
  * harbour/contrib/xhb/xhbfunc.c
  * harbour/contrib/hbtpathy/tplinux.c
  * harbour/contrib/hbgt/charmixg.c
  * harbour/contrib/hbgt/strexpan.c
  * harbour/contrib/hbgt/charodd.c
  * harbour/contrib/hbgt/strright.c
  * harbour/contrib/hbgt/asciisgt.c
  * harbour/contrib/hbgt/strdiffg.c
  * harbour/contrib/hbgt/chrtotal.c
  * harbour/contrib/hbgt/strcount.c
  * harbour/contrib/hbgt/strleft.c
  * harbour/contrib/hbgt/ascposgt.c
  * harbour/contrib/hbgt/chrfirst.c
  * harbour/contrib/hbgt/chrcount.c
  * harbour/contrib/hbgt/strpbrk.c
  * harbour/contrib/hbgt/chareven.c
  * harbour/contrib/hbgt/strcspn.c
  * harbour/contrib/hbgt/atdiff.c
  * harbour/contrib/hbsqlit3/hbsqlit3.c
  * harbour/contrib/hbmzip/hbmzip.c
  * harbour/contrib/hbnf/proper.c
  * harbour/contrib/hbnf/fttext.c
  * harbour/contrib/hbnf/chdir.c
  * harbour/contrib/hbnf/getver.c
  * harbour/contrib/hbnf/ftattr.c
  * harbour/contrib/hbnf/mkdir.c
  * harbour/contrib/hbnf/rmdir.c
  * harbour/contrib/Makefile
  * harbour/contrib/hbcurl/hbcurl.c
  * harbour/contrib/rddsql/sddmy/mysqldd.c
  * harbour/contrib/rddsql/sddpg/pgsqldd.c
  * harbour/contrib/rddsql/sddfb/fbirddd.c
  * harbour/contrib/rddsql/sddodbc/odbcdd.c
  * harbour/contrib/rddsql/sqlmix.c
  * harbour/contrib/hbhpdf/harupdf.c
  * harbour/contrib/rddads/adsx.c
  * harbour/contrib/rddads/adsfunc.c
  * harbour/contrib/rddads/rddads.h
  * harbour/contrib/rddads/ads1.c
  * harbour/contrib/hbmisc/hb_f.c
  * harbour/contrib/hbmisc/strfmt.c
  * harbour/contrib/hbmisc/stringsx.c
  * harbour/contrib/hbmisc/spd.c
  * harbour/contrib/hbtip/utils.c
  * harbour/contrib/hbwin/wapi_winbase.c
  * harbour/contrib/hbwin/win_misc.c
  * harbour/contrib/hbbtree/hb_btree.h
  * harbour/contrib/hbbtree/hb_btree.c
  * harbour/source/pp/hbpp.c
  * harbour/source/vm/runner.c
  * harbour/source/vm/estack.c
  * harbour/source/vm/itemapi.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/cmdarg.c
  * harbour/source/vm/memvars.c
  * harbour/source/vm/dynlibhb.c
  * harbour/source/vm/set.c
  * harbour/source/main/harbour.c
  * harbour/source/debug/dbgentry.c
  * harbour/source/common/hbfsapi.c
  * harbour/source/common/hbfopen.c
  * harbour/source/rtl/gtdos/gtdos.c
  * harbour/source/rtl/diskspac.c
  * harbour/source/rtl/console.c
  * harbour/source/rtl/chrasc.c
  * harbour/source/rtl/fscopy.c
  * harbour/source/rtl/run.c
  * harbour/source/rtl/spfiles.c
  * harbour/source/rtl/defpath.c
  * harbour/source/rtl/philes.c
  * harbour/source/rtl/oldbox.c
  * harbour/source/rtl/math.c
  * harbour/source/rtl/hbgtcore.c
  * harbour/source/rtl/cdpapi.c
  * harbour/source/rtl/gtcrs/gtcrs.c
  * harbour/source/rtl/dirdrive.c
  * harbour/source/rtl/hbi18n1.c
  * harbour/source/rtl/trim.c
  * harbour/source/rtl/hbzlibgz.c
  * harbour/source/rtl/philesx.c
  * harbour/source/rtl/mlcfunc.c
  * harbour/source/rtl/filehb.c
  * harbour/source/rtl/fstemp.c
  * harbour/source/rtl/is.c
  * harbour/source/rtl/hbrunfun.c
  * harbour/source/rtl/ampm.c
  * harbour/source/rtl/setcolor.c
  * harbour/source/rtl/oemansi.c
  * harbour/source/rtl/disksphb.c
  * harbour/source/rtl/hbzlib.c
  * harbour/source/rtl/strpeek.c
  * harbour/source/rtl/replic.c
  * harbour/source/rtl/stuff.c
  * harbour/source/rtl/hbstrfmt.c
  * harbour/source/rtl/transfrm.c
  * harbour/source/rtl/hbhex.c
  * harbour/source/rtl/trace.c
  * harbour/source/rtl/hbadler.c
  * harbour/source/rtl/samples.c
  * harbour/source/rtl/filebuf.c
  * harbour/source/rtl/hbcrc.c
  * harbour/source/rtl/gete.c
  * harbour/source/rtl/hbmd5.c
  * harbour/source/rtl/langapi.c
  * harbour/source/rtl/gtcgi/gtcgi.c
  * harbour/source/rtl/errapi.c
  * harbour/source/rtl/hbregexc.c
  * harbour/source/rtl/natmsg.c
  * harbour/source/rtl/fssize.c
  * harbour/source/rtl/hbinet.c
  * harbour/source/rtl/colorind.c
  * harbour/source/rtl/copyfile.c
  * harbour/source/rtl/mouseapi.c
  * harbour/source/rtl/soundex.c
  * harbour/source/rtl/memofile.c
  * harbour/source/rtl/hbffind.c
  * harbour/source/rtl/gtapi.c
  * harbour/source/rtl/direct.c
  * harbour/source/rtl/filesys.c
  * harbour/source/rtl/file.c
  * harbour/source/rtl/val.c
  * harbour/source/rtl/hbregex.c
  * harbour/source/rtl/rat.c
  * harbour/source/rtl/isprint.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbsql.c
  * harbour/source/rdd/workarea.c
  * harbour/source/rdd/wacore.c
  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/dbdetach.c
  * harbour/source/rdd/dbcmdx.c
  * harbour/source/rdd/dbfnsx/dbfnsx1.c
  * harbour/source/rdd/dbcmd.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/hsx/hsx.c
  * harbour/source/rdd/dbcmd53.c
  * harbour/source/rdd/usrrdd/usrrdd.c
  * harbour/source/rdd/wafunc.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/hbsix/sxsem.c
  * harbour/source/rdd/hbsix/sxord.c
  * harbour/source/rdd/hbsix/sxfname.c
  * harbour/source/rdd/hbsix/sxtable.c
  * harbour/source/rdd/hbsix/sxdate.c
  * harbour/source/rdd/hbsix/sxutil.c
  * harbour/source/rdd/hbsix/sxcompr.c
  * harbour/source/compiler/hbmain.c
  * harbour/source/compiler/cmdcheck.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hbcmplib.c
  * harbour/source/compiler/ppcomp.c
    * changed 'char *' and changed 'BYTE *' to 'const char *' in
      the following functions:
         const char * hb_vmFindModuleSymbolName( PHB_SYMB pSym );
         void  hb_vmInitSymbolGroup( void * hNewDynLib, int argc,
                                     const char * argv[] );
         void hb_dbgEntry( int nMode, int nLine, const char *szName,
                           int nIndex, PHB_ITEM pFrame );
         void hb_dbgAddBreak( void *handle, const char *cModule,
                              int nLine, const char *szFunction );
         void hb_dbgAddWatch( void *handle, const char *szExpr, BOOL bTrace );
         PHB_ITEM hb_dbgGetExpressionValue( void *handle,
                                            const char *expression );
         BOOL hb_dbgIsValidStopLine( void *handle, const char *szModule,
                                     int nLine );
         void hb_dbgSetToCursor( void *handle, const char *szModule,
                                 int nLine );
         void hb_dbgSetWatch( void *handle, int nWatch,
                              const char *szExpr, BOOL bTrace );
         const char * hb_setGetCPtr( HB_set_enum set_specifier );
         const char * hb_setGetAltFile( void );
         const char * hb_setGetDateFormat( void );
         const char * hb_setGetTimeFormat( void );
         const char * hb_setGetDefault( void );
         const char * hb_setGetDelimChars( void );
         const char * hb_setGetDevice( void );
         const char * hb_setGetExtraFile( void );
         const char * hb_setGetPath( void );
         const char * hb_setGetMFileExt( void );
         const char * hb_setGetPrintFile( void );
         const char * hb_setGetEOL( void );
         const char * hb_setGetHBOUTLOG( void );
         const char * hb_setGetHBOUTLOGINFO( void );
         const char * hb_setGetOSCODEPAGE( void );
         void hb_compInitPP( HB_COMP_DECL, int argc,
                             const char * const argv[] );
         void hb_compGenPCodeN( const BYTE * pBuffer, ULONG ulSize,
                                HB_COMP_DECL );
         int  hb_compMain( int argc, const char * const argv[],
                           BYTE ** pBufPtr, ULONG * pulSize,
                           const char * szSource );
         void hb_compChkCompilerSwitch( HB_COMP_DECL, int,
                                        const char * const args[] );
         void hb_compChkDefines( HB_COMP_DECL, int iArg,
                                 const char * const args[] );
         void hb_compGenCString( FILE * yyc, const BYTE * pText, ULONG ulLen );
         AREAP hb_rddRequestArea( const char * szAlias, PHB_ITEM pCargo,
                                  BOOL fNewArea, BOOL fWait );
         char * hb_stackDirBuffer( void );
         LONG hb_sxPtoD( const char * pDate );
         const char * hb_langID( void );
         const char * hb_langSelectID( const char * pszID );
         const char * hb_langDGetItem( int iIndex );
         const char * hb_langDGetErrorDesc( ULONG ulIndex );
         BOOL       hb_fsChDir( const char * pszDirName );
         HB_FHANDLE hb_fsCreate( const char * pszFileName, ULONG ulAttr );
         HB_FHANDLE hb_fsCreateEx( const char * pszFilename, ULONG ulAttr,
                                   USHORT uiFlags );
         HB_FHANDLE hb_fsCreateTemp( const char * pszDir,
                                     const char * pszPrefix,
                                     ULONG ulAttr, char * pszName );
         HB_FHANDLE hb_fsCreateTempEx( char * pszName, const char * pszDir,
                                       const char * pszPrefix,
                                       const char * pszExt, ULONG ulAttr );
         const char * hb_fsCurDir( USHORT uiDrive );
         USHORT     hb_fsCurDirBuff( USHORT uiDrive, char * pbyBuffer,
                                     ULONG ulLen );
         void       hb_fsBaseDirBuff( char * pbyBuffer );
         BOOL       hb_fsDelete( const char * pszFileName );
         BOOL       hb_fsFile( const char * pszFileName );
         BOOL       hb_fsIsDirectory( const char * pszFilename );
         HB_FOFFSET hb_fsFSize( const char * pszFileName, BOOL bUseDirEntry );
         HB_FHANDLE hb_fsExtOpen( const char * pszFileName,
                                  const char * pDefExt,
         char *     hb_fsExtName( const char * pFilename,
                                  const char * pDefExt, USHORT uiExFlags,
                                  const char * pPaths );
         BOOL       hb_fsMkDir( const char * pszDirName );
         HB_FHANDLE hb_fsOpen( const char * pszFileName, USHORT uiFlags );
         BOOL       hb_fsRmDir( const char * pszDirName );
         BOOL       hb_fsRename( const char * pszOldName,
                                 const char * pszNewName );
         BOOL       hb_fsGetFileTime( const char * pszFileName,
                                      LONG * plJulian, LONG * plMillisec );
         BOOL       hb_fsSetFileTime( const char * pszFileName,
                                      LONG lJulian, LONG lMillisec );
         BOOL       hb_fsGetAttr( const char * pszFileName, ULONG * pulAttr );
         BOOL       hb_fsSetAttr( const char * pszFileName, ULONG ulAttr );
         HB_FHANDLE hb_fsPOpen( const char * pFilename, const char * pMode );
         BOOL       hb_fsCopy( const char * pSource, const char * pDest );
         BOOL       hb_spFile( const char * pFilename, char * pRetPath );
         BOOL       hb_spFileExists( const char * pFilename, char * pRetPath );
         HB_FHANDLE hb_spOpen( const char * pFilename, USHORT uiFlags );
         HB_FHANDLE hb_spCreate( const char * pFilename, ULONG ulAttr );
         HB_FHANDLE hb_spCreateEx( const char * pFilename,
                                   ULONG ulAttr, USHORT uiFlags );
         PHB_FILE   hb_fileExtOpen( const char * pFilename,
                                    const char * pDefExt, USHORT uiExFlags,
                                    const char * pPaths, PHB_ITEM pError );
         PHB_FILE   hb_fileCreateTemp( const char * pszDir,
                                       const char * pszPrefix,
                                       ULONG ulAttr, char * pszName );
         PHB_FILE   hb_fileCreateTempEx( char * pszName, const char * pszDir,
                                         const char * pszPrefix,
                                         const char * pszExt, ULONG ulAttr );
         HB_ERRCODE hb_gtBox( SHORT uiTop, SHORT uiLeft, SHORT uiBottom,
                              SHORT uiRight, const BYTE * pbyFrame );
         HB_ERRCODE hb_gtDrawBox( SHORT uiTop, SHORT uiLeft, SHORT uiBottom,
                                  SHORT uiRight, const BYTE * pbyFrame,
                                  int iColor );
         HB_ERRCODE hb_gtWrite( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtWriteAt( USHORT uiRow, USHORT uiCol,
                                  const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtWriteCon( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtPutText( USHORT uiRow, USHORT uiCol,
                                  const BYTE * pStr, ULONG ulLength,
                                  int iColor );
         HB_ERRCODE hb_gtOutStd( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtOutErr( const BYTE * pbyStr, ULONG ulLen );
         HB_ERRCODE hb_gtBoxEx( int iTop, int iLeft, int iBottom, int iRight,
                                const BYTE * pbyFrame, int iColor );
         void       hb_mouseRestoreState( const BYTE * pBuffer );
         const char * hb_strLTrim( const char * szText, ULONG * ulLen );
         const char * hb_conNewLine( void );
         const char * hb_conSetColor( const char * szColor );
         const char * hb_errGetDescription( PHB_ITEM pError );
         const char * hb_errGetFileName( PHB_ITEM pError );
         const char * hb_errGetOperation( PHB_ITEM pError );
         const char * hb_errGetSubSystem( PHB_ITEM pError );
         int hb_ctwAddWindowBox( int iWindow, const BYTE * szBox, int iColor );
         const char *ct_at_exact_forward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                size_t *psMatchStrLen );
         const char *ct_at_exact_backward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                size_t *psMatchStrLen );
         const char *ct_at_wildcard_forward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                char cWildCard, size_t *psMatchStrLen );
         const char *ct_at_wildcard_backward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcMatch, size_t sMatchLen,
                                char cWildCard, size_t *psMatchStrLen );
         const char *ct_at_charset_forward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcCharSet, size_t sCharSetLen,
                                size_t *psMatchedCharPos );
         const char *ct_at_charset_backward
                              ( const char *pcString, size_t sStrLen,
                                const char *pcCharSet, size_t sCharSetLen,
                                size_t *psMatchedCharPos );
         char * hb_adsOemToAnsi( const char * pcString, ULONG ulLen );
         char * hb_adsAnsiToOem( const char * pcString, ULONG ulLen );
         struct hb_BTree * hb_BTreeNew( const char *FileName,
                                        USHORT usPageSize, USHORT usKeySize,
                                        ULONG ulFlags, USHORT usBuffers );
         struct hb_BTree * hb_BTreeOpen( const char *FileName, ULONG lFlags,
                                         USHORT usBuffers );
         BOOL hb_BTreeInsert( struct hb_BTree * pBTree, const char * szKey,
                              PHB_ITEM pData );
         BOOL hb_BTreeDelete( struct hb_BTree * pBTree, const char * szKey,
                              LONG lData );
         BOOL hb_BTreeSeek( struct hb_BTree * pBTree, const char * szKey,
                            LONG lData, BOOL bSoftSeek );
         const char * hb_BTreeKey( struct hb_BTree * pBTree );

    * modified RDD methods:
         HB_ERRCODE PUTVALUEFILE( AREAP, USHORT, const char *, USHORT );
         HB_ERRCODE GETVALUEFILE( AREAP, USHORT, const char *, USHORT );
    * modified GT methods:
         void REST( HB_GT_PTR, int, int, int, int, const BYTE * );
         void PUTTEXT( HB_GT_PTR, int, int, BYTE, const BYTE *, ULONG );
         void WRITEAT( HB_GT_PTR, int, int, const BYTE *, ULONG );
         void WRITE( HB_GT_PTR, const BYTE *, ULONG );
         void WRITECON( HB_GT_PTR, const BYTE *, ULONG );
         void BOX( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
         void BOXD( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
         void BOXS( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
         void OUTSTD( HB_GT_PTR, BYTE *, ULONG );
         void OUTERR( HB_GT_PTR, BYTE *, ULONG );
         void MOUSERESTORESTATE( HB_GT_PTR, const BYTE * );
    * modified RDD structers:
         DBFIELDINFO, DBOPENINFO, DBORDERCONDINFO, DBCONSTRAINTINFO,
         DBORDERCREATEINFO
    + modified parameters and behevior:
         const char * hb_fsNameConv( const char * szFileName, char ** pszFree );
         const char * hb_osEncode( const char * szFileName, char ** pszFree );
         const char * hb_osDecode( const char * szFileName, char ** pszFree );
      Please look at implementation and current usage of these functions.
    + added new function:
         BOOL hb_itemGetWriteCL( PHB_ITEM pItem,
                                 char ** pszValue, ULONG * pulLen );
      which converts item string buffer to writable state to use with
      functions like FREAD() instead of hb_itemUnShare*()
    * updatd other code to respect above modifications
    ! fixed bugs (also GPF traps) located by above modifications

   TODO: please make build tests. Especially in OS2 - not tested at all.
2009-06-26 00:33:38 +00:00

611 lines
34 KiB
C

/*
* $Id$
*/
/*
* Harbour Project source code:
* Header file for the Internal Terminal API
*
* Copyright 2006 Przemyslaw Czerpak < druzus /at/ priv.onet.pl >
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/* NOTE: The declaration of hb_gtSetPos(), hb_gtGetPos(), hb_gtWrite(),
hb_gtWriteAt(), hb_gtRepChar(), hb_gtBox(), hb_gtBoxS(), hb_gtBoxD()
hb_gtInit() differs in parameter types from the original CA-Cl*pper
versions. [vszakats] */
#ifndef HB_GTCORE_H_
#define HB_GTCORE_H_
#include "hbapigt.h"
#include "hbapicdp.h"
HB_EXTERN_BEGIN
/* convert lower case suffixes to upper */
#define HB_GT_nul HB_GT_NUL
#define HB_GT_std HB_GT_STD
#define HB_GT_cgi HB_GT_CGI
#define HB_GT_pca HB_GT_PCA
#define HB_GT_crs HB_GT_CRS
#define HB_GT_sln HB_GT_SLN
#define HB_GT_win HB_GT_WIN
#define HB_GT_wvt HB_GT_WVT
#define HB_GT_dos HB_GT_DOS
#define HB_GT_os2 HB_GT_OS2
#define HB_GT_tpl HB_GT_TPL
#define HB_GT_trm HB_GT_TRM
#define HB_GT_QTc HB_GT_QTC
#define HB_GT_xvt HB_GT_XVT
#define HB_GT_xwc HB_GT_XWC
#define HB_GT_gui HB_GT_GUI
/* These hacks are needed to force preprocessing if id/x is also a macro */
#define _HB_GT_PREF_( id ) _HB_GT_PREF__( id )
#define _HB_GT_PREF__( id ) HB_GT_##id
#define HB_GT_REQUEST( id ) HB_GT_REQUEST_( _HB_GT_PREF_( id ) )
#define HB_GT_REQUEST_( id ) HB_GT_REQUEST__( id )
#define HB_GT_REQUEST__( id ) HB_FUNC_EXTERN( id ); \
void hb_gt_ForceLink_##id( void ) \
{ \
HB_FUNC_EXEC( id ); \
}
#define HB_GT_ANNOUNCE( id ) HB_GT_ANNOUNCE_( _HB_GT_PREF_( id ) )
#define HB_GT_ANNOUNCE_( id ) HB_GT_ANNOUNCE__( id )
#define HB_GT_ANNOUNCE__( id ) HB_FUNC( id ) {} HB_FUNC( id##_DEFAULT ) {}
#define HB_GT_DRVNAME( id ) HB_MACRO2STRING( id )
#define HB_GT_FUNC( x ) HB_GT_FUNC_( x, HB_GT_NAME )
#define HB_GT_FUNC_( x, id ) HB_GT_FUNC__( x, id )
#define HB_GT_FUNC__( x, id ) hb##_##id##_##x
/* forward declaration */
struct _HB_GT_BASE;
#define HB_GT_PTR struct _HB_GT_BASE *
typedef struct
{
BOOL (* Lock) ( HB_GT_PTR );
void (* Unlock) ( HB_GT_PTR );
void (* Init) ( HB_GT_PTR, HB_FHANDLE, HB_FHANDLE, HB_FHANDLE );
void (* Exit) ( HB_GT_PTR );
void * (* New) ( HB_GT_PTR );
void (* Free) ( HB_GT_PTR );
BOOL (* Resize ) ( HB_GT_PTR, int, int );
BOOL (* SetMode) ( HB_GT_PTR, int, int );
void (* GetSize) ( HB_GT_PTR, int *, int * );
void (* SemiCold) ( HB_GT_PTR );
void (* ColdArea) ( HB_GT_PTR, int, int, int, int );
void (* ExposeArea) ( HB_GT_PTR, int, int, int, int );
void (* ScrollArea) ( HB_GT_PTR, int, int, int, int, BYTE, BYTE, int, int );
void (* TouchLine) ( HB_GT_PTR, int );
void (* TouchCell) ( HB_GT_PTR, int, int );
void (* Redraw) ( HB_GT_PTR, int, int, int );
void (* RedrawDiff) ( HB_GT_PTR );
void (* Refresh) ( HB_GT_PTR );
void (* Flush) ( HB_GT_PTR );
int (* MaxCol) ( HB_GT_PTR );
int (* MaxRow) ( HB_GT_PTR );
BOOL (* CheckPos) ( HB_GT_PTR, int, int, long * );
void (* SetPos) ( HB_GT_PTR, int, int );
void (* GetPos) ( HB_GT_PTR, int *, int * );
BOOL (* IsColor) ( HB_GT_PTR );
void (* GetColorStr) ( HB_GT_PTR, char * );
void (* SetColorStr) ( HB_GT_PTR, const char * );
void (* ColorSelect) ( HB_GT_PTR, int );
int (* GetColor) ( HB_GT_PTR );
int (* ColorNum) ( HB_GT_PTR, const char * );
void (* ColorsToString) ( HB_GT_PTR, int *, int, char *, int );
void (* StringToColors) ( HB_GT_PTR, const char *, int **, int * );
void (* GetColorData) ( HB_GT_PTR, int **, int *, int * );
int (* GetClearColor) ( HB_GT_PTR );
void (* SetClearColor) ( HB_GT_PTR, int );
int (* GetClearChar) ( HB_GT_PTR );
void (* SetClearChar) ( HB_GT_PTR, int );
int (* GetCursorStyle) ( HB_GT_PTR );
void (* SetCursorStyle) ( HB_GT_PTR, int );
void (* GetScrCursor) ( HB_GT_PTR, int *, int *, int * );
BOOL (* GetScrChar) ( HB_GT_PTR, int, int, BYTE *, BYTE *, USHORT * );
BOOL (* PutScrChar) ( HB_GT_PTR, int, int, BYTE, BYTE, USHORT );
void (* DispBegin) ( HB_GT_PTR );
void (* DispEnd) ( HB_GT_PTR );
int (* DispCount) ( HB_GT_PTR );
BOOL (* GetChar) ( HB_GT_PTR, int, int, BYTE *, BYTE *, USHORT * );
BOOL (* PutChar) ( HB_GT_PTR, int, int, BYTE, BYTE, USHORT );
long (* RectSize) ( HB_GT_PTR, int, int, int, int );
void (* Save) ( HB_GT_PTR, int, int, int, int, BYTE * );
void (* Rest) ( HB_GT_PTR, int, int, int, int, const BYTE * );
void (* PutText) ( HB_GT_PTR, int, int, BYTE, const BYTE *, ULONG );
void (* Replicate) ( HB_GT_PTR, int, int, BYTE, BYTE, USHORT, ULONG );
void (* WriteAt) ( HB_GT_PTR, int, int, const BYTE *, ULONG );
void (* Write) ( HB_GT_PTR, const BYTE *, ULONG );
void (* WriteCon) ( HB_GT_PTR, const BYTE *, ULONG );
void (* SetAttribute) ( HB_GT_PTR, int, int, int, int, BYTE );
void (* DrawShadow) ( HB_GT_PTR, int, int, int, int, BYTE );
void (* Scroll) ( HB_GT_PTR, int, int, int, int, BYTE, BYTE, int, int );
void (* ScrollUp) ( HB_GT_PTR, int, BYTE, BYTE );
void (* Box) ( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
void (* BoxD) ( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
void (* BoxS) ( HB_GT_PTR, int, int, int, int, const BYTE *, BYTE );
void (* HorizLine) ( HB_GT_PTR, int, int, int, BYTE, BYTE );
void (* VertLine) ( HB_GT_PTR, int, int, int, BYTE, BYTE );
BOOL (* GetBlink) ( HB_GT_PTR );
void (* SetBlink) ( HB_GT_PTR, BOOL );
void (* SetSnowFlag) ( HB_GT_PTR, BOOL );
const char * (* Version) ( HB_GT_PTR, int );
BOOL (* Suspend) ( HB_GT_PTR );
BOOL (* Resume) ( HB_GT_PTR );
BOOL (* PreExt) ( HB_GT_PTR );
BOOL (* PostExt) ( HB_GT_PTR );
void (* OutStd) ( HB_GT_PTR, const BYTE *, ULONG );
void (* OutErr) ( HB_GT_PTR, const BYTE *, ULONG );
void (* Tone) ( HB_GT_PTR, double, double );
void (* Bell) ( HB_GT_PTR );
BOOL (* Info) ( HB_GT_PTR, int, PHB_GT_INFO );
int (* Alert) ( HB_GT_PTR, PHB_ITEM, PHB_ITEM, int, int, double );
int (* SetFlag) ( HB_GT_PTR, int, int );
/* internationalization */
BOOL (* SetDispCP) ( HB_GT_PTR, const char *, const char *, BOOL );
BOOL (* SetKeyCP) ( HB_GT_PTR, const char *, const char * );
/* keyboard */
int (* ReadKey) ( HB_GT_PTR, int );
int (* InkeyGet) ( HB_GT_PTR, BOOL fWait, double dSeconds, int iEventMask );
void (* InkeyPut) ( HB_GT_PTR, int iKey );
void (* InkeyIns) ( HB_GT_PTR, int iKey );
int (* InkeyLast) ( HB_GT_PTR, int iEventMask );
int (* InkeyNext) ( HB_GT_PTR, int iEventMask );
void (* InkeyPoll) ( HB_GT_PTR );
void (* InkeySetText) ( HB_GT_PTR, const char * szText, ULONG ulLen );
int (* InkeySetLast) ( HB_GT_PTR, int iKey );
void (* InkeyReset) ( HB_GT_PTR );
void (* InkeyExit) ( HB_GT_PTR );
/* mouse */
void (* MouseInit) ( HB_GT_PTR );
void (* MouseExit) ( HB_GT_PTR );
BOOL (* MouseIsPresent) ( HB_GT_PTR );
void (* MouseShow) ( HB_GT_PTR );
void (* MouseHide) ( HB_GT_PTR );
BOOL (* MouseGetCursor) ( HB_GT_PTR );
void (* MouseSetCursor) ( HB_GT_PTR, BOOL );
int (* MouseCol) ( HB_GT_PTR );
int (* MouseRow) ( HB_GT_PTR );
void (* MouseGetPos) ( HB_GT_PTR, int *, int * );
void (* MouseSetPos) ( HB_GT_PTR, int, int );
void (* MouseSetBounds) ( HB_GT_PTR, int, int, int, int );
void (* MouseGetBounds) ( HB_GT_PTR, int *, int *, int *, int * );
int (* MouseStorageSize) ( HB_GT_PTR );
void (* MouseSaveState) ( HB_GT_PTR, BYTE * );
void (* MouseRestoreState) ( HB_GT_PTR, const BYTE * );
int (* MouseGetDoubleClickSpeed) ( HB_GT_PTR );
void (* MouseSetDoubleClickSpeed) ( HB_GT_PTR, int );
int (* MouseCountButton) ( HB_GT_PTR );
BOOL (* MouseButtonState) ( HB_GT_PTR, int );
BOOL (* MouseButtonPressed) ( HB_GT_PTR, int, int *, int * );
BOOL (* MouseButtonReleased) ( HB_GT_PTR, int, int *, int * );
int (* MouseReadKey) ( HB_GT_PTR, int );
/* Graphics API */
int (* GfxPrimitive) ( HB_GT_PTR, int, int, int, int, int, int );
void (* GfxText) ( HB_GT_PTR, int, int, const char *, int, int, int );
void (* WhoCares) ( HB_GT_PTR, void * );
} HB_GT_FUNCS, * PHB_GT_FUNCS;
typedef int ( * GTENTRYP_V )( void );
#define GTFUNCSCOUNT ( sizeof( HB_GT_FUNCS ) / sizeof( GTENTRYP_V ) )
#define HB_GT_MAX_ 32
#define HB_GT_NAME_MAX_ 8
typedef struct _HB_GT_INIT
{
const char * id;
BOOL (* init) ( PHB_GT_FUNCS );
PHB_GT_FUNCS pSuperTable;
int * pGtId;
} HB_GT_INIT, * PHB_GT_INIT;
typedef union
{
struct
{
UINT16 usChar;
BYTE bColor;
BYTE bAttr;
} c;
UINT32 uiValue;
} HB_SCREENCELL;
typedef HB_SCREENCELL * PHB_SCREENCELL;
typedef struct _HB_GT_BASE
{
PHB_GT_FUNCS pFuncTable;
PHB_ITEM pMutex;
int iUsed;
int iRow; /* cursor row position */
int iCol; /* cursor column position */
int iHeight; /* window height */
int iWidth; /* window width */
PHB_SCREENCELL screenBuffer; /* window foreground (board) current buffer */
PHB_SCREENCELL prevBuffer; /* window foreground (board) previous buffer */
BOOL * pLines; /* Touched Window lines */
BOOL fRefresh; /* Should Window be refreshed */
BOOL fVgaCell;
BOOL fIsColor;
BOOL fBlinking;
BOOL fStdOutCon;
BOOL fStdErrCon;
int iCursorShape;
USHORT uiDispCount;
USHORT uiExtCount;
USHORT uiClearChar;
USHORT uiClearColor;
HB_FHANDLE hStdIn;
HB_FHANDLE hStdOut;
HB_FHANDLE hStdErr;
BOOL fDispTrans;
PHB_CODEPAGE cdpTerm;
PHB_CODEPAGE cdpHost;
int iColorIndex;
int iColorCount;
int * pColor;
int iDoubleClickSpeed; /* In milliseconds */
BOOL fMouseVisible;
int iMouseLastRow;
int iMouseLastCol;
HB_LONG iMouseLeftTimer;
HB_LONG iMouseRightTimer;
HB_LONG iMouseMiddleTimer;
int defaultKeyBuffer[ HB_DEFAULT_INKEY_BUFSIZE + 1 ];
int * inkeyBuffer;
int inkeyBufferSize;
int inkeyHead;
int inkeyTail;
int iLastPut;
int inkeyLast;
BYTE * StrBuffer;
ULONG StrBufferSize;
ULONG StrBufferPos;
PHB_ITEM pNotifierBlock;
PHB_ITEM pCargo;
void * pGTData[HB_GT_MAX_]; /* local GT data */
} HB_GT_BASE, * PHB_GT_BASE, * PHB_GT;
extern PHB_GT hb_gt_Base( void );
extern void hb_gt_BaseFree( PHB_GT pGT );
extern PHB_GT hb_gt_ItemBase( PHB_ITEM pItemGT );
#define HB_GTLOCAL(g) (g)->pGTData[*HB_GTID_PTR]
#define HB_GTSELF_LOCK(g) (g)->pFuncTable->Lock(g)
#define HB_GTSELF_UNLOCK(g) (g)->pFuncTable->Unlock(g)
#define HB_GTSELF_INIT(g,i,o,e) (g)->pFuncTable->Init(g,i,o,e)
#define HB_GTSELF_EXIT(g) (g)->pFuncTable->Exit(g)
#define HB_GTSELF_NEW(g) (g)->pFuncTable->New(g)
#define HB_GTSELF_FREE(g) (g)->pFuncTable->Free(g)
#define HB_GTSELF_RESIZE(g,r,c) (g)->pFuncTable->Resize(g,r,c)
#define HB_GTSELF_SETMODE(g,r,c) (g)->pFuncTable->SetMode(g,r,c)
#define HB_GTSELF_GETSIZE(g,pr,pc) (g)->pFuncTable->GetSize(g,pr,pc)
#define HB_GTSELF_SEMICOLD(g) (g)->pFuncTable->SemiCold(g)
#define HB_GTSELF_COLDAREA(g,t,l,b,r) (g)->pFuncTable->ColdArea(g,t,l,b,r)
#define HB_GTSELF_EXPOSEAREA(g,t,l,b,r) (g)->pFuncTable->ExposeArea(g,t,l,b,r)
#define HB_GTSELF_SCROLLAREA(g,t,l,b,r,m,u,v,h) (g)->pFuncTable->ScrollArea(g,t,l,b,r,m,u,v,h)
#define HB_GTSELF_TOUCHLINE(g,r) (g)->pFuncTable->TouchLine(g,r)
#define HB_GTSELF_TOUCHCELL(g,r,c) (g)->pFuncTable->TouchCell(g,r,c)
#define HB_GTSELF_REDRAW(g,r,c,l) (g)->pFuncTable->Redraw(g,r,c,l)
#define HB_GTSELF_REDRAWDIFF(g) (g)->pFuncTable->RedrawDiff(g)
#define HB_GTSELF_REFRESH(g) (g)->pFuncTable->Refresh(g)
#define HB_GTSELF_FLUSH(g) (g)->pFuncTable->Flush(g)
#define HB_GTSELF_MAXCOL(g) (g)->pFuncTable->MaxCol(g)
#define HB_GTSELF_MAXROW(g) (g)->pFuncTable->MaxRow(g)
#define HB_GTSELF_CHECKPOS(g,r,c,l) (g)->pFuncTable->CheckPos(g,r,c,l)
#define HB_GTSELF_SETPOS(g,r,c) (g)->pFuncTable->SetPos(g,r,c)
#define HB_GTSELF_GETPOS(g,pr,pc) (g)->pFuncTable->GetPos(g,pr,pc)
#define HB_GTSELF_ISCOLOR(g) (g)->pFuncTable->IsColor(g)
#define HB_GTSELF_GETCOLORSTR(g,s) (g)->pFuncTable->GetColorStr(g,s)
#define HB_GTSELF_SETCOLORSTR(g,s) (g)->pFuncTable->SetColorStr(g,s)
#define HB_GTSELF_COLORSELECT(g,c) (g)->pFuncTable->ColorSelect(g,c)
#define HB_GTSELF_GETCOLOR(g) (g)->pFuncTable->GetColor(g)
#define HB_GTSELF_COLORNUM(g,s) (g)->pFuncTable->ColorNum(g,s)
#define HB_GTSELF_COLORSTOSTRING(g,pc,i,ps,n) (g)->pFuncTable->ColorsToString(g,pc,i,ps,n)
#define HB_GTSELF_STRINGTOCOLORS(g,ps,pc,pi) (g)->pFuncTable->StringToColors(g,ps,pc,pi)
#define HB_GTSELF_GETCOLORDATA(g,pc,pn,pi) (g)->pFuncTable->GetColorData(g,pc,pn,pi)
#define HB_GTSELF_GETCLEARCOLOR(g) (g)->pFuncTable->GetClearColor(g)
#define HB_GTSELF_SETCLEARCOLOR(g,c) (g)->pFuncTable->SetClearColor(g,c)
#define HB_GTSELF_GETCLEARCHAR(g) (g)->pFuncTable->GetClearChar(g)
#define HB_GTSELF_SETCLEARCHAR(g,c) (g)->pFuncTable->SetClearChar(g,c)
#define HB_GTSELF_GETCURSORSTYLE(g) (g)->pFuncTable->GetCursorStyle(g)
#define HB_GTSELF_SETCURSORSTYLE(g,s) (g)->pFuncTable->SetCursorStyle(g,s)
#define HB_GTSELF_GETSCRCURSOR(g,pr,pc,ps) (g)->pFuncTable->GetScrCursor(g,pr,pc,ps)
#define HB_GTSELF_GETSCRCHAR(g,r,c,pm,pa,pc) (g)->pFuncTable->GetScrChar(g,r,c,pm,pa,pc)
#define HB_GTSELF_PUTSCRCHAR(g,r,c,m,a,u) (g)->pFuncTable->PutScrChar(g,r,c,m,a,u)
#define HB_GTSELF_DISPBEGIN(g) (g)->pFuncTable->DispBegin(g)
#define HB_GTSELF_DISPEND(g) (g)->pFuncTable->DispEnd(g)
#define HB_GTSELF_DISPCOUNT(g) (g)->pFuncTable->DispCount(g)
#define HB_GTSELF_GETCHAR(g,r,c,pm,pa,pc) (g)->pFuncTable->GetChar(g,r,c,pm,pa,pc)
#define HB_GTSELF_PUTCHAR(g,r,c,m,a,u) (g)->pFuncTable->PutChar(g,r,c,m,a,u)
#define HB_GTSELF_RECTSIZE(g,t,l,b,r) (g)->pFuncTable->RectSize(g,t,l,b,r)
#define HB_GTSELF_SAVE(g,t,l,b,r,p) (g)->pFuncTable->Save(g,t,l,b,r,p)
#define HB_GTSELF_REST(g,t,l,b,r,p) (g)->pFuncTable->Rest(g,t,l,b,r,p)
#define HB_GTSELF_PUTTEXT(g,r,c,m,s,l) (g)->pFuncTable->PutText(g,r,c,m,s,l)
#define HB_GTSELF_REPLICATE(g,r,c,m,a,u,l) (g)->pFuncTable->Replicate(g,r,c,m,a,u,l)
#define HB_GTSELF_WRITEAT(g,r,c,s,l) (g)->pFuncTable->WriteAt(g,r,c,s,l)
#define HB_GTSELF_WRITE(g,s,l) (g)->pFuncTable->Write(g,s,l)
#define HB_GTSELF_WRITECON(g,s,l) (g)->pFuncTable->WriteCon(g,s,l)
#define HB_GTSELF_SETATTRIBUTE(g,t,l,b,r,m) (g)->pFuncTable->SetAttribute(g,t,l,b,r,m)
#define HB_GTSELF_DRAWSHADOW(g,t,l,b,r,m) (g)->pFuncTable->DrawShadow(g,t,l,b,r,m)
#define HB_GTSELF_SCROLL(g,t,l,b,r,m,u,v,h) (g)->pFuncTable->Scroll(g,t,l,b,r,m,u,v,h)
#define HB_GTSELF_SCROLLUP(g,r,m,u) (g)->pFuncTable->ScrollUp(g,r,m,u)
#define HB_GTSELF_BOX(g,t,l,b,r,f,m) (g)->pFuncTable->Box(g,t,l,b,r,f,m)
#define HB_GTSELF_BOXD(g,t,l,b,r,f,m) (g)->pFuncTable->BoxD(g,t,l,b,r,f,m)
#define HB_GTSELF_BOXS(g,t,l,b,r,f,m) (g)->pFuncTable->BoxS(g,t,l,b,r,f,m)
#define HB_GTSELF_HORIZLINE(g,h,l,r,u,m) (g)->pFuncTable->HorizLine(g,h,l,r,u,m)
#define HB_GTSELF_VERTLINE(g,c,t,b,u,m) (g)->pFuncTable->VertLine(g,c,t,b,u,m)
#define HB_GTSELF_GETBLINK(g) (g)->pFuncTable->GetBlink(g)
#define HB_GTSELF_SETBLINK(g,b) (g)->pFuncTable->SetBlink(g,b)
#define HB_GTSELF_SETSNOWFLAG(g,b) (g)->pFuncTable->SetSnowFlag(g,b)
#define HB_GTSELF_VERSION(g,i) (g)->pFuncTable->Version(g,i)
#define HB_GTSELF_SUSPEND(g) (g)->pFuncTable->Suspend(g)
#define HB_GTSELF_RESUME(g) (g)->pFuncTable->Resume(g)
#define HB_GTSELF_PREEXT(g) (g)->pFuncTable->PreExt(g)
#define HB_GTSELF_POSTEXT(g) (g)->pFuncTable->PostExt(g)
#define HB_GTSELF_OUTSTD(g,s,l) (g)->pFuncTable->OutStd(g,s,l)
#define HB_GTSELF_OUTERR(g,s,l) (g)->pFuncTable->OutErr(g,s,l)
#define HB_GTSELF_TONE(g,f,d) (g)->pFuncTable->Tone(g,f,d)
#define HB_GTSELF_BELL(g) (g)->pFuncTable->Bell(g)
#define HB_GTSELF_INFO(g,i,p) (g)->pFuncTable->Info(g,i,p)
#define HB_GTSELF_ALERT(g,m,o,n,h,d) (g)->pFuncTable->Alert(g,m,o,n,h,d)
#define HB_GTSELF_SETFLAG(g,i,f) (g)->pFuncTable->SetFlag(g,i,f)
#define HB_GTSELF_SETDISPCP(g,t,h,b) (g)->pFuncTable->SetDispCP(g,t,h,b)
#define HB_GTSELF_SETKEYCP(g,t,h) (g)->pFuncTable->SetKeyCP(g,t,h)
#define HB_GTSELF_READKEY(g,m) (g)->pFuncTable->ReadKey(g,m)
#define HB_GTSELF_INKEYGET(g,w,d,m) (g)->pFuncTable->InkeyGet(g,w,d,m)
#define HB_GTSELF_INKEYPUT(g,k) (g)->pFuncTable->InkeyPut(g,k)
#define HB_GTSELF_INKEYINS(g,k) (g)->pFuncTable->InkeyIns(g,k)
#define HB_GTSELF_INKEYLAST(g,m) (g)->pFuncTable->InkeyLast(g,m)
#define HB_GTSELF_INKEYNEXT(g,m) (g)->pFuncTable->InkeyNext(g,m)
#define HB_GTSELF_INKEYPOLL(g) (g)->pFuncTable->InkeyPoll(g)
#define HB_GTSELF_INKEYSETTEXT(g,s,l) (g)->pFuncTable->InkeySetText(g,s,l)
#define HB_GTSELF_INKEYSETLAST(g,k) (g)->pFuncTable->InkeySetLast(g,k)
#define HB_GTSELF_INKEYRESET(g) (g)->pFuncTable->InkeyReset(g)
#define HB_GTSELF_INKEYEXIT(g) (g)->pFuncTable->InkeyExit(g)
#define HB_GTSELF_MOUSEINIT(g) (g)->pFuncTable->MouseInit(g)
#define HB_GTSELF_MOUSEEXIT(g) (g)->pFuncTable->MouseExit(g)
#define HB_GTSELF_MOUSEISPRESENT(g) (g)->pFuncTable->MouseIsPresent(g)
#define HB_GTSELF_MOUSESHOW(g) (g)->pFuncTable->MouseShow(g)
#define HB_GTSELF_MOUSEHIDE(g) (g)->pFuncTable->MouseHide(g)
#define HB_GTSELF_MOUSEGETCURSOR(g) (g)->pFuncTable->MouseGetCursor(g)
#define HB_GTSELF_MOUSESETCURSOR(g,v) (g)->pFuncTable->MouseSetCursor(g,v)
#define HB_GTSELF_MOUSECOL(g) (g)->pFuncTable->MouseCol(g)
#define HB_GTSELF_MOUSEROW(g) (g)->pFuncTable->MouseRow(g)
#define HB_GTSELF_MOUSEGETPOS(g,pr,pc) (g)->pFuncTable->MouseGetPos(g,pr,pc)
#define HB_GTSELF_MOUSESETPOS(g,r,c) (g)->pFuncTable->MouseSetPos(g,r,c)
#define HB_GTSELF_MOUSESETBOUNDS(g,t,l,b,r) (g)->pFuncTable->MouseSetBounds(g,t,l,b,r)
#define HB_GTSELF_MOUSEGETBOUNDS(g,t,l,b,r) (g)->pFuncTable->MouseGetBounds(g,t,l,b,r)
#define HB_GTSELF_MOUSESTORAGESIZE(g) (g)->pFuncTable->MouseStorageSize(g)
#define HB_GTSELF_MOUSESAVESTATE(g,p) (g)->pFuncTable->MouseSaveState(g,p)
#define HB_GTSELF_MOUSERESTORESTATE(g,p) (g)->pFuncTable->MouseRestoreState(g,p)
#define HB_GTSELF_MOUSEGETDOUBLECLICKSPEED(g) (g)->pFuncTable->MouseGetDoubleClickSpeed(g)
#define HB_GTSELF_MOUSESETDOUBLECLICKSPEED(g,i) (g)->pFuncTable->MouseSetDoubleClickSpeed(g,i)
#define HB_GTSELF_MOUSECOUNTBUTTON(g) (g)->pFuncTable->MouseCountButton(g)
#define HB_GTSELF_MOUSEBUTTONSTATE(g,b) (g)->pFuncTable->MouseButtonState(g,b)
#define HB_GTSELF_MOUSEBUTTONPRESSED(g,b,r,c) (g)->pFuncTable->MouseButtonPressed(g,b,r,c)
#define HB_GTSELF_MOUSEBUTTONRELEASED(g,b,r,c) (g)->pFuncTable->MouseButtonReleased(g,b,r,c)
#define HB_GTSELF_MOUSEREADKEY(g,m) (g)->pFuncTable->MouseReadKey(g,m)
#define HB_GTSELF_GFXPRIMITIVE(g,i,t,l,b,r,c) (g)->pFuncTable->GfxPrimitive(g,i,t,l,b,r,c)
#define HB_GTSELF_GFXTEXT(g,t,l,s,c,h,w) (g)->pFuncTable->GfxText(g,t,l,s,c,h,w)
#define HB_GTSELF_WHOCARES(g,p) (g)->pFuncTable->WhoCares(g,p)
#ifndef HB_GTSUPERTABLE
# define HB_GTSUPERTABLE(g) HB_GTSUPER
#endif
#define HB_GTSUPER_LOCK(g) (HB_GTSUPERTABLE(g))->Lock(g)
#define HB_GTSUPER_UNLOCK(g) (HB_GTSUPERTABLE(g))->Unlock(g)
#define HB_GTSUPER_INIT(g,i,o,e) (HB_GTSUPERTABLE(g))->Init(g,i,o,e)
#define HB_GTSUPER_EXIT(g) (HB_GTSUPERTABLE(g))->Exit(g)
#define HB_GTSUPER_NEW(g) (HB_GTSUPERTABLE(g))->New(g)
#define HB_GTSUPER_FREE(g) (HB_GTSUPERTABLE(g))->Free(g)
#define HB_GTSUPER_RESIZE(g,r,c) (HB_GTSUPERTABLE(g))->Resize(g,r,c)
#define HB_GTSUPER_SETMODE(g,r,c) (HB_GTSUPERTABLE(g))->SetMode(g,r,c)
#define HB_GTSUPER_GETSIZE(g,pr,pc) (HB_GTSUPERTABLE(g))->GetSize(g,pr,pc)
#define HB_GTSUPER_SEMICOLD(g) (HB_GTSUPERTABLE(g))->SemiCold(g)
#define HB_GTSUPER_COLDAREA(g,t,l,b,r) (HB_GTSUPERTABLE(g))->ColdArea(g,t,l,b,r)
#define HB_GTSUPER_EXPOSEAREA(g,t,l,b,r) (HB_GTSUPERTABLE(g))->ExposeArea(g,t,l,b,r)
#define HB_GTSUPER_SCROLLAREA(g,t,l,b,r,m,u,v,h) (HB_GTSUPERTABLE(g))->ScrollArea(g,t,l,b,r,m,u,v,h)
#define HB_GTSUPER_TOUCHLINE(g,r) (HB_GTSUPERTABLE(g))->TouchLine(g,r)
#define HB_GTSUPER_TOUCHCELL(g,r,c) (HB_GTSUPERTABLE(g))->TouchCell(g,r,c)
#define HB_GTSUPER_REDRAW(g,r,c,l) (HB_GTSUPERTABLE(g))->Redraw(g,r,c,l)
#define HB_GTSUPER_REDRAWDIFF(g) (HB_GTSUPERTABLE(g))->RedrawDiff(g)
#define HB_GTSUPER_REFRESH(g) (HB_GTSUPERTABLE(g))->Refresh(g)
#define HB_GTSUPER_FLUSH(g) (HB_GTSUPERTABLE(g))->Flush(g)
#define HB_GTSUPER_MAXCOL(g) (HB_GTSUPERTABLE(g))->MaxCol(g)
#define HB_GTSUPER_MAXROW(g) (HB_GTSUPERTABLE(g))->MaxRow(g)
#define HB_GTSUPER_CHECKPOS(g,r,c,l) (HB_GTSUPERTABLE(g))->CheckPos(g,r,c,l)
#define HB_GTSUPER_SETPOS(g,r,c) (HB_GTSUPERTABLE(g))->SetPos(g,r,c)
#define HB_GTSUPER_GETPOS(g,pr,pc) (HB_GTSUPERTABLE(g))->GetPos(g,pr,pc)
#define HB_GTSUPER_ISCOLOR(g) (HB_GTSUPERTABLE(g))->IsColor(g)
#define HB_GTSUPER_GETCOLORSTR(g,s) (HB_GTSUPERTABLE(g))->GetColorStr(g,s)
#define HB_GTSUPER_SETCOLORSTR(g,s) (HB_GTSUPERTABLE(g))->SetColorStr(g,s)
#define HB_GTSUPER_COLORSELECT(g,c) (HB_GTSUPERTABLE(g))->ColorSelect(g,c)
#define HB_GTSUPER_GETCOLOR(g) (HB_GTSUPERTABLE(g))->GetColor(g)
#define HB_GTSUPER_COLORNUM(g,s) (HB_GTSUPERTABLE(g))->ColorNum(g,s)
#define HB_GTSUPER_COLORSTOSTRING(g,pc,i,ps,n) (HB_GTSUPERTABLE(g))->ColorsToString(g,pc,i,ps,n)
#define HB_GTSUPER_STRINGTOCOLORS(g,ps,pc,pi) (HB_GTSUPERTABLE(g))->StringToColors(g,ps,pc,pi)
#define HB_GTSUPER_GETCOLORDATA(g,pc,pn,pi) (HB_GTSUPERTABLE(g))->GetColorData(g,pc,pn,pi)
#define HB_GTSUPER_GETCLEARCOLOR(g) (HB_GTSUPERTABLE(g))->GetClearColor(g)
#define HB_GTSUPER_SETCLEARCOLOR(g,c) (HB_GTSUPERTABLE(g))->SetClearColor(g,c)
#define HB_GTSUPER_GETCLEARCHAR(g) (HB_GTSUPERTABLE(g))->GetClearChar(g)
#define HB_GTSUPER_SETCLEARCHAR(g,c) (HB_GTSUPERTABLE(g))->SetClearChar(g,c)
#define HB_GTSUPER_GETCURSORSTYLE(g) (HB_GTSUPERTABLE(g))->GetCursorStyle(g)
#define HB_GTSUPER_SETCURSORSTYLE(g,s) (HB_GTSUPERTABLE(g))->SetCursorStyle(g,s)
#define HB_GTSUPER_GETSCRCURSOR(g,pr,pc,ps) (HB_GTSUPERTABLE(g))->GetScrCursor(g,pr,pc,ps)
#define HB_GTSUPER_GETSCRCHAR(g,r,c,pm,pa,pc) (HB_GTSUPERTABLE(g))->GetScrChar(g,r,c,pm,pa,pc)
#define HB_GTSUPER_PUTSCRCHAR(g,r,c,m,a,u) (HB_GTSUPERTABLE(g))->PutScrChar(g,r,c,m,a,u)
#define HB_GTSUPER_DISPBEGIN(g) (HB_GTSUPERTABLE(g))->DispBegin(g)
#define HB_GTSUPER_DISPEND(g) (HB_GTSUPERTABLE(g))->DispEnd(g)
#define HB_GTSUPER_DISPCOUNT(g) (HB_GTSUPERTABLE(g))->DispCount(g)
#define HB_GTSUPER_GETCHAR(g,r,c,pm,pa,pc) (HB_GTSUPERTABLE(g))->GetChar(g,r,c,pm,pa,pc)
#define HB_GTSUPER_PUTCHAR(g,r,c,m,a,u) (HB_GTSUPERTABLE(g))->PutChar(g,r,c,m,a,u)
#define HB_GTSUPER_RECTSIZE(g,t,l,b,r) (HB_GTSUPERTABLE(g))->RectSize(g,t,l,b,r)
#define HB_GTSUPER_SAVE(g,t,l,b,r,p) (HB_GTSUPERTABLE(g))->Save(g,t,l,b,r,p)
#define HB_GTSUPER_REST(g,t,l,b,r,p) (HB_GTSUPERTABLE(g))->Rest(g,t,l,b,r,p)
#define HB_GTSUPER_PUTTEXT(g,r,c,m,s,l) (HB_GTSUPERTABLE(g))->PutText(g,r,c,m,s,l)
#define HB_GTSUPER_REPLICATE(g,r,c,m,a,u,l) (HB_GTSUPERTABLE(g))->Replicate(g,r,c,m,a,u,l)
#define HB_GTSUPER_WRITEAT(g,r,c,s,l) (HB_GTSUPERTABLE(g))->WriteAt(g,r,c,s,l)
#define HB_GTSUPER_WRITE(g,s,l) (HB_GTSUPERTABLE(g))->Write(g,s,l)
#define HB_GTSUPER_WRITECON(g,s,l) (HB_GTSUPERTABLE(g))->WriteCon(g,s,l)
#define HB_GTSUPER_SETATTRIBUTE(g,t,l,b,r,m) (HB_GTSUPERTABLE(g))->SetAttribute(g,t,l,b,r,m)
#define HB_GTSUPER_DRAWSHADOW(g,t,l,b,r,m) (HB_GTSUPERTABLE(g))->DrawShadow(g,t,l,b,r,m)
#define HB_GTSUPER_SCROLL(g,t,l,b,r,m,u,v,h) (HB_GTSUPERTABLE(g))->Scroll(g,t,l,b,r,m,u,v,h)
#define HB_GTSUPER_SCROLLUP(g,r,m,u) (HB_GTSUPERTABLE(g))->ScrollUp(g,r,m,u)
#define HB_GTSUPER_BOX(g,t,l,b,r,f,m) (HB_GTSUPERTABLE(g))->Box(g,t,l,b,r,f,m)
#define HB_GTSUPER_BOXD(g,t,l,b,r,f,m) (HB_GTSUPERTABLE(g))->BoxD(g,t,l,b,r,f,m)
#define HB_GTSUPER_BOXS(g,t,l,b,r,f,m) (HB_GTSUPERTABLE(g))->BoxS(g,t,l,b,r,f,m)
#define HB_GTSUPER_HORIZLINE(g,h,l,r,u,m) (HB_GTSUPERTABLE(g))->HorizLine(g,h,l,r,u,m)
#define HB_GTSUPER_VERTLINE(g,c,t,b,u,m) (HB_GTSUPERTABLE(g))->VertLine(g,c,t,b,u,m)
#define HB_GTSUPER_GETBLINK(g) (HB_GTSUPERTABLE(g))->GetBlink(g)
#define HB_GTSUPER_SETBLINK(g,b) (HB_GTSUPERTABLE(g))->SetBlink(g,b)
#define HB_GTSUPER_SETSNOWFLAG(g,b) (HB_GTSUPERTABLE(g))->SetSnowFlag(g,b)
#define HB_GTSUPER_VERSION(g,i) (HB_GTSUPERTABLE(g))->Version(g,i)
#define HB_GTSUPER_SUSPEND(g) (HB_GTSUPERTABLE(g))->Suspend(g)
#define HB_GTSUPER_RESUME(g) (HB_GTSUPERTABLE(g))->Resume(g)
#define HB_GTSUPER_PREEXT(g) (HB_GTSUPERTABLE(g))->PreExt(g)
#define HB_GTSUPER_POSTEXT(g) (HB_GTSUPERTABLE(g))->PostExt(g)
#define HB_GTSUPER_OUTSTD(g,s,l) (HB_GTSUPERTABLE(g))->OutStd(g,s,l)
#define HB_GTSUPER_OUTERR(g,s,l) (HB_GTSUPERTABLE(g))->OutErr(g,s,l)
#define HB_GTSUPER_TONE(g,f,d) (HB_GTSUPERTABLE(g))->Tone(g,f,d)
#define HB_GTSUPER_BELL(g) (HB_GTSUPERTABLE(g))->Bell(g)
#define HB_GTSUPER_INFO(g,i,p) (HB_GTSUPERTABLE(g))->Info(g,i,p)
#define HB_GTSUPER_ALERT(g,m,o,n,h,d) (HB_GTSUPERTABLE(g))->Alert(g,m,o,n,h,d)
#define HB_GTSUPER_SETFLAG(g,i,f) (HB_GTSUPERTABLE(g))->SetFlag(g,i,f)
#define HB_GTSUPER_SETDISPCP(g,t,h,b) (HB_GTSUPERTABLE(g))->SetDispCP(g,t,h,b)
#define HB_GTSUPER_SETKEYCP(g,t,h) (HB_GTSUPERTABLE(g))->SetKeyCP(g,t,h)
#define HB_GTSUPER_READKEY(g,m) (HB_GTSUPERTABLE(g))->ReadKey(g,m)
#define HB_GTSUPER_INKEYGET(g,w,d,m) (HB_GTSUPERTABLE(g))->InkeyGet(g,w,d,m)
#define HB_GTSUPER_INKEYPUT(g,k) (HB_GTSUPERTABLE(g))->InkeyPut(g,k)
#define HB_GTSUPER_INKEYINS(g,k) (HB_GTSUPERTABLE(g))->InkeyIns(g,k)
#define HB_GTSUPER_INKEYLAST(g,m) (HB_GTSUPERTABLE(g))->InkeyLast(g,m)
#define HB_GTSUPER_INKEYNEXT(g,m) (HB_GTSUPERTABLE(g))->InkeyNext(g,m)
#define HB_GTSUPER_INKEYPOLL(g) (HB_GTSUPERTABLE(g))->InkeyPoll(g)
#define HB_GTSUPER_INKEYSETTEXT(g,s,l) (HB_GTSUPERTABLE(g))->InkeySetText(g,s,l)
#define HB_GTSUPER_INKEYSETLAST(g,k) (HB_GTSUPERTABLE(g))->InkeySetLast(g,k)
#define HB_GTSUPER_INKEYRESET(g) (HB_GTSUPERTABLE(g))->InkeyReset(g)
#define HB_GTSUPER_INKEYEXIT(g) (HB_GTSUPERTABLE(g))->InkeyExit(g)
#define HB_GTSUPER_MOUSEINIT(g) (HB_GTSUPERTABLE(g))->MouseInit(g)
#define HB_GTSUPER_MOUSEEXIT(g) (HB_GTSUPERTABLE(g))->MouseExit(g)
#define HB_GTSUPER_MOUSEISPRESENT(g) (HB_GTSUPERTABLE(g))->MouseIsPresent(g)
#define HB_GTSUPER_MOUSESHOW(g) (HB_GTSUPERTABLE(g))->MouseShow(g)
#define HB_GTSUPER_MOUSEHIDE(g) (HB_GTSUPERTABLE(g))->MouseHide(g)
#define HB_GTSUPER_MOUSEGETCURSOR(g) (HB_GTSUPERTABLE(g))->MouseGetCursor(g)
#define HB_GTSUPER_MOUSESETCURSOR(g,v) (HB_GTSUPERTABLE(g))->MouseSetCursor(g,v)
#define HB_GTSUPER_MOUSECOL(g) (HB_GTSUPERTABLE(g))->MouseCol(g)
#define HB_GTSUPER_MOUSEROW(g) (HB_GTSUPERTABLE(g))->MouseRow(g)
#define HB_GTSUPER_MOUSEGETPOS(g,pr,pc) (HB_GTSUPERTABLE(g))->MouseGetPos(g,pr,pc)
#define HB_GTSUPER_MOUSESETPOS(g,r,c) (HB_GTSUPERTABLE(g))->MouseSetPos(g,r,c)
#define HB_GTSUPER_MOUSESETBOUNDS(g,t,l,b,r) (HB_GTSUPERTABLE(g))->MouseSetBounds(g,t,l,b,r)
#define HB_GTSUPER_MOUSEGETBOUNDS(g,t,l,b,r) (HB_GTSUPERTABLE(g))->MouseGetBounds(g,t,l,b,r)
#define HB_GTSUPER_MOUSESTORAGESIZE(g) (HB_GTSUPERTABLE(g))->MouseStorageSize(g)
#define HB_GTSUPER_MOUSESAVESTATE(g,p) (HB_GTSUPERTABLE(g))->MouseSaveState(g,p)
#define HB_GTSUPER_MOUSERESTORESTATE(g,p) (HB_GTSUPERTABLE(g))->MouseRestoreState(g,p)
#define HB_GTSUPER_MOUSEGETDOUBLECLICKSPEED(g) (HB_GTSUPERTABLE(g))->MouseGetDoubleClickSpeed(g)
#define HB_GTSUPER_MOUSESETDOUBLECLICKSPEED(g,i) (HB_GTSUPERTABLE(g))->MouseSetDoubleClickSpeed(g,i)
#define HB_GTSUPER_MOUSECOUNTBUTTON(g) (HB_GTSUPERTABLE(g))->MouseCountButton(g)
#define HB_GTSUPER_MOUSEBUTTONSTATE(g,b) (HB_GTSUPERTABLE(g))->MouseButtonState(g,b)
#define HB_GTSUPER_MOUSEBUTTONPRESSED(g,b,r,c) (HB_GTSUPERTABLE(g))->MouseButtonPressed(g,b,r,c)
#define HB_GTSUPER_MOUSEBUTTONRELEASED(g,b,r,c) (HB_GTSUPERTABLE(g))->MouseButtonReleased(g,b,r,c)
#define HB_GTSUPER_MOUSEREADKEY(g,m) (HB_GTSUPERTABLE(g))->MouseReadKey(g,m)
#define HB_GTSUPER_GFXPRIMITIVE(g,i,t,l,b,r,c) (HB_GTSUPERTABLE(g))->GfxPrimitive(g,i,t,l,b,r,c)
#define HB_GTSUPER_GFXTEXT(g,t,l,s,c,h,w) (HB_GTSUPERTABLE(g))->GfxText(g,t,l,s,c,h,w)
#define HB_GTSUPER_WHOCARES(g,p) (HB_GTSUPERTABLE(g))->WhoCares(g,p)
extern HB_EXPORT void hb_gtSetDefault( const char * szGtName );
extern HB_EXPORT BOOL hb_gtRegister( const HB_GT_INIT * gtInit );
extern HB_EXPORT PHB_GT hb_gtLoad( const char * szGtName, PHB_GT pGT, PHB_GT_FUNCS pSuperTable );
/* low level GT functions common to different GTs supported by RTL */
extern int hb_gt_chrmapinit( int *piTransTbl, const char *pszTerm, BOOL fSetACSC );
extern BOOL hb_gt_setClipboard( const char * szClipData, ULONG ulLen );
extern BOOL hb_gt_getClipboard( char ** pszClipData, ULONG *pulLen );
#if defined( HB_OS_WIN )
extern BOOL hb_gt_winapi_setClipboard( UINT uFormat, const char * szClipData, ULONG ulLen );
extern BOOL hb_gt_winapi_getClipboard( UINT uFormat, char ** pszClipData, ULONG *pulLen );
extern int hb_gt_winapi_getKbdState( void );
extern void hb_gt_winapi_setKbdState( int kbdShifts );
extern void hb_gt_winapi_tone( double dFrequency, double dDuration );
#endif /* HB_OS_WIN */
#if defined( HB_OS_DOS ) || defined( HB_OS_WIN ) || defined( HB_OS_OS2 )
extern int hb_gt_dos_keyCodeTranslate( int iKey );
#endif /* HB_OS_DOS || HB_OS_WIN || HB_OS_OS2 */
HB_EXTERN_END
#endif /* HB_GTCORE_H_ */