{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.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.WGPUInstanceDescriptor 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 WGPUInstanceDescriptor = WGPUInstanceDescriptor {
  WGPUInstanceDescriptor -> Ptr WGPUChainedStruct
nextInChain :: Ptr (WGPUChainedStruct)
}

instance Storable WGPUInstanceDescriptor where
  sizeOf :: WGPUInstanceDescriptor -> Int
sizeOf WGPUInstanceDescriptor
_ = ((Int
8))
{-# LINE 28 "src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.hsc" #-}
  {-# INLINABLE sizeOf #-}
  alignment :: WGPUInstanceDescriptor -> Int
alignment = WGPUInstanceDescriptor -> Int
forall a. Storable a => a -> Int
sizeOf
  {-# INLINABLE alignment #-}
  peek :: Ptr WGPUInstanceDescriptor -> IO WGPUInstanceDescriptor
peek Ptr WGPUInstanceDescriptor
ptr = do
    Ptr WGPUChainedStruct
nextInChain <- ((\Ptr WGPUInstanceDescriptor
hsc_ptr -> Ptr WGPUInstanceDescriptor -> Int -> IO (Ptr WGPUChainedStruct)
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUInstanceDescriptor
hsc_ptr Int
0)) Ptr WGPUInstanceDescriptor
ptr
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.hsc" #-}
    pure $! WGPUInstanceDescriptor{..}
  {-# INLINABLE peek #-}
  poke :: Ptr WGPUInstanceDescriptor -> WGPUInstanceDescriptor -> IO ()
poke Ptr WGPUInstanceDescriptor
ptr WGPUInstanceDescriptor{Ptr WGPUChainedStruct
nextInChain :: Ptr WGPUChainedStruct
nextInChain :: WGPUInstanceDescriptor -> Ptr WGPUChainedStruct
..} = do
    ((\Ptr WGPUInstanceDescriptor
hsc_ptr -> Ptr WGPUInstanceDescriptor -> Int -> Ptr WGPUChainedStruct -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUInstanceDescriptor
hsc_ptr Int
0)) Ptr WGPUInstanceDescriptor
ptr Ptr WGPUChainedStruct
nextInChain
{-# LINE 37 "src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.hsc" #-}
  {-# INLINABLE poke #-}