{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}

-- This file was generated by wgpu-raw-hs-codegen on:
--   2021-08-25T10:02:03.522705
-- Using wgpu-native git hash:
--   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)

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" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUBlendComponent -> Int
alignment = WGPUBlendComponent -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  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 37 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
    dstFactor <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
    operation <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
    pure $! WGPUBlendComponent{..}
  {-# INLINABLE peek #-}
  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 43 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr dstFactor
{-# LINE 44 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr operation
{-# LINE 45 "src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc" #-}
  {-# INLINABLE poke #-}