michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: [NoInterfaceObject] michael@0: interface DeviceAcceleration { michael@0: readonly attribute double? x; michael@0: readonly attribute double? y; michael@0: readonly attribute double? z; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface DeviceRotationRate { michael@0: readonly attribute double? alpha; michael@0: readonly attribute double? beta; michael@0: readonly attribute double? gamma; michael@0: }; michael@0: michael@0: [Constructor(DOMString type, optional DeviceMotionEventInit eventInitDict)] michael@0: interface DeviceMotionEvent : Event { michael@0: readonly attribute DeviceAcceleration? acceleration; michael@0: readonly attribute DeviceAcceleration? accelerationIncludingGravity; michael@0: readonly attribute DeviceRotationRate? rotationRate; michael@0: readonly attribute double? interval; michael@0: }; michael@0: michael@0: dictionary DeviceAccelerationInit { michael@0: double? x = null; michael@0: double? y = null; michael@0: double? z = null; michael@0: }; michael@0: michael@0: dictionary DeviceRotationRateInit { michael@0: double? alpha = null; michael@0: double? beta = null; michael@0: double? gamma = null; michael@0: }; michael@0: michael@0: dictionary DeviceMotionEventInit : EventInit { michael@0: DeviceAccelerationInit acceleration; michael@0: DeviceAccelerationInit accelerationIncludingGravity; michael@0: DeviceRotationRateInit rotationRate; michael@0: double? interval = null; michael@0: }; michael@0: michael@0: // Mozilla extensions. michael@0: partial interface DeviceMotionEvent { michael@0: [Throws] michael@0: void initDeviceMotionEvent(DOMString type, michael@0: boolean canBubble, michael@0: boolean cancelable, michael@0: DeviceAccelerationInit acceleration, michael@0: DeviceAccelerationInit accelerationIncludingGravity, michael@0: DeviceRotationRateInit rotationRate, michael@0: double? interval); michael@0: };