add forgotten file

original commit: 8a30ed73b7e569faf809ca4cd4fa76b61bbd66c6
This commit is contained in:
Robby Findler 2011-09-05 09:41:49 -05:00
parent b25c7cf3b1
commit b16c4e9076

View File

@ -0,0 +1,13 @@
#lang racket/base
(require racket/gui/base racket/class)
(provide frame:lookup-focus-table
frame:set-focus-table)
;; focus-table : hash[eventspace -o> (listof frame)]
(define focus-table (make-hash))
(define (frame:lookup-focus-table [eventspace (current-eventspace)])
(hash-ref focus-table eventspace '()))
(define (frame:set-focus-table eventspace new)
(if (null? new)
(hash-remove! focus-table eventspace)
(hash-set! focus-table eventspace new)))