summaryrefslogtreecommitdiff
path: root/src/textconv.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-10-05 14:23:20 +0800
committerPo Lu <luangruo@yahoo.com>2023-10-05 14:23:20 +0800
commit123b77436e187c6254d4585d08135a44077528d1 (patch)
tree5257a4dbb4d5dc5d1446a58cec224903494bbbb5 /src/textconv.h
parent253f1aff1ab00e9794f3cfcf50e86e335f411242 (diff)
downloademacs-123b77436e187c6254d4585d08135a44077528d1.tar.gz
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.
Diffstat (limited to 'src/textconv.h')
-rw-r--r--src/textconv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/textconv.h b/src/textconv.h
index feac5b805af..c677c07e9aa 100644
--- a/src/textconv.h
+++ b/src/textconv.h
@@ -142,6 +142,9 @@ extern void delete_surrounding_text (struct frame *, ptrdiff_t,
ptrdiff_t, unsigned long);
extern void request_point_update (struct frame *, unsigned long);
extern void textconv_barrier (struct frame *, unsigned long);
+extern void replace_text (struct frame *, ptrdiff_t, ptrdiff_t,
+ Lisp_Object, ptrdiff_t, unsigned long);
+
extern char *get_extracted_text (struct frame *, ptrdiff_t, ptrdiff_t *,
ptrdiff_t *, ptrdiff_t *, ptrdiff_t *,
ptrdiff_t *, bool *);