Skip to content

Commit

Permalink
add docs for browser and runtime values
Browse files Browse the repository at this point in the history
  • Loading branch information
neroist committed Mar 12, 2023
1 parent f30f0c9 commit d107fd8
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 59 deletions.
72 changes: 36 additions & 36 deletions docs/webui/bindings.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ <h1 class="title">webui/bindings</h1>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#Browser"
title="Browser {.bycopy.} = object
`any`*: cuint
chrome*: cuint
firefox*: cuint
edge*: cuint
safari*: cuint
chromium*: cuint
custom*: cuint">Browser</a></li>
`any`*: cuint ## 0
chrome*: cuint ## 1
firefox*: cuint ## 2
edge*: cuint ## 3
safari*: cuint ## 4
chromium*: cuint ## 5
custom*: cuint ## 99">Browser</a></li>
<li><a class="reference" href="#Cb"
title="Cb {.bycopy.} = object
win*: ptr Window
Expand Down Expand Up @@ -140,9 +140,9 @@ <h1 class="title">webui/bindings</h1>
data*: cstring">JavascriptResult</a></li>
<li><a class="reference" href="#Runtime"
title="Runtime {.bycopy.} = object
none*: cuint
deno*: cuint
nodejs*: cuint">Runtime</a></li>
none*: cuint ## 0
deno*: cuint ## 1
nodejs*: cuint ## 2">Runtime</a></li>
<li><a class="reference" href="#Script"
title="Script {.bycopy.} = object
script*: cstring
Expand Down Expand Up @@ -615,14 +615,14 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="Browser">
<dt><pre><a href="bindings.html#Browser"><span class="Identifier">Browser</span></a> {.<span class="Identifier">bycopy</span>.} <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Other">`</span><span class="Identifier">any</span><span class="Other">`</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">chrome</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">firefox</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">edge</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">safari</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">chromium</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">custom</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
</pre></dt>
<span class="Other">`</span><span class="Identifier">any</span><span class="Other">`</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 0</span>
<span class="Identifier">chrome</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 1</span>
<span class="Identifier">firefox</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 2</span>
<span class="Identifier">edge</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 3</span>
<span class="Identifier">safari</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 4</span>
<span class="Identifier">chromium</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 5</span>
<span class="Identifier">custom</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 99</span>
</pre></dt>
<dd>


Expand Down Expand Up @@ -694,10 +694,10 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
</div>
<div id="Runtime">
<dt><pre><a href="bindings.html#Runtime"><span class="Identifier">Runtime</span></a> {.<span class="Identifier">bycopy</span>.} <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">none</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">deno</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
<span class="Identifier">nodejs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
</pre></dt>
<span class="Identifier">none</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 0</span>
<span class="Identifier">deno</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 1</span>
<span class="Identifier">nodejs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 2</span>
</pre></dt>
<dd>


Expand Down Expand Up @@ -847,103 +847,103 @@ <h1><a class="toc-backref" href="#10">Consts</a></h1>
<dt><pre><a href="bindings.html#WEBUI_DEF_TIMEOUT"><span class="Identifier">WEBUI_DEF_TIMEOUT</span></a> <span class="Other">=</span> <span class="DecNumber">8</span></pre></dt>
<dd>


Default startup timeout in seconds

</dd>
</div>
<div id="WEBUI_DEFAULT_PATH">
<dt><pre><a href="bindings.html#WEBUI_DEFAULT_PATH"><span class="Identifier">WEBUI_DEFAULT_PATH</span></a> <span class="Other">=</span> <span class="StringLit">&quot;.&quot;</span></pre></dt>
<dd>


Default root path

</dd>
</div>
<div id="WEBUI_HEADER_CALL_FUNC">
<dt><pre><a href="bindings.html#WEBUI_HEADER_CALL_FUNC"><span class="Identifier">WEBUI_HEADER_CALL_FUNC</span></a> <span class="Other">=</span> <span class="DecNumber">0x000000FA</span></pre></dt>
<dd>


Call a backend function

</dd>
</div>
<div id="WEBUI_HEADER_CLICK">
<dt><pre><a href="bindings.html#WEBUI_HEADER_CLICK"><span class="Identifier">WEBUI_HEADER_CLICK</span></a> <span class="Other">=</span> <span class="DecNumber">0x000000FD</span></pre></dt>
<dd>


Click event

</dd>
</div>
<div id="WEBUI_HEADER_CLOSE">
<dt><pre><a href="bindings.html#WEBUI_HEADER_CLOSE"><span class="Identifier">WEBUI_HEADER_CLOSE</span></a> <span class="Other">=</span> <span class="DecNumber">0x000000FB</span></pre></dt>
<dd>


Close window

</dd>
</div>
<div id="WEBUI_HEADER_JS">
<dt><pre><a href="bindings.html#WEBUI_HEADER_JS"><span class="Identifier">WEBUI_HEADER_JS</span></a> <span class="Other">=</span> <span class="DecNumber">0x000000FE</span></pre></dt>
<dd>


Javascript result in frontend

</dd>
</div>
<div id="WEBUI_HEADER_SIGNATURE">
<dt><pre><a href="bindings.html#WEBUI_HEADER_SIGNATURE"><span class="Identifier">WEBUI_HEADER_SIGNATURE</span></a> <span class="Other">=</span> <span class="DecNumber">0x000000FF</span></pre></dt>
<dd>


All packets should start with this 8bit

</dd>
</div>
<div id="WEBUI_HEADER_SWITCH">
<dt><pre><a href="bindings.html#WEBUI_HEADER_SWITCH"><span class="Identifier">WEBUI_HEADER_SWITCH</span></a> <span class="Other">=</span> <span class="DecNumber">0x000000FC</span></pre></dt>
<dd>


Frontend refresh

</dd>
</div>
<div id="WEBUI_MAX_ARRAY">
<dt><pre><a href="bindings.html#WEBUI_MAX_ARRAY"><span class="Identifier">WEBUI_MAX_ARRAY</span></a> <span class="Other">=</span> <span class="DecNumber">1024</span></pre></dt>
<dd>


Max num of threads, servers, windows, pointers...

</dd>
</div>
<div id="WEBUI_MAX_BUF">
<dt><pre><a href="bindings.html#WEBUI_MAX_BUF"><span class="Identifier">WEBUI_MAX_BUF</span></a> <span class="Other">=</span> <span class="DecNumber">1024000</span></pre></dt>
<dd>


1024 Kb max dynamic memory allocation

</dd>
</div>
<div id="WEBUI_MAX_PORT">
<dt><pre><a href="bindings.html#WEBUI_MAX_PORT"><span class="Identifier">WEBUI_MAX_PORT</span></a> <span class="Other">=</span> <span class="DecNumber">65500</span></pre></dt>
<dd>


Should be less than 65535

</dd>
</div>
<div id="WEBUI_MIN_PORT">
<dt><pre><a href="bindings.html#WEBUI_MIN_PORT"><span class="Identifier">WEBUI_MIN_PORT</span></a> <span class="Other">=</span> <span class="DecNumber">10000</span></pre></dt>
<dd>


Minimum socket port

</dd>
</div>
<div id="WEBUI_VERSION">
<dt><pre><a href="bindings.html#WEBUI_VERSION"><span class="Identifier">WEBUI_VERSION</span></a> <span class="Other">=</span> <span class="StringLit">&quot;2.0.6&quot;</span></pre></dt>
<dd>


Version

</dd>
</div>
Expand Down Expand Up @@ -1577,7 +1577,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-12 19:11:06 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-12 19:35:57 UTC</small>
</div>
</div>
</div>
Expand Down
46 changes: 23 additions & 23 deletions webui/bindings.nim
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@ else:
{.deadCodeElim: on.}

const
WEBUI_VERSION* = "2.0.6"
WEBUI_HEADER_SIGNATURE* = 0xFF
WEBUI_HEADER_JS* = 0xFE
WEBUI_HEADER_CLICK* = 0xFD
WEBUI_HEADER_SWITCH* = 0xFC
WEBUI_HEADER_CLOSE* = 0xFB
WEBUI_HEADER_CALL_FUNC* = 0xFA
WEBUI_MAX_ARRAY* = (1024)
WEBUI_MIN_PORT* = (10000)
WEBUI_MAX_PORT* = (65500)
WEBUI_MAX_BUF* = (1024000)
WEBUI_DEFAULT_PATH* = "."
WEBUI_DEF_TIMEOUT* = (8)
WEBUI_VERSION* = "2.0.6" ## Version
WEBUI_HEADER_SIGNATURE* = 0xFF ## All packets should start with this 8bit
WEBUI_HEADER_JS* = 0xFE ## Javascript result in frontend
WEBUI_HEADER_CLICK* = 0xFD ## Click event
WEBUI_HEADER_SWITCH* = 0xFC ## Frontend refresh
WEBUI_HEADER_CLOSE* = 0xFB ## Close window
WEBUI_HEADER_CALL_FUNC* = 0xFA ## Call a backend function
WEBUI_MAX_ARRAY* = (1024) ## Max num of threads, servers, windows, pointers...
WEBUI_MIN_PORT* = (10000) ## Minimum socket port
WEBUI_MAX_PORT* = (65500) ## Should be less than 65535
WEBUI_MAX_BUF* = (1024000) ## 1024 Kb max dynamic memory allocation
WEBUI_DEFAULT_PATH* = "." ## Default root path
WEBUI_DEF_TIMEOUT* = (8) ## Default startup timeout in seconds

# -- Types -------------------------

Expand Down Expand Up @@ -163,18 +163,18 @@ type
autoLink*: bool

Browser* {.bycopy.} = object
`any`*: cuint
chrome*: cuint
firefox*: cuint
edge*: cuint
safari*: cuint
chromium*: cuint
custom*: cuint
`any`*: cuint ## 0
chrome*: cuint ## 1
firefox*: cuint ## 2
edge*: cuint ## 3
safari*: cuint ## 4
chromium*: cuint ## 5
custom*: cuint ## 99

Runtime* {.bycopy.} = object
none*: cuint
deno*: cuint
nodejs*: cuint
none*: cuint ## 0
deno*: cuint ## 1
nodejs*: cuint ## 2

Webui* {.bycopy.} = object
servers*: cuint
Expand Down

0 comments on commit d107fd8

Please sign in to comment.