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>
9 #include "lily-guile.hh"
10 #include "std-string.hh"
12 static SCM all_ifaces
;
15 internal_add_interface (SCM a
, SCM b
, SCM c
)
19 SCM tab
= scm_c_make_hash_table (59);
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",
44 "Get a hash table with all interface descriptions.")