1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-13 03:06:23 -08:00

Update Android port

* doc/emacs/android.texi (Android Environment): Document
notifications permission.
* java/org/gnu/emacs/EmacsEditable.java (EmacsEditable):
* java/org/gnu/emacs/EmacsInputConnection.java
(EmacsInputConnection): New files.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Load
library dependencies in a less verbose fashion.
* java/org/gnu/emacs/EmacsView.java (EmacsView): Make imManager
public.
(onCreateInputConnection): Set InputType to TYPE_NULL for now.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, onKeyDown)
(onKeyUp, getEventUnicodeChar): Correctly handle key events with
strings.
* lisp/term/android-win.el (android-clear-preedit-text)
(android-preedit-text): New special event handlers.
* src/android.c (struct android_emacs_window): Add function
lookup_string.
(android_init_emacs_window): Adjust accordingly.
(android_wc_lookup_string): New function.
* src/androidgui.h (struct android_key_event): Improve
commentary.
(enum android_lookup_status): New enum.
* src/androidterm.c (handle_one_android_event): Synchronize IM
lookup code with X.
* src/coding.c (from_unicode_buffer): Implement on Android.
* src/coding.h:
* src/sfnt.c: Fix commentary.
This commit is contained in:
Po Lu 2023-02-12 20:32:25 +08:00
parent ab48881a2f
commit 0198b8cffd
13 changed files with 878 additions and 185 deletions

View file

@ -25,6 +25,10 @@ import android.content.res.AssetManager;
public class EmacsNative
{
/* List of native libraries that must be loaded during class
initialization. */
private static final String[] libraryDeps;
/* Obtain the fingerprint of this build of Emacs. The fingerprint
can be used to determine the dump file name. */
public static native String getFingerprint ();
@ -167,148 +171,26 @@ public class EmacsNative
Every time you add a new shared library dependency to Emacs,
please add it here as well. */
try
{
System.loadLibrary ("png_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
libraryDeps = new String[] { "png_emacs", "selinux_emacs",
"crypto_emacs", "pcre_emacs",
"packagelistparser_emacs",
"gnutls_emacs", "gmp_emacs",
"nettle_emacs", "p11-kit_emacs",
"tasn1_emacs", "hogweed_emacs",
"jansson_emacs", "jpeg_emacs",
"tiff_emacs", "xml2_emacs",
"icuuc_emacs", };
try
for (String dependency : libraryDeps)
{
System.loadLibrary ("selinux_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("crypto_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("pcre_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("packagelistparser_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("gnutls_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("gmp_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("nettle_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("p11-kit_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("tasn1_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("hogweed_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("jansson_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("jpeg_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("tiff_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("xml2_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
try
{
System.loadLibrary ("icuuc_emacs");
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
try
{
System.loadLibrary (dependency);
}
catch (UnsatisfiedLinkError exception)
{
/* Ignore this exception. */
}
}
System.loadLibrary ("emacs");