initial commit

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2025-10-31 23:37:30 +01:00
commit bf6b52fd94
9654 changed files with 4035664 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
/////////////////////////////////////////////////////////////////////////////
// Name: webview_chromium_impl.h
// Purpose: Documentation for wxWebViewChromium implementation helpers
// Author: Vadim Zeitlin
// Created: 2024-02-17
// Copyright: (c) 2024 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
Helper class to simplify creating custom CefClient subclasses.
Please note that the application including this header must set up the
compiler options to include the CEF directory as one of the include paths,
as this header -- unlike wx/webview_chromium.h -- includes CEF headers.
Here is a simple example of using this class to customize processing the
messages received from the other CEF processes:
@code
#include <wx/webview_chromium_impl.h>
struct CustomClient : wxDelegatingCefClient
{
using wxDelegatingCefClient::wxDelegatingCefClient;
static CefClient* Create(CefClient* client, void* WXUNUSED(data)
{
return new CustomClient(client);
}
bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) override
{
// Handle the message here.
return true; // or false if not handled
}
};
void MyFunction()
{
wxWebViewConfiguration config = wxWebView::NewConfiguration(wxWebViewBackendChromium);
auto configChrome =
static_cast<wxWebViewConfigurationChromium*>(config.GetNativeConfiguration());
configChrome->m_clientCreate = &CustomClient::Create;
auto webview = new wxWebViewChromium(config);
if ( !webview->Create(this, wxID_ANY, url) )
{
// Handle error.
}
}
@endcode
@since 3.3.0
@category{webview}
*/
class wxDelegatingCefClient : CefClient
{
};