Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM APZTestData.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_APZTESTDATABINDING_H_
#define DOM_APZTESTDATABINDING_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 APZBucket;
struct APZBucketAtoms;
struct APZHitResult;
struct APZHitResultAtoms;
class APZHitResultFlags;
struct APZSampledResult;
struct APZSampledResultAtoms;
struct APZTestDataAtoms;
struct AdditionalDataEntry;
struct AdditionalDataEntryAtoms;
struct FrameUniformity;
struct FrameUniformityAtoms;
struct FrameUniformityResultsAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
struct ScrollFrameData;
struct ScrollFrameDataAtoms;
struct ScrollFrameDataEntry;
struct ScrollFrameDataEntryAtoms;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
struct APZHitResult : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<uint16_t> mHitResult;
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mLayersId;
MOZ_INIT_OUTSIDE_CTOR Optional<float> mScreenX;
MOZ_INIT_OUTSIDE_CTOR Optional<float> mScreenY;
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mScrollId;
APZHitResult();
explicit inline APZHitResult(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
APZHitResult(APZHitResult&& aOther) = default;
explicit inline APZHitResult(const APZHitResult& 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);
APZHitResult&
operator=(const APZHitResult& aOther);
private:
static bool
InitIds(JSContext* cx, APZHitResultAtoms* atomsCache);
};
namespace binding_detail {
struct FastAPZHitResult : public APZHitResult
{
inline FastAPZHitResult()
: APZHitResult(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct APZSampledResult : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mLayersId;
MOZ_INIT_OUTSIDE_CTOR Optional<double> mSampledTimeStamp;
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mScrollId;
MOZ_INIT_OUTSIDE_CTOR Optional<float> mScrollOffsetX;
MOZ_INIT_OUTSIDE_CTOR Optional<float> mScrollOffsetY;
APZSampledResult();
explicit inline APZSampledResult(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
APZSampledResult(APZSampledResult&& aOther) = default;
explicit inline APZSampledResult(const APZSampledResult& 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);
APZSampledResult&
operator=(const APZSampledResult& aOther);
private:
static bool
InitIds(JSContext* cx, APZSampledResultAtoms* atomsCache);
};
namespace binding_detail {
struct FastAPZSampledResult : public APZSampledResult
{
inline FastAPZSampledResult()
: APZSampledResult(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct AdditionalDataEntry : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mKey;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mValue;
AdditionalDataEntry();
explicit inline AdditionalDataEntry(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
AdditionalDataEntry(AdditionalDataEntry&& aOther) = default;
explicit inline AdditionalDataEntry(const AdditionalDataEntry& 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);
AdditionalDataEntry&
operator=(const AdditionalDataEntry& aOther);
private:
static bool
InitIds(JSContext* cx, AdditionalDataEntryAtoms* atomsCache);
};
namespace binding_detail {
struct FastAdditionalDataEntry : public AdditionalDataEntry
{
inline FastAdditionalDataEntry()
: AdditionalDataEntry(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct FrameUniformity : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<float> mFrameUniformity;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mLayerAddress;
FrameUniformity();
explicit inline FrameUniformity(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
FrameUniformity(FrameUniformity&& aOther) = default;
explicit inline FrameUniformity(const FrameUniformity& 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);
FrameUniformity&
operator=(const FrameUniformity& aOther);
private:
static bool
InitIds(JSContext* cx, FrameUniformityAtoms* atomsCache);
};
namespace binding_detail {
struct FastFrameUniformity : public FrameUniformity
{
inline FastFrameUniformity()
: FrameUniformity(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct ScrollFrameDataEntry : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mKey;
MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mValue;
ScrollFrameDataEntry();
explicit inline ScrollFrameDataEntry(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
ScrollFrameDataEntry(ScrollFrameDataEntry&& aOther) = default;
explicit inline ScrollFrameDataEntry(const ScrollFrameDataEntry& 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);
ScrollFrameDataEntry&
operator=(const ScrollFrameDataEntry& aOther);
private:
static bool
InitIds(JSContext* cx, ScrollFrameDataEntryAtoms* atomsCache);
};
namespace binding_detail {
struct FastScrollFrameDataEntry : public ScrollFrameDataEntry
{
inline FastScrollFrameDataEntry()
: ScrollFrameDataEntry(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct FrameUniformityResults : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<FrameUniformity>> mLayerUniformities;
FrameUniformityResults();
explicit inline FrameUniformityResults(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
FrameUniformityResults(FrameUniformityResults&& aOther) = default;
explicit inline FrameUniformityResults(const FrameUniformityResults& 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);
FrameUniformityResults&
operator=(const FrameUniformityResults& aOther);
private:
static bool
InitIds(JSContext* cx, FrameUniformityResultsAtoms* atomsCache);
};
namespace binding_detail {
struct FastFrameUniformityResults : public FrameUniformityResults
{
inline FastFrameUniformityResults()
: FrameUniformityResults(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct ScrollFrameData : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<ScrollFrameDataEntry>> mEntries;
MOZ_INIT_OUTSIDE_CTOR Optional<uint64_t> mScrollId;
ScrollFrameData();
explicit inline ScrollFrameData(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
ScrollFrameData(ScrollFrameData&& aOther) = default;
explicit inline ScrollFrameData(const ScrollFrameData& 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);
ScrollFrameData&
operator=(const ScrollFrameData& aOther);
private:
static bool
InitIds(JSContext* cx, ScrollFrameDataAtoms* atomsCache);
};
namespace binding_detail {
struct FastScrollFrameData : public ScrollFrameData
{
inline FastScrollFrameData()
: ScrollFrameData(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct APZBucket : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<ScrollFrameData>> mScrollFrames;
MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mSequenceNumber;
APZBucket();
explicit inline APZBucket(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
APZBucket(APZBucket&& aOther) = default;
explicit inline APZBucket(const APZBucket& 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);
APZBucket&
operator=(const APZBucket& aOther);
private:
static bool
InitIds(JSContext* cx, APZBucketAtoms* atomsCache);
};
namespace binding_detail {
struct FastAPZBucket : public APZBucket
{
inline FastAPZBucket()
: APZBucket(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
struct APZTestData : public DictionaryBase
{
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<AdditionalDataEntry>> mAdditionalData;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<APZHitResult>> mHitResults;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<APZBucket>> mPaints;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<APZBucket>> mRepaintRequests;
MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<APZSampledResult>> mSampledResults;
APZTestData();
explicit inline APZTestData(const FastDictionaryInitializer& )
{
// Do nothing here; this is used by our "Fast" subclass
}
APZTestData(APZTestData&& aOther) = default;
explicit inline APZTestData(const APZTestData& 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);
APZTestData&
operator=(const APZTestData& aOther);
private:
static bool
InitIds(JSContext* cx, APZTestDataAtoms* atomsCache);
};
namespace binding_detail {
struct FastAPZTestData : public APZTestData
{
inline FastAPZTestData()
: APZTestData(FastDictionaryInitializer())
{
// Doesn't matter what int we pass to the parent constructor
}
};
} // namespace binding_detail
namespace APZHitResultFlags_Binding {
typedef mozilla::dom::APZHitResultFlags NativeType;
static const uint16_t INVISIBLE = 0;
static const uint16_t VISIBLE = 1;
static const uint16_t IRREGULAR_AREA = 2;
static const uint16_t APZ_AWARE_LISTENERS = 4;
static const uint16_t INACTIVE_SCROLLFRAME = 8;
static const uint16_t PAN_X_DISABLED = 16;
static const uint16_t PAN_Y_DISABLED = 32;
static const uint16_t PINCH_ZOOM_DISABLED = 64;
static const uint16_t DOUBLE_TAP_ZOOM_DISABLED = 128;
static const uint16_t SCROLLBAR = 256;
static const uint16_t SCROLLBAR_THUMB = 512;
static const uint16_t SCROLLBAR_VERTICAL = 1024;
static const uint16_t REQUIRES_TARGET_CONFIRMATION = 2048;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::APZHitResultFlags,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace APZHitResultFlags_Binding
} // namespace mozilla::dom
#endif // DOM_APZTESTDATABINDING_H_