{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUShaderModuleDescriptor where
import Data.Word (Word16, Word32, Word64)
import Data.Int (Int32)
import Foreign
import Foreign.C.Types
import WGPU.Raw.Types
import Prelude (pure, ($!))
import WGPU.Raw.Generated.Struct.WGPUChainedStruct
data WGPUShaderModuleDescriptor = WGPUShaderModuleDescriptor {
WGPUShaderModuleDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUShaderModuleDescriptor -> Ptr CChar
label :: Ptr (CChar)
}
instance Storable WGPUShaderModuleDescriptor where
sizeOf :: WGPUShaderModuleDescriptor -> Int
sizeOf WGPUShaderModuleDescriptor
_ = ((Int
16))
{-# LINE 29 "src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc" #-}
{-# INLINABLE sizeOf #-}
alignment :: WGPUShaderModuleDescriptor -> Int
alignment = WGPUShaderModuleDescriptor -> Int
forall a. Storable a => a -> Int
sizeOf
{-# INLINABLE alignment #-}
peek :: Ptr WGPUShaderModuleDescriptor -> IO WGPUShaderModuleDescriptor
peek Ptr WGPUShaderModuleDescriptor
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUShaderModuleDescriptor
hsc_ptr -> Ptr WGPUShaderModuleDescriptor -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUShaderModuleDescriptor
hsc_ptr Int
0)) Ptr WGPUShaderModuleDescriptor
ptr
{-# LINE 34 "src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc" #-}
label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc" #-}
pure $! WGPUShaderModuleDescriptor{..}
{-# INLINABLE peek #-}
poke :: Ptr WGPUShaderModuleDescriptor
-> WGPUShaderModuleDescriptor -> IO ()
poke Ptr WGPUShaderModuleDescriptor
ptr WGPUShaderModuleDescriptor{Ptr CChar
Ptr WGPUChainedStruct
label :: Ptr CChar
nextInChain :: Ptr WGPUChainedStruct
label :: WGPUShaderModuleDescriptor -> Ptr CChar
nextInChain :: WGPUShaderModuleDescriptor -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUShaderModuleDescriptor
hsc_ptr -> Ptr WGPUShaderModuleDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUShaderModuleDescriptor
hsc_ptr Int
0)) Ptr WGPUShaderModuleDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc" #-}
{-# INLINABLE poke #-}