2 music-wrapper.cc -- implement Music_wrapper
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "music-wrapper.hh"
12 Music_wrapper::Music_wrapper (SCM x)
15 if (!ly_c_procedure_p (length_callback_))
16 length_callback_ = length_callback_proc;
20 MAKE_SCHEME_CALLBACK(Music_wrapper,length_callback,1);
22 Music_wrapper::length_callback (SCM m)
24 Music * me = unsmob_music (m);
25 Music *elt = unsmob_music (me->get_property ("element"));
26 return elt->get_length ().smobbed_copy ();
30 Music_wrapper::element () const
32 return unsmob_music (get_property ("element"));
36 ADD_MUSIC (Music_wrapper);
40 Music_wrapper::start_mom () const
42 return element ()->start_mom ();