From 6af059004db6771eab51e17e2dd837ad3ddd9947 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Fri, 12 Jan 2024 14:23:52 +0100 Subject: [PATCH] Rename CallPostInit & CallBeforeExit --- src/hello_imgui/doc_params.md | 6 +++--- src/hello_imgui/runner_callbacks.cpp | 4 ++-- src/hello_imgui/runner_callbacks.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hello_imgui/doc_params.md b/src/hello_imgui/doc_params.md index 35cb37d8..224af78e 100644 --- a/src/hello_imgui/doc_params.md +++ b/src/hello_imgui/doc_params.md @@ -288,10 +288,10 @@ struct RunnerCallbacks // you should use this function to do so. VoidFunction PostInit = EmptyVoidFunction(); - // `EnqueuePostInit`: Add a function that will be called once after OpenGL + // `CallPostInit`: Add a function that will be called once after OpenGL // and ImGui are inited, but before the backend callback are initialized. // (this will modify the `PostInit` callback by appending the new callback (using `SequenceFunctions`) - void EnqueuePostInit(const VoidFunction& callback); + void CallPostInit(const VoidFunction& callback); // `LoadAdditionalFonts`: default=_LoadDefaultFont_WithFontAwesome*. // A function that is called once, when fonts are ready to be loaded. @@ -327,7 +327,7 @@ struct RunnerCallbacks // `EnqueueBeforeExit`: Add a function that will be called once before exiting // (when OpenGL and ImGui are still inited) // (this will modify the `BeforeExit` callback by appending the new callback (using `SequenceFunctions`) - void EnqueueBeforeExit(const VoidFunction& callback); + void CallBeforeExit(const VoidFunction& callback); // `BeforeExit_PostCleanup`: You can here add a function that will be called once // before exiting (after OpenGL and ImGui have been stopped) diff --git a/src/hello_imgui/runner_callbacks.cpp b/src/hello_imgui/runner_callbacks.cpp index a81addc5..74a6ac1a 100644 --- a/src/hello_imgui/runner_callbacks.cpp +++ b/src/hello_imgui/runner_callbacks.cpp @@ -47,12 +47,12 @@ namespace HelloImGui edgesToolbars[edgeToolbarType] = edgeToolbar; } - void RunnerCallbacks::EnqueueBeforeExit(const HelloImGui::VoidFunction &callback) + void RunnerCallbacks::CallBeforeExit(const VoidFunction& callback) { BeforeExit = SequenceFunctions(BeforeExit, callback); } - void RunnerCallbacks::EnqueuePostInit(const HelloImGui::VoidFunction &callback) + void RunnerCallbacks::CallPostInit(const VoidFunction& callback) { PostInit = SequenceFunctions(PostInit, callback); } diff --git a/src/hello_imgui/runner_callbacks.h b/src/hello_imgui/runner_callbacks.h index 4a9becda..a757723f 100644 --- a/src/hello_imgui/runner_callbacks.h +++ b/src/hello_imgui/runner_callbacks.h @@ -147,10 +147,10 @@ struct RunnerCallbacks // you should use this function to do so. VoidFunction PostInit = EmptyVoidFunction(); - // `EnqueuePostInit`: Add a function that will be called once after OpenGL + // `CallPostInit`: Add a function that will be called once after OpenGL // and ImGui are inited, but before the backend callback are initialized. // (this will modify the `PostInit` callback by appending the new callback (using `SequenceFunctions`) - void EnqueuePostInit(const VoidFunction& callback); + void CallPostInit(const VoidFunction& callback); // `LoadAdditionalFonts`: default=_LoadDefaultFont_WithFontAwesome*. // A function that is called once, when fonts are ready to be loaded. @@ -186,7 +186,7 @@ struct RunnerCallbacks // `EnqueueBeforeExit`: Add a function that will be called once before exiting // (when OpenGL and ImGui are still inited) // (this will modify the `BeforeExit` callback by appending the new callback (using `SequenceFunctions`) - void EnqueueBeforeExit(const VoidFunction& callback); + void CallBeforeExit(const VoidFunction& callback); // `BeforeExit_PostCleanup`: You can here add a function that will be called once // before exiting (after OpenGL and ImGui have been stopped)