{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUBlendComponent 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.Enum.WGPUBlendFactor
import WGPU.Raw.Generated.Enum.WGPUBlendFactor
import WGPU.Raw.Generated.Enum.WGPUBlendOperation
data WGPUBlendComponent = WGPUBlendComponent {
WGPUBlendComponent -> WGPUBlendFactor
srcFactor :: WGPUBlendFactor,
WGPUBlendComponent -> WGPUBlendFactor
dstFactor :: WGPUBlendFactor,
WGPUBlendComponent -> WGPUBlendOperation
operation :: WGPUBlendOperation
}
instance Storable WGPUBlendComponent where
sizeOf :: WGPUBlendComponent -> Int
sizeOf WGPUBlendComponent
_ = ((Int
12))
{-# LINE 32 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUBlendComponent -> IO WGPUBlendComponent
peek Ptr WGPUBlendComponent
ptr = do
WGPUBlendFactor
srcFactor <- ((\Ptr WGPUBlendComponent
hsc_ptr -> Ptr WGPUBlendComponent -> Int -> IO WGPUBlendFactor
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUBlendComponent
hsc_ptr Int
0)) Ptr WGPUBlendComponent
ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
dstFactor <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
operation <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
pure $! WGPUBlendComponent{..}
poke :: Ptr WGPUBlendComponent -> WGPUBlendComponent -> IO ()
poke Ptr WGPUBlendComponent
ptr WGPUBlendComponent{WGPUBlendFactor
WGPUBlendOperation
operation :: WGPUBlendOperation
dstFactor :: WGPUBlendFactor
srcFactor :: WGPUBlendFactor
operation :: WGPUBlendComponent -> WGPUBlendOperation
dstFactor :: WGPUBlendComponent -> WGPUBlendFactor
srcFactor :: WGPUBlendComponent -> WGPUBlendFactor
..} = do
((\Ptr WGPUBlendComponent
hsc_ptr -> Ptr WGPUBlendComponent -> Int -> WGPUBlendFactor -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBlendComponent
hsc_ptr Int
0)) Ptr WGPUBlendComponent
ptr WGPUBlendFactor
srcFactor
{-# LINE 40 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr dstFactor
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr operation