From 2298e207a04603250c504624d5926c18ce47d764 Mon Sep 17 00:00:00 2001 From: frese Date: Thu, 8 Jan 2004 19:08:50 +0000 Subject: [PATCH] updated for current interface --- scheme/examples/hello-xft.scm | 12 +--- scheme/examples/hello.scm | 12 +--- scheme/examples/picture.scm | 68 +++++++++--------- scheme/examples/regions.scm | 127 ++++++++++++++++------------------ scheme/examples/scxev.scm | 50 ++++++------- 5 files changed, 123 insertions(+), 146 deletions(-) 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