{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.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.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" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUBlendState -> Int
alignment = WGPUBlendState -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  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 35 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
    alpha <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 36 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
    pure $! WGPUBlendState{..}
  {-# INLINABLE peek #-}
  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 40 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr alpha
{-# LINE 41 "src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc" #-}
  {-# INLINABLE poke #-}