mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
docs: sync documents (#2443)
Co-authored-by: misitebao <misitebao@users.noreply.github.com>
This commit is contained in:
co-authored by
misitebao
parent
e339c40e85
commit
4cd873fecb
+23
@@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# クリップボード
|
||||
|
||||
ランタイム機能の一部として、オペレーティングシステムのクリップボードへのアクセスを提供します。<br/> 現在は、テキストの処理のみに対応しています。
|
||||
|
||||
### ClipboardGetText
|
||||
|
||||
このメソッドは、クリップボードに現在保存されているテキストを読み込みます。
|
||||
|
||||
Go: `ClipboardGetText(ctx context.Context) (string, error)`<br/> 返り値: 文字列(クリップボードが空の場合は、空文字)またはエラー。
|
||||
|
||||
JS: `ClipboardGetText(): Promise<string>`<br/> 返り値: 文字列を待機するPromise(クリップボードが空の場合は、空文字)。
|
||||
|
||||
### ClipboardSetText
|
||||
|
||||
このメソッドは、クリップボードにテキストを書き込みます。
|
||||
|
||||
Go: `ClipboardSetText(ctx context.Context, text string) error`<br/> 返り値: anyの場合はエラー。
|
||||
|
||||
JS: `ClipboardSetText(text: string): Promise<boolean>`<br/> 返り値: クリップボードにテキストが正常に書き込まれた場合はtrue、そうでない場合はfalseを返すようなPromise。
|
||||
@@ -34,4 +34,4 @@ Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optio
|
||||
|
||||
このメソッドは、指定されたイベントを発行します。 必要に応じて、イベント発行時にデータを渡すこともできます。 このメソッドによって、任意のイベントリスナーをトリガーさせることができます。
|
||||
|
||||
Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`<br/> JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))`
|
||||
Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`<br/> JS: `EventsEmit(eventName: string, ...optionalData: any)`
|
||||
|
||||
@@ -14,6 +14,7 @@ sidebar_position: 1
|
||||
- [イベント](events.mdx)
|
||||
- [ブラウザ](browser.mdx)
|
||||
- [ログ](log.mdx)
|
||||
- [クリップボード](clipboard.mdx)
|
||||
|
||||
Goのランタイムは、`github.com/wailsapp/wails/v2/pkg/runtime`をインポートすることで利用できます。 このパッケージのすべてのメソッドは、1番目の引数でContextを渡す必要があります。 このContextは、[OnStartup](../options.mdx#onstartup)フック、または[OnDomReady](../options.mdx#ondomready)フックからあらかじめ取得しておいてください。
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ Windowsの場合、0または255のアルファ値(A) のみがサポートさ
|
||||
|
||||
Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`<br/> JS: `WindowSetBackgroundColour(R, G, B, A)`
|
||||
|
||||
## TypeScript Object Definitions
|
||||
## TypeScript型定義
|
||||
|
||||
### Position
|
||||
|
||||
|
||||
Reference in New Issue
Block a user