- updated to use the new enumerated types.
This commit is contained in:
parent
b4f1bcad78
commit
7c9aac7f17
|
@ -5,7 +5,6 @@
|
||||||
,batch on
|
,batch on
|
||||||
|
|
||||||
,open xlib
|
,open xlib
|
||||||
,batch off
|
|
||||||
|
|
||||||
(define (hello text)
|
(define (hello text)
|
||||||
(let* ((dpy (open-display))
|
(let* ((dpy (open-display))
|
||||||
|
@ -18,15 +17,18 @@
|
||||||
(green (alloc-named-color cm "#00FF00"))
|
(green (alloc-named-color cm "#00FF00"))
|
||||||
(red (alloc-named-color cm 'red))
|
(red (alloc-named-color cm 'red))
|
||||||
|
|
||||||
(win (create-window (display-default-root-window dpy)
|
(win (create-window
|
||||||
300 200
|
(display-default-root-window dpy)
|
||||||
'event-mask '(exposure button-press)
|
100 200 300 200 10
|
||||||
'background-pixel white
|
'copy-from-parent 'copy-from-parent 'copy-from-parent
|
||||||
'colormap cm))
|
(quasiquote
|
||||||
(gc (create-gcontext win
|
((,(set-window-attribute event-mask) . (exposure button-press))
|
||||||
'background white
|
(,(set-window-attribute background-pixel) . ,white)
|
||||||
'foreground black
|
(,(set-window-attribute colormap) . ,cm)))))
|
||||||
))
|
(gc (create-gcontext
|
||||||
|
win
|
||||||
|
(list (cons (gc-value background) white)
|
||||||
|
(cons (gc-value 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"))
|
||||||
|
@ -55,5 +57,5 @@
|
||||||
(hello "Hello World!")
|
(hello "Hello World!")
|
||||||
|
|
||||||
,exit
|
,exit
|
||||||
y
|
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue