2 stream-event.cc -- implement Scheme bindings for Stream_event
4 source file of the GNU LilyPond music typesetter
6 (c) 2006 Erik Sandberg <mandolaerik@gmail.com>
9 #include "stream-event.hh"
11 LY_DEFINE (ly_make_stream_event, "ly:make-stream-event",
12 1, 0, 0, (SCM proplist),
13 "Creates a stream event, with the given property list.\n" )
15 SCM_ASSERT_TYPE (scm_list_p (proplist), proplist, SCM_ARG1, __FUNCTION__, "association list");
16 Stream_event *e = new Stream_event (proplist);
17 return e->unprotect ();
20 LY_DEFINE (ly_stream_event_property, "ly:stream-event-property",
21 2, 0, 0, (SCM sev, SCM sym),
22 "Get the property @var{sym} of stream event @var{mus}.\n"
23 "If @var{sym} is undefined, return @code{' ()}.\n")
25 Stream_event *e = unsmob_stream_event (sev);
26 SCM_ASSERT_TYPE (e, sev, SCM_ARG1, __FUNCTION__, "stream event");
27 SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
29 return e->internal_get_property (sym);