ICoreWebView2Notification
COMメソッド 18
vtbl = vtable インデックス(0始まり)。HSP等からインデックス指定でCOMメソッドを呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT add_CloseRequested(ICoreWebView2NotificationCloseRequestedEventHandler* eventHandler, EventRegistrationToken* token)
| eventHandler | ICoreWebView2NotificationCloseRequestedEventHandler* | in | 通知のクローズが要求された際に呼び出されるイベントハンドラへのポインタである。 |
| token | EventRegistrationToken* | out | 登録したハンドラを後で解除するためのトークンを受け取る。 |
vtbl 4 HRESULT remove_CloseRequested(EventRegistrationToken token)
| token | EventRegistrationToken | in | add_CloseRequested で取得した登録トークンを指定し、対応するイベントハンドラを解除する。 |
vtbl 5 HRESULT ReportShown( void)
| void | in | 引数はない。通知がエンドユーザーに表示されたことを報告する。 |
vtbl 6 HRESULT ReportClicked( void)
| void | in | 引数はない。通知がエンドユーザーによってクリックされたことを報告する。 |
vtbl 7 HRESULT ReportClosed( void)
| void | in | 引数はない。通知が閉じられたことを報告する。 |
vtbl 8 HRESULT get_Body(LPWSTR* value)
| value | LPWSTR* | out | 通知の本文テキストを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 9 HRESULT get_Direction(COREWEBVIEW2_TEXT_DIRECTION_KIND* value)
| value | COREWEBVIEW2_TEXT_DIRECTION_KIND* | out | 通知テキストの表示方向 (左から右、右から左など) を受け取る。 |
vtbl 10 HRESULT get_Language(LPWSTR* value)
| value | LPWSTR* | out | 通知の言語を表す言語タグを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 11 HRESULT get_Tag(LPWSTR* value)
| value | LPWSTR* | out | 通知を識別するためのタグ文字列を受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 12 HRESULT get_IconUri(LPWSTR* value)
| value | LPWSTR* | out | 通知に表示するアイコンのURIを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 13 HRESULT get_Title(LPWSTR* value)
| value | LPWSTR* | out | 通知のタイトルを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 14 HRESULT get_BadgeUri(LPWSTR* value)
| value | LPWSTR* | out | 通知に表示するバッジ画像のURIを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 15 HRESULT get_BodyImageUri(LPWSTR* value)
| value | LPWSTR* | out | 通知の本文に表示する画像のURIを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
vtbl 16 HRESULT get_ShouldRenotify(BOOL* value)
| value | BOOL* | out | 同じタグの既存通知を置き換える際に再通知すべきかどうかを受け取る。 |
vtbl 17 HRESULT get_RequiresInteraction(BOOL* value)
| value | BOOL* | out | 通知が自動的に閉じられず、ユーザー操作を必要とするかどうかを受け取る。 |
vtbl 18 HRESULT get_IsSilent(BOOL* value)
| value | BOOL* | out | 通知を音やバイブレーションなしで表示すべきかどうかを受け取る。 |
vtbl 19 HRESULT get_Timestamp(DOUBLE* value)
| value | DOUBLE* | out | 通知に関連付けられたタイムスタンプ (エポックからのミリ秒) を受け取る。 |
vtbl 20 HRESULT GetVibrationPattern(DWORD* count, ULONGLONG** vibrationPattern)
| count | DWORD* | out | 返されるバイブレーションパターン配列の要素数を受け取る。 |
| vibrationPattern | ULONGLONG** | out | バイブレーションパターン (各時間長の配列) を受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。WebView2 のインターフェースは環境/ローダ経由で取得するため #usecom 末尾は "{}"。
出力引数:
#define global IID_ICoreWebView2Notification "{B7434D98-6BC8-419D-9DA5-FB5A96D4DACD}" #usecom global ICoreWebView2Notification IID_ICoreWebView2Notification "{}" #comfunc global ICoreWebView2Notification_add_CloseRequested 3 sptr,var #comfunc global ICoreWebView2Notification_remove_CloseRequested 4 int #comfunc global ICoreWebView2Notification_ReportShown 5 int #comfunc global ICoreWebView2Notification_ReportClicked 6 int #comfunc global ICoreWebView2Notification_ReportClosed 7 int #comfunc global ICoreWebView2Notification_get_Body 8 var #comfunc global ICoreWebView2Notification_get_Direction 9 var #comfunc global ICoreWebView2Notification_get_Language 10 var #comfunc global ICoreWebView2Notification_get_Tag 11 var #comfunc global ICoreWebView2Notification_get_IconUri 12 var #comfunc global ICoreWebView2Notification_get_Title 13 var #comfunc global ICoreWebView2Notification_get_BadgeUri 14 var #comfunc global ICoreWebView2Notification_get_BodyImageUri 15 var #comfunc global ICoreWebView2Notification_get_ShouldRenotify 16 var #comfunc global ICoreWebView2Notification_get_RequiresInteraction 17 var #comfunc global ICoreWebView2Notification_get_IsSilent 18 var #comfunc global ICoreWebView2Notification_get_Timestamp 19 var #comfunc global ICoreWebView2Notification_GetVibrationPattern 20 var,var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_ICoreWebView2Notification "{B7434D98-6BC8-419D-9DA5-FB5A96D4DACD}" #usecom global ICoreWebView2Notification IID_ICoreWebView2Notification "{}" #comfunc global ICoreWebView2Notification_add_CloseRequested 3 sptr,sptr #comfunc global ICoreWebView2Notification_remove_CloseRequested 4 int #comfunc global ICoreWebView2Notification_ReportShown 5 int #comfunc global ICoreWebView2Notification_ReportClicked 6 int #comfunc global ICoreWebView2Notification_ReportClosed 7 int #comfunc global ICoreWebView2Notification_get_Body 8 sptr #comfunc global ICoreWebView2Notification_get_Direction 9 sptr #comfunc global ICoreWebView2Notification_get_Language 10 sptr #comfunc global ICoreWebView2Notification_get_Tag 11 sptr #comfunc global ICoreWebView2Notification_get_IconUri 12 sptr #comfunc global ICoreWebView2Notification_get_Title 13 sptr #comfunc global ICoreWebView2Notification_get_BadgeUri 14 sptr #comfunc global ICoreWebView2Notification_get_BodyImageUri 15 sptr #comfunc global ICoreWebView2Notification_get_ShouldRenotify 16 sptr #comfunc global ICoreWebView2Notification_get_RequiresInteraction 17 sptr #comfunc global ICoreWebView2Notification_get_IsSilent 18 sptr #comfunc global ICoreWebView2Notification_get_Timestamp 19 sptr #comfunc global ICoreWebView2Notification_GetVibrationPattern 20 sptr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。