OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of observable; | 5 part of observable; |
6 | 6 |
7 /** A change to an observable instance. */ | 7 /** A change to an observable instance. */ |
8 class ChangeEvent { | 8 class ChangeEvent { |
9 // TODO(sigmund): capture language issues around enums & create a cannonical | 9 // TODO(sigmund): capture language issues around enums & create a canonical |
10 // Dart enum design. | 10 // Dart enum design. |
11 /** Type denoting an in-place update event. */ | 11 /** Type denoting an in-place update event. */ |
12 static const UPDATE = 0; | 12 static const UPDATE = 0; |
13 | 13 |
14 /** Type denoting an insertion event. */ | 14 /** Type denoting an insertion event. */ |
15 static const INSERT = 1; | 15 static const INSERT = 1; |
16 | 16 |
17 /** Type denoting a single-remove event. */ | 17 /** Type denoting a single-remove event. */ |
18 static const REMOVE = 2; | 18 static const REMOVE = 2; |
19 | 19 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 for (final listener in obj.listeners) { | 84 for (final listener in obj.listeners) { |
85 listener(this); | 85 listener(this); |
86 } | 86 } |
87 } | 87 } |
88 } | 88 } |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 /** A listener of change events. */ | 92 /** A listener of change events. */ |
93 typedef void ChangeListener(EventSummary events); | 93 typedef void ChangeListener(EventSummary events); |
OLD | NEW |