Sets callbacks that are called
The first
The on-empty function will be called when there is one frame left in the group, and a request has been made to remove that frame from the group. If it returns #f, the operation which would have left no frames in the group is cancelled. The empty-callback defaults to a function that does no work and returns #t.
The after-empty function is called when there are no frames left in the group. It defaults to the function void.