From a9e80410b14546732176cb5fbf59c1bb6edd2de5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 7 Feb 2000 17:00:35 +0000 Subject: [PATCH] 20000207-16:52 GMT+1 Victor Szakats --- harbour/ChangeLog | 6 ++++++ harbour/source/rtl/inkey.c | 8 ++++---- harbour/source/rtl/mouse/mousewin.c | 10 ++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a89c9572bf..ab100a8c07 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +20000207-16:52 GMT+1 Victor Szakats + * source/rtl/inkey.c + source/rtl/mouse/mousewin.c + * Win32 mouse related variables renamed and moved to mousewin.c + inkey.c is now accessing it as an extern. + 20000207-16:39 GMT+1 Victor Szakats * include/hbextern.ch source/runner/stdalone/external.prg diff --git a/harbour/source/rtl/inkey.c b/harbour/source/rtl/inkey.c index 9b21c95c85..f6e5b73174 100644 --- a/harbour/source/rtl/inkey.c +++ b/harbour/source/rtl/inkey.c @@ -99,8 +99,8 @@ static DWORD s_cNumRead = 0; /* Ok to use DWORD here, because this is specific... */ static DWORD s_cNumIndex = 0; /* ...to the Windows API, which defines DWORD, etc. */ static INPUT_RECORD s_irInBuf[ INPUT_BUFFER_LEN ]; - int hb_gt_iMouseCol = 0; - int hb_gt_iMouseRow = 0; + extern int hb_mouse_iCol; + extern int hb_mouse_iRow; #endif #endif @@ -651,8 +651,8 @@ void hb_inkeyPoll( void ) /* Poll the console keyboard to stuff the Harbour } else if( s_irInBuf[ s_cNumIndex ].EventType == MOUSE_EVENT ) { - hb_gt_iMouseCol = s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwMousePosition.X; - hb_gt_iMouseRow = s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwMousePosition.Y; + hb_mouse_iCol = s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwMousePosition.X; + hb_mouse_iRow = s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwMousePosition.Y; if( s_irInBuf[ s_cNumIndex ].Event.MouseEvent.dwEventFlags == MOUSE_MOVED ) ch = K_MOUSEMOVE; diff --git a/harbour/source/rtl/mouse/mousewin.c b/harbour/source/rtl/mouse/mousewin.c index 924d22ced9..336455387e 100644 --- a/harbour/source/rtl/mouse/mousewin.c +++ b/harbour/source/rtl/mouse/mousewin.c @@ -61,11 +61,17 @@ typedef WORD far * LPWORD; #endif #endif /* __GNUC__ */ +int hb_mouse_iCol; +int hb_mouse_iRow; + /* C callable low-level interface */ void hb_mouse_Init( void ) { /* TODO: */ + + hb_mouse_iCol = 0; + hb_mouse_iRow = 0; } void hb_mouse_Exit( void ) @@ -94,14 +100,14 @@ int hb_mouse_Col( void ) { /* TODO: */ - return hb_gt_iMouseCol; + return hb_mouse_iCol; } int hb_mouse_Row( void ) { /* TODO: */ - return hb_gt_iMouseRow; + return hb_mouse_iRow; } void hb_mouse_SetPos( int iRow, int iCol )