#pragma once #include namespace fn { // Modos de tema para run_app. enum class ThemeMode { FnDark, // Identidad del registry (Mantine v9 dark + indigo). DEFAULT. ImGuiDark, // Tema estandar de ImGui (ImGui::StyleColorsDark). ImGuiLight, None, // No tocar el ImGuiStyle — la app lo configura. }; struct AppConfig { const char* title = "fn_registry"; int width = 1280; int height = 720; bool vsync = true; bool viewports = false; // Enable multi-viewport: ImGui windows become real OS windows ThemeMode theme = ThemeMode::FnDark; // Identidad visual unificada por defecto float bg_r = 0.102f; // fn_tokens::colors::bg (dark.7 #1A1B1E) float bg_g = 0.106f; float bg_b = 0.118f; }; // Run an ImGui application. The render_fn is called every frame // between ImGui::NewFrame() and ImGui::Render(). // Returns 0 on clean exit, 1 on error. int run_app(AppConfig config, std::function render_fn); // Convenience: run with default config int run_app(std::function render_fn); } // namespace fn