{"id":22022119,"url":"https://github.com/michaelkim/webview","last_synced_at":"2025-05-07T06:42:50.560Z","repository":{"id":48923005,"uuid":"190700997","full_name":"MichaelKim/webview","owner":"MichaelKim","description":"Cross-platform header-only webview library for C++","archived":false,"fork":false,"pushed_at":"2021-10-17T07:22:48.000Z","size":353,"stargazers_count":71,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T07:22:21.565Z","etag":null,"topics":["cpp","webview"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichaelKim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-07T06:58:22.000Z","updated_at":"2024-11-20T07:29:12.000Z","dependencies_parsed_at":"2022-09-24T00:11:11.119Z","dependency_job_id":null,"html_url":"https://github.com/MichaelKim/webview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelKim%2Fwebview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelKim%2Fwebview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelKim%2Fwebview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelKim%2Fwebview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichaelKim","download_url":"https://codeload.github.com/MichaelKim/webview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252831098,"owners_count":21810777,"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","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":["cpp","webview"],"created_at":"2024-11-30T06:17:55.323Z","updated_at":"2025-05-07T06:42:50.549Z","avatar_url":"https://github.com/MichaelKim.png","language":"C++","readme":"# webview\n\n[![CMake CI](https://github.com/MichaelKim/webview/actions/workflows/ci.yaml/badge.svg)](https://github.com/MichaelKim/webview/actions/workflows/ci.yaml)\n\nA tiny cross-platform webview library written in C++ using Edge on Windows (both EdgeHTML and Chromium), Webkit on MacOS, and WebkitGTK on Linux.\n\nInspired from zerge's [webview](https://github.com/webview/webview), this library was rewritten with several priorities:\n\n- A more \"C++\"-like API\n- Support for Microsoft Edge on Windows\n- Replaced Objective-C runtime C code with actual Objective-C code\n\n## Support\n\n|            | Windows            | Windows            | MacOS                            | Linux                         |\n| ---------- | ------------------ | ------------------ | -------------------------------- | ----------------------------- |\n| Version    | Windows 10, v1809+ | Windows 7, 8.1, 10 | Tested on MacOS Mojave, Catalina | Tested on Ubuntu 18.04.02 LTS |\n| Web Engine | EdgeHTML           | Chromium           | Webkit                           | WebKit                        |\n| GUI        | Windows API        | Windows API        | Cocoa                            | GTK                           |\n\n## Documentation\n\n- [Build Steps](docs/build.md)\n- [API Reference](docs/api.md)\n- [Limitations](docs/limitations.md)\n\n## Usage\n\n```c++\n#include \"webview.h\"\n\nWEBVIEW_MAIN {\n  // Create a 800 x 600 webview that shows Google\n  wv::WebView w{800, 600, true, true, Str(\"Hello world!\"), Str(\"http://google.com\")};\n\n  if (w.init() == -1) {\n    return 1;\n  }\n\n  while (w.run() == 0);\n\n  return 0;\n}\n```\n\nSince Windows (WinAPI) uses `std::wstring`s, all string literals should be wrapped in the macro `Str(s)`.\n\nThe following URL schemes are supported:\n\n- HTTP(S): `http://` and `https://`\n- Local file: `file:///`, make sure to point to an `html` file\n  - Not supported in Edge Legacy (see [Limitations](docs/limitations.md))\n- Inline data: `data:text/html,\u003chtml\u003e...\u003c/html\u003e`\n\nCheck out example programs in the [`examples/`](examples/) directory in this repo.\n\nNote: `WEBVIEW_MAIN` is a macro that resolves to the correct entry point:\n\n```c++\n#ifdef WEBVIEW_WIN\n#define WEBVIEW_MAIN int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)\n#else\n#define WEBVIEW_MAIN int main(int, char **)\n#endif\n```\n\nThis is needed since Win32 GUI applications uses `WinMain` as the entry point rather than the standard `main`. You can write your own main for more control, but make sure to use `WinMain` if you need to support Windows.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelkim%2Fwebview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelkim%2Fwebview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelkim%2Fwebview/lists"}