aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidgui.h
diff options
context:
space:
mode:
authorPo Lu2023-05-07 11:09:56 +0800
committerPo Lu2023-05-07 11:09:56 +0800
commit889b61b99918d1c6313d4f884de2e2cb3ab466c9 (patch)
tree963ea5823611ecc74a62098c1d37a378e2bfd83d /src/androidgui.h
parentc0a52c6cef77b8bc83e9d373ac0d0899c93f7a37 (diff)
downloademacs-889b61b99918d1c6313d4f884de2e2cb3ab466c9.tar.gz
emacs-889b61b99918d1c6313d4f884de2e2cb3ab466c9.zip
Update Android port
* java/org/gnu/emacs/EmacsInputConnection.java (requestCursorUpdates): * java/org/gnu/emacs/EmacsNative.java (requestCursorUpdates): * java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo): New functions. * src/android.c (struct android_emacs_service) (android_init_emacs_service): Add new method. (android_update_cursor_anchor_info): New function. * src/androidfns.c (android_set_preeditarea): New function. * src/androidgui.h (enum android_ime_operation): New operation `REQUEST_CURSOR_UPDATES'. (struct android_ime_event): Document new meaning of `length'. * src/androidterm.c (android_request_cursor_updates): New function. (android_handle_ime_event): Handle new operations. (handle_one_android_event, android_draw_window_cursor): Update the preedit area if needed, like on X. (requestCursorUpdates): New function. * src/androidterm.h (struct android_output): New field `need_cursor_updates'.
Diffstat (limited to 'src/androidgui.h')
-rw-r--r--src/androidgui.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/androidgui.h b/src/androidgui.h
index ddd8e9fcf72..6db25098398 100644
--- a/src/androidgui.h
+++ b/src/androidgui.h
@@ -432,6 +432,13 @@ enum android_ime_operation
432 ANDROID_IME_START_BATCH_EDIT, 432 ANDROID_IME_START_BATCH_EDIT,
433 ANDROID_IME_END_BATCH_EDIT, 433 ANDROID_IME_END_BATCH_EDIT,
434 ANDROID_IME_REQUEST_SELECTION_UPDATE, 434 ANDROID_IME_REQUEST_SELECTION_UPDATE,
435 ANDROID_IME_REQUEST_CURSOR_UPDATES,
436 };
437
438enum
439 {
440 ANDROID_CURSOR_UPDATE_IMMEDIATE = 1,
441 ANDROID_CURSOR_UPDATE_MONITOR = (1 << 1),
435 }; 442 };
436 443
437struct android_ime_event 444struct android_ime_event
@@ -452,7 +459,11 @@ struct android_ime_event
452 indices, and may actually mean ``left'' and ``right''. */ 459 indices, and may actually mean ``left'' and ``right''. */
453 ptrdiff_t start, end, position; 460 ptrdiff_t start, end, position;
454 461
455 /* The number of characters in TEXT. */ 462 /* The number of characters in TEXT.
463
464 If OPERATION is ANDROID_IME_REQUEST_CURSOR_UPDATES, then this is
465 actually the cursor update mode associated with that
466 operation. */
456 size_t length; 467 size_t length;
457 468
458 /* TEXT is either NULL, or a pointer to LENGTH bytes of malloced 469 /* TEXT is either NULL, or a pointer to LENGTH bytes of malloced
@@ -620,6 +631,8 @@ extern void android_update_ic (android_window, ptrdiff_t, ptrdiff_t,
620extern void android_reset_ic (android_window, enum android_ic_mode); 631extern void android_reset_ic (android_window, enum android_ic_mode);
621extern void android_update_extracted_text (android_window, void *, 632extern void android_update_extracted_text (android_window, void *,
622 int); 633 int);
634extern void android_update_cursor_anchor_info (android_window, float,
635 float, float, float);
623extern int android_set_fullscreen (android_window, bool); 636extern int android_set_fullscreen (android_window, bool);
624 637
625enum android_cursor_shape 638enum android_cursor_shape