{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUCommandEncoderDescriptor 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 WGPUCommandEncoderDescriptor = WGPUCommandEncoderDescriptor {
WGPUCommandEncoderDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct),
WGPUCommandEncoderDescriptor -> Ptr CChar
label :: Ptr (CChar)
}
instance Storable WGPUCommandEncoderDescriptor where
sizeOf :: WGPUCommandEncoderDescriptor -> Int
sizeOf WGPUCommandEncoderDescriptor
_ = ((Int
16))
{-# LINE 29 "src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUCommandEncoderDescriptor -> IO WGPUCommandEncoderDescriptor
peek Ptr WGPUCommandEncoderDescriptor
ptr = do
Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUCommandEncoderDescriptor
hsc_ptr -> Ptr WGPUCommandEncoderDescriptor
-> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUCommandEncoderDescriptor
hsc_ptr Int
0)) Ptr WGPUCommandEncoderDescriptor
ptr
{-# LINE 32 "src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc" #-}
label <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc" #-}
pure $! WGPUCommandEncoderDescriptor{..}
poke :: Ptr WGPUCommandEncoderDescriptor
-> WGPUCommandEncoderDescriptor -> IO ()
poke Ptr WGPUCommandEncoderDescriptor
ptr WGPUCommandEncoderDescriptor{Ptr CChar
Ptr WGPUChainedStruct
label :: Ptr CChar
nextInChain :: Ptr WGPUChainedStruct
label :: WGPUCommandEncoderDescriptor -> Ptr CChar
nextInChain :: WGPUCommandEncoderDescriptor -> Ptr WGPUChainedStruct
..} = do
((\Ptr WGPUCommandEncoderDescriptor
hsc_ptr -> Ptr WGPUCommandEncoderDescriptor
-> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUCommandEncoderDescriptor
hsc_ptr Int
0)) Ptr WGPUCommandEncoderDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr label