]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/grob-interface.hh
uniformize grob interface naming with C++.
[lilypond.git] / lily / include / grob-interface.hh
1 /*
2   interface.hh -- declare Interface
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2002--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef INTERFACE_HH
10 #define INTERFACE_HH
11
12 #include "lily-guile.hh"
13
14 #define ADD_INTERFACE(cl, a, b, c)                              \
15   bool cl::has_interface (Grob *me)                             \
16   {                                                             \
17     return me->internal_has_interface (ly_symbol2scm (a));      \
18   }                                                             \
19   void cl ## _init_ifaces ()                                    \
20   {                                                             \
21     add_interface (#cl, a, b, c);                               \
22   }                                                             \
23   ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces);
24
25 void add_interface (char const *cxx_name,
26                     char const *symbol,
27                     char const *descr,
28                     char const *vars);
29
30 SCM ly_add_interface (SCM, SCM, SCM);
31 SCM ly_all_grob_interfaces ();
32
33 #endif /* INTERFACE_HH */
34