jsaddle-dom-0.10.0.0: src/JSDOM/Generated/Enums.hs
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webref IDL. Do not edit.
module JSDOM.Generated.Enums
(AacBitstreamFormat(..), js_AacBitstreamFormatAac, js_AacBitstreamFormatAdts, AlignSetting(..), js_AlignSettingStart, js_AlignSettingCenter, js_AlignSettingEnd, js_AlignSettingLeft, js_AlignSettingRight, AlphaOption(..), js_AlphaOptionKeep, js_AlphaOptionDiscard, AnimationPlayState(..), js_AnimationPlayStateIdle, js_AnimationPlayStateRunning, js_AnimationPlayStatePaused, js_AnimationPlayStateFinished, AnimationReplaceState(..), js_AnimationReplaceStateActive, js_AnimationReplaceStateRemoved, js_AnimationReplaceStatePersisted, AppendMode(..), js_AppendModeSegments, js_AppendModeSequence, AriaNotifyPriority(..), js_AriaNotifyPriorityNormal, js_AriaNotifyPriorityHigh, AudioContextLatencyCategory(..), js_AudioContextLatencyCategoryBalanced, js_AudioContextLatencyCategoryInteractive, js_AudioContextLatencyCategoryPlayback, AudioContextRenderSizeCategory(..), js_AudioContextRenderSizeCategoryDefault, js_AudioContextRenderSizeCategoryHardware, AudioContextState(..), js_AudioContextStateSuspended, js_AudioContextStateRunning, js_AudioContextStateClosed, js_AudioContextStateInterrupted, AudioSampleFormat(..), js_AudioSampleFormatU8, js_AudioSampleFormatS16, js_AudioSampleFormatS32, js_AudioSampleFormatF32, js_AudioSampleFormatU8Planar, js_AudioSampleFormatS16Planar, js_AudioSampleFormatS32Planar, js_AudioSampleFormatF32Planar, AudioSelectionPreferenceEnum(..), js_AudioSelectionPreferenceEnumPreferred, AudioSinkType(..), js_AudioSinkTypeNone, AutoKeyword(..), js_AutoKeywordAuto, AutomationRate(..), js_AutomationRateARate, js_AutomationRateKRate, AvcBitstreamFormat(..), js_AvcBitstreamFormatAnnexb, js_AvcBitstreamFormatAvc, BinaryType(..), js_BinaryTypeBlob, js_BinaryTypeArraybuffer, BiquadFilterType(..), js_BiquadFilterTypeLowpass, js_BiquadFilterTypeHighpass, js_BiquadFilterTypeBandpass, js_BiquadFilterTypeLowshelf, js_BiquadFilterTypeHighshelf, js_BiquadFilterTypePeaking, js_BiquadFilterTypeNotch, js_BiquadFilterTypeAllpass, BitrateMode(..), js_BitrateModeConstant, js_BitrateModeVariable, CSSMathOperator(..), js_CSSMathOperatorSum, js_CSSMathOperatorProduct, js_CSSMathOperatorNegate, js_CSSMathOperatorInvert, js_CSSMathOperatorMin, js_CSSMathOperatorMax, js_CSSMathOperatorClamp, CSSNumericBaseType(..), js_CSSNumericBaseTypeLength, js_CSSNumericBaseTypeAngle, js_CSSNumericBaseTypeTime, js_CSSNumericBaseTypeFrequency, js_CSSNumericBaseTypeResolution, js_CSSNumericBaseTypeFlex, js_CSSNumericBaseTypePercent, CanPlayTypeResult(..), js_CanPlayTypeResult, js_CanPlayTypeResultMaybe, js_CanPlayTypeResultProbably, CanvasColorType(..), js_CanvasColorTypeUnorm8, js_CanvasColorTypeFloat16, CanvasDirection(..), js_CanvasDirectionLtr, js_CanvasDirectionRtl, js_CanvasDirectionInherit, CanvasFillRule(..), js_CanvasFillRuleNonzero, js_CanvasFillRuleEvenodd, CanvasFontKerning(..), js_CanvasFontKerningAuto, js_CanvasFontKerningNormal, js_CanvasFontKerningNone, CanvasFontStretch(..), js_CanvasFontStretchUltraCondensed, js_CanvasFontStretchExtraCondensed, js_CanvasFontStretchCondensed, js_CanvasFontStretchSemiCondensed, js_CanvasFontStretchNormal, js_CanvasFontStretchSemiExpanded, js_CanvasFontStretchExpanded, js_CanvasFontStretchExtraExpanded, js_CanvasFontStretchUltraExpanded, CanvasFontVariantCaps(..), js_CanvasFontVariantCapsNormal, js_CanvasFontVariantCapsSmallCaps, js_CanvasFontVariantCapsAllSmallCaps, js_CanvasFontVariantCapsPetiteCaps, js_CanvasFontVariantCapsAllPetiteCaps, js_CanvasFontVariantCapsUnicase, js_CanvasFontVariantCapsTitlingCaps, CanvasLineCap(..), js_CanvasLineCapButt, js_CanvasLineCapRound, js_CanvasLineCapSquare, CanvasLineJoin(..), js_CanvasLineJoinRound, js_CanvasLineJoinBevel, js_CanvasLineJoinMiter, CanvasTextAlign(..), js_CanvasTextAlignStart, js_CanvasTextAlignEnd, js_CanvasTextAlignLeft, js_CanvasTextAlignRight, js_CanvasTextAlignCenter, CanvasTextBaseline(..), js_CanvasTextBaselineTop, js_CanvasTextBaselineHanging, js_CanvasTextBaselineMiddle, js_CanvasTextBaselineAlphabetic, js_CanvasTextBaselineIdeographic, js_CanvasTextBaselineBottom, CanvasTextRendering(..), js_CanvasTextRenderingAuto, js_CanvasTextRenderingOptimizeSpeed, js_CanvasTextRenderingOptimizeLegibility, js_CanvasTextRenderingGeometricPrecision, ChannelCountMode(..), js_ChannelCountModeMax, js_ChannelCountModeClampedMax, js_ChannelCountModeExplicit, ChannelInterpretation(..), js_ChannelInterpretationSpeakers, js_ChannelInterpretationDiscrete, ClientType(..), js_ClientTypeWindow, js_ClientTypeWorker, js_ClientTypeSharedworker, js_ClientTypeAll, CodecState(..), js_CodecStateUnconfigured, js_CodecStateConfigured, js_CodecStateClosed, ColorGamut(..), js_ColorGamutSrgb, js_ColorGamutP3, js_ColorGamutRec2020, ColorSpaceConversion(..), js_ColorSpaceConversionNone, js_ColorSpaceConversionDefault, CompositeOperation(..), js_CompositeOperationReplace, js_CompositeOperationAdd, js_CompositeOperationAccumulate, CompressionFormat(..), js_CompressionFormatBrotli, js_CompressionFormatDeflate, js_CompressionFormatDeflateRaw, js_CompressionFormatGzip, CookieSameSite(..), js_CookieSameSiteStrict, js_CookieSameSiteLax, js_CookieSameSiteNone, CredentialMediationRequirement(..), js_CredentialMediationRequirementSilent, js_CredentialMediationRequirementOptional, js_CredentialMediationRequirementConditional, js_CredentialMediationRequirementRequired, DOMParserSupportedType(..), js_DOMParserSupportedTypeTextHtml, js_DOMParserSupportedTypeTextXml, js_DOMParserSupportedTypeApplicationXml, js_DOMParserSupportedTypeApplicationXhtmlXml, js_DOMParserSupportedTypeImageSvgXml, DigitalCredentialIssuanceProtocol(..), js_DigitalCredentialIssuanceProtocolOpenid4vciV1, DigitalCredentialPresentationProtocol(..), js_DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned, js_DigitalCredentialPresentationProtocolOpenid4vpV1Signed, js_DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned, js_DigitalCredentialPresentationProtocolOrgIsoMdoc, DirectionSetting(..), js_DirectionSetting, js_DirectionSettingRl, js_DirectionSettingLr, DistanceModelType(..), js_DistanceModelTypeLinear, js_DistanceModelTypeInverse, js_DistanceModelTypeExponential, DocumentReadyState(..), js_DocumentReadyStateLoading, js_DocumentReadyStateInteractive, js_DocumentReadyStateComplete, DocumentVisibilityState(..), js_DocumentVisibilityStateVisible, js_DocumentVisibilityStateHidden, EncodedAudioChunkType(..), js_EncodedAudioChunkTypeKey, js_EncodedAudioChunkTypeDelta, EncodedVideoChunkType(..), js_EncodedVideoChunkTypeKey, js_EncodedVideoChunkTypeDelta, EndOfStreamError(..), js_EndOfStreamErrorNetwork, js_EndOfStreamErrorDecode, EndingType(..), js_EndingTypeTransparent, js_EndingTypeNative, FileSystemHandleKind(..), js_FileSystemHandleKindFile, js_FileSystemHandleKindDirectory, FillLightMode(..), js_FillLightModeAuto, js_FillLightModeOff, js_FillLightModeFlash, FillMode(..), js_FillModeNone, js_FillModeForwards, js_FillModeBackwards, js_FillModeBoth, js_FillModeAuto, FlowControlType(..), js_FlowControlTypeNone, js_FlowControlTypeHardware, FontFaceLoadStatus(..), js_FontFaceLoadStatusUnloaded, js_FontFaceLoadStatusLoading, js_FontFaceLoadStatusLoaded, js_FontFaceLoadStatusError, FontFaceSetLoadStatus(..), js_FontFaceSetLoadStatusLoading, js_FontFaceSetLoadStatusLoaded, FrameType(..), js_FrameTypeAuxiliary, js_FrameTypeTopLevel, js_FrameTypeNested, js_FrameTypeNone, FullscreenKeyboardLock(..), js_FullscreenKeyboardLockBrowser, js_FullscreenKeyboardLockNone, FullscreenNavigationUI(..), js_FullscreenNavigationUIAuto, js_FullscreenNavigationUIShow, js_FullscreenNavigationUIHide, GPUAddressMode(..), js_GPUAddressModeClampToEdge, js_GPUAddressModeRepeat, js_GPUAddressModeMirrorRepeat, GPUAutoLayoutMode(..), js_GPUAutoLayoutModeAuto, GPUBlendFactor(..), js_GPUBlendFactorZero, js_GPUBlendFactorOne, js_GPUBlendFactorSrc, js_GPUBlendFactorOneMinusSrc, js_GPUBlendFactorSrcAlpha, js_GPUBlendFactorOneMinusSrcAlpha, js_GPUBlendFactorDst, js_GPUBlendFactorOneMinusDst, js_GPUBlendFactorDstAlpha, js_GPUBlendFactorOneMinusDstAlpha, js_GPUBlendFactorSrcAlphaSaturated, js_GPUBlendFactorConstant, js_GPUBlendFactorOneMinusConstant, js_GPUBlendFactorSrc1, js_GPUBlendFactorOneMinusSrc1, js_GPUBlendFactorSrc1Alpha, js_GPUBlendFactorOneMinusSrc1Alpha, GPUBlendOperation(..), js_GPUBlendOperationAdd, js_GPUBlendOperationSubtract, js_GPUBlendOperationReverseSubtract, js_GPUBlendOperationMin, js_GPUBlendOperationMax, GPUBufferBindingType(..), js_GPUBufferBindingTypeUniform, js_GPUBufferBindingTypeStorage, js_GPUBufferBindingTypeReadOnlyStorage, GPUBufferMapState(..), js_GPUBufferMapStateUnmapped, js_GPUBufferMapStatePending, js_GPUBufferMapStateMapped, GPUCanvasAlphaMode(..), js_GPUCanvasAlphaModeOpaque, js_GPUCanvasAlphaModePremultiplied, GPUCanvasToneMappingMode(..), js_GPUCanvasToneMappingModeStandard, js_GPUCanvasToneMappingModeExtended, GPUCompareFunction(..), js_GPUCompareFunctionNever, js_GPUCompareFunctionLess, js_GPUCompareFunctionEqual, js_GPUCompareFunctionLessEqual, js_GPUCompareFunctionGreater, js_GPUCompareFunctionNotEqual, js_GPUCompareFunctionGreaterEqual, js_GPUCompareFunctionAlways, GPUCompilationMessageType(..), js_GPUCompilationMessageTypeError, js_GPUCompilationMessageTypeWarning, js_GPUCompilationMessageTypeInfo, GPUCullMode(..), js_GPUCullModeNone, js_GPUCullModeFront, js_GPUCullModeBack, GPUDeviceLostReason(..), js_GPUDeviceLostReasonUnknown, js_GPUDeviceLostReasonDestroyed, GPUErrorFilter(..), js_GPUErrorFilterValidation, js_GPUErrorFilterOutOfMemory, js_GPUErrorFilterInternal, GPUFeatureName(..), js_GPUFeatureNameCoreFeaturesAndLimits, js_GPUFeatureNameDepthClipControl, js_GPUFeatureNameDepth32floatStencil8, js_GPUFeatureNameTextureCompressionBc, js_GPUFeatureNameTextureCompressionBcSliced3d, js_GPUFeatureNameTextureCompressionEtc2, js_GPUFeatureNameTextureCompressionAstc, js_GPUFeatureNameTextureCompressionAstcSliced3d, js_GPUFeatureNameTimestampQuery, js_GPUFeatureNameIndirectFirstInstance, js_GPUFeatureNameShaderF16, js_GPUFeatureNameRg11b10ufloatRenderable, js_GPUFeatureNameBgra8unormStorage, js_GPUFeatureNameFloat32Filterable, js_GPUFeatureNameFloat32Blendable, js_GPUFeatureNameClipDistances, js_GPUFeatureNameDualSourceBlending, js_GPUFeatureNameSubgroups, js_GPUFeatureNameTextureFormatsTier1, js_GPUFeatureNameTextureFormatsTier2, js_GPUFeatureNamePrimitiveIndex, js_GPUFeatureNameTextureComponentSwizzle, js_GPUFeatureNameSubgroupSizeControl, js_GPUFeatureNameTextureCompressionUnaligned, js_GPUFeatureNameAtomicVec2uMinMax, GPUFilterMode(..), js_GPUFilterModeNearest, js_GPUFilterModeLinear, GPUFrontFace(..), js_GPUFrontFaceCcw, js_GPUFrontFaceCw, GPUIndexFormat(..), js_GPUIndexFormatUint16, js_GPUIndexFormatUint32, GPULoadOp(..), js_GPULoadOpLoad, js_GPULoadOpClear, GPUMipmapFilterMode(..), js_GPUMipmapFilterModeNearest, js_GPUMipmapFilterModeLinear, GPUPipelineErrorReason(..), js_GPUPipelineErrorReasonValidation, js_GPUPipelineErrorReasonInternal, GPUPowerPreference(..), js_GPUPowerPreferenceLowPower, js_GPUPowerPreferenceHighPerformance, GPUPrimitiveTopology(..), js_GPUPrimitiveTopologyPointList, js_GPUPrimitiveTopologyLineList, js_GPUPrimitiveTopologyLineStrip, js_GPUPrimitiveTopologyTriangleList, js_GPUPrimitiveTopologyTriangleStrip, GPUQueryType(..), js_GPUQueryTypeOcclusion, js_GPUQueryTypeTimestamp, GPUSamplerBindingType(..), js_GPUSamplerBindingTypeFiltering, js_GPUSamplerBindingTypeNonFiltering, js_GPUSamplerBindingTypeComparison, GPUStencilOperation(..), js_GPUStencilOperationKeep, js_GPUStencilOperationZero, js_GPUStencilOperationReplace, js_GPUStencilOperationInvert, js_GPUStencilOperationIncrementClamp, js_GPUStencilOperationDecrementClamp, js_GPUStencilOperationIncrementWrap, js_GPUStencilOperationDecrementWrap, GPUStorageTextureAccess(..), js_GPUStorageTextureAccessWriteOnly, js_GPUStorageTextureAccessReadOnly, js_GPUStorageTextureAccessReadWrite, GPUStoreOp(..), js_GPUStoreOpStore, js_GPUStoreOpDiscard, GPUTextureAspect(..), js_GPUTextureAspectAll, js_GPUTextureAspectStencilOnly, js_GPUTextureAspectDepthOnly, GPUTextureDimension(..), js_GPUTextureDimension1d, js_GPUTextureDimension2d, js_GPUTextureDimension3d, GPUTextureFormat(..), js_GPUTextureFormatR8unorm, js_GPUTextureFormatR8snorm, js_GPUTextureFormatR8uint, js_GPUTextureFormatR8sint, js_GPUTextureFormatR16unorm, js_GPUTextureFormatR16snorm, js_GPUTextureFormatR16uint, js_GPUTextureFormatR16sint, js_GPUTextureFormatR16float, js_GPUTextureFormatRg8unorm, js_GPUTextureFormatRg8snorm, js_GPUTextureFormatRg8uint, js_GPUTextureFormatRg8sint, js_GPUTextureFormatR32uint, js_GPUTextureFormatR32sint, js_GPUTextureFormatR32float, js_GPUTextureFormatRg16unorm, js_GPUTextureFormatRg16snorm, js_GPUTextureFormatRg16uint, js_GPUTextureFormatRg16sint, js_GPUTextureFormatRg16float, js_GPUTextureFormatRgba8unorm, js_GPUTextureFormatRgba8unormSrgb, js_GPUTextureFormatRgba8snorm, js_GPUTextureFormatRgba8uint, js_GPUTextureFormatRgba8sint, js_GPUTextureFormatBgra8unorm, js_GPUTextureFormatBgra8unormSrgb, js_GPUTextureFormatRgb9e5ufloat, js_GPUTextureFormatRgb10a2uint, js_GPUTextureFormatRgb10a2unorm, js_GPUTextureFormatRg11b10ufloat, js_GPUTextureFormatRg32uint, js_GPUTextureFormatRg32sint, js_GPUTextureFormatRg32float, js_GPUTextureFormatRgba16unorm, js_GPUTextureFormatRgba16snorm, js_GPUTextureFormatRgba16uint, js_GPUTextureFormatRgba16sint, js_GPUTextureFormatRgba16float, js_GPUTextureFormatRgba32uint, js_GPUTextureFormatRgba32sint, js_GPUTextureFormatRgba32float, js_GPUTextureFormatStencil8, js_GPUTextureFormatDepth16unorm, js_GPUTextureFormatDepth24plus, js_GPUTextureFormatDepth24plusStencil8, js_GPUTextureFormatDepth32float, js_GPUTextureFormatDepth32floatStencil8, js_GPUTextureFormatBc1RgbaUnorm, js_GPUTextureFormatBc1RgbaUnormSrgb, js_GPUTextureFormatBc2RgbaUnorm, js_GPUTextureFormatBc2RgbaUnormSrgb, js_GPUTextureFormatBc3RgbaUnorm, js_GPUTextureFormatBc3RgbaUnormSrgb, js_GPUTextureFormatBc4RUnorm, js_GPUTextureFormatBc4RSnorm, js_GPUTextureFormatBc5RgUnorm, js_GPUTextureFormatBc5RgSnorm, js_GPUTextureFormatBc6hRgbUfloat, js_GPUTextureFormatBc6hRgbFloat, js_GPUTextureFormatBc7RgbaUnorm, js_GPUTextureFormatBc7RgbaUnormSrgb, js_GPUTextureFormatEtc2Rgb8unorm, js_GPUTextureFormatEtc2Rgb8unormSrgb, js_GPUTextureFormatEtc2Rgb8a1unorm, js_GPUTextureFormatEtc2Rgb8a1unormSrgb, js_GPUTextureFormatEtc2Rgba8unorm, js_GPUTextureFormatEtc2Rgba8unormSrgb, js_GPUTextureFormatEacR11unorm, js_GPUTextureFormatEacR11snorm, js_GPUTextureFormatEacRg11unorm, js_GPUTextureFormatEacRg11snorm, js_GPUTextureFormatAstc4x4Unorm, js_GPUTextureFormatAstc4x4UnormSrgb, js_GPUTextureFormatAstc5x4Unorm, js_GPUTextureFormatAstc5x4UnormSrgb, js_GPUTextureFormatAstc5x5Unorm, js_GPUTextureFormatAstc5x5UnormSrgb, js_GPUTextureFormatAstc6x5Unorm, js_GPUTextureFormatAstc6x5UnormSrgb, js_GPUTextureFormatAstc6x6Unorm, js_GPUTextureFormatAstc6x6UnormSrgb, js_GPUTextureFormatAstc8x5Unorm, js_GPUTextureFormatAstc8x5UnormSrgb, js_GPUTextureFormatAstc8x6Unorm, js_GPUTextureFormatAstc8x6UnormSrgb, js_GPUTextureFormatAstc8x8Unorm, js_GPUTextureFormatAstc8x8UnormSrgb, js_GPUTextureFormatAstc10x5Unorm, js_GPUTextureFormatAstc10x5UnormSrgb, js_GPUTextureFormatAstc10x6Unorm, js_GPUTextureFormatAstc10x6UnormSrgb, js_GPUTextureFormatAstc10x8Unorm, js_GPUTextureFormatAstc10x8UnormSrgb, js_GPUTextureFormatAstc10x10Unorm, js_GPUTextureFormatAstc10x10UnormSrgb, js_GPUTextureFormatAstc12x10Unorm, js_GPUTextureFormatAstc12x10UnormSrgb, js_GPUTextureFormatAstc12x12Unorm, js_GPUTextureFormatAstc12x12UnormSrgb, GPUTextureSampleType(..), js_GPUTextureSampleTypeFloat, js_GPUTextureSampleTypeUnfilterableFloat, js_GPUTextureSampleTypeDepth, js_GPUTextureSampleTypeSint, js_GPUTextureSampleTypeUint, GPUTextureViewDimension(..), js_GPUTextureViewDimension1d, js_GPUTextureViewDimension2d, js_GPUTextureViewDimension2dArray, js_GPUTextureViewDimensionCube, js_GPUTextureViewDimensionCubeArray, js_GPUTextureViewDimension3d, GPUVertexFormat(..), js_GPUVertexFormatUint8, js_GPUVertexFormatUint8x2, js_GPUVertexFormatUint8x4, js_GPUVertexFormatSint8, js_GPUVertexFormatSint8x2, js_GPUVertexFormatSint8x4, js_GPUVertexFormatUnorm8, js_GPUVertexFormatUnorm8x2, js_GPUVertexFormatUnorm8x4, js_GPUVertexFormatSnorm8, js_GPUVertexFormatSnorm8x2, js_GPUVertexFormatSnorm8x4, js_GPUVertexFormatUint16, js_GPUVertexFormatUint16x2, js_GPUVertexFormatUint16x4, js_GPUVertexFormatSint16, js_GPUVertexFormatSint16x2, js_GPUVertexFormatSint16x4, js_GPUVertexFormatUnorm16, js_GPUVertexFormatUnorm16x2, js_GPUVertexFormatUnorm16x4, js_GPUVertexFormatSnorm16, js_GPUVertexFormatSnorm16x2, js_GPUVertexFormatSnorm16x4, js_GPUVertexFormatFloat16, js_GPUVertexFormatFloat16x2, js_GPUVertexFormatFloat16x4, js_GPUVertexFormatFloat32, js_GPUVertexFormatFloat32x2, js_GPUVertexFormatFloat32x3, js_GPUVertexFormatFloat32x4, js_GPUVertexFormatUint32, js_GPUVertexFormatUint32x2, js_GPUVertexFormatUint32x3, js_GPUVertexFormatUint32x4, js_GPUVertexFormatSint32, js_GPUVertexFormatSint32x2, js_GPUVertexFormatSint32x3, js_GPUVertexFormatSint32x4, js_GPUVertexFormatUnorm1010102, js_GPUVertexFormatUnorm8x4Bgra, js_GPUVertexFormatSnorm1010102, GPUVertexStepMode(..), js_GPUVertexStepModeVertex, js_GPUVertexStepModeInstance, GamepadHapticEffectType(..), js_GamepadHapticEffectTypeDualRumble, js_GamepadHapticEffectTypeTriggerRumble, GamepadHapticsResult(..), js_GamepadHapticsResultComplete, js_GamepadHapticsResultPreempted, GamepadMappingType(..), js_GamepadMappingType, js_GamepadMappingTypeStandard, js_GamepadMappingTypeXrStandard, GetUserMediaSemantics(..), js_GetUserMediaSemanticsBrowserChooses, js_GetUserMediaSemanticsUserChooses, HardwareAcceleration(..), js_HardwareAccelerationNoPreference, js_HardwareAccelerationPreferHardware, js_HardwareAccelerationPreferSoftware, HdrMetadataType(..), js_HdrMetadataTypeSmpteSt2086, js_HdrMetadataTypeSmpteSt209410, js_HdrMetadataTypeSmpteSt209440, HevcBitstreamFormat(..), js_HevcBitstreamFormatAnnexb, js_HevcBitstreamFormatHevc, HighlightType(..), js_HighlightTypeHighlight, js_HighlightTypeSpellingError, js_HighlightTypeGrammarError, IDBCursorDirection(..), js_IDBCursorDirectionNext, js_IDBCursorDirectionNextunique, js_IDBCursorDirectionPrev, js_IDBCursorDirectionPrevunique, IDBRequestReadyState(..), js_IDBRequestReadyStatePending, js_IDBRequestReadyStateDone, IDBTransactionDurability(..), js_IDBTransactionDurabilityDefault, js_IDBTransactionDurabilityStrict, js_IDBTransactionDurabilityRelaxed, IDBTransactionMode(..), js_IDBTransactionModeReadonly, js_IDBTransactionModeReadwrite, js_IDBTransactionModeVersionchange, IPAddressSpace(..), js_IPAddressSpacePublic, js_IPAddressSpaceLocal, js_IPAddressSpaceLoopback, IdentityCredentialRequestOptionsContext(..), js_IdentityCredentialRequestOptionsContextSignin, js_IdentityCredentialRequestOptionsContextSignup, js_IdentityCredentialRequestOptionsContextUse, js_IdentityCredentialRequestOptionsContextContinue, IdentityCredentialRequestOptionsMode(..), js_IdentityCredentialRequestOptionsModeActive, js_IdentityCredentialRequestOptionsModePassive, ImageDataPixelFormat(..), js_ImageDataPixelFormatRgbaUnorm8, js_ImageDataPixelFormatRgbaFloat16, ImageSmoothingQuality(..), js_ImageSmoothingQualityLow, js_ImageSmoothingQualityMedium, js_ImageSmoothingQualityHigh, IterationCompositeOperation(..), js_IterationCompositeOperationReplace, js_IterationCompositeOperationAccumulate, KeyFormat(..), js_KeyFormatRawPublic, js_KeyFormatRawPrivate, js_KeyFormatRawSeed, js_KeyFormatRawSecret, js_KeyFormatRaw, js_KeyFormatSpki, js_KeyFormatPkcs8, js_KeyFormatJwk, KeyType(..), js_KeyTypePublic, js_KeyTypePrivate, js_KeyTypeSecret, KeyUsage(..), js_KeyUsageEncrypt, js_KeyUsageDecrypt, js_KeyUsageSign, js_KeyUsageVerify, js_KeyUsageDeriveKey, js_KeyUsageDeriveBits, js_KeyUsageWrapKey, js_KeyUsageUnwrapKey, js_KeyUsageEncapsulateKey, js_KeyUsageEncapsulateBits, js_KeyUsageDecapsulateKey, js_KeyUsageDecapsulateBits, LatencyMode(..), js_LatencyModeQuality, js_LatencyModeRealtime, LineAlignSetting(..), js_LineAlignSettingStart, js_LineAlignSettingCenter, js_LineAlignSettingEnd, LockMode(..), js_LockModeShared, js_LockModeExclusive, LoginStatus(..), js_LoginStatusLoggedIn, js_LoginStatusLoggedOut, MIDIPortConnectionState(..), js_MIDIPortConnectionStateOpen, js_MIDIPortConnectionStateClosed, js_MIDIPortConnectionStatePending, MIDIPortDeviceState(..), js_MIDIPortDeviceStateDisconnected, js_MIDIPortDeviceStateConnected, MIDIPortType(..), js_MIDIPortTypeInput, js_MIDIPortTypeOutput, MediaDecodingType(..), js_MediaDecodingTypeFile, js_MediaDecodingTypeMediaSource, js_MediaDecodingTypeWebrtc, MediaDeviceKind(..), js_MediaDeviceKindAudioinput, js_MediaDeviceKindAudiooutput, js_MediaDeviceKindVideoinput, MediaEncodingType(..), js_MediaEncodingTypeRecord, js_MediaEncodingTypeWebrtc, MediaKeyMessageType(..), js_MediaKeyMessageTypeLicenseRequest, js_MediaKeyMessageTypeLicenseRenewal, js_MediaKeyMessageTypeLicenseRelease, js_MediaKeyMessageTypeIndividualizationRequest, MediaKeySessionClosedReason(..), js_MediaKeySessionClosedReasonInternalError, js_MediaKeySessionClosedReasonClosedByApplication, js_MediaKeySessionClosedReasonReleaseAcknowledged, js_MediaKeySessionClosedReasonHardwareContextReset, js_MediaKeySessionClosedReasonResourceEvicted, MediaKeySessionType(..), js_MediaKeySessionTypeTemporary, js_MediaKeySessionTypePersistentLicense, MediaKeyStatus(..), js_MediaKeyStatusUsable, js_MediaKeyStatusExpired, js_MediaKeyStatusReleased, js_MediaKeyStatusOutputRestricted, js_MediaKeyStatusOutputDownscaled, js_MediaKeyStatusUsableInFuture, js_MediaKeyStatusStatusPending, js_MediaKeyStatusInternalError, MediaKeysRequirement(..), js_MediaKeysRequirementRequired, js_MediaKeysRequirementOptional, js_MediaKeysRequirementNotAllowed, MediaSessionAction(..), js_MediaSessionActionPlay, js_MediaSessionActionPause, js_MediaSessionActionSeekbackward, js_MediaSessionActionSeekforward, js_MediaSessionActionPrevioustrack, js_MediaSessionActionNexttrack, js_MediaSessionActionSkipad, js_MediaSessionActionStop, js_MediaSessionActionSeekto, js_MediaSessionActionTogglemicrophone, js_MediaSessionActionTogglecamera, js_MediaSessionActionTogglescreenshare, js_MediaSessionActionHangup, js_MediaSessionActionPreviousslide, js_MediaSessionActionNextslide, js_MediaSessionActionEnterpictureinpicture, js_MediaSessionActionVoiceactivity, MediaSessionEnterPictureInPictureReason(..), js_MediaSessionEnterPictureInPictureReasonOther, js_MediaSessionEnterPictureInPictureReasonUseraction, js_MediaSessionEnterPictureInPictureReasonContentoccluded, MediaSessionPlaybackState(..), js_MediaSessionPlaybackStateNone, js_MediaSessionPlaybackStatePaused, js_MediaSessionPlaybackStatePlaying, MediaStreamTrackState(..), js_MediaStreamTrackStateLive, js_MediaStreamTrackStateEnded, MonitorTypeSurfacesEnum(..), js_MonitorTypeSurfacesEnumInclude, js_MonitorTypeSurfacesEnumExclude, NavigationFocusReset(..), js_NavigationFocusResetAfterTransition, js_NavigationFocusResetManual, NavigationHistoryBehavior(..), js_NavigationHistoryBehaviorAuto, js_NavigationHistoryBehaviorPush, js_NavigationHistoryBehaviorReplace, NavigationScrollBehavior(..), js_NavigationScrollBehaviorAfterTransition, js_NavigationScrollBehaviorManual, NavigationTimingType(..), js_NavigationTimingTypeNavigate, js_NavigationTimingTypeReload, js_NavigationTimingTypeBackForward, NavigationType(..), js_NavigationTypePush, js_NavigationTypeReplace, js_NavigationTypeReload, js_NavigationTypeTraverse, NotificationDirection(..), js_NotificationDirectionAuto, js_NotificationDirectionLtr, js_NotificationDirectionRtl, NotificationPermission(..), js_NotificationPermissionDefault, js_NotificationPermissionDenied, js_NotificationPermissionGranted, OTPCredentialTransportType(..), js_OTPCredentialTransportTypeSms, OffscreenRenderingContextId(..), js_OffscreenRenderingContextId2d, js_OffscreenRenderingContextIdBitmaprenderer, js_OffscreenRenderingContextIdWebgl, js_OffscreenRenderingContextIdWebgl2, js_OffscreenRenderingContextIdWebgpu, OperationType(..), js_OperationTypeTokenRequest, js_OperationTypeSendRedemptionRecord, js_OperationTypeTokenRedemption, OpusApplication(..), js_OpusApplicationVoip, js_OpusApplicationAudio, js_OpusApplicationLowdelay, OpusBitstreamFormat(..), js_OpusBitstreamFormatOpus, js_OpusBitstreamFormatOgg, OpusSignal(..), js_OpusSignalAuto, js_OpusSignalMusic, js_OpusSignalVoice, OrientationLockType(..), js_OrientationLockTypeAny, js_OrientationLockTypeNatural, js_OrientationLockTypeLandscape, js_OrientationLockTypePortrait, js_OrientationLockTypePortraitPrimary, js_OrientationLockTypePortraitSecondary, js_OrientationLockTypeLandscapePrimary, js_OrientationLockTypeLandscapeSecondary, OrientationType(..), js_OrientationTypePortraitPrimary, js_OrientationTypePortraitSecondary, js_OrientationTypeLandscapePrimary, js_OrientationTypeLandscapeSecondary, OscillatorType(..), js_OscillatorTypeSine, js_OscillatorTypeSquare, js_OscillatorTypeSawtooth, js_OscillatorTypeTriangle, js_OscillatorTypeCustom, OverSampleType(..), js_OverSampleTypeNone, js_OverSampleType2x, js_OverSampleType4x, PanningModelType(..), js_PanningModelTypeEqualpower, js_PanningModelTypeHRTF, ParityType(..), js_ParityTypeNone, js_ParityTypeEven, js_ParityTypeOdd, PaymentComplete(..), js_PaymentCompleteFail, js_PaymentCompleteSuccess, js_PaymentCompleteUnknown, PaymentShippingType(..), js_PaymentShippingTypeShipping, js_PaymentShippingTypeDelivery, js_PaymentShippingTypePickup, PermissionState(..), js_PermissionStateGranted, js_PermissionStateDenied, js_PermissionStatePrompt, PlaybackDirection(..), js_PlaybackDirectionNormal, js_PlaybackDirectionReverse, js_PlaybackDirectionAlternate, js_PlaybackDirectionAlternateReverse, PositionAlignSetting(..), js_PositionAlignSettingLineLeft, js_PositionAlignSettingCenter, js_PositionAlignSettingLineRight, js_PositionAlignSettingAuto, PredefinedColorSpace(..), js_PredefinedColorSpaceSrgb, js_PredefinedColorSpaceSrgbLinear, js_PredefinedColorSpaceDisplayP3, js_PredefinedColorSpaceDisplayP3Linear, PresentationStyle(..), js_PresentationStyleUnspecified, js_PresentationStyleInline, js_PresentationStyleAttachment, PushEncryptionKeyName(..), js_PushEncryptionKeyNameP256dh, js_PushEncryptionKeyNameAuth, RTCBundlePolicy(..), js_RTCBundlePolicyBalanced, js_RTCBundlePolicyMaxCompat, js_RTCBundlePolicyMaxBundle, RTCDataChannelState(..), js_RTCDataChannelStateConnecting, js_RTCDataChannelStateOpen, js_RTCDataChannelStateClosing, js_RTCDataChannelStateClosed, RTCDegradationPreference(..), js_RTCDegradationPreferenceMaintainFramerate, js_RTCDegradationPreferenceMaintainResolution, js_RTCDegradationPreferenceBalanced, js_RTCDegradationPreferenceMaintainFramerateAndResolution, RTCDtlsTransportState(..), js_RTCDtlsTransportStateNew, js_RTCDtlsTransportStateConnecting, js_RTCDtlsTransportStateConnected, js_RTCDtlsTransportStateClosed, js_RTCDtlsTransportStateFailed, RTCErrorDetailType(..), js_RTCErrorDetailTypeDataChannelFailure, js_RTCErrorDetailTypeDtlsFailure, js_RTCErrorDetailTypeFingerprintFailure, js_RTCErrorDetailTypeSctpFailure, js_RTCErrorDetailTypeSdpSyntaxError, js_RTCErrorDetailTypeHardwareEncoderNotAvailable, js_RTCErrorDetailTypeHardwareEncoderError, RTCIceCandidateType(..), js_RTCIceCandidateTypeHost, js_RTCIceCandidateTypeSrflx, js_RTCIceCandidateTypePrflx, js_RTCIceCandidateTypeRelay, RTCIceComponent(..), js_RTCIceComponentRtp, js_RTCIceComponentRtcp, RTCIceConnectionState(..), js_RTCIceConnectionStateClosed, js_RTCIceConnectionStateFailed, js_RTCIceConnectionStateDisconnected, js_RTCIceConnectionStateNew, js_RTCIceConnectionStateChecking, js_RTCIceConnectionStateCompleted, js_RTCIceConnectionStateConnected, RTCIceGathererState(..), js_RTCIceGathererStateNew, js_RTCIceGathererStateGathering, js_RTCIceGathererStateComplete, RTCIceGatheringState(..), js_RTCIceGatheringStateNew, js_RTCIceGatheringStateGathering, js_RTCIceGatheringStateComplete, RTCIceProtocol(..), js_RTCIceProtocolUdp, js_RTCIceProtocolTcp, RTCIceRole(..), js_RTCIceRoleUnknown, js_RTCIceRoleControlling, js_RTCIceRoleControlled, RTCIceServerTransportProtocol(..), js_RTCIceServerTransportProtocolUdp, js_RTCIceServerTransportProtocolTcp, js_RTCIceServerTransportProtocolTls, RTCIceTcpCandidateType(..), js_RTCIceTcpCandidateTypeActive, js_RTCIceTcpCandidateTypePassive, js_RTCIceTcpCandidateTypeSo, RTCIceTransportPolicy(..), js_RTCIceTransportPolicyRelay, js_RTCIceTransportPolicyAll, RTCIceTransportState(..), js_RTCIceTransportStateClosed, js_RTCIceTransportStateFailed, js_RTCIceTransportStateDisconnected, js_RTCIceTransportStateNew, js_RTCIceTransportStateChecking, js_RTCIceTransportStateCompleted, js_RTCIceTransportStateConnected, RTCPeerConnectionState(..), js_RTCPeerConnectionStateClosed, js_RTCPeerConnectionStateFailed, js_RTCPeerConnectionStateDisconnected, js_RTCPeerConnectionStateNew, js_RTCPeerConnectionStateConnecting, js_RTCPeerConnectionStateConnected, RTCPriorityType(..), js_RTCPriorityTypeVeryLow, js_RTCPriorityTypeLow, js_RTCPriorityTypeMedium, js_RTCPriorityTypeHigh, RTCRtcpMuxPolicy(..), js_RTCRtcpMuxPolicyRequire, RTCRtpScriptTransformType(..), js_RTCRtpScriptTransformTypeSframe, RTCRtpTransceiverDirection(..), js_RTCRtpTransceiverDirectionSendrecv, js_RTCRtpTransceiverDirectionSendonly, js_RTCRtpTransceiverDirectionRecvonly, js_RTCRtpTransceiverDirectionInactive, js_RTCRtpTransceiverDirectionStopped, RTCSctpTransportState(..), js_RTCSctpTransportStateConnecting, js_RTCSctpTransportStateConnected, js_RTCSctpTransportStateClosed, RTCSdpType(..), js_RTCSdpTypeOffer, js_RTCSdpTypePranswer, js_RTCSdpTypeAnswer, js_RTCSdpTypeRollback, RTCSignalingState(..), js_RTCSignalingStateStable, js_RTCSignalingStateHaveLocalOffer, js_RTCSignalingStateHaveRemoteOffer, js_RTCSignalingStateHaveLocalPranswer, js_RTCSignalingStateHaveRemotePranswer, js_RTCSignalingStateClosed, ReadableStreamReaderMode(..), js_ReadableStreamReaderModeByob, ReadableStreamType(..), js_ReadableStreamTypeBytes, ReadyState(..), js_ReadyStateClosed, js_ReadyStateOpen, js_ReadyStateEnded, RecordingState(..), js_RecordingStateInactive, js_RecordingStateRecording, js_RecordingStatePaused, RedEyeReduction(..), js_RedEyeReductionNever, js_RedEyeReductionAlways, js_RedEyeReductionControllable, ReferrerPolicy(..), js_ReferrerPolicy, js_ReferrerPolicyNoReferrer, js_ReferrerPolicyNoReferrerWhenDowngrade, js_ReferrerPolicySameOrigin, js_ReferrerPolicyOrigin, js_ReferrerPolicyStrictOrigin, js_ReferrerPolicyOriginWhenCrossOrigin, js_ReferrerPolicyStrictOriginWhenCrossOrigin, js_ReferrerPolicyUnsafeUrl, RefreshPolicy(..), js_RefreshPolicyNone, js_RefreshPolicyRefresh, RemotePlaybackState(..), js_RemotePlaybackStateConnecting, js_RemotePlaybackStateConnected, js_RemotePlaybackStateDisconnected, RequestCache(..), js_RequestCacheDefault, js_RequestCacheNoStore, js_RequestCacheReload, js_RequestCacheNoCache, js_RequestCacheForceCache, js_RequestCacheOnlyIfCached, RequestCredentials(..), js_RequestCredentialsOmit, js_RequestCredentialsSameOrigin, js_RequestCredentialsInclude, RequestDestination(..), js_RequestDestination, js_RequestDestinationAudio, js_RequestDestinationAudioworklet, js_RequestDestinationDocument, js_RequestDestinationEmbed, js_RequestDestinationFont, js_RequestDestinationFrame, js_RequestDestinationIframe, js_RequestDestinationImage, js_RequestDestinationJson, js_RequestDestinationManifest, js_RequestDestinationObject, js_RequestDestinationPaintworklet, js_RequestDestinationReport, js_RequestDestinationScript, js_RequestDestinationSharedworker, js_RequestDestinationStyle, js_RequestDestinationText, js_RequestDestinationTrack, js_RequestDestinationVideo, js_RequestDestinationWorker, js_RequestDestinationXslt, RequestDuplex(..), js_RequestDuplexHalf, RequestMode(..), js_RequestModeNavigate, js_RequestModeSameOrigin, js_RequestModeNoCors, js_RequestModeCors, RequestPriority(..), js_RequestPriorityHigh, js_RequestPriorityLow, js_RequestPriorityAuto, RequestRedirect(..), js_RequestRedirectFollow, js_RequestRedirectError, js_RequestRedirectManual, ResizeObserverBoxOptions(..), js_ResizeObserverBoxOptionsBorderBox, js_ResizeObserverBoxOptionsContentBox, js_ResizeObserverBoxOptionsDevicePixelContentBox, ResponseType(..), js_ResponseTypeBasic, js_ResponseTypeCors, js_ResponseTypeDefault, js_ResponseTypeError, js_ResponseTypeOpaque, js_ResponseTypeOpaqueredirect, RouterSourceEnum(..), js_RouterSourceEnumCache, js_RouterSourceEnumFetchEvent, js_RouterSourceEnumNetwork, js_RouterSourceEnumRaceNetworkAndFetchHandler, RunningStatus(..), js_RunningStatusRunning, js_RunningStatusNotRunning, SameSiteCookiesType(..), js_SameSiteCookiesTypeAll, js_SameSiteCookiesTypeNone, SanitizerPresets(..), js_SanitizerPresetsDefault, ScrollAxis(..), js_ScrollAxisBlock, js_ScrollAxisInline, js_ScrollAxisX, js_ScrollAxisY, ScrollBehavior(..), js_ScrollBehaviorAuto, js_ScrollBehaviorInstant, js_ScrollBehaviorSmooth, ScrollIntoViewContainer(..), js_ScrollIntoViewContainerAll, js_ScrollIntoViewContainerNearest, ScrollLogicalPosition(..), js_ScrollLogicalPositionStart, js_ScrollLogicalPositionCenter, js_ScrollLogicalPositionEnd, js_ScrollLogicalPositionNearest, ScrollRestoration(..), js_ScrollRestorationAuto, js_ScrollRestorationManual, ScrollSetting(..), js_ScrollSetting, js_ScrollSettingUp, SecurityPolicyViolationEventDisposition(..), js_SecurityPolicyViolationEventDispositionEnforce, js_SecurityPolicyViolationEventDispositionReport, SegmentType(..), js_SegmentTypeHumanFace, js_SegmentTypeLeftEye, js_SegmentTypeRightEye, js_SegmentTypeEye, js_SegmentTypeMouth, SelectionMode(..), js_SelectionModeSelect, js_SelectionModeStart, js_SelectionModeEnd, js_SelectionModePreserve, SelfCapturePreferenceEnum(..), js_SelfCapturePreferenceEnumInclude, js_SelfCapturePreferenceEnumExclude, ServiceWorkerState(..), js_ServiceWorkerStateParsed, js_ServiceWorkerStateInstalling, js_ServiceWorkerStateInstalled, js_ServiceWorkerStateActivating, js_ServiceWorkerStateActivated, js_ServiceWorkerStateRedundant, ServiceWorkerUpdateViaCache(..), js_ServiceWorkerUpdateViaCacheImports, js_ServiceWorkerUpdateViaCacheAll, js_ServiceWorkerUpdateViaCacheNone, ShadowRootMode(..), js_ShadowRootModeOpen, js_ShadowRootModeClosed, SlotAssignmentMode(..), js_SlotAssignmentModeManual, js_SlotAssignmentModeNamed, SpeechRecognitionAvailabilityStatus(..), js_SpeechRecognitionAvailabilityStatusUnavailable, js_SpeechRecognitionAvailabilityStatusDownloadable, js_SpeechRecognitionAvailabilityStatusDownloading, js_SpeechRecognitionAvailabilityStatusAvailable, SpeechRecognitionErrorCode(..), js_SpeechRecognitionErrorCodeNoSpeech, js_SpeechRecognitionErrorCodeAborted, js_SpeechRecognitionErrorCodeAudioCapture, js_SpeechRecognitionErrorCodeNetwork, js_SpeechRecognitionErrorCodeNotAllowed, js_SpeechRecognitionErrorCodeServiceNotAllowed, js_SpeechRecognitionErrorCodeLanguageNotSupported, js_SpeechRecognitionErrorCodePhrasesNotSupported, SpeechRecognitionQuality(..), js_SpeechRecognitionQualityCommand, js_SpeechRecognitionQualityDictation, js_SpeechRecognitionQualityConversation, SpeechSynthesisErrorCode(..), js_SpeechSynthesisErrorCodeCanceled, js_SpeechSynthesisErrorCodeInterrupted, js_SpeechSynthesisErrorCodeAudioBusy, js_SpeechSynthesisErrorCodeAudioHardware, js_SpeechSynthesisErrorCodeNetwork, js_SpeechSynthesisErrorCodeSynthesisUnavailable, js_SpeechSynthesisErrorCodeSynthesisFailed, js_SpeechSynthesisErrorCodeLanguageUnavailable, js_SpeechSynthesisErrorCodeVoiceUnavailable, js_SpeechSynthesisErrorCodeTextTooLong, js_SpeechSynthesisErrorCodeInvalidArgument, js_SpeechSynthesisErrorCodeNotAllowed, SurfaceSwitchingPreferenceEnum(..), js_SurfaceSwitchingPreferenceEnumInclude, js_SurfaceSwitchingPreferenceEnumExclude, SystemAudioPreferenceEnum(..), js_SystemAudioPreferenceEnumInclude, js_SystemAudioPreferenceEnumExclude, TaskPriority(..), js_TaskPriorityUserBlocking, js_TaskPriorityUserVisible, js_TaskPriorityBackground, TextTrackKind(..), js_TextTrackKindSubtitles, js_TextTrackKindCaptions, js_TextTrackKindDescriptions, js_TextTrackKindChapters, js_TextTrackKindMetadata, TextTrackMode(..), js_TextTrackModeDisabled, js_TextTrackModeHidden, js_TextTrackModeShowing, TokenVersion(..), js_TokenVersion1, TouchType(..), js_TouchTypeDirect, js_TouchTypeStylus, TransferFunction(..), js_TransferFunctionSrgb, js_TransferFunctionPq, js_TransferFunctionHlg, VideoColorPrimaries(..), js_VideoColorPrimariesBt709, js_VideoColorPrimariesBt470bg, js_VideoColorPrimariesSmpte170m, js_VideoColorPrimariesBt2020, js_VideoColorPrimariesSmpte432, VideoEncoderBitrateMode(..), js_VideoEncoderBitrateModeConstant, js_VideoEncoderBitrateModeVariable, js_VideoEncoderBitrateModeQuantizer, VideoMatrixCoefficients(..), js_VideoMatrixCoefficientsRgb, js_VideoMatrixCoefficientsBt709, js_VideoMatrixCoefficientsBt470bg, js_VideoMatrixCoefficientsSmpte170m, js_VideoMatrixCoefficientsBt2020Ncl, VideoPixelFormat(..), js_VideoPixelFormatI420, js_VideoPixelFormatI420P10, js_VideoPixelFormatI420P12, js_VideoPixelFormatI420A, js_VideoPixelFormatI420AP10, js_VideoPixelFormatI420AP12, js_VideoPixelFormatI422, js_VideoPixelFormatI422P10, js_VideoPixelFormatI422P12, js_VideoPixelFormatI422A, js_VideoPixelFormatI422AP10, js_VideoPixelFormatI422AP12, js_VideoPixelFormatI444, js_VideoPixelFormatI444P10, js_VideoPixelFormatI444P12, js_VideoPixelFormatI444A, js_VideoPixelFormatI444AP10, js_VideoPixelFormatI444AP12, js_VideoPixelFormatNV12, js_VideoPixelFormatRGBA, js_VideoPixelFormatRGBX, js_VideoPixelFormatBGRA, js_VideoPixelFormatBGRX, VideoTransferCharacteristics(..), js_VideoTransferCharacteristicsBt709, js_VideoTransferCharacteristicsSmpte170m, js_VideoTransferCharacteristicsIec6196621, js_VideoTransferCharacteristicsLinear, js_VideoTransferCharacteristicsPq, js_VideoTransferCharacteristicsHlg, WakeLockType(..), js_WakeLockTypeScreen, WebGLPowerPreference(..), js_WebGLPowerPreferenceDefault, js_WebGLPowerPreferenceLowPower, js_WebGLPowerPreferenceHighPerformance, WebTransportCongestionControl(..), js_WebTransportCongestionControlDefault, js_WebTransportCongestionControlThroughput, js_WebTransportCongestionControlLowLatency, WebTransportErrorSource(..), js_WebTransportErrorSourceStream, js_WebTransportErrorSourceSession, WebTransportReliabilityMode(..), js_WebTransportReliabilityModePending, js_WebTransportReliabilityModeReliableOnly, js_WebTransportReliabilityModeSupportsUnreliable, WindowAudioPreferenceEnum(..), js_WindowAudioPreferenceEnumSystem, js_WindowAudioPreferenceEnumWindow, js_WindowAudioPreferenceEnumExclude, WorkerType(..), js_WorkerTypeClassic, js_WorkerTypeModule, WriteCommandType(..), js_WriteCommandTypeWrite, js_WriteCommandTypeSeek, js_WriteCommandTypeTruncate, XMLHttpRequestResponseType(..), js_XMLHttpRequestResponseType, js_XMLHttpRequestResponseTypeArraybuffer, js_XMLHttpRequestResponseTypeBlob, js_XMLHttpRequestResponseTypeDocument, js_XMLHttpRequestResponseTypeJson, js_XMLHttpRequestResponseTypeText)
where
import Prelude ((.), (>>=), (<$>), Show, Read, Eq, Ord, Bounded, Enum, Maybe(..))
import qualified Prelude as P
import Data.Typeable (Typeable)
import Language.Javascript.JSaddle (JSM, JSString, ToJSVal(..), FromJSVal(..))
-- | <https://developer.mozilla.org/en-US/docs/Web/API AacBitstreamFormat> (webcodecs-aac-codec-registration)
data AacBitstreamFormat = AacBitstreamFormatAac
| AacBitstreamFormatAdts
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AacBitstreamFormat where
toJSVal x = toJSVal (case x of
AacBitstreamFormatAac -> js_AacBitstreamFormatAac
AacBitstreamFormatAdts -> js_AacBitstreamFormatAdts
)
instance FromJSVal AacBitstreamFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AacBitstreamFormatAac, AacBitstreamFormatAac), (js_AacBitstreamFormatAdts, AacBitstreamFormatAdts)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AacBitstreamFormat value") P.return
js_AacBitstreamFormatAac :: JSString
js_AacBitstreamFormatAac = "aac"
js_AacBitstreamFormatAdts :: JSString
js_AacBitstreamFormatAdts = "adts"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AlignSetting> (webvtt1)
data AlignSetting = AlignSettingStart
| AlignSettingCenter
| AlignSettingEnd
| AlignSettingLeft
| AlignSettingRight
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AlignSetting where
toJSVal x = toJSVal (case x of
AlignSettingStart -> js_AlignSettingStart
AlignSettingCenter -> js_AlignSettingCenter
AlignSettingEnd -> js_AlignSettingEnd
AlignSettingLeft -> js_AlignSettingLeft
AlignSettingRight -> js_AlignSettingRight
)
instance FromJSVal AlignSetting where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AlignSettingStart, AlignSettingStart), (js_AlignSettingCenter, AlignSettingCenter), (js_AlignSettingEnd, AlignSettingEnd), (js_AlignSettingLeft, AlignSettingLeft), (js_AlignSettingRight, AlignSettingRight)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AlignSetting value") P.return
js_AlignSettingStart :: JSString
js_AlignSettingStart = "start"
js_AlignSettingCenter :: JSString
js_AlignSettingCenter = "center"
js_AlignSettingEnd :: JSString
js_AlignSettingEnd = "end"
js_AlignSettingLeft :: JSString
js_AlignSettingLeft = "left"
js_AlignSettingRight :: JSString
js_AlignSettingRight = "right"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AlphaOption> (webcodecs)
data AlphaOption = AlphaOptionKeep
| AlphaOptionDiscard
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AlphaOption where
toJSVal x = toJSVal (case x of
AlphaOptionKeep -> js_AlphaOptionKeep
AlphaOptionDiscard -> js_AlphaOptionDiscard
)
instance FromJSVal AlphaOption where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AlphaOptionKeep, AlphaOptionKeep), (js_AlphaOptionDiscard, AlphaOptionDiscard)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AlphaOption value") P.return
js_AlphaOptionKeep :: JSString
js_AlphaOptionKeep = "keep"
js_AlphaOptionDiscard :: JSString
js_AlphaOptionDiscard = "discard"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AnimationPlayState> (web-animations-1)
data AnimationPlayState = AnimationPlayStateIdle
| AnimationPlayStateRunning
| AnimationPlayStatePaused
| AnimationPlayStateFinished
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AnimationPlayState where
toJSVal x = toJSVal (case x of
AnimationPlayStateIdle -> js_AnimationPlayStateIdle
AnimationPlayStateRunning -> js_AnimationPlayStateRunning
AnimationPlayStatePaused -> js_AnimationPlayStatePaused
AnimationPlayStateFinished -> js_AnimationPlayStateFinished
)
instance FromJSVal AnimationPlayState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AnimationPlayStateIdle, AnimationPlayStateIdle), (js_AnimationPlayStateRunning, AnimationPlayStateRunning), (js_AnimationPlayStatePaused, AnimationPlayStatePaused), (js_AnimationPlayStateFinished, AnimationPlayStateFinished)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AnimationPlayState value") P.return
js_AnimationPlayStateIdle :: JSString
js_AnimationPlayStateIdle = "idle"
js_AnimationPlayStateRunning :: JSString
js_AnimationPlayStateRunning = "running"
js_AnimationPlayStatePaused :: JSString
js_AnimationPlayStatePaused = "paused"
js_AnimationPlayStateFinished :: JSString
js_AnimationPlayStateFinished = "finished"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AnimationReplaceState> (web-animations-1)
data AnimationReplaceState = AnimationReplaceStateActive
| AnimationReplaceStateRemoved
| AnimationReplaceStatePersisted
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AnimationReplaceState where
toJSVal x = toJSVal (case x of
AnimationReplaceStateActive -> js_AnimationReplaceStateActive
AnimationReplaceStateRemoved -> js_AnimationReplaceStateRemoved
AnimationReplaceStatePersisted -> js_AnimationReplaceStatePersisted
)
instance FromJSVal AnimationReplaceState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AnimationReplaceStateActive, AnimationReplaceStateActive), (js_AnimationReplaceStateRemoved, AnimationReplaceStateRemoved), (js_AnimationReplaceStatePersisted, AnimationReplaceStatePersisted)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AnimationReplaceState value") P.return
js_AnimationReplaceStateActive :: JSString
js_AnimationReplaceStateActive = "active"
js_AnimationReplaceStateRemoved :: JSString
js_AnimationReplaceStateRemoved = "removed"
js_AnimationReplaceStatePersisted :: JSString
js_AnimationReplaceStatePersisted = "persisted"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AppendMode> (media-source-2)
data AppendMode = AppendModeSegments
| AppendModeSequence
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AppendMode where
toJSVal x = toJSVal (case x of
AppendModeSegments -> js_AppendModeSegments
AppendModeSequence -> js_AppendModeSequence
)
instance FromJSVal AppendMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AppendModeSegments, AppendModeSegments), (js_AppendModeSequence, AppendModeSequence)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AppendMode value") P.return
js_AppendModeSegments :: JSString
js_AppendModeSegments = "segments"
js_AppendModeSequence :: JSString
js_AppendModeSequence = "sequence"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AriaNotifyPriority> (wai-aria-1.3)
data AriaNotifyPriority = AriaNotifyPriorityNormal
| AriaNotifyPriorityHigh
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AriaNotifyPriority where
toJSVal x = toJSVal (case x of
AriaNotifyPriorityNormal -> js_AriaNotifyPriorityNormal
AriaNotifyPriorityHigh -> js_AriaNotifyPriorityHigh
)
instance FromJSVal AriaNotifyPriority where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AriaNotifyPriorityNormal, AriaNotifyPriorityNormal), (js_AriaNotifyPriorityHigh, AriaNotifyPriorityHigh)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AriaNotifyPriority value") P.return
js_AriaNotifyPriorityNormal :: JSString
js_AriaNotifyPriorityNormal = "normal"
js_AriaNotifyPriorityHigh :: JSString
js_AriaNotifyPriorityHigh = "high"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AudioContextLatencyCategory> (webaudio-1.1)
data AudioContextLatencyCategory = AudioContextLatencyCategoryBalanced
| AudioContextLatencyCategoryInteractive
| AudioContextLatencyCategoryPlayback
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AudioContextLatencyCategory where
toJSVal x = toJSVal (case x of
AudioContextLatencyCategoryBalanced -> js_AudioContextLatencyCategoryBalanced
AudioContextLatencyCategoryInteractive -> js_AudioContextLatencyCategoryInteractive
AudioContextLatencyCategoryPlayback -> js_AudioContextLatencyCategoryPlayback
)
instance FromJSVal AudioContextLatencyCategory where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AudioContextLatencyCategoryBalanced, AudioContextLatencyCategoryBalanced), (js_AudioContextLatencyCategoryInteractive, AudioContextLatencyCategoryInteractive), (js_AudioContextLatencyCategoryPlayback, AudioContextLatencyCategoryPlayback)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AudioContextLatencyCategory value") P.return
js_AudioContextLatencyCategoryBalanced :: JSString
js_AudioContextLatencyCategoryBalanced = "balanced"
js_AudioContextLatencyCategoryInteractive :: JSString
js_AudioContextLatencyCategoryInteractive = "interactive"
js_AudioContextLatencyCategoryPlayback :: JSString
js_AudioContextLatencyCategoryPlayback = "playback"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AudioContextRenderSizeCategory> (webaudio-1.1)
data AudioContextRenderSizeCategory = AudioContextRenderSizeCategoryDefault
| AudioContextRenderSizeCategoryHardware
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AudioContextRenderSizeCategory where
toJSVal x = toJSVal (case x of
AudioContextRenderSizeCategoryDefault -> js_AudioContextRenderSizeCategoryDefault
AudioContextRenderSizeCategoryHardware -> js_AudioContextRenderSizeCategoryHardware
)
instance FromJSVal AudioContextRenderSizeCategory where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AudioContextRenderSizeCategoryDefault, AudioContextRenderSizeCategoryDefault), (js_AudioContextRenderSizeCategoryHardware, AudioContextRenderSizeCategoryHardware)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AudioContextRenderSizeCategory value") P.return
js_AudioContextRenderSizeCategoryDefault :: JSString
js_AudioContextRenderSizeCategoryDefault = "default"
js_AudioContextRenderSizeCategoryHardware :: JSString
js_AudioContextRenderSizeCategoryHardware = "hardware"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AudioContextState> (webaudio-1.1)
data AudioContextState = AudioContextStateSuspended
| AudioContextStateRunning
| AudioContextStateClosed
| AudioContextStateInterrupted
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AudioContextState where
toJSVal x = toJSVal (case x of
AudioContextStateSuspended -> js_AudioContextStateSuspended
AudioContextStateRunning -> js_AudioContextStateRunning
AudioContextStateClosed -> js_AudioContextStateClosed
AudioContextStateInterrupted -> js_AudioContextStateInterrupted
)
instance FromJSVal AudioContextState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AudioContextStateSuspended, AudioContextStateSuspended), (js_AudioContextStateRunning, AudioContextStateRunning), (js_AudioContextStateClosed, AudioContextStateClosed), (js_AudioContextStateInterrupted, AudioContextStateInterrupted)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AudioContextState value") P.return
js_AudioContextStateSuspended :: JSString
js_AudioContextStateSuspended = "suspended"
js_AudioContextStateRunning :: JSString
js_AudioContextStateRunning = "running"
js_AudioContextStateClosed :: JSString
js_AudioContextStateClosed = "closed"
js_AudioContextStateInterrupted :: JSString
js_AudioContextStateInterrupted = "interrupted"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AudioSampleFormat> (webcodecs)
data AudioSampleFormat = AudioSampleFormatU8
| AudioSampleFormatS16
| AudioSampleFormatS32
| AudioSampleFormatF32
| AudioSampleFormatU8Planar
| AudioSampleFormatS16Planar
| AudioSampleFormatS32Planar
| AudioSampleFormatF32Planar
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AudioSampleFormat where
toJSVal x = toJSVal (case x of
AudioSampleFormatU8 -> js_AudioSampleFormatU8
AudioSampleFormatS16 -> js_AudioSampleFormatS16
AudioSampleFormatS32 -> js_AudioSampleFormatS32
AudioSampleFormatF32 -> js_AudioSampleFormatF32
AudioSampleFormatU8Planar -> js_AudioSampleFormatU8Planar
AudioSampleFormatS16Planar -> js_AudioSampleFormatS16Planar
AudioSampleFormatS32Planar -> js_AudioSampleFormatS32Planar
AudioSampleFormatF32Planar -> js_AudioSampleFormatF32Planar
)
instance FromJSVal AudioSampleFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AudioSampleFormatU8, AudioSampleFormatU8), (js_AudioSampleFormatS16, AudioSampleFormatS16), (js_AudioSampleFormatS32, AudioSampleFormatS32), (js_AudioSampleFormatF32, AudioSampleFormatF32), (js_AudioSampleFormatU8Planar, AudioSampleFormatU8Planar), (js_AudioSampleFormatS16Planar, AudioSampleFormatS16Planar), (js_AudioSampleFormatS32Planar, AudioSampleFormatS32Planar), (js_AudioSampleFormatF32Planar, AudioSampleFormatF32Planar)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AudioSampleFormat value") P.return
js_AudioSampleFormatU8 :: JSString
js_AudioSampleFormatU8 = "u8"
js_AudioSampleFormatS16 :: JSString
js_AudioSampleFormatS16 = "s16"
js_AudioSampleFormatS32 :: JSString
js_AudioSampleFormatS32 = "s32"
js_AudioSampleFormatF32 :: JSString
js_AudioSampleFormatF32 = "f32"
js_AudioSampleFormatU8Planar :: JSString
js_AudioSampleFormatU8Planar = "u8-planar"
js_AudioSampleFormatS16Planar :: JSString
js_AudioSampleFormatS16Planar = "s16-planar"
js_AudioSampleFormatS32Planar :: JSString
js_AudioSampleFormatS32Planar = "s32-planar"
js_AudioSampleFormatF32Planar :: JSString
js_AudioSampleFormatF32Planar = "f32-planar"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AudioSelectionPreferenceEnum> (screen-capture)
data AudioSelectionPreferenceEnum = AudioSelectionPreferenceEnumPreferred
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AudioSelectionPreferenceEnum where
toJSVal x = toJSVal (case x of
AudioSelectionPreferenceEnumPreferred -> js_AudioSelectionPreferenceEnumPreferred
)
instance FromJSVal AudioSelectionPreferenceEnum where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AudioSelectionPreferenceEnumPreferred, AudioSelectionPreferenceEnumPreferred)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AudioSelectionPreferenceEnum value") P.return
js_AudioSelectionPreferenceEnumPreferred :: JSString
js_AudioSelectionPreferenceEnumPreferred = "preferred"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AudioSinkType> (webaudio-1.1)
data AudioSinkType = AudioSinkTypeNone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AudioSinkType where
toJSVal x = toJSVal (case x of
AudioSinkTypeNone -> js_AudioSinkTypeNone
)
instance FromJSVal AudioSinkType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AudioSinkTypeNone, AudioSinkTypeNone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AudioSinkType value") P.return
js_AudioSinkTypeNone :: JSString
js_AudioSinkTypeNone = "none"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AutoKeyword> (webvtt1)
data AutoKeyword = AutoKeywordAuto
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AutoKeyword where
toJSVal x = toJSVal (case x of
AutoKeywordAuto -> js_AutoKeywordAuto
)
instance FromJSVal AutoKeyword where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AutoKeywordAuto, AutoKeywordAuto)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AutoKeyword value") P.return
js_AutoKeywordAuto :: JSString
js_AutoKeywordAuto = "auto"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AutomationRate> (webaudio-1.1)
data AutomationRate = AutomationRateARate
| AutomationRateKRate
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AutomationRate where
toJSVal x = toJSVal (case x of
AutomationRateARate -> js_AutomationRateARate
AutomationRateKRate -> js_AutomationRateKRate
)
instance FromJSVal AutomationRate where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AutomationRateARate, AutomationRateARate), (js_AutomationRateKRate, AutomationRateKRate)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AutomationRate value") P.return
js_AutomationRateARate :: JSString
js_AutomationRateARate = "a-rate"
js_AutomationRateKRate :: JSString
js_AutomationRateKRate = "k-rate"
-- | <https://developer.mozilla.org/en-US/docs/Web/API AvcBitstreamFormat> (webcodecs-avc-codec-registration)
data AvcBitstreamFormat = AvcBitstreamFormatAnnexb
| AvcBitstreamFormatAvc
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal AvcBitstreamFormat where
toJSVal x = toJSVal (case x of
AvcBitstreamFormatAnnexb -> js_AvcBitstreamFormatAnnexb
AvcBitstreamFormatAvc -> js_AvcBitstreamFormatAvc
)
instance FromJSVal AvcBitstreamFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_AvcBitstreamFormatAnnexb, AvcBitstreamFormatAnnexb), (js_AvcBitstreamFormatAvc, AvcBitstreamFormatAvc)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected AvcBitstreamFormat value") P.return
js_AvcBitstreamFormatAnnexb :: JSString
js_AvcBitstreamFormatAnnexb = "annexb"
js_AvcBitstreamFormatAvc :: JSString
js_AvcBitstreamFormatAvc = "avc"
-- | <https://developer.mozilla.org/en-US/docs/Web/API BinaryType> (websockets)
data BinaryType = BinaryTypeBlob
| BinaryTypeArraybuffer
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal BinaryType where
toJSVal x = toJSVal (case x of
BinaryTypeBlob -> js_BinaryTypeBlob
BinaryTypeArraybuffer -> js_BinaryTypeArraybuffer
)
instance FromJSVal BinaryType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_BinaryTypeBlob, BinaryTypeBlob), (js_BinaryTypeArraybuffer, BinaryTypeArraybuffer)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected BinaryType value") P.return
js_BinaryTypeBlob :: JSString
js_BinaryTypeBlob = "blob"
js_BinaryTypeArraybuffer :: JSString
js_BinaryTypeArraybuffer = "arraybuffer"
-- | <https://developer.mozilla.org/en-US/docs/Web/API BiquadFilterType> (webaudio-1.1)
data BiquadFilterType = BiquadFilterTypeLowpass
| BiquadFilterTypeHighpass
| BiquadFilterTypeBandpass
| BiquadFilterTypeLowshelf
| BiquadFilterTypeHighshelf
| BiquadFilterTypePeaking
| BiquadFilterTypeNotch
| BiquadFilterTypeAllpass
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal BiquadFilterType where
toJSVal x = toJSVal (case x of
BiquadFilterTypeLowpass -> js_BiquadFilterTypeLowpass
BiquadFilterTypeHighpass -> js_BiquadFilterTypeHighpass
BiquadFilterTypeBandpass -> js_BiquadFilterTypeBandpass
BiquadFilterTypeLowshelf -> js_BiquadFilterTypeLowshelf
BiquadFilterTypeHighshelf -> js_BiquadFilterTypeHighshelf
BiquadFilterTypePeaking -> js_BiquadFilterTypePeaking
BiquadFilterTypeNotch -> js_BiquadFilterTypeNotch
BiquadFilterTypeAllpass -> js_BiquadFilterTypeAllpass
)
instance FromJSVal BiquadFilterType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_BiquadFilterTypeLowpass, BiquadFilterTypeLowpass), (js_BiquadFilterTypeHighpass, BiquadFilterTypeHighpass), (js_BiquadFilterTypeBandpass, BiquadFilterTypeBandpass), (js_BiquadFilterTypeLowshelf, BiquadFilterTypeLowshelf), (js_BiquadFilterTypeHighshelf, BiquadFilterTypeHighshelf), (js_BiquadFilterTypePeaking, BiquadFilterTypePeaking), (js_BiquadFilterTypeNotch, BiquadFilterTypeNotch), (js_BiquadFilterTypeAllpass, BiquadFilterTypeAllpass)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected BiquadFilterType value") P.return
js_BiquadFilterTypeLowpass :: JSString
js_BiquadFilterTypeLowpass = "lowpass"
js_BiquadFilterTypeHighpass :: JSString
js_BiquadFilterTypeHighpass = "highpass"
js_BiquadFilterTypeBandpass :: JSString
js_BiquadFilterTypeBandpass = "bandpass"
js_BiquadFilterTypeLowshelf :: JSString
js_BiquadFilterTypeLowshelf = "lowshelf"
js_BiquadFilterTypeHighshelf :: JSString
js_BiquadFilterTypeHighshelf = "highshelf"
js_BiquadFilterTypePeaking :: JSString
js_BiquadFilterTypePeaking = "peaking"
js_BiquadFilterTypeNotch :: JSString
js_BiquadFilterTypeNotch = "notch"
js_BiquadFilterTypeAllpass :: JSString
js_BiquadFilterTypeAllpass = "allpass"
-- | <https://developer.mozilla.org/en-US/docs/Web/API BitrateMode> (mediastream-recording)
data BitrateMode = BitrateModeConstant
| BitrateModeVariable
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal BitrateMode where
toJSVal x = toJSVal (case x of
BitrateModeConstant -> js_BitrateModeConstant
BitrateModeVariable -> js_BitrateModeVariable
)
instance FromJSVal BitrateMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_BitrateModeConstant, BitrateModeConstant), (js_BitrateModeVariable, BitrateModeVariable)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected BitrateMode value") P.return
js_BitrateModeConstant :: JSString
js_BitrateModeConstant = "constant"
js_BitrateModeVariable :: JSString
js_BitrateModeVariable = "variable"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CSSMathOperator> (css-typed-om-1)
data CSSMathOperator = CSSMathOperatorSum
| CSSMathOperatorProduct
| CSSMathOperatorNegate
| CSSMathOperatorInvert
| CSSMathOperatorMin
| CSSMathOperatorMax
| CSSMathOperatorClamp
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CSSMathOperator where
toJSVal x = toJSVal (case x of
CSSMathOperatorSum -> js_CSSMathOperatorSum
CSSMathOperatorProduct -> js_CSSMathOperatorProduct
CSSMathOperatorNegate -> js_CSSMathOperatorNegate
CSSMathOperatorInvert -> js_CSSMathOperatorInvert
CSSMathOperatorMin -> js_CSSMathOperatorMin
CSSMathOperatorMax -> js_CSSMathOperatorMax
CSSMathOperatorClamp -> js_CSSMathOperatorClamp
)
instance FromJSVal CSSMathOperator where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CSSMathOperatorSum, CSSMathOperatorSum), (js_CSSMathOperatorProduct, CSSMathOperatorProduct), (js_CSSMathOperatorNegate, CSSMathOperatorNegate), (js_CSSMathOperatorInvert, CSSMathOperatorInvert), (js_CSSMathOperatorMin, CSSMathOperatorMin), (js_CSSMathOperatorMax, CSSMathOperatorMax), (js_CSSMathOperatorClamp, CSSMathOperatorClamp)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CSSMathOperator value") P.return
js_CSSMathOperatorSum :: JSString
js_CSSMathOperatorSum = "sum"
js_CSSMathOperatorProduct :: JSString
js_CSSMathOperatorProduct = "product"
js_CSSMathOperatorNegate :: JSString
js_CSSMathOperatorNegate = "negate"
js_CSSMathOperatorInvert :: JSString
js_CSSMathOperatorInvert = "invert"
js_CSSMathOperatorMin :: JSString
js_CSSMathOperatorMin = "min"
js_CSSMathOperatorMax :: JSString
js_CSSMathOperatorMax = "max"
js_CSSMathOperatorClamp :: JSString
js_CSSMathOperatorClamp = "clamp"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CSSNumericBaseType> (css-typed-om-1)
data CSSNumericBaseType = CSSNumericBaseTypeLength
| CSSNumericBaseTypeAngle
| CSSNumericBaseTypeTime
| CSSNumericBaseTypeFrequency
| CSSNumericBaseTypeResolution
| CSSNumericBaseTypeFlex
| CSSNumericBaseTypePercent
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CSSNumericBaseType where
toJSVal x = toJSVal (case x of
CSSNumericBaseTypeLength -> js_CSSNumericBaseTypeLength
CSSNumericBaseTypeAngle -> js_CSSNumericBaseTypeAngle
CSSNumericBaseTypeTime -> js_CSSNumericBaseTypeTime
CSSNumericBaseTypeFrequency -> js_CSSNumericBaseTypeFrequency
CSSNumericBaseTypeResolution -> js_CSSNumericBaseTypeResolution
CSSNumericBaseTypeFlex -> js_CSSNumericBaseTypeFlex
CSSNumericBaseTypePercent -> js_CSSNumericBaseTypePercent
)
instance FromJSVal CSSNumericBaseType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CSSNumericBaseTypeLength, CSSNumericBaseTypeLength), (js_CSSNumericBaseTypeAngle, CSSNumericBaseTypeAngle), (js_CSSNumericBaseTypeTime, CSSNumericBaseTypeTime), (js_CSSNumericBaseTypeFrequency, CSSNumericBaseTypeFrequency), (js_CSSNumericBaseTypeResolution, CSSNumericBaseTypeResolution), (js_CSSNumericBaseTypeFlex, CSSNumericBaseTypeFlex), (js_CSSNumericBaseTypePercent, CSSNumericBaseTypePercent)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CSSNumericBaseType value") P.return
js_CSSNumericBaseTypeLength :: JSString
js_CSSNumericBaseTypeLength = "length"
js_CSSNumericBaseTypeAngle :: JSString
js_CSSNumericBaseTypeAngle = "angle"
js_CSSNumericBaseTypeTime :: JSString
js_CSSNumericBaseTypeTime = "time"
js_CSSNumericBaseTypeFrequency :: JSString
js_CSSNumericBaseTypeFrequency = "frequency"
js_CSSNumericBaseTypeResolution :: JSString
js_CSSNumericBaseTypeResolution = "resolution"
js_CSSNumericBaseTypeFlex :: JSString
js_CSSNumericBaseTypeFlex = "flex"
js_CSSNumericBaseTypePercent :: JSString
js_CSSNumericBaseTypePercent = "percent"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanPlayTypeResult> (html)
data CanPlayTypeResult = CanPlayTypeResult
| CanPlayTypeResultMaybe
| CanPlayTypeResultProbably
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanPlayTypeResult where
toJSVal x = toJSVal (case x of
CanPlayTypeResult -> js_CanPlayTypeResult
CanPlayTypeResultMaybe -> js_CanPlayTypeResultMaybe
CanPlayTypeResultProbably -> js_CanPlayTypeResultProbably
)
instance FromJSVal CanPlayTypeResult where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanPlayTypeResult, CanPlayTypeResult), (js_CanPlayTypeResultMaybe, CanPlayTypeResultMaybe), (js_CanPlayTypeResultProbably, CanPlayTypeResultProbably)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanPlayTypeResult value") P.return
js_CanPlayTypeResult :: JSString
js_CanPlayTypeResult = ""
js_CanPlayTypeResultMaybe :: JSString
js_CanPlayTypeResultMaybe = "maybe"
js_CanPlayTypeResultProbably :: JSString
js_CanPlayTypeResultProbably = "probably"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasColorType> (html)
data CanvasColorType = CanvasColorTypeUnorm8
| CanvasColorTypeFloat16
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasColorType where
toJSVal x = toJSVal (case x of
CanvasColorTypeUnorm8 -> js_CanvasColorTypeUnorm8
CanvasColorTypeFloat16 -> js_CanvasColorTypeFloat16
)
instance FromJSVal CanvasColorType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasColorTypeUnorm8, CanvasColorTypeUnorm8), (js_CanvasColorTypeFloat16, CanvasColorTypeFloat16)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasColorType value") P.return
js_CanvasColorTypeUnorm8 :: JSString
js_CanvasColorTypeUnorm8 = "unorm8"
js_CanvasColorTypeFloat16 :: JSString
js_CanvasColorTypeFloat16 = "float16"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasDirection> (html)
data CanvasDirection = CanvasDirectionLtr
| CanvasDirectionRtl
| CanvasDirectionInherit
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasDirection where
toJSVal x = toJSVal (case x of
CanvasDirectionLtr -> js_CanvasDirectionLtr
CanvasDirectionRtl -> js_CanvasDirectionRtl
CanvasDirectionInherit -> js_CanvasDirectionInherit
)
instance FromJSVal CanvasDirection where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasDirectionLtr, CanvasDirectionLtr), (js_CanvasDirectionRtl, CanvasDirectionRtl), (js_CanvasDirectionInherit, CanvasDirectionInherit)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasDirection value") P.return
js_CanvasDirectionLtr :: JSString
js_CanvasDirectionLtr = "ltr"
js_CanvasDirectionRtl :: JSString
js_CanvasDirectionRtl = "rtl"
js_CanvasDirectionInherit :: JSString
js_CanvasDirectionInherit = "inherit"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasFillRule> (html)
data CanvasFillRule = CanvasFillRuleNonzero
| CanvasFillRuleEvenodd
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasFillRule where
toJSVal x = toJSVal (case x of
CanvasFillRuleNonzero -> js_CanvasFillRuleNonzero
CanvasFillRuleEvenodd -> js_CanvasFillRuleEvenodd
)
instance FromJSVal CanvasFillRule where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasFillRuleNonzero, CanvasFillRuleNonzero), (js_CanvasFillRuleEvenodd, CanvasFillRuleEvenodd)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasFillRule value") P.return
js_CanvasFillRuleNonzero :: JSString
js_CanvasFillRuleNonzero = "nonzero"
js_CanvasFillRuleEvenodd :: JSString
js_CanvasFillRuleEvenodd = "evenodd"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasFontKerning> (html)
data CanvasFontKerning = CanvasFontKerningAuto
| CanvasFontKerningNormal
| CanvasFontKerningNone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasFontKerning where
toJSVal x = toJSVal (case x of
CanvasFontKerningAuto -> js_CanvasFontKerningAuto
CanvasFontKerningNormal -> js_CanvasFontKerningNormal
CanvasFontKerningNone -> js_CanvasFontKerningNone
)
instance FromJSVal CanvasFontKerning where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasFontKerningAuto, CanvasFontKerningAuto), (js_CanvasFontKerningNormal, CanvasFontKerningNormal), (js_CanvasFontKerningNone, CanvasFontKerningNone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasFontKerning value") P.return
js_CanvasFontKerningAuto :: JSString
js_CanvasFontKerningAuto = "auto"
js_CanvasFontKerningNormal :: JSString
js_CanvasFontKerningNormal = "normal"
js_CanvasFontKerningNone :: JSString
js_CanvasFontKerningNone = "none"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasFontStretch> (html)
data CanvasFontStretch = CanvasFontStretchUltraCondensed
| CanvasFontStretchExtraCondensed
| CanvasFontStretchCondensed
| CanvasFontStretchSemiCondensed
| CanvasFontStretchNormal
| CanvasFontStretchSemiExpanded
| CanvasFontStretchExpanded
| CanvasFontStretchExtraExpanded
| CanvasFontStretchUltraExpanded
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasFontStretch where
toJSVal x = toJSVal (case x of
CanvasFontStretchUltraCondensed -> js_CanvasFontStretchUltraCondensed
CanvasFontStretchExtraCondensed -> js_CanvasFontStretchExtraCondensed
CanvasFontStretchCondensed -> js_CanvasFontStretchCondensed
CanvasFontStretchSemiCondensed -> js_CanvasFontStretchSemiCondensed
CanvasFontStretchNormal -> js_CanvasFontStretchNormal
CanvasFontStretchSemiExpanded -> js_CanvasFontStretchSemiExpanded
CanvasFontStretchExpanded -> js_CanvasFontStretchExpanded
CanvasFontStretchExtraExpanded -> js_CanvasFontStretchExtraExpanded
CanvasFontStretchUltraExpanded -> js_CanvasFontStretchUltraExpanded
)
instance FromJSVal CanvasFontStretch where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasFontStretchUltraCondensed, CanvasFontStretchUltraCondensed), (js_CanvasFontStretchExtraCondensed, CanvasFontStretchExtraCondensed), (js_CanvasFontStretchCondensed, CanvasFontStretchCondensed), (js_CanvasFontStretchSemiCondensed, CanvasFontStretchSemiCondensed), (js_CanvasFontStretchNormal, CanvasFontStretchNormal), (js_CanvasFontStretchSemiExpanded, CanvasFontStretchSemiExpanded), (js_CanvasFontStretchExpanded, CanvasFontStretchExpanded), (js_CanvasFontStretchExtraExpanded, CanvasFontStretchExtraExpanded), (js_CanvasFontStretchUltraExpanded, CanvasFontStretchUltraExpanded)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasFontStretch value") P.return
js_CanvasFontStretchUltraCondensed :: JSString
js_CanvasFontStretchUltraCondensed = "ultra-condensed"
js_CanvasFontStretchExtraCondensed :: JSString
js_CanvasFontStretchExtraCondensed = "extra-condensed"
js_CanvasFontStretchCondensed :: JSString
js_CanvasFontStretchCondensed = "condensed"
js_CanvasFontStretchSemiCondensed :: JSString
js_CanvasFontStretchSemiCondensed = "semi-condensed"
js_CanvasFontStretchNormal :: JSString
js_CanvasFontStretchNormal = "normal"
js_CanvasFontStretchSemiExpanded :: JSString
js_CanvasFontStretchSemiExpanded = "semi-expanded"
js_CanvasFontStretchExpanded :: JSString
js_CanvasFontStretchExpanded = "expanded"
js_CanvasFontStretchExtraExpanded :: JSString
js_CanvasFontStretchExtraExpanded = "extra-expanded"
js_CanvasFontStretchUltraExpanded :: JSString
js_CanvasFontStretchUltraExpanded = "ultra-expanded"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasFontVariantCaps> (html)
data CanvasFontVariantCaps = CanvasFontVariantCapsNormal
| CanvasFontVariantCapsSmallCaps
| CanvasFontVariantCapsAllSmallCaps
| CanvasFontVariantCapsPetiteCaps
| CanvasFontVariantCapsAllPetiteCaps
| CanvasFontVariantCapsUnicase
| CanvasFontVariantCapsTitlingCaps
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasFontVariantCaps where
toJSVal x = toJSVal (case x of
CanvasFontVariantCapsNormal -> js_CanvasFontVariantCapsNormal
CanvasFontVariantCapsSmallCaps -> js_CanvasFontVariantCapsSmallCaps
CanvasFontVariantCapsAllSmallCaps -> js_CanvasFontVariantCapsAllSmallCaps
CanvasFontVariantCapsPetiteCaps -> js_CanvasFontVariantCapsPetiteCaps
CanvasFontVariantCapsAllPetiteCaps -> js_CanvasFontVariantCapsAllPetiteCaps
CanvasFontVariantCapsUnicase -> js_CanvasFontVariantCapsUnicase
CanvasFontVariantCapsTitlingCaps -> js_CanvasFontVariantCapsTitlingCaps
)
instance FromJSVal CanvasFontVariantCaps where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasFontVariantCapsNormal, CanvasFontVariantCapsNormal), (js_CanvasFontVariantCapsSmallCaps, CanvasFontVariantCapsSmallCaps), (js_CanvasFontVariantCapsAllSmallCaps, CanvasFontVariantCapsAllSmallCaps), (js_CanvasFontVariantCapsPetiteCaps, CanvasFontVariantCapsPetiteCaps), (js_CanvasFontVariantCapsAllPetiteCaps, CanvasFontVariantCapsAllPetiteCaps), (js_CanvasFontVariantCapsUnicase, CanvasFontVariantCapsUnicase), (js_CanvasFontVariantCapsTitlingCaps, CanvasFontVariantCapsTitlingCaps)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasFontVariantCaps value") P.return
js_CanvasFontVariantCapsNormal :: JSString
js_CanvasFontVariantCapsNormal = "normal"
js_CanvasFontVariantCapsSmallCaps :: JSString
js_CanvasFontVariantCapsSmallCaps = "small-caps"
js_CanvasFontVariantCapsAllSmallCaps :: JSString
js_CanvasFontVariantCapsAllSmallCaps = "all-small-caps"
js_CanvasFontVariantCapsPetiteCaps :: JSString
js_CanvasFontVariantCapsPetiteCaps = "petite-caps"
js_CanvasFontVariantCapsAllPetiteCaps :: JSString
js_CanvasFontVariantCapsAllPetiteCaps = "all-petite-caps"
js_CanvasFontVariantCapsUnicase :: JSString
js_CanvasFontVariantCapsUnicase = "unicase"
js_CanvasFontVariantCapsTitlingCaps :: JSString
js_CanvasFontVariantCapsTitlingCaps = "titling-caps"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasLineCap> (html)
data CanvasLineCap = CanvasLineCapButt
| CanvasLineCapRound
| CanvasLineCapSquare
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasLineCap where
toJSVal x = toJSVal (case x of
CanvasLineCapButt -> js_CanvasLineCapButt
CanvasLineCapRound -> js_CanvasLineCapRound
CanvasLineCapSquare -> js_CanvasLineCapSquare
)
instance FromJSVal CanvasLineCap where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasLineCapButt, CanvasLineCapButt), (js_CanvasLineCapRound, CanvasLineCapRound), (js_CanvasLineCapSquare, CanvasLineCapSquare)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasLineCap value") P.return
js_CanvasLineCapButt :: JSString
js_CanvasLineCapButt = "butt"
js_CanvasLineCapRound :: JSString
js_CanvasLineCapRound = "round"
js_CanvasLineCapSquare :: JSString
js_CanvasLineCapSquare = "square"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasLineJoin> (html)
data CanvasLineJoin = CanvasLineJoinRound
| CanvasLineJoinBevel
| CanvasLineJoinMiter
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasLineJoin where
toJSVal x = toJSVal (case x of
CanvasLineJoinRound -> js_CanvasLineJoinRound
CanvasLineJoinBevel -> js_CanvasLineJoinBevel
CanvasLineJoinMiter -> js_CanvasLineJoinMiter
)
instance FromJSVal CanvasLineJoin where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasLineJoinRound, CanvasLineJoinRound), (js_CanvasLineJoinBevel, CanvasLineJoinBevel), (js_CanvasLineJoinMiter, CanvasLineJoinMiter)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasLineJoin value") P.return
js_CanvasLineJoinRound :: JSString
js_CanvasLineJoinRound = "round"
js_CanvasLineJoinBevel :: JSString
js_CanvasLineJoinBevel = "bevel"
js_CanvasLineJoinMiter :: JSString
js_CanvasLineJoinMiter = "miter"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasTextAlign> (html)
data CanvasTextAlign = CanvasTextAlignStart
| CanvasTextAlignEnd
| CanvasTextAlignLeft
| CanvasTextAlignRight
| CanvasTextAlignCenter
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasTextAlign where
toJSVal x = toJSVal (case x of
CanvasTextAlignStart -> js_CanvasTextAlignStart
CanvasTextAlignEnd -> js_CanvasTextAlignEnd
CanvasTextAlignLeft -> js_CanvasTextAlignLeft
CanvasTextAlignRight -> js_CanvasTextAlignRight
CanvasTextAlignCenter -> js_CanvasTextAlignCenter
)
instance FromJSVal CanvasTextAlign where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasTextAlignStart, CanvasTextAlignStart), (js_CanvasTextAlignEnd, CanvasTextAlignEnd), (js_CanvasTextAlignLeft, CanvasTextAlignLeft), (js_CanvasTextAlignRight, CanvasTextAlignRight), (js_CanvasTextAlignCenter, CanvasTextAlignCenter)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasTextAlign value") P.return
js_CanvasTextAlignStart :: JSString
js_CanvasTextAlignStart = "start"
js_CanvasTextAlignEnd :: JSString
js_CanvasTextAlignEnd = "end"
js_CanvasTextAlignLeft :: JSString
js_CanvasTextAlignLeft = "left"
js_CanvasTextAlignRight :: JSString
js_CanvasTextAlignRight = "right"
js_CanvasTextAlignCenter :: JSString
js_CanvasTextAlignCenter = "center"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasTextBaseline> (html)
data CanvasTextBaseline = CanvasTextBaselineTop
| CanvasTextBaselineHanging
| CanvasTextBaselineMiddle
| CanvasTextBaselineAlphabetic
| CanvasTextBaselineIdeographic
| CanvasTextBaselineBottom
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasTextBaseline where
toJSVal x = toJSVal (case x of
CanvasTextBaselineTop -> js_CanvasTextBaselineTop
CanvasTextBaselineHanging -> js_CanvasTextBaselineHanging
CanvasTextBaselineMiddle -> js_CanvasTextBaselineMiddle
CanvasTextBaselineAlphabetic -> js_CanvasTextBaselineAlphabetic
CanvasTextBaselineIdeographic -> js_CanvasTextBaselineIdeographic
CanvasTextBaselineBottom -> js_CanvasTextBaselineBottom
)
instance FromJSVal CanvasTextBaseline where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasTextBaselineTop, CanvasTextBaselineTop), (js_CanvasTextBaselineHanging, CanvasTextBaselineHanging), (js_CanvasTextBaselineMiddle, CanvasTextBaselineMiddle), (js_CanvasTextBaselineAlphabetic, CanvasTextBaselineAlphabetic), (js_CanvasTextBaselineIdeographic, CanvasTextBaselineIdeographic), (js_CanvasTextBaselineBottom, CanvasTextBaselineBottom)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasTextBaseline value") P.return
js_CanvasTextBaselineTop :: JSString
js_CanvasTextBaselineTop = "top"
js_CanvasTextBaselineHanging :: JSString
js_CanvasTextBaselineHanging = "hanging"
js_CanvasTextBaselineMiddle :: JSString
js_CanvasTextBaselineMiddle = "middle"
js_CanvasTextBaselineAlphabetic :: JSString
js_CanvasTextBaselineAlphabetic = "alphabetic"
js_CanvasTextBaselineIdeographic :: JSString
js_CanvasTextBaselineIdeographic = "ideographic"
js_CanvasTextBaselineBottom :: JSString
js_CanvasTextBaselineBottom = "bottom"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CanvasTextRendering> (html)
data CanvasTextRendering = CanvasTextRenderingAuto
| CanvasTextRenderingOptimizeSpeed
| CanvasTextRenderingOptimizeLegibility
| CanvasTextRenderingGeometricPrecision
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CanvasTextRendering where
toJSVal x = toJSVal (case x of
CanvasTextRenderingAuto -> js_CanvasTextRenderingAuto
CanvasTextRenderingOptimizeSpeed -> js_CanvasTextRenderingOptimizeSpeed
CanvasTextRenderingOptimizeLegibility -> js_CanvasTextRenderingOptimizeLegibility
CanvasTextRenderingGeometricPrecision -> js_CanvasTextRenderingGeometricPrecision
)
instance FromJSVal CanvasTextRendering where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CanvasTextRenderingAuto, CanvasTextRenderingAuto), (js_CanvasTextRenderingOptimizeSpeed, CanvasTextRenderingOptimizeSpeed), (js_CanvasTextRenderingOptimizeLegibility, CanvasTextRenderingOptimizeLegibility), (js_CanvasTextRenderingGeometricPrecision, CanvasTextRenderingGeometricPrecision)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CanvasTextRendering value") P.return
js_CanvasTextRenderingAuto :: JSString
js_CanvasTextRenderingAuto = "auto"
js_CanvasTextRenderingOptimizeSpeed :: JSString
js_CanvasTextRenderingOptimizeSpeed = "optimizeSpeed"
js_CanvasTextRenderingOptimizeLegibility :: JSString
js_CanvasTextRenderingOptimizeLegibility = "optimizeLegibility"
js_CanvasTextRenderingGeometricPrecision :: JSString
js_CanvasTextRenderingGeometricPrecision = "geometricPrecision"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ChannelCountMode> (webaudio-1.1)
data ChannelCountMode = ChannelCountModeMax
| ChannelCountModeClampedMax
| ChannelCountModeExplicit
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ChannelCountMode where
toJSVal x = toJSVal (case x of
ChannelCountModeMax -> js_ChannelCountModeMax
ChannelCountModeClampedMax -> js_ChannelCountModeClampedMax
ChannelCountModeExplicit -> js_ChannelCountModeExplicit
)
instance FromJSVal ChannelCountMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ChannelCountModeMax, ChannelCountModeMax), (js_ChannelCountModeClampedMax, ChannelCountModeClampedMax), (js_ChannelCountModeExplicit, ChannelCountModeExplicit)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ChannelCountMode value") P.return
js_ChannelCountModeMax :: JSString
js_ChannelCountModeMax = "max"
js_ChannelCountModeClampedMax :: JSString
js_ChannelCountModeClampedMax = "clamped-max"
js_ChannelCountModeExplicit :: JSString
js_ChannelCountModeExplicit = "explicit"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ChannelInterpretation> (webaudio-1.1)
data ChannelInterpretation = ChannelInterpretationSpeakers
| ChannelInterpretationDiscrete
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ChannelInterpretation where
toJSVal x = toJSVal (case x of
ChannelInterpretationSpeakers -> js_ChannelInterpretationSpeakers
ChannelInterpretationDiscrete -> js_ChannelInterpretationDiscrete
)
instance FromJSVal ChannelInterpretation where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ChannelInterpretationSpeakers, ChannelInterpretationSpeakers), (js_ChannelInterpretationDiscrete, ChannelInterpretationDiscrete)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ChannelInterpretation value") P.return
js_ChannelInterpretationSpeakers :: JSString
js_ChannelInterpretationSpeakers = "speakers"
js_ChannelInterpretationDiscrete :: JSString
js_ChannelInterpretationDiscrete = "discrete"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ClientType> (service-workers)
data ClientType = ClientTypeWindow
| ClientTypeWorker
| ClientTypeSharedworker
| ClientTypeAll
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ClientType where
toJSVal x = toJSVal (case x of
ClientTypeWindow -> js_ClientTypeWindow
ClientTypeWorker -> js_ClientTypeWorker
ClientTypeSharedworker -> js_ClientTypeSharedworker
ClientTypeAll -> js_ClientTypeAll
)
instance FromJSVal ClientType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ClientTypeWindow, ClientTypeWindow), (js_ClientTypeWorker, ClientTypeWorker), (js_ClientTypeSharedworker, ClientTypeSharedworker), (js_ClientTypeAll, ClientTypeAll)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ClientType value") P.return
js_ClientTypeWindow :: JSString
js_ClientTypeWindow = "window"
js_ClientTypeWorker :: JSString
js_ClientTypeWorker = "worker"
js_ClientTypeSharedworker :: JSString
js_ClientTypeSharedworker = "sharedworker"
js_ClientTypeAll :: JSString
js_ClientTypeAll = "all"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CodecState> (webcodecs)
data CodecState = CodecStateUnconfigured
| CodecStateConfigured
| CodecStateClosed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CodecState where
toJSVal x = toJSVal (case x of
CodecStateUnconfigured -> js_CodecStateUnconfigured
CodecStateConfigured -> js_CodecStateConfigured
CodecStateClosed -> js_CodecStateClosed
)
instance FromJSVal CodecState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CodecStateUnconfigured, CodecStateUnconfigured), (js_CodecStateConfigured, CodecStateConfigured), (js_CodecStateClosed, CodecStateClosed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CodecState value") P.return
js_CodecStateUnconfigured :: JSString
js_CodecStateUnconfigured = "unconfigured"
js_CodecStateConfigured :: JSString
js_CodecStateConfigured = "configured"
js_CodecStateClosed :: JSString
js_CodecStateClosed = "closed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ColorGamut> (media-capabilities)
data ColorGamut = ColorGamutSrgb
| ColorGamutP3
| ColorGamutRec2020
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ColorGamut where
toJSVal x = toJSVal (case x of
ColorGamutSrgb -> js_ColorGamutSrgb
ColorGamutP3 -> js_ColorGamutP3
ColorGamutRec2020 -> js_ColorGamutRec2020
)
instance FromJSVal ColorGamut where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ColorGamutSrgb, ColorGamutSrgb), (js_ColorGamutP3, ColorGamutP3), (js_ColorGamutRec2020, ColorGamutRec2020)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ColorGamut value") P.return
js_ColorGamutSrgb :: JSString
js_ColorGamutSrgb = "srgb"
js_ColorGamutP3 :: JSString
js_ColorGamutP3 = "p3"
js_ColorGamutRec2020 :: JSString
js_ColorGamutRec2020 = "rec2020"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ColorSpaceConversion> (html)
data ColorSpaceConversion = ColorSpaceConversionNone
| ColorSpaceConversionDefault
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ColorSpaceConversion where
toJSVal x = toJSVal (case x of
ColorSpaceConversionNone -> js_ColorSpaceConversionNone
ColorSpaceConversionDefault -> js_ColorSpaceConversionDefault
)
instance FromJSVal ColorSpaceConversion where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ColorSpaceConversionNone, ColorSpaceConversionNone), (js_ColorSpaceConversionDefault, ColorSpaceConversionDefault)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ColorSpaceConversion value") P.return
js_ColorSpaceConversionNone :: JSString
js_ColorSpaceConversionNone = "none"
js_ColorSpaceConversionDefault :: JSString
js_ColorSpaceConversionDefault = "default"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CompositeOperation> (web-animations-1)
data CompositeOperation = CompositeOperationReplace
| CompositeOperationAdd
| CompositeOperationAccumulate
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CompositeOperation where
toJSVal x = toJSVal (case x of
CompositeOperationReplace -> js_CompositeOperationReplace
CompositeOperationAdd -> js_CompositeOperationAdd
CompositeOperationAccumulate -> js_CompositeOperationAccumulate
)
instance FromJSVal CompositeOperation where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CompositeOperationReplace, CompositeOperationReplace), (js_CompositeOperationAdd, CompositeOperationAdd), (js_CompositeOperationAccumulate, CompositeOperationAccumulate)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CompositeOperation value") P.return
js_CompositeOperationReplace :: JSString
js_CompositeOperationReplace = "replace"
js_CompositeOperationAdd :: JSString
js_CompositeOperationAdd = "add"
js_CompositeOperationAccumulate :: JSString
js_CompositeOperationAccumulate = "accumulate"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CompressionFormat> (compression)
data CompressionFormat = CompressionFormatBrotli
| CompressionFormatDeflate
| CompressionFormatDeflateRaw
| CompressionFormatGzip
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CompressionFormat where
toJSVal x = toJSVal (case x of
CompressionFormatBrotli -> js_CompressionFormatBrotli
CompressionFormatDeflate -> js_CompressionFormatDeflate
CompressionFormatDeflateRaw -> js_CompressionFormatDeflateRaw
CompressionFormatGzip -> js_CompressionFormatGzip
)
instance FromJSVal CompressionFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CompressionFormatBrotli, CompressionFormatBrotli), (js_CompressionFormatDeflate, CompressionFormatDeflate), (js_CompressionFormatDeflateRaw, CompressionFormatDeflateRaw), (js_CompressionFormatGzip, CompressionFormatGzip)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CompressionFormat value") P.return
js_CompressionFormatBrotli :: JSString
js_CompressionFormatBrotli = "brotli"
js_CompressionFormatDeflate :: JSString
js_CompressionFormatDeflate = "deflate"
js_CompressionFormatDeflateRaw :: JSString
js_CompressionFormatDeflateRaw = "deflate-raw"
js_CompressionFormatGzip :: JSString
js_CompressionFormatGzip = "gzip"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CookieSameSite> (cookiestore)
data CookieSameSite = CookieSameSiteStrict
| CookieSameSiteLax
| CookieSameSiteNone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CookieSameSite where
toJSVal x = toJSVal (case x of
CookieSameSiteStrict -> js_CookieSameSiteStrict
CookieSameSiteLax -> js_CookieSameSiteLax
CookieSameSiteNone -> js_CookieSameSiteNone
)
instance FromJSVal CookieSameSite where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CookieSameSiteStrict, CookieSameSiteStrict), (js_CookieSameSiteLax, CookieSameSiteLax), (js_CookieSameSiteNone, CookieSameSiteNone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CookieSameSite value") P.return
js_CookieSameSiteStrict :: JSString
js_CookieSameSiteStrict = "strict"
js_CookieSameSiteLax :: JSString
js_CookieSameSiteLax = "lax"
js_CookieSameSiteNone :: JSString
js_CookieSameSiteNone = "none"
-- | <https://developer.mozilla.org/en-US/docs/Web/API CredentialMediationRequirement> (credential-management-1)
data CredentialMediationRequirement = CredentialMediationRequirementSilent
| CredentialMediationRequirementOptional
| CredentialMediationRequirementConditional
| CredentialMediationRequirementRequired
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal CredentialMediationRequirement where
toJSVal x = toJSVal (case x of
CredentialMediationRequirementSilent -> js_CredentialMediationRequirementSilent
CredentialMediationRequirementOptional -> js_CredentialMediationRequirementOptional
CredentialMediationRequirementConditional -> js_CredentialMediationRequirementConditional
CredentialMediationRequirementRequired -> js_CredentialMediationRequirementRequired
)
instance FromJSVal CredentialMediationRequirement where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_CredentialMediationRequirementSilent, CredentialMediationRequirementSilent), (js_CredentialMediationRequirementOptional, CredentialMediationRequirementOptional), (js_CredentialMediationRequirementConditional, CredentialMediationRequirementConditional), (js_CredentialMediationRequirementRequired, CredentialMediationRequirementRequired)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected CredentialMediationRequirement value") P.return
js_CredentialMediationRequirementSilent :: JSString
js_CredentialMediationRequirementSilent = "silent"
js_CredentialMediationRequirementOptional :: JSString
js_CredentialMediationRequirementOptional = "optional"
js_CredentialMediationRequirementConditional :: JSString
js_CredentialMediationRequirementConditional = "conditional"
js_CredentialMediationRequirementRequired :: JSString
js_CredentialMediationRequirementRequired = "required"
-- | <https://developer.mozilla.org/en-US/docs/Web/API DOMParserSupportedType> (html)
data DOMParserSupportedType = DOMParserSupportedTypeTextHtml
| DOMParserSupportedTypeTextXml
| DOMParserSupportedTypeApplicationXml
| DOMParserSupportedTypeApplicationXhtmlXml
| DOMParserSupportedTypeImageSvgXml
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal DOMParserSupportedType where
toJSVal x = toJSVal (case x of
DOMParserSupportedTypeTextHtml -> js_DOMParserSupportedTypeTextHtml
DOMParserSupportedTypeTextXml -> js_DOMParserSupportedTypeTextXml
DOMParserSupportedTypeApplicationXml -> js_DOMParserSupportedTypeApplicationXml
DOMParserSupportedTypeApplicationXhtmlXml -> js_DOMParserSupportedTypeApplicationXhtmlXml
DOMParserSupportedTypeImageSvgXml -> js_DOMParserSupportedTypeImageSvgXml
)
instance FromJSVal DOMParserSupportedType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_DOMParserSupportedTypeTextHtml, DOMParserSupportedTypeTextHtml), (js_DOMParserSupportedTypeTextXml, DOMParserSupportedTypeTextXml), (js_DOMParserSupportedTypeApplicationXml, DOMParserSupportedTypeApplicationXml), (js_DOMParserSupportedTypeApplicationXhtmlXml, DOMParserSupportedTypeApplicationXhtmlXml), (js_DOMParserSupportedTypeImageSvgXml, DOMParserSupportedTypeImageSvgXml)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected DOMParserSupportedType value") P.return
js_DOMParserSupportedTypeTextHtml :: JSString
js_DOMParserSupportedTypeTextHtml = "text/html"
js_DOMParserSupportedTypeTextXml :: JSString
js_DOMParserSupportedTypeTextXml = "text/xml"
js_DOMParserSupportedTypeApplicationXml :: JSString
js_DOMParserSupportedTypeApplicationXml = "application/xml"
js_DOMParserSupportedTypeApplicationXhtmlXml :: JSString
js_DOMParserSupportedTypeApplicationXhtmlXml = "application/xhtml+xml"
js_DOMParserSupportedTypeImageSvgXml :: JSString
js_DOMParserSupportedTypeImageSvgXml = "image/svg+xml"
-- | <https://developer.mozilla.org/en-US/docs/Web/API DigitalCredentialIssuanceProtocol> (digital-credentials)
data DigitalCredentialIssuanceProtocol = DigitalCredentialIssuanceProtocolOpenid4vciV1
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal DigitalCredentialIssuanceProtocol where
toJSVal x = toJSVal (case x of
DigitalCredentialIssuanceProtocolOpenid4vciV1 -> js_DigitalCredentialIssuanceProtocolOpenid4vciV1
)
instance FromJSVal DigitalCredentialIssuanceProtocol where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_DigitalCredentialIssuanceProtocolOpenid4vciV1, DigitalCredentialIssuanceProtocolOpenid4vciV1)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected DigitalCredentialIssuanceProtocol value") P.return
js_DigitalCredentialIssuanceProtocolOpenid4vciV1 :: JSString
js_DigitalCredentialIssuanceProtocolOpenid4vciV1 = "openid4vci-v1"
-- | <https://developer.mozilla.org/en-US/docs/Web/API DigitalCredentialPresentationProtocol> (digital-credentials)
data DigitalCredentialPresentationProtocol = DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned
| DigitalCredentialPresentationProtocolOpenid4vpV1Signed
| DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned
| DigitalCredentialPresentationProtocolOrgIsoMdoc
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal DigitalCredentialPresentationProtocol where
toJSVal x = toJSVal (case x of
DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned -> js_DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned
DigitalCredentialPresentationProtocolOpenid4vpV1Signed -> js_DigitalCredentialPresentationProtocolOpenid4vpV1Signed
DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned -> js_DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned
DigitalCredentialPresentationProtocolOrgIsoMdoc -> js_DigitalCredentialPresentationProtocolOrgIsoMdoc
)
instance FromJSVal DigitalCredentialPresentationProtocol where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned, DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned), (js_DigitalCredentialPresentationProtocolOpenid4vpV1Signed, DigitalCredentialPresentationProtocolOpenid4vpV1Signed), (js_DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned, DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned), (js_DigitalCredentialPresentationProtocolOrgIsoMdoc, DigitalCredentialPresentationProtocolOrgIsoMdoc)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected DigitalCredentialPresentationProtocol value") P.return
js_DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned :: JSString
js_DigitalCredentialPresentationProtocolOpenid4vpV1Unsigned = "openid4vp-v1-unsigned"
js_DigitalCredentialPresentationProtocolOpenid4vpV1Signed :: JSString
js_DigitalCredentialPresentationProtocolOpenid4vpV1Signed = "openid4vp-v1-signed"
js_DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned :: JSString
js_DigitalCredentialPresentationProtocolOpenid4vpV1Multisigned = "openid4vp-v1-multisigned"
js_DigitalCredentialPresentationProtocolOrgIsoMdoc :: JSString
js_DigitalCredentialPresentationProtocolOrgIsoMdoc = "org-iso-mdoc"
-- | <https://developer.mozilla.org/en-US/docs/Web/API DirectionSetting> (webvtt1)
data DirectionSetting = DirectionSetting
| DirectionSettingRl
| DirectionSettingLr
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal DirectionSetting where
toJSVal x = toJSVal (case x of
DirectionSetting -> js_DirectionSetting
DirectionSettingRl -> js_DirectionSettingRl
DirectionSettingLr -> js_DirectionSettingLr
)
instance FromJSVal DirectionSetting where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_DirectionSetting, DirectionSetting), (js_DirectionSettingRl, DirectionSettingRl), (js_DirectionSettingLr, DirectionSettingLr)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected DirectionSetting value") P.return
js_DirectionSetting :: JSString
js_DirectionSetting = ""
js_DirectionSettingRl :: JSString
js_DirectionSettingRl = "rl"
js_DirectionSettingLr :: JSString
js_DirectionSettingLr = "lr"
-- | <https://developer.mozilla.org/en-US/docs/Web/API DistanceModelType> (webaudio-1.1)
data DistanceModelType = DistanceModelTypeLinear
| DistanceModelTypeInverse
| DistanceModelTypeExponential
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal DistanceModelType where
toJSVal x = toJSVal (case x of
DistanceModelTypeLinear -> js_DistanceModelTypeLinear
DistanceModelTypeInverse -> js_DistanceModelTypeInverse
DistanceModelTypeExponential -> js_DistanceModelTypeExponential
)
instance FromJSVal DistanceModelType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_DistanceModelTypeLinear, DistanceModelTypeLinear), (js_DistanceModelTypeInverse, DistanceModelTypeInverse), (js_DistanceModelTypeExponential, DistanceModelTypeExponential)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected DistanceModelType value") P.return
js_DistanceModelTypeLinear :: JSString
js_DistanceModelTypeLinear = "linear"
js_DistanceModelTypeInverse :: JSString
js_DistanceModelTypeInverse = "inverse"
js_DistanceModelTypeExponential :: JSString
js_DistanceModelTypeExponential = "exponential"
-- | <https://developer.mozilla.org/en-US/docs/Web/API DocumentReadyState> (html)
data DocumentReadyState = DocumentReadyStateLoading
| DocumentReadyStateInteractive
| DocumentReadyStateComplete
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal DocumentReadyState where
toJSVal x = toJSVal (case x of
DocumentReadyStateLoading -> js_DocumentReadyStateLoading
DocumentReadyStateInteractive -> js_DocumentReadyStateInteractive
DocumentReadyStateComplete -> js_DocumentReadyStateComplete
)
instance FromJSVal DocumentReadyState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_DocumentReadyStateLoading, DocumentReadyStateLoading), (js_DocumentReadyStateInteractive, DocumentReadyStateInteractive), (js_DocumentReadyStateComplete, DocumentReadyStateComplete)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected DocumentReadyState value") P.return
js_DocumentReadyStateLoading :: JSString
js_DocumentReadyStateLoading = "loading"
js_DocumentReadyStateInteractive :: JSString
js_DocumentReadyStateInteractive = "interactive"
js_DocumentReadyStateComplete :: JSString
js_DocumentReadyStateComplete = "complete"
-- | <https://developer.mozilla.org/en-US/docs/Web/API DocumentVisibilityState> (html)
data DocumentVisibilityState = DocumentVisibilityStateVisible
| DocumentVisibilityStateHidden
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal DocumentVisibilityState where
toJSVal x = toJSVal (case x of
DocumentVisibilityStateVisible -> js_DocumentVisibilityStateVisible
DocumentVisibilityStateHidden -> js_DocumentVisibilityStateHidden
)
instance FromJSVal DocumentVisibilityState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_DocumentVisibilityStateVisible, DocumentVisibilityStateVisible), (js_DocumentVisibilityStateHidden, DocumentVisibilityStateHidden)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected DocumentVisibilityState value") P.return
js_DocumentVisibilityStateVisible :: JSString
js_DocumentVisibilityStateVisible = "visible"
js_DocumentVisibilityStateHidden :: JSString
js_DocumentVisibilityStateHidden = "hidden"
-- | <https://developer.mozilla.org/en-US/docs/Web/API EncodedAudioChunkType> (webcodecs)
data EncodedAudioChunkType = EncodedAudioChunkTypeKey
| EncodedAudioChunkTypeDelta
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal EncodedAudioChunkType where
toJSVal x = toJSVal (case x of
EncodedAudioChunkTypeKey -> js_EncodedAudioChunkTypeKey
EncodedAudioChunkTypeDelta -> js_EncodedAudioChunkTypeDelta
)
instance FromJSVal EncodedAudioChunkType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_EncodedAudioChunkTypeKey, EncodedAudioChunkTypeKey), (js_EncodedAudioChunkTypeDelta, EncodedAudioChunkTypeDelta)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected EncodedAudioChunkType value") P.return
js_EncodedAudioChunkTypeKey :: JSString
js_EncodedAudioChunkTypeKey = "key"
js_EncodedAudioChunkTypeDelta :: JSString
js_EncodedAudioChunkTypeDelta = "delta"
-- | <https://developer.mozilla.org/en-US/docs/Web/API EncodedVideoChunkType> (webcodecs)
data EncodedVideoChunkType = EncodedVideoChunkTypeKey
| EncodedVideoChunkTypeDelta
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal EncodedVideoChunkType where
toJSVal x = toJSVal (case x of
EncodedVideoChunkTypeKey -> js_EncodedVideoChunkTypeKey
EncodedVideoChunkTypeDelta -> js_EncodedVideoChunkTypeDelta
)
instance FromJSVal EncodedVideoChunkType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_EncodedVideoChunkTypeKey, EncodedVideoChunkTypeKey), (js_EncodedVideoChunkTypeDelta, EncodedVideoChunkTypeDelta)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected EncodedVideoChunkType value") P.return
js_EncodedVideoChunkTypeKey :: JSString
js_EncodedVideoChunkTypeKey = "key"
js_EncodedVideoChunkTypeDelta :: JSString
js_EncodedVideoChunkTypeDelta = "delta"
-- | <https://developer.mozilla.org/en-US/docs/Web/API EndOfStreamError> (media-source-2)
data EndOfStreamError = EndOfStreamErrorNetwork
| EndOfStreamErrorDecode
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal EndOfStreamError where
toJSVal x = toJSVal (case x of
EndOfStreamErrorNetwork -> js_EndOfStreamErrorNetwork
EndOfStreamErrorDecode -> js_EndOfStreamErrorDecode
)
instance FromJSVal EndOfStreamError where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_EndOfStreamErrorNetwork, EndOfStreamErrorNetwork), (js_EndOfStreamErrorDecode, EndOfStreamErrorDecode)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected EndOfStreamError value") P.return
js_EndOfStreamErrorNetwork :: JSString
js_EndOfStreamErrorNetwork = "network"
js_EndOfStreamErrorDecode :: JSString
js_EndOfStreamErrorDecode = "decode"
-- | <https://developer.mozilla.org/en-US/docs/Web/API EndingType> (FileAPI)
data EndingType = EndingTypeTransparent
| EndingTypeNative
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal EndingType where
toJSVal x = toJSVal (case x of
EndingTypeTransparent -> js_EndingTypeTransparent
EndingTypeNative -> js_EndingTypeNative
)
instance FromJSVal EndingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_EndingTypeTransparent, EndingTypeTransparent), (js_EndingTypeNative, EndingTypeNative)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected EndingType value") P.return
js_EndingTypeTransparent :: JSString
js_EndingTypeTransparent = "transparent"
js_EndingTypeNative :: JSString
js_EndingTypeNative = "native"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FileSystemHandleKind> (fs)
data FileSystemHandleKind = FileSystemHandleKindFile
| FileSystemHandleKindDirectory
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FileSystemHandleKind where
toJSVal x = toJSVal (case x of
FileSystemHandleKindFile -> js_FileSystemHandleKindFile
FileSystemHandleKindDirectory -> js_FileSystemHandleKindDirectory
)
instance FromJSVal FileSystemHandleKind where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FileSystemHandleKindFile, FileSystemHandleKindFile), (js_FileSystemHandleKindDirectory, FileSystemHandleKindDirectory)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FileSystemHandleKind value") P.return
js_FileSystemHandleKindFile :: JSString
js_FileSystemHandleKindFile = "file"
js_FileSystemHandleKindDirectory :: JSString
js_FileSystemHandleKindDirectory = "directory"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FillLightMode> (image-capture)
data FillLightMode = FillLightModeAuto
| FillLightModeOff
| FillLightModeFlash
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FillLightMode where
toJSVal x = toJSVal (case x of
FillLightModeAuto -> js_FillLightModeAuto
FillLightModeOff -> js_FillLightModeOff
FillLightModeFlash -> js_FillLightModeFlash
)
instance FromJSVal FillLightMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FillLightModeAuto, FillLightModeAuto), (js_FillLightModeOff, FillLightModeOff), (js_FillLightModeFlash, FillLightModeFlash)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FillLightMode value") P.return
js_FillLightModeAuto :: JSString
js_FillLightModeAuto = "auto"
js_FillLightModeOff :: JSString
js_FillLightModeOff = "off"
js_FillLightModeFlash :: JSString
js_FillLightModeFlash = "flash"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FillMode> (web-animations-1)
data FillMode = FillModeNone
| FillModeForwards
| FillModeBackwards
| FillModeBoth
| FillModeAuto
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FillMode where
toJSVal x = toJSVal (case x of
FillModeNone -> js_FillModeNone
FillModeForwards -> js_FillModeForwards
FillModeBackwards -> js_FillModeBackwards
FillModeBoth -> js_FillModeBoth
FillModeAuto -> js_FillModeAuto
)
instance FromJSVal FillMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FillModeNone, FillModeNone), (js_FillModeForwards, FillModeForwards), (js_FillModeBackwards, FillModeBackwards), (js_FillModeBoth, FillModeBoth), (js_FillModeAuto, FillModeAuto)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FillMode value") P.return
js_FillModeNone :: JSString
js_FillModeNone = "none"
js_FillModeForwards :: JSString
js_FillModeForwards = "forwards"
js_FillModeBackwards :: JSString
js_FillModeBackwards = "backwards"
js_FillModeBoth :: JSString
js_FillModeBoth = "both"
js_FillModeAuto :: JSString
js_FillModeAuto = "auto"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FlowControlType> (serial)
data FlowControlType = FlowControlTypeNone
| FlowControlTypeHardware
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FlowControlType where
toJSVal x = toJSVal (case x of
FlowControlTypeNone -> js_FlowControlTypeNone
FlowControlTypeHardware -> js_FlowControlTypeHardware
)
instance FromJSVal FlowControlType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FlowControlTypeNone, FlowControlTypeNone), (js_FlowControlTypeHardware, FlowControlTypeHardware)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FlowControlType value") P.return
js_FlowControlTypeNone :: JSString
js_FlowControlTypeNone = "none"
js_FlowControlTypeHardware :: JSString
js_FlowControlTypeHardware = "hardware"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FontFaceLoadStatus> (css-font-loading-3)
data FontFaceLoadStatus = FontFaceLoadStatusUnloaded
| FontFaceLoadStatusLoading
| FontFaceLoadStatusLoaded
| FontFaceLoadStatusError
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FontFaceLoadStatus where
toJSVal x = toJSVal (case x of
FontFaceLoadStatusUnloaded -> js_FontFaceLoadStatusUnloaded
FontFaceLoadStatusLoading -> js_FontFaceLoadStatusLoading
FontFaceLoadStatusLoaded -> js_FontFaceLoadStatusLoaded
FontFaceLoadStatusError -> js_FontFaceLoadStatusError
)
instance FromJSVal FontFaceLoadStatus where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FontFaceLoadStatusUnloaded, FontFaceLoadStatusUnloaded), (js_FontFaceLoadStatusLoading, FontFaceLoadStatusLoading), (js_FontFaceLoadStatusLoaded, FontFaceLoadStatusLoaded), (js_FontFaceLoadStatusError, FontFaceLoadStatusError)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FontFaceLoadStatus value") P.return
js_FontFaceLoadStatusUnloaded :: JSString
js_FontFaceLoadStatusUnloaded = "unloaded"
js_FontFaceLoadStatusLoading :: JSString
js_FontFaceLoadStatusLoading = "loading"
js_FontFaceLoadStatusLoaded :: JSString
js_FontFaceLoadStatusLoaded = "loaded"
js_FontFaceLoadStatusError :: JSString
js_FontFaceLoadStatusError = "error"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FontFaceSetLoadStatus> (css-font-loading-3)
data FontFaceSetLoadStatus = FontFaceSetLoadStatusLoading
| FontFaceSetLoadStatusLoaded
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FontFaceSetLoadStatus where
toJSVal x = toJSVal (case x of
FontFaceSetLoadStatusLoading -> js_FontFaceSetLoadStatusLoading
FontFaceSetLoadStatusLoaded -> js_FontFaceSetLoadStatusLoaded
)
instance FromJSVal FontFaceSetLoadStatus where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FontFaceSetLoadStatusLoading, FontFaceSetLoadStatusLoading), (js_FontFaceSetLoadStatusLoaded, FontFaceSetLoadStatusLoaded)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FontFaceSetLoadStatus value") P.return
js_FontFaceSetLoadStatusLoading :: JSString
js_FontFaceSetLoadStatusLoading = "loading"
js_FontFaceSetLoadStatusLoaded :: JSString
js_FontFaceSetLoadStatusLoaded = "loaded"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FrameType> (service-workers)
data FrameType = FrameTypeAuxiliary
| FrameTypeTopLevel
| FrameTypeNested
| FrameTypeNone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FrameType where
toJSVal x = toJSVal (case x of
FrameTypeAuxiliary -> js_FrameTypeAuxiliary
FrameTypeTopLevel -> js_FrameTypeTopLevel
FrameTypeNested -> js_FrameTypeNested
FrameTypeNone -> js_FrameTypeNone
)
instance FromJSVal FrameType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FrameTypeAuxiliary, FrameTypeAuxiliary), (js_FrameTypeTopLevel, FrameTypeTopLevel), (js_FrameTypeNested, FrameTypeNested), (js_FrameTypeNone, FrameTypeNone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FrameType value") P.return
js_FrameTypeAuxiliary :: JSString
js_FrameTypeAuxiliary = "auxiliary"
js_FrameTypeTopLevel :: JSString
js_FrameTypeTopLevel = "top-level"
js_FrameTypeNested :: JSString
js_FrameTypeNested = "nested"
js_FrameTypeNone :: JSString
js_FrameTypeNone = "none"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FullscreenKeyboardLock> (fullscreen)
data FullscreenKeyboardLock = FullscreenKeyboardLockBrowser
| FullscreenKeyboardLockNone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FullscreenKeyboardLock where
toJSVal x = toJSVal (case x of
FullscreenKeyboardLockBrowser -> js_FullscreenKeyboardLockBrowser
FullscreenKeyboardLockNone -> js_FullscreenKeyboardLockNone
)
instance FromJSVal FullscreenKeyboardLock where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FullscreenKeyboardLockBrowser, FullscreenKeyboardLockBrowser), (js_FullscreenKeyboardLockNone, FullscreenKeyboardLockNone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FullscreenKeyboardLock value") P.return
js_FullscreenKeyboardLockBrowser :: JSString
js_FullscreenKeyboardLockBrowser = "browser"
js_FullscreenKeyboardLockNone :: JSString
js_FullscreenKeyboardLockNone = "none"
-- | <https://developer.mozilla.org/en-US/docs/Web/API FullscreenNavigationUI> (fullscreen)
data FullscreenNavigationUI = FullscreenNavigationUIAuto
| FullscreenNavigationUIShow
| FullscreenNavigationUIHide
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal FullscreenNavigationUI where
toJSVal x = toJSVal (case x of
FullscreenNavigationUIAuto -> js_FullscreenNavigationUIAuto
FullscreenNavigationUIShow -> js_FullscreenNavigationUIShow
FullscreenNavigationUIHide -> js_FullscreenNavigationUIHide
)
instance FromJSVal FullscreenNavigationUI where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_FullscreenNavigationUIAuto, FullscreenNavigationUIAuto), (js_FullscreenNavigationUIShow, FullscreenNavigationUIShow), (js_FullscreenNavigationUIHide, FullscreenNavigationUIHide)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected FullscreenNavigationUI value") P.return
js_FullscreenNavigationUIAuto :: JSString
js_FullscreenNavigationUIAuto = "auto"
js_FullscreenNavigationUIShow :: JSString
js_FullscreenNavigationUIShow = "show"
js_FullscreenNavigationUIHide :: JSString
js_FullscreenNavigationUIHide = "hide"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUAddressMode> (webgpu)
data GPUAddressMode = GPUAddressModeClampToEdge
| GPUAddressModeRepeat
| GPUAddressModeMirrorRepeat
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUAddressMode where
toJSVal x = toJSVal (case x of
GPUAddressModeClampToEdge -> js_GPUAddressModeClampToEdge
GPUAddressModeRepeat -> js_GPUAddressModeRepeat
GPUAddressModeMirrorRepeat -> js_GPUAddressModeMirrorRepeat
)
instance FromJSVal GPUAddressMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUAddressModeClampToEdge, GPUAddressModeClampToEdge), (js_GPUAddressModeRepeat, GPUAddressModeRepeat), (js_GPUAddressModeMirrorRepeat, GPUAddressModeMirrorRepeat)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUAddressMode value") P.return
js_GPUAddressModeClampToEdge :: JSString
js_GPUAddressModeClampToEdge = "clamp-to-edge"
js_GPUAddressModeRepeat :: JSString
js_GPUAddressModeRepeat = "repeat"
js_GPUAddressModeMirrorRepeat :: JSString
js_GPUAddressModeMirrorRepeat = "mirror-repeat"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUAutoLayoutMode> (webgpu)
data GPUAutoLayoutMode = GPUAutoLayoutModeAuto
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUAutoLayoutMode where
toJSVal x = toJSVal (case x of
GPUAutoLayoutModeAuto -> js_GPUAutoLayoutModeAuto
)
instance FromJSVal GPUAutoLayoutMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUAutoLayoutModeAuto, GPUAutoLayoutModeAuto)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUAutoLayoutMode value") P.return
js_GPUAutoLayoutModeAuto :: JSString
js_GPUAutoLayoutModeAuto = "auto"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUBlendFactor> (webgpu)
data GPUBlendFactor = GPUBlendFactorZero
| GPUBlendFactorOne
| GPUBlendFactorSrc
| GPUBlendFactorOneMinusSrc
| GPUBlendFactorSrcAlpha
| GPUBlendFactorOneMinusSrcAlpha
| GPUBlendFactorDst
| GPUBlendFactorOneMinusDst
| GPUBlendFactorDstAlpha
| GPUBlendFactorOneMinusDstAlpha
| GPUBlendFactorSrcAlphaSaturated
| GPUBlendFactorConstant
| GPUBlendFactorOneMinusConstant
| GPUBlendFactorSrc1
| GPUBlendFactorOneMinusSrc1
| GPUBlendFactorSrc1Alpha
| GPUBlendFactorOneMinusSrc1Alpha
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUBlendFactor where
toJSVal x = toJSVal (case x of
GPUBlendFactorZero -> js_GPUBlendFactorZero
GPUBlendFactorOne -> js_GPUBlendFactorOne
GPUBlendFactorSrc -> js_GPUBlendFactorSrc
GPUBlendFactorOneMinusSrc -> js_GPUBlendFactorOneMinusSrc
GPUBlendFactorSrcAlpha -> js_GPUBlendFactorSrcAlpha
GPUBlendFactorOneMinusSrcAlpha -> js_GPUBlendFactorOneMinusSrcAlpha
GPUBlendFactorDst -> js_GPUBlendFactorDst
GPUBlendFactorOneMinusDst -> js_GPUBlendFactorOneMinusDst
GPUBlendFactorDstAlpha -> js_GPUBlendFactorDstAlpha
GPUBlendFactorOneMinusDstAlpha -> js_GPUBlendFactorOneMinusDstAlpha
GPUBlendFactorSrcAlphaSaturated -> js_GPUBlendFactorSrcAlphaSaturated
GPUBlendFactorConstant -> js_GPUBlendFactorConstant
GPUBlendFactorOneMinusConstant -> js_GPUBlendFactorOneMinusConstant
GPUBlendFactorSrc1 -> js_GPUBlendFactorSrc1
GPUBlendFactorOneMinusSrc1 -> js_GPUBlendFactorOneMinusSrc1
GPUBlendFactorSrc1Alpha -> js_GPUBlendFactorSrc1Alpha
GPUBlendFactorOneMinusSrc1Alpha -> js_GPUBlendFactorOneMinusSrc1Alpha
)
instance FromJSVal GPUBlendFactor where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUBlendFactorZero, GPUBlendFactorZero), (js_GPUBlendFactorOne, GPUBlendFactorOne), (js_GPUBlendFactorSrc, GPUBlendFactorSrc), (js_GPUBlendFactorOneMinusSrc, GPUBlendFactorOneMinusSrc), (js_GPUBlendFactorSrcAlpha, GPUBlendFactorSrcAlpha), (js_GPUBlendFactorOneMinusSrcAlpha, GPUBlendFactorOneMinusSrcAlpha), (js_GPUBlendFactorDst, GPUBlendFactorDst), (js_GPUBlendFactorOneMinusDst, GPUBlendFactorOneMinusDst), (js_GPUBlendFactorDstAlpha, GPUBlendFactorDstAlpha), (js_GPUBlendFactorOneMinusDstAlpha, GPUBlendFactorOneMinusDstAlpha), (js_GPUBlendFactorSrcAlphaSaturated, GPUBlendFactorSrcAlphaSaturated), (js_GPUBlendFactorConstant, GPUBlendFactorConstant), (js_GPUBlendFactorOneMinusConstant, GPUBlendFactorOneMinusConstant), (js_GPUBlendFactorSrc1, GPUBlendFactorSrc1), (js_GPUBlendFactorOneMinusSrc1, GPUBlendFactorOneMinusSrc1), (js_GPUBlendFactorSrc1Alpha, GPUBlendFactorSrc1Alpha), (js_GPUBlendFactorOneMinusSrc1Alpha, GPUBlendFactorOneMinusSrc1Alpha)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUBlendFactor value") P.return
js_GPUBlendFactorZero :: JSString
js_GPUBlendFactorZero = "zero"
js_GPUBlendFactorOne :: JSString
js_GPUBlendFactorOne = "one"
js_GPUBlendFactorSrc :: JSString
js_GPUBlendFactorSrc = "src"
js_GPUBlendFactorOneMinusSrc :: JSString
js_GPUBlendFactorOneMinusSrc = "one-minus-src"
js_GPUBlendFactorSrcAlpha :: JSString
js_GPUBlendFactorSrcAlpha = "src-alpha"
js_GPUBlendFactorOneMinusSrcAlpha :: JSString
js_GPUBlendFactorOneMinusSrcAlpha = "one-minus-src-alpha"
js_GPUBlendFactorDst :: JSString
js_GPUBlendFactorDst = "dst"
js_GPUBlendFactorOneMinusDst :: JSString
js_GPUBlendFactorOneMinusDst = "one-minus-dst"
js_GPUBlendFactorDstAlpha :: JSString
js_GPUBlendFactorDstAlpha = "dst-alpha"
js_GPUBlendFactorOneMinusDstAlpha :: JSString
js_GPUBlendFactorOneMinusDstAlpha = "one-minus-dst-alpha"
js_GPUBlendFactorSrcAlphaSaturated :: JSString
js_GPUBlendFactorSrcAlphaSaturated = "src-alpha-saturated"
js_GPUBlendFactorConstant :: JSString
js_GPUBlendFactorConstant = "constant"
js_GPUBlendFactorOneMinusConstant :: JSString
js_GPUBlendFactorOneMinusConstant = "one-minus-constant"
js_GPUBlendFactorSrc1 :: JSString
js_GPUBlendFactorSrc1 = "src1"
js_GPUBlendFactorOneMinusSrc1 :: JSString
js_GPUBlendFactorOneMinusSrc1 = "one-minus-src1"
js_GPUBlendFactorSrc1Alpha :: JSString
js_GPUBlendFactorSrc1Alpha = "src1-alpha"
js_GPUBlendFactorOneMinusSrc1Alpha :: JSString
js_GPUBlendFactorOneMinusSrc1Alpha = "one-minus-src1-alpha"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUBlendOperation> (webgpu)
data GPUBlendOperation = GPUBlendOperationAdd
| GPUBlendOperationSubtract
| GPUBlendOperationReverseSubtract
| GPUBlendOperationMin
| GPUBlendOperationMax
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUBlendOperation where
toJSVal x = toJSVal (case x of
GPUBlendOperationAdd -> js_GPUBlendOperationAdd
GPUBlendOperationSubtract -> js_GPUBlendOperationSubtract
GPUBlendOperationReverseSubtract -> js_GPUBlendOperationReverseSubtract
GPUBlendOperationMin -> js_GPUBlendOperationMin
GPUBlendOperationMax -> js_GPUBlendOperationMax
)
instance FromJSVal GPUBlendOperation where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUBlendOperationAdd, GPUBlendOperationAdd), (js_GPUBlendOperationSubtract, GPUBlendOperationSubtract), (js_GPUBlendOperationReverseSubtract, GPUBlendOperationReverseSubtract), (js_GPUBlendOperationMin, GPUBlendOperationMin), (js_GPUBlendOperationMax, GPUBlendOperationMax)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUBlendOperation value") P.return
js_GPUBlendOperationAdd :: JSString
js_GPUBlendOperationAdd = "add"
js_GPUBlendOperationSubtract :: JSString
js_GPUBlendOperationSubtract = "subtract"
js_GPUBlendOperationReverseSubtract :: JSString
js_GPUBlendOperationReverseSubtract = "reverse-subtract"
js_GPUBlendOperationMin :: JSString
js_GPUBlendOperationMin = "min"
js_GPUBlendOperationMax :: JSString
js_GPUBlendOperationMax = "max"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUBufferBindingType> (webgpu)
data GPUBufferBindingType = GPUBufferBindingTypeUniform
| GPUBufferBindingTypeStorage
| GPUBufferBindingTypeReadOnlyStorage
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUBufferBindingType where
toJSVal x = toJSVal (case x of
GPUBufferBindingTypeUniform -> js_GPUBufferBindingTypeUniform
GPUBufferBindingTypeStorage -> js_GPUBufferBindingTypeStorage
GPUBufferBindingTypeReadOnlyStorage -> js_GPUBufferBindingTypeReadOnlyStorage
)
instance FromJSVal GPUBufferBindingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUBufferBindingTypeUniform, GPUBufferBindingTypeUniform), (js_GPUBufferBindingTypeStorage, GPUBufferBindingTypeStorage), (js_GPUBufferBindingTypeReadOnlyStorage, GPUBufferBindingTypeReadOnlyStorage)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUBufferBindingType value") P.return
js_GPUBufferBindingTypeUniform :: JSString
js_GPUBufferBindingTypeUniform = "uniform"
js_GPUBufferBindingTypeStorage :: JSString
js_GPUBufferBindingTypeStorage = "storage"
js_GPUBufferBindingTypeReadOnlyStorage :: JSString
js_GPUBufferBindingTypeReadOnlyStorage = "read-only-storage"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUBufferMapState> (webgpu)
data GPUBufferMapState = GPUBufferMapStateUnmapped
| GPUBufferMapStatePending
| GPUBufferMapStateMapped
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUBufferMapState where
toJSVal x = toJSVal (case x of
GPUBufferMapStateUnmapped -> js_GPUBufferMapStateUnmapped
GPUBufferMapStatePending -> js_GPUBufferMapStatePending
GPUBufferMapStateMapped -> js_GPUBufferMapStateMapped
)
instance FromJSVal GPUBufferMapState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUBufferMapStateUnmapped, GPUBufferMapStateUnmapped), (js_GPUBufferMapStatePending, GPUBufferMapStatePending), (js_GPUBufferMapStateMapped, GPUBufferMapStateMapped)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUBufferMapState value") P.return
js_GPUBufferMapStateUnmapped :: JSString
js_GPUBufferMapStateUnmapped = "unmapped"
js_GPUBufferMapStatePending :: JSString
js_GPUBufferMapStatePending = "pending"
js_GPUBufferMapStateMapped :: JSString
js_GPUBufferMapStateMapped = "mapped"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUCanvasAlphaMode> (webgpu)
data GPUCanvasAlphaMode = GPUCanvasAlphaModeOpaque
| GPUCanvasAlphaModePremultiplied
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUCanvasAlphaMode where
toJSVal x = toJSVal (case x of
GPUCanvasAlphaModeOpaque -> js_GPUCanvasAlphaModeOpaque
GPUCanvasAlphaModePremultiplied -> js_GPUCanvasAlphaModePremultiplied
)
instance FromJSVal GPUCanvasAlphaMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUCanvasAlphaModeOpaque, GPUCanvasAlphaModeOpaque), (js_GPUCanvasAlphaModePremultiplied, GPUCanvasAlphaModePremultiplied)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUCanvasAlphaMode value") P.return
js_GPUCanvasAlphaModeOpaque :: JSString
js_GPUCanvasAlphaModeOpaque = "opaque"
js_GPUCanvasAlphaModePremultiplied :: JSString
js_GPUCanvasAlphaModePremultiplied = "premultiplied"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUCanvasToneMappingMode> (webgpu)
data GPUCanvasToneMappingMode = GPUCanvasToneMappingModeStandard
| GPUCanvasToneMappingModeExtended
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUCanvasToneMappingMode where
toJSVal x = toJSVal (case x of
GPUCanvasToneMappingModeStandard -> js_GPUCanvasToneMappingModeStandard
GPUCanvasToneMappingModeExtended -> js_GPUCanvasToneMappingModeExtended
)
instance FromJSVal GPUCanvasToneMappingMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUCanvasToneMappingModeStandard, GPUCanvasToneMappingModeStandard), (js_GPUCanvasToneMappingModeExtended, GPUCanvasToneMappingModeExtended)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUCanvasToneMappingMode value") P.return
js_GPUCanvasToneMappingModeStandard :: JSString
js_GPUCanvasToneMappingModeStandard = "standard"
js_GPUCanvasToneMappingModeExtended :: JSString
js_GPUCanvasToneMappingModeExtended = "extended"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUCompareFunction> (webgpu)
data GPUCompareFunction = GPUCompareFunctionNever
| GPUCompareFunctionLess
| GPUCompareFunctionEqual
| GPUCompareFunctionLessEqual
| GPUCompareFunctionGreater
| GPUCompareFunctionNotEqual
| GPUCompareFunctionGreaterEqual
| GPUCompareFunctionAlways
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUCompareFunction where
toJSVal x = toJSVal (case x of
GPUCompareFunctionNever -> js_GPUCompareFunctionNever
GPUCompareFunctionLess -> js_GPUCompareFunctionLess
GPUCompareFunctionEqual -> js_GPUCompareFunctionEqual
GPUCompareFunctionLessEqual -> js_GPUCompareFunctionLessEqual
GPUCompareFunctionGreater -> js_GPUCompareFunctionGreater
GPUCompareFunctionNotEqual -> js_GPUCompareFunctionNotEqual
GPUCompareFunctionGreaterEqual -> js_GPUCompareFunctionGreaterEqual
GPUCompareFunctionAlways -> js_GPUCompareFunctionAlways
)
instance FromJSVal GPUCompareFunction where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUCompareFunctionNever, GPUCompareFunctionNever), (js_GPUCompareFunctionLess, GPUCompareFunctionLess), (js_GPUCompareFunctionEqual, GPUCompareFunctionEqual), (js_GPUCompareFunctionLessEqual, GPUCompareFunctionLessEqual), (js_GPUCompareFunctionGreater, GPUCompareFunctionGreater), (js_GPUCompareFunctionNotEqual, GPUCompareFunctionNotEqual), (js_GPUCompareFunctionGreaterEqual, GPUCompareFunctionGreaterEqual), (js_GPUCompareFunctionAlways, GPUCompareFunctionAlways)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUCompareFunction value") P.return
js_GPUCompareFunctionNever :: JSString
js_GPUCompareFunctionNever = "never"
js_GPUCompareFunctionLess :: JSString
js_GPUCompareFunctionLess = "less"
js_GPUCompareFunctionEqual :: JSString
js_GPUCompareFunctionEqual = "equal"
js_GPUCompareFunctionLessEqual :: JSString
js_GPUCompareFunctionLessEqual = "less-equal"
js_GPUCompareFunctionGreater :: JSString
js_GPUCompareFunctionGreater = "greater"
js_GPUCompareFunctionNotEqual :: JSString
js_GPUCompareFunctionNotEqual = "not-equal"
js_GPUCompareFunctionGreaterEqual :: JSString
js_GPUCompareFunctionGreaterEqual = "greater-equal"
js_GPUCompareFunctionAlways :: JSString
js_GPUCompareFunctionAlways = "always"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUCompilationMessageType> (webgpu)
data GPUCompilationMessageType = GPUCompilationMessageTypeError
| GPUCompilationMessageTypeWarning
| GPUCompilationMessageTypeInfo
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUCompilationMessageType where
toJSVal x = toJSVal (case x of
GPUCompilationMessageTypeError -> js_GPUCompilationMessageTypeError
GPUCompilationMessageTypeWarning -> js_GPUCompilationMessageTypeWarning
GPUCompilationMessageTypeInfo -> js_GPUCompilationMessageTypeInfo
)
instance FromJSVal GPUCompilationMessageType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUCompilationMessageTypeError, GPUCompilationMessageTypeError), (js_GPUCompilationMessageTypeWarning, GPUCompilationMessageTypeWarning), (js_GPUCompilationMessageTypeInfo, GPUCompilationMessageTypeInfo)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUCompilationMessageType value") P.return
js_GPUCompilationMessageTypeError :: JSString
js_GPUCompilationMessageTypeError = "error"
js_GPUCompilationMessageTypeWarning :: JSString
js_GPUCompilationMessageTypeWarning = "warning"
js_GPUCompilationMessageTypeInfo :: JSString
js_GPUCompilationMessageTypeInfo = "info"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUCullMode> (webgpu)
data GPUCullMode = GPUCullModeNone
| GPUCullModeFront
| GPUCullModeBack
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUCullMode where
toJSVal x = toJSVal (case x of
GPUCullModeNone -> js_GPUCullModeNone
GPUCullModeFront -> js_GPUCullModeFront
GPUCullModeBack -> js_GPUCullModeBack
)
instance FromJSVal GPUCullMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUCullModeNone, GPUCullModeNone), (js_GPUCullModeFront, GPUCullModeFront), (js_GPUCullModeBack, GPUCullModeBack)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUCullMode value") P.return
js_GPUCullModeNone :: JSString
js_GPUCullModeNone = "none"
js_GPUCullModeFront :: JSString
js_GPUCullModeFront = "front"
js_GPUCullModeBack :: JSString
js_GPUCullModeBack = "back"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUDeviceLostReason> (webgpu)
data GPUDeviceLostReason = GPUDeviceLostReasonUnknown
| GPUDeviceLostReasonDestroyed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUDeviceLostReason where
toJSVal x = toJSVal (case x of
GPUDeviceLostReasonUnknown -> js_GPUDeviceLostReasonUnknown
GPUDeviceLostReasonDestroyed -> js_GPUDeviceLostReasonDestroyed
)
instance FromJSVal GPUDeviceLostReason where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUDeviceLostReasonUnknown, GPUDeviceLostReasonUnknown), (js_GPUDeviceLostReasonDestroyed, GPUDeviceLostReasonDestroyed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUDeviceLostReason value") P.return
js_GPUDeviceLostReasonUnknown :: JSString
js_GPUDeviceLostReasonUnknown = "unknown"
js_GPUDeviceLostReasonDestroyed :: JSString
js_GPUDeviceLostReasonDestroyed = "destroyed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUErrorFilter> (webgpu)
data GPUErrorFilter = GPUErrorFilterValidation
| GPUErrorFilterOutOfMemory
| GPUErrorFilterInternal
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUErrorFilter where
toJSVal x = toJSVal (case x of
GPUErrorFilterValidation -> js_GPUErrorFilterValidation
GPUErrorFilterOutOfMemory -> js_GPUErrorFilterOutOfMemory
GPUErrorFilterInternal -> js_GPUErrorFilterInternal
)
instance FromJSVal GPUErrorFilter where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUErrorFilterValidation, GPUErrorFilterValidation), (js_GPUErrorFilterOutOfMemory, GPUErrorFilterOutOfMemory), (js_GPUErrorFilterInternal, GPUErrorFilterInternal)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUErrorFilter value") P.return
js_GPUErrorFilterValidation :: JSString
js_GPUErrorFilterValidation = "validation"
js_GPUErrorFilterOutOfMemory :: JSString
js_GPUErrorFilterOutOfMemory = "out-of-memory"
js_GPUErrorFilterInternal :: JSString
js_GPUErrorFilterInternal = "internal"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUFeatureName> (webgpu)
data GPUFeatureName = GPUFeatureNameCoreFeaturesAndLimits
| GPUFeatureNameDepthClipControl
| GPUFeatureNameDepth32floatStencil8
| GPUFeatureNameTextureCompressionBc
| GPUFeatureNameTextureCompressionBcSliced3d
| GPUFeatureNameTextureCompressionEtc2
| GPUFeatureNameTextureCompressionAstc
| GPUFeatureNameTextureCompressionAstcSliced3d
| GPUFeatureNameTimestampQuery
| GPUFeatureNameIndirectFirstInstance
| GPUFeatureNameShaderF16
| GPUFeatureNameRg11b10ufloatRenderable
| GPUFeatureNameBgra8unormStorage
| GPUFeatureNameFloat32Filterable
| GPUFeatureNameFloat32Blendable
| GPUFeatureNameClipDistances
| GPUFeatureNameDualSourceBlending
| GPUFeatureNameSubgroups
| GPUFeatureNameTextureFormatsTier1
| GPUFeatureNameTextureFormatsTier2
| GPUFeatureNamePrimitiveIndex
| GPUFeatureNameTextureComponentSwizzle
| GPUFeatureNameSubgroupSizeControl
| GPUFeatureNameTextureCompressionUnaligned
| GPUFeatureNameAtomicVec2uMinMax
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUFeatureName where
toJSVal x = toJSVal (case x of
GPUFeatureNameCoreFeaturesAndLimits -> js_GPUFeatureNameCoreFeaturesAndLimits
GPUFeatureNameDepthClipControl -> js_GPUFeatureNameDepthClipControl
GPUFeatureNameDepth32floatStencil8 -> js_GPUFeatureNameDepth32floatStencil8
GPUFeatureNameTextureCompressionBc -> js_GPUFeatureNameTextureCompressionBc
GPUFeatureNameTextureCompressionBcSliced3d -> js_GPUFeatureNameTextureCompressionBcSliced3d
GPUFeatureNameTextureCompressionEtc2 -> js_GPUFeatureNameTextureCompressionEtc2
GPUFeatureNameTextureCompressionAstc -> js_GPUFeatureNameTextureCompressionAstc
GPUFeatureNameTextureCompressionAstcSliced3d -> js_GPUFeatureNameTextureCompressionAstcSliced3d
GPUFeatureNameTimestampQuery -> js_GPUFeatureNameTimestampQuery
GPUFeatureNameIndirectFirstInstance -> js_GPUFeatureNameIndirectFirstInstance
GPUFeatureNameShaderF16 -> js_GPUFeatureNameShaderF16
GPUFeatureNameRg11b10ufloatRenderable -> js_GPUFeatureNameRg11b10ufloatRenderable
GPUFeatureNameBgra8unormStorage -> js_GPUFeatureNameBgra8unormStorage
GPUFeatureNameFloat32Filterable -> js_GPUFeatureNameFloat32Filterable
GPUFeatureNameFloat32Blendable -> js_GPUFeatureNameFloat32Blendable
GPUFeatureNameClipDistances -> js_GPUFeatureNameClipDistances
GPUFeatureNameDualSourceBlending -> js_GPUFeatureNameDualSourceBlending
GPUFeatureNameSubgroups -> js_GPUFeatureNameSubgroups
GPUFeatureNameTextureFormatsTier1 -> js_GPUFeatureNameTextureFormatsTier1
GPUFeatureNameTextureFormatsTier2 -> js_GPUFeatureNameTextureFormatsTier2
GPUFeatureNamePrimitiveIndex -> js_GPUFeatureNamePrimitiveIndex
GPUFeatureNameTextureComponentSwizzle -> js_GPUFeatureNameTextureComponentSwizzle
GPUFeatureNameSubgroupSizeControl -> js_GPUFeatureNameSubgroupSizeControl
GPUFeatureNameTextureCompressionUnaligned -> js_GPUFeatureNameTextureCompressionUnaligned
GPUFeatureNameAtomicVec2uMinMax -> js_GPUFeatureNameAtomicVec2uMinMax
)
instance FromJSVal GPUFeatureName where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUFeatureNameCoreFeaturesAndLimits, GPUFeatureNameCoreFeaturesAndLimits), (js_GPUFeatureNameDepthClipControl, GPUFeatureNameDepthClipControl), (js_GPUFeatureNameDepth32floatStencil8, GPUFeatureNameDepth32floatStencil8), (js_GPUFeatureNameTextureCompressionBc, GPUFeatureNameTextureCompressionBc), (js_GPUFeatureNameTextureCompressionBcSliced3d, GPUFeatureNameTextureCompressionBcSliced3d), (js_GPUFeatureNameTextureCompressionEtc2, GPUFeatureNameTextureCompressionEtc2), (js_GPUFeatureNameTextureCompressionAstc, GPUFeatureNameTextureCompressionAstc), (js_GPUFeatureNameTextureCompressionAstcSliced3d, GPUFeatureNameTextureCompressionAstcSliced3d), (js_GPUFeatureNameTimestampQuery, GPUFeatureNameTimestampQuery), (js_GPUFeatureNameIndirectFirstInstance, GPUFeatureNameIndirectFirstInstance), (js_GPUFeatureNameShaderF16, GPUFeatureNameShaderF16), (js_GPUFeatureNameRg11b10ufloatRenderable, GPUFeatureNameRg11b10ufloatRenderable), (js_GPUFeatureNameBgra8unormStorage, GPUFeatureNameBgra8unormStorage), (js_GPUFeatureNameFloat32Filterable, GPUFeatureNameFloat32Filterable), (js_GPUFeatureNameFloat32Blendable, GPUFeatureNameFloat32Blendable), (js_GPUFeatureNameClipDistances, GPUFeatureNameClipDistances), (js_GPUFeatureNameDualSourceBlending, GPUFeatureNameDualSourceBlending), (js_GPUFeatureNameSubgroups, GPUFeatureNameSubgroups), (js_GPUFeatureNameTextureFormatsTier1, GPUFeatureNameTextureFormatsTier1), (js_GPUFeatureNameTextureFormatsTier2, GPUFeatureNameTextureFormatsTier2), (js_GPUFeatureNamePrimitiveIndex, GPUFeatureNamePrimitiveIndex), (js_GPUFeatureNameTextureComponentSwizzle, GPUFeatureNameTextureComponentSwizzle), (js_GPUFeatureNameSubgroupSizeControl, GPUFeatureNameSubgroupSizeControl), (js_GPUFeatureNameTextureCompressionUnaligned, GPUFeatureNameTextureCompressionUnaligned), (js_GPUFeatureNameAtomicVec2uMinMax, GPUFeatureNameAtomicVec2uMinMax)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUFeatureName value") P.return
js_GPUFeatureNameCoreFeaturesAndLimits :: JSString
js_GPUFeatureNameCoreFeaturesAndLimits = "core-features-and-limits"
js_GPUFeatureNameDepthClipControl :: JSString
js_GPUFeatureNameDepthClipControl = "depth-clip-control"
js_GPUFeatureNameDepth32floatStencil8 :: JSString
js_GPUFeatureNameDepth32floatStencil8 = "depth32float-stencil8"
js_GPUFeatureNameTextureCompressionBc :: JSString
js_GPUFeatureNameTextureCompressionBc = "texture-compression-bc"
js_GPUFeatureNameTextureCompressionBcSliced3d :: JSString
js_GPUFeatureNameTextureCompressionBcSliced3d = "texture-compression-bc-sliced-3d"
js_GPUFeatureNameTextureCompressionEtc2 :: JSString
js_GPUFeatureNameTextureCompressionEtc2 = "texture-compression-etc2"
js_GPUFeatureNameTextureCompressionAstc :: JSString
js_GPUFeatureNameTextureCompressionAstc = "texture-compression-astc"
js_GPUFeatureNameTextureCompressionAstcSliced3d :: JSString
js_GPUFeatureNameTextureCompressionAstcSliced3d = "texture-compression-astc-sliced-3d"
js_GPUFeatureNameTimestampQuery :: JSString
js_GPUFeatureNameTimestampQuery = "timestamp-query"
js_GPUFeatureNameIndirectFirstInstance :: JSString
js_GPUFeatureNameIndirectFirstInstance = "indirect-first-instance"
js_GPUFeatureNameShaderF16 :: JSString
js_GPUFeatureNameShaderF16 = "shader-f16"
js_GPUFeatureNameRg11b10ufloatRenderable :: JSString
js_GPUFeatureNameRg11b10ufloatRenderable = "rg11b10ufloat-renderable"
js_GPUFeatureNameBgra8unormStorage :: JSString
js_GPUFeatureNameBgra8unormStorage = "bgra8unorm-storage"
js_GPUFeatureNameFloat32Filterable :: JSString
js_GPUFeatureNameFloat32Filterable = "float32-filterable"
js_GPUFeatureNameFloat32Blendable :: JSString
js_GPUFeatureNameFloat32Blendable = "float32-blendable"
js_GPUFeatureNameClipDistances :: JSString
js_GPUFeatureNameClipDistances = "clip-distances"
js_GPUFeatureNameDualSourceBlending :: JSString
js_GPUFeatureNameDualSourceBlending = "dual-source-blending"
js_GPUFeatureNameSubgroups :: JSString
js_GPUFeatureNameSubgroups = "subgroups"
js_GPUFeatureNameTextureFormatsTier1 :: JSString
js_GPUFeatureNameTextureFormatsTier1 = "texture-formats-tier1"
js_GPUFeatureNameTextureFormatsTier2 :: JSString
js_GPUFeatureNameTextureFormatsTier2 = "texture-formats-tier2"
js_GPUFeatureNamePrimitiveIndex :: JSString
js_GPUFeatureNamePrimitiveIndex = "primitive-index"
js_GPUFeatureNameTextureComponentSwizzle :: JSString
js_GPUFeatureNameTextureComponentSwizzle = "texture-component-swizzle"
js_GPUFeatureNameSubgroupSizeControl :: JSString
js_GPUFeatureNameSubgroupSizeControl = "subgroup-size-control"
js_GPUFeatureNameTextureCompressionUnaligned :: JSString
js_GPUFeatureNameTextureCompressionUnaligned = "texture-compression-unaligned"
js_GPUFeatureNameAtomicVec2uMinMax :: JSString
js_GPUFeatureNameAtomicVec2uMinMax = "atomic-vec2u-min-max"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUFilterMode> (webgpu)
data GPUFilterMode = GPUFilterModeNearest
| GPUFilterModeLinear
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUFilterMode where
toJSVal x = toJSVal (case x of
GPUFilterModeNearest -> js_GPUFilterModeNearest
GPUFilterModeLinear -> js_GPUFilterModeLinear
)
instance FromJSVal GPUFilterMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUFilterModeNearest, GPUFilterModeNearest), (js_GPUFilterModeLinear, GPUFilterModeLinear)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUFilterMode value") P.return
js_GPUFilterModeNearest :: JSString
js_GPUFilterModeNearest = "nearest"
js_GPUFilterModeLinear :: JSString
js_GPUFilterModeLinear = "linear"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUFrontFace> (webgpu)
data GPUFrontFace = GPUFrontFaceCcw
| GPUFrontFaceCw
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUFrontFace where
toJSVal x = toJSVal (case x of
GPUFrontFaceCcw -> js_GPUFrontFaceCcw
GPUFrontFaceCw -> js_GPUFrontFaceCw
)
instance FromJSVal GPUFrontFace where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUFrontFaceCcw, GPUFrontFaceCcw), (js_GPUFrontFaceCw, GPUFrontFaceCw)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUFrontFace value") P.return
js_GPUFrontFaceCcw :: JSString
js_GPUFrontFaceCcw = "ccw"
js_GPUFrontFaceCw :: JSString
js_GPUFrontFaceCw = "cw"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUIndexFormat> (webgpu)
data GPUIndexFormat = GPUIndexFormatUint16
| GPUIndexFormatUint32
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUIndexFormat where
toJSVal x = toJSVal (case x of
GPUIndexFormatUint16 -> js_GPUIndexFormatUint16
GPUIndexFormatUint32 -> js_GPUIndexFormatUint32
)
instance FromJSVal GPUIndexFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUIndexFormatUint16, GPUIndexFormatUint16), (js_GPUIndexFormatUint32, GPUIndexFormatUint32)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUIndexFormat value") P.return
js_GPUIndexFormatUint16 :: JSString
js_GPUIndexFormatUint16 = "uint16"
js_GPUIndexFormatUint32 :: JSString
js_GPUIndexFormatUint32 = "uint32"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPULoadOp> (webgpu)
data GPULoadOp = GPULoadOpLoad
| GPULoadOpClear
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPULoadOp where
toJSVal x = toJSVal (case x of
GPULoadOpLoad -> js_GPULoadOpLoad
GPULoadOpClear -> js_GPULoadOpClear
)
instance FromJSVal GPULoadOp where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPULoadOpLoad, GPULoadOpLoad), (js_GPULoadOpClear, GPULoadOpClear)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPULoadOp value") P.return
js_GPULoadOpLoad :: JSString
js_GPULoadOpLoad = "load"
js_GPULoadOpClear :: JSString
js_GPULoadOpClear = "clear"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUMipmapFilterMode> (webgpu)
data GPUMipmapFilterMode = GPUMipmapFilterModeNearest
| GPUMipmapFilterModeLinear
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUMipmapFilterMode where
toJSVal x = toJSVal (case x of
GPUMipmapFilterModeNearest -> js_GPUMipmapFilterModeNearest
GPUMipmapFilterModeLinear -> js_GPUMipmapFilterModeLinear
)
instance FromJSVal GPUMipmapFilterMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUMipmapFilterModeNearest, GPUMipmapFilterModeNearest), (js_GPUMipmapFilterModeLinear, GPUMipmapFilterModeLinear)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUMipmapFilterMode value") P.return
js_GPUMipmapFilterModeNearest :: JSString
js_GPUMipmapFilterModeNearest = "nearest"
js_GPUMipmapFilterModeLinear :: JSString
js_GPUMipmapFilterModeLinear = "linear"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUPipelineErrorReason> (webgpu)
data GPUPipelineErrorReason = GPUPipelineErrorReasonValidation
| GPUPipelineErrorReasonInternal
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUPipelineErrorReason where
toJSVal x = toJSVal (case x of
GPUPipelineErrorReasonValidation -> js_GPUPipelineErrorReasonValidation
GPUPipelineErrorReasonInternal -> js_GPUPipelineErrorReasonInternal
)
instance FromJSVal GPUPipelineErrorReason where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUPipelineErrorReasonValidation, GPUPipelineErrorReasonValidation), (js_GPUPipelineErrorReasonInternal, GPUPipelineErrorReasonInternal)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUPipelineErrorReason value") P.return
js_GPUPipelineErrorReasonValidation :: JSString
js_GPUPipelineErrorReasonValidation = "validation"
js_GPUPipelineErrorReasonInternal :: JSString
js_GPUPipelineErrorReasonInternal = "internal"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUPowerPreference> (webgpu)
data GPUPowerPreference = GPUPowerPreferenceLowPower
| GPUPowerPreferenceHighPerformance
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUPowerPreference where
toJSVal x = toJSVal (case x of
GPUPowerPreferenceLowPower -> js_GPUPowerPreferenceLowPower
GPUPowerPreferenceHighPerformance -> js_GPUPowerPreferenceHighPerformance
)
instance FromJSVal GPUPowerPreference where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUPowerPreferenceLowPower, GPUPowerPreferenceLowPower), (js_GPUPowerPreferenceHighPerformance, GPUPowerPreferenceHighPerformance)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUPowerPreference value") P.return
js_GPUPowerPreferenceLowPower :: JSString
js_GPUPowerPreferenceLowPower = "low-power"
js_GPUPowerPreferenceHighPerformance :: JSString
js_GPUPowerPreferenceHighPerformance = "high-performance"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUPrimitiveTopology> (webgpu)
data GPUPrimitiveTopology = GPUPrimitiveTopologyPointList
| GPUPrimitiveTopologyLineList
| GPUPrimitiveTopologyLineStrip
| GPUPrimitiveTopologyTriangleList
| GPUPrimitiveTopologyTriangleStrip
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUPrimitiveTopology where
toJSVal x = toJSVal (case x of
GPUPrimitiveTopologyPointList -> js_GPUPrimitiveTopologyPointList
GPUPrimitiveTopologyLineList -> js_GPUPrimitiveTopologyLineList
GPUPrimitiveTopologyLineStrip -> js_GPUPrimitiveTopologyLineStrip
GPUPrimitiveTopologyTriangleList -> js_GPUPrimitiveTopologyTriangleList
GPUPrimitiveTopologyTriangleStrip -> js_GPUPrimitiveTopologyTriangleStrip
)
instance FromJSVal GPUPrimitiveTopology where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUPrimitiveTopologyPointList, GPUPrimitiveTopologyPointList), (js_GPUPrimitiveTopologyLineList, GPUPrimitiveTopologyLineList), (js_GPUPrimitiveTopologyLineStrip, GPUPrimitiveTopologyLineStrip), (js_GPUPrimitiveTopologyTriangleList, GPUPrimitiveTopologyTriangleList), (js_GPUPrimitiveTopologyTriangleStrip, GPUPrimitiveTopologyTriangleStrip)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUPrimitiveTopology value") P.return
js_GPUPrimitiveTopologyPointList :: JSString
js_GPUPrimitiveTopologyPointList = "point-list"
js_GPUPrimitiveTopologyLineList :: JSString
js_GPUPrimitiveTopologyLineList = "line-list"
js_GPUPrimitiveTopologyLineStrip :: JSString
js_GPUPrimitiveTopologyLineStrip = "line-strip"
js_GPUPrimitiveTopologyTriangleList :: JSString
js_GPUPrimitiveTopologyTriangleList = "triangle-list"
js_GPUPrimitiveTopologyTriangleStrip :: JSString
js_GPUPrimitiveTopologyTriangleStrip = "triangle-strip"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUQueryType> (webgpu)
data GPUQueryType = GPUQueryTypeOcclusion
| GPUQueryTypeTimestamp
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUQueryType where
toJSVal x = toJSVal (case x of
GPUQueryTypeOcclusion -> js_GPUQueryTypeOcclusion
GPUQueryTypeTimestamp -> js_GPUQueryTypeTimestamp
)
instance FromJSVal GPUQueryType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUQueryTypeOcclusion, GPUQueryTypeOcclusion), (js_GPUQueryTypeTimestamp, GPUQueryTypeTimestamp)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUQueryType value") P.return
js_GPUQueryTypeOcclusion :: JSString
js_GPUQueryTypeOcclusion = "occlusion"
js_GPUQueryTypeTimestamp :: JSString
js_GPUQueryTypeTimestamp = "timestamp"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUSamplerBindingType> (webgpu)
data GPUSamplerBindingType = GPUSamplerBindingTypeFiltering
| GPUSamplerBindingTypeNonFiltering
| GPUSamplerBindingTypeComparison
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUSamplerBindingType where
toJSVal x = toJSVal (case x of
GPUSamplerBindingTypeFiltering -> js_GPUSamplerBindingTypeFiltering
GPUSamplerBindingTypeNonFiltering -> js_GPUSamplerBindingTypeNonFiltering
GPUSamplerBindingTypeComparison -> js_GPUSamplerBindingTypeComparison
)
instance FromJSVal GPUSamplerBindingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUSamplerBindingTypeFiltering, GPUSamplerBindingTypeFiltering), (js_GPUSamplerBindingTypeNonFiltering, GPUSamplerBindingTypeNonFiltering), (js_GPUSamplerBindingTypeComparison, GPUSamplerBindingTypeComparison)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUSamplerBindingType value") P.return
js_GPUSamplerBindingTypeFiltering :: JSString
js_GPUSamplerBindingTypeFiltering = "filtering"
js_GPUSamplerBindingTypeNonFiltering :: JSString
js_GPUSamplerBindingTypeNonFiltering = "non-filtering"
js_GPUSamplerBindingTypeComparison :: JSString
js_GPUSamplerBindingTypeComparison = "comparison"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUStencilOperation> (webgpu)
data GPUStencilOperation = GPUStencilOperationKeep
| GPUStencilOperationZero
| GPUStencilOperationReplace
| GPUStencilOperationInvert
| GPUStencilOperationIncrementClamp
| GPUStencilOperationDecrementClamp
| GPUStencilOperationIncrementWrap
| GPUStencilOperationDecrementWrap
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUStencilOperation where
toJSVal x = toJSVal (case x of
GPUStencilOperationKeep -> js_GPUStencilOperationKeep
GPUStencilOperationZero -> js_GPUStencilOperationZero
GPUStencilOperationReplace -> js_GPUStencilOperationReplace
GPUStencilOperationInvert -> js_GPUStencilOperationInvert
GPUStencilOperationIncrementClamp -> js_GPUStencilOperationIncrementClamp
GPUStencilOperationDecrementClamp -> js_GPUStencilOperationDecrementClamp
GPUStencilOperationIncrementWrap -> js_GPUStencilOperationIncrementWrap
GPUStencilOperationDecrementWrap -> js_GPUStencilOperationDecrementWrap
)
instance FromJSVal GPUStencilOperation where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUStencilOperationKeep, GPUStencilOperationKeep), (js_GPUStencilOperationZero, GPUStencilOperationZero), (js_GPUStencilOperationReplace, GPUStencilOperationReplace), (js_GPUStencilOperationInvert, GPUStencilOperationInvert), (js_GPUStencilOperationIncrementClamp, GPUStencilOperationIncrementClamp), (js_GPUStencilOperationDecrementClamp, GPUStencilOperationDecrementClamp), (js_GPUStencilOperationIncrementWrap, GPUStencilOperationIncrementWrap), (js_GPUStencilOperationDecrementWrap, GPUStencilOperationDecrementWrap)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUStencilOperation value") P.return
js_GPUStencilOperationKeep :: JSString
js_GPUStencilOperationKeep = "keep"
js_GPUStencilOperationZero :: JSString
js_GPUStencilOperationZero = "zero"
js_GPUStencilOperationReplace :: JSString
js_GPUStencilOperationReplace = "replace"
js_GPUStencilOperationInvert :: JSString
js_GPUStencilOperationInvert = "invert"
js_GPUStencilOperationIncrementClamp :: JSString
js_GPUStencilOperationIncrementClamp = "increment-clamp"
js_GPUStencilOperationDecrementClamp :: JSString
js_GPUStencilOperationDecrementClamp = "decrement-clamp"
js_GPUStencilOperationIncrementWrap :: JSString
js_GPUStencilOperationIncrementWrap = "increment-wrap"
js_GPUStencilOperationDecrementWrap :: JSString
js_GPUStencilOperationDecrementWrap = "decrement-wrap"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUStorageTextureAccess> (webgpu)
data GPUStorageTextureAccess = GPUStorageTextureAccessWriteOnly
| GPUStorageTextureAccessReadOnly
| GPUStorageTextureAccessReadWrite
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUStorageTextureAccess where
toJSVal x = toJSVal (case x of
GPUStorageTextureAccessWriteOnly -> js_GPUStorageTextureAccessWriteOnly
GPUStorageTextureAccessReadOnly -> js_GPUStorageTextureAccessReadOnly
GPUStorageTextureAccessReadWrite -> js_GPUStorageTextureAccessReadWrite
)
instance FromJSVal GPUStorageTextureAccess where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUStorageTextureAccessWriteOnly, GPUStorageTextureAccessWriteOnly), (js_GPUStorageTextureAccessReadOnly, GPUStorageTextureAccessReadOnly), (js_GPUStorageTextureAccessReadWrite, GPUStorageTextureAccessReadWrite)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUStorageTextureAccess value") P.return
js_GPUStorageTextureAccessWriteOnly :: JSString
js_GPUStorageTextureAccessWriteOnly = "write-only"
js_GPUStorageTextureAccessReadOnly :: JSString
js_GPUStorageTextureAccessReadOnly = "read-only"
js_GPUStorageTextureAccessReadWrite :: JSString
js_GPUStorageTextureAccessReadWrite = "read-write"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUStoreOp> (webgpu)
data GPUStoreOp = GPUStoreOpStore
| GPUStoreOpDiscard
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUStoreOp where
toJSVal x = toJSVal (case x of
GPUStoreOpStore -> js_GPUStoreOpStore
GPUStoreOpDiscard -> js_GPUStoreOpDiscard
)
instance FromJSVal GPUStoreOp where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUStoreOpStore, GPUStoreOpStore), (js_GPUStoreOpDiscard, GPUStoreOpDiscard)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUStoreOp value") P.return
js_GPUStoreOpStore :: JSString
js_GPUStoreOpStore = "store"
js_GPUStoreOpDiscard :: JSString
js_GPUStoreOpDiscard = "discard"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUTextureAspect> (webgpu)
data GPUTextureAspect = GPUTextureAspectAll
| GPUTextureAspectStencilOnly
| GPUTextureAspectDepthOnly
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUTextureAspect where
toJSVal x = toJSVal (case x of
GPUTextureAspectAll -> js_GPUTextureAspectAll
GPUTextureAspectStencilOnly -> js_GPUTextureAspectStencilOnly
GPUTextureAspectDepthOnly -> js_GPUTextureAspectDepthOnly
)
instance FromJSVal GPUTextureAspect where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUTextureAspectAll, GPUTextureAspectAll), (js_GPUTextureAspectStencilOnly, GPUTextureAspectStencilOnly), (js_GPUTextureAspectDepthOnly, GPUTextureAspectDepthOnly)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUTextureAspect value") P.return
js_GPUTextureAspectAll :: JSString
js_GPUTextureAspectAll = "all"
js_GPUTextureAspectStencilOnly :: JSString
js_GPUTextureAspectStencilOnly = "stencil-only"
js_GPUTextureAspectDepthOnly :: JSString
js_GPUTextureAspectDepthOnly = "depth-only"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUTextureDimension> (webgpu)
data GPUTextureDimension = GPUTextureDimension1d
| GPUTextureDimension2d
| GPUTextureDimension3d
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUTextureDimension where
toJSVal x = toJSVal (case x of
GPUTextureDimension1d -> js_GPUTextureDimension1d
GPUTextureDimension2d -> js_GPUTextureDimension2d
GPUTextureDimension3d -> js_GPUTextureDimension3d
)
instance FromJSVal GPUTextureDimension where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUTextureDimension1d, GPUTextureDimension1d), (js_GPUTextureDimension2d, GPUTextureDimension2d), (js_GPUTextureDimension3d, GPUTextureDimension3d)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUTextureDimension value") P.return
js_GPUTextureDimension1d :: JSString
js_GPUTextureDimension1d = "1d"
js_GPUTextureDimension2d :: JSString
js_GPUTextureDimension2d = "2d"
js_GPUTextureDimension3d :: JSString
js_GPUTextureDimension3d = "3d"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUTextureFormat> (webgpu)
data GPUTextureFormat = GPUTextureFormatR8unorm
| GPUTextureFormatR8snorm
| GPUTextureFormatR8uint
| GPUTextureFormatR8sint
| GPUTextureFormatR16unorm
| GPUTextureFormatR16snorm
| GPUTextureFormatR16uint
| GPUTextureFormatR16sint
| GPUTextureFormatR16float
| GPUTextureFormatRg8unorm
| GPUTextureFormatRg8snorm
| GPUTextureFormatRg8uint
| GPUTextureFormatRg8sint
| GPUTextureFormatR32uint
| GPUTextureFormatR32sint
| GPUTextureFormatR32float
| GPUTextureFormatRg16unorm
| GPUTextureFormatRg16snorm
| GPUTextureFormatRg16uint
| GPUTextureFormatRg16sint
| GPUTextureFormatRg16float
| GPUTextureFormatRgba8unorm
| GPUTextureFormatRgba8unormSrgb
| GPUTextureFormatRgba8snorm
| GPUTextureFormatRgba8uint
| GPUTextureFormatRgba8sint
| GPUTextureFormatBgra8unorm
| GPUTextureFormatBgra8unormSrgb
| GPUTextureFormatRgb9e5ufloat
| GPUTextureFormatRgb10a2uint
| GPUTextureFormatRgb10a2unorm
| GPUTextureFormatRg11b10ufloat
| GPUTextureFormatRg32uint
| GPUTextureFormatRg32sint
| GPUTextureFormatRg32float
| GPUTextureFormatRgba16unorm
| GPUTextureFormatRgba16snorm
| GPUTextureFormatRgba16uint
| GPUTextureFormatRgba16sint
| GPUTextureFormatRgba16float
| GPUTextureFormatRgba32uint
| GPUTextureFormatRgba32sint
| GPUTextureFormatRgba32float
| GPUTextureFormatStencil8
| GPUTextureFormatDepth16unorm
| GPUTextureFormatDepth24plus
| GPUTextureFormatDepth24plusStencil8
| GPUTextureFormatDepth32float
| GPUTextureFormatDepth32floatStencil8
| GPUTextureFormatBc1RgbaUnorm
| GPUTextureFormatBc1RgbaUnormSrgb
| GPUTextureFormatBc2RgbaUnorm
| GPUTextureFormatBc2RgbaUnormSrgb
| GPUTextureFormatBc3RgbaUnorm
| GPUTextureFormatBc3RgbaUnormSrgb
| GPUTextureFormatBc4RUnorm
| GPUTextureFormatBc4RSnorm
| GPUTextureFormatBc5RgUnorm
| GPUTextureFormatBc5RgSnorm
| GPUTextureFormatBc6hRgbUfloat
| GPUTextureFormatBc6hRgbFloat
| GPUTextureFormatBc7RgbaUnorm
| GPUTextureFormatBc7RgbaUnormSrgb
| GPUTextureFormatEtc2Rgb8unorm
| GPUTextureFormatEtc2Rgb8unormSrgb
| GPUTextureFormatEtc2Rgb8a1unorm
| GPUTextureFormatEtc2Rgb8a1unormSrgb
| GPUTextureFormatEtc2Rgba8unorm
| GPUTextureFormatEtc2Rgba8unormSrgb
| GPUTextureFormatEacR11unorm
| GPUTextureFormatEacR11snorm
| GPUTextureFormatEacRg11unorm
| GPUTextureFormatEacRg11snorm
| GPUTextureFormatAstc4x4Unorm
| GPUTextureFormatAstc4x4UnormSrgb
| GPUTextureFormatAstc5x4Unorm
| GPUTextureFormatAstc5x4UnormSrgb
| GPUTextureFormatAstc5x5Unorm
| GPUTextureFormatAstc5x5UnormSrgb
| GPUTextureFormatAstc6x5Unorm
| GPUTextureFormatAstc6x5UnormSrgb
| GPUTextureFormatAstc6x6Unorm
| GPUTextureFormatAstc6x6UnormSrgb
| GPUTextureFormatAstc8x5Unorm
| GPUTextureFormatAstc8x5UnormSrgb
| GPUTextureFormatAstc8x6Unorm
| GPUTextureFormatAstc8x6UnormSrgb
| GPUTextureFormatAstc8x8Unorm
| GPUTextureFormatAstc8x8UnormSrgb
| GPUTextureFormatAstc10x5Unorm
| GPUTextureFormatAstc10x5UnormSrgb
| GPUTextureFormatAstc10x6Unorm
| GPUTextureFormatAstc10x6UnormSrgb
| GPUTextureFormatAstc10x8Unorm
| GPUTextureFormatAstc10x8UnormSrgb
| GPUTextureFormatAstc10x10Unorm
| GPUTextureFormatAstc10x10UnormSrgb
| GPUTextureFormatAstc12x10Unorm
| GPUTextureFormatAstc12x10UnormSrgb
| GPUTextureFormatAstc12x12Unorm
| GPUTextureFormatAstc12x12UnormSrgb
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUTextureFormat where
toJSVal x = toJSVal (case x of
GPUTextureFormatR8unorm -> js_GPUTextureFormatR8unorm
GPUTextureFormatR8snorm -> js_GPUTextureFormatR8snorm
GPUTextureFormatR8uint -> js_GPUTextureFormatR8uint
GPUTextureFormatR8sint -> js_GPUTextureFormatR8sint
GPUTextureFormatR16unorm -> js_GPUTextureFormatR16unorm
GPUTextureFormatR16snorm -> js_GPUTextureFormatR16snorm
GPUTextureFormatR16uint -> js_GPUTextureFormatR16uint
GPUTextureFormatR16sint -> js_GPUTextureFormatR16sint
GPUTextureFormatR16float -> js_GPUTextureFormatR16float
GPUTextureFormatRg8unorm -> js_GPUTextureFormatRg8unorm
GPUTextureFormatRg8snorm -> js_GPUTextureFormatRg8snorm
GPUTextureFormatRg8uint -> js_GPUTextureFormatRg8uint
GPUTextureFormatRg8sint -> js_GPUTextureFormatRg8sint
GPUTextureFormatR32uint -> js_GPUTextureFormatR32uint
GPUTextureFormatR32sint -> js_GPUTextureFormatR32sint
GPUTextureFormatR32float -> js_GPUTextureFormatR32float
GPUTextureFormatRg16unorm -> js_GPUTextureFormatRg16unorm
GPUTextureFormatRg16snorm -> js_GPUTextureFormatRg16snorm
GPUTextureFormatRg16uint -> js_GPUTextureFormatRg16uint
GPUTextureFormatRg16sint -> js_GPUTextureFormatRg16sint
GPUTextureFormatRg16float -> js_GPUTextureFormatRg16float
GPUTextureFormatRgba8unorm -> js_GPUTextureFormatRgba8unorm
GPUTextureFormatRgba8unormSrgb -> js_GPUTextureFormatRgba8unormSrgb
GPUTextureFormatRgba8snorm -> js_GPUTextureFormatRgba8snorm
GPUTextureFormatRgba8uint -> js_GPUTextureFormatRgba8uint
GPUTextureFormatRgba8sint -> js_GPUTextureFormatRgba8sint
GPUTextureFormatBgra8unorm -> js_GPUTextureFormatBgra8unorm
GPUTextureFormatBgra8unormSrgb -> js_GPUTextureFormatBgra8unormSrgb
GPUTextureFormatRgb9e5ufloat -> js_GPUTextureFormatRgb9e5ufloat
GPUTextureFormatRgb10a2uint -> js_GPUTextureFormatRgb10a2uint
GPUTextureFormatRgb10a2unorm -> js_GPUTextureFormatRgb10a2unorm
GPUTextureFormatRg11b10ufloat -> js_GPUTextureFormatRg11b10ufloat
GPUTextureFormatRg32uint -> js_GPUTextureFormatRg32uint
GPUTextureFormatRg32sint -> js_GPUTextureFormatRg32sint
GPUTextureFormatRg32float -> js_GPUTextureFormatRg32float
GPUTextureFormatRgba16unorm -> js_GPUTextureFormatRgba16unorm
GPUTextureFormatRgba16snorm -> js_GPUTextureFormatRgba16snorm
GPUTextureFormatRgba16uint -> js_GPUTextureFormatRgba16uint
GPUTextureFormatRgba16sint -> js_GPUTextureFormatRgba16sint
GPUTextureFormatRgba16float -> js_GPUTextureFormatRgba16float
GPUTextureFormatRgba32uint -> js_GPUTextureFormatRgba32uint
GPUTextureFormatRgba32sint -> js_GPUTextureFormatRgba32sint
GPUTextureFormatRgba32float -> js_GPUTextureFormatRgba32float
GPUTextureFormatStencil8 -> js_GPUTextureFormatStencil8
GPUTextureFormatDepth16unorm -> js_GPUTextureFormatDepth16unorm
GPUTextureFormatDepth24plus -> js_GPUTextureFormatDepth24plus
GPUTextureFormatDepth24plusStencil8 -> js_GPUTextureFormatDepth24plusStencil8
GPUTextureFormatDepth32float -> js_GPUTextureFormatDepth32float
GPUTextureFormatDepth32floatStencil8 -> js_GPUTextureFormatDepth32floatStencil8
GPUTextureFormatBc1RgbaUnorm -> js_GPUTextureFormatBc1RgbaUnorm
GPUTextureFormatBc1RgbaUnormSrgb -> js_GPUTextureFormatBc1RgbaUnormSrgb
GPUTextureFormatBc2RgbaUnorm -> js_GPUTextureFormatBc2RgbaUnorm
GPUTextureFormatBc2RgbaUnormSrgb -> js_GPUTextureFormatBc2RgbaUnormSrgb
GPUTextureFormatBc3RgbaUnorm -> js_GPUTextureFormatBc3RgbaUnorm
GPUTextureFormatBc3RgbaUnormSrgb -> js_GPUTextureFormatBc3RgbaUnormSrgb
GPUTextureFormatBc4RUnorm -> js_GPUTextureFormatBc4RUnorm
GPUTextureFormatBc4RSnorm -> js_GPUTextureFormatBc4RSnorm
GPUTextureFormatBc5RgUnorm -> js_GPUTextureFormatBc5RgUnorm
GPUTextureFormatBc5RgSnorm -> js_GPUTextureFormatBc5RgSnorm
GPUTextureFormatBc6hRgbUfloat -> js_GPUTextureFormatBc6hRgbUfloat
GPUTextureFormatBc6hRgbFloat -> js_GPUTextureFormatBc6hRgbFloat
GPUTextureFormatBc7RgbaUnorm -> js_GPUTextureFormatBc7RgbaUnorm
GPUTextureFormatBc7RgbaUnormSrgb -> js_GPUTextureFormatBc7RgbaUnormSrgb
GPUTextureFormatEtc2Rgb8unorm -> js_GPUTextureFormatEtc2Rgb8unorm
GPUTextureFormatEtc2Rgb8unormSrgb -> js_GPUTextureFormatEtc2Rgb8unormSrgb
GPUTextureFormatEtc2Rgb8a1unorm -> js_GPUTextureFormatEtc2Rgb8a1unorm
GPUTextureFormatEtc2Rgb8a1unormSrgb -> js_GPUTextureFormatEtc2Rgb8a1unormSrgb
GPUTextureFormatEtc2Rgba8unorm -> js_GPUTextureFormatEtc2Rgba8unorm
GPUTextureFormatEtc2Rgba8unormSrgb -> js_GPUTextureFormatEtc2Rgba8unormSrgb
GPUTextureFormatEacR11unorm -> js_GPUTextureFormatEacR11unorm
GPUTextureFormatEacR11snorm -> js_GPUTextureFormatEacR11snorm
GPUTextureFormatEacRg11unorm -> js_GPUTextureFormatEacRg11unorm
GPUTextureFormatEacRg11snorm -> js_GPUTextureFormatEacRg11snorm
GPUTextureFormatAstc4x4Unorm -> js_GPUTextureFormatAstc4x4Unorm
GPUTextureFormatAstc4x4UnormSrgb -> js_GPUTextureFormatAstc4x4UnormSrgb
GPUTextureFormatAstc5x4Unorm -> js_GPUTextureFormatAstc5x4Unorm
GPUTextureFormatAstc5x4UnormSrgb -> js_GPUTextureFormatAstc5x4UnormSrgb
GPUTextureFormatAstc5x5Unorm -> js_GPUTextureFormatAstc5x5Unorm
GPUTextureFormatAstc5x5UnormSrgb -> js_GPUTextureFormatAstc5x5UnormSrgb
GPUTextureFormatAstc6x5Unorm -> js_GPUTextureFormatAstc6x5Unorm
GPUTextureFormatAstc6x5UnormSrgb -> js_GPUTextureFormatAstc6x5UnormSrgb
GPUTextureFormatAstc6x6Unorm -> js_GPUTextureFormatAstc6x6Unorm
GPUTextureFormatAstc6x6UnormSrgb -> js_GPUTextureFormatAstc6x6UnormSrgb
GPUTextureFormatAstc8x5Unorm -> js_GPUTextureFormatAstc8x5Unorm
GPUTextureFormatAstc8x5UnormSrgb -> js_GPUTextureFormatAstc8x5UnormSrgb
GPUTextureFormatAstc8x6Unorm -> js_GPUTextureFormatAstc8x6Unorm
GPUTextureFormatAstc8x6UnormSrgb -> js_GPUTextureFormatAstc8x6UnormSrgb
GPUTextureFormatAstc8x8Unorm -> js_GPUTextureFormatAstc8x8Unorm
GPUTextureFormatAstc8x8UnormSrgb -> js_GPUTextureFormatAstc8x8UnormSrgb
GPUTextureFormatAstc10x5Unorm -> js_GPUTextureFormatAstc10x5Unorm
GPUTextureFormatAstc10x5UnormSrgb -> js_GPUTextureFormatAstc10x5UnormSrgb
GPUTextureFormatAstc10x6Unorm -> js_GPUTextureFormatAstc10x6Unorm
GPUTextureFormatAstc10x6UnormSrgb -> js_GPUTextureFormatAstc10x6UnormSrgb
GPUTextureFormatAstc10x8Unorm -> js_GPUTextureFormatAstc10x8Unorm
GPUTextureFormatAstc10x8UnormSrgb -> js_GPUTextureFormatAstc10x8UnormSrgb
GPUTextureFormatAstc10x10Unorm -> js_GPUTextureFormatAstc10x10Unorm
GPUTextureFormatAstc10x10UnormSrgb -> js_GPUTextureFormatAstc10x10UnormSrgb
GPUTextureFormatAstc12x10Unorm -> js_GPUTextureFormatAstc12x10Unorm
GPUTextureFormatAstc12x10UnormSrgb -> js_GPUTextureFormatAstc12x10UnormSrgb
GPUTextureFormatAstc12x12Unorm -> js_GPUTextureFormatAstc12x12Unorm
GPUTextureFormatAstc12x12UnormSrgb -> js_GPUTextureFormatAstc12x12UnormSrgb
)
instance FromJSVal GPUTextureFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUTextureFormatR8unorm, GPUTextureFormatR8unorm), (js_GPUTextureFormatR8snorm, GPUTextureFormatR8snorm), (js_GPUTextureFormatR8uint, GPUTextureFormatR8uint), (js_GPUTextureFormatR8sint, GPUTextureFormatR8sint), (js_GPUTextureFormatR16unorm, GPUTextureFormatR16unorm), (js_GPUTextureFormatR16snorm, GPUTextureFormatR16snorm), (js_GPUTextureFormatR16uint, GPUTextureFormatR16uint), (js_GPUTextureFormatR16sint, GPUTextureFormatR16sint), (js_GPUTextureFormatR16float, GPUTextureFormatR16float), (js_GPUTextureFormatRg8unorm, GPUTextureFormatRg8unorm), (js_GPUTextureFormatRg8snorm, GPUTextureFormatRg8snorm), (js_GPUTextureFormatRg8uint, GPUTextureFormatRg8uint), (js_GPUTextureFormatRg8sint, GPUTextureFormatRg8sint), (js_GPUTextureFormatR32uint, GPUTextureFormatR32uint), (js_GPUTextureFormatR32sint, GPUTextureFormatR32sint), (js_GPUTextureFormatR32float, GPUTextureFormatR32float), (js_GPUTextureFormatRg16unorm, GPUTextureFormatRg16unorm), (js_GPUTextureFormatRg16snorm, GPUTextureFormatRg16snorm), (js_GPUTextureFormatRg16uint, GPUTextureFormatRg16uint), (js_GPUTextureFormatRg16sint, GPUTextureFormatRg16sint), (js_GPUTextureFormatRg16float, GPUTextureFormatRg16float), (js_GPUTextureFormatRgba8unorm, GPUTextureFormatRgba8unorm), (js_GPUTextureFormatRgba8unormSrgb, GPUTextureFormatRgba8unormSrgb), (js_GPUTextureFormatRgba8snorm, GPUTextureFormatRgba8snorm), (js_GPUTextureFormatRgba8uint, GPUTextureFormatRgba8uint), (js_GPUTextureFormatRgba8sint, GPUTextureFormatRgba8sint), (js_GPUTextureFormatBgra8unorm, GPUTextureFormatBgra8unorm), (js_GPUTextureFormatBgra8unormSrgb, GPUTextureFormatBgra8unormSrgb), (js_GPUTextureFormatRgb9e5ufloat, GPUTextureFormatRgb9e5ufloat), (js_GPUTextureFormatRgb10a2uint, GPUTextureFormatRgb10a2uint), (js_GPUTextureFormatRgb10a2unorm, GPUTextureFormatRgb10a2unorm), (js_GPUTextureFormatRg11b10ufloat, GPUTextureFormatRg11b10ufloat), (js_GPUTextureFormatRg32uint, GPUTextureFormatRg32uint), (js_GPUTextureFormatRg32sint, GPUTextureFormatRg32sint), (js_GPUTextureFormatRg32float, GPUTextureFormatRg32float), (js_GPUTextureFormatRgba16unorm, GPUTextureFormatRgba16unorm), (js_GPUTextureFormatRgba16snorm, GPUTextureFormatRgba16snorm), (js_GPUTextureFormatRgba16uint, GPUTextureFormatRgba16uint), (js_GPUTextureFormatRgba16sint, GPUTextureFormatRgba16sint), (js_GPUTextureFormatRgba16float, GPUTextureFormatRgba16float), (js_GPUTextureFormatRgba32uint, GPUTextureFormatRgba32uint), (js_GPUTextureFormatRgba32sint, GPUTextureFormatRgba32sint), (js_GPUTextureFormatRgba32float, GPUTextureFormatRgba32float), (js_GPUTextureFormatStencil8, GPUTextureFormatStencil8), (js_GPUTextureFormatDepth16unorm, GPUTextureFormatDepth16unorm), (js_GPUTextureFormatDepth24plus, GPUTextureFormatDepth24plus), (js_GPUTextureFormatDepth24plusStencil8, GPUTextureFormatDepth24plusStencil8), (js_GPUTextureFormatDepth32float, GPUTextureFormatDepth32float), (js_GPUTextureFormatDepth32floatStencil8, GPUTextureFormatDepth32floatStencil8), (js_GPUTextureFormatBc1RgbaUnorm, GPUTextureFormatBc1RgbaUnorm), (js_GPUTextureFormatBc1RgbaUnormSrgb, GPUTextureFormatBc1RgbaUnormSrgb), (js_GPUTextureFormatBc2RgbaUnorm, GPUTextureFormatBc2RgbaUnorm), (js_GPUTextureFormatBc2RgbaUnormSrgb, GPUTextureFormatBc2RgbaUnormSrgb), (js_GPUTextureFormatBc3RgbaUnorm, GPUTextureFormatBc3RgbaUnorm), (js_GPUTextureFormatBc3RgbaUnormSrgb, GPUTextureFormatBc3RgbaUnormSrgb), (js_GPUTextureFormatBc4RUnorm, GPUTextureFormatBc4RUnorm), (js_GPUTextureFormatBc4RSnorm, GPUTextureFormatBc4RSnorm), (js_GPUTextureFormatBc5RgUnorm, GPUTextureFormatBc5RgUnorm), (js_GPUTextureFormatBc5RgSnorm, GPUTextureFormatBc5RgSnorm), (js_GPUTextureFormatBc6hRgbUfloat, GPUTextureFormatBc6hRgbUfloat), (js_GPUTextureFormatBc6hRgbFloat, GPUTextureFormatBc6hRgbFloat), (js_GPUTextureFormatBc7RgbaUnorm, GPUTextureFormatBc7RgbaUnorm), (js_GPUTextureFormatBc7RgbaUnormSrgb, GPUTextureFormatBc7RgbaUnormSrgb), (js_GPUTextureFormatEtc2Rgb8unorm, GPUTextureFormatEtc2Rgb8unorm), (js_GPUTextureFormatEtc2Rgb8unormSrgb, GPUTextureFormatEtc2Rgb8unormSrgb), (js_GPUTextureFormatEtc2Rgb8a1unorm, GPUTextureFormatEtc2Rgb8a1unorm), (js_GPUTextureFormatEtc2Rgb8a1unormSrgb, GPUTextureFormatEtc2Rgb8a1unormSrgb), (js_GPUTextureFormatEtc2Rgba8unorm, GPUTextureFormatEtc2Rgba8unorm), (js_GPUTextureFormatEtc2Rgba8unormSrgb, GPUTextureFormatEtc2Rgba8unormSrgb), (js_GPUTextureFormatEacR11unorm, GPUTextureFormatEacR11unorm), (js_GPUTextureFormatEacR11snorm, GPUTextureFormatEacR11snorm), (js_GPUTextureFormatEacRg11unorm, GPUTextureFormatEacRg11unorm), (js_GPUTextureFormatEacRg11snorm, GPUTextureFormatEacRg11snorm), (js_GPUTextureFormatAstc4x4Unorm, GPUTextureFormatAstc4x4Unorm), (js_GPUTextureFormatAstc4x4UnormSrgb, GPUTextureFormatAstc4x4UnormSrgb), (js_GPUTextureFormatAstc5x4Unorm, GPUTextureFormatAstc5x4Unorm), (js_GPUTextureFormatAstc5x4UnormSrgb, GPUTextureFormatAstc5x4UnormSrgb), (js_GPUTextureFormatAstc5x5Unorm, GPUTextureFormatAstc5x5Unorm), (js_GPUTextureFormatAstc5x5UnormSrgb, GPUTextureFormatAstc5x5UnormSrgb), (js_GPUTextureFormatAstc6x5Unorm, GPUTextureFormatAstc6x5Unorm), (js_GPUTextureFormatAstc6x5UnormSrgb, GPUTextureFormatAstc6x5UnormSrgb), (js_GPUTextureFormatAstc6x6Unorm, GPUTextureFormatAstc6x6Unorm), (js_GPUTextureFormatAstc6x6UnormSrgb, GPUTextureFormatAstc6x6UnormSrgb), (js_GPUTextureFormatAstc8x5Unorm, GPUTextureFormatAstc8x5Unorm), (js_GPUTextureFormatAstc8x5UnormSrgb, GPUTextureFormatAstc8x5UnormSrgb), (js_GPUTextureFormatAstc8x6Unorm, GPUTextureFormatAstc8x6Unorm), (js_GPUTextureFormatAstc8x6UnormSrgb, GPUTextureFormatAstc8x6UnormSrgb), (js_GPUTextureFormatAstc8x8Unorm, GPUTextureFormatAstc8x8Unorm), (js_GPUTextureFormatAstc8x8UnormSrgb, GPUTextureFormatAstc8x8UnormSrgb), (js_GPUTextureFormatAstc10x5Unorm, GPUTextureFormatAstc10x5Unorm), (js_GPUTextureFormatAstc10x5UnormSrgb, GPUTextureFormatAstc10x5UnormSrgb), (js_GPUTextureFormatAstc10x6Unorm, GPUTextureFormatAstc10x6Unorm), (js_GPUTextureFormatAstc10x6UnormSrgb, GPUTextureFormatAstc10x6UnormSrgb), (js_GPUTextureFormatAstc10x8Unorm, GPUTextureFormatAstc10x8Unorm), (js_GPUTextureFormatAstc10x8UnormSrgb, GPUTextureFormatAstc10x8UnormSrgb), (js_GPUTextureFormatAstc10x10Unorm, GPUTextureFormatAstc10x10Unorm), (js_GPUTextureFormatAstc10x10UnormSrgb, GPUTextureFormatAstc10x10UnormSrgb), (js_GPUTextureFormatAstc12x10Unorm, GPUTextureFormatAstc12x10Unorm), (js_GPUTextureFormatAstc12x10UnormSrgb, GPUTextureFormatAstc12x10UnormSrgb), (js_GPUTextureFormatAstc12x12Unorm, GPUTextureFormatAstc12x12Unorm), (js_GPUTextureFormatAstc12x12UnormSrgb, GPUTextureFormatAstc12x12UnormSrgb)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUTextureFormat value") P.return
js_GPUTextureFormatR8unorm :: JSString
js_GPUTextureFormatR8unorm = "r8unorm"
js_GPUTextureFormatR8snorm :: JSString
js_GPUTextureFormatR8snorm = "r8snorm"
js_GPUTextureFormatR8uint :: JSString
js_GPUTextureFormatR8uint = "r8uint"
js_GPUTextureFormatR8sint :: JSString
js_GPUTextureFormatR8sint = "r8sint"
js_GPUTextureFormatR16unorm :: JSString
js_GPUTextureFormatR16unorm = "r16unorm"
js_GPUTextureFormatR16snorm :: JSString
js_GPUTextureFormatR16snorm = "r16snorm"
js_GPUTextureFormatR16uint :: JSString
js_GPUTextureFormatR16uint = "r16uint"
js_GPUTextureFormatR16sint :: JSString
js_GPUTextureFormatR16sint = "r16sint"
js_GPUTextureFormatR16float :: JSString
js_GPUTextureFormatR16float = "r16float"
js_GPUTextureFormatRg8unorm :: JSString
js_GPUTextureFormatRg8unorm = "rg8unorm"
js_GPUTextureFormatRg8snorm :: JSString
js_GPUTextureFormatRg8snorm = "rg8snorm"
js_GPUTextureFormatRg8uint :: JSString
js_GPUTextureFormatRg8uint = "rg8uint"
js_GPUTextureFormatRg8sint :: JSString
js_GPUTextureFormatRg8sint = "rg8sint"
js_GPUTextureFormatR32uint :: JSString
js_GPUTextureFormatR32uint = "r32uint"
js_GPUTextureFormatR32sint :: JSString
js_GPUTextureFormatR32sint = "r32sint"
js_GPUTextureFormatR32float :: JSString
js_GPUTextureFormatR32float = "r32float"
js_GPUTextureFormatRg16unorm :: JSString
js_GPUTextureFormatRg16unorm = "rg16unorm"
js_GPUTextureFormatRg16snorm :: JSString
js_GPUTextureFormatRg16snorm = "rg16snorm"
js_GPUTextureFormatRg16uint :: JSString
js_GPUTextureFormatRg16uint = "rg16uint"
js_GPUTextureFormatRg16sint :: JSString
js_GPUTextureFormatRg16sint = "rg16sint"
js_GPUTextureFormatRg16float :: JSString
js_GPUTextureFormatRg16float = "rg16float"
js_GPUTextureFormatRgba8unorm :: JSString
js_GPUTextureFormatRgba8unorm = "rgba8unorm"
js_GPUTextureFormatRgba8unormSrgb :: JSString
js_GPUTextureFormatRgba8unormSrgb = "rgba8unorm-srgb"
js_GPUTextureFormatRgba8snorm :: JSString
js_GPUTextureFormatRgba8snorm = "rgba8snorm"
js_GPUTextureFormatRgba8uint :: JSString
js_GPUTextureFormatRgba8uint = "rgba8uint"
js_GPUTextureFormatRgba8sint :: JSString
js_GPUTextureFormatRgba8sint = "rgba8sint"
js_GPUTextureFormatBgra8unorm :: JSString
js_GPUTextureFormatBgra8unorm = "bgra8unorm"
js_GPUTextureFormatBgra8unormSrgb :: JSString
js_GPUTextureFormatBgra8unormSrgb = "bgra8unorm-srgb"
js_GPUTextureFormatRgb9e5ufloat :: JSString
js_GPUTextureFormatRgb9e5ufloat = "rgb9e5ufloat"
js_GPUTextureFormatRgb10a2uint :: JSString
js_GPUTextureFormatRgb10a2uint = "rgb10a2uint"
js_GPUTextureFormatRgb10a2unorm :: JSString
js_GPUTextureFormatRgb10a2unorm = "rgb10a2unorm"
js_GPUTextureFormatRg11b10ufloat :: JSString
js_GPUTextureFormatRg11b10ufloat = "rg11b10ufloat"
js_GPUTextureFormatRg32uint :: JSString
js_GPUTextureFormatRg32uint = "rg32uint"
js_GPUTextureFormatRg32sint :: JSString
js_GPUTextureFormatRg32sint = "rg32sint"
js_GPUTextureFormatRg32float :: JSString
js_GPUTextureFormatRg32float = "rg32float"
js_GPUTextureFormatRgba16unorm :: JSString
js_GPUTextureFormatRgba16unorm = "rgba16unorm"
js_GPUTextureFormatRgba16snorm :: JSString
js_GPUTextureFormatRgba16snorm = "rgba16snorm"
js_GPUTextureFormatRgba16uint :: JSString
js_GPUTextureFormatRgba16uint = "rgba16uint"
js_GPUTextureFormatRgba16sint :: JSString
js_GPUTextureFormatRgba16sint = "rgba16sint"
js_GPUTextureFormatRgba16float :: JSString
js_GPUTextureFormatRgba16float = "rgba16float"
js_GPUTextureFormatRgba32uint :: JSString
js_GPUTextureFormatRgba32uint = "rgba32uint"
js_GPUTextureFormatRgba32sint :: JSString
js_GPUTextureFormatRgba32sint = "rgba32sint"
js_GPUTextureFormatRgba32float :: JSString
js_GPUTextureFormatRgba32float = "rgba32float"
js_GPUTextureFormatStencil8 :: JSString
js_GPUTextureFormatStencil8 = "stencil8"
js_GPUTextureFormatDepth16unorm :: JSString
js_GPUTextureFormatDepth16unorm = "depth16unorm"
js_GPUTextureFormatDepth24plus :: JSString
js_GPUTextureFormatDepth24plus = "depth24plus"
js_GPUTextureFormatDepth24plusStencil8 :: JSString
js_GPUTextureFormatDepth24plusStencil8 = "depth24plus-stencil8"
js_GPUTextureFormatDepth32float :: JSString
js_GPUTextureFormatDepth32float = "depth32float"
js_GPUTextureFormatDepth32floatStencil8 :: JSString
js_GPUTextureFormatDepth32floatStencil8 = "depth32float-stencil8"
js_GPUTextureFormatBc1RgbaUnorm :: JSString
js_GPUTextureFormatBc1RgbaUnorm = "bc1-rgba-unorm"
js_GPUTextureFormatBc1RgbaUnormSrgb :: JSString
js_GPUTextureFormatBc1RgbaUnormSrgb = "bc1-rgba-unorm-srgb"
js_GPUTextureFormatBc2RgbaUnorm :: JSString
js_GPUTextureFormatBc2RgbaUnorm = "bc2-rgba-unorm"
js_GPUTextureFormatBc2RgbaUnormSrgb :: JSString
js_GPUTextureFormatBc2RgbaUnormSrgb = "bc2-rgba-unorm-srgb"
js_GPUTextureFormatBc3RgbaUnorm :: JSString
js_GPUTextureFormatBc3RgbaUnorm = "bc3-rgba-unorm"
js_GPUTextureFormatBc3RgbaUnormSrgb :: JSString
js_GPUTextureFormatBc3RgbaUnormSrgb = "bc3-rgba-unorm-srgb"
js_GPUTextureFormatBc4RUnorm :: JSString
js_GPUTextureFormatBc4RUnorm = "bc4-r-unorm"
js_GPUTextureFormatBc4RSnorm :: JSString
js_GPUTextureFormatBc4RSnorm = "bc4-r-snorm"
js_GPUTextureFormatBc5RgUnorm :: JSString
js_GPUTextureFormatBc5RgUnorm = "bc5-rg-unorm"
js_GPUTextureFormatBc5RgSnorm :: JSString
js_GPUTextureFormatBc5RgSnorm = "bc5-rg-snorm"
js_GPUTextureFormatBc6hRgbUfloat :: JSString
js_GPUTextureFormatBc6hRgbUfloat = "bc6h-rgb-ufloat"
js_GPUTextureFormatBc6hRgbFloat :: JSString
js_GPUTextureFormatBc6hRgbFloat = "bc6h-rgb-float"
js_GPUTextureFormatBc7RgbaUnorm :: JSString
js_GPUTextureFormatBc7RgbaUnorm = "bc7-rgba-unorm"
js_GPUTextureFormatBc7RgbaUnormSrgb :: JSString
js_GPUTextureFormatBc7RgbaUnormSrgb = "bc7-rgba-unorm-srgb"
js_GPUTextureFormatEtc2Rgb8unorm :: JSString
js_GPUTextureFormatEtc2Rgb8unorm = "etc2-rgb8unorm"
js_GPUTextureFormatEtc2Rgb8unormSrgb :: JSString
js_GPUTextureFormatEtc2Rgb8unormSrgb = "etc2-rgb8unorm-srgb"
js_GPUTextureFormatEtc2Rgb8a1unorm :: JSString
js_GPUTextureFormatEtc2Rgb8a1unorm = "etc2-rgb8a1unorm"
js_GPUTextureFormatEtc2Rgb8a1unormSrgb :: JSString
js_GPUTextureFormatEtc2Rgb8a1unormSrgb = "etc2-rgb8a1unorm-srgb"
js_GPUTextureFormatEtc2Rgba8unorm :: JSString
js_GPUTextureFormatEtc2Rgba8unorm = "etc2-rgba8unorm"
js_GPUTextureFormatEtc2Rgba8unormSrgb :: JSString
js_GPUTextureFormatEtc2Rgba8unormSrgb = "etc2-rgba8unorm-srgb"
js_GPUTextureFormatEacR11unorm :: JSString
js_GPUTextureFormatEacR11unorm = "eac-r11unorm"
js_GPUTextureFormatEacR11snorm :: JSString
js_GPUTextureFormatEacR11snorm = "eac-r11snorm"
js_GPUTextureFormatEacRg11unorm :: JSString
js_GPUTextureFormatEacRg11unorm = "eac-rg11unorm"
js_GPUTextureFormatEacRg11snorm :: JSString
js_GPUTextureFormatEacRg11snorm = "eac-rg11snorm"
js_GPUTextureFormatAstc4x4Unorm :: JSString
js_GPUTextureFormatAstc4x4Unorm = "astc-4x4-unorm"
js_GPUTextureFormatAstc4x4UnormSrgb :: JSString
js_GPUTextureFormatAstc4x4UnormSrgb = "astc-4x4-unorm-srgb"
js_GPUTextureFormatAstc5x4Unorm :: JSString
js_GPUTextureFormatAstc5x4Unorm = "astc-5x4-unorm"
js_GPUTextureFormatAstc5x4UnormSrgb :: JSString
js_GPUTextureFormatAstc5x4UnormSrgb = "astc-5x4-unorm-srgb"
js_GPUTextureFormatAstc5x5Unorm :: JSString
js_GPUTextureFormatAstc5x5Unorm = "astc-5x5-unorm"
js_GPUTextureFormatAstc5x5UnormSrgb :: JSString
js_GPUTextureFormatAstc5x5UnormSrgb = "astc-5x5-unorm-srgb"
js_GPUTextureFormatAstc6x5Unorm :: JSString
js_GPUTextureFormatAstc6x5Unorm = "astc-6x5-unorm"
js_GPUTextureFormatAstc6x5UnormSrgb :: JSString
js_GPUTextureFormatAstc6x5UnormSrgb = "astc-6x5-unorm-srgb"
js_GPUTextureFormatAstc6x6Unorm :: JSString
js_GPUTextureFormatAstc6x6Unorm = "astc-6x6-unorm"
js_GPUTextureFormatAstc6x6UnormSrgb :: JSString
js_GPUTextureFormatAstc6x6UnormSrgb = "astc-6x6-unorm-srgb"
js_GPUTextureFormatAstc8x5Unorm :: JSString
js_GPUTextureFormatAstc8x5Unorm = "astc-8x5-unorm"
js_GPUTextureFormatAstc8x5UnormSrgb :: JSString
js_GPUTextureFormatAstc8x5UnormSrgb = "astc-8x5-unorm-srgb"
js_GPUTextureFormatAstc8x6Unorm :: JSString
js_GPUTextureFormatAstc8x6Unorm = "astc-8x6-unorm"
js_GPUTextureFormatAstc8x6UnormSrgb :: JSString
js_GPUTextureFormatAstc8x6UnormSrgb = "astc-8x6-unorm-srgb"
js_GPUTextureFormatAstc8x8Unorm :: JSString
js_GPUTextureFormatAstc8x8Unorm = "astc-8x8-unorm"
js_GPUTextureFormatAstc8x8UnormSrgb :: JSString
js_GPUTextureFormatAstc8x8UnormSrgb = "astc-8x8-unorm-srgb"
js_GPUTextureFormatAstc10x5Unorm :: JSString
js_GPUTextureFormatAstc10x5Unorm = "astc-10x5-unorm"
js_GPUTextureFormatAstc10x5UnormSrgb :: JSString
js_GPUTextureFormatAstc10x5UnormSrgb = "astc-10x5-unorm-srgb"
js_GPUTextureFormatAstc10x6Unorm :: JSString
js_GPUTextureFormatAstc10x6Unorm = "astc-10x6-unorm"
js_GPUTextureFormatAstc10x6UnormSrgb :: JSString
js_GPUTextureFormatAstc10x6UnormSrgb = "astc-10x6-unorm-srgb"
js_GPUTextureFormatAstc10x8Unorm :: JSString
js_GPUTextureFormatAstc10x8Unorm = "astc-10x8-unorm"
js_GPUTextureFormatAstc10x8UnormSrgb :: JSString
js_GPUTextureFormatAstc10x8UnormSrgb = "astc-10x8-unorm-srgb"
js_GPUTextureFormatAstc10x10Unorm :: JSString
js_GPUTextureFormatAstc10x10Unorm = "astc-10x10-unorm"
js_GPUTextureFormatAstc10x10UnormSrgb :: JSString
js_GPUTextureFormatAstc10x10UnormSrgb = "astc-10x10-unorm-srgb"
js_GPUTextureFormatAstc12x10Unorm :: JSString
js_GPUTextureFormatAstc12x10Unorm = "astc-12x10-unorm"
js_GPUTextureFormatAstc12x10UnormSrgb :: JSString
js_GPUTextureFormatAstc12x10UnormSrgb = "astc-12x10-unorm-srgb"
js_GPUTextureFormatAstc12x12Unorm :: JSString
js_GPUTextureFormatAstc12x12Unorm = "astc-12x12-unorm"
js_GPUTextureFormatAstc12x12UnormSrgb :: JSString
js_GPUTextureFormatAstc12x12UnormSrgb = "astc-12x12-unorm-srgb"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUTextureSampleType> (webgpu)
data GPUTextureSampleType = GPUTextureSampleTypeFloat
| GPUTextureSampleTypeUnfilterableFloat
| GPUTextureSampleTypeDepth
| GPUTextureSampleTypeSint
| GPUTextureSampleTypeUint
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUTextureSampleType where
toJSVal x = toJSVal (case x of
GPUTextureSampleTypeFloat -> js_GPUTextureSampleTypeFloat
GPUTextureSampleTypeUnfilterableFloat -> js_GPUTextureSampleTypeUnfilterableFloat
GPUTextureSampleTypeDepth -> js_GPUTextureSampleTypeDepth
GPUTextureSampleTypeSint -> js_GPUTextureSampleTypeSint
GPUTextureSampleTypeUint -> js_GPUTextureSampleTypeUint
)
instance FromJSVal GPUTextureSampleType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUTextureSampleTypeFloat, GPUTextureSampleTypeFloat), (js_GPUTextureSampleTypeUnfilterableFloat, GPUTextureSampleTypeUnfilterableFloat), (js_GPUTextureSampleTypeDepth, GPUTextureSampleTypeDepth), (js_GPUTextureSampleTypeSint, GPUTextureSampleTypeSint), (js_GPUTextureSampleTypeUint, GPUTextureSampleTypeUint)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUTextureSampleType value") P.return
js_GPUTextureSampleTypeFloat :: JSString
js_GPUTextureSampleTypeFloat = "float"
js_GPUTextureSampleTypeUnfilterableFloat :: JSString
js_GPUTextureSampleTypeUnfilterableFloat = "unfilterable-float"
js_GPUTextureSampleTypeDepth :: JSString
js_GPUTextureSampleTypeDepth = "depth"
js_GPUTextureSampleTypeSint :: JSString
js_GPUTextureSampleTypeSint = "sint"
js_GPUTextureSampleTypeUint :: JSString
js_GPUTextureSampleTypeUint = "uint"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUTextureViewDimension> (webgpu)
data GPUTextureViewDimension = GPUTextureViewDimension1d
| GPUTextureViewDimension2d
| GPUTextureViewDimension2dArray
| GPUTextureViewDimensionCube
| GPUTextureViewDimensionCubeArray
| GPUTextureViewDimension3d
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUTextureViewDimension where
toJSVal x = toJSVal (case x of
GPUTextureViewDimension1d -> js_GPUTextureViewDimension1d
GPUTextureViewDimension2d -> js_GPUTextureViewDimension2d
GPUTextureViewDimension2dArray -> js_GPUTextureViewDimension2dArray
GPUTextureViewDimensionCube -> js_GPUTextureViewDimensionCube
GPUTextureViewDimensionCubeArray -> js_GPUTextureViewDimensionCubeArray
GPUTextureViewDimension3d -> js_GPUTextureViewDimension3d
)
instance FromJSVal GPUTextureViewDimension where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUTextureViewDimension1d, GPUTextureViewDimension1d), (js_GPUTextureViewDimension2d, GPUTextureViewDimension2d), (js_GPUTextureViewDimension2dArray, GPUTextureViewDimension2dArray), (js_GPUTextureViewDimensionCube, GPUTextureViewDimensionCube), (js_GPUTextureViewDimensionCubeArray, GPUTextureViewDimensionCubeArray), (js_GPUTextureViewDimension3d, GPUTextureViewDimension3d)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUTextureViewDimension value") P.return
js_GPUTextureViewDimension1d :: JSString
js_GPUTextureViewDimension1d = "1d"
js_GPUTextureViewDimension2d :: JSString
js_GPUTextureViewDimension2d = "2d"
js_GPUTextureViewDimension2dArray :: JSString
js_GPUTextureViewDimension2dArray = "2d-array"
js_GPUTextureViewDimensionCube :: JSString
js_GPUTextureViewDimensionCube = "cube"
js_GPUTextureViewDimensionCubeArray :: JSString
js_GPUTextureViewDimensionCubeArray = "cube-array"
js_GPUTextureViewDimension3d :: JSString
js_GPUTextureViewDimension3d = "3d"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUVertexFormat> (webgpu)
data GPUVertexFormat = GPUVertexFormatUint8
| GPUVertexFormatUint8x2
| GPUVertexFormatUint8x4
| GPUVertexFormatSint8
| GPUVertexFormatSint8x2
| GPUVertexFormatSint8x4
| GPUVertexFormatUnorm8
| GPUVertexFormatUnorm8x2
| GPUVertexFormatUnorm8x4
| GPUVertexFormatSnorm8
| GPUVertexFormatSnorm8x2
| GPUVertexFormatSnorm8x4
| GPUVertexFormatUint16
| GPUVertexFormatUint16x2
| GPUVertexFormatUint16x4
| GPUVertexFormatSint16
| GPUVertexFormatSint16x2
| GPUVertexFormatSint16x4
| GPUVertexFormatUnorm16
| GPUVertexFormatUnorm16x2
| GPUVertexFormatUnorm16x4
| GPUVertexFormatSnorm16
| GPUVertexFormatSnorm16x2
| GPUVertexFormatSnorm16x4
| GPUVertexFormatFloat16
| GPUVertexFormatFloat16x2
| GPUVertexFormatFloat16x4
| GPUVertexFormatFloat32
| GPUVertexFormatFloat32x2
| GPUVertexFormatFloat32x3
| GPUVertexFormatFloat32x4
| GPUVertexFormatUint32
| GPUVertexFormatUint32x2
| GPUVertexFormatUint32x3
| GPUVertexFormatUint32x4
| GPUVertexFormatSint32
| GPUVertexFormatSint32x2
| GPUVertexFormatSint32x3
| GPUVertexFormatSint32x4
| GPUVertexFormatUnorm1010102
| GPUVertexFormatUnorm8x4Bgra
| GPUVertexFormatSnorm1010102
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUVertexFormat where
toJSVal x = toJSVal (case x of
GPUVertexFormatUint8 -> js_GPUVertexFormatUint8
GPUVertexFormatUint8x2 -> js_GPUVertexFormatUint8x2
GPUVertexFormatUint8x4 -> js_GPUVertexFormatUint8x4
GPUVertexFormatSint8 -> js_GPUVertexFormatSint8
GPUVertexFormatSint8x2 -> js_GPUVertexFormatSint8x2
GPUVertexFormatSint8x4 -> js_GPUVertexFormatSint8x4
GPUVertexFormatUnorm8 -> js_GPUVertexFormatUnorm8
GPUVertexFormatUnorm8x2 -> js_GPUVertexFormatUnorm8x2
GPUVertexFormatUnorm8x4 -> js_GPUVertexFormatUnorm8x4
GPUVertexFormatSnorm8 -> js_GPUVertexFormatSnorm8
GPUVertexFormatSnorm8x2 -> js_GPUVertexFormatSnorm8x2
GPUVertexFormatSnorm8x4 -> js_GPUVertexFormatSnorm8x4
GPUVertexFormatUint16 -> js_GPUVertexFormatUint16
GPUVertexFormatUint16x2 -> js_GPUVertexFormatUint16x2
GPUVertexFormatUint16x4 -> js_GPUVertexFormatUint16x4
GPUVertexFormatSint16 -> js_GPUVertexFormatSint16
GPUVertexFormatSint16x2 -> js_GPUVertexFormatSint16x2
GPUVertexFormatSint16x4 -> js_GPUVertexFormatSint16x4
GPUVertexFormatUnorm16 -> js_GPUVertexFormatUnorm16
GPUVertexFormatUnorm16x2 -> js_GPUVertexFormatUnorm16x2
GPUVertexFormatUnorm16x4 -> js_GPUVertexFormatUnorm16x4
GPUVertexFormatSnorm16 -> js_GPUVertexFormatSnorm16
GPUVertexFormatSnorm16x2 -> js_GPUVertexFormatSnorm16x2
GPUVertexFormatSnorm16x4 -> js_GPUVertexFormatSnorm16x4
GPUVertexFormatFloat16 -> js_GPUVertexFormatFloat16
GPUVertexFormatFloat16x2 -> js_GPUVertexFormatFloat16x2
GPUVertexFormatFloat16x4 -> js_GPUVertexFormatFloat16x4
GPUVertexFormatFloat32 -> js_GPUVertexFormatFloat32
GPUVertexFormatFloat32x2 -> js_GPUVertexFormatFloat32x2
GPUVertexFormatFloat32x3 -> js_GPUVertexFormatFloat32x3
GPUVertexFormatFloat32x4 -> js_GPUVertexFormatFloat32x4
GPUVertexFormatUint32 -> js_GPUVertexFormatUint32
GPUVertexFormatUint32x2 -> js_GPUVertexFormatUint32x2
GPUVertexFormatUint32x3 -> js_GPUVertexFormatUint32x3
GPUVertexFormatUint32x4 -> js_GPUVertexFormatUint32x4
GPUVertexFormatSint32 -> js_GPUVertexFormatSint32
GPUVertexFormatSint32x2 -> js_GPUVertexFormatSint32x2
GPUVertexFormatSint32x3 -> js_GPUVertexFormatSint32x3
GPUVertexFormatSint32x4 -> js_GPUVertexFormatSint32x4
GPUVertexFormatUnorm1010102 -> js_GPUVertexFormatUnorm1010102
GPUVertexFormatUnorm8x4Bgra -> js_GPUVertexFormatUnorm8x4Bgra
GPUVertexFormatSnorm1010102 -> js_GPUVertexFormatSnorm1010102
)
instance FromJSVal GPUVertexFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUVertexFormatUint8, GPUVertexFormatUint8), (js_GPUVertexFormatUint8x2, GPUVertexFormatUint8x2), (js_GPUVertexFormatUint8x4, GPUVertexFormatUint8x4), (js_GPUVertexFormatSint8, GPUVertexFormatSint8), (js_GPUVertexFormatSint8x2, GPUVertexFormatSint8x2), (js_GPUVertexFormatSint8x4, GPUVertexFormatSint8x4), (js_GPUVertexFormatUnorm8, GPUVertexFormatUnorm8), (js_GPUVertexFormatUnorm8x2, GPUVertexFormatUnorm8x2), (js_GPUVertexFormatUnorm8x4, GPUVertexFormatUnorm8x4), (js_GPUVertexFormatSnorm8, GPUVertexFormatSnorm8), (js_GPUVertexFormatSnorm8x2, GPUVertexFormatSnorm8x2), (js_GPUVertexFormatSnorm8x4, GPUVertexFormatSnorm8x4), (js_GPUVertexFormatUint16, GPUVertexFormatUint16), (js_GPUVertexFormatUint16x2, GPUVertexFormatUint16x2), (js_GPUVertexFormatUint16x4, GPUVertexFormatUint16x4), (js_GPUVertexFormatSint16, GPUVertexFormatSint16), (js_GPUVertexFormatSint16x2, GPUVertexFormatSint16x2), (js_GPUVertexFormatSint16x4, GPUVertexFormatSint16x4), (js_GPUVertexFormatUnorm16, GPUVertexFormatUnorm16), (js_GPUVertexFormatUnorm16x2, GPUVertexFormatUnorm16x2), (js_GPUVertexFormatUnorm16x4, GPUVertexFormatUnorm16x4), (js_GPUVertexFormatSnorm16, GPUVertexFormatSnorm16), (js_GPUVertexFormatSnorm16x2, GPUVertexFormatSnorm16x2), (js_GPUVertexFormatSnorm16x4, GPUVertexFormatSnorm16x4), (js_GPUVertexFormatFloat16, GPUVertexFormatFloat16), (js_GPUVertexFormatFloat16x2, GPUVertexFormatFloat16x2), (js_GPUVertexFormatFloat16x4, GPUVertexFormatFloat16x4), (js_GPUVertexFormatFloat32, GPUVertexFormatFloat32), (js_GPUVertexFormatFloat32x2, GPUVertexFormatFloat32x2), (js_GPUVertexFormatFloat32x3, GPUVertexFormatFloat32x3), (js_GPUVertexFormatFloat32x4, GPUVertexFormatFloat32x4), (js_GPUVertexFormatUint32, GPUVertexFormatUint32), (js_GPUVertexFormatUint32x2, GPUVertexFormatUint32x2), (js_GPUVertexFormatUint32x3, GPUVertexFormatUint32x3), (js_GPUVertexFormatUint32x4, GPUVertexFormatUint32x4), (js_GPUVertexFormatSint32, GPUVertexFormatSint32), (js_GPUVertexFormatSint32x2, GPUVertexFormatSint32x2), (js_GPUVertexFormatSint32x3, GPUVertexFormatSint32x3), (js_GPUVertexFormatSint32x4, GPUVertexFormatSint32x4), (js_GPUVertexFormatUnorm1010102, GPUVertexFormatUnorm1010102), (js_GPUVertexFormatUnorm8x4Bgra, GPUVertexFormatUnorm8x4Bgra), (js_GPUVertexFormatSnorm1010102, GPUVertexFormatSnorm1010102)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUVertexFormat value") P.return
js_GPUVertexFormatUint8 :: JSString
js_GPUVertexFormatUint8 = "uint8"
js_GPUVertexFormatUint8x2 :: JSString
js_GPUVertexFormatUint8x2 = "uint8x2"
js_GPUVertexFormatUint8x4 :: JSString
js_GPUVertexFormatUint8x4 = "uint8x4"
js_GPUVertexFormatSint8 :: JSString
js_GPUVertexFormatSint8 = "sint8"
js_GPUVertexFormatSint8x2 :: JSString
js_GPUVertexFormatSint8x2 = "sint8x2"
js_GPUVertexFormatSint8x4 :: JSString
js_GPUVertexFormatSint8x4 = "sint8x4"
js_GPUVertexFormatUnorm8 :: JSString
js_GPUVertexFormatUnorm8 = "unorm8"
js_GPUVertexFormatUnorm8x2 :: JSString
js_GPUVertexFormatUnorm8x2 = "unorm8x2"
js_GPUVertexFormatUnorm8x4 :: JSString
js_GPUVertexFormatUnorm8x4 = "unorm8x4"
js_GPUVertexFormatSnorm8 :: JSString
js_GPUVertexFormatSnorm8 = "snorm8"
js_GPUVertexFormatSnorm8x2 :: JSString
js_GPUVertexFormatSnorm8x2 = "snorm8x2"
js_GPUVertexFormatSnorm8x4 :: JSString
js_GPUVertexFormatSnorm8x4 = "snorm8x4"
js_GPUVertexFormatUint16 :: JSString
js_GPUVertexFormatUint16 = "uint16"
js_GPUVertexFormatUint16x2 :: JSString
js_GPUVertexFormatUint16x2 = "uint16x2"
js_GPUVertexFormatUint16x4 :: JSString
js_GPUVertexFormatUint16x4 = "uint16x4"
js_GPUVertexFormatSint16 :: JSString
js_GPUVertexFormatSint16 = "sint16"
js_GPUVertexFormatSint16x2 :: JSString
js_GPUVertexFormatSint16x2 = "sint16x2"
js_GPUVertexFormatSint16x4 :: JSString
js_GPUVertexFormatSint16x4 = "sint16x4"
js_GPUVertexFormatUnorm16 :: JSString
js_GPUVertexFormatUnorm16 = "unorm16"
js_GPUVertexFormatUnorm16x2 :: JSString
js_GPUVertexFormatUnorm16x2 = "unorm16x2"
js_GPUVertexFormatUnorm16x4 :: JSString
js_GPUVertexFormatUnorm16x4 = "unorm16x4"
js_GPUVertexFormatSnorm16 :: JSString
js_GPUVertexFormatSnorm16 = "snorm16"
js_GPUVertexFormatSnorm16x2 :: JSString
js_GPUVertexFormatSnorm16x2 = "snorm16x2"
js_GPUVertexFormatSnorm16x4 :: JSString
js_GPUVertexFormatSnorm16x4 = "snorm16x4"
js_GPUVertexFormatFloat16 :: JSString
js_GPUVertexFormatFloat16 = "float16"
js_GPUVertexFormatFloat16x2 :: JSString
js_GPUVertexFormatFloat16x2 = "float16x2"
js_GPUVertexFormatFloat16x4 :: JSString
js_GPUVertexFormatFloat16x4 = "float16x4"
js_GPUVertexFormatFloat32 :: JSString
js_GPUVertexFormatFloat32 = "float32"
js_GPUVertexFormatFloat32x2 :: JSString
js_GPUVertexFormatFloat32x2 = "float32x2"
js_GPUVertexFormatFloat32x3 :: JSString
js_GPUVertexFormatFloat32x3 = "float32x3"
js_GPUVertexFormatFloat32x4 :: JSString
js_GPUVertexFormatFloat32x4 = "float32x4"
js_GPUVertexFormatUint32 :: JSString
js_GPUVertexFormatUint32 = "uint32"
js_GPUVertexFormatUint32x2 :: JSString
js_GPUVertexFormatUint32x2 = "uint32x2"
js_GPUVertexFormatUint32x3 :: JSString
js_GPUVertexFormatUint32x3 = "uint32x3"
js_GPUVertexFormatUint32x4 :: JSString
js_GPUVertexFormatUint32x4 = "uint32x4"
js_GPUVertexFormatSint32 :: JSString
js_GPUVertexFormatSint32 = "sint32"
js_GPUVertexFormatSint32x2 :: JSString
js_GPUVertexFormatSint32x2 = "sint32x2"
js_GPUVertexFormatSint32x3 :: JSString
js_GPUVertexFormatSint32x3 = "sint32x3"
js_GPUVertexFormatSint32x4 :: JSString
js_GPUVertexFormatSint32x4 = "sint32x4"
js_GPUVertexFormatUnorm1010102 :: JSString
js_GPUVertexFormatUnorm1010102 = "unorm10-10-10-2"
js_GPUVertexFormatUnorm8x4Bgra :: JSString
js_GPUVertexFormatUnorm8x4Bgra = "unorm8x4-bgra"
js_GPUVertexFormatSnorm1010102 :: JSString
js_GPUVertexFormatSnorm1010102 = "snorm10-10-10-2"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GPUVertexStepMode> (webgpu)
data GPUVertexStepMode = GPUVertexStepModeVertex
| GPUVertexStepModeInstance
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GPUVertexStepMode where
toJSVal x = toJSVal (case x of
GPUVertexStepModeVertex -> js_GPUVertexStepModeVertex
GPUVertexStepModeInstance -> js_GPUVertexStepModeInstance
)
instance FromJSVal GPUVertexStepMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GPUVertexStepModeVertex, GPUVertexStepModeVertex), (js_GPUVertexStepModeInstance, GPUVertexStepModeInstance)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GPUVertexStepMode value") P.return
js_GPUVertexStepModeVertex :: JSString
js_GPUVertexStepModeVertex = "vertex"
js_GPUVertexStepModeInstance :: JSString
js_GPUVertexStepModeInstance = "instance"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GamepadHapticEffectType> (gamepad)
data GamepadHapticEffectType = GamepadHapticEffectTypeDualRumble
| GamepadHapticEffectTypeTriggerRumble
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GamepadHapticEffectType where
toJSVal x = toJSVal (case x of
GamepadHapticEffectTypeDualRumble -> js_GamepadHapticEffectTypeDualRumble
GamepadHapticEffectTypeTriggerRumble -> js_GamepadHapticEffectTypeTriggerRumble
)
instance FromJSVal GamepadHapticEffectType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GamepadHapticEffectTypeDualRumble, GamepadHapticEffectTypeDualRumble), (js_GamepadHapticEffectTypeTriggerRumble, GamepadHapticEffectTypeTriggerRumble)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GamepadHapticEffectType value") P.return
js_GamepadHapticEffectTypeDualRumble :: JSString
js_GamepadHapticEffectTypeDualRumble = "dual-rumble"
js_GamepadHapticEffectTypeTriggerRumble :: JSString
js_GamepadHapticEffectTypeTriggerRumble = "trigger-rumble"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GamepadHapticsResult> (gamepad)
data GamepadHapticsResult = GamepadHapticsResultComplete
| GamepadHapticsResultPreempted
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GamepadHapticsResult where
toJSVal x = toJSVal (case x of
GamepadHapticsResultComplete -> js_GamepadHapticsResultComplete
GamepadHapticsResultPreempted -> js_GamepadHapticsResultPreempted
)
instance FromJSVal GamepadHapticsResult where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GamepadHapticsResultComplete, GamepadHapticsResultComplete), (js_GamepadHapticsResultPreempted, GamepadHapticsResultPreempted)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GamepadHapticsResult value") P.return
js_GamepadHapticsResultComplete :: JSString
js_GamepadHapticsResultComplete = "complete"
js_GamepadHapticsResultPreempted :: JSString
js_GamepadHapticsResultPreempted = "preempted"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GamepadMappingType> (gamepad)
data GamepadMappingType = GamepadMappingType
| GamepadMappingTypeStandard
| GamepadMappingTypeXrStandard
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GamepadMappingType where
toJSVal x = toJSVal (case x of
GamepadMappingType -> js_GamepadMappingType
GamepadMappingTypeStandard -> js_GamepadMappingTypeStandard
GamepadMappingTypeXrStandard -> js_GamepadMappingTypeXrStandard
)
instance FromJSVal GamepadMappingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GamepadMappingType, GamepadMappingType), (js_GamepadMappingTypeStandard, GamepadMappingTypeStandard), (js_GamepadMappingTypeXrStandard, GamepadMappingTypeXrStandard)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GamepadMappingType value") P.return
js_GamepadMappingType :: JSString
js_GamepadMappingType = ""
js_GamepadMappingTypeStandard :: JSString
js_GamepadMappingTypeStandard = "standard"
js_GamepadMappingTypeXrStandard :: JSString
js_GamepadMappingTypeXrStandard = "xr-standard"
-- | <https://developer.mozilla.org/en-US/docs/Web/API GetUserMediaSemantics> (mediacapture-extensions)
data GetUserMediaSemantics = GetUserMediaSemanticsBrowserChooses
| GetUserMediaSemanticsUserChooses
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal GetUserMediaSemantics where
toJSVal x = toJSVal (case x of
GetUserMediaSemanticsBrowserChooses -> js_GetUserMediaSemanticsBrowserChooses
GetUserMediaSemanticsUserChooses -> js_GetUserMediaSemanticsUserChooses
)
instance FromJSVal GetUserMediaSemantics where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_GetUserMediaSemanticsBrowserChooses, GetUserMediaSemanticsBrowserChooses), (js_GetUserMediaSemanticsUserChooses, GetUserMediaSemanticsUserChooses)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected GetUserMediaSemantics value") P.return
js_GetUserMediaSemanticsBrowserChooses :: JSString
js_GetUserMediaSemanticsBrowserChooses = "browser-chooses"
js_GetUserMediaSemanticsUserChooses :: JSString
js_GetUserMediaSemanticsUserChooses = "user-chooses"
-- | <https://developer.mozilla.org/en-US/docs/Web/API HardwareAcceleration> (webcodecs)
data HardwareAcceleration = HardwareAccelerationNoPreference
| HardwareAccelerationPreferHardware
| HardwareAccelerationPreferSoftware
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal HardwareAcceleration where
toJSVal x = toJSVal (case x of
HardwareAccelerationNoPreference -> js_HardwareAccelerationNoPreference
HardwareAccelerationPreferHardware -> js_HardwareAccelerationPreferHardware
HardwareAccelerationPreferSoftware -> js_HardwareAccelerationPreferSoftware
)
instance FromJSVal HardwareAcceleration where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_HardwareAccelerationNoPreference, HardwareAccelerationNoPreference), (js_HardwareAccelerationPreferHardware, HardwareAccelerationPreferHardware), (js_HardwareAccelerationPreferSoftware, HardwareAccelerationPreferSoftware)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected HardwareAcceleration value") P.return
js_HardwareAccelerationNoPreference :: JSString
js_HardwareAccelerationNoPreference = "no-preference"
js_HardwareAccelerationPreferHardware :: JSString
js_HardwareAccelerationPreferHardware = "prefer-hardware"
js_HardwareAccelerationPreferSoftware :: JSString
js_HardwareAccelerationPreferSoftware = "prefer-software"
-- | <https://developer.mozilla.org/en-US/docs/Web/API HdrMetadataType> (media-capabilities)
data HdrMetadataType = HdrMetadataTypeSmpteSt2086
| HdrMetadataTypeSmpteSt209410
| HdrMetadataTypeSmpteSt209440
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal HdrMetadataType where
toJSVal x = toJSVal (case x of
HdrMetadataTypeSmpteSt2086 -> js_HdrMetadataTypeSmpteSt2086
HdrMetadataTypeSmpteSt209410 -> js_HdrMetadataTypeSmpteSt209410
HdrMetadataTypeSmpteSt209440 -> js_HdrMetadataTypeSmpteSt209440
)
instance FromJSVal HdrMetadataType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_HdrMetadataTypeSmpteSt2086, HdrMetadataTypeSmpteSt2086), (js_HdrMetadataTypeSmpteSt209410, HdrMetadataTypeSmpteSt209410), (js_HdrMetadataTypeSmpteSt209440, HdrMetadataTypeSmpteSt209440)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected HdrMetadataType value") P.return
js_HdrMetadataTypeSmpteSt2086 :: JSString
js_HdrMetadataTypeSmpteSt2086 = "smpteSt2086"
js_HdrMetadataTypeSmpteSt209410 :: JSString
js_HdrMetadataTypeSmpteSt209410 = "smpteSt2094-10"
js_HdrMetadataTypeSmpteSt209440 :: JSString
js_HdrMetadataTypeSmpteSt209440 = "smpteSt2094-40"
-- | <https://developer.mozilla.org/en-US/docs/Web/API HevcBitstreamFormat> (webcodecs-hevc-codec-registration)
data HevcBitstreamFormat = HevcBitstreamFormatAnnexb
| HevcBitstreamFormatHevc
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal HevcBitstreamFormat where
toJSVal x = toJSVal (case x of
HevcBitstreamFormatAnnexb -> js_HevcBitstreamFormatAnnexb
HevcBitstreamFormatHevc -> js_HevcBitstreamFormatHevc
)
instance FromJSVal HevcBitstreamFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_HevcBitstreamFormatAnnexb, HevcBitstreamFormatAnnexb), (js_HevcBitstreamFormatHevc, HevcBitstreamFormatHevc)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected HevcBitstreamFormat value") P.return
js_HevcBitstreamFormatAnnexb :: JSString
js_HevcBitstreamFormatAnnexb = "annexb"
js_HevcBitstreamFormatHevc :: JSString
js_HevcBitstreamFormatHevc = "hevc"
-- | <https://developer.mozilla.org/en-US/docs/Web/API HighlightType> (css-highlight-api-1)
data HighlightType = HighlightTypeHighlight
| HighlightTypeSpellingError
| HighlightTypeGrammarError
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal HighlightType where
toJSVal x = toJSVal (case x of
HighlightTypeHighlight -> js_HighlightTypeHighlight
HighlightTypeSpellingError -> js_HighlightTypeSpellingError
HighlightTypeGrammarError -> js_HighlightTypeGrammarError
)
instance FromJSVal HighlightType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_HighlightTypeHighlight, HighlightTypeHighlight), (js_HighlightTypeSpellingError, HighlightTypeSpellingError), (js_HighlightTypeGrammarError, HighlightTypeGrammarError)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected HighlightType value") P.return
js_HighlightTypeHighlight :: JSString
js_HighlightTypeHighlight = "highlight"
js_HighlightTypeSpellingError :: JSString
js_HighlightTypeSpellingError = "spelling-error"
js_HighlightTypeGrammarError :: JSString
js_HighlightTypeGrammarError = "grammar-error"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IDBCursorDirection> (IndexedDB-3)
data IDBCursorDirection = IDBCursorDirectionNext
| IDBCursorDirectionNextunique
| IDBCursorDirectionPrev
| IDBCursorDirectionPrevunique
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IDBCursorDirection where
toJSVal x = toJSVal (case x of
IDBCursorDirectionNext -> js_IDBCursorDirectionNext
IDBCursorDirectionNextunique -> js_IDBCursorDirectionNextunique
IDBCursorDirectionPrev -> js_IDBCursorDirectionPrev
IDBCursorDirectionPrevunique -> js_IDBCursorDirectionPrevunique
)
instance FromJSVal IDBCursorDirection where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IDBCursorDirectionNext, IDBCursorDirectionNext), (js_IDBCursorDirectionNextunique, IDBCursorDirectionNextunique), (js_IDBCursorDirectionPrev, IDBCursorDirectionPrev), (js_IDBCursorDirectionPrevunique, IDBCursorDirectionPrevunique)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IDBCursorDirection value") P.return
js_IDBCursorDirectionNext :: JSString
js_IDBCursorDirectionNext = "next"
js_IDBCursorDirectionNextunique :: JSString
js_IDBCursorDirectionNextunique = "nextunique"
js_IDBCursorDirectionPrev :: JSString
js_IDBCursorDirectionPrev = "prev"
js_IDBCursorDirectionPrevunique :: JSString
js_IDBCursorDirectionPrevunique = "prevunique"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IDBRequestReadyState> (IndexedDB-3)
data IDBRequestReadyState = IDBRequestReadyStatePending
| IDBRequestReadyStateDone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IDBRequestReadyState where
toJSVal x = toJSVal (case x of
IDBRequestReadyStatePending -> js_IDBRequestReadyStatePending
IDBRequestReadyStateDone -> js_IDBRequestReadyStateDone
)
instance FromJSVal IDBRequestReadyState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IDBRequestReadyStatePending, IDBRequestReadyStatePending), (js_IDBRequestReadyStateDone, IDBRequestReadyStateDone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IDBRequestReadyState value") P.return
js_IDBRequestReadyStatePending :: JSString
js_IDBRequestReadyStatePending = "pending"
js_IDBRequestReadyStateDone :: JSString
js_IDBRequestReadyStateDone = "done"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IDBTransactionDurability> (IndexedDB-3)
data IDBTransactionDurability = IDBTransactionDurabilityDefault
| IDBTransactionDurabilityStrict
| IDBTransactionDurabilityRelaxed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IDBTransactionDurability where
toJSVal x = toJSVal (case x of
IDBTransactionDurabilityDefault -> js_IDBTransactionDurabilityDefault
IDBTransactionDurabilityStrict -> js_IDBTransactionDurabilityStrict
IDBTransactionDurabilityRelaxed -> js_IDBTransactionDurabilityRelaxed
)
instance FromJSVal IDBTransactionDurability where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IDBTransactionDurabilityDefault, IDBTransactionDurabilityDefault), (js_IDBTransactionDurabilityStrict, IDBTransactionDurabilityStrict), (js_IDBTransactionDurabilityRelaxed, IDBTransactionDurabilityRelaxed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IDBTransactionDurability value") P.return
js_IDBTransactionDurabilityDefault :: JSString
js_IDBTransactionDurabilityDefault = "default"
js_IDBTransactionDurabilityStrict :: JSString
js_IDBTransactionDurabilityStrict = "strict"
js_IDBTransactionDurabilityRelaxed :: JSString
js_IDBTransactionDurabilityRelaxed = "relaxed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IDBTransactionMode> (IndexedDB-3)
data IDBTransactionMode = IDBTransactionModeReadonly
| IDBTransactionModeReadwrite
| IDBTransactionModeVersionchange
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IDBTransactionMode where
toJSVal x = toJSVal (case x of
IDBTransactionModeReadonly -> js_IDBTransactionModeReadonly
IDBTransactionModeReadwrite -> js_IDBTransactionModeReadwrite
IDBTransactionModeVersionchange -> js_IDBTransactionModeVersionchange
)
instance FromJSVal IDBTransactionMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IDBTransactionModeReadonly, IDBTransactionModeReadonly), (js_IDBTransactionModeReadwrite, IDBTransactionModeReadwrite), (js_IDBTransactionModeVersionchange, IDBTransactionModeVersionchange)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IDBTransactionMode value") P.return
js_IDBTransactionModeReadonly :: JSString
js_IDBTransactionModeReadonly = "readonly"
js_IDBTransactionModeReadwrite :: JSString
js_IDBTransactionModeReadwrite = "readwrite"
js_IDBTransactionModeVersionchange :: JSString
js_IDBTransactionModeVersionchange = "versionchange"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IPAddressSpace> (local-network-access)
data IPAddressSpace = IPAddressSpacePublic
| IPAddressSpaceLocal
| IPAddressSpaceLoopback
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IPAddressSpace where
toJSVal x = toJSVal (case x of
IPAddressSpacePublic -> js_IPAddressSpacePublic
IPAddressSpaceLocal -> js_IPAddressSpaceLocal
IPAddressSpaceLoopback -> js_IPAddressSpaceLoopback
)
instance FromJSVal IPAddressSpace where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IPAddressSpacePublic, IPAddressSpacePublic), (js_IPAddressSpaceLocal, IPAddressSpaceLocal), (js_IPAddressSpaceLoopback, IPAddressSpaceLoopback)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IPAddressSpace value") P.return
js_IPAddressSpacePublic :: JSString
js_IPAddressSpacePublic = "public"
js_IPAddressSpaceLocal :: JSString
js_IPAddressSpaceLocal = "local"
js_IPAddressSpaceLoopback :: JSString
js_IPAddressSpaceLoopback = "loopback"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IdentityCredentialRequestOptionsContext> (fedcm-1)
data IdentityCredentialRequestOptionsContext = IdentityCredentialRequestOptionsContextSignin
| IdentityCredentialRequestOptionsContextSignup
| IdentityCredentialRequestOptionsContextUse
| IdentityCredentialRequestOptionsContextContinue
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IdentityCredentialRequestOptionsContext where
toJSVal x = toJSVal (case x of
IdentityCredentialRequestOptionsContextSignin -> js_IdentityCredentialRequestOptionsContextSignin
IdentityCredentialRequestOptionsContextSignup -> js_IdentityCredentialRequestOptionsContextSignup
IdentityCredentialRequestOptionsContextUse -> js_IdentityCredentialRequestOptionsContextUse
IdentityCredentialRequestOptionsContextContinue -> js_IdentityCredentialRequestOptionsContextContinue
)
instance FromJSVal IdentityCredentialRequestOptionsContext where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IdentityCredentialRequestOptionsContextSignin, IdentityCredentialRequestOptionsContextSignin), (js_IdentityCredentialRequestOptionsContextSignup, IdentityCredentialRequestOptionsContextSignup), (js_IdentityCredentialRequestOptionsContextUse, IdentityCredentialRequestOptionsContextUse), (js_IdentityCredentialRequestOptionsContextContinue, IdentityCredentialRequestOptionsContextContinue)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IdentityCredentialRequestOptionsContext value") P.return
js_IdentityCredentialRequestOptionsContextSignin :: JSString
js_IdentityCredentialRequestOptionsContextSignin = "signin"
js_IdentityCredentialRequestOptionsContextSignup :: JSString
js_IdentityCredentialRequestOptionsContextSignup = "signup"
js_IdentityCredentialRequestOptionsContextUse :: JSString
js_IdentityCredentialRequestOptionsContextUse = "use"
js_IdentityCredentialRequestOptionsContextContinue :: JSString
js_IdentityCredentialRequestOptionsContextContinue = "continue"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IdentityCredentialRequestOptionsMode> (fedcm-1)
data IdentityCredentialRequestOptionsMode = IdentityCredentialRequestOptionsModeActive
| IdentityCredentialRequestOptionsModePassive
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IdentityCredentialRequestOptionsMode where
toJSVal x = toJSVal (case x of
IdentityCredentialRequestOptionsModeActive -> js_IdentityCredentialRequestOptionsModeActive
IdentityCredentialRequestOptionsModePassive -> js_IdentityCredentialRequestOptionsModePassive
)
instance FromJSVal IdentityCredentialRequestOptionsMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IdentityCredentialRequestOptionsModeActive, IdentityCredentialRequestOptionsModeActive), (js_IdentityCredentialRequestOptionsModePassive, IdentityCredentialRequestOptionsModePassive)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IdentityCredentialRequestOptionsMode value") P.return
js_IdentityCredentialRequestOptionsModeActive :: JSString
js_IdentityCredentialRequestOptionsModeActive = "active"
js_IdentityCredentialRequestOptionsModePassive :: JSString
js_IdentityCredentialRequestOptionsModePassive = "passive"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ImageDataPixelFormat> (html)
data ImageDataPixelFormat = ImageDataPixelFormatRgbaUnorm8
| ImageDataPixelFormatRgbaFloat16
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ImageDataPixelFormat where
toJSVal x = toJSVal (case x of
ImageDataPixelFormatRgbaUnorm8 -> js_ImageDataPixelFormatRgbaUnorm8
ImageDataPixelFormatRgbaFloat16 -> js_ImageDataPixelFormatRgbaFloat16
)
instance FromJSVal ImageDataPixelFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ImageDataPixelFormatRgbaUnorm8, ImageDataPixelFormatRgbaUnorm8), (js_ImageDataPixelFormatRgbaFloat16, ImageDataPixelFormatRgbaFloat16)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ImageDataPixelFormat value") P.return
js_ImageDataPixelFormatRgbaUnorm8 :: JSString
js_ImageDataPixelFormatRgbaUnorm8 = "rgba-unorm8"
js_ImageDataPixelFormatRgbaFloat16 :: JSString
js_ImageDataPixelFormatRgbaFloat16 = "rgba-float16"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ImageSmoothingQuality> (html)
data ImageSmoothingQuality = ImageSmoothingQualityLow
| ImageSmoothingQualityMedium
| ImageSmoothingQualityHigh
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ImageSmoothingQuality where
toJSVal x = toJSVal (case x of
ImageSmoothingQualityLow -> js_ImageSmoothingQualityLow
ImageSmoothingQualityMedium -> js_ImageSmoothingQualityMedium
ImageSmoothingQualityHigh -> js_ImageSmoothingQualityHigh
)
instance FromJSVal ImageSmoothingQuality where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ImageSmoothingQualityLow, ImageSmoothingQualityLow), (js_ImageSmoothingQualityMedium, ImageSmoothingQualityMedium), (js_ImageSmoothingQualityHigh, ImageSmoothingQualityHigh)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ImageSmoothingQuality value") P.return
js_ImageSmoothingQualityLow :: JSString
js_ImageSmoothingQualityLow = "low"
js_ImageSmoothingQualityMedium :: JSString
js_ImageSmoothingQualityMedium = "medium"
js_ImageSmoothingQualityHigh :: JSString
js_ImageSmoothingQualityHigh = "high"
-- | <https://developer.mozilla.org/en-US/docs/Web/API IterationCompositeOperation> (web-animations-2)
data IterationCompositeOperation = IterationCompositeOperationReplace
| IterationCompositeOperationAccumulate
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal IterationCompositeOperation where
toJSVal x = toJSVal (case x of
IterationCompositeOperationReplace -> js_IterationCompositeOperationReplace
IterationCompositeOperationAccumulate -> js_IterationCompositeOperationAccumulate
)
instance FromJSVal IterationCompositeOperation where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_IterationCompositeOperationReplace, IterationCompositeOperationReplace), (js_IterationCompositeOperationAccumulate, IterationCompositeOperationAccumulate)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected IterationCompositeOperation value") P.return
js_IterationCompositeOperationReplace :: JSString
js_IterationCompositeOperationReplace = "replace"
js_IterationCompositeOperationAccumulate :: JSString
js_IterationCompositeOperationAccumulate = "accumulate"
-- | <https://developer.mozilla.org/en-US/docs/Web/API KeyFormat> (webcrypto-modern-algos)
data KeyFormat = KeyFormatRawPublic
| KeyFormatRawPrivate
| KeyFormatRawSeed
| KeyFormatRawSecret
| KeyFormatRaw
| KeyFormatSpki
| KeyFormatPkcs8
| KeyFormatJwk
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal KeyFormat where
toJSVal x = toJSVal (case x of
KeyFormatRawPublic -> js_KeyFormatRawPublic
KeyFormatRawPrivate -> js_KeyFormatRawPrivate
KeyFormatRawSeed -> js_KeyFormatRawSeed
KeyFormatRawSecret -> js_KeyFormatRawSecret
KeyFormatRaw -> js_KeyFormatRaw
KeyFormatSpki -> js_KeyFormatSpki
KeyFormatPkcs8 -> js_KeyFormatPkcs8
KeyFormatJwk -> js_KeyFormatJwk
)
instance FromJSVal KeyFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_KeyFormatRawPublic, KeyFormatRawPublic), (js_KeyFormatRawPrivate, KeyFormatRawPrivate), (js_KeyFormatRawSeed, KeyFormatRawSeed), (js_KeyFormatRawSecret, KeyFormatRawSecret), (js_KeyFormatRaw, KeyFormatRaw), (js_KeyFormatSpki, KeyFormatSpki), (js_KeyFormatPkcs8, KeyFormatPkcs8), (js_KeyFormatJwk, KeyFormatJwk)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected KeyFormat value") P.return
js_KeyFormatRawPublic :: JSString
js_KeyFormatRawPublic = "raw-public"
js_KeyFormatRawPrivate :: JSString
js_KeyFormatRawPrivate = "raw-private"
js_KeyFormatRawSeed :: JSString
js_KeyFormatRawSeed = "raw-seed"
js_KeyFormatRawSecret :: JSString
js_KeyFormatRawSecret = "raw-secret"
js_KeyFormatRaw :: JSString
js_KeyFormatRaw = "raw"
js_KeyFormatSpki :: JSString
js_KeyFormatSpki = "spki"
js_KeyFormatPkcs8 :: JSString
js_KeyFormatPkcs8 = "pkcs8"
js_KeyFormatJwk :: JSString
js_KeyFormatJwk = "jwk"
-- | <https://developer.mozilla.org/en-US/docs/Web/API KeyType> (webcrypto-2)
data KeyType = KeyTypePublic
| KeyTypePrivate
| KeyTypeSecret
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal KeyType where
toJSVal x = toJSVal (case x of
KeyTypePublic -> js_KeyTypePublic
KeyTypePrivate -> js_KeyTypePrivate
KeyTypeSecret -> js_KeyTypeSecret
)
instance FromJSVal KeyType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_KeyTypePublic, KeyTypePublic), (js_KeyTypePrivate, KeyTypePrivate), (js_KeyTypeSecret, KeyTypeSecret)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected KeyType value") P.return
js_KeyTypePublic :: JSString
js_KeyTypePublic = "public"
js_KeyTypePrivate :: JSString
js_KeyTypePrivate = "private"
js_KeyTypeSecret :: JSString
js_KeyTypeSecret = "secret"
-- | <https://developer.mozilla.org/en-US/docs/Web/API KeyUsage> (webcrypto-modern-algos)
data KeyUsage = KeyUsageEncrypt
| KeyUsageDecrypt
| KeyUsageSign
| KeyUsageVerify
| KeyUsageDeriveKey
| KeyUsageDeriveBits
| KeyUsageWrapKey
| KeyUsageUnwrapKey
| KeyUsageEncapsulateKey
| KeyUsageEncapsulateBits
| KeyUsageDecapsulateKey
| KeyUsageDecapsulateBits
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal KeyUsage where
toJSVal x = toJSVal (case x of
KeyUsageEncrypt -> js_KeyUsageEncrypt
KeyUsageDecrypt -> js_KeyUsageDecrypt
KeyUsageSign -> js_KeyUsageSign
KeyUsageVerify -> js_KeyUsageVerify
KeyUsageDeriveKey -> js_KeyUsageDeriveKey
KeyUsageDeriveBits -> js_KeyUsageDeriveBits
KeyUsageWrapKey -> js_KeyUsageWrapKey
KeyUsageUnwrapKey -> js_KeyUsageUnwrapKey
KeyUsageEncapsulateKey -> js_KeyUsageEncapsulateKey
KeyUsageEncapsulateBits -> js_KeyUsageEncapsulateBits
KeyUsageDecapsulateKey -> js_KeyUsageDecapsulateKey
KeyUsageDecapsulateBits -> js_KeyUsageDecapsulateBits
)
instance FromJSVal KeyUsage where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_KeyUsageEncrypt, KeyUsageEncrypt), (js_KeyUsageDecrypt, KeyUsageDecrypt), (js_KeyUsageSign, KeyUsageSign), (js_KeyUsageVerify, KeyUsageVerify), (js_KeyUsageDeriveKey, KeyUsageDeriveKey), (js_KeyUsageDeriveBits, KeyUsageDeriveBits), (js_KeyUsageWrapKey, KeyUsageWrapKey), (js_KeyUsageUnwrapKey, KeyUsageUnwrapKey), (js_KeyUsageEncapsulateKey, KeyUsageEncapsulateKey), (js_KeyUsageEncapsulateBits, KeyUsageEncapsulateBits), (js_KeyUsageDecapsulateKey, KeyUsageDecapsulateKey), (js_KeyUsageDecapsulateBits, KeyUsageDecapsulateBits)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected KeyUsage value") P.return
js_KeyUsageEncrypt :: JSString
js_KeyUsageEncrypt = "encrypt"
js_KeyUsageDecrypt :: JSString
js_KeyUsageDecrypt = "decrypt"
js_KeyUsageSign :: JSString
js_KeyUsageSign = "sign"
js_KeyUsageVerify :: JSString
js_KeyUsageVerify = "verify"
js_KeyUsageDeriveKey :: JSString
js_KeyUsageDeriveKey = "deriveKey"
js_KeyUsageDeriveBits :: JSString
js_KeyUsageDeriveBits = "deriveBits"
js_KeyUsageWrapKey :: JSString
js_KeyUsageWrapKey = "wrapKey"
js_KeyUsageUnwrapKey :: JSString
js_KeyUsageUnwrapKey = "unwrapKey"
js_KeyUsageEncapsulateKey :: JSString
js_KeyUsageEncapsulateKey = "encapsulateKey"
js_KeyUsageEncapsulateBits :: JSString
js_KeyUsageEncapsulateBits = "encapsulateBits"
js_KeyUsageDecapsulateKey :: JSString
js_KeyUsageDecapsulateKey = "decapsulateKey"
js_KeyUsageDecapsulateBits :: JSString
js_KeyUsageDecapsulateBits = "decapsulateBits"
-- | <https://developer.mozilla.org/en-US/docs/Web/API LatencyMode> (webcodecs)
data LatencyMode = LatencyModeQuality
| LatencyModeRealtime
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal LatencyMode where
toJSVal x = toJSVal (case x of
LatencyModeQuality -> js_LatencyModeQuality
LatencyModeRealtime -> js_LatencyModeRealtime
)
instance FromJSVal LatencyMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_LatencyModeQuality, LatencyModeQuality), (js_LatencyModeRealtime, LatencyModeRealtime)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected LatencyMode value") P.return
js_LatencyModeQuality :: JSString
js_LatencyModeQuality = "quality"
js_LatencyModeRealtime :: JSString
js_LatencyModeRealtime = "realtime"
-- | <https://developer.mozilla.org/en-US/docs/Web/API LineAlignSetting> (webvtt1)
data LineAlignSetting = LineAlignSettingStart
| LineAlignSettingCenter
| LineAlignSettingEnd
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal LineAlignSetting where
toJSVal x = toJSVal (case x of
LineAlignSettingStart -> js_LineAlignSettingStart
LineAlignSettingCenter -> js_LineAlignSettingCenter
LineAlignSettingEnd -> js_LineAlignSettingEnd
)
instance FromJSVal LineAlignSetting where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_LineAlignSettingStart, LineAlignSettingStart), (js_LineAlignSettingCenter, LineAlignSettingCenter), (js_LineAlignSettingEnd, LineAlignSettingEnd)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected LineAlignSetting value") P.return
js_LineAlignSettingStart :: JSString
js_LineAlignSettingStart = "start"
js_LineAlignSettingCenter :: JSString
js_LineAlignSettingCenter = "center"
js_LineAlignSettingEnd :: JSString
js_LineAlignSettingEnd = "end"
-- | <https://developer.mozilla.org/en-US/docs/Web/API LockMode> (web-locks)
data LockMode = LockModeShared
| LockModeExclusive
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal LockMode where
toJSVal x = toJSVal (case x of
LockModeShared -> js_LockModeShared
LockModeExclusive -> js_LockModeExclusive
)
instance FromJSVal LockMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_LockModeShared, LockModeShared), (js_LockModeExclusive, LockModeExclusive)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected LockMode value") P.return
js_LockModeShared :: JSString
js_LockModeShared = "shared"
js_LockModeExclusive :: JSString
js_LockModeExclusive = "exclusive"
-- | <https://developer.mozilla.org/en-US/docs/Web/API LoginStatus> (login-status)
data LoginStatus = LoginStatusLoggedIn
| LoginStatusLoggedOut
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal LoginStatus where
toJSVal x = toJSVal (case x of
LoginStatusLoggedIn -> js_LoginStatusLoggedIn
LoginStatusLoggedOut -> js_LoginStatusLoggedOut
)
instance FromJSVal LoginStatus where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_LoginStatusLoggedIn, LoginStatusLoggedIn), (js_LoginStatusLoggedOut, LoginStatusLoggedOut)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected LoginStatus value") P.return
js_LoginStatusLoggedIn :: JSString
js_LoginStatusLoggedIn = "logged-in"
js_LoginStatusLoggedOut :: JSString
js_LoginStatusLoggedOut = "logged-out"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MIDIPortConnectionState> (webmidi)
data MIDIPortConnectionState = MIDIPortConnectionStateOpen
| MIDIPortConnectionStateClosed
| MIDIPortConnectionStatePending
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MIDIPortConnectionState where
toJSVal x = toJSVal (case x of
MIDIPortConnectionStateOpen -> js_MIDIPortConnectionStateOpen
MIDIPortConnectionStateClosed -> js_MIDIPortConnectionStateClosed
MIDIPortConnectionStatePending -> js_MIDIPortConnectionStatePending
)
instance FromJSVal MIDIPortConnectionState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MIDIPortConnectionStateOpen, MIDIPortConnectionStateOpen), (js_MIDIPortConnectionStateClosed, MIDIPortConnectionStateClosed), (js_MIDIPortConnectionStatePending, MIDIPortConnectionStatePending)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MIDIPortConnectionState value") P.return
js_MIDIPortConnectionStateOpen :: JSString
js_MIDIPortConnectionStateOpen = "open"
js_MIDIPortConnectionStateClosed :: JSString
js_MIDIPortConnectionStateClosed = "closed"
js_MIDIPortConnectionStatePending :: JSString
js_MIDIPortConnectionStatePending = "pending"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MIDIPortDeviceState> (webmidi)
data MIDIPortDeviceState = MIDIPortDeviceStateDisconnected
| MIDIPortDeviceStateConnected
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MIDIPortDeviceState where
toJSVal x = toJSVal (case x of
MIDIPortDeviceStateDisconnected -> js_MIDIPortDeviceStateDisconnected
MIDIPortDeviceStateConnected -> js_MIDIPortDeviceStateConnected
)
instance FromJSVal MIDIPortDeviceState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MIDIPortDeviceStateDisconnected, MIDIPortDeviceStateDisconnected), (js_MIDIPortDeviceStateConnected, MIDIPortDeviceStateConnected)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MIDIPortDeviceState value") P.return
js_MIDIPortDeviceStateDisconnected :: JSString
js_MIDIPortDeviceStateDisconnected = "disconnected"
js_MIDIPortDeviceStateConnected :: JSString
js_MIDIPortDeviceStateConnected = "connected"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MIDIPortType> (webmidi)
data MIDIPortType = MIDIPortTypeInput
| MIDIPortTypeOutput
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MIDIPortType where
toJSVal x = toJSVal (case x of
MIDIPortTypeInput -> js_MIDIPortTypeInput
MIDIPortTypeOutput -> js_MIDIPortTypeOutput
)
instance FromJSVal MIDIPortType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MIDIPortTypeInput, MIDIPortTypeInput), (js_MIDIPortTypeOutput, MIDIPortTypeOutput)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MIDIPortType value") P.return
js_MIDIPortTypeInput :: JSString
js_MIDIPortTypeInput = "input"
js_MIDIPortTypeOutput :: JSString
js_MIDIPortTypeOutput = "output"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaDecodingType> (media-capabilities)
data MediaDecodingType = MediaDecodingTypeFile
| MediaDecodingTypeMediaSource
| MediaDecodingTypeWebrtc
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaDecodingType where
toJSVal x = toJSVal (case x of
MediaDecodingTypeFile -> js_MediaDecodingTypeFile
MediaDecodingTypeMediaSource -> js_MediaDecodingTypeMediaSource
MediaDecodingTypeWebrtc -> js_MediaDecodingTypeWebrtc
)
instance FromJSVal MediaDecodingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaDecodingTypeFile, MediaDecodingTypeFile), (js_MediaDecodingTypeMediaSource, MediaDecodingTypeMediaSource), (js_MediaDecodingTypeWebrtc, MediaDecodingTypeWebrtc)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaDecodingType value") P.return
js_MediaDecodingTypeFile :: JSString
js_MediaDecodingTypeFile = "file"
js_MediaDecodingTypeMediaSource :: JSString
js_MediaDecodingTypeMediaSource = "media-source"
js_MediaDecodingTypeWebrtc :: JSString
js_MediaDecodingTypeWebrtc = "webrtc"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaDeviceKind> (mediacapture-streams)
data MediaDeviceKind = MediaDeviceKindAudioinput
| MediaDeviceKindAudiooutput
| MediaDeviceKindVideoinput
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaDeviceKind where
toJSVal x = toJSVal (case x of
MediaDeviceKindAudioinput -> js_MediaDeviceKindAudioinput
MediaDeviceKindAudiooutput -> js_MediaDeviceKindAudiooutput
MediaDeviceKindVideoinput -> js_MediaDeviceKindVideoinput
)
instance FromJSVal MediaDeviceKind where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaDeviceKindAudioinput, MediaDeviceKindAudioinput), (js_MediaDeviceKindAudiooutput, MediaDeviceKindAudiooutput), (js_MediaDeviceKindVideoinput, MediaDeviceKindVideoinput)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaDeviceKind value") P.return
js_MediaDeviceKindAudioinput :: JSString
js_MediaDeviceKindAudioinput = "audioinput"
js_MediaDeviceKindAudiooutput :: JSString
js_MediaDeviceKindAudiooutput = "audiooutput"
js_MediaDeviceKindVideoinput :: JSString
js_MediaDeviceKindVideoinput = "videoinput"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaEncodingType> (media-capabilities)
data MediaEncodingType = MediaEncodingTypeRecord
| MediaEncodingTypeWebrtc
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaEncodingType where
toJSVal x = toJSVal (case x of
MediaEncodingTypeRecord -> js_MediaEncodingTypeRecord
MediaEncodingTypeWebrtc -> js_MediaEncodingTypeWebrtc
)
instance FromJSVal MediaEncodingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaEncodingTypeRecord, MediaEncodingTypeRecord), (js_MediaEncodingTypeWebrtc, MediaEncodingTypeWebrtc)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaEncodingType value") P.return
js_MediaEncodingTypeRecord :: JSString
js_MediaEncodingTypeRecord = "record"
js_MediaEncodingTypeWebrtc :: JSString
js_MediaEncodingTypeWebrtc = "webrtc"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaKeyMessageType> (encrypted-media-2)
data MediaKeyMessageType = MediaKeyMessageTypeLicenseRequest
| MediaKeyMessageTypeLicenseRenewal
| MediaKeyMessageTypeLicenseRelease
| MediaKeyMessageTypeIndividualizationRequest
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaKeyMessageType where
toJSVal x = toJSVal (case x of
MediaKeyMessageTypeLicenseRequest -> js_MediaKeyMessageTypeLicenseRequest
MediaKeyMessageTypeLicenseRenewal -> js_MediaKeyMessageTypeLicenseRenewal
MediaKeyMessageTypeLicenseRelease -> js_MediaKeyMessageTypeLicenseRelease
MediaKeyMessageTypeIndividualizationRequest -> js_MediaKeyMessageTypeIndividualizationRequest
)
instance FromJSVal MediaKeyMessageType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaKeyMessageTypeLicenseRequest, MediaKeyMessageTypeLicenseRequest), (js_MediaKeyMessageTypeLicenseRenewal, MediaKeyMessageTypeLicenseRenewal), (js_MediaKeyMessageTypeLicenseRelease, MediaKeyMessageTypeLicenseRelease), (js_MediaKeyMessageTypeIndividualizationRequest, MediaKeyMessageTypeIndividualizationRequest)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaKeyMessageType value") P.return
js_MediaKeyMessageTypeLicenseRequest :: JSString
js_MediaKeyMessageTypeLicenseRequest = "license-request"
js_MediaKeyMessageTypeLicenseRenewal :: JSString
js_MediaKeyMessageTypeLicenseRenewal = "license-renewal"
js_MediaKeyMessageTypeLicenseRelease :: JSString
js_MediaKeyMessageTypeLicenseRelease = "license-release"
js_MediaKeyMessageTypeIndividualizationRequest :: JSString
js_MediaKeyMessageTypeIndividualizationRequest = "individualization-request"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaKeySessionClosedReason> (encrypted-media-2)
data MediaKeySessionClosedReason = MediaKeySessionClosedReasonInternalError
| MediaKeySessionClosedReasonClosedByApplication
| MediaKeySessionClosedReasonReleaseAcknowledged
| MediaKeySessionClosedReasonHardwareContextReset
| MediaKeySessionClosedReasonResourceEvicted
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaKeySessionClosedReason where
toJSVal x = toJSVal (case x of
MediaKeySessionClosedReasonInternalError -> js_MediaKeySessionClosedReasonInternalError
MediaKeySessionClosedReasonClosedByApplication -> js_MediaKeySessionClosedReasonClosedByApplication
MediaKeySessionClosedReasonReleaseAcknowledged -> js_MediaKeySessionClosedReasonReleaseAcknowledged
MediaKeySessionClosedReasonHardwareContextReset -> js_MediaKeySessionClosedReasonHardwareContextReset
MediaKeySessionClosedReasonResourceEvicted -> js_MediaKeySessionClosedReasonResourceEvicted
)
instance FromJSVal MediaKeySessionClosedReason where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaKeySessionClosedReasonInternalError, MediaKeySessionClosedReasonInternalError), (js_MediaKeySessionClosedReasonClosedByApplication, MediaKeySessionClosedReasonClosedByApplication), (js_MediaKeySessionClosedReasonReleaseAcknowledged, MediaKeySessionClosedReasonReleaseAcknowledged), (js_MediaKeySessionClosedReasonHardwareContextReset, MediaKeySessionClosedReasonHardwareContextReset), (js_MediaKeySessionClosedReasonResourceEvicted, MediaKeySessionClosedReasonResourceEvicted)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaKeySessionClosedReason value") P.return
js_MediaKeySessionClosedReasonInternalError :: JSString
js_MediaKeySessionClosedReasonInternalError = "internal-error"
js_MediaKeySessionClosedReasonClosedByApplication :: JSString
js_MediaKeySessionClosedReasonClosedByApplication = "closed-by-application"
js_MediaKeySessionClosedReasonReleaseAcknowledged :: JSString
js_MediaKeySessionClosedReasonReleaseAcknowledged = "release-acknowledged"
js_MediaKeySessionClosedReasonHardwareContextReset :: JSString
js_MediaKeySessionClosedReasonHardwareContextReset = "hardware-context-reset"
js_MediaKeySessionClosedReasonResourceEvicted :: JSString
js_MediaKeySessionClosedReasonResourceEvicted = "resource-evicted"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaKeySessionType> (encrypted-media-2)
data MediaKeySessionType = MediaKeySessionTypeTemporary
| MediaKeySessionTypePersistentLicense
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaKeySessionType where
toJSVal x = toJSVal (case x of
MediaKeySessionTypeTemporary -> js_MediaKeySessionTypeTemporary
MediaKeySessionTypePersistentLicense -> js_MediaKeySessionTypePersistentLicense
)
instance FromJSVal MediaKeySessionType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaKeySessionTypeTemporary, MediaKeySessionTypeTemporary), (js_MediaKeySessionTypePersistentLicense, MediaKeySessionTypePersistentLicense)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaKeySessionType value") P.return
js_MediaKeySessionTypeTemporary :: JSString
js_MediaKeySessionTypeTemporary = "temporary"
js_MediaKeySessionTypePersistentLicense :: JSString
js_MediaKeySessionTypePersistentLicense = "persistent-license"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaKeyStatus> (encrypted-media-2)
data MediaKeyStatus = MediaKeyStatusUsable
| MediaKeyStatusExpired
| MediaKeyStatusReleased
| MediaKeyStatusOutputRestricted
| MediaKeyStatusOutputDownscaled
| MediaKeyStatusUsableInFuture
| MediaKeyStatusStatusPending
| MediaKeyStatusInternalError
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaKeyStatus where
toJSVal x = toJSVal (case x of
MediaKeyStatusUsable -> js_MediaKeyStatusUsable
MediaKeyStatusExpired -> js_MediaKeyStatusExpired
MediaKeyStatusReleased -> js_MediaKeyStatusReleased
MediaKeyStatusOutputRestricted -> js_MediaKeyStatusOutputRestricted
MediaKeyStatusOutputDownscaled -> js_MediaKeyStatusOutputDownscaled
MediaKeyStatusUsableInFuture -> js_MediaKeyStatusUsableInFuture
MediaKeyStatusStatusPending -> js_MediaKeyStatusStatusPending
MediaKeyStatusInternalError -> js_MediaKeyStatusInternalError
)
instance FromJSVal MediaKeyStatus where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaKeyStatusUsable, MediaKeyStatusUsable), (js_MediaKeyStatusExpired, MediaKeyStatusExpired), (js_MediaKeyStatusReleased, MediaKeyStatusReleased), (js_MediaKeyStatusOutputRestricted, MediaKeyStatusOutputRestricted), (js_MediaKeyStatusOutputDownscaled, MediaKeyStatusOutputDownscaled), (js_MediaKeyStatusUsableInFuture, MediaKeyStatusUsableInFuture), (js_MediaKeyStatusStatusPending, MediaKeyStatusStatusPending), (js_MediaKeyStatusInternalError, MediaKeyStatusInternalError)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaKeyStatus value") P.return
js_MediaKeyStatusUsable :: JSString
js_MediaKeyStatusUsable = "usable"
js_MediaKeyStatusExpired :: JSString
js_MediaKeyStatusExpired = "expired"
js_MediaKeyStatusReleased :: JSString
js_MediaKeyStatusReleased = "released"
js_MediaKeyStatusOutputRestricted :: JSString
js_MediaKeyStatusOutputRestricted = "output-restricted"
js_MediaKeyStatusOutputDownscaled :: JSString
js_MediaKeyStatusOutputDownscaled = "output-downscaled"
js_MediaKeyStatusUsableInFuture :: JSString
js_MediaKeyStatusUsableInFuture = "usable-in-future"
js_MediaKeyStatusStatusPending :: JSString
js_MediaKeyStatusStatusPending = "status-pending"
js_MediaKeyStatusInternalError :: JSString
js_MediaKeyStatusInternalError = "internal-error"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaKeysRequirement> (encrypted-media-2)
data MediaKeysRequirement = MediaKeysRequirementRequired
| MediaKeysRequirementOptional
| MediaKeysRequirementNotAllowed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaKeysRequirement where
toJSVal x = toJSVal (case x of
MediaKeysRequirementRequired -> js_MediaKeysRequirementRequired
MediaKeysRequirementOptional -> js_MediaKeysRequirementOptional
MediaKeysRequirementNotAllowed -> js_MediaKeysRequirementNotAllowed
)
instance FromJSVal MediaKeysRequirement where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaKeysRequirementRequired, MediaKeysRequirementRequired), (js_MediaKeysRequirementOptional, MediaKeysRequirementOptional), (js_MediaKeysRequirementNotAllowed, MediaKeysRequirementNotAllowed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaKeysRequirement value") P.return
js_MediaKeysRequirementRequired :: JSString
js_MediaKeysRequirementRequired = "required"
js_MediaKeysRequirementOptional :: JSString
js_MediaKeysRequirementOptional = "optional"
js_MediaKeysRequirementNotAllowed :: JSString
js_MediaKeysRequirementNotAllowed = "not-allowed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaSessionAction> (mediasession)
data MediaSessionAction = MediaSessionActionPlay
| MediaSessionActionPause
| MediaSessionActionSeekbackward
| MediaSessionActionSeekforward
| MediaSessionActionPrevioustrack
| MediaSessionActionNexttrack
| MediaSessionActionSkipad
| MediaSessionActionStop
| MediaSessionActionSeekto
| MediaSessionActionTogglemicrophone
| MediaSessionActionTogglecamera
| MediaSessionActionTogglescreenshare
| MediaSessionActionHangup
| MediaSessionActionPreviousslide
| MediaSessionActionNextslide
| MediaSessionActionEnterpictureinpicture
| MediaSessionActionVoiceactivity
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaSessionAction where
toJSVal x = toJSVal (case x of
MediaSessionActionPlay -> js_MediaSessionActionPlay
MediaSessionActionPause -> js_MediaSessionActionPause
MediaSessionActionSeekbackward -> js_MediaSessionActionSeekbackward
MediaSessionActionSeekforward -> js_MediaSessionActionSeekforward
MediaSessionActionPrevioustrack -> js_MediaSessionActionPrevioustrack
MediaSessionActionNexttrack -> js_MediaSessionActionNexttrack
MediaSessionActionSkipad -> js_MediaSessionActionSkipad
MediaSessionActionStop -> js_MediaSessionActionStop
MediaSessionActionSeekto -> js_MediaSessionActionSeekto
MediaSessionActionTogglemicrophone -> js_MediaSessionActionTogglemicrophone
MediaSessionActionTogglecamera -> js_MediaSessionActionTogglecamera
MediaSessionActionTogglescreenshare -> js_MediaSessionActionTogglescreenshare
MediaSessionActionHangup -> js_MediaSessionActionHangup
MediaSessionActionPreviousslide -> js_MediaSessionActionPreviousslide
MediaSessionActionNextslide -> js_MediaSessionActionNextslide
MediaSessionActionEnterpictureinpicture -> js_MediaSessionActionEnterpictureinpicture
MediaSessionActionVoiceactivity -> js_MediaSessionActionVoiceactivity
)
instance FromJSVal MediaSessionAction where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaSessionActionPlay, MediaSessionActionPlay), (js_MediaSessionActionPause, MediaSessionActionPause), (js_MediaSessionActionSeekbackward, MediaSessionActionSeekbackward), (js_MediaSessionActionSeekforward, MediaSessionActionSeekforward), (js_MediaSessionActionPrevioustrack, MediaSessionActionPrevioustrack), (js_MediaSessionActionNexttrack, MediaSessionActionNexttrack), (js_MediaSessionActionSkipad, MediaSessionActionSkipad), (js_MediaSessionActionStop, MediaSessionActionStop), (js_MediaSessionActionSeekto, MediaSessionActionSeekto), (js_MediaSessionActionTogglemicrophone, MediaSessionActionTogglemicrophone), (js_MediaSessionActionTogglecamera, MediaSessionActionTogglecamera), (js_MediaSessionActionTogglescreenshare, MediaSessionActionTogglescreenshare), (js_MediaSessionActionHangup, MediaSessionActionHangup), (js_MediaSessionActionPreviousslide, MediaSessionActionPreviousslide), (js_MediaSessionActionNextslide, MediaSessionActionNextslide), (js_MediaSessionActionEnterpictureinpicture, MediaSessionActionEnterpictureinpicture), (js_MediaSessionActionVoiceactivity, MediaSessionActionVoiceactivity)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaSessionAction value") P.return
js_MediaSessionActionPlay :: JSString
js_MediaSessionActionPlay = "play"
js_MediaSessionActionPause :: JSString
js_MediaSessionActionPause = "pause"
js_MediaSessionActionSeekbackward :: JSString
js_MediaSessionActionSeekbackward = "seekbackward"
js_MediaSessionActionSeekforward :: JSString
js_MediaSessionActionSeekforward = "seekforward"
js_MediaSessionActionPrevioustrack :: JSString
js_MediaSessionActionPrevioustrack = "previoustrack"
js_MediaSessionActionNexttrack :: JSString
js_MediaSessionActionNexttrack = "nexttrack"
js_MediaSessionActionSkipad :: JSString
js_MediaSessionActionSkipad = "skipad"
js_MediaSessionActionStop :: JSString
js_MediaSessionActionStop = "stop"
js_MediaSessionActionSeekto :: JSString
js_MediaSessionActionSeekto = "seekto"
js_MediaSessionActionTogglemicrophone :: JSString
js_MediaSessionActionTogglemicrophone = "togglemicrophone"
js_MediaSessionActionTogglecamera :: JSString
js_MediaSessionActionTogglecamera = "togglecamera"
js_MediaSessionActionTogglescreenshare :: JSString
js_MediaSessionActionTogglescreenshare = "togglescreenshare"
js_MediaSessionActionHangup :: JSString
js_MediaSessionActionHangup = "hangup"
js_MediaSessionActionPreviousslide :: JSString
js_MediaSessionActionPreviousslide = "previousslide"
js_MediaSessionActionNextslide :: JSString
js_MediaSessionActionNextslide = "nextslide"
js_MediaSessionActionEnterpictureinpicture :: JSString
js_MediaSessionActionEnterpictureinpicture = "enterpictureinpicture"
js_MediaSessionActionVoiceactivity :: JSString
js_MediaSessionActionVoiceactivity = "voiceactivity"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaSessionEnterPictureInPictureReason> (mediasession)
data MediaSessionEnterPictureInPictureReason = MediaSessionEnterPictureInPictureReasonOther
| MediaSessionEnterPictureInPictureReasonUseraction
| MediaSessionEnterPictureInPictureReasonContentoccluded
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaSessionEnterPictureInPictureReason where
toJSVal x = toJSVal (case x of
MediaSessionEnterPictureInPictureReasonOther -> js_MediaSessionEnterPictureInPictureReasonOther
MediaSessionEnterPictureInPictureReasonUseraction -> js_MediaSessionEnterPictureInPictureReasonUseraction
MediaSessionEnterPictureInPictureReasonContentoccluded -> js_MediaSessionEnterPictureInPictureReasonContentoccluded
)
instance FromJSVal MediaSessionEnterPictureInPictureReason where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaSessionEnterPictureInPictureReasonOther, MediaSessionEnterPictureInPictureReasonOther), (js_MediaSessionEnterPictureInPictureReasonUseraction, MediaSessionEnterPictureInPictureReasonUseraction), (js_MediaSessionEnterPictureInPictureReasonContentoccluded, MediaSessionEnterPictureInPictureReasonContentoccluded)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaSessionEnterPictureInPictureReason value") P.return
js_MediaSessionEnterPictureInPictureReasonOther :: JSString
js_MediaSessionEnterPictureInPictureReasonOther = "other"
js_MediaSessionEnterPictureInPictureReasonUseraction :: JSString
js_MediaSessionEnterPictureInPictureReasonUseraction = "useraction"
js_MediaSessionEnterPictureInPictureReasonContentoccluded :: JSString
js_MediaSessionEnterPictureInPictureReasonContentoccluded = "contentoccluded"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaSessionPlaybackState> (mediasession)
data MediaSessionPlaybackState = MediaSessionPlaybackStateNone
| MediaSessionPlaybackStatePaused
| MediaSessionPlaybackStatePlaying
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaSessionPlaybackState where
toJSVal x = toJSVal (case x of
MediaSessionPlaybackStateNone -> js_MediaSessionPlaybackStateNone
MediaSessionPlaybackStatePaused -> js_MediaSessionPlaybackStatePaused
MediaSessionPlaybackStatePlaying -> js_MediaSessionPlaybackStatePlaying
)
instance FromJSVal MediaSessionPlaybackState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaSessionPlaybackStateNone, MediaSessionPlaybackStateNone), (js_MediaSessionPlaybackStatePaused, MediaSessionPlaybackStatePaused), (js_MediaSessionPlaybackStatePlaying, MediaSessionPlaybackStatePlaying)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaSessionPlaybackState value") P.return
js_MediaSessionPlaybackStateNone :: JSString
js_MediaSessionPlaybackStateNone = "none"
js_MediaSessionPlaybackStatePaused :: JSString
js_MediaSessionPlaybackStatePaused = "paused"
js_MediaSessionPlaybackStatePlaying :: JSString
js_MediaSessionPlaybackStatePlaying = "playing"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MediaStreamTrackState> (mediacapture-streams)
data MediaStreamTrackState = MediaStreamTrackStateLive
| MediaStreamTrackStateEnded
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MediaStreamTrackState where
toJSVal x = toJSVal (case x of
MediaStreamTrackStateLive -> js_MediaStreamTrackStateLive
MediaStreamTrackStateEnded -> js_MediaStreamTrackStateEnded
)
instance FromJSVal MediaStreamTrackState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MediaStreamTrackStateLive, MediaStreamTrackStateLive), (js_MediaStreamTrackStateEnded, MediaStreamTrackStateEnded)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MediaStreamTrackState value") P.return
js_MediaStreamTrackStateLive :: JSString
js_MediaStreamTrackStateLive = "live"
js_MediaStreamTrackStateEnded :: JSString
js_MediaStreamTrackStateEnded = "ended"
-- | <https://developer.mozilla.org/en-US/docs/Web/API MonitorTypeSurfacesEnum> (screen-capture)
data MonitorTypeSurfacesEnum = MonitorTypeSurfacesEnumInclude
| MonitorTypeSurfacesEnumExclude
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal MonitorTypeSurfacesEnum where
toJSVal x = toJSVal (case x of
MonitorTypeSurfacesEnumInclude -> js_MonitorTypeSurfacesEnumInclude
MonitorTypeSurfacesEnumExclude -> js_MonitorTypeSurfacesEnumExclude
)
instance FromJSVal MonitorTypeSurfacesEnum where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_MonitorTypeSurfacesEnumInclude, MonitorTypeSurfacesEnumInclude), (js_MonitorTypeSurfacesEnumExclude, MonitorTypeSurfacesEnumExclude)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected MonitorTypeSurfacesEnum value") P.return
js_MonitorTypeSurfacesEnumInclude :: JSString
js_MonitorTypeSurfacesEnumInclude = "include"
js_MonitorTypeSurfacesEnumExclude :: JSString
js_MonitorTypeSurfacesEnumExclude = "exclude"
-- | <https://developer.mozilla.org/en-US/docs/Web/API NavigationFocusReset> (html)
data NavigationFocusReset = NavigationFocusResetAfterTransition
| NavigationFocusResetManual
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal NavigationFocusReset where
toJSVal x = toJSVal (case x of
NavigationFocusResetAfterTransition -> js_NavigationFocusResetAfterTransition
NavigationFocusResetManual -> js_NavigationFocusResetManual
)
instance FromJSVal NavigationFocusReset where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_NavigationFocusResetAfterTransition, NavigationFocusResetAfterTransition), (js_NavigationFocusResetManual, NavigationFocusResetManual)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected NavigationFocusReset value") P.return
js_NavigationFocusResetAfterTransition :: JSString
js_NavigationFocusResetAfterTransition = "after-transition"
js_NavigationFocusResetManual :: JSString
js_NavigationFocusResetManual = "manual"
-- | <https://developer.mozilla.org/en-US/docs/Web/API NavigationHistoryBehavior> (html)
data NavigationHistoryBehavior = NavigationHistoryBehaviorAuto
| NavigationHistoryBehaviorPush
| NavigationHistoryBehaviorReplace
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal NavigationHistoryBehavior where
toJSVal x = toJSVal (case x of
NavigationHistoryBehaviorAuto -> js_NavigationHistoryBehaviorAuto
NavigationHistoryBehaviorPush -> js_NavigationHistoryBehaviorPush
NavigationHistoryBehaviorReplace -> js_NavigationHistoryBehaviorReplace
)
instance FromJSVal NavigationHistoryBehavior where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_NavigationHistoryBehaviorAuto, NavigationHistoryBehaviorAuto), (js_NavigationHistoryBehaviorPush, NavigationHistoryBehaviorPush), (js_NavigationHistoryBehaviorReplace, NavigationHistoryBehaviorReplace)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected NavigationHistoryBehavior value") P.return
js_NavigationHistoryBehaviorAuto :: JSString
js_NavigationHistoryBehaviorAuto = "auto"
js_NavigationHistoryBehaviorPush :: JSString
js_NavigationHistoryBehaviorPush = "push"
js_NavigationHistoryBehaviorReplace :: JSString
js_NavigationHistoryBehaviorReplace = "replace"
-- | <https://developer.mozilla.org/en-US/docs/Web/API NavigationScrollBehavior> (html)
data NavigationScrollBehavior = NavigationScrollBehaviorAfterTransition
| NavigationScrollBehaviorManual
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal NavigationScrollBehavior where
toJSVal x = toJSVal (case x of
NavigationScrollBehaviorAfterTransition -> js_NavigationScrollBehaviorAfterTransition
NavigationScrollBehaviorManual -> js_NavigationScrollBehaviorManual
)
instance FromJSVal NavigationScrollBehavior where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_NavigationScrollBehaviorAfterTransition, NavigationScrollBehaviorAfterTransition), (js_NavigationScrollBehaviorManual, NavigationScrollBehaviorManual)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected NavigationScrollBehavior value") P.return
js_NavigationScrollBehaviorAfterTransition :: JSString
js_NavigationScrollBehaviorAfterTransition = "after-transition"
js_NavigationScrollBehaviorManual :: JSString
js_NavigationScrollBehaviorManual = "manual"
-- | <https://developer.mozilla.org/en-US/docs/Web/API NavigationTimingType> (navigation-timing-2)
data NavigationTimingType = NavigationTimingTypeNavigate
| NavigationTimingTypeReload
| NavigationTimingTypeBackForward
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal NavigationTimingType where
toJSVal x = toJSVal (case x of
NavigationTimingTypeNavigate -> js_NavigationTimingTypeNavigate
NavigationTimingTypeReload -> js_NavigationTimingTypeReload
NavigationTimingTypeBackForward -> js_NavigationTimingTypeBackForward
)
instance FromJSVal NavigationTimingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_NavigationTimingTypeNavigate, NavigationTimingTypeNavigate), (js_NavigationTimingTypeReload, NavigationTimingTypeReload), (js_NavigationTimingTypeBackForward, NavigationTimingTypeBackForward)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected NavigationTimingType value") P.return
js_NavigationTimingTypeNavigate :: JSString
js_NavigationTimingTypeNavigate = "navigate"
js_NavigationTimingTypeReload :: JSString
js_NavigationTimingTypeReload = "reload"
js_NavigationTimingTypeBackForward :: JSString
js_NavigationTimingTypeBackForward = "back_forward"
-- | <https://developer.mozilla.org/en-US/docs/Web/API NavigationType> (html)
data NavigationType = NavigationTypePush
| NavigationTypeReplace
| NavigationTypeReload
| NavigationTypeTraverse
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal NavigationType where
toJSVal x = toJSVal (case x of
NavigationTypePush -> js_NavigationTypePush
NavigationTypeReplace -> js_NavigationTypeReplace
NavigationTypeReload -> js_NavigationTypeReload
NavigationTypeTraverse -> js_NavigationTypeTraverse
)
instance FromJSVal NavigationType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_NavigationTypePush, NavigationTypePush), (js_NavigationTypeReplace, NavigationTypeReplace), (js_NavigationTypeReload, NavigationTypeReload), (js_NavigationTypeTraverse, NavigationTypeTraverse)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected NavigationType value") P.return
js_NavigationTypePush :: JSString
js_NavigationTypePush = "push"
js_NavigationTypeReplace :: JSString
js_NavigationTypeReplace = "replace"
js_NavigationTypeReload :: JSString
js_NavigationTypeReload = "reload"
js_NavigationTypeTraverse :: JSString
js_NavigationTypeTraverse = "traverse"
-- | <https://developer.mozilla.org/en-US/docs/Web/API NotificationDirection> (notifications)
data NotificationDirection = NotificationDirectionAuto
| NotificationDirectionLtr
| NotificationDirectionRtl
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal NotificationDirection where
toJSVal x = toJSVal (case x of
NotificationDirectionAuto -> js_NotificationDirectionAuto
NotificationDirectionLtr -> js_NotificationDirectionLtr
NotificationDirectionRtl -> js_NotificationDirectionRtl
)
instance FromJSVal NotificationDirection where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_NotificationDirectionAuto, NotificationDirectionAuto), (js_NotificationDirectionLtr, NotificationDirectionLtr), (js_NotificationDirectionRtl, NotificationDirectionRtl)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected NotificationDirection value") P.return
js_NotificationDirectionAuto :: JSString
js_NotificationDirectionAuto = "auto"
js_NotificationDirectionLtr :: JSString
js_NotificationDirectionLtr = "ltr"
js_NotificationDirectionRtl :: JSString
js_NotificationDirectionRtl = "rtl"
-- | <https://developer.mozilla.org/en-US/docs/Web/API NotificationPermission> (notifications)
data NotificationPermission = NotificationPermissionDefault
| NotificationPermissionDenied
| NotificationPermissionGranted
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal NotificationPermission where
toJSVal x = toJSVal (case x of
NotificationPermissionDefault -> js_NotificationPermissionDefault
NotificationPermissionDenied -> js_NotificationPermissionDenied
NotificationPermissionGranted -> js_NotificationPermissionGranted
)
instance FromJSVal NotificationPermission where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_NotificationPermissionDefault, NotificationPermissionDefault), (js_NotificationPermissionDenied, NotificationPermissionDenied), (js_NotificationPermissionGranted, NotificationPermissionGranted)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected NotificationPermission value") P.return
js_NotificationPermissionDefault :: JSString
js_NotificationPermissionDefault = "default"
js_NotificationPermissionDenied :: JSString
js_NotificationPermissionDenied = "denied"
js_NotificationPermissionGranted :: JSString
js_NotificationPermissionGranted = "granted"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OTPCredentialTransportType> (web-otp)
data OTPCredentialTransportType = OTPCredentialTransportTypeSms
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OTPCredentialTransportType where
toJSVal x = toJSVal (case x of
OTPCredentialTransportTypeSms -> js_OTPCredentialTransportTypeSms
)
instance FromJSVal OTPCredentialTransportType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OTPCredentialTransportTypeSms, OTPCredentialTransportTypeSms)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OTPCredentialTransportType value") P.return
js_OTPCredentialTransportTypeSms :: JSString
js_OTPCredentialTransportTypeSms = "sms"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OffscreenRenderingContextId> (html)
data OffscreenRenderingContextId = OffscreenRenderingContextId2d
| OffscreenRenderingContextIdBitmaprenderer
| OffscreenRenderingContextIdWebgl
| OffscreenRenderingContextIdWebgl2
| OffscreenRenderingContextIdWebgpu
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OffscreenRenderingContextId where
toJSVal x = toJSVal (case x of
OffscreenRenderingContextId2d -> js_OffscreenRenderingContextId2d
OffscreenRenderingContextIdBitmaprenderer -> js_OffscreenRenderingContextIdBitmaprenderer
OffscreenRenderingContextIdWebgl -> js_OffscreenRenderingContextIdWebgl
OffscreenRenderingContextIdWebgl2 -> js_OffscreenRenderingContextIdWebgl2
OffscreenRenderingContextIdWebgpu -> js_OffscreenRenderingContextIdWebgpu
)
instance FromJSVal OffscreenRenderingContextId where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OffscreenRenderingContextId2d, OffscreenRenderingContextId2d), (js_OffscreenRenderingContextIdBitmaprenderer, OffscreenRenderingContextIdBitmaprenderer), (js_OffscreenRenderingContextIdWebgl, OffscreenRenderingContextIdWebgl), (js_OffscreenRenderingContextIdWebgl2, OffscreenRenderingContextIdWebgl2), (js_OffscreenRenderingContextIdWebgpu, OffscreenRenderingContextIdWebgpu)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OffscreenRenderingContextId value") P.return
js_OffscreenRenderingContextId2d :: JSString
js_OffscreenRenderingContextId2d = "2d"
js_OffscreenRenderingContextIdBitmaprenderer :: JSString
js_OffscreenRenderingContextIdBitmaprenderer = "bitmaprenderer"
js_OffscreenRenderingContextIdWebgl :: JSString
js_OffscreenRenderingContextIdWebgl = "webgl"
js_OffscreenRenderingContextIdWebgl2 :: JSString
js_OffscreenRenderingContextIdWebgl2 = "webgl2"
js_OffscreenRenderingContextIdWebgpu :: JSString
js_OffscreenRenderingContextIdWebgpu = "webgpu"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OperationType> (trust-token-api)
data OperationType = OperationTypeTokenRequest
| OperationTypeSendRedemptionRecord
| OperationTypeTokenRedemption
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OperationType where
toJSVal x = toJSVal (case x of
OperationTypeTokenRequest -> js_OperationTypeTokenRequest
OperationTypeSendRedemptionRecord -> js_OperationTypeSendRedemptionRecord
OperationTypeTokenRedemption -> js_OperationTypeTokenRedemption
)
instance FromJSVal OperationType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OperationTypeTokenRequest, OperationTypeTokenRequest), (js_OperationTypeSendRedemptionRecord, OperationTypeSendRedemptionRecord), (js_OperationTypeTokenRedemption, OperationTypeTokenRedemption)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OperationType value") P.return
js_OperationTypeTokenRequest :: JSString
js_OperationTypeTokenRequest = "token-request"
js_OperationTypeSendRedemptionRecord :: JSString
js_OperationTypeSendRedemptionRecord = "send-redemption-record"
js_OperationTypeTokenRedemption :: JSString
js_OperationTypeTokenRedemption = "token-redemption"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OpusApplication> (webcodecs-opus-codec-registration)
data OpusApplication = OpusApplicationVoip
| OpusApplicationAudio
| OpusApplicationLowdelay
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OpusApplication where
toJSVal x = toJSVal (case x of
OpusApplicationVoip -> js_OpusApplicationVoip
OpusApplicationAudio -> js_OpusApplicationAudio
OpusApplicationLowdelay -> js_OpusApplicationLowdelay
)
instance FromJSVal OpusApplication where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OpusApplicationVoip, OpusApplicationVoip), (js_OpusApplicationAudio, OpusApplicationAudio), (js_OpusApplicationLowdelay, OpusApplicationLowdelay)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OpusApplication value") P.return
js_OpusApplicationVoip :: JSString
js_OpusApplicationVoip = "voip"
js_OpusApplicationAudio :: JSString
js_OpusApplicationAudio = "audio"
js_OpusApplicationLowdelay :: JSString
js_OpusApplicationLowdelay = "lowdelay"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OpusBitstreamFormat> (webcodecs-opus-codec-registration)
data OpusBitstreamFormat = OpusBitstreamFormatOpus
| OpusBitstreamFormatOgg
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OpusBitstreamFormat where
toJSVal x = toJSVal (case x of
OpusBitstreamFormatOpus -> js_OpusBitstreamFormatOpus
OpusBitstreamFormatOgg -> js_OpusBitstreamFormatOgg
)
instance FromJSVal OpusBitstreamFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OpusBitstreamFormatOpus, OpusBitstreamFormatOpus), (js_OpusBitstreamFormatOgg, OpusBitstreamFormatOgg)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OpusBitstreamFormat value") P.return
js_OpusBitstreamFormatOpus :: JSString
js_OpusBitstreamFormatOpus = "opus"
js_OpusBitstreamFormatOgg :: JSString
js_OpusBitstreamFormatOgg = "ogg"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OpusSignal> (webcodecs-opus-codec-registration)
data OpusSignal = OpusSignalAuto
| OpusSignalMusic
| OpusSignalVoice
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OpusSignal where
toJSVal x = toJSVal (case x of
OpusSignalAuto -> js_OpusSignalAuto
OpusSignalMusic -> js_OpusSignalMusic
OpusSignalVoice -> js_OpusSignalVoice
)
instance FromJSVal OpusSignal where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OpusSignalAuto, OpusSignalAuto), (js_OpusSignalMusic, OpusSignalMusic), (js_OpusSignalVoice, OpusSignalVoice)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OpusSignal value") P.return
js_OpusSignalAuto :: JSString
js_OpusSignalAuto = "auto"
js_OpusSignalMusic :: JSString
js_OpusSignalMusic = "music"
js_OpusSignalVoice :: JSString
js_OpusSignalVoice = "voice"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OrientationLockType> (screen-orientation)
data OrientationLockType = OrientationLockTypeAny
| OrientationLockTypeNatural
| OrientationLockTypeLandscape
| OrientationLockTypePortrait
| OrientationLockTypePortraitPrimary
| OrientationLockTypePortraitSecondary
| OrientationLockTypeLandscapePrimary
| OrientationLockTypeLandscapeSecondary
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OrientationLockType where
toJSVal x = toJSVal (case x of
OrientationLockTypeAny -> js_OrientationLockTypeAny
OrientationLockTypeNatural -> js_OrientationLockTypeNatural
OrientationLockTypeLandscape -> js_OrientationLockTypeLandscape
OrientationLockTypePortrait -> js_OrientationLockTypePortrait
OrientationLockTypePortraitPrimary -> js_OrientationLockTypePortraitPrimary
OrientationLockTypePortraitSecondary -> js_OrientationLockTypePortraitSecondary
OrientationLockTypeLandscapePrimary -> js_OrientationLockTypeLandscapePrimary
OrientationLockTypeLandscapeSecondary -> js_OrientationLockTypeLandscapeSecondary
)
instance FromJSVal OrientationLockType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OrientationLockTypeAny, OrientationLockTypeAny), (js_OrientationLockTypeNatural, OrientationLockTypeNatural), (js_OrientationLockTypeLandscape, OrientationLockTypeLandscape), (js_OrientationLockTypePortrait, OrientationLockTypePortrait), (js_OrientationLockTypePortraitPrimary, OrientationLockTypePortraitPrimary), (js_OrientationLockTypePortraitSecondary, OrientationLockTypePortraitSecondary), (js_OrientationLockTypeLandscapePrimary, OrientationLockTypeLandscapePrimary), (js_OrientationLockTypeLandscapeSecondary, OrientationLockTypeLandscapeSecondary)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OrientationLockType value") P.return
js_OrientationLockTypeAny :: JSString
js_OrientationLockTypeAny = "any"
js_OrientationLockTypeNatural :: JSString
js_OrientationLockTypeNatural = "natural"
js_OrientationLockTypeLandscape :: JSString
js_OrientationLockTypeLandscape = "landscape"
js_OrientationLockTypePortrait :: JSString
js_OrientationLockTypePortrait = "portrait"
js_OrientationLockTypePortraitPrimary :: JSString
js_OrientationLockTypePortraitPrimary = "portrait-primary"
js_OrientationLockTypePortraitSecondary :: JSString
js_OrientationLockTypePortraitSecondary = "portrait-secondary"
js_OrientationLockTypeLandscapePrimary :: JSString
js_OrientationLockTypeLandscapePrimary = "landscape-primary"
js_OrientationLockTypeLandscapeSecondary :: JSString
js_OrientationLockTypeLandscapeSecondary = "landscape-secondary"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OrientationType> (screen-orientation)
data OrientationType = OrientationTypePortraitPrimary
| OrientationTypePortraitSecondary
| OrientationTypeLandscapePrimary
| OrientationTypeLandscapeSecondary
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OrientationType where
toJSVal x = toJSVal (case x of
OrientationTypePortraitPrimary -> js_OrientationTypePortraitPrimary
OrientationTypePortraitSecondary -> js_OrientationTypePortraitSecondary
OrientationTypeLandscapePrimary -> js_OrientationTypeLandscapePrimary
OrientationTypeLandscapeSecondary -> js_OrientationTypeLandscapeSecondary
)
instance FromJSVal OrientationType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OrientationTypePortraitPrimary, OrientationTypePortraitPrimary), (js_OrientationTypePortraitSecondary, OrientationTypePortraitSecondary), (js_OrientationTypeLandscapePrimary, OrientationTypeLandscapePrimary), (js_OrientationTypeLandscapeSecondary, OrientationTypeLandscapeSecondary)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OrientationType value") P.return
js_OrientationTypePortraitPrimary :: JSString
js_OrientationTypePortraitPrimary = "portrait-primary"
js_OrientationTypePortraitSecondary :: JSString
js_OrientationTypePortraitSecondary = "portrait-secondary"
js_OrientationTypeLandscapePrimary :: JSString
js_OrientationTypeLandscapePrimary = "landscape-primary"
js_OrientationTypeLandscapeSecondary :: JSString
js_OrientationTypeLandscapeSecondary = "landscape-secondary"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OscillatorType> (webaudio-1.1)
data OscillatorType = OscillatorTypeSine
| OscillatorTypeSquare
| OscillatorTypeSawtooth
| OscillatorTypeTriangle
| OscillatorTypeCustom
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OscillatorType where
toJSVal x = toJSVal (case x of
OscillatorTypeSine -> js_OscillatorTypeSine
OscillatorTypeSquare -> js_OscillatorTypeSquare
OscillatorTypeSawtooth -> js_OscillatorTypeSawtooth
OscillatorTypeTriangle -> js_OscillatorTypeTriangle
OscillatorTypeCustom -> js_OscillatorTypeCustom
)
instance FromJSVal OscillatorType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OscillatorTypeSine, OscillatorTypeSine), (js_OscillatorTypeSquare, OscillatorTypeSquare), (js_OscillatorTypeSawtooth, OscillatorTypeSawtooth), (js_OscillatorTypeTriangle, OscillatorTypeTriangle), (js_OscillatorTypeCustom, OscillatorTypeCustom)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OscillatorType value") P.return
js_OscillatorTypeSine :: JSString
js_OscillatorTypeSine = "sine"
js_OscillatorTypeSquare :: JSString
js_OscillatorTypeSquare = "square"
js_OscillatorTypeSawtooth :: JSString
js_OscillatorTypeSawtooth = "sawtooth"
js_OscillatorTypeTriangle :: JSString
js_OscillatorTypeTriangle = "triangle"
js_OscillatorTypeCustom :: JSString
js_OscillatorTypeCustom = "custom"
-- | <https://developer.mozilla.org/en-US/docs/Web/API OverSampleType> (webaudio-1.1)
data OverSampleType = OverSampleTypeNone
| OverSampleType2x
| OverSampleType4x
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal OverSampleType where
toJSVal x = toJSVal (case x of
OverSampleTypeNone -> js_OverSampleTypeNone
OverSampleType2x -> js_OverSampleType2x
OverSampleType4x -> js_OverSampleType4x
)
instance FromJSVal OverSampleType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_OverSampleTypeNone, OverSampleTypeNone), (js_OverSampleType2x, OverSampleType2x), (js_OverSampleType4x, OverSampleType4x)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected OverSampleType value") P.return
js_OverSampleTypeNone :: JSString
js_OverSampleTypeNone = "none"
js_OverSampleType2x :: JSString
js_OverSampleType2x = "2x"
js_OverSampleType4x :: JSString
js_OverSampleType4x = "4x"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PanningModelType> (webaudio-1.1)
data PanningModelType = PanningModelTypeEqualpower
| PanningModelTypeHRTF
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PanningModelType where
toJSVal x = toJSVal (case x of
PanningModelTypeEqualpower -> js_PanningModelTypeEqualpower
PanningModelTypeHRTF -> js_PanningModelTypeHRTF
)
instance FromJSVal PanningModelType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PanningModelTypeEqualpower, PanningModelTypeEqualpower), (js_PanningModelTypeHRTF, PanningModelTypeHRTF)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PanningModelType value") P.return
js_PanningModelTypeEqualpower :: JSString
js_PanningModelTypeEqualpower = "equalpower"
js_PanningModelTypeHRTF :: JSString
js_PanningModelTypeHRTF = "HRTF"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ParityType> (serial)
data ParityType = ParityTypeNone
| ParityTypeEven
| ParityTypeOdd
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ParityType where
toJSVal x = toJSVal (case x of
ParityTypeNone -> js_ParityTypeNone
ParityTypeEven -> js_ParityTypeEven
ParityTypeOdd -> js_ParityTypeOdd
)
instance FromJSVal ParityType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ParityTypeNone, ParityTypeNone), (js_ParityTypeEven, ParityTypeEven), (js_ParityTypeOdd, ParityTypeOdd)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ParityType value") P.return
js_ParityTypeNone :: JSString
js_ParityTypeNone = "none"
js_ParityTypeEven :: JSString
js_ParityTypeEven = "even"
js_ParityTypeOdd :: JSString
js_ParityTypeOdd = "odd"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PaymentComplete> (payment-request)
data PaymentComplete = PaymentCompleteFail
| PaymentCompleteSuccess
| PaymentCompleteUnknown
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PaymentComplete where
toJSVal x = toJSVal (case x of
PaymentCompleteFail -> js_PaymentCompleteFail
PaymentCompleteSuccess -> js_PaymentCompleteSuccess
PaymentCompleteUnknown -> js_PaymentCompleteUnknown
)
instance FromJSVal PaymentComplete where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PaymentCompleteFail, PaymentCompleteFail), (js_PaymentCompleteSuccess, PaymentCompleteSuccess), (js_PaymentCompleteUnknown, PaymentCompleteUnknown)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PaymentComplete value") P.return
js_PaymentCompleteFail :: JSString
js_PaymentCompleteFail = "fail"
js_PaymentCompleteSuccess :: JSString
js_PaymentCompleteSuccess = "success"
js_PaymentCompleteUnknown :: JSString
js_PaymentCompleteUnknown = "unknown"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PaymentShippingType> (payment-request)
data PaymentShippingType = PaymentShippingTypeShipping
| PaymentShippingTypeDelivery
| PaymentShippingTypePickup
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PaymentShippingType where
toJSVal x = toJSVal (case x of
PaymentShippingTypeShipping -> js_PaymentShippingTypeShipping
PaymentShippingTypeDelivery -> js_PaymentShippingTypeDelivery
PaymentShippingTypePickup -> js_PaymentShippingTypePickup
)
instance FromJSVal PaymentShippingType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PaymentShippingTypeShipping, PaymentShippingTypeShipping), (js_PaymentShippingTypeDelivery, PaymentShippingTypeDelivery), (js_PaymentShippingTypePickup, PaymentShippingTypePickup)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PaymentShippingType value") P.return
js_PaymentShippingTypeShipping :: JSString
js_PaymentShippingTypeShipping = "shipping"
js_PaymentShippingTypeDelivery :: JSString
js_PaymentShippingTypeDelivery = "delivery"
js_PaymentShippingTypePickup :: JSString
js_PaymentShippingTypePickup = "pickup"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PermissionState> (permissions)
data PermissionState = PermissionStateGranted
| PermissionStateDenied
| PermissionStatePrompt
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PermissionState where
toJSVal x = toJSVal (case x of
PermissionStateGranted -> js_PermissionStateGranted
PermissionStateDenied -> js_PermissionStateDenied
PermissionStatePrompt -> js_PermissionStatePrompt
)
instance FromJSVal PermissionState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PermissionStateGranted, PermissionStateGranted), (js_PermissionStateDenied, PermissionStateDenied), (js_PermissionStatePrompt, PermissionStatePrompt)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PermissionState value") P.return
js_PermissionStateGranted :: JSString
js_PermissionStateGranted = "granted"
js_PermissionStateDenied :: JSString
js_PermissionStateDenied = "denied"
js_PermissionStatePrompt :: JSString
js_PermissionStatePrompt = "prompt"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PlaybackDirection> (web-animations-1)
data PlaybackDirection = PlaybackDirectionNormal
| PlaybackDirectionReverse
| PlaybackDirectionAlternate
| PlaybackDirectionAlternateReverse
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PlaybackDirection where
toJSVal x = toJSVal (case x of
PlaybackDirectionNormal -> js_PlaybackDirectionNormal
PlaybackDirectionReverse -> js_PlaybackDirectionReverse
PlaybackDirectionAlternate -> js_PlaybackDirectionAlternate
PlaybackDirectionAlternateReverse -> js_PlaybackDirectionAlternateReverse
)
instance FromJSVal PlaybackDirection where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PlaybackDirectionNormal, PlaybackDirectionNormal), (js_PlaybackDirectionReverse, PlaybackDirectionReverse), (js_PlaybackDirectionAlternate, PlaybackDirectionAlternate), (js_PlaybackDirectionAlternateReverse, PlaybackDirectionAlternateReverse)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PlaybackDirection value") P.return
js_PlaybackDirectionNormal :: JSString
js_PlaybackDirectionNormal = "normal"
js_PlaybackDirectionReverse :: JSString
js_PlaybackDirectionReverse = "reverse"
js_PlaybackDirectionAlternate :: JSString
js_PlaybackDirectionAlternate = "alternate"
js_PlaybackDirectionAlternateReverse :: JSString
js_PlaybackDirectionAlternateReverse = "alternate-reverse"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PositionAlignSetting> (webvtt1)
data PositionAlignSetting = PositionAlignSettingLineLeft
| PositionAlignSettingCenter
| PositionAlignSettingLineRight
| PositionAlignSettingAuto
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PositionAlignSetting where
toJSVal x = toJSVal (case x of
PositionAlignSettingLineLeft -> js_PositionAlignSettingLineLeft
PositionAlignSettingCenter -> js_PositionAlignSettingCenter
PositionAlignSettingLineRight -> js_PositionAlignSettingLineRight
PositionAlignSettingAuto -> js_PositionAlignSettingAuto
)
instance FromJSVal PositionAlignSetting where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PositionAlignSettingLineLeft, PositionAlignSettingLineLeft), (js_PositionAlignSettingCenter, PositionAlignSettingCenter), (js_PositionAlignSettingLineRight, PositionAlignSettingLineRight), (js_PositionAlignSettingAuto, PositionAlignSettingAuto)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PositionAlignSetting value") P.return
js_PositionAlignSettingLineLeft :: JSString
js_PositionAlignSettingLineLeft = "line-left"
js_PositionAlignSettingCenter :: JSString
js_PositionAlignSettingCenter = "center"
js_PositionAlignSettingLineRight :: JSString
js_PositionAlignSettingLineRight = "line-right"
js_PositionAlignSettingAuto :: JSString
js_PositionAlignSettingAuto = "auto"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PredefinedColorSpace> (html)
data PredefinedColorSpace = PredefinedColorSpaceSrgb
| PredefinedColorSpaceSrgbLinear
| PredefinedColorSpaceDisplayP3
| PredefinedColorSpaceDisplayP3Linear
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PredefinedColorSpace where
toJSVal x = toJSVal (case x of
PredefinedColorSpaceSrgb -> js_PredefinedColorSpaceSrgb
PredefinedColorSpaceSrgbLinear -> js_PredefinedColorSpaceSrgbLinear
PredefinedColorSpaceDisplayP3 -> js_PredefinedColorSpaceDisplayP3
PredefinedColorSpaceDisplayP3Linear -> js_PredefinedColorSpaceDisplayP3Linear
)
instance FromJSVal PredefinedColorSpace where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PredefinedColorSpaceSrgb, PredefinedColorSpaceSrgb), (js_PredefinedColorSpaceSrgbLinear, PredefinedColorSpaceSrgbLinear), (js_PredefinedColorSpaceDisplayP3, PredefinedColorSpaceDisplayP3), (js_PredefinedColorSpaceDisplayP3Linear, PredefinedColorSpaceDisplayP3Linear)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PredefinedColorSpace value") P.return
js_PredefinedColorSpaceSrgb :: JSString
js_PredefinedColorSpaceSrgb = "srgb"
js_PredefinedColorSpaceSrgbLinear :: JSString
js_PredefinedColorSpaceSrgbLinear = "srgb-linear"
js_PredefinedColorSpaceDisplayP3 :: JSString
js_PredefinedColorSpaceDisplayP3 = "display-p3"
js_PredefinedColorSpaceDisplayP3Linear :: JSString
js_PredefinedColorSpaceDisplayP3Linear = "display-p3-linear"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PresentationStyle> (clipboard-apis)
data PresentationStyle = PresentationStyleUnspecified
| PresentationStyleInline
| PresentationStyleAttachment
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PresentationStyle where
toJSVal x = toJSVal (case x of
PresentationStyleUnspecified -> js_PresentationStyleUnspecified
PresentationStyleInline -> js_PresentationStyleInline
PresentationStyleAttachment -> js_PresentationStyleAttachment
)
instance FromJSVal PresentationStyle where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PresentationStyleUnspecified, PresentationStyleUnspecified), (js_PresentationStyleInline, PresentationStyleInline), (js_PresentationStyleAttachment, PresentationStyleAttachment)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PresentationStyle value") P.return
js_PresentationStyleUnspecified :: JSString
js_PresentationStyleUnspecified = "unspecified"
js_PresentationStyleInline :: JSString
js_PresentationStyleInline = "inline"
js_PresentationStyleAttachment :: JSString
js_PresentationStyleAttachment = "attachment"
-- | <https://developer.mozilla.org/en-US/docs/Web/API PushEncryptionKeyName> (push-api)
data PushEncryptionKeyName = PushEncryptionKeyNameP256dh
| PushEncryptionKeyNameAuth
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal PushEncryptionKeyName where
toJSVal x = toJSVal (case x of
PushEncryptionKeyNameP256dh -> js_PushEncryptionKeyNameP256dh
PushEncryptionKeyNameAuth -> js_PushEncryptionKeyNameAuth
)
instance FromJSVal PushEncryptionKeyName where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_PushEncryptionKeyNameP256dh, PushEncryptionKeyNameP256dh), (js_PushEncryptionKeyNameAuth, PushEncryptionKeyNameAuth)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected PushEncryptionKeyName value") P.return
js_PushEncryptionKeyNameP256dh :: JSString
js_PushEncryptionKeyNameP256dh = "p256dh"
js_PushEncryptionKeyNameAuth :: JSString
js_PushEncryptionKeyNameAuth = "auth"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCBundlePolicy> (webrtc)
data RTCBundlePolicy = RTCBundlePolicyBalanced
| RTCBundlePolicyMaxCompat
| RTCBundlePolicyMaxBundle
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCBundlePolicy where
toJSVal x = toJSVal (case x of
RTCBundlePolicyBalanced -> js_RTCBundlePolicyBalanced
RTCBundlePolicyMaxCompat -> js_RTCBundlePolicyMaxCompat
RTCBundlePolicyMaxBundle -> js_RTCBundlePolicyMaxBundle
)
instance FromJSVal RTCBundlePolicy where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCBundlePolicyBalanced, RTCBundlePolicyBalanced), (js_RTCBundlePolicyMaxCompat, RTCBundlePolicyMaxCompat), (js_RTCBundlePolicyMaxBundle, RTCBundlePolicyMaxBundle)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCBundlePolicy value") P.return
js_RTCBundlePolicyBalanced :: JSString
js_RTCBundlePolicyBalanced = "balanced"
js_RTCBundlePolicyMaxCompat :: JSString
js_RTCBundlePolicyMaxCompat = "max-compat"
js_RTCBundlePolicyMaxBundle :: JSString
js_RTCBundlePolicyMaxBundle = "max-bundle"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCDataChannelState> (webrtc)
data RTCDataChannelState = RTCDataChannelStateConnecting
| RTCDataChannelStateOpen
| RTCDataChannelStateClosing
| RTCDataChannelStateClosed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCDataChannelState where
toJSVal x = toJSVal (case x of
RTCDataChannelStateConnecting -> js_RTCDataChannelStateConnecting
RTCDataChannelStateOpen -> js_RTCDataChannelStateOpen
RTCDataChannelStateClosing -> js_RTCDataChannelStateClosing
RTCDataChannelStateClosed -> js_RTCDataChannelStateClosed
)
instance FromJSVal RTCDataChannelState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCDataChannelStateConnecting, RTCDataChannelStateConnecting), (js_RTCDataChannelStateOpen, RTCDataChannelStateOpen), (js_RTCDataChannelStateClosing, RTCDataChannelStateClosing), (js_RTCDataChannelStateClosed, RTCDataChannelStateClosed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCDataChannelState value") P.return
js_RTCDataChannelStateConnecting :: JSString
js_RTCDataChannelStateConnecting = "connecting"
js_RTCDataChannelStateOpen :: JSString
js_RTCDataChannelStateOpen = "open"
js_RTCDataChannelStateClosing :: JSString
js_RTCDataChannelStateClosing = "closing"
js_RTCDataChannelStateClosed :: JSString
js_RTCDataChannelStateClosed = "closed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCDegradationPreference> (mst-content-hint)
data RTCDegradationPreference = RTCDegradationPreferenceMaintainFramerate
| RTCDegradationPreferenceMaintainResolution
| RTCDegradationPreferenceBalanced
| RTCDegradationPreferenceMaintainFramerateAndResolution
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCDegradationPreference where
toJSVal x = toJSVal (case x of
RTCDegradationPreferenceMaintainFramerate -> js_RTCDegradationPreferenceMaintainFramerate
RTCDegradationPreferenceMaintainResolution -> js_RTCDegradationPreferenceMaintainResolution
RTCDegradationPreferenceBalanced -> js_RTCDegradationPreferenceBalanced
RTCDegradationPreferenceMaintainFramerateAndResolution -> js_RTCDegradationPreferenceMaintainFramerateAndResolution
)
instance FromJSVal RTCDegradationPreference where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCDegradationPreferenceMaintainFramerate, RTCDegradationPreferenceMaintainFramerate), (js_RTCDegradationPreferenceMaintainResolution, RTCDegradationPreferenceMaintainResolution), (js_RTCDegradationPreferenceBalanced, RTCDegradationPreferenceBalanced), (js_RTCDegradationPreferenceMaintainFramerateAndResolution, RTCDegradationPreferenceMaintainFramerateAndResolution)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCDegradationPreference value") P.return
js_RTCDegradationPreferenceMaintainFramerate :: JSString
js_RTCDegradationPreferenceMaintainFramerate = "maintain-framerate"
js_RTCDegradationPreferenceMaintainResolution :: JSString
js_RTCDegradationPreferenceMaintainResolution = "maintain-resolution"
js_RTCDegradationPreferenceBalanced :: JSString
js_RTCDegradationPreferenceBalanced = "balanced"
js_RTCDegradationPreferenceMaintainFramerateAndResolution :: JSString
js_RTCDegradationPreferenceMaintainFramerateAndResolution = "maintain-framerate-and-resolution"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCDtlsTransportState> (webrtc)
data RTCDtlsTransportState = RTCDtlsTransportStateNew
| RTCDtlsTransportStateConnecting
| RTCDtlsTransportStateConnected
| RTCDtlsTransportStateClosed
| RTCDtlsTransportStateFailed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCDtlsTransportState where
toJSVal x = toJSVal (case x of
RTCDtlsTransportStateNew -> js_RTCDtlsTransportStateNew
RTCDtlsTransportStateConnecting -> js_RTCDtlsTransportStateConnecting
RTCDtlsTransportStateConnected -> js_RTCDtlsTransportStateConnected
RTCDtlsTransportStateClosed -> js_RTCDtlsTransportStateClosed
RTCDtlsTransportStateFailed -> js_RTCDtlsTransportStateFailed
)
instance FromJSVal RTCDtlsTransportState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCDtlsTransportStateNew, RTCDtlsTransportStateNew), (js_RTCDtlsTransportStateConnecting, RTCDtlsTransportStateConnecting), (js_RTCDtlsTransportStateConnected, RTCDtlsTransportStateConnected), (js_RTCDtlsTransportStateClosed, RTCDtlsTransportStateClosed), (js_RTCDtlsTransportStateFailed, RTCDtlsTransportStateFailed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCDtlsTransportState value") P.return
js_RTCDtlsTransportStateNew :: JSString
js_RTCDtlsTransportStateNew = "new"
js_RTCDtlsTransportStateConnecting :: JSString
js_RTCDtlsTransportStateConnecting = "connecting"
js_RTCDtlsTransportStateConnected :: JSString
js_RTCDtlsTransportStateConnected = "connected"
js_RTCDtlsTransportStateClosed :: JSString
js_RTCDtlsTransportStateClosed = "closed"
js_RTCDtlsTransportStateFailed :: JSString
js_RTCDtlsTransportStateFailed = "failed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCErrorDetailType> (webrtc)
data RTCErrorDetailType = RTCErrorDetailTypeDataChannelFailure
| RTCErrorDetailTypeDtlsFailure
| RTCErrorDetailTypeFingerprintFailure
| RTCErrorDetailTypeSctpFailure
| RTCErrorDetailTypeSdpSyntaxError
| RTCErrorDetailTypeHardwareEncoderNotAvailable
| RTCErrorDetailTypeHardwareEncoderError
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCErrorDetailType where
toJSVal x = toJSVal (case x of
RTCErrorDetailTypeDataChannelFailure -> js_RTCErrorDetailTypeDataChannelFailure
RTCErrorDetailTypeDtlsFailure -> js_RTCErrorDetailTypeDtlsFailure
RTCErrorDetailTypeFingerprintFailure -> js_RTCErrorDetailTypeFingerprintFailure
RTCErrorDetailTypeSctpFailure -> js_RTCErrorDetailTypeSctpFailure
RTCErrorDetailTypeSdpSyntaxError -> js_RTCErrorDetailTypeSdpSyntaxError
RTCErrorDetailTypeHardwareEncoderNotAvailable -> js_RTCErrorDetailTypeHardwareEncoderNotAvailable
RTCErrorDetailTypeHardwareEncoderError -> js_RTCErrorDetailTypeHardwareEncoderError
)
instance FromJSVal RTCErrorDetailType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCErrorDetailTypeDataChannelFailure, RTCErrorDetailTypeDataChannelFailure), (js_RTCErrorDetailTypeDtlsFailure, RTCErrorDetailTypeDtlsFailure), (js_RTCErrorDetailTypeFingerprintFailure, RTCErrorDetailTypeFingerprintFailure), (js_RTCErrorDetailTypeSctpFailure, RTCErrorDetailTypeSctpFailure), (js_RTCErrorDetailTypeSdpSyntaxError, RTCErrorDetailTypeSdpSyntaxError), (js_RTCErrorDetailTypeHardwareEncoderNotAvailable, RTCErrorDetailTypeHardwareEncoderNotAvailable), (js_RTCErrorDetailTypeHardwareEncoderError, RTCErrorDetailTypeHardwareEncoderError)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCErrorDetailType value") P.return
js_RTCErrorDetailTypeDataChannelFailure :: JSString
js_RTCErrorDetailTypeDataChannelFailure = "data-channel-failure"
js_RTCErrorDetailTypeDtlsFailure :: JSString
js_RTCErrorDetailTypeDtlsFailure = "dtls-failure"
js_RTCErrorDetailTypeFingerprintFailure :: JSString
js_RTCErrorDetailTypeFingerprintFailure = "fingerprint-failure"
js_RTCErrorDetailTypeSctpFailure :: JSString
js_RTCErrorDetailTypeSctpFailure = "sctp-failure"
js_RTCErrorDetailTypeSdpSyntaxError :: JSString
js_RTCErrorDetailTypeSdpSyntaxError = "sdp-syntax-error"
js_RTCErrorDetailTypeHardwareEncoderNotAvailable :: JSString
js_RTCErrorDetailTypeHardwareEncoderNotAvailable = "hardware-encoder-not-available"
js_RTCErrorDetailTypeHardwareEncoderError :: JSString
js_RTCErrorDetailTypeHardwareEncoderError = "hardware-encoder-error"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceCandidateType> (webrtc)
data RTCIceCandidateType = RTCIceCandidateTypeHost
| RTCIceCandidateTypeSrflx
| RTCIceCandidateTypePrflx
| RTCIceCandidateTypeRelay
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceCandidateType where
toJSVal x = toJSVal (case x of
RTCIceCandidateTypeHost -> js_RTCIceCandidateTypeHost
RTCIceCandidateTypeSrflx -> js_RTCIceCandidateTypeSrflx
RTCIceCandidateTypePrflx -> js_RTCIceCandidateTypePrflx
RTCIceCandidateTypeRelay -> js_RTCIceCandidateTypeRelay
)
instance FromJSVal RTCIceCandidateType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceCandidateTypeHost, RTCIceCandidateTypeHost), (js_RTCIceCandidateTypeSrflx, RTCIceCandidateTypeSrflx), (js_RTCIceCandidateTypePrflx, RTCIceCandidateTypePrflx), (js_RTCIceCandidateTypeRelay, RTCIceCandidateTypeRelay)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceCandidateType value") P.return
js_RTCIceCandidateTypeHost :: JSString
js_RTCIceCandidateTypeHost = "host"
js_RTCIceCandidateTypeSrflx :: JSString
js_RTCIceCandidateTypeSrflx = "srflx"
js_RTCIceCandidateTypePrflx :: JSString
js_RTCIceCandidateTypePrflx = "prflx"
js_RTCIceCandidateTypeRelay :: JSString
js_RTCIceCandidateTypeRelay = "relay"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceComponent> (webrtc)
data RTCIceComponent = RTCIceComponentRtp
| RTCIceComponentRtcp
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceComponent where
toJSVal x = toJSVal (case x of
RTCIceComponentRtp -> js_RTCIceComponentRtp
RTCIceComponentRtcp -> js_RTCIceComponentRtcp
)
instance FromJSVal RTCIceComponent where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceComponentRtp, RTCIceComponentRtp), (js_RTCIceComponentRtcp, RTCIceComponentRtcp)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceComponent value") P.return
js_RTCIceComponentRtp :: JSString
js_RTCIceComponentRtp = "rtp"
js_RTCIceComponentRtcp :: JSString
js_RTCIceComponentRtcp = "rtcp"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceConnectionState> (webrtc)
data RTCIceConnectionState = RTCIceConnectionStateClosed
| RTCIceConnectionStateFailed
| RTCIceConnectionStateDisconnected
| RTCIceConnectionStateNew
| RTCIceConnectionStateChecking
| RTCIceConnectionStateCompleted
| RTCIceConnectionStateConnected
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceConnectionState where
toJSVal x = toJSVal (case x of
RTCIceConnectionStateClosed -> js_RTCIceConnectionStateClosed
RTCIceConnectionStateFailed -> js_RTCIceConnectionStateFailed
RTCIceConnectionStateDisconnected -> js_RTCIceConnectionStateDisconnected
RTCIceConnectionStateNew -> js_RTCIceConnectionStateNew
RTCIceConnectionStateChecking -> js_RTCIceConnectionStateChecking
RTCIceConnectionStateCompleted -> js_RTCIceConnectionStateCompleted
RTCIceConnectionStateConnected -> js_RTCIceConnectionStateConnected
)
instance FromJSVal RTCIceConnectionState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceConnectionStateClosed, RTCIceConnectionStateClosed), (js_RTCIceConnectionStateFailed, RTCIceConnectionStateFailed), (js_RTCIceConnectionStateDisconnected, RTCIceConnectionStateDisconnected), (js_RTCIceConnectionStateNew, RTCIceConnectionStateNew), (js_RTCIceConnectionStateChecking, RTCIceConnectionStateChecking), (js_RTCIceConnectionStateCompleted, RTCIceConnectionStateCompleted), (js_RTCIceConnectionStateConnected, RTCIceConnectionStateConnected)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceConnectionState value") P.return
js_RTCIceConnectionStateClosed :: JSString
js_RTCIceConnectionStateClosed = "closed"
js_RTCIceConnectionStateFailed :: JSString
js_RTCIceConnectionStateFailed = "failed"
js_RTCIceConnectionStateDisconnected :: JSString
js_RTCIceConnectionStateDisconnected = "disconnected"
js_RTCIceConnectionStateNew :: JSString
js_RTCIceConnectionStateNew = "new"
js_RTCIceConnectionStateChecking :: JSString
js_RTCIceConnectionStateChecking = "checking"
js_RTCIceConnectionStateCompleted :: JSString
js_RTCIceConnectionStateCompleted = "completed"
js_RTCIceConnectionStateConnected :: JSString
js_RTCIceConnectionStateConnected = "connected"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceGathererState> (webrtc)
data RTCIceGathererState = RTCIceGathererStateNew
| RTCIceGathererStateGathering
| RTCIceGathererStateComplete
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceGathererState where
toJSVal x = toJSVal (case x of
RTCIceGathererStateNew -> js_RTCIceGathererStateNew
RTCIceGathererStateGathering -> js_RTCIceGathererStateGathering
RTCIceGathererStateComplete -> js_RTCIceGathererStateComplete
)
instance FromJSVal RTCIceGathererState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceGathererStateNew, RTCIceGathererStateNew), (js_RTCIceGathererStateGathering, RTCIceGathererStateGathering), (js_RTCIceGathererStateComplete, RTCIceGathererStateComplete)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceGathererState value") P.return
js_RTCIceGathererStateNew :: JSString
js_RTCIceGathererStateNew = "new"
js_RTCIceGathererStateGathering :: JSString
js_RTCIceGathererStateGathering = "gathering"
js_RTCIceGathererStateComplete :: JSString
js_RTCIceGathererStateComplete = "complete"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceGatheringState> (webrtc)
data RTCIceGatheringState = RTCIceGatheringStateNew
| RTCIceGatheringStateGathering
| RTCIceGatheringStateComplete
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceGatheringState where
toJSVal x = toJSVal (case x of
RTCIceGatheringStateNew -> js_RTCIceGatheringStateNew
RTCIceGatheringStateGathering -> js_RTCIceGatheringStateGathering
RTCIceGatheringStateComplete -> js_RTCIceGatheringStateComplete
)
instance FromJSVal RTCIceGatheringState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceGatheringStateNew, RTCIceGatheringStateNew), (js_RTCIceGatheringStateGathering, RTCIceGatheringStateGathering), (js_RTCIceGatheringStateComplete, RTCIceGatheringStateComplete)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceGatheringState value") P.return
js_RTCIceGatheringStateNew :: JSString
js_RTCIceGatheringStateNew = "new"
js_RTCIceGatheringStateGathering :: JSString
js_RTCIceGatheringStateGathering = "gathering"
js_RTCIceGatheringStateComplete :: JSString
js_RTCIceGatheringStateComplete = "complete"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceProtocol> (webrtc)
data RTCIceProtocol = RTCIceProtocolUdp
| RTCIceProtocolTcp
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceProtocol where
toJSVal x = toJSVal (case x of
RTCIceProtocolUdp -> js_RTCIceProtocolUdp
RTCIceProtocolTcp -> js_RTCIceProtocolTcp
)
instance FromJSVal RTCIceProtocol where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceProtocolUdp, RTCIceProtocolUdp), (js_RTCIceProtocolTcp, RTCIceProtocolTcp)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceProtocol value") P.return
js_RTCIceProtocolUdp :: JSString
js_RTCIceProtocolUdp = "udp"
js_RTCIceProtocolTcp :: JSString
js_RTCIceProtocolTcp = "tcp"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceRole> (webrtc)
data RTCIceRole = RTCIceRoleUnknown
| RTCIceRoleControlling
| RTCIceRoleControlled
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceRole where
toJSVal x = toJSVal (case x of
RTCIceRoleUnknown -> js_RTCIceRoleUnknown
RTCIceRoleControlling -> js_RTCIceRoleControlling
RTCIceRoleControlled -> js_RTCIceRoleControlled
)
instance FromJSVal RTCIceRole where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceRoleUnknown, RTCIceRoleUnknown), (js_RTCIceRoleControlling, RTCIceRoleControlling), (js_RTCIceRoleControlled, RTCIceRoleControlled)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceRole value") P.return
js_RTCIceRoleUnknown :: JSString
js_RTCIceRoleUnknown = "unknown"
js_RTCIceRoleControlling :: JSString
js_RTCIceRoleControlling = "controlling"
js_RTCIceRoleControlled :: JSString
js_RTCIceRoleControlled = "controlled"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceServerTransportProtocol> (webrtc)
data RTCIceServerTransportProtocol = RTCIceServerTransportProtocolUdp
| RTCIceServerTransportProtocolTcp
| RTCIceServerTransportProtocolTls
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceServerTransportProtocol where
toJSVal x = toJSVal (case x of
RTCIceServerTransportProtocolUdp -> js_RTCIceServerTransportProtocolUdp
RTCIceServerTransportProtocolTcp -> js_RTCIceServerTransportProtocolTcp
RTCIceServerTransportProtocolTls -> js_RTCIceServerTransportProtocolTls
)
instance FromJSVal RTCIceServerTransportProtocol where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceServerTransportProtocolUdp, RTCIceServerTransportProtocolUdp), (js_RTCIceServerTransportProtocolTcp, RTCIceServerTransportProtocolTcp), (js_RTCIceServerTransportProtocolTls, RTCIceServerTransportProtocolTls)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceServerTransportProtocol value") P.return
js_RTCIceServerTransportProtocolUdp :: JSString
js_RTCIceServerTransportProtocolUdp = "udp"
js_RTCIceServerTransportProtocolTcp :: JSString
js_RTCIceServerTransportProtocolTcp = "tcp"
js_RTCIceServerTransportProtocolTls :: JSString
js_RTCIceServerTransportProtocolTls = "tls"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceTcpCandidateType> (webrtc)
data RTCIceTcpCandidateType = RTCIceTcpCandidateTypeActive
| RTCIceTcpCandidateTypePassive
| RTCIceTcpCandidateTypeSo
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceTcpCandidateType where
toJSVal x = toJSVal (case x of
RTCIceTcpCandidateTypeActive -> js_RTCIceTcpCandidateTypeActive
RTCIceTcpCandidateTypePassive -> js_RTCIceTcpCandidateTypePassive
RTCIceTcpCandidateTypeSo -> js_RTCIceTcpCandidateTypeSo
)
instance FromJSVal RTCIceTcpCandidateType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceTcpCandidateTypeActive, RTCIceTcpCandidateTypeActive), (js_RTCIceTcpCandidateTypePassive, RTCIceTcpCandidateTypePassive), (js_RTCIceTcpCandidateTypeSo, RTCIceTcpCandidateTypeSo)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceTcpCandidateType value") P.return
js_RTCIceTcpCandidateTypeActive :: JSString
js_RTCIceTcpCandidateTypeActive = "active"
js_RTCIceTcpCandidateTypePassive :: JSString
js_RTCIceTcpCandidateTypePassive = "passive"
js_RTCIceTcpCandidateTypeSo :: JSString
js_RTCIceTcpCandidateTypeSo = "so"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceTransportPolicy> (webrtc)
data RTCIceTransportPolicy = RTCIceTransportPolicyRelay
| RTCIceTransportPolicyAll
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceTransportPolicy where
toJSVal x = toJSVal (case x of
RTCIceTransportPolicyRelay -> js_RTCIceTransportPolicyRelay
RTCIceTransportPolicyAll -> js_RTCIceTransportPolicyAll
)
instance FromJSVal RTCIceTransportPolicy where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceTransportPolicyRelay, RTCIceTransportPolicyRelay), (js_RTCIceTransportPolicyAll, RTCIceTransportPolicyAll)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceTransportPolicy value") P.return
js_RTCIceTransportPolicyRelay :: JSString
js_RTCIceTransportPolicyRelay = "relay"
js_RTCIceTransportPolicyAll :: JSString
js_RTCIceTransportPolicyAll = "all"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCIceTransportState> (webrtc)
data RTCIceTransportState = RTCIceTransportStateClosed
| RTCIceTransportStateFailed
| RTCIceTransportStateDisconnected
| RTCIceTransportStateNew
| RTCIceTransportStateChecking
| RTCIceTransportStateCompleted
| RTCIceTransportStateConnected
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCIceTransportState where
toJSVal x = toJSVal (case x of
RTCIceTransportStateClosed -> js_RTCIceTransportStateClosed
RTCIceTransportStateFailed -> js_RTCIceTransportStateFailed
RTCIceTransportStateDisconnected -> js_RTCIceTransportStateDisconnected
RTCIceTransportStateNew -> js_RTCIceTransportStateNew
RTCIceTransportStateChecking -> js_RTCIceTransportStateChecking
RTCIceTransportStateCompleted -> js_RTCIceTransportStateCompleted
RTCIceTransportStateConnected -> js_RTCIceTransportStateConnected
)
instance FromJSVal RTCIceTransportState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCIceTransportStateClosed, RTCIceTransportStateClosed), (js_RTCIceTransportStateFailed, RTCIceTransportStateFailed), (js_RTCIceTransportStateDisconnected, RTCIceTransportStateDisconnected), (js_RTCIceTransportStateNew, RTCIceTransportStateNew), (js_RTCIceTransportStateChecking, RTCIceTransportStateChecking), (js_RTCIceTransportStateCompleted, RTCIceTransportStateCompleted), (js_RTCIceTransportStateConnected, RTCIceTransportStateConnected)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCIceTransportState value") P.return
js_RTCIceTransportStateClosed :: JSString
js_RTCIceTransportStateClosed = "closed"
js_RTCIceTransportStateFailed :: JSString
js_RTCIceTransportStateFailed = "failed"
js_RTCIceTransportStateDisconnected :: JSString
js_RTCIceTransportStateDisconnected = "disconnected"
js_RTCIceTransportStateNew :: JSString
js_RTCIceTransportStateNew = "new"
js_RTCIceTransportStateChecking :: JSString
js_RTCIceTransportStateChecking = "checking"
js_RTCIceTransportStateCompleted :: JSString
js_RTCIceTransportStateCompleted = "completed"
js_RTCIceTransportStateConnected :: JSString
js_RTCIceTransportStateConnected = "connected"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCPeerConnectionState> (webrtc)
data RTCPeerConnectionState = RTCPeerConnectionStateClosed
| RTCPeerConnectionStateFailed
| RTCPeerConnectionStateDisconnected
| RTCPeerConnectionStateNew
| RTCPeerConnectionStateConnecting
| RTCPeerConnectionStateConnected
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCPeerConnectionState where
toJSVal x = toJSVal (case x of
RTCPeerConnectionStateClosed -> js_RTCPeerConnectionStateClosed
RTCPeerConnectionStateFailed -> js_RTCPeerConnectionStateFailed
RTCPeerConnectionStateDisconnected -> js_RTCPeerConnectionStateDisconnected
RTCPeerConnectionStateNew -> js_RTCPeerConnectionStateNew
RTCPeerConnectionStateConnecting -> js_RTCPeerConnectionStateConnecting
RTCPeerConnectionStateConnected -> js_RTCPeerConnectionStateConnected
)
instance FromJSVal RTCPeerConnectionState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCPeerConnectionStateClosed, RTCPeerConnectionStateClosed), (js_RTCPeerConnectionStateFailed, RTCPeerConnectionStateFailed), (js_RTCPeerConnectionStateDisconnected, RTCPeerConnectionStateDisconnected), (js_RTCPeerConnectionStateNew, RTCPeerConnectionStateNew), (js_RTCPeerConnectionStateConnecting, RTCPeerConnectionStateConnecting), (js_RTCPeerConnectionStateConnected, RTCPeerConnectionStateConnected)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCPeerConnectionState value") P.return
js_RTCPeerConnectionStateClosed :: JSString
js_RTCPeerConnectionStateClosed = "closed"
js_RTCPeerConnectionStateFailed :: JSString
js_RTCPeerConnectionStateFailed = "failed"
js_RTCPeerConnectionStateDisconnected :: JSString
js_RTCPeerConnectionStateDisconnected = "disconnected"
js_RTCPeerConnectionStateNew :: JSString
js_RTCPeerConnectionStateNew = "new"
js_RTCPeerConnectionStateConnecting :: JSString
js_RTCPeerConnectionStateConnecting = "connecting"
js_RTCPeerConnectionStateConnected :: JSString
js_RTCPeerConnectionStateConnected = "connected"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCPriorityType> (webrtc-priority)
data RTCPriorityType = RTCPriorityTypeVeryLow
| RTCPriorityTypeLow
| RTCPriorityTypeMedium
| RTCPriorityTypeHigh
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCPriorityType where
toJSVal x = toJSVal (case x of
RTCPriorityTypeVeryLow -> js_RTCPriorityTypeVeryLow
RTCPriorityTypeLow -> js_RTCPriorityTypeLow
RTCPriorityTypeMedium -> js_RTCPriorityTypeMedium
RTCPriorityTypeHigh -> js_RTCPriorityTypeHigh
)
instance FromJSVal RTCPriorityType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCPriorityTypeVeryLow, RTCPriorityTypeVeryLow), (js_RTCPriorityTypeLow, RTCPriorityTypeLow), (js_RTCPriorityTypeMedium, RTCPriorityTypeMedium), (js_RTCPriorityTypeHigh, RTCPriorityTypeHigh)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCPriorityType value") P.return
js_RTCPriorityTypeVeryLow :: JSString
js_RTCPriorityTypeVeryLow = "very-low"
js_RTCPriorityTypeLow :: JSString
js_RTCPriorityTypeLow = "low"
js_RTCPriorityTypeMedium :: JSString
js_RTCPriorityTypeMedium = "medium"
js_RTCPriorityTypeHigh :: JSString
js_RTCPriorityTypeHigh = "high"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCRtcpMuxPolicy> (webrtc)
data RTCRtcpMuxPolicy = RTCRtcpMuxPolicyRequire
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCRtcpMuxPolicy where
toJSVal x = toJSVal (case x of
RTCRtcpMuxPolicyRequire -> js_RTCRtcpMuxPolicyRequire
)
instance FromJSVal RTCRtcpMuxPolicy where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCRtcpMuxPolicyRequire, RTCRtcpMuxPolicyRequire)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCRtcpMuxPolicy value") P.return
js_RTCRtcpMuxPolicyRequire :: JSString
js_RTCRtcpMuxPolicyRequire = "require"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCRtpScriptTransformType> (webrtc-encoded-transform)
data RTCRtpScriptTransformType = RTCRtpScriptTransformTypeSframe
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCRtpScriptTransformType where
toJSVal x = toJSVal (case x of
RTCRtpScriptTransformTypeSframe -> js_RTCRtpScriptTransformTypeSframe
)
instance FromJSVal RTCRtpScriptTransformType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCRtpScriptTransformTypeSframe, RTCRtpScriptTransformTypeSframe)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCRtpScriptTransformType value") P.return
js_RTCRtpScriptTransformTypeSframe :: JSString
js_RTCRtpScriptTransformTypeSframe = "sframe"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCRtpTransceiverDirection> (webrtc)
data RTCRtpTransceiverDirection = RTCRtpTransceiverDirectionSendrecv
| RTCRtpTransceiverDirectionSendonly
| RTCRtpTransceiverDirectionRecvonly
| RTCRtpTransceiverDirectionInactive
| RTCRtpTransceiverDirectionStopped
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCRtpTransceiverDirection where
toJSVal x = toJSVal (case x of
RTCRtpTransceiverDirectionSendrecv -> js_RTCRtpTransceiverDirectionSendrecv
RTCRtpTransceiverDirectionSendonly -> js_RTCRtpTransceiverDirectionSendonly
RTCRtpTransceiverDirectionRecvonly -> js_RTCRtpTransceiverDirectionRecvonly
RTCRtpTransceiverDirectionInactive -> js_RTCRtpTransceiverDirectionInactive
RTCRtpTransceiverDirectionStopped -> js_RTCRtpTransceiverDirectionStopped
)
instance FromJSVal RTCRtpTransceiverDirection where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCRtpTransceiverDirectionSendrecv, RTCRtpTransceiverDirectionSendrecv), (js_RTCRtpTransceiverDirectionSendonly, RTCRtpTransceiverDirectionSendonly), (js_RTCRtpTransceiverDirectionRecvonly, RTCRtpTransceiverDirectionRecvonly), (js_RTCRtpTransceiverDirectionInactive, RTCRtpTransceiverDirectionInactive), (js_RTCRtpTransceiverDirectionStopped, RTCRtpTransceiverDirectionStopped)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCRtpTransceiverDirection value") P.return
js_RTCRtpTransceiverDirectionSendrecv :: JSString
js_RTCRtpTransceiverDirectionSendrecv = "sendrecv"
js_RTCRtpTransceiverDirectionSendonly :: JSString
js_RTCRtpTransceiverDirectionSendonly = "sendonly"
js_RTCRtpTransceiverDirectionRecvonly :: JSString
js_RTCRtpTransceiverDirectionRecvonly = "recvonly"
js_RTCRtpTransceiverDirectionInactive :: JSString
js_RTCRtpTransceiverDirectionInactive = "inactive"
js_RTCRtpTransceiverDirectionStopped :: JSString
js_RTCRtpTransceiverDirectionStopped = "stopped"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCSctpTransportState> (webrtc)
data RTCSctpTransportState = RTCSctpTransportStateConnecting
| RTCSctpTransportStateConnected
| RTCSctpTransportStateClosed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCSctpTransportState where
toJSVal x = toJSVal (case x of
RTCSctpTransportStateConnecting -> js_RTCSctpTransportStateConnecting
RTCSctpTransportStateConnected -> js_RTCSctpTransportStateConnected
RTCSctpTransportStateClosed -> js_RTCSctpTransportStateClosed
)
instance FromJSVal RTCSctpTransportState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCSctpTransportStateConnecting, RTCSctpTransportStateConnecting), (js_RTCSctpTransportStateConnected, RTCSctpTransportStateConnected), (js_RTCSctpTransportStateClosed, RTCSctpTransportStateClosed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCSctpTransportState value") P.return
js_RTCSctpTransportStateConnecting :: JSString
js_RTCSctpTransportStateConnecting = "connecting"
js_RTCSctpTransportStateConnected :: JSString
js_RTCSctpTransportStateConnected = "connected"
js_RTCSctpTransportStateClosed :: JSString
js_RTCSctpTransportStateClosed = "closed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCSdpType> (webrtc)
data RTCSdpType = RTCSdpTypeOffer
| RTCSdpTypePranswer
| RTCSdpTypeAnswer
| RTCSdpTypeRollback
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCSdpType where
toJSVal x = toJSVal (case x of
RTCSdpTypeOffer -> js_RTCSdpTypeOffer
RTCSdpTypePranswer -> js_RTCSdpTypePranswer
RTCSdpTypeAnswer -> js_RTCSdpTypeAnswer
RTCSdpTypeRollback -> js_RTCSdpTypeRollback
)
instance FromJSVal RTCSdpType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCSdpTypeOffer, RTCSdpTypeOffer), (js_RTCSdpTypePranswer, RTCSdpTypePranswer), (js_RTCSdpTypeAnswer, RTCSdpTypeAnswer), (js_RTCSdpTypeRollback, RTCSdpTypeRollback)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCSdpType value") P.return
js_RTCSdpTypeOffer :: JSString
js_RTCSdpTypeOffer = "offer"
js_RTCSdpTypePranswer :: JSString
js_RTCSdpTypePranswer = "pranswer"
js_RTCSdpTypeAnswer :: JSString
js_RTCSdpTypeAnswer = "answer"
js_RTCSdpTypeRollback :: JSString
js_RTCSdpTypeRollback = "rollback"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RTCSignalingState> (webrtc)
data RTCSignalingState = RTCSignalingStateStable
| RTCSignalingStateHaveLocalOffer
| RTCSignalingStateHaveRemoteOffer
| RTCSignalingStateHaveLocalPranswer
| RTCSignalingStateHaveRemotePranswer
| RTCSignalingStateClosed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RTCSignalingState where
toJSVal x = toJSVal (case x of
RTCSignalingStateStable -> js_RTCSignalingStateStable
RTCSignalingStateHaveLocalOffer -> js_RTCSignalingStateHaveLocalOffer
RTCSignalingStateHaveRemoteOffer -> js_RTCSignalingStateHaveRemoteOffer
RTCSignalingStateHaveLocalPranswer -> js_RTCSignalingStateHaveLocalPranswer
RTCSignalingStateHaveRemotePranswer -> js_RTCSignalingStateHaveRemotePranswer
RTCSignalingStateClosed -> js_RTCSignalingStateClosed
)
instance FromJSVal RTCSignalingState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RTCSignalingStateStable, RTCSignalingStateStable), (js_RTCSignalingStateHaveLocalOffer, RTCSignalingStateHaveLocalOffer), (js_RTCSignalingStateHaveRemoteOffer, RTCSignalingStateHaveRemoteOffer), (js_RTCSignalingStateHaveLocalPranswer, RTCSignalingStateHaveLocalPranswer), (js_RTCSignalingStateHaveRemotePranswer, RTCSignalingStateHaveRemotePranswer), (js_RTCSignalingStateClosed, RTCSignalingStateClosed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RTCSignalingState value") P.return
js_RTCSignalingStateStable :: JSString
js_RTCSignalingStateStable = "stable"
js_RTCSignalingStateHaveLocalOffer :: JSString
js_RTCSignalingStateHaveLocalOffer = "have-local-offer"
js_RTCSignalingStateHaveRemoteOffer :: JSString
js_RTCSignalingStateHaveRemoteOffer = "have-remote-offer"
js_RTCSignalingStateHaveLocalPranswer :: JSString
js_RTCSignalingStateHaveLocalPranswer = "have-local-pranswer"
js_RTCSignalingStateHaveRemotePranswer :: JSString
js_RTCSignalingStateHaveRemotePranswer = "have-remote-pranswer"
js_RTCSignalingStateClosed :: JSString
js_RTCSignalingStateClosed = "closed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ReadableStreamReaderMode> (streams)
data ReadableStreamReaderMode = ReadableStreamReaderModeByob
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ReadableStreamReaderMode where
toJSVal x = toJSVal (case x of
ReadableStreamReaderModeByob -> js_ReadableStreamReaderModeByob
)
instance FromJSVal ReadableStreamReaderMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ReadableStreamReaderModeByob, ReadableStreamReaderModeByob)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ReadableStreamReaderMode value") P.return
js_ReadableStreamReaderModeByob :: JSString
js_ReadableStreamReaderModeByob = "byob"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ReadableStreamType> (streams)
data ReadableStreamType = ReadableStreamTypeBytes
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ReadableStreamType where
toJSVal x = toJSVal (case x of
ReadableStreamTypeBytes -> js_ReadableStreamTypeBytes
)
instance FromJSVal ReadableStreamType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ReadableStreamTypeBytes, ReadableStreamTypeBytes)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ReadableStreamType value") P.return
js_ReadableStreamTypeBytes :: JSString
js_ReadableStreamTypeBytes = "bytes"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ReadyState> (media-source-2)
data ReadyState = ReadyStateClosed
| ReadyStateOpen
| ReadyStateEnded
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ReadyState where
toJSVal x = toJSVal (case x of
ReadyStateClosed -> js_ReadyStateClosed
ReadyStateOpen -> js_ReadyStateOpen
ReadyStateEnded -> js_ReadyStateEnded
)
instance FromJSVal ReadyState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ReadyStateClosed, ReadyStateClosed), (js_ReadyStateOpen, ReadyStateOpen), (js_ReadyStateEnded, ReadyStateEnded)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ReadyState value") P.return
js_ReadyStateClosed :: JSString
js_ReadyStateClosed = "closed"
js_ReadyStateOpen :: JSString
js_ReadyStateOpen = "open"
js_ReadyStateEnded :: JSString
js_ReadyStateEnded = "ended"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RecordingState> (mediastream-recording)
data RecordingState = RecordingStateInactive
| RecordingStateRecording
| RecordingStatePaused
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RecordingState where
toJSVal x = toJSVal (case x of
RecordingStateInactive -> js_RecordingStateInactive
RecordingStateRecording -> js_RecordingStateRecording
RecordingStatePaused -> js_RecordingStatePaused
)
instance FromJSVal RecordingState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RecordingStateInactive, RecordingStateInactive), (js_RecordingStateRecording, RecordingStateRecording), (js_RecordingStatePaused, RecordingStatePaused)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RecordingState value") P.return
js_RecordingStateInactive :: JSString
js_RecordingStateInactive = "inactive"
js_RecordingStateRecording :: JSString
js_RecordingStateRecording = "recording"
js_RecordingStatePaused :: JSString
js_RecordingStatePaused = "paused"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RedEyeReduction> (image-capture)
data RedEyeReduction = RedEyeReductionNever
| RedEyeReductionAlways
| RedEyeReductionControllable
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RedEyeReduction where
toJSVal x = toJSVal (case x of
RedEyeReductionNever -> js_RedEyeReductionNever
RedEyeReductionAlways -> js_RedEyeReductionAlways
RedEyeReductionControllable -> js_RedEyeReductionControllable
)
instance FromJSVal RedEyeReduction where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RedEyeReductionNever, RedEyeReductionNever), (js_RedEyeReductionAlways, RedEyeReductionAlways), (js_RedEyeReductionControllable, RedEyeReductionControllable)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RedEyeReduction value") P.return
js_RedEyeReductionNever :: JSString
js_RedEyeReductionNever = "never"
js_RedEyeReductionAlways :: JSString
js_RedEyeReductionAlways = "always"
js_RedEyeReductionControllable :: JSString
js_RedEyeReductionControllable = "controllable"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ReferrerPolicy> (referrer-policy)
data ReferrerPolicy = ReferrerPolicy
| ReferrerPolicyNoReferrer
| ReferrerPolicyNoReferrerWhenDowngrade
| ReferrerPolicySameOrigin
| ReferrerPolicyOrigin
| ReferrerPolicyStrictOrigin
| ReferrerPolicyOriginWhenCrossOrigin
| ReferrerPolicyStrictOriginWhenCrossOrigin
| ReferrerPolicyUnsafeUrl
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ReferrerPolicy where
toJSVal x = toJSVal (case x of
ReferrerPolicy -> js_ReferrerPolicy
ReferrerPolicyNoReferrer -> js_ReferrerPolicyNoReferrer
ReferrerPolicyNoReferrerWhenDowngrade -> js_ReferrerPolicyNoReferrerWhenDowngrade
ReferrerPolicySameOrigin -> js_ReferrerPolicySameOrigin
ReferrerPolicyOrigin -> js_ReferrerPolicyOrigin
ReferrerPolicyStrictOrigin -> js_ReferrerPolicyStrictOrigin
ReferrerPolicyOriginWhenCrossOrigin -> js_ReferrerPolicyOriginWhenCrossOrigin
ReferrerPolicyStrictOriginWhenCrossOrigin -> js_ReferrerPolicyStrictOriginWhenCrossOrigin
ReferrerPolicyUnsafeUrl -> js_ReferrerPolicyUnsafeUrl
)
instance FromJSVal ReferrerPolicy where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ReferrerPolicy, ReferrerPolicy), (js_ReferrerPolicyNoReferrer, ReferrerPolicyNoReferrer), (js_ReferrerPolicyNoReferrerWhenDowngrade, ReferrerPolicyNoReferrerWhenDowngrade), (js_ReferrerPolicySameOrigin, ReferrerPolicySameOrigin), (js_ReferrerPolicyOrigin, ReferrerPolicyOrigin), (js_ReferrerPolicyStrictOrigin, ReferrerPolicyStrictOrigin), (js_ReferrerPolicyOriginWhenCrossOrigin, ReferrerPolicyOriginWhenCrossOrigin), (js_ReferrerPolicyStrictOriginWhenCrossOrigin, ReferrerPolicyStrictOriginWhenCrossOrigin), (js_ReferrerPolicyUnsafeUrl, ReferrerPolicyUnsafeUrl)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ReferrerPolicy value") P.return
js_ReferrerPolicy :: JSString
js_ReferrerPolicy = ""
js_ReferrerPolicyNoReferrer :: JSString
js_ReferrerPolicyNoReferrer = "no-referrer"
js_ReferrerPolicyNoReferrerWhenDowngrade :: JSString
js_ReferrerPolicyNoReferrerWhenDowngrade = "no-referrer-when-downgrade"
js_ReferrerPolicySameOrigin :: JSString
js_ReferrerPolicySameOrigin = "same-origin"
js_ReferrerPolicyOrigin :: JSString
js_ReferrerPolicyOrigin = "origin"
js_ReferrerPolicyStrictOrigin :: JSString
js_ReferrerPolicyStrictOrigin = "strict-origin"
js_ReferrerPolicyOriginWhenCrossOrigin :: JSString
js_ReferrerPolicyOriginWhenCrossOrigin = "origin-when-cross-origin"
js_ReferrerPolicyStrictOriginWhenCrossOrigin :: JSString
js_ReferrerPolicyStrictOriginWhenCrossOrigin = "strict-origin-when-cross-origin"
js_ReferrerPolicyUnsafeUrl :: JSString
js_ReferrerPolicyUnsafeUrl = "unsafe-url"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RefreshPolicy> (trust-token-api)
data RefreshPolicy = RefreshPolicyNone
| RefreshPolicyRefresh
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RefreshPolicy where
toJSVal x = toJSVal (case x of
RefreshPolicyNone -> js_RefreshPolicyNone
RefreshPolicyRefresh -> js_RefreshPolicyRefresh
)
instance FromJSVal RefreshPolicy where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RefreshPolicyNone, RefreshPolicyNone), (js_RefreshPolicyRefresh, RefreshPolicyRefresh)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RefreshPolicy value") P.return
js_RefreshPolicyNone :: JSString
js_RefreshPolicyNone = "none"
js_RefreshPolicyRefresh :: JSString
js_RefreshPolicyRefresh = "refresh"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RemotePlaybackState> (remote-playback)
data RemotePlaybackState = RemotePlaybackStateConnecting
| RemotePlaybackStateConnected
| RemotePlaybackStateDisconnected
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RemotePlaybackState where
toJSVal x = toJSVal (case x of
RemotePlaybackStateConnecting -> js_RemotePlaybackStateConnecting
RemotePlaybackStateConnected -> js_RemotePlaybackStateConnected
RemotePlaybackStateDisconnected -> js_RemotePlaybackStateDisconnected
)
instance FromJSVal RemotePlaybackState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RemotePlaybackStateConnecting, RemotePlaybackStateConnecting), (js_RemotePlaybackStateConnected, RemotePlaybackStateConnected), (js_RemotePlaybackStateDisconnected, RemotePlaybackStateDisconnected)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RemotePlaybackState value") P.return
js_RemotePlaybackStateConnecting :: JSString
js_RemotePlaybackStateConnecting = "connecting"
js_RemotePlaybackStateConnected :: JSString
js_RemotePlaybackStateConnected = "connected"
js_RemotePlaybackStateDisconnected :: JSString
js_RemotePlaybackStateDisconnected = "disconnected"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RequestCache> (fetch)
data RequestCache = RequestCacheDefault
| RequestCacheNoStore
| RequestCacheReload
| RequestCacheNoCache
| RequestCacheForceCache
| RequestCacheOnlyIfCached
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RequestCache where
toJSVal x = toJSVal (case x of
RequestCacheDefault -> js_RequestCacheDefault
RequestCacheNoStore -> js_RequestCacheNoStore
RequestCacheReload -> js_RequestCacheReload
RequestCacheNoCache -> js_RequestCacheNoCache
RequestCacheForceCache -> js_RequestCacheForceCache
RequestCacheOnlyIfCached -> js_RequestCacheOnlyIfCached
)
instance FromJSVal RequestCache where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RequestCacheDefault, RequestCacheDefault), (js_RequestCacheNoStore, RequestCacheNoStore), (js_RequestCacheReload, RequestCacheReload), (js_RequestCacheNoCache, RequestCacheNoCache), (js_RequestCacheForceCache, RequestCacheForceCache), (js_RequestCacheOnlyIfCached, RequestCacheOnlyIfCached)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RequestCache value") P.return
js_RequestCacheDefault :: JSString
js_RequestCacheDefault = "default"
js_RequestCacheNoStore :: JSString
js_RequestCacheNoStore = "no-store"
js_RequestCacheReload :: JSString
js_RequestCacheReload = "reload"
js_RequestCacheNoCache :: JSString
js_RequestCacheNoCache = "no-cache"
js_RequestCacheForceCache :: JSString
js_RequestCacheForceCache = "force-cache"
js_RequestCacheOnlyIfCached :: JSString
js_RequestCacheOnlyIfCached = "only-if-cached"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RequestCredentials> (fetch)
data RequestCredentials = RequestCredentialsOmit
| RequestCredentialsSameOrigin
| RequestCredentialsInclude
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RequestCredentials where
toJSVal x = toJSVal (case x of
RequestCredentialsOmit -> js_RequestCredentialsOmit
RequestCredentialsSameOrigin -> js_RequestCredentialsSameOrigin
RequestCredentialsInclude -> js_RequestCredentialsInclude
)
instance FromJSVal RequestCredentials where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RequestCredentialsOmit, RequestCredentialsOmit), (js_RequestCredentialsSameOrigin, RequestCredentialsSameOrigin), (js_RequestCredentialsInclude, RequestCredentialsInclude)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RequestCredentials value") P.return
js_RequestCredentialsOmit :: JSString
js_RequestCredentialsOmit = "omit"
js_RequestCredentialsSameOrigin :: JSString
js_RequestCredentialsSameOrigin = "same-origin"
js_RequestCredentialsInclude :: JSString
js_RequestCredentialsInclude = "include"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RequestDestination> (fetch)
data RequestDestination = RequestDestination
| RequestDestinationAudio
| RequestDestinationAudioworklet
| RequestDestinationDocument
| RequestDestinationEmbed
| RequestDestinationFont
| RequestDestinationFrame
| RequestDestinationIframe
| RequestDestinationImage
| RequestDestinationJson
| RequestDestinationManifest
| RequestDestinationObject
| RequestDestinationPaintworklet
| RequestDestinationReport
| RequestDestinationScript
| RequestDestinationSharedworker
| RequestDestinationStyle
| RequestDestinationText
| RequestDestinationTrack
| RequestDestinationVideo
| RequestDestinationWorker
| RequestDestinationXslt
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RequestDestination where
toJSVal x = toJSVal (case x of
RequestDestination -> js_RequestDestination
RequestDestinationAudio -> js_RequestDestinationAudio
RequestDestinationAudioworklet -> js_RequestDestinationAudioworklet
RequestDestinationDocument -> js_RequestDestinationDocument
RequestDestinationEmbed -> js_RequestDestinationEmbed
RequestDestinationFont -> js_RequestDestinationFont
RequestDestinationFrame -> js_RequestDestinationFrame
RequestDestinationIframe -> js_RequestDestinationIframe
RequestDestinationImage -> js_RequestDestinationImage
RequestDestinationJson -> js_RequestDestinationJson
RequestDestinationManifest -> js_RequestDestinationManifest
RequestDestinationObject -> js_RequestDestinationObject
RequestDestinationPaintworklet -> js_RequestDestinationPaintworklet
RequestDestinationReport -> js_RequestDestinationReport
RequestDestinationScript -> js_RequestDestinationScript
RequestDestinationSharedworker -> js_RequestDestinationSharedworker
RequestDestinationStyle -> js_RequestDestinationStyle
RequestDestinationText -> js_RequestDestinationText
RequestDestinationTrack -> js_RequestDestinationTrack
RequestDestinationVideo -> js_RequestDestinationVideo
RequestDestinationWorker -> js_RequestDestinationWorker
RequestDestinationXslt -> js_RequestDestinationXslt
)
instance FromJSVal RequestDestination where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RequestDestination, RequestDestination), (js_RequestDestinationAudio, RequestDestinationAudio), (js_RequestDestinationAudioworklet, RequestDestinationAudioworklet), (js_RequestDestinationDocument, RequestDestinationDocument), (js_RequestDestinationEmbed, RequestDestinationEmbed), (js_RequestDestinationFont, RequestDestinationFont), (js_RequestDestinationFrame, RequestDestinationFrame), (js_RequestDestinationIframe, RequestDestinationIframe), (js_RequestDestinationImage, RequestDestinationImage), (js_RequestDestinationJson, RequestDestinationJson), (js_RequestDestinationManifest, RequestDestinationManifest), (js_RequestDestinationObject, RequestDestinationObject), (js_RequestDestinationPaintworklet, RequestDestinationPaintworklet), (js_RequestDestinationReport, RequestDestinationReport), (js_RequestDestinationScript, RequestDestinationScript), (js_RequestDestinationSharedworker, RequestDestinationSharedworker), (js_RequestDestinationStyle, RequestDestinationStyle), (js_RequestDestinationText, RequestDestinationText), (js_RequestDestinationTrack, RequestDestinationTrack), (js_RequestDestinationVideo, RequestDestinationVideo), (js_RequestDestinationWorker, RequestDestinationWorker), (js_RequestDestinationXslt, RequestDestinationXslt)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RequestDestination value") P.return
js_RequestDestination :: JSString
js_RequestDestination = ""
js_RequestDestinationAudio :: JSString
js_RequestDestinationAudio = "audio"
js_RequestDestinationAudioworklet :: JSString
js_RequestDestinationAudioworklet = "audioworklet"
js_RequestDestinationDocument :: JSString
js_RequestDestinationDocument = "document"
js_RequestDestinationEmbed :: JSString
js_RequestDestinationEmbed = "embed"
js_RequestDestinationFont :: JSString
js_RequestDestinationFont = "font"
js_RequestDestinationFrame :: JSString
js_RequestDestinationFrame = "frame"
js_RequestDestinationIframe :: JSString
js_RequestDestinationIframe = "iframe"
js_RequestDestinationImage :: JSString
js_RequestDestinationImage = "image"
js_RequestDestinationJson :: JSString
js_RequestDestinationJson = "json"
js_RequestDestinationManifest :: JSString
js_RequestDestinationManifest = "manifest"
js_RequestDestinationObject :: JSString
js_RequestDestinationObject = "object"
js_RequestDestinationPaintworklet :: JSString
js_RequestDestinationPaintworklet = "paintworklet"
js_RequestDestinationReport :: JSString
js_RequestDestinationReport = "report"
js_RequestDestinationScript :: JSString
js_RequestDestinationScript = "script"
js_RequestDestinationSharedworker :: JSString
js_RequestDestinationSharedworker = "sharedworker"
js_RequestDestinationStyle :: JSString
js_RequestDestinationStyle = "style"
js_RequestDestinationText :: JSString
js_RequestDestinationText = "text"
js_RequestDestinationTrack :: JSString
js_RequestDestinationTrack = "track"
js_RequestDestinationVideo :: JSString
js_RequestDestinationVideo = "video"
js_RequestDestinationWorker :: JSString
js_RequestDestinationWorker = "worker"
js_RequestDestinationXslt :: JSString
js_RequestDestinationXslt = "xslt"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RequestDuplex> (fetch)
data RequestDuplex = RequestDuplexHalf
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RequestDuplex where
toJSVal x = toJSVal (case x of
RequestDuplexHalf -> js_RequestDuplexHalf
)
instance FromJSVal RequestDuplex where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RequestDuplexHalf, RequestDuplexHalf)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RequestDuplex value") P.return
js_RequestDuplexHalf :: JSString
js_RequestDuplexHalf = "half"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RequestMode> (fetch)
data RequestMode = RequestModeNavigate
| RequestModeSameOrigin
| RequestModeNoCors
| RequestModeCors
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RequestMode where
toJSVal x = toJSVal (case x of
RequestModeNavigate -> js_RequestModeNavigate
RequestModeSameOrigin -> js_RequestModeSameOrigin
RequestModeNoCors -> js_RequestModeNoCors
RequestModeCors -> js_RequestModeCors
)
instance FromJSVal RequestMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RequestModeNavigate, RequestModeNavigate), (js_RequestModeSameOrigin, RequestModeSameOrigin), (js_RequestModeNoCors, RequestModeNoCors), (js_RequestModeCors, RequestModeCors)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RequestMode value") P.return
js_RequestModeNavigate :: JSString
js_RequestModeNavigate = "navigate"
js_RequestModeSameOrigin :: JSString
js_RequestModeSameOrigin = "same-origin"
js_RequestModeNoCors :: JSString
js_RequestModeNoCors = "no-cors"
js_RequestModeCors :: JSString
js_RequestModeCors = "cors"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RequestPriority> (fetch)
data RequestPriority = RequestPriorityHigh
| RequestPriorityLow
| RequestPriorityAuto
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RequestPriority where
toJSVal x = toJSVal (case x of
RequestPriorityHigh -> js_RequestPriorityHigh
RequestPriorityLow -> js_RequestPriorityLow
RequestPriorityAuto -> js_RequestPriorityAuto
)
instance FromJSVal RequestPriority where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RequestPriorityHigh, RequestPriorityHigh), (js_RequestPriorityLow, RequestPriorityLow), (js_RequestPriorityAuto, RequestPriorityAuto)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RequestPriority value") P.return
js_RequestPriorityHigh :: JSString
js_RequestPriorityHigh = "high"
js_RequestPriorityLow :: JSString
js_RequestPriorityLow = "low"
js_RequestPriorityAuto :: JSString
js_RequestPriorityAuto = "auto"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RequestRedirect> (fetch)
data RequestRedirect = RequestRedirectFollow
| RequestRedirectError
| RequestRedirectManual
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RequestRedirect where
toJSVal x = toJSVal (case x of
RequestRedirectFollow -> js_RequestRedirectFollow
RequestRedirectError -> js_RequestRedirectError
RequestRedirectManual -> js_RequestRedirectManual
)
instance FromJSVal RequestRedirect where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RequestRedirectFollow, RequestRedirectFollow), (js_RequestRedirectError, RequestRedirectError), (js_RequestRedirectManual, RequestRedirectManual)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RequestRedirect value") P.return
js_RequestRedirectFollow :: JSString
js_RequestRedirectFollow = "follow"
js_RequestRedirectError :: JSString
js_RequestRedirectError = "error"
js_RequestRedirectManual :: JSString
js_RequestRedirectManual = "manual"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ResizeObserverBoxOptions> (resize-observer-1)
data ResizeObserverBoxOptions = ResizeObserverBoxOptionsBorderBox
| ResizeObserverBoxOptionsContentBox
| ResizeObserverBoxOptionsDevicePixelContentBox
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ResizeObserverBoxOptions where
toJSVal x = toJSVal (case x of
ResizeObserverBoxOptionsBorderBox -> js_ResizeObserverBoxOptionsBorderBox
ResizeObserverBoxOptionsContentBox -> js_ResizeObserverBoxOptionsContentBox
ResizeObserverBoxOptionsDevicePixelContentBox -> js_ResizeObserverBoxOptionsDevicePixelContentBox
)
instance FromJSVal ResizeObserverBoxOptions where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ResizeObserverBoxOptionsBorderBox, ResizeObserverBoxOptionsBorderBox), (js_ResizeObserverBoxOptionsContentBox, ResizeObserverBoxOptionsContentBox), (js_ResizeObserverBoxOptionsDevicePixelContentBox, ResizeObserverBoxOptionsDevicePixelContentBox)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ResizeObserverBoxOptions value") P.return
js_ResizeObserverBoxOptionsBorderBox :: JSString
js_ResizeObserverBoxOptionsBorderBox = "border-box"
js_ResizeObserverBoxOptionsContentBox :: JSString
js_ResizeObserverBoxOptionsContentBox = "content-box"
js_ResizeObserverBoxOptionsDevicePixelContentBox :: JSString
js_ResizeObserverBoxOptionsDevicePixelContentBox = "device-pixel-content-box"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ResponseType> (fetch)
data ResponseType = ResponseTypeBasic
| ResponseTypeCors
| ResponseTypeDefault
| ResponseTypeError
| ResponseTypeOpaque
| ResponseTypeOpaqueredirect
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ResponseType where
toJSVal x = toJSVal (case x of
ResponseTypeBasic -> js_ResponseTypeBasic
ResponseTypeCors -> js_ResponseTypeCors
ResponseTypeDefault -> js_ResponseTypeDefault
ResponseTypeError -> js_ResponseTypeError
ResponseTypeOpaque -> js_ResponseTypeOpaque
ResponseTypeOpaqueredirect -> js_ResponseTypeOpaqueredirect
)
instance FromJSVal ResponseType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ResponseTypeBasic, ResponseTypeBasic), (js_ResponseTypeCors, ResponseTypeCors), (js_ResponseTypeDefault, ResponseTypeDefault), (js_ResponseTypeError, ResponseTypeError), (js_ResponseTypeOpaque, ResponseTypeOpaque), (js_ResponseTypeOpaqueredirect, ResponseTypeOpaqueredirect)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ResponseType value") P.return
js_ResponseTypeBasic :: JSString
js_ResponseTypeBasic = "basic"
js_ResponseTypeCors :: JSString
js_ResponseTypeCors = "cors"
js_ResponseTypeDefault :: JSString
js_ResponseTypeDefault = "default"
js_ResponseTypeError :: JSString
js_ResponseTypeError = "error"
js_ResponseTypeOpaque :: JSString
js_ResponseTypeOpaque = "opaque"
js_ResponseTypeOpaqueredirect :: JSString
js_ResponseTypeOpaqueredirect = "opaqueredirect"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RouterSourceEnum> (service-workers)
data RouterSourceEnum = RouterSourceEnumCache
| RouterSourceEnumFetchEvent
| RouterSourceEnumNetwork
| RouterSourceEnumRaceNetworkAndFetchHandler
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RouterSourceEnum where
toJSVal x = toJSVal (case x of
RouterSourceEnumCache -> js_RouterSourceEnumCache
RouterSourceEnumFetchEvent -> js_RouterSourceEnumFetchEvent
RouterSourceEnumNetwork -> js_RouterSourceEnumNetwork
RouterSourceEnumRaceNetworkAndFetchHandler -> js_RouterSourceEnumRaceNetworkAndFetchHandler
)
instance FromJSVal RouterSourceEnum where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RouterSourceEnumCache, RouterSourceEnumCache), (js_RouterSourceEnumFetchEvent, RouterSourceEnumFetchEvent), (js_RouterSourceEnumNetwork, RouterSourceEnumNetwork), (js_RouterSourceEnumRaceNetworkAndFetchHandler, RouterSourceEnumRaceNetworkAndFetchHandler)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RouterSourceEnum value") P.return
js_RouterSourceEnumCache :: JSString
js_RouterSourceEnumCache = "cache"
js_RouterSourceEnumFetchEvent :: JSString
js_RouterSourceEnumFetchEvent = "fetch-event"
js_RouterSourceEnumNetwork :: JSString
js_RouterSourceEnumNetwork = "network"
js_RouterSourceEnumRaceNetworkAndFetchHandler :: JSString
js_RouterSourceEnumRaceNetworkAndFetchHandler = "race-network-and-fetch-handler"
-- | <https://developer.mozilla.org/en-US/docs/Web/API RunningStatus> (service-workers)
data RunningStatus = RunningStatusRunning
| RunningStatusNotRunning
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal RunningStatus where
toJSVal x = toJSVal (case x of
RunningStatusRunning -> js_RunningStatusRunning
RunningStatusNotRunning -> js_RunningStatusNotRunning
)
instance FromJSVal RunningStatus where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_RunningStatusRunning, RunningStatusRunning), (js_RunningStatusNotRunning, RunningStatusNotRunning)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected RunningStatus value") P.return
js_RunningStatusRunning :: JSString
js_RunningStatusRunning = "running"
js_RunningStatusNotRunning :: JSString
js_RunningStatusNotRunning = "not-running"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SameSiteCookiesType> (saa-non-cookie-storage)
data SameSiteCookiesType = SameSiteCookiesTypeAll
| SameSiteCookiesTypeNone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SameSiteCookiesType where
toJSVal x = toJSVal (case x of
SameSiteCookiesTypeAll -> js_SameSiteCookiesTypeAll
SameSiteCookiesTypeNone -> js_SameSiteCookiesTypeNone
)
instance FromJSVal SameSiteCookiesType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SameSiteCookiesTypeAll, SameSiteCookiesTypeAll), (js_SameSiteCookiesTypeNone, SameSiteCookiesTypeNone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SameSiteCookiesType value") P.return
js_SameSiteCookiesTypeAll :: JSString
js_SameSiteCookiesTypeAll = "all"
js_SameSiteCookiesTypeNone :: JSString
js_SameSiteCookiesTypeNone = "none"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SanitizerPresets> (html)
data SanitizerPresets = SanitizerPresetsDefault
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SanitizerPresets where
toJSVal x = toJSVal (case x of
SanitizerPresetsDefault -> js_SanitizerPresetsDefault
)
instance FromJSVal SanitizerPresets where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SanitizerPresetsDefault, SanitizerPresetsDefault)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SanitizerPresets value") P.return
js_SanitizerPresetsDefault :: JSString
js_SanitizerPresetsDefault = "default"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ScrollAxis> (scroll-animations-1)
data ScrollAxis = ScrollAxisBlock
| ScrollAxisInline
| ScrollAxisX
| ScrollAxisY
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ScrollAxis where
toJSVal x = toJSVal (case x of
ScrollAxisBlock -> js_ScrollAxisBlock
ScrollAxisInline -> js_ScrollAxisInline
ScrollAxisX -> js_ScrollAxisX
ScrollAxisY -> js_ScrollAxisY
)
instance FromJSVal ScrollAxis where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ScrollAxisBlock, ScrollAxisBlock), (js_ScrollAxisInline, ScrollAxisInline), (js_ScrollAxisX, ScrollAxisX), (js_ScrollAxisY, ScrollAxisY)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ScrollAxis value") P.return
js_ScrollAxisBlock :: JSString
js_ScrollAxisBlock = "block"
js_ScrollAxisInline :: JSString
js_ScrollAxisInline = "inline"
js_ScrollAxisX :: JSString
js_ScrollAxisX = "x"
js_ScrollAxisY :: JSString
js_ScrollAxisY = "y"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ScrollBehavior> (cssom-view-1)
data ScrollBehavior = ScrollBehaviorAuto
| ScrollBehaviorInstant
| ScrollBehaviorSmooth
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ScrollBehavior where
toJSVal x = toJSVal (case x of
ScrollBehaviorAuto -> js_ScrollBehaviorAuto
ScrollBehaviorInstant -> js_ScrollBehaviorInstant
ScrollBehaviorSmooth -> js_ScrollBehaviorSmooth
)
instance FromJSVal ScrollBehavior where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ScrollBehaviorAuto, ScrollBehaviorAuto), (js_ScrollBehaviorInstant, ScrollBehaviorInstant), (js_ScrollBehaviorSmooth, ScrollBehaviorSmooth)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ScrollBehavior value") P.return
js_ScrollBehaviorAuto :: JSString
js_ScrollBehaviorAuto = "auto"
js_ScrollBehaviorInstant :: JSString
js_ScrollBehaviorInstant = "instant"
js_ScrollBehaviorSmooth :: JSString
js_ScrollBehaviorSmooth = "smooth"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ScrollIntoViewContainer> (cssom-view-1)
data ScrollIntoViewContainer = ScrollIntoViewContainerAll
| ScrollIntoViewContainerNearest
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ScrollIntoViewContainer where
toJSVal x = toJSVal (case x of
ScrollIntoViewContainerAll -> js_ScrollIntoViewContainerAll
ScrollIntoViewContainerNearest -> js_ScrollIntoViewContainerNearest
)
instance FromJSVal ScrollIntoViewContainer where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ScrollIntoViewContainerAll, ScrollIntoViewContainerAll), (js_ScrollIntoViewContainerNearest, ScrollIntoViewContainerNearest)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ScrollIntoViewContainer value") P.return
js_ScrollIntoViewContainerAll :: JSString
js_ScrollIntoViewContainerAll = "all"
js_ScrollIntoViewContainerNearest :: JSString
js_ScrollIntoViewContainerNearest = "nearest"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ScrollLogicalPosition> (cssom-view-1)
data ScrollLogicalPosition = ScrollLogicalPositionStart
| ScrollLogicalPositionCenter
| ScrollLogicalPositionEnd
| ScrollLogicalPositionNearest
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ScrollLogicalPosition where
toJSVal x = toJSVal (case x of
ScrollLogicalPositionStart -> js_ScrollLogicalPositionStart
ScrollLogicalPositionCenter -> js_ScrollLogicalPositionCenter
ScrollLogicalPositionEnd -> js_ScrollLogicalPositionEnd
ScrollLogicalPositionNearest -> js_ScrollLogicalPositionNearest
)
instance FromJSVal ScrollLogicalPosition where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ScrollLogicalPositionStart, ScrollLogicalPositionStart), (js_ScrollLogicalPositionCenter, ScrollLogicalPositionCenter), (js_ScrollLogicalPositionEnd, ScrollLogicalPositionEnd), (js_ScrollLogicalPositionNearest, ScrollLogicalPositionNearest)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ScrollLogicalPosition value") P.return
js_ScrollLogicalPositionStart :: JSString
js_ScrollLogicalPositionStart = "start"
js_ScrollLogicalPositionCenter :: JSString
js_ScrollLogicalPositionCenter = "center"
js_ScrollLogicalPositionEnd :: JSString
js_ScrollLogicalPositionEnd = "end"
js_ScrollLogicalPositionNearest :: JSString
js_ScrollLogicalPositionNearest = "nearest"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ScrollRestoration> (html)
data ScrollRestoration = ScrollRestorationAuto
| ScrollRestorationManual
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ScrollRestoration where
toJSVal x = toJSVal (case x of
ScrollRestorationAuto -> js_ScrollRestorationAuto
ScrollRestorationManual -> js_ScrollRestorationManual
)
instance FromJSVal ScrollRestoration where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ScrollRestorationAuto, ScrollRestorationAuto), (js_ScrollRestorationManual, ScrollRestorationManual)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ScrollRestoration value") P.return
js_ScrollRestorationAuto :: JSString
js_ScrollRestorationAuto = "auto"
js_ScrollRestorationManual :: JSString
js_ScrollRestorationManual = "manual"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ScrollSetting> (webvtt1)
data ScrollSetting = ScrollSetting
| ScrollSettingUp
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ScrollSetting where
toJSVal x = toJSVal (case x of
ScrollSetting -> js_ScrollSetting
ScrollSettingUp -> js_ScrollSettingUp
)
instance FromJSVal ScrollSetting where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ScrollSetting, ScrollSetting), (js_ScrollSettingUp, ScrollSettingUp)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ScrollSetting value") P.return
js_ScrollSetting :: JSString
js_ScrollSetting = ""
js_ScrollSettingUp :: JSString
js_ScrollSettingUp = "up"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SecurityPolicyViolationEventDisposition> (CSP3)
data SecurityPolicyViolationEventDisposition = SecurityPolicyViolationEventDispositionEnforce
| SecurityPolicyViolationEventDispositionReport
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SecurityPolicyViolationEventDisposition where
toJSVal x = toJSVal (case x of
SecurityPolicyViolationEventDispositionEnforce -> js_SecurityPolicyViolationEventDispositionEnforce
SecurityPolicyViolationEventDispositionReport -> js_SecurityPolicyViolationEventDispositionReport
)
instance FromJSVal SecurityPolicyViolationEventDisposition where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SecurityPolicyViolationEventDispositionEnforce, SecurityPolicyViolationEventDispositionEnforce), (js_SecurityPolicyViolationEventDispositionReport, SecurityPolicyViolationEventDispositionReport)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SecurityPolicyViolationEventDisposition value") P.return
js_SecurityPolicyViolationEventDispositionEnforce :: JSString
js_SecurityPolicyViolationEventDispositionEnforce = "enforce"
js_SecurityPolicyViolationEventDispositionReport :: JSString
js_SecurityPolicyViolationEventDispositionReport = "report"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SegmentType> (mediacapture-extensions)
data SegmentType = SegmentTypeHumanFace
| SegmentTypeLeftEye
| SegmentTypeRightEye
| SegmentTypeEye
| SegmentTypeMouth
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SegmentType where
toJSVal x = toJSVal (case x of
SegmentTypeHumanFace -> js_SegmentTypeHumanFace
SegmentTypeLeftEye -> js_SegmentTypeLeftEye
SegmentTypeRightEye -> js_SegmentTypeRightEye
SegmentTypeEye -> js_SegmentTypeEye
SegmentTypeMouth -> js_SegmentTypeMouth
)
instance FromJSVal SegmentType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SegmentTypeHumanFace, SegmentTypeHumanFace), (js_SegmentTypeLeftEye, SegmentTypeLeftEye), (js_SegmentTypeRightEye, SegmentTypeRightEye), (js_SegmentTypeEye, SegmentTypeEye), (js_SegmentTypeMouth, SegmentTypeMouth)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SegmentType value") P.return
js_SegmentTypeHumanFace :: JSString
js_SegmentTypeHumanFace = "human-face"
js_SegmentTypeLeftEye :: JSString
js_SegmentTypeLeftEye = "left-eye"
js_SegmentTypeRightEye :: JSString
js_SegmentTypeRightEye = "right-eye"
js_SegmentTypeEye :: JSString
js_SegmentTypeEye = "eye"
js_SegmentTypeMouth :: JSString
js_SegmentTypeMouth = "mouth"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SelectionMode> (html)
data SelectionMode = SelectionModeSelect
| SelectionModeStart
| SelectionModeEnd
| SelectionModePreserve
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SelectionMode where
toJSVal x = toJSVal (case x of
SelectionModeSelect -> js_SelectionModeSelect
SelectionModeStart -> js_SelectionModeStart
SelectionModeEnd -> js_SelectionModeEnd
SelectionModePreserve -> js_SelectionModePreserve
)
instance FromJSVal SelectionMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SelectionModeSelect, SelectionModeSelect), (js_SelectionModeStart, SelectionModeStart), (js_SelectionModeEnd, SelectionModeEnd), (js_SelectionModePreserve, SelectionModePreserve)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SelectionMode value") P.return
js_SelectionModeSelect :: JSString
js_SelectionModeSelect = "select"
js_SelectionModeStart :: JSString
js_SelectionModeStart = "start"
js_SelectionModeEnd :: JSString
js_SelectionModeEnd = "end"
js_SelectionModePreserve :: JSString
js_SelectionModePreserve = "preserve"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SelfCapturePreferenceEnum> (screen-capture)
data SelfCapturePreferenceEnum = SelfCapturePreferenceEnumInclude
| SelfCapturePreferenceEnumExclude
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SelfCapturePreferenceEnum where
toJSVal x = toJSVal (case x of
SelfCapturePreferenceEnumInclude -> js_SelfCapturePreferenceEnumInclude
SelfCapturePreferenceEnumExclude -> js_SelfCapturePreferenceEnumExclude
)
instance FromJSVal SelfCapturePreferenceEnum where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SelfCapturePreferenceEnumInclude, SelfCapturePreferenceEnumInclude), (js_SelfCapturePreferenceEnumExclude, SelfCapturePreferenceEnumExclude)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SelfCapturePreferenceEnum value") P.return
js_SelfCapturePreferenceEnumInclude :: JSString
js_SelfCapturePreferenceEnumInclude = "include"
js_SelfCapturePreferenceEnumExclude :: JSString
js_SelfCapturePreferenceEnumExclude = "exclude"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ServiceWorkerState> (service-workers)
data ServiceWorkerState = ServiceWorkerStateParsed
| ServiceWorkerStateInstalling
| ServiceWorkerStateInstalled
| ServiceWorkerStateActivating
| ServiceWorkerStateActivated
| ServiceWorkerStateRedundant
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ServiceWorkerState where
toJSVal x = toJSVal (case x of
ServiceWorkerStateParsed -> js_ServiceWorkerStateParsed
ServiceWorkerStateInstalling -> js_ServiceWorkerStateInstalling
ServiceWorkerStateInstalled -> js_ServiceWorkerStateInstalled
ServiceWorkerStateActivating -> js_ServiceWorkerStateActivating
ServiceWorkerStateActivated -> js_ServiceWorkerStateActivated
ServiceWorkerStateRedundant -> js_ServiceWorkerStateRedundant
)
instance FromJSVal ServiceWorkerState where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ServiceWorkerStateParsed, ServiceWorkerStateParsed), (js_ServiceWorkerStateInstalling, ServiceWorkerStateInstalling), (js_ServiceWorkerStateInstalled, ServiceWorkerStateInstalled), (js_ServiceWorkerStateActivating, ServiceWorkerStateActivating), (js_ServiceWorkerStateActivated, ServiceWorkerStateActivated), (js_ServiceWorkerStateRedundant, ServiceWorkerStateRedundant)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ServiceWorkerState value") P.return
js_ServiceWorkerStateParsed :: JSString
js_ServiceWorkerStateParsed = "parsed"
js_ServiceWorkerStateInstalling :: JSString
js_ServiceWorkerStateInstalling = "installing"
js_ServiceWorkerStateInstalled :: JSString
js_ServiceWorkerStateInstalled = "installed"
js_ServiceWorkerStateActivating :: JSString
js_ServiceWorkerStateActivating = "activating"
js_ServiceWorkerStateActivated :: JSString
js_ServiceWorkerStateActivated = "activated"
js_ServiceWorkerStateRedundant :: JSString
js_ServiceWorkerStateRedundant = "redundant"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ServiceWorkerUpdateViaCache> (service-workers)
data ServiceWorkerUpdateViaCache = ServiceWorkerUpdateViaCacheImports
| ServiceWorkerUpdateViaCacheAll
| ServiceWorkerUpdateViaCacheNone
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ServiceWorkerUpdateViaCache where
toJSVal x = toJSVal (case x of
ServiceWorkerUpdateViaCacheImports -> js_ServiceWorkerUpdateViaCacheImports
ServiceWorkerUpdateViaCacheAll -> js_ServiceWorkerUpdateViaCacheAll
ServiceWorkerUpdateViaCacheNone -> js_ServiceWorkerUpdateViaCacheNone
)
instance FromJSVal ServiceWorkerUpdateViaCache where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ServiceWorkerUpdateViaCacheImports, ServiceWorkerUpdateViaCacheImports), (js_ServiceWorkerUpdateViaCacheAll, ServiceWorkerUpdateViaCacheAll), (js_ServiceWorkerUpdateViaCacheNone, ServiceWorkerUpdateViaCacheNone)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ServiceWorkerUpdateViaCache value") P.return
js_ServiceWorkerUpdateViaCacheImports :: JSString
js_ServiceWorkerUpdateViaCacheImports = "imports"
js_ServiceWorkerUpdateViaCacheAll :: JSString
js_ServiceWorkerUpdateViaCacheAll = "all"
js_ServiceWorkerUpdateViaCacheNone :: JSString
js_ServiceWorkerUpdateViaCacheNone = "none"
-- | <https://developer.mozilla.org/en-US/docs/Web/API ShadowRootMode> (dom)
data ShadowRootMode = ShadowRootModeOpen
| ShadowRootModeClosed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal ShadowRootMode where
toJSVal x = toJSVal (case x of
ShadowRootModeOpen -> js_ShadowRootModeOpen
ShadowRootModeClosed -> js_ShadowRootModeClosed
)
instance FromJSVal ShadowRootMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_ShadowRootModeOpen, ShadowRootModeOpen), (js_ShadowRootModeClosed, ShadowRootModeClosed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected ShadowRootMode value") P.return
js_ShadowRootModeOpen :: JSString
js_ShadowRootModeOpen = "open"
js_ShadowRootModeClosed :: JSString
js_ShadowRootModeClosed = "closed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SlotAssignmentMode> (dom)
data SlotAssignmentMode = SlotAssignmentModeManual
| SlotAssignmentModeNamed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SlotAssignmentMode where
toJSVal x = toJSVal (case x of
SlotAssignmentModeManual -> js_SlotAssignmentModeManual
SlotAssignmentModeNamed -> js_SlotAssignmentModeNamed
)
instance FromJSVal SlotAssignmentMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SlotAssignmentModeManual, SlotAssignmentModeManual), (js_SlotAssignmentModeNamed, SlotAssignmentModeNamed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SlotAssignmentMode value") P.return
js_SlotAssignmentModeManual :: JSString
js_SlotAssignmentModeManual = "manual"
js_SlotAssignmentModeNamed :: JSString
js_SlotAssignmentModeNamed = "named"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SpeechRecognitionAvailabilityStatus> (speech-api)
data SpeechRecognitionAvailabilityStatus = SpeechRecognitionAvailabilityStatusUnavailable
| SpeechRecognitionAvailabilityStatusDownloadable
| SpeechRecognitionAvailabilityStatusDownloading
| SpeechRecognitionAvailabilityStatusAvailable
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SpeechRecognitionAvailabilityStatus where
toJSVal x = toJSVal (case x of
SpeechRecognitionAvailabilityStatusUnavailable -> js_SpeechRecognitionAvailabilityStatusUnavailable
SpeechRecognitionAvailabilityStatusDownloadable -> js_SpeechRecognitionAvailabilityStatusDownloadable
SpeechRecognitionAvailabilityStatusDownloading -> js_SpeechRecognitionAvailabilityStatusDownloading
SpeechRecognitionAvailabilityStatusAvailable -> js_SpeechRecognitionAvailabilityStatusAvailable
)
instance FromJSVal SpeechRecognitionAvailabilityStatus where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SpeechRecognitionAvailabilityStatusUnavailable, SpeechRecognitionAvailabilityStatusUnavailable), (js_SpeechRecognitionAvailabilityStatusDownloadable, SpeechRecognitionAvailabilityStatusDownloadable), (js_SpeechRecognitionAvailabilityStatusDownloading, SpeechRecognitionAvailabilityStatusDownloading), (js_SpeechRecognitionAvailabilityStatusAvailable, SpeechRecognitionAvailabilityStatusAvailable)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SpeechRecognitionAvailabilityStatus value") P.return
js_SpeechRecognitionAvailabilityStatusUnavailable :: JSString
js_SpeechRecognitionAvailabilityStatusUnavailable = "unavailable"
js_SpeechRecognitionAvailabilityStatusDownloadable :: JSString
js_SpeechRecognitionAvailabilityStatusDownloadable = "downloadable"
js_SpeechRecognitionAvailabilityStatusDownloading :: JSString
js_SpeechRecognitionAvailabilityStatusDownloading = "downloading"
js_SpeechRecognitionAvailabilityStatusAvailable :: JSString
js_SpeechRecognitionAvailabilityStatusAvailable = "available"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SpeechRecognitionErrorCode> (speech-api)
data SpeechRecognitionErrorCode = SpeechRecognitionErrorCodeNoSpeech
| SpeechRecognitionErrorCodeAborted
| SpeechRecognitionErrorCodeAudioCapture
| SpeechRecognitionErrorCodeNetwork
| SpeechRecognitionErrorCodeNotAllowed
| SpeechRecognitionErrorCodeServiceNotAllowed
| SpeechRecognitionErrorCodeLanguageNotSupported
| SpeechRecognitionErrorCodePhrasesNotSupported
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SpeechRecognitionErrorCode where
toJSVal x = toJSVal (case x of
SpeechRecognitionErrorCodeNoSpeech -> js_SpeechRecognitionErrorCodeNoSpeech
SpeechRecognitionErrorCodeAborted -> js_SpeechRecognitionErrorCodeAborted
SpeechRecognitionErrorCodeAudioCapture -> js_SpeechRecognitionErrorCodeAudioCapture
SpeechRecognitionErrorCodeNetwork -> js_SpeechRecognitionErrorCodeNetwork
SpeechRecognitionErrorCodeNotAllowed -> js_SpeechRecognitionErrorCodeNotAllowed
SpeechRecognitionErrorCodeServiceNotAllowed -> js_SpeechRecognitionErrorCodeServiceNotAllowed
SpeechRecognitionErrorCodeLanguageNotSupported -> js_SpeechRecognitionErrorCodeLanguageNotSupported
SpeechRecognitionErrorCodePhrasesNotSupported -> js_SpeechRecognitionErrorCodePhrasesNotSupported
)
instance FromJSVal SpeechRecognitionErrorCode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SpeechRecognitionErrorCodeNoSpeech, SpeechRecognitionErrorCodeNoSpeech), (js_SpeechRecognitionErrorCodeAborted, SpeechRecognitionErrorCodeAborted), (js_SpeechRecognitionErrorCodeAudioCapture, SpeechRecognitionErrorCodeAudioCapture), (js_SpeechRecognitionErrorCodeNetwork, SpeechRecognitionErrorCodeNetwork), (js_SpeechRecognitionErrorCodeNotAllowed, SpeechRecognitionErrorCodeNotAllowed), (js_SpeechRecognitionErrorCodeServiceNotAllowed, SpeechRecognitionErrorCodeServiceNotAllowed), (js_SpeechRecognitionErrorCodeLanguageNotSupported, SpeechRecognitionErrorCodeLanguageNotSupported), (js_SpeechRecognitionErrorCodePhrasesNotSupported, SpeechRecognitionErrorCodePhrasesNotSupported)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SpeechRecognitionErrorCode value") P.return
js_SpeechRecognitionErrorCodeNoSpeech :: JSString
js_SpeechRecognitionErrorCodeNoSpeech = "no-speech"
js_SpeechRecognitionErrorCodeAborted :: JSString
js_SpeechRecognitionErrorCodeAborted = "aborted"
js_SpeechRecognitionErrorCodeAudioCapture :: JSString
js_SpeechRecognitionErrorCodeAudioCapture = "audio-capture"
js_SpeechRecognitionErrorCodeNetwork :: JSString
js_SpeechRecognitionErrorCodeNetwork = "network"
js_SpeechRecognitionErrorCodeNotAllowed :: JSString
js_SpeechRecognitionErrorCodeNotAllowed = "not-allowed"
js_SpeechRecognitionErrorCodeServiceNotAllowed :: JSString
js_SpeechRecognitionErrorCodeServiceNotAllowed = "service-not-allowed"
js_SpeechRecognitionErrorCodeLanguageNotSupported :: JSString
js_SpeechRecognitionErrorCodeLanguageNotSupported = "language-not-supported"
js_SpeechRecognitionErrorCodePhrasesNotSupported :: JSString
js_SpeechRecognitionErrorCodePhrasesNotSupported = "phrases-not-supported"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SpeechRecognitionQuality> (speech-api)
data SpeechRecognitionQuality = SpeechRecognitionQualityCommand
| SpeechRecognitionQualityDictation
| SpeechRecognitionQualityConversation
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SpeechRecognitionQuality where
toJSVal x = toJSVal (case x of
SpeechRecognitionQualityCommand -> js_SpeechRecognitionQualityCommand
SpeechRecognitionQualityDictation -> js_SpeechRecognitionQualityDictation
SpeechRecognitionQualityConversation -> js_SpeechRecognitionQualityConversation
)
instance FromJSVal SpeechRecognitionQuality where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SpeechRecognitionQualityCommand, SpeechRecognitionQualityCommand), (js_SpeechRecognitionQualityDictation, SpeechRecognitionQualityDictation), (js_SpeechRecognitionQualityConversation, SpeechRecognitionQualityConversation)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SpeechRecognitionQuality value") P.return
js_SpeechRecognitionQualityCommand :: JSString
js_SpeechRecognitionQualityCommand = "command"
js_SpeechRecognitionQualityDictation :: JSString
js_SpeechRecognitionQualityDictation = "dictation"
js_SpeechRecognitionQualityConversation :: JSString
js_SpeechRecognitionQualityConversation = "conversation"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SpeechSynthesisErrorCode> (speech-api)
data SpeechSynthesisErrorCode = SpeechSynthesisErrorCodeCanceled
| SpeechSynthesisErrorCodeInterrupted
| SpeechSynthesisErrorCodeAudioBusy
| SpeechSynthesisErrorCodeAudioHardware
| SpeechSynthesisErrorCodeNetwork
| SpeechSynthesisErrorCodeSynthesisUnavailable
| SpeechSynthesisErrorCodeSynthesisFailed
| SpeechSynthesisErrorCodeLanguageUnavailable
| SpeechSynthesisErrorCodeVoiceUnavailable
| SpeechSynthesisErrorCodeTextTooLong
| SpeechSynthesisErrorCodeInvalidArgument
| SpeechSynthesisErrorCodeNotAllowed
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SpeechSynthesisErrorCode where
toJSVal x = toJSVal (case x of
SpeechSynthesisErrorCodeCanceled -> js_SpeechSynthesisErrorCodeCanceled
SpeechSynthesisErrorCodeInterrupted -> js_SpeechSynthesisErrorCodeInterrupted
SpeechSynthesisErrorCodeAudioBusy -> js_SpeechSynthesisErrorCodeAudioBusy
SpeechSynthesisErrorCodeAudioHardware -> js_SpeechSynthesisErrorCodeAudioHardware
SpeechSynthesisErrorCodeNetwork -> js_SpeechSynthesisErrorCodeNetwork
SpeechSynthesisErrorCodeSynthesisUnavailable -> js_SpeechSynthesisErrorCodeSynthesisUnavailable
SpeechSynthesisErrorCodeSynthesisFailed -> js_SpeechSynthesisErrorCodeSynthesisFailed
SpeechSynthesisErrorCodeLanguageUnavailable -> js_SpeechSynthesisErrorCodeLanguageUnavailable
SpeechSynthesisErrorCodeVoiceUnavailable -> js_SpeechSynthesisErrorCodeVoiceUnavailable
SpeechSynthesisErrorCodeTextTooLong -> js_SpeechSynthesisErrorCodeTextTooLong
SpeechSynthesisErrorCodeInvalidArgument -> js_SpeechSynthesisErrorCodeInvalidArgument
SpeechSynthesisErrorCodeNotAllowed -> js_SpeechSynthesisErrorCodeNotAllowed
)
instance FromJSVal SpeechSynthesisErrorCode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SpeechSynthesisErrorCodeCanceled, SpeechSynthesisErrorCodeCanceled), (js_SpeechSynthesisErrorCodeInterrupted, SpeechSynthesisErrorCodeInterrupted), (js_SpeechSynthesisErrorCodeAudioBusy, SpeechSynthesisErrorCodeAudioBusy), (js_SpeechSynthesisErrorCodeAudioHardware, SpeechSynthesisErrorCodeAudioHardware), (js_SpeechSynthesisErrorCodeNetwork, SpeechSynthesisErrorCodeNetwork), (js_SpeechSynthesisErrorCodeSynthesisUnavailable, SpeechSynthesisErrorCodeSynthesisUnavailable), (js_SpeechSynthesisErrorCodeSynthesisFailed, SpeechSynthesisErrorCodeSynthesisFailed), (js_SpeechSynthesisErrorCodeLanguageUnavailable, SpeechSynthesisErrorCodeLanguageUnavailable), (js_SpeechSynthesisErrorCodeVoiceUnavailable, SpeechSynthesisErrorCodeVoiceUnavailable), (js_SpeechSynthesisErrorCodeTextTooLong, SpeechSynthesisErrorCodeTextTooLong), (js_SpeechSynthesisErrorCodeInvalidArgument, SpeechSynthesisErrorCodeInvalidArgument), (js_SpeechSynthesisErrorCodeNotAllowed, SpeechSynthesisErrorCodeNotAllowed)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SpeechSynthesisErrorCode value") P.return
js_SpeechSynthesisErrorCodeCanceled :: JSString
js_SpeechSynthesisErrorCodeCanceled = "canceled"
js_SpeechSynthesisErrorCodeInterrupted :: JSString
js_SpeechSynthesisErrorCodeInterrupted = "interrupted"
js_SpeechSynthesisErrorCodeAudioBusy :: JSString
js_SpeechSynthesisErrorCodeAudioBusy = "audio-busy"
js_SpeechSynthesisErrorCodeAudioHardware :: JSString
js_SpeechSynthesisErrorCodeAudioHardware = "audio-hardware"
js_SpeechSynthesisErrorCodeNetwork :: JSString
js_SpeechSynthesisErrorCodeNetwork = "network"
js_SpeechSynthesisErrorCodeSynthesisUnavailable :: JSString
js_SpeechSynthesisErrorCodeSynthesisUnavailable = "synthesis-unavailable"
js_SpeechSynthesisErrorCodeSynthesisFailed :: JSString
js_SpeechSynthesisErrorCodeSynthesisFailed = "synthesis-failed"
js_SpeechSynthesisErrorCodeLanguageUnavailable :: JSString
js_SpeechSynthesisErrorCodeLanguageUnavailable = "language-unavailable"
js_SpeechSynthesisErrorCodeVoiceUnavailable :: JSString
js_SpeechSynthesisErrorCodeVoiceUnavailable = "voice-unavailable"
js_SpeechSynthesisErrorCodeTextTooLong :: JSString
js_SpeechSynthesisErrorCodeTextTooLong = "text-too-long"
js_SpeechSynthesisErrorCodeInvalidArgument :: JSString
js_SpeechSynthesisErrorCodeInvalidArgument = "invalid-argument"
js_SpeechSynthesisErrorCodeNotAllowed :: JSString
js_SpeechSynthesisErrorCodeNotAllowed = "not-allowed"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SurfaceSwitchingPreferenceEnum> (screen-capture)
data SurfaceSwitchingPreferenceEnum = SurfaceSwitchingPreferenceEnumInclude
| SurfaceSwitchingPreferenceEnumExclude
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SurfaceSwitchingPreferenceEnum where
toJSVal x = toJSVal (case x of
SurfaceSwitchingPreferenceEnumInclude -> js_SurfaceSwitchingPreferenceEnumInclude
SurfaceSwitchingPreferenceEnumExclude -> js_SurfaceSwitchingPreferenceEnumExclude
)
instance FromJSVal SurfaceSwitchingPreferenceEnum where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SurfaceSwitchingPreferenceEnumInclude, SurfaceSwitchingPreferenceEnumInclude), (js_SurfaceSwitchingPreferenceEnumExclude, SurfaceSwitchingPreferenceEnumExclude)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SurfaceSwitchingPreferenceEnum value") P.return
js_SurfaceSwitchingPreferenceEnumInclude :: JSString
js_SurfaceSwitchingPreferenceEnumInclude = "include"
js_SurfaceSwitchingPreferenceEnumExclude :: JSString
js_SurfaceSwitchingPreferenceEnumExclude = "exclude"
-- | <https://developer.mozilla.org/en-US/docs/Web/API SystemAudioPreferenceEnum> (screen-capture)
data SystemAudioPreferenceEnum = SystemAudioPreferenceEnumInclude
| SystemAudioPreferenceEnumExclude
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal SystemAudioPreferenceEnum where
toJSVal x = toJSVal (case x of
SystemAudioPreferenceEnumInclude -> js_SystemAudioPreferenceEnumInclude
SystemAudioPreferenceEnumExclude -> js_SystemAudioPreferenceEnumExclude
)
instance FromJSVal SystemAudioPreferenceEnum where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_SystemAudioPreferenceEnumInclude, SystemAudioPreferenceEnumInclude), (js_SystemAudioPreferenceEnumExclude, SystemAudioPreferenceEnumExclude)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected SystemAudioPreferenceEnum value") P.return
js_SystemAudioPreferenceEnumInclude :: JSString
js_SystemAudioPreferenceEnumInclude = "include"
js_SystemAudioPreferenceEnumExclude :: JSString
js_SystemAudioPreferenceEnumExclude = "exclude"
-- | <https://developer.mozilla.org/en-US/docs/Web/API TaskPriority> (scheduling-apis)
data TaskPriority = TaskPriorityUserBlocking
| TaskPriorityUserVisible
| TaskPriorityBackground
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal TaskPriority where
toJSVal x = toJSVal (case x of
TaskPriorityUserBlocking -> js_TaskPriorityUserBlocking
TaskPriorityUserVisible -> js_TaskPriorityUserVisible
TaskPriorityBackground -> js_TaskPriorityBackground
)
instance FromJSVal TaskPriority where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_TaskPriorityUserBlocking, TaskPriorityUserBlocking), (js_TaskPriorityUserVisible, TaskPriorityUserVisible), (js_TaskPriorityBackground, TaskPriorityBackground)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected TaskPriority value") P.return
js_TaskPriorityUserBlocking :: JSString
js_TaskPriorityUserBlocking = "user-blocking"
js_TaskPriorityUserVisible :: JSString
js_TaskPriorityUserVisible = "user-visible"
js_TaskPriorityBackground :: JSString
js_TaskPriorityBackground = "background"
-- | <https://developer.mozilla.org/en-US/docs/Web/API TextTrackKind> (html)
data TextTrackKind = TextTrackKindSubtitles
| TextTrackKindCaptions
| TextTrackKindDescriptions
| TextTrackKindChapters
| TextTrackKindMetadata
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal TextTrackKind where
toJSVal x = toJSVal (case x of
TextTrackKindSubtitles -> js_TextTrackKindSubtitles
TextTrackKindCaptions -> js_TextTrackKindCaptions
TextTrackKindDescriptions -> js_TextTrackKindDescriptions
TextTrackKindChapters -> js_TextTrackKindChapters
TextTrackKindMetadata -> js_TextTrackKindMetadata
)
instance FromJSVal TextTrackKind where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_TextTrackKindSubtitles, TextTrackKindSubtitles), (js_TextTrackKindCaptions, TextTrackKindCaptions), (js_TextTrackKindDescriptions, TextTrackKindDescriptions), (js_TextTrackKindChapters, TextTrackKindChapters), (js_TextTrackKindMetadata, TextTrackKindMetadata)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected TextTrackKind value") P.return
js_TextTrackKindSubtitles :: JSString
js_TextTrackKindSubtitles = "subtitles"
js_TextTrackKindCaptions :: JSString
js_TextTrackKindCaptions = "captions"
js_TextTrackKindDescriptions :: JSString
js_TextTrackKindDescriptions = "descriptions"
js_TextTrackKindChapters :: JSString
js_TextTrackKindChapters = "chapters"
js_TextTrackKindMetadata :: JSString
js_TextTrackKindMetadata = "metadata"
-- | <https://developer.mozilla.org/en-US/docs/Web/API TextTrackMode> (html)
data TextTrackMode = TextTrackModeDisabled
| TextTrackModeHidden
| TextTrackModeShowing
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal TextTrackMode where
toJSVal x = toJSVal (case x of
TextTrackModeDisabled -> js_TextTrackModeDisabled
TextTrackModeHidden -> js_TextTrackModeHidden
TextTrackModeShowing -> js_TextTrackModeShowing
)
instance FromJSVal TextTrackMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_TextTrackModeDisabled, TextTrackModeDisabled), (js_TextTrackModeHidden, TextTrackModeHidden), (js_TextTrackModeShowing, TextTrackModeShowing)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected TextTrackMode value") P.return
js_TextTrackModeDisabled :: JSString
js_TextTrackModeDisabled = "disabled"
js_TextTrackModeHidden :: JSString
js_TextTrackModeHidden = "hidden"
js_TextTrackModeShowing :: JSString
js_TextTrackModeShowing = "showing"
-- | <https://developer.mozilla.org/en-US/docs/Web/API TokenVersion> (trust-token-api)
data TokenVersion = TokenVersion1
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal TokenVersion where
toJSVal x = toJSVal (case x of
TokenVersion1 -> js_TokenVersion1
)
instance FromJSVal TokenVersion where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_TokenVersion1, TokenVersion1)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected TokenVersion value") P.return
js_TokenVersion1 :: JSString
js_TokenVersion1 = "1"
-- | <https://developer.mozilla.org/en-US/docs/Web/API TouchType> (touch-events)
data TouchType = TouchTypeDirect
| TouchTypeStylus
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal TouchType where
toJSVal x = toJSVal (case x of
TouchTypeDirect -> js_TouchTypeDirect
TouchTypeStylus -> js_TouchTypeStylus
)
instance FromJSVal TouchType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_TouchTypeDirect, TouchTypeDirect), (js_TouchTypeStylus, TouchTypeStylus)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected TouchType value") P.return
js_TouchTypeDirect :: JSString
js_TouchTypeDirect = "direct"
js_TouchTypeStylus :: JSString
js_TouchTypeStylus = "stylus"
-- | <https://developer.mozilla.org/en-US/docs/Web/API TransferFunction> (media-capabilities)
data TransferFunction = TransferFunctionSrgb
| TransferFunctionPq
| TransferFunctionHlg
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal TransferFunction where
toJSVal x = toJSVal (case x of
TransferFunctionSrgb -> js_TransferFunctionSrgb
TransferFunctionPq -> js_TransferFunctionPq
TransferFunctionHlg -> js_TransferFunctionHlg
)
instance FromJSVal TransferFunction where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_TransferFunctionSrgb, TransferFunctionSrgb), (js_TransferFunctionPq, TransferFunctionPq), (js_TransferFunctionHlg, TransferFunctionHlg)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected TransferFunction value") P.return
js_TransferFunctionSrgb :: JSString
js_TransferFunctionSrgb = "srgb"
js_TransferFunctionPq :: JSString
js_TransferFunctionPq = "pq"
js_TransferFunctionHlg :: JSString
js_TransferFunctionHlg = "hlg"
-- | <https://developer.mozilla.org/en-US/docs/Web/API VideoColorPrimaries> (webcodecs)
data VideoColorPrimaries = VideoColorPrimariesBt709
| VideoColorPrimariesBt470bg
| VideoColorPrimariesSmpte170m
| VideoColorPrimariesBt2020
| VideoColorPrimariesSmpte432
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal VideoColorPrimaries where
toJSVal x = toJSVal (case x of
VideoColorPrimariesBt709 -> js_VideoColorPrimariesBt709
VideoColorPrimariesBt470bg -> js_VideoColorPrimariesBt470bg
VideoColorPrimariesSmpte170m -> js_VideoColorPrimariesSmpte170m
VideoColorPrimariesBt2020 -> js_VideoColorPrimariesBt2020
VideoColorPrimariesSmpte432 -> js_VideoColorPrimariesSmpte432
)
instance FromJSVal VideoColorPrimaries where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_VideoColorPrimariesBt709, VideoColorPrimariesBt709), (js_VideoColorPrimariesBt470bg, VideoColorPrimariesBt470bg), (js_VideoColorPrimariesSmpte170m, VideoColorPrimariesSmpte170m), (js_VideoColorPrimariesBt2020, VideoColorPrimariesBt2020), (js_VideoColorPrimariesSmpte432, VideoColorPrimariesSmpte432)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected VideoColorPrimaries value") P.return
js_VideoColorPrimariesBt709 :: JSString
js_VideoColorPrimariesBt709 = "bt709"
js_VideoColorPrimariesBt470bg :: JSString
js_VideoColorPrimariesBt470bg = "bt470bg"
js_VideoColorPrimariesSmpte170m :: JSString
js_VideoColorPrimariesSmpte170m = "smpte170m"
js_VideoColorPrimariesBt2020 :: JSString
js_VideoColorPrimariesBt2020 = "bt2020"
js_VideoColorPrimariesSmpte432 :: JSString
js_VideoColorPrimariesSmpte432 = "smpte432"
-- | <https://developer.mozilla.org/en-US/docs/Web/API VideoEncoderBitrateMode> (webcodecs)
data VideoEncoderBitrateMode = VideoEncoderBitrateModeConstant
| VideoEncoderBitrateModeVariable
| VideoEncoderBitrateModeQuantizer
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal VideoEncoderBitrateMode where
toJSVal x = toJSVal (case x of
VideoEncoderBitrateModeConstant -> js_VideoEncoderBitrateModeConstant
VideoEncoderBitrateModeVariable -> js_VideoEncoderBitrateModeVariable
VideoEncoderBitrateModeQuantizer -> js_VideoEncoderBitrateModeQuantizer
)
instance FromJSVal VideoEncoderBitrateMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_VideoEncoderBitrateModeConstant, VideoEncoderBitrateModeConstant), (js_VideoEncoderBitrateModeVariable, VideoEncoderBitrateModeVariable), (js_VideoEncoderBitrateModeQuantizer, VideoEncoderBitrateModeQuantizer)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected VideoEncoderBitrateMode value") P.return
js_VideoEncoderBitrateModeConstant :: JSString
js_VideoEncoderBitrateModeConstant = "constant"
js_VideoEncoderBitrateModeVariable :: JSString
js_VideoEncoderBitrateModeVariable = "variable"
js_VideoEncoderBitrateModeQuantizer :: JSString
js_VideoEncoderBitrateModeQuantizer = "quantizer"
-- | <https://developer.mozilla.org/en-US/docs/Web/API VideoMatrixCoefficients> (webcodecs)
data VideoMatrixCoefficients = VideoMatrixCoefficientsRgb
| VideoMatrixCoefficientsBt709
| VideoMatrixCoefficientsBt470bg
| VideoMatrixCoefficientsSmpte170m
| VideoMatrixCoefficientsBt2020Ncl
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal VideoMatrixCoefficients where
toJSVal x = toJSVal (case x of
VideoMatrixCoefficientsRgb -> js_VideoMatrixCoefficientsRgb
VideoMatrixCoefficientsBt709 -> js_VideoMatrixCoefficientsBt709
VideoMatrixCoefficientsBt470bg -> js_VideoMatrixCoefficientsBt470bg
VideoMatrixCoefficientsSmpte170m -> js_VideoMatrixCoefficientsSmpte170m
VideoMatrixCoefficientsBt2020Ncl -> js_VideoMatrixCoefficientsBt2020Ncl
)
instance FromJSVal VideoMatrixCoefficients where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_VideoMatrixCoefficientsRgb, VideoMatrixCoefficientsRgb), (js_VideoMatrixCoefficientsBt709, VideoMatrixCoefficientsBt709), (js_VideoMatrixCoefficientsBt470bg, VideoMatrixCoefficientsBt470bg), (js_VideoMatrixCoefficientsSmpte170m, VideoMatrixCoefficientsSmpte170m), (js_VideoMatrixCoefficientsBt2020Ncl, VideoMatrixCoefficientsBt2020Ncl)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected VideoMatrixCoefficients value") P.return
js_VideoMatrixCoefficientsRgb :: JSString
js_VideoMatrixCoefficientsRgb = "rgb"
js_VideoMatrixCoefficientsBt709 :: JSString
js_VideoMatrixCoefficientsBt709 = "bt709"
js_VideoMatrixCoefficientsBt470bg :: JSString
js_VideoMatrixCoefficientsBt470bg = "bt470bg"
js_VideoMatrixCoefficientsSmpte170m :: JSString
js_VideoMatrixCoefficientsSmpte170m = "smpte170m"
js_VideoMatrixCoefficientsBt2020Ncl :: JSString
js_VideoMatrixCoefficientsBt2020Ncl = "bt2020-ncl"
-- | <https://developer.mozilla.org/en-US/docs/Web/API VideoPixelFormat> (webcodecs)
data VideoPixelFormat = VideoPixelFormatI420
| VideoPixelFormatI420P10
| VideoPixelFormatI420P12
| VideoPixelFormatI420A
| VideoPixelFormatI420AP10
| VideoPixelFormatI420AP12
| VideoPixelFormatI422
| VideoPixelFormatI422P10
| VideoPixelFormatI422P12
| VideoPixelFormatI422A
| VideoPixelFormatI422AP10
| VideoPixelFormatI422AP12
| VideoPixelFormatI444
| VideoPixelFormatI444P10
| VideoPixelFormatI444P12
| VideoPixelFormatI444A
| VideoPixelFormatI444AP10
| VideoPixelFormatI444AP12
| VideoPixelFormatNV12
| VideoPixelFormatRGBA
| VideoPixelFormatRGBX
| VideoPixelFormatBGRA
| VideoPixelFormatBGRX
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal VideoPixelFormat where
toJSVal x = toJSVal (case x of
VideoPixelFormatI420 -> js_VideoPixelFormatI420
VideoPixelFormatI420P10 -> js_VideoPixelFormatI420P10
VideoPixelFormatI420P12 -> js_VideoPixelFormatI420P12
VideoPixelFormatI420A -> js_VideoPixelFormatI420A
VideoPixelFormatI420AP10 -> js_VideoPixelFormatI420AP10
VideoPixelFormatI420AP12 -> js_VideoPixelFormatI420AP12
VideoPixelFormatI422 -> js_VideoPixelFormatI422
VideoPixelFormatI422P10 -> js_VideoPixelFormatI422P10
VideoPixelFormatI422P12 -> js_VideoPixelFormatI422P12
VideoPixelFormatI422A -> js_VideoPixelFormatI422A
VideoPixelFormatI422AP10 -> js_VideoPixelFormatI422AP10
VideoPixelFormatI422AP12 -> js_VideoPixelFormatI422AP12
VideoPixelFormatI444 -> js_VideoPixelFormatI444
VideoPixelFormatI444P10 -> js_VideoPixelFormatI444P10
VideoPixelFormatI444P12 -> js_VideoPixelFormatI444P12
VideoPixelFormatI444A -> js_VideoPixelFormatI444A
VideoPixelFormatI444AP10 -> js_VideoPixelFormatI444AP10
VideoPixelFormatI444AP12 -> js_VideoPixelFormatI444AP12
VideoPixelFormatNV12 -> js_VideoPixelFormatNV12
VideoPixelFormatRGBA -> js_VideoPixelFormatRGBA
VideoPixelFormatRGBX -> js_VideoPixelFormatRGBX
VideoPixelFormatBGRA -> js_VideoPixelFormatBGRA
VideoPixelFormatBGRX -> js_VideoPixelFormatBGRX
)
instance FromJSVal VideoPixelFormat where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_VideoPixelFormatI420, VideoPixelFormatI420), (js_VideoPixelFormatI420P10, VideoPixelFormatI420P10), (js_VideoPixelFormatI420P12, VideoPixelFormatI420P12), (js_VideoPixelFormatI420A, VideoPixelFormatI420A), (js_VideoPixelFormatI420AP10, VideoPixelFormatI420AP10), (js_VideoPixelFormatI420AP12, VideoPixelFormatI420AP12), (js_VideoPixelFormatI422, VideoPixelFormatI422), (js_VideoPixelFormatI422P10, VideoPixelFormatI422P10), (js_VideoPixelFormatI422P12, VideoPixelFormatI422P12), (js_VideoPixelFormatI422A, VideoPixelFormatI422A), (js_VideoPixelFormatI422AP10, VideoPixelFormatI422AP10), (js_VideoPixelFormatI422AP12, VideoPixelFormatI422AP12), (js_VideoPixelFormatI444, VideoPixelFormatI444), (js_VideoPixelFormatI444P10, VideoPixelFormatI444P10), (js_VideoPixelFormatI444P12, VideoPixelFormatI444P12), (js_VideoPixelFormatI444A, VideoPixelFormatI444A), (js_VideoPixelFormatI444AP10, VideoPixelFormatI444AP10), (js_VideoPixelFormatI444AP12, VideoPixelFormatI444AP12), (js_VideoPixelFormatNV12, VideoPixelFormatNV12), (js_VideoPixelFormatRGBA, VideoPixelFormatRGBA), (js_VideoPixelFormatRGBX, VideoPixelFormatRGBX), (js_VideoPixelFormatBGRA, VideoPixelFormatBGRA), (js_VideoPixelFormatBGRX, VideoPixelFormatBGRX)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected VideoPixelFormat value") P.return
js_VideoPixelFormatI420 :: JSString
js_VideoPixelFormatI420 = "I420"
js_VideoPixelFormatI420P10 :: JSString
js_VideoPixelFormatI420P10 = "I420P10"
js_VideoPixelFormatI420P12 :: JSString
js_VideoPixelFormatI420P12 = "I420P12"
js_VideoPixelFormatI420A :: JSString
js_VideoPixelFormatI420A = "I420A"
js_VideoPixelFormatI420AP10 :: JSString
js_VideoPixelFormatI420AP10 = "I420AP10"
js_VideoPixelFormatI420AP12 :: JSString
js_VideoPixelFormatI420AP12 = "I420AP12"
js_VideoPixelFormatI422 :: JSString
js_VideoPixelFormatI422 = "I422"
js_VideoPixelFormatI422P10 :: JSString
js_VideoPixelFormatI422P10 = "I422P10"
js_VideoPixelFormatI422P12 :: JSString
js_VideoPixelFormatI422P12 = "I422P12"
js_VideoPixelFormatI422A :: JSString
js_VideoPixelFormatI422A = "I422A"
js_VideoPixelFormatI422AP10 :: JSString
js_VideoPixelFormatI422AP10 = "I422AP10"
js_VideoPixelFormatI422AP12 :: JSString
js_VideoPixelFormatI422AP12 = "I422AP12"
js_VideoPixelFormatI444 :: JSString
js_VideoPixelFormatI444 = "I444"
js_VideoPixelFormatI444P10 :: JSString
js_VideoPixelFormatI444P10 = "I444P10"
js_VideoPixelFormatI444P12 :: JSString
js_VideoPixelFormatI444P12 = "I444P12"
js_VideoPixelFormatI444A :: JSString
js_VideoPixelFormatI444A = "I444A"
js_VideoPixelFormatI444AP10 :: JSString
js_VideoPixelFormatI444AP10 = "I444AP10"
js_VideoPixelFormatI444AP12 :: JSString
js_VideoPixelFormatI444AP12 = "I444AP12"
js_VideoPixelFormatNV12 :: JSString
js_VideoPixelFormatNV12 = "NV12"
js_VideoPixelFormatRGBA :: JSString
js_VideoPixelFormatRGBA = "RGBA"
js_VideoPixelFormatRGBX :: JSString
js_VideoPixelFormatRGBX = "RGBX"
js_VideoPixelFormatBGRA :: JSString
js_VideoPixelFormatBGRA = "BGRA"
js_VideoPixelFormatBGRX :: JSString
js_VideoPixelFormatBGRX = "BGRX"
-- | <https://developer.mozilla.org/en-US/docs/Web/API VideoTransferCharacteristics> (webcodecs)
data VideoTransferCharacteristics = VideoTransferCharacteristicsBt709
| VideoTransferCharacteristicsSmpte170m
| VideoTransferCharacteristicsIec6196621
| VideoTransferCharacteristicsLinear
| VideoTransferCharacteristicsPq
| VideoTransferCharacteristicsHlg
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal VideoTransferCharacteristics where
toJSVal x = toJSVal (case x of
VideoTransferCharacteristicsBt709 -> js_VideoTransferCharacteristicsBt709
VideoTransferCharacteristicsSmpte170m -> js_VideoTransferCharacteristicsSmpte170m
VideoTransferCharacteristicsIec6196621 -> js_VideoTransferCharacteristicsIec6196621
VideoTransferCharacteristicsLinear -> js_VideoTransferCharacteristicsLinear
VideoTransferCharacteristicsPq -> js_VideoTransferCharacteristicsPq
VideoTransferCharacteristicsHlg -> js_VideoTransferCharacteristicsHlg
)
instance FromJSVal VideoTransferCharacteristics where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_VideoTransferCharacteristicsBt709, VideoTransferCharacteristicsBt709), (js_VideoTransferCharacteristicsSmpte170m, VideoTransferCharacteristicsSmpte170m), (js_VideoTransferCharacteristicsIec6196621, VideoTransferCharacteristicsIec6196621), (js_VideoTransferCharacteristicsLinear, VideoTransferCharacteristicsLinear), (js_VideoTransferCharacteristicsPq, VideoTransferCharacteristicsPq), (js_VideoTransferCharacteristicsHlg, VideoTransferCharacteristicsHlg)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected VideoTransferCharacteristics value") P.return
js_VideoTransferCharacteristicsBt709 :: JSString
js_VideoTransferCharacteristicsBt709 = "bt709"
js_VideoTransferCharacteristicsSmpte170m :: JSString
js_VideoTransferCharacteristicsSmpte170m = "smpte170m"
js_VideoTransferCharacteristicsIec6196621 :: JSString
js_VideoTransferCharacteristicsIec6196621 = "iec61966-2-1"
js_VideoTransferCharacteristicsLinear :: JSString
js_VideoTransferCharacteristicsLinear = "linear"
js_VideoTransferCharacteristicsPq :: JSString
js_VideoTransferCharacteristicsPq = "pq"
js_VideoTransferCharacteristicsHlg :: JSString
js_VideoTransferCharacteristicsHlg = "hlg"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WakeLockType> (screen-wake-lock)
data WakeLockType = WakeLockTypeScreen
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WakeLockType where
toJSVal x = toJSVal (case x of
WakeLockTypeScreen -> js_WakeLockTypeScreen
)
instance FromJSVal WakeLockType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WakeLockTypeScreen, WakeLockTypeScreen)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WakeLockType value") P.return
js_WakeLockTypeScreen :: JSString
js_WakeLockTypeScreen = "screen"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WebGLPowerPreference> (webgl1)
data WebGLPowerPreference = WebGLPowerPreferenceDefault
| WebGLPowerPreferenceLowPower
| WebGLPowerPreferenceHighPerformance
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WebGLPowerPreference where
toJSVal x = toJSVal (case x of
WebGLPowerPreferenceDefault -> js_WebGLPowerPreferenceDefault
WebGLPowerPreferenceLowPower -> js_WebGLPowerPreferenceLowPower
WebGLPowerPreferenceHighPerformance -> js_WebGLPowerPreferenceHighPerformance
)
instance FromJSVal WebGLPowerPreference where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WebGLPowerPreferenceDefault, WebGLPowerPreferenceDefault), (js_WebGLPowerPreferenceLowPower, WebGLPowerPreferenceLowPower), (js_WebGLPowerPreferenceHighPerformance, WebGLPowerPreferenceHighPerformance)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WebGLPowerPreference value") P.return
js_WebGLPowerPreferenceDefault :: JSString
js_WebGLPowerPreferenceDefault = "default"
js_WebGLPowerPreferenceLowPower :: JSString
js_WebGLPowerPreferenceLowPower = "low-power"
js_WebGLPowerPreferenceHighPerformance :: JSString
js_WebGLPowerPreferenceHighPerformance = "high-performance"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WebTransportCongestionControl> (webtransport)
data WebTransportCongestionControl = WebTransportCongestionControlDefault
| WebTransportCongestionControlThroughput
| WebTransportCongestionControlLowLatency
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WebTransportCongestionControl where
toJSVal x = toJSVal (case x of
WebTransportCongestionControlDefault -> js_WebTransportCongestionControlDefault
WebTransportCongestionControlThroughput -> js_WebTransportCongestionControlThroughput
WebTransportCongestionControlLowLatency -> js_WebTransportCongestionControlLowLatency
)
instance FromJSVal WebTransportCongestionControl where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WebTransportCongestionControlDefault, WebTransportCongestionControlDefault), (js_WebTransportCongestionControlThroughput, WebTransportCongestionControlThroughput), (js_WebTransportCongestionControlLowLatency, WebTransportCongestionControlLowLatency)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WebTransportCongestionControl value") P.return
js_WebTransportCongestionControlDefault :: JSString
js_WebTransportCongestionControlDefault = "default"
js_WebTransportCongestionControlThroughput :: JSString
js_WebTransportCongestionControlThroughput = "throughput"
js_WebTransportCongestionControlLowLatency :: JSString
js_WebTransportCongestionControlLowLatency = "low-latency"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WebTransportErrorSource> (webtransport)
data WebTransportErrorSource = WebTransportErrorSourceStream
| WebTransportErrorSourceSession
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WebTransportErrorSource where
toJSVal x = toJSVal (case x of
WebTransportErrorSourceStream -> js_WebTransportErrorSourceStream
WebTransportErrorSourceSession -> js_WebTransportErrorSourceSession
)
instance FromJSVal WebTransportErrorSource where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WebTransportErrorSourceStream, WebTransportErrorSourceStream), (js_WebTransportErrorSourceSession, WebTransportErrorSourceSession)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WebTransportErrorSource value") P.return
js_WebTransportErrorSourceStream :: JSString
js_WebTransportErrorSourceStream = "stream"
js_WebTransportErrorSourceSession :: JSString
js_WebTransportErrorSourceSession = "session"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WebTransportReliabilityMode> (webtransport)
data WebTransportReliabilityMode = WebTransportReliabilityModePending
| WebTransportReliabilityModeReliableOnly
| WebTransportReliabilityModeSupportsUnreliable
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WebTransportReliabilityMode where
toJSVal x = toJSVal (case x of
WebTransportReliabilityModePending -> js_WebTransportReliabilityModePending
WebTransportReliabilityModeReliableOnly -> js_WebTransportReliabilityModeReliableOnly
WebTransportReliabilityModeSupportsUnreliable -> js_WebTransportReliabilityModeSupportsUnreliable
)
instance FromJSVal WebTransportReliabilityMode where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WebTransportReliabilityModePending, WebTransportReliabilityModePending), (js_WebTransportReliabilityModeReliableOnly, WebTransportReliabilityModeReliableOnly), (js_WebTransportReliabilityModeSupportsUnreliable, WebTransportReliabilityModeSupportsUnreliable)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WebTransportReliabilityMode value") P.return
js_WebTransportReliabilityModePending :: JSString
js_WebTransportReliabilityModePending = "pending"
js_WebTransportReliabilityModeReliableOnly :: JSString
js_WebTransportReliabilityModeReliableOnly = "reliable-only"
js_WebTransportReliabilityModeSupportsUnreliable :: JSString
js_WebTransportReliabilityModeSupportsUnreliable = "supports-unreliable"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WindowAudioPreferenceEnum> (screen-capture)
data WindowAudioPreferenceEnum = WindowAudioPreferenceEnumSystem
| WindowAudioPreferenceEnumWindow
| WindowAudioPreferenceEnumExclude
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WindowAudioPreferenceEnum where
toJSVal x = toJSVal (case x of
WindowAudioPreferenceEnumSystem -> js_WindowAudioPreferenceEnumSystem
WindowAudioPreferenceEnumWindow -> js_WindowAudioPreferenceEnumWindow
WindowAudioPreferenceEnumExclude -> js_WindowAudioPreferenceEnumExclude
)
instance FromJSVal WindowAudioPreferenceEnum where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WindowAudioPreferenceEnumSystem, WindowAudioPreferenceEnumSystem), (js_WindowAudioPreferenceEnumWindow, WindowAudioPreferenceEnumWindow), (js_WindowAudioPreferenceEnumExclude, WindowAudioPreferenceEnumExclude)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WindowAudioPreferenceEnum value") P.return
js_WindowAudioPreferenceEnumSystem :: JSString
js_WindowAudioPreferenceEnumSystem = "system"
js_WindowAudioPreferenceEnumWindow :: JSString
js_WindowAudioPreferenceEnumWindow = "window"
js_WindowAudioPreferenceEnumExclude :: JSString
js_WindowAudioPreferenceEnumExclude = "exclude"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WorkerType> (html)
data WorkerType = WorkerTypeClassic
| WorkerTypeModule
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WorkerType where
toJSVal x = toJSVal (case x of
WorkerTypeClassic -> js_WorkerTypeClassic
WorkerTypeModule -> js_WorkerTypeModule
)
instance FromJSVal WorkerType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WorkerTypeClassic, WorkerTypeClassic), (js_WorkerTypeModule, WorkerTypeModule)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WorkerType value") P.return
js_WorkerTypeClassic :: JSString
js_WorkerTypeClassic = "classic"
js_WorkerTypeModule :: JSString
js_WorkerTypeModule = "module"
-- | <https://developer.mozilla.org/en-US/docs/Web/API WriteCommandType> (fs)
data WriteCommandType = WriteCommandTypeWrite
| WriteCommandTypeSeek
| WriteCommandTypeTruncate
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal WriteCommandType where
toJSVal x = toJSVal (case x of
WriteCommandTypeWrite -> js_WriteCommandTypeWrite
WriteCommandTypeSeek -> js_WriteCommandTypeSeek
WriteCommandTypeTruncate -> js_WriteCommandTypeTruncate
)
instance FromJSVal WriteCommandType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_WriteCommandTypeWrite, WriteCommandTypeWrite), (js_WriteCommandTypeSeek, WriteCommandTypeSeek), (js_WriteCommandTypeTruncate, WriteCommandTypeTruncate)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected WriteCommandType value") P.return
js_WriteCommandTypeWrite :: JSString
js_WriteCommandTypeWrite = "write"
js_WriteCommandTypeSeek :: JSString
js_WriteCommandTypeSeek = "seek"
js_WriteCommandTypeTruncate :: JSString
js_WriteCommandTypeTruncate = "truncate"
-- | <https://developer.mozilla.org/en-US/docs/Web/API XMLHttpRequestResponseType> (xhr)
data XMLHttpRequestResponseType = XMLHttpRequestResponseType
| XMLHttpRequestResponseTypeArraybuffer
| XMLHttpRequestResponseTypeBlob
| XMLHttpRequestResponseTypeDocument
| XMLHttpRequestResponseTypeJson
| XMLHttpRequestResponseTypeText
deriving (Show, Read, Eq, Ord, Bounded, Enum, Typeable)
instance ToJSVal XMLHttpRequestResponseType where
toJSVal x = toJSVal (case x of
XMLHttpRequestResponseType -> js_XMLHttpRequestResponseType
XMLHttpRequestResponseTypeArraybuffer -> js_XMLHttpRequestResponseTypeArraybuffer
XMLHttpRequestResponseTypeBlob -> js_XMLHttpRequestResponseTypeBlob
XMLHttpRequestResponseTypeDocument -> js_XMLHttpRequestResponseTypeDocument
XMLHttpRequestResponseTypeJson -> js_XMLHttpRequestResponseTypeJson
XMLHttpRequestResponseTypeText -> js_XMLHttpRequestResponseTypeText
)
instance FromJSVal XMLHttpRequestResponseType where
fromJSVal x = (>>= (`P.lookup` table)) <$> (fromJSVal x :: JSM (Maybe JSString))
where table = [(js_XMLHttpRequestResponseType, XMLHttpRequestResponseType), (js_XMLHttpRequestResponseTypeArraybuffer, XMLHttpRequestResponseTypeArraybuffer), (js_XMLHttpRequestResponseTypeBlob, XMLHttpRequestResponseTypeBlob), (js_XMLHttpRequestResponseTypeDocument, XMLHttpRequestResponseTypeDocument), (js_XMLHttpRequestResponseTypeJson, XMLHttpRequestResponseTypeJson), (js_XMLHttpRequestResponseTypeText, XMLHttpRequestResponseTypeText)]
fromJSValUnchecked x = fromJSVal x >>= P.maybe (P.error "Unexpected XMLHttpRequestResponseType value") P.return
js_XMLHttpRequestResponseType :: JSString
js_XMLHttpRequestResponseType = ""
js_XMLHttpRequestResponseTypeArraybuffer :: JSString
js_XMLHttpRequestResponseTypeArraybuffer = "arraybuffer"
js_XMLHttpRequestResponseTypeBlob :: JSString
js_XMLHttpRequestResponseTypeBlob = "blob"
js_XMLHttpRequestResponseTypeDocument :: JSString
js_XMLHttpRequestResponseTypeDocument = "document"
js_XMLHttpRequestResponseTypeJson :: JSString
js_XMLHttpRequestResponseTypeJson = "json"
js_XMLHttpRequestResponseTypeText :: JSString
js_XMLHttpRequestResponseTypeText = "text"