-
Couldn't load subscription status.
- Fork 5.7k
Better IME support #658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Better IME support #658
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. |
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. Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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` Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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. Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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` Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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. Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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` Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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. Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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` Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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. Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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` Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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. Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
This fix is based on shibukawa's fix: glfw#658 shibukawa@d36a164 Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
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` Co-authored-by: Yoshiki Shibukawa <[email protected]> Co-authored-by: Takuro Ashie <[email protected]>
This fix is from shibukawa's fix: glfw#658 shibukawa@d36a164
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).