Add macOS Cocoa port and CEF helper support

Introduce a macOS Cocoa-based UI and CEF helper subprocess support. CMake: enable OBJCXX on Apple, treat mac sources as .mm, set -fobjc-arc, link Cocoa frameworks, and generate helper app targets using a mac Info.plist template; keep libcef logical target off macOS. Implementation: add Objective-C++ implementations for browser_host and nebula_window, convert startup to ObjC++ (prepare NSApplication), add process_helper_mac (CEF helper entry) and load CEF library from main/main_bigpicture on mac. Tooling/docs: add .clangd fallback flags, compile_commands symlink helper, update cross-platform docs for mac status. Misc: add menu-popup UI page, define UNREFERENCED_PARAMETER in platform/types.h, small code cleanups (use (void)layout, include platform/types.h) and update .gitignore.
This commit is contained in:
2026-05-19 12:57:26 +12:00
parent 8cf9b50690
commit 29908646ea
19 changed files with 623 additions and 146 deletions
+25
View File
@@ -0,0 +1,25 @@
#include "cef/nebula_app.h"
#include "include/cef_app.h"
#include "include/wrapper/cef_library_loader.h"
#if defined(CEF_USE_SANDBOX)
#include "include/cef_sandbox_mac.h"
#endif
int main(int argc, char* argv[]) {
#if defined(CEF_USE_SANDBOX)
CefScopedSandboxContext sandbox_context;
if (!sandbox_context.Initialize(argc, argv)) {
return 1;
}
#endif
CefScopedLibraryLoader library_loader;
if (!library_loader.LoadInHelper()) {
return 1;
}
const CefMainArgs main_args(argc, argv);
CefRefPtr<nebula::cef::NebulaApp> app(new nebula::cef::NebulaApp);
return CefExecuteProcess(main_args, app, nullptr);
}