nsIAnimationObserver.h (2057B)
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::dom { 12 class Animation; 13 } // namespace mozilla::dom 14 15 #define NS_IANIMATION_OBSERVER_IID \ 16 {0xed025fc7, 0xdeda, 0x48b9, {0x9c, 0x35, 0xf2, 0xb6, 0x1e, 0xeb, 0xd0, 0x8d}} 17 18 class nsIAnimationObserver : public nsIMutationObserver { 19 public: 20 NS_INLINE_DECL_STATIC_IID(NS_IANIMATION_OBSERVER_IID) 21 22 virtual void AnimationAdded(mozilla::dom::Animation* aAnimation) = 0; 23 virtual void AnimationChanged(mozilla::dom::Animation* aAnimation) = 0; 24 virtual void AnimationRemoved(mozilla::dom::Animation* aAnimation) = 0; 25 }; 26 27 #define NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONADDED \ 28 virtual void AnimationAdded(mozilla::dom::Animation* aAnimation) override; 29 30 #define NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONCHANGED \ 31 virtual void AnimationChanged(mozilla::dom::Animation* aAnimation) override; 32 33 #define NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONREMOVED \ 34 virtual void AnimationRemoved(mozilla::dom::Animation* aAnimation) override; 35 36 #define NS_IMPL_NSIANIMATIONOBSERVER_STUB(class_) \ 37 void class_::AnimationAdded(mozilla::dom::Animation* aAnimation) {} \ 38 void class_::AnimationChanged(mozilla::dom::Animation* aAnimation) {} \ 39 void class_::AnimationRemoved(mozilla::dom::Animation* aAnimation) {} \ 40 NS_IMPL_NSIMUTATIONOBSERVER_CORE_STUB(class_) \ 41 NS_IMPL_NSIMUTATIONOBSERVER_CONTENT(class_) 42 43 #define NS_DECL_NSIANIMATIONOBSERVER \ 44 NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONADDED \ 45 NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONCHANGED \ 46 NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONREMOVED \ 47 NS_DECL_NSIMUTATIONOBSERVER 48 49 #endif // nsIAnimationObserver_h___