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 GamepadAxisMoveEvent.webidl BY Codegen.py - DO NOT EDIT */
8 :
9 : #include "GamepadAxisMoveEvent.h"
10 : #include "GamepadAxisMoveEventBinding.h"
11 : #include "GamepadEventBinding.h"
12 : #include "js/GCAPI.h"
13 : #include "mozilla/FloatingPoint.h"
14 : #include "mozilla/dom/GamepadAxisMoveEvent.h"
15 : #include "mozilla/dom/Nullable.h"
16 : #include "mozilla/dom/PrimitiveConversions.h"
17 :
18 : namespace mozilla {
19 : namespace dom {
20 :
21 :
22 : NS_IMPL_CYCLE_COLLECTION_CLASS(GamepadAxisMoveEvent)
23 :
24 0 : NS_IMPL_ADDREF_INHERITED(GamepadAxisMoveEvent, GamepadEvent)
25 0 : NS_IMPL_RELEASE_INHERITED(GamepadAxisMoveEvent, GamepadEvent)
26 :
27 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(GamepadAxisMoveEvent, GamepadEvent)
28 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
29 :
30 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(GamepadAxisMoveEvent, GamepadEvent)
31 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_END
32 :
33 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(GamepadAxisMoveEvent, GamepadEvent)
34 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_END
35 :
36 0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(GamepadAxisMoveEvent)
37 0 : NS_INTERFACE_MAP_END_INHERITING(GamepadEvent)
38 :
39 0 : GamepadAxisMoveEvent::GamepadAxisMoveEvent(mozilla::dom::EventTarget* aOwner)
40 0 : : GamepadEvent(aOwner)
41 : {
42 0 : }
43 :
44 0 : GamepadAxisMoveEvent::~GamepadAxisMoveEvent()
45 : {
46 0 : }
47 :
48 : GamepadAxisMoveEvent*
49 0 : GamepadAxisMoveEvent::AsGamepadAxisMoveEvent()
50 : {
51 0 : return this;
52 : }
53 :
54 : JSObject*
55 0 : GamepadAxisMoveEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
56 : {
57 0 : return GamepadAxisMoveEventBinding::Wrap(aCx, this, aGivenProto);
58 : }
59 :
60 : already_AddRefed<GamepadAxisMoveEvent>
61 0 : GamepadAxisMoveEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const GamepadAxisMoveEventInit& aEventInitDict)
62 : {
63 0 : RefPtr<GamepadAxisMoveEvent> e = new GamepadAxisMoveEvent(aOwner);
64 0 : bool trusted = e->Init(aOwner);
65 0 : e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
66 0 : e->mAxis = aEventInitDict.mAxis;
67 0 : e->mValue = aEventInitDict.mValue;
68 0 : e->mGamepad = aEventInitDict.mGamepad;
69 0 : e->SetTrusted(trusted);
70 0 : e->SetComposed(aEventInitDict.mComposed);
71 0 : return e.forget();
72 : }
73 :
74 : already_AddRefed<GamepadAxisMoveEvent>
75 0 : GamepadAxisMoveEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const GamepadAxisMoveEventInit& aEventInitDict, ErrorResult& aRv)
76 : {
77 0 : nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
78 0 : return Constructor(owner, aType, aEventInitDict);
79 : }
80 :
81 : uint32_t
82 0 : GamepadAxisMoveEvent::Axis() const
83 : {
84 0 : return mAxis;
85 : }
86 :
87 : double
88 0 : GamepadAxisMoveEvent::Value() const
89 : {
90 0 : return mValue;
91 : }
92 :
93 :
94 : } // namespace dom
95 : } // namespace mozilla
|