Language | Old default | New default |
---|---|---|
C++ | extern |
inline |
C | extern |
extern |
If you relied on the old default being extern
when using a C++ compiler then you should either define WEBVIEW_STATIC
or WEBVIEW_API=extern
.
webview_return()
no longer evaluates the passed-in result as JavaScript but instead parses it as JSON. The new behavior is consistent with the documented behavior while the old behavior wasn't. Use webview_eval()
if you need to evaluate JavaScript code.
If you relied on the library's management of the application lifecycle when passing in an existing window to the library then you should now either manage the lifecycle by yourself or let the library create the window.
Specific things that are now only done by the library when the window is created for you:
Platform | What |
---|---|
Linux | Call to gtk_init_check() . |
Windows | COM initialization and DPI awareness enablement. |
- Use opaque
webview_t
type instead ofstruct webview
. Size, title and URL are controlled via API setter functions. Invoke callback has been replaced withwebview_bind()
andwebview_return()
to make native function bindings inter-operate with JS. - 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. webview_init()
is replaced bywebview_create()
which creates a new webview instance.webview_exit()
has been replaced with more meaningfulwebview_destroy()
.- Main UI loop with
webview_loop()
inside has been replaced withwebview_run()
runs infinitely until the webview window is closed. webview_terminate()
remains the same.webview_dispatch()
remains the same.webview_set_title()
remains the same.webview_set_color()
has been removed. Usewebview_get_window
and native window APIs to control colors, transparency and other native window properties. At some point these APIs might be brought back.webview_set_fullscreen()
has been removed, see above.webview_dialog()
has been removed. But I'd like to see it added back as a separate independent module or library.webview_eval()
remains the same.webview_inject_css()
has been removed. Usewebview_eval()
to create style tag manually.webview_debug()
has been removed. Use whatever fits best to your programming language and environment to debug your GUI apps.