OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * |
| 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions |
| 6 * are met: |
| 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright |
| 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. |
| 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ |
| 25 |
| 26 module html { |
| 27 |
| 28 interface [ |
| 29 CustomConstructor, |
| 30 ConstructorParameters=3, |
| 31 CustomToJSObject, |
| 32 JSNoStaticTables |
| 33 ] DataView : ArrayBufferView { |
| 34 // All these methods raise an exception if they would read or write beyo
nd the end of the view. |
| 35 |
| 36 // We have to use custom code because our code generator does not suppor
t int8_t type. |
| 37 // int8_t getInt8(in unsigned long byteOffset); |
| 38 // uint8_t getUint8(in unsigned long byteOffset); |
| 39 [Custom] DOMObject getInt8() |
| 40 raises (DOMException); |
| 41 [Custom] DOMObject getUint8() |
| 42 raises (DOMException); |
| 43 |
| 44 [StrictTypeChecking] short getInt16(in unsigned long byteOffset, in [Opt
ional] boolean littleEndian) |
| 45 raises (DOMException); |
| 46 [StrictTypeChecking] unsigned short getUint16(in unsigned long byteOffse
t, in [Optional] boolean littleEndian) |
| 47 raises (DOMException); |
| 48 [StrictTypeChecking] long getInt32(in unsigned long byteOffset, in [Opti
onal] boolean littleEndian) |
| 49 raises (DOMException); |
| 50 [StrictTypeChecking] unsigned long getUint32(in unsigned long byteOffset
, in [Optional] boolean littleEndian) |
| 51 raises (DOMException); |
| 52 |
| 53 // Use custom code to handle NaN case for JSC. |
| 54 [JSCustom, StrictTypeChecking] float getFloat32(in unsigned long byteOff
set, in [Optional] boolean littleEndian) |
| 55 raises (DOMException); |
| 56 [JSCustom, StrictTypeChecking] double getFloat64(in unsigned long byteOf
fset, in [Optional] boolean littleEndian) |
| 57 raises (DOMException); |
| 58 |
| 59 // We have to use custom code because our code generator does not suppor
t uint8_t type. |
| 60 // void setInt8(in unsigned long byteOffset, in int8_t value); |
| 61 // void setUint8(in unsigned long byteOffset, in uint8_t value); |
| 62 [Custom] void setInt8() |
| 63 raises (DOMException); |
| 64 [Custom] void setUint8() |
| 65 raises (DOMException); |
| 66 |
| 67 [StrictTypeChecking] void setInt16(in unsigned long byteOffset, in short
value, in [Optional] boolean littleEndian) |
| 68 raises (DOMException); |
| 69 [StrictTypeChecking] void setUint16(in unsigned long byteOffset, in unsi
gned short value, in [Optional] boolean littleEndian) |
| 70 raises (DOMException); |
| 71 [StrictTypeChecking] void setInt32(in unsigned long byteOffset, in long
value, in [Optional] boolean littleEndian) |
| 72 raises (DOMException); |
| 73 [StrictTypeChecking] void setUint32(in unsigned long byteOffset, in unsi
gned long value, in [Optional] boolean littleEndian) |
| 74 raises (DOMException); |
| 75 [StrictTypeChecking] void setFloat32(in unsigned long byteOffset, in flo
at value, in [Optional] boolean littleEndian) |
| 76 raises (DOMException); |
| 77 [StrictTypeChecking] void setFloat64(in unsigned long byteOffset, in dou
ble value, in [Optional] boolean littleEndian) |
| 78 raises (DOMException); |
| 79 }; |
| 80 |
| 81 } |
OLD | NEW |