diff --git a/.gitignore b/.gitignore index f16d258..693102c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,19 +6,16 @@ # Node artifact files node_modules/ dist/ -<<<<<<< HEAD build/* release/* save/* .cache/* .vscode/* -======= /build build/ release/ /release ->>>>>>> ff2cd37 (增加屏蔽文件) # Compiled Java class files *.class diff --git a/3rdparty/QCefView/include/QCefCore/CefVersion.h b/3rdparty/QCefView/include/QCefCore/CefVersion.h new file mode 100644 index 0000000..c911c54 --- /dev/null +++ b/3rdparty/QCefView/include/QCefCore/CefVersion.h @@ -0,0 +1,24 @@ +// +// CefVersion.h +// CefViewCore +// +// Created by Sheen Tian on 2025/1/19. +// This file was generated during CMake configuring. +// Do not edit this file directly by manual. +// Edit the CefVersion.h.in and then re-config project with CMake. +// + +#ifndef CefVersion_h +#define CefVersion_h +#pragma once + +// clang-format off +#define CEF_VERSION "134.3.6+g96006d1+chromium-134.0.6998.118" +#define CEF_VERSION_MAJOR 134 +#define CEF_VERSION_MINOR 3 +#define CEF_VERSION_PATCH 6 +#define CEF_COMMIT_NUMBER 3155 +#define CEF_COMMIT_HASH "96006d11935cd82a004d992db6e7124825352e19" +// clang-format on + +#endif // CefVersion diff --git a/3rdparty/QCefView/include/QCefCore/CefViewBrowserApp.h b/3rdparty/QCefView/include/QCefCore/CefViewBrowserApp.h new file mode 100644 index 0000000..e4b49a2 --- /dev/null +++ b/3rdparty/QCefView/include/QCefCore/CefViewBrowserApp.h @@ -0,0 +1,129 @@ +// +// CefViewBrowserApp.h +// CefViewCore +// +// Created by Sheen Tian on 2020/6/11. +// + +#ifndef CefViewBrowserApp_h +#define CefViewBrowserApp_h +#pragma once + +#pragma region stl_headers +#include <unordered_map> +#include <list> +#pragma endregion + +#include <CefViewCoreGlobal.h> +#include <CefViewBrowserAppDelegate.h> +#include <CefViewBrowserClientDelegate.h> + +struct FolderResourceMapping +{ + CefString path; + CefString url; + int priority; +}; + +struct ArchiveResourceMapping +{ + CefString path; + CefString url; + CefString password; + int priority; +}; + +class CefViewBrowserApp + : public CefApp + , public CefBrowserProcessHandler +{ + IMPLEMENT_REFCOUNTING(CefViewBrowserApp); + +private: + // The name of the bridge object + CefString builtin_scheme_name_; + CefString bridge_object_name_; + std::unordered_map<void*, CefViewBrowserClientDelegateInterface::WeakPtr> client_handler_map_; + + // The app delegate + CefViewBrowserAppDelegateInterface::WeakPtr app_delegate_; + + std::list<FolderResourceMapping> folderResourceMappingList_; + + std::list<ArchiveResourceMapping> archiveResourceMappingList_; + +public: + CefViewBrowserApp(const CefString& scheme_name, + const CefString& bridge_name, + CefViewBrowserAppDelegateInterface::RefPtr delegate); + + ~CefViewBrowserApp(); + + void CheckInClient(void* ctx, const CefViewBrowserClientDelegateInterface::RefPtr& handler); + + void CheckOutClient(void* ctx); + + CefViewBrowserClientDelegateInterface::RefPtr GetClientHandler(void* ctx); + + void AddLocalFolderResource(const CefString& path, const CefString& url, int priority = 0); + const std::list<FolderResourceMapping>& FolderResourceMappingList(); + + void AddArchiveResource(const CefString& path, + const CefString& url, + const CefString& password = "", + int priority = 0); + const std::list<ArchiveResourceMapping>& ArchiveResourceMappingList(); + + bool AddGlobalCookie(const CefString& name, + const CefString& value, + const CefString& domain, + const CefString& url); + + bool DeleteAllCookies(); + + bool AddCrossOriginWhitelistEntry(const CefString& sourceOrigin, + const CefString& targetSchema, + const CefString& targetDomain, + bool allowTargetSubdomains); + + bool RemoveCrossOriginWhitelistEntry(const CefString& sourceOrigin, + const CefString& targetSchema, + const CefString& targetDomain, + bool allowTargetSubdomains); + + bool ClearCrossOriginWhitelistEntry(); + + bool IsSafeToExit(); + +private: +#pragma region CefApp + ////////////////////////////////////////////////////////////////////////// + // CefApp methods: + virtual void OnBeforeCommandLineProcessing(const CefString& process_type, + CefRefPtr<CefCommandLine> command_line) override; + + virtual void OnRegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar) override; + + virtual CefRefPtr<CefResourceBundleHandler> GetResourceBundleHandler() override; + + virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() override; + + virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() override; + +#pragma endregion + +#pragma region CefBrowserProcessHandler + ////////////////////////////////////////////////////////////////////////// + // CefBrowserProcessHandler methods: + virtual void OnContextInitialized() override; + + virtual void OnBeforeChildProcessLaunch(CefRefPtr<CefCommandLine> command_line) override; + + virtual void OnScheduleMessagePumpWork(int64_t delay_ms) override; + + CefRefPtr<CefClient> GetDefaultClient() override; + +#pragma endregion +}; + +#endif diff --git a/3rdparty/QCefView/include/QCefCore/CefViewBrowserAppDelegate.h b/3rdparty/QCefView/include/QCefCore/CefViewBrowserAppDelegate.h new file mode 100644 index 0000000..82f0c26 --- /dev/null +++ b/3rdparty/QCefView/include/QCefCore/CefViewBrowserAppDelegate.h @@ -0,0 +1,59 @@ +// +// CefViewBrowserAppDelegate.h +// CefViewCore +// +// Created by Sheen Tian on 2020/6/11. +// + +#ifndef CefViewBrowserAppDelegate_h +#define CefViewBrowserAppDelegate_h +#pragma once + +#pragma region stl_headers +#include <memory> +#pragma endregion + +#include <CefViewCoreGlobal.h> + +/// <summary> +/// +/// </summary> +class CefViewBrowserAppDelegateInterface +{ +public: + /// <summary> + /// + /// </summary> + typedef std::shared_ptr<CefViewBrowserAppDelegateInterface> RefPtr; + + /// <summary> + /// + /// </summary> + typedef std::weak_ptr<CefViewBrowserAppDelegateInterface> WeakPtr; + + /// <summary> + /// + /// </summary> + virtual ~CefViewBrowserAppDelegateInterface(){}; + + /// <summary> + /// + /// </summary> + /// <param name="process_type"></param> + /// <param name="command_line"></param> + virtual void onBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line) = 0; + + /// <summary> + /// + /// </summary> + /// <param name="command_line"></param> + virtual void onBeforeChildProcessLaunch(CefRefPtr<CefCommandLine> command_line) = 0; + + /// <summary> + /// + /// </summary> + /// <param name="delay_ms"></param> + virtual void onScheduleMessageLoopWork(int64_t delay_ms) = 0; +}; + +#endif diff --git a/3rdparty/QCefView/include/QCefCore/CefViewBrowserClient.h b/3rdparty/QCefView/include/QCefCore/CefViewBrowserClient.h new file mode 100644 index 0000000..94123e8 --- /dev/null +++ b/3rdparty/QCefView/include/QCefCore/CefViewBrowserClient.h @@ -0,0 +1,477 @@ +// +// CefViewBrowserClient.h +// CefViewCore +// +// Created by Sheen Tian on 2020/6/11. +// + +#ifndef CefViewBrowserHandler_h +#define CefViewBrowserHandler_h +#pragma once + +#pragma region stl_headers +#include <unordered_map> +#pragma endregion + +#include <CefViewCoreGlobal.h> +#include <CefViewBrowserApp.h> +#include <CefViewBrowserClientDelegate.h> + +#if CEF_VERSION_MAJOR < 122 +#define CEFVIEW_MAIN_FRAME (0) +#define CEFVIEW_ALL_FRAMES (-1) +#else +#define CEFVIEW_MAIN_FRAME ("0") +#define CEFVIEW_ALL_FRAMES ("-1") +#endif + +/// <summary> +/// Forward declaration +/// </summary> +class CefViewQueryHandler; + +/// <summary> +/// +/// </summary> +class CefViewBrowserClient + : public CefClient + , public CefContextMenuHandler + , public CefDialogHandler + , public CefDisplayHandler + , public CefDownloadHandler + , public CefDragHandler + , public CefFindHandler + , public CefFocusHandler + , public CefJSDialogHandler + , public CefKeyboardHandler + , public CefLifeSpanHandler + , public CefLoadHandler + , public CefRequestHandler + , public CefResourceRequestHandler + , public CefRenderHandler +{ + IMPLEMENT_REFCOUNTING(CefViewBrowserClient); + +private: + /// <summary> + /// + /// </summary> + CefRefPtr<CefViewBrowserApp> app_; + + /// <summary> + /// + /// </summary> + CefViewBrowserClientDelegateInterface::WeakPtr client_delegate_; + + // flags + bool is_closing_; + bool close_by_native_; + bool initial_navigation_; + + // message router + CefMessageRouterConfig message_router_config_; + CefRefPtr<CefMessageRouterBrowserSide> message_router_; + CefRefPtr<CefViewQueryHandler> message_router_handler_; + + // resource manager + CefRefPtr<CefResourceManager> resource_manager_; + + // browser map + std::unordered_map<int, CefRefPtr<CefBrowser>> browser_map_; + +public: + /// <summary> + /// + /// </summary> + /// <param name="app_"></param> + /// <param name="delegate"></param> + CefViewBrowserClient(CefRefPtr<CefViewBrowserApp> app, CefViewBrowserClientDelegateInterface::RefPtr delegate); + + /// <summary> + /// + /// </summary> + ~CefViewBrowserClient(); + + /// <summary> + /// + /// </summary> + /// <returns></returns> + int GetBrowserCount() { return static_cast<int>(browser_map_.size()); } + + /// <summary> + /// + /// </summary> + void CloseAllBrowsers(); + + /// <summary> + /// + /// </summary> + /// <param name="dir_path"></param> + /// <param name="url"></param> + /// <param name="priority"></param> + void AddLocalDirectoryResourceProvider(const CefString& dir_path, const CefString& url, int priority = 0); + + /// <summary> + /// + /// </summary> + /// <param name="archive_path"></param> + /// <param name="url"></param> + /// <param name="password"></param> + /// <param name="priority"></param> + void AddArchiveResourceProvider(const CefString& archive_path, + const CefString& url, + const CefString& password, + int priority = 0); + + bool TriggerEvent(CefRefPtr<CefBrowser> browser, const CefFrameId& frame_id, const CefRefPtr<CefProcessMessage> msg); + + /// <summary> + /// + /// </summary> + /// <param name="query"></param> + /// <param name="success"></param> + /// <param name="response"></param> + /// <param name="error"></param> + /// <returns></returns> + bool ResponseQuery(const int64_t query, bool success, const CefString& response, int error); + + /// <summary> + /// + /// </summary> + /// <param name="browser"></param> + /// <param name="frame"></param> + /// <param name="code"></param> + /// <param name="url"></param> + /// <param name="context"></param> + /// <returns></returns> + bool AsyncExecuteJSCode(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const CefString& code, + const CefString& url, + const CefString& context); + +protected: + bool DispatchRenderMessage(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefProcessMessage> message); + + bool OnRenderFocusedNodeChangedMessage(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefProcessMessage> message); + + bool OnRenderInvokeMethodMessage(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefProcessMessage> message); + + bool OnRenderReportJSResultMessage(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefProcessMessage> message); + + // CefClient methods: +#pragma region CefContextMenuHandler + virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefProcessId source_process, + CefRefPtr<CefProcessMessage> message) override; +#pragma endregion + + // CefContextMenuHandler methods +#pragma region CefContextMenuHandler + virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override; + virtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefContextMenuParams> params, + CefRefPtr<CefMenuModel> model) override; + virtual bool RunContextMenu(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefContextMenuParams> params, + CefRefPtr<CefMenuModel> model, + CefRefPtr<CefRunContextMenuCallback> callback) override; + virtual bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefContextMenuParams> params, + int command_id, + EventFlags event_flags) override; + virtual void OnContextMenuDismissed(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame) override; +#pragma endregion + + // CefDialogHandler +#pragma region CefDialogHandler + virtual CefRefPtr<CefDialogHandler> GetDialogHandler() override; + +#if CEF_VERSION_MAJOR < 102 + virtual bool OnFileDialog(CefRefPtr<CefBrowser> browser, + FileDialogMode mode, + const CefString& title, + const CefString& default_file_path, + const std::vector<CefString>& accept_filters, + int selected_accept_filter, + CefRefPtr<CefFileDialogCallback> callback) override; +#elif CEF_VERSION_MAJOR < 126 + virtual bool OnFileDialog(CefRefPtr<CefBrowser> browser, + FileDialogMode mode, + const CefString& title, + const CefString& default_file_path, + const std::vector<CefString>& accept_filters, + CefRefPtr<CefFileDialogCallback> callback) override; +#else + virtual bool OnFileDialog(CefRefPtr<CefBrowser> browser, + FileDialogMode mode, + const CefString& title, + const CefString& default_file_path, + const std::vector<CefString>& accept_filters, + const std::vector<CefString>& accept_extensions, + const std::vector<CefString>& accept_descriptions, + CefRefPtr<CefFileDialogCallback> callback) override; +#endif + +#pragma endregion + + // CefDisplayHandler methods +#pragma region CefDisplayHandler + virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() override; + virtual void OnAddressChange(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& url) override; + virtual void OnTitleChange(CefRefPtr<CefBrowser> browser, const CefString& title) override; + virtual void OnFaviconURLChange(CefRefPtr<CefBrowser> browser, const std::vector<CefString>& icon_urls) override; + virtual void OnFullscreenModeChange(CefRefPtr<CefBrowser> browser, bool fullscreen) override; + virtual bool OnTooltip(CefRefPtr<CefBrowser> browser, CefString& text) override; + virtual void OnStatusMessage(CefRefPtr<CefBrowser> browser, const CefString& value) override; + virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser, + cef_log_severity_t level, + const CefString& message, + const CefString& source, + int line) override; + virtual bool OnAutoResize(CefRefPtr<CefBrowser> browser, const CefSize& new_size) override; + virtual void OnLoadingProgressChange(CefRefPtr<CefBrowser> browser, double progress) override; + virtual bool OnCursorChange(CefRefPtr<CefBrowser> browser, + CefCursorHandle cursor, + cef_cursor_type_t type, + const CefCursorInfo& custom_cursor_info) override; +#pragma endregion + + // CefDownloadHandler +#pragma region CefDownloadHandler + virtual CefRefPtr<CefDownloadHandler> GetDownloadHandler() override; +#if CEF_VERSION_MAJOR < 125 + virtual void OnBeforeDownload(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefDownloadItem> download_item, + const CefString& suggested_name, + CefRefPtr<CefBeforeDownloadCallback> callback) override; +#else + virtual bool OnBeforeDownload(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefDownloadItem> download_item, + const CefString& suggested_name, + CefRefPtr<CefBeforeDownloadCallback> callback) override; +#endif + + void OnDownloadUpdated(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefDownloadItem> download_item, + CefRefPtr<CefDownloadItemCallback> callback) override; +#pragma endregion + + // CefDragHandler methods +#pragma region CefDragHandler + virtual CefRefPtr<CefDragHandler> GetDragHandler() override; + virtual bool OnDragEnter(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefDragData> dragData, + CefDragHandler::DragOperationsMask mask) override; + + virtual void OnDraggableRegionsChanged(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const std::vector<CefDraggableRegion>& regions) override; +#pragma endregion + + // CefFindHandler methods +#pragma region CefFindHandler + virtual CefRefPtr<CefFindHandler> GetFindHandler() override; + virtual void OnFindResult(CefRefPtr<CefBrowser> browser, + int identifier, + int count, + const CefRect& selectionRect, + int activeMatchOrdinal, + bool finalUpdate) override; +#pragma endregion + + // CefFocusHandler methods +#pragma region CefFocusHandler + virtual CefRefPtr<CefFocusHandler> GetFocusHandler() override; + void OnTakeFocus(CefRefPtr<CefBrowser> browser, bool next) override; + bool OnSetFocus(CefRefPtr<CefBrowser> browser, FocusSource source) override; + void OnGotFocus(CefRefPtr<CefBrowser> browser) override; +#pragma endregion + + // CefJSDialogHandler methods +#pragma region CefJSDialogHandler + virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() override; + virtual bool OnJSDialog(CefRefPtr<CefBrowser> browser, + const CefString& origin_url, + JSDialogType dialog_type, + const CefString& message_text, + const CefString& default_prompt_text, + CefRefPtr<CefJSDialogCallback> callback, + bool& suppress_message) override; + virtual bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser, + const CefString& message_text, + bool is_reload, + CefRefPtr<CefJSDialogCallback> callback) override; + virtual void OnResetDialogState(CefRefPtr<CefBrowser> browser) override; + virtual void OnDialogClosed(CefRefPtr<CefBrowser> browser) override; +#pragma endregion + + // CefKeyboardHandler methods +#pragma region CefKeyboardHandler + virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() override; + virtual bool OnPreKeyEvent(CefRefPtr<CefBrowser> browser, + const CefKeyEvent& event, + CefEventHandle os_event, + bool* is_keyboard_shortcut) override; + virtual bool OnKeyEvent(CefRefPtr<CefBrowser> browser, const CefKeyEvent& event, CefEventHandle os_event) override; +#pragma endregion + + // CefLifeSpanHandler methods: +#pragma region CefLifeSpanHandler + virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() override; + virtual bool OnBeforePopup(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, +#if CEF_VERSION_MAJOR > 131 + int popup_id, +#endif + const CefString& target_url, + const CefString& target_frame_name, + CefLifeSpanHandler::WindowOpenDisposition target_disposition, + bool user_gesture, + const CefPopupFeatures& popupFeatures, + CefWindowInfo& windowInfo, + CefRefPtr<CefClient>& client, + CefBrowserSettings& settings, + CefRefPtr<CefDictionaryValue>& extra_info, + bool* no_javascript_access) override; + virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) override; + virtual bool DoClose(CefRefPtr<CefBrowser> browser) override; + virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) override; +#pragma endregion + + // CefLoadHandler methods +#pragma region CefLoadHandler + virtual CefRefPtr<CefLoadHandler> GetLoadHandler() override; + virtual void OnLoadingStateChange(CefRefPtr<CefBrowser> browser, + bool isLoading, + bool canGoBack, + bool canGoForward) override; + virtual void OnLoadStart(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + TransitionType transition_type) override; + virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, int httpStatusCode) override; + virtual void OnLoadError(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + ErrorCode errorCode, + const CefString& errorText, + const CefString& failedUrl) override; +#pragma endregion + + // CefRenderHandler +#pragma region CefRenderHandler + virtual CefRefPtr<CefRenderHandler> GetRenderHandler() override; + virtual CefRefPtr<CefAccessibilityHandler> GetAccessibilityHandler() override; + virtual bool GetRootScreenRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override; + virtual void GetViewRect(CefRefPtr<CefBrowser> browser, CefRect& rect) override; + virtual bool GetScreenPoint(CefRefPtr<CefBrowser> browser, int viewX, int viewY, int& screenX, int& screenY) override; + virtual bool GetScreenInfo(CefRefPtr<CefBrowser> browser, CefScreenInfo& screen_info) override; + virtual void OnPopupShow(CefRefPtr<CefBrowser> browser, bool show) override; + virtual void OnPopupSize(CefRefPtr<CefBrowser> browser, const CefRect& rect) override; + virtual void OnPaint(CefRefPtr<CefBrowser> browser, + PaintElementType type, + const RectList& dirtyRects, + const void* buffer, + int width, + int height) override; +#if CEF_VERSION_MAJOR < 124 + virtual void OnAcceleratedPaint(CefRefPtr<CefBrowser> browser, + PaintElementType type, + const RectList& dirtyRects, + void* shared_handle) override; +#else + virtual void OnAcceleratedPaint(CefRefPtr<CefBrowser> browser, + PaintElementType type, + const RectList& dirtyRects, + const CefAcceleratedPaintInfo& info) override; +#endif + virtual bool StartDragging(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefDragData> drag_data, + CefRenderHandler::DragOperationsMask allowed_ops, + int x, + int y) override; + virtual void UpdateDragCursor(CefRefPtr<CefBrowser> browser, DragOperation operation) override; + virtual void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser, double x, double y) override; + virtual void OnImeCompositionRangeChanged(CefRefPtr<CefBrowser> browser, + const CefRange& selected_range, + const RectList& character_bounds) override; + virtual void OnTextSelectionChanged(CefRefPtr<CefBrowser> browser, + const CefString& selected_text, + const CefRange& selected_range) override; + virtual void OnVirtualKeyboardRequested(CefRefPtr<CefBrowser> browser, TextInputMode input_mode) override; +#pragma endregion + + // CefRequestHandler methods +#pragma region CefRequestHandler + virtual CefRefPtr<CefRequestHandler> GetRequestHandler() override; + virtual bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool user_gesture, + bool is_redirect) override; + + virtual bool OnOpenURLFromTab(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + const CefString& target_url, + CefRequestHandler::WindowOpenDisposition target_disposition, + bool user_gesture) override; +#if CEF_VERSION_MAJOR > 91 && CEF_VERSION_MAJOR < 109 + virtual bool OnQuotaRequest(CefRefPtr<CefBrowser> browser, + const CefString& origin_url, + int64 new_size, + CefRefPtr<CefCallback> callback) override; +#endif + +#if CEF_VERSION_MAJOR < 124 + virtual void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser, TerminationStatus status) override; +#else + virtual void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser, + TerminationStatus status, + int error_code, + const CefString& error_string) override; +#endif + +#pragma endregion + + // CefResourceRequestHandler +#pragma region CefResourceRequestHandler + virtual CefRefPtr<CefResourceRequestHandler> GetResourceRequestHandler(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool is_navigation, + bool is_download, + const CefString& request_initiator, + bool& disable_default_handling) override; + + virtual ReturnValue OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, +#if CEF_VERSION_MAJOR > 91 + CefRefPtr<CefCallback> callback +#else + CefRefPtr<CefRequestCallback> callback +#endif + ) override; + + virtual CefRefPtr<CefResourceHandler> GetResourceHandler(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request) override; + + virtual void OnProtocolExecution(CefRefPtr<CefBrowser> browser, + CefRefPtr<CefFrame> frame, + CefRefPtr<CefRequest> request, + bool& allow_os_execution) override; +#pragma endregion +}; +#endif diff --git a/3rdparty/QCefView/include/QCefCore/CefViewBrowserClientDelegate.h b/3rdparty/QCefView/include/QCefCore/CefViewBrowserClientDelegate.h new file mode 100644 index 0000000..b31e994 --- /dev/null +++ b/3rdparty/QCefView/include/QCefCore/CefViewBrowserClientDelegate.h @@ -0,0 +1,311 @@ +// +// CefViewBrowserHandlerDelegate.h +// CefViewCore +// +// Created by Sheen Tian on 2020/6/11. +// + +#ifndef CefViewBrowserHandlerDelegate_h +#define CefViewBrowserHandlerDelegate_h +#pragma once + +#pragma region stl_headers +#include <memory> +#pragma endregion + +#include <CefViewCoreGlobal.h> + +/// <summary> +/// +/// </summary> +class CefViewBrowserClientDelegateInterface +{ +public: + /// <summary> + /// + /// </summary> + typedef std::shared_ptr<CefViewBrowserClientDelegateInterface> RefPtr; + + /// <summary> + /// + /// </summary> + typedef std::weak_ptr<CefViewBrowserClientDelegateInterface> WeakPtr; + + /// <summary> + /// + /// </summary> + virtual ~CefViewBrowserClientDelegateInterface() {} + + /// <summary> + /// + /// </summary> + /// <param name="browser"></param> + /// <param name="frame"></param> + /// <param name="url"></param> + virtual void processUrlRequest(CefRefPtr<CefBrowser>& browser, CefRefPtr<CefFrame>& frame, const CefString& url) = 0; + + /// <summary> + /// + /// </summary> + /// <param name="browser"></param> + /// <param name="frame"></param> + /// <param name="query"></param> + /// <param name="query_id"></param> + virtual void processQueryRequest(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + const CefString& query, + const int64_t query_id) = 0; + + /// <summary> + /// + /// </summary> + /// <param name="browser"></param> + /// <param name="frame"></param> + /// <param name="focusOnEditableNode"></param> + virtual void focusedEditableNodeChanged(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + bool focusOnEditableNode) = 0; + + /// <summary> + /// + /// </summary> + /// <param name="browser"></param> + /// <param name="frame"></param> + /// <param name="method"></param> + /// <param name="arguments"></param> + virtual void invokeMethodNotify(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + const CefString& method, + const CefRefPtr<CefListValue>& arguments) = 0; + + /// <summary> + /// + /// </summary> + /// <param name="browser"></param> + /// <param name="frame"></param> + /// <param name="context"></param> + /// <param name="result"></param> + virtual void reportJSResult(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + const CefString& context, + const CefRefPtr<CefValue>& result) = 0; + + // context menu handler +#pragma region ContextMenuHandler + virtual void onBeforeContextMenu(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + CefRefPtr<CefContextMenuParams>& params, + CefRefPtr<CefMenuModel>& model) = 0; + virtual bool onRunContextMenu(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + CefRefPtr<CefContextMenuParams>& params, + CefRefPtr<CefMenuModel>& model, + CefRefPtr<CefRunContextMenuCallback>& callback) = 0; + virtual bool onContextMenuCommand(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + CefRefPtr<CefContextMenuParams>& params, + int command_id, + CefContextMenuHandler::EventFlags event_flags) = 0; + virtual void onContextMenuDismissed(CefRefPtr<CefBrowser>& browser, CefRefPtr<CefFrame>& frame) = 0; +#pragma endregion + + // dialog handler +#pragma region DialogHandler + virtual bool onFileDialog(CefRefPtr<CefBrowser>& browser, + CefBrowserHost::FileDialogMode mode, + const CefString& title, + const CefString& default_file_path, + const std::vector<CefString>& accept_filters, +#if CEF_VERSION_MAJOR < 102 + int selected_accept_filter, +#endif + CefRefPtr<CefFileDialogCallback>& callback) + { + return false; + }; +#pragma endregion + + // display handler +#pragma region DisplayHandler + virtual void addressChanged(CefRefPtr<CefBrowser>& browser, CefRefPtr<CefFrame>& frame, const CefString& url) = 0; + + virtual void titleChanged(CefRefPtr<CefBrowser>& browser, const CefString& title) = 0; + + virtual void faviconURLChanged(CefRefPtr<CefBrowser>& browser, const std::vector<CefString>& icon_urls) = 0; + + virtual bool tooltipMessage(CefRefPtr<CefBrowser>& browser, const CefString& text) = 0; + + virtual void fullscreenModeChanged(CefRefPtr<CefBrowser>& browser, bool fullscreen) = 0; + + virtual void statusMessage(CefRefPtr<CefBrowser>& browser, const CefString& value) = 0; + + virtual void loadingProgressChanged(CefRefPtr<CefBrowser>& browser, double progress) = 0; + + virtual void consoleMessage(CefRefPtr<CefBrowser>& browser, const CefString& message, int level) = 0; + + virtual bool cursorChanged(CefRefPtr<CefBrowser>& browser, + CefCursorHandle cursor, + cef_cursor_type_t type, + const CefCursorInfo& custom_cursor_info) = 0; +#pragma endregion + + // download hander +#pragma region DownloadHandler + virtual void onBeforeDownload(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefDownloadItem>& download_item, + const CefString& suggested_name, + CefRefPtr<CefBeforeDownloadCallback>& callback) = 0; + + virtual void onDownloadUpdated(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefDownloadItem>& download_item, + CefRefPtr<CefDownloadItemCallback>& callback) = 0; +#pragma endregion + + // drag hander +#pragma region DragHandler + virtual bool onDragEnter(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefDragData>& dragData, + CefDragHandler::DragOperationsMask mask) + { + return true; + } + + virtual void draggableRegionChanged(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + const std::vector<CefDraggableRegion>& regions) = 0; +#pragma endregion + + // focus handler +#pragma region FocusHandler + virtual void takeFocus(CefRefPtr<CefBrowser>& browser, bool next) = 0; + + virtual bool setFocus(CefRefPtr<CefBrowser>& browser) = 0; + + virtual void gotFocus(CefRefPtr<CefBrowser>& browser) = 0; +#pragma endregion + +// JS dialog handler +#pragma region JSDialogHandler + virtual bool onJSDialog(CefRefPtr<CefBrowser>& browser, + const CefString& origin_url, + CefJSDialogHandler::JSDialogType dialog_type, + const CefString& message_text, + const CefString& default_prompt_text, + CefRefPtr<CefJSDialogCallback>& callback, + bool& suppress_message) = 0; + + virtual bool onBeforeUnloadDialog(CefRefPtr<CefBrowser>& browser, + const CefString& message_text, + bool is_reload, + CefRefPtr<CefJSDialogCallback>& callback) = 0; + virtual void onResetDialogState(CefRefPtr<CefBrowser>& browser) = 0; + virtual void onDialogClosed(CefRefPtr<CefBrowser>& browser) = 0; +#pragma endregion + + // keyboard handler +#pragma region KeyboardHandler + virtual bool onPreKeyEvent(CefRefPtr<CefBrowser>& browser, + const CefKeyEvent& event, + CefEventHandle os_event, + bool* is_keyboard_shortcut) = 0; + + virtual bool onKeyEvent(CefRefPtr<CefBrowser>& browser, const CefKeyEvent& event, CefEventHandle os_event) = 0; +#pragma endregion + + // life span handler +#pragma region LifeSpanHandler + virtual bool onBeforePopup(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + const CefString& targetUrl, + const CefString& targetFrameName, + CefLifeSpanHandler::WindowOpenDisposition targetDisposition, + CefWindowInfo& windowInfo, + CefBrowserSettings& settings, + bool& DisableJavascriptAccess) = 0; + virtual void onAfterCreate(CefRefPtr<CefBrowser>& browser) = 0; + + virtual bool doClose(CefRefPtr<CefBrowser>& browser) = 0; + + virtual bool requestClose(CefRefPtr<CefBrowser>& browser) = 0; + + virtual void onBeforeClose(CefRefPtr<CefBrowser>& browser) = 0; +#pragma endregion + + // load handler +#pragma region LoadHandler + virtual void loadingStateChanged(CefRefPtr<CefBrowser>& browser, + bool isLoading, + bool canGoBack, + bool canGoForward) = 0; + + virtual void loadStart(CefRefPtr<CefBrowser>& browser, CefRefPtr<CefFrame>& frame, int transition_type) = 0; + + virtual void loadEnd(CefRefPtr<CefBrowser>& browser, CefRefPtr<CefFrame>& frame, int httpStatusCode) = 0; + + virtual void loadError(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefFrame>& frame, + int errorCode, + const CefString& errorMsg, + const CefString& failedUrl, + bool& handled) = 0; +#pragma endregion + + // Off screen rendering +#pragma region RenderHandler + virtual bool getRootScreenRect(CefRefPtr<CefBrowser>& browser, CefRect& rect) { return false; } + virtual void getViewRect(CefRefPtr<CefBrowser>& browser, CefRect& rect) {} + virtual bool getScreenPoint(CefRefPtr<CefBrowser>& browser, int viewX, int viewY, int& screenX, int& screenY) + { + return false; + } + virtual bool getScreenInfo(CefRefPtr<CefBrowser>& browser, CefScreenInfo& screen_info) { return false; } + virtual void onPopupShow(CefRefPtr<CefBrowser>& browser, bool show) {} + virtual void onPopupSize(CefRefPtr<CefBrowser>& browser, const CefRect& rect) {} + virtual void onPaint(CefRefPtr<CefBrowser>& browser, + CefRenderHandler::PaintElementType type, + const CefRenderHandler::RectList& dirtyRects, + const void* buffer, + int width, + int height) + { + } +#if CEF_VERSION_MAJOR < 124 + virtual void onAcceleratedPaint(CefRefPtr<CefBrowser>& browser, + CefRenderHandler::PaintElementType type, + const CefRenderHandler::RectList& dirtyRects, + void* shared_handle) + { + } +#else + virtual void onAcceleratedPaint(CefRefPtr<CefBrowser>& browser, + CefRenderHandler::PaintElementType type, + const CefRenderHandler::RectList& dirtyRects, + const CefAcceleratedPaintInfo& info) + { + } +#endif + virtual bool startDragging(CefRefPtr<CefBrowser>& browser, + CefRefPtr<CefDragData>& drag_data, + CefRenderHandler::DragOperationsMask allowed_ops, + int x, + int y) + { + return false; + } + virtual void updateDragCursor(CefRefPtr<CefBrowser>& browser, CefRenderHandler::DragOperation operation) {} + virtual void onScrollOffsetChanged(CefRefPtr<CefBrowser>& browser, double x, double y) {} + virtual void onImeCompositionRangeChanged(CefRefPtr<CefBrowser>& browser, + const CefRange& selected_range, + const CefRenderHandler::RectList& character_bounds) + { + } + virtual void onTextSelectionChanged(CefRefPtr<CefBrowser>& browser, + const CefString& selected_text, + const CefRange& selected_range) + { + } + virtual void onVirtualKeyboardRequested(CefRefPtr<CefBrowser>& browser, CefRenderHandler::TextInputMode input_mode) {} +#pragma endregion +}; + +#endif diff --git a/3rdparty/QCefView/include/QCefCore/CefViewCoreGlobal.h b/3rdparty/QCefView/include/QCefCore/CefViewCoreGlobal.h new file mode 100644 index 0000000..0557270 --- /dev/null +++ b/3rdparty/QCefView/include/QCefCore/CefViewCoreGlobal.h @@ -0,0 +1,44 @@ +// +// CefViewCoreGlobal.h +// CefViewCore +// +// Created by Sheen Tian on 2023/5/30. +// + +#ifndef CefViewCoreGlobal_h +#define CefViewCoreGlobal_h +#pragma once + +#pragma region stl_headers +#include <string> +#include <type_traits> +#pragma endregion + +#pragma region cef_headers +#include <include/cef_app.h> +#include <include/cef_client.h> +#include <include/cef_version.h> +#include <include/cef_parser.h> +#include <include/wrapper/cef_helpers.h> +#include <include/wrapper/cef_message_router.h> +#include <include/wrapper/cef_resource_manager.h> +#pragma endregion + +#if CEF_VERSION_MAJOR < 122 +using CefFrameId = int64_t; +#else +using CefFrameId = CefString; + +template<> +struct std::hash<CefFrameId> +{ + std::size_t operator()(const CefFrameId& k) const + { + using std::hash; + using std::string; + return std::hash<std::string>()(k.ToString()); + } +}; +#endif // CEF_VERSION_MAJOR < 122 + +#endif // CefViewCoreGlobal_h diff --git a/3rdparty/QCefView/include/QCefCore/CefViewCoreProtocol.h b/3rdparty/QCefView/include/QCefCore/CefViewCoreProtocol.h new file mode 100644 index 0000000..e97b18a --- /dev/null +++ b/3rdparty/QCefView/include/QCefCore/CefViewCoreProtocol.h @@ -0,0 +1,135 @@ +// +// CefViewCoreProtocol.h +// CefViewCore +// +// Created by Sheen Tian on 2020/6/11. +// This file was generated during CMake configuring. +// Do not edit this file directly by manual. +// Edit the CefViewCoreProtocol.h.in and then re-config project with CMake. +// + +#ifndef CefViewCoreProtocol_h +#define CefViewCoreProtocol_h +#pragma once + +/// <summary> +/// CefView Helper Process Name +/// </summary> +#define kCefViewRenderProcessName "CefViewWing" + +/// <summary> +/// +/// </summary> +#define kCefViewQueryFuntionName "cefViewQuery" + +/// <summary> +/// +/// </summary> +#define kCefViewQueryCancelFunctionName "cefViewQueryCancel" + +/// <summary> +/// +/// </summary> +#define kCefViewBridgeObjectNameKey "bridge-obj-name" + +/// <summary> +/// +/// </summary> +#define kCefViewBuiltinSchemeNameKey "builtin-scheme-name" + +/// <summary> +/// +/// </summary> +#define kCefViewWindowsJobNameKey "windows-job-name" + +/// <summary> +/// +/// </summary> +#define kCefViewDefaultBridgeObjectName "CefViewClient" + +/// <summary> +/// +/// </summary> +#define kCefViewDefaultBuiltinSchemaName "CefView" + +/// <summary> +/// CEFVIEWClient.invokeMethod("method_name", ...) +/// </summary> +#define kCefViewInvokeMethodFunctionName "invoke" + +/// <summary> +/// CEFVIEWClient.addEventListener(type, listener) +/// </summary> +#define kCefViewAddEventListenerFunctionName "addEventListener" + +/// <summary> +/// CEFVIEWClient.removeEventListener(type, listener) +/// </summary> +#define kCefViewRemoveEventListenerFunctionName "removeEventListener" + +/// <summary> +/// this message is sent from render process to browser process +/// and is processed in the Qt UI thread +/// +/// </summary> +#define kCefViewClientRenderFocusedNodeChangedMessage "CefViewClientRender.FocusedNodeChanged" + +/// <summary> +/// this message is sent from render process to browser process +/// and is processed in the Qt UI thread +/// +/// </summary> +#define kCefViewClientRenderReportJSResultMessage "CefViewClientRender.ReportJSResult" + +/// <summary> +/// this message is sent from render process to browser process +/// and is processed in the Qt UI thread +/// +/// format +/// msg.name +/// msg.arg[0]: function name +/// msg.arg[1~...]: function parameters +/// </summary> +#define kCefViewClientRenderInvokeMethodMessage "CefViewClientRender.InvokeMethod" + +/// <summary> +/// this message is sent from browser process to render process +/// and is processed in the CefRenderer_Main thread +/// +/// format: +/// msg.name: +/// msg.arg[0]: function name +/// msg.arg[1~...]: function parameters +/// </summary> +#define kCefViewClientBrowserTriggerEventMessage "CefViewClientBrowser.TriggerEvent" + +/// <summary> +/// window.__cefview_report_js_result__(context, result) +/// context must be double +/// </summary> +#define kCefViewReportJSResultFunctionName "__cefview_report_js_result__" + +/// <summary> +/// +/// </summary> +#define kCefViewResourceDirectoryName "resources" + +/// <summary> +/// +/// </summary> +#define kCefViewLocalesDirectoryName "locales" + +/// <summary> +/// +/// </summary> +#if defined(OS_WINDOWS) +#define kCefViewDefaultUserAgent "CefView/1.0 (Windows; en-us)" +#elif defined(OS_MACOS) +#define kCefViewDefaultUserAgent "CefView/1.0 (macOS; en-us)" +#elif defined(OS_LINUX) +#define kCefViewDefaultUserAgent "CefView/1.0 (Linux; en-us)" +#else +#define kCefViewDefaultUserAgent "CefView/1.0 (Unknown; en-us)" +#endif + +#endif diff --git a/3rdparty/QCefView/include/QCefView/CefVersion.h b/3rdparty/QCefView/include/QCefView/CefVersion.h new file mode 100644 index 0000000..c911c54 --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/CefVersion.h @@ -0,0 +1,24 @@ +// +// CefVersion.h +// CefViewCore +// +// Created by Sheen Tian on 2025/1/19. +// This file was generated during CMake configuring. +// Do not edit this file directly by manual. +// Edit the CefVersion.h.in and then re-config project with CMake. +// + +#ifndef CefVersion_h +#define CefVersion_h +#pragma once + +// clang-format off +#define CEF_VERSION "134.3.6+g96006d1+chromium-134.0.6998.118" +#define CEF_VERSION_MAJOR 134 +#define CEF_VERSION_MINOR 3 +#define CEF_VERSION_PATCH 6 +#define CEF_COMMIT_NUMBER 3155 +#define CEF_COMMIT_HASH "96006d11935cd82a004d992db6e7124825352e19" +// clang-format on + +#endif // CefVersion diff --git a/3rdparty/QCefView/include/QCefView/QCefConfig.h b/3rdparty/QCefView/include/QCefView/QCefConfig.h new file mode 100644 index 0000000..e3641d8 --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefConfig.h @@ -0,0 +1,320 @@ +/* + * File: QCefConfig.h + * Project: QCefView + * Created: 21nd January 2021 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFCONFIG_H +#define QCEFCONFIG_H +#pragma once +#include <QCefView_global.h> + +#pragma region qt_headers +#include <QColor> +#include <QScopedPointer> +#include <QString> +#include <QVariant> +#pragma endregion + +class QCefConfigPrivate; + +/// <summary> +/// Represents the CEF setting. For more details please refer to: +/// https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-cefsettings +/// </summary> +class QCEFVIEW_EXPORT QCefConfig +{ + Q_DECLARE_PRIVATE(QCefConfig) + QScopedPointer<QCefConfigPrivate> d_ptr; + +public: + /// <summary> + /// Represents the log severity + /// </summary> + enum LogLevel + { + /// Default logging (currently INFO logging) + LOGSEVERITY_DEFAULT, + + /// Verbose logging + LOGSEVERITY_VERBOSE, + + /// DEBUG logging + LOGSEVERITY_DEBUG, + + /// INFO logging + LOGSEVERITY_INFO, + + /// WARNING logging + LOGSEVERITY_WARNING, + + /// ERROR logging + LOGSEVERITY_ERROR, + + /// FATAL logging + LOGSEVERITY_FATAL, + + /// Disable logging to file for all messages, and to stderr for messages with severity less than FATAL + LOGSEVERITY_DISABLE = 99 + }; + +public: + /// <summary> + /// Constructs a CEF config instance + /// </summary> + QCefConfig(); + + /// <summary> + /// Constructs a CEF setting from existing one + /// </summary> + QCefConfig(const QCefConfig& other); + + /// <summary> + /// Assigns an existing config to current + /// </summary> + QCefConfig& operator=(const QCefConfig& other); + + /// <summary> + /// Destructs the config + /// </summary> + ~QCefConfig(); + + /// <summary> + /// Adds a switch to the commandline args used to initialize the CEF + /// </summary> + /// <param name="smitch">The switch name</param> + void addCommandLineSwitch(const QString& smitch); + + /// <summary> + /// Adds a switch with value to the commandline args used to initialize the CEF + /// </summary> + /// <param name="smitch">The swtich name</param> + /// <param name="v">The switch value</param> + void addCommandLineSwitchWithValue(const QString& smitch, const QString& v); + + /// <summary> + /// Sets the flag to enable/disable OSR mode + /// </summary> + /// <param name="enabled">True to enable OSR mode, false to disable</param> + void setWindowlessRenderingEnabled(const bool enabled); + + /// <summary> + /// Gets the OSR mode flag + /// </summary> + /// <returns>The flag indicates the enable/disable of OSR mode</returns> + const QVariant WindowlessRenderingEnabled() const; + +#if !defined(Q_OS_MACOS) + /// <summary> + /// Sets the browser subprocess path + /// </summary> + /// <param name="path">The path to the sub process executable</param> + void setBrowserSubProcessPath(const QString& path); + + /// <summary> + /// Gets the browser subprocess path + /// </summary> + const QString browserSubProcessPath() const; + + /// <summary> + /// Sets the resource directory path + /// </summary> + /// <param name="path">The resource directory path</param> + void setResourceDirectoryPath(const QString& path); + + /// <summary> + /// Gets the resource directory path + /// </summary> + const QString resourceDirectoryPath() const; + + /// <summary> + /// Sets the locales directory path + /// </summary> + /// <param name="path">The locales directory path</param> + void setLocalesDirectoryPath(const QString& path); + + /// <summary> + /// Gets the locales directory path + /// </summary> + const QString localesDirectoryPath() const; +#endif + + /// <summary> + /// Sets the log level + /// </summary> + /// <param name="lvl"></param> + void setLogLevel(const LogLevel lvl); + + /// <summary> + /// Gets the log level + /// </summary> + /// <returns>The current log level</returns> + const QCefConfig::LogLevel logLevel() const; + + /// <summary> + /// Sets the locale + /// </summary> + /// <param name="locale">The locale to use. If empty the default locale of "en-US" will be used. This value is ignored + /// on Linux where locale is determined using environment variable parsing with the precedence order: LANGUAGE, + /// LC_ALL, LC_MESSAGES and LANG. Also configurable using the "lang" command-line switch.</param> + void setLocale(const QString& locale); + + /// <summary> + /// Gets the locale + /// </summary> + const QString locale() const; + + /// <summary> + /// Sets the user agent + /// </summary> + /// <param name="agent">The user agent</param> + void setUserAgent(const QString& agent); + + /// <summary> + /// Gets the user agent + /// </summary> + const QString userAgent() const; + + /// <summary> + /// Sets the cache directory path + /// </summary> + /// <param name="path">The cache path</param> + void setCachePath(const QString& path); + + /// <summary> + /// Gets the cache directory path + /// </summary> + const QString cachePath() const; + +#if CEF_VERSION_MAJOR < 115 + /// <summary> + /// Sets the user data directory path + /// </summary> + /// <param name="path">The user data directory path</param> + void setUserDataPath(const QString& path); + + /// <summary> + /// Gets the user data directory path + /// </summary> + const QString userDataPath() const; + +#else + + /// <summary> + /// Gets the root cache directory path + /// </summary> + const QString rootCachePath() const; + + /// <summary> + /// Sets the root cache directory path + /// </summary> + /// <param name="path">The root cache directory path</param> + void setRootCachePath(const QString& path); +#endif + + /// <summary> + /// Sets the bridge object name + /// </summary> + /// <param name="name">The bridge object name</param> + /// <remarks> + /// The bridge object represents a Javascript object which will be inserted + /// into all browser and frames. This object is designated for communicating + /// between Javascript in web content and native context(C/C++) code. + /// This object is set as an property of window object. That means it can be + /// obtained by calling window.bridgeObject in the Javascript code + /// </remarks> + void setBridgeObjectName(const QString& name); + + /// <summary> + /// Gets the bridge object name + /// </summary> + const QString bridgeObjectName() const; + + /// <summary> + /// Sets the built-in scheme name + /// </summary> + /// <param name="name">The scheme name</param> + /// <remarks> + /// The default value is CefView + /// </remarks> + void setBuiltinSchemeName(const QString& name); + + /// <summary> + /// Gets the built-in scheme object name + /// </summary> + const QString builtinSchemeName() const; + + /// <summary> + /// Sets the background color of the web page + /// </summary> + /// <param name="color">The color to be set</param> + /// <remarks> + /// This only works if the web page has no background color set. The alpha component value + /// will be adjusted to 0 or 255, it means if you pass a value with alpha value + /// in the range of [1, 255], it will be accepted as 255. The default value is qRgba(255, 255, 255, 255) + /// </remarks> + void setBackgroundColor(const QColor& color); + + /// <summary> + /// Gets the background color + /// </summary> + const QVariant backgroundColor() const; + + /// <summary> + /// Sets the acceptable language list + /// </summary> + /// <param name="languages">Comma delimited ordered list of language codes without any whitespace + /// that will be used in the "Accept-Language" HTTP header.</param> + void setAcceptLanguageList(const QString& languages); + + /// <summary> + /// Get the acceptable language list + /// </summary> + const QString acceptLanguageList() const; + + /// <summary> + /// Sets whether to persist session cookie + /// </summary> + /// <param name="enabled">True if to persist session cookie</param> + void setPersistSessionCookies(bool enabled); + + /// <summary> + /// Gets whether to persist session cookie + /// </summary> + const QVariant persistSessionCookies() const; + +#if CEF_VERSION_MAJOR < 128 + /// <summary> + /// Sets whether to persist user preferences + /// </summary> + /// <param name="enabled">True if to persist user preferences</param> + void setPersistUserPreferences(bool enabled); + + /// <summary> + /// Gets whether to persist user preferences + /// </summary> + const QVariant persistUserPreferences() const; +#endif + + /// <summary> + /// Sets the remote debugging port + /// </summary> + /// <param name="port">The port to use</param> + /// <remarks> + /// CEF supports the remote debugging with Dev Tools in Chrome/Edge. + /// if this value is set then you can debug the web application by + /// accessing http://127.0.0.1:port from Chrome/Edge + /// </remarks> + void setRemoteDebuggingPort(short port); + + /// <summary> + /// Gets the remote debugging port + /// </summary> + const QVariant remoteDebuggingPort() const; +}; + +Q_DECLARE_METATYPE(QCefConfig); + +#endif diff --git a/3rdparty/QCefView/include/QCefView/QCefContext.h b/3rdparty/QCefView/include/QCefView/QCefContext.h new file mode 100644 index 0000000..8e0d45d --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefContext.h @@ -0,0 +1,149 @@ +/* + * File: QCefContext.h + * Project: QCefView + * Created: 29th March 2016 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFCONTEXT_H +#define QCEFCONTEXT_H +#pragma once +#include <QCefView_global.h> + +#pragma region qt_headers +#include <QCoreApplication> +#include <QScopedPointer> +#pragma endregion + +#include <QCefConfig.h> + +class QCefContextPrivate; + +/// <summary> +/// Represents the CEF context +/// </summary> +class QCEFVIEW_EXPORT QCefContext : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QCefContext) + QScopedPointer<QCefContextPrivate> d_ptr; + + friend class QCefView; + +public: + /// <summary> + /// Constructs the CEF context + /// </summary> + /// <param name="app">The application</param> + /// <param name="argc">The argument count</param> + /// <param name="argv">The argument list pointer</param> + /// <param name="config">The <see cref="QCefConfig"/> instance</param> + QCefContext(QCoreApplication* app, int argc, char** argv, const QCefConfig* config); + + /// <summary> + /// Gets the unique default instance + /// </summary> + /// <returns>The default instance</returns> + static QCefContext* instance(); + + /// <summary> + /// Destructs the CEF context + /// </summary> + ~QCefContext(); + + /// <summary> + /// Adds a url mapping item with local web resource directory. This works for all <see ref="QCefView" /> instances + /// created subsequently + /// </summary> + /// <param name="path">The path to the local resource directory</param> + /// <param name="url">The url to be mapped to</param> + /// <param name="priority">The priority</param> + void addLocalFolderResource(const QString& path, const QString& url, int priority = 0); + + /// <summary> + /// Adds a url mapping item with local archive (.zip) file which contains the web resource. This works for all <see + /// ref="QCefView" /> instances created subsequently + /// </summary> + /// <param name="path">The path to the local archive file</param> + /// <param name="url">The url to be mapped to</param> + /// <param name="password">The password of the archive</param> + /// <param name="priority">The priority</param> + void addArchiveResource(const QString& path, const QString& url, const QString& password = "", int priority = 0); + + /// <summary> + /// Adds a cookie to the CEF context, this cookie is accessible from all browsers created with this context + /// </summary> + /// <param name="name">The cookie item name</param> + /// <param name="value">The cookie item value</param> + /// <param name="domain">The applicable domain name</param> + /// <param name="url">The applicable url</param> + /// <returns>True on success; otherwise false</returns> + bool addCookie(const QString& name, const QString& value, const QString& domain, const QString& url); + + /// <summary> + /// Deletes all cookies from the CEF context + /// </summary> + /// <returns>True on success; otherwise false</returns> + bool deleteAllCookies(); + + /// <summary> + /// Adds an entry to the cross-origin access whitelist. For details please refer to: + /// https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L81C23-L81C23 + /// </summary> + /// <param name="sourceOrigin">The source origin</param> + /// <param name="targetSchema">The target schema</param> + /// <param name="targetDomain">The target domain</param> + /// <param name="allowTargetSubdomains">Whether to allow subdomain or not</param> + /// <returns>True on success; otherwise false</returns> + bool addCrossOriginWhitelistEntry(const QString& sourceOrigin, + const QString& targetSchema, + const QString& targetDomain, + bool allowTargetSubdomains); + + /// <summary> + /// Removes an entry from the cross-origin access whitelist. For details please refer to: + /// https://github.com/chromiumembedded/cef/blob/605c2bac86415dcec1e2902cdc46dc11c1ad026a/include/cef_origin_whitelist.h#L91C12-L91C12 + /// </summary> + /// <param name="sourceOrigin">The source origin</param> + /// <param name="targetSchema">The target schema</param> + /// <param name="targetDomain">The target domain</param> + /// <param name="allowTargetSubdomains">Whether to allow subdomain or not</param> + /// <returns>True on success; otherwise false</returns> + bool removeCrossOriginWhitelistEntry(const QString& sourceOrigin, + const QString& targetSchema, + const QString& targetDomain, + bool allowTargetSubdomains); + + /// <summary> + /// Removes all entries from the cross-origin access whitelist. + /// </summary> + bool clearCrossOriginWhitelistEntry(); + + /// <summary> + /// Gets the QCefConfig + /// </summary> + /// <returns>The QCefConfig instance</returns> + const QCefConfig* cefConfig() const; + +protected: + /// <summary> + /// Initialize the CEF context + /// </summary> + /// <param name="config">The <see cref="QCefConfig"/> instance</param> + /// <returns>True on success; otherwise false</returns> + bool init(const QCefConfig* config); + + /// <summary> + /// Uninitialize the CEF context + /// </summary> + void uninit(); + +private: + /// <summary> + /// The default instance + /// </summary> + static QCefContext* s_self; +}; + +#endif // QCEFCONTEXT_H diff --git a/3rdparty/QCefView/include/QCefView/QCefDownloadItem.h b/3rdparty/QCefView/include/QCefView/QCefDownloadItem.h new file mode 100644 index 0000000..c234db4 --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefDownloadItem.h @@ -0,0 +1,177 @@ +/* + * File: QCefDownloadItem.h + * Project: QCefView + * Created: 13th July 2022 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFDOWNLOADITEM_H +#define QCEFDOWNLOADITEM_H +#pragma once +#include <QCefView_global.h> + +#pragma region qt_headers +#include <QDateTime> +#include <QScopedPointer> +#include <QString> +#pragma endregion + +class QCefDownloadItemPrivate; + +/// <summary> +/// Represents the download item +/// </summary> +class QCEFVIEW_EXPORT QCefDownloadItem +{ + Q_DECLARE_PRIVATE(QCefDownloadItem) + QScopedPointer<QCefDownloadItemPrivate> d_ptr; + + Q_DISABLE_COPY(QCefDownloadItem) + QCefDownloadItem(QCefDownloadItem&&) = delete; + QCefDownloadItem& operator=(QCefDownloadItem&&) = delete; + + friend class QCefView; + + /// <summary> + /// Constructs a download item instance + /// </summary> + QCefDownloadItem(); + +public: + /// <summary> + /// Destructs the download item instance + /// </summary> + ~QCefDownloadItem(); + + /// <summary> + /// Starts to download the item. + /// </summary> + /// <param name="path">The full path name (must include file name) to save the downloaded item</param> + /// <param name="useDefaultDialog">Whether to use the default 'Save As...' dialog or not</param> + /// <remarks> + /// The 'path' parameter only works when 'useDefaultDialog' is set to false. + /// If you set 'useDefaultDialog' to true then you cannot control the initial + /// location of the opened 'Save As...' dialog, it is determined by CEF internal implementation. + /// </remarks> + void start(const QString& path, bool useDefaultDialog = true) const; + + /// <summary> + /// Pauses the download + /// </summary> + void pause() const; + + /// <summary> + /// Resume the download + /// </summary> + void resume() const; + + /// <summary> + /// Cancels the download + /// </summary> + void cancel() const; + + /// <summary> + /// Gets whether the download is started + /// </summary> + /// <returns></returns> + bool isStarted() const; + + /// <summary> + /// Gets whether the download is in progress + /// </summary> + /// <returns>True if the download is in progress; otherwise false</returns> + bool isInProgress() const; + + /// <summary> + /// Gets whether the download is complete + /// </summary> + /// <returns>True if the download is complete; otherwise false</returns> + bool isComplete() const; + + /// <summary> + /// Gets whether the download has been canceled or interrupted + /// </summary> + /// <returns>True if the download has been canceled or interrupted; otherwise false</returns> + bool isCanceled() const; + + /// <summary> + /// Gets current download speed + /// </summary> + /// <returns>A simple speed estimate in bytes/s</returns> + qint64 currentSpeed() const; + + /// <summary> + /// Gets the completion percentage + /// </summary> + /// <returns>The rough percent complete or -1 if the receive total size is unknown</returns> + int percentComplete() const; + + /// <summary> + /// Gets total number of bytes + /// </summary> + /// <returns>The total number of bytes</returns> + qint64 totalBytes() const; + + /// <summary> + /// Gets number of received bytes + /// </summary> + /// <returns>The number of received bytes</returns> + qint64 receivedBytes() const; + + /// <summary> + /// Gets the time that the download started + /// </summary> + /// <returns>The time that the download started</returns> + QDateTime startTime() const; + + /// <summary> + /// Gets the time that the download ended + /// </summary> + /// <returns>The time that the download ended</returns> + QDateTime endTime() const; + + /// <summary> + /// Gets the full path to the downloaded or downloading file + /// </summary> + /// <returns>The full path to the downloaded or downloading file</returns> + QString fullPath() const; + + /// <summary> + /// Gets the unique identifier for this download + /// </summary> + /// <returns>The unique identifier for this download</returns> + quint32 id() const; + + /// <summary> + /// Gets the URL + /// </summary> + /// <returns>The the URL</returns> + QString url() const; + + /// <summary> + /// Gets the original URL before any redirections + /// </summary> + /// <returns>The original URL before any redirections</returns> + QString originalUrl() const; + + /// <summary> + /// Gets the suggested file name + /// </summary> + /// <returns>The suggested file name</returns> + QString suggestedFileName() const; + + /// <summary> + /// Gets the content disposition + /// </summary> + /// <returns>The the content disposition</returns> + QString contentDisposition() const; + + /// <summary> + /// Gets the mime type + /// </summary> + /// <returns>The mime type</returns> + QString mimeType() const; +}; + +#endif /// QCEFDOWNLOADITEM_H diff --git a/3rdparty/QCefView/include/QCefView/QCefEvent.h b/3rdparty/QCefView/include/QCefView/QCefEvent.h new file mode 100644 index 0000000..4f64d0c --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefEvent.h @@ -0,0 +1,88 @@ +/* + * File: QCefEvent.h + * Project: QCefView + * Created: 29th March 2016 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFEVENT_H +#define QCEFEVENT_H +#pragma once +#include <QCefView_global.h> + +#pragma region qt_headers +#include <QScopedPointer> +#include <QString> +#include <QVariantList> +#pragma endregion + +class QCefEventPrivate; + +/// <summary> +/// Represents the event sent from native context(C/C++ code) to the web context(javascript) +/// </summary> +class QCEFVIEW_EXPORT QCefEvent +{ + Q_DECLARE_PRIVATE(QCefEvent) + QScopedPointer<QCefEventPrivate> d_ptr; + + friend class QCefView; + +public: + /// <summary> + /// Constructs an event instance + /// </summary> + QCefEvent(); + + /// <summary> + /// Constructs an event instance with name + /// </summary> + /// <param name="name">The event name</param> + QCefEvent(const QString& name); + + /// <summary> + /// Constructs an event instance from existing one + /// </summary> + /// <param name="other">The other event instance</param> + QCefEvent(const QCefEvent& other); + + /// <summary> + /// Assigns an existing event instance to current + /// </summary> + /// <param name="other">The other event instance</param> + QCefEvent& operator=(const QCefEvent& other); + + /// <summary> + /// Destructs the event instance + /// </summary> + ~QCefEvent(); + + /// <summary> + /// Sets the event name + /// </summary> + /// <param name="name">The name to be set</param> + void setEventName(const QString& name); + + /// <summary> + /// Gets the event name + /// </summary> + /// <returns>The event name</returns> + const QString eventName() const; + + /// <summary> + /// Sets the argument list + /// </summary> + /// <param name="args">The argument list</param> + void setArguments(const QVariantList& args); + + /// <summary> + /// Gets the argument list + /// </summary> + /// <returns>The argument list</returns> + QVariantList& arguments(); +}; + +Q_DECLARE_METATYPE(QCefEvent); + +#endif // QCEFEVENT_H diff --git a/3rdparty/QCefView/include/QCefView/QCefQuery.h b/3rdparty/QCefView/include/QCefView/QCefQuery.h new file mode 100644 index 0000000..b3833cb --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefQuery.h @@ -0,0 +1,109 @@ +/* + * File: QCefQuery.h + * Project: QCefView + * Created: 29th March 2016 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFQUERY_H +#define QCEFQUERY_H +#pragma once +#include <QCefView_global.h> + +#pragma region stl_headers +#include <cstdint> +#pragma endregion + +#pragma region qt_headers +#include <QSharedPointer> +#include <QString> +#pragma endregion + +class QCefQueryPrivate; +class QCefViewPrivate; + +/// <summary> +/// Represents the query request sent from the web content(Javascript) +/// </summary> +class QCEFVIEW_EXPORT QCefQuery +{ + Q_DECLARE_PRIVATE(QCefQuery) + QSharedPointer<QCefQueryPrivate> d_ptr; + + friend class QCefViewPrivate; + +protected: + /// <summary> + /// Constructs a query instance with request context and query id + /// </summary> + /// <param name="source">The source CefView</param> + /// <param name="req">The request context</param> + /// <param name="query">The query id</param> + QCefQuery(QCefViewPrivate* source, const QString& req, const int64_t query); + + /// <summary> + /// Marks the query as replied (for internal use only) + /// </summary> + void markAsReplied() const; + +public: + /// <summary> + /// Constructs a query instance + /// </summary> + QCefQuery(); + + /// <summary> + /// Destructs a query instance + /// </summary> + ~QCefQuery(); + + /// <summary> + /// Gets the query content + /// </summary> + /// <returns>The content string</returns> + const QString request() const; + + /// <summary> + /// Gets the query id + /// </summary> + /// <returns>The query id</returns> + const qint64 id() const; + + /// <summary> + /// Gets the response content string + /// </summary> + /// <returns>The response content string</returns> + const QString response() const; + + /// <summary> + /// Gets the response result + /// </summary> + /// <returns>The respone result</returns> + const bool result() const; + + /// <summary> + /// Gets the response error + /// </summary> + /// <returns>The response error</returns> + const int error() const; + + /// <summary> + /// Sets the response + /// </summary> + /// <param name="success">True if the query is successful; otherwise false</param> + /// <param name="response">The response content string</param> + /// <param name="error">The response error</param> + void setResponseResult(bool success, const QString& response, int error = 0) const; + + /// <summary> + /// Replies the query + /// </summary> + /// <param name="success">The result</param> + /// <param name="response">The response data</param> + /// <param name="error">The error code</param> + void reply(bool success, const QString& response, int error = 0) const; +}; + +Q_DECLARE_METATYPE(QCefQuery); +#endif // QCEFQUERY_H diff --git a/3rdparty/QCefView/include/QCefView/QCefSetting.h b/3rdparty/QCefView/include/QCefView/QCefSetting.h new file mode 100644 index 0000000..0e33ef9 --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefSetting.h @@ -0,0 +1,419 @@ +/* + * File: QCefSetting.h + * Project: QCefView + * Created: 29th March 2016 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFSETTING_H +#define QCEFSETTING_H +#pragma once +#include <QCefView_global.h> + +#pragma region qt_headers +#include <QColor> +#include <QScopedPointer> +#include <QSize> +#include <QString> +#pragma endregion + +class QCefSettingPrivate; + +/// <summary> +/// Represents the settings for individual browser +/// </summary> +class QCEFVIEW_EXPORT QCefSetting +{ + Q_DECLARE_PRIVATE(QCefSetting) + QScopedPointer<QCefSettingPrivate> d_ptr; + + friend class QCefView; + +public: + /// <summary> + /// Constructs the QCefSetting instance + /// </summary> + QCefSetting(); + + /// <summary> + /// Constructs the QCefSetting instance from existing one + /// </summary> + /// <param name="other">The existing QCefSetting instance</param> + QCefSetting(const QCefSetting& other); + + /// <summary> + /// Assigns the existing QCefSetting instance to current + /// </summary> + /// <param name="other"></param> + QCefSetting& operator=(const QCefSetting& other); + + /// <summary> + /// Destructs the instance + /// </summary> + ~QCefSetting(); + + /// <summary> + /// Sets the initial size of the browser + /// </summary> + /// <param name="size">The initial size</param> + void setWindowInitialSize(const QSize& size); + + /// <summary> + /// Gets the initial size of the browser + /// </summary> + /// <returns></returns> + const QSize windowInitialSize() const; + + /// <summary> + /// Sets the standard font family + /// </summary> + /// <param name="value">The font family</param> + void setStandardFontFamily(const QString& value); + + /// <summary> + /// Gets the standard font family + /// </summary> + /// <returns>The font family</returns> + const QString standardFontFamily() const; + + /// <summary> + /// Sets the fixed font family + /// </summary> + /// <param name="value">The font family</param> + void setFixedFontFamily(const QString& value); + + /// <summary> + /// Gets the fixed font family + /// </summary> + /// <returns>The font family</returns> + const QString fixedFontFamily() const; + + /// <summary> + /// Sets the serif font family + /// </summary> + /// <param name="value">The font family</param> + void setSerifFontFamily(const QString& value); + + /// <summary> + /// Gets the serif font family + /// </summary> + /// <returns>The font family</returns> + const QString serifFontFamily() const; + + /// <summary> + /// Sets the sans serif font family + /// </summary> + /// <param name="value">The font family</param> + void setSansSerifFontFamily(const QString& value); + + /// <summary> + /// Gets the sans serif font family + /// </summary> + /// <returns>The font family</returns> + const QString sansSerifFontFamily() const; + + /// <summary> + /// Sets the cursive font family + /// </summary> + /// <param name="value">The font family</param> + void setCursiveFontFamily(const QString& value); + + /// <summary> + /// Gets the cursive font family + /// </summary> + /// <returns>The font family</returns> + const QString cursiveFontFamily() const; + + /// <summary> + /// Sets the fantasy font family + /// </summary> + /// <param name="value">The font family</param> + void setFantasyFontFamily(const QString& value); + + /// <summary> + /// Gets the fantasy font family + /// </summary> + /// <returns>The font family</returns> + const QString fantasyFontFamily() const; + + /// <summary> + /// Sets the default encoding + /// </summary> + /// <param name="value">The encoding name</param> + void setDefaultEncoding(const QString& value); + + /// <summary> + /// Gets the default encoding + /// </summary> + /// <returns>The encoding name</returns> + const QString defaultEncoding() const; + +#if CEF_VERSION_MAJOR < 118 + /// <summary> + /// Sets the acceptable language list + /// </summary> + /// <param name="value">The acceptable languate list</param> + void setAcceptLanguageList(const QString& value); + + /// <summary> + /// Gets the acceptable language list + /// </summary> + /// <returns>The acceptable languate list</returns> + const QString acceptLanguageList() const; +#endif + + /// <summary> + /// Sets the frame rate in window less mode + /// </summary> + /// <param name="value">The frame rate</param> + void setWindowlessFrameRate(const int value); + + /// <summary> + /// Gets the frame rate in window less mode + /// </summary> + /// <returns>The frame rate</returns> + const QVariant windowlessFrameRate() const; + + /// <summary> + /// Sets the default font size + /// </summary> + /// <param name="value">The font size</param> + void setDefaultFontSize(const int value); + + /// <summary> + /// Gets the default font size + /// </summary> + /// <returns>The font size</returns> + const QVariant defaultFontSize() const; + + /// <summary> + /// Sets the default fixed font size + /// </summary> + /// <param name="value">The font size</param> + void setDefaultFixedFontSize(const int value); + + /// <summary> + /// Gets the default fixed font size + /// </summary> + /// <returns>The font size</returns> + const QVariant defaultFixedFontSize() const; + + /// <summary> + /// Sets the minimum font size + /// </summary> + /// <param name="value">The font size</param> + void setMinimumFontSize(const int value); + + /// <summary> + /// Gets the minimum font size + /// </summary> + /// <returns>The font size</returns> + const QVariant minimumFontSize() const; + + /// <summary> + /// Sets the minimum logical font size + /// </summary> + /// <param name="value">The font size</param> + void setMinimumLogicalFontSize(const int value); + + /// <summary> + /// Gets the minimum logical font size + /// </summary> + /// <returns>The font size</returns> + const QVariant minimumLogicalFontSize() const; + + /// <summary> + /// Sets to enable or disable remote fonts + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setRemoteFonts(const bool value); + + /// <summary> + /// Gets whether to enable or disable the remote fonts + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant remoteFonts() const; + + /// <summary> + /// Sets to enable or disable Javascript + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setJavascript(const bool value); + + /// <summary> + /// Gets whether to enable or disable Javascript + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant javascript() const; + + /// <summary> + /// Sets to enable or disable the permission of closing window from Javascript + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setJavascriptCloseWindows(const bool value); + + /// <summary> + /// Gets whether to enable or disable the permission of closing window from Javascript + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant javascriptCloseWindows() const; + + /// <summary> + /// Sets to enable or disable the permission of accessing clipboard from Javascript + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setJavascriptAccessClipboard(const bool value); + + /// <summary> + /// Gets whether to enable or disable the permission of accessing clipboard from Javascript + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant javascriptAccessClipboard() const; + + /// <summary> + /// Sets to enable or disable the permission of pasting DOM in Javascript + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setJavascriptDomPaste(const bool value); + + /// <summary> + /// Gets whether to enable or disable the permission of pasting DOM in Javascript + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant javascriptDomPaste() const; + +#if CEF_VERSION_MAJOR < 100 + /// <summary> + /// Sets to enable or disable plugins + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setPlugins(const bool value); + + /// <summary> + /// Gets whether to enable or disable plugins + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant plugins() const; +#endif + + /// <summary> + /// Sets to enable or disable the permission of loading images + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setImageLoading(const bool value); + + /// <summary> + /// Gets whether to enable or disable the permission of loading images + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant imageLoading() const; + + /// <summary> + /// Sets to enable or disable the shrinking image standalone to fit + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setImageShrinkStandaloneToFit(const bool value); + + /// <summary> + /// Gets whether to enable or disable the shrinking image standalone to fit + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant imageShrinkStandaloneToFit() const; + + /// <summary> + /// Sets to enable or disable the resizing of text area + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setTextAreaResize(const bool value); + + /// <summary> + /// Gets whether to enable or disable the resizing of text area + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant textAreaResize() const; + + /// <summary> + /// Sets to enable or disable tab to links + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setTabToLinks(const bool value); + + /// <summary> + /// Gets whether to enable or disable tab to links + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant tabToLinks() const; + + /// <summary> + /// Sets to enable or disable local storage + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setLocalStorage(const bool value); + + /// <summary> + /// Gets whether to enable or disable local storage + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant localStorage() const; + + /// <summary> + /// Sets to enable or disable database + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setDatabases(const bool value); + + /// <summary> + /// Gets whether to enable or disable database + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant databases() const; + + /// <summary> + /// Sets to enable or disable webGL + /// </summary> + /// <param name="value">True to enable; false to disable</param> + void setWebGL(const bool value); + + /// <summary> + /// Gets whether to enable or disable webGL + /// </summary> + /// <returns>True to enable; false to disable</returns> + const QVariant webGL() const; + + /// <summary> + /// Sets the background color + /// </summary> + /// <param name="value">The color</param> + /// <remarks> + /// This only works if the web page has no background color set. The alpha component value + /// will be adjusted to 0 or 255, it means if you pass a value with alpha value + /// in the range of [1, 255], it will be accepted as 255. The default value is inherited from + /// <see cref="QCefConfig::backgroundColor()"/> + /// </remarks> + void setBackgroundColor(const QColor& value); + + /// <summary> + /// Gets the background color + /// </summary> + /// <returns>The color</returns> + const QVariant backgroundColor() const; + + #if CEF_VERSION_MAJOR >= 125 + /// <summary> + /// + /// </summary> + /// <param name="value"></param> + void setHardwareAcceleration(const bool value); + + /// <summary> + /// + /// </summary> + /// <returns></returns> + const bool hardwareAcceleration() const; + #endif +}; + +Q_DECLARE_METATYPE(QCefSetting); + +#endif diff --git a/3rdparty/QCefView/include/QCefView/QCefView.h b/3rdparty/QCefView/include/QCefView/QCefView.h new file mode 100644 index 0000000..3d5ef2f --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefView.h @@ -0,0 +1,604 @@ +/* + * File: QCefView.h + * Project: QCefView + * Created: 29th March 2016 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFVIEW_H +#define QCEFVIEW_H +#pragma once +#include <QCefView_global.h> + +#pragma region qt_headers +#include <QScopedPointer> +#include <QVariantList> +#include <QWidget> +#include <QWindow> +#pragma endregion + +#include <QCefDownloadItem.h> +#include <QCefEvent.h> +#include <QCefQuery.h> +#include <QCefSetting.h> + +/// <summary> +/// Type alias for CEF browser id +/// </summary> +#define QCefBrowserId int + +/// <summary> +/// Type alias for CEF frame id +/// </summary> +#if CEF_VERSION_MAJOR < 122 +#define QCefFrameId qint64 +#else +#define QCefFrameId QString +#endif + +/// <summary> +/// Private implementation +/// </summary> +class QCefViewPrivate; + +/// <summary> +/// Represents the CEF browser view +/// </summary> +class QCEFVIEW_EXPORT QCefView : public QWidget +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QCefView) + Q_DISABLE_COPY(QCefView) + QScopedPointer<QCefViewPrivate> d_ptr; + +public: + /// <summary> + /// The main frame identity + /// </summary> + static const QCefFrameId MainFrameID; + + /// <summary> + /// The identifier for all frames + /// </summary> + static const QCefFrameId AllFrameID; + + /// <summary> + /// Represents the CEF pop-up windows open disposition + /// </summary> + enum CefWindowOpenDisposition + { + CefWindowOpenDispositionUnknown, + CefWindowOpenDispositionCurrentTab, + CefWindowOpenDispositionSingletonTab, + CefWindowOpenDispositionNewForeGroundTab, + CefWindowOpenDispositionNewBackgroundTab, + CefWindowOpenDispositionNewPopup, + CefWindowOpenDispositionNewWindow, + CefWindowOpenDispositionSaveToDisk, + CefWindowOpenDispositionOffTheRecord, + CefWindowOpenDispositionIgnoreAction, + }; + Q_ENUM(CefWindowOpenDisposition) + +public: + /// <summary> + /// Constructs a QCefView instance + /// </summary> + /// <param name="url">The target url</param> + /// <param name="setting">The <see cref="QCefSetting"/> instance</param> + /// <param name="parent">The parent</param> + /// <param name="f">The Qt WindowFlags</param> + QCefView(const QString& url, + const QCefSetting* setting, + QWidget* parent = nullptr, + Qt::WindowFlags f = Qt::WindowFlags()); + + /// <summary> + /// Constructs a QCefView instance + /// </summary> + /// <param name="parent">The parent</param> + /// <param name="f">The Qt WindowFlags</param> + QCefView(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); + + /// <summary> + /// Destructs the QCefView instance + /// </summary> + ~QCefView(); + + /// <summary> + /// Adds a url mapping item with local web resource directory + /// </summary> + /// <param name="path">The path to the local resource directory</param> + /// <param name="url">The url to be mapped to</param> + /// <param name="priority">The priority</param> + void addLocalFolderResource(const QString& path, const QString& url, int priority = 0); + + /// <summary> + /// Adds a url mapping item with local archive (.zip) file which contains the web resource + /// </summary> + /// <param name="path">The path to the local archive file</param> + /// <param name="url">The url to be mapped to</param> + /// <param name="password">The password of the archive</param> + /// <param name="priority">The priority</param> + void addArchiveResource(const QString& path, const QString& url, const QString& password = "", int priority = 0); + + /// <summary> + /// Gets the browser id + /// </summary> + /// <returns>The browser id</returns> + QCefBrowserId browserId(); + + /// <summary> + /// Navigates to the content. + /// </summary> + /// <param name="content">The content</param> + void navigateToString(const QString& content); + + /// <summary> + /// Navigates to the URL + /// </summary> + /// <param name="url">The url</param> + void navigateToUrl(const QString& url); + + /// <summary> + /// Checks whether the browser can go back + /// </summary> + /// <returns>True if can; otherwise false</returns> + bool browserCanGoBack(); + + /// <summary> + /// Checks whether the browser can go forward + /// </summary> + /// <returns>True if can; otherwise false</returns> + bool browserCanGoForward(); + + /// <summary> + /// Requires the browser to go back + /// </summary> + void browserGoBack(); + + /// <summary> + /// Requires the browser to go forward + /// </summary> + void browserGoForward(); + + /// <summary> + /// Checks whether the browser is loading + /// </summary> + /// <returns>True if it is loading; otherwise false</returns> + bool browserIsLoading(); + + /// <summary> + /// Requires the browser to reload + /// </summary> + void browserReload(); + + /// <summary> + /// Requires the browser to stop load + /// </summary> + void browserStopLoad(); + + /// <summary> + /// Triggers the event for main frame + /// </summary> + /// <param name="event">The <see cref="QCefEvent"/> instance</param> + /// <returns>True on successful; otherwise false</returns> + bool triggerEvent(const QCefEvent& event); + + /// <summary> + /// Triggers the event for specified frame + /// </summary> + /// <param name="event">The <see cref="QCefEvent"/> instance</param> + /// <param name="frameId">The frame id</param> + /// <returns>True on successful; otherwise false</returns> + bool triggerEvent(const QCefEvent& event, const QCefFrameId& frameId); + + /// <summary> + /// Broad cast the event for all frames + /// </summary> + /// <param name="event">The <see cref="QCefEvent"/> instance</param> + /// <returns>True on successful; otherwise false</returns> + bool broadcastEvent(const QCefEvent& event); + + /// <summary> + /// Response the <see cref="QCefQuery"/> request + /// </summary> + /// <param name="query">The query instance</param> + /// <returns>True on successful; otherwise false</returns> + bool responseQCefQuery(const QCefQuery& query); + + /// <summary> + /// Executes javascript code in specified frame, this method does not report the result of the javascript. + /// To get the result of the javascript execution use <see cref="executeJavascriptWithResult"/> + /// </summary> + /// <param name="frameId">The frame id</param> + /// <param name="code">The javascript code</param> + /// <param name="url"> + /// The URL where the script in question can be found, if any. The renderer may request this URL to show the developer + /// the source of the error + /// </param> + /// <returns>True on successful; otherwise false</returns> + bool executeJavascript(const QCefFrameId& frameId, const QString& code, const QString& url); + + /// <summary> + /// Executes javascript code in specified frame and the result will be reported through <see + /// cref="reportJavascriptResult"/> signal + /// </summary> + /// <param name="frameId">The frame id</param> + /// <param name="code">The javascript code</param> + /// <param name="url"> + /// The URL where the script in question can be found, if any. The renderer may request this URL to show the developer + /// the source of the error + /// </param> + /// <param name="context">The context used to identify the one execution</param> + /// <returns>True on successful; otherwise false</returns> + bool executeJavascriptWithResult(const QCefFrameId& frameId, + const QString& code, + const QString& url, + const QString& context); + + /// <summary> + /// Sets the preference for this browser + /// </summary> + /// <param name="name">The preference name</param> + /// <param name="value"> + /// The preference value, if this value is QVariant::UnknownType or QVariant::Invalid, the + /// preference will be restored to default value + /// </param> + /// <param name="error">The error message populated on failure</param> + /// <returns>True on successful; otherwise false</returns> + bool setPreference(const QString& name, const QVariant& value, const QString& error); + + /// <summary> + /// Sets whether to disable the context menu for popup browser + /// </summary> + /// <param name="disable">True to disable; otherwise false</param> + void setDisablePopupContextMenu(bool disable); + + /// <summary> + /// Gets whether to disable the context menu for popup browser + /// </summary> + /// <returns>True to disable; otherwise false</returns> + bool isPopupContextMenuDisabled(); + + /// <summary> + /// Detects whether this browser has a devtools opened + /// </summary> + /// <returns>True if opend already; otherwise false</returns> + bool hasDevTools(); + + /// <summary> + /// Opens the devtools dialog + /// </summary> + void showDevTools(); + + /// <summary> + /// Closes the devtools dialog + /// </summary> + void closeDevTools(); + + /// <summary> + /// Sets whether to enable drag and drop + /// </summary> + /// <param name="enable">True to enable; otherwise false</param> + /// <remarks> + /// This function does not work for OSR mode. There is a problem, when dragging a file to a non dragging area, + /// the content of the file will be displayed. You need to solve the problem yourself. + /// </remarks> + void setEnableDragAndDrop(bool enable); + + /// <summary> + /// Gets whether to enable drag and drop + /// </summary> + /// <returns>True to enable; otherwise false</returns> + bool isDragAndDropEnabled() const; + +signals: + /// <summary> + /// Gets called on loading state changed + /// </summary> + /// <param name="browserId">Indicates the browser id</param> + /// <param name="isLoading">Indicates the browser is loading</param> + /// <param name="canGoBack">Indicates the browser can go back</param> + /// <param name="canGoForward">Indicates the browser can go forward</param> + void loadingStateChanged(const QCefBrowserId& browserId, bool isLoading, bool canGoBack, bool canGoForward); + + /// <summary> + /// Gets called on loading starts + /// </summary> + /// <param name="browserId">Indicates the browser id</param> + /// <param name="frameId">Indicates the frame id</param> + /// <param name="isMainFrame">Indicates the whether this is the main frame</param> + /// <param name="transitionType">transition type</param> + void loadStart(const QCefBrowserId& browserId, const QCefFrameId& frameId, bool isMainFrame, int transitionType); + + /// <summary> + /// Gets called on loading ends + /// </summary> + /// <param name="browserId">Indicates the browser id</param> + /// <param name="frameId">Indicates the frame id</param> + /// <param name="isMainFrame">Indicates the whether this is the main frame</param> + /// <param name="httpStatusCode">The HTTP status code</param> + void loadEnd(const QCefBrowserId& browserId, const QCefFrameId& frameId, bool isMainFrame, int httpStatusCode); + + /// <summary> + /// Gets called on loading failed due to error + /// </summary> + /// <param name="browserId">Indicates the browser id</param> + /// <param name="frameId">Indicates the frame id</param> + /// <param name="isMainFrame">Indicates the whether this is the main frame</param> + /// <param name="errorCode">The error code</param> + /// <param name="errorMsg">The error message</param> + /// <param name="failedUrl">The url caused the failure</param> + void loadError(const QCefBrowserId& browserId, + const QCefFrameId& frameId, + bool isMainFrame, + int errorCode, + const QString& errorMsg, + const QString& failedUrl); + + /// <summary> + /// Gets called on draggable region changed + /// </summary> + /// <param name="draggableRegion">The new draggable region</param> + /// <param name="nonDraggableRegion">The new non-draggable region</param> + void draggableRegionChanged(const QRegion& draggableRegion, const QRegion& nonDraggableRegion); + + /// <summary> + /// Gets called on the address changed + /// </summary> + /// <param name="frameId">The frame id</param> + /// <param name="url">The address</param> + void addressChanged(const QCefFrameId& frameId, const QString& url); + + /// <summary> + /// Gets called on title changed + /// </summary> + /// <param name="title">The title</param> + void titleChanged(const QString& title); + + /// <summary> + /// Gets called on favicon url changed + /// </summary> + /// <param name="urls">The urls</param> + void faviconURLChanged(const QStringList& urls); + + /// <summary> + /// Gets called on fullscreen mode changed + /// </summary> + /// <param name="fullscreen">The current fullscreen mode</param> + void fullscreenModeChanged(bool fullscreen); + + /// <summary> + /// Gets called on status message changed + /// </summary> + /// <param name="message">The status message</param> + void statusMessage(const QString& message); + + /// <summary> + /// Gets called on console message from the web content + /// </summary> + /// <param name="message">The message</param> + /// <param name="level">The level</param> + void consoleMessage(const QString& message, int level); + + /// <summary> + /// Gets called on loading progress changed + /// </summary> + /// <param name="progress">Current progress</param> + void loadingProgressChanged(double progress); + + /// <summary> + /// Gets called on built-in scheme URL access + /// </summary> + /// <param name="browserId">The browser id</param> + /// <param name="frameId">The frame id</param> + /// <param name="query">The full url</param> + void cefUrlRequest(const QCefBrowserId& browserId, const QCefFrameId& frameId, const QString& url); + + /// <summary> + /// Gets called on new <see cref="QCefQuery"/> request + /// </summary> + /// <param name="browserId">The browser id</param> + /// <param name="frameId">The frame id</param> + /// <param name="query">The query request</param> + void cefQueryRequest(const QCefBrowserId& browserId, const QCefFrameId& frameId, const QCefQuery& query); + + /// <summary> + /// Gets called on invoking method request from web content(Javascript) + /// </summary> + /// <param name="browserId">The browser id</param> + /// <param name="frameId">The frame id</param> + /// <param name="method">The method name</param> + /// <param name="arguments">The arguments list</param> + void invokeMethod(const QCefBrowserId& browserId, + const QCefFrameId& frameId, + const QString& method, + const QVariantList& arguments); + + /// <summary> + /// Gets called on the result of the javascript executed with <see cref="executeJavascriptWithResult"/> returned + /// </summary> + /// <param name="browserId">The browser id</param> + /// <param name="frameId">The frame id</param> + /// <param name="context">The context</param> + /// <param name="result">The result</param> + void reportJavascriptResult(const QCefBrowserId& browserId, + const QCefFrameId& frameId, + const QString& context, + const QVariant& result); + + /// <summary> + /// Gets called after the native browser window created. This slot does not work for OSR mode. + /// </summary> + /// <param name="window">The native browser windows</param> + void nativeBrowserCreated(QWindow* window); + +protected: + /// <summary> + /// Gets called before a new browser created (only for browser created by non-JavaScript) + /// </summary> + /// <param name="frameId">The source frame id</param> + /// <param name="url">The target URL</param> + /// <param name="name">The target name</param> + /// <param name="targetDisposition">Target window open method</param> + /// <param name="rect">Rect to be used for the popup</param> + /// <param name="settings">Settings to be used for the popup</param> + /// <returns>True to cancel the popup; false to allow</returns> + /// <returns></returns> + virtual QCefView* onNewBrowser(const QCefFrameId& sourceFrameId, + const QString& url, + const QString& name, + QCefView::CefWindowOpenDisposition targetDisposition, + QRect& rect, + QCefSetting& settings); + + /// <summary> + /// Gets called before the popup browser created (only for browser created by JavaScript) + /// </summary> + /// <param name="frameId">The source frame id</param> + /// <param name="targetUrl">The target URL</param> + /// <param name="targetFrameName">The target name</param> + /// <param name="targetDisposition">Target window open method</param> + /// <param name="rect">Rect to be used for the popup</param> + /// <param name="settings">Settings to be used for the popup</param> + /// <returns>True to cancel the popup; false to allow</returns> + virtual bool onNewPopup(const QCefFrameId& frameId, + const QString& targetUrl, + QString& targetFrameName, + QCefView::CefWindowOpenDisposition targetDisposition, + QRect& rect, + QCefSetting& settings, + bool& disableJavascriptAccess); + + /// <summary> + /// Gets called on new download item was required. Keep reference to the download item + /// and call <see cref="QCefDownloadItem::start"/> method to allow and start the download, + /// Ignore the download item to disallow the download + /// </summary> + /// <param name="item">The new download item</param> + /// <param name="suggestedName">The new suggested name</param> + virtual void onNewDownloadItem(const QSharedPointer<QCefDownloadItem>& item, const QString& suggestedName); + + /// <summary> + /// Gets called on download item updated. To get this method called <see cref="QCefDownloadItem::start"/> method must + /// be called in <see cref="newDownloadItem"/> method + /// </summary> + /// <param name="item">The download item</param> + virtual void onUpdateDownloadItem(const QSharedPointer<QCefDownloadItem>& item); + + /// <summary> + /// Gets called on close request from web + /// </summary> + /// <returns>True to allow the close, false to cancel the close</returns> + virtual bool onRequestCloseFromWeb(); + +#pragma region QWidget +public slots: + /// <summary> + /// + /// </summary> + inline void setFocus() { setFocus(Qt::OtherFocusReason); } + +public: + /// <summary> + /// Please refer to QWidget::setFocus + /// </summary> + void setFocus(Qt::FocusReason reason); + + /// <summary> + /// Please refer to QWidget::inputMethodQuery + /// </summary> + QVariant inputMethodQuery(Qt::InputMethodQuery query) const override; + + /// <summary> + /// Renders the view content to target painter + /// </summary> + /// <param name="painter">The target painter</param> + void render(QPainter* painter); + +protected: + /// <summary> + /// Please refer to QWidget::paintEngine + /// </summary> + QPaintEngine* paintEngine() const override; + + /// <summary> + /// Please refer to QWidget::paintEvent + /// </summary> + void paintEvent(QPaintEvent* event) override; + + /// <summary> + /// Please refer to QWidget::inputMethodEvent + /// </summary> + void inputMethodEvent(QInputMethodEvent* event) override; + + /// <summary> + /// Please refer to QWidget::showEvent + /// </summary> + void showEvent(QShowEvent* event) override; + + /// <summary> + /// Please refer to QWidget::hideEvent + /// </summary> + void hideEvent(QHideEvent* event) override; + + /// <summary> + /// Please refer to QWidget::focusInEvent + /// </summary> + void focusInEvent(QFocusEvent* event) override; + + /// <summary> + /// Please refer to QWidget::focusOutEvent + /// </summary> + void focusOutEvent(QFocusEvent* event) override; + + /// <summary> + /// Please refer to QWidget::resizeEvent + /// </summary> + void resizeEvent(QResizeEvent* event) override; + + /// <summary> + /// Please refer to QWidget::keyPressEvent + /// </summary> + void keyPressEvent(QKeyEvent* event) override; + + /// <summary> + /// Please refer to QWidget::keyReleaseEvent + /// </summary> + void keyReleaseEvent(QKeyEvent* event) override; + + /// <summary> + /// Please refer to QWidget::mouseMoveEvent + /// </summary> + void mouseMoveEvent(QMouseEvent* event) override; + + /// <summary> + /// Please refer to QWidget::mousePressEvent + /// </summary> + void mousePressEvent(QMouseEvent* event) override; + + /// <summary> + /// Please refer to QWidget::mouseReleaseEvent + /// </summary> + void mouseReleaseEvent(QMouseEvent* event) override; + + /// <summary> + /// Please refer to QWidget::wheelEvent + /// </summary> + void wheelEvent(QWheelEvent* event) override; + + /// <summary> + /// Please refer to QWidget::leaveEvent + /// </summary> + void leaveEvent(QEvent* event) override; + + /// <summary> + /// Please refer to QWidget::contextMenuEvent + /// </summary> + void contextMenuEvent(QContextMenuEvent* event) override; +#pragma endregion +}; + +#endif // QCEFVIEW_H diff --git a/3rdparty/QCefView/include/QCefView/QCefView_global.h b/3rdparty/QCefView/include/QCefView/QCefView_global.h new file mode 100644 index 0000000..ca97a04 --- /dev/null +++ b/3rdparty/QCefView/include/QCefView/QCefView_global.h @@ -0,0 +1,40 @@ +/* + * File: QCefView_global.h + * Project: QCefView + * Created: 29th March 2016 + * Author: Sheen + * Source: https://github.com/cefview/qcefview + * Docs: https://cefview.github.io/QCefView/ + */ +#ifndef QCEFEVIEW_GLOBAL_H +#define QCEFEVIEW_GLOBAL_H +#pragma once + +// clang-format off +#pragma region qt_headers +#include <QtCore/qglobal.h> +#include <QMetaType> +#pragma endregion + +#ifdef QCEFVIEW_STATIC + // Static library, no need export + #define QCEFVIEW_EXPORT +#else + // Dynamic library + #ifdef QCEFVIEW_LIB + // Build QCefView project, export API + #define QCEFVIEW_EXPORT Q_DECL_EXPORT + #else + // Referenced by other project, import API + #define QCEFVIEW_EXPORT Q_DECL_IMPORT + #if _WIN32 + #pragma comment(lib, "QCefView.lib") + #endif + #endif +#endif +// clang-format on + +// CEF version numbers +#include <CefVersion.h> + +#endif // QCEFEVIEW_GLOBAL_H diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_atomic_flag.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_atomic_flag.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_atomic_flag.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_atomic_flag.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_atomic_ref_count.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_atomic_ref_count.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_atomic_ref_count.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_atomic_ref_count.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_auto_reset.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_auto_reset.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_auto_reset.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_auto_reset.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_bind.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_bind.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_bind.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_bind.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_build.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_build.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_build.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_build.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_callback.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_callback.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_callback_forward.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback_forward.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_callback_forward.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback_forward.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_callback_helpers.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback_helpers.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_callback_helpers.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback_helpers.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_callback_list.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback_list.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_callback_list.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_callback_list.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_cancelable_callback.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_cancelable_callback.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_cancelable_callback.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_cancelable_callback.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_compiler_specific.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_compiler_specific.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_compiler_specific.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_compiler_specific.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_dump_without_crashing.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_dump_without_crashing.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_dump_without_crashing.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_dump_without_crashing.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_lock.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_lock.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_lock.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_lock.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_logging.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_logging.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_logging.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_logging.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_macros.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_macros.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_macros.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_macros.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_platform_thread.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_platform_thread.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_platform_thread.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_platform_thread.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_ref_counted.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_ref_counted.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_ref_counted.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_ref_counted.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_scoped_refptr.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_scoped_refptr.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_scoped_refptr.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_scoped_refptr.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_thread_checker.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_thread_checker.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_thread_checker.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_thread_checker.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_trace_event.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_trace_event.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_trace_event.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_trace_event.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_tuple.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_tuple.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_tuple.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_tuple.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/cef_weak_ptr.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_weak_ptr.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/cef_weak_ptr.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/cef_weak_ptr.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/README-TRANSFER.txt b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/README-TRANSFER.txt similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/README-TRANSFER.txt rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/README-TRANSFER.txt diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_bind_internal.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_bind_internal.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_bind_internal.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_bind_internal.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_callback_internal.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_callback_internal.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_callback_internal.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_callback_internal.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_color_id_macros.inc b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_color_id_macros.inc similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_color_id_macros.inc rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_color_id_macros.inc diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_lock_impl.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_lock_impl.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_lock_impl.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_lock_impl.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_net_error_list.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_net_error_list.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_net_error_list.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_net_error_list.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_raw_scoped_refptr_mismatch_checker.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_raw_scoped_refptr_mismatch_checker.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_raw_scoped_refptr_mismatch_checker.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_scoped_policy.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_scoped_policy.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_scoped_policy.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_scoped_policy.h diff --git a/3rdparty/libcef_dll_wrapper/include/base/internal/cef_thread_checker_impl.h b/3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_thread_checker_impl.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/base/internal/cef_thread_checker_impl.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/base/internal/cef_thread_checker_impl.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_accessibility_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_accessibility_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_accessibility_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_accessibility_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_app_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_app_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_app_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_app_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_audio_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_audio_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_audio_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_audio_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_auth_callback_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_auth_callback_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_auth_callback_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_auth_callback_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_base_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_base_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_base_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_base_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_browser_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_browser_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_browser_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_browser_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_browser_process_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_browser_process_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_browser_process_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_browser_process_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_callback_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_callback_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_callback_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_callback_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_client_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_client_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_client_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_client_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_command_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_command_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_command_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_command_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_command_line_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_command_line_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_command_line_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_command_line_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_context_menu_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_context_menu_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_context_menu_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_context_menu_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_cookie_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_cookie_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_cookie_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_cookie_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_crash_util_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_crash_util_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_crash_util_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_crash_util_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_devtools_message_observer_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_devtools_message_observer_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_devtools_message_observer_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_devtools_message_observer_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_dialog_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_dialog_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_dialog_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_dialog_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_display_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_display_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_display_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_display_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_dom_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_dom_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_dom_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_dom_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_download_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_download_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_download_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_download_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_download_item_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_download_item_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_download_item_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_download_item_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_drag_data_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_drag_data_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_drag_data_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_drag_data_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_drag_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_drag_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_drag_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_drag_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_file_util_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_file_util_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_file_util_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_file_util_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_find_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_find_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_find_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_find_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_focus_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_focus_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_focus_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_focus_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_frame_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_frame_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_frame_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_frame_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_frame_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_frame_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_frame_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_frame_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_i18n_util_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_i18n_util_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_i18n_util_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_i18n_util_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_image_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_image_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_image_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_image_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_jsdialog_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_jsdialog_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_jsdialog_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_jsdialog_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_keyboard_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_keyboard_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_keyboard_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_keyboard_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_life_span_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_life_span_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_life_span_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_life_span_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_load_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_load_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_load_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_load_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_media_router_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_media_router_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_media_router_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_media_router_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_menu_model_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_menu_model_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_menu_model_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_menu_model_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_menu_model_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_menu_model_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_menu_model_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_menu_model_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_navigation_entry_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_navigation_entry_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_navigation_entry_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_navigation_entry_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_origin_whitelist_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_origin_whitelist_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_origin_whitelist_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_origin_whitelist_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_parser_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_parser_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_parser_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_parser_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_path_util_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_path_util_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_path_util_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_path_util_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_permission_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_permission_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_permission_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_permission_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_preference_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_preference_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_preference_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_preference_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_print_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_print_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_print_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_print_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_print_settings_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_print_settings_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_print_settings_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_print_settings_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_process_message_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_process_message_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_process_message_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_process_message_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_process_util_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_process_util_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_process_util_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_process_util_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_registration_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_registration_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_registration_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_registration_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_render_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_render_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_render_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_render_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_render_process_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_render_process_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_render_process_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_render_process_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_request_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_request_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_request_context_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_context_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_request_context_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_context_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_request_context_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_context_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_request_context_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_context_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_request_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_request_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_request_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_resource_bundle_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_bundle_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_resource_bundle_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_bundle_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_resource_bundle_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_bundle_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_resource_bundle_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_bundle_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_resource_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_resource_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_resource_request_handler_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_request_handler_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_resource_request_handler_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_resource_request_handler_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_response_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_response_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_response_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_response_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_response_filter_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_response_filter_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_response_filter_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_response_filter_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_scheme_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_scheme_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_scheme_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_scheme_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_server_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_server_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_server_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_server_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_shared_memory_region_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_shared_memory_region_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_shared_memory_region_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_shared_memory_region_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_shared_process_message_builder_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_shared_process_message_builder_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_shared_process_message_builder_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_shared_process_message_builder_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_ssl_info_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_ssl_info_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_ssl_info_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_ssl_info_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_ssl_status_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_ssl_status_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_ssl_status_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_ssl_status_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_stream_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_stream_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_stream_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_stream_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_string_visitor_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_string_visitor_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_string_visitor_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_string_visitor_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_task_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_task_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_task_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_task_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_task_manager_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_task_manager_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_task_manager_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_task_manager_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_thread_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_thread_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_thread_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_thread_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_trace_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_trace_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_trace_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_trace_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_unresponsive_process_callback_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_unresponsive_process_callback_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_unresponsive_process_callback_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_unresponsive_process_callback_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_urlrequest_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_urlrequest_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_urlrequest_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_urlrequest_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_v8_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_v8_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_v8_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_v8_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_values_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_values_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_values_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_values_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_waitable_event_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_waitable_event_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_waitable_event_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_waitable_event_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_x509_certificate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_x509_certificate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_x509_certificate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_x509_certificate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_xml_reader_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_xml_reader_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_xml_reader_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_xml_reader_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/cef_zip_reader_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_zip_reader_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/cef_zip_reader_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/cef_zip_reader_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/test/cef_api_version_test_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_api_version_test_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/test/cef_api_version_test_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_api_version_test_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/test/cef_test_helpers_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_test_helpers_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/test/cef_test_helpers_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_test_helpers_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/test/cef_test_server_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_test_server_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/test/cef_test_server_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_test_server_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/test/cef_translator_test_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_translator_test_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/test/cef_translator_test_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/test/cef_translator_test_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_box_layout_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_box_layout_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_box_layout_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_box_layout_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_browser_view_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_browser_view_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_browser_view_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_browser_view_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_browser_view_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_browser_view_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_browser_view_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_browser_view_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_button_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_button_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_button_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_button_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_button_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_button_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_button_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_button_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_display_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_display_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_display_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_display_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_fill_layout_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_fill_layout_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_fill_layout_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_fill_layout_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_label_button_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_label_button_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_label_button_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_label_button_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_layout_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_layout_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_layout_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_layout_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_menu_button_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_menu_button_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_menu_button_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_menu_button_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_menu_button_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_menu_button_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_menu_button_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_menu_button_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_overlay_controller_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_overlay_controller_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_overlay_controller_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_overlay_controller_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_panel_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_panel_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_panel_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_panel_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_panel_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_panel_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_panel_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_panel_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_scroll_view_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_scroll_view_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_scroll_view_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_scroll_view_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_textfield_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_textfield_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_textfield_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_textfield_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_textfield_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_textfield_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_textfield_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_textfield_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_view_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_view_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_view_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_view_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_view_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_view_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_view_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_view_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_window_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_window_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_window_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_window_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/capi/views/cef_window_delegate_capi.h b/3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_window_delegate_capi.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/capi/views/cef_window_delegate_capi.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/capi/views/cef_window_delegate_capi.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_accessibility_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_accessibility_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_accessibility_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_accessibility_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_api_hash.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_api_hash.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_api_hash.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_api_hash.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_api_versions.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_api_versions.h similarity index 98% rename from 3rdparty/libcef_dll_wrapper/include/cef_api_versions.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_api_versions.h index efa439d..22c7845 100644 --- a/3rdparty/libcef_dll_wrapper/include/cef_api_versions.h +++ b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_api_versions.h @@ -109,7 +109,7 @@ #define CEF_API_HASH_13401 "b14bee2c0fd250da67faea421f620b58e5dea9a2" #endif -// Next version last updated March 20, 2025. +// Next version last updated March 21, 2025. #define CEF_API_VERSION_999998 999998 #if defined(OS_WIN) #define CEF_API_HASH_999998 "751255204f006b8b883a8baf552a2da792f8aa44" @@ -119,7 +119,7 @@ #define CEF_API_HASH_999998 "b14bee2c0fd250da67faea421f620b58e5dea9a2" #endif -// Experimental version last updated March 20, 2025. +// Experimental version last updated March 21, 2025. #define CEF_API_VERSION_999999 999999 #if defined(OS_WIN) #define CEF_API_HASH_999999 "eecfe830f6cd5b53c3535d0df414eeb646a11a08" diff --git a/3rdparty/libcef_dll_wrapper/include/cef_app.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_app.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_app.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_app.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_audio_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_audio_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_audio_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_audio_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_auth_callback.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_auth_callback.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_auth_callback.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_auth_callback.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_base.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_base.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_base.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_base.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_browser.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_browser.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_browser.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_browser.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_browser_process_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_browser_process_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_browser_process_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_browser_process_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_callback.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_callback.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_callback.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_callback.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_client.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_client.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_client.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_client.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_color_ids.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_color_ids.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_color_ids.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_color_ids.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_command_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_command_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_command_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_command_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_command_ids.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_command_ids.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_command_ids.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_command_ids.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_command_line.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_command_line.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_command_line.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_command_line.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_config.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_config.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_config.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_config.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_context_menu_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_context_menu_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_context_menu_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_context_menu_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_cookie.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_cookie.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_cookie.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_cookie.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_crash_util.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_crash_util.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_crash_util.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_crash_util.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_devtools_message_observer.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_devtools_message_observer.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_devtools_message_observer.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_devtools_message_observer.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_dialog_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_dialog_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_dialog_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_dialog_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_display_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_display_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_display_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_display_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_dom.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_dom.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_dom.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_dom.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_download_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_download_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_download_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_download_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_download_item.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_download_item.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_download_item.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_download_item.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_drag_data.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_drag_data.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_drag_data.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_drag_data.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_drag_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_drag_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_drag_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_drag_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_file_util.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_file_util.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_file_util.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_file_util.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_find_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_find_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_find_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_find_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_focus_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_focus_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_focus_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_focus_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_frame.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_frame.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_frame.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_frame.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_frame_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_frame_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_frame_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_frame_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_i18n_util.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_i18n_util.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_i18n_util.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_i18n_util.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_id_mappers.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_id_mappers.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_id_mappers.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_id_mappers.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_image.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_image.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_image.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_image.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_jsdialog_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_jsdialog_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_jsdialog_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_jsdialog_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_keyboard_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_keyboard_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_keyboard_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_keyboard_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_life_span_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_life_span_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_life_span_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_life_span_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_load_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_load_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_load_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_load_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_media_router.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_media_router.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_media_router.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_media_router.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_menu_model.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_menu_model.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_menu_model.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_menu_model.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_menu_model_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_menu_model_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_menu_model_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_menu_model_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_navigation_entry.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_navigation_entry.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_navigation_entry.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_navigation_entry.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_origin_whitelist.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_origin_whitelist.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_origin_whitelist.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_origin_whitelist.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_pack_resources.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_pack_resources.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_pack_resources.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_pack_resources.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_pack_strings.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_pack_strings.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_pack_strings.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_pack_strings.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_parser.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_parser.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_parser.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_parser.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_path_util.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_path_util.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_path_util.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_path_util.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_permission_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_permission_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_permission_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_permission_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_preference.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_preference.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_preference.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_preference.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_print_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_print_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_print_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_print_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_print_settings.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_print_settings.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_print_settings.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_print_settings.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_process_message.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_process_message.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_process_message.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_process_message.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_process_util.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_process_util.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_process_util.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_process_util.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_registration.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_registration.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_registration.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_registration.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_render_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_render_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_render_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_render_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_render_process_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_render_process_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_render_process_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_render_process_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_request.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_request.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_request.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_request.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_request_context.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_request_context.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_request_context.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_request_context.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_request_context_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_request_context_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_request_context_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_request_context_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_request_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_request_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_request_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_request_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_resource_bundle.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_bundle.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_resource_bundle.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_bundle.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_resource_bundle_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_bundle_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_resource_bundle_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_bundle_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_resource_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_resource_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_resource_request_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_request_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_resource_request_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_resource_request_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_response.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_response.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_response.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_response.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_response_filter.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_response_filter.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_response_filter.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_response_filter.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_sandbox_win.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_sandbox_win.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_sandbox_win.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_sandbox_win.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_scheme.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_scheme.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_scheme.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_scheme.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_server.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_server.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_server.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_server.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_shared_memory_region.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_shared_memory_region.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_shared_memory_region.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_shared_memory_region.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_shared_process_message_builder.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_shared_process_message_builder.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_shared_process_message_builder.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_shared_process_message_builder.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_ssl_info.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_ssl_info.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_ssl_info.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_ssl_info.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_ssl_status.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_ssl_status.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_ssl_status.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_ssl_status.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_stream.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_stream.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_stream.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_stream.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_string_visitor.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_string_visitor.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_string_visitor.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_string_visitor.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_task.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_task.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_task.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_task.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_task_manager.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_task_manager.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_task_manager.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_task_manager.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_thread.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_thread.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_thread.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_thread.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_trace.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_trace.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_trace.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_trace.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_unresponsive_process_callback.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_unresponsive_process_callback.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_unresponsive_process_callback.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_unresponsive_process_callback.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_urlrequest.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_urlrequest.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_urlrequest.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_urlrequest.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_v8.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_v8.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_v8.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_v8.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_values.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_values.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_values.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_values.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_version.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_version.h similarity index 90% rename from 3rdparty/libcef_dll_wrapper/include/cef_version.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_version.h index e7f16c7..e0217ed 100644 --- a/3rdparty/libcef_dll_wrapper/include/cef_version.h +++ b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_version.h @@ -35,18 +35,18 @@ #ifndef CEF_INCLUDE_CEF_VERSION_H_ #define CEF_INCLUDE_CEF_VERSION_H_ -#define CEF_VERSION "134.3.5+g36934eb+chromium-134.0.6998.89" +#define CEF_VERSION "134.3.6+g96006d1+chromium-134.0.6998.118" #define CEF_VERSION_MAJOR 134 #define CEF_VERSION_MINOR 3 -#define CEF_VERSION_PATCH 5 -#define CEF_COMMIT_NUMBER 3154 -#define CEF_COMMIT_HASH "36934ebbc5279631116b9e2b71d8b22acbcd1574" +#define CEF_VERSION_PATCH 6 +#define CEF_COMMIT_NUMBER 3155 +#define CEF_COMMIT_HASH "96006d11935cd82a004d992db6e7124825352e19" #define COPYRIGHT_YEAR 2025 #define CHROME_VERSION_MAJOR 134 #define CHROME_VERSION_MINOR 0 #define CHROME_VERSION_BUILD 6998 -#define CHROME_VERSION_PATCH 89 +#define CHROME_VERSION_PATCH 118 #define DO_MAKE_STRING(p) #p #define MAKE_STRING(p) DO_MAKE_STRING(p) diff --git a/3rdparty/libcef_dll_wrapper/include/cef_version_info.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_version_info.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_version_info.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_version_info.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_waitable_event.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_waitable_event.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_waitable_event.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_waitable_event.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_x509_certificate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_x509_certificate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_x509_certificate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_x509_certificate.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_xml_reader.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_xml_reader.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_xml_reader.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_xml_reader.h diff --git a/3rdparty/libcef_dll_wrapper/include/cef_zip_reader.h b/3rdparty/QCefView/include/libcef_dll_wrapper/cef_zip_reader.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/cef_zip_reader.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/cef_zip_reader.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_app_win.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_app_win.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_app_win.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_app_win.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_dump_without_crashing_internal.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_dump_without_crashing_internal.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_dump_without_crashing_internal.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_dump_without_crashing_internal.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_export.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_export.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_export.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_export.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_logging_internal.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_logging_internal.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_logging_internal.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_logging_internal.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_ptr.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_ptr.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_ptr.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_ptr.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_string.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_string.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_string_list.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_list.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_string_list.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_list.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_string_map.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_map.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_string_map.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_map.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_string_multimap.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_multimap.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_string_multimap.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_multimap.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_string_types.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_types.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_string_types.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_types.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_string_wrappers.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_wrappers.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_string_wrappers.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_string_wrappers.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_thread_internal.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_thread_internal.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_thread_internal.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_thread_internal.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_time.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_time.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_time.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_time.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_time_wrappers.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_time_wrappers.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_time_wrappers.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_time_wrappers.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_trace_event_internal.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_trace_event_internal.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_trace_event_internal.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_trace_event_internal.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types_color.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_color.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types_color.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_color.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types_content_settings.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_content_settings.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types_content_settings.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_content_settings.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types_geometry.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_geometry.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types_geometry.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_geometry.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types_osr.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_osr.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types_osr.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_osr.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types_runtime.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_runtime.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types_runtime.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_runtime.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types_win.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_win.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types_win.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_win.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_types_wrappers.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_wrappers.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_types_wrappers.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_types_wrappers.h diff --git a/3rdparty/libcef_dll_wrapper/include/internal/cef_win.h b/3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_win.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/internal/cef_win.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/internal/cef_win.h diff --git a/3rdparty/libcef_dll_wrapper/include/test/cef_api_version_test.h b/3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_api_version_test.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/test/cef_api_version_test.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_api_version_test.h diff --git a/3rdparty/libcef_dll_wrapper/include/test/cef_test_helpers.h b/3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_test_helpers.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/test/cef_test_helpers.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_test_helpers.h diff --git a/3rdparty/libcef_dll_wrapper/include/test/cef_test_server.h b/3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_test_server.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/test/cef_test_server.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_test_server.h diff --git a/3rdparty/libcef_dll_wrapper/include/test/cef_translator_test.h b/3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_translator_test.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/test/cef_translator_test.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/test/cef_translator_test.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_box_layout.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_box_layout.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_box_layout.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_box_layout.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_browser_view.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_browser_view.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_browser_view.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_browser_view.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_browser_view_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_browser_view_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_browser_view_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_browser_view_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_button.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_button.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_button.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_button.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_button_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_button_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_button_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_button_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_display.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_display.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_display.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_display.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_fill_layout.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_fill_layout.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_fill_layout.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_fill_layout.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_label_button.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_label_button.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_label_button.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_label_button.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_layout.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_layout.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_layout.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_layout.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_menu_button.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_menu_button.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_menu_button.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_menu_button.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_menu_button_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_menu_button_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_menu_button_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_menu_button_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_overlay_controller.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_overlay_controller.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_overlay_controller.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_overlay_controller.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_panel.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_panel.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_panel.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_panel.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_panel_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_panel_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_panel_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_panel_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_scroll_view.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_scroll_view.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_scroll_view.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_scroll_view.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_textfield.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_textfield.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_textfield.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_textfield.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_textfield_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_textfield_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_textfield_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_textfield_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_view.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_view.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_view.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_view.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_view_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_view_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_view_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_view_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_window.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_window.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_window.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_window.h diff --git a/3rdparty/libcef_dll_wrapper/include/views/cef_window_delegate.h b/3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_window_delegate.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/views/cef_window_delegate.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/views/cef_window_delegate.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_byte_read_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_byte_read_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_byte_read_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_byte_read_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_closure_task.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_closure_task.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_closure_task.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_closure_task.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_helpers.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_helpers.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_helpers.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_helpers.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_message_router.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_message_router.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_message_router.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_message_router.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_resource_manager.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_resource_manager.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_resource_manager.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_resource_manager.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_scoped_temp_dir.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_scoped_temp_dir.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_scoped_temp_dir.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_scoped_temp_dir.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_stream_resource_handler.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_stream_resource_handler.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_stream_resource_handler.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_stream_resource_handler.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_xml_object.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_xml_object.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_xml_object.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_xml_object.h diff --git a/3rdparty/libcef_dll_wrapper/include/wrapper/cef_zip_archive.h b/3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_zip_archive.h similarity index 100% rename from 3rdparty/libcef_dll_wrapper/include/wrapper/cef_zip_archive.h rename to 3rdparty/QCefView/include/libcef_dll_wrapper/wrapper/cef_zip_archive.h diff --git a/3rdparty/QCefView/lib/libCefViewCore.a b/3rdparty/QCefView/lib/libCefViewCore.a new file mode 100644 index 0000000..f921002 Binary files /dev/null and b/3rdparty/QCefView/lib/libCefViewCore.a differ diff --git a/3rdparty/QCefView/lib/libQCefView.a b/3rdparty/QCefView/lib/libQCefView.a new file mode 100644 index 0000000..043fde1 Binary files /dev/null and b/3rdparty/QCefView/lib/libQCefView.a differ diff --git a/3rdparty/libcef_dll_wrapper/lib/libcef.a b/3rdparty/QCefView/lib/libcef.a similarity index 100% rename from 3rdparty/libcef_dll_wrapper/lib/libcef.a rename to 3rdparty/QCefView/lib/libcef.a diff --git a/3rdparty/libcef_dll_wrapper/lib/libcef_dll_wrapper.a b/3rdparty/QCefView/lib/libcef_dll_wrapper.a similarity index 53% rename from 3rdparty/libcef_dll_wrapper/lib/libcef_dll_wrapper.a rename to 3rdparty/QCefView/lib/libcef_dll_wrapper.a index c5c5bd9..5a87f14 100644 Binary files a/3rdparty/libcef_dll_wrapper/lib/libcef_dll_wrapper.a and b/3rdparty/QCefView/lib/libcef_dll_wrapper.a differ diff --git a/3rdparty_build/QCefView/CMakeLists.txt b/3rdparty_build/QCefView/CMakeLists.txt new file mode 100644 index 0000000..1089c02 --- /dev/null +++ b/3rdparty_build/QCefView/CMakeLists.txt @@ -0,0 +1,239 @@ +# +# The main config file for QCefView +# +cmake_minimum_required(VERSION 3.21) +project(QCefView) + +set(CMAKE_FOLDER "QCefView") + +# arguments: +# CEF_SDK_VERSION: +# - specify the CEF version to be used, +# - refer to: cmake\CefViewCoreConfig.cmake +# +# QT_SDK_DIR: +# - specify the Qt SDK path +# - refer to: cmake\QtConfig.cmake +# +SET(QT_SDK_DIR "D:/Dev/Qt/6.8.0/mingw1310_static_x64/lib/cmake") + +#变量缓存清理,获取所有缓存变量列表 +get_cmake_property(cache_vars CACHE_VARIABLES) + +# 遍历变量并删除匹配项 +foreach(var IN LISTS cache_vars) + if(var MATCHES "^BUILD_") + unset(${var} CACHE) + endif() + if(var MATCHES "^STATIC_") + unset(${var} CACHE) + endif() + if(var MATCHES "^USE_") + unset(${var} CACHE) + endif() +endforeach() +# options +SET(CMAKE_BUILD_TYPE "Release") +option(BUILD_DEMO "Build the demo" OFF) +option(BUILD_STATIC "Build QCefView as static library" ON) +option(STATIC_CRT "Use MultiThreaded linkage for MSVC" OFF) +option(USE_SANDBOX "Enable CEF Sandbox" OFF) +option(USE_WIN_DCOMPOSITION "Enabled Windows direct composition for hardware rendering, _WIN32_WINNT >= 0x602 (Windows 8) is required" ON) +# Only works for Windows & Linux, always enabled on macOS +# If enable then: +# CefSettings.multi_threaded_message_loop = false && CefSettings.external_message_pump = true +# else: +# CefSettings.multi_threaded_message_loop = true && CefSettings.external_message_pump = false +option(USE_QT_EVENT_LOOP "Enable the integration of CEF message loop thread into Qt event loop" ON) + +# append cmake config module path +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose build type" FORCE) +endif() + +# Use folders in the resulting project files. +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +# C standard +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_STANDARD 11) + +# C++ standard +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_STANDARD 17) + +# 禁用弃用警告 +if(MSVC) + add_definitions(-D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING=1) +elseif(MINGW) + add_compile_options(-Wno-deprecated-declarations) +endif() + +# Determine the project architecture. +if(CMAKE_SIZEOF_VOID_P MATCHES 8) + set(PROJECT_ARCH "x86_64") + else() + set(PROJECT_ARCH "x86") + endif() + +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + set(OS_MACOS 1) + set(OS_POSIX 1) + add_definitions( + -DOS_MACOS=1 + -DOS_POSIX=1 + ) + add_compile_options( + #"-g" + "$<$<CONFIG:DEBUG>:-O0>" + "$<$<CONFIG:RELEASE>:-O3>" + ) + + # Target architecture. + if(PROJECT_ARCH STREQUAL "x86_64") + set(CMAKE_OSX_ARCHITECTURES "x86_64") + elseif(PROJECT_ARCH STREQUAL "arm64") + set(CMAKE_OSX_ARCHITECTURES "arm64") + else() + set(CMAKE_OSX_ARCHITECTURES "i386") + endif() +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + set(OS_LINUX 1) + set(OS_POSIX 1) + add_definitions(-DOS_LINUX=1 -DOS_POSIX=1) + add_compile_options( + "-g" + "$<$<CONFIG:DEBUG>:-O0>" + "$<$<CONFIG:RELEASE>:-O3>" + ) + + if(PROJECT_ARCH STREQUAL "x86_64") + # x86 64-bit architecture. + add_compile_options(-m64 -march=x86-64) + add_link_options(-m64) + elseif(PROJECT_ARCH STREQUAL "x86") + # x86 32-bit architecture. + add_compile_options(-m32) + add_link_options(-m32) + endif() +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") + if(MSVC) + set(OS_WINDOWS 1) + + # Disable the sandbox on Windows, because the sandbox.lib is MT which is conflict with Qt + set(USE_SANDBOX OFF CACHE BOOL "Disable sandbox on Windows" FORCE) + add_definitions( + -DOS_WINDOWS=1 + -D_WIN32_WINNT=0x0A00 + ) + + if(USE_WIN_DCOMPOSITION) + add_definitions( + -DENABLE_WINDOWS_DIRECT_COMPOSITION=1 + ) + endif() + + add_compile_options( + /W3 + /WX + /M$<IF:$<BOOL:${STATIC_CRT}>,T,D>$<$<CONFIG:Debug>:d> + ) + add_link_options(/DEBUG) + elseif(MINGW) + set(OS_WINDOWS 1) + add_definitions( + -DOS_WINDOWS=1 + -D_WIN32_WINNT=0x0A00 + ) + if(USE_WIN_DCOMPOSITION) + add_definitions( + -DENABLE_WINDOWS_DIRECT_COMPOSITION=1 + ) + endif() + add_definitions( + -DOS_WINDOWS=1 + -D_WIN32_WINNT=0x0A00 + ) + endif() +endif() + +if(BUILD_STATIC) + set(QCEFVIEW_LIB_TYPE STATIC) + add_definitions(-DQCEFVIEW_STATIC=1) +else() + set(QCEFVIEW_LIB_TYPE SHARED) +endif() + +# detect whether we are in sub folder +get_directory_property(QCefView_HAS_PARENT_DIRECTORY PARENT_DIRECTORY) + +if(NOT QCefView_HAS_PARENT_DIRECTORY) + message(STATUS "QCefView is not in subdirectory, put all output together") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/$<CONFIG>/bin) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/$<CONFIG>/lib) + if(BUILD_STATIC) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/$<CONFIG>/lib) + else() + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/$<CONFIG>/bin) + endif() +endif() +message(STATUS "QCEFVIEW_RUNTIME_OUTPUT_DIRECTORY: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") +message(STATUS "QCEFVIEW_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") +message(STATUS "QCEFVIEW_ARCHIVE_OUTPUT_DIRECTORY: ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}") +# Config the QT package +# ############################################################## +set(QT_SDK_DIR "" CACHE PATH "Qt build toolchain path") +include(QtConfig) +set(Qt_VERSION ${Qt${QT_VERSION_MAJOR}Core_VERSION}) + +# ############################################################## +# thirdparty CefViewCore +add_subdirectory(thirdparty) + +if(OS_MACOS) + # detect minimum deployment target by Qt + if(${Qt_VERSION} VERSION_GREATER_EQUAL 6.5) + set(QT_MIN_DEPLOYMENT_TARGET 11.0) + elseif(${Qt_VERSION} VERSION_GREATER_EQUAL 6.2) + set(QT_MIN_DEPLOYMENT_TARGET 10.14) + elseif(${Qt_VERSION} VERSION_GREATER_EQUAL 5.14) + set(QT_MIN_DEPLOYMENT_TARGET 10.13) + elseif(${Qt_VERSION} VERSION_GREATER_EQUAL 5.13) + set(QT_MIN_DEPLOYMENT_TARGET 10.12) + elseif(${Qt_VERSION} VERSION_GREATER_EQUAL 5.10) + set(QT_MIN_DEPLOYMENT_TARGET 10.11) + else() + set(QT_MIN_DEPLOYMENT_TARGET 10.10) + endif() + + # detect minimum deployment target by CEF + # plese refer to: https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md + if(${CEF_VERSION_MAJOR} VERSION_GREATER_EQUAL 117) + set(CEF_MIN_DEPLOYMENT_TARGET 10.15) + elseif(${CEF_VERSION_MAJOR} VERSION_GREATER_EQUAL 104) + set(CEF_MIN_DEPLOYMENT_TARGET 10.13) + else() + set(CEF_MIN_DEPLOYMENT_TARGET 10.11) + endif() + + # use the greater one as the minimum deployment target + if(${QT_MIN_DEPLOYMENT_TARGET} VERSION_LESS ${CEF_MIN_DEPLOYMENT_TARGET}) + set(CMAKE_OSX_DEPLOYMENT_TARGET ${CEF_MIN_DEPLOYMENT_TARGET}) + else() + set(CMAKE_OSX_DEPLOYMENT_TARGET ${QT_MIN_DEPLOYMENT_TARGET}) + endif() +endif() + +# Config QCefView target +# ############################################################## +add_subdirectory(src) + +# Config the Demo project +# ############################################################## +if(BUILD_DEMO) + add_subdirectory(example/QCefViewTest) +endif() + +# ############################################################## diff --git a/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/CMakeLists.txt b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/CMakeLists.txt new file mode 100644 index 0000000..c3db794 --- /dev/null +++ b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/CMakeLists.txt @@ -0,0 +1,194 @@ +# +# The main config file for CefViewCore +# +cmake_minimum_required(VERSION 3.19.1) +project(CefViewCore) + +option(USE_SANDBOX "Enable CEF Sandbox" OFF) +option(STATIC_CRT "Use MultiThreaded linkage for MSVC" OFF) + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +# Determine the project architecture. +if(NOT DEFINED PROJECT_ARCH) + if(OS_WINDOWS AND "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "arm64") + set(PROJECT_ARCH "arm64") + elseif(CMAKE_SIZEOF_VOID_P MATCHES 8) + set(PROJECT_ARCH "x86_64") + else() + set(PROJECT_ARCH "x86") + endif() +endif() + +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + set(OS_MACOS 1) + set(OS_POSIX 1) + add_definitions(-DOS_MACOS=1 -DOS_POSIX=1) + + # Target architecture. + if(PROJECT_ARCH STREQUAL "x86_64") + set(CMAKE_OSX_ARCHITECTURES "x86_64") + elseif(PROJECT_ARCH STREQUAL "arm64") + set(CMAKE_OSX_ARCHITECTURES "arm64") + else() + set(CMAKE_OSX_ARCHITECTURES "i386") + endif() +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + set(OS_LINUX 1) + set(OS_POSIX 1) + add_definitions(-DOS_LINUX=1 -DOS_POSIX=1) + add_compile_options(-Wno-unknown-pragmas) + + # Target architecture. + if(PROJECT_ARCH STREQUAL "x86_64") + # x86 64-bit architecture. + add_compile_options(-m64 -march=x86-64) + add_link_options(-m64) + elseif(PROJECT_ARCH STREQUAL "x86") + # x86 32-bit architecture. + add_compile_options(-m32) + add_link_options(-m32) + endif() +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") + set(OS_WINDOWS 1) + add_definitions(-DOS_WINDOWS=1) +endif() + +# Only generate Debug and Release configuration types. +set(CMAKE_CONFIGURATION_TYPES Debug Release) +set(CMAKE_BUILD_TYPE "Release") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug") +endif() + +# Use folders in the resulting project files. +set_property(GLOBAL PROPERTY OS_FOLDERS ON) + +# C standard +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_STANDARD 11) + +# C++ standard +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/output/$<CONFIG>/bin) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/output/$<CONFIG>/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/output/$<CONFIG>/lib) + +# set CefView Helper Process Name +if(NOT CEFVIEW_WING_NAME) + set(DEFAULT_CEFVIEW_WING_NAME "CefViewWing") + message(STATUS + "CEFVIEW_WING_NAME is empty, use default version ${DEFAULT_CEFVIEW_WING_NAME}\n" + "You can change the name by adding -DCEFVIEW_WING_NAME=xxx to commandline for generation") + set(CEFVIEW_WING_NAME ${DEFAULT_CEFVIEW_WING_NAME} CACHE STRING "CefViewWing Helper Process Name" FORCE) +endif() + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/src/CefViewCoreProtocol.h.in" + "${CMAKE_CURRENT_SOURCE_DIR}/include/CefViewCoreProtocol.h" + @ONLY +) + +# Config the CEF +# ############################################################## +message(STATUS "Detecting CEF_SDK_VERSION: ${CEF_SDK_VERSION}") + +if(NOT CEF_SDK_VERSION) + # set CEF version to be used + # https://cef-builds.spotifycdn.com/index.html + # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md + # set(DEFAULT_CEF_SDK_VERSION "89.0.18+gb36241d+chromium-89.0.4389.114") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "91.1.23+g04c8d56+chromium-91.0.4472.164") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "92.0.27+g274abcf+chromium-92.0.4515.159") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "93.1.14+gf38ce34+chromium-93.0.4577.82") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "94.4.11+gc4d96f0+chromium-94.0.4606.81") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "95.7.18+g0d6005e+chromium-95.0.4638.69") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "96.0.18+gfe551e4+chromium-96.0.4664.110") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "97.1.9+ga00bca5+chromium-97.0.4692.99") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "98.2.1+g29d6e22+chromium-98.0.4758.109") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "99.2.15+g71e9523+chromium-99.0.4844.84") # IME poisition incorrect + # set(DEFAULT_CEF_SDK_VERSION "100.0.24+g0783cf8+chromium-100.0.4896.127") # IME poisition incorrect + # set(DEFAULT_CEF_SDK_VERSION "101.0.18+g367b4a0+chromium-101.0.4951.67") # IME poisition incorrect + # set(DEFAULT_CEF_SDK_VERSION "102.0.10+gf249b2e+chromium-102.0.5005.115") # IME poisition incorrect + # set(DEFAULT_CEF_SDK_VERSION "103.0.12+g8eb56c7+chromium-103.0.5060.134") # IME poisition incorrect + # set(DEFAULT_CEF_SDK_VERSION "104.4.26+g4180781+chromium-104.0.5112.102") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "105.3.39+g2ec21f9+chromium-105.0.5195.127") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "106.1.1+g5891c70+chromium-106.0.5249.119") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "107.1.12+g65b79a6+chromium-107.0.5304.122") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "108.4.13+ga98cd4c+chromium-108.0.5359.125") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "109.1.18+gf1c41e4+chromium-109.0.5414.120") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "110.0.32+g291f1df+chromium-110.0.5481.180") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "111.2.7+gebf5d6a+chromium-111.0.5563.148") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "112.3.0+gb09c4ca+chromium-112.0.5615.165") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "113.3.1+g525fa10+chromium-113.0.5672.128") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "114.2.13+g6792e13+chromium-114.0.5735.200") + # set(DEFAULT_CEF_SDK_VERSION "115.3.15+g21130e0+chromium-115.0.5790.173") + # set(DEFAULT_CEF_SDK_VERSION "116.0.27+gd8c85ac+chromium-116.0.5845.190") + # set(DEFAULT_CEF_SDK_VERSION "117.2.5+gda4c36a+chromium-117.0.5938.152") + # set(DEFAULT_CEF_SDK_VERSION "118.7.1+g99817d2+chromium-118.0.5993.119") + # set(DEFAULT_CEF_SDK_VERSION "119.4.7+g55e15c8+chromium-119.0.6045.199") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "120.1.6+gf08b1fd+chromium-120.0.6099.71") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "121.3.15+g4d3b0b4+chromium-121.0.6167.184") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "122.1.13+gde5b724+chromium-122.0.6261.130") # GOOD + # set(DEFAULT_CEF_SDK_VERSION "123.0.13+gfc703fb+chromium-123.0.6312.124") # NOT TEST + # set(DEFAULT_CEF_SDK_VERSION "124.3.9+g9bd638f+chromium-124.0.6367.207") # NOT TEST + # set(DEFAULT_CEF_SDK_VERSION "125.0.22+gc410c95+chromium-125.0.6422.142") # NOT TEST + # set(DEFAULT_CEF_SDK_VERSION "126.2.18+g3647d39+chromium-126.0.6478.183") # NOT TEST + set(DEFAULT_CEF_SDK_VERSION "127.3.5+g114ea2a+chromium-127.0.6533.120") # GOOD + + # set(DEFAULT_CEF_SDK_VERSION "128.4.9+g9840ad9+chromium-128.0.6613.120") # BAD # debugbreak - debug mode + message(STATUS + "CEF_SDK_VERSION is empty, use default version ${DEFAULT_CEF_SDK_VERSION}\n" + "You can change the version by adding -DCEF_SDK_VERSION=xxx to commandline for generation") + set(CEF_SDK_VERSION ${DEFAULT_CEF_SDK_VERSION} CACHE STRING "Cef binary SDK version" FORCE) +endif() + +# setup CEF +include(SetupCef) + +# ############################################################## +set(CMAKE_SUPPRESS_REGENERATION TRUE) + +# ############################################################## +set(CefViewCore_INCLUDE_PATH + "${CEF_INCLUDE_PATH}" + "${CMAKE_CURRENT_SOURCE_DIR}/include" +) + +add_subdirectory(src) + +if(OS_MACOS) + set(CefViewCore_HELPER_TARGETS "${CEFVIEW_WING_NAME};${CEFVIEW_WING_NAME}_gpu;${CEFVIEW_WING_NAME}_plugin;${CEFVIEW_WING_NAME}_renderer") +else() + set(CefViewCore_HELPER_TARGETS "${CEFVIEW_WING_NAME}") +endif() + +get_directory_property(IS_CURRENT_IN_SUBDIRECTORY PARENT_DIRECTORY) + +if(IS_CURRENT_IN_SUBDIRECTORY) + set(CEFVIEW_WING_NAME ${CEFVIEW_WING_NAME} PARENT_SCOPE) + set(CefViewCore_EXPORT_INCLUDE_PATH ${CefViewCore_INCLUDE_PATH} PARENT_SCOPE) + set(CefViewCore_HELPER_APP_TARGETS ${CefViewCore_HELPER_TARGETS} PARENT_SCOPE) + set(CefViewCore_CEF_BINARY_DIR ${CEF_BINARY_DIR} PARENT_SCOPE) + set(CefViewCore_CEF_RESOURCE_DIR ${CEF_RESOURCE_DIR} PARENT_SCOPE) + set(CefViewCore_CEF_INCLUDE_DIR ${CEF_ROOT}/include PARENT_SCOPE) +endif() + +install( + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/$<CONFIG>/lib" + DESTINATION "$<CONFIG>" +) +install( + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/$<CONFIG>/bin" + DESTINATION "$<CONFIG>" +) +install( + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" + DESTINATION "include/CefViewCore" +) +install( + DIRECTORY "${CEF_SDK_DIR}/include" + DESTINATION "include/cef" +) diff --git a/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/cmake/SetupCef.cmake b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/cmake/SetupCef.cmake new file mode 100644 index 0000000..7eb680d --- /dev/null +++ b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/cmake/SetupCef.cmake @@ -0,0 +1,240 @@ +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# Generally, there is NO NEED to modify the following config +# +# Download CEF binary package +# https://cef-builds.spotifycdn.com/index.html +# + +# ################################################################################# +# Stage 1. Download CEF binary package +if(NOT CEF_SDK_VERSION) + message(FATAL_ERROR "CEF_SDK_VERSION is missing!") +endif() + +if(OS_WINDOWS) + set(CEF_SDK_PLATFORM "windows") +elseif(OS_LINUX) + set(CEF_SDK_PLATFORM "linux") +elseif(OS_MACOS) + set(CEF_SDK_PLATFORM "macos") +else() + message(FATAL_ERROR "Unsupported Operating System") +endif() + +if(PROJECT_ARCH STREQUAL "x86_64") + set(CEF_SDK_ARCH "64") +elseif(PROJECT_ARCH STREQUAL "x86") + set(CEF_SDK_ARCH "32") +elseif(PROJECT_ARCH STREQUAL "arm64") + set(CEF_SDK_ARCH "arm64") +elseif(PROJECT_ARCH STREQUAL "arm") + set(CEF_SDK_ARCH "arm") +else() + message(FATAL_ERROR "Unsupported Processor Architecture") +endif() + +# set cef sdk package name +set(CEF_SDK_WORKSPACE "${CMAKE_CURRENT_SOURCE_DIR}/dep") + +if(OS_MACOS AND PROJECT_ARCH STREQUAL "x86_64") + # macosx64 + set(CEF_SDK_PACKAGE_NAME "cef_binary_${CEF_SDK_VERSION}_${CEF_SDK_PLATFORM}x${CEF_SDK_ARCH}") +else() + set(CEF_SDK_PACKAGE_NAME "cef_binary_${CEF_SDK_VERSION}_${CEF_SDK_PLATFORM}${CEF_SDK_ARCH}") +endif() + +if(NOT CUSTOM_CEF_SDK_DIR) + # Scan extracted sdk dir + set(CEF_SDK_EXTRACTED_DIR "${CEF_SDK_WORKSPACE}/${CEF_SDK_PACKAGE_NAME}") + file(GLOB CEF_SDK_DIR "${CEF_SDK_EXTRACTED_DIR}") +else() + message(STATUS "CUSTOM_CEF_SDK_DIR set: ${CUSTOM_CEF_SDK_DIR}") + set(CEF_SDK_DIR "${CUSTOM_CEF_SDK_DIR}") +endif() + +# output +message(STATUS "CEF SDK dir: ${CEF_SDK_DIR}") + +# ################################################################################# +# Stage 2. Extract CEF binary package +if(NOT EXISTS ${CEF_SDK_DIR}) + set(CEF_LOCAL_PACKAGE_PATH "${CEF_SDK_WORKSPACE}/${CEF_SDK_PACKAGE_NAME}.tar.bz2") + + # if no local cef sdk package file then download it + if(NOT EXISTS "${CEF_LOCAL_PACKAGE_PATH}") + set(CEF_SDK_DOWNLOAD_URL "https://cef-builds.spotifycdn.com/${CEF_SDK_PACKAGE_NAME}.tar.bz2") + message(STATUS "Downloading CEF binary SDK from ${CEF_SDK_DOWNLOAD_URL}") + file(DOWNLOAD + "${CEF_SDK_DOWNLOAD_URL}" # URL + "${CEF_LOCAL_PACKAGE_PATH}" # Local Path + SHOW_PROGRESS + TLS_VERIFY ON + STATUS DOWNLOAD_RESULT + ) + list(GET DOWNLOAD_RESULT 0 DOWNLOAD_RESULT_CODE) + list(GET DOWNLOAD_RESULT 1 DOWNLOAD_RESULT_MESSAGE) + + if(NOT DOWNLOAD_RESULT_CODE EQUAL 0) + file(REMOVE "${CEF_LOCAL_PACKAGE_PATH}") + message(FATAL_ERROR "Failed to download CEF binary SDK, ERROR:[${DOWNLOAD_RESULT_CODE}]${DOWNLOAD_RESULT_MESSAGE}") + endif() + endif() + + message(STATUS "Extracting CEF binary SDK from ${CEF_LOCAL_PACKAGE_PATH}") + + # Extract + file(ARCHIVE_EXTRACT + INPUT "${CEF_LOCAL_PACKAGE_PATH}" + DESTINATION "${CEF_SDK_WORKSPACE}" + VERBOSE + ) + + # Capture the dir name + file(GLOB CEF_SDK_DIR "${CEF_SDK_EXTRACTED_DIR}") +endif() + +# ################################################################################# +# Stage 3. Config CEF +if(${CMAKE_VERSION} GREATER "3.11") + cmake_policy(SET CMP0074 NEW) +endif() + +if(${CMAKE_VERSION} GREATER "3.12") + cmake_policy(SET CMP0077 NEW) +endif() + +if(OS_WINDOWS) + if(MSVC) + add_link_options(/DEBUG) + + if(USE_SANDBOX) + # cef_sandbox.lib is MT already, must keep the same with it + set(CEF_RUNTIME_LIBRARY_FLAG "/MT" CACHE STRING "Use static runtime") + add_compile_options("/MT$<$<CONFIG:Debug>:d>") + else() + # either MT or MD is supported + set(CEF_RUNTIME_LIBRARY_FLAG "/M$<IF:$<BOOL:${STATIC_CRT}>,T,D>" CACHE STRING "Use static runtime" FORCE) + add_compile_options("/M$<IF:$<BOOL:${STATIC_CRT}>,T,D>$<$<CONFIG:Debug>:d>") + endif() + elseif(MINGW) + add_compile_options( + #"-g" + "$<$<CONFIG:DEBUG>:-O0>" + "$<$<CONFIG:RELEASE>:-O3>" + ) + endif() +else() + add_compile_options( + #"-g" + "$<$<CONFIG:DEBUG>:-O0>" + "$<$<CONFIG:RELEASE>:-O3>" + ) +endif() + +# Append CEF root dir to CMAKE_MODULE_PATH +set(CEF_ROOT "${CEF_SDK_DIR}") +list(APPEND CMAKE_MODULE_PATH "${CEF_ROOT}/cmake") +find_package(CEF REQUIRED) + +# Add libcef dll wrapper +add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper) + +if(USE_SANDBOX AND(OS_WINDOWS OR OS_MACOS)) + add_definitions(-DCEF_USE_SANDBOX) + + # message(STATUS "cef_sandbox_lib path:" "${CEF_SANDBOX_LIB_DEBUG}," "${CEF_SANDBOX_LIB_RELEASE}" ) + # Logical target used to link the cef_sandbox library. + ADD_LOGICAL_TARGET("cef_sandbox_lib" "${CEF_SANDBOX_LIB_DEBUG}" "${CEF_SANDBOX_LIB_RELEASE}") +endif() + +PRINT_CEF_CONFIG() + +# ################################################################################# +# Stage 4. Read CEF version and generated CefVersion.h +# set need configure QCefView_global to false +set(Need_Config_CefVersion_File FALSE) + +message(STATUS "${CEF_ROOT}/include/cef_version.h") +file(READ "${CEF_ROOT}/include/cef_version.h" cef_version_content) + +# ------------ check CEF_VERSION +string(REGEX MATCH "#define CEF_VERSION \"([a-z0-9\.\+\-]+)\"" _ ${cef_version_content}) + +if(NOT "${CMAKE_MATCH_1}" STREQUAL "${CEF_VERSION}") + set(CEF_VERSION ${CMAKE_MATCH_1} CACHE STRING "CEF Version" FORCE) + set(Need_Config_CefVersion_File TRUE) + message(STATUS "CEF_VERSION: ${CEF_VERSION} - Updated!") +else() + message(STATUS "CEF_VERSION: ${CEF_VERSION} - No Change!") +endif() + +# ------------ check CEF_VERSION_MAJOR +string(REGEX MATCH "#define CEF_VERSION_MAJOR ([0-9]+)" _ ${cef_version_content}) + +if(NOT "${CMAKE_MATCH_1}" STREQUAL "${CEF_VERSION_MAJOR}") + set(CEF_VERSION_MAJOR ${CMAKE_MATCH_1} CACHE STRING "CEF Major Version" FORCE) + set(Need_Config_CefVersion_File TRUE) + message(STATUS "CEF_VERSION_MAJOR: ${CEF_VERSION_MAJOR} - Updated!") +else() + message(STATUS "CEF_VERSION_MAJOR: ${CEF_VERSION_MAJOR} - No Change!") +endif() + +# ------------ check CEF_VERSION_MINOR +string(REGEX MATCH "#define CEF_VERSION_MINOR ([0-9]+)" _ ${cef_version_content}) + +if(NOT "${CMAKE_MATCH_1}" STREQUAL "${CEF_VERSION_MINOR}") + set(CEF_VERSION_MINOR ${CMAKE_MATCH_1} CACHE STRING "CEF Minor Version" FORCE) + set(Need_Config_CefVersion_File TRUE) + message(STATUS "CEF_VERSION_MINOR: ${CEF_VERSION_MINOR} - Updated!") +else() + message(STATUS "CEF_VERSION_MINOR: ${CEF_VERSION_MINOR} - No Change!") +endif() + +# ------------ check CEF_VERSION_PATCH +string(REGEX MATCH "#define CEF_VERSION_PATCH ([0-9]+)" _ ${cef_version_content}) + +if(NOT "${CMAKE_MATCH_1}" STREQUAL "${CEF_VERSION_PATCH}") + set(CEF_VERSION_PATCH ${CMAKE_MATCH_1} CACHE STRING "CEF Patch Version" FORCE) + set(Need_Config_CefVersion_File TRUE) + message(STATUS "CEF_VERSION_PATCH: ${CEF_VERSION_PATCH} - Updated!") +else() + message(STATUS "CEF_VERSION_PATCH: ${CEF_VERSION_PATCH} - No Change!") +endif() + +# ------------ check CEF_COMMIT_NUMBER +string(REGEX MATCH "#define CEF_COMMIT_NUMBER ([0-9]+)" _ ${cef_version_content}) + +if(NOT "${CMAKE_MATCH_1}" STREQUAL "${CEF_COMMIT_NUMBER}") + set(CEF_COMMIT_NUMBER ${CMAKE_MATCH_1} CACHE STRING "CEF Commit Number" FORCE) + set(Need_Config_CefVersion_File TRUE) + message(STATUS "CEF_COMMIT_NUMBER: ${CEF_COMMIT_NUMBER} - Updated!") +else() + message(STATUS "CEF_COMMIT_NUMBER: ${CEF_COMMIT_NUMBER} - No Change!") +endif() + +# ------------ check CEF_COMMIT_HASH +string(REGEX MATCH "#define CEF_COMMIT_HASH \"([a-z0-9]+)\"" _ ${cef_version_content}) + +if(NOT "${CMAKE_MATCH_1}" STREQUAL "${CEF_COMMIT_HASH}") + set(CEF_COMMIT_HASH ${CMAKE_MATCH_1} CACHE STRING "CEF Commit Hash" FORCE) + set(Need_Config_CefVersion_File TRUE) + message(STATUS "CEF_COMMIT_HASH: ${CEF_COMMIT_HASH} - Updated!") +else() + message(STATUS "CEF_COMMIT_HASH: ${CEF_COMMIT_HASH} - No Change!") +endif() + +if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/CefVersion.h") + set(Need_Config_CefVersion_File TRUE) +endif() + +if(${Need_Config_CefVersion_File}) + message(STATUS "Need to configure CefVersion.h file") + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/src/CefVersion.h.in" + "${CMAKE_CURRENT_SOURCE_DIR}/include/CefVersion.h" + @ONLY + NEWLINE_STYLE UNIX + ) +else() + message(STATUS "No need to configure CefVersion.h file") +endif() diff --git a/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/CMakeLists.txt b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/CMakeLists.txt new file mode 100644 index 0000000..307c2f6 --- /dev/null +++ b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/CMakeLists.txt @@ -0,0 +1,257 @@ +# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights +# reserved. Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file. + +# OVERVIEW +# +# CMake is a cross-platform open-source build system that can generate project +# files in many different formats. It can be downloaded from +# http://www.cmake.org or installed via a platform package manager. +# +# CMake-generated project formats that have been tested with this CEF binary +# distribution include: +# +# Linux: Ninja, GCC 7.5.0+, Unix Makefiles +# MacOS: Ninja, Xcode 12.2 to 15.0 +# Windows: Ninja, Visual Studio 2022 +# +# Ninja is a cross-platform open-source tool for running fast builds using +# pre-installed platform toolchains (GNU, clang, Xcode or MSVC). It can be +# downloaded from http://martine.github.io/ninja/ or installed via a platform +# package manager. +# +# CMAKE STRUCTURE +# +# This CEF binary distribution includes the following CMake files: +# +# CMakeLists.txt Bootstrap that sets up the CMake environment. +# cmake/*.cmake CEF configuration files shared by all targets. +# libcef_dll/CMakeLists.txt Defines the libcef_dll_wrapper target. +# tests/*/CMakeLists.txt Defines the test application target. +# +# See the "TODO:" comments below for guidance on how to integrate this CEF +# binary distribution into a new or existing CMake project. +# +# BUILD REQUIREMENTS +# +# The below requirements must be met to build this CEF binary distribution. +# +# - CMake version 3.21 or newer. +# +# - Linux requirements: +# Currently supported distributions include Debian 10 (Buster), Ubuntu 18 +# (Bionic Beaver), and related. Ubuntu 18.04 64-bit with GCC 7.5.0+ is +# recommended. Newer versions will likely also work but may not have been +# tested. +# Required packages include: +# build-essential +# libgtk3.0-dev (required by the cefclient target only) +# +# - MacOS requirements: +# Xcode 12.2 to 15.0 building on MacOS 10.15.4 (Catalina) or newer. Only +# 64-bit builds are supported. The Xcode command-line tools must also be +# installed. Newer Xcode versions may not have been been tested and are not +# recommended. +# +# - Windows requirements: +# Visual Studio 2022 building on Windows 10 or newer. Windows 10/11 64-bit is +# recommended. Newer versions will likely also work but may not have been +# tested. +# +# BUILD EXAMPLES +# +# The below commands will generate project files and create a Debug build of all +# CEF targets using CMake and the platform toolchain. +# +# Start by creating and entering the CMake build output directory: +# > cd path/to/cef_binary_* +# > mkdir build && cd build +# +# To perform a Linux build using a 32-bit CEF binary distribution on a 32-bit +# Linux platform or a 64-bit CEF binary distribution on a 64-bit Linux platform: +# Using Unix Makefiles: +# > cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. +# > make -j4 cefclient cefsimple +# +# Using Ninja: +# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. +# > ninja cefclient cefsimple +# +# To perform a MacOS build using a 64-bit CEF binary distribution: +# Using the Xcode IDE: +# > cmake -G "Xcode" -DPROJECT_ARCH="x86_64" .. +# Open build\cef.xcodeproj in Xcode and select Product > Build. +# +# Using Ninja: +# > cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=Debug .. +# > ninja cefclient cefsimple +# +# To perform a MacOS build using an ARM64 CEF binary distribution: +# Using the Xcode IDE: +# > cmake -G "Xcode" -DPROJECT_ARCH="arm64" .. +# Open build\cef.xcodeproj in Xcode and select Product > Build. +# +# Using Ninja: +# > cmake -G "Ninja" -DPROJECT_ARCH="arm64" -DCMAKE_BUILD_TYPE=Debug .. +# > ninja cefclient cefsimple +# +# To perform a Windows build using a 32-bit CEF binary distribution: +# Using the Visual Studio 2022 IDE: +# > cmake -G "Visual Studio 17" -A Win32 .. +# Open build\cef.sln in Visual Studio and select Build > Build Solution. +# +# Using Ninja with Visual Studio 2022 command-line tools: +# (this path may be different depending on your Visual Studio installation) +# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars32.bat" +# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. +# > ninja cefclient cefsimple +# +# To perform a Windows build using a 64-bit CEF binary distribution: +# Using the Visual Studio 2022 IDE: +# > cmake -G "Visual Studio 17" -A x64 .. +# Open build\cef.sln in Visual Studio and select Build > Build Solution. +# +# Using Ninja with Visual Studio 2022 command-line tools: +# (this path may be different depending on your Visual Studio installation) +# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat" +# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. +# > ninja cefclient cefsimple +# +# To perform a Windows build using an ARM64 CEF binary distribution: +# Using the Visual Studio 2022 IDE: +# > cmake -G "Visual Studio 17" -A arm64 .. +# Open build\cef.sln in Visual Studio and select Build > Build Solution. +# +# Using Ninja with Visual Studio 2022 command-line tools: +# (this path may be different depending on your Visual Studio installation) +# > "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" +# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. +# > ninja cefsimple + +# +# Global setup. +# + +# For VS2022 and Xcode 12+ support. +cmake_minimum_required(VERSION 3.21) + +# Only generate Debug and Release configuration types. +set(CMAKE_CONFIGURATION_TYPES Debug Release) + +# Project name. +# TODO: Change this line to match your project name when you copy this file. +project(cef) + +# Use folders in the resulting project files. +set_property(GLOBAL PROPERTY OS_FOLDERS ON) + + +# +# CEF_ROOT setup. +# This variable must be set to locate the binary distribution. +# TODO: Choose one of the below examples and comment out the rest. +# + +# Example 1: The current directory contains both the complete binary +# distribution and your project. +# A. Comment in these lines: +# +set(CEF_ROOT "${CMAKE_CURRENT_SOURCE_DIR}") +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake") + +# Example 2: The binary distribution is in a separate directory from your +# project. Locate the binary distribution using the CEF_ROOT CMake +# variable. +# A. Create a directory structure for your project like the following: +# myproject/ +# CMakeLists.txt <= top-level CMake configuration +# mytarget/ +# CMakeLists.txt <= CMake configuration for `mytarget` +# ... other `mytarget` source files +# B. Copy this file to "myproject/CMakeLists.txt" as the top-level CMake +# configuration. +# C. Create the target-specific "myproject/mytarget/CMakeLists.txt" file for +# your application. See the included cefclient and cefsimple CMakeLists.txt +# files as an example. +# D. Comment in these lines: +# +# set(CEF_ROOT "c:/path/to/cef_binary_3.2704.xxxx.gyyyyyyy_windows32") +# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake") + +# Example 3: The binary distribution is in a separate directory from your +# project. Locate the binary distribution using the CEF_ROOT +# environment variable. +# A. Create a directory structure for your project like the following: +# myproject/ +# CMakeLists.txt <= top-level CMake configuration +# cmake/ +# FindCEF.cmake <= CEF CMake configuration entry point +# mytarget/ +# CMakeLists.txt <= CMake configuration for `mytarget` +# ... other `mytarget` source files +# B. Copy this file to "myproject/CMakeLists.txt" as the top-level CMake +# configuration. +# C. Copy the cmake/FindCEF.cmake file to "myproject/cmake/FindCEF.cmake". +# D. Create the target-specific "myproject/mytarget/CMakeLists.txt" file for +# your application. See the included cefclient and cefsimple CMakeLists.txt +# files as an example. +# E. Set the CEF_ROOT environment variable before executing CMake. For example: +# > set CEF_ROOT=c:\path\to\cef_binary_3.2704.xxxx.gyyyyyyy_windows32 +# F. Comment in these lines: +# +# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + + +# +# Load the CEF configuration. +# + +# Execute FindCEF.cmake which must exist in CMAKE_MODULE_PATH. +find_package(CEF REQUIRED) + + +# +# Define CEF-based targets. +# + +# Include the libcef_dll_wrapper target. +# Comes from the libcef_dll/CMakeLists.txt file in the binary distribution +# directory. +add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper) + +# Include application targets. +# Comes from the <target>/CMakeLists.txt file in the current directory. +# TODO: Change these lines to match your project target when you copy this file. +# if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests") +# add_subdirectory(tests/cefsimple) +# add_subdirectory(tests/gtest) +# add_subdirectory(tests/ceftests) +# endif() + +# if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests/cefclient") +# add_subdirectory(tests/cefclient) +# endif() + +# Display configuration settings. +PRINT_CEF_CONFIG() + + +# +# Define the API documentation target. +# + +# if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile") +# find_package(Doxygen) +# if(DOXYGEN_FOUND) +# add_custom_target(apidocs ALL +# # Generate documentation in the docs/html directory. +# COMMAND "${DOXYGEN_EXECUTABLE}" Doxyfile +# # Write a docs/index.html file. +# COMMAND ${CMAKE_COMMAND} -E echo "<html><head><meta http-equiv=\"refresh\" content=\"0;URL='html/index.html'\"/></head></html>" > docs/index.html +# WORKING_DIRECTORY "${CEF_ROOT}" +# COMMENT "Generating API documentation with Doxygen..." +# VERBATIM ) +# else() +# message(WARNING "Doxygen must be installed to generate API documentation.") +# endif() +# endif() \ No newline at end of file diff --git a/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/FindCEF.cmake b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/FindCEF.cmake new file mode 100644 index 0000000..cd33a7d --- /dev/null +++ b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/FindCEF.cmake @@ -0,0 +1,39 @@ +# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights +# reserved. Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file. + +# +# This file is the CEF CMake configuration entry point and should be loaded +# using `find_package(CEF REQUIRED)`. See the top-level CMakeLists.txt file +# included with the CEF binary distribution for usage information. +# + +# Find the CEF binary distribution root directory. +set(_CEF_ROOT "") +if(CEF_ROOT AND IS_DIRECTORY "${CEF_ROOT}") + set(_CEF_ROOT "${CEF_ROOT}") + set(_CEF_ROOT_EXPLICIT 1) +else() + set(_ENV_CEF_ROOT "") + if(DEFINED ENV{CEF_ROOT}) + file(TO_CMAKE_PATH "$ENV{CEF_ROOT}" _ENV_CEF_ROOT) + endif() + if(_ENV_CEF_ROOT AND IS_DIRECTORY "${_ENV_CEF_ROOT}") + set(_CEF_ROOT "${_ENV_CEF_ROOT}") + set(_CEF_ROOT_EXPLICIT 1) + endif() + unset(_ENV_CEF_ROOT) +endif() + +if(NOT DEFINED _CEF_ROOT_EXPLICIT) + message(FATAL_ERROR "Must specify a CEF_ROOT value via CMake or environment variable.") +endif() + +if(NOT IS_DIRECTORY "${_CEF_ROOT}/cmake") + message(FATAL_ERROR "No CMake bootstrap found for CEF binary distribution at: ${CEF_ROOT}.") +endif() + +# Execute additional cmake files from the CEF binary distribution. +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CEF_ROOT}/cmake") +include("cef_variables") +include("cef_macros") diff --git a/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/cef_macros.cmake b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/cef_macros.cmake new file mode 100644 index 0000000..a263d92 --- /dev/null +++ b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/cef_macros.cmake @@ -0,0 +1,387 @@ +# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights +# reserved. Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file. + +# Must be loaded via FindCEF.cmake. +if(NOT DEFINED _CEF_ROOT_EXPLICIT) + message(FATAL_ERROR "Use find_package(CEF) to load this file.") +endif() + + +# +# Shared macros. +# + +# Print the current CEF configuration. +macro(PRINT_CEF_CONFIG) + message(STATUS "*** CEF CONFIGURATION SETTINGS ***") + message(STATUS "Generator: ${CMAKE_GENERATOR}") + message(STATUS "Platform: ${CMAKE_SYSTEM_NAME}") + message(STATUS "Project architecture: ${PROJECT_ARCH}") + + if(GEN_NINJA OR GEN_MAKEFILES) + message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") + endif() + + message(STATUS "Binary distribution root: ${_CEF_ROOT}") + + if(OS_MAC) + message(STATUS "Base SDK: ${CMAKE_OSX_SYSROOT}") + message(STATUS "Target SDK: ${CEF_TARGET_SDK}") + endif() + + if(OS_WINDOWS) + message(STATUS "Visual Studio ATL support: ${USE_ATL}") + endif() + + message(STATUS "CEF sandbox: ${USE_SANDBOX}") + + set(_libraries ${CEF_STANDARD_LIBS}) + if(OS_WINDOWS AND USE_SANDBOX) + list(APPEND _libraries ${CEF_SANDBOX_STANDARD_LIBS}) + endif() + message(STATUS "Standard libraries: ${_libraries}") + + message(STATUS "Compile defines: ${CEF_COMPILER_DEFINES}") + message(STATUS "Compile defines (Debug): ${CEF_COMPILER_DEFINES_DEBUG}") + message(STATUS "Compile defines (Release): ${CEF_COMPILER_DEFINES_RELEASE}") + message(STATUS "C compile flags: ${CEF_COMPILER_FLAGS} ${CEF_C_COMPILER_FLAGS}") + message(STATUS "C compile flags (Debug): ${CEF_COMPILER_FLAGS_DEBUG} ${CEF_C_COMPILER_FLAGS_DEBUG}") + message(STATUS "C compile flags (Release): ${CEF_COMPILER_FLAGS_RELEASE} ${CEF_C_COMPILER_FLAGS_RELEASE}") + message(STATUS "C++ compile flags: ${CEF_COMPILER_FLAGS} ${CEF_CXX_COMPILER_FLAGS}") + message(STATUS "C++ compile flags (Debug): ${CEF_COMPILER_FLAGS_DEBUG} ${CEF_CXX_COMPILER_FLAGS_DEBUG}") + message(STATUS "C++ compile flags (Release): ${CEF_COMPILER_FLAGS_RELEASE} ${CEF_CXX_COMPILER_FLAGS_RELEASE}") + message(STATUS "Exe link flags: ${CEF_LINKER_FLAGS} ${CEF_EXE_LINKER_FLAGS}") + message(STATUS "Exe link flags (Debug): ${CEF_LINKER_FLAGS_DEBUG} ${CEF_EXE_LINKER_FLAGS_DEBUG}") + message(STATUS "Exe link flags (Release): ${CEF_LINKER_FLAGS_RELEASE} ${CEF_EXE_LINKER_FLAGS_RELEASE}") + message(STATUS "Shared link flags: ${CEF_LINKER_FLAGS} ${CEF_SHARED_LINKER_FLAGS}") + message(STATUS "Shared link flags (Debug): ${CEF_LINKER_FLAGS_DEBUG} ${CEF_SHARED_LINKER_FLAGS_DEBUG}") + message(STATUS "Shared link flags (Release): ${CEF_LINKER_FLAGS_RELEASE} ${CEF_SHARED_LINKER_FLAGS_RELEASE}") + + if(OS_LINUX OR OS_WINDOWS) + message(STATUS "CEF Binary files: ${CEF_BINARY_FILES}") + message(STATUS "CEF Resource files: ${CEF_RESOURCE_FILES}") + endif() +endmacro() + +# Append platform specific sources to a list of sources. +macro(APPEND_PLATFORM_SOURCES name_of_list) + if(OS_LINUX AND ${name_of_list}_LINUX) + list(APPEND ${name_of_list} ${${name_of_list}_LINUX}) + endif() + if(OS_POSIX AND ${name_of_list}_POSIX) + list(APPEND ${name_of_list} ${${name_of_list}_POSIX}) + endif() + if(OS_WINDOWS AND ${name_of_list}_WINDOWS) + list(APPEND ${name_of_list} ${${name_of_list}_WINDOWS}) + endif() + if(OS_MAC AND ${name_of_list}_MAC) + list(APPEND ${name_of_list} ${${name_of_list}_MAC}) + endif() +endmacro() + +# Determine the target output directory based on platform and generator. +macro(SET_CEF_TARGET_OUT_DIR) + if(GEN_NINJA OR GEN_MAKEFILES) + # By default Ninja and Make builds don't create a subdirectory named after + # the configuration. + set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}") + + # Output binaries (executables, libraries) to the correct directory. + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR}) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CEF_TARGET_OUT_DIR}) + else() + set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>") + endif() +endmacro() + +# Copy a list of files from one directory to another. Relative file paths are maintained. +macro(COPY_FILES target file_list source_dir target_dir) + foreach(FILENAME ${file_list}) + set(source_file ${source_dir}/${FILENAME}) + + # Remove the target file path component. + get_filename_component(target_name ${FILENAME} NAME) + set(target_file ${target_dir}/${target_name}) + + COPY_SINGLE_FILE(${target} ${source_file} ${target_file}) + endforeach() +endmacro() + +# Copy a list of files from one directory to another. Relative file paths are maintained. +macro(COPY_RESOURCES target file_list prefix_list source_dir target_dir) + foreach(FILENAME ${file_list}) + set(source_file ${source_dir}/${FILENAME}) + + # Remove one or more prefixes from the source paths. + set(TARGET_FILENAME "${FILENAME}") + foreach(PREFIX ${prefix_list}) + string(REGEX REPLACE "^.*${PREFIX}" "" TARGET_FILENAME ${TARGET_FILENAME}) + endforeach() + set(target_file ${target_dir}/${TARGET_FILENAME}) + + COPY_SINGLE_FILE(${target} ${source_file} ${target_file}) + endforeach() +endmacro() + +macro(COPY_SINGLE_FILE target source_file target_file) + string(FIND ${source_file} "$<CONFIGURATION>" _pos) + if(NOT ${_pos} EQUAL -1) + # Must test with an actual configuration directory. + string(REPLACE "$<CONFIGURATION>" "Release" existing_source_file ${source_file}) + if(NOT EXISTS ${existing_source_file}) + string(REPLACE "$<CONFIGURATION>" "Debug" existing_source_file ${source_file}) + endif() + else() + set(existing_source_file ${source_file}) + endif() + + if(IS_DIRECTORY ${existing_source_file}) + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory "${source_file}" "${target_file}" + VERBATIM + ) + else() + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${source_file}" "${target_file}" + VERBATIM + ) + endif() +endmacro() + + +# +# Linux macros. +# + +if(OS_LINUX) + +# Use pkg-config to find Linux libraries and update compiler/linker variables. +macro(FIND_LINUX_LIBRARIES libraries) + # Read pkg-config info into variables. + execute_process(COMMAND pkg-config --cflags ${libraries} OUTPUT_VARIABLE FLL_CFLAGS) + execute_process(COMMAND pkg-config --libs-only-L --libs-only-other ${libraries} OUTPUT_VARIABLE FLL_LDFLAGS) + execute_process(COMMAND pkg-config --libs-only-l ${libraries} OUTPUT_VARIABLE FLL_LIBS) + + # Strip leading and trailing whitepspace. + STRING(STRIP "${FLL_CFLAGS}" FLL_CFLAGS) + STRING(STRIP "${FLL_LDFLAGS}" FLL_LDFLAGS) + STRING(STRIP "${FLL_LIBS}" FLL_LIBS) + + # Convert to a list. + separate_arguments(FLL_CFLAGS) + separate_arguments(FLL_LDFLAGS) + separate_arguments(FLL_LIBS) + + # Update build variables. + list(APPEND CEF_C_COMPILER_FLAGS ${FLL_CFLAGS}) + list(APPEND CEF_CXX_COMPILER_FLAGS ${FLL_CFLAGS}) + list(APPEND CEF_EXE_LINKER_FLAGS ${FLL_LDFLAGS}) + list(APPEND CEF_SHARED_LINKER_FLAGS ${FLL_LDFLAGS}) + list(APPEND CEF_STANDARD_LIBS ${FLL_LIBS}) +endmacro() + +# Set SUID permissions on the specified executable. +macro(SET_LINUX_SUID_PERMISSIONS target executable) + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E echo "" + COMMAND ${CMAKE_COMMAND} -E echo "*** Run the following command manually to set SUID permissions ***" + COMMAND ${CMAKE_COMMAND} -E echo "EXE=\"${executable}\" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE" + COMMAND ${CMAKE_COMMAND} -E echo "" + VERBATIM + ) +endmacro() + +endif(OS_LINUX) + + +# +# Mac OS X macros. +# + +if(OS_MAC) + +# Manually process and copy over resource files. +macro(COPY_MAC_RESOURCES resource_list prefix_list target source_dir app_path) + foreach(FILENAME ${resource_list}) + # Remove one or more prefixes from the source paths. + set(TARGET_FILENAME "${FILENAME}") + foreach(PREFIX ${prefix_list}) + string(REGEX REPLACE "^.*${PREFIX}" "" TARGET_FILENAME ${TARGET_FILENAME}) + endforeach() + + # Determine the absolute source and target paths. + set(TARGET_PATH "${app_path}/Contents/Resources/${TARGET_FILENAME}") + if(IS_ABSOLUTE ${FILENAME}) + set(SOURCE_PATH ${FILENAME}) + else() + set(SOURCE_PATH "${source_dir}/${FILENAME}") + endif() + + if(${FILENAME} MATCHES ".xib$") + # Change the target file extension. + string(REGEX REPLACE ".xib$" ".nib" TARGET_PATH ${TARGET_PATH}) + + get_filename_component(TARGET_DIRECTORY ${TARGET_PATH} PATH) + add_custom_command( + TARGET ${target} + POST_BUILD + # Create the target directory. + COMMAND ${CMAKE_COMMAND} -E make_directory "${TARGET_DIRECTORY}" + # Compile the XIB file to a NIB. + COMMAND /usr/bin/ibtool --output-format binary1 --compile "${TARGET_PATH}" "${SOURCE_PATH}" + VERBATIM + ) + elseif(NOT ${TARGET_FILENAME} STREQUAL "Info.plist") + # Copy the file as-is. + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${SOURCE_PATH}" "${TARGET_PATH}" + VERBATIM + ) + endif() + endforeach() +endmacro() + +endif(OS_MAC) + + +# +# Windows macros. +# + +# if(OS_WINDOWS) + +# # Add custom manifest files to an executable target. +# macro(ADD_WINDOWS_MANIFEST manifest_path target extension) +# add_custom_command( +# TARGET ${target} +# POST_BUILD +# COMMAND "mt.exe" -nologo +# -manifest \"${manifest_path}/${target}.${extension}.manifest\" \"${manifest_path}/compatibility.manifest\" +# -outputresource:"${CEF_TARGET_OUT_DIR}/${target}.${extension}"\;\#1 +# COMMENT "Adding manifest..." +# ) +# endmacro() + +# endif(OS_WINDOWS) + + +# +# Target configuration macros. +# + +# Add a logical target that can be used to link the specified libraries into an +# executable target. +macro(ADD_LOGICAL_TARGET target debug_lib release_lib) + add_library(${target} ${CEF_LIBTYPE} IMPORTED) + set_target_properties(${target} PROPERTIES + IMPORTED_LOCATION "${release_lib}" + IMPORTED_LOCATION_DEBUG "${debug_lib}" + IMPORTED_LOCATION_RELEASE "${release_lib}" + ) +endmacro() + +# Set common target properties. Use SET_LIBRARY_TARGET_PROPERTIES() or +# SET_EXECUTABLE_TARGET_PROPERTIES() instead of calling this macro directly. +macro(SET_COMMON_TARGET_PROPERTIES target) + # Compile flags. + target_compile_options(${target} PRIVATE ${CEF_COMPILER_FLAGS} ${CEF_CXX_COMPILER_FLAGS}) + target_compile_options(${target} PRIVATE $<$<CONFIG:Debug>:${CEF_COMPILER_FLAGS_DEBUG} ${CEF_CXX_COMPILER_FLAGS_DEBUG}>) + target_compile_options(${target} PRIVATE $<$<CONFIG:Release>:${CEF_COMPILER_FLAGS_RELEASE} ${CEF_CXX_COMPILER_FLAGS_RELEASE}>) + + # Compile definitions. + target_compile_definitions(${target} PRIVATE ${CEF_COMPILER_DEFINES}) + target_compile_definitions(${target} PRIVATE $<$<CONFIG:Debug>:${CEF_COMPILER_DEFINES_DEBUG}>) + target_compile_definitions(${target} PRIVATE $<$<CONFIG:Release>:${CEF_COMPILER_DEFINES_RELEASE}>) + + # Include directories. + target_include_directories(${target} PRIVATE ${CEF_INCLUDE_PATH}) + + # Linker flags. + if(CEF_LINKER_FLAGS) + string(REPLACE ";" " " _flags_str "${CEF_LINKER_FLAGS}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS ${_flags_str}) + endif() + if(CEF_LINKER_FLAGS_DEBUG) + string(REPLACE ";" " " _flags_str "${CEF_LINKER_FLAGS_DEBUG}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS_DEBUG ${_flags_str}) + endif() + if(CEF_LINKER_FLAGS_RELEASE) + string(REPLACE ";" " " _flags_str "${CEF_LINKER_FLAGS_RELEASE}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS_RELEASE ${_flags_str}) + endif() + + if(OS_MAC) + # Set Xcode target properties. + set_target_properties(${target} PROPERTIES + XCODE_ATTRIBUTE_ALWAYS_SEARCH_USER_PATHS NO + XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++11" # -std=gnu++11 + XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME NO # -fno-objc-link-runtime + XCODE_ATTRIBUTE_CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS YES # -Wobjc-missing-property-synthesis + XCODE_ATTRIBUTE_COPY_PHASE_STRIP NO + XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING[variant=Release] YES # -Wl,-dead_strip + XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD "c99" # -std=c99 + XCODE_ATTRIBUTE_GCC_CW_ASM_SYNTAX NO # No -fasm-blocks + XCODE_ATTRIBUTE_GCC_DYNAMIC_NO_PIC NO + XCODE_ATTRIBUTE_GCC_ENABLE_CPP_EXCEPTIONS NO # -fno-exceptions + XCODE_ATTRIBUTE_GCC_ENABLE_CPP_RTTI NO # -fno-rtti + XCODE_ATTRIBUTE_GCC_ENABLE_PASCAL_STRINGS NO # No -mpascal-strings + XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES # -fvisibility-inlines-hidden + XCODE_ATTRIBUTE_GCC_OBJC_CALL_CXX_CDTORS YES # -fobjc-call-cxx-cdtors + XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES # -fvisibility=hidden + XCODE_ATTRIBUTE_GCC_THREADSAFE_STATICS NO # -fno-threadsafe-statics + XCODE_ATTRIBUTE_GCC_TREAT_WARNINGS_AS_ERRORS YES # -Werror + XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0" + XCODE_ATTRIBUTE_GCC_WARN_ABOUT_MISSING_NEWLINE YES # -Wnewline-eof + XCODE_ATTRIBUTE_USE_HEADERMAP NO + OSX_ARCHITECTURES_DEBUG "${CMAKE_OSX_ARCHITECTURES}" + OSX_ARCHITECTURES_RELEASE "${CMAKE_OSX_ARCHITECTURES}" + ) + endif() +endmacro() + +# Set library-specific properties. +macro(SET_LIBRARY_TARGET_PROPERTIES target) + SET_COMMON_TARGET_PROPERTIES(${target}) + + # Shared library linker flags. + if(CEF_SHARED_LINKER_FLAGS) + string(REPLACE ";" " " _flags_str "${CEF_SHARED_LINKER_FLAGS}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS ${_flags_str}) + endif() + if(CEF_SHARED_LINKER_FLAGS_DEBUG) + string(REPLACE ";" " " _flags_str "${CEF_SHARED_LINKER_FLAGS_DEBUG}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS_DEBUG ${_flags_str}) + endif() + if(CEF_SHARED_LINKER_FLAGS_RELEASE) + string(REPLACE ";" " " _flags_str "${CEF_SHARED_LINKER_FLAGS_RELEASE}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS_RELEASE ${_flags_str}) + endif() +endmacro() + +# Set executable-specific properties. +macro(SET_EXECUTABLE_TARGET_PROPERTIES target) + SET_COMMON_TARGET_PROPERTIES(${target}) + + # Executable linker flags. + if(CEF_EXE_LINKER_FLAGS) + string(REPLACE ";" " " _flags_str "${CEF_EXE_LINKER_FLAGS}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS ${_flags_str}) + endif() + if(CEF_EXE_LINKER_FLAGS_DEBUG) + string(REPLACE ";" " " _flags_str "${CEF_EXE_LINKER_FLAGS_DEBUG}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS_DEBUG ${_flags_str}) + endif() + if(CEF_EXE_LINKER_FLAGS_RELEASE) + string(REPLACE ";" " " _flags_str "${CEF_EXE_LINKER_FLAGS_RELEASE}") + set_property(TARGET ${target} PROPERTY LINK_FLAGS_RELEASE ${_flags_str}) + endif() +endmacro() diff --git a/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/cef_variables.cmake b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/cef_variables.cmake new file mode 100644 index 0000000..ded51cd --- /dev/null +++ b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/dep/cef_binary/cmake/cef_variables.cmake @@ -0,0 +1,612 @@ +# Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights +# reserved. Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file. + +# Must be loaded via FindCEF.cmake. +if(NOT DEFINED _CEF_ROOT_EXPLICIT) + message(FATAL_ERROR "Use find_package(CEF) to load this file.") +endif() + + +# +# Shared configuration. +# + +# Determine the platform. +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + set(OS_MAC 1) + set(OS_MACOSX 1) # For backwards compatibility. + set(OS_POSIX 1) +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + set(OS_LINUX 1) + set(OS_POSIX 1) +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") + set(OS_WINDOWS 1) +endif() + +# Determine the project architecture. +if(NOT DEFINED PROJECT_ARCH) + if(("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64") OR + ("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM64")) + set(PROJECT_ARCH "arm64") + elseif(CMAKE_SIZEOF_VOID_P MATCHES 8) + set(PROJECT_ARCH "x86_64") + else() + set(PROJECT_ARCH "x86") + endif() +endif() + +if(${CMAKE_GENERATOR} STREQUAL "Ninja") + set(GEN_NINJA 1) +elseif(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles") + set(GEN_MAKEFILES 1) +endif() + +# Determine the build type. +option(CMAKE_BUILD_TYPE Release) + +if(NOT CMAKE_BUILD_TYPE AND (GEN_NINJA OR GEN_MAKEFILES)) + # CMAKE_BUILD_TYPE should be specified when using Ninja or Unix Makefiles. + set(CMAKE_BUILD_TYPE Release) + message(WARNING "No CMAKE_BUILD_TYPE value selected, using ${CMAKE_BUILD_TYPE}") +endif() + + +# Path to the include directory. +set(CEF_INCLUDE_PATH "${_CEF_ROOT}") + +# Path to the libcef_dll_wrapper target. +set(CEF_LIBCEF_DLL_WRAPPER_PATH "${_CEF_ROOT}/libcef_dll") + + +# Shared compiler/linker flags. +# list(APPEND CEF_COMPILER_DEFINES +# # Allow C++ programs to use stdint.h macros specified in the C99 standard that aren't +# # in the C++ standard (e.g. UINT8_MAX, INT64_MIN, etc) +# __STDC_CONSTANT_MACROS __STDC_FORMAT_MACROS +# ) + + +# Configure use of the sandbox. +option(USE_SANDBOX "Enable or disable use of the sandbox." OFF) + + +# +# Linux configuration. +# + +if(OS_LINUX) + # Platform-specific compiler/linker flags. + set(CEF_LIBTYPE SHARED) + list(APPEND CEF_COMPILER_FLAGS + -fno-strict-aliasing # Avoid assumptions regarding non-aliasing of objects of different types + -fPIC # Generate position-independent code for shared libraries + -fstack-protector # Protect some vulnerable functions from stack-smashing (security feature) + -funwind-tables # Support stack unwinding for backtrace() + -fvisibility=hidden # Give hidden visibility to declarations that are not explicitly marked as visible + --param=ssp-buffer-size=4 # Set the minimum buffer size protected by SSP (security feature, related to stack-protector) + -pipe # Use pipes rather than temporary files for communication between build stages + -pthread # Use the pthread library + -Wall # Enable all warnings + -Werror # Treat warnings as errors + -Wno-missing-field-initializers # Don't warn about missing field initializers + -Wno-unused-parameter # Don't warn about unused parameters + -Wno-error=comment # Don't warn about code in comments + -Wno-comment # Don't warn about code in comments + -Wno-deprecated-declarations # Don't warn about using deprecated methods + ) + list(APPEND CEF_C_COMPILER_FLAGS + -std=c99 # Use the C99 language standard + ) + list(APPEND CEF_CXX_COMPILER_FLAGS + -fno-exceptions # Disable exceptions + -fno-rtti # Disable real-time type information + -fno-threadsafe-statics # Don't generate thread-safe statics + -fvisibility-inlines-hidden # Give hidden visibility to inlined class member functions + -std=c++17 # Use the C++17 language standard + -Wsign-compare # Warn about mixed signed/unsigned type comparisons + ) + list(APPEND CEF_COMPILER_FLAGS_DEBUG + -O0 # Disable optimizations + -g # Generate debug information + ) + list(APPEND CEF_COMPILER_FLAGS_RELEASE + -O2 # Optimize for maximum speed + -fdata-sections # Enable linker optimizations to improve locality of reference for data sections + -ffunction-sections # Enable linker optimizations to improve locality of reference for function sections + -fno-ident # Ignore the #ident directive + -U_FORTIFY_SOURCE # Undefine _FORTIFY_SOURCE in case it was previously defined + -D_FORTIFY_SOURCE=2 # Add memory and string function protection (security feature, related to stack-protector) + ) + list(APPEND CEF_LINKER_FLAGS + -fPIC # Generate position-independent code for shared libraries + -pthread # Use the pthread library + -Wl,--disable-new-dtags # Don't generate new-style dynamic tags in ELF + -Wl,--fatal-warnings # Treat warnings as errors + -Wl,-rpath,. # Set rpath so that libraries can be placed next to the executable + -Wl,-z,noexecstack # Mark the stack as non-executable (security feature) + -Wl,-z,now # Resolve symbols on program start instead of on first use (security feature) + -Wl,-z,relro # Mark relocation sections as read-only (security feature) + ) + list(APPEND CEF_LINKER_FLAGS_RELEASE + -Wl,-O1 # Enable linker optimizations + -Wl,--as-needed # Only link libraries that export symbols used by the binary + -Wl,--gc-sections # Remove unused code resulting from -fdata-sections and -function-sections + ) + list(APPEND CEF_COMPILER_DEFINES + _FILE_OFFSET_BITS=64 # Allow the Large File Support (LFS) interface to replace the old interface + ) + list(APPEND CEF_COMPILER_DEFINES_RELEASE + NDEBUG # Not a debug build + ) + + include(CheckCCompilerFlag) + include(CheckCXXCompilerFlag) + + CHECK_CXX_COMPILER_FLAG(-Wno-undefined-var-template COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE) + if(COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE) + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-undefined-var-template # Don't warn about potentially uninstantiated static members + ) + endif() + + CHECK_C_COMPILER_FLAG(-Wno-unused-local-typedefs COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS) + if(COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS) + list(APPEND CEF_C_COMPILER_FLAGS + -Wno-unused-local-typedefs # Don't warn about unused local typedefs + ) + endif() + + CHECK_CXX_COMPILER_FLAG(-Wno-literal-suffix COMPILER_SUPPORTS_NO_LITERAL_SUFFIX) + if(COMPILER_SUPPORTS_NO_LITERAL_SUFFIX) + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-literal-suffix # Don't warn about invalid suffixes on literals + ) + endif() + + CHECK_CXX_COMPILER_FLAG(-Wno-narrowing COMPILER_SUPPORTS_NO_NARROWING) + if(COMPILER_SUPPORTS_NO_NARROWING) + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-narrowing # Don't warn about type narrowing + ) + endif() + + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-attributes # The cfi-icall attribute is not supported by the GNU C++ compiler + ) + endif() + + if(PROJECT_ARCH STREQUAL "x86_64") + # 64-bit architecture. + list(APPEND CEF_COMPILER_FLAGS + -m64 + -march=x86-64 + ) + list(APPEND CEF_LINKER_FLAGS + -m64 + ) + elseif(PROJECT_ARCH STREQUAL "x86") + # 32-bit architecture. + list(APPEND CEF_COMPILER_FLAGS + -msse2 + -mfpmath=sse + -mmmx + -m32 + ) + list(APPEND CEF_LINKER_FLAGS + -m32 + ) + endif() + + # Standard libraries. + set(CEF_STANDARD_LIBS + X11 + ) + + # CEF directory paths. + set(CEF_RESOURCE_DIR "${_CEF_ROOT}/Resources") + set(CEF_BINARY_DIR "${_CEF_ROOT}/${CMAKE_BUILD_TYPE}") + set(CEF_BINARY_DIR_DEBUG "${_CEF_ROOT}/Debug") + set(CEF_BINARY_DIR_RELEASE "${_CEF_ROOT}/Release") + + # CEF library paths. + set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/libcef.so") + set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.so") + + # List of CEF binary files. + set(CEF_BINARY_FILES + chrome-sandbox + libcef.so + libEGL.so + libGLESv2.so + libvk_swiftshader.so + libvulkan.so.1 + snapshot_blob.bin + v8_context_snapshot.bin + vk_swiftshader_icd.json + ) + + # List of CEF resource files. + set(CEF_RESOURCE_FILES + chrome_100_percent.pak + chrome_200_percent.pak + resources.pak + icudtl.dat + locales + ) + + if(USE_SANDBOX) + list(APPEND CEF_COMPILER_DEFINES + CEF_USE_SANDBOX # Used by apps to test if the sandbox is enabled + ) + endif() +endif() + + +# +# Mac OS X configuration. +# + +if(OS_MAC) + # Platform-specific compiler/linker flags. + # See also Xcode target properties in cef_macros.cmake. + set(CEF_LIBTYPE SHARED) + list(APPEND CEF_COMPILER_FLAGS + -fno-strict-aliasing # Avoid assumptions regarding non-aliasing of objects of different types + -fstack-protector # Protect some vulnerable functions from stack-smashing (security feature) + -funwind-tables # Support stack unwinding for backtrace() + -fvisibility=hidden # Give hidden visibility to declarations that are not explicitly marked as visible + -Wall # Enable all warnings + -Werror # Treat warnings as errors + -Wextra # Enable additional warnings + -Wendif-labels # Warn whenever an #else or an #endif is followed by text + -Wnewline-eof # Warn about no newline at end of file + -Wno-missing-field-initializers # Don't warn about missing field initializers + -Wno-unused-parameter # Don't warn about unused parameters + ) + list(APPEND CEF_C_COMPILER_FLAGS + -std=c99 # Use the C99 language standard + ) + list(APPEND CEF_CXX_COMPILER_FLAGS + -fno-exceptions # Disable exceptions + -fno-rtti # Disable real-time type information + -fno-threadsafe-statics # Don't generate thread-safe statics + -fobjc-call-cxx-cdtors # Call the constructor/destructor of C++ instance variables in ObjC objects + -fvisibility-inlines-hidden # Give hidden visibility to inlined class member functions + -std=c++17 # Use the C++17 language standard + -Wno-narrowing # Don't warn about type narrowing + -Wsign-compare # Warn about mixed signed/unsigned type comparisons + ) + list(APPEND CEF_COMPILER_FLAGS_DEBUG + -O0 # Disable optimizations + -g # Generate debug information + ) + list(APPEND CEF_COMPILER_FLAGS_RELEASE + -O3 # Optimize for maximum speed plus a few extras + ) + list(APPEND CEF_LINKER_FLAGS + -Wl,-search_paths_first # Search for static or shared library versions in the same pass + -Wl,-ObjC # Support creation of ObjC static libraries + -Wl,-pie # Generate position-independent code suitable for executables only + ) + list(APPEND CEF_LINKER_FLAGS_RELEASE + -Wl,-dead_strip # Strip dead code + ) + + include(CheckCXXCompilerFlag) + + CHECK_CXX_COMPILER_FLAG(-Wno-undefined-var-template COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE) + if(COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE) + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-undefined-var-template # Don't warn about potentially uninstantiated static members + ) + endif() + + # Standard libraries. + set(CEF_STANDARD_LIBS + -lpthread + "-framework AppKit" + "-framework Cocoa" + "-framework IOSurface" + ) + + # Find the newest available base SDK. + execute_process(COMMAND xcode-select --print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + foreach(OS_VERSION 14.2 14.0 10.15) + set(SDK "${XCODE_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OS_VERSION}.sdk") + if(NOT "${CMAKE_OSX_SYSROOT}" AND EXISTS "${SDK}" AND IS_DIRECTORY "${SDK}") + set(CMAKE_OSX_SYSROOT ${SDK}) + endif() + endforeach() + + # Target SDK. + set(CEF_TARGET_SDK "10.15") + list(APPEND CEF_COMPILER_FLAGS + -mmacosx-version-min=${CEF_TARGET_SDK} + ) + set(CMAKE_OSX_DEPLOYMENT_TARGET ${CEF_TARGET_SDK}) + + # Target architecture. + if(PROJECT_ARCH STREQUAL "x86_64") + set(CMAKE_OSX_ARCHITECTURES "x86_64") + elseif(PROJECT_ARCH STREQUAL "arm64") + set(CMAKE_OSX_ARCHITECTURES "arm64") + else() + set(CMAKE_OSX_ARCHITECTURES "i386") + endif() + + # Prevent Xcode 11 from doing automatic codesigning. + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") + + # CEF directory paths. + set(CEF_BINARY_DIR "${_CEF_ROOT}/$<CONFIGURATION>") + set(CEF_BINARY_DIR_DEBUG "${_CEF_ROOT}/Debug") + set(CEF_BINARY_DIR_RELEASE "${_CEF_ROOT}/Release") + + if(USE_SANDBOX) + list(APPEND CEF_COMPILER_DEFINES + CEF_USE_SANDBOX # Used by apps to test if the sandbox is enabled + ) + + list(APPEND CEF_STANDARD_LIBS + -lsandbox + ) + + # CEF sandbox library paths. + set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.a") + set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.a") + endif() + + # CEF Helper app suffixes. + # Format is "<name suffix>:<target suffix>:<plist suffix>". + set(CEF_HELPER_APP_SUFFIXES + "::" + " (Alerts):_alerts:.alerts" + " (GPU):_gpu:.gpu" + " (Plugin):_plugin:.plugin" + " (Renderer):_renderer:.renderer" + ) +endif() + + +# +# Windows configuration. +# + +if(OS_WINDOWS) + # Platform-specific compiler/linker flags. + set(CEF_LIBTYPE STATIC) + list(APPEND CEF_COMPILER_FLAGS + -fno-strict-aliasing # Avoid assumptions regarding non-aliasing of objects of different types + -fPIC # Generate position-independent code for shared libraries + -fstack-protector # Protect some vulnerable functions from stack-smashing (security feature) + -funwind-tables # Support stack unwinding for backtrace() + -fvisibility=hidden # Give hidden visibility to declarations that are not explicitly marked as visible + --param=ssp-buffer-size=4 # Set the minimum buffer size protected by SSP (security feature, related to stack-protector) + -pipe # Use pipes rather than temporary files for communication between build stages + -pthread # Use the pthread library + -Wall # Enable all warnings + -Werror # Treat warnings as errors + -Wno-missing-field-initializers # Don't warn about missing field initializers + -Wno-unused-parameter # Don't warn about unused parameters + -Wno-error=comment # Don't warn about code in comments + -Wno-comment # Don't warn about code in comments + -Wno-deprecated-declarations # Don't warn about using deprecated methods + ) + list(APPEND CEF_C_COMPILER_FLAGS + -std=c99 # Use the C99 language standard + ) + list(APPEND CEF_CXX_COMPILER_FLAGS + -fno-exceptions # Disable exceptions + -fno-rtti # Disable real-time type information + -fno-threadsafe-statics # Don't generate thread-safe statics + -fvisibility-inlines-hidden # Give hidden visibility to inlined class member functions + -std=c++17 # Use the C++17 language standard + -Wsign-compare # Warn about mixed signed/unsigned type comparisons + ) + list(APPEND CEF_COMPILER_FLAGS_DEBUG + -O0 # Disable optimizations +# -g # Generate debug information + ) + list(APPEND CEF_COMPILER_FLAGS_RELEASE + -O2 # Optimize for maximum speed + -fdata-sections # Enable linker optimizations to improve locality of reference for data sections + -ffunction-sections # Enable linker optimizations to improve locality of reference for function sections + -fno-ident # Ignore the #ident directive + -U_FORTIFY_SOURCE # Undefine _FORTIFY_SOURCE in case it was previously defined + -D_FORTIFY_SOURCE=2 # Add memory and string function protection (security feature, related to stack-protector) + ) + list(APPEND CEF_LINKER_FLAGS + -fPIC # Generate position-independent code for shared libraries + -pthread # Use the pthread library + -Wl,--disable-new-dtags # Don't generate new-style dynamic tags in ELF + -Wl,--fatal-warnings # Treat warnings as errors + -Wl,-rpath,. # Set rpath so that libraries can be placed next to the executable + -Wl,-z,noexecstack # Mark the stack as non-executable (security feature) + -Wl,-z,now # Resolve symbols on program start instead of on first use (security feature) + -Wl,-z,relro # Mark relocation sections as read-only (security feature) + ) + list(APPEND CEF_LINKER_FLAGS_RELEASE + -Wl,-O1 # Enable linker optimizations + -Wl,--as-needed # Only link libraries that export symbols used by the binary + -Wl,--gc-sections # Remove unused code resulting from -fdata-sections and -function-sections + ) + list(APPEND CEF_COMPILER_DEFINES + _FILE_OFFSET_BITS=64 # Allow the Large File Support (LFS) interface to replace the old interface + ) + list(APPEND CEF_COMPILER_DEFINES_RELEASE + NDEBUG # Not a debug build + ) + + include(CheckCCompilerFlag) + include(CheckCXXCompilerFlag) + + CHECK_CXX_COMPILER_FLAG(-Wno-undefined-var-template COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE) + if(COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE) + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-undefined-var-template # Don't warn about potentially uninstantiated static members + ) + endif() + + CHECK_C_COMPILER_FLAG(-Wno-unused-local-typedefs COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS) + if(COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS) + list(APPEND CEF_C_COMPILER_FLAGS + -Wno-unused-local-typedefs # Don't warn about unused local typedefs + ) + endif() + + CHECK_CXX_COMPILER_FLAG(-Wno-literal-suffix COMPILER_SUPPORTS_NO_LITERAL_SUFFIX) + if(COMPILER_SUPPORTS_NO_LITERAL_SUFFIX) + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-literal-suffix # Don't warn about invalid suffixes on literals + ) + endif() + + CHECK_CXX_COMPILER_FLAG(-Wno-narrowing COMPILER_SUPPORTS_NO_NARROWING) + if(COMPILER_SUPPORTS_NO_NARROWING) + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-narrowing # Don't warn about type narrowing + ) + endif() + + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + list(APPEND CEF_CXX_COMPILER_FLAGS + -Wno-attributes # The cfi-icall attribute is not supported by the GNU C++ compiler + ) + endif() + + if(PROJECT_ARCH STREQUAL "x86_64") + # 64-bit architecture. + list(APPEND CEF_COMPILER_FLAGS + -m64 + -march=x86-64 + ) + list(APPEND CEF_LINKER_FLAGS + -m64 + ) + elseif(PROJECT_ARCH STREQUAL "x86") + # 32-bit architecture. + list(APPEND CEF_COMPILER_FLAGS + -msse2 + -mfpmath=sse + -mmmx + -m32 + ) + list(APPEND CEF_LINKER_FLAGS + -m32 + ) + endif() + # Standard libraries. + set(CEF_STANDARD_LIBS + comctl32.lib + gdi32.lib + rpcrt4.lib + shlwapi.lib + ws2_32.lib + ) + + # CEF directory paths. + set(CEF_RESOURCE_DIR "${_CEF_ROOT}/Resources") + set(CEF_BINARY_DIR "${_CEF_ROOT}/$<CONFIGURATION>") + set(CEF_BINARY_DIR_DEBUG "${_CEF_ROOT}/Debug") + set(CEF_BINARY_DIR_RELEASE "${_CEF_ROOT}/Release") + + # CEF library paths. + set(CEF_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/libcef.lib") + set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.lib") + + # List of CEF binary files. + set(CEF_BINARY_FILES + chrome_elf.dll + d3dcompiler_47.dll + libcef.dll + libEGL.dll + libGLESv2.dll + snapshot_blob.bin + v8_context_snapshot.bin + vk_swiftshader.dll + vk_swiftshader_icd.json + vulkan-1.dll + ) + + if(PROJECT_ARCH STREQUAL "x86_64") + list(APPEND CEF_BINARY_FILES + dxil.dll + dxcompiler.dll + ) + endif() + + # List of CEF resource files. + set(CEF_RESOURCE_FILES + chrome_100_percent.pak + chrome_200_percent.pak + resources.pak + icudtl.dat + locales + ) + + if(USE_SANDBOX) + list(APPEND CEF_COMPILER_DEFINES + PSAPI_VERSION=1 # Required by cef_sandbox.lib + CEF_USE_SANDBOX # Used by apps to test if the sandbox is enabled + ) + list(APPEND CEF_COMPILER_DEFINES_DEBUG + _HAS_ITERATOR_DEBUGGING=0 # Disable iterator debugging + ) + + # Libraries required by cef_sandbox.lib. + set(CEF_SANDBOX_STANDARD_LIBS + Advapi32.lib + dbghelp.lib + Delayimp.lib + ntdll.lib + OleAut32.lib + PowrProf.lib + Propsys.lib + psapi.lib + SetupAPI.lib + Shell32.lib + Shcore.lib + Userenv.lib + version.lib + wbemuuid.lib + WindowsApp.lib + winmm.lib + ) + + # CEF sandbox library paths. + set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.lib") + set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.lib") + endif() + + # Configure use of ATL. + option(USE_ATL "Enable or disable use of ATL." OFF) + if(USE_ATL) + # Locate the atlmfc directory if it exists. It may be at any depth inside + # the VC directory. The cl.exe path returned by CMAKE_CXX_COMPILER may also + # be at different depths depending on the toolchain version + # (e.g. "VC/bin/cl.exe", "VC/bin/amd64_x86/cl.exe", + # "VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe", etc). + set(HAS_ATLMFC 0) + get_filename_component(VC_DIR ${CMAKE_CXX_COMPILER} DIRECTORY) + get_filename_component(VC_DIR_NAME ${VC_DIR} NAME) + while(NOT ${VC_DIR_NAME} STREQUAL "VC") + get_filename_component(VC_DIR ${VC_DIR} DIRECTORY) + if(IS_DIRECTORY "${VC_DIR}/atlmfc") + set(HAS_ATLMFC 1) + break() + endif() + get_filename_component(VC_DIR_NAME ${VC_DIR} NAME) + endwhile() + + # Determine if the Visual Studio install supports ATL. + if(NOT HAS_ATLMFC) + message(STATUS "ATL is not supported by your VC installation.") + set(USE_ATL OFF) + endif() + list(APPEND CEF_COMPILER_DEFINES + CEF_USE_ATL # Used by apps to test if ATL support is enabled + ) + endif() +endif() diff --git a/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/src/CMakeLists.txt b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/src/CMakeLists.txt new file mode 100644 index 0000000..a970d9b --- /dev/null +++ b/3rdparty_build/QCefView/_build/_deps/cefviewcore-src/src/CMakeLists.txt @@ -0,0 +1,445 @@ +file(GLOB_RECURSE CefViewCore_SHARED_SRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/Shared/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/Shared/*.h" +) +source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/Shared" + PREFIX Shared + FILES ${CefViewCore_SHARED_SRC_FILES} +) + +# ## CefViewCore +# ############################################################################################### +# header files +file(GLOB_RECURSE CefViewCore_INCLUDE_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/../include/*.h" +) +source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" + PREFIX Include + FILES ${CefViewCore_INCLUDE_FILES} +) + +# soruce code for all platforms +file(GLOB_RECURSE CefViewCore_SRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/CefView/CefBrowserApp/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/CefView/CefBrowserApp/*.cpp" +) +source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/CefView/CefBrowserApp" + PREFIX Source + FILES ${CefViewCore_SRC_FILES} +) + +add_library(CefViewCore STATIC + ${CefViewCore_SHARED_SRC_FILES} + ${CefViewCore_INCLUDE_FILES} + ${CefViewCore_SRC_FILES} +) + +target_include_directories(CefViewCore + PUBLIC + ${CefViewCore_INCLUDE_PATH} + PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/Shared" +) + +# ADD_LOGICAL_TARGET(libcef_lib +# "${CEF_LIB_DEBUG}" +# "${CEF_LIB_RELEASE}" +# ) +add_library(libcef_lib STATIC ${CEF_LIBTYPE} IMPORTED GLOBAL) +if(BUILD_STATIC) + set_target_properties(libcef_lib + PROPERTIES + IMPORTED_IMPLIB "${CEF_LIB_RELEASE}" + IMPORTED_IMPLIB_DEBUG "${CEF_LIB_DEBUG}" + IMPORTED_IMPLIB_RELEASE "${CEF_LIB_RELEASE}" + IMPORTED_LOCATION "${CEF_LIB_RELEASE}" + IMPORTED_LOCATION_DEBUG "${CEF_LIB_DEBUG}" + IMPORTED_LOCATION_RELEASE "${CEF_LIB_RELEASE}" + ) +else() + set_target_properties(libcef_lib + PROPERTIES + IMPORTED_LOCATION "${CEF_LIB_RELEASE}" + IMPORTED_LOCATION_DEBUG "${CEF_LIB_DEBUG}" + IMPORTED_LOCATION_RELEASE "${CEF_LIB_RELEASE}" + ) +endif() + +if(OS_WINDOWS) + SET_LIBRARY_TARGET_PROPERTIES(CefViewCore) + + add_dependencies(CefViewCore + libcef_dll_wrapper + libcef_lib + ) + + set(CefViewCore_LIBS + libcef_dll_wrapper + libcef_lib + ${CEF_STANDARD_LIBS} + ) + + if(USE_SANDBOX) + list(APPEND CefViewCore_LIBS cef_sandbox_lib) + endif() + + target_link_libraries(CefViewCore + PUBLIC + ${CefViewCore_LIBS} + ) +endif() # OS_WINDOWS + +if(OS_LINUX) + SET_LIBRARY_TARGET_PROPERTIES(CefViewCore) + + add_dependencies(CefViewCore + libcef_lib + libcef_dll_wrapper + ) + + set(CefViewCore_LIBS + libcef_lib + libcef_dll_wrapper + ${CEF_STANDARD_LIBS} + ) + + target_link_libraries(CefViewCore + PUBLIC + ${CefViewCore_LIBS} + ) +endif() # OS_LINUX + +if(OS_MACOS) + file(GLOB_RECURSE CefViewCore_PUBLIC_HEADERS + "${CMAKE_CURRENT_SOURCE_DIR}/../include/*.h" + ) + + target_compile_options(CefViewCore + PRIVATE + "-fobjc-arc" + ) + + SET_LIBRARY_TARGET_PROPERTIES(CefViewCore) + + set_target_properties(CefViewCore + PROPERTIES + FRAMEWORK TRUE + PUBLIC_HEADER "${CefViewCore_PUBLIC_HEADERS}" + CLANG_ENABLE_OBJC_ARC "YES" + APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc" + XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++11" # -std=gnu++11 + XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME "NO" # -fno-objc-link-runtime + XCODE_ATTRIBUTE_COPY_PHASE_STRIP "NO" + XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING[variant=Release] "YES" # -Wl,-dead_strip + XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD "c99" # -std=c99 + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.cefview.cefview" + ) + + add_dependencies(CefViewCore + libcef_dll_wrapper + ) + + set(CefViewCore_LIBS + libcef_dll_wrapper + ${CEF_STANDARD_LIBS} + ) + + if(USE_SANDBOX) + list(APPEND CefViewCore_LIBS cef_sandbox_lib) + endif() + + target_link_libraries(CefViewCore + PUBLIC + ${CefViewCore_LIBS} + ) +endif() # OS_MACOS + +add_library(CefViewCore::CefViewCore ALIAS CefViewCore) + +# ## CefViewWing +# ############################################################################################### +# soruce code for all platforms +# file(GLOB_RECURSE CefViewWing_SRC_FILES +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/App/*.h" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/App/*.cpp" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/Bridge/*.h" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/Bridge/*.cpp" +# ) +# source_group( +# TREE "${CMAKE_CURRENT_SOURCE_DIR}/CefWing" +# PREFIX Source +# FILES ${CefViewWing_SRC_FILES} +# ) + +# if(OS_WINDOWS) +# file(GLOB_RECURSE CefViewWing_PLATFORM_SRC_FILES +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/win/*.h" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/win/*.cpp" +# ) +# source_group( +# TREE "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/win" +# PREFIX Source +# FILES ${CefViewWing_PLATFORM_SRC_FILES} +# ) + +# if(EXISTS ${CEFVIEW_WING_ICON}) +# # Copy icon file to binary dir +# configure_file( +# "${CEFVIEW_WING_ICON}" +# "${CMAKE_CURRENT_BINARY_DIR}/app.ico" +# COPYONLY +# ) + +# # Config resource file +# configure_file( +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/win/resource.rc.in" +# "${CMAKE_CURRENT_BINARY_DIR}/resource.rc" +# COPYONLY +# ) +# set(CefViewWing_WIN_RESOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR}/resource.rc") +# else() +# set(CefViewWing_WIN_RESOURCE_FILE "") +# endif() + +# # Create Helper executable target. +# add_executable(${CEFVIEW_WING_NAME} WIN32 +# ${CefViewCore_SHARED_SRC_FILES} +# ${CefViewWing_SRC_FILES} +# ${CefViewWing_PLATFORM_SRC_FILES} +# ${CefViewWing_WIN_RESOURCE_FILE} +# ) + +# SET_EXECUTABLE_TARGET_PROPERTIES(${CEFVIEW_WING_NAME}) +# target_link_options(${CEFVIEW_WING_NAME} +# PRIVATE +# "/MANIFEST" +# ) + +# target_include_directories(${CEFVIEW_WING_NAME} +# PUBLIC +# ${CefViewCore_INCLUDE_PATH} +# PRIVATE +# "${CMAKE_CURRENT_SOURCE_DIR}/Shared" +# ) + +# add_dependencies(${CEFVIEW_WING_NAME} +# libcef_lib +# libcef_dll_wrapper +# ) + +# set(_helper_libs +# d3d11.lib +# glu32.lib +# imm32.lib +# opengl32.lib + +# libcef_lib +# libcef_dll_wrapper +# ${CEF_STANDARD_LIBS} +# ${CEF_SANDBOX_STANDARD_LIBS} +# ) + +# if(USE_SANDBOX) +# list(APPEND _helper_libs cef_sandbox_lib) +# endif() + +# target_link_libraries(${CEFVIEW_WING_NAME} +# ${_helper_libs} +# ) + +# # Add the Helper as a dependency of the main executable target. +# add_dependencies(CefViewCore ${CEFVIEW_WING_NAME}) + +# add_custom_command(TARGET ${CEFVIEW_WING_NAME} +# POST_BUILD + +# # embed the manifest file +# COMMAND mt.exe +# -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\CefWing\\win\\CefViewWing.manifest\" +# -outputresource:\"$<TARGET_FILE:${CEFVIEW_WING_NAME}>\" + +# # copy cef binary files +# # .1 copy the cef resources to output dir +# COMMAND ${CMAKE_COMMAND} -E copy_directory +# "${CEF_RESOURCE_DIR}" +# "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>" + +# # copy all cef binary files to output dir +# COMMAND ${CMAKE_COMMAND} -E copy_directory +# "${CEF_BINARY_DIR}" +# "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>" + +# # move libcef.lib to lib output +# COMMAND ${CMAKE_COMMAND} -E rename +# "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>/libcef.lib" +# "$<TARGET_LINKER_FILE_DIR:libcef_dll_wrapper>/libcef.lib" + +# # move cef_sandbox.lib to lib output +# COMMAND ${CMAKE_COMMAND} -E rename +# "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>/cef_sandbox.lib" +# "$<TARGET_LINKER_FILE_DIR:libcef_dll_wrapper>/cef_sandbox.lib" +# ) +# endif() # OS_WINDOWS + +# if(OS_LINUX) +# file(GLOB_RECURSE CefViewWing_PLATFORM_SRC_FILES +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/linux/*.h" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/linux/*.cpp" +# ) +# source_group( +# TREE "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/linux" +# PREFIX Source +# FILES ${CefViewWing_PLATFORM_SRC_FILES} +# ) + +# # Create Helper executable target. +# add_executable(${CEFVIEW_WING_NAME} +# ${CefViewCore_SHARED_SRC_FILES} +# ${CefViewWing_SRC_FILES} +# ${CefViewWing_PLATFORM_SRC_FILES} +# ) + +# SET_EXECUTABLE_TARGET_PROPERTIES(${CEFVIEW_WING_NAME}) + +# set_target_properties(${CEFVIEW_WING_NAME} +# PROPERTIES +# INSTALL_RPATH "$ORIGIN" +# BUILD_WITH_INSTALL_RPATH TRUE +# ) + +# target_include_directories(${CEFVIEW_WING_NAME} +# PUBLIC +# ${CefViewCore_INCLUDE_PATH} +# PRIVATE +# "${CMAKE_CURRENT_SOURCE_DIR}/Shared" +# ) + +# add_dependencies(${CEFVIEW_WING_NAME} +# libcef_lib +# libcef_dll_wrapper +# ) + +# set(_helper_libs +# libcef_lib +# libcef_dll_wrapper +# ${CEF_STANDARD_LIBS} +# ) + +# target_link_libraries(${CEFVIEW_WING_NAME} +# ${_helper_libs} +# ) + +# # Add the Helper as a dependency of the main executable target. +# add_dependencies(CefViewCore ${CEFVIEW_WING_NAME}) + +# # copy cef binary files +# add_custom_command(TARGET ${CEFVIEW_WING_NAME} +# POST_BUILD + +# # copy cef binary files +# # .1 copy the cef resources to output dir +# COMMAND ${CMAKE_COMMAND} -E copy_directory +# "${CEF_RESOURCE_DIR}" +# "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>" + +# # copy all cef binary files to output dir +# COMMAND ${CMAKE_COMMAND} -E copy_directory +# "${CEF_BINARY_DIR}" +# "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>" +# ) + +# SET_LINUX_SUID_PERMISSIONS(${CEFVIEW_WING_NAME} "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>/chrome-sandbox") +# endif() # OS_LINUX + +# if(OS_MACOS) +# file(GLOB_RECURSE CefViewWing_PLATFORM_SRC_FILES +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/mac/*.h" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/mac/*.m" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/mac/*.mm" +# "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/mac/*.cpp" +# ) +# source_group( +# TREE "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/mac" +# PREFIX Source +# FILES ${CefViewWing_PLATFORM_SRC_FILES} +# ) + +# set(CefViewWing_LIBS +# libcef_dll_wrapper +# ${CEF_STANDARD_LIBS} +# ) + +# if(USE_SANDBOX) +# list(APPEND CefViewWing_LIBS cef_sandbox_lib) +# endif() + +# # Create the multiple Helper app bundle targets. +# foreach(_suffix_list ${CEF_HELPER_APP_SUFFIXES}) +# # Convert to a list and extract the suffix values. +# string(REPLACE ":" ";" _suffix_list ${_suffix_list}) +# list(GET _suffix_list 0 _name_suffix) +# list(GET _suffix_list 1 _target_suffix) +# list(GET _suffix_list 2 _plist_suffix) + +# # Define Helper target and output names. +# set(_helper_target "${CEFVIEW_WING_NAME}${_target_suffix}") +# set(_helper_output_name "${CEFVIEW_WING_NAME}${_name_suffix}") + +# # Create Helper executable target. +# add_executable(${_helper_target} MACOSX_BUNDLE +# ${CefViewCore_SHARED_SRC_FILES} +# ${CefViewWing_SRC_FILES} +# ${CefViewWing_PLATFORM_SRC_FILES} +# ) +# SET_EXECUTABLE_TARGET_PROPERTIES(${_helper_target}) + +# set(_helper_info_plist "${CMAKE_CURRENT_BINARY_DIR}/helper-Info${_target_suffix}.plist") +# file(READ "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/mac/info.plist" _plist_contents) +# file(WRITE ${_helper_info_plist} ${_plist_contents}) + +# set_target_properties(${_helper_target} +# PROPERTIES +# CLANG_ENABLE_OBJC_ARC "YES" +# OUTPUT_NAME "${_helper_output_name}" +# MACOSX_BUNDLE_INFO_PLIST "${_helper_info_plist}" +# XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.cefview.${CEFVIEW_WING_NAME}${_plist_suffix}" +# XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES" +# XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/CefWing/mac/CefViewWing.entitlements" +# ) + +# target_include_directories(${_helper_target} +# PUBLIC +# ${CefViewCore_INCLUDE_PATH} +# PRIVATE +# "${CMAKE_CURRENT_SOURCE_DIR}/Shared" +# ) + +# add_dependencies(${_helper_target} +# libcef_dll_wrapper +# ) + +# target_link_libraries(${_helper_target} +# ${CefViewWing_LIBS} +# ) + +# # Add the Helper as a dependency of the main executable target. +# add_dependencies(CefViewCore ${_helper_target}) +# endforeach() + +# # copy cef binary files to the output folder +# add_custom_command(TARGET ${CEFVIEW_WING_NAME} +# POST_BUILD + +# # copy the cef framework to output directory +# COMMAND ${CMAKE_COMMAND} -E copy_directory +# "${CEF_BINARY_DIR}/Chromium Embedded Framework.framework" +# "$<TARGET_BUNDLE_DIR:${CEFVIEW_WING_NAME}>/../Chromium Embedded Framework.framework" +# VERBATIM +# ) +# endif() # OS_MACOS + +# add alias for heper process target +#add_executable(CefViewCore::CefViewWing ALIAS ${CEFVIEW_WING_NAME}) diff --git a/3rdparty_build/QCefView/cmake/QtConfig.cmake b/3rdparty_build/QCefView/cmake/QtConfig.cmake new file mode 100644 index 0000000..754c1be --- /dev/null +++ b/3rdparty_build/QCefView/cmake/QtConfig.cmake @@ -0,0 +1,33 @@ +# ################################################################################ +# +# The Qt SDK path +# You can set the environment variable via +# 1. command line +# Windows: SET QTDIR=PATH/TO/QT +# Non-Windows: export QTDIR=PATH/TO/QT +# 2. modifying the value below directly +# + +# Qt build toolchain path not set or doesn't exist +# try to read from environment QTDIR +if(NOT EXISTS ${QT_SDK_DIR}) + message(STATUS "QT_SDK_DIR not found, try to read from environment variable: QTDIR") + set(QT_SDK_DIR "$ENV{QTDIR}" CACHE STRING "QT_SDK_DIR read from environment variable: QTDIR" FORCE) +endif() + +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!NOTE!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# You must make sure the target platform and architecture +# of QT binaries math the ones of CEF binaries +# Qt linux-x86 + CEF linux-x86 +# Qt linux-x86_64 + CEF linux-x86_64 +# Qt windows-x86 + CEF windows-x86 +# Qt windows-x86_64 + CEF windows-x86_64 +# Qt macos-x86_64 + CEF macos-x86_64 +# Qt macos-arm64 + CEF macos-arm64 +# + +# find required components +message(STATUS "Qt SDK dir: " ${QT_SDK_DIR}) +set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QT_SDK_DIR}) +find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets REQUIRED) \ No newline at end of file diff --git a/3rdparty_build/QCefView/src/CMakeLists.txt b/3rdparty_build/QCefView/src/CMakeLists.txt new file mode 100644 index 0000000..b3f67c9 --- /dev/null +++ b/3rdparty_build/QCefView/src/CMakeLists.txt @@ -0,0 +1,253 @@ +# ## QCefView +# ############################################################################################### +set(CMAKE_GLOBAL_AUTOGEN_TARGET OFF) +set(CMAKE_AUTOMOC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets REQUIRED) + +file(GLOB_RECURSE QCefView_INCLUDE_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/../include/*.h" +) +source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" + PREFIX Include + FILES ${QCefView_INCLUDE_FILES} +) + +file(GLOB QCefView_SRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" +) +source_group( + TREE ${CMAKE_CURRENT_SOURCE_DIR} + PREFIX Source + FILES ${QCefView_SRC_FILES} +) + +file(GLOB_RECURSE QCefView_details_SRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/details/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/details/*.cpp" +) +source_group( + TREE ${CMAKE_CURRENT_SOURCE_DIR} + PREFIX Source + FILES ${QCefView_details_SRC_FILES} +) + +if(USE_SANDBOX AND(OS_WINDOWS OR OS_MACOS)) + add_definitions(-DCEF_USE_SANDBOX) +endif() + +if(USE_QT_EVENT_LOOP) + add_definitions(-DCEF_USE_QT_EVENT_LOOP) +endif() + +if(OS_WINDOWS) + file(GLOB_RECURSE QCefView_Windows_SRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/win/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/win/*.cpp" + ) + source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/win" + PREFIX Source + FILES ${QCefView_Windows_SRC_FILES} + ) + + add_library(QCefView ${QCEFVIEW_LIB_TYPE} + ${QCefView_INCLUDE_FILES} + ${QCefView_SRC_FILES} + ${QCefView_details_SRC_FILES} + ${QCefView_Windows_SRC_FILES} + ) + + target_compile_definitions(QCefView PRIVATE + UNICODE + _UNICODE + QCEFVIEW_LIB + ) + + target_link_options(QCefView PRIVATE + "/DELAYLOAD:libcef.dll" + ) + + target_link_libraries(QCefView + PRIVATE + d3d11 + d3dcompiler + dcomp + ) + + # add_custom_command(TARGET QCefView + # PRE_BUILD + + # # copy binary files of CefViewCore + # COMMAND ${CMAKE_COMMAND} + # -E copy_directory + # "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>" + # "$<TARGET_FILE_DIR:QCefView>/CefView" + + # # gnerate a file contains timestamp + # COMMAND ${CMAKE_COMMAND} + # -E echo "/* Auto Build Trigger */" > "${CMAKE_BINARY_DIR}/auto_rebuild.cpp" + # ) +endif() # OS_WINDOWS + +if(OS_LINUX) + find_package(Qt${QT_VERSION_MAJOR}Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private) + + file(GLOB_RECURSE QCefView_Linux_SRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/linux/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/linux/*.cpp" + ) + source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/linux" + PREFIX Source + FILES ${QCefView_Linux_SRC_FILES} + ) + + add_library(QCefView ${QCEFVIEW_LIB_TYPE} + ${QCefView_INCLUDE_FILES} + ${QCefView_SRC_FILES} + ${QCefView_details_SRC_FILES} + ${QCefView_Linux_SRC_FILES} + ) + + target_compile_definitions(QCefView + PRIVATE + QCEFVIEW_LIB + ) + + set_target_properties(${PROJECT_NAME} + PROPERTIES + INSTALL_RPATH "$ORIGIN" + BUILD_WITH_INSTALL_RPATH TRUE + ) + + add_custom_command(TARGET QCefView + PRE_BUILD + + # copy binary files of CefViewCore + COMMAND ${CMAKE_COMMAND} + -E copy_directory + "$<TARGET_FILE_DIR:${CEFVIEW_WING_NAME}>" + "$<TARGET_FILE_DIR:QCefView>" + ) +endif() # OS_LINUX + +if(OS_MACOS) + file(GLOB_RECURSE QCefView_INCLUDE_HEADERS + "${CMAKE_CURRENT_SOURCE_DIR}/../include/*.h" + ) + source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" + PREFIX Include + FILES ${QCefView_INCLUDE_HEADERS} + ) + + file(GLOB_RECURSE QCefView_macOS_SRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/mac/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/mac/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/mac/*.mm" + ) + source_group( + TREE "${CMAKE_CURRENT_SOURCE_DIR}/mac" + PREFIX Source + FILES ${QCefView_macOS_SRC_FILES} + ) + set(QCefView_INFO_PLIST_FILE "${CMAKE_CURRENT_LIST_DIR}/mac/Info.plist") + + add_library(QCefView ${QCEFVIEW_LIB_TYPE} + ${QCefView_INCLUDE_FILES} + ${QCefView_SRC_FILES} + ${QCefView_details_SRC_FILES} + ${QCefView_macOS_SRC_FILES} + ${QCefView_INFO_PLIST_FILE} + ) + + find_library(METAL_FRAMEWORK Metal) + find_library(QUARTZCORE_FRAMEWORK QuartzCore) + target_link_libraries(QCefView + PRIVATE + ${METAL_FRAMEWORK} + ${QUARTZCORE_FRAMEWORK} + ) + + set_target_properties(QCefView + PROPERTIES + FRAMEWORK TRUE + + # compiler settings + COMPILE_FLAGS "-fobjc-arc" + CLANG_ENABLE_OBJC_ARC "YES" + + # xcode settings + PUBLIC_HEADER "${QCefView_INCLUDE_HEADERS}" + MACOSX_FRAMEWORK_INFO_PLIST "${QCefView_INFO_PLIST_FILE}" + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.cefview.qcefview" + XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "gnu++11" # -std=gnu++11 + XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME "NO" # -fno-objc-link-runtime + XCODE_ATTRIBUTE_COPY_PHASE_STRIP "NO" + XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING[variant=Release] "YES" # -Wl,-dead_strip + XCODE_ATTRIBUTE_GCC_C_LANGUAGE_STANDARD "c99" # -std=c99 + XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @loader_path/Frameworks" + ) + + add_custom_command(TARGET QCefView + POST_BUILD + + # create plugins directory + COMMAND mkdir -p + "$<TARGET_BUNDLE_DIR:QCefView>/Resources/PlugIns/" + + # copy the CefViewCore binaries to resource directory + COMMAND cp -a + "$<TARGET_BUNDLE_DIR:CefViewWing>/../" + "$<TARGET_BUNDLE_DIR:QCefView>/Resources/PlugIns/" + + # adjust file permission + COMMAND + cd "$<TARGET_BUNDLE_DIR:QCefView>/Resources/PlugIns/Chromium Embedded Framework.framework/Resources" && chmod +rw *.bin + + # sign the cef framework + COMMAND codesign + --force + --sign - + "$<TARGET_BUNDLE_DIR:QCefView>/Resources/PlugIns/Chromium Embedded Framework.framework" + ) +endif() # OS_MACOS + +target_compile_definitions(QCefView PRIVATE NOMINMAX) + +target_include_directories(QCefView + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/../include" + PRIVATE + ${CefViewCore_EXPORT_INCLUDE_PATH} +) + +add_dependencies(QCefView + CefViewCore::CefViewCore +) + +target_link_libraries(QCefView + PUBLIC + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Widgets + PRIVATE + CefViewCore::CefViewCore +) + +# install QCefView files +install( + TARGETS QCefView + ARCHIVE DESTINATION "QCefView/lib$<$<CONFIG:Debug>:/Debug>" + LIBRARY DESTINATION "QCefView/bin$<$<CONFIG:Debug>:/Debug>" + FRAMEWORK DESTINATION "QCefView/lib$<$<CONFIG:Debug>:/Debug>" +) + +if(NOT OS_MACOS) + install(DIRECTORY "${CMAKE_SOURCE_DIR}/include" DESTINATION "QCefView") + install(DIRECTORY "$<TARGET_FILE_DIR:QCefView>/" DESTINATION "QCefView/bin$<$<CONFIG:Debug>:/Debug>") +endif() diff --git a/3rdparty_build/QCefView/thirdparty/CMakeLists.txt b/3rdparty_build/QCefView/thirdparty/CMakeLists.txt new file mode 100644 index 0000000..162aab7 --- /dev/null +++ b/3rdparty_build/QCefView/thirdparty/CMakeLists.txt @@ -0,0 +1,66 @@ +include(FetchContent) + +if(NOT CEFVIEW_CORE_VERSION) + set(DEFAULT_CEFVIEW_CORE_VERSION "ca9f2c009a6a248a13ff0a2e33bbf46e7a044581") + set(CEFVIEW_CORE_VERSION ${DEFAULT_CEFVIEW_CORE_VERSION}) + message(STATUS "CEFVIEW_CORE_VERSION not set, use default value:${CEFVIEW_CORE_VERSION}") +endif() + +# fetch CefViewCore project +FetchContent_Declare( + CefViewCore + GIT_REPOSITORY https://github.com/CefView/CefViewCore.git + GIT_TAG ${CEFVIEW_CORE_VERSION} +) + +# set CEF version to be used +# https://cef-builds.spotifycdn.com/index.html +# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md +# set(CEF_SDK_VERSION "89.0.18+gb36241d+chromium-89.0.4389.114") # GOOD +# set(CEF_SDK_VERSION "91.1.23+g04c8d56+chromium-91.0.4472.164") # GOOD +# set(CEF_SDK_VERSION "92.0.27+g274abcf+chromium-92.0.4515.159") # GOOD +# set(CEF_SDK_VERSION "93.1.14+gf38ce34+chromium-93.0.4577.82") # GOOD +# set(CEF_SDK_VERSION "94.4.11+gc4d96f0+chromium-94.0.4606.81") # GOOD +# set(CEF_SDK_VERSION "95.7.18+g0d6005e+chromium-95.0.4638.69") # GOOD +# set(CEF_SDK_VERSION "96.0.18+gfe551e4+chromium-96.0.4664.110") # GOOD +# set(CEF_SDK_VERSION "97.1.9+ga00bca5+chromium-97.0.4692.99") # GOOD +# set(CEF_SDK_VERSION "98.2.1+g29d6e22+chromium-98.0.4758.109") # GOOD +# set(CEF_SDK_VERSION "99.2.15+g71e9523+chromium-99.0.4844.84") # IME poisition incorrect +# set(CEF_SDK_VERSION "100.0.24+g0783cf8+chromium-100.0.4896.127") # IME poisition incorrect +# set(CEF_SDK_VERSION "101.0.18+g367b4a0+chromium-101.0.4951.67") # IME poisition incorrect +# set(CEF_SDK_VERSION "102.0.10+gf249b2e+chromium-102.0.5005.115") # IME poisition incorrect +# set(CEF_SDK_VERSION "103.0.12+g8eb56c7+chromium-103.0.5060.134") # IME poisition incorrect +# set(CEF_SDK_VERSION "104.4.26+g4180781+chromium-104.0.5112.102") # GOOD +# set(CEF_SDK_VERSION "105.3.39+g2ec21f9+chromium-105.0.5195.127") # GOOD +# set(CEF_SDK_VERSION "106.1.1+g5891c70+chromium-106.0.5249.119") # GOOD +# set(CEF_SDK_VERSION "107.1.12+g65b79a6+chromium-107.0.5304.122") # GOOD +# set(CEF_SDK_VERSION "108.4.13+ga98cd4c+chromium-108.0.5359.125") # GOOD +# set(CEF_SDK_VERSION "109.1.18+gf1c41e4+chromium-109.0.5414.120") # GOOD +# set(CEF_SDK_VERSION "110.0.32+g291f1df+chromium-110.0.5481.180") # GOOD +# set(CEF_SDK_VERSION "111.2.7+gebf5d6a+chromium-111.0.5563.148") # GOOD +# set(CEF_SDK_VERSION "112.3.0+gb09c4ca+chromium-112.0.5615.165") # GOOD +# set(CEF_SDK_VERSION "113.3.1+g525fa10+chromium-113.0.5672.128") # GOOD +# set(CEF_SDK_VERSION "119.4.7+g55e15c8+chromium-119.0.6045.199") # GOOD +# set(CEF_SDK_VERSION "120.1.6+gf08b1fd+chromium-120.0.6099.71") # GOOD +# set(CEF_SDK_VERSION "121.3.15+g4d3b0b4+chromium-121.0.6167.184") # GOOD +# set(CEF_SDK_VERSION "122.1.13+gde5b724+chromium-122.0.6261.130") # GOOD +# set(CEF_SDK_VERSION "123.0.13+gfc703fb+chromium-123.0.6312.124") # NOT TEST +# set(CEF_SDK_VERSION "124.3.9+g9bd638f+chromium-124.0.6367.207") # NOT TEST +# set(CEF_SDK_VERSION "125.0.22+gc410c95+chromium-125.0.6422.142") # NOT TEST +set(CEF_SDK_VERSION "134.3.6+g96006d1+chromium-134.0.6998.118") # NOT TEST + +# set(CEF_SDK_VERSION "127.3.5+g114ea2a+chromium-127.0.6533.120") # GOOD + +# set(CEF_SDK_VERSION "128.4.9+g9840ad9+chromium-128.0.6613.120") # BAD # debugbreak - debug mode + +# set folder +set(CMAKE_FOLDER "QCefView/Core") + +# populate CefViewCore project +FetchContent_MakeAvailable(CefViewCore) + +configure_file( + "${CefViewCore_SOURCE_DIR}/include/CefVersion.h" + "${CMAKE_CURRENT_SOURCE_DIR}/../include/CefVersion.h" + COPYONLY +) \ No newline at end of file diff --git a/3rdparty_build/QCefView/默认静态编译注意事项.txt b/3rdparty_build/QCefView/默认静态编译注意事项.txt new file mode 100644 index 0000000..3000d62 --- /dev/null +++ b/3rdparty_build/QCefView/默认静态编译注意事项.txt @@ -0,0 +1,23 @@ +使用情况CMakelists.txt +add_definitions(-DQCEFVIEW_STATIC) +#libcef_dll_wrapper +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libcef_dll_wrapper) +link_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libcef_dll_wrapper/lib) + +#QCefViewCore +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/CefViewCore/include) +link_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/CefViewCore/lib) + +#QCefView +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QCefView/include) +link_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QCefView/lib) + +target_link_libraries(${PROJECT_NAME} PRIVATE + -lQCefView + -lCefViewCore + -lcef_dll_wrapper + -lcef + d3d11 + d3dcompiler + dcomp +) \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 59ad11b..e9152f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,9 +73,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/MicroTeX/src) add_definitions(-DQCEFVIEW_STATIC) add_definitions(-DCEF_USE_QT_EVENT_LOOP) -#libcef_dll_wrapper -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libcef_dll_wrapper) -link_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libcef_dll_wrapper/lib) + +#QCefView +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QCefView/include/libcef_dll_wrapper) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QCefView/include/QCefView) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QCefView/include/QCefCore) +link_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QCefView/lib) #查找QT模块 FIND_PACKAGE(Qt6 REQUIRED Core Gui Widgets) @@ -144,8 +147,6 @@ message(STATUS "G++ version: ${CMAKE_CXX_COMPILER_VERSION}") SET(QT_VERSION_STR "${Qt6_VERSION}") # 打印Qt版本号 message(STATUS "Qt Version: ${QT_VERSION_STR}") -#设定版本 -configure_file (version.h.in version.h @ONLY) # 设置链接标志为静态链接 SET(CMAKE_EXE_LINKER_FLAGS -static) @@ -158,6 +159,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE LaTeX libcmark-gfm_static libcmark-gfm-extensions_static + -lQCefView + -lCefViewCore -lcef_dll_wrapper -lcef d3d11 diff --git a/cef_binary/Resources/chrome_100_percent.pak b/cef_binary/Resources/chrome_100_percent.pak new file mode 100644 index 0000000..ddca301 Binary files /dev/null and b/cef_binary/Resources/chrome_100_percent.pak differ diff --git a/cef_binary/Resources/chrome_200_percent.pak b/cef_binary/Resources/chrome_200_percent.pak new file mode 100644 index 0000000..12b3918 Binary files /dev/null and b/cef_binary/Resources/chrome_200_percent.pak differ diff --git a/cef_binary/Resources/icudtl.dat b/cef_binary/Resources/icudtl.dat new file mode 100644 index 0000000..98005b3 Binary files /dev/null and b/cef_binary/Resources/icudtl.dat differ diff --git a/cef_binary/Resources/locales/af.pak b/cef_binary/Resources/locales/af.pak new file mode 100644 index 0000000..38415df Binary files /dev/null and b/cef_binary/Resources/locales/af.pak differ diff --git a/cef_binary/Resources/locales/am.pak b/cef_binary/Resources/locales/am.pak new file mode 100644 index 0000000..4db5c3c Binary files /dev/null and b/cef_binary/Resources/locales/am.pak differ diff --git a/cef_binary/Resources/locales/ar.pak b/cef_binary/Resources/locales/ar.pak new file mode 100644 index 0000000..b400985 Binary files /dev/null and b/cef_binary/Resources/locales/ar.pak differ diff --git a/cef_binary/Resources/locales/bg.pak b/cef_binary/Resources/locales/bg.pak new file mode 100644 index 0000000..8fedf4d Binary files /dev/null and b/cef_binary/Resources/locales/bg.pak differ diff --git a/cef_binary/Resources/locales/bn.pak b/cef_binary/Resources/locales/bn.pak new file mode 100644 index 0000000..8fd5ed9 Binary files /dev/null and b/cef_binary/Resources/locales/bn.pak differ diff --git a/cef_binary/Resources/locales/ca.pak b/cef_binary/Resources/locales/ca.pak new file mode 100644 index 0000000..30431fc Binary files /dev/null and b/cef_binary/Resources/locales/ca.pak differ diff --git a/cef_binary/Resources/locales/cs.pak b/cef_binary/Resources/locales/cs.pak new file mode 100644 index 0000000..3d6455e Binary files /dev/null and b/cef_binary/Resources/locales/cs.pak differ diff --git a/cef_binary/Resources/locales/da.pak b/cef_binary/Resources/locales/da.pak new file mode 100644 index 0000000..12eb303 Binary files /dev/null and b/cef_binary/Resources/locales/da.pak differ diff --git a/cef_binary/Resources/locales/de.pak b/cef_binary/Resources/locales/de.pak new file mode 100644 index 0000000..2c91e68 Binary files /dev/null and b/cef_binary/Resources/locales/de.pak differ diff --git a/cef_binary/Resources/locales/el.pak b/cef_binary/Resources/locales/el.pak new file mode 100644 index 0000000..c44b950 Binary files /dev/null and b/cef_binary/Resources/locales/el.pak differ diff --git a/cef_binary/Resources/locales/en-GB.pak b/cef_binary/Resources/locales/en-GB.pak new file mode 100644 index 0000000..e7e93ed Binary files /dev/null and b/cef_binary/Resources/locales/en-GB.pak differ diff --git a/cef_binary/Resources/locales/en-US.pak b/cef_binary/Resources/locales/en-US.pak new file mode 100644 index 0000000..8615a88 Binary files /dev/null and b/cef_binary/Resources/locales/en-US.pak differ diff --git a/cef_binary/Resources/locales/es-419.pak b/cef_binary/Resources/locales/es-419.pak new file mode 100644 index 0000000..be0b92b Binary files /dev/null and b/cef_binary/Resources/locales/es-419.pak differ diff --git a/cef_binary/Resources/locales/es.pak b/cef_binary/Resources/locales/es.pak new file mode 100644 index 0000000..613aa13 Binary files /dev/null and b/cef_binary/Resources/locales/es.pak differ diff --git a/cef_binary/Resources/locales/et.pak b/cef_binary/Resources/locales/et.pak new file mode 100644 index 0000000..f70fd2e Binary files /dev/null and b/cef_binary/Resources/locales/et.pak differ diff --git a/cef_binary/Resources/locales/fa.pak b/cef_binary/Resources/locales/fa.pak new file mode 100644 index 0000000..95e62d9 Binary files /dev/null and b/cef_binary/Resources/locales/fa.pak differ diff --git a/cef_binary/Resources/locales/fi.pak b/cef_binary/Resources/locales/fi.pak new file mode 100644 index 0000000..b6f84bd Binary files /dev/null and b/cef_binary/Resources/locales/fi.pak differ diff --git a/cef_binary/Resources/locales/fil.pak b/cef_binary/Resources/locales/fil.pak new file mode 100644 index 0000000..6726dfc Binary files /dev/null and b/cef_binary/Resources/locales/fil.pak differ diff --git a/cef_binary/Resources/locales/fr.pak b/cef_binary/Resources/locales/fr.pak new file mode 100644 index 0000000..b4aa2f1 Binary files /dev/null and b/cef_binary/Resources/locales/fr.pak differ diff --git a/cef_binary/Resources/locales/gu.pak b/cef_binary/Resources/locales/gu.pak new file mode 100644 index 0000000..300d9c7 Binary files /dev/null and b/cef_binary/Resources/locales/gu.pak differ diff --git a/cef_binary/Resources/locales/he.pak b/cef_binary/Resources/locales/he.pak new file mode 100644 index 0000000..b394ca8 Binary files /dev/null and b/cef_binary/Resources/locales/he.pak differ diff --git a/cef_binary/Resources/locales/hi.pak b/cef_binary/Resources/locales/hi.pak new file mode 100644 index 0000000..145b549 Binary files /dev/null and b/cef_binary/Resources/locales/hi.pak differ diff --git a/cef_binary/Resources/locales/hr.pak b/cef_binary/Resources/locales/hr.pak new file mode 100644 index 0000000..1a30eae Binary files /dev/null and b/cef_binary/Resources/locales/hr.pak differ diff --git a/cef_binary/Resources/locales/hu.pak b/cef_binary/Resources/locales/hu.pak new file mode 100644 index 0000000..19e1480 Binary files /dev/null and b/cef_binary/Resources/locales/hu.pak differ diff --git a/cef_binary/Resources/locales/id.pak b/cef_binary/Resources/locales/id.pak new file mode 100644 index 0000000..25cce4a Binary files /dev/null and b/cef_binary/Resources/locales/id.pak differ diff --git a/cef_binary/Resources/locales/it.pak b/cef_binary/Resources/locales/it.pak new file mode 100644 index 0000000..fe6fa3d Binary files /dev/null and b/cef_binary/Resources/locales/it.pak differ diff --git a/cef_binary/Resources/locales/ja.pak b/cef_binary/Resources/locales/ja.pak new file mode 100644 index 0000000..f7f890c Binary files /dev/null and b/cef_binary/Resources/locales/ja.pak differ diff --git a/cef_binary/Resources/locales/kn.pak b/cef_binary/Resources/locales/kn.pak new file mode 100644 index 0000000..7680939 Binary files /dev/null and b/cef_binary/Resources/locales/kn.pak differ diff --git a/cef_binary/Resources/locales/ko.pak b/cef_binary/Resources/locales/ko.pak new file mode 100644 index 0000000..8e56bbc Binary files /dev/null and b/cef_binary/Resources/locales/ko.pak differ diff --git a/cef_binary/Resources/locales/lt.pak b/cef_binary/Resources/locales/lt.pak new file mode 100644 index 0000000..a38f066 Binary files /dev/null and b/cef_binary/Resources/locales/lt.pak differ diff --git a/cef_binary/Resources/locales/lv.pak b/cef_binary/Resources/locales/lv.pak new file mode 100644 index 0000000..bfde751 Binary files /dev/null and b/cef_binary/Resources/locales/lv.pak differ diff --git a/cef_binary/Resources/locales/ml.pak b/cef_binary/Resources/locales/ml.pak new file mode 100644 index 0000000..160adaa Binary files /dev/null and b/cef_binary/Resources/locales/ml.pak differ diff --git a/cef_binary/Resources/locales/mr.pak b/cef_binary/Resources/locales/mr.pak new file mode 100644 index 0000000..619f570 Binary files /dev/null and b/cef_binary/Resources/locales/mr.pak differ diff --git a/cef_binary/Resources/locales/ms.pak b/cef_binary/Resources/locales/ms.pak new file mode 100644 index 0000000..faf4f64 Binary files /dev/null and b/cef_binary/Resources/locales/ms.pak differ diff --git a/cef_binary/Resources/locales/nb.pak b/cef_binary/Resources/locales/nb.pak new file mode 100644 index 0000000..ee17e40 Binary files /dev/null and b/cef_binary/Resources/locales/nb.pak differ diff --git a/cef_binary/Resources/locales/nl.pak b/cef_binary/Resources/locales/nl.pak new file mode 100644 index 0000000..9c20949 Binary files /dev/null and b/cef_binary/Resources/locales/nl.pak differ diff --git a/cef_binary/Resources/locales/pl.pak b/cef_binary/Resources/locales/pl.pak new file mode 100644 index 0000000..048cabc Binary files /dev/null and b/cef_binary/Resources/locales/pl.pak differ diff --git a/cef_binary/Resources/locales/pt-BR.pak b/cef_binary/Resources/locales/pt-BR.pak new file mode 100644 index 0000000..1030ce7 Binary files /dev/null and b/cef_binary/Resources/locales/pt-BR.pak differ diff --git a/cef_binary/Resources/locales/pt-PT.pak b/cef_binary/Resources/locales/pt-PT.pak new file mode 100644 index 0000000..d0e643c Binary files /dev/null and b/cef_binary/Resources/locales/pt-PT.pak differ diff --git a/cef_binary/Resources/locales/ro.pak b/cef_binary/Resources/locales/ro.pak new file mode 100644 index 0000000..5448270 Binary files /dev/null and b/cef_binary/Resources/locales/ro.pak differ diff --git a/cef_binary/Resources/locales/ru.pak b/cef_binary/Resources/locales/ru.pak new file mode 100644 index 0000000..a9bafe2 Binary files /dev/null and b/cef_binary/Resources/locales/ru.pak differ diff --git a/cef_binary/Resources/locales/sk.pak b/cef_binary/Resources/locales/sk.pak new file mode 100644 index 0000000..2585d3a Binary files /dev/null and b/cef_binary/Resources/locales/sk.pak differ diff --git a/cef_binary/Resources/locales/sl.pak b/cef_binary/Resources/locales/sl.pak new file mode 100644 index 0000000..0bcb0a1 Binary files /dev/null and b/cef_binary/Resources/locales/sl.pak differ diff --git a/cef_binary/Resources/locales/sr.pak b/cef_binary/Resources/locales/sr.pak new file mode 100644 index 0000000..4ae7143 Binary files /dev/null and b/cef_binary/Resources/locales/sr.pak differ diff --git a/cef_binary/Resources/locales/sv.pak b/cef_binary/Resources/locales/sv.pak new file mode 100644 index 0000000..b8c4001 Binary files /dev/null and b/cef_binary/Resources/locales/sv.pak differ diff --git a/cef_binary/Resources/locales/sw.pak b/cef_binary/Resources/locales/sw.pak new file mode 100644 index 0000000..aad2efb Binary files /dev/null and b/cef_binary/Resources/locales/sw.pak differ diff --git a/cef_binary/Resources/locales/ta.pak b/cef_binary/Resources/locales/ta.pak new file mode 100644 index 0000000..c8e10a9 Binary files /dev/null and b/cef_binary/Resources/locales/ta.pak differ diff --git a/cef_binary/Resources/locales/te.pak b/cef_binary/Resources/locales/te.pak new file mode 100644 index 0000000..513b78f Binary files /dev/null and b/cef_binary/Resources/locales/te.pak differ diff --git a/cef_binary/Resources/locales/th.pak b/cef_binary/Resources/locales/th.pak new file mode 100644 index 0000000..fad9e82 Binary files /dev/null and b/cef_binary/Resources/locales/th.pak differ diff --git a/cef_binary/Resources/locales/tr.pak b/cef_binary/Resources/locales/tr.pak new file mode 100644 index 0000000..3da6625 Binary files /dev/null and b/cef_binary/Resources/locales/tr.pak differ diff --git a/cef_binary/Resources/locales/uk.pak b/cef_binary/Resources/locales/uk.pak new file mode 100644 index 0000000..520323b Binary files /dev/null and b/cef_binary/Resources/locales/uk.pak differ diff --git a/cef_binary/Resources/locales/ur.pak b/cef_binary/Resources/locales/ur.pak new file mode 100644 index 0000000..04d8574 Binary files /dev/null and b/cef_binary/Resources/locales/ur.pak differ diff --git a/cef_binary/Resources/locales/vi.pak b/cef_binary/Resources/locales/vi.pak new file mode 100644 index 0000000..d7bb795 Binary files /dev/null and b/cef_binary/Resources/locales/vi.pak differ diff --git a/cef_binary/Resources/locales/zh-CN.pak b/cef_binary/Resources/locales/zh-CN.pak new file mode 100644 index 0000000..0d4e591 Binary files /dev/null and b/cef_binary/Resources/locales/zh-CN.pak differ diff --git a/cef_binary/Resources/locales/zh-TW.pak b/cef_binary/Resources/locales/zh-TW.pak new file mode 100644 index 0000000..23d97a9 Binary files /dev/null and b/cef_binary/Resources/locales/zh-TW.pak differ diff --git a/cef_binary/Resources/resources.pak b/cef_binary/Resources/resources.pak new file mode 100644 index 0000000..578623e Binary files /dev/null and b/cef_binary/Resources/resources.pak differ diff --git a/src/QCefView/CefViewWidget.cpp b/src/QCefView/CefViewWidget.cpp new file mode 100644 index 0000000..24d6e30 --- /dev/null +++ b/src/QCefView/CefViewWidget.cpp @@ -0,0 +1,106 @@ +#include "CefViewWidget.h" + +CefViewWidget::CefViewWidget(const QString url, const QCefSetting* setting, QWidget* parent /* = 0*/) + : QCefView(url, setting, parent) +{ + // setStyleSheet("background: blue;"); + + connect(this, &CefViewWidget::draggableRegionChanged, this, &CefViewWidget::onDraggableRegionChanged); + connect(this, &CefViewWidget::nativeBrowserCreated, this, &CefViewWidget::onNativeBrowserWindowCreated); +} + +CefViewWidget::~CefViewWidget() {} + +void +CefViewWidget::onScreenChanged(QScreen* screen) +{ + if (!m_pCefWindow) + return; + + updateMask(); +} + +void +CefViewWidget::onNativeBrowserWindowCreated(QWindow* window) +{ + m_pCefWindow = window; + if (!m_pCefWindow) + return; + + connect(this->window()->windowHandle(), SIGNAL(screenChanged(QScreen*)), this, SLOT(onScreenChanged(QScreen*))); + + updateMask(); +} + +void +CefViewWidget::onDraggableRegionChanged(const QRegion& draggableRegion, const QRegion& nonDraggableRegion) +{ + m_draggableRegion = draggableRegion; + m_nonDraggableRegion = nonDraggableRegion; +} + +bool +CefViewWidget::onNewPopup(const QCefFrameId& sourceFrameId, + const QString& targetUrl, + QString& targetFrameName, + QCefView::CefWindowOpenDisposition targetDisposition, + QRect& rect, + QCefSetting& settings, + bool& disableJavascriptAccess) +{ + // create new QCefView as popup browser + // settings.setBackgroundColor(Qt::red); + return false; +} + +void +CefViewWidget::onNewDownloadItem(const QSharedPointer<QCefDownloadItem>& item, const QString& suggestedName) +{ + // keep the item into list or map, and call item->start() to allow the download + + DownloadManager::getInstance().AddNewDownloadItem(item); +} + +void +CefViewWidget::onUpdateDownloadItem(const QSharedPointer<QCefDownloadItem>& item) +{ + + // control the download by invoking item->pause(), item->resume(), item->cancel() + + DownloadManager::getInstance().UpdateDownloadItem(item); +} + +void +CefViewWidget::resizeEvent(QResizeEvent* event) +{ + // update mask first, because the new mask will be + // used in the QCefView::resizeEvent + updateMask(); + + QCefView::resizeEvent(event); +} + +void +CefViewWidget::mousePressEvent(QMouseEvent* event) +{ + QCefView::mousePressEvent(event); + if (event->buttons().testFlag(Qt::LeftButton) && m_draggableRegion.contains(event->pos())) { + HWND hWnd = ::GetAncestor((HWND)(window()->windowHandle()->winId()), GA_ROOT); + POINT pt; + ::GetCursorPos(&pt); + ::ReleaseCapture(); + ::SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, POINTTOPOINTS(pt)); + } +} + +void +CefViewWidget::updateMask() +{ + // create a rect with rounded corner (50px radius) as mask + QPainterPath path; + path.addRoundedRect(rect(), 0, 0); + QRegion mask = QRegion(path.toFillPolygon().toPolygon()); + + // apply the mask + setMask(mask); +} diff --git a/src/QCefView/CefViewWidget.h b/src/QCefView/CefViewWidget.h new file mode 100644 index 0000000..04f321a --- /dev/null +++ b/src/QCefView/CefViewWidget.h @@ -0,0 +1,65 @@ +#ifndef CUSTOMCEFVIEW_H +#define CUSTOMCEFVIEW_H + +#include <QColor> +#include <QDebug> +#include <QScreen> +#include <QPainterPath> +#include <QRandomGenerator> +#include <QResizeEvent> +#include <QWindow> + +#include <windows.h> +#include <QCefView.h> +#include "DownloadManager.h" +/// <summary> +/// Represents the customized QCefView +/// </summary> +class CefViewWidget : public QCefView +{ + Q_OBJECT + +public: + CefViewWidget(const QString url, const QCefSetting* setting, QWidget* parent = 0); + + ~CefViewWidget(); + +protected slots: + void onScreenChanged(QScreen* screen); + + void onNativeBrowserWindowCreated(QWindow* window); + + void onDraggableRegionChanged(const QRegion& draggableRegion, const QRegion& nonDraggableRegion); + +protected: + bool onNewPopup(const QCefFrameId& sourceFrameId, + const QString& targetUrl, + QString& targetFrameName, + QCefView::CefWindowOpenDisposition targetDisposition, + QRect& rect, + QCefSetting& settings, + bool& disableJavascriptAccess) override; + + void onNewDownloadItem(const QSharedPointer<QCefDownloadItem>& item, const QString& suggestedName) override; + + void onUpdateDownloadItem(const QSharedPointer<QCefDownloadItem>& item) override; + +protected: + void resizeEvent(QResizeEvent* event) override; + + void mousePressEvent(QMouseEvent* event) override; + +private: + void updateMask(); + +private: + QWindow* m_pCefWindow = nullptr; + + int m_iCornerRadius = 50; + + QRegion m_draggableRegion; + + QRegion m_nonDraggableRegion; +}; + +#endif // CUSTOMCEFVIEW_H diff --git a/src/QCefView/CefWidget.cpp b/src/QCefView/CefWidget.cpp new file mode 100644 index 0000000..6974d3e --- /dev/null +++ b/src/QCefView/CefWidget.cpp @@ -0,0 +1,214 @@ +#include "CefWidget.h" + +#include <QCoreApplication> +#include <QDebug> +#include <QDir> +#include <QHBoxLayout> +#include <QJsonDocument> +#include <QJsonValue> +#include <QMessageBox> +#include <QRandomGenerator> + +#include <QCefContext.h> + +CefWidget::CefWidget(QWidget *parent) + : QWidget(parent /*, Qt::FramelessWindowHint*/) +{ + m_Layout = new QVBoxLayout; + m_OptionsLayout = new QHBoxLayout; + m_BrowserLayout = new QHBoxLayout; + m_NewBrowser = new QPushButton(tr("New Browser")); + m_ExitAllBrowser = new QPushButton(tr("Exit ALL Browser")); + m_DevTools = new QPushButton(tr("DevTools")); + m_CallJSCode = new QPushButton(tr("Call JS Code")); + m_SetFocus = new QPushButton(tr("Set Focus")); + m_BtnToUrl = new QPushButton(tr("To Url")); + m_TextToUrl = new QLineEdit(); + m_TextToUrl->setPlaceholderText(tr("输入前往url地址")); + + m_OptionsLayout->addWidget(m_NewBrowser); + m_OptionsLayout->addWidget(m_TextToUrl); + m_OptionsLayout->addWidget(m_BtnToUrl); + m_OptionsLayout->addWidget(m_SetFocus); + m_OptionsLayout->addWidget(m_CallJSCode); + m_OptionsLayout->addWidget(m_DevTools); + m_OptionsLayout->addWidget(m_ExitAllBrowser); + m_OptionsLayout->setStretch(1,7); + m_Layout->addLayout(m_OptionsLayout); + m_Layout->addLayout(m_BrowserLayout); + m_Layout->setStretch(0,2); + m_Layout->setStretch(1,8); + setLayout(m_Layout); + connect(m_BtnToUrl, &QPushButton::clicked, this, &CefWidget::onBtnToUrl); + connect(m_DevTools, &QPushButton::clicked, this, &CefWidget::onBtnShowDevToolsClicked); + connect(m_SetFocus, &QPushButton::clicked, this, &CefWidget::onBtnSetFocusClicked); + connect(m_CallJSCode, &QPushButton::clicked, this, &CefWidget::onBtnCallJSCodeClicked); + connect(m_NewBrowser, &QPushButton::clicked, this, &CefWidget::onBtnNewBrowserClicked); + connect(m_ExitAllBrowser, &QPushButton::clicked, qApp, &QCoreApplication::quit); + setMinimumSize(1000, 800); + initBrowser(); +} + +CefWidget::~CefWidget() {} + +void CefWidget::initBrowser() +{ + if (m_CefWidget) + { + m_CefWidget->deleteLater(); + m_CefWidget = nullptr; + } + setting.setHardwareAcceleration(true); + m_CefWidget = new CefViewWidget("https://www.bilibili.com/", &setting, this); + connect(m_CefWidget, &QCefView::invokeMethod, this, &CefWidget::onInvokeMethod); + connect(m_CefWidget, &QCefView::cefUrlRequest, this, &CefWidget::onQCefUrlRequest); + connect(m_CefWidget, &QCefView::cefQueryRequest, this, &CefWidget::onQCefQueryRequest); + connect(m_CefWidget, &QCefView::reportJavascriptResult, this, &CefWidget::onJavascriptResult); + connect(m_CefWidget, &QCefView::loadStart, this, &CefWidget::onLoadStart); + connect(m_CefWidget, &QCefView::loadEnd, this, &CefWidget::onLoadEnd); + connect(m_CefWidget, &QCefView::loadError, this, &CefWidget::onLoadError); + m_BrowserLayout->addWidget(m_CefWidget); +} +void CefWidget::onBtnToUrl() +{ + + if (!m_TextToUrl->text().isEmpty()) + { + m_CefWidget->navigateToUrl(m_TextToUrl->text()); + } +} + +void CefWidget::onInvokeMethod(const QCefBrowserId &browserId, + const QCefFrameId &frameId, + const QString &method, + const QVariantList &arguments) +{ + // extract the arguments and dispatch the invocation to corresponding handler + if (0 == method.compare("TestMethod")) + { + QString title("QCef InvokeMethod Notify"); + QString text = QString("================== Current Thread: QT_UI ==================\r\n" + "Frame: %1\r\n" + "Method: %2\r\n" + "Arguments:\r\n") + .arg(frameId) + .arg(method); + + for (int i = 0; i < arguments.size(); i++) + { + auto jv = QJsonValue::fromVariant(arguments[i]); + + // clang-format off + text.append( + QString("%1 Type:%2, Value:%3\r\n") + .arg(i).arg(arguments[i].typeName()).arg(arguments[i].toString()) + ); + // clang-format on + } + + auto jsonValue = QJsonDocument::fromVariant(arguments); + auto jsonString = QString(jsonValue.toJson()); + text.append(QString("\r\nArguments List in JSON format:\r\n%1").arg(jsonString)); + + QMessageBox::information(this->window(), title, text); + } + else + { + } +} + +void CefWidget::onQCefUrlRequest(const QCefBrowserId &browserId, const QCefFrameId &frameId, const QString &url) +{ + QString title("QCef URL Request"); + QString text = QString("Current Thread: QT_UI\r\n" + "URL: %1") + .arg(url); + + QMessageBox::information(this->window(), title, text); +} + +void CefWidget::onQCefQueryRequest(const QCefBrowserId &browserId, const QCefFrameId &frameId, const QCefQuery &query) +{ + QString title("QCef Query Request"); + QString text = QString("Current Thread: QT_UI\r\n" + "Query: %1") + .arg(query.request()); + + QMessageBox::information(this->window(), title, text); + + QString response = query.request().toUpper(); + query.setResponseResult(true, response); + m_CefWidget->responseQCefQuery(query); +} + +void CefWidget::onJavascriptResult(const QCefBrowserId &browserId, + const QCefFrameId &frameId, + const QString &context, + const QVariant &result) +{ + auto jsonValue = QJsonDocument::fromVariant(result); + auto jsonString = QString(jsonValue.toJson()); + + QString title("Javascript result notification"); + QString text = QString("Context: %1\r\nResult in JSON format:\r\n%2").arg(context).arg(jsonString); + + QMessageBox::information(this->window(), title, text); +} + +void CefWidget::onLoadingStateChanged(const QCefBrowserId &browserId, bool isLoading, bool canGoBack, bool canGoForward) +{ + qDebug() << "onLoadingStateChanged, browserId:" << browserId << ", isLoading:" << isLoading + << ", canGoBack:" << canGoBack << ", canGoForward:" << canGoForward; +} + +void CefWidget::onLoadStart(const QCefBrowserId &browserId, + const QCefFrameId &frameId, + bool isMainFrame, + int transitionType) +{ + qDebug() << "onLoadStart, browserId:" << browserId << ", frameId:" << frameId << ", isMainFrame:" << isMainFrame + << ", transitionType:" << transitionType; +} + +void CefWidget::onLoadEnd(const QCefBrowserId &browserId, const QCefFrameId &frameId, bool isMainFrame, int httpStatusCode) +{ + qDebug() << "onLoadEnd, browserId:" << browserId << ", frameId:" << frameId << ", isMainFrame:" << isMainFrame + << ", httpStatusCode:" << httpStatusCode; +} + +void CefWidget::onLoadError(const QCefBrowserId &browserId, + const QCefFrameId &frameId, + bool isMainFrame, + int errorCode, + const QString &errorMsg, + const QString &failedUrl) +{ + qDebug() << "onLoadError, browserId:" << browserId << ", frameId:" << frameId << ", isMainFrame:" << isMainFrame + << ", errorCode:" << errorCode; +} + +void CefWidget::onBtnShowDevToolsClicked() +{ + if (m_CefWidget) + { + m_CefWidget->showDevTools(); + } +} + +void CefWidget::onBtnCallJSCodeClicked() +{ + QString context = "helloQCefView"; + QString code = "alert('hello QCefView'); return {k1: 'str', k2: true, k3: 100};"; + m_CefWidget->executeJavascriptWithResult(QCefView::MainFrameID, code, "", context); +} + +void CefWidget::onBtnSetFocusClicked() +{ + if (m_CefWidget) + { + m_CefWidget->setFocus(); + } +} +void CefWidget::onBtnNewBrowserClicked() +{ +} \ No newline at end of file diff --git a/src/QCefView/CefWidget.h b/src/QCefView/CefWidget.h new file mode 100644 index 0000000..3f289e5 --- /dev/null +++ b/src/QCefView/CefWidget.h @@ -0,0 +1,69 @@ +#ifndef CEFWIDGET_H +#define CEFWIDGET_H + +#include <QHBoxLayout> +#include <QVBoxLayout> +#include <QCloseEvent> +#include <QWidget> +#include <QLineEdit> +#include <QPushButton> +#include "CefViewWidget.h" + +class CefWidget : public QWidget +{ + Q_OBJECT + +public: + CefWidget(QWidget* parent = 0); + ~CefWidget(); +private: + void initBrowser(); +private: + QVBoxLayout* m_Layout={}; + QHBoxLayout* m_OptionsLayout={}; + QHBoxLayout* m_BrowserLayout={}; + QPushButton* m_NewBrowser={}; + QPushButton* m_ExitAllBrowser={}; + QPushButton* m_DevTools={}; + QPushButton* m_CallJSCode={}; + QPushButton* m_SetFocus={}; + QLineEdit* m_TextToUrl={}; + QPushButton* m_BtnToUrl={}; + QCefView* m_CefWidget ={}; + QCefSetting setting; + +protected: + void createLeftCefView(); +// QCefView slots +protected slots: + void onInvokeMethod(const QCefBrowserId& browserId, + const QCefFrameId& frameId, + const QString& method, + const QVariantList& arguments); + void onQCefUrlRequest(const QCefBrowserId& browserId, const QCefFrameId& frameId, const QString& url); + void onQCefQueryRequest(const QCefBrowserId& browserId, const QCefFrameId& frameId, const QCefQuery& query); + void onJavascriptResult(const QCefBrowserId& browserId, + const QCefFrameId& frameId, + const QString& context, + const QVariant& result); + void onLoadingStateChanged(const QCefBrowserId& browserId, bool isLoading, bool canGoBack, bool canGoForward); + void onLoadStart(const QCefBrowserId& browserId, const QCefFrameId& frameId, bool isMainFrame, int transitionType); + void onLoadEnd(const QCefBrowserId& browserId, const QCefFrameId& frameId, bool isMainFrame, int httpStatusCode); + void onLoadError(const QCefBrowserId& browserId, + const QCefFrameId& frameId, + bool isMainFrame, + int errorCode, + const QString& errorMsg, + const QString& failedUrl); + +//ui slots +protected slots: + void onBtnShowDevToolsClicked(); + void onBtnSetFocusClicked(); + void onBtnCallJSCodeClicked(); + void onBtnNewBrowserClicked(); + + void onBtnToUrl(); +}; + +#endif // QCEFVIEWTEST_H diff --git a/src/QCefView/DownloadManager.cpp b/src/QCefView/DownloadManager.cpp new file mode 100644 index 0000000..38ada2a --- /dev/null +++ b/src/QCefView/DownloadManager.cpp @@ -0,0 +1,52 @@ +#include "DownloadManager.h" + +#include <QDebug> + +DownloadManager& +DownloadManager::getInstance() +{ + static DownloadManager s_instance; + return s_instance; +} + +void +DownloadManager::AddNewDownloadItem(const QSharedPointer<QCefDownloadItem>& item) +{ + qDebug() << "DownloadManager::AddNewDownloadItem:" + << " id: " << item->id() << "\n" + << " name: " << item->suggestedFileName() << "\n" + << " path: " << item->fullPath() << "\n" + << " percent: " << item->percentComplete() << "%, " << item->totalBytes() << "/" << item->receivedBytes() + << "\n" + << " canceled: " << item->isCanceled() << "\n" + << " complete: " << item->isComplete(); + + m_mapDownloadingItem[item->id()] = item; + item->start("", true); +} + +void +DownloadManager::UpdateDownloadItem(const QSharedPointer<QCefDownloadItem>& item) +{ + qDebug() << "DownloadManager::UpdateDownloadItem:" + << " id: " << item->id() << "\n" + << " name: " << item->suggestedFileName() << "\n" + << " path: " << item->fullPath() << "\n" + << " percent: " << item->percentComplete() << "%, " << item->totalBytes() << "/" << item->receivedBytes() + << "\n" + << " canceled: " << item->isCanceled() << "\n" + << " complete: " << item->isComplete(); + + if (item->isCanceled() || item->isComplete()) + m_mapDownloadingItem.remove(item->id()); +} + +DownloadManager::DownloadManager() {} + +DownloadManager::~DownloadManager() +{ + for (auto& item : m_mapDownloadingItem) { + item->cancel(); + } + m_mapDownloadingItem.clear(); +} diff --git a/src/QCefView/DownloadManager.h b/src/QCefView/DownloadManager.h new file mode 100644 index 0000000..e21c76d --- /dev/null +++ b/src/QCefView/DownloadManager.h @@ -0,0 +1,26 @@ +#ifndef DOWNLOADMANAGER_H +#define DOWNLOADMANAGER_H +#pragma once + +#include <QMap> +#include <QSharedPointer> + +#include <QCefDownloadItem.h> + +class DownloadManager +{ +public: + static DownloadManager& getInstance(); + + void AddNewDownloadItem(const QSharedPointer<QCefDownloadItem>& item); + + void UpdateDownloadItem(const QSharedPointer<QCefDownloadItem>& item); + +private: + DownloadManager(); + ~DownloadManager(); + + QMap<qint32, QSharedPointer<QCefDownloadItem>> m_mapDownloadingItem; +}; + +#endif diff --git a/src/main.cpp b/src/main.cpp index ef61492..df03d03 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,10 +4,41 @@ #include "sui_base_ex.h" #include "ctai.h" #include <QApplication> +#include <QCefContext.h> +#include "QCefView/CefWidget.h" int main(int argc, char *argv[]) { - + QString exeDir = QDir::currentPath(); QApplication a(argc, argv); + QCefConfig config; + config.setUserAgent("QCefViewTest"); + config.setLogLevel(QCefConfig::LOGSEVERITY_VERBOSE); + config.setBridgeObjectName("CallBridge"); + config.setBuiltinSchemeName("CefView"); + config.setWindowlessRenderingEnabled(true); + config.addCommandLineSwitch("single-process"); + config.addCommandLineSwitch("use-alloy-style"); + config.addCommandLineSwitch("off-screen-rendering-enabled"); + config.addCommandLineSwitch("multi-threaded-message-loop"); + config.addCommandLineSwitch("external-message-pump"); + config.addCommandLineSwitch("enable-chrome-runtime"); + config.addCommandLineSwitch("enable-gpu"); + config.addCommandLineSwitch("use-views"); + config.addCommandLineSwitch("site-per-process"); + config.addCommandLineSwitch("no-sandbox"); + config.addCommandLineSwitch("in-process-gpu"); + config.addCommandLineSwitch("use-mock-keychain"); + config.addCommandLineSwitchWithValue("ignore-certificate-errors","true"); + config.addCommandLineSwitchWithValue("enable-gpu-rasterizatio","true"); + config.addCommandLineSwitchWithValue("enable-accelerated-video","true"); + config.addCommandLineSwitchWithValue("use-fake-ui-for-media-stream","true"); + config.addCommandLineSwitchWithValue("use-fake-device-for-media-stream","true"); + config.addCommandLineSwitchWithValue("renderer-process-limit", "1"); + config.addCommandLineSwitchWithValue("disable-features", "BlinkGenPropertyTrees,TranslateUI,site-per-process"); + QCefContext cefContext(&a, argc, argv, &config); + CefWidget cw; + cw.show(); + qputenv("QT_QPA_PLATFORM", "windows:fontengine=freetype"); // 加载语言包 QTranslator qtBaseTranslator;