Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM IntlUtils.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_INTLUTILSBINDING_H_
#define DOM_INTLUTILSBINDING_H_
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
namespace mozilla {
namespace dom {
struct DisplayNameOptionsAtoms;
struct DisplayNameResultAtoms;
class IntlUtils;
struct LocaleInfoAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct DisplayNameOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCalendar;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mKeys;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mStyle;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mType;
DisplayNameOptions();
explicit inline DisplayNameOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
DisplayNameOptions(DisplayNameOptions&& aOther) = default;
explicit inline DisplayNameOptions(const DisplayNameOptions& 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);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
DisplayNameOptions&
operator=(const DisplayNameOptions& aOther);
private:
static bool
InitIds(JSContext* cx, DisplayNameOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastDisplayNameOptions : public DisplayNameOptions
{
inline FastDisplayNameOptions()
: DisplayNameOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct DisplayNameResult : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mCalendar;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mLocale;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mStyle;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mType;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mValues;
DisplayNameResult();
explicit inline DisplayNameResult(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
DisplayNameResult(DisplayNameResult&& aOther) = default;
explicit inline DisplayNameResult(const DisplayNameResult& 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);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
DisplayNameResult&
operator=(const DisplayNameResult& aOther);
private:
static bool
InitIds(JSContext* cx, DisplayNameResultAtoms* atomsCache);
};
namespace binding_detail {
struct FastDisplayNameResult : public DisplayNameResult
{
inline FastDisplayNameResult()
: DisplayNameResult(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct LocaleInfo : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mDirection;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mLocale;
LocaleInfo();
explicit inline LocaleInfo(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
LocaleInfo(LocaleInfo&& aOther) = default;
explicit inline LocaleInfo(const LocaleInfo& 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);
LocaleInfo&
operator=(const LocaleInfo& aOther);
private:
static bool
InitIds(JSContext* cx, LocaleInfoAtoms* atomsCache);
};
namespace binding_detail {
struct FastLocaleInfo : public LocaleInfo
{
inline FastLocaleInfo()
: LocaleInfo(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace IntlUtils_Binding {
typedef mozilla::dom::IntlUtils NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::IntlUtils* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
} // namespace IntlUtils_Binding
} // namespace mozilla::dom
#endif // DOM_INTLUTILSBINDING_H_