Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM TextDecoder.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_TEXTDECODERBINDING_H_
#define DOM_TEXTDECODERBINDING_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 NativePropertyHooks;
class ProtoAndIfaceCache;
struct TextDecodeOptionsAtoms;
class TextDecoder;
struct TextDecoderOptionsAtoms;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct TextDecodeOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR bool mStream;
TextDecodeOptions();
explicit inline TextDecodeOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
TextDecodeOptions(TextDecodeOptions&& aOther) = default;
explicit inline TextDecodeOptions(const TextDecodeOptions& 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);
TextDecodeOptions&
operator=(const TextDecodeOptions& aOther);
bool
operator==(const TextDecodeOptions& aOther) const;
private:
static bool
InitIds(JSContext* cx, TextDecodeOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastTextDecodeOptions : public TextDecodeOptions
{
inline FastTextDecodeOptions()
: TextDecodeOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct TextDecoderOptions : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR bool mFatal;
MOZ_INIT_OUTSIDE_CTOR bool mIgnoreBOM;
TextDecoderOptions();
explicit inline TextDecoderOptions(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
TextDecoderOptions(TextDecoderOptions&& aOther) = default;
explicit inline TextDecoderOptions(const TextDecoderOptions& 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);
TextDecoderOptions&
operator=(const TextDecoderOptions& aOther);
bool
operator==(const TextDecoderOptions& aOther) const;
private:
static bool
InitIds(JSContext* cx, TextDecoderOptionsAtoms* atomsCache);
};
namespace binding_detail {
struct FastTextDecoderOptions : public TextDecoderOptions
{
inline FastTextDecoderOptions()
: TextDecoderOptions(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace TextDecoder_Binding {
typedef mozilla::dom::TextDecoder NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::TextDecoder* aObject, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
{
/* Get the interface prototype object for this class. This will create the
object as needed. */
return GetPerInterfaceObjectHandle(aCx, prototypes::id::TextDecoder,
&CreateInterfaceObjects,
/* aDefineOnGlobal = */ true);
}
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::TextDecoder,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace TextDecoder_Binding
} // namespace mozilla::dom
#endif // DOM_TEXTDECODERBINDING_H_