module JSDOM.Generated.WebGPUTextureDescriptor
(newWebGPUTextureDescriptor, setTextureType, getTextureType,
setWidth, getWidth, setHeight, getHeight, setSampleCount,
getSampleCount, setStorageMode, getStorageMode, setUsage, getUsage,
WebGPUTextureDescriptor(..), gTypeWebGPUTextureDescriptor)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName)
import JSDOM.Enums
newWebGPUTextureDescriptor ::
(MonadDOM m) =>
Word -> Word -> Word -> Bool -> m WebGPUTextureDescriptor
newWebGPUTextureDescriptor pixelFormat width height mipmapped
= liftDOM
(WebGPUTextureDescriptor <$>
new (jsg "WebGPUTextureDescriptor")
[toJSVal pixelFormat, toJSVal width, toJSVal height,
toJSVal mipmapped])
setTextureType ::
(MonadDOM m) => WebGPUTextureDescriptor -> Word -> m ()
setTextureType self val
= liftDOM (self ^. jss "textureType" (toJSVal val))
getTextureType :: (MonadDOM m) => WebGPUTextureDescriptor -> m Word
getTextureType self
= liftDOM (round <$> ((self ^. js "textureType") >>= valToNumber))
setWidth :: (MonadDOM m) => WebGPUTextureDescriptor -> Word -> m ()
setWidth self val = liftDOM (self ^. jss "width" (toJSVal val))
getWidth :: (MonadDOM m) => WebGPUTextureDescriptor -> m Word
getWidth self
= liftDOM (round <$> ((self ^. js "width") >>= valToNumber))
setHeight ::
(MonadDOM m) => WebGPUTextureDescriptor -> Word -> m ()
setHeight self val = liftDOM (self ^. jss "height" (toJSVal val))
getHeight :: (MonadDOM m) => WebGPUTextureDescriptor -> m Word
getHeight self
= liftDOM (round <$> ((self ^. js "height") >>= valToNumber))
setSampleCount ::
(MonadDOM m) => WebGPUTextureDescriptor -> Word -> m ()
setSampleCount self val
= liftDOM (self ^. jss "sampleCount" (toJSVal val))
getSampleCount :: (MonadDOM m) => WebGPUTextureDescriptor -> m Word
getSampleCount self
= liftDOM (round <$> ((self ^. js "sampleCount") >>= valToNumber))
setStorageMode ::
(MonadDOM m) => WebGPUTextureDescriptor -> Word -> m ()
setStorageMode self val
= liftDOM (self ^. jss "storageMode" (toJSVal val))
getStorageMode :: (MonadDOM m) => WebGPUTextureDescriptor -> m Word
getStorageMode self
= liftDOM (round <$> ((self ^. js "storageMode") >>= valToNumber))
setUsage :: (MonadDOM m) => WebGPUTextureDescriptor -> Word -> m ()
setUsage self val = liftDOM (self ^. jss "usage" (toJSVal val))
getUsage :: (MonadDOM m) => WebGPUTextureDescriptor -> m Word
getUsage self
= liftDOM (round <$> ((self ^. js "usage") >>= valToNumber))