Update from Andrew: tweaks for cross-staff chords snippet.
[lilypond.git] / lily / grob-interface-scheme.cc
blob3438f7b3ec3455e0ff0ad0359614b980b3834ded
1 /*
2 grob-interface-scheme.cc -- implement grob interface bindings.
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "lily-guile.hh"
10 #include "std-string.hh"
12 static SCM all_ifaces;
14 void
15 internal_add_interface (SCM a, SCM b, SCM c)
17 if (!all_ifaces)
19 SCM tab = scm_c_make_hash_table (59);
20 all_ifaces = tab;
21 scm_permanent_object (tab);
24 SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
26 scm_hashq_set_x (all_ifaces, a, entry);
29 LY_DEFINE (ly_add_interface, "ly:add-interface",
30 3, 0, 0, (SCM a, SCM b, SCM c),
31 "Add an interface description.")
33 LY_ASSERT_TYPE (ly_is_symbol, a, 1);
34 LY_ASSERT_TYPE (scm_is_string, b, 2);
35 LY_ASSERT_TYPE (ly_is_list, c, 3);
37 internal_add_interface (a,b,c);
39 return SCM_UNSPECIFIED;
42 LY_DEFINE (ly_all_grob_interfaces, "ly:all-grob-interfaces",
43 0, 0, 0, (),
44 "Get a hash table with all interface descriptions.")
46 return all_ifaces;