123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869typet(* Runtime representation is a nativeint holding the C [webview_t] pointer.
It is abstract in the .mli so callers cannot do arithmetic on it. *)typehint=Hint_none|Hint_min|Hint_max|Hint_fixed(** This function is not required, as the enum representation is an int, but
will ensure safety in case of reodering *)letint_of_hint=function|Hint_none->0|Hint_min->1|Hint_max->2|Hint_fixed->3(* The constant constructors above map to 0,1,2,3 at runtime, which matches
WEBVIEW_HINT_NONE/MIN/MAX/FIXED, so they can be passed straight to C. *)typenative_handle_kind=Ui_window|Ui_widget|Browser_controller(* Like [int_of_hint]: explicit mapping so reordering the variant stays safe.
Matches WEBVIEW_NATIVE_HANDLE_KIND_UI_WINDOW/UI_WIDGET/BROWSER_CONTROLLER. *)letint_of_native_handle_kind=function|Ui_window->0|Ui_widget->1|Browser_controller->2(* Field order must match the record block built by the C stub
(ocaml_webview_version). *)typeversion_info={major:int;minor:int;patch:int;version_number:string;pre_release:string;build_metadata:string;}external_create:bool->t="ocaml_webview_create"externaldestroy:t->unit="ocaml_webview_destroy"externalrun:t->unit="ocaml_webview_run"externalterminate:t->unit="ocaml_webview_terminate"externalset_title:t->string->unit="ocaml_webview_set_title"external_set_size:t->int->int->int->unit="ocaml_webview_set_size"externalnavigate:t->string->unit="ocaml_webview_navigate"externalset_html:t->string->unit="ocaml_webview_set_html"externalinit:t->string->unit="ocaml_webview_init"externaleval:t->string->unit="ocaml_webview_eval"externalbind:t->string->(string->string->unit)->unit="ocaml_webview_bind"externalunbind:t->string->unit="ocaml_webview_unbind"externaldispatch:t->(t->unit)->unit="ocaml_webview_dispatch"external_return:t->string->int->string->unit="ocaml_webview_return"externalversion:unit->version_info="ocaml_webview_version"externalget_window:t->nativeint="ocaml_webview_get_window"external_get_native_handle:t->int->nativeint="ocaml_webview_get_native_handle"letcreate?(debug=false)()=_createdebugletset_sizew~width~heighthint=_set_sizewwidthheight(int_of_hinthint)letreturnwid~error~result=_returnwid(iferrorthen1else0)resultletget_native_handlewkind=_get_native_handlew(int_of_native_handle_kindkind)