[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: textconv.c

From: Po Lu
Subject: Re: textconv.c
Date: Sun, 12 Feb 2023 23:35:58 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

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:


and here is the InputMethodManager that Emacs must call:


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:


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:


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.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]