aboutsummaryrefslogtreecommitdiffstats
path: root/java/org (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-0140-40/+40
|
* Implement set_window_size_and_position_hook on AndroidPo Lu2025-12-231-0/+10
| | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (moveResizeWindow): New method, which alters all of the bounding box of a window at once. * src/android.c (android_init_emacs_window): Load method `move_resize_window'. (android_move_resize_window): Invoke this method, rather than a sequence of operations that will produce two ConfigureNotify events. * src/androidterm.c (android_set_window_size_and_position_1) (android_set_window_size_and_position): New functions; ported from X. (android_create_terminal): Register the same.
* Support `toolkit-theme-set-functions' on Android and execute hooks safelyPo Lu2025-11-243-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (setEmacsParams): New arg UIMODE. (sendConfigurationChanged): New args DETAIL and UI_MODE. * java/org/gnu/emacs/EmacsNoninteractive.java (main1): Provide an undefined UI mode. * java/org/gnu/emacs/EmacsService.java (EmacsService): New field uiMode. (onCreate): Initialize this field at start-up and provide the same to setEmacsParams. (onConfigurationChanged): If the UI mode has been altered, generate a configuration changed event to match. * src/android.c (android_ui_mode): New variable. (setEmacsParams): New argument UI_MODE. Initialize the same from this variable. * src/androidgui.h (enum android_configuration_changed): New enum. (struct android_configuration_changed_event): New field `DETAIL'. Convert fields providing specifics into a union of display density information and a UI mode integer. * src/androidterm.c (handle_one_android_event): Handle both manners of configuration change events. (android_term_init): Initialize Vtoolkit_theme from UI mode provided at start-up. * src/frame.c (syms_of_frame): Always define Vtoolkit_theme. Define Qtoolkit_theme_set_functions. * src/gtkutil.c (xg_update_dark_mode_for_all_displays): * src/w32term.c (w32_read_socket): Generate special toolkit theme events, rather than executing hooks directly within the read_socket callback. * src/keyboard.c (kbd_buffer_get_event) <TOOLKIT_THEME_CHANGED_EVENT>: Run Qtoolkit_theme_set_functions and set Vtoolkit_theme from event->ie.arg. * src/termhooks.h (enum event_kind): New event TOOLKIT_THEME_CHANGED_EVENT.
* Port to Android API 36Po Lu2025-06-112-0/+78
| | | | | | | | | | | | | | | | | * java/AndroidManifest.xml.in: Update targetSdkVersion to 36. * java/INSTALL: Document revised compilation dependencies. * java/org/gnu/emacs/EmacsActivity.java (interceptBackGesture): New function. (onCreate): Invoke the same to register back gesture callbacks on Android 16 or better. * java/org/gnu/emacs/EmacsWindow.java (onBackInvoked): New function. * src/keyboard.c (lispy_function_keys): Amend with new symbols introduced in Android API 36.
* Respond to display configuration updates on AndroidPo Lu2025-04-103-16/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (sendConfigurationChanged): Declare function. * java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity) (Sdk7FontObject): Do not access `metrics' field deleted from `EmacsService'. * java/org/gnu/emacs/EmacsService.java (EmacsService) <metrics, resources>: Delete fields. <dpiX, dpiY, dpiScaled>: New fields. (onCreate): Adjust accordingly. Record current display metrics for subsequent comparison. (onConfigurationChanged): New function. * lisp/dynamic-setting.el (font-setting-change-default-font): Enable on systems where font-get-system-font is not defined if invoked with SET-FONT nil. * src/android.c (sendConfigurationChanged): New function. * src/androidgui.h (ANDROID_CONFIGURATION_CHANGED): New enumerator. (struct android_configuration_changed): New structure. (union android_event): Add `config' member. * src/androidterm.c (handle_one_android_event): Handle ANDROID_CONFIGURATION_CHANGED events. (syms_of_androidterm): Define Qfont_render, and Qdynamic_setting. Provide the latter.
* ; * java/org/gnu/emacs/EmacsInputConnection.java: Fix commentary typo.Po Lu2025-03-201-3/+3
|
* ; * java/org/gnu/emacs/EmacsWindow.java (viewLayout): Typo in comment.Po Lu2025-03-091-1/+1
|
* Circumvent another styling issue in Android 15 QPR1Po Lu2025-03-041-0/+12
| | | | | | * java/org/gnu/emacs/EmacsView.java (popupMenu): On Android 15 and later, reload the default theme before displaying popup menus.
* Fix styling issues on Android 15 QPR1Po Lu2025-03-031-21/+26
| | | | | | | | | | | | * java/org/gnu/emacs/EmacsView.java (EmacsView): Guarantee that frame views are created with the correct theme. * java/res/values-v20/style.xml (EmacsStyle): * java/res/values-v29/style.xml (EmacsStyle): Disable a swiping gesture enabled on certain Android systems. * java/res/values-v35/style.xml: Rename from `styles'.xml.
* Merge from savannah/emacs-30Po Lu2025-02-194-22/+69
|\ | | | | | | ded77fefffa Fix remaining Android bugs reported over the past months
| * Fix remaining Android bugs reported over the past monthsPo Lu2025-02-194-22/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (attachWindow): Guarantee that child windows promoted to toplevels receive layout parameters that direct them to receive their parents' dimensions. Otherwise, the size of the window as a child is retained on Huawei HarmonyOS 4.2 and possibly other Android distributions. * java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo): Run anchor updates on the UI thread, as `InputMethodManager#updateCursorAnchorInfo' is liable to call `View#requestLayout'. * java/org/gnu/emacs/EmacsView.java (onMeasure): Always call `measureChildren', or child frames' onLayout handlers might not be invoked after they request a layout cycle and are duly processed in `onLayout'. (swapBuffers): Delete erroneous commentary. * java/org/gnu/emacs/EmacsWindow.java (viewLayout): If overrideRedirect, don't inadvertently clear rect.left and rect.top by recording the window's WM window-relative position. Fix typos. (reparentTo): Invalidate focus after transferring frame. (translateCoordinates): Account for override-redirect windows. Mostly important for mouse-drag-and-drop-region.
* | Merge from savannah/emacs-30Po Lu2025-02-191-2/+11
|\ \ | |/ | | | | | | | | | | | | | | | | e97be722d39 Properly move existing tooltips on Android 0cf3d341522 ; * ChangeLog.4: Reformat down to 28 March 2024. ccaa0be8e71 ; * ChangeLog.4: Check in ommitted change. b5410cbea2e ; * ChangeLog.4: Fix log entries down to the 1 May 2024. be7625cae73 ; Fix typos d447cd9fcc0 ; * ChangeLog.4: Update. 5dc2a573750 ; * admin/authors.el (authors-ignored-files): Ignore gnus...
| * Properly move existing tooltips on AndroidPo Lu2025-02-191-2/+11
| | | | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (requestViewLayout): If an override redirect window, additionally notify the window manager of layout changes.
* | Merge from savannah/emacs-30Po Lu2025-02-171-2/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | e3dc0ea2544 Fix crash in frame deletion on Android e34ea5db5f1 * src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug... 48f9d6aafea * lisp/man.el (Man-shell-file-name): Ensure a Bourne shel... 7016c13e5e6 ; Update etc/AUTHORS (bug#76319). 0bc7b5a389b ; * admin/authors.el (authors-aliases): Add "ElĂ­as Gabrie... e9c4f642b9d ; * doc/emacs/package.texi (Package Installation): Add om... 8c4294f370f ; Move index entries in user manual # Conflicts: # src/pgtkterm.c
| * Fix crash in frame deletion on AndroidPo Lu2025-02-171-2/+8
| | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (destroyHandle): Invalidate the input focus in the UI thread, as is proper.
| * Update copyright year to 2025Stefan Kangas2025-01-0240-40/+40
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Prevent crash when requesting storage permissions on AndroidPo Lu2025-02-071-1/+10
| | | | | | | | | | * java/org/gnu/emacs/EmacsService.java (requestStorageAccess30): Handle ActivityNotFoundException.
* | Update copyright year to 2025Paul Eggert2025-01-0140-40/+40
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Fix layout of preferences activity on Android 35Po Lu2024-09-181-0/+11
| | | | | | | | | | * java/org/gnu/emacs/EmacsPreferencesActivity.java (onCreate): Align list view to system windows.
* | Port to Android 35Po Lu2024-09-042-1/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Temporary workaround for Gnulib bug. Verify that the provided android.jar corresponds to Android 35, or any later version. * cross/ndk-build/Makefile.in (NDK_BUILD_SO_LDFLAGS): New variable. * cross/ndk-build/ndk-resolve.mk (NDK_LOCAL_A_NAMES_$(LOCAL_MODULE)): Define to NDK_BUILD_SO_LDFLAGS by default to enable building binaries with support for 16 kb page sizes. * java/AndroidManifest.xml.in: Target SDK 35. * java/INSTALL (16KB PAGE SIZES): New section. Replace references to Android 34 with 35. * java/org/gnu/emacs/EmacsActivity.java (onCreate): Restore pre-SDK 35 inset-relative placement. * java/org/gnu/emacs/EmacsFillPolygon.java (perform): Suppress deprecation warnings, and document why. * m4/ndk-build.m4 (ndk_INIT, ndk_LATE): Check for and enable toolchain support for 16 KB page sizes, if available. (ndk_CONFIG_FILES): Export linker options so derived. * src/conf_post.h [__ANDROID_API__ < 35]: Include system time.h and redefine timezone_t to rpl_timezone_t, so that the Gnulib replacement may not conflict with the useless OS type.
* Register for more Intents actions on AndroidPo Lu2024-08-091-5/+5
| | | | | | | | * java/AndroidManifest.xml.in <EmacsOpenActivity>: Register for SEND Intents with mailto URIs. * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Use Intent constants rather than string literals.
* ; Fix typosStefan Kangas2024-07-181-1/+1
|
* Port better to Android 3.0Po Lu2024-07-181-4/+4
| | | | | | * java/org/gnu/emacs/EmacsNoninteractive.java (main): Use the old getPackageInfo calling convention if it exists rather than on Android 2.3.3 and earlier.
* Do not set LD_LIBRARY_PATH during Android initializationPo Lu2024-07-141-113/+137
| | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Environment): Adjust documentation to match. * java/org/gnu/emacs/EmacsNoninteractive.java (main1): New function. Remove initialization of EmacsNative hither. (main): Acquire an ApplicationInfo or LoadedApk, as the case may be on the host system, derive a ClassLoader from the result, and load and call `main1' from within this class loader. * src/android-emacs.c (main): * src/android.c (setEmacsParams): Do not override LD_LIBRARY_PATH or set EMACS_LD_LIBRARY_PATH. This enables Emacs to execute subprocesses in certain "fortified" Android systems, amongst other things.
* Take precautions against ill-formed content URIsPo Lu2024-07-111-1/+17
| | | | | | * java/org/gnu/emacs/EmacsService.java (openContentUri) (checkContentUri): Verify that URIs derived from user-provided file names can be parsed before attempting to open them.
* Correct conditions for iconification on AndroidPo Lu2024-07-081-14/+9
| | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity) <isPaused>: Rename to <isStopped>. (attachWindow): Adjust to match. (onPause): Delete function. (onStop): Deem frames iconified after calls to onStop instead.
* Prevent crashes and related issues if initial activity is destroyed on AndroidPo Lu2024-06-272-7/+47
| | | | | | | | | | | | * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) <initialWindowCreated>: New variable. (EmacsWindow): If the initial frame has not yet been created, set attachmentToken to -1. * java/org/gnu/emacs/EmacsWindowManager.java (registerWindow): When the window's attachment token is -1 (i.e., it is the default window), start EmacsActivity rather than EmacsMultitaskActivity. Catch exceptions around startActivity.
* Fix omission of updates to child frames on AndroidPo Lu2024-06-242-23/+17
| | | | | | | | | | | | | * java/org/gnu/emacs/EmacsView.java (onAttachedFromWindow): Force a layout cycle rather than report exposure immediately. (prepareForLayout): Delete function. * java/org/gnu/emacs/EmacsWindow.java (mapWindow): Remove redundant calls to prepareForLayout. * src/androidterm.c (handle_one_android_event): Do not swap buffers when exposure is registered by a frame only partially updated.
* Avoid races between the tooltip and compositor on X and AndroidPo Lu2024-06-191-1/+1
| | | | | | | | | | * java/org/gnu/emacs/EmacsView.java (onLayout): Don't send exposure events when the window is still to be attached. * src/androidfns.c (Fx_show_tip): * src/xfns.c (Fx_show_tip): Block async input around initial frame update.
* Fix window class of Android tooltipsPo Lu2024-06-181-1/+1
| | | | | * java/org/gnu/emacs/EmacsWindow.java (getWindowLayoutParams): Declare as a panel, rather than an attached dialog.
* Reinforce bitmap reconfiguration on AndroidPo Lu2024-06-171-68/+93
| | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsView.java (EmacsView) <unswapped>: New field in which to record whether the back buffer has received contents beyond those present at the last buffer swap. <dimensionsLock>: Delete field. (onAttachedToWindow, onLayout, handleDirtyBitmap) (prepareForLayout): Rather, synchronize window dimensions with the view. (getCanvas, getBitmap): Do not reconfigure the back buffer bitmap if such outstanding data exists. (postSwapBuffers): New function. (swapBuffers): If such outstanding data exists and the back bufferis pending reconfiguration, recreate the back buffer and report exposure. * src/androidterm.c (handle_one_android_event): Fix indentation.
* Minor adjustments to battery.el on AndroidPo Lu2024-06-161-2/+2
| | | | | | | | | | | | | * src/android.c (android_query_battery): * java/org/gnu/emacs/EmacsService.java (queryBattery19) (queryBattery): Reorder items in value for consistency with Fandroid_query_battery. * lisp/battery.el (battery-status-function): Select battery-android only when android-query-battery is present. (battery-android): Return temperature and correct values of power source constants.
* Simplify bitmap reallocation on AndroidPo Lu2024-06-161-18/+17
| | | | | | | * java/org/gnu/emacs/EmacsView.java: Update outdated commentary. (handleDirtyBitmap): Don't copy contents of the previous bitmap to the new. (onLayout): Unconditionally expose upon layout changes.
* Eliminate some redundant synchronization on AndroidPo Lu2024-06-112-7/+15
| | | | | | | | * java/org/gnu/emacs/EmacsService.java (resetIC): Return on all versions of Android if the connection need not be reset. * java/org/gnu/emacs/EmacsView.java (getICMode, setICMode): Remove needless synchronization.
* Spelling fixesPaul Eggert2024-06-044-6/+6
|
* Trim redundancies from EmacsTileObjectPo Lu2024-06-021-4/+1
| | | | | | * java/org/gnu/emacs/EmacsTileObject.java (EmacsTileObject) <colorFilter>: Delete unused field. <paint>: Qualify as `static'.
* Work around one Android bug and document anotherPo Lu2024-05-232-13/+23
| | | | | | | | | | | * etc/PROBLEMS (Runtime problems specific to Android): Document deficiency of "Android Keyboard (AOSP)." * java/org/gnu/emacs/EmacsView.java (showOnScreenKeyboard): Revert yesterday's change. * java/org/gnu/emacs/EmacsWindow.java (toggleOnScreenKeyboard): Sync with the UI thread after displaying the on-screen keyboard.
* Improve compatibility with Android's default text editorPo Lu2024-05-221-0/+17
| | | | | | | | * java/org/gnu/emacs/EmacsView.java (showOnScreenKeyboard): Request a selection update if `inputConnection' has been established, to more closely emulate the OS text editing widget. (onCreateInputConnection) [EmacsService.DEBUG_IC]: Print current selection values before reporting them.
* Housekeeping around androidselect.cPo Lu2024-05-183-58/+22
| | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsClipboard.java (setClipboard) (getClipboard): * java/org/gnu/emacs/EmacsSdk11Clipboard.java (setClipboard) (getClipboard): * java/org/gnu/emacs/EmacsSdk8Clipboard.java (setClipboard) (getClipboard): Save and return Strings rather than byte arrays. * src/androidselect.c (android_init_emacs_clipboard) (Fandroid_set_clipboard, Fandroid_get_clipboard): Adjust to match.
* Communicate frame titles to the window manager on AndroidPo Lu2024-05-132-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (detachWindow) (attachWindow): Call updateWmName. (updateWmName): New function; transfer wm name from the window attached to the task's description. * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow) <wmName>: New field. (setWmName): New function. * src/android.c (android_init_emacs_window): Link to new function. (android_set_wm_name): New function. * src/android.h (struct android_emacs_service): Delete unused entries. * src/androidfns.c (android_set_name_internal, android_set_name) (android_implicitly_set_name, android_explicitly_set_name) (android_set_title): Port from X. * src/androidterm.c (android_term_init): Compute default frame title. * src/androidterm.h (struct android_display_info) <x_id_name>: New field.
* Additional changes to processing of Num Lock on AndroidPo Lu2024-05-122-31/+57
| | | | | | | | | | | | | * java/org/gnu/emacs/EmacsView.java (onKeyDown, onKeyMultiple) (onKeyDown): Disregard Num and Scroll Lock keys, and return value of window functions to the system. * java/org/gnu/emacs/EmacsWindow.java (eventModifiers): Return normalized meta state, not only those bits the system considers modifiers. (onKeyDown, onKeyUp): Ignore numpad keys to which no base characters are assigned, so that the system may generate the proper action keys instead.
* Correct earlier changes to processing of Num Lock on AndroidPo Lu2024-05-121-10/+4
| | | | | | * java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp): Cease stripping META_NUM_LOCK_ON and META_SCROLL_LOCK_ON from meta masks reported to getUnicodeChar.
* Delete unused functionsPo Lu2024-05-111-6/+0
| | | | | | | * java/org/gnu/emacs/EmacsNative.java (dup, close): * src/android.c (dup, close): Delete functions no longer referenced.
* Remove redundant encoding of strings in androidvfs.cPo Lu2024-05-101-12/+5
| | | | | | | | | * java/org/gnu/emacs/EmacsService.java (getDocumentTrees): Accept PROVIDER as a String. * src/android.c (android_init_emacs_service): * src/androidvfs.c (android_saf_root_opendir): Adjust to match.
* Fix earlier change to content URI resolution on AndroidPo Lu2024-05-101-1/+4
| | | | | | | | | * java/org/gnu/emacs/EmacsService.java (openContentUri): Return -1 if fd be NULL. * src/androidvfs.c (android_authority_open): Detect SecurityException and suchlike. (android_vfs_init): Initialize exception classes on Android 4.4.
* Fix hang after failed yank-media on AndroidPo Lu2024-05-083-27/+11
| | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsClipboard.java (getClipboardTargets) (getClipboardData): * java/org/gnu/emacs/EmacsSdk11Clipboard.java (getClipboardTargets, getClipboardData): * java/org/gnu/emacs/EmacsSdk8Clipboard.java (getClipboardTargets, getClipboardData): Return string data as Strings rather than byte arrays. * src/androidselect.c (android_init_emacs_clipboard) (Fandroid_get_clipboard_targets): Adjust to match. (extract_fd_offsets): Remove duplicated semicolon. (Fandroid_get_clipboard_data): Call unblock_input before returning if extract_fd_offsets fails.
* ; * java/org/gnu/emacs/EmacsTileObject.java: Fix copyright dates.Po Lu2024-05-061-1/+1
|
* Optimize stipples on AndroidPo Lu2024-05-062-11/+105
| | | | | | | | | | * java/org/gnu/emacs/EmacsGC.java (EmacsGC) <tileObject>: Change type to EmacsTileObject. (markDirty): Create an EmacsTileObject rather than a BitmapDrawable. * java/org/gnu/emacs/EmacsTileObject.java: New file, significantly leaner than BitmapDrawable.
* Fix inadvertent removal in EmacsWindowPo Lu2024-05-051-0/+4
| | | | | * java/org/gnu/emacs/EmacsWindow.java (onKeyUp): Send KeyPress events upon deferred KEYCODE_BACK.
* Simplify handling of command-line arguments on AndroidPo Lu2024-05-045-41/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (EXTRA_STARTUP_ARGUMENTS): New constant. (onCreate): Read a string array, not a string extra from the intent with this key. * java/org/gnu/emacs/EmacsOpenActivity.java (EmacsOpenActivity) <fileToOpen>: Delete field. (onCreate): Provide file name as a command line argument when starting the Emacs service. * java/org/gnu/emacs/EmacsPreferencesActivity.java (startEmacsQ) (startEmacsDebugInit): In like manner, replace ad-hoc command-line argument extra with a proper array. * java/org/gnu/emacs/EmacsService.java (EmacsService): Rename extraStartupArgument to extraStartupArguments, and change its type to a string array. (onCreate): Adjust to match. * java/org/gnu/emacs/EmacsThread.java (EmacsThread) <extraStartupArguments>: Ditto. <fileToOpen>: Delete field. (run): Adjust correspondingly.