Remove unused prototype in score.hh.
[lilypond/mpolesky.git] / lily / spanner-scheme.cc
blobd733996430778378bf2c3a9d136ca65b85f527ff
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2007--2010 Han-Wen Nienhuys <hanwen@lilypond.org>
7 LilyPond is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 LilyPond is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
21 #include "spanner.hh"
22 #include "item.hh"
24 LY_DEFINE (ly_spanner_bound, "ly:spanner-bound",
25 2, 0, 0, (SCM spanner, SCM dir),
26 "Get one of the bounds of @var{spanner}. @var{dir} is @code{-1}"
27 " for left, and @code{1} for right.")
29 LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
30 LY_ASSERT_TYPE (is_direction, dir, 2);
32 return unsmob_spanner (spanner)->get_bound (to_dir (dir))->self_scm ();
35 /* TODO: maybe we should return a vector -- random access is more
36 logical for this list? */
37 LY_DEFINE (ly_spanner_broken_into, "ly:spanner-broken-into",
38 1, 0, 0, (SCM spanner),
39 "Return broken-into list for @var{spanner}.")
41 LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
42 Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (spanner));
44 SCM s = SCM_EOL;
45 for (vsize i = me->broken_intos_.size (); i--;)
46 s = scm_cons (me->broken_intos_[i]->self_scm (), s);
47 return s;
50 LY_DEFINE (ly_spanner_p, "ly:spanner?",
51 1, 0, 0, (SCM g),
52 "Is @var{g} a spanner object?")
54 Grob *me = unsmob_grob (g);
55 bool b = dynamic_cast<Spanner *> (me);
57 return ly_bool2scm (b);