]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into translation
authorJean-Charles Malahieude <lilyfan@orange.fr>
Sun, 19 Feb 2017 12:23:26 +0000 (13:23 +0100)
committerJean-Charles Malahieude <lilyfan@orange.fr>
Sun, 19 Feb 2017 12:23:26 +0000 (13:23 +0100)
Documentation/de/notation/ancient.itely
Documentation/web/community.itexi
lily/context.cc
lily/global-context-scheme.cc
lily/global-context.cc
lily/grace-iterator.cc
lily/include/context.hh

index 4d777e2b92f3f7db9442544538bb1e7f0ac9efe5..44990fd0f5f95f1dbeeaae18f7c8cc58e98ee550 100644 (file)
@@ -528,12 +528,11 @@ Beispiel den Schlüssel auf der zweiten Linie)
 Mensuraler F-Schlüssel im Petrucci-Stil, kann auf verschiedenen
 Notenlinien benutzt werden (im Beispiel auf der dritten Linie)
 @tab
-@code{petrucci-c1}, @code{petrucci-c2},@*
-@code{petrucci-c3}, @code{petrucci-c4},@*
-@code{petrucci-c5}
+@code{petrucci-f3}, @code{petrucci-f4},@*
+@code{petrucci-f5}
 @tab
 @lilypond[relative=1,notime]
-  \clef "petrucci-c2"
+  \clef "petrucci-f3"
   \override NoteHead.style = #'mensural
   c
 @end lilypond
index 10c2b353dd9beaea60e31cfb4e97034ee0eb1737..76551e7567007bcb9433fc14c219df87ce89ad46 100644 (file)
@@ -1025,6 +1025,32 @@ contemporary notation techniques
 
 @divEnd
 
+@divClass{column-center-middle-color3}
+@subheading Rewrite LibreOffice LilyPond Extension with Python
+
+The @uref{http://ooolilypond.sourceforge.net/, OOoLilyPond} extension
+made it possible to conveniently include LilyPond score snippets in
+OpenOffice.org/LibreOffice Writer, Draw and Impress documents while
+keeping source and image together.  After many years without development
+an initial effort has started to make the extension compatible again
+with current versions of LibreOffice and LilyPond.
+
+However, as the LibreOffice ecosystem has changed substantially it is
+now possible to rewrite the extension with Python and PyQt.  This will
+not only be more powerful in general but will allow the integration of
+functionality from @uref{http://frescobaldi.org, Frescobaldi}, such as
+for example syntax highlighting, entry helpers, score wizards or musical
+transformations.
+
+@strong{Difficulty:} easy/medium
+@strong{Requirements:} Python, PyQt, LilyPond basics, LibreOffice
+extension basics
+@strong{Recommended knowledge:} Familiarity with Frescobaldi code based
+or willingness to learn during bonding period
+@strong{Mentor(s):} Urs Liska, (Thorsten Behrens/LibreOffice)
+
+@divEnd
+
 @divClass{column-center-middle-color3}
 @subheading Automated testing and documentation for openLilyLib
 
index a614146058f55273bc2070d0976c356d10d346b7..7dce3857cec672243312ec9a6defa0b58fc63cc5 100644 (file)
@@ -56,7 +56,7 @@ Context::check_removal ()
              Callback0_wrapper::make_smob
              <Translator_group, &Translator_group::finalize> (),
              UP);
-          send_stream_event (ctx, "RemoveContext", 0, 0);
+          send_stream_event (ctx, "RemoveContext", 0);
         }
     }
 }
@@ -526,18 +526,62 @@ Context::internal_get_property (SCM sym) const
 }
 
 /*
-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.
+These methods should not be called from any other place than the
+send_stream_event macro.
 */
+
 void
-Context::internal_send_stream_event (SCM type, Input *origin, SCM props[])
+Context::internal_send_stream_event (SCM type, Input *origin)
 {
   Stream_event *e = new Stream_event (Lily::ly_make_event_class (type), origin);
-  for (int i = 0; props[i]; i += 2)
-    {
-      e->set_property (props[i], props[i + 1]);
-    }
+  event_source_->broadcast (e);
+  e->unprotect ();
+}
+
+void
+Context::internal_send_stream_event (SCM type, Input *origin,
+                                     SCM prop, SCM val)
+{
+  Stream_event *e = new Stream_event (Lily::ly_make_event_class (type), origin);
+  e->set_property (prop, val);
+  event_source_->broadcast (e);
+  e->unprotect ();
+}
+
+void
+Context::internal_send_stream_event (SCM type, Input *origin,
+                                     SCM prop, SCM val, SCM prop2, SCM val2)
+{
+  Stream_event *e = new Stream_event (Lily::ly_make_event_class (type), origin);
+  e->set_property (prop, val);
+  e->set_property (prop2, val2);
+  event_source_->broadcast (e);
+  e->unprotect ();
+}
+
+void
+Context::internal_send_stream_event (SCM type, Input *origin,
+                                     SCM prop, SCM val, SCM prop2, SCM val2,
+                                     SCM prop3, SCM val3)
+{
+  Stream_event *e = new Stream_event (Lily::ly_make_event_class (type), origin);
+  e->set_property (prop, val);
+  e->set_property (prop2, val2);
+  e->set_property (prop3, val3);
+  event_source_->broadcast (e);
+  e->unprotect ();
+}
+
+void
+Context::internal_send_stream_event (SCM type, Input *origin,
+                                     SCM prop, SCM val, SCM prop2, SCM val2,
+                                     SCM prop3, SCM val3, SCM prop4, SCM val4)
+{
+  Stream_event *e = new Stream_event (Lily::ly_make_event_class (type), origin);
+  e->set_property (prop, val);
+  e->set_property (prop2, val2);
+  e->set_property (prop3, val3);
+  e->set_property (prop4, val4);
   event_source_->broadcast (e);
   e->unprotect ();
 }
index ea100c912aa703998cce74ebd0bfbe1ca6ace223..a8289d52cf549fcabc63e829ed08b3e7606dd44b 100644 (file)
@@ -120,7 +120,7 @@ LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression",
   iter->quit ();
   scm_remember_upto_here_1 (protected_iter);
 
-  send_stream_event (g, "Finish", 0, 0);
+  send_stream_event (g, "Finish", 0);
 
   debug_output (_f ("elapsed time: %.2f seconds", timer.read ()));
 
index be523665b921911b0ffdffeef28cb675d2343c8d..f494ab4191e63c2b5025afe603aef5dacb14991e 100644 (file)
@@ -180,7 +180,7 @@ Global_context::run_iterator_on_me (Music_iterator *iter)
       if (iter->ok ())
         iter->process (w);
 
-      send_stream_event (this, "OneTimeStep", 0, 0);
+      send_stream_event (this, "OneTimeStep", 0);
       apply_finalizations ();
       check_removal ();
     }
index daaaf855bf59216a1f1f90304e38fb1ca2435a09..4954dc914d2793c080967e235d8630605e321418 100644 (file)
@@ -31,7 +31,7 @@ Grace_iterator::process (Moment m)
   // to distinguish \stemNeutral \grace { ... and \grace { \stemNeutral ...
   if (in_grace_ != bool (m.grace_part_) && child_iter_ && child_iter_->get_outlet ())
     {
-      send_stream_event (child_iter_->get_outlet (), "GraceChange", get_music ()->origin (), 0);
+      send_stream_event (child_iter_->get_outlet (), "GraceChange", get_music ()->origin ());
     }
   in_grace_ = m.grace_part_;
 
index 2555bfe2b49e0e26519c2a1eac630a148d5026b3..42fb15aaa30fd93bcdec58cac74f978f5da057a2 100644 (file)
@@ -90,8 +90,17 @@ public:
 
   Dispatcher *event_source () const { return event_source_; }
   Dispatcher *events_below () const { return events_below_; }
-  void internal_send_stream_event (SCM type, Input *origin, SCM props[]);
-
+  void internal_send_stream_event (SCM type, Input *origin);
+  void internal_send_stream_event (SCM type, Input *origin,
+                                   SCM prop, SCM val);
+  void internal_send_stream_event (SCM type, Input *origin,
+                                   SCM prop, SCM val, SCM prop2, SCM val2);
+  void internal_send_stream_event (SCM type, Input *origin,
+                                   SCM prop, SCM val, SCM prop2, SCM val2,
+                                   SCM prop3, SCM val3);
+  void internal_send_stream_event (SCM type, Input *origin,
+                                   SCM prop, SCM val, SCM prop2, SCM val2,
+                                   SCM prop3, SCM val3, SCM prop4, SCM val4);
   SCM get_definition () const { return definition_; }
   SCM get_definition_mods () const { return definition_mods_; }
 
@@ -188,10 +197,7 @@ void set_context_property_on_children (Context *trans, SCM sym, SCM val);
 
 /* Shorthand for creating and broadcasting stream events. */
 #define send_stream_event(ctx, type, origin, ...)                       \
-  do {                                                                  \
-    SCM props[] = { __VA_ARGS__, 0 };                                   \
-    ctx->internal_send_stream_event (ly_symbol2scm (type), origin, props); \
-  } while (0)
+  ctx->internal_send_stream_event (ly_symbol2scm (type), origin, ##__VA_ARGS__)
 
 SCM nested_property_alist (SCM alist, SCM prop_path, SCM value);
 SCM nested_property (SCM alist, SCM prop_path, SCM fallback = SCM_EOL);