polished comments for Kathy

svn: r2764
This commit is contained in:
Matthias Felleisen 2006-04-24 16:09:10 +00:00
parent 9e23d915ee
commit 812f9b0257
3 changed files with 12 additions and 5 deletions

View File

@ -14,9 +14,6 @@ public class Canvas {
protected native boolean stop();
// I need to figure out how to accomplish these two things, especially stop,
// directly at the Scheme level w/o going thru the Java layer.
// BUG: this is actually a bug in ProfessorJ. Making these protected should
// work just fine. Indeed, leaving off the access control qualifier should
// work, too. (That's package protected.)
public native boolean show();
public native boolean close();

View File

@ -98,7 +98,16 @@
(define (stop-native this accs gets privates)
(wrap-start-check ([hash-table-get privates '%end-of-time])))
;; (copy) restores the viewport and the pixmap so that
;; (end-draw-sequence) can copy the pixmap into the viewport.
;; It also clears the pixmap from anything that was on there.
;; design rationale: the closure is created during the initializtion
;; of the world (big-bang) and thus encapsulates access to the actual
;; values of pixmap and viewport. big-bang exists once and for
;; all and thus can't encapsulate the values.
;; Alternative: expose these values as a "token", which big-bang must
;; install. I couldn't figure out how to do this at the time.
(define (copy-native this accs gets privates)
(wrap-start-check ([hash-table-get privates 'copy])))
@ -181,7 +190,7 @@
void-or-true)
(define (endOfTime-native this accs gets privates)
(define theCanvas ((hash-table-get accs 'theCanvas) this))
(define theCanvas ((hash-table-get accs 'theCanvas) this))
(send theCanvas stop)
#t)

View File

@ -226,6 +226,7 @@
#t)))
(hash-table-put! h '%stop %stop)
;; ---
;; see ../htdch/draw/support.scm (copy) for explanation and design rationale
(hash-table-put! h 'copy (lambda () (set! @vp vp*) (set! @pm pm*) [(clear-viewport pm*)]))
;; ---
;; --- the following can't happend during a draw sequence ---