#!/bin/sh ../../scx <property '("scx Hello World Program"))) (spawn (lambda () (let loop ((se (most-recent-sync-x-event))) (display "event: ") (display (sync-x-event-event se)) (display "\n") (loop (next-sync-x-event se (lambda (e) #t)))))) ;;(synchronize dpy #f) (init-sync-x-events dpy) (let ((handler (lambda (channel) (map-window dpy win) (let loop () (if (let ((e (receive channel))) (cond ((expose-event? e) (set-gc-font! dpy gc font) (set-gc-foreground! dpy gc black) (draw-image-string dpy win gc 10 65 text) (set-gc-foreground! dpy gc green) (draw-text dpy win gc 20 40 (make-text-items text (change-font font2) (with-delta 20 text)))) ((motion-event? e) #t) (else #f))) (loop)))))) (call-with-event-channel dpy win (event-mask exposure button-press pointer-motion) handler) (close-display dpy)))) (hello "Hello World!") ,exit EOF