123456789101112131415161718192021222324252627282930(* The stubs work on the native parent window rather than on a [Webview.t],
which is what keeps dialog_stubs.cpp free of any reference to the webview C
API. A null handle is not an error here: the dialog is simply unparented.
The open dialogs report a cancellation as the empty string, so that the C
side never has to allocate an OCaml option. *)externalraw_confirm:nativeint->string->string->bool="ocaml_webview_dialog_confirm"externalraw_open:nativeint->string->bool->string="ocaml_webview_dialog_open"externalraw_save:nativeint->string->string->string="ocaml_webview_dialog_save"letconfirmw?(title="")message=raw_confirm(Webview.get_windoww)titlemessageletopen_wtitledirectory=matchraw_open(Webview.get_windoww)titledirectorywith|""->None|path->Somepathletopen_filew?(title="")()=open_wtitlefalseletopen_directoryw?(title="")()=open_wtitletrueletsave_filew?(title="")?(name="")()=matchraw_save(Webview.get_windoww)titlenamewith|""->None|path->Somepath