Conversation
|
Do you have some examples from other projects how this is used? I'm quite unfamiliar with this feature, and I'm a little wary exposing anything that I don't know their intended usage for. I couldn't find any examples of PlatformImeData in imgui's own codebase, other than in the backends. I also had trouble accessing the Imgui context fields directly and refactored the code earlier to not access the fields to get the docking branch to build. This was the change: 5f9469b. I'm a little worried that those build problems would make a comeback, as there seems to be no official accessor function for getting the ImeData instance. |
Without IME compositing position sync, it would be like this: 20260109155241_rec_.mp4But if we have some IME input text position info, we will got this: 20260109155627_rec_.mp4 |
|
There is also some official backend example for text input box sync: https://github.com/ocornut/imgui/blob/7b3ad4a282dc6f5007c49d35853e32f364e3e3d7/backends/imgui_impl_sdl3.cpp#L202 |
|
Reading the imgui source code, it looks like the IME is accessed via a callback mechanism where Imgui calls a backend callback. For example, in the ImGui::EndFrame(), I see this code: I think I'd prefer the backend interface in Python to use this standard approach instead of sneakily exposing some members of the context struct. Bear with me, I think this feature can be added, but I want to be in alignment with how Imgui expects it to be done. |
Yes, you're right! haha |
Export the PlatformImeData struct into python.