diff --git a/.gitignore b/.gitignore
index ba8fb4fd..26ffeb43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,6 @@ webui2.egg-info/
# Rust
target/
*.lock
+
+# Broken NTFS
+nul
diff --git a/README.md b/README.md
index 05f9f429..54087868 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Use any web browser as GUI, with your preferred language in the backend, and HTM
- Lightweight and small memory footprint
- Fast binary communication (*App--WebUI--Browser*)
- One header file
-- Multiplatform & Multi Browser
+- Multi-platform & Multi-Browser
- Use private browser profile for safety
- Customized app mode look & feel
diff --git a/clean_all.bat b/clean_all.bat
new file mode 100644
index 00000000..e1ca3ce5
--- /dev/null
+++ b/clean_all.bat
@@ -0,0 +1,48 @@
+@echo off
+
+Set CurrentPath=%CD%
+
+echo.
+echo Clean all...
+
+cd build\Windows\MSVC
+nmake clean
+cd "%CurrentPath%"
+
+cd build\Windows\GCC
+mingw32-make clean
+cd "%CurrentPath%"
+
+cd build\Windows\TCC
+mingw32-make clean
+cd "%CurrentPath%"
+
+cd examples\C\hello_world\Windows\MSVC
+nmake clean
+cd "%CurrentPath%"
+
+cd examples\C\hello_world\Windows\GCC
+mingw32-make clean
+cd "%CurrentPath%"
+
+cd examples\C\hello_world\Windows\TCC
+mingw32-make clean
+cd "%CurrentPath%"
+
+cd examples\C++\hello_world\Windows\MSVC
+nmake clean
+cd "%CurrentPath%"
+
+cd examples\C++\hello_world\Windows\GCC
+mingw32-make clean
+cd "%CurrentPath%"
+
+cd examples\Go\hello_world\
+go clean -modcache
+go clean --cache
+go clean
+cd "%CurrentPath%"
+
+cd examples\Rust\hello_world
+cargo clean
+cd "%CurrentPath%"
diff --git a/examples/C++/hello_world/Linux/Clang/Makefile b/examples/C++/hello_world/Linux/Clang/Makefile
new file mode 100644
index 00000000..b7343708
--- /dev/null
+++ b/examples/C++/hello_world/Linux/Clang/Makefile
@@ -0,0 +1,42 @@
+# WebUI Library 2.x
+# C++ Example
+# Linux - Clang
+
+LIB=../../../../../build/Linux/Clang
+INCLUDE=../../../../../include
+SOURCE=../..
+
+all: release
+
+debug:
+# Build Lib
+ @cd "$(LIB)" && $(MAKE) debug
+# Static with Debug info
+ @echo "Build C++ Example (Static Debug)..."
+ @clang -g -static -m64 -o main "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" -lwebui-2-static-x64 -lpthread
+# Dynamic with Debug info
+ @echo "Build C++ Example (Dynamic Debug)..."
+ @clang -g -m64 -o main-dyn "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" "$(LIB)/webui-2-x64.so" -lpthread
+# Clean
+ @- rm -f *.o
+ @echo "Done."
+
+release:
+# Build Lib
+ @cd "$(LIB)" && $(MAKE)
+# Static Release
+ @echo "Build C++ Example (Static Release)..."
+ @clang -static -Os -m64 -o main "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" -lwebui-2-static-x64 -lpthread
+ @llvm-strip --strip-all main
+# Dynamic Release
+ @echo "Build C++ Example (Dynamic Release)..."
+ @clang -m64 -o main-dyn "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" "$(LIB)/webui-2-x64.so" -lpthread
+ @llvm-strip --strip-all main-dyn
+# Clean
+ @- rm -f *.o
+ @echo "Done."
+
+clean:
+ - rm -f *.o
+ - rm -f *.so
+ - rm -f *.a
diff --git a/examples/C++/hello_world/Linux/GCC/Makefile b/examples/C++/hello_world/Linux/GCC/Makefile
new file mode 100644
index 00000000..c2ee7a5d
--- /dev/null
+++ b/examples/C++/hello_world/Linux/GCC/Makefile
@@ -0,0 +1,42 @@
+# WebUI Library 2.x
+# C++ Example
+# Linux - GCC
+
+LIB=../../../../../build/Linux/GCC
+INCLUDE=../../../../../include
+SOURCE=../..
+
+all: release
+
+debug:
+# Build Lib
+ @cd "$(LIB)" && $(MAKE) debug
+# Static with Debug info
+ @echo "Build C++ Example (Static Debug)..."
+ @gcc -g -static -m64 -o main "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" -lwebui-2-static-x64 -lpthread
+# Dynamic with Debug info
+ @echo "Build C++ Example (Dynamic Debug)..."
+ @gcc -g -m64 -o main-dyn "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" "$(LIB)/webui-2-x64.so" -lpthread
+# Clean
+ @- rm -f *.o
+ @echo "Done."
+
+release:
+# Build Lib
+ @cd "$(LIB)" && $(MAKE)
+# Static Release
+ @echo "Build C++ Example (Static Release)..."
+ @gcc -static -Os -m64 -o main "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" -lwebui-2-static-x64 -lpthread
+ @strip --strip-all main
+# Dynamic Release
+ @echo "Build C++ Example (Dynamic Release)..."
+ @gcc -m64 -o main-dyn "$(SOURCE)/main.cpp" -I "$(INCLUDE)" -L "$(LIB)" "$(LIB)/webui-2-x64.so" -lpthread
+ @strip --strip-all main-dyn
+# Clean
+ @- rm -f *.o
+ @echo "Done."
+
+clean:
+ - rm -f *.o
+ - rm -f *.so
+ - rm -f *.a
diff --git a/examples/C++/README.md b/examples/C++/hello_world/README.md
similarity index 100%
rename from examples/C++/README.md
rename to examples/C++/hello_world/README.md
diff --git a/examples/C++/Windows/GCC/Makefile b/examples/C++/hello_world/Windows/GCC/Makefile
similarity index 95%
rename from examples/C++/Windows/GCC/Makefile
rename to examples/C++/hello_world/Windows/GCC/Makefile
index 6ae1f433..d187877e 100644
--- a/examples/C++/Windows/GCC/Makefile
+++ b/examples/C++/hello_world/Windows/GCC/Makefile
@@ -3,8 +3,8 @@
# Windows - GCC
SHELL=CMD
-LIB=../../../../build/Windows/GCC
-INCLUDE=../../../../include
+LIB=../../../../../build/Windows/GCC
+INCLUDE=../../../../../include
SOURCE=../..
all: release
diff --git a/examples/C++/Windows/GCC/win.ico b/examples/C++/hello_world/Windows/GCC/win.ico
similarity index 100%
rename from examples/C++/Windows/GCC/win.ico
rename to examples/C++/hello_world/Windows/GCC/win.ico
diff --git a/examples/C++/Windows/GCC/win.rc b/examples/C++/hello_world/Windows/GCC/win.rc
similarity index 100%
rename from examples/C++/Windows/GCC/win.rc
rename to examples/C++/hello_world/Windows/GCC/win.rc
diff --git a/examples/C++/Windows/MSVC/Makefile b/examples/C++/hello_world/Windows/MSVC/Makefile
similarity index 95%
rename from examples/C++/Windows/MSVC/Makefile
rename to examples/C++/hello_world/Windows/MSVC/Makefile
index 39776c94..a98ff5f4 100644
--- a/examples/C++/Windows/MSVC/Makefile
+++ b/examples/C++/hello_world/Windows/MSVC/Makefile
@@ -3,8 +3,8 @@
# Windows - Microsoft Visual C
SHELL=CMD
-_LIB=../../../../build/Windows/MSVC/
-_INCLUDE=../../../../include/
+_LIB=../../../../../build/Windows/MSVC/
+_INCLUDE=../../../../../include/
_SOURCE=../../
all: release
diff --git a/examples/C++/Windows/MSVC/win.ico b/examples/C++/hello_world/Windows/MSVC/win.ico
similarity index 100%
rename from examples/C++/Windows/MSVC/win.ico
rename to examples/C++/hello_world/Windows/MSVC/win.ico
diff --git a/examples/C++/Windows/MSVC/win.rc b/examples/C++/hello_world/Windows/MSVC/win.rc
similarity index 100%
rename from examples/C++/Windows/MSVC/win.rc
rename to examples/C++/hello_world/Windows/MSVC/win.rc
diff --git a/examples/C++/Windows/VS2019/hello_world.sln b/examples/C++/hello_world/Windows/VS2019/hello_world.sln
similarity index 100%
rename from examples/C++/Windows/VS2019/hello_world.sln
rename to examples/C++/hello_world/Windows/VS2019/hello_world.sln
diff --git a/examples/C++/Windows/VS2019/hello_world/hello_world.cpp b/examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.cpp
similarity index 93%
rename from examples/C++/Windows/VS2019/hello_world/hello_world.cpp
rename to examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.cpp
index fcbfd3a9..600159eb 100644
--- a/examples/C++/Windows/VS2019/hello_world/hello_world.cpp
+++ b/examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.cpp
@@ -33,12 +33,12 @@ void check_the_password(webui_event_t* e) {
// This function get called every time the user click on "MyButton1"
- webui_javascript_t js;
+ webui_script_t js;
js.script = " return document.getElementById(\"MyInput\").value; ";
js.timeout = 3;
// Run the JavaScript on the UI (Web Browser)
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
// Check if there is any JavaScript error
if (js.result.error) {
@@ -56,17 +56,17 @@ void check_the_password(webui_event_t* e) {
// Correct password
js.script = "alert('Good. Password is correct.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
else {
// Wrong password
js.script = "alert('Sorry. Wrong password.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
// Free data resources
- webui_free_js(&js);
+ webui_free_script(&js);
}
void close_the_application(webui_event_t* e) {
@@ -89,7 +89,7 @@ int main() {
webui_show(my_window, my_html, webui.browser.any); // If not, run on any other installed web browser
// Wait until all windows get closed
- webui_loop();
+ webui_wait();
return 0;
}
diff --git a/examples/C++/Windows/VS2019/hello_world/hello_world.vcxproj b/examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj
similarity index 95%
rename from examples/C++/Windows/VS2019/hello_world/hello_world.vcxproj
rename to examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj
index f83894f8..38d6953a 100644
--- a/examples/C++/Windows/VS2019/hello_world/hello_world.vcxproj
+++ b/examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj
@@ -72,22 +72,22 @@
true
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
$(OutDir);$(OutDir);$(LibraryPath)
false
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
$(OutDir);$(OutDir);$(LibraryPath)
true
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
$(OutDir);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
false
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
$(OutDir);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
diff --git a/examples/C++/Windows/VS2019/hello_world/hello_world.vcxproj.filters b/examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.filters
similarity index 100%
rename from examples/C++/Windows/VS2019/hello_world/hello_world.vcxproj.filters
rename to examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.filters
diff --git a/examples/C++/Windows/VS2019/hello_world/hello_world.vcxproj.user b/examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.user
similarity index 100%
rename from examples/C++/Windows/VS2019/hello_world/hello_world.vcxproj.user
rename to examples/C++/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.user
diff --git a/examples/C++/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj b/examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
similarity index 92%
rename from examples/C++/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
rename to examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
index 46526f43..be6b5436 100644
--- a/examples/C++/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
+++ b/examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
@@ -72,19 +72,19 @@
true
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
false
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
true
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
false
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
@@ -155,12 +155,12 @@
-
-
+
+
-
-
+
+
diff --git a/examples/C++/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters b/examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
similarity index 82%
rename from examples/C++/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
rename to examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
index 06e1942f..fcdc4411 100644
--- a/examples/C++/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
+++ b/examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
@@ -15,18 +15,18 @@
-
+
Header Files
-
+
Header Files
-
+
Source Files
-
+
Source Files
diff --git a/examples/C++/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user b/examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user
similarity index 100%
rename from examples/C++/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user
rename to examples/C++/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user
diff --git a/examples/C++/Windows/VS2022/hello_world.sln b/examples/C++/hello_world/Windows/VS2022/hello_world.sln
similarity index 100%
rename from examples/C++/Windows/VS2022/hello_world.sln
rename to examples/C++/hello_world/Windows/VS2022/hello_world.sln
diff --git a/examples/C++/Windows/VS2022/hello_world/hello_world.cpp b/examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.cpp
similarity index 93%
rename from examples/C++/Windows/VS2022/hello_world/hello_world.cpp
rename to examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.cpp
index fcbfd3a9..600159eb 100644
--- a/examples/C++/Windows/VS2022/hello_world/hello_world.cpp
+++ b/examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.cpp
@@ -33,12 +33,12 @@ void check_the_password(webui_event_t* e) {
// This function get called every time the user click on "MyButton1"
- webui_javascript_t js;
+ webui_script_t js;
js.script = " return document.getElementById(\"MyInput\").value; ";
js.timeout = 3;
// Run the JavaScript on the UI (Web Browser)
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
// Check if there is any JavaScript error
if (js.result.error) {
@@ -56,17 +56,17 @@ void check_the_password(webui_event_t* e) {
// Correct password
js.script = "alert('Good. Password is correct.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
else {
// Wrong password
js.script = "alert('Sorry. Wrong password.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
// Free data resources
- webui_free_js(&js);
+ webui_free_script(&js);
}
void close_the_application(webui_event_t* e) {
@@ -89,7 +89,7 @@ int main() {
webui_show(my_window, my_html, webui.browser.any); // If not, run on any other installed web browser
// Wait until all windows get closed
- webui_loop();
+ webui_wait();
return 0;
}
diff --git a/examples/C++/Windows/VS2022/hello_world/hello_world.vcxproj b/examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj
similarity index 95%
rename from examples/C++/Windows/VS2022/hello_world/hello_world.vcxproj
rename to examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj
index fb563cf9..730f045f 100644
--- a/examples/C++/Windows/VS2022/hello_world/hello_world.vcxproj
+++ b/examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj
@@ -72,22 +72,22 @@
true
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
$(OutDir);$(OutDir);$(LibraryPath)
false
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
$(OutDir);$(OutDir);$(LibraryPath)
true
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
$(OutDir);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
false
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
$(OutDir);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
diff --git a/examples/C++/Windows/VS2022/hello_world/hello_world.vcxproj.filters b/examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.filters
similarity index 100%
rename from examples/C++/Windows/VS2022/hello_world/hello_world.vcxproj.filters
rename to examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.filters
diff --git a/examples/C++/Windows/VS2022/hello_world/hello_world.vcxproj.user b/examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.user
similarity index 100%
rename from examples/C++/Windows/VS2022/hello_world/hello_world.vcxproj.user
rename to examples/C++/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.user
diff --git a/examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj b/examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
similarity index 92%
rename from examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
rename to examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
index cd751614..62886eb7 100644
--- a/examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
+++ b/examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
@@ -72,19 +72,19 @@
true
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
false
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
true
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
false
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
@@ -155,12 +155,12 @@
-
-
+
+
-
-
+
+
diff --git a/examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters b/examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
similarity index 82%
rename from examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
rename to examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
index 06e1942f..fcdc4411 100644
--- a/examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
+++ b/examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
@@ -15,18 +15,18 @@
-
+
Header Files
-
+
Header Files
-
+
Source Files
-
+
Source Files
diff --git a/examples/C++/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user b/examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user
similarity index 100%
rename from examples/C++/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user
rename to examples/C++/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user
diff --git a/examples/C++/main.cpp b/examples/C++/hello_world/main.cpp
similarity index 93%
rename from examples/C++/main.cpp
rename to examples/C++/hello_world/main.cpp
index 8cf9f511..91ebab30 100644
--- a/examples/C++/main.cpp
+++ b/examples/C++/hello_world/main.cpp
@@ -33,12 +33,12 @@ void check_the_password(webui_event_t* e) {
// This function get called every time the user click on "MyButton1"
- webui_javascript_t js;
+ webui_script_t js;
js.script = " return document.getElementById(\"MyInput\").value; ";
js.timeout = 3;
// Run the JavaScript on the UI (Web Browser)
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
// Check if there is any JavaScript error
if(js.result.error) {
@@ -56,17 +56,17 @@ void check_the_password(webui_event_t* e) {
// Correct password
js.script = "alert('Good. Password is correct.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
else {
// Wrong password
js.script = "alert('Sorry. Wrong password.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
// Free data resources
- webui_free_js(&js);
+ webui_free_script(&js);
}
void close_the_application(webui_event_t* e){
@@ -89,7 +89,7 @@ int main() {
webui_show(my_window, my_html, webui.browser.any); // If not, run on any other installed web browser
// Wait until all windows get closed
- webui_loop();
+ webui_wait();
return 0;
}
diff --git a/examples/C/Linux/Clang/Makefile b/examples/C/hello_world/Linux/Clang/Makefile
similarity index 94%
rename from examples/C/Linux/Clang/Makefile
rename to examples/C/hello_world/Linux/Clang/Makefile
index 986cfcd6..ed977e1d 100644
--- a/examples/C/Linux/Clang/Makefile
+++ b/examples/C/hello_world/Linux/Clang/Makefile
@@ -2,8 +2,8 @@
# C99 Example
# Linux - Clang
-LIB=../../../../build/Linux/Clang
-INCLUDE=../../../../include
+LIB=../../../../../build/Linux/Clang
+INCLUDE=../../../../../include
SOURCE=../..
all: release
diff --git a/examples/C/Linux/GCC/Makefile b/examples/C/hello_world/Linux/GCC/Makefile
similarity index 94%
rename from examples/C/Linux/GCC/Makefile
rename to examples/C/hello_world/Linux/GCC/Makefile
index 5ddabfa0..d2049d29 100644
--- a/examples/C/Linux/GCC/Makefile
+++ b/examples/C/hello_world/Linux/GCC/Makefile
@@ -2,8 +2,8 @@
# C99 Example
# Linux - GCC
-LIB=../../../../build/Linux/GCC
-INCLUDE=../../../../include
+LIB=../../../../../build/Linux/GCC
+INCLUDE=../../../../../include
SOURCE=../..
all: release
diff --git a/examples/C/README.md b/examples/C/hello_world/README.md
similarity index 100%
rename from examples/C/README.md
rename to examples/C/hello_world/README.md
diff --git a/examples/C/Windows/GCC/Makefile b/examples/C/hello_world/Windows/GCC/Makefile
similarity index 95%
rename from examples/C/Windows/GCC/Makefile
rename to examples/C/hello_world/Windows/GCC/Makefile
index 1eed21c7..559806f3 100644
--- a/examples/C/Windows/GCC/Makefile
+++ b/examples/C/hello_world/Windows/GCC/Makefile
@@ -3,8 +3,8 @@
# Windows - GCC
SHELL=CMD
-LIB=../../../../build/Windows/GCC
-INCLUDE=../../../../include
+LIB=../../../../../build/Windows/GCC
+INCLUDE=../../../../../include
SOURCE=../..
all: release
diff --git a/examples/C/Windows/GCC/win.ico b/examples/C/hello_world/Windows/GCC/win.ico
similarity index 100%
rename from examples/C/Windows/GCC/win.ico
rename to examples/C/hello_world/Windows/GCC/win.ico
diff --git a/examples/C/Windows/GCC/win.rc b/examples/C/hello_world/Windows/GCC/win.rc
similarity index 100%
rename from examples/C/Windows/GCC/win.rc
rename to examples/C/hello_world/Windows/GCC/win.rc
diff --git a/examples/C/Windows/MSVC/Makefile b/examples/C/hello_world/Windows/MSVC/Makefile
similarity index 95%
rename from examples/C/Windows/MSVC/Makefile
rename to examples/C/hello_world/Windows/MSVC/Makefile
index b5e73dd0..702c7ccb 100644
--- a/examples/C/Windows/MSVC/Makefile
+++ b/examples/C/hello_world/Windows/MSVC/Makefile
@@ -3,8 +3,8 @@
# Windows - Microsoft Visual C
SHELL=CMD
-_LIB=../../../../build/Windows/MSVC/
-_INCLUDE=../../../../include/
+_LIB=../../../../../build/Windows/MSVC/
+_INCLUDE=../../../../../include/
_SOURCE=../../
all: release
diff --git a/examples/C/Windows/MSVC/win.ico b/examples/C/hello_world/Windows/MSVC/win.ico
similarity index 100%
rename from examples/C/Windows/MSVC/win.ico
rename to examples/C/hello_world/Windows/MSVC/win.ico
diff --git a/examples/C/Windows/MSVC/win.rc b/examples/C/hello_world/Windows/MSVC/win.rc
similarity index 100%
rename from examples/C/Windows/MSVC/win.rc
rename to examples/C/hello_world/Windows/MSVC/win.rc
diff --git a/examples/C/Windows/TCC/Makefile b/examples/C/hello_world/Windows/TCC/Makefile
similarity index 94%
rename from examples/C/Windows/TCC/Makefile
rename to examples/C/hello_world/Windows/TCC/Makefile
index 3bc5b008..11296e67 100644
--- a/examples/C/Windows/TCC/Makefile
+++ b/examples/C/hello_world/Windows/TCC/Makefile
@@ -3,8 +3,8 @@
# Windows - Tiny C Compiler
SHELL=CMD
-LIB=../../../../build/Windows/TCC/
-INCLUDE=../../../../include/
+LIB=../../../../../build/Windows/TCC/
+INCLUDE=../../../../../include/
SOURCE=../../
all: release
diff --git a/examples/C/Windows/VS2019/hello_world.sln b/examples/C/hello_world/Windows/VS2019/hello_world.sln
similarity index 100%
rename from examples/C/Windows/VS2019/hello_world.sln
rename to examples/C/hello_world/Windows/VS2019/hello_world.sln
diff --git a/examples/C/Windows/VS2019/hello_world/hello_world.c b/examples/C/hello_world/Windows/VS2019/hello_world/hello_world.c
similarity index 93%
rename from examples/C/Windows/VS2019/hello_world/hello_world.c
rename to examples/C/hello_world/Windows/VS2019/hello_world/hello_world.c
index 18fb3643..8ed0d636 100644
--- a/examples/C/Windows/VS2019/hello_world/hello_world.c
+++ b/examples/C/hello_world/Windows/VS2019/hello_world/hello_world.c
@@ -31,13 +31,13 @@ void check_the_password(webui_event_t* e) {
// This function get called every time the user click on "MyButton1"
- webui_javascript_t js = {
+ webui_script_t js = {
.script = " return document.getElementById(\"MyInput\").value; ",
.timeout = 3
};
// Run the JavaScript on the UI (Web Browser)
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
// Check if there is any JavaScript error
if (js.result.error) {
@@ -55,17 +55,17 @@ void check_the_password(webui_event_t* e) {
// Correct password
js.script = "alert('Good. Password is correct.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
else {
// Wrong password
js.script = "alert('Sorry. Wrong password.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
// Free data resources
- webui_free_js(&js);
+ webui_free_script(&js);
}
void close_the_application(webui_event_t* e) {
@@ -88,7 +88,7 @@ int main() {
webui_show(my_window, my_html, webui.browser.any); // If not, run on any other installed web browser
// Wait until all windows get closed
- webui_loop();
+ webui_wait();
return 0;
}
diff --git a/examples/C/Windows/VS2019/hello_world/hello_world.vcxproj b/examples/C/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj
similarity index 95%
rename from examples/C/Windows/VS2019/hello_world/hello_world.vcxproj
rename to examples/C/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj
index e21a3ca9..e81cd6e1 100644
--- a/examples/C/Windows/VS2019/hello_world/hello_world.vcxproj
+++ b/examples/C/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj
@@ -72,22 +72,22 @@
true
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
$(OutDir);$(OutDir);$(LibraryPath)
false
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
$(OutDir);$(OutDir);$(LibraryPath)
true
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
$(OutDir);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
false
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
$(OutDir);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
diff --git a/examples/C/Windows/VS2019/hello_world/hello_world.vcxproj.filters b/examples/C/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.filters
similarity index 100%
rename from examples/C/Windows/VS2019/hello_world/hello_world.vcxproj.filters
rename to examples/C/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.filters
diff --git a/examples/C/Windows/VS2019/hello_world/hello_world.vcxproj.user b/examples/C/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.user
similarity index 100%
rename from examples/C/Windows/VS2019/hello_world/hello_world.vcxproj.user
rename to examples/C/hello_world/Windows/VS2019/hello_world/hello_world.vcxproj.user
diff --git a/examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj b/examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
similarity index 92%
rename from examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
rename to examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
index 46526f43..be6b5436 100644
--- a/examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
+++ b/examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj
@@ -72,19 +72,19 @@
true
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
false
- ..\..\..\..\..\include;..\..\..\..\..\include;$(IncludePath)
+ ..\..\..\..\..\..\include;..\..\..\..\..\..\include;$(IncludePath)
true
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
false
- ..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
+ ..\..\..\..\..\..\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);
@@ -155,12 +155,12 @@
-
-
+
+
-
-
+
+
diff --git a/examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters b/examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
similarity index 82%
rename from examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
rename to examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
index 06e1942f..fcdc4411 100644
--- a/examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
+++ b/examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
@@ -15,18 +15,18 @@
-
+
Header Files
-
+
Header Files
-
+
Source Files
-
+
Source Files
diff --git a/examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user b/examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user
similarity index 100%
rename from examples/C/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user
rename to examples/C/hello_world/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.user
diff --git a/examples/C/Windows/VS2022/hello_world.sln b/examples/C/hello_world/Windows/VS2022/hello_world.sln
similarity index 100%
rename from examples/C/Windows/VS2022/hello_world.sln
rename to examples/C/hello_world/Windows/VS2022/hello_world.sln
diff --git a/examples/C/Windows/VS2022/hello_world/hello_world.c b/examples/C/hello_world/Windows/VS2022/hello_world/hello_world.c
similarity index 93%
rename from examples/C/Windows/VS2022/hello_world/hello_world.c
rename to examples/C/hello_world/Windows/VS2022/hello_world/hello_world.c
index 18fb3643..8ed0d636 100644
--- a/examples/C/Windows/VS2022/hello_world/hello_world.c
+++ b/examples/C/hello_world/Windows/VS2022/hello_world/hello_world.c
@@ -31,13 +31,13 @@ void check_the_password(webui_event_t* e) {
// This function get called every time the user click on "MyButton1"
- webui_javascript_t js = {
+ webui_script_t js = {
.script = " return document.getElementById(\"MyInput\").value; ",
.timeout = 3
};
// Run the JavaScript on the UI (Web Browser)
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
// Check if there is any JavaScript error
if (js.result.error) {
@@ -55,17 +55,17 @@ void check_the_password(webui_event_t* e) {
// Correct password
js.script = "alert('Good. Password is correct.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
else {
// Wrong password
js.script = "alert('Sorry. Wrong password.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
// Free data resources
- webui_free_js(&js);
+ webui_free_script(&js);
}
void close_the_application(webui_event_t* e) {
@@ -88,7 +88,7 @@ int main() {
webui_show(my_window, my_html, webui.browser.any); // If not, run on any other installed web browser
// Wait until all windows get closed
- webui_loop();
+ webui_wait();
return 0;
}
diff --git a/examples/C/Windows/VS2022/hello_world/hello_world.vcxproj b/examples/C/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj
similarity index 100%
rename from examples/C/Windows/VS2022/hello_world/hello_world.vcxproj
rename to examples/C/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj
diff --git a/examples/C/Windows/VS2022/hello_world/hello_world.vcxproj.filters b/examples/C/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.filters
similarity index 100%
rename from examples/C/Windows/VS2022/hello_world/hello_world.vcxproj.filters
rename to examples/C/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.filters
diff --git a/examples/C/Windows/VS2022/hello_world/hello_world.vcxproj.user b/examples/C/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.user
similarity index 100%
rename from examples/C/Windows/VS2022/hello_world/hello_world.vcxproj.user
rename to examples/C/hello_world/Windows/VS2022/hello_world/hello_world.vcxproj.user
diff --git a/examples/C++/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj b/examples/C/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
similarity index 100%
rename from examples/C++/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
rename to examples/C/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj
diff --git a/examples/C++/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters b/examples/C/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
similarity index 100%
rename from examples/C++/Windows/VS2019/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
rename to examples/C/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.filters
diff --git a/examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user b/examples/C/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user
similarity index 100%
rename from examples/C/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user
rename to examples/C/hello_world/Windows/VS2022/webui-2-static-x64/webui-2-static-x64.vcxproj.user
diff --git a/examples/C/main.c b/examples/C/hello_world/main.c
similarity index 93%
rename from examples/C/main.c
rename to examples/C/hello_world/main.c
index 95908ab1..0a8431f5 100644
--- a/examples/C/main.c
+++ b/examples/C/hello_world/main.c
@@ -31,13 +31,13 @@ void check_the_password(webui_event_t* e) {
// This function get called every time the user click on "MyButton1"
- webui_javascript_t js = {
+ webui_script_t js = {
.script = " return document.getElementById(\"MyInput\").value; ",
.timeout = 3
};
// Run the JavaScript on the UI (Web Browser)
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
// Check if there is any JavaScript error
if(js.result.error) {
@@ -55,17 +55,17 @@ void check_the_password(webui_event_t* e) {
// Correct password
js.script = "alert('Good. Password is correct.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
else {
// Wrong password
js.script = "alert('Sorry. Wrong password.')";
- webui_run_js(my_window, &js);
+ webui_script(my_window, &js);
}
// Free data resources
- webui_free_js(&js);
+ webui_free_script(&js);
}
void close_the_application(webui_event_t* e){
@@ -88,7 +88,7 @@ int main() {
webui_show(my_window, my_html, webui.browser.any); // If not, run on any other installed web browser
// Wait until all windows get closed
- webui_loop();
+ webui_wait();
return 0;
}
diff --git a/examples/Go/hello_world/main.go b/examples/Go/hello_world/main.go
index 0d7c9043..83c879ba 100644
--- a/examples/Go/hello_world/main.go
+++ b/examples/Go/hello_world/main.go
@@ -30,9 +30,9 @@ const login_html string = `
-
+
- -
+ -