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

#ifndef mozilla_dom_BaseKeyframeTypesBinding_h
#define mozilla_dom_BaseKeyframeTypesBinding_h

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

namespace mozilla {
namespace dom {

struct BaseComputedKeyframeAtoms;
struct BaseKeyframeAtoms;
struct BasePropertyIndexedKeyframeAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

enum class CompositeOperation : uint32_t {
  Replace,
  Add,
  Accumulate,
  EndGuard_
};

namespace CompositeOperationValues {
extern const EnumEntry strings[4];
} // namespace CompositeOperationValues

bool
ToJSValue(JSContext* aCx, CompositeOperation aArgument, JS::MutableHandle<JS::Value> aValue);


struct BaseKeyframe : public DictionaryBase
{
  Optional<CompositeOperation> mComposite;
  nsString mEasing;
  Nullable<double> mOffset;
  bool mSimulateComputeValuesFailure;

  BaseKeyframe();

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

  explicit inline BaseKeyframe(const BaseKeyframe& 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 BaseKeyframe& aOther);

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

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


struct BasePropertyIndexedKeyframe : public DictionaryBase
{
  Optional<CompositeOperation> mComposite;
  nsString mEasing;

  BasePropertyIndexedKeyframe();

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

  explicit inline BasePropertyIndexedKeyframe(const BasePropertyIndexedKeyframe& 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 BasePropertyIndexedKeyframe& aOther);

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

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


struct BaseComputedKeyframe : public BaseKeyframe
{
  Optional<double> mComputedOffset;

  BaseComputedKeyframe();

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

  explicit inline BaseComputedKeyframe(const BaseComputedKeyframe& 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 BaseComputedKeyframe& aOther);

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

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


} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_BaseKeyframeTypesBinding_h
