mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2025-07-04 20:18:47 +02:00
Handle remaining enums (#36)
This handles the remaining enum types in the headers that aren't in the enums section. It also automatically handles adding all the enumerations to the inline-c context types table, and a small improvement to the display of parse error messages.
This commit is contained in:
@ -18,21 +18,19 @@ import Language.C.Types
|
||||
( pattern TypeName )
|
||||
|
||||
-- dear-imgui
|
||||
import DearImGui.Enums
|
||||
import DearImGui.Structs
|
||||
|
||||
-- dear-imgui-generator
|
||||
import DearImGui.Generator
|
||||
( enumerationsTypesTable )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
imguiContext :: Context
|
||||
imguiContext = mempty
|
||||
{ ctxTypesTable = Map.fromList
|
||||
[ ( TypeName "ImGuiCol" , [t| ImGuiCol |] )
|
||||
, ( TypeName "ImGuiCond", [t| ImGuiCond |] )
|
||||
, ( TypeName "ImGuiDir" , [t| ImGuiDir |] )
|
||||
, ( TypeName "ImGuiStyleVar" , [t| ImGuiStyleVar |] )
|
||||
, ( TypeName "ImGuiTabBarFlags" , [t| ImGuiTabBarFlags |] )
|
||||
, ( TypeName "ImGuiTabItemFlags", [t| ImGuiTabItemFlags |] )
|
||||
, ( TypeName "ImVec2", [t| ImVec2 |] )
|
||||
{ ctxTypesTable = enumerationsTypesTable <>
|
||||
Map.fromList
|
||||
[ ( TypeName "ImVec2", [t| ImVec2 |] )
|
||||
, ( TypeName "ImVec3", [t| ImVec3 |] )
|
||||
, ( TypeName "ImVec4", [t| ImVec4 |] )
|
||||
]
|
||||
|
Reference in New Issue
Block a user