Copy as Markdown
Other Tools
/* THIS FILE IS AUTOGENERATED FROM ARIANotifyMixin.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_ARIANOTIFYMIXINBINDING_H_
#define DOM_ARIANOTIFYMIXINBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/EnumTypeTraits.h"
#include "mozilla/Span.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
namespace mozilla {
namespace dom {
struct AriaNotificationOptionsAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
enum class AriaNotifyPriority : uint8_t {
Normal,
High,
};
namespace binding_detail {
template <> struct EnumStrings<AriaNotifyPriority> {
static constexpr nsLiteralCString Values[2] {
"normal"_ns,
"high"_ns,
};
};
} // namespace binding_detail
bool
ToJSValue(JSContext* aCx, AriaNotifyPriority aArgument, JS::MutableHandle<JS::Value> aValue);
struct AriaNotificationOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR AriaNotifyPriority mPriority;
AriaNotificationOptions();
explicit inline AriaNotificationOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AriaNotificationOptions(AriaNotificationOptions&& aOther) = default;
explicit inline AriaNotificationOptions(const AriaNotificationOptions& aOther)
{
*this = aOther;
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
TraceDictionary(JSTracer* trc);
AriaNotificationOptions&
operator=(const AriaNotificationOptions& aOther);
private:
static bool
InitIds(JSContext* cx, AriaNotificationOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastAriaNotificationOptions : public AriaNotificationOptions
{
inline FastAriaNotificationOptions()
: AriaNotificationOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
} // namespace dom
template <>
struct MaxContiguousEnumValue<dom::AriaNotifyPriority>
{
static constexpr dom::AriaNotifyPriority value = dom::AriaNotifyPriority::High;
static_assert(static_cast<uint8_t>(dom::AriaNotifyPriority::Normal) == 0,
"We rely on this in ContiguousEnumValues");
static_assert(std::size(dom::binding_detail::EnumStrings<dom::AriaNotifyPriority>::Values) - 1 == UnderlyingValue(value),
"Mismatch between enum strings and enum count");
};
} // namespace mozilla
#endif // DOM_ARIANOTIFYMIXINBINDING_H_