blob: 7d2a56163dfd7a6456c3ceb2c21d15fb2c815289 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
;;
;; starlet/attributes.scm
;;
;; Copyright © 2022 Thomas White <taw@bitwiz.org.uk>
;;
;; This file is part of Starlet.
;;
;; Starlet is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;
(define-module (starlet attributes)
#:use-module (oop goops)
#:export (<starlet-attribute>
make-attribute
attribute?
intensity?
canonical-name))
(define-class <starlet-attribute> (<object>)
(canonical-name
#:init-keyword #:name
#:getter canonical-name))
(define (make-attribute canonical-name)
(make <starlet-attribute>
#:name canonical-name))
(define (attribute? a)
(is-a? a <starlet-attribute>))
(define-method (write (attribute <starlet-attribute>) port)
(write
(canonical-name attribute)
port))
(define-method (canonical-name whatever)
whatever)
;; The standard attribute names
;; Note that this list says nothing about the interpretation of the values
;; - that's left to the individual fixture definitions.
(define-public intensity (make-attribute 'intensity))
(define-public colour (make-attribute 'colour))
(define-public colour-temperature (make-attribute 'colour-temperature))
(define-public strobe (make-attribute 'strobe))
(define-public strobe-frequency (make-attribute 'strobe-frequency))
(define-public pan (make-attribute 'pan))
(define-public tilt (make-attribute 'tilt))
(define-public prism (make-attribute 'prism))
(define-public frost (make-attribute 'frost))
(define-public hotspot (make-attribute 'hotspot))
(define-public iris (make-attribute 'iris))
(define-public zoom (make-attribute 'zoom))
(define-public barndoor-rotation (make-attribute 'barndoor-rotation))
(define-public barndoor1 (make-attribute 'barndoor1))
(define-public barndoor2 (make-attribute 'barndoor2))
(define-public barndoor3 (make-attribute 'barndoor3))
(define-public barndoor4 (make-attribute 'barndoor4))
(define-public beamtype (make-attribute 'beamtype))
(define-public colwheel (make-attribute 'colwheel))
(define-public gobo (make-attribute 'gobo))
;; Duplicate names for convenience...
(define-public color colour)
(define-public color-temperature colour-temperature)
(define (intensity? a)
(eq? intensity a))
|