/* THIS FILE IS AUTOGENERATED FROM Animatable.webidl BY Codegen.py - DO NOT EDIT */

#ifndef mozilla_dom_AnimatableBinding_h
#define mozilla_dom_AnimatableBinding_h

#include "AnimationEffectReadOnlyBinding.h"
#include "BaseKeyframeTypesBinding.h"
#include "KeyframeEffectBinding.h"
#include "js/RootingAPI.h"
#include "jspubtd.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/UnionTypes.h"

namespace mozilla {
namespace dom {

struct AnimationFilterAtoms;
struct KeyframeAnimationOptionsAtoms;
struct NativePropertyHooks;
class OwningUnrestrictedDoubleOrString;
class ProtoAndIfaceCache;
class UnrestrictedDoubleOrString;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

struct AnimationFilter : public DictionaryBase
{
  MOZ_INIT_OUTSIDE_CTOR bool mSubtree;

  AnimationFilter();

  explicit inline AnimationFilter(const FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

  explicit inline AnimationFilter(const AnimationFilter& aOther)
  {
    *this = aOther;
  }

  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const AnimationFilter& aOther);

private:
  static bool
  InitIds(JSContext* cx, AnimationFilterAtoms* atomsCache);
};

namespace binding_detail {
struct FastAnimationFilter : public AnimationFilter
{
  inline FastAnimationFilter()
    : AnimationFilter(FastDictionaryInitializer())
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct KeyframeAnimationOptions : public KeyframeEffectOptions
{
  MOZ_INIT_OUTSIDE_CTOR nsString mId;

  KeyframeAnimationOptions();

  explicit inline KeyframeAnimationOptions(const FastDictionaryInitializer& )
    : KeyframeEffectOptions(FastDictionaryInitializer())
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

  explicit inline KeyframeAnimationOptions(const KeyframeAnimationOptions& aOther)
  {
    *this = aOther;
  }

  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const KeyframeAnimationOptions& aOther);

private:
  static bool
  InitIds(JSContext* cx, KeyframeAnimationOptionsAtoms* atomsCache);
};

namespace binding_detail {
struct FastKeyframeAnimationOptions : public KeyframeAnimationOptions
{
  inline FastKeyframeAnimationOptions()
    : KeyframeAnimationOptions(FastDictionaryInitializer())
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_AnimatableBinding_h
