]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/grob-interface.hh
Use between-system-padding as a default for
[lilypond.git] / lily / include / grob-interface.hh
index fb90e2e2bcf8f509a4312701562372b9e2171efa..f6a92c0afed034a5859c8ff2a54d38d03e7c5746 100644 (file)
@@ -3,26 +3,31 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2002--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2002--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #ifndef INTERFACE_HH
 #define INTERFACE_HH
 
-#include <libguile.h> /* SCM */
+#include "lily-guile.hh"
 
-#define ADD_INTERFACE(cl, a, b, c)                             \
+#define DECLARE_GROB_INTERFACE() \
+  static SCM interface_symbol_;           \
+  static bool has_interface (Grob*)
+
+#define ADD_INTERFACE(cl, b, c)                                \
+  SCM cl::interface_symbol_; \
   bool cl::has_interface (Grob *me)                            \
   {                                                            \
-    return me->internal_has_interface (ly_symbol2scm (a));     \
+    return me->internal_has_interface (interface_symbol_);     \
   }                                                            \
   void cl ## _init_ifaces ()                                   \
   {                                                            \
-    add_interface (a, b, c);                                   \
+    cl::interface_symbol_ = add_interface (#cl, b, c);         \
   }                                                            \
   ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces);
 
-void add_interface (char const *symbol,
+SCM add_interface (char const *cxx_name,
                    char const *descr,
                    char const *vars);