From cf4b7113411bbbd7187bee2db0ee7f7b0177bfff Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Wed, 9 Feb 2000 06:37:47 +0000 Subject: [PATCH] 20000209-07:35 GMT+1 Antonio Linares --- harbour/ChangeLog | 13 ++++++++++--- harbour/source/debug/debugger.prg | 3 +++ harbour/source/rtl/inkey.c | 12 +++++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6efd2fb2f9..d6756efed1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,10 @@ +20000209-07:35 GMT+1 Antonio Linares + * source/rtl/inkey.c + + Added support for Inkey() K_LDBLCLK and K_RDBLCLK events. + + * source/debug/debugger.prg + + test added for Inkey() K_LDBLCLK event. It is working right. + 20000208-17:55 GMT+1 Ryszard Glab *source/compiler/harbour.y @@ -13,15 +20,15 @@ used in DO CASE statement *tests/keywords.prg - * added some more test code - + * added some more test code + *source/rtl/wait.prg * fixed code to stop generation of error 'unreachable code' *source/rtl/gt/gtstd.c * added dummy function hb_gt_ReadKey() if compiled for U*ix (I don't know why it worked previously without this function) - + 20000208-12:00 GMT+1 Antonio Linares * tests/bld_b32.bat * updated to use latest Borland makefile changes diff --git a/harbour/source/debug/debugger.prg b/harbour/source/debug/debugger.prg index 567af95ed6..253bb783a8 100644 --- a/harbour/source/debug/debugger.prg +++ b/harbour/source/debug/debugger.prg @@ -364,6 +364,9 @@ METHOD HandleEvent() CLASS TDebugger ::aWindows[ ::nCurrentWindow ]:SetFocus( .t. ) endif + case nKey == K_LDBLCLK + Alert( "Mouse Left button doble click" ) + case nKey == K_LBUTTONDOWN if MRow() == 0 if ( nPopup := ::oPullDown:GetItemOrdByCoors( 0, MCol() ) ) != 0 diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index f6e5b73174..5f69c00356 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -659,11 +659,17 @@ void hb_inkeyPoll( void ) /* Poll the console keyboard to stuff the Harbour else if( s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwButtonState & FROM_LEFT_1ST_BUTTON_PRESSED ) - ch = K_LBUTTONDOWN; + if( s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwEventFlags == DOUBLE_CLICK ) + ch = K_LDBLCLK; + else + ch = K_LBUTTONDOWN; else if( s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwButtonState & RIGHTMOST_BUTTON_PRESSED ) - ch = K_RBUTTONDOWN; + if( s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwEventFlags == DOUBLE_CLICK ) + ch = K_RDBLCLK; + else + ch = K_RBUTTONDOWN; } /* Set up to process the next input event (if any) */ s_cNumIndex++; @@ -1279,4 +1285,4 @@ HARBOUR HB_FKMAX( void ) * $SEEALSO$ * CLEAR TYPEAHEAD,__KEYBOARD() * $END$ - */ + */ \ No newline at end of file