]> khamidou — GitHub mirrors - electron.git/commitdiff
Update Japanese translated docs.
authorTakahito Yamatoya <info@sqlazure.jp>
Sat, 16 Jan 2016 16:02:02 +0000 (01:02 +0900)
committerTakahito Yamatoya <info@sqlazure.jp>
Sat, 16 Jan 2016 16:02:02 +0000 (01:02 +0900)
docs-translations/jp/api/app.md

index 6e18f91d73c4abb8769e73b73052075bd87c28d0..d0df22bb40458b2a40a69d500d12c9a8e950593b 100644 (file)
@@ -353,6 +353,32 @@ app.on('ready', function() {
 
 [Application User Model ID][app-user-model-id] を `id`に変更します。
 
+### `app.isAeroGlassEnabled()` _Windows_
+
+[DWM composition](https://msdn.microsoft.com/en-us/library/windows/desktop/aa969540.aspx)(Aero Glass) が有効なら、このメソッドは`true`を戻し、有効でなければ`false`を戻します。透明なウィンドウを作成する必要があるか、またはできないとき(DWM compositionが無効なとき用明なウィンドウは正しく動作しません)、このAPIを使うことができます。
+
+使用例:
+
+```js
+let browserOptions = {width: 1000, height: 800};
+
+// Make the window transparent only if the platform supports it.
+if (process.platform !== 'win32' || app.isAeroGlassEnabled()) {
+  browserOptions.transparent = true;
+  browserOptions.frame = false;
+}
+
+// Create the window.
+win = new BrowserWindow(browserOptions);
+
+// Navigate.
+if (browserOptions.transparent) {
+  win.loadURL('file://' + __dirname + '/index.html');
+} else {
+  // No transparency, so we load a fallback that uses basic styles.
+  win.loadURL('file://' + __dirname + '/fallback.html');
+}
+
 ### `app.commandLine.appendSwitch(switch[, value])`
 
 Chromiumのコマンドラインにスイッチ( `value`をオプションにし)を追加します。