|
@@ -430,6 +430,9 @@ CODE
|
|
|
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
|
|
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
|
|
|
|
|
+ - 2024/07/02 (1.91.0) - IO, IME: renamed platform IME hook and added explicit context for consistency and future-proofness.
|
|
|
+ - old: io.SetPlatformImeDataFn(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
|
|
+ - new: io.PlatformSetImeDataFn(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
|
|
- 2024/06/21 (1.90.9) - BeginChild: added ImGuiChildFlags_NavFlattened as a replacement for the window flag ImGuiWindowFlags_NavFlattened: the feature only ever made sense for BeginChild() anyhow.
|
|
|
- old: BeginChild("Name", size, 0, ImGuiWindowFlags_NavFlattened);
|
|
|
- new: BeginChild("Name", size, ImGuiChildFlags_NavFlattened, 0);
|
|
@@ -1124,7 +1127,7 @@ static void WindowSettingsHandler_WriteAll(ImGuiContext*, ImGuiSetti
|
|
|
// Platform Dependents default implementation for IO functions
|
|
|
static const char* GetClipboardTextFn_DefaultImpl(void* user_data_ctx);
|
|
|
static void SetClipboardTextFn_DefaultImpl(void* user_data_ctx, const char* text);
|
|
|
-static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
|
|
+static void PlatformSetImeDataFn_DefaultImpl(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
|
|
static void PlatformOpenInShellFn_DefaultImpl(ImGuiContext* ctx, const char* path);
|
|
|
|
|
|
namespace ImGui
|
|
@@ -3716,7 +3719,7 @@ void ImGui::Initialize()
|
|
|
g.IO.SetClipboardTextFn = SetClipboardTextFn_DefaultImpl;
|
|
|
g.IO.ClipboardUserData = (void*)&g; // Default implementation use the ImGuiContext as user data (ideally those would be arguments to the function)
|
|
|
g.IO.PlatformOpenInShellFn = PlatformOpenInShellFn_DefaultImpl;
|
|
|
- g.IO.SetPlatformImeDataFn = SetPlatformImeDataFn_DefaultImpl;
|
|
|
+ g.IO.PlatformSetImeDataFn = PlatformSetImeDataFn_DefaultImpl;
|
|
|
|
|
|
// Create default viewport
|
|
|
ImGuiViewportP* viewport = IM_NEW(ImGuiViewportP)();
|
|
@@ -5138,11 +5141,11 @@ void ImGui::EndFrame()
|
|
|
|
|
|
// Notify Platform/OS when our Input Method Editor cursor has moved (e.g. CJK inputs using Microsoft IME)
|
|
|
ImGuiPlatformImeData* ime_data = &g.PlatformImeData;
|
|
|
- if (g.IO.SetPlatformImeDataFn && memcmp(ime_data, &g.PlatformImeDataPrev, sizeof(ImGuiPlatformImeData)) != 0)
|
|
|
+ if (g.IO.PlatformSetImeDataFn != NULL && memcmp(ime_data, &g.PlatformImeDataPrev, sizeof(ImGuiPlatformImeData)) != 0)
|
|
|
{
|
|
|
- IMGUI_DEBUG_LOG_IO("[io] Calling io.SetPlatformImeDataFn(): WantVisible: %d, InputPos (%.2f,%.2f)\n", ime_data->WantVisible, ime_data->InputPos.x, ime_data->InputPos.y);
|
|
|
+ IMGUI_DEBUG_LOG_IO("[io] Calling io.PlatformSetImeDataFn(): WantVisible: %d, InputPos (%.2f,%.2f)\n", ime_data->WantVisible, ime_data->InputPos.x, ime_data->InputPos.y);
|
|
|
ImGuiViewport* viewport = GetMainViewport();
|
|
|
- g.IO.SetPlatformImeDataFn(viewport, ime_data);
|
|
|
+ g.IO.PlatformSetImeDataFn(&g, viewport, ime_data);
|
|
|
}
|
|
|
|
|
|
// Hide implicit/fallback "Debug" window if it hasn't been used
|
|
@@ -14372,7 +14375,7 @@ static void PlatformOpenInShellFn_DefaultImpl(ImGuiContext*, const char*) {}
|
|
|
#pragma comment(lib, "imm32")
|
|
|
#endif
|
|
|
|
|
|
-static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, ImGuiPlatformImeData* data)
|
|
|
+static void PlatformSetImeDataFn_DefaultImpl(ImGuiContext*, ImGuiViewport* viewport, ImGuiPlatformImeData* data)
|
|
|
{
|
|
|
// Notify OS Input Method Editor of text input position
|
|
|
HWND hwnd = (HWND)viewport->PlatformHandleRaw;
|
|
@@ -14398,7 +14401,7 @@ static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, ImGuiPlatf
|
|
|
|
|
|
#else
|
|
|
|
|
|
-static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport*, ImGuiPlatformImeData*) {}
|
|
|
+static void PlatformSetImeDataFn_DefaultImpl(ImGuiContext*, ImGuiViewport*, ImGuiPlatformImeData*) {}
|
|
|
|
|
|
#endif // Default IME handlers
|
|
|
|