Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(626)

Unified Diff: lily/engraver-scheme.cc

Issue 1869047: Merge branch 'master' of git://git.sv.gnu.org/lilypond into spanner (Closed)
Patch Set: Created 14 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lily/include/engraver.hh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/engraver-scheme.cc
diff --git a/lily/engraver-scheme.cc b/lily/engraver-scheme.cc
index c2cbe1ace4ee3642df487fbb7e1ee75a7a468e26..adbbff326b9dae11c91efe7df723505faecff26a 100644
--- a/lily/engraver-scheme.cc
+++ b/lily/engraver-scheme.cc
@@ -19,6 +19,7 @@
#include "engraver.hh"
#include "grob.hh"
+#include "spanner.hh"
LY_DEFINE (ly_engraver_make_grob, "ly:engraver-make-grob",
3, 0, 0, (SCM engraver, SCM grob_name, SCM cause),
@@ -38,3 +39,21 @@ LY_DEFINE (ly_engraver_make_grob, "ly:engraver-make-grob",
return g->self_scm ();
}
+LY_DEFINE (ly_engraver_make_spanner, "ly:engraver-make-spanner",
+ 3, 0, 0, (SCM engraver, SCM spanner_name, SCM cause),
+ "Creates a spanner originating from given engraver instance, "
+ "with give @code{grob_name}, a symbol. "
+ "@code{cause} should either be another grob "
+ "or a music event.")
+{
+ LY_ASSERT_TYPE (unsmob_engraver, engraver, 1);
+ LY_ASSERT_TYPE (ly_is_symbol, spanner_name, 2);
+ LY_ASSERT_TYPE (ly_is_grob_cause, cause, 3);
+
+ Spanner *s = unsmob_engraver (engraver)->
+ internal_make_spanner(spanner_name, cause,
+ ly_symbol2string (spanner_name).c_str (),
+ "scheme", 0, "scheme");
+ return s->self_scm ();
+}
+
« no previous file with comments | « no previous file | lily/include/engraver.hh » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b