I started looking at imgui.h. It's large. I don't think it's reasonable to achieve feature completeness, even less maintainability, without auto-generating at least some portion of the bindings. We could rely on cimgui, or generate directly from the headers. This would also allow easier access to different branches of ImGui, such as the docking branch which supports multi-viewport.
I haven't looked too much into it, but for cimgui here are some possible steps:
- parse structs_and_enums and define corresponding Haskell types
- a newtype around
CInt for each enum type, with the corresponding pattern synonyms
- ADTs for structs
- parse typedefs_dicts and define Haskell type synonyms
- (the hard part) parse definitions and use them to generate bindings like the ones that currently exist in the main DearImGui.hs file.
I started looking at imgui.h. It's large. I don't think it's reasonable to achieve feature completeness, even less maintainability, without auto-generating at least some portion of the bindings. We could rely on cimgui, or generate directly from the headers. This would also allow easier access to different branches of
ImGui, such as the docking branch which supports multi-viewport.I haven't looked too much into it, but for cimgui here are some possible steps:
CIntfor each enum type, with the corresponding pattern synonyms