Source code

Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM TestExampleGen.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_TESTEXAMPLEGENBINDING_H_
#define DOM_TESTEXAMPLEGENBINDING_H_
#include "DOMParserBinding.h"
#include "TestCodeGenBinding.h"
#include "js/CallAndConstruct.h"
#include "jsapi.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
namespace mozilla {
namespace dom {
struct NativePropertyHooks;
class ProtoAndIfaceCache;
class TestExampleInterface;
class TestExampleProxyInterface;
class TestExampleThrowingConstructorInterface;
class TestExampleWorkerInterface;
class TestInterface;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
namespace TestExampleInterface_Binding {
typedef mozilla::dom::TestExampleInterface NativeType;
namespace BooleanObservableArrayHelpers {
bool
ElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, ErrorResult& aRv);
void
ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, bool aValue, ErrorResult& aRv);
void
AppendElement(mozilla::dom::TestExampleInterface* self, bool aValue, ErrorResult& aRv);
void
RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
uint32_t
Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
} // namespace BooleanObservableArrayHelpers
namespace ObjectObservableArrayHelpers {
void
ElementAt(mozilla::dom::TestExampleInterface* self, JSContext* cx, uint32_t aIndex, JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv);
void
ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, JS::Handle<JSObject*> aValue, ErrorResult& aRv);
void
AppendElement(mozilla::dom::TestExampleInterface* self, JS::Handle<JSObject*> aValue, ErrorResult& aRv);
void
RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
uint32_t
Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
} // namespace ObjectObservableArrayHelpers
namespace AnyObservableArrayHelpers {
void
ElementAt(mozilla::dom::TestExampleInterface* self, JSContext* cx, uint32_t aIndex, JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv);
void
ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, JS::Handle<JS::Value> aValue, ErrorResult& aRv);
void
AppendElement(mozilla::dom::TestExampleInterface* self, JS::Handle<JS::Value> aValue, ErrorResult& aRv);
void
RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
uint32_t
Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
} // namespace AnyObservableArrayHelpers
namespace InterfaceObservableArrayHelpers {
already_AddRefed<TestInterface>
ElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, ErrorResult& aRv);
void
ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, TestInterface& aValue, ErrorResult& aRv);
void
AppendElement(mozilla::dom::TestExampleInterface* self, TestInterface& aValue, ErrorResult& aRv);
void
RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
uint32_t
Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
} // namespace InterfaceObservableArrayHelpers
namespace NullableObservableArrayHelpers {
Nullable<int32_t>
ElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, ErrorResult& aRv);
void
ReplaceElementAt(mozilla::dom::TestExampleInterface* self, uint32_t aIndex, const Nullable<int32_t>& aValue, ErrorResult& aRv);
void
AppendElement(mozilla::dom::TestExampleInterface* self, const Nullable<int32_t>& aValue, ErrorResult& aRv);
void
RemoveLastElement(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
uint32_t
Length(mozilla::dom::TestExampleInterface* self, ErrorResult& aRv);
} // namespace NullableObservableArrayHelpers
static const int32_t myLongConstant = 5;
static const bool nonEnumerableConst = true;
MOZ_CAN_RUN_SCRIPT bool
CollectJSONAttributes(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::TestExampleInterface* self, JS::Rooted<JSObject*>& result);
bool
Wrap(JSContext* aCx, mozilla::dom::TestExampleInterface* 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
ClearCachedCachedByteValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedCachedWritableByteValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedCachedSelfValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlySequenceValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlySequenceOfDictionariesValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlyNullableSequenceOfDictionariesValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlyFrozenSequenceValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlyFrozenNullableSequenceValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedBooleanObservableArrayValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedObjectObservableArrayValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedAnyObservableArrayValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedInterfaceObservableArrayValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedNullableObservableArrayValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlyDictionaryValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlyNullableDictionaryValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedWritableDictionaryValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlyFrozenDictionaryValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedReadonlyFrozenNullableDictionaryValue(mozilla::dom::TestExampleInterface* aObject);
void
ClearCachedWritableFrozenDictionaryValue(mozilla::dom::TestExampleInterface* aObject);
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::TestExampleInterface,
&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::TestExampleInterface,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace TestExampleInterface_Binding
namespace TestExampleProxyInterface_Binding {
typedef mozilla::dom::TestExampleProxyInterface NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::TestExampleProxyInterface* 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, 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::TestExampleProxyInterface,
&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::TestExampleProxyInterface,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace TestExampleProxyInterface_Binding
namespace TestExampleThrowingConstructorInterface_Binding {
typedef mozilla::dom::TestExampleThrowingConstructorInterface NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::TestExampleThrowingConstructorInterface* 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, 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::TestExampleThrowingConstructorInterface,
&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::TestExampleThrowingConstructorInterface,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace TestExampleThrowingConstructorInterface_Binding
namespace TestExampleWorkerInterface_Binding {
typedef mozilla::dom::TestExampleWorkerInterface NativeType;
bool
Wrap(JSContext* aCx, mozilla::dom::TestExampleWorkerInterface* 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, 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::TestExampleWorkerInterface,
&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::TestExampleWorkerInterface,
&CreateInterfaceObjects,
aDefineOnGlobal);
}
JSObject*
GetConstructorObject(JSContext* aCx);
} // namespace TestExampleWorkerInterface_Binding
} // namespace mozilla::dom
#endif // DOM_TESTEXAMPLEGENBINDING_H_