{-# LINE 1 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LINE 2 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
module Graphics.Rendering.FreeType.Internal.OpenArgs
( FT_Open_Args(..)
) where

import Foreign
import Foreign.C.String
import Foreign.Storable

import Graphics.Rendering.FreeType.Internal.PrimitiveTypes
import Graphics.Rendering.FreeType.Internal.Stream
import Graphics.Rendering.FreeType.Internal.Module
import Graphics.Rendering.FreeType.Internal.Parameter


{-# LINE 16 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}

{-# LINE 17 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}


{-# LINE 19 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}

{-# LINE 20 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}

data FT_Open_Args = FT_Open_Args
  { flags       :: FT_UInt
  , memory_base :: FT_Bytes
  , memory_size :: FT_Long
  , pathname    :: CString
  , stream      :: FT_Stream
  , driver      :: FT_Module
  , num_params  :: FT_Int
  , params      :: Ptr FT_Parameter
  }

instance Storable FT_Open_Args where
  sizeOf    _ = (32)
{-# LINE 34 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
  alignment _ = 4
{-# LINE 35 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
  peek ptr = do
    flags'       <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 37 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    memory_base' <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 38 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    memory_size' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 39 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    pathname'    <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 40 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    stream'      <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 41 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    driver'      <- ((\hsc_ptr -> peekByteOff hsc_ptr 20)) ptr
{-# LINE 42 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    num_params'  <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 43 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    params'      <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 44 "Graphics/Rendering/FreeType/Internal/OpenArgs.hsc" #-}
    return $ FT_Open_Args
      { flags = flags'
      , memory_base = memory_base'
      , memory_size = memory_size'
      , pathname = pathname'
      , stream = stream'
      , driver = driver'
      , num_params = num_params'
      , params = params'
      }