From: Eli Zaretskii <eliz@gnu.org>
To: "Albert" <georgealbert@qq.com>
Cc: emacs-devel@gnu.org
Subject: Re: 回复: 回复: 回复: [PATCH] Add IME status change support on windows natively
Date: Mon, 13 Apr 2020 10:05:30 +0300 [thread overview]
Message-ID: <83a73fkgqt.fsf@gnu.org> (raw)
In-Reply-To: <tencent_C860390122B8A438CE83739CEFEC02508C09@qq.com> (georgealbert@qq.com)
Here's what I propose.
Change w32-set-ime-open-status to do this:
DEFUN ("w32-set-ime-open-status",
Fw32_set_ime_open_status, Sw32_set_ime_open_status,
1, 1, 0,
doc: /* Set emacs IME open status on Windows. */)
(Lisp_Object status)
{
unsigned ime_status;
if (NILP (status))
ime_status = 0;
else
ime_status = 1;
PostThreadMessage (dwWindowsThreadId, WM_EMACS_IME_STATUS,
(WPARAM)ime_status, 0);
return Qnil;
}
Then in w32fns.c do this to handle the WM_EMACS_IME_STATUS message:
case WM_EMACS_IME_STATUS:
if (!set_ime_open_status_fn)
break;
else
{
HIMC context = get_ime_context_fn (w32_system_caret_hwnd);
if (!context)
break;
BOOL ime_status = get_ime_open_status_fn (context);
BOOL new_status = (wParam != 0);
if (ime_status != new_status)
set_ime_open_status_fn (context, new_status);
release_ime_context_fn (w32_system_caret_hwnd, context);
}
break;
Then you can get rid of the 2 static variables.
This is entirely untested, so please make sure it works as intended.
next prev parent reply other threads:[~2020-04-13 7:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 4:09 [PATCH] Add IME status change support on windows natively Albert
2020-04-13 4:53 ` Eli Zaretskii
2020-04-13 5:47 ` Eli Zaretskii
2020-04-13 6:06 ` =?gb18030?B?u9i4tKO6IFtQQVRDSF0gQWRkIElNRSBzdGF0dXMgY2hhbmdlIHN1cHBvcnQgb24gd2luZG93cyBuYXRpdmVseQ==?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 6:13 ` =?gb18030?B?u9i4tKO6?= [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 8:50 ` 回复: " Valtteri Vuorikoski
2020-04-13 9:06 ` Eli Zaretskii
2020-04-13 9:18 ` Valtteri Vuorikoski
2020-04-13 6:12 ` =?gb18030?B?u9i4tKO6IFtQQVRDSF0gQWRkIElNRSBzdGF0dXMgY2hhbmdlIHN1cHBvcnQgb24gd2luZG93cyBuYXRpdmVseQ==?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 6:24 ` =?gb18030?B?u9i4tKO6?= [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 6:27 ` =?gb18030?B?u9i4tKO6ILvYuLSjuiBbUEFUQ0hdIEFkZCBJTUUgc3RhdHVzIGNoYW5nZSBzdXBwb3J0IG9uIHdpbmRvd3MgbmF0aXZlbHk=?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 6:32 ` =?gb18030?B?u9i4tKO6ILvYuLSjuiBbUEFUQ0hdIEFkZCBJTUUgc3RhdHVzIGNoYW5nZSBzdXBwb3J0IG9uIHdpbmRvd3MgbmF0aXZlbHk=?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 6:43 ` =?gb18030?B?u9i4tKO6ILvYuLSjug==?= [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 6:47 ` =?gb18030?B?u9i4tKO6ILvYuLSjuiC72Li0o7ogW1BBVENIXSBBZGQgSU1FIHN0YXR1cyBjaGFuZ2Ugc3VwcG9ydCBvbiB3aW5kb3dzIG5hdGl2ZWx5?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 7:05 ` Eli Zaretskii [this message]
2020-04-13 7:07 ` =?gb18030?B?u9i4tKO6ILvYuLSjuiC72Li0o7ogu9i4tKO6IFtQQVRDSF0gQWRkIElNRSBzdGF0dXMgY2hhbmdlIHN1cHBvcnQgb24gd2luZG93cyBuYXRpdmVseQ==?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 7:21 ` =?gb18030?B?u9i4tKO6ILvYuLSjuiC72Li0o7ogu9i4tKO6?= [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 7:25 ` Eli Zaretskii
2020-04-13 7:26 ` =?gb18030?B?u9i4tKO6ILvYuLSjuiC72Li0o7ogu9i4tKO6ILvYuLSjuiBbUEFUQ0hdIEFkZCBJTUUgc3RhdHVzIGNoYW5nZSBzdXBwb3J0IG9uIHdpbmRvd3MgbmF0aXZlbHk=?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 9:22 ` =?gb18030?B?u9i4tKO6ILvYuLSjuiC72Li0o7ogu9i4tKO6ILvYuLSjuiBbUEFUQ0hdIEFkZCBJTUUgc3RhdHVzIGNoYW5nZSBzdXBwb3J0IG9uIHdpbmRvd3MgbmF0aXZlbHk=?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 9:33 ` [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 10:02 ` =?gb18030?B?u9i4tKO6IFtQQVRDSF0gQWRkIElNRSBzdGF0dXMgY2hhbmdlIHN1cHBvcnQgb24gd2luZG93cyBuYXRpdmVseQ==?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 13:10 ` [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 13:15 ` =?gb18030?B?u9i4tKO6IFtQQVRDSF0gQWRkIElNRSBzdGF0dXMgY2hhbmdlIHN1cHBvcnQgb24gd2luZG93cyBuYXRpdmVseQ==?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 13:44 ` [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 14:52 ` =?gb18030?B?u9i4tKO6IFtQQVRDSF0gQWRkIElNRSBzdGF0dXMgY2hhbmdlIHN1cHBvcnQgb24gd2luZG93cyBuYXRpdmVseQ==?= =?gb18030?B?QWxiZXJ0?=
2020-04-13 15:32 ` =?gb18030?B?u9i4tKO6?= [PATCH] Add IME status change support on windows natively Eli Zaretskii
2020-04-13 15:01 ` =?gb18030?B?u9i4tKO6IFtQQVRDSF0gQWRkIElNRSBzdGF0dXMgY2hhbmdlIHN1cHBvcnQgb24gd2luZG93cyBuYXRpdmVseQ==?= =?gb18030?B?QWxiZXJ0?=
2020-04-14 2:13 ` [PATCH] Add IME status change support on windows natively Richard Stallman
2020-04-14 5:54 ` Eli Zaretskii
2020-04-15 2:56 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a73fkgqt.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=georgealbert@qq.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.