LilyPond Contributor's Guide: 10.10.5 Acknowledging grobs

### 10.10.5 Acknowledging grobs

Some engravers also need information from grobs as they are created and as they terminate. The mechanism and methods to obtain this information are set up by the macros:

- `DECLARE_ACKNOWLEDGER (grob_interface)`
- `DECLARE_END_ACKNOWLEDGER (grob_interface)`

where grob_interface is an interface supported by the grob(s) which should be acknowledged. For example, the following code would declare acknowledgers for a `NoteHead` grob (via the `note-head-interface`) and any grobs which support the `side-position-interface`:

>     DECLARE_ACKNOWLEDGER (note_head)
>     DECLARE_ACKNOWLEDGER (side_position)

The `DECLARE_END_ACKNOWLEDGER ()` macro sets up a spanner-specific acknowledger which will be called whenever a spanner ends.

Following declaration of an acknowledger, the method is coded as follows:

>     void
>     Engraver_name::acknowledge_interface_name (Grob_info info)
>     {
>       ...body of acknowledger method...
>     }

#### LilyPond — Contributor’s Guide