2011-03-26 03:32 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/hbproces.c
    ! fixed one HB_TRUE wrongly used instead of TRUE
    * minor simplification

  * harbour/include/hbgtinfo.ch
  * harbour/src/rtl/hbgtcore.c
    + added HB_GTI_VERSION - it returns version information just like
      hb_gtVersion() - usually the same but can be different in some
      multilevel GTs, i.e. when different GT drivers are used locally
      and remotely.

  * harbour/include/inkey.ch
  * harbour/src/rtl/hbgtcore.c
    + added HB_K_CONNECT and HB_K_DISCONNECT inkey codes.
      They can be used to signal that remote terminal is connected or
      diconnected.

  * harbour/tests/gtkeys.prg
    + added HB_K_* keycodes

  * harbour/contrib/hbnetio/netiosrv.c
    * removed unnecessary casting
This commit is contained in:
Przemyslaw Czerpak
2011-03-26 02:32:52 +00:00
parent 26d8a51070
commit 14777609cf
7 changed files with 60 additions and 16 deletions

View File

@@ -16,6 +16,30 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-03-26 03:32 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbproces.c
! fixed one HB_TRUE wrongly used instead of TRUE
* minor simplification
* harbour/include/hbgtinfo.ch
* harbour/src/rtl/hbgtcore.c
+ added HB_GTI_VERSION - it returns version information just like
hb_gtVersion() - usually the same but can be different in some
multilevel GTs, i.e. when different GT drivers are used locally
and remotely.
* harbour/include/inkey.ch
* harbour/src/rtl/hbgtcore.c
+ added HB_K_CONNECT and HB_K_DISCONNECT inkey codes.
They can be used to signal that remote terminal is connected or
diconnected.
* harbour/tests/gtkeys.prg
+ added HB_K_* keycodes
* harbour/contrib/hbnetio/netiosrv.c
* removed unnecessary casting
2011-03-25 18:33 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
* contrib/hbide/hbqtoolbar.prg

View File

@@ -533,7 +533,7 @@ HB_FUNC( NETIO_RPCFILTER )
PHB_ITEM pHash = hb_param( 2, HB_IT_HASH );
if( pHash )
{
conn->rpcFilter = ( PHB_ITEM ) hb_itemNew( pHash );
conn->rpcFilter = hb_itemNew( pHash );
hb_gcUnlock( conn->rpcFilter );
}
}

View File

@@ -145,6 +145,7 @@
#define HB_GTI_ALTENTER 62 /* Toggles Alt+Enter as full screen switch (supported by: GTWVT) */
#define HB_GTI_ISFULLSCREEN 63 /* Is the GT windows using the full physical display? (supported by: GTWIN, GTWVT) */
#define HB_GTI_ONLINE 64 /* Is terminal connected? */
#define HB_GTI_VERSION 65 /* Get terminal version string */
/* Font weights */
#define HB_GTI_FONTW_THIN 1

View File

@@ -100,6 +100,8 @@
#define HB_K_CLOSE 1102
#define HB_K_GOTFOCUS 1103
#define HB_K_LOSTFOCUS 1104
#define HB_K_CONNECT 1105
#define HB_K_DISCONNECT 1106
/* Harbour extension - this marks that multi-characters keycode will be
returned - call Inkey() until ZERO will be returned

View File

@@ -1655,6 +1655,10 @@ static HB_BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pInfo->pResult = hb_itemPutNInt( pInfo->pResult, HB_GTI_RESIZEMODE_FONT );
break;
case HB_GTI_VERSION:
pInfo->pResult = hb_itemPutC( pInfo->pResult,
HB_GTSELF_VERSION( pGT, hb_itemGetNI( pInfo->pNewVal ) ) );
default:
return HB_FALSE;
}
@@ -2301,6 +2305,8 @@ static int hb_gt_def_InkeyFilter( PHB_GT pGT, int iKey, int iEventMask )
case HB_K_CLOSE:
case HB_K_GOTFOCUS:
case HB_K_LOSTFOCUS:
case HB_K_CONNECT:
case HB_K_DISCONNECT:
iMask = HB_INKEY_GTEVENT;
break;
default:

View File

@@ -419,7 +419,7 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFilename,
memset( &sa, 0, sizeof( sa ) );
sa.nLength = sizeof( sa );
sa.bInheritHandle = HB_TRUE;
sa.bInheritHandle = TRUE;
if( phStdin != NULL )
{
@@ -485,16 +485,16 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFilename,
si.hStdOutput = phStdout ? hPipes[ 3 ] : GetStdHandle( STD_OUTPUT_HANDLE );
si.hStdError = phStderr ? hPipes[ 5 ] : GetStdHandle( STD_ERROR_HANDLE );
}
fError = CreateProcess( NULL, /* lpAppName */
lpCommand,
NULL, /* lpProcessAttr */
NULL, /* lpThreadAttr */
TRUE, /* bInheritHandles */
dwFlags, /* dwCreationFlags */
NULL, /* lpEnvironment */
NULL, /* lpCurrentDirectory */
&si,
&pi ) ? HB_FALSE : HB_TRUE;
fError = ! CreateProcess( NULL, /* lpAppName */
lpCommand,
NULL, /* lpProcessAttr */
NULL, /* lpThreadAttr */
TRUE, /* bInheritHandles */
dwFlags, /* dwCreationFlags */
NULL, /* lpEnvironment */
NULL, /* lpCurrentDirectory */
&si,
&pi );
hb_fsSetIOError( !fError, 0 );
hb_xfree( lpCommand );
if( !fError )

View File

@@ -207,6 +207,12 @@ aadd(aKeys, { "K_MMMIDDLEDOWN", 1013, "Mouse Move Middle Down" } )
aadd(aKeys, { "K_MWFORWARD", 1014, "Mouse Wheel Forward" } )
aadd(aKeys, { "K_MWBACKWARD", 1015, "Mouse Wheel Backward" } )
aadd(aKeys, { "K_NCMOUSEMOVE", 1016, "Non-Client Area Mouse Movement" } )
aadd(aKeys, { "HB_K_RESIZE", 1101, "screen dimension changed" } )
aadd(aKeys, { "HB_K_CLOSE", 1102, "close button hit" } )
aadd(aKeys, { "HB_K_GETFOCUS", 1103, "focus restored" } )
aadd(aKeys, { "HB_K_LOSTFOCUS", 1104, "focus lost" } )
aadd(aKeys, { "HB_K_CONNECT", 1105, "remote terminal connected" } )
aadd(aKeys, { "HB_K_DISCONNECT", 1106, "remote terminal disconnected" } )
? os(), version(), date(), time()
@@ -215,25 +221,30 @@ setcancel(.f.)
//altd(0)
#ifdef __HARBOUR__
set(_SET_EVENTMASK,INKEY_ALL)
set( _SET_EVENTMASK, hb_bitOR( INKEY_ALL, HB_INKEY_GTEVENT ) )
hb_gtInfo(HB_GTI_ESCDELAY,50)
hb_cdpSelect( "PLMAZ" )
hb_setTermCP( "PLISO" )
? hb_gtVersion(1), hb_gtVersion()
#else
#ifdef INKEY_ALL
set(_SET_EVENTMASK,INKEY_ALL)
#endif
#endif
? "@ - interrupt, keycodes checking: "
?
while (.t.)
k:=inkey(0,INKEY_ALL)
k:=inkey(0)
if (i:=ascan(aKeys, { |x| x[2]==k }))!=0
? " key:"+str(aKeys[i,2],7)+" "+padr(aKeys[i,1],18)+aKeys[i,3]
elseif k>=32 .and. k<=126 .or. (k>=160 .and. k<=255) .or. IsAlpha(chr(k))
elseif k>=32 .and. k<=126 .or. (k>=160 .and. k<=255) .or.;
(k>=0 .and. k<=255 .and. IsAlpha(chr(k)))
? "char:"+str(k,7)+" "+chr(k)
else
? " key:"+str(k,7)
endif
// ?? " ("+ltrim(str(maxrow()))+":"+ltrim(str(maxcol()))+")"
// ?? " ("+ltrim(str(maxrow()))+":"+ltrim(str(maxcol()))+")"
if k==asc("@") .and. nextkey()==0
exit