aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidgui.h
diff options
context:
space:
mode:
authorPo Lu2023-01-20 19:06:32 +0800
committerPo Lu2023-01-20 19:06:32 +0800
commitd44b60c2f001d57b010f0e9b82f798fbad9a23d6 (patch)
tree1ff208bfccd74a3b2ad4488cd66c89762d0acd7e /src/androidgui.h
parente07b58dc35a66b5e611f437ec007292d82dc8f13 (diff)
downloademacs-d44b60c2f001d57b010f0e9b82f798fbad9a23d6.tar.gz
emacs-d44b60c2f001d57b010f0e9b82f798fbad9a23d6.zip
Update Android port
* .gitignore: Don't ignore verbose.mk.android. * doc/emacs/Makefile.in (EMACSSOURCES): Add android.texi and input.texi. * doc/emacs/android.texi (Android): Document support for the on-screen keyboard. (Android Startup): Document how to start Emacs with -Q on Android. (Android Environment): Document how Emacs works around the system ``task killer''. Document changes to frame deletion behavior. * doc/emacs/emacs.texi (Top): * doc/emacs/input.texi (Other Input Devices, On-Screen Keyboards): Document how to use Emacs with virtual keyboards. * doc/lispref/commands.texi (Touchscreen Events): Document changes to `touch-screen-track-drag'. * doc/lispref/frames.texi (Frames, On-Screen Keyboards): New node. * java/AndroidManifest.xml.in: Add settings activity and appropriate OSK adjustment mode. * java/org/gnu/emacs/EmacsActivity.java (onCreate): Allow creating Emacs with -Q. (onDestroy): Don't remove if killed by the system. * java/org/gnu/emacs/EmacsContextMenu.java (inflateMenuItems): Fix context menus again. * java/org/gnu/emacs/EmacsNative.java (EmacsNative): Make all event sending functions return long. * java/org/gnu/emacs/EmacsPreferencesActivity.java (EmacsPreferencesActivity): New class. * java/org/gnu/emacs/EmacsService.java (EmacsService) (onStartCommand, onCreate, startEmacsService): Start as a foreground service if necessary to bypass system restrictions. * java/org/gnu/emacs/EmacsSurfaceView.java (EmacsSurfaceView): * java/org/gnu/emacs/EmacsThread.java (EmacsThread, run): * java/org/gnu/emacs/EmacsView.java (EmacsView, onLayout) (onDetachedFromWindow): * java/org/gnu/emacs/EmacsWindow.java (EmacsWindow, viewLayout): Implement frame resize synchronization.. * java/org/gnu/emacs/EmacsWindowAttachmentManager.java (EmacsWindowAttachmentManager, removeWindowConsumer): Adjust accordingly for changes to frame deletion behavior. * lisp/frame.el (android-toggle-on-screen-keyboard) (frame-toggle-on-screen-keyboard): New function. * lisp/minibuffer.el (minibuffer-setup-on-screen-keyboard) (minibuffer-exit-on-screen-keyboard): New functions. (minibuffer-setup-hook, minibuffer-exit-hook): Add new functions to hooks. * lisp/touch-screen.el (touch-screen-relative-xy): Accept new value of window `frame'. Return frame coordinates in that case. (touch-screen-set-point-commands): New variable. (touch-screen-handle-point-up): Respect that variable. (touch-screen-track-drag): Return `no-drag' where appropriate. (touch-screen-drag-mode-line-1, touch-screen-drag-mode-line): Refactor to use `no-drag'. * src/android.c (struct android_emacs_window): New methods. Make all event sending functions return the event serial. (android_toggle_on_screen_keyboard, android_window_updated): New functions. * src/android.h: Update prototypes. * src/androidfns.c (Fandroid_toggle_on_screen_keyboard) (syms_of_androidfns): New function. * src/androidgui.h (struct android_any_event) (struct android_key_event, struct android_configure_event) (struct android_focus_event, struct android_window_action_event) (struct android_crossing_event, struct android_motion_event) (struct android_button_event, struct android_touch_event) (struct android_wheel_event, struct android_iconify_event) (struct android_menu_event): Add `serial' fields. * src/androidterm.c (handle_one_android_event) (android_frame_up_to_date): * src/androidterm.h (struct android_output): Implement frame resize synchronization.
Diffstat (limited to 'src/androidgui.h')
-rw-r--r--src/androidgui.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/androidgui.h b/src/androidgui.h
index 1f28c18ff34..3b9a74dc0b0 100644
--- a/src/androidgui.h
+++ b/src/androidgui.h
@@ -239,6 +239,7 @@ enum android_event_type
239struct android_any_event 239struct android_any_event
240{ 240{
241 enum android_event_type type; 241 enum android_event_type type;
242 unsigned long serial;
242 android_window window; 243 android_window window;
243}; 244};
244 245
@@ -252,6 +253,7 @@ enum android_modifier_mask
252struct android_key_event 253struct android_key_event
253{ 254{
254 enum android_event_type type; 255 enum android_event_type type;
256 unsigned long serial;
255 android_window window; 257 android_window window;
256 android_time time; 258 android_time time;
257 unsigned int state; 259 unsigned int state;
@@ -271,6 +273,7 @@ struct android_key_event
271struct android_configure_event 273struct android_configure_event
272{ 274{
273 enum android_event_type type; 275 enum android_event_type type;
276 unsigned long serial;
274 android_window window; 277 android_window window;
275 android_time time; 278 android_time time;
276 int x, y; 279 int x, y;
@@ -280,6 +283,7 @@ struct android_configure_event
280struct android_focus_event 283struct android_focus_event
281{ 284{
282 enum android_event_type type; 285 enum android_event_type type;
286 unsigned long serial;
283 android_window window; 287 android_window window;
284 android_time time; 288 android_time time;
285}; 289};
@@ -287,6 +291,7 @@ struct android_focus_event
287struct android_window_action_event 291struct android_window_action_event
288{ 292{
289 enum android_event_type type; 293 enum android_event_type type;
294 unsigned long serial;
290 295
291 /* The window handle. This can be ANDROID_NONE. */ 296 /* The window handle. This can be ANDROID_NONE. */
292 android_window window; 297 android_window window;
@@ -301,6 +306,7 @@ struct android_window_action_event
301struct android_crossing_event 306struct android_crossing_event
302{ 307{
303 enum android_event_type type; 308 enum android_event_type type;
309 unsigned long serial;
304 android_window window; 310 android_window window;
305 int x, y; 311 int x, y;
306 unsigned long time; 312 unsigned long time;
@@ -309,6 +315,7 @@ struct android_crossing_event
309struct android_motion_event 315struct android_motion_event
310{ 316{
311 enum android_event_type type; 317 enum android_event_type type;
318 unsigned long serial;
312 android_window window; 319 android_window window;
313 int x, y; 320 int x, y;
314 unsigned long time; 321 unsigned long time;
@@ -317,6 +324,7 @@ struct android_motion_event
317struct android_button_event 324struct android_button_event
318{ 325{
319 enum android_event_type type; 326 enum android_event_type type;
327 unsigned long serial;
320 android_window window; 328 android_window window;
321 int x, y; 329 int x, y;
322 unsigned long time; 330 unsigned long time;
@@ -329,6 +337,9 @@ struct android_touch_event
329 /* Type of the event. */ 337 /* Type of the event. */
330 enum android_event_type type; 338 enum android_event_type type;
331 339
340 /* Serial identifying the event. */
341 unsigned long serial;
342
332 /* Window associated with the event. */ 343 /* Window associated with the event. */
333 android_window window; 344 android_window window;
334 345
@@ -347,6 +358,9 @@ struct android_wheel_event
347 /* Type of the event. */ 358 /* Type of the event. */
348 enum android_event_type type; 359 enum android_event_type type;
349 360
361 /* Serial identifying the event. */
362 unsigned long serial;
363
350 /* Window associated with the event. */ 364 /* Window associated with the event. */
351 android_window window; 365 android_window window;
352 366
@@ -368,6 +382,9 @@ struct android_iconify_event
368 /* Type of the event. */ 382 /* Type of the event. */
369 enum android_event_type type; 383 enum android_event_type type;
370 384
385 /* Serial identifying the event. */
386 unsigned long serial;
387
371 /* Window associated with the event. */ 388 /* Window associated with the event. */
372 android_window window; 389 android_window window;
373}; 390};
@@ -377,6 +394,9 @@ struct android_menu_event
377 /* Type of the event. */ 394 /* Type of the event. */
378 enum android_event_type type; 395 enum android_event_type type;
379 396
397 /* Serial identifying the event. */
398 unsigned long serial;
399
380 /* Window associated with the event. Always None. */ 400 /* Window associated with the event. Always None. */
381 android_window window; 401 android_window window;
382 402