+#include "group-interface.hh"
+#include "staff-symbol-referencer.hh"
+#include "duration.hh"
+
+MAKE_SCHEME_CALLBACK(Rest_collision,force_shift_callback,2);
+SCM
+Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
+{
+ Grob *them = unsmob_grob (element_smob);
+ Axis a = (Axis) gh_scm2int (axis);
+ assert (a == Y_AXIS);
+
+ Grob * rc = unsmob_grob (them->get_grob_property ("rest-collision"));
+
+ if (rc)
+ {
+ /*
+ Done: destruct pointers, so we do the shift only once.
+ */
+ SCM elts = rc->get_grob_property ("elements");
+ rc->set_grob_property ("elements", SCM_EOL);
+
+ do_shift (rc, elts);
+ }
+
+ return gh_double2scm (0.0);
+}