GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • GUI

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — webview Alternatives - C++ GUI | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

webview

Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).

webview logo
Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
9.2
Declining
Activity
4.7
-
Stars 14,347
Watchers 230
Forks 1,092
Last Commit about 1 month ago

Description

A tiny cross-platform webview library for C/C++/Golang.

It uses Cocoa/WebKit on macOS, gtk-webkit on Linux and good old MSHTML on Windows.

Programming language: C++
License: MIT License
Tags: GUI     Lightweight     Cross-platform    
Latest version: v0.1.1

webview alternatives and similar libraries

Based on the "GUI" category.
Alternatively, view webview alternatives based on common mentions on social networks and blogs.

  • imgui

    9.9 9.7 L1 webview VS imgui
    Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
    ocornut logo
  • Modern C++ Programming

    9.3 6.6 webview VS Modern C++ Programming
    Modern C++ Programming Course (C++03/11/14/17/20/23/26)
    federico-busato logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • xmake

    9.0 9.8 webview VS xmake
    🔥 A cross-platform build utility based on Lua
    xmake-io logo
  • nuklear

    8.9 8.2 webview VS nuklear
    A single-header ANSI C immediate mode cross-platform GUI library
    Immediate-Mode-UI logo
  • libui

    8.9 0.0 webview VS libui
    Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
    andlabs logo
  • wxWidgets

    8.8 9.9 L1 webview VS wxWidgets
    Cross-Platform C++ GUI Library
    wxWidgets logo
  • FTXUI

    8.8 9.1 webview VS FTXUI
    Features: - Functional style. Inspired by [1] and React - Simple and elegant syntax (in my opinion). - Support for UTF8 and fullwidth chars (→ 测试). - No dependencies. - Cross platform. Linux/mac (main target), Windows (experimental thanks to contributors), - WebAssembly. - Keyboard & mouse navigation. Operating systems: - linux emscripten - linux gcc - linux clang - windows msvc - mac clang
    ArthurSonzogni logo
  • Duilib

    8.7 0.0 webview VS Duilib
    GUI
    duilib logo
  • Stacer

    8.7 3.4 webview VS Stacer
    Linux System Optimizer and Monitoring - https://oguzhaninan.github.io/Stacer-Web
    oguzhaninan logo
  • NanoGUI

    8.0 0.0 webview VS NanoGUI
    Minimalistic GUI library for OpenGL
    wjakob logo
  • RmlUi

    7.8 8.7 webview VS RmlUi
    RmlUi - The HTML/CSS User Interface library evolved
    mikke89 logo
  • Elements C++ GUI library

    7.5 9.4 webview VS Elements C++ GUI library
    Elements C++ GUI library
    cycfi logo
  • SixtyFPS

    7.3 9.9 webview VS SixtyFPS
    DISCONTINUED. Slint is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript. [Moved to: https://github.com/slint-ui/slint]
    sixtyfpsui logo
  • Yue

    7.3 6.6 webview VS Yue
    A library for creating native cross-platform GUI apps
    yue logo
  • GacUI

    7.2 9.9 L1 webview VS GacUI
    Native C++ UI library, cross-platform, MVVM and data binding, XML description, multi-language, core/renderer cross-process separation, etc
    vczh-libraries logo
  • Turbo Vision

    7.2 7.6 webview VS Turbo Vision
    A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
    magiblot logo
  • nana

    7.1 0.0 L1 webview VS nana
    a modern C++ GUI library
    cnjinhao logo
  • Sciter

    7.1 0.0 webview VS Sciter
    Sciter: the Embeddable HTML/CSS/JS engine for modern UI development
    sciter-sdk logo
  • FLTK

    6.9 9.6 webview VS FLTK
    FLTK - Fast Light Tool Kit - https://github.com/fltk/fltk - cross platform GUI development
    fltk logo
  • GTK+

    6.6 9.9 L3 webview VS GTK+
    Read-only mirror of https://gitlab.gnome.org/GNOME/gtk
    GNOME logo
  • libRocket

    5.9 0.0 L2 webview VS libRocket
    libRocket - The HTML/CSS User Interface library
    libRocket logo
  • PDCurses

    5.7 2.4 L3 webview VS PDCurses
    A curses library for environments that don't fit the termcap/terminfo model.
    wmcbrine logo
  • copperspice

    5.7 8.5 webview VS copperspice
    Set of cross platform C++ libraries (Core, Gui, Network, Multimedia, SQL, Vulkan, etc)
    copperspice logo
  • SOUI

    5.5 2.1 webview VS SOUI
    SOUI是目前为数不多的轻量级可快速开发window桌面程序开源DirectUI库.其前身为Duiengine,更早期则是源自于金山卫士开源版本UI库Bkwin.经过多年持续更新方得此库
    SOUI2 logo
  • MyGUI

    5.4 9.7 L2 webview VS MyGUI
    Fast, flexible and simple GUI.
    MyGUI logo
  • xtd

    5.3 9.9 webview VS xtd
    Free open-source modern C++20/23 framework to create console (CLI), forms (GUI like WinForms) and unit test (xUnit) applications and libraries on Windows, macOS, Linux, iOS, Android, FreeBSD, Haiku, and SerenityOS.
    gammasoft71 logo
  • FINAL CUT

    5.3 8.5 webview VS FINAL CUT
    A Modern C++ Text-Based Widget Toolkit (TUI)
    gansm logo
  • saucer

    4.9 7.7 webview VS saucer
    🛸 A modern, cross-platform C++ webview library
    saucer logo
  • cuda-api-wrappers

    4.9 4.7 webview VS cuda-api-wrappers
    Thin C++-flavored header-only wrappers for core CUDA APIs: Runtime, Driver, NVRTC, NVTX.
    eyalroz logo
  • MeshLib

    4.9 9.9 webview VS MeshLib
    3D geometry processing SDK: fast mesh boolean, mesh repair, decimation, remeshing, offset, point cloud triangulation and ICP registration. C++ with Python, C#, C and JavaScript bindings.
    MeshInspector logo
  • CEGUI

    4.7 - webview VS CEGUI
    Flexible, cross-platform GUI library.
  • neoGFX

    4.1 9.6 webview VS neoGFX
    Cross-platform GPU-oriented C++ application/game framework
    i42output logo
  • CTPG

    3.8 3.9 webview VS CTPG
    Compile Time Parser Generator is a C++ single header library which takes a language description as a C++ code and turns it into a LR1 table parser with a deterministic finite automaton lexical analyzer, all in compile time.
    peter-winter logo
  • Brisk

    3.5 8.3 webview VS Brisk
    Cross-platform C++20 GUI framework featuring MVVM architecture, reactive capabilities, and scalable, accelerated GPU rendering.
    brisklib logo
  • Refureku

    3.1 0.0 webview VS Refureku
    Cross-platform C++17 Runtime Reflection Library
    jsoysouvanh logo
  • eventbus

    3.1 4.7 webview VS eventbus
    A simple, header only event bus library written in modern C++17.
    ptsouchlos logo
  • gtkmm

    3.0 7.8 webview VS gtkmm
    Read-only mirror of https://gitlab.gnome.org/GNOME/gtkmm
    GNOME logo
  • ncurses

    2.6 7.6 webview VS ncurses
    snapshots of ncurses - see https://invisible-island.net/personal/git-exports.html (no pull requests are accepted)
    ThomasDickey logo
  • Vaca

    2.6 3.8 webview VS Vaca
    C++ Win32 wrapper to develop GUI apps
    dacap logo
  • newt

    2.1 3.1 webview VS newt
    Mirror of https://gitlab.com/newt-ui/newt
    mlichvar logo
  • Clip Library

    2.0 6.3 L3 webview VS Clip Library
    Cross-platform C++ library to copy/paste clipboard content
    aseprite logo
  • sling

    1.8 3.8 webview VS sling
    Lightweight C++ Signals and Slots implementation
    adrg logo
  • Ultra App Kit

    1.5 9.6 webview VS Ultra App Kit
    Documentation contents for Leadwerks Game Engine 5
    Leadwerks logo
  • NeoQCP

    1.5 9.7 webview VS NeoQCP
    A modernized fork of QCustomPlot: Qt6-only, QRhi rendering, Meson build, zero-copy plotting
    SciQLop logo
  • fox-toolkit

    1.4 0.0 webview VS fox-toolkit
    DISCONTINUED. Unofficial Zenotech specific mirror of fox-toolkit; please refer to upstream site for latest version
    zenotech logo
  • QCustomPlot

    1.4 - webview VS QCustomPlot
    Qt plotting widget without further dependencies. [GPLv3]
  • genetic

    1.4 1.9 webview VS genetic
    A performant and flexible genetic algorithm implemented in C++20/23.
    ptsouchlos logo
  • Omnirefl

    1.3 8.7 webview VS Omnirefl
    Seamless C++ reflection for a focused feature set, without macros or UB (before C++26).
    sergio-eld logo
  • static_string

    1.3 2.7 webview VS static_string
    Experimental compile-time string manipulation C++17 library
    ChristianPanov logo
  • MiniOAuth2

    1.3 5.9 webview VS MiniOAuth2
    A lightweight, header-only C++20 library for OAuth 2.0 Authorization Code Flow with PKCE . built for Crow, usable anywhere.
    Mhr1375 logo

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of webview or a related project?

Add another 'GUI' Library

Popular Comparisons

  • webview
    vs
    imgui
  • webview
    vs
    gtkmm
  • webview
    vs
    Sciter
  • webview
    vs
    FLTK
  • webview
    vs
    nuklear

README

webview

Join the chat at https://gitter.im/zserge/webview Build Status GoDoc Go Report Card

A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Nim bindings, Haskell, C# bindings and Java bindings available.

The goal of the project is to create a common HTML5 UI abstraction layer for the most widely used platforms.

It supports two-way JavaScript bindings (to call JavaScript from C/C++/Go and to call C/C++/Go from JavaScript).

It uses Cocoa/WebKit on macOS, gtk-webkit2 on Linux and Edge on Windows 10.

Webview for Go developers

If you are interested in writing Webview apps in C/C++, skip to the next section.

Getting started

Install Webview library with go get:

$ go get github.com/webview/webview

Import the package and start using it:

package main

import "github.com/webview/webview"

func main() {
    debug := true
    w := webview.New(debug)
    defer w.Destroy()
    w.SetTitle("Minimal webview example")
    w.SetSize(800, 600, webview.HintNone)
    w.Navigate("https://en.m.wikipedia.org/wiki/Main_Page")
    w.Run()
}

To build the app use the following commands:

# Linux
$ go build -o webview-example && ./webview-example

# MacOS uses app bundles for GUI apps
$ mkdir -p example.app/Contents/MacOS
$ go build -o example.app/Contents/MacOS/example
$ open example.app # Or click on the app in Finder

# Windows requires special linker flags for GUI apps.
# It's also recommended to use TDM-GCC-64 compiler for CGo.
# http://tdm-gcc.tdragon.net/download
$ go build -ldflags="-H windowsgui" -o webview-example.exe

For more details see godoc.

Distributing webview apps

On Linux you get a standalone executable. It will depend on GTK3 and GtkWebkit2, so if you distribute your app in DEB or RPM format include those dependencies. An application icon can be specified by providing a .desktop file.

On MacOS you are likely to ship an app bundle. Make the following directory structure and just zip it:

example.app
└── Contents
    ├── Info.plist
    ├── MacOS
    |   └── example
    └── Resources
        └── example.icns

Here, Info.plist is a property list file and *.icns is a special icon format. You may convert PNG to icns online.

On Windows you probably would like to have a custom icon for your executable. It can be done by providing a resource file, compiling it and linking with it. Typically, windres utility is used to compile resources. Also, on Windows, webview.dll and WebView2Loader.dll must be placed into the same directory with your app executable.

Also, if you want to cross-compile your webview app - use xgo.

Migrating from v0.1.1 to v0.10.0

  1. webview.Open() has been removed. Use other webview APIs to create a window, open a link and run main UI loop.
  2. webview.Debug() and webview.Debugf() have been removed. Use your favorite logging library to debug webview apps.
  3. webview.Settings struct has been removed. Title, URL and size are controlled via other API setters and can be updated at any time, not only when webview is created.
  4. Webview.Loop() has been removed. Use Run() instead.
  5. WebView.Run(), WebView.Terminate(), WebView.SetTitle(), WebView.Dispatch() stayed the same.
  6. WebView.Exit() has been renamed to WebView.Destroy()
  7. WebView.SetColor() and WebView.SetFullScreen() have been removed. Use Window() to get native window handle and probably write some Cgo code to adjust native window to your taste.
  8. webview.Dialog has been removed. But it is likely to be brought back as a standalone module.
  9. WebView.Eval() remained the same.
  10. WebView.InjectCSS() has been removed. Use eval to inject style tag with CSS inside.
  11. WebView.Bind() kept the name, but changed the semantics. Only functions can be bound. Not the structs, like in Lorca.

Webview for C/C++ developers

Download webview.h and include it in your C/C++ code:

C++:

// main.cc
#include "webview.h"
#ifdef WIN32
int WINAPI WinMain(HINSTANCE hInt, HINSTANCE hPrevInst, LPSTR lpCmdLine,
                   int nCmdShow) {
#else
int main() {
#endif
  webview::webview w(true, nullptr);
  w.set_title("Minimal example");
  w.set_size(480, 320, WEBVIEW_HINT_NONE);
  w.navigate("https://en.m.wikipedia.org/wiki/Main_Page");
  w.run();
  return 0;
}

Build it:

# Linux
$ c++ main.cc `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0` -o webview-example
# MacOS
$ c++ main.cc -std=c++11 -framework WebKit -o webview-example
# Windows (x64)
$ c++ main.cc -mwindows -L./dll/x64 -lwebview -lWebView2Loader -o webview-example.exe

C:

// main .c
#include "webview.h"
#ifdef WIN32
int WINAPI WinMain(HINSTANCE hInt, HINSTANCE hPrevInst, LPSTR lpCmdLine,
                   int nCmdShow) {
#else
int main() {
#endif
    webview_t w = webview_create(0, NULL);
    webview_set_title(w, "Webview Example");
    webview_set_size(w, 480, 320, WEBVIEW_HINT_NONE);
    webview_navigate(w, "https://en.m.wikipedia.org/wiki/Main_Page");
    webview_run(w);
    webview_destroy(w);
    return 0;
}

Build it:

# Linux
$ g++ main.c `pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0` -o webview-example
# MacOS
$ g++ main.c -std=c++11 -framework WebKit -o webview-example
# Windows (x64)
$ g++ main.c -mwindows -L./dll/x64 -lwebview -lWebView2Loader -o webview-example.exe

On Windows it is possible to use webview library directly when compiling with cl.exe, but WebView2Loader.dll is still required. To use MinGW you may dynamically link prebuilt webview.dll (this approach is used in Cgo bindings).

Full C/C++ API is described at the top of the webview.h file.

Migrating from v0.1.1 to v0.10.0

  1. Use opaque webview_t type instead of struct webview. Size, title and URL are controlled via API setter functions. Invoke callback has been replaced with webview_bind() and webview_return() to make native function bindings inter-operate with JS.
  2. If you have been using simplified webview() API to only open a single URL in a webview window - this function has been removed. You now have to create a new webview instance, configure and run it explicitly.
  3. webview_init() is replaced by webview_create() which creates a new webview instance.
  4. webview_exit() has been replaced with more meaningful webview_destroy().
  5. Main UI loop with webview_loop() inside has been replaced with webview_run() runs infinitely until the webview window is closed.
  6. webview_terminate() remains the same.
  7. webview_dispatch() remains the same.
  8. webview_set_title() remains the same.
  9. webview_set_color() has been removed. Use webview_get_window and native window APIs to control colors, transparency and other native window properties. At some point these APIs might be brought back.
  10. webview_set_fullscreen() has been removed, see above.
  11. webview_dialog() has been removed. But I'd like to see it added back as a separate independent module or library.
  12. webview_eval() remains the same.
  13. webview_inject_css() has been removed. Use webview_eval() to create style tag manually.
  14. webview_debug() has been removed. Use whatever fits best to your programming language and environment to debug your GUI apps.

Notes

Execution on OpenBSD requires wxallowed mount(8) option. For Ubuntu Users run sudo apt install webkit2gtk-4.0(Try with webkit2gtk-4.0-dev if webkit2gtk-4.0 is not found) to install webkit2gtk-4.0 related items. FreeBSD is also supported, to install webkit2 run pkg install webkit2-gtk3.

License

Code is distributed under MIT license, feel free to use it in your proprietary projects as well.


*Note that all licence references and agreements mentioned in the webview README section above are relevant to that project's source code only.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.