home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-02-08 | 1.1 KB | 49 lines | [TEXT/MACA] |
- ( Blackout - Paints the entire Macintosh screen black and waits for <cr> )
-
- :CLASS ViewPort <Super GrafPort
-
- ( -- ) ( Initialize the grafport structure )
- :M NEW: (abs) call OpenPort ;M
-
- ( -- ) ( Paint the whole grafport rectangle )
- :M Paint: paint: PortRect ;M
-
- ;CLASS
-
- ViewPort Port
-
- : ScreenBits
- $ 904 -base @ ( currentA5 -- )
- -base @ ( <address of quickdraw globals> -- )
- $ FFFFFF86 + ( <address of screenbits> -- )
- $ 6 + ( <address of bounds rect> -- )
- dup ( adr adr -- )
- -base @ ( adr <first point> -- )
- unpack ( adr l t -- )
- rot ( l t adr -- )
- $ 4 + ( l t <adr of second point> -- )
- -base @ ( l t point -- )
- unpack ( l t r b )
- ;
-
- ( WaitCR - waits for a <cr> )
- : WaitCR BEGIN $ 0D key = UNTIL ;
-
- ( hidemouse - hides the cursor )
- : HideMouse call HideCursor ;
-
- ( showmouse - shows the cursor )
- : ShowMouse call ShowCursor ;
-
- ( BlackOut - the word that starts it all )
- : BlackOut
- HideMouse
- SavePort
- New: Port
- ScreenBits PutRect: Port
- Paint: Port
- WaitCR
- ShowMouse
- RestPort
- ;
-