Skip to content

Commit d107fd8

Browse files
committed
add docs for browser and runtime values
1 parent f30f0c9 commit d107fd8

File tree

2 files changed

+59
-59
lines changed

2 files changed

+59
-59
lines changed

docs/webui/bindings.html

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ <h1 class="title">webui/bindings</h1>
103103
<ul class="simple simple-toc-section">
104104
<li><a class="reference" href="#Browser"
105105
title="Browser {.bycopy.} = object
106-
`any`*: cuint
107-
chrome*: cuint
108-
firefox*: cuint
109-
edge*: cuint
110-
safari*: cuint
111-
chromium*: cuint
112-
custom*: cuint">Browser</a></li>
106+
`any`*: cuint ## 0
107+
chrome*: cuint ## 1
108+
firefox*: cuint ## 2
109+
edge*: cuint ## 3
110+
safari*: cuint ## 4
111+
chromium*: cuint ## 5
112+
custom*: cuint ## 99">Browser</a></li>
113113
<li><a class="reference" href="#Cb"
114114
title="Cb {.bycopy.} = object
115115
win*: ptr Window
@@ -140,9 +140,9 @@ <h1 class="title">webui/bindings</h1>
140140
data*: cstring">JavascriptResult</a></li>
141141
<li><a class="reference" href="#Runtime"
142142
title="Runtime {.bycopy.} = object
143-
none*: cuint
144-
deno*: cuint
145-
nodejs*: cuint">Runtime</a></li>
143+
none*: cuint ## 0
144+
deno*: cuint ## 1
145+
nodejs*: cuint ## 2">Runtime</a></li>
146146
<li><a class="reference" href="#Script"
147147
title="Script {.bycopy.} = object
148148
script*: cstring
@@ -615,14 +615,14 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
615615
<dl class="item">
616616
<div id="Browser">
617617
<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>
618-
<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>
619-
<span class="Identifier">chrome</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
620-
<span class="Identifier">firefox</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
621-
<span class="Identifier">edge</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
622-
<span class="Identifier">safari</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
623-
<span class="Identifier">chromium</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
624-
<span class="Identifier">custom</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
625-
</pre></dt>
618+
<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>
619+
<span class="Identifier">chrome</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 1</span>
620+
<span class="Identifier">firefox</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 2</span>
621+
<span class="Identifier">edge</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 3</span>
622+
<span class="Identifier">safari</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 4</span>
623+
<span class="Identifier">chromium</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 5</span>
624+
<span class="Identifier">custom</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 99</span>
625+
</pre></dt>
626626
<dd>
627627

628628

@@ -694,10 +694,10 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
694694
</div>
695695
<div id="Runtime">
696696
<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>
697-
<span class="Identifier">none</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
698-
<span class="Identifier">deno</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
699-
<span class="Identifier">nodejs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span>
700-
</pre></dt>
697+
<span class="Identifier">none</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 0</span>
698+
<span class="Identifier">deno</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 1</span>
699+
<span class="Identifier">nodejs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">cuint</span> <span class="Comment">## 2</span>
700+
</pre></dt>
701701
<dd>
702702

703703

@@ -847,103 +847,103 @@ <h1><a class="toc-backref" href="#10">Consts</a></h1>
847847
<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>
848848
<dd>
849849

850-
850+
Default startup timeout in seconds
851851

852852
</dd>
853853
</div>
854854
<div id="WEBUI_DEFAULT_PATH">
855855
<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>
856856
<dd>
857857

858-
858+
Default root path
859859

860860
</dd>
861861
</div>
862862
<div id="WEBUI_HEADER_CALL_FUNC">
863863
<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>
864864
<dd>
865865

866-
866+
Call a backend function
867867

868868
</dd>
869869
</div>
870870
<div id="WEBUI_HEADER_CLICK">
871871
<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>
872872
<dd>
873873

874-
874+
Click event
875875

876876
</dd>
877877
</div>
878878
<div id="WEBUI_HEADER_CLOSE">
879879
<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>
880880
<dd>
881881

882-
882+
Close window
883883

884884
</dd>
885885
</div>
886886
<div id="WEBUI_HEADER_JS">
887887
<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>
888888
<dd>
889889

890-
890+
Javascript result in frontend
891891

892892
</dd>
893893
</div>
894894
<div id="WEBUI_HEADER_SIGNATURE">
895895
<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>
896896
<dd>
897897

898-
898+
All packets should start with this 8bit
899899

900900
</dd>
901901
</div>
902902
<div id="WEBUI_HEADER_SWITCH">
903903
<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>
904904
<dd>
905905

906-
906+
Frontend refresh
907907

908908
</dd>
909909
</div>
910910
<div id="WEBUI_MAX_ARRAY">
911911
<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>
912912
<dd>
913913

914-
914+
Max num of threads, servers, windows, pointers...
915915

916916
</dd>
917917
</div>
918918
<div id="WEBUI_MAX_BUF">
919919
<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>
920920
<dd>
921921

922-
922+
1024 Kb max dynamic memory allocation
923923

924924
</dd>
925925
</div>
926926
<div id="WEBUI_MAX_PORT">
927927
<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>
928928
<dd>
929929

930-
930+
Should be less than 65535
931931

932932
</dd>
933933
</div>
934934
<div id="WEBUI_MIN_PORT">
935935
<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>
936936
<dd>
937937

938-
938+
Minimum socket port
939939

940940
</dd>
941941
</div>
942942
<div id="WEBUI_VERSION">
943943
<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>
944944
<dd>
945945

946-
946+
Version
947947

948948
</dd>
949949
</div>
@@ -1577,7 +1577,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
15771577
<div class="twelve-columns footer">
15781578
<span class="nim-sprite"></span>
15791579
<br/>
1580-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-12 19:11:06 UTC</small>
1580+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-12 19:35:57 UTC</small>
15811581
</div>
15821582
</div>
15831583
</div>

webui/bindings.nim

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ else:
7979
{.deadCodeElim: on.}
8080

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

9696
# -- Types -------------------------
9797

@@ -163,18 +163,18 @@ type
163163
autoLink*: bool
164164

165165
Browser* {.bycopy.} = object
166-
`any`*: cuint
167-
chrome*: cuint
168-
firefox*: cuint
169-
edge*: cuint
170-
safari*: cuint
171-
chromium*: cuint
172-
custom*: cuint
166+
`any`*: cuint ## 0
167+
chrome*: cuint ## 1
168+
firefox*: cuint ## 2
169+
edge*: cuint ## 3
170+
safari*: cuint ## 4
171+
chromium*: cuint ## 5
172+
custom*: cuint ## 99
173173

174174
Runtime* {.bycopy.} = object
175-
none*: cuint
176-
deno*: cuint
177-
nodejs*: cuint
175+
none*: cuint ## 0
176+
deno*: cuint ## 1
177+
nodejs*: cuint ## 2
178178

179179
Webui* {.bycopy.} = object
180180
servers*: cuint

0 commit comments

Comments
 (0)