aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidterm.h
diff options
context:
space:
mode:
authorPo Lu2023-01-17 22:10:43 +0800
committerPo Lu2023-01-17 22:10:43 +0800
commit1b8258a1f2b6a080a4f0e819aa4a86c1ec2da89f (patch)
treed6c709e513882f5d430a98508e631cc503469fab /src/androidterm.h
parent356249d9faf2b454879ff30f06d97beb97fb9a36 (diff)
downloademacs-1b8258a1f2b6a080a4f0e819aa4a86c1ec2da89f.tar.gz
emacs-1b8258a1f2b6a080a4f0e819aa4a86c1ec2da89f.zip
Update Android port
* doc/emacs/android.texi (Android Fonts): Document that TTC format fonts are now supported. * doc/emacs/emacs.texi (Top): Fix menus. * doc/lispref/commands.texi (Touchscreen Events) (Key Sequence Input): Document changes to touchscreen events. * etc/DEBUG: Describe how to debug 64 bit binaries on Android. * java/org/gnu/emacs/EmacsCopyArea.java (perform): Explicitly recycle copy bitmap. * java/org/gnu/emacs/EmacsDialog.java (EmacsDialog): New class. * java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Use 5 point PolyLine like X, because Android behaves like Postscript on some devices and X elsewhere. * java/org/gnu/emacs/EmacsFillRectangle.java (perform): Explicitly recycle copy bitmap. * java/org/gnu/emacs/EmacsPixmap.java (destroyHandle): Explicitly recycle bitmap and GC if it is big. * java/org/gnu/emacs/EmacsView.java (EmacsView): Make `bitmapDirty' a boolean. (handleDirtyBitmap): Reimplement in terms of that boolean. Explicitly recycle old bitmap and GC. (onLayout): Fix lock up. (onDetachedFromWindow): Recycle bitmap and GC. * java/org/gnu/emacs/EmacsWindow.java (requestViewLayout): Update call to explicitlyDirtyBitmap. * src/android.c (android_run_select_thread, android_select): Really fix android_select. (android_build_jstring): New function. * src/android.h: Update prototypes. * src/androidmenu.c (android_process_events_for_menu): Totally unblock input before process_pending_signals. (android_menu_show): Remove redundant unblock_input and debugging code. (struct android_emacs_dialog, android_init_emacs_dialog) (android_dialog_show, android_popup_dialog, init_androidmenu): Implement popup dialogs on Android. * src/androidterm.c (android_update_tools) (handle_one_android_event, android_frame_up_to_date): Allow tapping tool bar items. (android_create_terminal): Add dialog hook. (android_wait_for_event): Adjust call to android_select. * src/androidterm.h (struct android_touch_point): New field `tool_bar_p'. * src/keyboard.c (read_key_sequence, head_table) (syms_of_keyboard): Prefix touchscreen events with posn. * src/keyboard.h (EVENT_HEAD): Handle touchscreen events. * src/process.c (wait_reading_process_output): Adjust call to android_select. * src/sfnt.c (sfnt_read_table_directory): If the first long turns out to be ttcf, return -1. (sfnt_read_ttc_header): New function. (main): Test TTC support. * src/sfnt.h (struct sfnt_ttc_header): New structure. (enum sfnt_ttc_tag): New enum. * src/sfntfont-android.c (struct sfntfont_android_scanline_buffer): New structure. (GET_SCANLINE_BUFFER): New macro. Try to avoid so much malloc upon accessing the scanline buffer. (sfntfont_android_put_glyphs): Do not use SAFE_ALLOCA to allocate the scaline buffer. (Fandroid_enumerate_fonts): Enumerate ttc fonts too. * src/sfntfont.c (struct sfnt_font_desc): New field `offset'. (sfnt_enum_font_1): Split out enumeration code from sfnt_enum_font. (sfnt_enum_font): Read TTC tables and enumerate each font therein. (sfntfont_open): Seek to the offset specified. * xcompile/Makefile.in (maintainer-clean): Fix depends here.
Diffstat (limited to 'src/androidterm.h')
-rw-r--r--src/androidterm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/androidterm.h b/src/androidterm.h
index 9aa09877196..c0f862e35fb 100644
--- a/src/androidterm.h
+++ b/src/androidterm.h
@@ -148,6 +148,9 @@ struct android_touch_point
148 148
149 /* The tool ID and the last known X and Y positions. */ 149 /* The tool ID and the last known X and Y positions. */
150 int tool_id, x, y; 150 int tool_id, x, y;
151
152 /* Whether or not the tool is pressed on the tool bar. */
153 bool tool_bar_p;
151}; 154};
152 155
153struct android_output 156struct android_output
@@ -410,6 +413,9 @@ extern void android_finalize_font_entity (struct font_entity *);
410 413
411extern Lisp_Object android_menu_show (struct frame *, int, int, int, 414extern Lisp_Object android_menu_show (struct frame *, int, int, int,
412 Lisp_Object, const char **); 415 Lisp_Object, const char **);
416extern Lisp_Object android_popup_dialog (struct frame *, Lisp_Object,
417 Lisp_Object);
418
413extern void init_androidmenu (void); 419extern void init_androidmenu (void);
414extern void syms_of_androidmenu (void); 420extern void syms_of_androidmenu (void);
415 421
@@ -417,6 +423,7 @@ extern void syms_of_androidmenu (void);
417 423
418extern const struct font_driver android_sfntfont_driver; 424extern const struct font_driver android_sfntfont_driver;
419 425
426extern void sfntfont_android_shrink_scanline_buffer (void);
420extern void init_sfntfont_android (void); 427extern void init_sfntfont_android (void);
421extern void syms_of_sfntfont_android (void); 428extern void syms_of_sfntfont_android (void);
422 429