Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : /* THIS FILE IS AUTOGENERATED FROM DeviceOrientationEvent.webidl BY Codegen.py - DO NOT EDIT */
8 :
9 : #ifndef mozilla_dom_DeviceOrientationEvent_h
10 : #define mozilla_dom_DeviceOrientationEvent_h
11 :
12 : #include "mozilla/Attributes.h"
13 : #include "mozilla/ErrorResult.h"
14 : #include "mozilla/dom/BindingUtils.h"
15 : #include "mozilla/dom/DeviceOrientationEventBinding.h"
16 : #include "mozilla/dom/Event.h"
17 :
18 : struct JSContext;
19 : namespace mozilla {
20 : namespace dom {
21 :
22 : class DeviceOrientationEvent : public Event
23 : {
24 : public:
25 : NS_DECL_ISUPPORTS_INHERITED
26 0 : NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(DeviceOrientationEvent, Event)
27 : protected:
28 : virtual ~DeviceOrientationEvent();
29 : explicit DeviceOrientationEvent(mozilla::dom::EventTarget* aOwner);
30 :
31 : Nullable<double> mAlpha;
32 : Nullable<double> mBeta;
33 : Nullable<double> mGamma;
34 : bool mAbsolute;
35 :
36 : public:
37 : virtual DeviceOrientationEvent* AsDeviceOrientationEvent() override;
38 :
39 : virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
40 :
41 : static already_AddRefed<DeviceOrientationEvent> Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const DeviceOrientationEventInit& aEventInitDict);
42 :
43 : static already_AddRefed<DeviceOrientationEvent> Constructor(const GlobalObject& aGlobal, const nsAString& aType, const DeviceOrientationEventInit& aEventInitDict, ErrorResult& aRv);
44 :
45 : Nullable<double> GetAlpha() const;
46 :
47 : Nullable<double> GetBeta() const;
48 :
49 : Nullable<double> GetGamma() const;
50 :
51 : bool Absolute() const;
52 :
53 : void InitDeviceOrientationEvent(const nsAString& aType, bool aCanBubble, bool aCancelable, const Nullable<double>& aAlpha, const Nullable<double>& aBeta, const Nullable<double>& aGamma, bool aAbsolute);
54 : };
55 :
56 : } // namespace dom
57 : } // namespace mozilla
58 :
59 : #endif // mozilla_dom_DeviceOrientationEvent_h
|