{-# LINE 1 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NoImplicitPrelude #-}
module WGPU.Raw.Generated.Struct.WGPUExtent3D where
import Data.Word (Word16, Word32, Word64)
import Data.Int (Int32)
import Foreign
import Foreign.C.Types
import WGPU.Raw.Types
import Prelude (pure, ($!))
data WGPUExtent3D = WGPUExtent3D {
WGPUExtent3D -> Word32
width :: Word32,
WGPUExtent3D -> Word32
height :: Word32,
WGPUExtent3D -> Word32
depthOrArrayLayers :: Word32
}
instance Storable WGPUExtent3D where
sizeOf :: WGPUExtent3D -> Int
sizeOf WGPUExtent3D
_ = ((Int
12))
{-# LINE 30 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
alignment = sizeOf
peek :: Ptr WGPUExtent3D -> IO WGPUExtent3D
peek Ptr WGPUExtent3D
ptr = do
Word32
width <- ((\Ptr WGPUExtent3D
hsc_ptr -> Ptr WGPUExtent3D -> Int -> IO Word32
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr WGPUExtent3D
hsc_ptr Int
0)) Ptr WGPUExtent3D
ptr
{-# LINE 33 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
height <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 34 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
depthOrArrayLayers <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 35 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
pure $! WGPUExtent3D{..}
poke :: Ptr WGPUExtent3D -> WGPUExtent3D -> IO ()
poke Ptr WGPUExtent3D
ptr WGPUExtent3D{Word32
depthOrArrayLayers :: Word32
height :: Word32
width :: Word32
depthOrArrayLayers :: WGPUExtent3D -> Word32
height :: WGPUExtent3D -> Word32
width :: WGPUExtent3D -> Word32
..} = do
((\Ptr WGPUExtent3D
hsc_ptr -> Ptr WGPUExtent3D -> Int -> Word32 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr WGPUExtent3D
hsc_ptr Int
0)) Ptr WGPUExtent3D
ptr Word32
width
{-# LINE 38 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr height
{-# LINE 39 "src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr depthOrArrayLayers