{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}

module DearImGui.Vulkan.Types
  ( vulkanCtx )
  where

-- containers
import qualified Data.Map.Strict as Map
  ( fromList )

-- inline-c
import qualified Language.C.Inline.Context as C
import qualified Language.C.Types          as C

-- vulkan
import qualified Vulkan

vulkanTypesTable :: C.TypesTable
vulkanTypesTable :: TypesTable
vulkanTypesTable = [(TypeSpecifier, TypeQ)] -> TypesTable
forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList
  [ ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkAllocationCallbacks"        , [t| Vulkan.AllocationCallbacks         |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkCommandBuffer_T"            , [t| Vulkan.CommandBuffer_T             |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkDescriptorPool"             , [t| Vulkan.DescriptorPool              |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkDevice_T"                   , [t| Vulkan.Device_T                    |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkInstance_T"                 , [t| Vulkan.Instance_T                  |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkPhysicalDevice_T"           , [t| Vulkan.PhysicalDevice_T            |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkPipeline"                   , [t| Vulkan.Pipeline                    |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkPipelineCache"              , [t| Vulkan.PipelineCache               |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkQueue_T"                    , [t| Vulkan.Queue_T                     |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkRenderPass"                 , [t| Vulkan.RenderPass                  |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkResult"                     , [t| Vulkan.Result                      |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkSampleCountFlagBits"        , [t| Vulkan.SampleCountFlagBits         |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkSampler"                    , [t| Vulkan.Sampler                     |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkImageView"                  , [t| Vulkan.ImageView                   |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkImageLayout"                , [t| Vulkan.ImageLayout                 |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkDescriptorSet"              , [t| Vulkan.DescriptorSet               |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkFormat"                     , [t| Vulkan.Format                      |] )
  , ( CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"VkPipelineRenderingCreateInfo", [t| Vulkan.PipelineRenderingCreateInfo |] )
  ]

vulkanCtx :: C.Context
vulkanCtx :: Context
vulkanCtx = Context
forall a. Monoid a => a
mempty { C.ctxTypesTable = vulkanTypesTable }