Correct left text alignment of DynamicTextSpanner.
[lilypond.git] / lily / scheme-listener.cc
blob7d2f9da8244ad872d7ddc55976ffdbfd9bb1ccee
1 /*
2 scheme-listener.cc -- Implement Scheme_listener
4 source file of the GNU LilyPond music typesetter
6 (c) 2006--2007 Erik Sandberg <mandolaerik@gmail.com>
7 */
9 #include "scheme-listener.hh"
11 IMPLEMENT_LISTENER (Scheme_listener, call)
12 void
13 Scheme_listener::call (SCM ev)
15 scm_call_1 (callback_, ev);
18 IMPLEMENT_SMOBS (Scheme_listener);
19 IMPLEMENT_DEFAULT_EQUAL_P (Scheme_listener);
21 Scheme_listener::Scheme_listener (SCM c)
23 callback_ = SCM_EOL;
24 self_scm_ = SCM_EOL;
25 smobify_self ();
26 callback_ = c;
29 SCM
30 Scheme_listener::mark_smob (SCM obj)
32 Scheme_listener *me = (Scheme_listener *) SCM_CELL_WORD_1 (obj);
33 return me->callback_;
36 int
37 Scheme_listener::print_smob (SCM obj, SCM p, scm_print_state*)
39 Scheme_listener *me = (Scheme_listener *) SCM_CELL_WORD_1 (obj);
40 scm_puts ("#<Scheme_listener ", p);
41 scm_write (me->callback_, p);
42 scm_puts (">", p);
43 return 1;
46 Scheme_listener::~Scheme_listener ()