]> git.eshelyaron.com Git - emacs.git/commit
Introduce an input method callback required by Android 34
authorPo Lu <luangruo@yahoo.com>
Thu, 5 Oct 2023 06:23:20 +0000 (14:23 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 5 Oct 2023 06:23:20 +0000 (14:23 +0800)
commit123b77436e187c6254d4585d08135a44077528d1
tree5257a4dbb4d5dc5d1446a58cec224903494bbbb5
parent253f1aff1ab00e9794f3cfcf50e86e335f411242
Introduce an input method callback required by Android 34

* java/org/gnu/emacs/EmacsInputConnection.java (replaceText):
New function.

* java/org/gnu/emacs/EmacsNative.java (replaceText): Declare
native function.

* src/androidgui.h (enum android_ime_operation): New operation
ANDROID_IME_REPLACE_TEXT.

* src/androidterm.c (android_handle_ime_event): Decode text when
encountering an ANDROID_IME_REPLACE_TEXT operation.  Return if
decoding overflowed rather than presenting Qnil to textconv
functions.
(replaceText): New JNI function.

* src/frame.h (enum text_conversion_operation): New operation
TEXTCONV_REPLACE_TEXT.

* src/textconv.c (really_commit_text): Move point to start if
the composing region is set.
(really_replace_text): New function.
(handle_pending_conversion_events_1) <TEXTCONV_REPLACE_TEXT>:
New case.
(replace_text): New function.

* src/textconv.h: Update prototypes.
java/org/gnu/emacs/EmacsInputConnection.java
java/org/gnu/emacs/EmacsNative.java
src/androidgui.h
src/androidterm.c
src/frame.h
src/textconv.c
src/textconv.h