| OLD | NEW |
| 1 #library('dom'); | 1 #library('dom'); |
| 2 | 2 |
| 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
| 5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 // DO NOT EDIT | 7 // DO NOT EDIT |
| 8 // Auto-generated Dart DOM library. | 8 // Auto-generated Dart DOM library. |
| 9 | 9 |
| 10 | 10 |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 } | 565 } |
| 566 | 566 |
| 567 class _CanvasGradientJs extends _DOMTypeJs implements CanvasGradient native "*Ca
nvasGradient" { | 567 class _CanvasGradientJs extends _DOMTypeJs implements CanvasGradient native "*Ca
nvasGradient" { |
| 568 | 568 |
| 569 void addColorStop(num offset, String color) native; | 569 void addColorStop(num offset, String color) native; |
| 570 } | 570 } |
| 571 | 571 |
| 572 class _CanvasPatternJs extends _DOMTypeJs implements CanvasPattern native "*Canv
asPattern" { | 572 class _CanvasPatternJs extends _DOMTypeJs implements CanvasPattern native "*Canv
asPattern" { |
| 573 } | 573 } |
| 574 | 574 |
| 575 class _CanvasPixelArrayJs extends _DOMTypeJs implements CanvasPixelArray native
"*CanvasPixelArray" { | |
| 576 | |
| 577 final int length; | |
| 578 | |
| 579 int operator[](int index) native "return this[index];"; | |
| 580 | |
| 581 void operator[]=(int index, int value) native "this[index] = value"; | |
| 582 // -- start List<int> mixins. | |
| 583 // int is the element type. | |
| 584 | |
| 585 // From Iterable<int>: | |
| 586 | |
| 587 Iterator<int> iterator() { | |
| 588 // Note: NodeLists are not fixed size. And most probably length shouldn't | |
| 589 // be cached in both iterator _and_ forEach method. For now caching it | |
| 590 // for consistency. | |
| 591 return new _FixedSizeListIterator<int>(this); | |
| 592 } | |
| 593 | |
| 594 // From Collection<int>: | |
| 595 | |
| 596 void add(int value) { | |
| 597 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 598 } | |
| 599 | |
| 600 void addLast(int value) { | |
| 601 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 602 } | |
| 603 | |
| 604 void addAll(Collection<int> collection) { | |
| 605 throw new UnsupportedOperationException("Cannot add to immutable List."); | |
| 606 } | |
| 607 | |
| 608 void forEach(void f(int element)) => _Collections.forEach(this, f); | |
| 609 | |
| 610 Collection map(f(int element)) => _Collections.map(this, [], f); | |
| 611 | |
| 612 Collection<int> filter(bool f(int element)) => | |
| 613 _Collections.filter(this, <int>[], f); | |
| 614 | |
| 615 bool every(bool f(int element)) => _Collections.every(this, f); | |
| 616 | |
| 617 bool some(bool f(int element)) => _Collections.some(this, f); | |
| 618 | |
| 619 bool isEmpty() => this.length == 0; | |
| 620 | |
| 621 // From List<int>: | |
| 622 | |
| 623 void sort(int compare(int a, int b)) { | |
| 624 throw new UnsupportedOperationException("Cannot sort immutable List."); | |
| 625 } | |
| 626 | |
| 627 int indexOf(int element, [int start = 0]) => | |
| 628 _Lists.indexOf(this, element, start, this.length); | |
| 629 | |
| 630 int lastIndexOf(int element, [int start]) { | |
| 631 if (start === null) start = length - 1; | |
| 632 return _Lists.lastIndexOf(this, element, start); | |
| 633 } | |
| 634 | |
| 635 int last() => this[length - 1]; | |
| 636 | |
| 637 int removeLast() { | |
| 638 throw new UnsupportedOperationException("Cannot removeLast on immutable List
."); | |
| 639 } | |
| 640 | |
| 641 // FIXME: implement these. | |
| 642 void setRange(int start, int rangeLength, List<int> from, [int startFrom]) { | |
| 643 throw new UnsupportedOperationException("Cannot setRange on immutable List."
); | |
| 644 } | |
| 645 | |
| 646 void removeRange(int start, int rangeLength) { | |
| 647 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis
t."); | |
| 648 } | |
| 649 | |
| 650 void insertRange(int start, int rangeLength, [int initialValue]) { | |
| 651 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis
t."); | |
| 652 } | |
| 653 | |
| 654 List<int> getRange(int start, int rangeLength) => | |
| 655 _Lists.getRange(this, start, rangeLength, <int>[]); | |
| 656 | |
| 657 // -- end List<int> mixins. | |
| 658 } | |
| 659 | |
| 660 class _CanvasRenderingContextJs extends _DOMTypeJs implements CanvasRenderingCon
text native "*CanvasRenderingContext" { | 575 class _CanvasRenderingContextJs extends _DOMTypeJs implements CanvasRenderingCon
text native "*CanvasRenderingContext" { |
| 661 | 576 |
| 662 final _HTMLCanvasElementJs canvas; | 577 final _HTMLCanvasElementJs canvas; |
| 663 } | 578 } |
| 664 | 579 |
| 665 class _CanvasRenderingContext2DJs extends _CanvasRenderingContextJs implements C
anvasRenderingContext2D native "*CanvasRenderingContext2D" { | 580 class _CanvasRenderingContext2DJs extends _CanvasRenderingContextJs implements C
anvasRenderingContext2D native "*CanvasRenderingContext2D" { |
| 666 | 581 |
| 667 var fillStyle; | 582 var fillStyle; |
| 668 | 583 |
| 669 String font; | 584 String font; |
| (...skipping 12368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13038 // WARNING: Do not edit - generated code. | 12953 // WARNING: Do not edit - generated code. |
| 13039 | 12954 |
| 13040 interface CanvasPattern { | 12955 interface CanvasPattern { |
| 13041 } | 12956 } |
| 13042 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12957 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 13043 // for details. All rights reserved. Use of this source code is governed by a | 12958 // for details. All rights reserved. Use of this source code is governed by a |
| 13044 // BSD-style license that can be found in the LICENSE file. | 12959 // BSD-style license that can be found in the LICENSE file. |
| 13045 | 12960 |
| 13046 // WARNING: Do not edit - generated code. | 12961 // WARNING: Do not edit - generated code. |
| 13047 | 12962 |
| 13048 interface CanvasPixelArray extends List<int> { | |
| 13049 | |
| 13050 final int length; | |
| 13051 } | |
| 13052 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 13053 // for details. All rights reserved. Use of this source code is governed by a | |
| 13054 // BSD-style license that can be found in the LICENSE file. | |
| 13055 | |
| 13056 // WARNING: Do not edit - generated code. | |
| 13057 | |
| 13058 interface CanvasRenderingContext { | 12963 interface CanvasRenderingContext { |
| 13059 | 12964 |
| 13060 final HTMLCanvasElement canvas; | 12965 final HTMLCanvasElement canvas; |
| 13061 } | 12966 } |
| 13062 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12967 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 13063 // for details. All rights reserved. Use of this source code is governed by a | 12968 // for details. All rights reserved. Use of this source code is governed by a |
| 13064 // BSD-style license that can be found in the LICENSE file. | 12969 // BSD-style license that can be found in the LICENSE file. |
| 13065 | 12970 |
| 13066 // WARNING: Do not edit - generated code. | 12971 // WARNING: Do not edit - generated code. |
| 13067 | 12972 |
| (...skipping 12259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 25327 if (length < 0) throw new IllegalArgumentException('length'); | 25232 if (length < 0) throw new IllegalArgumentException('length'); |
| 25328 if (start < 0) throw new IndexOutOfRangeException(start); | 25233 if (start < 0) throw new IndexOutOfRangeException(start); |
| 25329 int end = start + length; | 25234 int end = start + length; |
| 25330 if (end > a.length) throw new IndexOutOfRangeException(end); | 25235 if (end > a.length) throw new IndexOutOfRangeException(end); |
| 25331 for (int i = start; i < end; i++) { | 25236 for (int i = start; i < end; i++) { |
| 25332 accumulator.add(a[i]); | 25237 accumulator.add(a[i]); |
| 25333 } | 25238 } |
| 25334 return accumulator; | 25239 return accumulator; |
| 25335 } | 25240 } |
| 25336 } | 25241 } |
| OLD | NEW |