diff --git a/scheme/examples/hello-xft.scm b/scheme/examples/hello-xft.scm index fa125f6..c252b10 100755 --- a/scheme/examples/hello-xft.scm +++ b/scheme/examples/hello-xft.scm @@ -1,10 +1,6 @@ #!/bin/sh - -../../scx <exact xf) (inexact->exact yf))) - (draw-points win gc (- count 1) - (- (* y (+ 1 (sin (* 0.7 x)))) (* 1.2 (sqrt (abs x)))) + (draw-point dpy win gc (inexact->exact xf) (inexact->exact yf)) + (draw-points dpy win gc + (- count 1) + (- (* y (+ 1 (sin (* 0.7 x)))) + (* 1.2 (sqrt (abs x)))) (- 0.21 x) hw hh)))) (picture 1000) - -,exit -y -EOF diff --git a/scheme/examples/regions.scm b/scheme/examples/regions.scm index 20042c1..f3a2cc9 100755 --- a/scheme/examples/regions.scm +++ b/scheme/examples/regions.scm @@ -1,73 +1,68 @@ -../../scx <property '("scx Event Listener"))) + (map-window dpy win) + + (init-sync-x-events dpy) + (call-with-event-channel + dpy win all-events-mask + (lambda (channel) + (let loop () + (let ((e (receive channel))) + (display (any-event-type e)) (display " on window ") + (display (any-event-window e)) (newline) + (if (not (destroy-window-event? e)) + (loop)))))))) (scxev) - -,exit -y -EOF \ No newline at end of file