Add private header for wxWebViewChromium Mac-specific functions

Instead of just declaring the function inline in the common code, do it
in a header included from both common C++ and Mac Objective C++ sources.

No real changes.
This commit is contained in:
Vadim Zeitlin 2023-09-05 16:10:48 +02:00
parent 88b0a10f73
commit 0dffac1829
3 changed files with 23 additions and 4 deletions

View file

@ -0,0 +1,16 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/private/webview_chromium.h
// Purpose: Functions used in wxWebViewChromium Mac implementation
// Author: Vadim Zeitlin
// Created: 2023-09-05
// Copyright: (c) 2023 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_PRIVATE_WEBVIEW_CHROMIUM_H_
#define _WX_OSX_PRIVATE_WEBVIEW_CHROMIUM_H_
// Called during startup to add CefAppProtocol support to wxNSApplication.
void wxWebViewChromium_InitOSX();
#endif // _WX_OSX_PRIVATE_WEBVIEW_CHROMIUM_H_

View file

@ -29,6 +29,10 @@
#include <gdk/gdkx.h>
#endif
#ifdef __WXOSX__
#include "wx/osx/private/webview_chromium.h"
#endif
#ifdef __VISUALC__
#pragma warning(push)
#pragma warning(disable:4100)
@ -1238,10 +1242,6 @@ bool SchemeHandler::ReadResponse(void* data_out,
return has_data;
}
#ifdef __WXOSX__
void wxWebViewChromium_InitOSX();
#endif
namespace
{

View file

@ -12,6 +12,9 @@
#import "Cocoa/Cocoa.h"
#include <objc/runtime.h>
#include "wx/log.h"
#include "wx/osx/private/webview_chromium.h"
#import "include/cef_application_mac.h"
/*