Next: , Previous: , Up: EmacstとAndroid   [Contents][Index]


H.6 The Android Window System

Android’s window system is unusual in that all windows are reported to applications as maximized or full-screen, and, in the general case, only one window can be displayed at a time. On larger devices, the system permits simultaneously tiling up to four windows on the screen, though in emulators or installations configured for “desktop” systems stacks freely resizable windows as other desktop window managers do.

Windows, or, in system nomenclature, activities, do not exist indefinitely after creation, as the system may choose to pause windows that are not visible in order to conserve memory, on the assumption that the program will save its contents to disk, to be restored when the user selects those windows from the task switcher. Furthermore, a window is created by the operating system at Emacs startup that is afforded special treatment, which Emacs is expected to adopt.

Emacs approaches window management with the general objective of minimizing differences in frame behavior exposed to Lisp from that of frames on ordinary window systems, such as X Windows; the degree to which this goal is actually attained varies by the availability of facilities for window management in the version of Android where it is installed, and operating system policy towards inactive windows. When it is unavoidable that concessions should be made to such policy, Emacs prefers destroying frames to retaining ones with no activities to display them, unless such a frame is the initial frame and therefore displayed in the activity created at startup, which it is possible to open and identify so long as Emacs is yet executing.

Android 5.0 and later support an accurate implementation of window management where frames hold a one-to-one relation to the activities in which they are displayed, enabling deletion of activities in the task switcher to directly affect the frames concerned, and vice versa. There are just two exceptions:

Android 4.4 and earlier provide considerably inferior interfaces inadequate for a complete implementation of window management. On such systems, Emacs substitutes a fairly primitive mechanism where all but the initial frame are deleted when their activities are paused, only a single activity (not counting the activity created at startup) is visible at a time, and unattached frames are displayed in the first unoccupied activity available.

AndroidでEmacsがサポートするGUI機能は、以下のように限定されたサブセットだけです:

EmacsはAndroid上のXウィンドウシステムでサポートされている選択(selection)に関連する機能すべてを実装していません。たとえばサポートされているのはCLIPBOARDおよびPRIMARYという選択だけであり(グラフィカルなディスプレイでのカットアンドペーストを参照)、Emacsが選択をセットできるのは平文テキストにたいしてだけです。

それに加えてAndroidシステム自体がEmacsにアクセス可能な選択データに以下のように特定の制限を設けています:

Androidシステム自体にプライマリー選択という概念が存在しないので、かわりにEmacsがエミュレーションを提供しています。これはカットアンドペーストを通じてプライマリー選択の内容を他のアプリケーションに送信する手段が存在しないことを意味しています。

The volume keys are normally reserved by Emacs and used to provide the ability to quit Emacs without a physical keyboard (see Using Emacs with Virtual Keyboards). However, if you want them to adjust the volume instead, you can set the variable android-pass-multimedia-buttons-to-system to a non-nil value; note that you will no longer be able to quit Emacs using the volume buttons in that case, and that it is generally easier to activate the notification shade or another interface that momentarily deprives Emacs of the keyboard focus while the volume buttons are being depressed.

Android 6.0以降では入力フォーカスがEmacsにない間は、ダイアログボックス(ダイアログボックスの使用を参照)を表示できません。この点があなたにとって重要なら、他のプログラム上に表示できる権限をEmacsに付与して、この機能を復元できます。ほとんどのシステムでは以下の設定メニューからこれを行うことができます:

System -> Apps -> Emacs -> More -> Display over other apps

物理的な修飾キーととキーイベントにより報告されるEmacsの修飾子には直接的な関係があります。1つ例外がありキーボードでAltキーが押下されるとEmacsにその箇所でMeta修飾子が報告されます(逆も成り立つ)。これはほとんどのキーボードには特にMetaキーがなく、EmacsではAlt修飾子がほとんど使用されていないことに由来する不規則性です。

AndroidはSuper修飾子にたいして違う名前を用いることに留意してください。これはAndroidキーボードやキーマップ設定メニューではSYMと呼ばれています。

Androidの入力メソッドにはイベントのフィルタリング処理中にC-SPCを含むキーシーケンスを使用するような現実のアプリケーションを通常はもたないにも関わらず、そのようなキーシーケンスを暗黙理に破棄するというイライラさせられる傾向があります。デフォルトでは入力メソッドによってこれらのキーシーケンスがフィルターされる前に、Emacsがキーシーケンスを横取りします。

これが望ましくないと判明した場合(たとえば入力メソッドが言語切り替えのショートカットとしてC-SPCを扱う場合には、変数android-intercept-control-spacenilにセットしてこれを無効にできます。

Androidにインストールされているキーボードベルは、ベルを鳴動させる場面では数ミリ秒間アクティブになる振動要素という形式を採用しています。この振動時間は変数android-keyboard-bell-duration10から1000の値に変更してカスタマイズできます。

Color-related characteristics of the display are not automatically detectable on Android, so the variable android-display-planes should be configured to a suitable value if Emacs is to realize faces and images in a manner consistent with the true visual attributes of a grayscale or monochrome display: to 8 for the former class of display, and 1 for the latter, which will, respectively, force all colors to be rendered in 256 grays, or in monochrome. As this variable is processed at the time the display connection is established, customizations will not take effect unless they be performed from early-init.el (see 早期初期化ファイル).

The value of this variable does not affect anti-aliasing in the font driver, as monochrome displays nevertheless expect Emacs to provide antialiased text, which they receive after it is processed into bitmap data by the display driver.


Next: Font Backends and Selection under Android, Previous: AndroidでのEmacsの実行, Up: EmacstとAndroid   [Contents][Index]

This page has generated for branch:work/master_4078d0fd3ee9e55c3da219aa6e7788ac6130697b, commit:d18a231220c4a6cb2583dcc09bf39ca635ef043f to check Japanese translation.