1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_dom_gamepad_GamepadButton_h
6 #define mozilla_dom_gamepad_GamepadButton_h
10 #include "nsWrapperCache.h"
15 class GamepadButton
: public nsISupports
,
19 explicit GamepadButton(nsISupports
* aParent
) : mParent(aParent
),
26 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
27 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(GamepadButton
)
29 nsISupports
* GetParentObject() const
34 virtual JSObject
* WrapObject(JSContext
* aCx
) MOZ_OVERRIDE
;
36 void SetPressed(bool aPressed
)
41 void SetValue(double aValue
)
57 virtual ~GamepadButton() {}
60 nsCOMPtr
<nsISupports
> mParent
;
66 } // namespace mozilla
68 #endif // mozilla_dom_gamepad_GamepadButton_h