aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidterm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Update Android portPo Lu2023-09-261-0/+1
| | | | | * src/androidterm.c (android_draw_fringe_bitmap): Sync with xterm.c.
* Update Android portPo Lu2023-09-261-6/+34
| | | | | | | | * src/androidterm.c (android_clip_to_row) (android_draw_fringe_bitmap, android_draw_hollow_cursor) (android_draw_bar_cursor): Sync with xterm.c. * src/xterm.c (x_draw_fringe_bitmap): Delete unused variables.
* ; Adjust commentaryPo Lu2023-08-211-21/+24
| | | | | | | * src/androidterm.c (android_text_to_string) (android_update_selection, android_reset_conversion) (android_set_build_fingerprint): Refine wording in commentary and correct typos.
* ; * src/androidterm.c (android_text_to_string): Fix commentary.Eli Zaretskii2023-08-191-6/+6
|
* Fix reporting of key events containing SYM and METAPo Lu2023-08-021-2/+4
| | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android)::(What is Android?): (Android Startup, Android File System, Android Environment) (Android Windowing, Android Fonts, Android Troubleshooting): Improve section titles. (Android Windowing): Describe the relation between keyboard modifiers reported by Android and those in key events. * java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp): Clear META_SYM_ON and META_META_MASK when retrieving ASCII characters. * src/androidgui.h: Add ANDROID_META_MASK. * src/androidterm.c (android_android_to_emacs_modifiers) (android_emacs_to_android_modifiers): Transform META to Alt, and vice versa.
* Update Android portPo Lu2023-07-181-0/+5
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Touchscreen Events): Describe treatment of canceled touch sequences during touch event translation. * java/org/gnu/emacs/EmacsNative.java (EmacsNative): Update JNI prototypes. * java/org/gnu/emacs/EmacsWindow.java (motionEvent): Set cancelation flag in events sent where appropriate. * lisp/touch-screen.el (touch-screen-handle-point-update): Improve treatment of horizontal scrolling near window edges. (touch-screen-handle-touch): Don't handle point up if the touch sequence has been canceled. * src/android.c (sendTouchDown, sendTouchUp, sendTouchMove): New argument `flags'. * src/androidgui.h (enum android_touch_event_flags): New enum. (struct android_touch_event): New field `flags'. * src/androidterm.c (handle_one_android_event): Report cancelation in TOUCHSCREEN_END_EVENTs. * src/keyboard.c (make_lispy_event): Fix botched merge.
* Fix keyboard state translation on AndroidPo Lu2023-07-121-8/+8
| | | | | | * src/androidterm.c (android_android_to_emacs_modifiers) (android_emacs_to_android_modifiers): Fix statement precedence bugs.
* Update Android portPo Lu2023-07-091-5/+6
| | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (eventModifiers) (motionEventModifiers): New functions. (onKeyDown, onKeyUp, onFocusChanged, onSomeKindOfMotionEvent): Don't record the previous modifier mask; instead, always use the modifier state specified in the event. * src/androidterm.c (handle_one_android_event): Don't dispatch button release events when a popup is active.
* Update Android portPo Lu2023-07-081-6/+29
| | | | | | | | | * java/org/gnu/emacs/EmacsService.java (DEBUG_IC) (DEBUG_THREADS): Improve commentary. * src/androidterm.c (handle_one_android_event): Signal completion of IME events that have lost their frames. (requestCursorUpdates): Don't set an edit counter as this event won't be passed to the text conversion machinery.
* Update Android portPo Lu2023-07-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (scaledDensity): Announce new argument `scaledDensity'. * java/org/gnu/emacs/EmacsNoninteractive.java (main): Specify new argument. * java/org/gnu/emacs/EmacsService.java (onCreate): Compute an adjusted DPI for the font size based on the ratio between density and scaledDensity. (run): Specify that adjusted density. * src/android.c (setEmacsParams): Set `android_scaled_pixel_density'. * src/android.h: (android_scaled_pixel_density: New variable. * src/androidterm.c (android_term_init): Set `font_resolution'. * src/androidterm.h (struct android_display_info): New field. * src/font.c (font_pixel_size, font_find_for_lface) (font_open_for_lface, Ffont_face_attributes, Fopen_font): Use FRAME_RES instead of FRAME_RES_Y. * src/frame.h (FRAME_RES): New macro. Use this to convert between font point and pixel sizes as opposed to FRAME_RES_Y. * src/w32font.c (fill_in_logfont): * src/xfaces.c (Fx_family_fonts, set_lface_from_font): Use FRAME_RES instead of FRAME_RES_Y. (bug#64444)
* Update Android portPo Lu2023-06-211-12/+18
| | | | | | | * src/androidfns.c (android_set_tool_bar_position): (frame_geometry): * src/androidterm.c (android_flash): (android_clear_under_internal_border): Synchronize with X.
* Update Android portPo Lu2023-06-151-9/+120
| | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection, beginBatchEdit, reset, endBatchEdit): Keep track of the number of batch edits and return an appropriate value. (takeSnapshot): Implement function. * java/org/gnu/emacs/EmacsNative.java (takeSnapshot): New function. * java/org/gnu/emacs/EmacsService.java (resetIC): Improve debugging output. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Call `reset' to clear the UI side batch edit count. * src/androidterm.c (struct android_get_surrounding_text_context): New fields `conversion_start' and `conversion_end'. (android_get_surrounding_text): Return the conversion region. (android_get_surrounding_text_internal, NATIVE_NAME): Factor out `getSurroundingText'. (takeSnapshot): New function.
* Improve IM synchronization on AndroidPo Lu2023-06-141-0/+7
| | | | | | | | * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection): Reimplement as an InputConnection, not BaseInputConnection. * src/androidterm.c (performEditorAction): Sync prior to sending keyboard events.
* Update Android portPo Lu2023-06-101-7/+11
| | | | | | | | | | | | * src/android.c (android_select, android_check_query) (android_check_query_urgent, android_answer_query) (android_answer_query_spin, android_begin_query, android_end_query) (android_run_in_emacs_thread): Use finer grained memory synchronization semantics. * src/androidterm.c (android_get_selection): Use the current selection, not its value at the time of the last redisplay. * src/keyboard.c (handle_input_available_signal): Place memory barrier.
* Avoid responding to input method queries asynchronouslyPo Lu2023-06-091-6/+6
| | | | | | | | | | | | * src/androidterm.c (handle_one_android_event): Don't answer queries here; just rely on the event interrupting android_select. This avoids exposing buffer contents to input methods while a command is being executed. * src/textconv.c (TEXTCONV_DEBUG, really_commit_text) (really_finish_composing_text, really_set_composing_text) (really_set_composing_region, really_delete_surrounding_text) (really_set_point_and_mark, get_extracted_text): Add debugging printouts.
* Update Android portPo Lu2023-06-071-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Clear batch edit state once a new input connection is establishedPo Lu2023-06-051-0/+10
| | | | | * src/androidterm.c (android_handle_ime_event): Clear batch edit state, in case the previous input method forgot to do so.
* Update Android portPo Lu2023-06-051-1/+47
| | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function clearInputFlags. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Stop reporting changes after a new input method connection is established. * src/androidterm.c (android_handle_ime_event): Implement that change. (JNICALL): New function.
* Fix typos in Android portPo Lu2023-06-031-4/+2
| | | | | * lisp/bindings.el (global-map): Bind cut, copy and paste. * src/androidterm.c (JNICALL): Use key.
* Update Android portPo Lu2023-06-031-6/+21
| | | | | | | | | | | | | * src/androidterm.c (struct android_get_extracted_text_context): New field `mark_active'. (android_get_extracted_text): Set that field. (struct android_extracted_text_class): New field `flags'. (android_build_extracted_text): New argument `mark_active'. Set flags appropriately. (NATIVE_NAME, android_update_selection): Likewise. * src/textconv.c (get_extracted_text): New argument `mark_active'. Set it if the mark is active. * src/textconv.h: Update prototypes.
* Update Android portPo Lu2023-06-021-1/+11
| | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection): Apply workarounds on Vivo devices as well. * src/android.c (sendKeyPress, sendKeyRelease): Clear counter. * src/androidgui.h (struct android_key_event): New field `counter'. * src/androidterm.c (handle_one_android_event): Generate barriers as appropriate. (JNICALL): Set `counter'. * src/frame.h (enum text_conversion_operation): * src/textconv.c (detect_conversion_events) (really_set_composing_text, handle_pending_conversion_events_1) (handle_pending_conversion_events, textconv_barrier): * src/textconv.h: Implement text conversion barriers and fix various typos.
* Update Android portPo Lu2023-06-011-3/+67
| | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsInputConnection.java (EmacsInputConnection, performContextMenuAction): New function. * java/org/gnu/emacs/EmacsNative.java (EmacsNative) (performContextMenuAction): New function. * src/android.c (android_get_gc_values): Implement more efficiently. * src/androidterm.c (android_handle_ime_event): Pass through `update' argument to `finish_composing_text'. Fix thinko. * src/textconv.c (really_finish_composing_text) (really_set_composing_text, really_set_composing_region) (handle_pending_conversion_events_1, finish_composing_text): New argument `update'. Notify IME of conversion region changes if set. * src/textconv.h: Update structs and prototypes.
* Correctly report start and end in extracted textPo Lu2023-06-011-13/+19
| | | | | | | | | | | * src/androidterm.c (struct android_get_extracted_text_context): New field `start_offset' and `end_offset'. Delete `offset'. (android_get_extracted_text, android_build_extracted_text): Replace `offset' with new args `start_offset' and `end_offset'. (NATIVE_NAME): Set `start_offset' and `end_offset'. (android_update_selection): Likewise. * src/textconv.c (get_extracted_text): Likewise. * src/textconv.h: Update prototypes.
* Update Android portPo Lu2023-05-071-0/+88
| | | | | | | | | | | | | | | | | | | | | | | * 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'.
* Update Android portPo Lu2023-03-281-0/+1
| | | | | | | | | | | | | | | * src/androidterm.c (android_draw_image_glyph_string): Restore potentially clobbered GC clipping. * src/sfnt.c (sfnt_large_integer_add, sfnt_multiply_divide_round) (sfnt_mul_fixed_round): New functions. (sfnt_build_glyph_outline): Take unscaled glyph metrics. (sfnt_prepare_raster, sfnt_vary_simple_glyph) (sfnt_vary_compound_glyph, sfnt_vary_interpreter): Use rounding multiplication to scale deltas. (main): Adjust tests. * src/sfntfont.c (sfntfont_get_glyph_outline) (sfntfont_probe_widths, sfntfont_open, sfntfont_measure_pcm) (sfntfont_draw): More minor fixes to variable fonts.
* Remove extraneous debugging codePo Lu2023-03-181-5/+0
| | | | | * src/androidterm.c (handle_one_android_event): Don't log expose events.
* Update Android portPo Lu2023-03-181-0/+32
| | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsView.java (EmacsView) (prepareForLayout): New function. Call this prior to mapping the view. (onGlobalLayout): New function. Register as global layout listener. * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) (notifyContentRectPosition): New function. Use specified xPosition and yPosition when reporting the offsets of children of the root window. * java/org/gnu/emacs/EmacsWindowAttachmentManager.java (registerWindow): Specify activity launch bounds if necessary. * src/androidterm.c (handle_one_android_event): Send MOVE_FRAME_EVENT where necessary.
* Include more information in Android bug reportsPo Lu2023-03-171-1/+40
| | | | | | | | | | | * src/androidfns.c (Fx_server_vendor, Fx_server_version): New functions. (syms_of_androidfns): Define new functions. * src/androidterm.c (android_set_build_fingerprint) (syms_of_androidterm): Set new variable Vandroid_build_manufacturer. * src/xfns.c (Fx_server_vendor, Fx_server_version): Update doc strings.
* Update Android portPo Lu2023-03-141-3/+1
| | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (figureChange): Detect mice on up events as well. (onSomeKindOfMotionEvent): Work past framework bug. * src/androidterm.c (android_perform_conversion_query): * src/textconv.c (textconv_query): * src/textconv.h (TEXTCONV_SKIP_ACTIVE_REGION): Remove unused code.
* Update Android portPo Lu2023-03-121-0/+35
| | | | | | | | * src/android.c (android_check_if_event): * src/androidgui.h: New function. * src/androidterm.c (android_event_is_for_frame): New function. (android_reset_conversion): Free and unqueue all text conversion events for the given frame.
* Update Android portPo Lu2023-03-121-34/+47
| | | | | | | | | | * src/androidterm.c (NATIVE_NAME, JNICALL) (android_build_extracted_text, android_update_selection): Use 0-based indices for Android buffer positions. Also, report surrounding text relative to the region, not to the cursor. * src/textconv.c (textconv_query): Accept new values of position. (really_set_composing_text): Use ephemeral last point.
* Add Super modifier support to Android portPo Lu2023-03-121-2/+4
| | | | | | | * src/androidgui.h (enum android_modifier_mask): New modifier ANDROID_SUPER_MASK. * src/androidterm.c (android_android_to_emacs_modifiers) (android_emacs_to_android_modifiers): Add new modifier.
* Fix crash during androidterm initPo Lu2023-03-121-0/+1
| | | | | * src/androidterm.c (syms_of_androidterm): Initialize Vandroid_build_fingerprint in case GC happens.
* Implement hourglass cursor on AndroidPo Lu2023-03-111-3/+45
| | | | | | | | | | | | | | * lisp/term/android-win.el (x-pointer-arrow, x-pointer-left-ptr) (x-pointer-left-side, x-pointer-sb-h-double-arrow) (x-pointer-sb-v-double-arrow, x-pointer-watch, x-pointer-xterm) (x-pointer-invisible): New constants. * src/androidterm.c (android_show_hourglass) (android_hide_hourglass): New functions. (android_toggle_visible_pointer, android_define_frame_cursor): Define or don't define hourglass cursor if x->hourglass. (android_redisplay_interface): Add new functions. * src/androidterm.h (struct android_output): New field `hourglass'.
* Implement mouse cursors on Android 7.0 and laterPo Lu2023-03-101-2/+66
| | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (defineCursor): New function. * src/android.c (struct android_emacs_cursor): New struct. (android_init_emacs_cursor): New function. (JNICALL): Call it. (android_create_font_cursor, android_define_cursor) (android_free_cursor): New functions. * src/android.h (enum android_handle_type): Add cursor handle type. * src/androidfns.c (Fx_create_frame, android_create_tip_frame) (enum mouse_cursor, struct mouse_cursor_types, mouse_cursor_types) (struct mouse_cursor_data, android_set_mouse_color) (syms_of_androidfns): * src/androidgui.h (enum android_cursor_shape): * src/androidterm.c (make_invisible_cursor) (android_toggle_invisible_pointer, android_free_frame_resources) (android_define_frame_cursor): * src/androidterm.h (struct android_display_info) (struct android_output): Port mouse cursor code over from X.
* Fix menu and popup race conditions on AndroidPo Lu2023-03-091-1/+6
| | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (onContextMenuClosed): * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu) (onMenuItemClick, run): * java/org/gnu/emacs/EmacsDialog.java (EmacsDialog, onClick) (createDialog, onDismiss): Take menu event serial, and pass it along in context menu events. * java/org/gnu/emacs/EmacsNative.java (sendContextMenu): New argument. * src/android.c (sendContextMenu): Pass serial number in event. * src/androidgui.h (struct android_menu_event): New field `menu_event_serial'. * src/androidmenu.c (FIND_METHOD_STATIC) (android_init_emacs_context_menu): Adjust method declarations. (android_menu_show, android_dialog_show): * src/androidterm.c (handle_one_android_event): Expect serial in context menu events. * src/androidterm.h: Update prototypes.
* Fix occasional crashPo Lu2023-03-081-5/+12
| | | | | | * src/androidterm.c (android_build_extracted_text): Return NULL if text class not initialized. (android_update_selection): Check that EXTRACTED is not NULL.
* Update Android portPo Lu2023-03-081-7/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android File System): Document what `temp~unlinked' means in the temporary files directory. * java/org/gnu/emacs/EmacsService.java (updateExtractedText): New function. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Ask the input method nicely to not display the extracted text UI. * src/android.c (struct android_emacs_service): New method `updateExtractedText'. (android_hack_asset_fd_fallback): Improve naming convention. Fix typo. (android_init_emacs_service): Add new method. (android_update_extracted_text): New function. (android_open_asset): Fix typo. * src/androidgui.h: Update prototypes. * src/androidterm.c (struct android_get_extracted_text_context): New field `flags'. (android_get_extracted_text): Set flags on the frame's output data. (android_build_extracted_text): New function. (getExtractedText): Move out class structures. (android_update_selection): Send updates to extracted text if the input method asked for them. (android_reset_conversion): Clear extracted text flags. * src/androidterm.h (struct android_output): New fields for storing extracted text data.
* Update Android portPo Lu2023-03-061-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New function requestSelectionUpdate. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Call it instead of losing if getting the current selection fails. * src/android-asset.h (AAsset_seek): Define stub. * src/android.c (android_open): Take mode_t. (android_open_asset, android_close_asset, android_asset_read_quit) (android_asset_read, android_asset_lseek, android_asset_fstat): New functions. * src/android.h (struct android_fd_or_asset): Update prototypes. * src/androidgui.h (enum android_ime_operation): Add new operation to update the selection position. * src/androidterm.c (android_handle_ime_event): Handle new operation. (requestSelectionUpdate): New function. * src/fileio.c (close_file_unwind_emacs_fd): New function. (Fcopy_file, union read_non_regular, read_non_regular) (Finsert_file_contents): Use optimized codepath to insert Android asset files. * src/frame.h (enum text_conversion_operation): New operation. * src/textconv.c (really_request_point_update) (handle_pending_conversion_events_1, request_point_update): New functions. * src/textconv.h: Update prototypes.
* Update Android portPo Lu2023-03-061-0/+10
| | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsService.java (sync): Delete function. * java/org/gnu/emacs/EmacsView.java (handleDirtyBitmap): Erase with window background. (onDetachedFromWindow): Only recycle bitmap if non-NULL. * java/org/gnu/emacs/EmacsWindow.java (background): New field. (changeWindowBackground): Set it. * src/android.c (struct android_emacs_service): Remove `sync'. (android_init_emacs_service): Likewise. (android_sync): Delete function. * src/androidfns.c (android_create_tip_frame): Set frame background color correctly. (Fx_show_tip): Make the tip frame visible. * src/androidgui.h: Update prototypes. * src/androidterm.c (handle_one_android_event): Handle tooltip movement correctly.
* Update Android portPo Lu2023-03-021-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Windowing): Reword documentation. * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): * java/org/gnu/emacs/EmacsFontDriver.java (EmacsFontDriver): * java/org/gnu/emacs/EmacsSdk7FontDriver.java (EmacsSdk7FontDriver): * java/org/gnu/emacs/EmacsService.java (queryBattery): * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Make functions final and classes static where necessary. * src/android.c (struct android_emacs_service): New method `display_toast'. (android_init_emacs_service): Load new method. (android_display_toast): New function. * src/android.h: Export. * src/androidfns.c (Fandroid_detect_mouse): * src/androidselect.c (Fandroid_clipboard_owner_p) (Fandroid_set_clipboard, Fandroid_get_clipboard) (Fandroid_browse_url): Prevent crashes when called from libandroid-emacs.so. * src/androidterm.c (handle_one_android_event): Fix out of date commentary.
* Update Android portPo Lu2023-03-011-1/+3
| | | | | | | | | | | | * doc/emacs/android.texi (Android File System): Document new behavior of starting a subprocess from /assets. * java/org/gnu/emacs/EmacsWindow.java (onSomeKindOfMotionEvent): Don't use isFromSource where not present. * src/androidterm.c (android_scroll_run): Avoid undefined behavior writing to bitfields. * src/callproc.c (get_current_directory): When trying to run a subprocess inside /assets, run it from the home directory instead.
* Update Android portPo Lu2023-02-251-0/+30
| | | | | | | | | | * java/debug.sh (is_root): Fix tee detection again for old systems which don't return exit codes from adb shell. * src/android.c (android_run_select_thread, NATIVE_NAME, JNICALL): * src/android.h (NATIVE_NAME): * src/androidterm.c (JNICALL, NATIVE_NAME): Apply stack alignment to all JNICALL functions.
* Make sure scroll-bar.el is loaded on AndroidPo Lu2023-02-231-0/+5
| | | | | | | * lisp/loadup.el: Update commentary. * src/androidterm.c (syms_of_androidterm): Define Vx_toolkit_scroll_bars. * src/xterm.c (syms_of_xterm): Update doc string.xf64
* Report both sides of the region to the input method upon setupPo Lu2023-02-191-6/+32
| | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (getSelection): Return array of ints. * java/org/gnu/emacs/EmacsView.java (onCreateInputConnection): Adjust accordingly. * src/androidterm.c (struct android_get_selection_context): New field `mark'. (android_get_selection): Set the mark field as appropriate. (getSelection): Adjust accordingly.
* Implement `fullscreen' on Android 4.0 and laterPo Lu2023-02-191-3/+21
| | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Windowing): Document what new frame parameters are now supported. * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): New field `isFullscreen'. (detachWindow, attachWindow): Sync fullscreen state. (onWindowFocusChanged): Add more logging. (onResume): Restore previous fullscreen state. (syncFullscreen): New function. * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) (setFullscreen): New function. * src/android.c (struct android_emacs_window): Add new method. (android_init_emacs_window): Look up new method. (android_set_fullscreen): New function. * src/androidgui.h: * src/androidterm.c (android_fullscreen_hook): Implement accordingly.
* Work around race condition bug in Android 13's input managerPo Lu2023-02-171-1/+1
| | | | | | | * src/androidterm.c (android_get_selection): Use ephemeral last point. * src/textconv.c (report_selected_window_change): Set w->ephemeral_last_point to the window's point now.
* Update emacsbug and version.el for the Android portPo Lu2023-02-171-0/+88
| | | | | | | | | | | | | | | * java/Makefile.in (install_temp/assets/version): New generated file. * lisp/loadup.el: Set emacs versions appropriately prior to dumping on Android. * lisp/mail/emacsbug.el (emacs-build-description): Insert Android build fingerprint. * lisp/version.el (emacs-repository-version-android) (emacs-repository-get-version, emacs-repository-get-branch): Implement for Android. * src/androidterm.c (android_set_build_fingerprint): New function. (syms_of_androidterm): New variable `android-build-fingerprint'.
* Update Android portPo Lu2023-02-161-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Fonts): * doc/emacs/input.texi (On-Screen Keyboards): * doc/lispref/commands.texi (Misc Events): Update documentation. * java/org/gnu/emacs/EmacsInputConnection.java (setSelection): New function. * java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView) (reconfigureFrontBuffer): Make bitmap references weak references. * java/org/gnu/emacs/EmacsView.java (handleDirtyBitmap): Don't clear surfaceView bitmap. * lisp/comint.el (comint-mode): * lisp/international/fontset.el (script-representative-chars) (setup-default-fontset): Improve detection of CJK fonts. * lisp/isearch.el (set-text-conversion-style): New variable. (isearch-mode, isearch-done): Save and restore the text conversion style. * lisp/minibuffer.el (minibuffer-mode): Set an appropriate text conversion style. * lisp/simple.el (analyze-text-conversion): Run post-self-insert-hook properly. * lisp/subr.el (read-char-from-minibuffer): Disable text conversion when reading character. * src/androidterm.c (show_back_buffer): Don't check that F is not garbaged. (android_update_selection, android_reset_conversion): Use the ephemeral last point and handle text conversion being disabled. * src/buffer.c (syms_of_buffer): Convert old style DEFVAR. * src/keyboard.c (kbd_buffer_get_event): Handle text conversion first. * src/lisp.h: Update prototypes. * src/lread.c (read_filtered_event): Temporarily disable text conversion. * src/sfnt.c (sfnt_decompose_glyph_1, sfnt_decompose_glyph_2): New functions. (sfnt_decompose_glyph, sfnt_decompose_instructed_outline): Refactor contour decomposition to those two functions. (main): Update tests. * src/sfntfont-android.c (system_font_directories): Add empty field. (Fandroid_enumerate_fonts, init_sfntfont_android): Enumerate fonts in a user fonts directory. * src/sfntfont.c (struct sfnt_font_desc): New field `num_glyphs'. (sfnt_enum_font_1): Set num_glyphs and avoid duplicate fonts. (sfntfont_glyph_valid): New function. (sfntfont_lookup_char, sfntfont_list_1): Make sure glyphs found are valid. * src/textconv.c (sync_overlay, really_commit_text) (really_set_composing_text, really_set_composing_region) (really_delete_surrounding_text, really_set_point_and_mark) (handle_pending_conversion_events_1) (handle_pending_conversion_events, conversion_disabled_p) (disable_text_conversion, resume_text_conversion) (Fset_text_conversion_style, syms_of_textconv): Update to respect new options. * src/textconv.h: * src/window.h (GCALIGNED_STRUCT): New field `ephemeral_last_point'. * src/xdisp.c (mark_window_display_accurate_1): Set it.
* Update Android portPo Lu2023-02-151-21/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/input.texi (On-Screen Keyboards): * doc/lispref/commands.texi (Misc Events): Improve documentation of text conversion stuff. * java/org/gnu/emacs/EmacsInputConnection.java (beginBatchEdit) (endBatchEdit, commitCompletion, commitText, deleteSurroundingText) (finishComposingText, getSelectedText, getTextAfterCursor) (EmacsInputConnection, setComposingRegion, performEditorAction) (getExtractedText): Condition debug code on DEBUG_IC. * java/org/gnu/emacs/EmacsService.java (EmacsService, updateIC): Likewise. * lisp/bindings.el (global-map): * lisp/electric.el (global-map): Make `text-conversion' `analyze-text-conversion'. * lisp/progmodes/prog-mode.el (prog-mode): Enable text conversion in input methods. * lisp/simple.el (analyze-text-conversion): New function. * lisp/textmodes/text-mode.el (text-conversion-style) (text-mode): Likewise. * src/androidterm.c (android_handle_ime_event): Handle set_point_and_mark. (android_sync_edit): Give Emacs 100 ms instead. (android_perform_conversion_query): Skip the active region, not the conversion region. (getSelectedText): Implement properly. (android_update_selection): Expose mark to input methods. (android_reset_conversion): Handle `text-conversion-style'. * src/buffer.c (init_buffer_once, syms_of_buffer): Add buffer local variable `text-conversion-style'. * src/buffer.h (struct buffer, bset_text_conversion_style): New fields. * src/emacs.c (android_emacs_init): Call syms_of_textconv. * src/frame.h (enum text_conversion_operation): Rename TEXTCONV_SET_POINT. * src/lisp.h: Export syms_of_textconv. * src/marker.c (set_marker_internal): Force redisplay when the mark is set and the buffer is visible on builds that use text conversion. Explain why. * src/textconv.c (copy_buffer): Fix copying past gap. (get_mark): New function. (textconv_query): Implement new flag. (sync_overlay): New function. Display conversion text in an overlay. (record_buffer_change, really_commit_text) (really_set_composing_text, really_set_composing_region) (really_delete_surrounding_text, really_set_point) (handle_pending_conversion_events_1, decrement_inside) (handle_pending_conversion_events, textconv_set_point) (get_extracted_text, register_textconv_interface): Various fixes and improvements. * src/textconv.h (struct textconv_interface): Update documentation. * src/window.h (GCALIGNED_STRUCT): New field `prev_mark'. * src/xdisp.c (mark_window_display_accurate_1): Handle prev_mark.