Commit Graph

71 Commits

Author SHA1 Message Date
Turiiya
61501ee959 Sort process_id functions in webui.h, update comment 2023-10-01 11:53:29 +02:00
Hassan DRAGA
91c9445912 Fast Events (Internal Core changes)
- Changing the way WS events process for more speed
- Changing the WS events process for less data copy as possible
2023-09-30 23:15:55 -04:00
Hassan DRAGA
24a68d87a6 Update webui_browsers struct
- Adding `NoBrowser = 0,` (The rest is shifted by one)
2023-09-30 16:55:48 -04:00
Hassan DRAGA
62030156e5 Adding webui_delete_all_profiles
- Adding webui_delete_all_profiles()
- Adding webui_delete_profile()
- Adding webui_clean()
- Now. webui_wait() simply means no more windows are running. And app can create and show windows. And of program is now become webui_clean().
- Updating Civetweb (Server close faster now)
2023-09-30 16:26:58 -04:00
Hassan DRAGA
2f694d1a3f Adding webui_clean
- Adding webui_clean() (Firefox not supported yet)
2023-09-29 18:36:57 -04:00
Hassan DRAGA
6a634cc680 Adding webui_navigate
- Adding webui_navigate()
- Now when using all events webui_bind(MyWindow, "", events), WebUI will block all href requests
- Fix https://github.com/webui-dev/webui/issues/228
2023-09-26 18:59:25 -04:00
Turiiya
ea50923288 Add ChromiumBased to webui_browsers enum 2023-09-22 09:05:03 +02:00
Hassan DRAGA
a068a84320 Updating webui_get_url 2023-09-21 16:36:11 -04:00
fibodevy
6f782bc1a8 Adding webui_get_url
- Adding `char* webui_get_url(size_t window);`
2023-09-21 07:21:04 +02:00
Hassan DRAGA
a616991ca6 Adding webui_set_profile
- Adding `void webui_set_profile(size_t window, const char* name, const char* path)`
- Fix disconnection on 404
- Fix `webui_get_child_process_id()`
- Adding argument `--disable-component-update`
2023-09-19 19:34:09 -04:00
Hassan DRAGA
2160aea9b0 Adding process ID APIs
* Adding `size_t webui_get_child_process_id(size_t window)`
* Adding `size_t webui_get_parent_process_id(size_t window)`
2023-09-14 17:31:29 -04:00
Hassan DRAGA
ea63be7921 Adding comments (Not finished) 2 2023-09-13 15:32:14 -04:00
Hassan DRAGA
940dcc50af Adding comments (Not finished) 2023-09-11 18:09:42 -04:00
Hassan DRAGA
be9c0bc7cb Reorganize webui.h 2023-09-11 17:18:31 -04:00
Hassan DRAGA
d2bf059d4e Change signed long to unsigned
- The JavaScript data size should be unsigned `size_t` instead of `signed long long`
2023-08-30 19:47:31 -04:00
Albert Shown
e91d6d70bf Adding webui_set_size and webui_set_position
* Adding `webui_set_size()`
* Adding `webui_set_position()`
2023-08-28 18:45:52 -04:00
Hassan DRAGA
9574724f99
Merge pull request #179 from ttytm/docs/refine-comments
Refine API comments
2023-08-25 10:35:36 -04:00
Hassan DRAGA
94a3db07b7 Fix https://github.com/webui-dev/webui/issues/180
* Update `CLOSE` command
* Update bridge
2023-08-25 10:24:41 -04:00
Turiiya
ee66862f87 Refine API comments 2023-08-25 07:59:14 +02:00
Hassan DRAGA
74830815cd Adding webui_set_default_root_folder()
* Adding `webui_set_default_root_folder()`
* Fix non initialized webui-core in some scenarios
2023-08-24 21:54:13 -04:00
Hassan DRAGA
0d400644d1 Adding DataSize to wrappers interface
* Adding DataSize to wrappers interface `webui_interface_bind()`
2023-08-22 22:13:58 -04:00
Hassan DRAGA
e941e35fc6 Send Raw to backend
* Send Raw to backend
* Updating bridge
* No memory copy when source is UI as is guaranteed to stay alive
2023-08-22 18:11:35 -04:00
Hassan DRAGA
52885648d2 Up to v2.4.0
* Up all to v2.4.0
2023-08-19 17:49:08 -04:00
Hassan DRAGA
28274c53e8 New API webui_set_hide
* Adding `webui_set_hide()` to run the window in hidden mode
2023-08-18 18:16:35 -04:00
Hassan DRAGA
ba84f249b5 New API webui_send_raw
* Adding `webui_send_raw()` to be able to send raw binary data to UI
* Soon I will add UI to Backend
2023-08-18 16:16:07 -04:00
Albert Shown
0b55abff5a Finished webui_set_file_handler API
* Finishing the `webui_set_file_handler()` feature. Thanks to @petabyt
* Removing `free()` and replace it by the WebUI version
* Minor core changes to make `webui_set_file_handler()` working
* Update serve a folder example to show how to use `webui_set_file_handler()`

## New Public API:
* `void webui_set_file_handler(size_t window, const void* (*handler)(const char* filename, int* length))`
* `void* webui_malloc(size_t size)`
2023-06-26 12:11:03 -04:00
Daniel C
20f828a47f Add webui_set_file_handler
Allows a handler to be given to the file server to return embedded content, as well as allocated content
2023-06-24 16:03:19 -04:00
Hassan DRAGA
d786f6db2a Adding webui_set_root_folder
* Adding New API `bool _webui_set_root_folder(_webui_window_t* win, const char* path)`
2023-05-27 20:30:31 -04:00
Hassan DRAGA
cdf67b17ac C++ Improvement
* Set C++11 as minimal standard
* Fix C++ Makefile in macOS
* Update the C++ WebUI header to use references (https://github.com/webui-dev/webui/issues/103)
* Update `webui_return_string()` argument from `char*` to `const char*`
2023-05-21 12:20:54 -04:00
Hassan DRAGA
7db9826676 Updating the links
* Updating the links to the new organization
2023-05-13 10:47:42 -04:00
Hassan DRAGA
bc5e5b2a56 Public get_new_window_id
# New
* `webui_get_new_window_id` is now public
* Updating C++ examples
2023-05-09 07:48:27 -04:00
Hassan DRAGA
4e0a7fe5c1 Text Editor Example
# Changes
* `webui_run` changed from `bool` to `void` as it run the script fast with no return

# New
* `char* webui_encode(const char* str)` encode string to base64
* `char* webui_decode(const char* str)` decode base64 to string
* `void webui_free(void* ptr)` free resource allocated by WebUI (_when using webui_encode()_)
* A text editor example

# Fix
* Now WebUI wait in loop while the application requestion more html files (_Large HTML UI_)
2023-05-08 23:03:41 -04:00
Hassan DRAGA
aacc8b0ddd Window ID Based Creation
# New:

* New API: `void webui_new_window_id(size_t window_number)`
* New API: `void webui_destroy(size_t window)`

_Please see C serve_a_folder example on how to use webui_new_window_id()_

# Changes

* To keep consistency with window IDs, all `unsigned int` changed to `size_t`
2023-05-07 13:54:15 -04:00
Albert Shown
e116261130 C++ Wrapper Update
* Now the C++ wrapper has its own class instead of direct C calls.
2023-05-05 17:41:20 -04:00
Hassan DRAGA
ca7b4f50ed WebUI v2.3.0
# Users/Wrappers Changes
* The window object changed from `void*` (pointer) to a simple `size_t` (integer)

# New Core Features And Changes
* License changed from `GPLv2` to 'MIT'. Thanks to @xD0135
* The core APIs is completely changed from `Mongoose` to `civetweb`. Thanks to @xD0135
* Kiosk mode support. Thanks to @malisipi
* UI responses resolving using IDs instead of first received (WebUI-JS-Bridge)
* Fix C++ Linux Clang build issue (C++ Linux GCC still broken)
2023-05-04 21:41:03 -04:00
Hassan DRAGA
41b5ab3bd7 Updating the PR
* The original code works. I'm just re-styling it to make the WebUI code look the same.
2023-05-03 20:18:56 -04:00
Hassan DRAGA
591020ffc5
Update webui.h 2023-05-03 19:57:48 -04:00
Hassan DRAGA
29694c40cf
Update webui.h 2023-05-03 19:55:46 -04:00
Mehmet Ali Şipi
537d5a677a Add Kiosk Support For Chrome 2023-05-03 16:59:21 +03:00
Hassan DRAGA
866796c8d2 Event Struct Improvement
* In webui_event_t `type` changed to `event_type`. This is because some wrapper's language does not support using _type_ as a variable name.
* In webui_event_t `char* response` changed to `unsigned int event_number`.
* Now `webui_interface_set_response()` use a simple `unsigned int event_number` instead of `char* response`.
2023-04-29 13:46:11 -04:00
Albert Shown
f4f168c912 Fix TCC (tlhelp32.h) issue
* Removing auto-running browser detection from TCC build
2023-04-26 18:15:55 -04:00
Albert Shown
296dfdc0b4 Go & C++ Documentation
* Adding Go Documentation
* Adding C++ Documentation
* Removing TCC warnings
2023-04-25 17:56:57 -04:00
Albert Shown
3a0cd4968f Memory Optimization
* Implementing https://github.com/alifcommunity/webui/issues/81
* Fix Linux & macOS build script using `dos2unix`
2023-04-24 17:44:27 -04:00
Hassan DRAGA
e1d8f3f43c Linux and macOS Support
* Linux Support
* macOS Support
* Python Wrapper Finished
2023-04-20 22:18:32 -04:00
Hassan DRAGA
04b3ab7734 Python Wrapper (Not Complete)
* First Python Wrapper Commit v2.2.0 (Not Complete)
* Adding `windows_build.bat`
2023-04-19 22:52:56 -04:00
Hassan DRAGA
18d68ab586 First WebUI v2.2.0 Commit
# WebUI v2.2.0

* Now, creating a wrapper is easier as core functions have been removed from `webui.h`
* Removing many functions (webui_open, webui_new_server...)

* C - Complete
* Go - Complete
* Deno - Complete
* All other things still need to be completed...
2023-04-17 15:43:46 -04:00
Albert Shown
0e6ac9b813 Minor C style code changes
* Minor C style code changes, no new features.
2023-04-04 11:28:13 -04:00
Hassan DRAGA
9a38611454 WebUI v2.1.1
* Fix MacOS threading bug `wait()`
* Removing all `bind_all` related codes
* Now, you can listen for general events by binding with an empty ID
2023-04-01 00:05:41 -04:00
Hassan DRAGA
b7bf608240 WebUI v2.1.0
#New Features
* Supporting more web browsers
* Search for web browsers in Windows Reg.
* Using the same show() function for HTML script, files, and refresh content
* Support Chrome on macOS

#Breaking code
* Switching from `webui_show(win, html, browser);` to `webui_show(win, content);`, and it's used for HTML, files, and reload the window
* Removing `webui_show_cpy()`, `webui_refresh()`, `webui_refresh_cpy()`
2023-03-28 23:00:09 -04:00
Charles Lowell
599d452a70
Add a build for MacOS
This copies the Linux build to generate binaries for MacOS
2023-03-28 15:50:10 -05:00