gecko/dom/interfaces/events/nsIDOMDeviceMotionEvent.idl

41 lines
1.4 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsIDOMEvent.idl"
[scriptable, uuid(2AD6EBC0-35AB-41D0-A755-0CA6A0E21565)]
interface nsIDOMDeviceAcceleration : nsISupports
{
readonly attribute double x;
readonly attribute double y;
readonly attribute double z;
};
[scriptable, uuid(E76AC929-61FE-4519-9EAC-D496A53CBC9B)]
interface nsIDOMDeviceRotationRate : nsISupports
{
readonly attribute double alpha;
readonly attribute double beta;
readonly attribute double gamma;
};
[scriptable, builtinclass, uuid(64c300f8-4bf9-47d0-86bc-2fafd7de38c7)]
interface nsIDOMDeviceMotionEvent : nsIDOMEvent
{
void initDeviceMotionEvent(in DOMString eventTypeArg,
in boolean canBubbleArg,
in boolean cancelableArg,
in nsIDOMDeviceAcceleration acceleration,
in nsIDOMDeviceAcceleration accelerationIncludingGravity,
in nsIDOMDeviceRotationRate rotationRate,
in double interval);
readonly attribute nsIDOMDeviceAcceleration acceleration;
readonly attribute nsIDOMDeviceAcceleration accelerationIncludingGravity;
readonly attribute nsIDOMDeviceRotationRate rotationRate;
readonly attribute double interval;
};