- updated to new interface.

This commit is contained in:
frese 2002-02-08 17:10:45 +00:00
parent 10558fa5f0
commit 674a796cec
1 changed files with 18 additions and 18 deletions

View File

@ -21,14 +21,14 @@
(display-default-root-window dpy) (display-default-root-window dpy)
100 200 300 200 10 100 200 300 200 10
'copy-from-parent 'copy-from-parent 'copy-from-parent 'copy-from-parent 'copy-from-parent 'copy-from-parent
(quasiquote (make-set-window-attribute-alist
((,(set-window-attribute event-mask) . (exposure button-press)) (event-mask (event-mask exposure button-press))
(,(set-window-attribute background-pixel) . ,white) (background-pixel white)
(,(set-window-attribute colormap) . ,cm))))) (colormap cm))))
(gc (create-gcontext (gc (create-gcontext
win win
(list (cons (gc-value background) white) (make-gc-value-alist (background white)
(cons (gc-value foreground) black)))) (foreground black))))
(font (open-font dpy "*-new century schoolbook-bold-r*24*")) (font (open-font dpy "*-new century schoolbook-bold-r*24*"))
(font2 (open-font dpy "*times*18*"))) (font2 (open-font dpy "*times*18*")))
(set-wm-name! win '("scx Hello World Program")) (set-wm-name! win '("scx Hello World Program"))
@ -38,18 +38,18 @@
(display-flush-output dpy) (display-flush-output dpy)
(let ((e (wait-event dpy))) (let ((e (wait-event dpy)))
(if (if
(case (event-type e) (cond
((expose) ((expose-event? e)
(set-gcontext-font! gc font) (set-gcontext-font! gc font)
(set-gcontext-foreground! gc black) (set-gcontext-foreground! gc black)
(draw-poly-text win gc 10 25 text '1-byte) (draw-poly-text win gc 10 25 text '1-byte)
(set-gcontext-foreground! gc blue) (set-gcontext-foreground! gc blue)
(draw-poly-text win gc 20 50 (list font text) '1-byte) (draw-poly-text win gc 20 50 (list font text) '1-byte)
(set-gcontext-foreground! gc red) (set-gcontext-foreground! gc red)
(set-gcontext-font! gc font2) (set-gcontext-font! gc font2)
(draw-image-text win gc 30 75 text '1-byte) (draw-image-text win gc 30 75 text '1-byte)
#t) #t)
(else #f)) (else #f))
(event-loop) (event-loop)
#f))) #f)))
(close-display dpy))) (close-display dpy)))