2008-06-11 19:39 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/xhb/Makefile
* contrib/xhb/common.mak
- Removed some xhb specific non-standard headers from
the list of those getting installed to the Harbour central
include dir. Only hbcompat.ch, hbcompat.h and xhb.ch
goes now to the official include dir. After this change
has been merged with RC1, xhb.lib may be included in
the default build.
[RC1]
* include/hbgtinfo.ch
+ Added comment to compatibility #defines, to not use
them, since they're deprecated.
[RC1]
* 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.
; [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.
; [RC1]
* contrib/hbfbird/make_b32.bat
* contrib/hbfbird/make_vc.bat
* Fixed location where .libs are looked for.
[RC1]
* contrib/hbcurl/hbcurl.c
% Minor cleanups.
[RC1]
* contrib/hbodbc/make_vc.bat
! Removed .dll -> .lib conversion for MSVC,
since the .lib is provided by the MS SDK anyway.
; [RC1]
* contrib/hbcurl/hbcurl.c
* contrib/hbcurl/hbcurl.ch
* contrib/hbcurl/tests/ftp_uldl.prg
! Cleanup the rare case when curl_easy_init() returns NULL.
Functions now always return the same type, even in case libcurl
failed to initialize.
+ Return values for above cases is now HB_CURLE_ERROR (== -1).
! CURL_*() passed pointers now are also checked for the pointer
type, and RTE is thrown if they are not HBCURL ones. So for
example in the very rare case when any hbcurl functions would
get passed a GC pointer returned by another API, an argument
error would be thrown now.
! CURL_ESCAPE()/CURL_UNESCAPE() fixed picked parameter ordinal.
+ CURL_ESCAPE()/CURL_UNESCAPE() added parameter checking.
; [RC1]
This commit is contained in:
@@ -8,6 +8,69 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-06-11 19:39 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/xhb/Makefile
|
||||
* contrib/xhb/common.mak
|
||||
- Removed some xhb specific non-standard headers from
|
||||
the list of those getting installed to the Harbour central
|
||||
include dir. Only hbcompat.ch, hbcompat.h and xhb.ch
|
||||
goes now to the official include dir. After this change
|
||||
has been merged with RC1, xhb.lib may be included in
|
||||
the default build.
|
||||
[RC1]
|
||||
|
||||
* include/hbgtinfo.ch
|
||||
+ Added comment to compatibility #defines, to not use
|
||||
them, since they're deprecated.
|
||||
[RC1]
|
||||
|
||||
* 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.
|
||||
; [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.
|
||||
; [RC1]
|
||||
|
||||
* contrib/hbfbird/make_b32.bat
|
||||
* contrib/hbfbird/make_vc.bat
|
||||
* Fixed location where .libs are looked for.
|
||||
[RC1]
|
||||
|
||||
* contrib/hbcurl/hbcurl.c
|
||||
% Minor cleanups.
|
||||
[RC1]
|
||||
|
||||
* contrib/hbodbc/make_vc.bat
|
||||
! Removed .dll -> .lib conversion for MSVC,
|
||||
since the .lib is provided by the MS SDK anyway.
|
||||
; [RC1]
|
||||
|
||||
* contrib/hbcurl/hbcurl.c
|
||||
* contrib/hbcurl/hbcurl.ch
|
||||
* contrib/hbcurl/tests/ftp_uldl.prg
|
||||
! Cleanup the rare case when curl_easy_init() returns NULL.
|
||||
Functions now always return the same type, even in case libcurl
|
||||
failed to initialize.
|
||||
+ Return values for above cases is now HB_CURLE_ERROR (== -1).
|
||||
! CURL_*() passed pointers now are also checked for the pointer
|
||||
type, and RTE is thrown if they are not HBCURL ones. So for
|
||||
example in the very rare case when any hbcurl functions would
|
||||
get passed a GC pointer returned by another API, an argument
|
||||
error would be thrown now.
|
||||
! CURL_ESCAPE()/CURL_UNESCAPE() fixed picked parameter ordinal.
|
||||
+ CURL_ESCAPE()/CURL_UNESCAPE() added parameter checking.
|
||||
; [RC1]
|
||||
|
||||
2008-06-07 09:40 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/hbcurl/hbcurl.c
|
||||
+ Added RTEs when wrong parameter was passed
|
||||
|
||||
@@ -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 );
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -362,6 +362,7 @@
|
||||
|
||||
/* curl result codes. */
|
||||
|
||||
#define HB_CURLE_ERROR -1 /* request not passed to libcurl (libcurl not initialized or unknown parameter) */
|
||||
#define HB_CURLE_OK 0
|
||||
#define HB_CURLE_UNSUPPORTED_PROTOCOL 1 /* */
|
||||
#define HB_CURLE_FAILED_INIT 2 /* */
|
||||
|
||||
@@ -70,8 +70,8 @@ FUNCTION Main( cDL, cUL )
|
||||
? curl_easy_getinfo( curl, HB_CURLINFO_EFFECTIVE_URL )
|
||||
? curl_easy_getinfo( curl, HB_CURLINFO_TOTAL_TIME )
|
||||
|
||||
info := curl_easy_getinfo( curl, HB_CURLINFO_SSL_ENGINES )
|
||||
?
|
||||
info := curl_easy_getinfo( curl, HB_CURLINFO_SSL_ENGINES, @tmp )
|
||||
? "SSL ENGINES: ", tmp, Len( info )
|
||||
FOR tmp := 1 TO Len( info )
|
||||
?? info[ tmp ] + " "
|
||||
NEXT
|
||||
@@ -116,12 +116,6 @@ FUNCTION Main( cDL, cUL )
|
||||
? curl_easy_getinfo( curl, HB_CURLINFO_EFFECTIVE_URL )
|
||||
? curl_easy_getinfo( curl, HB_CURLINFO_TOTAL_TIME )
|
||||
|
||||
info := curl_easy_getinfo( curl, HB_CURLINFO_SSL_ENGINES )
|
||||
?
|
||||
FOR tmp := 1 TO Len( info )
|
||||
?? info[ tmp ] + " "
|
||||
NEXT
|
||||
|
||||
curl_easy_reset( curl )
|
||||
|
||||
? "Press key..."
|
||||
|
||||
@@ -40,7 +40,7 @@ if "%1" == "INSTALL" goto POST_INSTALL
|
||||
:POST_BUILD
|
||||
|
||||
rem Use supplied .lib file.
|
||||
if not exist ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib copy "%HB_DIR_FIREBIRD%\%_HB_DLL_NAME%_bor.lib" ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib > nul
|
||||
if not exist ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib copy "%HB_DIR_FIREBIRD%\lib\%_HB_DLL_NAME%_bor.lib" ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib > nul
|
||||
goto POST_EXIT
|
||||
|
||||
:POST_CLEAN
|
||||
|
||||
@@ -40,7 +40,7 @@ if "%1" == "INSTALL" goto POST_INSTALL
|
||||
:POST_BUILD
|
||||
|
||||
rem Use supplied .lib file.
|
||||
if not exist ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib copy "%HB_DIR_FIREBIRD%\%_HB_DLL_NAME%_ms.lib" ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib > nul
|
||||
if not exist ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib copy "%HB_DIR_FIREBIRD%\lib\%_HB_DLL_NAME%_ms.lib" ..\..\lib\%_HB_CC_NAME%\%_HB_DLL_NAME%.lib > nul
|
||||
goto POST_EXIT
|
||||
|
||||
:POST_CLEAN
|
||||
|
||||
@@ -26,24 +26,6 @@ if "%1" == "INSTALL" goto POST_INSTALL
|
||||
|
||||
:POST_BUILD
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem This .dll to .lib conversion needs GNU sed.exe in the path
|
||||
rem ---------------------------------------------------------------
|
||||
echo./[ \t]*ordinal hint/,/^^[ \t]*Summary/{> _temp.sed
|
||||
echo. /^^[ \t]\+[0-9]\+/{>> _temp.sed
|
||||
echo. s/^^[ \t]\+[0-9]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+\(.*\)/\1/p>> _temp.sed
|
||||
echo. }>> _temp.sed
|
||||
echo.}>> _temp.sed
|
||||
DUMPBIN /EXPORTS "%HB_DLL_DIR%\%HB_DLL_NAME%.dll" > _dump.tmp
|
||||
echo.LIBRARY "%HB_DLL_DIR%\%HB_DLL_NAME%.dll" > _temp.def
|
||||
echo.EXPORTS >> _temp.def
|
||||
sed -nf _temp.sed < _dump.tmp >> _temp.def
|
||||
LIB /MACHINE:X86 /DEF:_temp.def /OUT:..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib >> %_HB_MAKELOG%
|
||||
del _dump.tmp
|
||||
del _temp.def
|
||||
del _temp.sed
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
goto POST_EXIT
|
||||
|
||||
:POST_CLEAN
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES=\
|
||||
freadlin.c \
|
||||
hbcrypt.c \
|
||||
hbxml.c \
|
||||
hbsyslog.c \
|
||||
hboutdbg.c \
|
||||
@@ -20,9 +22,6 @@ C_SOURCES=\
|
||||
|
||||
C_HEADERS=\
|
||||
hbcompat.h \
|
||||
hbcomprs.h \
|
||||
hbfast.h \
|
||||
hbxml.h \
|
||||
|
||||
PRG_SOURCES=\
|
||||
txml.prg \
|
||||
@@ -32,17 +31,8 @@ PRG_SOURCES=\
|
||||
xhbcomp.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
classex.ch \
|
||||
cstruct.ch \
|
||||
hbcompat.ch \
|
||||
hbctypes.ch \
|
||||
hblog.ch \
|
||||
hblogdef.ch \
|
||||
math.ch \
|
||||
usrrdd.ch \
|
||||
wintypes.ch \
|
||||
xhb.ch \
|
||||
xhbextrn.ch \
|
||||
|
||||
LIBNAME=xhb
|
||||
|
||||
|
||||
@@ -8,24 +8,14 @@ LIB_PATH = $(LIB_DIR)$(LIBNAME)$(LIBEXT)
|
||||
|
||||
C_HEADERS = \
|
||||
hbcompat.h \
|
||||
hbcomprs.h \
|
||||
hbfast.h \
|
||||
hbxml.h \
|
||||
|
||||
PRG_HEADERS = \
|
||||
classex.ch \
|
||||
cstruct.ch \
|
||||
hbcompat.ch \
|
||||
hbctypes.ch \
|
||||
hblog.ch \
|
||||
hblogdef.ch \
|
||||
math.ch \
|
||||
usrrdd.ch \
|
||||
wintypes.ch \
|
||||
xhb.ch \
|
||||
xhbextrn.ch \
|
||||
|
||||
LIB_OBJS = \
|
||||
$(OBJ_DIR)freadlin$(OBJEXT) \
|
||||
$(OBJ_DIR)hbcrypt$(OBJEXT) \
|
||||
$(OBJ_DIR)hbxml$(OBJEXT) \
|
||||
$(OBJ_DIR)hbsyslog$(OBJEXT) \
|
||||
$(OBJ_DIR)hboutdbg$(OBJEXT) \
|
||||
|
||||
@@ -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(<nRed>, <nGreen>, <nBlue>[, <nAlpha>]) => hb_gfxPrimitive(GFX_MAKECOLOR, <nRed>, <nGreen>, <nBlue>[, <nAlpha>])
|
||||
#xtranslate HB_GFXGETCLIP(<nTop>, <nLeft>, <nBottom>, <nRight>) => <nTop> := hb_gfxPrimitive(GFX_CLIPTOP); <nLeft> := hb_gfxPrimitive(GFX_CLIPLEFT); <nBottom> := hb_gfxPrimitive(GFX_CLIPBOTTOM); <nRight> := hb_gfxPrimitive(GFX_CLIPRIGHT)
|
||||
#xtranslate HB_GFXSETCLIP(<nTop>, <nLeft>, <nBottom>, <nRight>) => hb_gfxPrimitive(GFX_SETCLIP, <nTop>, <nLeft>, <nBottom>, <nRight>)
|
||||
#xtranslate HB_GFXDRAWINGMODE([<nMode>]) => hb_gfxPrimitive(GFX_DRAWINGMODE[, <nMode>])
|
||||
#xtranslate HB_GFXGETPIXEL(<nY>, <nX>) => hb_gfxPrimitive(GFX_GETPIXEL, <nY>, <nX>)
|
||||
#xtranslate HB_GFXPUTPIXEL(<nY>, <nX>, <nColor>) => hb_gfxPrimitive(GFX_PUTPIXEL, <nY>, <nX>, <nColor>)
|
||||
#xtranslate HB_GFXLINE(<nTop>, <nLeft>, <nBottom>, <nRight>, <nColor>) => hb_gfxPrimitive(GFX_LINE, <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor>)
|
||||
#xtranslate HB_GFXRECT(<nTop>, <nLeft>, <nBottom>, <nRight>, <nColor>) => hb_gfxPrimitive(GFX_RECT, <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor>)
|
||||
#xtranslate HB_GFXFILLEDRECT(<nTop>, <nLeft>, <nBottom>, <nRight>, <nColor>) => hb_gfxPrimitive(GFX_FILLEDRECT, <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor>)
|
||||
#xtranslate HB_GFXCIRCLE(<nY>, <nX>, <nRadius>, <nColor>) => hb_gfxPrimitive(GFX_CIRCLE, <nY>, <nX>, <nRadius>, <nColor>)
|
||||
#xtranslate HB_GFXFILLEDCIRCLE(<nY>, <nX>, <nRadius>, <nColor>) => hb_gfxPrimitive(GFX_FILLEDCIRCLE, <nY>, <nX>, <nRadius>, <nColor>)
|
||||
#xtranslate HB_GFXELLIPSE(<nY>, <nX>, <nRadY>, <nRadX>, <nColor>) => hb_gfxPrimitive(GFX_ELLIPSE, <nY>, <nX>, <nRadY>, <nRadX>, <nColor>)
|
||||
#xtranslate HB_GFXFILLEDELLIPSE(<nY>, <nX>, <nRadY>, <nRadX>, <nColor>) => hb_gfxPrimitive(GFX_FILLEDELLIPSE, <nY>, <nX>, <nRadY>, <nRadX>, <nColor>)
|
||||
#xtranslate HB_GFXFLOODFILL(<nY>, <nX>, <nColor>) => hb_gfxPrimitive(GFX_FLOODFILL, <nY>, <nX>, <nColor>)
|
||||
|
||||
#endif /* _HBGFX_CH_ */
|
||||
#xtranslate hb_gfxAcquireScreen() => hb_gfxPrimitive( HB_GFX_ACQUIRESCREEN )
|
||||
#xtranslate hb_gfxReleaseScreen() => hb_gfxPrimitive( HB_GFX_RELEASESCREEN )
|
||||
#xtranslate hb_gfxMakeColor( <nRed>, <nGreen>, <nBlue>[, <nAlpha>] ) => hb_gfxPrimitive( HB_GFX_MAKECOLOR, <nRed>, <nGreen>, <nBlue>[, <nAlpha>] )
|
||||
#xtranslate hb_gfxGetClip( <nTop>, <nLeft>, <nBottom>, <nRight> ) => <nTop> := hb_gfxPrimitive( HB_GFX_CLIPTOP ); <nLeft> := hb_gfxPrimitive( HB_GFX_CLIPLEFT ); <nBottom> := hb_gfxPrimitive( HB_GFX_CLIPBOTTOM ); <nRight> := hb_gfxPrimitive( HB_GFX_CLIPRIGHT )
|
||||
#xtranslate hb_gfxSetClip( <nTop>, <nLeft>, <nBottom>, <nRight> ) => hb_gfxPrimitive( HB_GFX_SETCLIP, <nTop>, <nLeft>, <nBottom>, <nRight> )
|
||||
#xtranslate hb_gfxDrawingMode( [<nMode>] ) => hb_gfxPrimitive( HB_GFX_DRAWINGMODE[, <nMode>] )
|
||||
#xtranslate hb_gfxGetPixel( <nY>, <nX> ) => hb_gfxPrimitive( HB_GFX_GETPIXEL, <nY>, <nX> )
|
||||
#xtranslate hb_gfxPutPixel( <nY>, <nX>, <nColor> ) => hb_gfxPrimitive( HB_GFX_PUTPIXEL, <nY>, <nX>, <nColor> )
|
||||
#xtranslate hb_gfxLine( <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor> ) => hb_gfxPrimitive( HB_GFX_LINE, <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor> )
|
||||
#xtranslate hb_gfxRect( <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor> ) => hb_gfxPrimitive( HB_GFX_RECT, <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor> )
|
||||
#xtranslate hb_gfxFilledRect( <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor> ) => hb_gfxPrimitive( HB_GFX_FILLEDRECT, <nTop>, <nLeft>, <nBottom>, <nRight>, <nColor> )
|
||||
#xtranslate hb_gfxCircle( <nY>, <nX>, <nRadius>, <nColor> ) => hb_gfxPrimitive( HB_GFX_CIRCLE, <nY>, <nX>, <nRadius>, <nColor> )
|
||||
#xtranslate hb_gfxFilledCircle( <nY>, <nX>, <nRadius>, <nColor> ) => hb_gfxPrimitive( HB_GFX_FILLEDCIRCLE, <nY>, <nX>, <nRadius>, <nColor> )
|
||||
#xtranslate hb_gfxEllipse( <nY>, <nX>, <nRadY>, <nRadX>, <nColor> ) => hb_gfxPrimitive( HB_GFX_ELLIPSE, <nY>, <nX>, <nRadY>, <nRadX>, <nColor> )
|
||||
#xtranslate hb_gfxFilledEllipse( <nY>, <nX>, <nRadY>, <nRadX>, <nColor> ) => hb_gfxPrimitive( HB_GFX_FILLEDELLIPSE, <nY>, <nX>, <nRadY>, <nRadX>, <nColor> )
|
||||
#xtranslate hb_gfxFloodFill( <nY>, <nX>, <nColor> ) => hb_gfxPrimitive( HB_GFX_FLOODFILL, <nY>, <nX>, <nColor> )
|
||||
|
||||
#endif /* _HBHB_GFX_CH_ */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
* GT Graphics definitions (GFX_*)
|
||||
* GT Graphics definitions (HB_GFX_*)
|
||||
*
|
||||
* Copyright 2004 Mauricio Abre <maurifull@datafull.com>
|
||||
* 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_ */
|
||||
|
||||
@@ -145,7 +145,9 @@
|
||||
#define HB_GTI_KBD_ACCENT3 16384
|
||||
#define HB_GTI_KBD_ACCENT4 32768
|
||||
|
||||
/* 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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1851,16 +1851,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 );
|
||||
@@ -1870,7 +1870,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 );
|
||||
@@ -1880,7 +1880,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;
|
||||
|
||||
@@ -1897,7 +1897,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 );
|
||||
@@ -1906,7 +1906,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 );
|
||||
@@ -1915,7 +1915,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 );
|
||||
@@ -1924,7 +1924,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 );
|
||||
@@ -1933,7 +1933,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 );
|
||||
@@ -1942,7 +1942,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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user