From: David Kastrup Date: Thu, 22 Sep 2011 00:01:52 +0000 (+0200) Subject: Define ly:event? X-Git-Tag: release/2.15.13-1~28^2~3 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=6e250057b2f6a63ab03294900251721335bff30d;p=lilypond.git Define ly:event? --- diff --git a/lily/music-scheme.cc b/lily/music-scheme.cc index f8eca4a6fe..89c810a567 100644 --- a/lily/music-scheme.cc +++ b/lily/music-scheme.cc @@ -73,6 +73,17 @@ LY_DEFINE (ly_music_p, "ly:music?", return scm_from_bool (unsmob_music (obj)); } +LY_DEFINE (ly_event_p, "ly:event?", + 1, 0, 0, (SCM obj), + "Is @var{obj} an event object?") +{ + if (Music *m = unsmob_music (obj)) + { + return scm_from_bool (m->is_mus_type ("event")); + } + return SCM_BOOL_F; +} + /* todo: property args */ LY_DEFINE (ly_music_mutable_properties, "ly:music-mutable-properties", 1, 0, 0, (SCM mus), diff --git a/scm/lily.scm b/scm/lily.scm index b82cd08aa2..6230940860 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -553,6 +553,7 @@ LilyPond safe mode. The syntax is the same as `define*-public'." (,ly:dir? . "direction") (,ly:dispatcher? . "dispatcher") (,ly:duration? . "duration") + (,ly:event? . "event") (,ly:font-metric? . "font metric") (,ly:grob? . "graphical (layout) object") (,ly:grob-array? . "array of grobs")