PointerEvent.webidl (1866B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * Portions Copyright 2013 Microsoft Open Technologies, Inc. */ 7 8 interface WindowProxy; 9 10 [Exposed=Window] 11 interface PointerEvent : MouseEvent 12 { 13 constructor(DOMString type, optional PointerEventInit eventInitDict = {}); 14 15 [NeedsCallerType] 16 readonly attribute long pointerId; 17 18 [NeedsCallerType] 19 readonly attribute double width; 20 [NeedsCallerType] 21 readonly attribute double height; 22 [NeedsCallerType] 23 readonly attribute float pressure; 24 [NeedsCallerType] 25 readonly attribute float tangentialPressure; 26 [NeedsCallerType] 27 readonly attribute long tiltX; 28 [NeedsCallerType] 29 readonly attribute long tiltY; 30 [NeedsCallerType] 31 readonly attribute long twist; 32 [NeedsCallerType] 33 readonly attribute double altitudeAngle; 34 [NeedsCallerType] 35 readonly attribute double azimuthAngle; 36 37 [NeedsCallerType] 38 readonly attribute DOMString pointerType; 39 readonly attribute boolean isPrimary; 40 [NeedsCallerType] 41 readonly attribute long persistentDeviceId; 42 43 [Func="mozilla::dom::PointerEvent::EnableGetCoalescedEvents"] 44 sequence<PointerEvent> getCoalescedEvents(); 45 sequence<PointerEvent> getPredictedEvents(); 46 }; 47 48 dictionary PointerEventInit : MouseEventInit 49 { 50 long pointerId = 0; 51 double width = 1.0; 52 double height = 1.0; 53 float pressure = 0; 54 float tangentialPressure = 0; 55 long tiltX; 56 long tiltY; 57 long twist = 0; 58 double altitudeAngle; 59 double azimuthAngle; 60 DOMString pointerType = ""; 61 boolean isPrimary = false; 62 long persistentDeviceId = 0; 63 sequence<PointerEvent> coalescedEvents = []; 64 sequence<PointerEvent> predictedEvents = []; 65 };