LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2004--2014 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2004--2014 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
11 LilyPond is distributed in the hope that it will be useful, | 11 LilyPond is distributed in the hope that it will be useful, |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 GNU General Public License for more details. | 14 GNU General Public License for more details. |
15 | 15 |
16 You should have received a copy of the GNU General Public License | 16 You should have received a copy of the GNU General Public License |
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. | 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. |
18 */ | 18 */ |
19 | 19 |
20 #include "context.hh" | 20 #include "context.hh" |
21 | 21 |
22 #include "context-def.hh" | 22 #include "context-def.hh" |
23 #include "dispatcher.hh" | 23 #include "dispatcher.hh" |
24 #include "global-context.hh" | 24 #include "global-context.hh" |
25 #include "international.hh" | 25 #include "international.hh" |
26 #include "ly-smobs.icc" | |
27 #include "main.hh" | 26 #include "main.hh" |
28 #include "output-def.hh" | 27 #include "output-def.hh" |
29 #include "profile.hh" | 28 #include "profile.hh" |
30 #include "program-option.hh" | 29 #include "program-option.hh" |
31 #include "scm-hash.hh" | 30 #include "scm-hash.hh" |
32 #include "translator-group.hh" | 31 #include "translator-group.hh" |
33 #include "warn.hh" | 32 #include "warn.hh" |
34 | 33 |
35 bool | 34 bool |
36 Context::is_removable () const | 35 Context::is_removable () const |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 | 707 |
709 if (me->event_source_) | 708 if (me->event_source_) |
710 scm_gc_mark (me->event_source_->self_scm ()); | 709 scm_gc_mark (me->event_source_->self_scm ()); |
711 | 710 |
712 if (me->events_below_) | 711 if (me->events_below_) |
713 scm_gc_mark (me->events_below_->self_scm ()); | 712 scm_gc_mark (me->events_below_->self_scm ()); |
714 | 713 |
715 return me->properties_scm_; | 714 return me->properties_scm_; |
716 } | 715 } |
717 | 716 |
718 IMPLEMENT_SMOBS (Context); | 717 const char Context::type_p_name_[] = "ly:context?"; |
719 IMPLEMENT_DEFAULT_EQUAL_P (Context); | |
720 IMPLEMENT_TYPE_P (Context, "ly:context?"); | |
721 | 718 |
722 Global_context * | 719 Global_context * |
723 Context::get_global_context () const | 720 Context::get_global_context () const |
724 { | 721 { |
725 if (dynamic_cast<Global_context *> ((Context *) this)) | 722 if (dynamic_cast<Global_context *> ((Context *) this)) |
726 return dynamic_cast<Global_context *> ((Context *) this); | 723 return dynamic_cast<Global_context *> ((Context *) this); |
727 | 724 |
728 if (daddy_context_) | 725 if (daddy_context_) |
729 return daddy_context_->get_global_context (); | 726 return daddy_context_->get_global_context (); |
730 | 727 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 | 824 |
828 bool | 825 bool |
829 check_repeat_count_visibility (Context const *context, SCM count) | 826 check_repeat_count_visibility (Context const *context, SCM count) |
830 { | 827 { |
831 SCM proc = context->get_property ("repeatCountVisibility"); | 828 SCM proc = context->get_property ("repeatCountVisibility"); |
832 return (ly_is_procedure (proc) | 829 return (ly_is_procedure (proc) |
833 && to_boolean (scm_call_2 (proc, | 830 && to_boolean (scm_call_2 (proc, |
834 count, | 831 count, |
835 context->self_scm ()))); | 832 context->self_scm ()))); |
836 } | 833 } |
LEFT | RIGHT |