]> git.donarmstrong.com Git - lilypond.git/blob - scm/safe-lily.scm
Add '-dcrop' option to ps and svg backends
[lilypond.git] / scm / safe-lily.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;;
5 ;;;; LilyPond is free software: you can redistribute it and/or modify
6 ;;;; it under the terms of the GNU General Public License as published by
7 ;;;; the Free Software Foundation, either version 3 of the License, or
8 ;;;; (at your option) any later version.
9 ;;;;
10 ;;;; LilyPond is distributed in the hope that it will be useful,
11 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ;;;; GNU General Public License for more details.
14 ;;;;
15 ;;;; You should have received a copy of the GNU General Public License
16 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
17
18 (for-each
19  (lambda (sym)
20    (set! safe-objects (cons (cons sym (primitive-eval sym))
21                             safe-objects)))
22  '(ly:add-interface
23    ly:moment-add
24    ly:all-grob-interfaces
25    ly:all-output-backend-commands
26    ly:all-stencil-expressions
27    ly:bracket
28    ly:context-find
29    ly:context-id
30    ly:context-name
31    ly:context-parent
32    ly:context-property
33    ly:context-property-where-defined
34    ly:context-pushpop-property
35    ly:context-set-property!
36    ly:context-unset-property
37    ly:context?
38    ly:dimension?
39    ly:dir?
40    ly:moment-div
41    ly:duration-dot-count
42    ly:duration-factor
43    ly:duration-log
44    ly:duration-scale
45    ly:duration<?
46    ly:duration?
47    ly:error
48    ly:font-get-glyph
49    ly:font-design-size
50    ly:font-file-name
51    ly:font-magnification
52    ly:font-metric?
53    ly:font-name
54    ly:format-output
55    ly:get-all-function-documentation
56    ly:get-all-translators
57    ly:get-option
58    ly:grob-alist-chain
59    ly:grob-default-font
60    ly:grob-extent
61    ly:grob-original
62    ly:grob-layout
63    ly:grob-parent
64    ly:grob-property
65    ly:grob-script-priority-less
66    ly:grob-set-property!
67    ly:grob-staff-position
68    ly:grob-suicide!
69    ly:grob-system
70    ly:grob-translate-axis!
71    ly:grob?
72    ly:input-file-line-char-column
73    ly:input-location?
74    ly:input-message
75    ly:intlog2
76    ly:item-break-dir
77    ly:item?
78    ly:iterator?
79    ly:make-music
80    ly:make-duration
81    ly:make-moment
82    ly:make-music-function
83    ly:make-pitch
84    ly:make-stencil
85    ly:moment<?
86    ly:moment?
87    ly:moment-mul
88    ly:music-compress
89    ly:music-deep-copy
90    ly:music-duration-compress
91    ly:music-duration-length
92    ly:music-length
93    ly:music-list?
94    ly:music-mutable-properties
95    ly:music-property
96    ly:make-score
97    ly:music-set-property!
98    ly:music-transpose
99    ly:music?
100    ly:lily-parser?
101    ly:message
102    ly:number->string
103    ly:option-usage
104    ly:output-def-clone
105    ly:output-def-lookup
106    ly:output-def-scope
107    ly:output-description
108    ly:paper-book?
109    ly:prob-property
110    ly:output-def?
111    ly:paper-get-font
112    ly:paper-get-number
113    ly:paper-system?
114    ly:parser-parse-string
115    ly:pitch-alteration
116    ly:pitch-diff
117    ly:pitch-notename
118    ly:pitch-octave
119    ly:pitch-quartertones
120    ly:pitch-semitones
121    ly:pitch-steps
122    ly:pitch-transpose
123    ly:pitch<?
124    ly:pitch?
125    ly:position-on-line?
126    ly:round-filled-box
127    ly:run-translator
128    ly:set-option
129    ly:spanner-broken-into
130    ly:spanner-bound
131    ly:spanner?
132    ly:staff-symbol-line-thickness
133    ly:stencil-add
134    ly:stencil-aligned-to
135    ly:stencil-combine-at-edge
136    ly:stencil-expr
137    ly:stencil-extent
138    ly:stencil-stack
139    ly:stencil-translate
140    ly:stencil-translate-axis
141    ly:stencil?
142    ly:translator-description
143    ly:translator-name
144    ly:translator?
145    ly:transpose-key-alist
146    ly:unit
147    ly:usage
148    ly:version
149    ly:warning
150
151    ;; FIXME: cannot change staff size in --safe-mode
152    ;;$defaultpaper
153    ;;$defaultmidi
154    ;;$defaultlayout
155
156    ly:accidental-interface::print
157    ly:arpeggio::print
158    ly:arpeggio::brew-chord-bracket
159    ly:bar-line::print
160    ly:breathing-sign::offset-callback
161    ly:clef::print
162    ly:cluster::print
163    ly:cluster-beacon::height
164    ly:custos::print
165    ly:dots::print
166    ly:hairpin::print
167    ly:hara-kiri-group-spanner::force-hara-kiri-callback
168    ly:hara-kiri-group-spanner::y-extent
169    ly:horizontal-bracket::print
170    ly:lyric-hyphen::print
171    ly:lyric-hyphen::set-spacing-rods
172    ly:key-signature-interface::print
173    ly:line-spanner::print
174    ly:lyric-extender::print
175    ly:measure-grouping::print
176    ly:mensural-ligature::brew-ligature-primitive
177    ly:mensural-ligature::print
178    ly:multi-measure-rest::percent
179    ly:multi-measure-rest::print
180    ly:multi-measure-rest::set-spacing-rods
181    ly:note-head::print
182    ly:ottava-bracket::print
183    ly:paper-column::print
184    ly:percent-repeat-item-interface::beat-slash
185    ly:percent-repeat-item-interface::double-percent
186    ly:piano-pedal-bracket::print
187    ly:rest::print
188    ly:script-interface::print
189    ly:slur::height
190    ly:slur::print
191    ly:spacing-spanner::set-springs
192    ly:span-bar::print
193    ly:spanner::set-spacing-rods
194    ly:staff-symbol::print
195    ly:staff-symbol-referencer::callback
196    ly:stem::height
197    ly:stem::offset-callback
198    ly:stem::print
199    ly:stem-tremolo::print
200    ly:sustain-pedal::print
201    ly:system-start-delimiter::print
202    ly:text-interface::print
203    ly:tie::print
204    ly:time-signature::print
205    ly:tuplet-bracket::print
206    ly:vaticana-ligature::brew-ligature-primitive
207    ly:vaticana-ligature::print
208    ly:volta-bracket-interface::print
209    ))
210
211 (define-public (make-safe-lilypond-module)
212   (let* ((m (make-safe-module)))
213     (for-each (lambda (p) (module-define! m (car p) (cdr p))) safe-objects)
214     m))