Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 : #ifndef mozilla_dom_AnimationEvent_h_
7 : #define mozilla_dom_AnimationEvent_h_
8 :
9 : #include "mozilla/EventForwards.h"
10 : #include "mozilla/dom/Event.h"
11 : #include "mozilla/dom/AnimationEventBinding.h"
12 : #include "nsIDOMAnimationEvent.h"
13 :
14 : class nsAString;
15 :
16 : namespace mozilla {
17 : namespace dom {
18 :
19 : class AnimationEvent : public Event,
20 : public nsIDOMAnimationEvent
21 : {
22 : public:
23 : AnimationEvent(EventTarget* aOwner,
24 : nsPresContext* aPresContext,
25 : InternalAnimationEvent* aEvent);
26 :
27 : NS_DECL_ISUPPORTS_INHERITED
28 0 : NS_FORWARD_TO_EVENT
29 : NS_DECL_NSIDOMANIMATIONEVENT
30 :
31 : static already_AddRefed<AnimationEvent>
32 : Constructor(const GlobalObject& aGlobal,
33 : const nsAString& aType,
34 : const AnimationEventInit& aParam,
35 : ErrorResult& aRv);
36 :
37 0 : virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
38 : {
39 0 : return AnimationEventBinding::Wrap(aCx, this, aGivenProto);
40 : }
41 :
42 : // xpidl implementation
43 : // GetAnimationName(nsAString& aAnimationName);
44 : // GetPseudoElement(nsAString& aPseudoElement);
45 :
46 : float ElapsedTime();
47 :
48 : protected:
49 0 : ~AnimationEvent() {}
50 : };
51 :
52 : } // namespace dom
53 : } // namespace mozilla
54 :
55 : already_AddRefed<mozilla::dom::AnimationEvent>
56 : NS_NewDOMAnimationEvent(mozilla::dom::EventTarget* aOwner,
57 : nsPresContext* aPresContext,
58 : mozilla::InternalAnimationEvent* aEvent);
59 :
60 : #endif // mozilla_dom_AnimationEvent_h_
|