1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 22:40:46 -08:00

Implement `fullscreen' on Android 4.0 and later

* doc/emacs/android.texi (Android Windowing): Document what new
frame parameters are now supported.
* java/org/gnu/emacs/EmacsActivity.java (EmacsActivity): New
field `isFullscreen'.
(detachWindow, attachWindow): Sync fullscreen state.
(onWindowFocusChanged): Add more logging.
(onResume): Restore previous fullscreen state.
(syncFullscreen): New function.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
(setFullscreen): New function.
* src/android.c (struct android_emacs_window): Add new method.
(android_init_emacs_window): Look up new method.
(android_set_fullscreen): New function.
* src/androidgui.h:
* src/androidterm.c (android_fullscreen_hook): Implement
accordingly.
This commit is contained in:
Po Lu 2023-02-19 13:17:43 +08:00
parent c6809eb927
commit c8f49c9276
6 changed files with 193 additions and 15 deletions

View file

@ -128,6 +128,9 @@ public class EmacsWindow extends EmacsHandleObject
events. */
public LinkedHashMap<Integer, String> eventStrings;
/* Whether or not this window is fullscreen. */
public boolean fullscreen;
public
EmacsWindow (short handle, final EmacsWindow parent, int x, int y,
int width, int height, boolean overrideRedirect)
@ -1179,4 +1182,27 @@ public class EmacsWindow extends EmacsHandleObject
return any;
}
public void
setFullscreen (final boolean isFullscreen)
{
EmacsService.SERVICE.runOnUiThread (new Runnable () {
@Override
public void
run ()
{
EmacsActivity activity;
Object tem;
fullscreen = isFullscreen;
tem = getAttachedConsumer ();
if (tem != null)
{
activity = (EmacsActivity) getAttachedConsumer ();
activity.syncFullscreenWith (EmacsWindow.this);
}
}
});
}
};