Ben Clayton | 897cdee | 2021-09-28 10:01:02 +0000 | [diff] [blame] | 1 | // Copyright 2021 The Dawn Authors |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // An IDL file that provides stub definitions for dictionaries and interfaces |
| 16 | // used by the webgpu.idl file |
| 17 | |
| 18 | dictionary EventInit { |
| 19 | boolean bubbles = false; |
| 20 | boolean cancelable = false; |
| 21 | boolean composed = false; |
| 22 | }; |
| 23 | |
| 24 | interface Navigator { |
| 25 | readonly attribute DOMString vendorSub; |
| 26 | readonly attribute DOMString productSub; |
| 27 | readonly attribute DOMString vendor; |
| 28 | }; |
| 29 | |
| 30 | interface Event { |
| 31 | readonly attribute boolean bubbles; |
| 32 | readonly attribute boolean cancelable; |
| 33 | attribute boolean returnValue; |
| 34 | }; |
| 35 | |
| 36 | interface WorkerNavigator{}; |
| 37 | |
| 38 | interface EventListener { |
| 39 | undefined handleEvent(Event event); |
| 40 | }; |
| 41 | |
| 42 | interface EventTarget { |
| 43 | undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options); |
| 44 | undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options); |
| 45 | boolean dispatchEvent(Event event); |
| 46 | }; |
| 47 | |
| 48 | dictionary EventListenerOptions { boolean capture = false; }; |
| 49 | |
| 50 | dictionary AddEventListenerOptions : EventListenerOptions { |
| 51 | boolean passive = false; |
| 52 | boolean once = false; |
| 53 | }; |
| 54 | |
| 55 | interface HTMLVideoElement { |
| 56 | attribute unsigned long width; |
| 57 | attribute unsigned long height; |
| 58 | readonly attribute unsigned long videoWidth; |
| 59 | readonly attribute unsigned long videoHeight; |
| 60 | attribute DOMString poster; |
| 61 | }; |
| 62 | |
| 63 | typedef(Int8Array or Int16Array or Int32Array or Uint8Array or Uint16Array or |
| 64 | Uint32Array or Float32Array or Float64Array or |
| 65 | DataView) ArrayBufferView; |
| 66 | |
| 67 | typedef(ArrayBufferView or ArrayBuffer) BufferSource; |
| 68 | |
| 69 | interface ImageBitmap { |
| 70 | readonly attribute unsigned long width; |
| 71 | readonly attribute unsigned long height; |
| 72 | }; |
| 73 | |
| 74 | interface HTMLCanvasElement { |
| 75 | attribute unsigned long width; |
| 76 | attribute unsigned long height; |
| 77 | }; |
| 78 | |
| 79 | interface OffscreenCanvas { |
| 80 | attribute unsigned long width; |
| 81 | attribute unsigned long height; |
| 82 | }; |
| 83 | |
| 84 | interface EventHandler{}; |