Commit graph

173 commits

Author SHA1 Message Date
Vadim Zeitlin
30c8c64e45 Allow changing wxWebViewBackendChromium data directory path
Use the value provided via wxWebViewConfiguration::SetDataPath() if any.
2024-01-06 03:20:50 +01:00
Vadim Zeitlin
c109f7f593 Implement SetProxy() in wxWebViewChromium too
Update the documentation to mention that it supports it and add an
example showing how to call this function.
2023-09-08 01:34:59 +02:00
Vadim Zeitlin
81283f84dd Merge branch 'master' into webview-chromium-new
This pulls in wxWebView::SetProxy() addition.
2023-09-08 01:34:21 +02:00
Vadim Zeitlin
0fd6cf99a3 Implement wxWebView::SetProxy() for Edge backend
Currently it can only be called before Create() because it has to be
passed via the additional browser arguments and can't be changed later.
2023-09-07 15:33:39 +02:00
Vadim Zeitlin
7c5d30fb32 Add wxWebView::SetProxy() and implement it for WebKit2 backend
Update the sample to allow specifying the proxy in it.
2023-09-07 15:33:39 +02:00
Vadim Zeitlin
92f6f164b3 Add wxEVT_WEBVIEW_CREATED for wxWebViewChromium async creation
wxWebViewChromium creation is asynchronous and the object can't be
really used until OnAfterCreated() is called, so expose this in the
public API via a new event sent when the object becomes actually usable.

As a side effect, add a convenient wxWebViewEvent ctor taking wxWebView
as argument and calling SetEventObject() itself, instead of forcing all
code creating wxWebViewEvents to do it.
2023-09-06 03:50:34 +02:00
Vadim Zeitlin
b6bfdd97c9 Merge branch 'master' into webview-chromium
Update to the latest master.
2023-08-30 02:03:00 +02:00
Tobias Taschner
8038195952
Unify entries in wxWebViewEvent table 2023-03-24 15:10:42 +01:00
Tobias Taschner
e15a1ac18e
Add wxWebViewWindowFeatures and event
This replaces the previously implemented wxWebViewWindowInfo.

It explicitly breaks the previous API to enable WebKitGTK
integration and to make the usage in application code less error prone.

A new event wxEVT_WEBVIEW_NEWWINDOW_FEATURES is added to allow
access to the window features and the child web view.
2023-03-24 15:10:21 +01:00
Tobias Taschner
8d0685ee08
Add wxWebViewConfiguration support for webkitgtk2
Allows setting some webview settings which would be unavailable after
creation.
2023-03-24 15:10:20 +01:00
Tobias Taschner
b48e5b4c66
Add wxWebViewConfiguration::SetDataPath()
While currently only implemented for the Edge backend GTK webkit could
also make use of such a setting.

Fixes: #19317
2023-03-17 09:29:46 +01:00
Tobias Taschner
dd4d5c75af
Add wxWebViewConfiguration
In 40ff38b63b wxWebView::GetNativeConfiguration() was
added which isn't suitable if multiple wxWebViewEdge instances are created with
different options (as they must share the same options). To prevent such errors
the previous method is replaced by the new class wxWebViewConfiguration which
can be shared between various wxWebView instances.

This explicitly breaks API to improve usage.

In the future the new class could also enable a good way to wrap various
common options/configurations available via native API.
2023-03-17 09:29:46 +01:00
Vadim Zeitlin
63ee6a3aa4 Consistently use "JavaScript", not "javascript", in documentation 2023-03-12 13:56:24 +01:00
Tobias Taschner
01ee3942f8
Add wxWebView child window handling
Add new class wxWebViewWindowInfo:
This new class returned by wxWebViewEvent::GetTargetWindowInfo() allows
to get information about the window that is about to be opened and to
set the window that will be used to display the content.
2023-03-09 14:30:19 +01:00
Tobias Taschner
45d5de6a26
Add wxEVT_WEBVIEW_WINDOW_CLOSE_REQUESTED
This event is usually triggered by javascript calling window.close()
2023-03-09 14:29:25 +01:00
Tobias Taschner
be10ce0713 Add wxWebViewEvent::IsTargetMainFrame()
Allows to determine if a navigation is happening in the main frame
or an embedded iframe when handling wxEVT_WEBVIEW_NAVIGATING.

Additionally implement previously missing wxEVT_WEBVIEW_NAVIGATING
events for frames with the Edge backend.

See #23238.
2023-02-08 17:42:06 +01:00
Tobias Taschner
b9e776ae43 Allow calling wxWebViewEdge::SetUserAgent() after Create()
Additionally implement wxWebViewEdge::GetUserAgent() via SDK.

This functionality is available with the slightly newer
WebView2 SDK required by previous changes.

See #23225.
2023-02-06 13:55:30 +01:00
Tobias Taschner
db9419af4b
Add wxWebView::EnableBrowserAcceleratorKeys()
The edge backend has various accelerator keys enable per default.
This include Ctrl-P, Ctrl-F, F5 and others. In many uses of webview
this might not be desirable and can be disabled.

This is currently only implemented for the Edge backend.

Raises required WebView2 SDK version from 1.0.705.50 to 1.0.864.35
2022-12-23 14:12:36 +01:00
PB
fc9c9c0e1b Fix the name of EVT_WEBVIEW_FULLSCREEN_CHANGED macro in the docs
It had an extra underscore in it (EVT_WEBVIEW_FULL_SCREEN_CHANGED).

Closes #22947.

Closes #22948.
2022-11-08 18:51:31 +01:00
Tobias Taschner
48dba42e7e
Remove mentions of C++11 in docs
Since wxWidgets now requires C++11 it's not necessary to point
out C++11 features as such explicitly.
2022-10-19 21:50:30 +02:00
Vadim Zeitlin
4f4c5fcfdf Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.

Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.

And also use null in the assert messages.

Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
2022-10-18 01:25:25 +02:00
PB
88d526660f Replace wxOVERRIDE and wxNOEXCEPT with override and noexcept
Don't use deprecated macros in wxWidgets itself.
2022-10-15 18:10:45 +02:00
Tobias Taschner
cd552b3741 Fix typos in wxWebView docs
Closes #22822.
2022-09-24 15:14:53 +02:00
Tobias Taschner
9ea1423eda
Additional wxWebView documentation tweaks 2022-09-19 20:43:41 +02:00
Tobias Taschner
5ab7151ada
Apply suggestions from code review
Co-authored-by: VZ <vz-github@zeitlins.org>
2022-09-19 19:41:42 +02:00
Tobias Taschner
b7a233753a
Document wxWebView::StartRequest()
Document the new method on associated classes.
2022-09-16 21:00:52 +02:00
Tobias Taschner
6780383163
Fix wxWebView documentation grouping
Set/GetUserAgent() where grouped under "Dev Tools"
2022-09-09 18:07:00 +02:00
Tobias Taschner
40ff38b63b
Add wxWebView::GetNativeConfiguration()
New method to return the pointer to the native configuration used during
the creation of the web view

This allows for customization that would not be available to the
application otherwise.
2022-09-09 18:00:04 +02:00
Tim Stahlhut
4010140491 Don't use non-ASCII characters in interface headers
Replace "’s" with "'s" in interface headers as the former broke wxPython
build with SIP under MSW.

Closes #22605.
2022-07-06 00:26:54 +02:00
Scott Talbert
db8eb640eb Document missing wxWebView events 2022-04-26 20:12:24 -04:00
Scott Talbert
6fa4e1b912 Fix wxWebViewFactory::GetVersionInfo documentation 2022-04-18 23:25:13 -04:00
Tobias Taschner
57ebad4f7d
Allow usage of static loader with wxWebViewEdge
Add a new build option wxUSE_WEBVIEW_EDGE_STATIC.
If it is set to 1 the WebView2 loader is static linked into the binary
and removes the runtime dependency on WebView2Loader.dll.
2022-02-07 22:49:33 +01:00
Tobias Taschner
ab7098b33b
Add note to RunScript() to recommend RunScriptAsync() 2021-11-05 10:04:45 +01:00
Tobias Taschner
9114122837
Additional wxWebView::RunScriptAsync() documentation 2021-11-03 14:04:23 +01:00
Tobias Taschner
d31f1dc400
Add wxWebViewEvent::IsError() 2021-11-03 13:35:24 +01:00
Tobias Taschner
d93db6bba5
Add initial RunScriptAsync() documentation 2021-11-03 11:19:09 +01:00
Tobias Taschner
a756ed93c2 wxWebViewEdge: Improve wxEVT_WEBVIEW_LOADED
Previously the edge event ContentLoading was used which was
triggered earlier than DOMContentLoaded. This event wasn't
available in earlier SDK versions.

Minimum required SDK version is now:
1.0.705.50 (Released 2021-01-25)

Fixes #19202

See https://github.com/wxWidgets/wxWidgets/pull/2468
2021-08-17 23:50:13 +02:00
Ian McInerney
33c1088aad Escape the HTML tags in the doxygen comments 2021-05-21 02:26:31 +01:00
Ian McInerney
4bb1fe8e0a Fix doxygen section bugs 2021-05-21 02:26:24 +01:00
Vadim Zeitlin
4a08c5f965 Document wxWebView backend name constants
Mention the constants that are used to identify the backends.

Closes #19168.
2021-05-01 14:25:18 +02:00
Tobias Taschner
97e469c255
Add access to user agent for wxWebView
Allow setting a custom user agent for a webview.
Also allow access to the current user agent.
2021-03-16 22:53:00 +01:00
Vadim Zeitlin
c88f23db3e Merge branch 'doc_misc' of https://github.com/TcT2k/wxWidgets
Various wxWebView docs improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2266
2021-03-13 13:27:00 +01:00
Blake Madden
28d705424b Fix double words and article mismatches in docs. 2021-03-10 14:28:20 -05:00
Tobias Taschner
ecce094522
Document previously missing macOS wxWebView features 2021-03-09 22:13:15 +01:00
Tobias Taschner
b493970336
Apply suggestions from code review
Co-authored-by: VZ <vz-github@zeitlins.org>
2021-03-09 22:09:16 +01:00
Tobias Taschner
4e2b746ec2
Update wxWebView documentation
- Use subsections
- Unify layout of backend sections
- Refer to backends by consistent naming
- Remove Trident reference (while technically correct it's probably not very helpful for most)
- Add a warning to IE backend
- Add wxWebViewEdge doc
- Add missing event from wxWebViewEvent docs
2021-03-09 22:09:16 +01:00
Tobias Taschner
1e42ea4e97
Update some outdated notes from wxWebView docs 2021-03-09 22:09:15 +01:00
Tobias Taschner
80c04e3941
Merge branch 'master' into webview_script_message 2021-03-01 09:57:13 +01:00
Maarten Bent
7532532800 Mention GCC/Clang support in wxWebViewEdge documentation
And add a comment explaining the name of the EventRegistrationToken include guard.
2021-03-01 00:09:23 +01:00
Tobias Taschner
5a30bbe38f
Apply suggestions from code review
Co-authored-by: PB <PBforDev@gmail.com>
2021-02-28 22:33:15 +01:00