]> git.donarmstrong.com Git - lilypond.git/blob - lily/music-wrapper.cc
Run `make grand-replace'.
[lilypond.git] / lily / music-wrapper.cc
1 /*
2   music-wrapper.cc -- implement Music_wrapper
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #include "music-wrapper.hh"
10
11 #include "music.hh"
12
13 MAKE_SCHEME_CALLBACK (Music_wrapper, start_callback, 1);
14 SCM
15 Music_wrapper::start_callback (SCM m)
16 {
17   Music *me = unsmob_music (m);
18   Music *elt = unsmob_music (me->get_property ("element"));
19   if (elt)
20     return elt->start_mom ().smobbed_copy ();
21   else
22     return Moment ().smobbed_copy ();
23 }
24
25 MAKE_SCHEME_CALLBACK (Music_wrapper, length_callback, 1);
26 SCM
27 Music_wrapper::length_callback (SCM m)
28 {
29   Music *me = unsmob_music (m);
30   Music *elt = unsmob_music (me->get_property ("element"));
31   if (elt)
32     return elt->get_length ().smobbed_copy ();
33   else
34     return Moment (0).smobbed_copy ();
35 }
36