From: George H. <geo...@us...> - 2007-05-21 09:57:31
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23692/win32forth/src Modified Files: CONTROL.F Class.f GENERIC.F WORDS.F Log Message: gah:moved MethodExecute and MethodCatch to Forth vocabulary , moved get-mouse-xy into generic.f (to reduce dependancies) and made thread safe.Fixed bug in constants when wincon.dll isn't available Index: Class.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Class.f,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Class.f 1 May 2007 07:32:55 -0000 1.30 --- Class.f 21 May 2007 09:57:26 -0000 1.31 *************** *** 1206,1216 **** IF idxBase 2 - w@ ( #elems ) * + CELL+ THEN ; - \ -------------------------------------------------------------------- - \ ------------- Support for windows procedures etc ------------------- - \ -------------------------------------------------------------------- - - ' execute alias Methodexecute - ' catch alias Methodcatch - \ ==================================================================== \ Support for 2 dimensional arrays --- 1206,1209 ---- *************** *** 1261,1264 **** --- 1254,1263 ---- ~: [ dup>r ] r> cell- Free Abort" Disposing Object failed!" ; + \ -------------------------------------------------------------------- + \ ------------- Support for windows procedures etc ------------------- + \ -------------------------------------------------------------------- + + ' execute alias Methodexecute + ' catch alias Methodcatch \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Index: WORDS.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/WORDS.F,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WORDS.F 29 Aug 2005 15:56:28 -0000 1.6 --- WORDS.F 21 May 2007 09:57:26 -0000 1.7 *************** *** 94,99 **** : count-constants ( -- n1 ) \ count the constants available to system constant-tot 0= \ only count if not counted... ! if WinConPtr proc>cfa @ dodefer = \ Leave if 'wcFindWin32Constant' ! if 0 EXIT then \ hasn't already been resolved &.WinConstantCount 0 here CALL wcEnumWin32Constants DROP then constant-tot ; --- 94,99 ---- : count-constants ( -- n1 ) \ count the constants available to system constant-tot 0= \ only count if not counted... ! if WinConlib load-dll 0= \ Leave if wincon.dll ! if 0 EXIT then \ isn't present &.WinConstantCount 0 here CALL wcEnumWin32Constants DROP then constant-tot ; *************** *** 140,145 **** cr 0 to constant-cnt ! WinConPtr proc>cfa @ dodefer = \ Leave if 'wcFindWin32Constant' ! if ." WINCON.DLL missing" EXIT then \ hasn't already been resolved cr ." ----------- Windows Constants " --- 140,145 ---- cr 0 to constant-cnt ! WinConlib load-dll 0= \ Leave if wincon.dll ! if ." WINCON.DLL missing" EXIT then \ isn't present cr ." ----------- Windows Constants " *************** *** 206,210 **** repeat 2drop else drop ! then r>drop @ dup 0= until drop ; --- 206,210 ---- repeat 2drop else drop ! then rdrop @ dup 0= until drop ; Index: CONTROL.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/CONTROL.F,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CONTROL.F 9 May 2007 07:46:40 -0000 1.9 --- CONTROL.F 21 May 2007 09:57:26 -0000 1.10 *************** *** 57,62 **** create &ButtonRect 4 cells allot \ temp rectangle for current info msg &ButtonRect 4 cells erase - create &CursorPoint 2 cells allot - &CursorPoint 2 cells erase 255 constant max-binfo \ longest info message allowed --- 57,60 ---- *************** *** 71,80 **** FALSE value mouse-is-down? - : get-mouse-xy { hWnd -- x y } - &CursorPoint Call GetCursorPos drop - &CursorPoint hWnd Call ScreenToClient drop - &CursorPoint @ - &CursorPoint cell+ @ ; - : in-button? { x y hWnd -- f1 } &ButtonRect hWnd Call GetClientRect drop --- 69,72 ---- Index: GENERIC.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/GENERIC.F,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** GENERIC.F 16 Apr 2007 08:29:06 -0000 1.15 --- GENERIC.F 21 May 2007 09:57:26 -0000 1.16 *************** *** 54,57 **** --- 54,66 ---- ' TempRect Alias wRect + \ Moved from control.f since it's also used by descendants of the class window. + \ Made thread-safe gah Sunday, May 20 2007 + : get-mouse-xy ( hWnd -- x y) \ W32F + \ *G Return the co-ordinates of the mouse pointer in window, hWnd. + { hWnd | CursorPoint.x CursorPoint.y -- x y } + &of CursorPoint.x Call GetCursorPos drop + &of CursorPoint.x hWnd Call ScreenToClient drop + CursorPoint.x CursorPoint.y ; + in-system |