Crate webview2_com

source ·

Modules§

Structs§

Enums§

Traits§

Functions§

  • Allocate a PWSTR with [Com::CoTaskMemAlloc] and copy a &str into it.
  • Copy a PCWSTR from an input param to a String.
  • Copy a PWSTR allocated with [Com::CoTaskMemAlloc] from an input param to a String and free the original buffer with [Com::CoTaskMemFree].
  • The WebView2 threading model runs everything on the UI thread, including callbacks which it triggers with PostMessage, and we’re using this here because it’s waiting for some async operations in WebView2 to finish before starting the main message loop. As long as there are no pending results in rx, it will pump Window messages and check for a result after each message is dispatched.

Type Aliases§