diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c808a8d3ba..dbe5a3bdfe 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -9,6 +9,16 @@ */ +2006-06-25 08:32 UTC+0300 Chen Kedem + * TODO + * Change one assignment from Przemek to Ryszard + +2006-06-23 02:50 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/gtgui/Makefile + * harbour/source/rtl/gtgui/gtgui.c + * hacked GTGUI for W32 to be compiled using the same name as RTL default + GT driver (GTWIN). + * harbour/include/hbgtcore.h * harbour/source/rtl/hbgtcore.c * changed 'char *' to 'const char *' in hb_gtSetDefault(), hb_gtLoad() diff --git a/harbour/include/hbgtcore.h b/harbour/include/hbgtcore.h index 92436d57dc..b4f087e0dc 100644 --- a/harbour/include/hbgtcore.h +++ b/harbour/include/hbgtcore.h @@ -508,9 +508,9 @@ extern void hb_gt_WhoCares( void * pCargo ); #define HB_GTSUPER_GFXTEXT(t,l,s,c,h,w) (HB_GTSUPER)->GfxPrimitive(t,l,s,c,h,w) #define HB_GTSUPER_WHOCARES(p) (HB_GTSUPER)->WhoCares(p) -extern HB_EXPORT void hb_gtSetDefault( char * szGtName ); +extern HB_EXPORT void hb_gtSetDefault( const char * szGtName ); extern HB_EXPORT BOOL hb_gtRegister( PHB_GT_INIT gtInit ); -extern HB_EXPORT BOOL hb_gtLoad( char * szGtName, PHB_GT_FUNCS pFuncTable ); +extern HB_EXPORT BOOL hb_gtLoad( const char * szGtName, PHB_GT_FUNCS pFuncTable ); extern HB_EXPORT BOOL hb_gtUnLoad( void ); extern HB_EXPORT void hb_gtStartupInit( void ); diff --git a/harbour/source/rtl/gtgui/Makefile b/harbour/source/rtl/gtgui/Makefile index 08aa82e124..a89ac9541a 100644 --- a/harbour/source/rtl/gtgui/Makefile +++ b/harbour/source/rtl/gtgui/Makefile @@ -10,3 +10,10 @@ C_SOURCES=\ LIBNAME=gtgui include $(TOP)$(ROOT)config/lib.cf + +ifneq ($(HB_GT_DEFAULT),) +CFLAGS += -DHB_GT_DEFAULT=$(HB_GT_DEFAULT:gt%=%) +endif +ifneq ($(HB_GT_LIB),) +CFLAGS += -DHB_GT_LIB=$(HB_GT_LIB:gt%=%) +endif diff --git a/harbour/source/rtl/gtgui/gtgui.c b/harbour/source/rtl/gtgui/gtgui.c index 35553b1040..d088a94b7b 100644 --- a/harbour/source/rtl/gtgui/gtgui.c +++ b/harbour/source/rtl/gtgui/gtgui.c @@ -54,9 +54,32 @@ /* NOTE: User programs should never call this layer directly! */ -#define HB_GT_NAME GUI #define HB_OS_WIN_32_USED +#include "hbapi.h" + + +/* + * This GT should be called GUI but we introduce a hack to make + * Windows users happy ;-) and we will change its name to the + * one used by default GT REQUESTed by our RTL library, [druzus] + */ + +#if defined( HB_OS_WIN_32 ) + +#if defined(HB_GT_DEFAULT) +# define HB_GT_NAME HB_GT_DEFAULT +#elif defined(HB_GT_LIB) +# define HB_GT_NAME HB_GT_LIB +#else +# define HB_GT_NAME WIN +#endif + +#else + +#define HB_GT_NAME GUI + +#endif #include "hbgtcore.h" #include "hbinit.h" diff --git a/harbour/source/rtl/hbgtcore.c b/harbour/source/rtl/hbgtcore.c index b785ca9e4e..bca8fa688a 100644 --- a/harbour/source/rtl/hbgtcore.c +++ b/harbour/source/rtl/hbgtcore.c @@ -2725,7 +2725,7 @@ static char * hb_gtFindDefault( void ) return NULL; } -static int hb_gtFindEntry( char * pszID ) +static int hb_gtFindEntry( const char * pszID ) { int iPos; @@ -2740,7 +2740,7 @@ static int hb_gtFindEntry( char * pszID ) return -1; } -HB_EXPORT void hb_gtSetDefault( char * szGtName ) +HB_EXPORT void hb_gtSetDefault( const char * szGtName ) { hb_strncpy( s_gtNameBuf, szGtName, HB_GT_NAME_MAX_ ); s_defaultGT = s_gtNameBuf; @@ -2756,7 +2756,7 @@ HB_EXPORT BOOL hb_gtRegister( PHB_GT_INIT gtInit ) return FALSE; } -HB_EXPORT BOOL hb_gtLoad( char * szGtName, PHB_GT_FUNCS pFuncTable ) +HB_EXPORT BOOL hb_gtLoad( const char * szGtName, PHB_GT_FUNCS pFuncTable ) { int iPos;