Wef is a Rust library for embedding WebView functionality using Chromium Embedded Framework (CEF3) with offscreen rendering support.
19 lines
No EOL
422 B
C++
19 lines
No EOL
422 B
C++
#include "include/cef_sandbox_mac.h"
|
|
|
|
extern "C" {
|
|
|
|
void* wef_sandbox_context_create(char* argv[], int argc) {
|
|
CefScopedSandboxContext* ctx = new CefScopedSandboxContext();
|
|
if (!ctx->Initialize(argc, argv)) {
|
|
delete ctx;
|
|
return nullptr;
|
|
}
|
|
return ctx;
|
|
}
|
|
|
|
void wef_sandbox_context_destroy(void* p) {
|
|
CefScopedSandboxContext* ctx = static_cast<CefScopedSandboxContext*>(p);
|
|
delete ctx;
|
|
}
|
|
|
|
} // extern "C"
|