From: Po Lu <luangruo@yahoo.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: textconv.c
Date: Sun, 12 Feb 2023 23:35:58 +0800 [thread overview]
Message-ID: <877cwmzyjl.fsf@yahoo.com> (raw)
In-Reply-To: <83bklyhqi5.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 12 Feb 2023 17:06:58 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 12 Feb 2023 16:32:16 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: emacs-devel@gnu.org
>>
>> My suggestion is that you describe the problem(s), i.e. what these
>> input methods expect from the client application, in enough detail
>> that will allow people here think about it and suggest solutions.
>
> Btw, if this stuff is described somewhere, like descriptions of some
> protocols and/or standards, pointing to that might save you a lot of
> writing.
Here is the InputConnection protocol that Emacs must implement:
https://developer.android.com/reference/android/view/inputmethod/InputConnection
and here is the InputMethodManager that Emacs must call:
https://developer.android.com/reference/android/view/inputmethod/InputMethodManager
and here is the `text-input-unstable-v3' protocol currently used by most
Wayland compositors. It is soon to be replaced by
`text-input-unstable-v4', which I have not yet investigated:
https://wayland.app/protocols/text-input-unstable-v3
The requests of interest in the Android InputConnection protocol are
commitCompletion, commitCorrection, commitText, deleteSurroundingText,
finishComposingText, getExtractedText, getSelectedText,
getSurroundingText, getTextBeforeCursor, getTextAfterCursor,
replaceText, setSelection, requestCursorUpdates, requestTextBoundsInfo,
setComposingRegion, setComposingText, setSelection, and takeSnapshot.
These must be implemented by Emacs for input methods to work correctly.
Emacs must also call the following APIs in InputMethodManager:
restartInput
invalidateInput
updateCursor
updateCursorAnchorInfo
updateExtractedText
updateSelection.
The requests of interest in the Wayland text-input-unstable-v3 protocol
are preedit_string, commit_string, delete_surrounding_text,
set_surrounding_text; the rest are optional (but this is supposed to
change in the V4 protocol.)
next prev parent reply other threads:[~2023-02-12 15:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-12 12:58 textconv.c Eli Zaretskii
2023-02-12 14:05 ` textconv.c Po Lu
2023-02-12 14:32 ` textconv.c Eli Zaretskii
2023-02-12 15:06 ` textconv.c Eli Zaretskii
2023-02-12 15:35 ` Po Lu [this message]
2023-02-12 15:27 ` Android input methods (was: Re: textconv.c) Po Lu
2023-02-12 15:57 ` Eli Zaretskii
2023-02-13 2:21 ` Android input methods Po Lu
2023-02-13 13:49 ` Eli Zaretskii
2023-02-13 14:37 ` Po Lu
2023-02-13 15:17 ` Eli Zaretskii
2023-02-13 17:04 ` Eli Zaretskii
2023-02-14 1:57 ` Po Lu
2023-02-14 14:32 ` Eli Zaretskii
2023-02-14 15:14 ` Po Lu
2023-02-14 17:01 ` Eli Zaretskii
2023-02-15 2:13 ` Po Lu
2023-02-12 16:00 ` Android input methods (was: Re: textconv.c) Lynn Winebarger
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cwmzyjl.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).