]> git.donarmstrong.com Git - lilypond.git/blob - lily/score-element-callback.cc
release: 1.3.69
[lilypond.git] / lily / score-element-callback.cc
1 #if 0
2 /*   
3   score-element-callback.cc --  implement Callback smob.
4   
5   source file of the GNU LilyPond music typesetter
6   
7   (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8   
9  */
10
11 #include "score-element-callback.hh"
12
13 static SCM callback_tag;
14
15 static
16 SCM mark_smob (SCM)
17 {
18   return SCM_EOL;
19 }
20
21 static int
22 print_smob (SCM, SCM port, scm_print_state *)
23 {
24   scm_puts ("#<Callback>", port);
25   return 1;
26 }
27
28 static
29 scm_sizet free_smob (SCM)
30 {
31   return 0;
32 }
33
34 static
35 void start_callback_smobs()
36 {
37   callback_tag = scm_make_smob_type_mfpe ("callback", 0,
38                                           mark_smob, free_smob,
39                                           print_smob, 0);
40 }
41
42
43 SCM
44 smobify_callback (Score_element_callback cb )
45 {
46   SCM z;
47   
48   SCM_NEWCELL(z);
49   SCM_SETCDR (z, (SCM)cb);
50   SCM_SETCAR (z, (SCM)callback_tag);
51
52   return z;
53 }
54   
55 ADD_SCM_INIT_FUNC(callback, start_callback_smobs);
56 #endif