From 7d952c4d8e274acdd21063a52ba0df242f16f966 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 8 Jun 2008 13:30:28 +0000 Subject: [PATCH] 2008-06-08 15:18 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * include/hbgtinfo.ch + Added comment to compatibility #defines, to not use them, since they deprecated. [TOMERGE RC1] * HB_GTI_CB_* -> HB_GTE_* (stands for GT Event). Removed plain GTI_ versions, GTI_* range is frozen, pls don't and new codes to them and especially don't use them in core code. * include/hbgfx.ch * include/hbgfxdef.ch * contrib/gtwvg/gtwvg.c * source/rtl/gtxwc/gtxwc.c * source/rtl/gtwvt/gtwvt.c * GFX_* constants renamed to HB_GFX_*. The old ones are still working but it's recommended to update to use HB_GFX_*. #define HB_GT_NO_XHB to disable the compatibility #defines, if it collides with your code or you want to test after transition. ; [TOMERGE RC1] * source/rtl/dirdrive.c ! Guarded C53 undoc functions with HB_C52_UNDOC, which is enabled so it won't make a difference in default builds. ; [TOMERGE RC1] * source/rtl/filesys.c ! Fixed hb_fsIsDrv() to use GetDriveTypeA() API, to avoid some win32 system MessageBox() to be shown when certain types of drives (f.e. USB reader devices) are queried. ; Please test. ; TOFIX: hb_fsChDrv() suffers from the same problem. ; [TOMERGE RC1 - after testing] * contrib/hbcurl/hbcurl.c * contrib/rddads/adsfunc.c * contrib/rddads/ads1.c % Optimized out explicit function name strings in RTE calls. ! The above is actually a fix (I hope) for the one in hb_adsCheckLock(). Error text also made more consistent. ; [TOMERGE RC1 - after testing] * contrib/hbw32/w32_prn.c % Minor optimizations, cleanups. --- harbour/ChangeLog | 46 ++++++++++++++ harbour/contrib/gtwvg/gtwvg.c | 24 +++---- harbour/contrib/hbcurl/hbcurl.c | 38 +++++------ harbour/contrib/hbw32/w32_prn.c | 37 +++-------- harbour/contrib/rddads/ads1.c | 20 ++---- harbour/contrib/rddads/adsfunc.c | 106 +++++++++++++++---------------- harbour/include/hbgfx.ch | 49 ++++++-------- harbour/include/hbgfxdef.ch | 91 ++++++++++++++++---------- harbour/include/hbgtinfo.ch | 35 ++++------ harbour/source/rtl/dirdrive.c | 3 + harbour/source/rtl/filesys.c | 16 ++++- harbour/source/rtl/gtwvt/gtwvt.c | 52 +++++++-------- harbour/source/rtl/gtxwc/gtxwc.c | 40 ++++++------ harbour/source/rtl/hbgtcore.c | 16 ++--- 14 files changed, 307 insertions(+), 266 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f3c021476b..c400d513a2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,52 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-06-08 15:18 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * include/hbgtinfo.ch + + Added comment to compatibility #defines, to not use + them, since they deprecated. + [TOMERGE RC1] + * HB_GTI_CB_* -> HB_GTE_* (stands for GT Event). Removed + plain GTI_ versions, GTI_* range is frozen, pls don't + and new codes to them and especially don't use them in + core code. + + * include/hbgfx.ch + * include/hbgfxdef.ch + * contrib/gtwvg/gtwvg.c + * source/rtl/gtxwc/gtxwc.c + * source/rtl/gtwvt/gtwvt.c + * GFX_* constants renamed to HB_GFX_*. The old ones are + still working but it's recommended to update to use HB_GFX_*. + #define HB_GT_NO_XHB to disable the compatibility #defines, + if it collides with your code or you want to test after + transition. + ; [TOMERGE RC1] + + * source/rtl/dirdrive.c + ! Guarded C53 undoc functions with HB_C52_UNDOC, which is enabled + so it won't make a difference in default builds. + ; [TOMERGE RC1] + + * source/rtl/filesys.c + ! Fixed hb_fsIsDrv() to use GetDriveTypeA() API, to avoid some + win32 system MessageBox() to be shown when certain types of + drives (f.e. USB reader devices) are queried. + ; Please test. + ; TOFIX: hb_fsChDrv() suffers from the same problem. + ; [TOMERGE RC1 - after testing] + + * contrib/hbcurl/hbcurl.c + * contrib/rddads/adsfunc.c + * contrib/rddads/ads1.c + % Optimized out explicit function name strings in RTE calls. + ! The above is actually a fix (I hope) for the one in + hb_adsCheckLock(). Error text also made more consistent. + ; [TOMERGE RC1 - after testing] + + * contrib/hbw32/w32_prn.c + % Minor optimizations, cleanups. + 2008-06-08 12:42 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * source/rtl/gtwvt/gtwvt.c + Appending CRLF to each marked row before copying to diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index d87d0453b8..97f482f04b 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -2529,16 +2529,16 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, { switch( iType ) { - case GFX_ACQUIRESCREEN: - case GFX_RELEASESCREEN: + case HB_GFX_ACQUIRESCREEN: + case HB_GFX_RELEASESCREEN: iRet = 1; break; - case GFX_MAKECOLOR: + case HB_GFX_MAKECOLOR: iRet = (iTop << 16) | (iLeft << 8) | ( iBottom ); break; - case GFX_PUTPIXEL: + case HB_GFX_PUTPIXEL: SetGFXContext( iBottom ); MoveToEx( hdc, iLeft, iTop, NULL ); @@ -2548,7 +2548,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_LINE: + case HB_GFX_LINE: SetGFXContext( iColor ); MoveToEx( hdc, iLeft, iTop, NULL ); @@ -2558,7 +2558,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_RECT: + case HB_GFX_RECT: { RECT r; @@ -2575,7 +2575,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; } - case GFX_FILLEDRECT: + case HB_GFX_FILLEDRECT: SetGFXContext( iColor ); Rectangle( hdc, iLeft, iTop, iRight, iBottom ); @@ -2584,7 +2584,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_CIRCLE: + case HB_GFX_CIRCLE: SetGFXContext( iRight ); Arc( hdc, iLeft - iBottom / 2, iTop - iBottom / 2, iLeft + iBottom / 2, iTop + iBottom / 2, 0, 0, 0, 0 ); @@ -2593,7 +2593,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_FILLEDCIRCLE: + case HB_GFX_FILLEDCIRCLE: SetGFXContext( iRight ); Ellipse( hdc, iLeft - iBottom / 2, iTop - iBottom / 2, iLeft + iBottom / 2, iTop + iBottom / 2 ); @@ -2602,7 +2602,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_ELLIPSE: + case HB_GFX_ELLIPSE: SetGFXContext( iColor ); Arc( hdc, iLeft - iRight / 2, iTop - iBottom / 2, iLeft + iRight / 2, iTop + iBottom / 2, 0, 0, 0, 0 ); @@ -2611,7 +2611,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_FILLEDELLIPSE: + case HB_GFX_FILLEDELLIPSE: SetGFXContext( iColor ); Ellipse( hdc, iLeft - iRight / 2, iTop - iBottom / 2, iLeft + iRight / 2, iTop + iBottom / 2 ); @@ -2620,7 +2620,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_FLOODFILL: + case HB_GFX_FLOODFILL: SetGFXContext( iBottom ); FloodFill( hdc, iLeft, iTop, iColor ); diff --git a/harbour/contrib/hbcurl/hbcurl.c b/harbour/contrib/hbcurl/hbcurl.c index 01206a2f36..a70bd1178a 100644 --- a/harbour/contrib/hbcurl/hbcurl.c +++ b/harbour/contrib/hbcurl/hbcurl.c @@ -469,7 +469,7 @@ static void PHB_CURL_ret( PHB_CURL from ) hb_retptrGC( ph ); } -static void ** PHB_CURL_is( int iParam ) +static void * PHB_CURL_is( int iParam ) { return hb_parptrGC( PHB_CURL_release, iParam ); } @@ -494,7 +494,7 @@ HB_FUNC( CURL_EASY_DUPLICATE ) if( PHB_CURL_is( 1 ) ) PHB_CURL_ret( PHB_CURL_par( 1 ) ); else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_DUPLICATE", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } HB_FUNC( CURL_EASY_CLEANUP ) @@ -513,7 +513,7 @@ HB_FUNC( CURL_EASY_CLEANUP ) } } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_CLEANUP", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #if LIBCURL_VERSION_NUM >= 0x071201 @@ -528,7 +528,7 @@ HB_FUNC( CURL_EASY_RESET ) PHB_CURL_free( hb_curl, FALSE ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_RESET", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #endif @@ -544,7 +544,7 @@ HB_FUNC( CURL_EASY_PAUSE ) hb_retnl( hb_curl ? ( long ) curl_easy_pause( hb_curl->curl, hb_parni( 2 ) ) : HB_CURLE_ERROR ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_PAUSE", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #endif @@ -558,7 +558,7 @@ HB_FUNC( CURL_EASY_PERFORM ) hb_retnl( hb_curl ? ( long ) curl_easy_perform( hb_curl->curl ) : HB_CURLE_ERROR ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_PERFORM", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #if LIBCURL_VERSION_NUM >= 0x071802 @@ -583,7 +583,7 @@ HB_FUNC( CURL_EASY_SEND ) hb_retnl( ( long ) res ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_SEND", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } /* NOTE: curl_easy_recv( curl, @cBuffer ) -> nResult */ @@ -613,7 +613,7 @@ HB_FUNC( CURL_EASY_RECV ) hb_retnl( ( long ) res ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_RECV", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #endif @@ -1314,7 +1314,7 @@ HB_FUNC( CURL_EASY_SETOPT ) hb_retnl( ( long ) res ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_SETOPT", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } /* Harbour extension. */ @@ -1330,7 +1330,7 @@ HB_FUNC( CURL_EASY_DL_BUFF_GET ) hb_retc_null(); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_DL_BUFF_GET", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #define HB_CURL_INFO_TYPE_INVALID 0 @@ -1553,7 +1553,7 @@ HB_FUNC( CURL_EASY_GETINFO ) hb_stornl( ( long ) res, 3 ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_GETINFO", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #if LIBCURL_VERSION_NUM >= 0x071504 @@ -1574,7 +1574,7 @@ HB_FUNC( CURL_EASY_ESCAPE ) hb_retc_null(); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_ESCAPE", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } HB_FUNC( CURL_EASY_UNESCAPE ) @@ -1594,7 +1594,7 @@ HB_FUNC( CURL_EASY_UNESCAPE ) hb_retc_null(); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_UNESCAPE", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #endif @@ -1614,7 +1614,7 @@ HB_FUNC( CURL_ESCAPE ) curl_free( buffer ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_ESCAPE", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } /* NOTE: Obsolete, superceded by curl_easy_unescape() */ @@ -1627,7 +1627,7 @@ HB_FUNC( CURL_UNESCAPE ) curl_free( buffer ); } else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_UNESCAPE", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #endif @@ -1686,7 +1686,7 @@ HB_FUNC( CURL_EASY_STRERROR ) if( ISNUM( 1 ) ) hb_retc( curl_easy_strerror( ( CURLcode ) hb_parnl( 1 ) ) ); else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_EASY_STRERROR", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } HB_FUNC( CURL_SHARE_STRERROR ) @@ -1694,7 +1694,7 @@ HB_FUNC( CURL_SHARE_STRERROR ) if( ISNUM( 1 ) ) hb_retc( curl_share_strerror( ( CURLSHcode ) hb_parnl( 1 ) ) ); else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_SHARE_STRERROR", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } HB_FUNC( CURL_MULTI_STRERROR ) @@ -1702,7 +1702,7 @@ HB_FUNC( CURL_MULTI_STRERROR ) if( ISNUM( 1 ) ) hb_retc( curl_multi_strerror( ( CURLMcode ) hb_parnl( 1 ) ) ); else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_MULTI_STRERROR", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } #endif @@ -1713,5 +1713,5 @@ HB_FUNC( CURL_GETDATE ) if( ISCHAR( 1 ) ) hb_retnint( ( HB_LONG ) curl_getdate( hb_parc( 1 ), NULL ) ); else - hb_errRT_BASE( EG_ARG, 2010, NULL, "CURL_GETDATE", HB_ERR_ARGS_BASEPARAMS ); + hb_errRT_BASE( EG_ARG, 2010, NULL, &hb_errFuncName, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbw32/w32_prn.c b/harbour/contrib/hbw32/w32_prn.c index 969678b2a6..46aaf1b7e3 100644 --- a/harbour/contrib/hbw32/w32_prn.c +++ b/harbour/contrib/hbw32/w32_prn.c @@ -206,24 +206,16 @@ HB_FUNC( WIN32_DELETEDC ) HB_FUNC( WIN32_STARTPAGE ) { - BOOL Result = FALSE; HDC hDC = win32_HDC_par( 1 ); - if( hDC ) - Result = ( StartPage( hDC ) > 0 ); - - hb_retl( Result ); + hb_retl( hDC && StartPage( hDC ) > 0 ); } HB_FUNC( WIN32_ENDPAGE ) { - BOOL Result = FALSE; HDC hDC = win32_HDC_par( 1 ); - if( hDC ) - Result = ( EndPage( hDC ) > 0 ); - - hb_retl( Result ); + hb_retl( hDC && EndPage( hDC ) > 0 ); } HB_FUNC( WIN32_TEXTOUT ) @@ -334,24 +326,16 @@ HB_FUNC( WIN32_GETCHARSIZE ) HB_FUNC( WIN32_GETDEVICECAPS ) { - LONG Result = 0; HDC hDC = win32_HDC_par( 1 ); - if( hDC && ISNUM( 2 ) ) - Result = ( LONG ) GetDeviceCaps( hDC, hb_parnl( 2 ) ); - - hb_retnl( Result ); + hb_retnl( hDC && ISNUM( 2 ) ? ( long ) GetDeviceCaps( hDC, hb_parnl( 2 ) ) : 0 ); } HB_FUNC( WIN32_SETMAPMODE ) { - LONG Result = 0; HDC hDC = win32_HDC_par( 1 ); - if( hDC && ISNUM( 2 ) ) - Result = SetMapMode( hDC, hb_parnl( 2 ) ); - - hb_retnl( Result ); + hb_retnl( hDC && ISNUM( 2 ) ? SetMapMode( hDC, hb_parnl( 2 ) ) : 0 ); } HB_FUNC( WIN32_MULDIV ) @@ -406,9 +390,10 @@ HB_FUNC( WIN32_GETPRINTERFONTNAME ) if( hDC ) { - unsigned char cFont[128]; + unsigned char cFont[ 128 ]; + + GetTextFace( hDC, sizeof( cFont ) - 1, ( LPTSTR ) cFont ); - GetTextFace( hDC, 127, ( LPTSTR ) cFont ); hb_retc( ( char * ) cFont ); } else @@ -417,13 +402,9 @@ HB_FUNC( WIN32_GETPRINTERFONTNAME ) HB_FUNC( WIN32_BITMAPSOK ) { - BOOL Result = FALSE; HDC hDC = win32_HDC_par( 1 ); - if( hDC ) - Result = ( GetDeviceCaps( hDC, RASTERCAPS ) & RC_STRETCHDIB ); - - hb_retl( Result ); + hb_retl( hDC && ( GetDeviceCaps( hDC, RASTERCAPS ) & RC_STRETCHDIB ) ); } HB_FUNC( WIN32_SETDOCUMENTPROPERTIES ) @@ -654,8 +635,6 @@ HB_FUNC( WIN32_FILLRECT ) FillRect( hDC, &rct, hBrush ); DeleteObject( hBrush ); - - hb_ret(); } HB_FUNC( WIN32_LINETO ) diff --git a/harbour/contrib/rddads/ads1.c b/harbour/contrib/rddads/ads1.c index bc8d3fabd8..00c13a629e 100644 --- a/harbour/contrib/rddads/ads1.c +++ b/harbour/contrib/rddads/ads1.c @@ -398,7 +398,7 @@ static ERRCODE hb_adsCheckLock( ADSAREAP pArea ) u32RetVal = AdsIsRecordLocked( pArea->hTable, 0, &u16Locked ); if( u32RetVal != AE_SUCCESS ) { - hb_errRT_DBCMD( EG_UNLOCKED, u32RetVal, "Lock Required by TestRecLocks", "ADSISRECORDLOCKED" ); + hb_errRT_DBCMD( EG_UNLOCKED, u32RetVal, "Lock Required by ADSTESTRECLOCKS()", &hb_errFuncName ); return FAILURE; } if( !u16Locked ) @@ -5046,27 +5046,21 @@ ADSAREAP hb_adsGetWorkAreaPointer( void ) HB_FUNC( ADSGETRELKEYPOS ) { ADSAREAP pArea = hb_adsGetWorkAreaPointer(); + if( pArea ) - { hb_retnd( adsGetRelPos( pArea, pArea->hOrdCurrent ) ); - } else - { - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETRELKEYPOS" ); - } + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSSETRELKEYPOS ) { ADSAREAP pArea = hb_adsGetWorkAreaPointer(); + if( pArea ) - { adsSetRelPos( pArea, pArea->hOrdCurrent, hb_parnd( 1 ) ); - } else - { - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSSETRELKEYPOS" ); - } + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSCUSTOMIZEAOF ) @@ -5132,7 +5126,5 @@ HB_FUNC( ADSCUSTOMIZEAOF ) hb_retnl( u32RetVal ); } else - { - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCUSTOMIZEAOF" ); - } + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } diff --git a/harbour/contrib/rddads/adsfunc.c b/harbour/contrib/rddads/adsfunc.c index 91b1966c62..aa6767cca7 100644 --- a/harbour/contrib/rddads/adsfunc.c +++ b/harbour/contrib/rddads/adsfunc.c @@ -282,10 +282,10 @@ HB_FUNC( ADSISTABLELOCKED ) if( AdsIsTableLocked( pArea->hTable, &pbLocked ) == AE_SUCCESS ) hb_retl( pbLocked != 0 ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISTABLELOCKED" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISTABLELOCKED" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSISRECORDLOCKED ) @@ -305,10 +305,10 @@ HB_FUNC( ADSISRECORDLOCKED ) if( AdsIsRecordLocked( pArea->hTable, ulRec, &pbLocked ) == AE_SUCCESS ) hb_retl( pbLocked != 0 ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISRECORDLOCKED" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISRECORDLOCKED" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSLOCKING ) @@ -363,7 +363,7 @@ HB_FUNC( ADSGETTABLECHARTYPE ) hb_retni( usCharType ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETTABLECHARTYPE" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSSETDEFAULT ) @@ -431,10 +431,10 @@ HB_FUNC( ADSBLOB2FILE ) ( UNSIGNED8 * ) szFieldName, ( UNSIGNED8 * ) szFileName ) == AE_SUCCESS ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSBLOB2FILE" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSBLOB2FILE" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } HB_FUNC( ADSFILE2BLOB ) @@ -453,10 +453,10 @@ HB_FUNC( ADSFILE2BLOB ) ( UNSIGNED16 ) ( hb_pcount() > 2 ? hb_parni( 3 ) : ADS_BINARY ) /* usBinaryType */, ( UNSIGNED8 * ) szFileName ) == AE_SUCCESS ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSFILE2BLOB" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSFILE2BLOB" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } /* 2nd parameter: unsupported Bag Name. */ @@ -520,10 +520,10 @@ HB_FUNC( ADSKEYNO ) hb_retnl( pulKey ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSKEYNO" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSKEYNO" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } /* 2nd parameter: unsupported Bag Name. */ @@ -640,10 +640,10 @@ HB_FUNC( ADSKEYCOUNT ) hb_retnl( pulKey ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSKEYCOUNT" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSKEYCOUNT" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } HB_FUNC( ADSADDCUSTOMKEY ) @@ -674,10 +674,10 @@ HB_FUNC( ADSADDCUSTOMKEY ) else if( pArea->hOrdCurrent != 0 ) hb_retnl( ( long ) AdsAddCustomKey( pArea->hOrdCurrent ) ); else - hb_errRT_DBCMD( EG_NOORDER, 2001, NULL, "ADSADDCUSTOMKEY" ); + hb_errRT_DBCMD( EG_NOORDER, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSADDCUSTOMKEY" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSDELETECUSTOMKEY ) @@ -708,10 +708,10 @@ HB_FUNC( ADSDELETECUSTOMKEY ) else if( pArea->hOrdCurrent != 0 ) hb_retnl( ( long ) AdsDeleteCustomKey( pArea->hOrdCurrent ) ); else - hb_errRT_DBCMD( EG_NOORDER, 2001, NULL, "ADSDELETECUSTOMKEY" ); + hb_errRT_DBCMD( EG_NOORDER, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSDELETECUSTOMKEY" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSCLEARAOF ) @@ -721,7 +721,7 @@ HB_FUNC( ADSCLEARAOF ) if( pArea ) AdsClearAOF( pArea->hTable ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCLEARAOF" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSEVALAOF ) @@ -746,7 +746,7 @@ HB_FUNC( ADSEVALAOF ) hb_retni( pusOptLevel ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSEVALAOF" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSGETTABLEALIAS ) @@ -766,7 +766,7 @@ HB_FUNC( ADSGETTABLEALIAS ) hb_retc( NULL ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETTABLEALIAS" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSGETAOF ) @@ -804,7 +804,7 @@ HB_FUNC( ADSGETAOF ) hb_xfree( pucFilter2 ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETAOF" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSGETAOFOPTLEVEL ) @@ -821,7 +821,7 @@ HB_FUNC( ADSGETAOFOPTLEVEL ) NULL ) == AE_SUCCESS ? pusOptLevel : ADS_OPTIMIZED_NONE ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETAOFOPTLEVEL" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSGETAOFNOOPT ) @@ -854,7 +854,7 @@ HB_FUNC( ADSGETAOFNOOPT ) hb_retc( ulRetVal == AE_SUCCESS ? ( char * ) pucNonOpt : NULL ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSGETAOFNOOPT" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSISRECORDINAOF ) @@ -870,7 +870,7 @@ HB_FUNC( ADSISRECORDINAOF ) &bIsInAOF ) == AE_SUCCESS && bIsInAOF != 0 ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISRECORDINAOF" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } /* Does current record match any current filter? */ @@ -906,7 +906,7 @@ HB_FUNC( ADSREFRESHAOF ) if( pArea ) AdsRefreshAOF( pArea->hTable ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSREFRESHAOF" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSSETAOF ) @@ -929,10 +929,10 @@ HB_FUNC( ADSSETAOF ) hb_retl( ulRetVal == AE_SUCCESS ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSSETAOF" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSSETAOF" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } HB_FUNC( ADSGETFILTER ) @@ -989,10 +989,10 @@ HB_FUNC( ADSENABLEENCRYPTION ) hb_retnl( AdsEnableEncryption( pArea->hTable, ( UNSIGNED8 * ) pucPassword ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSENABLEENCRYPTION" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSENABLEENCRYPTION" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } HB_FUNC( ADSDISABLEENCRYPTION ) @@ -1002,7 +1002,7 @@ HB_FUNC( ADSDISABLEENCRYPTION ) if( pArea ) hb_retnl( AdsDisableEncryption( pArea->hTable ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSDISABLEENCRYPTION" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSENCRYPTTABLE ) @@ -1012,7 +1012,7 @@ HB_FUNC( ADSENCRYPTTABLE ) if( pArea ) hb_retnl( AdsEncryptTable( pArea->hTable ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSENCRYPTTABLE" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSDECRYPTTABLE ) @@ -1022,7 +1022,7 @@ HB_FUNC( ADSDECRYPTTABLE ) if( pArea ) hb_retnl( AdsDecryptTable( pArea->hTable ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSDECRYPTTABLE" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSENCRYPTRECORD ) @@ -1032,7 +1032,7 @@ HB_FUNC( ADSENCRYPTRECORD ) if( pArea ) hb_retnl( AdsEncryptRecord( pArea->hTable ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSENCRYPTRECORD" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSDECRYPTRECORD ) @@ -1042,7 +1042,7 @@ HB_FUNC( ADSDECRYPTRECORD ) if( pArea ) hb_retnl( AdsDecryptRecord( pArea->hTable ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSDECRYPTRECORD" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSISENCRYPTIONENABLED ) @@ -1056,7 +1056,7 @@ HB_FUNC( ADSISENCRYPTIONENABLED ) hb_retl( usIsEnabled != 0 ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISENCRYPTIONENABLED" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSISRECORDENCRYPTED ) @@ -1070,7 +1070,7 @@ HB_FUNC( ADSISRECORDENCRYPTED ) hb_retl( usIsEnabled != 0 ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISRECORDENCRYPTED" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSISTABLEENCRYPTED ) @@ -1084,7 +1084,7 @@ HB_FUNC( ADSISTABLEENCRYPTED ) hb_retl( usIsEnabled != 0 ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISTABLEENCRYPTED" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSCONNECT ) @@ -1338,7 +1338,7 @@ HB_FUNC( ADSVERIFYSQL ) hb_adsOemAnsiFree( pucStmt ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSVERIFYSQL" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } #endif /* ADS_LIB_VERSION >= 620 */ @@ -1360,7 +1360,7 @@ HB_FUNC( ADSREFRESHRECORD ) if( pArea ) AdsRefreshRecord( pArea->hTable ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSREFRESHRECORD" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } /* lSuccess := AdsCopyTable( cTargetFile [, nAdsFilterOption ] ) */ @@ -1375,10 +1375,10 @@ HB_FUNC( ADSCOPYTABLE ) ( UNSIGNED16 ) ( ISNUM( 2 ) ? hb_parni( 2 ) : ADS_RESPECTFILTERS ) /* usFilterOption */, ( UNSIGNED8 * ) hb_parcx( 1 ) /* pucFile */ ) == AE_SUCCESS ); else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSCOPYTABLE" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCOPYTABLE" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSCONVERTTABLE ) @@ -1395,10 +1395,10 @@ HB_FUNC( ADSCONVERTTABLE ) ( UNSIGNED16 ) ( ISNUM( 2 ) ? hb_parni( 2 ) : ADS_ADT ) /* usTableType */ ) == AE_SUCCESS ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSCONVERTTABLE" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCONVERTTABLE" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } #if !defined( ADS_LINUX ) @@ -1586,7 +1586,7 @@ HB_FUNC( ADSCACHERECORDS ) ( UNSIGNED16 ) hb_parni( 1 ) ) == AE_SUCCESS ) hb_retl( TRUE ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCACHERECORDS" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } /* @@ -1659,10 +1659,10 @@ HB_FUNC( ADSISEMPTY ) &pbEmpty ) == AE_SUCCESS ) hb_retl( pbEmpty != 0 ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSISEMPTY" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSISEMPTY" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } /* Please add all-version functions above this block */ @@ -1968,7 +1968,7 @@ HB_FUNC( ADSDDGETUSERPROPERTY ) hb_retl( ulRetVal == AE_SUCCESS ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSDDGETUSERPROPERTY" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } @@ -2050,13 +2050,13 @@ HB_FUNC( ADSCOPYTABLECONTENTS ) pDest->hTable, ADS_IGNOREFILTERS ) == AE_SUCCESS ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCOPYTABLECONTENTS" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCOPYTABLECONTENTS" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCOPYTABLECONTENTS" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } HB_FUNC( ADSDIRECTORY ) @@ -2133,10 +2133,10 @@ HB_FUNC( ADSSTMTSETTABLEPASSWORD ) ( UNSIGNED8 * ) pucTableName, ( UNSIGNED8 * ) pucPassword ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSSTMTSETTABLEPASSWORD" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } else - hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSSTMTSETTABLEPASSWORD" ); + hb_errRT_DBCMD( EG_ARG, 1014, NULL, &hb_errFuncName ); } HB_FUNC( ADSGETSERVERNAME ) @@ -2193,7 +2193,7 @@ HB_FUNC( ADSCREATEFTSINDEX ) ( UNSIGNED8 * ) hb_parc( 16 ) /* pucReserved2 */ , ( UNSIGNED32 ) ISNUM( 17 ) ? hb_parnl( 17 ) : ADS_DEFAULT /* ulOptions */ ) ); else - hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSCREATEFTSINDEX" ); + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, &hb_errFuncName ); } #endif /* ADS_LIB_VERSION >= 700 */ diff --git a/harbour/include/hbgfx.ch b/harbour/include/hbgfx.ch index 0e4e967d37..18750edf25 100644 --- a/harbour/include/hbgfx.ch +++ b/harbour/include/hbgfx.ch @@ -51,11 +51,7 @@ * */ -/* - * WARNING: this file is also included in C code, so don't add xHarbour specific stuff, - * or protect it under #ifdef __XHARBOUR__ - * - */ +/* NOTE: This file is also used by C code. */ #ifndef _HBGFX_CH_ #define _HBGFX_CH_ @@ -65,31 +61,28 @@ /* * NOTE: ACQUIRE / RELEASE screen pair must work same way DispBegin()/DispEnd() pair does * (that is, with an internal counter), as lots of function may want to 'acquire/release' it. - * * However, a GT must properly manage its gfx output if the user didn't requested to acquire the * screen, so this is under user choice. * (the user just needs to know that it is not the same to aquire the screen, draw 100 lines, then - * release screen, than simply drawing 100 lines -as the GT will be acquiring/releasing the screen - * 100 times, which will slow down things a lot-) - * - * Mauricio - * + * release screen, than simply drawing 100 lines -as the GT will be acquiring/releasing the screen + * 100 times, which will slow down things a lot-) [Mauricio] */ -#xtranslate HB_GFXACQUIRESCREEN() => hb_gfxPrimitive(GFX_ACQUIRESCREEN) -#xtranslate HB_GFXRELEASESCREEN() => hb_gfxPrimitive(GFX_RELEASESCREEN) -#xtranslate HB_GFXMAKECOLOR(, , [, ]) => hb_gfxPrimitive(GFX_MAKECOLOR, , , [, ]) -#xtranslate HB_GFXGETCLIP(, , , ) => := hb_gfxPrimitive(GFX_CLIPTOP); := hb_gfxPrimitive(GFX_CLIPLEFT); := hb_gfxPrimitive(GFX_CLIPBOTTOM); := hb_gfxPrimitive(GFX_CLIPRIGHT) -#xtranslate HB_GFXSETCLIP(, , , ) => hb_gfxPrimitive(GFX_SETCLIP, , , , ) -#xtranslate HB_GFXDRAWINGMODE([]) => hb_gfxPrimitive(GFX_DRAWINGMODE[, ]) -#xtranslate HB_GFXGETPIXEL(, ) => hb_gfxPrimitive(GFX_GETPIXEL, , ) -#xtranslate HB_GFXPUTPIXEL(, , ) => hb_gfxPrimitive(GFX_PUTPIXEL, , , ) -#xtranslate HB_GFXLINE(, , , , ) => hb_gfxPrimitive(GFX_LINE, , , , , ) -#xtranslate HB_GFXRECT(, , , , ) => hb_gfxPrimitive(GFX_RECT, , , , , ) -#xtranslate HB_GFXFILLEDRECT(, , , , ) => hb_gfxPrimitive(GFX_FILLEDRECT, , , , , ) -#xtranslate HB_GFXCIRCLE(, , , ) => hb_gfxPrimitive(GFX_CIRCLE, , , , ) -#xtranslate HB_GFXFILLEDCIRCLE(, , , ) => hb_gfxPrimitive(GFX_FILLEDCIRCLE, , , , ) -#xtranslate HB_GFXELLIPSE(, , , , ) => hb_gfxPrimitive(GFX_ELLIPSE, , , , , ) -#xtranslate HB_GFXFILLEDELLIPSE(, , , , ) => hb_gfxPrimitive(GFX_FILLEDELLIPSE, , , , , ) -#xtranslate HB_GFXFLOODFILL(, , ) => hb_gfxPrimitive(GFX_FLOODFILL, , , ) -#endif /* _HBGFX_CH_ */ +#xtranslate hb_gfxAcquireScreen() => hb_gfxPrimitive( HB_GFX_ACQUIRESCREEN ) +#xtranslate hb_gfxReleaseScreen() => hb_gfxPrimitive( HB_GFX_RELEASESCREEN ) +#xtranslate hb_gfxMakeColor( , , [, ] ) => hb_gfxPrimitive( HB_GFX_MAKECOLOR, , , [, ] ) +#xtranslate hb_gfxGetClip( , , , ) => := hb_gfxPrimitive( HB_GFX_CLIPTOP ); := hb_gfxPrimitive( HB_GFX_CLIPLEFT ); := hb_gfxPrimitive( HB_GFX_CLIPBOTTOM ); := hb_gfxPrimitive( HB_GFX_CLIPRIGHT ) +#xtranslate hb_gfxSetClip( , , , ) => hb_gfxPrimitive( HB_GFX_SETCLIP, , , , ) +#xtranslate hb_gfxDrawingMode( [] ) => hb_gfxPrimitive( HB_GFX_DRAWINGMODE[, ] ) +#xtranslate hb_gfxGetPixel( , ) => hb_gfxPrimitive( HB_GFX_GETPIXEL, , ) +#xtranslate hb_gfxPutPixel( , , ) => hb_gfxPrimitive( HB_GFX_PUTPIXEL, , , ) +#xtranslate hb_gfxLine( , , , , ) => hb_gfxPrimitive( HB_GFX_LINE, , , , , ) +#xtranslate hb_gfxRect( , , , , ) => hb_gfxPrimitive( HB_GFX_RECT, , , , , ) +#xtranslate hb_gfxFilledRect( , , , , ) => hb_gfxPrimitive( HB_GFX_FILLEDRECT, , , , , ) +#xtranslate hb_gfxCircle( , , , ) => hb_gfxPrimitive( HB_GFX_CIRCLE, , , , ) +#xtranslate hb_gfxFilledCircle( , , , ) => hb_gfxPrimitive( HB_GFX_FILLEDCIRCLE, , , , ) +#xtranslate hb_gfxEllipse( , , , , ) => hb_gfxPrimitive( HB_GFX_ELLIPSE, , , , , ) +#xtranslate hb_gfxFilledEllipse( , , , , ) => hb_gfxPrimitive( HB_GFX_FILLEDELLIPSE, , , , , ) +#xtranslate hb_gfxFloodFill( , , ) => hb_gfxPrimitive( HB_GFX_FLOODFILL, , , ) + +#endif /* _HBHB_GFX_CH_ */ diff --git a/harbour/include/hbgfxdef.ch b/harbour/include/hbgfxdef.ch index 6198fa1764..99233fa377 100644 --- a/harbour/include/hbgfxdef.ch +++ b/harbour/include/hbgfxdef.ch @@ -4,7 +4,7 @@ /* * xHarbour Project source code: - * GT Graphics definitions (GFX_*) + * GT Graphics definitions (HB_GFX_*) * * Copyright 2004 Mauricio Abre * www - http://www.xharbour.org @@ -51,11 +51,7 @@ * */ -/* - * WARNING: this file is also included in C code, so don't add xHarbour specific stuff, - * or protect it under #ifdef __XHARBOUR__ - * - */ +/* NOTE: This file is also used by C code. */ #ifndef _HBGFXDEF_CH_ #define _HBGFXDEF_CH_ @@ -63,45 +59,72 @@ /* * NOTE: ACQUIRE / RELEASE screen pair must work same way DispBegin()/DispEnd() pair does * (that is, with an internal counter), as lots of function may want to 'acquire/release' it. - * * However, a GT must properly manage its gfx output if the user didn't requested to acquire the * screen, so this is under user choice. * (the user just needs to know that it is not the same to aquire the screen, draw 100 lines, then - * release screen, than simply drawing 100 lines -as the GT will be acquiring/releasing the screen - * 100 times, which will slow down things a lot-) - * - * Mauricio - * + * release screen, than simply drawing 100 lines -as the GT will be acquiring/releasing the screen + * 100 times, which will slow down things a lot-) [Mauricio] */ /* Misc, internals */ -#define GFX_ACQUIRESCREEN 1 /* Some GTs may require that you 'acquire' the screen before doing gfx things */ -#define GFX_RELEASESCREEN 2 /* Release a previously 'acquired' screen */ -#define GFX_MAKECOLOR 3 /* Calculate gfx color number based on RGBA values */ +#define HB_GFX_ACQUIRESCREEN 1 /* Some GTs may require that you 'acquire' the screen before doing gfx things */ +#define HB_GFX_RELEASESCREEN 2 /* Release a previously 'acquired' screen */ +#define HB_GFX_MAKECOLOR 3 /* Calculate gfx color number based on RGBA values */ /* Functions that affect drawing area */ -#define GFX_CLIPTOP 10 -#define GFX_CLIPLEFT 11 -#define GFX_CLIPBOTTOM 12 -#define GFX_CLIPRIGHT 13 -#define GFX_SETCLIP 14 /* NOTE: set to 0, 0, 0, 0 to disable ;) */ +#define HB_GFX_CLIPTOP 10 +#define HB_GFX_CLIPLEFT 11 +#define HB_GFX_CLIPBOTTOM 12 +#define HB_GFX_CLIPRIGHT 13 +#define HB_GFX_SETCLIP 14 /* NOTE: set to 0, 0, 0, 0 to disable ;) */ /* Functions that affect drawing mode */ -#define GFX_DRAWINGMODE 20 +#define HB_GFX_DRAWINGMODE 20 /* Drawing primitives */ -#define GFX_GETPIXEL 50 -#define GFX_PUTPIXEL 51 -#define GFX_LINE 52 -#define GFX_RECT 53 -#define GFX_FILLEDRECT 54 -#define GFX_CIRCLE 55 -#define GFX_FILLEDCIRCLE 56 -#define GFX_ELLIPSE 57 -#define GFX_FILLEDELLIPSE 58 -#define GFX_FLOODFILL 59 +#define HB_GFX_GETPIXEL 50 +#define HB_GFX_PUTPIXEL 51 +#define HB_GFX_LINE 52 +#define HB_GFX_RECT 53 +#define HB_GFX_FILLEDRECT 54 +#define HB_GFX_CIRCLE 55 +#define HB_GFX_FILLEDCIRCLE 56 +#define HB_GFX_ELLIPSE 57 +#define HB_GFX_FILLEDELLIPSE 58 +#define HB_GFX_FLOODFILL 59 /* Drawing mode constants */ -#define GFX_MODE_SOLID 1 /* Solid mode, no translucency, no patterned primitives */ -#define GFX_MODE_XOR 2 /* XOR with current screen contents */ -#define GFX_MODE_ALPHA 3 /* Use alpha for transluced effect (SLOW) */ +#define HB_GFX_MODE_SOLID 1 /* Solid mode, no translucency, no patterned primitives */ +#define HB_GFX_MODE_XOR 2 /* XOR with current screen contents */ +#define HB_GFX_MODE_ALPHA 3 /* Use alpha for transluced effect (SLOW) */ /* TODO: add patterned mode drawings */ +/* Compatibility #defines. + These codes are deprecated, _don't use them_. Please upgrade to the above versions. + For developers: Don't add any more new codes to this section. */ + +#ifndef HB_GT_NO_XHB + +#define GFX_ACQUIRESCREEN HB_GFX_ACQUIRESCREEN +#define GFX_RELEASESCREEN HB_GFX_RELEASESCREEN +#define GFX_MAKECOLOR HB_GFX_MAKECOLOR +#define GFX_CLIPTOP HB_GFX_CLIPTOP +#define GFX_CLIPLEFT HB_GFX_CLIPLEFT +#define GFX_CLIPBOTTOM HB_GFX_CLIPBOTTOM +#define GFX_CLIPRIGHT HB_GFX_CLIPRIGHT +#define GFX_SETCLIP HB_GFX_SETCLIP +#define GFX_DRAWINGMODE HB_GFX_DRAWINGMODE +#define GFX_GETPIXEL HB_GFX_GETPIXEL +#define GFX_PUTPIXEL HB_GFX_PUTPIXEL +#define GFX_LINE HB_GFX_LINE +#define GFX_RECT HB_GFX_RECT +#define GFX_FILLEDRECT HB_GFX_FILLEDRECT +#define GFX_CIRCLE HB_GFX_CIRCLE +#define GFX_FILLEDCIRCLE HB_GFX_FILLEDCIRCLE +#define GFX_ELLIPSE HB_GFX_ELLIPSE +#define GFX_FILLEDELLIPSE HB_GFX_FILLEDELLIPSE +#define GFX_FLOODFILL HB_GFX_FLOODFILL +#define GFX_MODE_SOLID HB_GFX_MODE_SOLID +#define GFX_MODE_XOR HB_GFX_MODE_XOR +#define GFX_MODE_ALPHA HB_GFX_MODE_ALPHA + +#endif + #endif /* _HBGFXDEF_CH_ */ diff --git a/harbour/include/hbgtinfo.ch b/harbour/include/hbgtinfo.ch index b606f710ec..b5d8d0796c 100644 --- a/harbour/include/hbgtinfo.ch +++ b/harbour/include/hbgtinfo.ch @@ -151,18 +151,20 @@ #define HB_GTI_KBD_ACCENT3 16384 #define HB_GTI_KBD_ACCENT4 32768 -/* Callback constants - list has a room for future extensions */ -#define HB_GTI_CB_INKEY 1 -#define HB_GTI_CB_TIMER 2 -#define HB_GTI_CB_ACTIVATE 3 -#define HB_GTI_CB_SETFOCUS 4 -#define HB_GTI_CB_KILLFOCUS 5 -#define HB_GTI_CB_MOUSE 6 -#define HB_GTI_CB_CLOSE 7 -#define HB_GTI_CB_COMMAND 8 -#define HB_GTI_CB_SIZE 9 +/* Harbour GT callback events - WORK IN PROGRESS */ +#define HB_GTE_INKEY 1 +#define HB_GTE_TIMER 2 +#define HB_GTE_ACTIVATE 3 +#define HB_GTE_SETFOCUS 4 +#define HB_GTE_KILLFOCUS 5 +#define HB_GTE_MOUSE 6 +#define HB_GTE_CLOSE 7 +#define HB_GTE_COMMAND 8 +#define HB_GTE_SIZE 9 -/* Compatibility #defines */ +/* Compatibility #defines. + These codes are deprecated, _don't use them_. Please upgrade to the above versions. + For developers: Don't add any more new codes to this section. */ #ifndef HB_GT_NO_XHB @@ -245,17 +247,6 @@ #define GTI_KBD_ACCENT3 HB_GTI_KBD_ACCENT3 #define GTI_KBD_ACCENT4 HB_GTI_KBD_ACCENT4 -/* Callback constants - list has a room for future extensions */ -#define GTI_CB_INKEY HB_GTI_CB_INKEY -#define GTI_CB_TIMER HB_GTI_CB_TIMER -#define GTI_CB_ACTIVATE HB_GTI_CB_ACTIVATE -#define GTI_CB_SETFOCUS HB_GTI_CB_SETFOCUS -#define GTI_CB_KILLFOCUS HB_GTI_CB_KILLFOCUS -#define GTI_CB_MOUSE HB_GTI_CB_MOUSE -#define GTI_CB_CLOSE HB_GTI_CB_CLOSE -#define GTI_CB_COMMAND HB_GTI_CB_COMMAND -#define GTI_CB_SIZE HB_GTI_CB_SIZE - #endif #endif /* HB_GTINFO_CH_ */ diff --git a/harbour/source/rtl/dirdrive.c b/harbour/source/rtl/dirdrive.c index ba42224c95..d807de0c18 100644 --- a/harbour/source/rtl/dirdrive.c +++ b/harbour/source/rtl/dirdrive.c @@ -88,6 +88,8 @@ HB_FUNC( DIRREMOVE ) /* NOTE: Clipper 5.3 undocumented */ +#ifdef HB_C52_UNDOC + HB_FUNC( ISDISK ) { hb_retl( ( ISCHAR( 1 ) && hb_parclen( 1 ) > 0 ) ? @@ -112,3 +114,4 @@ HB_FUNC( DISKNAME ) #endif +#endif diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index d7edd61660..f6da5e8db5 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -2029,7 +2029,21 @@ HB_EXPORT USHORT hb_fsIsDrv( BYTE nDrive ) HB_TRACE(HB_TR_DEBUG, ("hb_fsIsDrv(%d)", (int) nDrive)); -#if defined(OS_HAS_DRIVE_LETTER) +#if defined(HB_OS_WIN_32) + { + char buffer[ 4 ]; + UINT type; + + buffer[ 0 ] = nDrive + 'A'; + buffer[ 1 ] = ':'; + buffer[ 2 ] = '\\'; + buffer[ 3 ] = '\0'; + + type = GetDriveTypeA( ( LPCSTR ) buffer ); + uiResult = ( type == DRIVE_UNKNOWN || type == DRIVE_NO_ROOT_DIR ) ? FS_ERROR : 0; + hb_fsSetError( 0 ); + } +#elif defined(OS_HAS_DRIVE_LETTER) { /* 'unsigned int' _have to_ be used in Watcom */ diff --git a/harbour/source/rtl/gtwvt/gtwvt.c b/harbour/source/rtl/gtwvt/gtwvt.c index 5c44a6a71e..ab23243277 100644 --- a/harbour/source/rtl/gtwvt/gtwvt.c +++ b/harbour/source/rtl/gtwvt/gtwvt.c @@ -232,7 +232,7 @@ static void hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int message, WPARAM wParam, LPA { switch( message ) { - case GTI_CB_CLOSE: + case HB_GTE_CLOSE: { if( pWVT->pGT->pDynSymCLOSE ) { @@ -265,7 +265,7 @@ static void hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int message, WPARAM wParam, LPA break; } - case GTI_CB_INKEY: + case HB_GTE_INKEY: { if( pWVT->pGT->pDynSymINKEY ) { @@ -299,7 +299,7 @@ static void hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int message, WPARAM wParam, LPA break; } - case GTI_CB_SIZE: + case HB_GTE_SIZE: { if( pWVT->pGT->pDynSymSIZE ) { @@ -334,7 +334,7 @@ static void hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int message, WPARAM wParam, LPA break; } - case GTI_CB_SETFOCUS: + case HB_GTE_SETFOCUS: { if( pWVT->pGT->pDynSymSETFOCUS ) { @@ -367,7 +367,7 @@ static void hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int message, WPARAM wParam, LPA break; } - case GTI_CB_KILLFOCUS: + case HB_GTE_KILLFOCUS: { if( pWVT->pGT->pDynSymKILLFOCUS ) { @@ -400,7 +400,7 @@ static void hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int message, WPARAM wParam, LPA break; } - case GTI_CB_COMMAND: + case HB_GTE_COMMAND: { if( pWVT->pGT->pDynSymCOMMAND ) { @@ -435,7 +435,7 @@ static void hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int message, WPARAM wParam, LPA break; } - case GTI_CB_TIMER: + case HB_GTE_TIMER: { if( pWVT->pGT->pDynSymTIMER ) { @@ -772,7 +772,7 @@ static void hb_gt_wvt_AddCharToInputQueue( PHB_GTWVT pWVT, int iKey ) pWVT->keyPointerIn = iPos; /* Pritpal Bedi - 06 Jun 2008 */ - hb_gt_wvt_FireEvent( pWVT, GTI_CB_INKEY, iKey, 0 ); + hb_gt_wvt_FireEvent( pWVT, HB_GTE_INKEY, iKey, 0 ); } static BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey ) @@ -1479,7 +1479,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara case WM_CLOSE: /* Clicked 'X' on system menu */ /* NOTE: this follows more code . will post later as it needs to be cleaned */ /* But it demonstrates the concept */ - hb_gt_wvt_FireEvent( pWVT, GTI_CB_CLOSE, wParam, lParam ); + hb_gt_wvt_FireEvent( pWVT, HB_GTE_CLOSE, wParam, lParam ); if( hb_set.HB_SET_CANCEL ) hb_vmRequestCancel(); @@ -1511,17 +1511,17 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara */ /* Pritpal Bedi - 06 Jun 2008 */ case WM_ACTIVATE: - hb_gt_wvt_FireEvent( pWVT, ( LOWORD( wParam ) == WA_INACTIVE ? GTI_CB_KILLFOCUS : GTI_CB_SETFOCUS ), wParam, lParam ); + hb_gt_wvt_FireEvent( pWVT, ( LOWORD( wParam ) == WA_INACTIVE ? HB_GTE_KILLFOCUS : HB_GTE_SETFOCUS ), wParam, lParam ); return 0; case WM_COMMAND: - hb_gt_wvt_FireEvent( pWVT, GTI_CB_COMMAND, wParam, lParam ); + hb_gt_wvt_FireEvent( pWVT, HB_GTE_COMMAND, wParam, lParam ); return 0; case WM_SIZE: if( !pWVT->bMaximized ) { - hb_gt_wvt_FireEvent( pWVT, GTI_CB_SIZE, (WPARAM) LOWORD( lParam ), (LPARAM) HIWORD( lParam ) ); + hb_gt_wvt_FireEvent( pWVT, HB_GTE_SIZE, (WPARAM) LOWORD( lParam ), (LPARAM) HIWORD( lParam ) ); } else { @@ -1530,7 +1530,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara return 0; /* NOTE: This message has more powerful features than what I implemented as above commented out */ case WM_TIMER: - hb_gt_wvt_FireEvent( pWVT, GTI_CB_TIMER, wParam, lParam ); + hb_gt_wvt_FireEvent( pWVT, HB_GTE_TIMER, wParam, lParam ); return 0; case WM_SYSCOMMAND: @@ -1543,7 +1543,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara SystemParametersInfo( SPI_GETWORKAREA,0, &rc, 0 ); - hb_gt_wvt_FireEvent( pWVT, GTI_CB_SIZE, (WPARAM) (rc.right-rc.left-pWVT->PTEXTSIZE.x), + hb_gt_wvt_FireEvent( pWVT, HB_GTE_SIZE, (WPARAM) (rc.right-rc.left-pWVT->PTEXTSIZE.x), (LPARAM) (rc.bottom-rc.top-(pWVT->PTEXTSIZE.y*1)) ); return 0; } @@ -2291,16 +2291,16 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, { switch( iType ) { - case GFX_ACQUIRESCREEN: - case GFX_RELEASESCREEN: + case HB_GFX_ACQUIRESCREEN: + case HB_GFX_RELEASESCREEN: iRet = 1; break; - case GFX_MAKECOLOR: + case HB_GFX_MAKECOLOR: iRet = (iTop << 16) | (iLeft << 8) | ( iBottom ); break; - case GFX_PUTPIXEL: + case HB_GFX_PUTPIXEL: SetGFXContext( iBottom ); MoveToEx( hdc, iLeft, iTop, NULL ); @@ -2310,7 +2310,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_LINE: + case HB_GFX_LINE: SetGFXContext( iColor ); MoveToEx( hdc, iLeft, iTop, NULL ); @@ -2320,7 +2320,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_RECT: + case HB_GFX_RECT: { RECT r; @@ -2337,7 +2337,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; } - case GFX_FILLEDRECT: + case HB_GFX_FILLEDRECT: SetGFXContext( iColor ); Rectangle( hdc, iLeft, iTop, iRight, iBottom ); @@ -2346,7 +2346,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_CIRCLE: + case HB_GFX_CIRCLE: SetGFXContext( iRight ); Arc( hdc, iLeft - iBottom / 2, iTop - iBottom / 2, iLeft + iBottom / 2, iTop + iBottom / 2, 0, 0, 0, 0 ); @@ -2355,7 +2355,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_FILLEDCIRCLE: + case HB_GFX_FILLEDCIRCLE: SetGFXContext( iRight ); Ellipse( hdc, iLeft - iBottom / 2, iTop - iBottom / 2, iLeft + iBottom / 2, iTop + iBottom / 2 ); @@ -2364,7 +2364,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_ELLIPSE: + case HB_GFX_ELLIPSE: SetGFXContext( iColor ); Arc( hdc, iLeft - iRight / 2, iTop - iBottom / 2, iLeft + iRight / 2, iTop + iBottom / 2, 0, 0, 0, 0 ); @@ -2373,7 +2373,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_FILLEDELLIPSE: + case HB_GFX_FILLEDELLIPSE: SetGFXContext( iColor ); Ellipse( hdc, iLeft - iRight / 2, iTop - iBottom / 2, iLeft + iRight / 2, iTop + iBottom / 2 ); @@ -2382,7 +2382,7 @@ static int hb_gt_wvt_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = 1; break; - case GFX_FLOODFILL: + case HB_GFX_FLOODFILL: SetGFXContext( iBottom ); FloodFill( hdc, iLeft, iTop, iColor ); diff --git a/harbour/source/rtl/gtxwc/gtxwc.c b/harbour/source/rtl/gtxwc/gtxwc.c index a4a258fac0..ea795db1a1 100644 --- a/harbour/source/rtl/gtxwc/gtxwc.c +++ b/harbour/source/rtl/gtxwc/gtxwc.c @@ -3826,15 +3826,15 @@ static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, switch( iType ) { - case GFX_ACQUIRESCREEN: + case HB_GFX_ACQUIRESCREEN: /* TODO: */ break; - case GFX_RELEASESCREEN: + case HB_GFX_RELEASESCREEN: /* TODO: */ break; - case GFX_MAKECOLOR: + case HB_GFX_MAKECOLOR: /* TODO: */ color.red = iTop * 256; color.green = iLeft * 256; @@ -3844,23 +3844,23 @@ static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iRet = color.pixel; break; - case GFX_CLIPTOP: + case HB_GFX_CLIPTOP: iRet = wnd->ClipRect.y; break; - case GFX_CLIPLEFT: + case HB_GFX_CLIPLEFT: iRet = wnd->ClipRect.x; break; - case GFX_CLIPBOTTOM: + case HB_GFX_CLIPBOTTOM: iRet = wnd->ClipRect.y + wnd->ClipRect.height - 1; break; - case GFX_CLIPRIGHT: + case HB_GFX_CLIPRIGHT: iRet = wnd->ClipRect.x + wnd->ClipRect.width - 1; break; - case GFX_SETCLIP: + case HB_GFX_SETCLIP: wnd->ClipRect.y = iTop; wnd->ClipRect.x = iLeft; wnd->ClipRect.width = iBottom; @@ -3868,43 +3868,43 @@ static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, XSetClipRectangles( wnd->dpy, wnd->gc, 0, 0, &wnd->ClipRect, 1, YXBanded ); break; - case GFX_DRAWINGMODE: - iRet = GFX_MODE_SOLID; + case HB_GFX_DRAWINGMODE: + iRet = HB_GFX_MODE_SOLID; break; - case GFX_GETPIXEL: + case HB_GFX_GETPIXEL: /* TODO: */ iRet = 0; break; - case GFX_PUTPIXEL: + case HB_GFX_PUTPIXEL: XSetForeground( wnd->dpy, wnd->gc, iBottom ); XDrawPoint( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop ); hb_gt_xwc_InvalidatePts( wnd, iLeft, iTop, iLeft, iTop ); break; - case GFX_LINE: + case HB_GFX_LINE: XSetForeground( wnd->dpy, wnd->gc, iColor ); XDrawLine( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop, iRight, iBottom ); hb_gt_xwc_InvalidatePts( wnd, iLeft, iTop, iRight, iBottom ); break; - case GFX_RECT: + case HB_GFX_RECT: XSetForeground( wnd->dpy, wnd->gc, iColor ); XDrawRectangle( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop, iRight - iLeft, iBottom - iTop ); hb_gt_xwc_InvalidatePts( wnd, iLeft, iTop, iRight, iBottom ); break; - case GFX_FILLEDRECT: + case HB_GFX_FILLEDRECT: XSetForeground( wnd->dpy, wnd->gc, iColor ); XFillRectangle( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop, iRight - iLeft, iBottom - iTop ); hb_gt_xwc_InvalidatePts( wnd, iLeft, iTop, iRight, iBottom ); break; - case GFX_CIRCLE: + case HB_GFX_CIRCLE: XSetForeground( wnd->dpy, wnd->gc, iRight ); XDrawArc( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop, iBottom, iBottom, 0, 360*64 ); @@ -3912,7 +3912,7 @@ static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iLeft + iBottom, iTop + iBottom ); break; - case GFX_FILLEDCIRCLE: + case HB_GFX_FILLEDCIRCLE: XSetForeground( wnd->dpy, wnd->gc, iRight ); XFillArc( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop, iBottom, iBottom, 0, 360*64 ); @@ -3920,7 +3920,7 @@ static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iLeft + iBottom, iTop + iBottom ); break; - case GFX_ELLIPSE: + case HB_GFX_ELLIPSE: XSetForeground( wnd->dpy, wnd->gc, iColor ); XDrawArc( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop, iRight, iBottom, 0, 360*64 ); @@ -3928,7 +3928,7 @@ static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iLeft + iRight, iTop + iBottom ); break; - case GFX_FILLEDELLIPSE: + case HB_GFX_FILLEDELLIPSE: XSetForeground( wnd->dpy, wnd->gc, iColor ); XFillArc( wnd->dpy, wnd->drw, wnd->gc, iLeft, iTop, iRight, iBottom, 0, 360*64 ); @@ -3936,7 +3936,7 @@ static int hb_gt_xwc_gfx_Primitive( PHB_GT pGT, int iType, int iTop, int iLeft, iLeft + iRight, iTop + iBottom ); break; - case GFX_FLOODFILL: + case HB_GFX_FLOODFILL: /* TODO: */ hb_gt_xwc_InvalidatePts( wnd, 0, 0, wnd->width, wnd->height ); break; diff --git a/harbour/source/rtl/hbgtcore.c b/harbour/source/rtl/hbgtcore.c index 0761cc2e47..bd99f69928 100644 --- a/harbour/source/rtl/hbgtcore.c +++ b/harbour/source/rtl/hbgtcore.c @@ -1606,7 +1606,7 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) { switch ( hb_arrayGetNI( pInfo->pNewVal,1 ) ) { - case GTI_CB_CLOSE: + case HB_GTE_CLOSE: pGT->pDynSymCLOSE = pDynSym; if ( iElems >= 3 ) { @@ -1614,7 +1614,7 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } break; - case GTI_CB_INKEY: + case HB_GTE_INKEY: pGT->pDynSymINKEY = pDynSym; if ( iElems >= 3 ) { @@ -1622,7 +1622,7 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } break; - case GTI_CB_TIMER: + case HB_GTE_TIMER: pGT->pDynSymTIMER = pDynSym; if ( iElems >= 3 ) { @@ -1630,11 +1630,11 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } break; - case GTI_CB_ACTIVATE: + case HB_GTE_ACTIVATE: pGT->pDynSymACTIVATE = pDynSym; break; - case GTI_CB_SETFOCUS: + case HB_GTE_SETFOCUS: pGT->pDynSymSETFOCUS = pDynSym; if ( iElems >= 3 ) { @@ -1642,7 +1642,7 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } break; - case GTI_CB_KILLFOCUS: + case HB_GTE_KILLFOCUS: pGT->pDynSymKILLFOCUS = pDynSym; if ( iElems >= 3 ) { @@ -1650,7 +1650,7 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } break; - case GTI_CB_MOUSE: + case HB_GTE_MOUSE: pGT->pDynSymMOUSE = pDynSym; if ( iElems >= 3 ) { @@ -1658,7 +1658,7 @@ static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) } break; - case GTI_CB_SIZE: + case HB_GTE_SIZE: pGT->pDynSymSIZE = pDynSym; if ( iElems >= 3 ) {