2 grob-interface-scheme.cc -- implement grob interface bindings.
4 source file of the GNU LilyPond music typesetter
6 (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #include "lily-guile.hh"
10 #include "protected-scm.hh"
13 Protected_scm all_ifaces;
15 LY_DEFINE (ly_add_interface, "ly:add-interface",
16 3, 0, 0, (SCM a, SCM b, SCM c),
17 "Add an interface description.")
19 SCM_ASSERT_TYPE (scm_is_symbol (a), a, SCM_ARG1, __FUNCTION__, "symbol");
20 SCM_ASSERT_TYPE (scm_is_string (b), b, SCM_ARG2, __FUNCTION__, "string");
21 SCM_ASSERT_TYPE (ly_is_list (c), c, SCM_ARG3, __FUNCTION__, "list of syms");
22 if (!scm_is_vector (all_ifaces))
23 all_ifaces = scm_make_vector (scm_from_int (40), SCM_EOL);
25 SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
27 scm_hashq_set_x (all_ifaces, a, entry);
29 return SCM_UNSPECIFIED;
32 LY_DEFINE (ly_all_grob_interfaces, "ly:all-grob-interfaces",
34 "Get a hash table with all interface descriptions.")