imgui.cppm builds Dear ImGui as a named module that exports the same
API as imgui.h. The global module fragment includes imgui_macros.h and
the C system headers, then the purview imports std.compat and #includes
imgui.h. The .cpp files and imgui_internal.h go in 'module :private;',
so internals stay hidden and the whole library is one translation unit.
Exports are marked in imgui.h rather than listed separately, so they
can't drift from the header:
- IMGUI_EXPORT prefixes the ImGui namespace.
- IMGUI_EXPORT_BEGIN/END wrap runs of global declarations, leaving out
the out-of-line member definitions, which can't be exported.
All three expand to nothing outside the module. ImHashData() and the
GetIO(ImGuiContext*) overload live in imgui_internal.h but backends
need them, so imgui.cppm exports them explicitly.
NavUpdateAnyRequestFlag() loses its 'inline' forward declaration. Clang
rejects a static inline function that is declared before its definition
inside 'module :private;'. The definition is unchanged, so the
optimiser can still inline it.