{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUBlendState 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.WGPUBlendComponent
import WGPU.Raw.Generated.Struct.WGPUBlendComponent
data WGPUBlendState = WGPUBlendState {
WGPUBlendState -> WGPUBlendComponent
color :: WGPUBlendComponent,
WGPUBlendState -> WGPUBlendComponent
alpha :: WGPUBlendComponent
}
instance Storable WGPUBlendState where
sizeOf :: WGPUBlendState -> Int
sizeOf WGPUBlendState
_ = ((Int
24))
{-# LINE 30 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUBlendState -> IO WGPUBlendState
peek Ptr WGPUBlendState
ptr = do
WGPUBlendComponent
color <- ((\Ptr WGPUBlendState
hsc_ptr -> Ptr WGPUBlendState -> Int -> IO WGPUBlendComponent
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUBlendState
hsc_ptr Int
0)) Ptr WGPUBlendState
ptr
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
alpha <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 34 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
pure $! WGPUBlendState{..}
poke :: Ptr WGPUBlendState -> WGPUBlendState -> IO ()
poke Ptr WGPUBlendState
ptr WGPUBlendState{WGPUBlendComponent
alpha :: WGPUBlendComponent
color :: WGPUBlendComponent
alpha :: WGPUBlendState -> WGPUBlendComponent
color :: WGPUBlendState -> WGPUBlendComponent
..} = do
((\Ptr WGPUBlendState
hsc_ptr -> Ptr WGPUBlendState -> Int -> WGPUBlendComponent -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUBlendState
hsc_ptr Int
0)) Ptr WGPUBlendState
ptr WGPUBlendComponent
color
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr alpha