Skip to content

Auto-generation of bindings #15

@sheaf

Description

@sheaf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions