+LY_DEFINE (ly_grob_set_nested_property_x, "ly:grob-set-nested-property!",
+ 3, 0, 0, (SCM grob, SCM symlist, SCM val),
+ "Set nested property @var{symlist} in grob @var{grob} to value @var{val}.")
+{
+ Grob *sc = unsmob_grob (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+
+ bool type_ok = scm_is_pair (symlist);
+
+ if (type_ok)
+ for (SCM s = symlist; scm_is_pair (s) && type_ok; s = scm_cdr (s))
+ type_ok &= ly_is_symbol (scm_car (s));
+
+ SCM_ASSERT_TYPE (type_ok, symlist, SCM_ARG2, __FUNCTION__, "list of symbols");
+
+ if (scm_is_pair (scm_cdr (symlist)))
+ set_nested_property (sc, symlist, val);
+ else
+ ly_grob_set_property_x (grob, scm_car (symlist), val);
+ return SCM_UNSPECIFIED;
+}
+
+LY_DEFINE (ly_grob_pure_property, "ly:grob-pure-property",
+ 4, 1, 0, (SCM grob, SCM sym, SCM beg, SCM end, SCM val),
+ "Return the pure value for property @var{sym} of @var{grob}."
+ " If no value is found, return @var{val} or @code{'()}"
+ " if @var{val} is not specified.")
+{
+ Grob *sc = unsmob_grob (grob);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
+ LY_ASSERT_TYPE (scm_is_integer, beg, 3);
+ LY_ASSERT_TYPE (scm_is_integer, end, 4);
+ if (val == SCM_UNDEFINED)
+ val = SCM_EOL;
+
+ SCM retval = sc->internal_get_pure_property (sym, scm_to_int (beg), scm_to_int (end));
+ if (retval == SCM_EOL)
+ retval = val;
+
+ return retval;
+}
+
+LY_DEFINE (ly_grob_pure_height, "ly:grob-pure-height",
+ 4, 1, 0, (SCM grob, SCM refp, SCM beg, SCM end, SCM val),
+ "Return the pure height of @var{grob} given refpoint @var{refp}."
+ " If no value is found, return @var{val} or @code{'()}"
+ " if @var{val} is not specified.")
+{
+ Grob *sc = unsmob_grob (grob);
+ Grob *ref = unsmob_grob (refp);
+
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ LY_ASSERT_SMOB (Grob, refp, 2);
+ LY_ASSERT_TYPE (scm_is_integer, beg, 3);
+ LY_ASSERT_TYPE (scm_is_integer, end, 4);
+ if (val == SCM_UNDEFINED)
+ val = SCM_EOL;
+
+ Interval retval = sc->pure_height (ref, scm_to_int (beg), scm_to_int (end));
+
+ return ly_interval2scm (retval);
+}
+