/src/mozilla-central/dom/base/nsIAnimationObserver.h
Line | Count | Source (jump to first uncovered line) |
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 nsIAnimationObserver_h___ |
7 | | #define nsIAnimationObserver_h___ |
8 | | |
9 | | #include "nsIMutationObserver.h" |
10 | | |
11 | | namespace mozilla { |
12 | | namespace dom { |
13 | | class Animation; |
14 | | } // namespace dom |
15 | | } // namespace mozilla |
16 | | |
17 | | #define NS_IANIMATION_OBSERVER_IID \ |
18 | | { 0xed025fc7, 0xdeda, 0x48b9, \ |
19 | | { 0x9c, 0x35, 0xf2, 0xb6, 0x1e, 0xeb, 0xd0, 0x8d } } |
20 | | |
21 | | class nsIAnimationObserver : public nsIMutationObserver |
22 | | { |
23 | | public: |
24 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANIMATION_OBSERVER_IID) |
25 | | |
26 | | virtual void AnimationAdded(mozilla::dom::Animation* aAnimation) = 0; |
27 | | virtual void AnimationChanged(mozilla::dom::Animation* aAnimation) = 0; |
28 | | virtual void AnimationRemoved(mozilla::dom::Animation* aAnimation) = 0; |
29 | | }; |
30 | | |
31 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIAnimationObserver, NS_IANIMATION_OBSERVER_IID) |
32 | | |
33 | | #define NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONADDED \ |
34 | | virtual void AnimationAdded(mozilla::dom::Animation* aAnimation) \ |
35 | | override; |
36 | | |
37 | | #define NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONCHANGED \ |
38 | | virtual void AnimationChanged(mozilla::dom::Animation* aAnimation) \ |
39 | | override; |
40 | | |
41 | | #define NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONREMOVED \ |
42 | | virtual void AnimationRemoved(mozilla::dom::Animation* aAnimation) \ |
43 | | override; |
44 | | |
45 | | #define NS_IMPL_NSIANIMATIONOBSERVER_STUB(class_) \ |
46 | | void \ |
47 | 0 | class_::AnimationAdded(mozilla::dom::Animation* aAnimation) \ |
48 | 0 | { \ |
49 | 0 | } \ |
50 | | void \ |
51 | 0 | class_::AnimationChanged(mozilla::dom::Animation* aAnimation) \ |
52 | 0 | { \ |
53 | 0 | } \ |
54 | | void \ |
55 | 0 | class_::AnimationRemoved(mozilla::dom::Animation* aAnimation) \ |
56 | 0 | { \ |
57 | 0 | } \ |
58 | | NS_IMPL_NSIMUTATIONOBSERVER_CORE_STUB(class_) \ |
59 | | NS_IMPL_NSIMUTATIONOBSERVER_CONTENT(class_) |
60 | | |
61 | | #define NS_DECL_NSIANIMATIONOBSERVER \ |
62 | | NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONADDED \ |
63 | | NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONCHANGED \ |
64 | | NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONREMOVED \ |
65 | | NS_DECL_NSIMUTATIONOBSERVER |
66 | | |
67 | | #endif // nsIAnimationObserver_h___ |