LEFT | RIGHT |
(no file at all) | |
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) 2005--2019 Erik Sandberg <mandolaerik@gmail.com> | 4 Copyright (C) 2005--2019 Erik Sandberg <mandolaerik@gmail.com> |
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 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 SCM class_list = ev->get_property ("class"); | 79 SCM class_list = ev->get_property ("class"); |
80 if (!scm_is_pair (class_list)) | 80 if (!scm_is_pair (class_list)) |
81 { | 81 { |
82 ev->origin ()->warning (_ ("Event class should be a list")); | 82 ev->origin ()->warning (_ ("Event class should be a list")); |
83 return; | 83 return; |
84 } | 84 } |
85 | 85 |
86 #if 0 | 86 #if 0 |
87 bool sent = false; | 87 bool sent = false; |
88 #endif | 88 #endif |
89 int num_classes = scm_ilength (class_list); | 89 long num_classes = scm_ilength (class_list); |
90 | 90 |
91 /* | 91 /* |
92 For each event class there is a list of listeners, which is | 92 For each event class there is a list of listeners, which is |
93 ordered by priority. Our next task is to call these listeners, in | 93 ordered by priority. Our next task is to call these listeners, in |
94 priority order. A priority queue stores the next element in each | 94 priority order. A priority queue stores the next element in each |
95 listener list, and the lowest priority element is repeatedly | 95 listener list, and the lowest priority element is repeatedly |
96 extracted and called. | 96 extracted and called. |
97 | 97 |
98 The priority queue is implemented as an insertion-sorted C | 98 The priority queue is implemented as an insertion-sorted C |
99 array. Using the stack instead of native Scheme datastructures | 99 array. Using the stack instead of native Scheme datastructures |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 Dispatcher::unregister_as_listener (Dispatcher *disp) | 320 Dispatcher::unregister_as_listener (Dispatcher *disp) |
321 { | 321 { |
322 dispatchers_ = scm_assq_remove_x (dispatchers_, disp->self_scm ()); | 322 dispatchers_ = scm_assq_remove_x (dispatchers_, disp->self_scm ()); |
323 | 323 |
324 Listener listener = GET_LISTENER (Dispatcher, dispatch); | 324 Listener listener = GET_LISTENER (Dispatcher, dispatch); |
325 for (SCM cl = listen_classes_; scm_is_pair (cl); cl = scm_cdr (cl)) | 325 for (SCM cl = listen_classes_; scm_is_pair (cl); cl = scm_cdr (cl)) |
326 { | 326 { |
327 disp->remove_listener (listener, scm_car (cl)); | 327 disp->remove_listener (listener, scm_car (cl)); |
328 } | 328 } |
329 } | 329 } |
LEFT | RIGHT |