Repository navigation
Conversation
|
I start implementing my text box, I think some features are needed in addition to the above functions:
I will add these functions to my branch. |
|
My initial impression is that this looks great! I will review it more closely once it's time for the IME part of 3.2, which should hopefully give you time to land the additional features you mention. |
2c847f3 to
41cd4f7
Compare
|
I implemented all method I mentioned and I added one test application (ime.c, almost as same as event.c, but IME functions are assigned to mouse buttons). Current status is: - Windows works almost perfectly except Google Japanese Input doesn't follow cursor position (MS IME works). - Mac OS X's NSTextInputContext doesn't work on my computer (10.9). So resetting preedit text feature doesn't work. - I tested on Ubuntu 15.10, but XIM (X Input Method) implementation is buggy. Test application can receive preedit text and commited text, but my real application can't. I am still debugging.XIM is very old standard. I think adding Fcitx option (more modern protocol and most popular one now) is better solution (use Fcitx if it is installed, otherwise use XIM). And Fcitx supports Wayland too (I couldn't find Mir information). How about it? |
|
There is quite a range of programming styles in this patch. Did you write this yourself or are parts of it copied from other sources? If so I need to know what licenses they come under. |
|
The |
|
The |
|
Maybe 50% is my code and 50% is other's. I referred the following Japanese web sites: Windows: http://www.kumei.ne.jp/c_lang/sdk3/sdk_278.htm I will ask them about sample code's license. I couldn't find memo about Mac. Of course, I checked MSDN, Apple's document, X11R6 references. |
|
I will merge glfw(Get|Set)IMEStatus into glfw(Get|Set)InputMode. imm32 is provided as static library by Microsoft and it should be bundled with Windows like gdi32.dll. I thinks if(WIN32) is enough to detect imm32. |
8d2378f to
66bc5f7
Compare
Now I am waiting reply from Yasutaka Kumei. |
|
Yasutaka Kumei agreed using his code with glfw. |
|
Awesome! Thank you! |
|
About the |
|
@elmindreda It appears that you wanted to close this PR with 779b562, but Github failed to realize that, so you probably have to close this PR manually |
|
What @shurcooL said. Expect several more revisions to pop up here before it's ready to merge, as it's a big and multi-platform addition. |
There was a oversight in transplanting shibukawa's fix: * glfw#658 * shibukawa@d36a164 This made preedit callbacks not being called.
This fix is from shibukawa's fix: glfw#658 shibukawa@d36a164
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Some minor coding style changes are made, but not yet follow glfw's one, and some comments doesn't follow recent changes. So further work is needed.
This fix is based on shibukawa's fix: glfw#658 The differences is the following. * Remove `X_HAVE_UTF8_STRING` branching since the current logic doesn't use it * Replace `XNDestroyCallback` for `XNPreeditAttributes` in `XCreateIC`
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 This code doesn't work because `get_character_string` is undefined. We need further work.
This fix is based on `tests/ime.c` of shibukawa's fix: glfw#658 shibukawa@d36a164 I simplified and restructured it entirely.
There was a oversight in transplanting shibukawa's fix: * glfw#658 * shibukawa@d36a164 This made preedit callbacks not being called.
This fix is from shibukawa's fix: glfw#658 shibukawa@d36a164
|
I would like to continue this fix with #2117. |
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Some minor coding style changes are made, but not yet follow glfw's one, and some comments doesn't follow recent changes. So further work is needed.
This fix is based on shibukawa's fix: glfw#658 The differences is the following. * Remove `X_HAVE_UTF8_STRING` branching since the current logic doesn't use it * Replace `XNDestroyCallback` for `XNPreeditAttributes` in `XCreateIC`
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 This code doesn't work because `get_character_string` is undefined. We need further work.
This fix is based on `tests/ime.c` of shibukawa's fix: glfw#658 shibukawa@d36a164 I simplified and restructured it entirely.
There was a oversight in transplanting shibukawa's fix: * glfw#658 * shibukawa@d36a164 This made preedit callbacks not being called.
This fix is from shibukawa's fix: glfw#658 shibukawa@d36a164
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Some minor coding style changes are made, but not yet follow glfw's one, and some comments doesn't follow recent changes. So further work is needed.
This fix is based on shibukawa's fix: glfw#658 The differences is the following. * Remove `X_HAVE_UTF8_STRING` branching since the current logic doesn't use it * Replace `XNDestroyCallback` for `XNPreeditAttributes` in `XCreateIC`
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 This code doesn't work because `get_character_string` is undefined. We need further work.
This fix is based on `tests/ime.c` of shibukawa's fix: glfw#658 shibukawa@d36a164 I simplified and restructured it entirely.
There was a oversight in transplanting shibukawa's fix: * glfw#658 * shibukawa@d36a164 This made preedit callbacks not being called.
|
It appears that #2130 now fully incorporates the work from this PR, including attribution to the original contributors. As far as I can tell, there is no remaining work in this PR that is not already represented in #2130. In that sense, #2130 seems to have effectively superseded this PR. It may therefore make sense to close this PR and continue any future discussion and review efforts on #2130 instead. Thank you for the original contribution. The work done here laid the foundation for the current effort, and it is good to see it being carried forward. |

Add better IME support (#41) to implement on-the-spot IME conversion. My code is based on #643.
I added the following functions:
They are not big changes. It keeps backward compatibility about API level.
To use IME feature, UI programmers should implement visualization code for preedit texts.
I implemented platform specific code for Windows/X11/Mac OS X (not Wayland and Mir).