chez-libs

Update of "(system webview)"
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: c1a81de04ac7916c862465e562d5072dcf7d6f58
Page Name:(system webview)
Date: 2018-02-03 00:16:13
Original User: murphy
Parent: 266678234318a3adeb129c572c6deb3967b7e7ba (diff)
Next b054d2ebd29d0c16f61d9e6d720ab6301303e7fa
Content

Webview Bindings

(import (system webview))

Bindings to a modified version of the webview library.

Main Interface

procedure: (webview title url on-external-invoke option ...)

Launch a webview with the given title, URL, external invocation callback and possibly additional configuration options.

The external invocation callback receives two arguments: The webview and a string. The string argument is provided by JavaScript on the page using a call to window.external.invoke.

Both the URL and callback procedure may be #f. If no URL is passed, an empty default page is used that calls window.external.invoke("load") once when loaded. If no callback procedure is passed, window.external.invoke is available but does nothing.

The list of additional configuration options may contain the following keys:

procedure: (webview-terminate! webview)

Ask the given webview to quit.

procedure: (webview-title-set! webview title)

Change the title of the given webview.

procedure: (webview-fullscreen-set! webview fullscreen?)

Change the fullscreen state of the given webview.

procedure: (webview-color-set! webview red green blue alpha)

Change the background color of the given webview.

procedure: (webview-eval webview code)

Evaluate JavaScript code in the given webview.

Dialog Interface

syntax: (dialog-type-flag symbol)

syntax: (dialog-type symbol ...)

The dialog flags enumeration is used to indicate the type of dialog presented by webview-dialog:

procedure: (webview-dialog webview type title value)

procedure: (webview-dialog webview type title)

Present a dialog as a modal child of the given webview. Returns the data selected in the dialog or #f.

Miscellaneous

procedure: (logf fmt arg ...)

Log a formatted message to some system-specific channel.