2 book-scheme.cc -- implement Book bindings
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "output-def.hh"
12 #include "ly-module.hh"
14 LY_DEFINE (ly_make_book
, "ly:make-book",
15 2, 0, 1, (SCM paper
, SCM header
, SCM scores
),
16 "Make a \\book of @var{paper} and @var{header} (which may be #f as well) "
17 "containing @code{\\scores}.")
19 Output_def
*odef
= unsmob_output_def (paper
);
20 SCM_ASSERT_TYPE (odef
, paper
,
21 SCM_ARG1
, __FUNCTION__
, "Output_def");
23 Book
*book
= new Book
;
26 if (ly_c_module_p (header
))
27 book
->header_
= header
;
29 book
->scores_
= scm_append (scm_list_2 (scores
, book
->scores_
));
31 SCM x
= book
->self_scm ();
32 scm_gc_unprotect_object (x
);