|
1 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 #ifndef mozilla_dom_AnimationEvent_h_ |
|
6 #define mozilla_dom_AnimationEvent_h_ |
|
7 |
|
8 #include "mozilla/EventForwards.h" |
|
9 #include "mozilla/dom/Event.h" |
|
10 #include "mozilla/dom/AnimationEventBinding.h" |
|
11 #include "nsIDOMAnimationEvent.h" |
|
12 |
|
13 class nsAString; |
|
14 |
|
15 namespace mozilla { |
|
16 namespace dom { |
|
17 |
|
18 class AnimationEvent : public Event, |
|
19 public nsIDOMAnimationEvent |
|
20 { |
|
21 public: |
|
22 AnimationEvent(EventTarget* aOwner, |
|
23 nsPresContext* aPresContext, |
|
24 InternalAnimationEvent* aEvent); |
|
25 |
|
26 NS_DECL_ISUPPORTS_INHERITED |
|
27 NS_FORWARD_TO_EVENT |
|
28 NS_DECL_NSIDOMANIMATIONEVENT |
|
29 |
|
30 static already_AddRefed<AnimationEvent> |
|
31 Constructor(const GlobalObject& aGlobal, |
|
32 const nsAString& aType, |
|
33 const AnimationEventInit& aParam, |
|
34 ErrorResult& aRv); |
|
35 |
|
36 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE |
|
37 { |
|
38 return AnimationEventBinding::Wrap(aCx, this); |
|
39 } |
|
40 |
|
41 // xpidl implementation |
|
42 // GetAnimationName(nsAString& aAnimationName); |
|
43 // GetPseudoElement(nsAString& aPseudoElement); |
|
44 |
|
45 float ElapsedTime(); |
|
46 }; |
|
47 |
|
48 } // namespace dom |
|
49 } // namespace mozilla |
|
50 |
|
51 #endif // mozilla_dom_AnimationEvent_h_ |