summaryrefslogtreecommitdiff
path: root/2d
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-12-01 17:33:38 -0500
committerDavid Thompson <dthompson@member.fsf.org>2013-12-01 17:33:38 -0500
commit01d4ad4394760689cb8422f83113e0ec9ba1908e (patch)
treeb7f31c15ef7505d2db6f5f1939dbcddd5dd4c2a1 /2d
parent74f4c53121036ae7b20c2605d5e52115f87debce (diff)
Rename signal-listeners to signal-connectors.
* 2d/signals.scm: Replace "listeners" with "connectors".
Diffstat (limited to '2d')
-rw-r--r--2d/signals.scm20
1 files changed, 10 insertions, 10 deletions
diff --git a/2d/signals.scm b/2d/signals.scm
index dc6ef06..1f776ed 100644
--- a/2d/signals.scm
+++ b/2d/signals.scm
@@ -32,7 +32,7 @@
signal-ref-maybe
signal-transformer
signal-filter
- signal-listeners
+ signal-connectors
signal-connect!
signal-disconnect!
signal-clear!
@@ -60,12 +60,12 @@
;; programming. State mutation is hidden away and a functional,
;; declarative interface is exposed.
(define-record-type <signal>
- (%make-signal value transformer filter listeners)
+ (%make-signal value transformer filter connectors)
signal?
(value signal-ref %signal-set!)
(transformer signal-transformer)
(filter signal-filter)
- (listeners signal-listeners %set-signal-listeners!))
+ (connectors signal-connectors %set-signal-connectors!))
(define (keep-all value old from)
"Keep all values."
@@ -95,20 +95,20 @@ otherwise."
(define (signal-connect! signal listener)
"Attach LISTENER to SIGNAL. When the value of SIGNAL changes, the
value will be propagated to LISTENER."
- (%set-signal-listeners!
+ (%set-signal-connectors!
signal
- (cons listener (signal-listeners signal)))
+ (cons listener (signal-connectors signal)))
(signal-set! listener (signal-ref signal)))
(define (signal-disconnect! signal listener)
"Detach LISTENER from SIGNAL."
- (%set-signal-listeners!
+ (%set-signal-connectors!
signal
- (delete listener (signal-listeners signal) eq?)))
+ (delete listener (signal-connectors signal) eq?)))
(define (signal-clear! signal)
- "Detach all listeners from SIGNAL."
- (%set-signal-listeners! signal '()))
+ "Detach all connectors from SIGNAL."
+ (%set-signal-connectors! signal '()))
(define* (signal-set! signal value #:optional (from #f))
"Set VALUE for SIGNAL from the connected signal FROM and
@@ -116,7 +116,7 @@ propagate VALUE to all connected signals. "
(let ((value (%signal-transform signal value from)))
(%signal-set! signal value)
(for-each (cut signal-receive! <> value signal)
- (signal-listeners signal))))
+ (signal-connectors signal))))
(define (signal-keep? signal value from)
"Call the filter procedure for SIGNAL with VALUE."