2012-02-21 23:40 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/contrib/hbct/ctwin.c
* harbour/contrib/hbct/ctwin.h
* harbour/contrib/hbct/ctwfunc.c
* modified CTWLASTKEY() to set optionaly last key value
TODO: finish support for KEYREAD()/KEYSEND()
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-02-21 23:40 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/contrib/hbct/ctwin.c
|
||||
* harbour/contrib/hbct/ctwin.h
|
||||
* harbour/contrib/hbct/ctwfunc.c
|
||||
* modified CTWLASTKEY() to set optionaly last key value
|
||||
TODO: finish support for KEYREAD()/KEYSEND()
|
||||
|
||||
2012-02-21 12:31 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/src/3rd/zlib/zutil.h
|
||||
* removed not longer necessary workaround for fdopen(),
|
||||
|
||||
@@ -333,7 +333,13 @@ HB_FUNC( WMOVE )
|
||||
|
||||
HB_FUNC( CTWLASTKEY )
|
||||
{
|
||||
hb_retni( hb_ctwLastKey() );
|
||||
if( HB_ISNUM( 1 ) )
|
||||
{
|
||||
int iNewKey = hb_parni( 1 );
|
||||
hb_retni( hb_ctwLastKey( &iNewKey ) );
|
||||
}
|
||||
else
|
||||
hb_retni( hb_ctwLastKey( NULL ) );
|
||||
}
|
||||
|
||||
/* NOTE: These two functions are emulating the MaxRow()/MaxCol() core functions
|
||||
|
||||
@@ -2464,18 +2464,20 @@ int hb_ctwGetPosWindow( int iRow, int iCol )
|
||||
return iResult;
|
||||
}
|
||||
|
||||
int hb_ctwLastKey( void )
|
||||
int hb_ctwLastKey( int * piNewKey )
|
||||
{
|
||||
/* keyread() in CT3 uses 64512 bytes length buffer
|
||||
* when it reach this limit and new key is added the
|
||||
* buffer size is decreased by 1024 to 63488 bytes
|
||||
* before adding key. TODO: check if buffer is shifted
|
||||
*/
|
||||
int iResult = -1;
|
||||
int iResult = 0;
|
||||
PHB_GTCTW pCTW = hb_ctw_base();
|
||||
if( pCTW )
|
||||
{
|
||||
iResult = pCTW->iLastKey;
|
||||
if( piNewKey )
|
||||
pCTW->iLastKey = * piNewKey;
|
||||
hb_gt_BaseFree( pCTW->pGT );
|
||||
}
|
||||
return iResult;
|
||||
|
||||
@@ -92,7 +92,7 @@ extern HB_EXPORT int hb_ctwCenterWindow( int iWindow, HB_BOOL fCenter );
|
||||
extern HB_EXPORT int hb_ctwAddWindowBox( int iWindow, const char * szBox, int iColor );
|
||||
extern HB_EXPORT int hb_ctwSwapWindows( int iWindow1, int iWindow2 );
|
||||
extern HB_EXPORT int hb_ctwGetPosWindow( int iRow, int iCol );
|
||||
extern HB_EXPORT int hb_ctwLastKey( void );
|
||||
extern HB_EXPORT int hb_ctwLastKey( int * piNewKey );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user