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