diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 14a6e22d2c..bc5101159e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,7 +8,26 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ -2006-07-45 16:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + +2006-07-16 23:26 UTC+0200 Enrico Maria Giordano + * source\common\expropt1.c + * Removed unuseful break inside hb_compExprAsSymbol function + +2006-07-16 19:00 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/ChangeLog + ! fixed typo in date + + * harbour/doc/gtapi.txt + * harbour/include/hbgtcore.h + * harbour/source/rtl/hbgtcore.c + * harbour/source/rtl/gtgui/gtdef.c + * changed HB_GT_DEFAULT_ to HB_GT__DEFAULT and added + REQUEST posibilities so now the GT drivers can be REQUESTed and + the default one set in similar way. + F.e.: + REQUEST HB_GT_WIN + REQUEST HB_GT_WVT_DEFAULT + REQUEST HB_GT_STD I think that it will be much easier and also using _DEFAULT as suffix does not resolve fully 10 character symbol but will work if GT name is not longer then 3 characters diff --git a/harbour/doc/gtapi.txt b/harbour/doc/gtapi.txt index 1cb77dd6bd..4b07c2fe50 100644 --- a/harbour/doc/gtapi.txt +++ b/harbour/doc/gtapi.txt @@ -192,16 +192,14 @@ and: Most of Windows linkers execute startup initialization code in the order of linked modules, so the first linked GT driver will be the default one. But you can control it also from your application, by -defining HB_GT_DEFAULT_ symbol (I do not like this name because +requesting HB_GT__DEFAULT symbol (I do not like this name because it cannot be used with 10 character symbols so I'm ready for any other positions). For example, if you add to your code: - ANNOUNCE HB_GT_DEFAULT_NUL -or: - PROC HB_GT_DEFAULT_NUL; RETURN + REQUEST HB_GT_NUL_DEFAULT Then GTNUL will be the default GT driver, and even if you would not -disable GTWIN and link it with you application, GTWIN will not be +disable GTWIN and link it with your application, GTWIN will not be activated but GTNUL. It could be intentional, because if your application is linked with more @@ -230,13 +228,12 @@ final users, because it allow to integrate GUI library with standard Clipper screen functions. How to create such base GUI GT driver? -It's enough take current GTWIN or GTWVT code and remove 90% of the code -from it. That is all, well almost, you have to also set new GT name. - -You can use the following as a base for your new GT driver: -TODO: add location of the sample GT driver [Chen] - +See as example GTGUI in source/rtl/gtgui/gtgui.c +It supports only TONE and CLIPBOARD operations. +GUI libraries can use it or create other GT driver inheriting from +this one. +NOTE: source/rtl/gtgui/gtdef.c is a hack which overloads the default + Harbour build time GT driver and should not be replicated. Best regards, Przemek - diff --git a/harbour/include/hbgtcore.h b/harbour/include/hbgtcore.h index 92d4ad9b5c..c0187f3d14 100644 --- a/harbour/include/hbgtcore.h +++ b/harbour/include/hbgtcore.h @@ -97,7 +97,7 @@ #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 ) {} +#define HB_GT_ANNOUNCE__( id ) HB_FUNC( id ) {} HB_FUNC( id##_DEFAULT ) {} #define HB_GT_DRVNAME( id ) HB_MACRO2STRING( id ) diff --git a/harbour/source/rtl/gtgui/gtdef.c b/harbour/source/rtl/gtgui/gtdef.c index 505db33cde..0f4988ea8a 100644 --- a/harbour/source/rtl/gtgui/gtdef.c +++ b/harbour/source/rtl/gtgui/gtdef.c @@ -85,8 +85,8 @@ #include "hbgtcore.h" #include "hbinit.h" -HB_GT_REQUEST( GUI ); -HB_GT_ANNOUNCE( HB_GT_NAME ); +HB_GT_REQUEST( GUI ) +HB_GT_ANNOUNCE( HB_GT_NAME ) HB_CALL_ON_STARTUP_BEGIN( _hb_startup_gt_hack_ ) hb_gtSetDefault( "GUI" ); diff --git a/harbour/source/rtl/hbgtcore.c b/harbour/source/rtl/hbgtcore.c index 3bc8761312..5872673d26 100644 --- a/harbour/source/rtl/hbgtcore.c +++ b/harbour/source/rtl/hbgtcore.c @@ -2751,12 +2751,12 @@ static char * hb_gtFindDefault( void ) for( iPos = 0; iPos < s_iGtCount; iPos++ ) { - sprintf( szFuncName, "HB_GT_DEFAULT_%s", s_gtInit[ iPos ]->id ); + sprintf( szFuncName, "HB_GT_%s_DEFAULT", s_gtInit[ iPos ]->id ); if( hb_dynsymFind( szFuncName ) ) return s_gtInit[ iPos ]->id; } - if( hb_dynsymFind( "HB_GT_DEFAULT_NUL" ) ) + if( hb_dynsymFind( "HB_GT_NUL_DEFAULT" ) ) return "NUL"; else return NULL;