blob: 072684e0154aa8dfeb165a6194d48444b20b5c53 (
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
|
;;; Harmonic Flow web site
(define-module (apps media types)
#:use-module (srfi srfi-9)
#:export (screenshot
screenshot?
screenshot-caption
screenshot-image
screenshot-preview
screenshot-slug
screenshot-title
))
;;;
;;; Data types.
;;;
;;; Screenshot (record type)
;;; ------------------------
;;;
;;; A screenshot object represents an image of a software view seen
;;; on a screen.
;;;
;;; Objects of this type can be created with the "screenshot"
;;; procedure (see Helper procedures below).
;;;
;;; Fields:
;;;
;;; title (string)
;;; A title for the screenshot.
;;;
;;; slug (string)
;;; Slug-like URL name for the screenshot. For example:
;;; gnome-3-desktop.
;;;
;;; image (string)
;;; A URL to the full size image of the screenshot.
;;;
;;; preview (string)
;;; A URL to a small size image of the screenshot.
;;;
;;; caption (string)
;;; A short text describing the screenshot.
;;;
(define-record-type <screenshot>
(make-screenshot title slug image preview caption)
screenshot?
(title screenshot-title)
(slug screenshot-slug)
(image screenshot-image)
(preview screenshot-preview)
(caption screenshot-caption))
;;; Helper procedures.
(define* (screenshot #:key title slug image preview caption)
"Return a <screenshot> object with the given attributes."
(make-screenshot title slug image preview caption))
|