LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
2, 0, 0, (SCM to, SCM from),
"Make the dispatcher @var{to} listen to events from @var{from}.")
{
2, 0, 0, (SCM to, SCM from),
"Make the dispatcher @var{to} listen to events from @var{from}.")
{
LY_ASSERT_SMOB (Dispatcher, to, 1);
LY_ASSERT_SMOB (Dispatcher, from, 2);
t->register_as_listener (f);
LY_ASSERT_SMOB (Dispatcher, to, 1);
LY_ASSERT_SMOB (Dispatcher, from, 2);
t->register_as_listener (f);
" Whenever @var{disp} hears an event of class @var{cl},"
" it is forwarded to @var{list}.")
{
" Whenever @var{disp} hears an event of class @var{cl},"
" it is forwarded to @var{list}.")
{
LY_ASSERT_SMOB (Listener, list, 1);
LY_ASSERT_SMOB (Dispatcher, disp, 2);
LY_ASSERT_SMOB (Listener, list, 1);
LY_ASSERT_SMOB (Dispatcher, disp, 2);
LY_ASSERT_SMOB (Dispatcher, disp, 1);
LY_ASSERT_TYPE (scm_is_pair, cl, 2);
LY_ASSERT_SMOB (Dispatcher, disp, 1);
LY_ASSERT_TYPE (scm_is_pair, cl, 2);
LY_DEFINE (ly_broadcast, "ly:broadcast",
2, 0, 0, (SCM disp, SCM ev),
"Send the stream event @var{ev} to the dispatcher @var{disp}.")
{
LY_DEFINE (ly_broadcast, "ly:broadcast",
2, 0, 0, (SCM disp, SCM ev),
"Send the stream event @var{ev} to the dispatcher @var{disp}.")
{
LY_ASSERT_SMOB (Dispatcher, disp, 1);
LY_ASSERT_SMOB (Stream_event, ev, 2);
d->broadcast (e);
LY_ASSERT_SMOB (Dispatcher, disp, 1);
LY_ASSERT_SMOB (Stream_event, ev, 2);
d->broadcast (e);