{"id":31217048,"url":"https://github.com/geraintluff/webview-gui","last_synced_at":"2025-09-21T13:58:30.391Z","repository":{"id":305776879,"uuid":"1020878462","full_name":"geraintluff/webview-gui","owner":"geraintluff","description":"Webview GUIs with simple message-passing, based on CHOC","archived":false,"fork":false,"pushed_at":"2025-07-21T22:31:25.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-22T01:23:28.930Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geraintluff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-16T14:28:56.000Z","updated_at":"2025-07-21T22:31:29.000Z","dependencies_parsed_at":"2025-07-22T01:39:20.311Z","dependency_job_id":null,"html_url":"https://github.com/geraintluff/webview-gui","commit_stats":null,"previous_names":["geraintluff/webview-gui"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/geraintluff/webview-gui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geraintluff%2Fwebview-gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geraintluff%2Fwebview-gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geraintluff%2Fwebview-gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geraintluff%2Fwebview-gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geraintluff","download_url":"https://codeload.github.com/geraintluff/webview-gui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geraintluff%2Fwebview-gui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276250935,"owners_count":25610373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-21T13:58:29.078Z","updated_at":"2025-09-21T13:58:30.383Z","avatar_url":"https://github.com/geraintluff.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webview GUI\n\nWebview GUIs with simple message-passing, intended for audio effects.  See [`webview-gui.h`](include/webview-gui/webview-gui.h) for the API.\n\nGeneral goals:\n\n* Load a webview, with resources either from a custom callback or from a directory\n* The webpage can use `parent.postMessage()` and `addEventListener('message', ...)` to send/receive `ArrayBuffer`s.\n\nIt's (currently, possibly forever) based on [CHOC](https://github.com/Tracktion/choc/blob/main/gui/choc_WebView.h).  However, there are still some pieces missing if using CHOC directly: some gnarly event-flow stuff, and actually attaching to the native platform-view.\n\n## TODOs\n\nThanks to August / Imagiro for sharing their [implementation](https://github.com/augustpemberton/imagiro_webview/tree/main), and giving me permission to raid it.  These are the things they said they'd done:\n\n* Key event stuff (Mac and Windows have separate problems)\n* Absolute paths for dragged-in files\n* A crash on Mac if you press Esc(?)\n\nAdditionally, I would like to make some existing JS APIs usable in webviews: \n\n* [`Element.setPointerCapture()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture) (hiding the mouse while dragging) without the big warning banner.\n* Right-click / context-menu stuff\n\n## CLAP helper\n\nThere is a [draft CLAP extension](https://github.com/free-audio/clap/blob/ee8af6c82551aac6f5e8a0d5bd1980cc9c8d832b/include/clap/ext/draft/webview.h) for using webview UIs.  This is the primary way that WCLAPs (CLAPs compiled to WebAssembly) can provide a GUI, and it follows exactly the pattern above: passing opaque bytes between the native/WASM plugin and the webview/`\u003ciframe\u003e`.\n\nNative hosts don't support this extension (and are unlikely to), so this repo includes [`clap-webview-gui.h`](include/webview-gui/clap-webview-gui.h), which implements the `clap.gui` extension, forwarding messages to/from plugin's webview extension.  The goal is for webview-based CLAP plugins to just implement the webview extension (and give some size/resizing hints through the `clap.gui` extension). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeraintluff%2Fwebview-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeraintluff%2Fwebview-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeraintluff%2Fwebview-gui/lists"}