lilypond-1.3.154
[lilypond.git] / lily / score-element-callback.cc
blob00cd9f7a3806e370676ceccf3b573ac6b9859ae0
1 #if 0
2 /*
3 score-element-callback.cc -- implement Callback smob.
5 source file of the GNU LilyPond music typesetter
7 (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 */
11 #include "score-element-callback.hh"
13 static SCM callback_tag;
15 static
16 SCM mark_smob (SCM)
18 return SCM_EOL;
21 static int
22 print_smob (SCM, SCM port, scm_print_state *)
24 scm_puts ("#<Callback>", port);
25 return 1;
28 static
29 scm_sizet free_smob (SCM)
31 return 0;
34 static
35 void start_callback_smobs()
37 callback_tag = scm_make_smob_type_mfpe ("callback", 0,
38 mark_smob, free_smob,
39 print_smob, 0);
43 SCM
44 smobify_callback (Score_element_callback cb )
46 SCM z;
48 SCM_NEWCELL(z);
49 SCM_SETCDR (z, (SCM)cb);
50 SCM_SETCAR (z, (SCM)callback_tag);
52 return z;
55 ADD_SCM_INIT_FUNC(callback, start_callback_smobs);
56 #endif