Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO: Add Interfaces - ScriptClient and others #535

Closed
AlbertShown opened this issue Dec 18, 2024 · 2 comments
Closed

TODO: Add Interfaces - ScriptClient and others #535

AlbertShown opened this issue Dec 18, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@AlbertShown
Copy link
Contributor

To make other wrappers able to use webui_xxx_client() APIs, we should add those new interfaces:

// Original C APIs:
//
// webui_show_client(webui_event_t* e, const char* content);
// webui_close_client(webui_event_t* e);
// webui_send_raw_client(webui_event_t* e, const char* function, const void* raw, size_t size);
// webui_navigate_client(webui_event_t* e, const char* url);
// webui_run_client(webui_event_t* e, const char* script);
// webui_script_client(webui_event_t* e, const char* script, size_t timeout, char* buffer, size_t buffer_length);

// New equivalent interfaces:
webui_interface_show_client(size_t window, size_t event_number, const char* content);
webui_interface_close_client(wsize_t window, size_t event_number);
webui_interface_send_raw_client(size_t window, size_t event_number, const char* function, const void* raw, size_t size);
webui_interface_navigate_client(size_t window, size_t event_number, const char* url);
webui_interface_run_client(size_t window, size_t event_number, const char* script);
webui_interface_script_client(size_t window, size_t event_number, const char* script, size_t timeout, char* buffer, size_t buffer_length);
@AlbertShown
Copy link
Contributor Author

Needed by webui-dev/deno-webui#66.

@AlbertShown
Copy link
Contributor Author

Added 0ff3b13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant