(Breaking) IO, IME: renamed platform IME hook io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() and added explicit context.

This commit is contained in:
ocornut
2024-07-02 15:48:32 +02:00
parent 8f36798035
commit fb799bba7f
8 changed files with 30 additions and 17 deletions

View File

@@ -41,6 +41,12 @@ HOW TO UPDATE?
Breaking changes:
- 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);
It is expected that for a vast majority of users this is automatically set by core
library and/or platform backend so it won't have any effect.
Other changes:
- IO: added io.PlatformOpenInShellFn handler to open a link/folder/file in OS shell. (#7660)
@@ -51,6 +57,7 @@ Other changes:
other configurable locations. Always call IMGUI_DEBUG_LOG() for maximum stripping in caller code.
- Debug Tools: Debug Log: Added "Configure Outputs.." button. (#5855)
- Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762)
- Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename.
-----------------------------------------------------------------------

View File

@@ -639,7 +639,7 @@ The applications in examples/ are doing that.
Windows: you can use the WM_CHAR or WM_UNICHAR or WM_IME_CHAR message (depending if your app is built using Unicode or MultiByte mode).
You may also use `MultiByteToWideChar()` or `ToUnicode()` to retrieve Unicode codepoints from MultiByte characters or keyboard state.
Windows: if your language is relying on an Input Method Editor (IME), you can write your HWND to ImGui::GetMainViewport()->PlatformHandleRaw
for the default implementation of io.SetPlatformImeDataFn() to set your Microsoft IME position correctly.
for the default implementation of io.PlatformSetImeDataFn() to set your Microsoft IME position correctly.
##### [Return to Index](#index)