Skip to content

Commit

Permalink
update submodule and change application framework API
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWinAdmin committed Mar 17, 2023
1 parent af5a127 commit faeab56
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion imgui
Submodule imgui updated from 5e33e0 to 0eddf3
39 changes: 20 additions & 19 deletions test/immidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1890,18 +1890,7 @@ static std::string ReplaceDigital(const std::string str)
return result;
}

void Application_GetWindowProperties(ApplicationWindowProperty& property)
{
property.name = APP_NAME;
property.viewport = false;
property.docking = false;
property.auto_merge = false;
property.power_save = true;
property.width = 1680;
property.height = 960;
}

void Application_SetupContext(ImGuiContext* ctx)
static void Midi_SetupContext(ImGuiContext* ctx)
{
#ifdef USE_BOOKMARK
ImGuiSettingsHandler bookmark_ini_handler;
Expand Down Expand Up @@ -1929,7 +1918,7 @@ void Application_SetupContext(ImGuiContext* ctx)
#endif
}

void Application_Initialize(void** handle)
static void Midi_Initialize(void** handle)
{
#if !IMGUI_APPLICATION_PLATFORM_SDL2
SDL_Init(SDL_INIT_AUDIO | SDL_INIT_TIMER);
Expand Down Expand Up @@ -2012,7 +2001,7 @@ void Application_Initialize(void** handle)
libmidi_init();
}

void Application_Finalize(void** handle)
static void Midi_Finalize(void** handle)
{
if (save_dialog) delete save_dialog;
libmidi_release();
Expand All @@ -2021,11 +2010,7 @@ void Application_Finalize(void** handle)
#endif
}

void Application_DropFromSystem(std::vector<std::string>& drops)
{
}

bool Application_Frame(void * handle, bool app_will_quit)
static bool Midi_Frame(void * handle, bool app_will_quit)
{
ImGuiIO& io = ImGui::GetIO(); (void)io;
bool multiviewport = io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable;
Expand Down Expand Up @@ -2600,3 +2585,19 @@ bool Application_Frame(void * handle, bool app_will_quit)
}
return app_will_quit;
}

void Application_Setup(ApplicationWindowProperty& property)
{
property.name = APP_NAME;
property.viewport = false;
property.docking = false;
property.auto_merge = false;
property.power_save = true;
property.width = 1680;
property.height = 960;

property.application.Application_SetupContext = Midi_SetupContext;
property.application.Application_Initialize = Midi_Initialize;
property.application.Application_Finalize = Midi_Finalize;
property.application.Application_Frame = Midi_Frame;
}

0 comments on commit faeab56

Please sign in to comment.