mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-20 13:00:51 -07:00
Update Android port
* java/org/gnu/emacs/EmacsInputConnection.java (beginBatchEdit) (endBatchEdit, commitCompletion, commitText, deleteSurroundingText) (finishComposingText, getSelectedText, getTextAfterCursor) (getTextBeforeCursor, setComposingText, setComposingRegion) (performEditorAction, performContextMenuAction, getExtractedText) (setSelection, sendKeyEvent, deleteSurroundingTextInCodePoints) (requestCursorUpdates): Ensure that the input connection is up to date. (getSurroundingText): New function. * java/org/gnu/emacs/EmacsNative.java (getSurroundingText): Export new C function. * java/org/gnu/emacs/EmacsService.java (resetIC): Invalidate previously created input connections. * java/org/gnu/emacs/EmacsView.java (EmacsView) (onCreateInputConnection): Signify that input connections are now up to date. * src/androidterm.c (struct android_get_surrounding_text_context): New structure. (android_get_surrounding_text, NATIVE_NAME): * src/textconv.c (get_surrounding_text): * src/textconv.h: New functions.
This commit is contained in:
parent
9a68041f2c
commit
63339a9577
7 changed files with 370 additions and 0 deletions
|
|
@ -111,6 +111,13 @@ public final class EmacsView extends ViewGroup
|
|||
details. */
|
||||
private int icMode;
|
||||
|
||||
/* The number of calls to `resetIC' to have taken place the last
|
||||
time an InputConnection was created. */
|
||||
public long icSerial;
|
||||
|
||||
/* The number of calls to `recetIC' that have taken place. */
|
||||
public volatile long icGeneration;
|
||||
|
||||
public
|
||||
EmacsView (EmacsWindow window)
|
||||
{
|
||||
|
|
@ -627,6 +634,12 @@ public final class EmacsView extends ViewGroup
|
|||
return null;
|
||||
}
|
||||
|
||||
/* Set icSerial. If icSerial < icGeneration, the input connection
|
||||
has been reset, and future input should be ignored until a new
|
||||
connection is created. */
|
||||
|
||||
icSerial = icGeneration;
|
||||
|
||||
/* Reset flags set by the previous input method. */
|
||||
|
||||
EmacsNative.clearInputFlags (window.handle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue