]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/listener.hh
MusicXML: Improvements / Fixes for articulations
[lilypond.git] / lily / include / listener.hh
index fd7a7e2adfa3db21399a025581248ffc1fd74d9a..5b290f4f20e15878bcc219bc643747f5104788a0 100644 (file)
@@ -63,38 +63,40 @@ class Listener {
 public:
   Listener (const void *target, Listener_function_table *type);
   Listener (Listener const &other);
+  Listener ();
+
   void listen (SCM ev) const;
 
   bool operator == (Listener const &other) const
   { return target_ == other.target_ && type_ == other.type_; }
 
-  DECLARE_SIMPLE_SMOBS (Listener,);
+  DECLARE_SIMPLE_SMOBS (Listener);
 };
 DECLARE_UNSMOB (Listener, listener);
 
-#define IMPLEMENT_LISTENER(cl, method)                         \
-void                                                           \
-cl :: method ## _callback (void *self, SCM ev)                 \
-{                                                              \
-  cl *s = (cl *)self;                                          \
-  s->method (ev);                                              \
-}                                                              \
-void                                                           \
-cl :: method ## _mark (void *self)                             \
-{                                                              \
-  cl *s = (cl *)self;                                          \
-  scm_gc_mark (s->self_scm ());                                        \
-}                                                              \
-Listener                                                       \
-cl :: method ## _listener () const                             \
-{                                                              \
-  static Listener_function_table callbacks;                    \
-  callbacks.listen_callback = &cl::method ## _callback;                \
-  callbacks.mark_callback = &cl::method ## _mark;              \
-  return Listener (this, &callbacks);                          \
+#define IMPLEMENT_LISTENER(cl, method)                 \
+void                                                   \
+cl :: method ## _callback (void *self, SCM ev)         \
+{                                                      \
+  cl *s = (cl *)self;                                  \
+  s->method (ev);                                      \
+}                                                      \
+void                                                   \
+cl :: method ## _mark (void *self)                     \
+{                                                      \
+  cl *s = (cl *)self;                                  \
+  scm_gc_mark (s->self_scm ());                                \
+}                                                      \
+Listener                                               \
+cl :: method ## _listener () const                     \
+{                                                      \
+  static Listener_function_table callbacks;            \
+  callbacks.listen_callback = &cl::method ## _callback;        \
+  callbacks.mark_callback = &cl::method ## _mark;      \
+  return Listener (this, &callbacks);                  \
 }
 
-#define GET_LISTENER(proc) ( proc ## _listener ())
+#define GET_LISTENER(proc) proc ## _listener ()
 
 #define DECLARE_LISTENER(name)                         \
   inline void name (SCM);                              \