Commit 90d94bde authored by bp's avatar bp
Browse files

Cleanup of wextend

git-svn-id: https://forth-ev.de/repos/bigforth@1682 3b8d8251-53f3-0310-8f3b-fd1cb8370982
parent 76740ca1
This diff is collapsed.
......@@ -734,18 +734,18 @@ private:
dup $500 = emulate-3button @ and IF $700 xor THEN
nip shift@ or ;
: !xyclick ( event -- ) click^ >r
MSG lparam @ >lohi swap r> w!+ w! ;
MSG lparam lohi@ swap r> w!+ w! ;
: sendclick ( count event -- )
flags #pending +bit click^ >r
dup MSG wparam @ >mshift swap
MSG lparam @ >lohi swap r> w!+ w!+ w!+ w! ;
MSG lparam lohi@ swap r> w!+ w!+ w!+ w! ;
\ Display 19jan00py
: in-time? ( time flag -- flag )
lasttime @ rot swap - lastclick @ =
IF sameclick ELSE twoclicks THEN < ;
: samepos? ( event -- flag ) flags #pending bit@
IF MSG lparam @ >lohi ( swap ) click^ w@+ w@ p-
IF MSG lparam lohi@ ( swap ) click^ w@+ w@ p-
dup * swap dup * + samepos <
ELSE drop false THEN ;
: moreclicks ( -- )
......@@ -799,7 +799,7 @@ private:
: sendwheel ( event -- ) flags #pending +bit
dup MSG wparam @ >wshift drop 0 ?DO
dup MSG wparam @ >wshift nip I 2+ swap
over2 MSG lparam @ >lohi y @ - swap x @ -
over2 MSG lparam lohi@ y @ - swap x @ -
click^ w!+ w!+ w!+ w!
moreclicks
2 +LOOP drop ;
......
......@@ -240,13 +240,14 @@ Variable (poly#
[defined] win32 [IF] Variable (poly'' [THEN]
2Variable (lastp
: wsat ( n -- w ) $7FFF min -$8000 max ;
: <poly ( x y -- x y ) (poly# off (poly' @ 0=
IF $1000 NewPtr (poly' !
[defined] win32 [IF] $2008 NewPtr (poly'' ! (poly' @ off [THEN]
THEN 2dup (lastp 2! ;
: poly' ( -- addr ) (poly' @ (poly# @ cells + ;
: poly, ( dx dy -- ) 2dup (lastp 2@ p+ (lastp 2!
1 (poly# +! swap poly' w!+ w! ;
1 (poly# +! wsat swap wsat poly' w!+ w! ;
: poly# ( x y -- ) (lastp 2@ p- poly, ;
: poly> ( -- addr n ) (poly' @ (poly# @ 1+ ;
......@@ -454,6 +455,7 @@ Code WinProc ( R: lparam wparam msg wnd ret -- result ) R:
>c: R: sys-sp A#) pop OP pop UP pop SI pop
$10 # ret end-code
: >lohi ( lparam -- lo hi ) dup wextend swap $10 >> ;
: lohi@ ( addr -- lo hi ) wx@+ wx@ ;
: hilo> ( lo hi -- lparam ) $10 << swap $FFFF and or ;
Create Xform0 $3F800000 , 0 , 0 , $3F800000 , 0 , 0 , 0 , 0 ,
......
......@@ -99,7 +99,7 @@ how: : init ( -- ) ;
: draw ( -- ) flags #hidden bit@ ?EXIT
flags #draw bit@ 0= ?EXIT
xwin @ noback @ 0= and redraw-all @ 0= and
IF x @ y @ or \ ugly workaround
IF true \ x @ y @ or \ ugly workaround
IF 0 0 w @ h @ x @ y @
[defined] win32 [IF] xrc dc @ dpy image
[ELSE] xpict @ IF -1 xpict @ dpy mask
......
......@@ -314,7 +314,7 @@ public: defer drawer defer pixel
\ canvas 22jun02py
how: : init ( xt ac w w+ h h+ -- ) super init ^^ bind outer
>callback IS drawer down #360 coord ! $0D030C color ! ;
: pixel, xp 2@ p+ 2dup xp 2! wextend swap wextend pixel ;
: pixel, xp 2@ p+ 2dup xp 2! swap pixel ;
: dx+ ( d -- n ) dx @ extend d+ swap dup dx ! 0< - ;
: dy+ ( d -- n ) dy @ extend d+ swap dup dy ! 0< - ;
: draw flags #hidden bit@ ?EXIT clear ^ drawer ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment