23 lines
1.0 KiB
Scheme
23 lines
1.0 KiB
Scheme
;(define (drawable-abstraction pixmap-fun window-fun)
|
|
; (lambda (drawable)
|
|
; (cond
|
|
; ((pixmap? drawable) (pixmap-fun drawable))
|
|
; ((window? drawable) (window-fun drawable))
|
|
; (else (error "expected a drawable object" drawable)))))
|
|
|
|
;(define drawable-display (drawable-abstraction pixmap-display window-display))
|
|
;(define drawable-Xobject (drawable-abstraction pixmap-Xpixmap window-Xwindow))
|
|
|
|
;; not so sure with pixmap-root, not found in Elk.
|
|
(define drawable-root (drawable-abstraction (lambda (pixm)
|
|
(display-default-root-window
|
|
(pixmap-display pixm)))
|
|
window-root))
|
|
(define drawable-x (drawable-abstraction pixmap-x window-x))
|
|
(define drawable-y (drawable-abstraction pixmap-y window-y))
|
|
(define drawable-width (drawable-abstraction pixmap-width window-width))
|
|
(define drawable-height (drawable-abstraction pixmap-height window-height))
|
|
(define drawable-border-width (drawable-abstraction pixmap-border-width
|
|
window-border-width))
|
|
(define drawable-depth (drawable-abstraction pixmap-depth window-depth))
|