]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob-scheme.cc
Release: bump Welcome versions.
[lilypond.git] / lily / grob-scheme.cc
index 0924b0a58dab8699abde6cc5b2c87b104f86a6a5..572a49ac84afcf788be814ce2a00c2e6c0fde05f 100644 (file)
@@ -23,7 +23,6 @@
 #include "item.hh"
 #include "output-def.hh"
 #include "paper-score.hh"
-#include "simple-closure.hh"
 #include "system.hh"
 #include "unpure-pure-container.hh"
 #include "warn.hh"              // error ()
@@ -51,7 +50,6 @@ LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!",
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   if (!ly_is_procedure (val)
-      && !unsmob<Simple_closure> (val)
       && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
     error ("typecheck failed");
 
@@ -482,3 +480,18 @@ LY_DEFINE (ly_grob_get_vertical_axis_group_index, "ly:grob-get-vertical-axis-gro
 
   return scm_from_int (Grob::get_vertical_axis_group_index (gr));
 }
+
+LY_DEFINE (ly_grob_spanned_rank_interval, "ly:grob-spanned-rank-interval",
+           1, 0, 0, (SCM grob),
+           "Returns a pair with the @code{rank} of the furthest left"
+           " column and the @code{rank} of the furthest right column"
+           " spanned by @code{grob}.")
+{
+  Grob *gr = unsmob<Grob> (grob);
+
+  LY_ASSERT_SMOB (Grob, grob, 1);
+
+  Interval_t<int> iv = gr->spanned_rank_interval ();
+
+  return scm_cons (scm_from_int(iv[LEFT]), scm_from_int(iv[RIGHT]));
+}