]> git.donarmstrong.com Git - lilypond.git/blob - lily/stencil-expression.cc
fb60ae26f8458e8c865fcd6f900e06239c56fdf5
[lilypond.git] / lily / stencil-expression.cc
1 /*
2   stencil-expression.cc -- keep track of which expressions are valid
3   stencil exps.
4
5   source file of the GNU LilyPond music typesetter
6
7   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
8 */
9
10 #include "stencil.hh"
11
12 #include "protected-scm.hh"
13
14 static Protected_scm heads = SCM_EOL;
15
16 void register_stencil_head (SCM symbol)
17 {
18   scm_set_object_property_x (symbol, ly_symbol2scm ("stencil-head?"), SCM_BOOL_T);
19   heads = scm_cons (symbol, heads);
20 }
21 bool
22 is_stencil_head (SCM symbol)
23 {
24   return scm_object_property (symbol, ly_symbol2scm ("stencil-head?"))
25     == SCM_BOOL_T;
26 }
27
28 SCM
29 all_stencil_heads ()
30 {
31   return heads;
32 }
33