]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context.cc
Small additions from mailist.
[lilypond.git] / lily / context.cc
index 3eef6e51ea9e22105ca3d4799271ff124fcdc1e9..5e97a6171de24c24830548e4c141ed763d587dac 100644 (file)
@@ -262,8 +262,7 @@ Context::create_context (Context_def *cdef,
                      ly_symbol2scm ("unique"), scm_int2num (unique),
                      ly_symbol2scm ("ops"), ops,
                      ly_symbol2scm ("type"), cdef->get_context_name (),
-                     ly_symbol2scm ("id"), scm_makfrom0str (id.c_str ()),
-                    0);
+                     ly_symbol2scm ("id"), scm_makfrom0str (id.c_str ()));
 
   return new_context;
 }
@@ -346,6 +345,11 @@ Context::internal_get_property (SCM sym) const
   return val;
 }
 
+/*
+Called by the send_stream_event macro. props is a 0-terminated array of
+properties and corresponding values, interleaved. This method should not
+be called from any other place than the send_stream_event macro.
+*/
 void
 Context::internal_send_stream_event (SCM type, SCM props[])
 {
@@ -656,3 +660,16 @@ set_context_property_on_children (Context *trans, SCM sym, SCM val)
       set_context_property_on_children (trg, sym, ly_deep_copy (val));
     }
 }
+
+bool
+melisma_busy (Context *tr)
+{
+  SCM melisma_properties = tr->get_property ("melismaBusyProperties");
+  bool busy = false;
+
+  for (; scm_is_pair (melisma_properties);
+       melisma_properties = scm_cdr (melisma_properties))
+    busy = busy || to_boolean (tr->internal_get_property (scm_car (melisma_properties)));
+
+  return busy;
+}