Skip to content

Latest commit

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

splash

Features

  • Rapid development of desktop applications using the Web technologies
  • Minimum application weight due to the use of the WebView system component
  • A very simple library with a simple C/C++ interface
  • Supports bindings of an async functions (only C++)

Build

Requirements

  • Windows

    • WebView2 Edge
    • Python 3.10+ (Optional)
    • Microsoft Visual Studio /or Build Tools 2022
  • Linux

    • GTK 4
    • WebkitGTK 6.0
    • LibAdwaita 1.0
    • Python 3.10+ (Optional)
    • Clang 18

Examples

#include<webview.hpp>int32_tmain(int32_t argc, char** argv) {
try {
libwebview::App app("TestApp", "Test App", 800, 600, true, true);
app.run("resources/index.html");
returnEXIT_SUCCESS;
} catch(std::runtime_error e) {
std::cerr << e.what() << std::endl;
returnEXIT_FAILURE;
}
}
#include<webview.hpp>int32_tmain(int32_t argc, char** argv) {
try {
libwebview::App app("TestApp", "Async App", 800, 600, true, true);
app.bind("asyncHelloWorld", []() -> libwebview::result<void> {
// Emulate high load workstd::this_thread::sleep_for(std::chrono::seconds(5));
std::cout << "Async hello world!" << std::endl;
co_return;
});
app.run("resources/index.html");
returnEXIT_SUCCESS;
} catch(std::runtime_error e) {
std::cerr << e.what() << std::endl;
returnEXIT_FAILURE;
}
}

Python Bindings

Install

pip install libwebview

Python Example

fromlibwebviewimportAppapp=App(
app_name="TestApp",
title="Test App", size=(800, 600), resizeable=True)
app.set_max_size((0, 0))
app.set_min_size((500, 400))
defwindow_close():
app.quit()
app.bind(window_close)
app.run("resources/index.html")

Showcase

ionengine-editor

notes

Roadmap

  • Windows implementation (WebView2 Edge)
  • Linux implementation (WebKit)

About

Library for the application development using WebView

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages