]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/grob-scheme.cc (LY_DEFINE): add new function ly:grob-key.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Nov 2004 14:26:25 +0000 (14:26 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Nov 2004 14:26:25 +0000 (14:26 +0000)
* lily/include/global-context.hh (Context): take \score key upon init.

* lily/context.cc (Context): take key argument in ctor.
(create_context): new function

ChangeLog
lily/grob-scheme.cc

index b79a8d1df08d6d5cf0ad2320d51e92a13bcbe29d..f078e689972c0ebcbe63c8b2c7e0db30492592d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-11-14  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/grob-scheme.cc (LY_DEFINE): add new function ly:grob-key.
+
        * lily/include/object-key-undumper.hh (Module): new file.
 
        * lily/object-key-undumper.cc (Module): New file. Deserialize
@@ -10,7 +12,6 @@
 
        * lily/include/object-key-dumper.hh (class Object_key_dumper): 
        new file. Serialize object keys.
-
        
        * lily/object-key.cc (dump): new function.
        (as_scheme): new virtual function
index d3a0d0a05f83d5d2c2f53f561b7b9657f3857ae5..6b7fdc233278da073828f51fac07d16b436b5563 100644 (file)
@@ -223,3 +223,14 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
   return scm_int2num (me->break_status_dir ());
 }
 
+
+LY_DEFINE(ly_grob_key, "ly:grob-key",
+         1,0,0,
+         (SCM grob),
+         "Return the object-key for @var{grob}."
+         )
+{
+  Grob *me = unsmob_grob (grob);
+  SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "Grob");
+  return me->get_key ()->self_scm ();
+}