X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmusic-wrapper.cc;h=456af661cc339379d0e9d30150584be71002789c;hb=60e6486425fd08ee69e3e383ca5183d058bca037;hp=d6995ac664988b55182f7cf04e5f3d6a9aa50ea1;hpb=1081732046b59df1d2a429e0a11ff4f8140bcf92;p=lilypond.git diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index d6995ac664..456af661cc 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -1,37 +1,30 @@ -/* - music-wrapper.cc -- implement Music_wrapper - +/* + music-wrapper.cc -- implement Music_wrapper + source file of the GNU LilyPond music typesetter - - (c) 1998--2004 Han-Wen Nienhuys - - */ + + (c) 1998--2006 Han-Wen Nienhuys +*/ #include "music-wrapper.hh" -Music_wrapper::Music_wrapper (SCM x) - : Music (x) -{ -} +#include "music.hh" -Moment -Music_wrapper::get_length () const +MAKE_SCHEME_CALLBACK (Music_wrapper, start_callback, 1); +SCM +Music_wrapper::start_callback (SCM m) { - return element ()->get_length (); + Music *me = unsmob_music (m); + Music *elt = unsmob_music (me->get_property ("element")); + return elt->start_mom ().smobbed_copy (); } -Music* -Music_wrapper::element () const +MAKE_SCHEME_CALLBACK (Music_wrapper, length_callback, 1); +SCM +Music_wrapper::length_callback (SCM m) { - return unsmob_music (get_property ("element")); + Music *me = unsmob_music (m); + Music *elt = unsmob_music (me->get_property ("element")); + return elt->get_length ().smobbed_copy (); } - -ADD_MUSIC (Music_wrapper); - - -Moment -Music_wrapper::start_mom () const -{ - return element ()->start_mom (); -}