ウィンドウ
アプリケーションウィンドウを制御できるメソッド群です。
WindowSetTitle
ウィンドウのタイトルバーにテキストを設定します。
Go: WindowSetTitle(ctx context.Context, title string)
JS: WindowSetTitle(title: string)
WindowFullscreen
ウィンドウをフルスクリーンにします。
Go: WindowFullscreen(ctx context.Context)
JS: WindowFullscreen()
WindowUnfullscreen
フルスクリーンにする前のウィンドウサイズおよび位置に戻します。
Go: WindowUnfullscreen(ctx context.Context)
JS: WindowUnfullscreen()
WindowIsFullscreen
ウィンドウがフルスクリーンの場合は、trueを返します。
Go: WindowIsFullscreen(ctx context.Context) bool
JS: WindowIsFullscreen() Promise<boolean>
WindowCenter
ウィンドウが現在表示されているモニターの中央に、ウィンドウを配置させます。
Go: WindowCenter(ctx context.Context)
JS: WindowCenter()
WindowExecJS
ウィンドウ内で、任意のJSコードを実行します。
このメソッドは、ブラウザ上で非同期にコードを実行し、すぐにリターンされます。 スクリプトでエラーが発生した場合、エラーログはブラウザコンソールでのみ確認できます。
Go: WindowExecJS(ctx context.Context, js string)
WindowReload
リロードします。(現在表示されているページをリロード)
Go: WindowReload(ctx context.Context)
JS: WindowReload()
WindowReloadApp
アプリケーションフロントエンドをリロードします。
Go: WindowReloadApp(ctx context.Context)
JS: WindowReloadApp()
WindowSetSystemDefaultTheme
Windowsのみ使用可能。
Go: WindowSetSystemDefaultTheme(ctx context.Context)
JS: WindowSetSystemDefaultTheme()
ウィンドウのテーマをシステムデフォルト(ダーク/ライト) に設定します。
WindowSetLightTheme
Windowsのみ使用可能。
Go: WindowSetLightTheme(ctx context.Context)
JS: WindowSetLightTheme()
ウィンドウのテーマをライトに設定します。
WindowSetDarkTheme
Windowsのみ使用可能。
Go: WindowSetDarkTheme(ctx context.Context)
JS: WindowSetDarkTheme()
ウィンドウのテーマをダークに設定します。
WindowShow
ウィンドウが非表示になっている場合は、表示させます。
Go: WindowShow(ctx context.Context)
JS: WindowShow()
WindowHide
現在表示されているウィンドウを非表示にします。
Go: WindowHide(ctx context.Context)
JS: WindowHide()
WindowIsNormal
ウィンドウが最小化、最大化、またはフルスクリーンになっていない場合、trueを 返します。
Go: WindowIsNormal(ctx context.Context) bool
JS: WindowIsNormal() Promise<boolean>
WindowSetSize
ウィンドウの幅と高さを設定します。
Go: WindowSetSize(ctx context.Context, width int, height int)
JS: WindowSetSize(width: number, height: number)
WindowGetSize
ウィンドウの幅と高さを取得します。
Go: WindowGetSize(ctx context.Context) (width int, height int)
JS: WindowGetSize(): Promise<Size>
WindowSetMinSize
ウィンドウの最小サイズを設定します。 現在のウィンドウサイズが、指定された最小サイズよりも小さい場合、現在のウィンドウサイズは変更されます。
サイズを0,0に設定すると、サイズの制約が無効化されます。
Go: WindowSetMinSize(ctx context.Context, width int, height int)
JS: WindowSetMinSize(width: number, height: number)
WindowSetMaxSize
ウィンドウの最大サイズを設定します。 現在のウィンドウサイズが、指定された最大サイズよりも大きい場合、現在のウィンドウサイズは変更されます。
サイズを0,0に設定すると、サイズの制約が無効化されます。
Go: WindowSetMaxSize(ctx context.Context, width int, height int)
JS: WindowSetMaxSize(width: number, height: number)
WindowSetAlwaysOnTop
ウィンドウを常に最前面に表示するかを切り替えます。
Go: WindowSetAlwaysOnTop(ctx context.Context, b bool)
JS: WindowSetAlwaysOnTop(b: boolean)
WindowSetPosition
現在ウィンドウが表示されているモニターに対する、相対的なウィンドウ位置を設定します。
Go: WindowSetPosition(ctx context.Context, x int, y int)
JS: WindowSetPosition(x: number, y: number)
WindowGetPosition
現在ウィンドウが表示されているモニターに対する、相対的なウィンドウ位置を取得します。
Go: WindowGetPosition(ctx context.Context) (x int, y int)
JS: WindowGetPosition(): Promise<Position>