packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/GPUStencilFaceState.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.GPUStencilFaceState
       (js_newGPUStencilFaceState, js_setCompare, js_getCompare, js_setFailOp, js_getFailOp, js_setDepthFailOp, js_getDepthFailOp, js_setPassOp, js_getPassOp, newGPUStencilFaceState, setCompare, getCompare, getCompareUnsafe, getCompareUnchecked, setFailOp, getFailOp, getFailOpUnsafe, getFailOpUnchecked, setDepthFailOp, getDepthFailOp, getDepthFailOpUnsafe, getDepthFailOpUnchecked, setPassOp, getPassOp, getPassOpUnsafe, getPassOpUnchecked, GPUStencilFaceState(..), gTypeGPUStencilFaceState)
       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 "(() => { return ({}); })"
        js_newGPUStencilFaceState :: IO GPUStencilFaceState
-- | <https://gpuweb.github.io/gpuweb/#dictdef-gpustencilfacestate GPUStencilFaceState specification>
newGPUStencilFaceState :: (MonadDOM m) => m GPUStencilFaceState
newGPUStencilFaceState = liftDOM ((js_newGPUStencilFaceState))

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

foreign import javascript unsafe "(($1) => { return $1[\"compare\"]; })"
        js_getCompare :: GPUStencilFaceState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-compare GPUStencilFaceState.compare specification>
getCompare :: (MonadDOM m) => GPUStencilFaceState -> m (Maybe GPUCompareFunction)
getCompare self = liftDOM (((js_getCompare (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-compare GPUStencilFaceState.compare specification>
getCompareUnsafe :: (MonadDOM m, HasCallStack) => GPUStencilFaceState -> m GPUCompareFunction
getCompareUnsafe self = liftDOM ((((js_getCompare (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-compare GPUStencilFaceState.compare specification>
getCompareUnchecked :: (MonadDOM m) => GPUStencilFaceState -> m GPUCompareFunction
getCompareUnchecked self = liftDOM ((pFromJSVal <$> (js_getCompare (self))))

foreign import javascript safe "(($1, $2) => { $1[\"failOp\"] = $2; })"
        js_setFailOp :: GPUStencilFaceState -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-failop GPUStencilFaceState.failOp specification>
setFailOp :: (MonadDOM m) => GPUStencilFaceState -> GPUStencilOperation -> m ()
setFailOp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setFailOp (self) a2')))

foreign import javascript unsafe "(($1) => { return $1[\"failOp\"]; })"
        js_getFailOp :: GPUStencilFaceState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-failop GPUStencilFaceState.failOp specification>
getFailOp :: (MonadDOM m) => GPUStencilFaceState -> m (Maybe GPUStencilOperation)
getFailOp self = liftDOM (((js_getFailOp (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-failop GPUStencilFaceState.failOp specification>
getFailOpUnsafe :: (MonadDOM m, HasCallStack) => GPUStencilFaceState -> m GPUStencilOperation
getFailOpUnsafe self = liftDOM ((((js_getFailOp (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-failop GPUStencilFaceState.failOp specification>
getFailOpUnchecked :: (MonadDOM m) => GPUStencilFaceState -> m GPUStencilOperation
getFailOpUnchecked self = liftDOM ((pFromJSVal <$> (js_getFailOp (self))))

foreign import javascript safe "(($1, $2) => { $1[\"depthFailOp\"] = $2; })"
        js_setDepthFailOp :: GPUStencilFaceState -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-depthfailop GPUStencilFaceState.depthFailOp specification>
setDepthFailOp :: (MonadDOM m) => GPUStencilFaceState -> GPUStencilOperation -> m ()
setDepthFailOp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setDepthFailOp (self) a2')))

foreign import javascript unsafe "(($1) => { return $1[\"depthFailOp\"]; })"
        js_getDepthFailOp :: GPUStencilFaceState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-depthfailop GPUStencilFaceState.depthFailOp specification>
getDepthFailOp :: (MonadDOM m) => GPUStencilFaceState -> m (Maybe GPUStencilOperation)
getDepthFailOp self = liftDOM (((js_getDepthFailOp (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-depthfailop GPUStencilFaceState.depthFailOp specification>
getDepthFailOpUnsafe :: (MonadDOM m, HasCallStack) => GPUStencilFaceState -> m GPUStencilOperation
getDepthFailOpUnsafe self = liftDOM ((((js_getDepthFailOp (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-depthfailop GPUStencilFaceState.depthFailOp specification>
getDepthFailOpUnchecked :: (MonadDOM m) => GPUStencilFaceState -> m GPUStencilOperation
getDepthFailOpUnchecked self = liftDOM ((pFromJSVal <$> (js_getDepthFailOp (self))))

foreign import javascript safe "(($1, $2) => { $1[\"passOp\"] = $2; })"
        js_setPassOp :: GPUStencilFaceState -> JSVal -> IO ()
-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-passop GPUStencilFaceState.passOp specification>
setPassOp :: (MonadDOM m) => GPUStencilFaceState -> GPUStencilOperation -> m ()
setPassOp self val = liftDOM (void (((toJSVal val) >>= \a2' -> js_setPassOp (self) a2')))

foreign import javascript unsafe "(($1) => { return $1[\"passOp\"]; })"
        js_getPassOp :: GPUStencilFaceState -> IO JSVal
-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-passop GPUStencilFaceState.passOp specification>
getPassOp :: (MonadDOM m) => GPUStencilFaceState -> m (Maybe GPUStencilOperation)
getPassOp self = liftDOM (((js_getPassOp (self)) >>= fromJSValUnchecked))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-passop GPUStencilFaceState.passOp specification>
getPassOpUnsafe :: (MonadDOM m, HasCallStack) => GPUStencilFaceState -> m GPUStencilOperation
getPassOpUnsafe self = liftDOM ((((js_getPassOp (self)) >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://gpuweb.github.io/gpuweb/#dom-gpustencilfacestate-passop GPUStencilFaceState.passOp specification>
getPassOpUnchecked :: (MonadDOM m) => GPUStencilFaceState -> m GPUStencilOperation
getPassOpUnchecked self = liftDOM ((pFromJSVal <$> (js_getPassOp (self))))