aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidgui.h
diff options
context:
space:
mode:
authorPo Lu2023-01-14 22:12:16 +0800
committerPo Lu2023-01-14 22:12:16 +0800
commit2b87ab7b27163fbd7b6b64c5a44e26b0e692c00a (patch)
tree3ab31df90bd435009d2d42b636ce3baf33bd2b28 /src/androidgui.h
parent28a9baccd4c8e997895d3adb3cfce4a11fa29896 (diff)
downloademacs-2b87ab7b27163fbd7b6b64c5a44e26b0e692c00a.tar.gz
emacs-2b87ab7b27163fbd7b6b64c5a44e26b0e692c00a.zip
Update Android port
* java/Makefile.in (clean): Fix distclean and bootstrap-clean rules. * java/debug.sh (jdb_port): (attach_existing): (num_pids): (line): Add new options to upload a gdbserver binary to the device. * java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): Make focusedActivities public. * java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu): New class. * java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Fix bounds computation. * java/org/gnu/emacs/EmacsGC.java (markDirty): Set stroke width explicitly. * java/org/gnu/emacs/EmacsService.java (EmacsService) (getLocationOnScreen, nameKeysym): New functions. * java/org/gnu/emacs/EmacsView.java (EmacsView): Disable focus highlight. (onCreateContextMenu, popupMenu, cancelPopupMenu): New functions. * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow): Implement a kind of ``override redirect'' window for tooltips. * src/android.c (struct android_emacs_service): New method `name_keysym'. (android_run_select_thread, android_init_events): (android_select): Release select thread on semaphores instead of signals to avoid one nasty race on SIGUSR2 delivery. (android_init_emacs_service): Initialize new method. (android_create_window): Handle CW_OVERRIDE_REDIRECT. (android_move_resize_window, android_map_raised) (android_translate_coordinates, android_get_keysym_name) (android_build_string, android_exception_check): New functions. * src/android.h: Update prototypes. * src/androidfns.c (android_set_parent_frame, Fx_create_frame) (unwind_create_tip_frame, android_create_tip_frame) (android_hide_tip, compute_tip_xy, Fx_show_tip, Fx_hide_tip) (syms_of_androidfns): Implement tooltips and iconification reporting. * src/androidgui.h (enum android_window_value_mask): Add CWOverrideRedirect. (struct android_set_window_attributes): Add `override_redirect'. (ANDROID_IS_MODIFIER_KEY): Recognize Caps Lock. * src/androidmenu.c (struct android_emacs_context_menu): New struct. (android_init_emacs_context_menu, android_unwind_local_frame) (android_push_local_frame, android_menu_show, init_androidmenu): New functions. * src/androidterm.c (handle_one_android_event): Fix NULL pointer dereference. (android_fullscreen_hook): Handle fullscreen correctly. (android_draw_box_rect): Fix top line. (get_keysym_name): Implement function. (android_create_terminal): Remove scroll bar stubs and add menu hook. * src/androidterm.h: Update prototypes. * src/emacs.c (android_emacs_init): Initialize androidmenu.c. * xcompile/Makefile.in: Fix clean rules.
Diffstat (limited to 'src/androidgui.h')
-rw-r--r--src/androidgui.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/androidgui.h b/src/androidgui.h
index 422e72408c7..8450a1f637b 100644
--- a/src/androidgui.h
+++ b/src/androidgui.h
@@ -80,13 +80,18 @@ enum android_fill_style
80 80
81enum android_window_value_mask 81enum android_window_value_mask
82 { 82 {
83 ANDROID_CW_BACK_PIXEL = (1 << 1), 83 ANDROID_CW_BACK_PIXEL = (1 << 1),
84 ANDROID_CW_OVERRIDE_REDIRECT = (1 << 2),
84 }; 85 };
85 86
86struct android_set_window_attributes 87struct android_set_window_attributes
87{ 88{
88 /* The background pixel. */ 89 /* The background pixel. */
89 unsigned long background_pixel; 90 unsigned long background_pixel;
91
92 /* Whether or not the window is override redirect. This cannot be
93 set after creation on Android. */
94 bool override_redirect;
90}; 95};
91 96
92struct android_gc_values 97struct android_gc_values
@@ -260,7 +265,7 @@ struct android_key_event
260 ((key) == 57 || (key) == 58 || (key) == 113 || (key) == 114 \ 265 ((key) == 57 || (key) == 58 || (key) == 113 || (key) == 114 \
261 || (key) == 119 || (key) == 117 || (key) == 118 || (key) == 78 \ 266 || (key) == 119 || (key) == 117 || (key) == 118 || (key) == 78 \
262 || (key) == 94 || (key) == 59 || (key) == 60 || (key) == 95 \ 267 || (key) == 94 || (key) == 59 || (key) == 60 || (key) == 95 \
263 || (key) == 63) 268 || (key) == 63 || (key) == 115)
264 269
265struct android_configure_event 270struct android_configure_event
266{ 271{
@@ -478,6 +483,11 @@ extern int android_query_tree (android_window, android_window *,
478extern void android_get_geometry (android_window, android_window *, 483extern void android_get_geometry (android_window, android_window *,
479 int *, int *, unsigned int *, 484 int *, int *, unsigned int *,
480 unsigned int *, unsigned int *); 485 unsigned int *, unsigned int *);
486extern void android_move_resize_window (android_window, int, int,
487 unsigned int, unsigned int);
488extern void android_map_raised (android_window);
489extern void android_translate_coordinates (android_window, int,
490 int, int *, int *);
481 491
482#endif 492#endif
483 493