packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUDepthStencilState.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webgpu (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.GPUDepthStencilState
       (js_newGPUDepthStencilState, js_setFormat, js_getFormat, js_setDepthWriteEnabled, js_getDepthWriteEnabled, js_setDepthCompare, js_getDepthCompare, js_setStencilFront, js_getStencilFront, js_setStencilBack, js_getStencilBack, js_setStencilReadMask, js_getStencilReadMask, js_setStencilWriteMask, js_getStencilWriteMask, js_setDepthBias, js_getDepthBias, js_setDepthBiasSlopeScale, js_getDepthBiasSlopeScale, js_setDepthBiasClamp, js_getDepthBiasClamp, newGPUDepthStencilState, setFormat, getFormat, setDepthWriteEnabled, getDepthWriteEnabled, getDepthWriteEnabledUnsafe, getDepthWriteEnabledUnchecked, setDepthCompare, getDepthCompare, getDepthCompareUnsafe, getDepthCompareUnchecked, setStencilFront, getStencilFront, getStencilFrontUnsafe, getStencilFrontUnchecked, setStencilBack, getStencilBack, getStencilBackUnsafe, getStencilBackUnchecked, setStencilReadMask, getStencilReadMask, getStencilReadMaskUnsafe, getStencilReadMaskUnchecked, setStencilWriteMask, getStencilWriteMask, getStencilWriteMaskUnsafe, getStencilWriteMaskUnchecked, setDepthBias, getDepthBias, getDepthBiasUnsafe, getDepthBiasUnchecked, setDepthBiasSlopeScale, getDepthBiasSlopeScale, getDepthBiasSlopeScaleUnsafe, getDepthBiasSlopeScaleUnchecked, setDepthBiasClamp, getDepthBiasClamp, getDepthBiasClampUnsafe, getDepthBiasClampUnchecked, GPUDepthStencilState(..), gTypeGPUDepthStencilState)
       where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums

foreign import javascript safe "(($1) => { return ({\"format\": $1}); })"
        js_newGPUDepthStencilState :: JSVal -> IO GPUDepthStencilState
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpudepthstencilstate GPUDepthStencilState specification>
newGPUDepthStencilState :: (MonadDOM m) => GPUTextureFormat -> m GPUDepthStencilState
newGPUDepthStencilState format = liftDOM (((toJSVal format) >>= \a1' -> js_newGPUDepthStencilState a1'))

foreign import javascript safe "(($1, $2) => { $1[\"format\"] = $2; })"
        js_setFormat :: GPUDepthStencilState -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-format GPUDepthStencilState.format specification>
setFormat :: (MonadDOM m) => GPUDepthStencilState -> GPUTextureFormat -> m ()
setFormat self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setFormat (self) a2')))

foreign import javascript unsafe "(($1) => { return $1[\"format\"]; })"
        js_getFormat :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-format GPUDepthStencilState.format specification>
getFormat :: (MonadDOM m) => GPUDepthStencilState -> m GPUTextureFormat
getFormat self = liftDOM (((js_getFormat (self)) >>= fromJSValUnchecked))

foreign import javascript safe "(($1, $2) => { $1[\"depthWriteEnabled\"] = $2; })"
        js_setDepthWriteEnabled :: GPUDepthStencilState -> Bool -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthwriteenabled GPUDepthStencilState.depthWriteEnabled specification>
setDepthWriteEnabled :: (MonadDOM m) => GPUDepthStencilState -> Bool -> m ()
setDepthWriteEnabled self val = liftDOM (void ((js_setDepthWriteEnabled (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"depthWriteEnabled\"]; })"
        js_getDepthWriteEnabled :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthwriteenabled GPUDepthStencilState.depthWriteEnabled specification>
getDepthWriteEnabled :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe Bool)
getDepthWriteEnabled self = liftDOM (((js_getDepthWriteEnabled (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthwriteenabled GPUDepthStencilState.depthWriteEnabled specification>
getDepthWriteEnabledUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m Bool
getDepthWriteEnabledUnsafe self = liftDOM ((((js_getDepthWriteEnabled (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthwriteenabled GPUDepthStencilState.depthWriteEnabled specification>
getDepthWriteEnabledUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m Bool
getDepthWriteEnabledUnchecked self = liftDOM ((pFromJSVal <$> (js_getDepthWriteEnabled (self))))

foreign import javascript safe "(($1, $2) => { $1[\"depthCompare\"] = $2; })"
        js_setDepthCompare :: GPUDepthStencilState -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthcompare GPUDepthStencilState.depthCompare specification>
setDepthCompare :: (MonadDOM m) => GPUDepthStencilState -> GPUCompareFunction -> m ()
setDepthCompare self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setDepthCompare (self) a2')))

foreign import javascript unsafe "(($1) => { return $1[\"depthCompare\"]; })"
        js_getDepthCompare :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthcompare GPUDepthStencilState.depthCompare specification>
getDepthCompare :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe GPUCompareFunction)
getDepthCompare self = liftDOM (((js_getDepthCompare (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthcompare GPUDepthStencilState.depthCompare specification>
getDepthCompareUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m GPUCompareFunction
getDepthCompareUnsafe self = liftDOM ((((js_getDepthCompare (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthcompare GPUDepthStencilState.depthCompare specification>
getDepthCompareUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m GPUCompareFunction
getDepthCompareUnchecked self = liftDOM ((pFromJSVal <$> (js_getDepthCompare (self))))

foreign import javascript safe "(($1, $2) => { $1[\"stencilFront\"] = $2; })"
        js_setStencilFront :: GPUDepthStencilState -> GPUStencilFaceState -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilfront GPUDepthStencilState.stencilFront specification>
setStencilFront :: (MonadDOM m) => GPUDepthStencilState -> GPUStencilFaceState -> m ()
setStencilFront self val = liftDOM (void ((js_setStencilFront (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"stencilFront\"]; })"
        js_getStencilFront :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilfront GPUDepthStencilState.stencilFront specification>
getStencilFront :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe GPUStencilFaceState)
getStencilFront self = liftDOM (((js_getStencilFront (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilfront GPUDepthStencilState.stencilFront specification>
getStencilFrontUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m GPUStencilFaceState
getStencilFrontUnsafe self = liftDOM ((((js_getStencilFront (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilfront GPUDepthStencilState.stencilFront specification>
getStencilFrontUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m GPUStencilFaceState
getStencilFrontUnchecked self = liftDOM ((pFromJSVal <$> (js_getStencilFront (self))))

foreign import javascript safe "(($1, $2) => { $1[\"stencilBack\"] = $2; })"
        js_setStencilBack :: GPUDepthStencilState -> GPUStencilFaceState -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilback GPUDepthStencilState.stencilBack specification>
setStencilBack :: (MonadDOM m) => GPUDepthStencilState -> GPUStencilFaceState -> m ()
setStencilBack self val = liftDOM (void ((js_setStencilBack (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"stencilBack\"]; })"
        js_getStencilBack :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilback GPUDepthStencilState.stencilBack specification>
getStencilBack :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe GPUStencilFaceState)
getStencilBack self = liftDOM (((js_getStencilBack (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilback GPUDepthStencilState.stencilBack specification>
getStencilBackUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m GPUStencilFaceState
getStencilBackUnsafe self = liftDOM ((((js_getStencilBack (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilback GPUDepthStencilState.stencilBack specification>
getStencilBackUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m GPUStencilFaceState
getStencilBackUnchecked self = liftDOM ((pFromJSVal <$> (js_getStencilBack (self))))

foreign import javascript safe "(($1, $2) => { $1[\"stencilReadMask\"] = $2; })"
        js_setStencilReadMask :: GPUDepthStencilState -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilreadmask GPUDepthStencilState.stencilReadMask specification>
setStencilReadMask :: (MonadDOM m) => GPUDepthStencilState -> Word -> m ()
setStencilReadMask self val = liftDOM (void ((js_setStencilReadMask (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"stencilReadMask\"]; })"
        js_getStencilReadMask :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilreadmask GPUDepthStencilState.stencilReadMask specification>
getStencilReadMask :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe Word)
getStencilReadMask self = liftDOM (((js_getStencilReadMask (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilreadmask GPUDepthStencilState.stencilReadMask specification>
getStencilReadMaskUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m Word
getStencilReadMaskUnsafe self = liftDOM ((((js_getStencilReadMask (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilreadmask GPUDepthStencilState.stencilReadMask specification>
getStencilReadMaskUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m Word
getStencilReadMaskUnchecked self = liftDOM ((pFromJSVal <$> (js_getStencilReadMask (self))))

foreign import javascript safe "(($1, $2) => { $1[\"stencilWriteMask\"] = $2; })"
        js_setStencilWriteMask :: GPUDepthStencilState -> Word -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilwritemask GPUDepthStencilState.stencilWriteMask specification>
setStencilWriteMask :: (MonadDOM m) => GPUDepthStencilState -> Word -> m ()
setStencilWriteMask self val = liftDOM (void ((js_setStencilWriteMask (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"stencilWriteMask\"]; })"
        js_getStencilWriteMask :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilwritemask GPUDepthStencilState.stencilWriteMask specification>
getStencilWriteMask :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe Word)
getStencilWriteMask self = liftDOM (((js_getStencilWriteMask (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilwritemask GPUDepthStencilState.stencilWriteMask specification>
getStencilWriteMaskUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m Word
getStencilWriteMaskUnsafe self = liftDOM ((((js_getStencilWriteMask (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-stencilwritemask GPUDepthStencilState.stencilWriteMask specification>
getStencilWriteMaskUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m Word
getStencilWriteMaskUnchecked self = liftDOM ((pFromJSVal <$> (js_getStencilWriteMask (self))))

foreign import javascript safe "(($1, $2) => { $1[\"depthBias\"] = $2; })"
        js_setDepthBias :: GPUDepthStencilState -> Int -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbias GPUDepthStencilState.depthBias specification>
setDepthBias :: (MonadDOM m) => GPUDepthStencilState -> Int -> m ()
setDepthBias self val = liftDOM (void ((js_setDepthBias (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"depthBias\"]; })"
        js_getDepthBias :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbias GPUDepthStencilState.depthBias specification>
getDepthBias :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe Int)
getDepthBias self = liftDOM (((js_getDepthBias (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbias GPUDepthStencilState.depthBias specification>
getDepthBiasUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m Int
getDepthBiasUnsafe self = liftDOM ((((js_getDepthBias (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbias GPUDepthStencilState.depthBias specification>
getDepthBiasUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m Int
getDepthBiasUnchecked self = liftDOM ((pFromJSVal <$> (js_getDepthBias (self))))

foreign import javascript safe "(($1, $2) => { $1[\"depthBiasSlopeScale\"] = $2; })"
        js_setDepthBiasSlopeScale :: GPUDepthStencilState -> Float -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasslopescale GPUDepthStencilState.depthBiasSlopeScale specification>
setDepthBiasSlopeScale :: (MonadDOM m) => GPUDepthStencilState -> Float -> m ()
setDepthBiasSlopeScale self val = liftDOM (void ((js_setDepthBiasSlopeScale (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"depthBiasSlopeScale\"]; })"
        js_getDepthBiasSlopeScale :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasslopescale GPUDepthStencilState.depthBiasSlopeScale specification>
getDepthBiasSlopeScale :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe Float)
getDepthBiasSlopeScale self = liftDOM (((js_getDepthBiasSlopeScale (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasslopescale GPUDepthStencilState.depthBiasSlopeScale specification>
getDepthBiasSlopeScaleUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m Float
getDepthBiasSlopeScaleUnsafe self = liftDOM ((((js_getDepthBiasSlopeScale (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasslopescale GPUDepthStencilState.depthBiasSlopeScale specification>
getDepthBiasSlopeScaleUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m Float
getDepthBiasSlopeScaleUnchecked self = liftDOM ((pFromJSVal <$> (js_getDepthBiasSlopeScale (self))))

foreign import javascript safe "(($1, $2) => { $1[\"depthBiasClamp\"] = $2; })"
        js_setDepthBiasClamp :: GPUDepthStencilState -> Float -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasclamp GPUDepthStencilState.depthBiasClamp specification>
setDepthBiasClamp :: (MonadDOM m) => GPUDepthStencilState -> Float -> m ()
setDepthBiasClamp self val = liftDOM (void ((js_setDepthBiasClamp (self) (val))))

foreign import javascript unsafe "(($1) => { return $1[\"depthBiasClamp\"]; })"
        js_getDepthBiasClamp :: GPUDepthStencilState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasclamp GPUDepthStencilState.depthBiasClamp specification>
getDepthBiasClamp :: (MonadDOM m) => GPUDepthStencilState -> m (Maybe Float)
getDepthBiasClamp self = liftDOM (((js_getDepthBiasClamp (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasclamp GPUDepthStencilState.depthBiasClamp specification>
getDepthBiasClampUnsafe :: (MonadDOM m, HasCallStack) => GPUDepthStencilState -> m Float
getDepthBiasClampUnsafe self = liftDOM ((((js_getDepthBiasClamp (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpudepthstencilstate-depthbiasclamp GPUDepthStencilState.depthBiasClamp specification>
getDepthBiasClampUnchecked :: (MonadDOM m) => GPUDepthStencilState -> m Float
getDepthBiasClampUnchecked self = liftDOM ((pFromJSVal <$> (js_getDepthBiasClamp (self))))