Creates a new webview instance. If dbg is non-zero - developer tools will be enabled (if the platform supports them). Window parameter can be a pointer to the native window handle. If it's non-null - then child WebView is embedded into the given parent window. Otherwise a new window is created. Depending on the platform, a GtkWindow, NSWindow or HWND pointer can be passed here.
Binds a native C callback so that it will appear under the given name as a global JavaScript function. Internally it uses webview_init(). Callback receives a request string and a user-provided argument pointer. Request string is a JSON array of all the arguments passed to the JavaScript function.
Destroys a webview and closes the native window.
Evaluates arbitrary JavaScript code. Evaluation happens asynchronously, also the result of the expression is ignored. Use RPC bindings if you want to receive notifications about the results of the evaluation.
Returns a native window handle pointer. When using GTK backend the pointer is GtkWindow pointer, when using Cocoa backend the pointer is NSWindow pointer, when using Win32 backend the pointer is HWND pointer.
Injects JavaScript code at the initialization of the new page. Every time the webview will open a the new page - this initialization code will be executed. It is guaranteed that code is executed before window.onload.
Navigates webview to the given URL. URL may be a data URI.
Runs the main loop until it's terminated. After this function exits - you must destroy the webview.
Updates the title of the native window. Must be called from the UI thread.
Stops the main loop. It is safe to call this function from another other background thread.
Allows to return a value from the native binding. Original request pointer must be provided to help internal RPC engine match requests with responses. If status is zero - result is expected to be a valid JSON result value. If status is not zero - result is an error JSON object.