Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM L10nOverlays.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_L10NOVERLAYSBINDING_H_
#define DOM_L10NOVERLAYSBINDING_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 {
class L10nOverlays;
struct L10nOverlaysErrorAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct L10nOverlaysError : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<int16_t> mCode;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mL10nName;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mSourceElementName;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mTranslatedElementName;
L10nOverlaysError();
explicit inline L10nOverlaysError(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
L10nOverlaysError(L10nOverlaysError&& aOther) = default;
explicit inline L10nOverlaysError(const L10nOverlaysError& aOther)
{
*this = aOther;
}
bool
Init(const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
void
TraceDictionary(JSTracer* trc);
L10nOverlaysError&
operator=(const L10nOverlaysError& aOther);
bool
operator==(const L10nOverlaysError& aOther) const;
private:
static bool
InitIds(JSContext* cx, L10nOverlaysErrorAtoms* atomsCache);
};
namespace binding_detail {
struct FastL10nOverlaysError : public L10nOverlaysError
{
inline FastL10nOverlaysError()
: L10nOverlaysError(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace L10nOverlays_Binding {
typedef mozilla::dom::L10nOverlays NativeType;
static const uint16_t ERROR_UNKNOWN = 1;
static const uint16_t ERROR_FORBIDDEN_TYPE = 2;
static const uint16_t ERROR_NAMED_ELEMENT_MISSING = 3;
static const uint16_t ERROR_NAMED_ELEMENT_TYPE_MISMATCH = 4;
static const uint16_t ERROR_TRANSLATED_ELEMENT_DISCONNECTED = 5;
static const uint16_t ERROR_TRANSLATED_ELEMENT_DISALLOWED_DOM = 6;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
{
/* Get the interface object for this class. This will create the object as
needed. */
return GetPerInterfaceObjectHandle(aCx, constructors::id::L10nOverlays,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace L10nOverlays_Binding
} // namespace mozilla::dom
#endif // DOM_L10NOVERLAYSBINDING_H_