WebviewNative

public class WebviewNative

A Native binding to webview for Kotlin/Native

Functions

Link copied to clipboard
public final Integer getWEBVIEW_HINT_FIXED()

Window size can not be changed by a user

Link copied to clipboard
public final Integer getWEBVIEW_HINT_MAX()

Width and height are maximum bounds

Link copied to clipboard
public final Integer getWEBVIEW_HINT_MIN()

Width and height are minimum bounds

Link copied to clipboard
public final Integer getWEBVIEW_HINT_NONE()

Width and height are default size

Link copied to clipboard
public final Unit webview_bind(    CPointer<? extends CPointed> w,     String name,     CPointer<CFunction<Function3<CPointer<ByteVarOf<Byte>>, CPointer<ByteVarOf<Byte>>, CPointer<? extends CPointed>, Unit>>> callback,     CValuesRef<?> arg)

Binds a native Kotlin/Java callback so that it will appear under the given name as a global JavaScript function.

Link copied to clipboard
public final CPointer<? extends CPointed> webview_create(Integer debug, CPointer<? extends CPointed> window)

Creates a new webview instance.

Link copied to clipboard
public final Unit webview_destroy(CPointer<? extends CPointed> w)
Link copied to clipboard
public final Unit webview_dispatch(    CPointer<? extends CPointed> w,     CPointer<CFunction<Function2<CPointer<? extends CPointed>, CPointer<? extends CPointed>, Unit>>> fn,     CValuesRef<?> args)

Posts a function to be executed on the main thread.

Link copied to clipboard
public final Unit webview_eval(CPointer<? extends CPointed> w, String js)

Evaluates arbitrary JavaScript code.

Link copied to clipboard
public final CPointer<? extends CPointed> webview_get_window(CPointer<? extends CPointed> w)

Returns a native window handle pointer.

Link copied to clipboard
public final Unit webview_init(CPointer<? extends CPointed> w, String js)

Injects JavaScript code at the initialization of the new page.

Link copied to clipboard
public final Unit webview_navigate(CPointer<? extends CPointed> w, String url)

Navigates webview to the given URL

Link copied to clipboard
public final Unit webview_return(    CPointer<? extends CPointed> w,     String seq,     Integer status,     String result)

Allows to return a value from the Kotlin/Java binding.

Link copied to clipboard
public final Unit webview_run(CPointer<? extends CPointed> w)

Runs the main loop until it's terminated.

Link copied to clipboard
public final Unit webview_set_html(CPointer<? extends CPointed> w, String html)

Set webview HTML directly.

Link copied to clipboard
public final Unit webview_set_size(    CPointer<? extends CPointed> w,     Integer width,     Integer height,     Integer hints)

Updates the size of the native window.

Link copied to clipboard
public final Unit webview_set_title(CPointer<? extends CPointed> w, String title)

Updates the title of the native window.

Link copied to clipboard
public final Unit webview_terminate(CPointer<? extends CPointed> w)

Stops the main loop.

Link copied to clipboard
public final Unit webview_unbind(CPointer<? extends CPointed> w, String name)

Removes a Kotlin/Java callback that was previously set by webview_bind.

Properties

Link copied to clipboard
public final static WebviewNative INSTANCE
Link copied to clipboard
private final Integer WEBVIEW_HINT_FIXED

Window size can not be changed by a user

Link copied to clipboard
private final Integer WEBVIEW_HINT_MAX

Width and height are maximum bounds

Link copied to clipboard
private final Integer WEBVIEW_HINT_MIN

Width and height are minimum bounds

Link copied to clipboard
private final Integer WEBVIEW_HINT_NONE

Width and height are default size