]> git.donarmstrong.com Git - lilypond.git/blob - scm/safe-lily.scm
* lily/dynamic-engraver.cc (acknowledge_grob): attach hairpin
[lilypond.git] / scm / safe-lily.scm
1 ;;;; safe-lily.scm -- 
2 ;;;;
3 ;;;; source file of the GNU LilyPond music typesetter
4 ;;;; 
5 ;;;; (c)  2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6
7 (define safe-objects
8   (map
9    (lambda (sym)
10      (cons sym (primitive-eval sym)))
11    '(ly:add-interface
12      ly:add-moment
13      ly:all-grob-interfaces
14      ly:all-output-backend-commands
15      ly:all-stencil-expressions
16      ly:bracket
17      ly:context-find
18      ly:context-id
19      ly:context-name
20      ly:context-parent
21      ly:context-property
22      ly:context-property-where-defined
23      ly:context-pushpop-property
24      ly:context-set-property!
25      ly:context-unset-property
26      ly:context?
27      ly:dimension?
28      ly:dir?
29      ly:div-moment
30      ly:duration-dot-count
31      ly:duration-factor
32      ly:duration-log
33      ly:duration<?
34      ly:duration?
35      ly:export
36      ly:find-glyph-by-name
37      ly:font-design-size
38      ly:font-encoding-alist
39      ly:font-filename
40      ly:font-magnification
41      ly:font-metric?
42      ly:font-name
43      ly:format-output
44      ly:get-all-function-documentation
45      ly:get-all-translators
46      ly:get-default-font
47      ly:get-glyph
48      ly:get-option
49      ly:grob-alist-chain
50      ly:grob-extent
51      ly:grob-original
52      ly:grob-paper
53      ly:grob-parent
54      ly:grob-pq-less?
55      ly:grob-property
56      ly:grob-script-priority-less
57      ly:grob-set-property!
58      ly:grob-staff-position
59      ly:grob-suicide
60      ly:grob-system
61      ly:grob-translate-axis!
62      ly:grob?
63      ly:input-location
64      ly:input-location?
65      ly:input-message
66      ly:intlog2
67      ly:item-break-dir
68      ly:item?
69      ly:iterator?
70      ly:make-bare-music
71      ly:make-duration
72      ly:make-moment
73      ly:make-music-function
74      ly:make-pitch
75      ly:make-stencil
76      ly:moment<?
77      ly:moment?
78      ly:mul-moment
79      ly:music-compress
80      ly:music-deep-copy
81      ly:music-duration-compress
82      ly:music-duration-length
83      ly:music-length
84      ly:music-list?
85      ly:music-mutable-properties
86      ly:music-name
87      ly:music-property
88      ly:music-scorify
89      ly:music-set-property!
90      ly:music-transpose
91      ly:music?
92      ly:lily-parser?
93      ly:number->string
94      ly:option-usage
95      ly:output-def-clone
96      ly:output-def-scope
97      ly:output-description
98      ly:paper-book?
99      ly:paper-def?
100      ly:paper-get-font
101      ly:paper-get-number
102      ly:paper-system-break-penalty
103      ly:paper-system-extent
104      ly:paper-system-number
105      ly:paper-system-stencil
106      ly:paper-system?
107      ly:output-def-lookup
108      ly:parse-string
109      ly:parser-parse-string
110      ly:parser-print-book
111      ly:parser-print-score
112      ly:pitch-alteration
113      ly:pitch-diff
114      ly:pitch-notename
115      ly:pitch-octave
116      ly:pitch-quartertones
117      ly:pitch-semitones
118      ly:pitch-steps
119      ly:pitch-transpose
120      ly:pitch<?
121      ly:pitch?
122      ly:round-filled-box
123      ly:run-translator
124      ly:set-option
125      ly:set-point-and-click
126      ly:spanner-broken-into
127      ly:spanner-get-bound
128      ly:spanner?
129      ly:stencil-add
130      ly:stencil-align-to!
131      ly:stencil-combine-at-edge
132      ly:stencil-expr
133      ly:stencil-extent
134      ly:stencil-moved-to-edge
135      ly:stencil-set-extent!
136      ly:stencil-translate
137      ly:stencil-translate-axis
138      ly:stencil?
139      ly:text-dimension
140      ly:translator-description
141      ly:translator-name
142      ly:translator?
143      ly:transpose-key-alist
144      ly:unit
145      ly:version
146      ly:warn
147
148      ;; SCM-only functionality
149      set-global-staff-size
150
151      ;; FIXME: cannot change staff size in --safe-mode
152      ;;$defaultbookpaper
153      ;;$defaultmidi
154      ;;$defaultpaper
155
156      ;; need these for parsing init files:
157      ;; todo: should have a macro define-safe-public
158      DOUBLE-FLAT
159      DOUBLE-SHARP
160      FLAT
161      NATURAL
162      SEMI-FLAT
163      SEMI-SHARP
164      SEMI-TONE
165      SHARP
166      START
167      STOP
168      THREE-Q-FLAT
169      THREE-Q-SHARP
170
171      alist->hash-table
172      chord-name->german-markup
173      context-spec-music
174      default-chord-modifier-list
175      make-articulation
176      make-event-chord
177      make-music
178      make-penalty-music
179      make-span-event
180      make-voice-props-revert
181      make-voice-props-set
182      note-name->german-markup
183      sequential-music-to-chord-exceptions
184      set-default-paper-size
185      set-part-combine-listener
186      set-start-grace-properties
187      set-stop-grace-properties
188
189      Accidental_interface::after_line_breaking
190      Accidental_interface::print
191      Ambitus::print
192      Arpeggio::print
193      Arpeggio::brew_chord_bracket
194      Arpeggio::width_callback
195      Axis_group_interface::group_extent_callback
196      Bar_line::before_line_breaking
197      Bar_line::get_staff_bar_size
198      Bar_line::print
199      Beam::after_line_breaking
200      Beam::before_line_breaking
201      Beam::check_concave
202      Beam::least_squares
203      Beam::print
204      Beam::quanting
205      Beam::shift_region_to_valid
206      Beam::slope_damping
207      Beam::space_function
208      Break_align_interface::alignment_callback
209      Breathing_sign::offset_callback
210      Chord_name::after_line_breaking
211      Clef::before_line_breaking
212      Clef::print
213      Cluster::print
214      Cluster_beacon::height
215      Custos::print
216      Dot_column::side_position
217      Dots::print
218      Hairpin::print
219      Hara_kiri_group_spanner::force_hara_kiri_callback
220      Hara_kiri_group_spanner::y_extent
221      Horizontal_bracket::print
222      Hyphen_spanner::print
223      Hyphen_spanner::set_spacing_rods
224      Key_signature_interface::print
225      Line_spanner::after_line_breaking
226      Line_spanner::print
227      Lyric_extender::print
228      Measure_grouping::print
229      Mensural_ligature::brew_ligature_primitive
230      Mensural_ligature::print
231      Multi_measure_rest::percent
232      Multi_measure_rest::print
233      Multi_measure_rest::set_spacing_rods
234      Note_head::extent
235      Note_head::print
236      Note_head::brew_ez_stencil
237      Ottava_bracket::print
238      Paper_column::before_line_breaking
239      Paper_column::print
240      Percent_repeat_item_interface::beat_slash
241      Percent_repeat_item_interface::double_percent
242      Piano_pedal_bracket::print
243      Rest::after_line_breaking
244      Rest::extent_callback
245      Rest::polyphonic_offset_callback
246      Rest::print
247      Script_column::before_line_breaking
248      Script_interface::before_line_breaking
249      Script_interface::print
250      Self_alignment_interface::aligned_on_parent
251      Self_alignment_interface::aligned_on_self
252      Self_alignment_interface::centered_on_other_axis_parent
253      Self_alignment_interface::centered_on_parent
254      Separating_group_spanner::set_spacing_rods
255      Side_position_interface::aligned_on_support_refpoints
256      Side_position_interface::aligned_side
257      Slur::after_line_breaking
258      Slur::height
259      Slur::print
260      Spacing_spanner::set_springs
261      Span_bar::before_line_breaking
262      Span_bar::get_bar_size
263      Span_bar::print
264      Span_bar::width_callback
265      Spanner::set_spacing_rods
266      Staff_symbol::print
267      Staff_symbol_referencer::callback
268      Stem::before_line_breaking
269      Stem::dim_callback
270      Stem::height
271      Stem::off_callback
272      Stem::print
273      Stem_tremolo::height
274      Stem_tremolo::print
275      Sustain_pedal::print
276      System_start_delimiter::after_line_breaking
277      System_start_delimiter::print
278      Text_interface::print
279      Text_spanner::print
280      Tie::print
281      Tie_column::after_line_breaking
282      Time_signature::print
283      Tuplet_bracket::after_line_breaking
284      Tuplet_bracket::before_line_breaking
285      Tuplet_bracket::print
286      Vaticana_ligature::brew_ligature_primitive
287      Vaticana_ligature::print
288      Volta_bracket_interface::print
289      )))
290
291 (define-public (make-safe-lilypond-module)
292   (let* ((m (make-safe-module)))
293     (for-each (lambda (p) (module-define! m (car p) (cdr p))) safe-objects)
294     m))