-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
56 lines (56 loc) · 37.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.UI.Webviewhs</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Graphics-UI-Webviewhs.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics.UI.Webviewhs.html">Source</a></li><li><a href="iindex.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">webviewhs-0.1.0.0: Create native dialogs and windows that run web pages.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(C) 2018 David Lettier</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>David Lettier</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Graphics.UI.Webviewhs</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p><img src="https://i.imgur.com/2yAJALE.png" title="webviewhs logo" /></p><p>webviewhs is a Haskell binding to the <a href="https://github.com/zserge/webview">webview</a> library created by
<a href="https://github.com/zserge">Serge Zaitsev</a>.</p><p>According to webview:</p><pre>[webview is] a tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.
It uses Cocoa/WebKit on macOS, gtk-webkit2 on Linux and MSHTML (IE10/11) on Windows.</pre><p>For more information, see the webview
<a href="https://github.com/zserge/webview/blob/d007fc53b107f6043c2a6a3372548dbf59dfe876/README.md">README</a>.</p><p>Be sure to explore the provided <a href="https://github.com/lettier/webviewhs/tree/master/examples#readme">examples</a>.</p><p>To exclude clay, jmacro, and text-format-heavy, use the cabal build flag <code>light</code>.
Be sure to explore the provided <a href="https://github.com/lettier/webviewhs/tree/master/examples-light#readme">light examples</a>
for more information.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:WindowParams">WindowParams</a> = <a href="#v:WindowParams">WindowParams</a> {<ul class="subs"><li><a href="#v:windowParamsTitle">windowParamsTitle</a> :: <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></li><li><a href="#v:windowParamsUri">windowParamsUri</a> :: <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></li><li><a href="#v:windowParamsWidth">windowParamsWidth</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:windowParamsHeight">windowParamsHeight</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:windowParamsResizable">windowParamsResizable</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:windowParamsDebuggable">windowParamsDebuggable</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:WindowBackgroundColor">WindowBackgroundColor</a> = <a href="#v:WindowBackgroundColor">WindowBackgroundColor</a> {<ul class="subs"><li><a href="#v:windowBackgroundColorRed">windowBackgroundColorRed</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></li><li><a href="#v:windowBackgroundColorGreen">windowBackgroundColorGreen</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></li><li><a href="#v:windowBackgroundColorBlue">windowBackgroundColorBlue</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></li><li><a href="#v:windowBackgroundColorAlpha">windowBackgroundColorAlpha</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:WindowAlertDialogType">WindowAlertDialogType</a><ul class="subs"><li>= <a href="#v:WindowAlertDialogTypeInfo">WindowAlertDialogTypeInfo</a></li><li>| <a href="#v:WindowAlertDialogTypeWarning">WindowAlertDialogTypeWarning</a></li><li>| <a href="#v:WindowAlertDialogTypeError">WindowAlertDialogTypeError</a></li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:Window">Window</a> = <a href="../base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:WithWindowLoopSetUp">WithWindowLoopSetUp</a> a = <a href="#v:WithWindowLoopSetUp">WithWindowLoopSetUp</a> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:WithWindowLoopTearDown">WithWindowLoopTearDown</a> a = <a href="#v:WithWindowLoopTearDown">WithWindowLoopTearDown</a> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</li><li class="src short"><a href="#v:createWindowAndBlock">createWindowAndBlock</a> :: <a href="Graphics-UI-Webviewhs.html#t:WindowParams">WindowParams</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:createWindow">createWindow</a> :: <a href="Graphics-UI-Webviewhs.html#t:WindowParams">WindowParams</a> -> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a))</li><li class="src short"><a href="#v:setWindowTitle">setWindowTitle</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setWindowFullscreen">setWindowFullscreen</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setWindowBackgroundColor">setWindowBackgroundColor</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="Graphics-UI-Webviewhs.html#t:WindowBackgroundColor">WindowBackgroundColor</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withWindowLoop">withWindowLoop</a> :: <a href="Graphics-UI-Webviewhs.html#t:WindowParams">WindowParams</a> -> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="Graphics-UI-Webviewhs.html#t:WithWindowLoopSetUp">WithWindowLoopSetUp</a> a -> <a href="Graphics-UI-Webviewhs.html#t:WithWindowLoopTearDown">WithWindowLoopTearDown</a> a -> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:iterateWindowLoop">iterateWindowLoop</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:runJavaScript-39-">runJavaScript'</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:runJavaScript">runJavaScript</a> :: (<a href="../jmacro-0.6.14/Language-Javascript-JMacro.html#t:JsToDoc">JsToDoc</a> js, <a href="../jmacro-0.6.14/Language-Javascript-JMacro.html#t:JMacro">JMacro</a> js) => <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> js -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:injectCss">injectCss</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../clay-0.12.2/Clay-Stylesheet.html#t:Css">Css</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:log">log</a> :: <a href="../text-format-heavy-0.1.5.1/Data-Text-Format-Heavy-Types.html#t:VarContainer">VarContainer</a> vars => <a href="../text-format-heavy-0.1.5.1/Data-Text-Format-Heavy-Types.html#t:Format">Format</a> -> vars -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:injectCss-39-">injectCss'</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:openWindowAlertDialog">openWindowAlertDialog</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="Graphics-UI-Webviewhs.html#t:WindowAlertDialogType">WindowAlertDialogType</a> -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withWindowOpenDialog">withWindowOpenDialog</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> (<a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withWindowSaveDialog">withWindowSaveDialog</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> (<a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:dispatchToMain">dispatchToMain</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:log-39-">log'</a> :: <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:terminateWindowLoop">terminateWindowLoop</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:destroyWindow">destroyWindow</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:WindowParams" class="def">WindowParams</a> <a href="src/Graphics.UI.Webviewhs.html#WindowParams" class="link">Source</a> <a href="#t:WindowParams" class="selflink">#</a></p><div class="doc"><p>Specifies the window creation parameters.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:WindowParams" class="def">WindowParams</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:windowParamsTitle" class="def">windowParamsTitle</a> :: <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:windowParamsUri" class="def">windowParamsUri</a> :: <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></dfn><div class="doc"><p>This can be file://, http://, https://, data:text/html, etc.</p></div></li><li><dfn class="src"><a id="v:windowParamsWidth" class="def">windowParamsWidth</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:windowParamsHeight" class="def">windowParamsHeight</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:windowParamsResizable" class="def">windowParamsResizable</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:windowParamsDebuggable" class="def">windowParamsDebuggable</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>This enables the right click context menu with reload and
Web Inspector options for GTK WebKit and Cocoa WebKit.
When using WebKit, it also enables JavaScript `console.log`
and similar methods the ability to write to stdout.
It has no affect on Windows.
According to webview, "on Windows there is no easy to way to enable
debugging, but you may include Firebug in your HTML code."</p></div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:WindowBackgroundColor" class="def">WindowBackgroundColor</a> <a href="src/Graphics.UI.Webviewhs.html#WindowBackgroundColor" class="link">Source</a> <a href="#t:WindowBackgroundColor" class="selflink">#</a></p><div class="doc"><p>Specifies the RGBA for the window background color.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:WindowBackgroundColor" class="def">WindowBackgroundColor</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:windowBackgroundColorRed" class="def">windowBackgroundColorRed</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:windowBackgroundColorGreen" class="def">windowBackgroundColorGreen</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:windowBackgroundColorBlue" class="def">windowBackgroundColorBlue</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:windowBackgroundColorAlpha" class="def">windowBackgroundColorAlpha</a> :: <a href="../base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:WindowAlertDialogType" class="def">WindowAlertDialogType</a> <a href="src/Graphics.UI.Webviewhs.html#WindowAlertDialogType" class="link">Source</a> <a href="#t:WindowAlertDialogType" class="selflink">#</a></p><div class="doc"><p>Specifies the window alert dialog type.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:WindowAlertDialogTypeInfo" class="def">WindowAlertDialogTypeInfo</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:WindowAlertDialogTypeWarning" class="def">WindowAlertDialogTypeWarning</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:WindowAlertDialogTypeError" class="def">WindowAlertDialogTypeError</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Window" class="def">Window</a> = <a href="../base-4.9.1.0/Foreign-Ptr.html#t:Ptr">Ptr</a> <a href="src/Graphics.UI.Webviewhs.html#Window" class="link">Source</a> <a href="#t:Window" class="selflink">#</a></p><div class="doc"><p>Pointer to a webview struct.</p></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:WithWindowLoopSetUp" class="def">WithWindowLoopSetUp</a> a <a href="src/Graphics.UI.Webviewhs.html#WithWindowLoopSetUp" class="link">Source</a> <a href="#t:WithWindowLoopSetUp" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:WithWindowLoopSetUp" class="def">WithWindowLoopSetUp</a> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:WithWindowLoopTearDown" class="def">WithWindowLoopTearDown</a> a <a href="src/Graphics.UI.Webviewhs.html#WithWindowLoopTearDown" class="link">Source</a> <a href="#t:WithWindowLoopTearDown" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:WithWindowLoopTearDown" class="def">WithWindowLoopTearDown</a> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a id="v:createWindowAndBlock" class="def">createWindowAndBlock</a> :: <a href="Graphics-UI-Webviewhs.html#t:WindowParams">WindowParams</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#createWindowAndBlock" class="link">Source</a> <a href="#v:createWindowAndBlock" class="selflink">#</a></p><div class="doc"><p>Creates a window and runs the main loop unless the window is destroyed.
Useful for loading a web page and not having to manage the loop.</p></div></div><div class="top"><p class="src"><a id="v:createWindow" class="def">createWindow</a> <a href="src/Graphics.UI.Webviewhs.html#createWindow" class="link">Source</a> <a href="#v:createWindow" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:WindowParams">WindowParams</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>A callback that JavaScript can use to
communicate with the Haskell side.</p></td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a))</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Creates a window giving you the chance to changes its properties, run its loop, etc.
Returns <code><a href="../base-4.9.1.0/Data-Either.html#v:Left">Left</a></code> on failure and <code><a href="../base-4.9.1.0/Data-Either.html#v:Right">Right</a></code> <code><a href="Graphics-UI-Webviewhs.html#t:Window">Window</a></code> on success.</p></div></div><div class="top"><p class="src"><a id="v:setWindowTitle" class="def">setWindowTitle</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#setWindowTitle" class="link">Source</a> <a href="#v:setWindowTitle" class="selflink">#</a></p><div class="doc"><p>Changes the window title.</p></div></div><div class="top"><p class="src"><a id="v:setWindowFullscreen" class="def">setWindowFullscreen</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#setWindowFullscreen" class="link">Source</a> <a href="#v:setWindowFullscreen" class="selflink">#</a></p><div class="doc"><p>Sets the window's fullscreen state.
Pass <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> to put the window into fullscreen mode.
Pass <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> to take the window out of fullscreen mode.</p></div></div><div class="top"><p class="src"><a id="v:setWindowBackgroundColor" class="def">setWindowBackgroundColor</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="Graphics-UI-Webviewhs.html#t:WindowBackgroundColor">WindowBackgroundColor</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#setWindowBackgroundColor" class="link">Source</a> <a href="#v:setWindowBackgroundColor" class="selflink">#</a></p><div class="doc"><p>If the loaded web page does not specify a background color,
this sets the window's background color.</p></div></div><div class="top"><p class="src"><a id="v:withWindowLoop" class="def">withWindowLoop</a> <a href="src/Graphics.UI.Webviewhs.html#withWindowLoop" class="link">Source</a> <a href="#v:withWindowLoop" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:WindowParams">WindowParams</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>A callback function that can be invoked from the JavaScript side.
The callback must accept a <code><a href="Graphics-UI-Webviewhs.html#t:Window">Window</a></code> and the JavaScript sent <code><a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></code>.
The JavaScript sent <code><a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></code> could be unstructured or structured like JSON.</p></td></tr><tr><td class="src">-> <a href="Graphics-UI-Webviewhs.html#t:WithWindowLoopSetUp">WithWindowLoopSetUp</a> a</td><td class="doc"><p>A function that is called before iterating.
It must accept a <code><a href="Graphics-UI-Webviewhs.html#t:Window">Window</a></code> and return <code><a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a></code> ().
Use it to set up before entering the main loop.
You can pass <code><a href="../base-4.9.1.0/Data-Functor.html#v:void">void</a></code> <code><a href="../base-4.9.1.0/Data-Function.html#v:.">.</a></code> <code><a href="../base-4.9.1.0/Control-Monad.html#v:return">return</a></code> <code><a href="../base-4.9.1.0/Data-Function.html#v:.">.</a></code> <code><a href="../base-4.9.1.0/Data-Function.html#v:const">const</a></code> if you
don't have a setup function.</p></td></tr><tr><td class="src">-> <a href="Graphics-UI-Webviewhs.html#t:WithWindowLoopTearDown">WithWindowLoopTearDown</a> a</td><td class="doc"><p>A function that is called after iterating.
It must accept a <code><a href="Graphics-UI-Webviewhs.html#t:Window">Window</a></code> and return <code><a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a></code> ().
Use it to tear down after leaving the main loop.
You can pass <code><a href="../base-4.9.1.0/Data-Functor.html#v:void">void</a></code> <code><a href="../base-4.9.1.0/Data-Function.html#v:.">.</a></code> <code><a href="../base-4.9.1.0/Control-Monad.html#v:return">return</a></code> <code><a href="../base-4.9.1.0/Data-Function.html#v:.">.</a></code> <code><a href="../base-4.9.1.0/Data-Function.html#v:const">const</a></code> if you
don't have a teardown function.
Note, do not terminate the window loop and/or
destroy the window as this is done for you.</p></td></tr><tr><td class="src">-> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)</td><td class="doc"><p>A function that is called each iteration.
Return <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> to continue or <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> to stop iterating.</p></td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Manages the window and main loop for you.
It accepts a JavaScript callback, setup, teardown, and iteration function.</p></div></div><div class="top"><p class="src"><a id="v:iterateWindowLoop" class="def">iterateWindowLoop</a> <a href="src/Graphics.UI.Webviewhs.html#iterateWindowLoop" class="link">Source</a> <a href="#v:iterateWindowLoop" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Pass <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> to iterate until the window exits.
Pass <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> to run one iteration.</p></td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Iterates the window loop.
If <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code>, runs the window loop continuously—blocking until the window exits.
If <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code>, runs one iteration of the window loop
and releases control back to the caller.</p></div></div><div class="top"><p class="src"><a id="v:runJavaScript-39-" class="def">runJavaScript'</a> <a href="src/Graphics.UI.Webviewhs.html#runJavaScript%27" class="link">Source</a> <a href="#v:runJavaScript-39-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Returns <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> on success and <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> on failure.</p></td></tr></table></div><div class="doc"><p>Runs the given JavaScript inside the window.
The given JavaScript is not checked for validity.</p></div></div><div class="top"><p class="src"><a id="v:runJavaScript" class="def">runJavaScript</a> <a href="src/Graphics.UI.Webviewhs.html#runJavaScript" class="link">Source</a> <a href="#v:runJavaScript" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="../jmacro-0.6.14/Language-Javascript-JMacro.html#t:JsToDoc">JsToDoc</a> js, <a href="../jmacro-0.6.14/Language-Javascript-JMacro.html#t:JMacro">JMacro</a> js)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> js</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Returns <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> on success and <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> on failure.</p></td></tr></table></div><div class="doc"><p>Runs the given JavaScript inside the window.
Uses <a href="https://hackage.haskell.org/package/jmacro">Language.Javascript.JMacro</a>.
Note, this function is not available when using the <code>light</code> cabal build flag.</p></div></div><div class="top"><p class="src"><a id="v:injectCss" class="def">injectCss</a> <a href="src/Graphics.UI.Webviewhs.html#injectCss" class="link">Source</a> <a href="#v:injectCss" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../clay-0.12.2/Clay-Stylesheet.html#t:Css">Css</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Returns <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> on success and <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> on failure.</p></td></tr></table></div><div class="doc"><p>Injects CSS into the window.
Uses <a href="https://hackage.haskell.org/package/clay">Clay</a>.
Note, this function is not available when using the <code>light</code> cabal build flag.</p></div></div><div class="top"><p class="src"><a id="v:log" class="def">log</a> :: <a href="../text-format-heavy-0.1.5.1/Data-Text-Format-Heavy-Types.html#t:VarContainer">VarContainer</a> vars => <a href="../text-format-heavy-0.1.5.1/Data-Text-Format-Heavy-Types.html#t:Format">Format</a> -> vars -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#log" class="link">Source</a> <a href="#v:log" class="selflink">#</a></p><div class="doc"><p>Logs the given formatted input to stderr, macOS console,
or Windows DebugView depending on the build platform.
Uses <a href="https://hackage.haskell.org/package/text-format-heavy">Data.Text.Format.Heavy</a>.
Note, this function is not available when using the <code>light</code> cabal build flag.</p></div></div><div class="top"><p class="src"><a id="v:injectCss-39-" class="def">injectCss'</a> <a href="src/Graphics.UI.Webviewhs.html#injectCss%27" class="link">Source</a> <a href="#v:injectCss-39-" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Returns <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> on success and <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> on failure.</p></td></tr></table></div><div class="doc"><p>Injects CSS into the window.
The given CSS is not checked for validity.</p></div></div><div class="top"><p class="src"><a id="v:openWindowAlertDialog" class="def">openWindowAlertDialog</a> <a href="src/Graphics.UI.Webviewhs.html#openWindowAlertDialog" class="link">Source</a> <a href="#v:openWindowAlertDialog" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="Graphics-UI-Webviewhs.html#t:WindowAlertDialogType">WindowAlertDialogType</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></td><td class="doc"><p>This is the primary message.</p></td></tr><tr><td class="src">-> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></td><td class="doc"><p>This is the secondary message.</p></td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Opens a window alert dialog.</p></div></div><div class="top"><p class="src"><a id="v:withWindowOpenDialog" class="def">withWindowOpenDialog</a> <a href="src/Graphics.UI.Webviewhs.html#withWindowOpenDialog" class="link">Source</a> <a href="#v:withWindowOpenDialog" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></td><td class="doc"><p>The open dialog window title.</p></td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Pass <code><a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a></code> to disable selecting files.
Pass <code><a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a></code> to allow selecting both files and directories.</p></td></tr><tr><td class="src">-> (<a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>A callback that accepts the result of the dialog.</p></td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Opens a native file chooser dialog.
Accepts a callback that receives the selection.</p></div></div><div class="top"><p class="src"><a id="v:withWindowSaveDialog" class="def">withWindowSaveDialog</a> <a href="src/Graphics.UI.Webviewhs.html#withWindowSaveDialog" class="link">Source</a> <a href="#v:withWindowSaveDialog" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a></td><td class="doc"><p>The save dialog window title.</p></td></tr><tr><td class="src">-> (<a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>A callback that accepts the result of the dialog.</p></td></tr><tr><td class="src">-> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Opens a native file saving dialog.
Accepts a callback that receives the selection.
Does not actually save the file.
Save the file inside the provided callback.</p></div></div><div class="top"><p class="src"><a id="v:dispatchToMain" class="def">dispatchToMain</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> (<a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#dispatchToMain" class="link">Source</a> <a href="#v:dispatchToMain" class="selflink">#</a></p><div class="doc"><p>Runs the given function in the main window UI thread.
Use this function whenever you wish to interact with the
window but you're not running in the main window UI thread.</p></div></div><div class="top"><p class="src"><a id="v:log-39-" class="def">log'</a> :: <a href="../text-1.2.2.2/Data-Text.html#t:Text">Text</a> -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#log%27" class="link">Source</a> <a href="#v:log-39-" class="selflink">#</a></p><div class="doc"><p>Logs the given input to stderr, macOS console,
or Windows DebugView depending on the build platform.</p></div></div><div class="top"><p class="src"><a id="v:terminateWindowLoop" class="def">terminateWindowLoop</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#terminateWindowLoop" class="link">Source</a> <a href="#v:terminateWindowLoop" class="selflink">#</a></p><div class="doc"><p>Terminates the window's loop.</p></div></div><div class="top"><p class="src"><a id="v:destroyWindow" class="def">destroyWindow</a> :: <a href="Graphics-UI-Webviewhs.html#t:Window">Window</a> a -> <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Graphics.UI.Webviewhs.html#destroyWindow" class="link">Source</a> <a href="#v:destroyWindow" class="selflink">#</a></p><div class="doc"><p>Destroys the window.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>