1 /++ 2 A web view wrapper. Uses CEF on Linux and WebView2 on Windows. 3 4 Microsoft WebView2 is fairly stable and is unlikely to break, but CEF 5 is not remotely stable and likely to break every release. You'll have 6 to get the same version as me to use this unless you want to generate 7 your own bindings (procedure found in the file comments). Details below. 8 9 10 I currently built against the version listed below and it uses UTF-16 strings. 11 12 November 2025: cef_binary_142.0.15+g6dfdb28+chromium-142.0.7444.176_linux64_minimal.tar.bz2 13 14 July 2024: 126.2.10+g61241e4+chromium-126.0.6478.127 15 16 November 2023: cef_binary_119.3.1+gf768881+chromium-119.0.6045.124_linux64_minimal.tar.bz2 17 18 November 2022: cef_binary_107.1.9+g1f0a21a+chromium-107.0.5304.110_linux64_minimal.tar.bz2 19 20 November 2021: 95.7.17+g4208276+chromium-95.0.4638.69 21 22 Note my ceftranslate.d for instructions to start the update process. 23 24 Then to install the cef put in the Resources in the Release directory (*.pak and *.dat 25 out of Resources, failure to do this will cause an abort on ICU file descriptor things) 26 and copy the locales to /opt/cef/Resources/Locales 27 28 You can download compatible builds from https://cef-builds.spotifycdn.com/index.html 29 just make sure to put in the version filter and check "all builds" to match it. 30 31 You do NOT actually need the cef to build the application, but it must be 32 on the user's machine to run it. It looks in /opt/cef/ on Linux. 33 34 Work in progress. DO NOT USE YET as I am prolly gonna break everything too. 35 36 On Windows, you need to distribute the WebView2Loader.dll with your exe. That 37 is found in the web view 2 sdk. Furthermore, users will have to install the runtime. 38 39 Please note; the Microsoft terms and conditions say they may be able to collect 40 information about your users if you use this on Windows. 41 see: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ 42 43 44 +/ 45 module arsd.webview; 46 47 enum WebviewEngine { 48 none, 49 cef, 50 wv2, 51 webkit_gtk 52 } 53 // see activeEngine which is an enum you can static if on 54 55 56 // I might recover this gtk thing but i don't like gtk 57 // dmdi webview -version=linux_gtk -version=Demo 58 59 // the setup link for Microsoft: 60 // https://go.microsoft.com/fwlink/p/?LinkId=2124703 61 62 63 version(Windows) { 64 import arsd.simpledisplay; 65 import arsd.com; 66 import core.atomic; 67 68 //import std.stdio; 69 70 private template InvokerArgFor(T, Context) { 71 alias invoker = typeof(&T.init.Invoke); 72 static if(is(invoker fntype == delegate)) { 73 static if(is(fntype Params == __parameters)) 74 alias InvokerArgFor = HRESULT function(Params, Context); 75 else 76 static assert(0); 77 } 78 } 79 80 T callback(T, Context)(InvokerArgFor!(T, Context) dg, Context ctx) { 81 return new class(dg, ctx) T { 82 extern(Windows): 83 84 static if(is(typeof(T.init.Invoke) R == return)) 85 static if(is(typeof(T.init.Invoke) P == __parameters)) 86 override R Invoke(P _args_) { 87 return dgMember(_args_, ctxMember); 88 } 89 90 InvokerArgFor!(T, Context) dgMember; 91 Context ctxMember; 92 93 this(typeof(dgMember) dg_, Context ctx_) { 94 this.dgMember = dg_; 95 this.ctxMember = ctx_; 96 AddRef(); 97 } 98 99 override HRESULT QueryInterface(const (IID)*riid, LPVOID *ppv) { 100 if (IID_IUnknown == *riid) { 101 *ppv = cast(void*) cast(IUnknown) this; 102 } 103 else if (T.iid == *riid) { 104 *ppv = cast(void*) cast(T) this; 105 } 106 else { 107 *ppv = null; 108 return E_NOINTERFACE; 109 } 110 111 AddRef(); 112 return NOERROR; 113 } 114 115 shared LONG count = 0; 116 ULONG AddRef() { 117 auto cnt = atomicOp!"+="(count, 1); 118 if(cnt == 1) { 119 import core.memory; 120 GC.addRoot(cast(void*) this); 121 } 122 return cnt; 123 } 124 ULONG Release() { 125 auto cnt = atomicOp!"-="(count, 1); 126 if(cnt == 0) { 127 import core.memory; 128 GC.removeRoot(cast(void*) this); 129 } 130 return cnt; 131 } 132 }; 133 } 134 135 enum activeEngine = WebviewEngine.wv2; 136 137 struct RC(T) { 138 private T object; 139 this(T t, bool addRef = true) { 140 object = t; 141 if(addRef && object) 142 object.AddRef(); 143 } 144 this(this) { 145 if(object is null) return; 146 object.AddRef(); 147 } 148 ~this() { 149 if(object is null) return; 150 object.Release(); 151 object = null; 152 } 153 154 RC!I queryInterface(I)() { 155 I i; 156 auto err = object.QueryInterface(&I.iid, cast(void**) &i); 157 if(err != S_OK) 158 return RC!I(null, false); 159 else 160 return RC!I(i, false); // QueryInterface already calls AddRef 161 } 162 163 bool opCast(T:bool)() nothrow { 164 return object !is null; 165 } 166 167 void opAssign(T obj) { 168 obj.AddRef(); 169 if(object) 170 object.Release(); 171 this.object = obj; 172 } 173 174 T raw() { return object; } 175 176 T returnable() { 177 if(object is null) return null; 178 return object; 179 } 180 181 T passable() { 182 if(object is null) return null; 183 object.AddRef(); 184 return object; 185 } 186 187 static foreach(memberName; __traits(allMembers /*derivedMembers*/, T)) { 188 mixin ForwardMethod!(memberName); 189 } 190 } 191 192 /+ 193 // does NOT add ref, use after you queryInterface 194 RC!T makeRcd(T)(T t) { 195 return RC!T(t, false); 196 } 197 +/ 198 199 extern(Windows) 200 alias StringMethod = int delegate(wchar**); 201 202 string toGC(scope StringMethod dg) { 203 wchar* t; 204 auto res = dg(&t); 205 if(res != S_OK) 206 throw new ComException(res); 207 208 auto ot = t; 209 210 string s; 211 212 while(*t) { 213 import std.utf; 214 char[4] buffer; 215 wchar item = *t; 216 t++; 217 if(item >= 0xD800 && item <= 0xDFFF) { 218 wchar second = *t; 219 t++; 220 wchar low, high; 221 if(item >= 0xD800 && item <= 0xDBFF) { 222 high = item; 223 low = second; 224 } else { 225 high = second; 226 low = item; 227 } 228 229 if( 230 high >= 0xD800 && high <= 0xDBFF 231 && 232 low >= 0xDC00 && low <= 0xDCFF 233 ) { 234 dchar d = (high - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000; 235 236 s ~= buffer[0 .. encode(buffer, d)]; 237 } else { 238 // we could probably throw something tbh 239 } 240 } else { 241 s ~= buffer[0 .. encode(buffer, item)]; 242 } 243 } 244 245 auto ret = s; 246 247 CoTaskMemFree(ot); 248 249 return ret; 250 } 251 252 class ComException : Exception { 253 HRESULT errorCode; 254 this(HRESULT errorCode) { 255 import std.format; 256 super(format("HRESULT: 0x%08x", errorCode)); 257 // FIXME: call FormatMessage 258 } 259 } 260 261 mixin template ForwardMethod(string methodName) { 262 static if(methodName.length > 4 && methodName[0 .. 4] == "put_") { 263 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 264 private alias Type = Params[0]; 265 mixin(q{ @property void } ~ memberName[4 .. $] ~ q{(Type v) { 266 auto errorCode = __traits(getMember, object, memberName)(v); 267 if(errorCode) 268 throw new ComException(errorCode); 269 } 270 }); 271 } else 272 static if(methodName.length > 4 && methodName[0 .. 4] == "get_") { 273 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 274 private alias Type = typeof(*(Params[0].init)); 275 mixin(q{ @property Type } ~ memberName[4 .. $] ~ q{() { 276 Type response; 277 auto errorCode = __traits(getMember, object, memberName)(&response); 278 if(errorCode) 279 throw new ComException(errorCode); 280 return response; 281 } 282 }); 283 } else 284 static if(methodName.length > 4 && methodName[0 .. 4] == "add_") { 285 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 286 alias Handler = Params[0]; 287 mixin(q{ EventRegistrationToken } ~ memberName ~ q{ (Context)(InvokerArgFor!(Handler, Context) handler, Context ctx) { 288 EventRegistrationToken token; 289 __traits(getMember, object, memberName)(callback!(Handler, Context)(handler, ctx), &token); 290 return token; 291 }}); 292 } else 293 static if(methodName.length > 7 && methodName[0 .. 4] == "remove_") { 294 mixin(q{ void } ~ memberName ~ q{ (EventRegistrationToken token) { 295 __traits(getMember, object, memberName)(token); 296 }}); 297 } else { 298 // I could do the return value things by looking for these comments: 299 // /+[out]+/ but be warned it is possible or a thing to have multiple out params (only one such function in here though i think) 300 // /+[out, retval]+/ 301 // a find/replace could make them a UDA or something. 302 303 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 304 static if(is(typeof(__traits(getMember, T, memberName)) Return == return)) 305 306 mixin(q{ Return } ~ memberName ~ q{ (Params p) { 307 // FIXME: check the return value and throw 308 return __traits(getMember, object, memberName)(p); 309 } 310 }); 311 312 } 313 } 314 315 struct Wv2App { 316 static bool active = false; 317 318 static HRESULT code; 319 static bool initialized = false; 320 static RC!ICoreWebView2Environment webview_env; 321 322 @disable this(this); 323 324 static void delegate(RC!ICoreWebView2Environment)[] pending; 325 this(void delegate(RC!ICoreWebView2Environment) withEnvironment) { 326 if(withEnvironment) 327 pending ~= withEnvironment; 328 329 import core.sys.windows.com; 330 CoInitializeEx(null, COINIT_APARTMENTTHREADED); 331 332 active = true; 333 334 auto lib = LoadLibraryW("WebView2Loader.dll"w.ptr); 335 typeof(&CreateCoreWebView2EnvironmentWithOptions) func; 336 337 if(lib is null) 338 throw new Exception("WebView2Loader.dll unable to load. The developer should bundle this with the application exe. It is found with the WebView2 SDK from nuget."); 339 func = cast(typeof(func)) GetProcAddress(lib, CreateCoreWebView2EnvironmentWithOptions.mangleof); 340 if(func is null) 341 throw new Exception("CreateCoreWebView2EnvironmentWithOptions failed from WebView2Loader..."); 342 343 auto result = func(null, null, null, 344 callback!(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler, Wv2App*)( 345 function(error, env, this_) { 346 this_.initialized = true; 347 this_.code = error; 348 349 if(error) 350 return error; 351 352 this_.webview_env = env; 353 354 auto len = pending.length; 355 foreach(item; this_.pending) { 356 item(this_.webview_env); 357 } 358 359 this_.pending = this_.pending[len .. $]; 360 361 return S_OK; 362 } 363 , &this) 364 ); 365 366 if(result != S_OK) { 367 if(MessageBox(null, "The WebView2 runtime is not installed. Would you like to install it now? This will open a browser to download a file. After it installs, you can try running this program again.", "Missing file", MB_YESNO) == IDYES) { 368 import std.process; 369 browse("https://go.microsoft.com/fwlink/p/?LinkId=2124703"); 370 } 371 throw new ComException(result); 372 } 373 } 374 375 @disable this(); 376 377 ~this() { 378 active = false; 379 } 380 381 static void useEnvironment(void delegate(RC!ICoreWebView2Environment) withEnvironment) { 382 assert(active); 383 assert(withEnvironment !is null); 384 if(initialized) { 385 if(code) 386 throw new ComException(code); 387 withEnvironment(webview_env); 388 } else 389 pending ~= withEnvironment; 390 } 391 } 392 } 393 394 395 396 /+ 397 interface WebView { 398 void refresh(); 399 void back(); 400 void forward(); 401 void stop(); 402 403 void navigate(string url); 404 405 // the url and line are for error reporting purposes 406 void executeJavascript(string code, string url = null, int line = 0); 407 408 void showDevTools(); 409 410 // these are get/set properties that you can subscribe to with some system 411 412 mixin Observable!(string, "title"); 413 mixin Observable!(string, "url"); 414 mixin Observable!(string, "status"); 415 mixin Observable!(int, "loadingProgress"); 416 } 417 +/ 418 419 420 version(linux) { 421 version(linux_gtk) {} else 422 version=cef; 423 } 424 425 426 version(cef) { 427 import arsd.simpledisplay; 428 429 //pragma(lib, "cef"); 430 431 class BrowserProcessHandler : CEF!cef_browser_process_handler_t { 432 this(void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch) { 433 this.onAlreadyRunningAppRelaunch = onAlreadyRunningAppRelaunch; 434 } 435 436 private void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch; 437 438 override void on_context_initialized() { /* sdpyPrintDebugString("on_context_initialized"); */ } 439 440 override void on_before_child_process_launch(RC!cef_command_line_t) { } 441 override void on_schedule_message_pump_work(long delayMs) { } 442 override cef_client_t* get_default_client() { return null; } 443 override void on_register_custom_preferences(cef_preferences_type_t, cef_preference_registrar_t*) {} 444 445 override int on_already_running_app_relaunch(RC!(cef_command_line_t) command_line, const(cef_string_utf16_t)* current_directory) nothrow { 446 if(onAlreadyRunningAppRelaunch) { 447 448 string[] argList; 449 450 if(command_line.has_arguments()) { 451 cef_string_list_t thing = libcef.string_list_alloc(); 452 453 command_line.get_arguments(thing); 454 455 auto count = libcef.string_list_size(thing); 456 foreach(i; 0 .. count) { 457 cef_string_utf16_t v; 458 459 libcef.string_list_value(thing, i, &v); 460 461 argList ~= toGC(&v); 462 } 463 libcef.string_list_free(thing); 464 } 465 466 try { 467 onAlreadyRunningAppRelaunch( 468 toGC(current_directory), 469 argList 470 ); 471 } catch(Exception e) { 472 473 } 474 475 return 1; 476 } else { 477 return 0; 478 } 479 } 480 override cef_request_context_handler_t* get_default_request_context_handler() nothrow { 481 return null; 482 } 483 } 484 485 486 int cefProcessHelper(CEF!cef_app_t app, cef_main_args_t* main_args) { 487 import core.runtime; 488 import core.stdc.stdlib; 489 490 app.add_ref(); 491 492 if(libcef.loadDynamicLibrary()) { 493 import std.stdio; 494 //writeln("cef process begin"); 495 int code = libcef.execute_process(main_args, app.passable, null); 496 //writeln("cef process ", Runtime.args, " ", code); 497 if(code >= 0) { 498 //writeln("exiting process"); 499 exit(code); 500 } 501 return code; 502 } 503 return -1; 504 } 505 506 public struct CefApp { 507 static bool active() { 508 return count > 0; 509 } 510 511 private __gshared int count = 0; 512 513 @disable this(this); 514 @disable new(); 515 this(void delegate(cef_settings_t* settings) setSettings, void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch) { 516 517 if(!libcef.loadDynamicLibrary()) 518 throw new Exception("failed to load cef dll"); 519 520 count++; 521 522 import core.runtime; 523 import core.stdc.stdlib; 524 525 cef_main_args_t main_args; 526 version(linux) { 527 main_args.argc = Runtime.cArgs.argc; 528 main_args.argv = Runtime.cArgs.argv; 529 } else version(Windows) { 530 main_args.instance = GetModuleHandle(null); 531 } 532 533 cef_settings_t settings; 534 settings.size = cef_settings_t.sizeof; 535 settings.log_severity = cef_log_severity_t.LOGSEVERITY_DISABLE; 536 //settings.log_severity = cef_log_severity_t.LOGSEVERITY_VERBOSE; 537 //settings.log_severity = cef_log_severity_t.LOGSEVERITY_INFO; // Show only warnings/errors 538 settings.multi_threaded_message_loop = 1; 539 settings.no_sandbox = 1; 540 541 version(linux) 542 settings.locales_dir_path = cef_string_t("/opt/cef/Resources/locales"); 543 544 if(setSettings !is null) 545 setSettings(&settings); 546 547 548 auto app = new class(onAlreadyRunningAppRelaunch) CEF!cef_app_t { 549 BrowserProcessHandler bph; 550 this(void delegate(string dir, string[] args) onAlreadyRunningAppRelaunch) { 551 bph = new BrowserProcessHandler(onAlreadyRunningAppRelaunch); 552 } 553 override void on_before_command_line_processing(const(cef_string_t)*, RC!cef_command_line_t) {} 554 555 override cef_resource_bundle_handler_t* get_resource_bundle_handler() { 556 return null; 557 } 558 override cef_browser_process_handler_t* get_browser_process_handler() { 559 //sdpyPrintDebugString("bph returned"); 560 return bph.returnable; 561 } 562 override cef_render_process_handler_t* get_render_process_handler() { 563 return null; 564 } 565 override void on_register_custom_schemes(cef_scheme_registrar_t*) { 566 567 } 568 }; 569 570 cefProcessHelper(app, &main_args); 571 572 if(!libcef.initialize(&main_args, &settings, app.passable, null)) { 573 throw new Exception("cef_initialize failed"); 574 } 575 } 576 577 ~this() { 578 count--; 579 // this call hangs and idk why. 580 // FIXME 581 //libcef.shutdown(); 582 } 583 } 584 585 586 version(Demo) 587 void main() { 588 auto app = CefApp(null); 589 590 auto window = new SimpleWindow(640, 480, "D Browser", Resizability.allowResizing); 591 flushGui; 592 593 cef_window_info_t window_info; 594 /* 595 window_info.x = 100; 596 window_info.y = 100; 597 window_info.width = 300; 598 window_info.height = 300; 599 */ 600 //window_info.parent_window = window.nativeWindowHandle; 601 602 cef_string_t cef_url = cef_string_t("http://dpldocs.info/");//"http://youtube.com/"w); 603 604 //string url = "http://arsdnet.net/"; 605 //cef_string_utf8_to_utf16(url.ptr, url.length, &cef_url); 606 607 cef_browser_settings_t browser_settings; 608 browser_settings.size = cef_browser_settings_t.sizeof; 609 610 auto client = new MyCefClient(); 611 612 auto got = libcef.browser_host_create_browser(&window_info, client.passable, &cef_url, &browser_settings, null, null); // or _sync 613 614 window.eventLoop(0); 615 } 616 617 618 /++ 619 This gives access to the CEF functions. If you get a linker error for using an undefined function, 620 it is probably because you did NOT go through this when dynamically loading. 621 622 (...similarly, if you get a segfault, it is probably because you DID go through this when static binding.) 623 +/ 624 struct libcef { 625 static __gshared: 626 627 bool isLoaded; 628 bool loadAttempted; 629 void* libHandle; 630 631 /// Make sure you call this only from one thread, probably at process startup. It caches internally and returns true if the load was successful. 632 bool loadDynamicLibrary() { 633 if(loadAttempted) 634 return isLoaded; 635 636 loadAttempted = true; 637 638 version(linux) { 639 import core.sys.posix.dlfcn; 640 libHandle = dlopen("libcef.so", RTLD_NOW); 641 642 static void* loadsym(const char* name) { 643 return dlsym(libHandle, name); 644 } 645 } else version(Windows) { 646 import core.sys.windows.windows; 647 libHandle = LoadLibrary("libcef.dll"); 648 649 static void* loadsym(const char* name) { 650 return GetProcAddress(libHandle, name); 651 } 652 } 653 654 //import std.stdio; 655 if(libHandle is null) { 656 // import std.stdio; writeln("libhandle null"); 657 import core.stdc.stdio; printf("%s\n", dlerror()); 658 // import core.stdc.errno; writeln(errno); 659 return false; 660 } 661 foreach(memberName; __traits(allMembers, libcef)[4 .. $]) { // cutting off everything until the actual static foreach below; this trims off isLoaded to loadDynamicLibrary 662 alias mem = __traits(getMember, libcef, memberName); 663 mem = cast(typeof(mem)) loadsym("cef_" ~ memberName); 664 if(mem is null) { 665 import std.stdio; writeln(memberName); throw new Exception("cef_" ~ memberName ~ " failed to load"); 666 return false; 667 } 668 } 669 670 671 libcef.api_hash(CEF_API_VERSION, 0); 672 673 /+ 674 import core.stdc.string; 675 if(strcmp(libcef.api_hash(CEF_API_VERSION, 0), CEF_API_HASH_PLATFORM) != 0) 676 throw new Exception("libcef versions not matching bindings"); 677 +/ 678 679 isLoaded = true; 680 return true; 681 } 682 683 static foreach(memberName; __traits(allMembers, arsd.webview)) 684 static if(is(typeof(__traits(getMember, arsd.webview, memberName)) == function)) 685 static if(memberName.length > 4 && memberName[0 .. 4] == "cef_") { 686 mixin(q{ typeof(&__traits(getMember, arsd.webview, memberName)) } ~ memberName[4 .. $] ~ ";"); // = &" ~ memberName ~ ";"); 687 } 688 } 689 690 } 691 692 version(linux_gtk) 693 version(Demo) 694 void main() { 695 auto wv = new WebView(true, null); 696 wv.navigate("http://dpldocs.info/"); 697 wv.setTitle("omg a D webview"); 698 wv.setSize(500, 500, true); 699 wv.eval("console.log('just testing');"); 700 wv.run(); 701 } 702 703 version(linux_gtk) 704 enum activeEngine = WebviewEngine.webkit_gtk; 705 706 /++ 707 708 +/ 709 version(linux_gtk) 710 class WebView : browser_engine { 711 712 /++ 713 Creates a new webview instance. If dbg is non-zero - developer tools will 714 be enabled (if the platform supports them). Window parameter can be a 715 pointer to the native window handle. If it's non-null - then child WebView 716 is embedded into the given parent window. Otherwise a new window is created. 717 Depending on the platform, a GtkWindow, NSWindow or HWND pointer can be 718 passed here. 719 +/ 720 this(bool dbg, void* window) { 721 super(&on_message, dbg, window); 722 } 723 724 extern(C) 725 static void on_message(const char*) {} 726 727 /// Destroys a webview and closes the native window. 728 void destroy() { 729 730 } 731 732 /// Runs the main loop until it's terminated. After this function exits - you 733 /// must destroy the webview. 734 override void run() { super.run(); } 735 736 /// Stops the main loop. It is safe to call this function from another other 737 /// background thread. 738 override void terminate() { super.terminate(); } 739 740 /+ 741 /// Posts a function to be executed on the main thread. You normally do not need 742 /// to call this function, unless you want to tweak the native window. 743 void dispatch(void function(WebView w, void *arg) fn, void *arg) {} 744 +/ 745 746 /// Returns a native window handle pointer. When using GTK backend the pointer 747 /// is GtkWindow pointer, when using Cocoa backend the pointer is NSWindow 748 /// pointer, when using Win32 backend the pointer is HWND pointer. 749 void* getWindow() { return m_window; } 750 751 /// Updates the title of the native window. Must be called from the UI thread. 752 override void setTitle(const char *title) { super.setTitle(title); } 753 754 /// Navigates webview to the given URL. URL may be a data URI. 755 override void navigate(const char *url) { super.navigate(url); } 756 757 /// Injects JavaScript code at the initialization of the new page. Every time 758 /// the webview will open a the new page - this initialization code will be 759 /// executed. It is guaranteed that code is executed before window.onload. 760 override void init(const char *js) { super.init(js); } 761 762 /// Evaluates arbitrary JavaScript code. Evaluation happens asynchronously, also 763 /// the result of the expression is ignored. Use RPC bindings if you want to 764 /// receive notifications about the results of the evaluation. 765 override void eval(const char *js) { super.eval(js); } 766 767 /// Binds a native C callback so that it will appear under the given name as a 768 /// global JavaScript function. Internally it uses webview_init(). Callback 769 /// receives a request string and a user-provided argument pointer. Request 770 /// string is a JSON array of all the arguments passed to the JavaScript 771 /// function. 772 void bind(const char *name, void function(const char *, void *) fn, void *arg) {} 773 774 /// Allows to return a value from the native binding. Original request pointer 775 /// must be provided to help internal RPC engine match requests with responses. 776 /// If status is zero - result is expected to be a valid JSON result value. 777 /// If status is not zero - result is an error JSON object. 778 void webview_return(const char *req, int status, const char *result) {} 779 780 /* 781 void on_message(const char *msg) { 782 auto seq = json_parse(msg, "seq", 0); 783 auto name = json_parse(msg, "name", 0); 784 auto args = json_parse(msg, "args", 0); 785 auto fn = bindings[name]; 786 if (fn == null) { 787 return; 788 } 789 std::async(std::launch::async, [=]() { 790 auto result = (*fn)(args); 791 dispatch([=]() { 792 eval(("var b = window['" + name + "'];b['callbacks'][" + seq + "](" + 793 result + ");b['callbacks'][" + seq + 794 "] = undefined;b['errors'][" + seq + "] = undefined;") 795 .c_str()); 796 }); 797 }); 798 } 799 std::map<std::string, binding_t *> bindings; 800 801 alias binding_t = std::function<std::string(std::string)>; 802 803 void bind(const char *name, binding_t f) { 804 auto js = "(function() { var name = '" + std::string(name) + "';" + R"( 805 window[name] = function() { 806 var me = window[name]; 807 var errors = me['errors']; 808 var callbacks = me['callbacks']; 809 if (!callbacks) { 810 callbacks = {}; 811 me['callbacks'] = callbacks; 812 } 813 if (!errors) { 814 errors = {}; 815 me['errors'] = errors; 816 } 817 var seq = (me['lastSeq'] || 0) + 1; 818 me['lastSeq'] = seq; 819 var promise = new Promise(function(resolve, reject) { 820 callbacks[seq] = resolve; 821 errors[seq] = reject; 822 }); 823 window.external.invoke(JSON.stringify({ 824 name: name, 825 seq:seq, 826 args: Array.prototype.slice.call(arguments), 827 })); 828 return promise; 829 } 830 })())"; 831 init(js.c_str()); 832 bindings[name] = new binding_t(f); 833 } 834 835 */ 836 } 837 838 private extern(C) { 839 alias dispatch_fn_t = void function(); 840 alias msg_cb_t = void function(const char *msg); 841 } 842 843 version(linux_gtk) { 844 845 846 /* Original https://github.com/zserge/webview notice below: 847 * MIT License 848 * 849 * Copyright (c) 2017 Serge Zaitsev 850 * 851 * Permission is hereby granted, free of charge, to any person obtaining a copy 852 * of this software and associated documentation files (the "Software"), to deal 853 * in the Software without restriction, including without limitation the rights 854 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 855 * copies of the Software, and to permit persons to whom the Software is 856 * furnished to do so, subject to the following conditions: 857 * 858 * The above copyright notice and this permission notice shall be included in 859 * all copies or substantial portions of the Software. 860 * 861 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 862 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 863 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 864 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 865 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 866 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 867 * SOFTWARE. 868 */ 869 870 /* 871 Port to D by Adam D. Ruppe, November 30, 2019 872 */ 873 874 875 pragma(lib, "gtk-3"); 876 pragma(lib, "glib-2.0"); 877 pragma(lib, "gobject-2.0"); 878 pragma(lib, "webkit2gtk-4.0"); 879 pragma(lib, "javascriptcoregtk-4.0"); 880 881 private extern(C) { 882 import core.stdc.config; 883 alias GtkWidget = void; 884 enum GtkWindowType { 885 GTK_WINDOW_TOPLEVEL = 0 886 } 887 bool gtk_init_check(int*, char***); 888 GtkWidget* gtk_window_new(GtkWindowType); 889 c_ulong g_signal_connect_data(void*, const char*, void* /* function pointer!!! */, void*, void*, int); 890 GtkWidget* webkit_web_view_new(); 891 alias WebKitUserContentManager = void; 892 WebKitUserContentManager* webkit_web_view_get_user_content_manager(GtkWidget*); 893 894 void gtk_container_add(GtkWidget*, GtkWidget*); 895 void gtk_widget_grab_focus(GtkWidget*); 896 void gtk_widget_show_all(GtkWidget*); 897 void gtk_main(); 898 void gtk_main_quit(); 899 void webkit_web_view_load_uri(GtkWidget*, const char*); 900 alias WebKitSettings = void; 901 WebKitSettings* webkit_web_view_get_settings(GtkWidget*); 902 void webkit_settings_set_enable_write_console_messages_to_stdout(WebKitSettings*, bool); 903 void webkit_settings_set_enable_developer_extras(WebKitSettings*, bool); 904 void webkit_user_content_manager_register_script_message_handler(WebKitUserContentManager*, const char*); 905 alias JSCValue = void; 906 alias WebKitJavascriptResult = void; 907 JSCValue* webkit_javascript_result_get_js_value(WebKitJavascriptResult*); 908 char* jsc_value_to_string(JSCValue*); 909 void g_free(void*); 910 void webkit_web_view_run_javascript(GtkWidget*, const char*, void*, void*, void*); 911 alias WebKitUserScript = void; 912 void webkit_user_content_manager_add_script(WebKitUserContentManager*, WebKitUserScript*); 913 WebKitUserScript* webkit_user_script_new(const char*, WebKitUserContentInjectedFrames, WebKitUserScriptInjectionTime, const char*, const char*); 914 enum WebKitUserContentInjectedFrames { 915 WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES, 916 WEBKIT_USER_CONTENT_INJECT_TOP_FRAME 917 } 918 enum WebKitUserScriptInjectionTime { 919 WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, 920 WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END 921 } 922 void gtk_window_set_title(GtkWidget*, const char*); 923 924 void gtk_window_set_resizable(GtkWidget*, bool); 925 void gtk_window_set_default_size(GtkWidget*, int, int); 926 void gtk_widget_set_size_request(GtkWidget*, int, int); 927 } 928 929 private class browser_engine { 930 931 static extern(C) 932 void ondestroy (GtkWidget *w, void* arg) { 933 (cast(browser_engine) arg).terminate(); 934 } 935 936 static extern(C) 937 void smr(WebKitUserContentManager* m, WebKitJavascriptResult* r, void* arg) { 938 auto w = cast(browser_engine) arg; 939 JSCValue *value = webkit_javascript_result_get_js_value(r); 940 auto s = jsc_value_to_string(value); 941 w.m_cb(s); 942 g_free(s); 943 } 944 945 this(msg_cb_t cb, bool dbg, void* window) { 946 m_cb = cb; 947 948 gtk_init_check(null, null); 949 m_window = cast(GtkWidget*) window; 950 if (m_window == null) 951 m_window = gtk_window_new(GtkWindowType.GTK_WINDOW_TOPLEVEL); 952 953 g_signal_connect_data(m_window, "destroy", &ondestroy, cast(void*) this, null, 0); 954 955 m_webview = webkit_web_view_new(); 956 WebKitUserContentManager* manager = webkit_web_view_get_user_content_manager(m_webview); 957 958 g_signal_connect_data(manager, "script-message-received::external", &smr, cast(void*) this, null, 0); 959 webkit_user_content_manager_register_script_message_handler(manager, "external"); 960 init("window.external={invoke:function(s){window.webkit.messageHandlers.external.postMessage(s);}}"); 961 962 gtk_container_add(m_window, m_webview); 963 gtk_widget_grab_focus(m_webview); 964 965 if (dbg) { 966 WebKitSettings *settings = webkit_web_view_get_settings(m_webview); 967 webkit_settings_set_enable_write_console_messages_to_stdout(settings, true); 968 webkit_settings_set_enable_developer_extras(settings, true); 969 } 970 971 gtk_widget_show_all(m_window); 972 } 973 void run() { gtk_main(); } 974 void terminate() { gtk_main_quit(); } 975 976 void navigate(const char *url) { 977 webkit_web_view_load_uri(m_webview, url); 978 } 979 980 void setTitle(const char* title) { 981 gtk_window_set_title(m_window, title); 982 } 983 984 /+ 985 void dispatch(std::function<void()> f) { 986 g_idle_add_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)([](void *f) -> int { 987 (*static_cast<dispatch_fn_t *>(f))(); 988 return G_SOURCE_REMOVE; 989 }), 990 new std::function<void()>(f), 991 [](void *f) { delete static_cast<dispatch_fn_t *>(f); }); 992 } 993 +/ 994 995 void setSize(int width, int height, bool resizable) { 996 gtk_window_set_resizable(m_window, resizable); 997 if (resizable) { 998 gtk_window_set_default_size(m_window, width, height); 999 } 1000 gtk_widget_set_size_request(m_window, width, height); 1001 } 1002 1003 void init(const char *js) { 1004 WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager(m_webview); 1005 webkit_user_content_manager_add_script( 1006 manager, webkit_user_script_new( 1007 js, WebKitUserContentInjectedFrames.WEBKIT_USER_CONTENT_INJECT_TOP_FRAME, 1008 WebKitUserScriptInjectionTime.WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, null, null)); 1009 } 1010 1011 void eval(const char *js) { 1012 webkit_web_view_run_javascript(m_webview, js, null, null, null); 1013 } 1014 1015 protected: 1016 GtkWidget* m_window; 1017 GtkWidget* m_webview; 1018 msg_cb_t m_cb; 1019 } 1020 } else version(WEBVIEW_COCOA) { 1021 /+ 1022 1023 // 1024 // ==================================================================== 1025 // 1026 // This implementation uses Cocoa WKWebView backend on macOS. It is 1027 // written using ObjC runtime and uses WKWebView class as a browser runtime. 1028 // You should pass "-framework Webkit" flag to the compiler. 1029 // 1030 // ==================================================================== 1031 // 1032 1033 #define OBJC_OLD_DISPATCH_PROTOTYPES 1 1034 #include <CoreGraphics/CoreGraphics.h> 1035 #include <objc/objc-runtime.h> 1036 1037 #define NSBackingStoreBuffered 2 1038 1039 #define NSWindowStyleMaskResizable 8 1040 #define NSWindowStyleMaskMiniaturizable 4 1041 #define NSWindowStyleMaskTitled 1 1042 #define NSWindowStyleMaskClosable 2 1043 1044 #define NSApplicationActivationPolicyRegular 0 1045 1046 #define WKUserScriptInjectionTimeAtDocumentStart 0 1047 1048 id operator"" _cls(const char *s, std::size_t sz) { 1049 return (id)objc_getClass(s); 1050 } 1051 SEL operator"" _sel(const char *s, std::size_t sz) { 1052 return sel_registerName(s); 1053 } 1054 id operator"" _str(const char *s, std::size_t sz) { 1055 return objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, s); 1056 } 1057 1058 class browser_engine { 1059 public: 1060 browser_engine(msg_cb_t cb, bool dbg, void *window) : m_cb(cb) { 1061 // Application 1062 id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel); 1063 objc_msgSend(app, "setActivationPolicy:"_sel, 1064 NSApplicationActivationPolicyRegular); 1065 1066 // Delegate 1067 auto cls = objc_allocateClassPair((Class) "NSObject"_cls, "AppDelegate", 0); 1068 class_addProtocol(cls, objc_getProtocol("NSApplicationDelegate")); 1069 class_addProtocol(cls, objc_getProtocol("WKScriptMessageHandler")); 1070 class_addMethod( 1071 cls, "applicationShouldTerminateAfterLastWindowClosed:"_sel, 1072 (IMP)(+[](id self, SEL cmd, id notification) -> BOOL { return 1; }), 1073 "c@:@"); 1074 class_addMethod( 1075 cls, "userContentController:didReceiveScriptMessage:"_sel, 1076 (IMP)(+[](id self, SEL cmd, id notification, id msg) { 1077 auto w = (browser_engine *)objc_getAssociatedObject(self, "webview"); 1078 w->m_cb((const char *)objc_msgSend(objc_msgSend(msg, "body"_sel), 1079 "UTF8String"_sel)); 1080 }), 1081 "v@:@@"); 1082 objc_registerClassPair(cls); 1083 1084 auto delegate = objc_msgSend((id)cls, "new"_sel); 1085 objc_setAssociatedObject(delegate, "webview", (id)this, 1086 OBJC_ASSOCIATION_ASSIGN); 1087 objc_msgSend(app, sel_registerName("setDelegate:"), delegate); 1088 1089 // Main window 1090 if (window is null) { 1091 m_window = objc_msgSend("NSWindow"_cls, "alloc"_sel); 1092 m_window = objc_msgSend( 1093 m_window, "initWithContentRect:styleMask:backing:defer:"_sel, 1094 CGRectMake(0, 0, 0, 0), 0, NSBackingStoreBuffered, 0); 1095 setSize(480, 320, true); 1096 } else { 1097 m_window = (id)window; 1098 } 1099 1100 // Webview 1101 auto config = objc_msgSend("WKWebViewConfiguration"_cls, "new"_sel); 1102 m_manager = objc_msgSend(config, "userContentController"_sel); 1103 m_webview = objc_msgSend("WKWebView"_cls, "alloc"_sel); 1104 objc_msgSend(m_webview, "initWithFrame:configuration:"_sel, 1105 CGRectMake(0, 0, 0, 0), config); 1106 objc_msgSend(m_manager, "addScriptMessageHandler:name:"_sel, delegate, 1107 "external"_str); 1108 init(R"script( 1109 window.external = { 1110 invoke: function(s) { 1111 window.webkit.messageHandlers.external.postMessage(s); 1112 }, 1113 }; 1114 )script"); 1115 if (dbg) { 1116 objc_msgSend(objc_msgSend(config, "preferences"_sel), 1117 "setValue:forKey:"_sel, 1, "developerExtrasEnabled"_str); 1118 } 1119 objc_msgSend(m_window, "setContentView:"_sel, m_webview); 1120 objc_msgSend(m_window, "makeKeyAndOrderFront:"_sel, null); 1121 } 1122 ~browser_engine() { close(); } 1123 void terminate() { close(); objc_msgSend("NSApp"_cls, "terminate:"_sel, null); } 1124 void run() { 1125 id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel); 1126 dispatch([&]() { objc_msgSend(app, "activateIgnoringOtherApps:"_sel, 1); }); 1127 objc_msgSend(app, "run"_sel); 1128 } 1129 void dispatch(std::function<void()> f) { 1130 dispatch_async_f(dispatch_get_main_queue(), new dispatch_fn_t(f), 1131 (dispatch_function_t)([](void *arg) { 1132 auto f = static_cast<dispatch_fn_t *>(arg); 1133 (*f)(); 1134 delete f; 1135 })); 1136 } 1137 void setTitle(const char *title) { 1138 objc_msgSend( 1139 m_window, "setTitle:"_sel, 1140 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, title)); 1141 } 1142 void setSize(int width, int height, bool resizable) { 1143 auto style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | 1144 NSWindowStyleMaskMiniaturizable; 1145 if (resizable) { 1146 style = style | NSWindowStyleMaskResizable; 1147 } 1148 objc_msgSend(m_window, "setStyleMask:"_sel, style); 1149 objc_msgSend(m_window, "setFrame:display:animate:"_sel, 1150 CGRectMake(0, 0, width, height), 1, 0); 1151 } 1152 void navigate(const char *url) { 1153 auto nsurl = objc_msgSend( 1154 "NSURL"_cls, "URLWithString:"_sel, 1155 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, url)); 1156 objc_msgSend( 1157 m_webview, "loadRequest:"_sel, 1158 objc_msgSend("NSURLRequest"_cls, "requestWithURL:"_sel, nsurl)); 1159 } 1160 void init(const char *js) { 1161 objc_msgSend( 1162 m_manager, "addUserScript:"_sel, 1163 objc_msgSend( 1164 objc_msgSend("WKUserScript"_cls, "alloc"_sel), 1165 "initWithSource:injectionTime:forMainFrameOnly:"_sel, 1166 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js), 1167 WKUserScriptInjectionTimeAtDocumentStart, 1)); 1168 } 1169 void eval(const char *js) { 1170 objc_msgSend(m_webview, "evaluateJavaScript:completionHandler:"_sel, 1171 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js), 1172 null); 1173 } 1174 1175 protected: 1176 void close() { objc_msgSend(m_window, "close"_sel); } 1177 id m_window; 1178 id m_webview; 1179 id m_manager; 1180 msg_cb_t m_cb; 1181 }; 1182 1183 +/ 1184 1185 } 1186 1187 version(cef) { 1188 1189 /++ 1190 This creates a base class for a thing to help you implement the function pointers. 1191 1192 class MyApp : CEF!cef_app_t { 1193 1194 } 1195 +/ 1196 abstract class CEF(Base) { 1197 private struct Inner { 1198 Base c; 1199 CEF d_object; 1200 } 1201 private Inner inner; 1202 1203 this() nothrow { 1204 if(!__ctfe) construct(); 1205 } 1206 1207 // ONLY call this if you did a ctfe construction 1208 void construct() nothrow { 1209 assert(inner.c.base.size == 0); 1210 1211 import core.memory; 1212 GC.addRoot(cast(void*) this); 1213 inner.c.base.size = Base.sizeof;//Inner.sizeof; 1214 inner.c.base.add_ref = &c_add_ref; 1215 inner.c.base.release = &c_release; 1216 inner.c.base.has_one_ref = &c_has_one_ref; 1217 inner.c.base.has_at_least_one_ref = &c_has_at_least_one_ref; 1218 inner.d_object = this; 1219 1220 static foreach(memberName; __traits(allMembers, Base)) { 1221 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1222 __traits(getMember, inner.c, memberName) = mixin("&c_" ~ memberName); 1223 } 1224 } 1225 } 1226 1227 private static nothrow @nogc extern(System) { 1228 void c_add_ref(cef_base_ref_counted_t* self) { 1229 return ((cast(Inner*) self).d_object).add_ref(); 1230 } 1231 int c_release(cef_base_ref_counted_t* self) { 1232 return ((cast(Inner*) self).d_object).release(); 1233 } 1234 int c_has_one_ref(cef_base_ref_counted_t* self) { 1235 return ((cast(Inner*) self).d_object).has_one_ref(); 1236 } 1237 int c_has_at_least_one_ref(cef_base_ref_counted_t* self) { 1238 return ((cast(Inner*) self).d_object).has_at_least_one_ref(); 1239 } 1240 } 1241 1242 private shared(int) refcount = 1; 1243 final void add_ref() { 1244 import core.atomic; 1245 atomicOp!"+="(refcount, 1); 1246 } 1247 final int release() { 1248 import core.atomic; 1249 auto v = atomicOp!"-="(refcount, 1); 1250 if(v == 0) { 1251 import core.memory; 1252 GC.removeRoot(cast(void*) this); 1253 return 1; 1254 } 1255 return 0; 1256 } 1257 final int has_one_ref() { 1258 return (cast() refcount) == 1; 1259 } 1260 final int has_at_least_one_ref() { 1261 return (cast() refcount) >= 1; 1262 } 1263 1264 /// Call this to pass to CEF. It will add ref for you. 1265 final Base* passable() { 1266 assert(inner.c.base.size); 1267 add_ref(); 1268 return returnable(); 1269 } 1270 1271 final Base* returnable() { 1272 assert(inner.c.base.size); 1273 return &inner.c; 1274 } 1275 1276 static foreach(memberName; __traits(allMembers, Base)) { 1277 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1278 mixin AbstractMethod!(memberName); 1279 } else { 1280 mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner.c, memberName); }}); 1281 } 1282 } 1283 } 1284 1285 // you implement this in D... 1286 private mixin template AbstractMethod(string name) { 1287 alias ptr = typeof(__traits(getMember, Base, name)); 1288 static if(is(ptr Return == return)) 1289 static if(is(typeof(*ptr) Params == function)) 1290 { 1291 mixin(q{abstract nothrow Return } ~ name ~ q{(CefToD!(Params[1 .. $]) p);}); 1292 // mixin(q{abstract nothrow Return } ~ name ~ q{(Params[1 .. $] p);}); 1293 1294 mixin(q{ 1295 private static nothrow extern(System) 1296 Return c_}~name~q{(Params p) { 1297 Base* self = p[0]; // a bit of a type check here... 1298 auto dobj = (cast(Inner*) self).d_object; // ...before this cast. 1299 1300 //return __traits(getMember, dobj, name)(p[1 .. $]); 1301 mixin(() { 1302 string code = "return __traits(getMember, dobj, name)("; 1303 1304 static foreach(idx; 1 .. p.length) { 1305 if(idx > 1) 1306 code ~= ", "; 1307 code ~= "cefToD(p[" ~ idx.stringof ~ "])"; 1308 } 1309 code ~= ");"; 1310 return code; 1311 }()); 1312 } 1313 }); 1314 } 1315 else static assert(0, name ~ " params"); 1316 else static assert(0, name ~ " return"); 1317 } 1318 1319 // you call this from D... 1320 private mixin template ForwardMethod(string name) { 1321 alias ptr = typeof(__traits(getMember, Base, name)); 1322 static if(is(ptr Return == return)) 1323 static if(is(typeof(*ptr) Params == function)) 1324 { 1325 mixin(q{nothrow auto } ~ name ~ q{(Params[1 .. $] p) { 1326 Base* self = inner; // a bit of a type check here... 1327 static if(is(Return == void)) 1328 return __traits(getMember, inner, name)(self, p); 1329 else 1330 return cefToD(__traits(getMember, inner, name)(self, p)); 1331 }}); 1332 } 1333 else static assert(0, name ~ " params"); 1334 else static assert(0, name ~ " return"); 1335 } 1336 1337 1338 private alias AliasSeq(T...) = T; 1339 1340 private template CefToD(T...) { 1341 static if(T.length == 0) { 1342 alias CefToD = T; 1343 } else static if(T.length == 1) { 1344 static if(is(typeof(T[0].base) == cef_base_ref_counted_t)) { 1345 alias CefToD = RC!(typeof(*T[0])); 1346 /+ 1347 static if(is(T[0] == I*, I)) { 1348 alias CefToD = CEF!(I); 1349 } else static assert(0, T[0]); 1350 +/ 1351 } else 1352 alias CefToD = T[0]; 1353 } else { 1354 alias CefToD = AliasSeq!(CefToD!(T[0]), CefToD!(T[1..$])); 1355 1356 } 1357 } 1358 1359 enum activeEngine = WebviewEngine.cef; 1360 1361 struct RC(Base) { 1362 private Base* inner; 1363 1364 this(Base* t) nothrow { 1365 inner = t; 1366 // assuming the refcount is already set here 1367 } 1368 this(this) nothrow { 1369 if(inner is null) return; 1370 inner.base.add_ref(&inner.base); 1371 } 1372 ~this() nothrow { 1373 if(inner is null) return; 1374 inner.base.release(&inner.base); 1375 inner = null; 1376 //sdpyPrintDebugString("omg release"); 1377 } 1378 bool opCast(T:bool)() nothrow { 1379 return inner !is null; 1380 } 1381 1382 Base* getRawPointer() nothrow { 1383 return inner; 1384 } 1385 1386 Base* passable() nothrow { 1387 if(inner is null) 1388 return inner; 1389 1390 inner.base.add_ref(&inner.base); 1391 return inner; 1392 } 1393 1394 static foreach(memberName; __traits(allMembers, Base)) { 1395 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1396 mixin ForwardMethod!(memberName); 1397 } else { 1398 mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner, memberName); }}); 1399 } 1400 } 1401 } 1402 1403 auto cefToD(T)(T t) { 1404 static if(is(typeof(T.base) == cef_base_ref_counted_t)) { 1405 return RC!(typeof(*T))(t); 1406 } else { 1407 return t; 1408 } 1409 } 1410 1411 1412 string toGC(const cef_string_utf16_t str) nothrow { 1413 if(str.str is null) 1414 return null; 1415 1416 string s; 1417 s.reserve(str.length); 1418 1419 try 1420 foreach(char ch; str.str[0 .. str.length]) 1421 s ~= ch; 1422 catch(Exception e) {} 1423 return s; 1424 } 1425 1426 string toGC(const cef_string_utf16_t* str) nothrow { 1427 if(str is null) 1428 return null; 1429 return toGC(*str); 1430 } 1431 1432 string toGCAndFree(const cef_string_userfree_t str) nothrow { 1433 if(str is null) 1434 return null; 1435 1436 string s = toGC(str); 1437 libcef.string_userfree_utf16_free(str); 1438 //str = null; 1439 return s; 1440 } 1441 1442 // bindings follow, first some hand-written ones for Linux, then some machine translated things. More comments about the machine translation when it comes. 1443 1444 version(linux) 1445 struct cef_main_args_t { 1446 int argc; 1447 char** argv; 1448 } 1449 version(Windows) 1450 struct cef_main_args_t { 1451 HINSTANCE instance; 1452 } 1453 1454 // 0 - CEF_VERSION_MAJOR 1455 // 1 - CEF_VERSION_MINOR 1456 // 2 - CEF_VERSION_PATCH 1457 // 3 - CEF_COMMIT_NUMBER 1458 // 4 - CHROME_VERSION_MAJOR 1459 // 5 - CHROME_VERSION_MINOR 1460 // 6 - CHROME_VERSION_BUILD 1461 // 7 - CHROME_VERSION_PATCH 1462 1463 extern(C) nothrow 1464 int cef_string_utf8_to_utf16(const char* src, size_t src_len, cef_string_utf16_t* output); 1465 1466 struct cef_string_utf8_t { 1467 char* str; 1468 size_t length; 1469 void* dtor;// void (*dtor)(char* str); 1470 } 1471 1472 struct cef_basetime_t { 1473 long val; 1474 } 1475 1476 1477 struct cef_string_utf16_t { 1478 char16* str; 1479 size_t length; 1480 void* dtor; // voiod (*dtor)(char16* str); 1481 1482 this(wstring s) nothrow { 1483 this.str = cast(char16*) s.ptr; 1484 this.length = s.length; 1485 } 1486 1487 this(string s) nothrow { 1488 libcef.string_utf8_to_utf16(s.ptr, s.length, &this); 1489 } 1490 } 1491 1492 alias cef_string_t = cef_string_utf16_t; 1493 alias cef_window_handle_t = NativeWindowHandle; 1494 version(Windows) 1495 alias cef_cursor_handle_t = HCURSOR; 1496 else 1497 alias cef_cursor_handle_t = XID; 1498 1499 struct cef_time_t { 1500 int year; // Four or five digit year "2007" (1601 to 30827 on 1501 // Windows, 1970 to 2038 on 32-bit POSIX) 1502 int month; // 1-based month (values 1 = January, etc.) 1503 int day_of_week; // 0-based day of week (0 = Sunday, etc.) 1504 int day_of_month; // 1-based day of month (1-31) 1505 int hour; // Hour within the current day (0-23) 1506 int minute; // Minute within the current hour (0-59) 1507 int second; // Second within the current minute (0-59 plus leap 1508 // seconds which may take it up to 60). 1509 int millisecond; // Milliseconds within the current second (0-999) 1510 } 1511 1512 version(linux) 1513 struct cef_window_info_t { 1514 1515 size_t size; 1516 1517 cef_string_t window_name; 1518 1519 cef_rect_t bounds; 1520 1521 cef_window_handle_t parent_window; 1522 1523 int windowless_rendering_enabled; 1524 1525 int shared_texture_enabled; 1526 1527 int external_begin_frame_enabled; 1528 1529 cef_window_handle_t window; 1530 cef_runtime_style_t runtime_style; 1531 } 1532 1533 version(Windows) 1534 struct cef_window_info_t { 1535 DWORD ex_style; 1536 cef_string_t window_name; 1537 DWORD style; 1538 cef_rect_t bounds; 1539 cef_window_handle_t parent_window; 1540 HMENU menu; 1541 int windowless_rendering_enabled; 1542 int shared_texture_enabled; 1543 int external_begin_frame_enabled; 1544 cef_window_handle_t window; 1545 } 1546 1547 1548 1549 import core.stdc.config; 1550 alias int16 = short; 1551 alias uint16 = ushort; 1552 alias int32 = int; 1553 alias uint32 = uint; 1554 alias char16 = wchar; 1555 alias int64 = long; 1556 alias uint64 = ulong; 1557 1558 // these are supposed to just be opaque pointers but i want some type safety. this same abi wise.......... RIGHT? 1559 struct cef_string_list_t { void* r; } 1560 struct cef_string_multimap_t { void* r; } 1561 struct cef_string_map_t { void* r; } 1562 1563 1564 extern(C) nothrow { 1565 cef_string_list_t cef_string_list_alloc(); 1566 size_t cef_string_list_size(cef_string_list_t list); 1567 int cef_string_list_value(cef_string_list_t list, size_t index, cef_string_t* value); 1568 void cef_string_list_append(cef_string_list_t list, const cef_string_t* value); 1569 void cef_string_list_clear(cef_string_list_t list); 1570 void cef_string_list_free(cef_string_list_t list); 1571 cef_string_list_t cef_string_list_copy(cef_string_list_t list); 1572 } 1573 1574 1575 version(linux) { 1576 import core.sys.posix.sys.types; 1577 alias pid_t cef_platform_thread_id_t; 1578 alias OS_EVENT = XEvent; 1579 } else { 1580 import core.sys.windows.windows; 1581 alias HANDLE cef_platform_thread_id_t; 1582 alias OS_EVENT = void; 1583 } 1584 1585 nothrow @nogc extern(C) void cef_string_userfree_utf16_free(const cef_string_userfree_utf16_t str); 1586 struct cef_string_userfree_utf16_t { cef_string_utf16_t* it; alias it this; } 1587 alias cef_string_userfree_t = cef_string_userfree_utf16_t; 1588 1589 // ************** 1590 1591 // cef/include/capi$ for i in *.h; do dstep -I../.. $i; done 1592 // also dstep include/cef_version.h 1593 // update the CEF_VERSION and the CEF_API_HASH_UNIVERSAL out of cef_version.h and cef_api_hash.h 1594 // then concatenate the bodies of them and delete the translated macros and `struct .*;` stuff 1595 // then I added nothrow to all function pointers with a vim macro (`/function (<ENTER>e%a nothrow<ESC>` then just hold in @ to do the @@ repeat macro command until it was done 1596 // then select all and global replace s/_cef/cef/g 1597 // then delete the pointless aliases find with `/alias \(.*\) = \1;` and delete with 2dd. macros can do the job or just simple global replace to nothing. blank lines don't matter. 1598 1599 // and make sure version(linux) void cef_register_widevine_cdm ( if it is there. 1600 1601 // and extern (C) is wrong on the callbacks, they should all be extern(System) 1602 // `/function (<ENTER>Oextern(System)<ESC>` 1603 1604 1605 version=embedded_cef_bindings; 1606 1607 // everything inside these brackets are the bindings you can replace if update needed 1608 1609 version(embedded_cef_bindings) { 1610 1611 enum cef_color_type_t { 1612 CEF_COLOR_TYPE_RGBA_8888, 1613 1614 /// 1615 /// BGRA with 8 bits per pixel (32bits total). 1616 /// 1617 CEF_COLOR_TYPE_BGRA_8888, 1618 1619 CEF_COLOR_TYPE_NUM_VALUES, 1620 } 1621 1622 enum cef_runtime_style_t { 1623 CEF_RUNTIME_STYLE_DEFAULT, 1624 CEF_RUNTIME_STYLE_CHROME, 1625 CEF_RUNTIME_STYLE_ALLOY, 1626 } 1627 alias OS_EVENT* cef_event_handle_t; 1628 struct cef_accelerated_paint_info_t; 1629 1630 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 1631 // 1632 // Redistribution and use in source and binary forms, with or without 1633 // modification, are permitted provided that the following conditions are 1634 // met: 1635 // 1636 // * Redistributions of source code must retain the above copyright 1637 // notice, this list of conditions and the following disclaimer. 1638 // * Redistributions in binary form must reproduce the above 1639 // copyright notice, this list of conditions and the following disclaimer 1640 // in the documentation and/or other materials provided with the 1641 // distribution. 1642 // * Neither the name of Google Inc. nor the name Chromium Embedded 1643 // Framework nor the names of its contributors may be used to endorse 1644 // or promote products derived from this software without specific prior 1645 // written permission. 1646 // 1647 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1648 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1649 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1650 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1651 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1652 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1653 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1654 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1655 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1656 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1657 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1658 // 1659 // --------------------------------------------------------------------------- 1660 // 1661 // This file was generated by the make_version_header.py tool. 1662 // 1663 1664 extern (C): 1665 1666 enum CEF_VERSION = "142.0.15+g6dfdb28+chromium-142.0.7444.176"; 1667 enum CEF_VERSION_MAJOR = 142; 1668 enum CEF_VERSION_MINOR = 0; 1669 enum CEF_VERSION_PATCH = 15; 1670 enum CEF_COMMIT_NUMBER = 3314; 1671 enum CEF_COMMIT_HASH = "6dfdb28d752a47e189d7a23b01f368ab0bdb378d"; 1672 enum COPYRIGHT_YEAR = 2025; 1673 1674 enum CHROME_VERSION_MAJOR = 142; 1675 enum CHROME_VERSION_MINOR = 0; 1676 enum CHROME_VERSION_BUILD = 7444; 1677 enum CHROME_VERSION_PATCH = 176; 1678 1679 1680 1681 // CEF_INCLUDE_CEF_VERSION_H_ 1682 // Copyright (c) 2024 Marshall A. Greenblatt. All rights reserved. 1683 1684 extern (C): 1685 1686 // 1687 // Redistribution and use in source and binary forms, with or without 1688 // modification, are permitted provided that the following conditions are 1689 // met: 1690 // 1691 // * Redistributions of source code must retain the above copyright 1692 // notice, this list of conditions and the following disclaimer. 1693 // * Redistributions in binary form must reproduce the above 1694 // copyright notice, this list of conditions and the following disclaimer 1695 // in the documentation and/or other materials provided with the 1696 // distribution. 1697 // * Neither the name of Google Inc. nor the name Chromium Embedded 1698 // Framework nor the names of its contributors may be used to endorse 1699 // or promote products derived from this software without specific prior 1700 // written permission. 1701 // 1702 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1703 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1704 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1705 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1706 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1707 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1708 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1709 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1710 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1711 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1712 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1713 // 1714 // Versions are managed using the version_manager.py tool. For usage details 1715 // see https://bitbucket.org/chromiumembedded/cef/wiki/ApiVersioning.md 1716 // 1717 1718 // Experimental CEF API. Experimental API is unversioned, meaning that it is 1719 // excluded (compiled out) when clients explicitly set the CEF_API_VERSION 1720 // value in their project configuration. Experimental API is not back/forward 1721 // compatible with different CEF versions. 1722 enum CEF_API_VERSION_EXPERIMENTAL = 999999; 1723 1724 // Placeholder for the next CEF version currently under development. This is a 1725 // temporary value that must be replaced with the actual next version number 1726 // (output of running `version_manager.py -n`) prior to upstream merge. As an 1727 // added reminder, use of this value will cause version_manager.py to fail when 1728 // computing hashes for explicit API versions. When adding new API consider 1729 // using CEF_API_VERSION_EXPERIMENTAL instead. 1730 1731 enum CEF_API_VERSION_NEXT = 999998; 1732 1733 // Shorter versions of the above for convenience use in comparison macros. 1734 enum CEF_NEXT = CEF_API_VERSION_NEXT; 1735 enum CEF_EXPERIMENTAL = CEF_API_VERSION_EXPERIMENTAL; 1736 1737 // API version that will be compiled client-side. The experimental (unversioned) 1738 // API is selected by default. Clients can set the CEF_API_VERSION value in 1739 // their project configuration to configure an explicit API version. Unlike 1740 // the experimental API, explicit API versions are back/forward compatible with 1741 // a specific range of CEF versions. 1742 1743 enum CEF_API_VERSION = CEF_API_VERSION_EXPERIMENTAL; 1744 1745 1746 1747 // API hashes for the selected CEF_API_VERSION. API hashes are created for 1748 // each version by analyzing CEF header files for C API type definitions. The 1749 // hash value will change when header files are modified in a way that may 1750 // cause binary incompatibility with other builds. 1751 //enum CEF_API_HASH_PLATFORM = _CEF_AH_DECLARE(CEF_API_VERSION); 1752 1753 // !defined(BUILDING_CEF_SHARED) 1754 1755 // !defined(BUILDING_CEF_SHARED) 1756 1757 /// 1758 /// API exists only in the specified version range. 1759 /// 1760 1761 1762 /// 1763 /// Configures the CEF API version and returns API hashes for the libcef 1764 /// library. The returned string is owned by the library and should not be 1765 /// freed. The |version| parameter should be CEF_API_VERSION and any changes to 1766 /// this value will be ignored after the first call to this method. The |entry| 1767 /// parameter describes which hash value will be returned: 1768 /// 1769 /// 0 - CEF_API_HASH_PLATFORM 1770 /// 1 - CEF_API_HASH_UNIVERSAL (deprecated, same as CEF_API_HASH_PLATFORM) 1771 /// 2 - CEF_COMMIT_HASH (from cef_version.h) 1772 /// 1773 const(char)* cef_api_hash (int version_, int entry); 1774 1775 /// 1776 /// Returns the CEF API version that was configured by the first call to 1777 /// cef_api_hash(). 1778 /// 1779 int cef_api_version (); 1780 1781 // CEF_INCLUDE_CEF_API_HASH_H_ 1782 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 1783 // 1784 // Redistribution and use in source and binary forms, with or without 1785 // modification, are permitted provided that the following conditions are 1786 // met: 1787 // 1788 // * Redistributions of source code must retain the above copyright 1789 // notice, this list of conditions and the following disclaimer. 1790 // * Redistributions in binary form must reproduce the above 1791 // copyright notice, this list of conditions and the following disclaimer 1792 // in the documentation and/or other materials provided with the 1793 // distribution. 1794 // * Neither the name of Google Inc. nor the name Chromium Embedded 1795 // Framework nor the names of its contributors may be used to endorse 1796 // or promote products derived from this software without specific prior 1797 // written permission. 1798 // 1799 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1800 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1801 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1802 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1803 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1804 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1805 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1806 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1807 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1808 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1809 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1810 1811 extern (C): 1812 1813 /// 1814 /// Structure representing a point. 1815 /// 1816 struct cef_point_t 1817 { 1818 int x; 1819 int y; 1820 } 1821 1822 1823 1824 /// 1825 /// Structure representing a rectangle. 1826 /// 1827 struct cef_rect_t 1828 { 1829 int x; 1830 int y; 1831 int width; 1832 int height; 1833 } 1834 1835 1836 1837 /// 1838 /// Structure representing a size. 1839 /// 1840 struct cef_size_t 1841 { 1842 int width; 1843 int height; 1844 } 1845 1846 1847 1848 /// 1849 /// Structure representing insets. 1850 /// 1851 struct cef_insets_t 1852 { 1853 int top; 1854 int left; 1855 int bottom; 1856 int right; 1857 } 1858 1859 1860 1861 // CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_ 1862 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1863 // 1864 // Redistribution and use in source and binary forms, with or without 1865 // modification, are permitted provided that the following conditions are 1866 // met: 1867 // 1868 // * Redistributions of source code must retain the above copyright 1869 // notice, this list of conditions and the following disclaimer. 1870 // * Redistributions in binary form must reproduce the above 1871 // copyright notice, this list of conditions and the following disclaimer 1872 // in the documentation and/or other materials provided with the 1873 // distribution. 1874 // * Neither the name of Google Inc. nor the name Chromium Embedded 1875 // Framework nor the names of its contributors may be used to endorse 1876 // or promote products derived from this software without specific prior 1877 // written permission. 1878 // 1879 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1880 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1881 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1882 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1883 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1884 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1885 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1886 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1887 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1888 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1889 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1890 1891 extern (C): 1892 1893 /// 1894 /// Supported content setting types. Some types are platform-specific or only 1895 /// supported with Chrome style. Should be kept in sync with Chromium's 1896 /// ContentSettingsType type. 1897 /// 1898 enum cef_content_setting_types_t 1899 { 1900 /// This setting governs whether cookies are enabled by the user in the 1901 /// provided context. However, it may be overridden by other settings. This 1902 /// enum should NOT be read directly to determine whether cookies are enabled; 1903 /// the client should instead rely on the CookieSettings API. 1904 CEF_CONTENT_SETTING_TYPE_COOKIES = 0, 1905 1906 CEF_CONTENT_SETTING_TYPE_IMAGES = 1, 1907 CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = 2, 1908 1909 /// This setting governs both popups and unwanted redirects like tab-unders 1910 /// and framebusting. 1911 CEF_CONTENT_SETTING_TYPE_POPUPS = 3, 1912 1913 CEF_CONTENT_SETTING_TYPE_GEOLOCATION = 4, 1914 CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = 5, 1915 CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = 6, 1916 CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = 7, 1917 CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = 8, 1918 CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = 9, 1919 CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = 10, 1920 CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = 11, 1921 CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = 12, 1922 1923 /// Advanced device-specific functions on MIDI devices. MIDI-SysEx 1924 /// communications can be used for changing the MIDI device's persistent state 1925 /// such as firmware. 1926 CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = 13, 1927 1928 CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = 14, 1929 CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = 15, 1930 CEF_CONTENT_SETTING_TYPE_APP_BANNER = 16, 1931 CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = 17, 1932 CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = 18, 1933 CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = 19, 1934 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = 20, 1935 CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = 21, 1936 CEF_CONTENT_SETTING_TYPE_AUTOPLAY = 22, 1937 CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = 23, 1938 CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = 24, 1939 CEF_CONTENT_SETTING_TYPE_ADS = 25, 1940 1941 /// Website setting which stores metadata for the subresource filter to aid in 1942 /// decisions for whether or not to show the UI. 1943 CEF_CONTENT_SETTING_TYPE_ADS_DATA = 26, 1944 1945 /// MIDI stands for Musical Instrument Digital Interface. It is a standard 1946 /// that allows electronic musical instruments, computers, and other devices 1947 /// to communicate with each other. 1948 CEF_CONTENT_SETTING_TYPE_MIDI = 27, 1949 1950 /// This content setting type is for caching password protection service's 1951 /// verdicts of each origin. 1952 CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = 28, 1953 1954 /// Website setting which stores engagement data for media related to a 1955 /// specific origin. 1956 CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = 29, 1957 1958 /// Content setting which stores whether or not the site can play audible 1959 /// sound. This will not block playback but instead the user will not hear it. 1960 CEF_CONTENT_SETTING_TYPE_SOUND = 30, 1961 1962 /// Website setting which stores the list of client hints that the origin 1963 /// requested the browser to remember. The browser is expected to send all 1964 /// client hints in the HTTP request headers for every resource requested 1965 /// from that origin. 1966 CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = 31, 1967 1968 /// Generic Sensor API covering ambient-light-sensor, accelerometer, gyroscope 1969 /// and magnetometer are all mapped to a single content_settings_type. 1970 /// Setting for the Generic Sensor API covering ambient-light-sensor, 1971 /// accelerometer, gyroscope and magnetometer. These are all mapped to a 1972 /// single ContentSettingsType. 1973 CEF_CONTENT_SETTING_TYPE_SENSORS = 32, 1974 1975 /// Content setting which stores whether or not the user has granted the site 1976 /// permission to respond to accessibility events, which can be used to 1977 /// provide a custom accessibility experience. Requires explicit user consent 1978 /// because some users may not want sites to know they're using assistive 1979 /// technology. Deprecated in M131. 1980 CEF_CONTENT_SETTING_TYPE_DEPRECATED_ACCESSIBILITY_EVENTS = 33, 1981 1982 /// Used to store whether to allow a website to install a payment handler. 1983 CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = 34, 1984 1985 /// Content setting which stores whether to allow sites to ask for permission 1986 /// to access USB devices. If this is allowed specific device permissions are 1987 /// stored under USB_CHOOSER_DATA. 1988 CEF_CONTENT_SETTING_TYPE_USB_GUARD = 35, 1989 1990 /// Nothing is stored in this setting at present. Please refer to 1991 /// BackgroundFetchPermissionContext for details on how this permission 1992 /// is ascertained. 1993 CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = 36, 1994 1995 /// Website setting which stores the amount of times the user has dismissed 1996 /// intent picker UI without explicitly choosing an option. 1997 CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = 37, 1998 1999 /// Used to store whether to allow a website to detect user active/idle state. 2000 CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = 38, 2001 2002 /// Content settings for access to serial ports. The "guard" content setting 2003 /// stores whether to allow sites to ask for permission to access a port. The 2004 /// permissions granted to access particular ports are stored in the "chooser 2005 /// data" website setting. 2006 CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = 39, 2007 CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = 40, 2008 2009 /// Nothing is stored in this setting at present. Please refer to 2010 /// PeriodicBackgroundSyncPermissionContext for details on how this permission 2011 /// is ascertained. 2012 /// This content setting is not registered because it does not require access 2013 /// to any existing providers. 2014 CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = 41, 2015 2016 /// Content setting which stores whether to allow sites to ask for permission 2017 /// to do Bluetooth scanning. 2018 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = 42, 2019 2020 /// Content settings for access to HID devices. The "guard" content setting 2021 /// stores whether to allow sites to ask for permission to access a device. 2022 /// The permissions granted to access particular devices are stored in the 2023 /// "chooser data" website setting. 2024 CEF_CONTENT_SETTING_TYPE_HID_GUARD = 43, 2025 CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = 44, 2026 2027 /// Wake Lock API, which has two lock types: screen and system locks. 2028 /// Currently, screen locks do not need any additional permission, and system 2029 /// locks are always denied while the right UI is worked out. 2030 CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = 45, 2031 CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = 46, 2032 2033 /// Legacy SameSite cookie behavior. This disables SameSite=Lax-by-default, 2034 /// SameSite=None requires Secure, and Schemeful Same-Site, forcing the 2035 /// legacy behavior wherein 1) cookies that don't specify SameSite are treated 2036 /// as SameSite=None, 2) SameSite=None cookies are not required to be Secure, 2037 /// and 3) schemeful same-site is not active. 2038 /// 2039 /// This will also be used to revert to legacy behavior when future changes 2040 /// in cookie handling are introduced. 2041 CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = 47, 2042 2043 /// Content settings which stores whether to allow sites to ask for permission 2044 /// to save changes to an original file selected by the user through the 2045 /// File System Access API. 2046 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = 48, 2047 2048 /// Used to store whether to allow a website to exchange data with NFC 2049 /// devices. 2050 CEF_CONTENT_SETTING_TYPE_NFC = 49, 2051 2052 /// Website setting to store permissions granted to access particular 2053 /// Bluetooth devices. 2054 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = 50, 2055 2056 /// Full access to the system clipboard (sanitized read without user gesture, 2057 /// and unsanitized read and write with user gesture). 2058 CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = 51, 2059 2060 /// This is special-cased in the permissions layer to always allow, and as 2061 /// such doesn't have associated prefs data. 2062 CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = 52, 2063 2064 /// This content setting type is for caching safe browsing real time url 2065 /// check's verdicts of each origin. 2066 CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = 53, 2067 2068 /// Used to store whether a site is allowed to request AR or VR sessions with 2069 /// the WebXr Device API. 2070 CEF_CONTENT_SETTING_TYPE_VR = 54, 2071 CEF_CONTENT_SETTING_TYPE_AR = 55, 2072 2073 /// Content setting which stores whether to allow site to open and read files 2074 /// and directories selected through the File System Access API. 2075 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = 56, 2076 2077 /// Access to first party storage in a third-party context. Exceptions are 2078 /// scoped to the combination of requesting/top-level origin, and are managed 2079 /// through the Storage Access API. For the time being, this content setting 2080 /// exists in parallel to third-party cookie rules stored in COOKIES. 2081 CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = 57, 2082 2083 /// Content setting which stores whether to allow a site to control camera 2084 /// movements. It does not give access to camera. 2085 CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = 58, 2086 2087 /// Content setting for Screen Enumeration and Screen Detail functionality. 2088 /// Permits access to detailed multi-screen information, like size and 2089 /// position. Permits placing fullscreen and windowed content on specific 2090 /// screens. See also: https://w3c.github.io/window-placement 2091 CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = 59, 2092 2093 /// Stores whether to allow insecure websites to make private network 2094 /// requests. 2095 /// See also: https://wicg.github.io/cors-rfc1918 2096 /// Set through enterprise policies only. 2097 2098 CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK_DEPRECATED = 60, 2099 2100 /// Content setting which stores whether or not a site can access low-level 2101 /// locally installed font data using the Local Fonts Access API. 2102 CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = 61, 2103 2104 /// Stores per-origin state for permission auto-revocation (for all permission 2105 /// types). 2106 CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = 62, 2107 2108 /// Stores per-origin state of the most recently selected directory for the 2109 /// use by the File System Access API. 2110 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = 63, 2111 2112 /// Controls access to the getDisplayMedia API. 2113 CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = 64, 2114 2115 /// Website setting to store permissions metadata granted to paths on the 2116 /// local file system via the File System Access API. 2117 /// |FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting. The stored 2118 /// data represents valid permission only if 2119 /// |FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION| is enabled via user opt-in. 2120 /// Otherwise, they represent "recently granted but revoked permission", which 2121 /// are used to restore the permission. 2122 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = 65, 2123 2124 /// Stores a grant that allows a relying party to send a request for identity 2125 /// information to specified identity providers, potentially through any 2126 /// anti-tracking measures that would otherwise prevent it. This setting is 2127 /// associated with the relying party's origin. 2128 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = 66, 2129 2130 /// Whether to use the v8 optimized JIT for running JavaScript on the page. 2131 CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = 67, 2132 2133 /// Content setting which stores user decisions to allow loading a site over 2134 /// HTTP. Entries are added by hostname when a user bypasses the HTTPS-First 2135 /// Mode interstitial warning when a site does not support HTTPS. Allowed 2136 /// hosts are exact hostname matches -- subdomains of a host on the allowlist 2137 /// must be separately allowlisted. 2138 CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = 68, 2139 2140 /// Stores metadata related to form fill, such as e.g. whether user data was 2141 /// autofilled on a specific website. 2142 CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = 69, 2143 2144 /// Setting to indicate that there is an active federated sign-in session 2145 /// between a specified relying party and a specified identity provider for 2146 /// a specified account. When this is present it allows access to session 2147 /// management capabilities between the sites. This setting is associated 2148 /// with the relying party's origin. 2149 // Obsolete on Nov 2023. 2150 CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION = 70, 2151 2152 /// Setting to indicate whether Chrome should automatically apply darkening to 2153 /// web content. 2154 CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = 71, 2155 2156 /// Setting to indicate whether Chrome should request the desktop view of a 2157 /// site instead of the mobile one. 2158 CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = 72, 2159 2160 /// Setting to indicate whether browser should allow signing into a website 2161 /// via the browser FedCM API. 2162 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = 73, 2163 2164 /// Stores notification interactions per origin for the past 90 days. 2165 /// Interactions per origin are pre-aggregated over seven-day windows: A 2166 /// notification interaction or display is assigned to the last Monday 2167 /// midnight in local time. 2168 CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = 74, 2169 2170 /// Website setting which stores the last reduced accept language negotiated 2171 /// for a given origin, to be used on future visits to the origin. 2172 CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = 75, 2173 2174 /// Website setting which is used for NotificationPermissionReviewService to 2175 /// store origin blocklist from review notification permissions feature. 2176 CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = 76, 2177 2178 CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD_DEPRECATED = 77, 2179 CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA_DEPRECATED = 78, 2180 2181 /// Website setting to store permissions granted to access particular devices 2182 /// in private network. 2183 2184 /// Website setting which stores whether the browser has observed the user 2185 /// signing into an identity-provider based on observing the IdP-SignIn-Status 2186 /// HTTP header. 2187 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS = 79, 2188 2189 /// Website setting which is used for RevokedPermissionsService to 2190 /// store revoked permissions of unused sites from unused site permissions 2191 /// feature. 2192 CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = 80, 2193 2194 /// Similar to STORAGE_ACCESS, but applicable at the page-level rather than 2195 /// being specific to a frame. 2196 CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = 81, 2197 2198 /// Setting to indicate whether user has opted in to allowing auto re-authn 2199 /// via the FedCM API. 2200 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = 82, 2201 2202 /// Website setting which stores whether the user has explicitly registered 2203 /// a website as an identity-provider. 2204 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = 83, 2205 2206 /// Content setting which is used to indicate whether anti-abuse functionality 2207 /// should be enabled. 2208 CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = 84, 2209 2210 /// Content setting used to indicate whether third-party storage partitioning 2211 /// should be enabled. 2212 CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = 85, 2213 2214 /// Used to indicate whether HTTPS-First Mode is enabled on the hostname. 2215 CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = 86, 2216 2217 /// Setting for enabling the `getAllScreensMedia` API. Spec link: 2218 /// https://github.com/screen-share/capture-all-screens 2219 CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = 87, 2220 2221 /// Stores per origin metadata for cookie controls. 2222 CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = 88, 2223 2224 /// Content Setting for temporary 3PC accesses granted by user behavior 2225 /// heuristics. 2226 CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS = 89, 2227 2228 /// Content Setting for 3PC accesses granted by metadata delivered via the 2229 /// component updater service. This type will only be used when 2230 /// `net::features::kTpcdMetadataGrants` is enabled. 2231 CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = 90, 2232 2233 /// Content Setting for 3PC accesses granted via 3PC deprecation trial. 2234 CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL = 91, 2235 2236 /// Content Setting for 3PC accesses granted via top-level 3PC deprecation 2237 /// trial. Similar to TPCD_TRIAL, but applicable at the page-level for the 2238 /// lifetime of the page that served the token, rather than being specific to 2239 /// a requesting-origin/top-level-site combination and persistent. 2240 CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL = 92, 2241 2242 /// Content Setting for a first-party origin trial that allows websites to 2243 /// enable third-party cookie deprecation. 2244 /// ALLOW (default): no effect (e.g. third-party cookies allowed, if not 2245 /// blocked otherwise). 2246 /// BLOCK: third-party cookies blocked, but 3PCD mitigations enabled. 2247 2248 CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_ORIGIN_TRIAL = 93, 2249 2250 /// Content setting used to indicate whether entering picture-in-picture 2251 /// automatically should be enabled. 2252 CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = 94, 2253 2254 /// Whether user has opted into keeping file/directory permissions persistent 2255 /// between visits for a given origin. When enabled, permission metadata 2256 /// stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming 2257 /// permission request. 2258 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = 95, 2259 2260 /// Whether the FSA Persistent Permissions restore prompt is eligible to be 2261 /// shown to the user, for a given origin. 2262 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION = 96, 2263 2264 /// Whether an application capturing another tab, may scroll and zoom 2265 /// the captured tab. 2266 CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL = 97, 2267 2268 /// Content setting for access to smart card readers. 2269 /// The "guard" content setting stores whether to allow sites to access the 2270 /// Smart Card API. 2271 CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD = 98, 2272 CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA = 99, 2273 2274 /// Content settings for access to printers for the Web Printing API. 2275 CEF_CONTENT_SETTING_TYPE_WEB_PRINTING = 100, 2276 2277 /// Content setting used to indicate whether entering HTML Fullscreen 2278 /// automatically (i.e. without transient activation) should be enabled. 2279 CEF_CONTENT_SETTING_TYPE_AUTOMATIC_FULLSCREEN = 101, 2280 2281 /// Content settings used to indicate that a web app is allowed to prompt the 2282 /// user for the installation of sub apps. 2283 CEF_CONTENT_SETTING_TYPE_SUB_APP_INSTALLATION_PROMPTS = 102, 2284 2285 /// Whether an application can enumerate audio output device. 2286 CEF_CONTENT_SETTING_TYPE_SPEAKER_SELECTION = 103, 2287 2288 /// Content settings for access to the Direct Sockets API. 2289 CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS = 104, 2290 2291 /// Keyboard Lock API allows a site to capture keyboard inputs that would 2292 /// otherwise be handled by the OS or the browser. 2293 CEF_CONTENT_SETTING_TYPE_KEYBOARD_LOCK = 105, 2294 2295 /// Pointer Lock API allows a site to hide the cursor and have exclusive 2296 /// access to mouse inputs. 2297 CEF_CONTENT_SETTING_TYPE_POINTER_LOCK = 106, 2298 2299 /// Website setting which is used for RevokedPermissionsService to store 2300 /// auto-revoked notification permissions from abusive sites. 2301 CEF_CONTENT_SETTING_TYPE_REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS = 107, 2302 2303 /// Content setting that controls tracking protection status per site. 2304 /// BLOCK: Protections enabled. This is the default state. 2305 /// ALLOW: Protections disabled. 2306 CEF_CONTENT_SETTING_TYPE_TRACKING_PROTECTION = 108, 2307 2308 /// With this permission, when the application calls `getDisplayMedia()`, a 2309 /// system audio track can be returned without showing the display media 2310 /// selection picker. The application can explicitly specify 2311 /// `systemAudio: 'exclude'` or `video: true` to still show the display media 2312 /// selection picker if needed. Please note that the setting only works for 2313 /// WebUI. 2314 CEF_CONTENT_SETTING_TYPE_DISPLAY_MEDIA_SYSTEM_AUDIO = 109, 2315 2316 /// Whether to use the higher-tier v8 optimizers for running JavaScript on the 2317 /// page. 2318 CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_OPTIMIZER = 110, 2319 2320 /// Content Setting for the Storage Access Headers persistent origin trial 2321 /// that allows origins to opt into the storage access header behavior. Should 2322 /// be scoped to `REQUESTING_ORIGIN_AND_TOP_SCHEMEFUL_SITE_SCOPE` in order to 2323 /// correspond to the design of persistent origin trials. See also: 2324 /// https://github.com/cfredric/storage-access-headers 2325 /// ALLOW: storage access request headers will be attached to cross-site 2326 /// requests, and url requests will look for response headers from 2327 /// origins to retry a request or load with storage access. 2328 /// BLOCK (default): no effect. 2329 CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS_HEADER_ORIGIN_TRIAL = 111, 2330 2331 /// Whether or not sites can request Hand Tracking data within WebXR Sessions. 2332 CEF_CONTENT_SETTING_TYPE_HAND_TRACKING = 112, 2333 2334 /// Website setting to indicate whether user has opted in to allow web apps to 2335 /// install other web apps. 2336 CEF_CONTENT_SETTING_TYPE_WEB_APP_INSTALLATION = 113, 2337 2338 /// Content settings for private network access in the context of the 2339 /// Direct Sockets API. 2340 CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS = 114, 2341 2342 /// Content settings for legacy cookie scope. 2343 /// Checks whether cookies scope is handled according to origin-bound cookies 2344 /// or legacy behavior. 2345 CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_SCOPE = 115, 2346 2347 /// Website setting to indicate whether the user has allowlisted suspicious 2348 /// notifications for the origin. 2349 CEF_CONTENT_SETTING_TYPE_ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER = 116, 2350 2351 /// Content settings for access to the Controlled Frame API. 2352 CEF_CONTENT_SETTING_TYPE_CONTROLLED_FRAME = 117, 2353 2354 /// Website setting which is used for RevokedPermissionsService to 2355 /// store revoked notification permissions of disruptive sites. 2356 CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS = 118, 2357 2358 /// Content setting for whether the site is allowed to make local network 2359 /// requests. 2360 CEF_CONTENT_SETTING_TYPE_LOCAL_NETWORK_ACCESS = 119, 2361 2362 /// Stores information on-device language packs for which a site has 2363 /// installed using the Web Speech API. 2364 CEF_CONTENT_SETTING_TYPE_ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED = 120, 2365 2366 /// Stores which Translator API language packs the site has initialized. 2367 CEF_CONTENT_SETTING_TYPE_INITIALIZED_TRANSLATIONS = 121, 2368 2369 /// Stores a list of notification ids where content detection found the 2370 /// notification to be suspicious and a warning has already been shown for the 2371 /// site. Used for recovering notification contents from the database if the 2372 /// user decides they would like to see all of these notifications. 2373 CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_IDS = 122, 2374 2375 /// To support approximate geolocation, the permission is migrating to use 2376 /// permissions with options, which won't be stored as ContentSettings. Upon 2377 /// launch of the feature, GEOLOCATION and GEOLOCATION_WITH_OPTIONS should be 2378 /// merged. 2379 CEF_CONTENT_SETTING_TYPE_GEOLOCATION_WITH_OPTIONS = 123, 2380 2381 /// Setting for enabling the Device Attributes API. Spec link: 2382 /// https://wicg.github.io/WebApiDevice/device_attributes/ 2383 CEF_CONTENT_SETTING_TYPE_DEVICE_ATTRIBUTES = 124, 2384 2385 /// Stores per-origin state for permission heuristics. Currently used for 2386 /// auto-granting geolocation element permission request after repeated 2387 /// temporary grants. 2388 CEF_CONTENT_SETTING_TYPE_PERMISSION_ACTIONS_HISTORY = 125, 2389 2390 /// Website setting to indicate whether the user has selected "show original" 2391 /// when suspicious warning is shown. If the user has selected this, the 2392 /// notification permission will not be revoked based on suspicious verdict. 2393 CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_SHOW_ORIGINAL = 126, 2394 2395 CEF_CONTENT_SETTING_TYPE_NUM_VALUES = 127 2396 } 2397 2398 alias CEF_CONTENT_SETTING_TYPE_COOKIES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIES; 2399 alias CEF_CONTENT_SETTING_TYPE_IMAGES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMAGES; 2400 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT; 2401 alias CEF_CONTENT_SETTING_TYPE_POPUPS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_POPUPS; 2402 alias CEF_CONTENT_SETTING_TYPE_GEOLOCATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_GEOLOCATION; 2403 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS; 2404 alias CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE; 2405 alias CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT; 2406 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC; 2407 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA; 2408 alias CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS; 2409 alias CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER; 2410 alias CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS; 2411 alias CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX; 2412 alias CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS; 2413 alias CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER; 2414 alias CEF_CONTENT_SETTING_TYPE_APP_BANNER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_APP_BANNER; 2415 alias CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT; 2416 alias CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE; 2417 alias CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA; 2418 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD; 2419 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC; 2420 alias CEF_CONTENT_SETTING_TYPE_AUTOPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOPLAY; 2421 alias CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO; 2422 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA; 2423 alias CEF_CONTENT_SETTING_TYPE_ADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS; 2424 alias CEF_CONTENT_SETTING_TYPE_ADS_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS_DATA; 2425 alias CEF_CONTENT_SETTING_TYPE_MIDI = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI; 2426 alias CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION; 2427 alias CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT; 2428 alias CEF_CONTENT_SETTING_TYPE_SOUND = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SOUND; 2429 alias CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS; 2430 alias CEF_CONTENT_SETTING_TYPE_SENSORS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SENSORS; 2431 alias CEF_CONTENT_SETTING_TYPE_DEPRECATED_ACCESSIBILITY_EVENTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEPRECATED_ACCESSIBILITY_EVENTS; 2432 alias CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER; 2433 alias CEF_CONTENT_SETTING_TYPE_USB_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_GUARD; 2434 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH; 2435 alias CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY; 2436 alias CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION; 2437 alias CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD; 2438 alias CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA; 2439 alias CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC; 2440 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING; 2441 alias CEF_CONTENT_SETTING_TYPE_HID_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_GUARD; 2442 alias CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA; 2443 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN; 2444 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM; 2445 alias CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS; 2446 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD; 2447 alias CEF_CONTENT_SETTING_TYPE_NFC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NFC; 2448 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA; 2449 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE; 2450 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE; 2451 alias CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA; 2452 alias CEF_CONTENT_SETTING_TYPE_VR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_VR; 2453 alias CEF_CONTENT_SETTING_TYPE_AR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AR; 2454 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD; 2455 alias CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS; 2456 alias CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM; 2457 alias CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT; 2458 alias CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK_DEPRECATED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK_DEPRECATED; 2459 alias CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS; 2460 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA; 2461 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY; 2462 alias CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE; 2463 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA; 2464 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING; 2465 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT; 2466 alias CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED; 2467 alias CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA; 2468 alias CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION; 2469 alias CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT; 2470 alias CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE; 2471 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API; 2472 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS; 2473 alias CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE; 2474 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW; 2475 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD_DEPRECATED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD_DEPRECATED; 2476 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA_DEPRECATED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA_DEPRECATED; 2477 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS; 2478 alias CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS; 2479 alias CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS; 2480 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION; 2481 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION; 2482 alias CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE; 2483 alias CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING; 2484 alias CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED; 2485 alias CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE; 2486 alias CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA; 2487 alias CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS; 2488 alias CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS; 2489 alias CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL; 2490 alias CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL; 2491 alias CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_ORIGIN_TRIAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_ORIGIN_TRIAL; 2492 alias CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE; 2493 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION; 2494 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION; 2495 alias CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL; 2496 alias CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD; 2497 alias CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA; 2498 alias CEF_CONTENT_SETTING_TYPE_WEB_PRINTING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WEB_PRINTING; 2499 alias CEF_CONTENT_SETTING_TYPE_AUTOMATIC_FULLSCREEN = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOMATIC_FULLSCREEN; 2500 alias CEF_CONTENT_SETTING_TYPE_SUB_APP_INSTALLATION_PROMPTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SUB_APP_INSTALLATION_PROMPTS; 2501 alias CEF_CONTENT_SETTING_TYPE_SPEAKER_SELECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SPEAKER_SELECTION; 2502 alias CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS; 2503 alias CEF_CONTENT_SETTING_TYPE_KEYBOARD_LOCK = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_KEYBOARD_LOCK; 2504 alias CEF_CONTENT_SETTING_TYPE_POINTER_LOCK = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_POINTER_LOCK; 2505 alias CEF_CONTENT_SETTING_TYPE_REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS; 2506 alias CEF_CONTENT_SETTING_TYPE_TRACKING_PROTECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TRACKING_PROTECTION; 2507 alias CEF_CONTENT_SETTING_TYPE_DISPLAY_MEDIA_SYSTEM_AUDIO = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DISPLAY_MEDIA_SYSTEM_AUDIO; 2508 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_OPTIMIZER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_OPTIMIZER; 2509 alias CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS_HEADER_ORIGIN_TRIAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS_HEADER_ORIGIN_TRIAL; 2510 alias CEF_CONTENT_SETTING_TYPE_HAND_TRACKING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HAND_TRACKING; 2511 alias CEF_CONTENT_SETTING_TYPE_WEB_APP_INSTALLATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WEB_APP_INSTALLATION; 2512 alias CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS; 2513 alias CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_SCOPE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_SCOPE; 2514 alias CEF_CONTENT_SETTING_TYPE_ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ARE_SUSPICIOUS_NOTIFICATIONS_ALLOWLISTED_BY_USER; 2515 alias CEF_CONTENT_SETTING_TYPE_CONTROLLED_FRAME = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CONTROLLED_FRAME; 2516 alias CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS; 2517 alias CEF_CONTENT_SETTING_TYPE_LOCAL_NETWORK_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LOCAL_NETWORK_ACCESS; 2518 alias CEF_CONTENT_SETTING_TYPE_ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ON_DEVICE_SPEECH_RECOGNITION_LANGUAGES_DOWNLOADED; 2519 alias CEF_CONTENT_SETTING_TYPE_INITIALIZED_TRANSLATIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INITIALIZED_TRANSLATIONS; 2520 alias CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_IDS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_IDS; 2521 alias CEF_CONTENT_SETTING_TYPE_GEOLOCATION_WITH_OPTIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_GEOLOCATION_WITH_OPTIONS; 2522 alias CEF_CONTENT_SETTING_TYPE_DEVICE_ATTRIBUTES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEVICE_ATTRIBUTES; 2523 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_ACTIONS_HISTORY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_ACTIONS_HISTORY; 2524 alias CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_SHOW_ORIGINAL = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SUSPICIOUS_NOTIFICATION_SHOW_ORIGINAL; 2525 alias CEF_CONTENT_SETTING_TYPE_NUM_VALUES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NUM_VALUES; 2526 2527 /// 2528 /// Supported content setting values. Should be kept in sync with Chromium's 2529 /// ContentSetting type. 2530 /// 2531 enum cef_content_setting_values_t 2532 { 2533 CEF_CONTENT_SETTING_VALUE_DEFAULT = 0, 2534 CEF_CONTENT_SETTING_VALUE_ALLOW = 1, 2535 CEF_CONTENT_SETTING_VALUE_BLOCK = 2, 2536 CEF_CONTENT_SETTING_VALUE_ASK = 3, 2537 CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = 4, 2538 2539 CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT_DEPRECATED = 5, 2540 2541 CEF_CONTENT_SETTING_VALUE_NUM_VALUES = 6 2542 } 2543 2544 alias CEF_CONTENT_SETTING_VALUE_DEFAULT = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DEFAULT; 2545 alias CEF_CONTENT_SETTING_VALUE_ALLOW = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ALLOW; 2546 alias CEF_CONTENT_SETTING_VALUE_BLOCK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_BLOCK; 2547 alias CEF_CONTENT_SETTING_VALUE_ASK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ASK; 2548 alias CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_SESSION_ONLY; 2549 alias CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT_DEPRECATED = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT_DEPRECATED; 2550 alias CEF_CONTENT_SETTING_VALUE_NUM_VALUES = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_NUM_VALUES; 2551 2552 // CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_ 2553 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 2554 // 2555 // Redistribution and use in source and binary forms, with or without 2556 // modification, are permitted provided that the following conditions are 2557 // met: 2558 // 2559 // * Redistributions of source code must retain the above copyright 2560 // notice, this list of conditions and the following disclaimer. 2561 // * Redistributions in binary form must reproduce the above 2562 // copyright notice, this list of conditions and the following disclaimer 2563 // in the documentation and/or other materials provided with the 2564 // distribution. 2565 // * Neither the name of Google Inc. nor the name Chromium Embedded 2566 // Framework nor the names of its contributors may be used to endorse 2567 // or promote products derived from this software without specific prior 2568 // written permission. 2569 // 2570 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2571 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2572 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2573 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2574 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2575 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2576 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2577 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2578 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2579 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2580 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2581 2582 import core.stdc.config; 2583 import core.stdc.limits; 2584 import core.stdc.stdint; 2585 2586 extern (C): 2587 2588 // Bring in platform-specific definitions. 2589 2590 // 32-bit ARGB color value, not premultiplied. The color components are always 2591 // in a known order. Equivalent to the SkColor type. 2592 alias cef_color_t = uint; 2593 2594 // Return the alpha byte from a cef_color_t value. 2595 2596 2597 // Return the red byte from a cef_color_t value. 2598 2599 2600 // Return the green byte from a cef_color_t value. 2601 2602 2603 // Return the blue byte from a cef_color_t value. 2604 2605 2606 // Return an cef_color_t value with the specified byte component values. 2607 2608 2609 // Return an int64_t value with the specified low and high int32_t component 2610 // values. 2611 2612 2613 // Return the low int32_t value from an int64_t value. 2614 2615 2616 // Return the high int32_t value from an int64_t value. 2617 2618 2619 // Check that the structure |s|, which is defined with a `size_t size` member 2620 // at the top, is large enough to contain the specified member |f|. 2621 2622 2623 /// 2624 /// Log severity levels. 2625 /// 2626 enum cef_log_severity_t 2627 { 2628 /// 2629 /// Default logging (currently INFO logging). 2630 /// 2631 LOGSEVERITY_DEFAULT = 0, 2632 2633 /// 2634 /// Verbose logging. 2635 /// 2636 LOGSEVERITY_VERBOSE = 1, 2637 2638 /// 2639 /// DEBUG logging. 2640 /// 2641 LOGSEVERITY_DEBUG = LOGSEVERITY_VERBOSE, 2642 2643 /// 2644 /// INFO logging. 2645 /// 2646 LOGSEVERITY_INFO = 2, 2647 2648 /// 2649 /// WARNING logging. 2650 /// 2651 LOGSEVERITY_WARNING = 3, 2652 2653 /// 2654 /// ERROR logging. 2655 /// 2656 LOGSEVERITY_ERROR = 4, 2657 2658 /// 2659 /// FATAL logging. 2660 /// 2661 LOGSEVERITY_FATAL = 5, 2662 2663 /// 2664 /// Disable logging to file for all messages, and to stderr for messages with 2665 /// severity less than FATAL. 2666 /// 2667 LOGSEVERITY_DISABLE = 99 2668 } 2669 2670 alias LOGSEVERITY_DEFAULT = cef_log_severity_t.LOGSEVERITY_DEFAULT; 2671 alias LOGSEVERITY_VERBOSE = cef_log_severity_t.LOGSEVERITY_VERBOSE; 2672 alias LOGSEVERITY_DEBUG = cef_log_severity_t.LOGSEVERITY_DEBUG; 2673 alias LOGSEVERITY_INFO = cef_log_severity_t.LOGSEVERITY_INFO; 2674 alias LOGSEVERITY_WARNING = cef_log_severity_t.LOGSEVERITY_WARNING; 2675 alias LOGSEVERITY_ERROR = cef_log_severity_t.LOGSEVERITY_ERROR; 2676 alias LOGSEVERITY_FATAL = cef_log_severity_t.LOGSEVERITY_FATAL; 2677 alias LOGSEVERITY_DISABLE = cef_log_severity_t.LOGSEVERITY_DISABLE; 2678 2679 /// 2680 /// Log items prepended to each log line. 2681 /// 2682 enum cef_log_items_t 2683 { 2684 /// 2685 /// Prepend the default list of items. 2686 /// 2687 LOG_ITEMS_DEFAULT = 0, 2688 2689 /// 2690 /// Prepend no items. 2691 /// 2692 LOG_ITEMS_NONE = 1, 2693 2694 /// 2695 /// Prepend the process ID. 2696 /// 2697 LOG_ITEMS_FLAG_PROCESS_ID = 1 << 1, 2698 2699 /// 2700 /// Prepend the thread ID. 2701 /// 2702 LOG_ITEMS_FLAG_THREAD_ID = 1 << 2, 2703 2704 /// 2705 /// Prepend the timestamp. 2706 /// 2707 LOG_ITEMS_FLAG_TIME_STAMP = 1 << 3, 2708 2709 /// 2710 /// Prepend the tickcount. 2711 /// 2712 LOG_ITEMS_FLAG_TICK_COUNT = 1 << 4 2713 } 2714 2715 alias LOG_ITEMS_DEFAULT = cef_log_items_t.LOG_ITEMS_DEFAULT; 2716 alias LOG_ITEMS_NONE = cef_log_items_t.LOG_ITEMS_NONE; 2717 alias LOG_ITEMS_FLAG_PROCESS_ID = cef_log_items_t.LOG_ITEMS_FLAG_PROCESS_ID; 2718 alias LOG_ITEMS_FLAG_THREAD_ID = cef_log_items_t.LOG_ITEMS_FLAG_THREAD_ID; 2719 alias LOG_ITEMS_FLAG_TIME_STAMP = cef_log_items_t.LOG_ITEMS_FLAG_TIME_STAMP; 2720 alias LOG_ITEMS_FLAG_TICK_COUNT = cef_log_items_t.LOG_ITEMS_FLAG_TICK_COUNT; 2721 2722 /// 2723 /// Represents the state of a setting. 2724 /// 2725 enum cef_state_t 2726 { 2727 /// 2728 /// Use the default state for the setting. 2729 /// 2730 STATE_DEFAULT = 0, 2731 2732 /// 2733 /// Enable or allow the setting. 2734 /// 2735 STATE_ENABLED = 1, 2736 2737 /// 2738 /// Disable or disallow the setting. 2739 /// 2740 STATE_DISABLED = 2 2741 } 2742 2743 alias STATE_DEFAULT = cef_state_t.STATE_DEFAULT; 2744 alias STATE_ENABLED = cef_state_t.STATE_ENABLED; 2745 alias STATE_DISABLED = cef_state_t.STATE_DISABLED; 2746 2747 /// 2748 /// Initialization settings. Specify NULL or 0 to get the recommended default 2749 /// values. Many of these and other settings can also configured using command- 2750 /// line switches. 2751 /// 2752 struct cef_settings_t 2753 { 2754 /// 2755 /// Size of this structure. 2756 /// 2757 size_t size; 2758 2759 /// 2760 /// Set to true (1) to disable the sandbox for sub-processes. See 2761 /// cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also 2762 /// configurable using the "no-sandbox" command-line switch. 2763 /// 2764 int no_sandbox; 2765 2766 /// 2767 /// The path to a separate executable that will be launched for sub-processes. 2768 /// If this value is empty on Windows or Linux then the main process 2769 /// executable will be used. If this value is empty on macOS then a helper 2770 /// executable must exist at "Contents/Frameworks/<app> 2771 /// Helper.app/Contents/MacOS/<app> Helper" in the top-level app bundle. See 2772 /// the comments on CefExecuteProcess() for details. If this value is 2773 /// non-empty then it must be an absolute path. Also configurable using the 2774 /// "browser-subprocess-path" command-line switch. 2775 /// 2776 cef_string_t browser_subprocess_path; 2777 2778 /// 2779 /// The path to the CEF framework directory on macOS. If this value is empty 2780 /// then the framework must exist at "Contents/Frameworks/Chromium Embedded 2781 /// Framework.framework" in the top-level app bundle. If this value is 2782 /// non-empty then it must be an absolute path. Also configurable using the 2783 /// "framework-dir-path" command-line switch. 2784 /// 2785 cef_string_t framework_dir_path; 2786 2787 /// 2788 /// The path to the main bundle on macOS. If this value is empty then it 2789 /// defaults to the top-level app bundle. If this value is non-empty then it 2790 /// must be an absolute path. Also configurable using the "main-bundle-path" 2791 /// command-line switch. 2792 /// 2793 cef_string_t main_bundle_path; 2794 2795 /// 2796 /// Set to true (1) to have the browser process message loop run in a separate 2797 /// thread. If false (0) then the CefDoMessageLoopWork() function must be 2798 /// called from your application message loop. This option is only supported 2799 /// on Windows and Linux. 2800 /// 2801 int multi_threaded_message_loop; 2802 2803 /// 2804 /// Set to true (1) to control browser process main (UI) thread message pump 2805 /// scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork() 2806 /// callback. This option is recommended for use in combination with the 2807 /// CefDoMessageLoopWork() function in cases where the CEF message loop must 2808 /// be integrated into an existing application message loop (see additional 2809 /// comments and warnings on CefDoMessageLoopWork). Enabling this option is 2810 /// not recommended for most users; leave this option disabled and use either 2811 /// the CefRunMessageLoop() function or multi_threaded_message_loop if 2812 /// possible. 2813 /// 2814 int external_message_pump; 2815 2816 /// 2817 /// Set to true (1) to enable windowless (off-screen) rendering support. Do 2818 /// not enable this value if the application does not use windowless rendering 2819 /// as it may reduce rendering performance on some systems. 2820 /// 2821 int windowless_rendering_enabled; 2822 2823 /// 2824 /// Set to true (1) to disable configuration of browser process features using 2825 /// standard CEF and Chromium command-line arguments. Configuration can still 2826 /// be specified using CEF data structures or via the 2827 /// CefApp::OnBeforeCommandLineProcessing() method. 2828 /// 2829 int command_line_args_disabled; 2830 2831 /// 2832 /// The directory where data for the global browser cache will be stored on 2833 /// disk. If this value is non-empty then it must be an absolute path that is 2834 /// either equal to or a child directory of CefSettings.root_cache_path. If 2835 /// this value is empty then browsers will be created in "incognito mode" 2836 /// where in-memory caches are used for storage and no profile-specific data 2837 /// is persisted to disk (installation-specific data will still be persisted 2838 /// in root_cache_path). HTML5 databases such as localStorage will only 2839 /// persist across sessions if a cache path is specified. Can be overridden 2840 /// for individual CefRequestContext instances via the 2841 /// CefRequestContextSettings.cache_path value. Any child directory value will 2842 /// be ignored and the "default" profile (also a child directory) will be used 2843 /// instead. 2844 /// 2845 cef_string_t cache_path; 2846 2847 /// 2848 /// The root directory for installation-specific data and the parent directory 2849 /// for profile-specific data. All CefSettings.cache_path and 2850 /// CefRequestContextSettings.cache_path values must have this parent 2851 /// directory in common. If this value is empty and CefSettings.cache_path is 2852 /// non-empty then it will default to the CefSettings.cache_path value. Any 2853 /// non-empty value must be an absolute path. If both values are empty then 2854 /// the default platform-specific directory will be used 2855 /// ("~/.config/cef_user_data" directory on Linux, "~/Library/Application 2856 /// Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data" 2857 /// directory under the user profile directory on Windows). Use of the default 2858 /// directory is not recommended in production applications (see below). 2859 /// 2860 /// Multiple application instances writing to the same root_cache_path 2861 /// directory could result in data corruption. A process singleton lock based 2862 /// on the root_cache_path value is therefore used to protect against this. 2863 /// This singleton behavior applies to all CEF-based applications using 2864 /// version 120 or newer. You should customize root_cache_path for your 2865 /// application and implement CefBrowserProcessHandler:: 2866 /// OnAlreadyRunningAppRelaunch, which will then be called on any app relaunch 2867 /// with the same root_cache_path value. 2868 /// 2869 /// Failure to set the root_cache_path value correctly may result in startup 2870 /// crashes or other unexpected behaviors (for example, the sandbox blocking 2871 /// read/write access to certain files). 2872 /// 2873 cef_string_t root_cache_path; 2874 2875 /// 2876 /// To persist session cookies (cookies without an expiry date or validity 2877 /// interval) by default when using the global cookie manager set this value 2878 /// to true (1). Session cookies are generally intended to be transient and 2879 /// most Web browsers do not persist them. A |cache_path| value must also be 2880 /// specified to enable this feature. Also configurable using the 2881 /// "persist-session-cookies" command-line switch. Can be overridden for 2882 /// individual CefRequestContext instances via the 2883 /// CefRequestContextSettings.persist_session_cookies value. 2884 /// 2885 int persist_session_cookies; 2886 2887 /// 2888 /// Value that will be returned as the User-Agent HTTP header. If empty the 2889 /// default User-Agent string will be used. Also configurable using the 2890 /// "user-agent" command-line switch. 2891 /// 2892 cef_string_t user_agent; 2893 2894 /// 2895 /// Value that will be inserted as the product portion of the default 2896 /// User-Agent string. If empty the Chromium product version will be used. If 2897 /// |userAgent| is specified this value will be ignored. Also configurable 2898 /// using the "user-agent-product" command-line switch. 2899 /// 2900 cef_string_t user_agent_product; 2901 2902 /// 2903 /// The locale string that will be passed to WebKit. If empty the default 2904 /// locale of "en-US" will be used. This value is ignored on Linux where 2905 /// locale is determined using environment variable parsing with the 2906 /// precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also 2907 /// configurable using the "lang" command-line switch. 2908 /// 2909 cef_string_t locale; 2910 2911 /// 2912 /// The directory and file name to use for the debug log. If empty a default 2913 /// log file name and location will be used. On Windows and Linux a 2914 /// "debug.log" file will be written in the main executable directory. On 2915 /// MacOS a "~/Library/Logs/[app name]_debug.log" file will be written where 2916 /// [app name] is the name of the main app executable. Also configurable using 2917 /// the "log-file" command-line switch. 2918 /// 2919 cef_string_t log_file; 2920 2921 /// 2922 /// The log severity. Only messages of this severity level or higher will be 2923 /// logged. When set to DISABLE no messages will be written to the log file, 2924 /// but FATAL messages will still be output to stderr. Also configurable using 2925 /// the "log-severity" command-line switch with a value of "verbose", "info", 2926 /// "warning", "error", "fatal" or "disable". 2927 /// 2928 cef_log_severity_t log_severity; 2929 2930 /// 2931 /// The log items prepended to each log line. If not set the default log items 2932 /// will be used. Also configurable using the "log-items" command-line switch 2933 /// with a value of "none" for no log items, or a comma-delimited list of 2934 /// values "pid", "tid", "timestamp" or "tickcount" for custom log items. 2935 /// 2936 cef_log_items_t log_items; 2937 2938 /// 2939 /// Custom flags that will be used when initializing the V8 JavaScript engine. 2940 /// The consequences of using custom flags may not be well tested. Also 2941 /// configurable using the "js-flags" command-line switch. 2942 /// 2943 cef_string_t javascript_flags; 2944 2945 /// 2946 /// The fully qualified path for the resources directory. If this value is 2947 /// empty the *.pak files must be located in the module directory on 2948 /// Windows/Linux or the app bundle Resources directory on MacOS. If this 2949 /// value is non-empty then it must be an absolute path. Also configurable 2950 /// using the "resources-dir-path" command-line switch. 2951 /// 2952 cef_string_t resources_dir_path; 2953 2954 /// 2955 /// The fully qualified path for the locales directory. If this value is empty 2956 /// the locales directory must be located in the module directory. If this 2957 /// value is non-empty then it must be an absolute path. This value is ignored 2958 /// on MacOS where pack files are always loaded from the app bundle Resources 2959 /// directory. Also configurable using the "locales-dir-path" command-line 2960 /// switch. 2961 /// 2962 cef_string_t locales_dir_path; 2963 2964 /// 2965 /// Set to a value between 1024 and 65535 to enable remote debugging on the 2966 /// specified port. Also configurable using the "remote-debugging-port" 2967 /// command-line switch. Specifying 0 via the command-line switch will result 2968 /// in the selection of an ephemeral port and the port number will be printed 2969 /// as part of the WebSocket endpoint URL to stderr. If a cache directory path 2970 /// is provided the port will also be written to the 2971 /// <cache-dir>/DevToolsActivePort file. Remote debugging can be accessed by 2972 /// loading the chrome://inspect page in Google Chrome. Port numbers 9222 and 2973 /// 9229 are discoverable by default. Other port numbers may need to be 2974 /// configured via "Discover network targets" on the Devices tab. 2975 /// 2976 int remote_debugging_port; 2977 2978 /// 2979 /// The number of stack trace frames to capture for uncaught exceptions. 2980 /// Specify a positive value to enable the 2981 /// CefRenderProcessHandler::OnUncaughtException() callback. Specify 0 2982 /// (default value) and OnUncaughtException() will not be called. Also 2983 /// configurable using the "uncaught-exception-stack-size" command-line 2984 /// switch. 2985 /// 2986 int uncaught_exception_stack_size; 2987 2988 /// 2989 /// Background color used for the browser before a document is loaded and when 2990 /// no document color is specified. The alpha component must be either fully 2991 /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully 2992 /// opaque then the RGB components will be used as the background color. If 2993 /// the alpha component is fully transparent for a windowed browser then the 2994 /// default value of opaque white be used. If the alpha component is fully 2995 /// transparent for a windowless (off-screen) browser then transparent 2996 /// painting will be enabled. 2997 /// 2998 cef_color_t background_color; 2999 3000 /// 3001 /// Comma delimited ordered list of language codes without any whitespace that 3002 /// will be used in the "Accept-Language" HTTP request header and 3003 /// "navigator.language" JS attribute. Can be overridden for individual 3004 /// CefRequestContext instances via the 3005 /// CefRequestContextSettings.accept_language_list value. 3006 /// 3007 cef_string_t accept_language_list; 3008 3009 /// 3010 /// Comma delimited list of schemes supported by the associated 3011 /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0) 3012 /// the default schemes ("http", "https", "ws" and "wss") will also be 3013 /// supported. Not specifying a |cookieable_schemes_list| value and setting 3014 /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading 3015 /// and saving of cookies. These settings will only impact the global 3016 /// CefRequestContext. Individual CefRequestContext instances can be 3017 /// configured via the CefRequestContextSettings.cookieable_schemes_list and 3018 /// CefRequestContextSettings.cookieable_schemes_exclude_defaults values. 3019 /// 3020 cef_string_t cookieable_schemes_list; 3021 int cookieable_schemes_exclude_defaults; 3022 3023 /// 3024 /// Specify an ID to enable Chrome policy management via Platform and OS-user 3025 /// policies. On Windows, this is a registry key like 3026 /// "SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like 3027 /// "com.google.Chrome". On Linux, this is an absolute directory path like 3028 /// "/etc/opt/chrome/policies". Only supported with Chrome style. See 3029 /// https://support.google.com/chrome/a/answer/9037717 for details. 3030 /// 3031 /// Chrome Browser Cloud Management integration, when enabled via the 3032 /// "enable-chrome-browser-cloud-management" command-line flag, will also use 3033 /// the specified ID. See https://support.google.com/chrome/a/answer/9116814 3034 /// for details. 3035 /// 3036 cef_string_t chrome_policy_id; 3037 3038 /// 3039 /// Specify an ID for an ICON resource that can be loaded from the main 3040 /// executable and used when creating default Chrome windows such as DevTools 3041 /// and Task Manager. If unspecified the default Chromium ICON (IDR_MAINFRAME 3042 /// [101]) will be loaded from libcef.dll. Only supported with Chrome style on 3043 /// Windows. 3044 /// 3045 int chrome_app_icon_id; 3046 3047 /// 3048 /// Specify whether signal handlers must be disabled on POSIX systems. 3049 /// 3050 int disable_signal_handlers; 3051 } 3052 3053 3054 3055 /// 3056 /// Request context initialization settings. Specify NULL or 0 to get the 3057 /// recommended default values. 3058 /// 3059 struct cef_request_context_settings_t 3060 { 3061 /// 3062 /// Size of this structure. 3063 /// 3064 size_t size; 3065 3066 /// 3067 /// The directory where cache data for this request context will be stored on 3068 /// disk. If this value is non-empty then it must be an absolute path that is 3069 /// either equal to or a child directory of CefSettings.root_cache_path. If 3070 /// this value is empty then browsers will be created in "incognito mode" 3071 /// where in-memory caches are used for storage and no profile-specific data 3072 /// is persisted to disk (installation-specific data will still be persisted 3073 /// in root_cache_path). HTML5 databases such as localStorage will only 3074 /// persist across sessions if a cache path is specified. To share the global 3075 /// browser cache and related configuration set this value to match the 3076 /// CefSettings.cache_path value. 3077 /// 3078 cef_string_t cache_path; 3079 3080 /// 3081 /// To persist session cookies (cookies without an expiry date or validity 3082 /// interval) by default when using the global cookie manager set this value 3083 /// to true (1). Session cookies are generally intended to be transient and 3084 /// most Web browsers do not persist them. Can be set globally using the 3085 /// CefSettings.persist_session_cookies value. This value will be ignored if 3086 /// |cache_path| is empty or if it matches the CefSettings.cache_path value. 3087 /// 3088 int persist_session_cookies; 3089 3090 /// 3091 /// Comma delimited ordered list of language codes without any whitespace that 3092 /// will be used in the "Accept-Language" HTTP request header and 3093 /// "navigator.language" JS attribute. Can be set globally using the 3094 /// CefSettings.accept_language_list value. If all values are empty then 3095 /// "en-US,en" will be used. This value will be ignored if |cache_path| 3096 /// matches the CefSettings.cache_path value. 3097 /// 3098 cef_string_t accept_language_list; 3099 3100 /// 3101 /// Comma delimited list of schemes supported by the associated 3102 /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0) 3103 /// the default schemes ("http", "https", "ws" and "wss") will also be 3104 /// supported. Not specifying a |cookieable_schemes_list| value and setting 3105 /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading 3106 /// and saving of cookies. These values will be ignored if |cache_path| 3107 /// matches the CefSettings.cache_path value. 3108 /// 3109 cef_string_t cookieable_schemes_list; 3110 int cookieable_schemes_exclude_defaults; 3111 } 3112 3113 3114 3115 /// 3116 /// Browser initialization settings. Specify NULL or 0 to get the recommended 3117 /// default values. The consequences of using custom values may not be well 3118 /// tested. Many of these and other settings can also configured using command- 3119 /// line switches. 3120 /// 3121 struct cef_browser_settings_t 3122 { 3123 /// 3124 /// Size of this structure. 3125 /// 3126 size_t size; 3127 3128 /// 3129 /// The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint 3130 /// will be called for a windowless browser. The actual fps may be lower if 3131 /// the browser cannot generate frames at the requested rate. The minimum 3132 /// value is 1 and the default value is 30. This value can also be changed 3133 /// dynamically via CefBrowserHost::SetWindowlessFrameRate. 3134 /// 3135 int windowless_frame_rate; 3136 3137 /// BEGIN values that map to WebPreferences settings. 3138 3139 /// 3140 /// Font settings. 3141 /// 3142 cef_string_t standard_font_family; 3143 cef_string_t fixed_font_family; 3144 cef_string_t serif_font_family; 3145 cef_string_t sans_serif_font_family; 3146 cef_string_t cursive_font_family; 3147 cef_string_t fantasy_font_family; 3148 int default_font_size; 3149 int default_fixed_font_size; 3150 int minimum_font_size; 3151 int minimum_logical_font_size; 3152 3153 /// 3154 /// Default encoding for Web content. If empty "ISO-8859-1" will be used. Also 3155 /// configurable using the "default-encoding" command-line switch. 3156 /// 3157 cef_string_t default_encoding; 3158 3159 /// 3160 /// Controls the loading of fonts from remote sources. Also configurable using 3161 /// the "disable-remote-fonts" command-line switch. 3162 /// 3163 cef_state_t remote_fonts; 3164 3165 /// 3166 /// Controls whether JavaScript can be executed. Also configurable using the 3167 /// "disable-javascript" command-line switch. 3168 /// 3169 cef_state_t javascript; 3170 3171 /// 3172 /// Controls whether JavaScript can be used to close windows that were not 3173 /// opened via JavaScript. JavaScript can still be used to close windows that 3174 /// were opened via JavaScript or that have no back/forward history. Also 3175 /// configurable using the "disable-javascript-close-windows" command-line 3176 /// switch. 3177 /// 3178 cef_state_t javascript_close_windows; 3179 3180 /// 3181 /// Controls whether JavaScript can access the clipboard. Also configurable 3182 /// using the "disable-javascript-access-clipboard" command-line switch. 3183 /// 3184 cef_state_t javascript_access_clipboard; 3185 3186 /// 3187 /// Controls whether DOM pasting is supported in the editor via 3188 /// execCommand("paste"). The |javascript_access_clipboard| setting must also 3189 /// be enabled. Also configurable using the "disable-javascript-dom-paste" 3190 /// command-line switch. 3191 /// 3192 cef_state_t javascript_dom_paste; 3193 3194 /// 3195 /// Controls whether image URLs will be loaded from the network. A cached 3196 /// image will still be rendered if requested. Also configurable using the 3197 /// "disable-image-loading" command-line switch. 3198 /// 3199 cef_state_t image_loading; 3200 3201 /// 3202 /// Controls whether standalone images will be shrunk to fit the page. Also 3203 /// configurable using the "image-shrink-standalone-to-fit" command-line 3204 /// switch. 3205 /// 3206 cef_state_t image_shrink_standalone_to_fit; 3207 3208 /// 3209 /// Controls whether text areas can be resized. Also configurable using the 3210 /// "disable-text-area-resize" command-line switch. 3211 /// 3212 cef_state_t text_area_resize; 3213 3214 /// 3215 /// Controls whether the tab key can advance focus to links. Also configurable 3216 /// using the "disable-tab-to-links" command-line switch. 3217 /// 3218 cef_state_t tab_to_links; 3219 3220 /// 3221 /// Controls whether local storage can be used. Also configurable using the 3222 /// "disable-local-storage" command-line switch. 3223 /// 3224 cef_state_t local_storage; 3225 3226 /// 3227 /// Controls whether databases can be used. Also configurable using the 3228 /// "disable-databases" command-line switch. 3229 /// 3230 3231 cef_state_t databases_deprecated; 3232 3233 /// 3234 /// Controls whether WebGL can be used. Note that WebGL requires hardware 3235 /// support and may not work on all systems even when enabled. Also 3236 /// configurable using the "disable-webgl" command-line switch. 3237 /// 3238 cef_state_t webgl; 3239 3240 /// END values that map to WebPreferences settings. 3241 3242 /// 3243 /// Background color used for the browser before a document is loaded and when 3244 /// no document color is specified. The alpha component must be either fully 3245 /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully 3246 /// opaque then the RGB components will be used as the background color. If 3247 /// the alpha component is fully transparent for a windowed browser then the 3248 /// CefSettings.background_color value will be used. If the alpha component is 3249 /// fully transparent for a windowless (off-screen) browser then transparent 3250 /// painting will be enabled. 3251 /// 3252 cef_color_t background_color; 3253 3254 /// 3255 /// Controls whether the Chrome status bubble will be used. Only supported 3256 /// with Chrome style. For details about the status bubble see 3257 /// https://www.chromium.org/user-experience/status-bubble/ 3258 /// 3259 cef_state_t chrome_status_bubble; 3260 3261 /// 3262 /// Controls whether the Chrome zoom bubble will be shown when zooming. Only 3263 /// supported with Chrome style. 3264 /// 3265 cef_state_t chrome_zoom_bubble; 3266 } 3267 3268 3269 3270 /// 3271 /// Return value types. 3272 /// 3273 enum cef_return_value_t 3274 { 3275 /// 3276 /// Cancel immediately. 3277 /// 3278 RV_CANCEL = 0, 3279 3280 /// 3281 /// Continue immediately. 3282 /// 3283 RV_CONTINUE = 1, 3284 3285 /// 3286 /// Continue asynchronously (usually via a callback). 3287 /// 3288 RV_CONTINUE_ASYNC = 2 3289 } 3290 3291 alias RV_CANCEL = cef_return_value_t.RV_CANCEL; 3292 alias RV_CONTINUE = cef_return_value_t.RV_CONTINUE; 3293 alias RV_CONTINUE_ASYNC = cef_return_value_t.RV_CONTINUE_ASYNC; 3294 3295 /// 3296 /// URL component parts. 3297 /// 3298 struct cef_urlparts_t 3299 { 3300 /// 3301 /// Size of this structure. 3302 /// 3303 size_t size; 3304 3305 /// 3306 /// The complete URL specification. 3307 /// 3308 cef_string_t spec; 3309 3310 /// 3311 /// Scheme component not including the colon (e.g., "http"). 3312 /// 3313 cef_string_t scheme; 3314 3315 /// 3316 /// User name component. 3317 /// 3318 cef_string_t username; 3319 3320 /// 3321 /// Password component. 3322 /// 3323 cef_string_t password; 3324 3325 /// 3326 /// Host component. This may be a hostname, an IPv4 address or an IPv6 literal 3327 /// surrounded by square brackets (e.g., "[2001:db8::1]"). 3328 /// 3329 cef_string_t host; 3330 3331 /// 3332 /// Port number component. 3333 /// 3334 cef_string_t port; 3335 3336 /// 3337 /// Origin contains just the scheme, host, and port from a URL. Equivalent to 3338 /// clearing any username and password, replacing the path with a slash, and 3339 /// clearing everything after that. This value will be empty for non-standard 3340 /// URLs. 3341 /// 3342 cef_string_t origin; 3343 3344 /// 3345 /// Path component including the first slash following the host. 3346 /// 3347 cef_string_t path; 3348 3349 /// 3350 /// Query string component (i.e., everything following the '?'). 3351 /// 3352 cef_string_t query; 3353 3354 /// 3355 /// Fragment (hash) identifier component (i.e., the string following the '#'). 3356 /// 3357 cef_string_t fragment; 3358 } 3359 3360 3361 3362 /// 3363 /// Cookie priority values. 3364 /// 3365 enum cef_cookie_priority_t 3366 { 3367 CEF_COOKIE_PRIORITY_LOW = -1, 3368 CEF_COOKIE_PRIORITY_MEDIUM = 0, 3369 CEF_COOKIE_PRIORITY_HIGH = 1 3370 } 3371 3372 alias CEF_COOKIE_PRIORITY_LOW = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_LOW; 3373 alias CEF_COOKIE_PRIORITY_MEDIUM = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_MEDIUM; 3374 alias CEF_COOKIE_PRIORITY_HIGH = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_HIGH; 3375 3376 /// 3377 /// Cookie same site values. 3378 /// 3379 enum cef_cookie_same_site_t 3380 { 3381 CEF_COOKIE_SAME_SITE_UNSPECIFIED = 0, 3382 CEF_COOKIE_SAME_SITE_NO_RESTRICTION = 1, 3383 CEF_COOKIE_SAME_SITE_LAX_MODE = 2, 3384 CEF_COOKIE_SAME_SITE_STRICT_MODE = 3, 3385 CEF_COOKIE_SAME_SITE_NUM_VALUES = 4 3386 } 3387 3388 alias CEF_COOKIE_SAME_SITE_UNSPECIFIED = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_UNSPECIFIED; 3389 alias CEF_COOKIE_SAME_SITE_NO_RESTRICTION = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_NO_RESTRICTION; 3390 alias CEF_COOKIE_SAME_SITE_LAX_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_LAX_MODE; 3391 alias CEF_COOKIE_SAME_SITE_STRICT_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_STRICT_MODE; 3392 alias CEF_COOKIE_SAME_SITE_NUM_VALUES = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_NUM_VALUES; 3393 3394 /// 3395 /// Cookie information. 3396 /// 3397 struct cef_cookie_t 3398 { 3399 /// 3400 /// Size of this structure. 3401 /// 3402 size_t size; 3403 3404 /// 3405 /// The cookie name. 3406 /// 3407 cef_string_t name; 3408 3409 /// 3410 /// The cookie value. 3411 /// 3412 cef_string_t value; 3413 3414 /// 3415 /// If |domain| is empty a host cookie will be created instead of a domain 3416 /// cookie. Domain cookies are stored with a leading "." and are visible to 3417 /// sub-domains whereas host cookies are not. 3418 /// 3419 cef_string_t domain; 3420 3421 /// 3422 /// If |path| is non-empty only URLs at or below the path will get the cookie 3423 /// value. 3424 /// 3425 cef_string_t path; 3426 3427 /// 3428 /// If |secure| is true the cookie will only be sent for HTTPS requests. 3429 /// 3430 int secure; 3431 3432 /// 3433 /// If |httponly| is true the cookie will only be sent for HTTP requests. 3434 /// 3435 int httponly; 3436 3437 /// 3438 /// The cookie creation date. This is automatically populated by the system on 3439 /// cookie creation. 3440 /// 3441 3442 cef_basetime_t creation; 3443 3444 /// 3445 /// The cookie last access date. This is automatically populated by the system 3446 /// on access. 3447 /// 3448 cef_basetime_t last_access; 3449 3450 /// 3451 /// The cookie expiration date is only valid if |has_expires| is true. 3452 /// 3453 int has_expires; 3454 cef_basetime_t expires; 3455 3456 /// 3457 /// Same site. 3458 /// 3459 cef_cookie_same_site_t same_site; 3460 3461 /// 3462 /// Priority. 3463 /// 3464 cef_cookie_priority_t priority; 3465 } 3466 3467 3468 3469 /// 3470 /// Process termination status values. 3471 /// 3472 enum cef_termination_status_t 3473 { 3474 /// 3475 /// Non-zero exit status. 3476 /// 3477 TS_ABNORMAL_TERMINATION = 0, 3478 3479 /// 3480 /// SIGKILL or task manager kill. 3481 /// 3482 TS_PROCESS_WAS_KILLED = 1, 3483 3484 /// 3485 /// Segmentation fault. 3486 /// 3487 TS_PROCESS_CRASHED = 2, 3488 3489 /// 3490 /// Out of memory. Some platforms may use TS_PROCESS_CRASHED instead. 3491 /// 3492 TS_PROCESS_OOM = 3, 3493 3494 /// 3495 /// Child process never launched. 3496 /// 3497 TS_LAUNCH_FAILED = 4, 3498 3499 /// 3500 /// On Windows, the OS terminated the process due to code integrity failure. 3501 /// 3502 TS_INTEGRITY_FAILURE = 5, 3503 3504 TS_NUM_VALUES = 6 3505 } 3506 3507 alias TS_ABNORMAL_TERMINATION = cef_termination_status_t.TS_ABNORMAL_TERMINATION; 3508 alias TS_PROCESS_WAS_KILLED = cef_termination_status_t.TS_PROCESS_WAS_KILLED; 3509 alias TS_PROCESS_CRASHED = cef_termination_status_t.TS_PROCESS_CRASHED; 3510 alias TS_PROCESS_OOM = cef_termination_status_t.TS_PROCESS_OOM; 3511 alias TS_LAUNCH_FAILED = cef_termination_status_t.TS_LAUNCH_FAILED; 3512 alias TS_INTEGRITY_FAILURE = cef_termination_status_t.TS_INTEGRITY_FAILURE; 3513 alias TS_NUM_VALUES = cef_termination_status_t.TS_NUM_VALUES; 3514 3515 /// 3516 /// Path key values. 3517 /// 3518 enum cef_path_key_t 3519 { 3520 /// 3521 /// Current directory. 3522 /// 3523 PK_DIR_CURRENT = 0, 3524 3525 /// 3526 /// Directory containing PK_FILE_EXE. 3527 /// 3528 PK_DIR_EXE = 1, 3529 3530 /// 3531 /// Directory containing PK_FILE_MODULE. 3532 /// 3533 PK_DIR_MODULE = 2, 3534 3535 /// 3536 /// Temporary directory. 3537 /// 3538 PK_DIR_TEMP = 3, 3539 3540 /// 3541 /// Path and filename of the current executable. 3542 /// 3543 PK_FILE_EXE = 4, 3544 3545 /// 3546 /// Path and filename of the module containing the CEF code (usually the 3547 /// libcef module). 3548 /// 3549 PK_FILE_MODULE = 5, 3550 3551 /// 3552 /// "Local Settings\Application Data" directory under the user profile 3553 /// directory on Windows. 3554 /// 3555 PK_LOCAL_APP_DATA = 6, 3556 3557 /// 3558 /// "Application Data" directory under the user profile directory on Windows 3559 /// and "~/Library/Application Support" directory on MacOS. 3560 /// 3561 PK_USER_DATA = 7, 3562 3563 /// 3564 /// Directory containing application resources. Can be configured via 3565 /// CefSettings.resources_dir_path. 3566 /// 3567 PK_DIR_RESOURCES = 8, 3568 3569 PK_NUM_VALUES = 9 3570 } 3571 3572 alias PK_DIR_CURRENT = cef_path_key_t.PK_DIR_CURRENT; 3573 alias PK_DIR_EXE = cef_path_key_t.PK_DIR_EXE; 3574 alias PK_DIR_MODULE = cef_path_key_t.PK_DIR_MODULE; 3575 alias PK_DIR_TEMP = cef_path_key_t.PK_DIR_TEMP; 3576 alias PK_FILE_EXE = cef_path_key_t.PK_FILE_EXE; 3577 alias PK_FILE_MODULE = cef_path_key_t.PK_FILE_MODULE; 3578 alias PK_LOCAL_APP_DATA = cef_path_key_t.PK_LOCAL_APP_DATA; 3579 alias PK_USER_DATA = cef_path_key_t.PK_USER_DATA; 3580 alias PK_DIR_RESOURCES = cef_path_key_t.PK_DIR_RESOURCES; 3581 alias PK_NUM_VALUES = cef_path_key_t.PK_NUM_VALUES; 3582 3583 /// 3584 /// Storage types. 3585 /// 3586 enum cef_storage_type_t 3587 { 3588 ST_LOCALSTORAGE = 0, 3589 ST_SESSIONSTORAGE = 1 3590 } 3591 3592 alias ST_LOCALSTORAGE = cef_storage_type_t.ST_LOCALSTORAGE; 3593 alias ST_SESSIONSTORAGE = cef_storage_type_t.ST_SESSIONSTORAGE; 3594 3595 /// 3596 /// Supported error code values. For the complete list of error values see 3597 /// "include/base/internal/cef_net_error_list.h". 3598 /// 3599 enum cef_errorcode_t 3600 { 3601 // No error. 3602 ERR_NONE = 0, 3603 ERR_IO_PENDING = -1, 3604 ERR_FAILED = -2, 3605 ERR_ABORTED = -3, 3606 ERR_INVALID_ARGUMENT = -4, 3607 ERR_INVALID_HANDLE = -5, 3608 ERR_FILE_NOT_FOUND = -6, 3609 ERR_TIMED_OUT = -7, 3610 ERR_FILE_TOO_BIG = -8, 3611 ERR_UNEXPECTED = -9, 3612 ERR_ACCESS_DENIED = -10, 3613 ERR_NOT_IMPLEMENTED = -11, 3614 ERR_INSUFFICIENT_RESOURCES = -12, 3615 ERR_OUT_OF_MEMORY = -13, 3616 ERR_UPLOAD_FILE_CHANGED = -14, 3617 ERR_SOCKET_NOT_CONNECTED = -15, 3618 ERR_FILE_EXISTS = -16, 3619 ERR_FILE_PATH_TOO_LONG = -17, 3620 ERR_FILE_NO_SPACE = -18, 3621 ERR_FILE_VIRUS_INFECTED = -19, 3622 ERR_BLOCKED_BY_CLIENT = -20, 3623 ERR_NETWORK_CHANGED = -21, 3624 ERR_BLOCKED_BY_ADMINISTRATOR = -22, 3625 ERR_SOCKET_IS_CONNECTED = -23, 3626 ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25, 3627 ERR_CONTEXT_SHUT_DOWN = -26, 3628 ERR_BLOCKED_BY_RESPONSE = -27, 3629 ERR_CLEARTEXT_NOT_PERMITTED = -29, 3630 ERR_BLOCKED_BY_CSP = -30, 3631 ERR_BLOCKED_BY_ORB = -32, 3632 ERR_NETWORK_ACCESS_REVOKED = -33, 3633 ERR_BLOCKED_BY_FINGERPRINTING_PROTECTION = -34, 3634 ERR_CONNECTION_CLOSED = -100, 3635 ERR_CONNECTION_RESET = -101, 3636 ERR_CONNECTION_REFUSED = -102, 3637 ERR_CONNECTION_ABORTED = -103, 3638 ERR_CONNECTION_FAILED = -104, 3639 ERR_NAME_NOT_RESOLVED = -105, 3640 ERR_INTERNET_DISCONNECTED = -106, 3641 ERR_SSL_PROTOCOL_ERROR = -107, 3642 ERR_ADDRESS_INVALID = -108, 3643 ERR_ADDRESS_UNREACHABLE = -109, 3644 ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, 3645 ERR_TUNNEL_CONNECTION_FAILED = -111, 3646 ERR_NO_SSL_VERSIONS_ENABLED = -112, 3647 ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, 3648 ERR_SSL_RENEGOTIATION_REQUESTED = -114, 3649 ERR_PROXY_AUTH_UNSUPPORTED = -115, 3650 ERR_BAD_SSL_CLIENT_AUTH_CERT = -117, 3651 ERR_CONNECTION_TIMED_OUT = -118, 3652 ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119, 3653 ERR_SOCKS_CONNECTION_FAILED = -120, 3654 ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121, 3655 ERR_ALPN_NEGOTIATION_FAILED = -122, 3656 ERR_SSL_NO_RENEGOTIATION = -123, 3657 ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124, 3658 ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125, 3659 ERR_SSL_BAD_RECORD_MAC_ALERT = -126, 3660 ERR_PROXY_AUTH_REQUESTED = -127, 3661 ERR_PROXY_CONNECTION_FAILED = -130, 3662 ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131, 3663 ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133, 3664 ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134, 3665 ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135, 3666 ERR_PROXY_CERTIFICATE_INVALID = -136, 3667 ERR_NAME_RESOLUTION_FAILED = -137, 3668 ERR_NETWORK_ACCESS_DENIED = -138, 3669 ERR_TEMPORARILY_THROTTLED = -139, 3670 ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140, 3671 ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141, 3672 ERR_MSG_TOO_BIG = -142, 3673 ERR_WS_PROTOCOL_ERROR = -145, 3674 ERR_ADDRESS_IN_USE = -147, 3675 ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148, 3676 ERR_SSL_BAD_PEER_PUBLIC_KEY = -149, 3677 ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150, 3678 ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151, 3679 ERR_SSL_DECRYPT_ERROR_ALERT = -153, 3680 ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154, 3681 ERR_SSL_SERVER_CERT_CHANGED = -156, 3682 ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159, 3683 ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160, 3684 ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161, 3685 ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162, 3686 ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163, 3687 ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164, 3688 ERR_ICANN_NAME_COLLISION = -166, 3689 ERR_SSL_SERVER_CERT_BAD_FORMAT = -167, 3690 ERR_CT_STH_PARSING_FAILED = -168, 3691 ERR_CT_STH_INCOMPLETE = -169, 3692 ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170, 3693 ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171, 3694 ERR_SSL_OBSOLETE_CIPHER = -172, 3695 ERR_WS_UPGRADE = -173, 3696 ERR_READ_IF_READY_NOT_IMPLEMENTED = -174, 3697 ERR_NO_BUFFER_SPACE = -176, 3698 ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177, 3699 ERR_EARLY_DATA_REJECTED = -178, 3700 ERR_WRONG_VERSION_ON_EARLY_DATA = -179, 3701 ERR_TLS13_DOWNGRADE_DETECTED = -180, 3702 ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181, 3703 ERR_INVALID_ECH_CONFIG_LIST = -182, 3704 ERR_ECH_NOT_NEGOTIATED = -183, 3705 ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184, 3706 ERR_PROXY_UNABLE_TO_CONNECT_TO_DESTINATION = -186, 3707 ERR_CERT_COMMON_NAME_INVALID = -200, 3708 ERR_CERT_DATE_INVALID = -201, 3709 ERR_CERT_AUTHORITY_INVALID = -202, 3710 ERR_CERT_CONTAINS_ERRORS = -203, 3711 ERR_CERT_NO_REVOCATION_MECHANISM = -204, 3712 ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, 3713 ERR_CERT_REVOKED = -206, 3714 ERR_CERT_INVALID = -207, 3715 ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208, 3716 ERR_CERT_NON_UNIQUE_NAME = -210, 3717 ERR_CERT_WEAK_KEY = -211, 3718 ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212, 3719 ERR_CERT_VALIDITY_TOO_LONG = -213, 3720 ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214, 3721 ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217, 3722 ERR_CERT_SELF_SIGNED_LOCAL_NETWORK = -219, 3723 ERR_CERT_END = -220, 3724 ERR_INVALID_URL = -300, 3725 ERR_DISALLOWED_URL_SCHEME = -301, 3726 ERR_UNKNOWN_URL_SCHEME = -302, 3727 ERR_INVALID_REDIRECT = -303, 3728 ERR_TOO_MANY_REDIRECTS = -310, 3729 ERR_UNSAFE_REDIRECT = -311, 3730 ERR_UNSAFE_PORT = -312, 3731 ERR_INVALID_RESPONSE = -320, 3732 ERR_INVALID_CHUNKED_ENCODING = -321, 3733 ERR_METHOD_NOT_SUPPORTED = -322, 3734 ERR_UNEXPECTED_PROXY_AUTH = -323, 3735 ERR_EMPTY_RESPONSE = -324, 3736 ERR_RESPONSE_HEADERS_TOO_BIG = -325, 3737 ERR_PAC_SCRIPT_FAILED = -327, 3738 ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328, 3739 ERR_MALFORMED_IDENTITY = -329, 3740 ERR_CONTENT_DECODING_FAILED = -330, 3741 ERR_NETWORK_IO_SUSPENDED = -331, 3742 ERR_SYN_REPLY_NOT_RECEIVED = -332, 3743 ERR_ENCODING_CONVERSION_FAILED = -333, 3744 ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334, 3745 ERR_NO_SUPPORTED_PROXIES = -336, 3746 ERR_HTTP2_PROTOCOL_ERROR = -337, 3747 ERR_INVALID_AUTH_CREDENTIALS = -338, 3748 ERR_UNSUPPORTED_AUTH_SCHEME = -339, 3749 ERR_ENCODING_DETECTION_FAILED = -340, 3750 ERR_MISSING_AUTH_CREDENTIALS = -341, 3751 ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342, 3752 ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343, 3753 ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344, 3754 ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345, 3755 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346, 3756 ERR_INCOMPLETE_HTTP2_HEADERS = -347, 3757 ERR_PAC_NOT_IN_DHCP = -348, 3758 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349, 3759 ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350, 3760 ERR_HTTP2_SERVER_REFUSED_STREAM = -351, 3761 ERR_HTTP2_PING_FAILED = -352, 3762 ERR_CONTENT_LENGTH_MISMATCH = -354, 3763 ERR_INCOMPLETE_CHUNKED_ENCODING = -355, 3764 ERR_QUIC_PROTOCOL_ERROR = -356, 3765 ERR_RESPONSE_HEADERS_TRUNCATED = -357, 3766 ERR_QUIC_HANDSHAKE_FAILED = -358, 3767 ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360, 3768 ERR_HTTP2_FLOW_CONTROL_ERROR = -361, 3769 ERR_HTTP2_FRAME_SIZE_ERROR = -362, 3770 ERR_HTTP2_COMPRESSION_ERROR = -363, 3771 ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364, 3772 ERR_HTTP_1_1_REQUIRED = -365, 3773 ERR_PROXY_HTTP_1_1_REQUIRED = -366, 3774 ERR_PAC_SCRIPT_TERMINATED = -367, 3775 ERR_PROXY_REQUIRED = -368, 3776 ERR_INVALID_HTTP_RESPONSE = -370, 3777 ERR_CONTENT_DECODING_INIT_FAILED = -371, 3778 ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372, 3779 ERR_TOO_MANY_RETRIES = -375, 3780 ERR_HTTP2_STREAM_CLOSED = -376, 3781 ERR_HTTP_RESPONSE_CODE_FAILURE = -379, 3782 ERR_QUIC_CERT_ROOT_NOT_KNOWN = -380, 3783 ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381, 3784 ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382, 3785 ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383, 3786 ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY = -384, 3787 ERR_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_CHECKS = -385, 3788 ERR_ZSTD_WINDOW_SIZE_TOO_BIG = -386, 3789 ERR_DICTIONARY_LOAD_FAILED = -387, 3790 ERR_UNEXPECTED_CONTENT_DICTIONARY_HEADER = -388, 3791 ERR_CACHE_MISS = -400, 3792 ERR_CACHE_READ_FAILURE = -401, 3793 ERR_CACHE_WRITE_FAILURE = -402, 3794 ERR_CACHE_OPERATION_NOT_SUPPORTED = -403, 3795 ERR_CACHE_OPEN_FAILURE = -404, 3796 ERR_CACHE_CREATE_FAILURE = -405, 3797 ERR_CACHE_RACE = -406, 3798 3799 /// 3800 /// Supported certificate status code values. See net\cert\cert_status_flags.h 3801 /// for more information. CERT_STATUS_NONE is new in CEF because we use an 3802 /// enum while cert_status_flags.h uses a typedef and static const variables. 3803 ERR_CACHE_CHECKSUM_READ_FAILURE = -407, 3804 /// 3805 3806 // 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP). 3807 ERR_CACHE_CHECKSUM_MISMATCH = -408, 3808 ERR_CACHE_LOCK_TIMEOUT = -409, 3809 3810 // 1 << 9 was used for CERT_STATUS_NOT_IN_DNS 3811 ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410, 3812 3813 // 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY 3814 3815 // Bits 16 to 31 are for non-error statuses. 3816 ERR_CACHE_ENTRY_NOT_SUITABLE = -411, 3817 ERR_CACHE_DOOM_FAILURE = -412, 3818 3819 // Bit 18 was CERT_STATUS_IS_DNSSEC 3820 ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413, 3821 3822 /// 3823 /// Process result codes. This is not a comprehensive list, as result codes 3824 ERR_INSECURE_RESPONSE = -501, 3825 /// might also include platform-specific crash values (Posix signal or Windows 3826 /// hardware exception), or internal-only implementation values. 3827 ERR_NO_PRIVATE_KEY_FOR_CERT = -502, 3828 /// 3829 3830 // The following values should be kept in sync with Chromium's 3831 ERR_ADD_USER_CERT_FAILED = -503, 3832 // content::ResultCode type. 3833 3834 /// Process was killed by user or system. 3835 ERR_INVALID_SIGNED_EXCHANGE = -504, 3836 3837 /// Process hung. 3838 3839 /// A bad message caused the process termination. 3840 ERR_INVALID_WEB_BUNDLE = -505, 3841 3842 /// The GPU process exited because initialization failed. 3843 3844 // The following values should be kept in sync with Chromium's 3845 ERR_TRUST_TOKEN_OPERATION_FAILED = -506, 3846 // chrome::ResultCode type. Unused chrome values are excluded. 3847 3848 /// The process is of an unknown type. 3849 3850 /// A critical chrome file is missing. 3851 3852 /// Command line parameter is not supported. 3853 ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507, 3854 3855 /// The profile was in use on another host. 3856 3857 /// Failed to pack an extension via the command line. 3858 3859 /// The browser process exited early by passing the command line to another 3860 /// running browser. 3861 3862 /// A browser process was sandboxed. This should never happen. 3863 3864 /// Cloud policy enrollment failed or was given up by user. 3865 3866 /// The GPU process was terminated due to context lost. 3867 ERR_PKCS12_IMPORT_BAD_PASSWORD = -701, 3868 ERR_PKCS12_IMPORT_FAILED = -702, 3869 3870 /// An early startup command was executed and the browser must exit. 3871 ERR_IMPORT_CA_CERT_NOT_CA = -703, 3872 3873 /// The browser process exited because system resources are exhausted. The 3874 /// system state can't be recovered and will be unstable. 3875 ERR_IMPORT_CERT_ALREADY_EXISTS = -704, 3876 3877 /// The browser process exited because it was re-launched without elevation. 3878 ERR_IMPORT_CA_CERT_FAILED = -705, 3879 ERR_IMPORT_SERVER_CERT_FAILED = -706, 3880 3881 /// Upon encountering a commit failure in a process, PartitionAlloc terminated 3882 ERR_PKCS12_IMPORT_INVALID_MAC = -707, 3883 /// another process deemed less important. 3884 ERR_PKCS12_IMPORT_INVALID_FILE = -708, 3885 ERR_PKCS12_IMPORT_UNSUPPORTED = -709, 3886 ERR_KEY_GENERATION_FAILED = -710, 3887 3888 // The following values should be kept in sync with Chromium's 3889 // sandbox::TerminationCodes type. 3890 ERR_PRIVATE_KEY_EXPORT_FAILED = -712, 3891 3892 /// Windows sandbox could not set the integrity level. 3893 ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713, 3894 3895 /// Windows sandbox could not lower the token. 3896 ERR_CERT_DATABASE_CHANGED = -714, 3897 3898 /// Windows sandbox failed to flush registry handles. 3899 ERR_CERT_VERIFIER_CHANGED = -716, 3900 3901 /// Windows sandbox failed to forbid HCKU caching. 3902 ERR_DNS_MALFORMED_RESPONSE = -800, 3903 3904 /// Windows sandbox failed to close pending handles. 3905 ERR_DNS_SERVER_REQUIRES_TCP = -801, 3906 3907 /// Windows sandbox could not set the mitigation policy. 3908 3909 /// Windows sandbox exceeded the job memory limit. 3910 3911 /// Windows sandbox failed to warmup. 3912 3913 // Windows sandbox broker terminated in shutdown. 3914 ERR_DNS_SERVER_FAILED = -802, 3915 3916 /// 3917 /// The manner in which a link click should be opened. These constants match 3918 ERR_DNS_TIMED_OUT = -803, 3919 /// their equivalents in Chromium's window_open_disposition.h and should not be 3920 /// renumbered. 3921 /// 3922 3923 /// 3924 /// Current tab. This is the default in most cases. 3925 /// 3926 3927 /// 3928 /// Indicates that only one tab with the url should exist in the same window. 3929 ERR_DNS_CACHE_MISS = -804, 3930 /// 3931 3932 /// 3933 ERR_DNS_SEARCH_EMPTY = -805, 3934 /// Shift key + Middle mouse button or meta/ctrl key while clicking. 3935 /// 3936 ERR_DNS_SORT_ERROR = -806, 3937 3938 /// 3939 /// Middle mouse button or meta/ctrl key while clicking. 3940 /// 3941 3942 /// 3943 /// New popup window. 3944 ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808, 3945 /// 3946 3947 /// 3948 /// Shift key while clicking. 3949 /// 3950 3951 /// 3952 /// Alt key while clicking. 3953 /// 3954 3955 /// 3956 /// New off-the-record (incognito) window. 3957 /// 3958 ERR_DNS_NAME_HTTPS_ONLY = -809, 3959 3960 /// 3961 /// Special case error condition from the renderer. 3962 /// 3963 ERR_DNS_REQUEST_CANCELLED = -810, 3964 3965 /// 3966 /// Activates an existing tab containing the url, rather than navigating. 3967 /// This is similar to SINGLETON_TAB, but searches across all windows from 3968 ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811, 3969 /// the current profile and anonymity (instead of just the current one); 3970 /// closes the current tab on switching if the current tab was the NTP with 3971 /// no session history; and behaves like CURRENT_TAB instead of 3972 /// NEW_FOREGROUND_TAB when no existing tab is found. 3973 ERR_DNS_SECURE_PROBE_RECORD_INVALID = -814, 3974 /// 3975 3976 /// 3977 /// Creates a new document picture-in-picture window showing a child WebView. 3978 /// 3979 ERR_BLOB_INVALID_CONSTRUCTION_ARGUMENTS = -900, 3980 3981 /// 3982 /// "Verb" of a drag-and-drop operation as negotiated between the source and 3983 ERR_BLOB_OUT_OF_MEMORY = -901, 3984 /// destination. These constants match their equivalents in WebCore's 3985 /// DragActions.h and should not be renumbered. 3986 ERR_BLOB_FILE_WRITE_FAILED = -902, 3987 /// 3988 ERR_BLOB_SOURCE_DIED_IN_TRANSIT = -903, 3989 3990 /// 3991 /// Input mode of a virtual keyboard. These constants match their equivalents 3992 ERR_BLOB_DEREFERENCED_WHILE_BUILDING = -904, 3993 /// in Chromium's text_input_mode.h and should not be renumbered. 3994 /// See https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute 3995 /// 3996 ERR_BLOB_REFERENCED_BLOB_BROKEN = -905, 3997 ERR_BLOB_REFERENCED_FILE_UNAVAILABLE = -906 3998 } 3999 4000 alias ERR_NONE = cef_errorcode_t.ERR_NONE; 4001 alias ERR_IO_PENDING = cef_errorcode_t.ERR_IO_PENDING; 4002 alias ERR_FAILED = cef_errorcode_t.ERR_FAILED; 4003 alias ERR_ABORTED = cef_errorcode_t.ERR_ABORTED; 4004 alias ERR_INVALID_ARGUMENT = cef_errorcode_t.ERR_INVALID_ARGUMENT; 4005 alias ERR_INVALID_HANDLE = cef_errorcode_t.ERR_INVALID_HANDLE; 4006 alias ERR_FILE_NOT_FOUND = cef_errorcode_t.ERR_FILE_NOT_FOUND; 4007 alias ERR_TIMED_OUT = cef_errorcode_t.ERR_TIMED_OUT; 4008 alias ERR_FILE_TOO_BIG = cef_errorcode_t.ERR_FILE_TOO_BIG; 4009 alias ERR_UNEXPECTED = cef_errorcode_t.ERR_UNEXPECTED; 4010 alias ERR_ACCESS_DENIED = cef_errorcode_t.ERR_ACCESS_DENIED; 4011 alias ERR_NOT_IMPLEMENTED = cef_errorcode_t.ERR_NOT_IMPLEMENTED; 4012 alias ERR_INSUFFICIENT_RESOURCES = cef_errorcode_t.ERR_INSUFFICIENT_RESOURCES; 4013 alias ERR_OUT_OF_MEMORY = cef_errorcode_t.ERR_OUT_OF_MEMORY; 4014 alias ERR_UPLOAD_FILE_CHANGED = cef_errorcode_t.ERR_UPLOAD_FILE_CHANGED; 4015 alias ERR_SOCKET_NOT_CONNECTED = cef_errorcode_t.ERR_SOCKET_NOT_CONNECTED; 4016 alias ERR_FILE_EXISTS = cef_errorcode_t.ERR_FILE_EXISTS; 4017 alias ERR_FILE_PATH_TOO_LONG = cef_errorcode_t.ERR_FILE_PATH_TOO_LONG; 4018 alias ERR_FILE_NO_SPACE = cef_errorcode_t.ERR_FILE_NO_SPACE; 4019 alias ERR_FILE_VIRUS_INFECTED = cef_errorcode_t.ERR_FILE_VIRUS_INFECTED; 4020 alias ERR_BLOCKED_BY_CLIENT = cef_errorcode_t.ERR_BLOCKED_BY_CLIENT; 4021 alias ERR_NETWORK_CHANGED = cef_errorcode_t.ERR_NETWORK_CHANGED; 4022 alias ERR_BLOCKED_BY_ADMINISTRATOR = cef_errorcode_t.ERR_BLOCKED_BY_ADMINISTRATOR; 4023 alias ERR_SOCKET_IS_CONNECTED = cef_errorcode_t.ERR_SOCKET_IS_CONNECTED; 4024 alias ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = cef_errorcode_t.ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED; 4025 alias ERR_CONTEXT_SHUT_DOWN = cef_errorcode_t.ERR_CONTEXT_SHUT_DOWN; 4026 alias ERR_BLOCKED_BY_RESPONSE = cef_errorcode_t.ERR_BLOCKED_BY_RESPONSE; 4027 alias ERR_CLEARTEXT_NOT_PERMITTED = cef_errorcode_t.ERR_CLEARTEXT_NOT_PERMITTED; 4028 alias ERR_BLOCKED_BY_CSP = cef_errorcode_t.ERR_BLOCKED_BY_CSP; 4029 alias ERR_BLOCKED_BY_ORB = cef_errorcode_t.ERR_BLOCKED_BY_ORB; 4030 alias ERR_NETWORK_ACCESS_REVOKED = cef_errorcode_t.ERR_NETWORK_ACCESS_REVOKED; 4031 alias ERR_BLOCKED_BY_FINGERPRINTING_PROTECTION = cef_errorcode_t.ERR_BLOCKED_BY_FINGERPRINTING_PROTECTION; 4032 alias ERR_CONNECTION_CLOSED = cef_errorcode_t.ERR_CONNECTION_CLOSED; 4033 alias ERR_CONNECTION_RESET = cef_errorcode_t.ERR_CONNECTION_RESET; 4034 alias ERR_CONNECTION_REFUSED = cef_errorcode_t.ERR_CONNECTION_REFUSED; 4035 alias ERR_CONNECTION_ABORTED = cef_errorcode_t.ERR_CONNECTION_ABORTED; 4036 alias ERR_CONNECTION_FAILED = cef_errorcode_t.ERR_CONNECTION_FAILED; 4037 alias ERR_NAME_NOT_RESOLVED = cef_errorcode_t.ERR_NAME_NOT_RESOLVED; 4038 alias ERR_INTERNET_DISCONNECTED = cef_errorcode_t.ERR_INTERNET_DISCONNECTED; 4039 alias ERR_SSL_PROTOCOL_ERROR = cef_errorcode_t.ERR_SSL_PROTOCOL_ERROR; 4040 alias ERR_ADDRESS_INVALID = cef_errorcode_t.ERR_ADDRESS_INVALID; 4041 alias ERR_ADDRESS_UNREACHABLE = cef_errorcode_t.ERR_ADDRESS_UNREACHABLE; 4042 alias ERR_SSL_CLIENT_AUTH_CERT_NEEDED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NEEDED; 4043 alias ERR_TUNNEL_CONNECTION_FAILED = cef_errorcode_t.ERR_TUNNEL_CONNECTION_FAILED; 4044 alias ERR_NO_SSL_VERSIONS_ENABLED = cef_errorcode_t.ERR_NO_SSL_VERSIONS_ENABLED; 4045 alias ERR_SSL_VERSION_OR_CIPHER_MISMATCH = cef_errorcode_t.ERR_SSL_VERSION_OR_CIPHER_MISMATCH; 4046 alias ERR_SSL_RENEGOTIATION_REQUESTED = cef_errorcode_t.ERR_SSL_RENEGOTIATION_REQUESTED; 4047 alias ERR_PROXY_AUTH_UNSUPPORTED = cef_errorcode_t.ERR_PROXY_AUTH_UNSUPPORTED; 4048 alias ERR_BAD_SSL_CLIENT_AUTH_CERT = cef_errorcode_t.ERR_BAD_SSL_CLIENT_AUTH_CERT; 4049 alias ERR_CONNECTION_TIMED_OUT = cef_errorcode_t.ERR_CONNECTION_TIMED_OUT; 4050 alias ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_HOST_RESOLVER_QUEUE_TOO_LARGE; 4051 alias ERR_SOCKS_CONNECTION_FAILED = cef_errorcode_t.ERR_SOCKS_CONNECTION_FAILED; 4052 alias ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = cef_errorcode_t.ERR_SOCKS_CONNECTION_HOST_UNREACHABLE; 4053 alias ERR_ALPN_NEGOTIATION_FAILED = cef_errorcode_t.ERR_ALPN_NEGOTIATION_FAILED; 4054 alias ERR_SSL_NO_RENEGOTIATION = cef_errorcode_t.ERR_SSL_NO_RENEGOTIATION; 4055 alias ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = cef_errorcode_t.ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES; 4056 alias ERR_SSL_DECOMPRESSION_FAILURE_ALERT = cef_errorcode_t.ERR_SSL_DECOMPRESSION_FAILURE_ALERT; 4057 alias ERR_SSL_BAD_RECORD_MAC_ALERT = cef_errorcode_t.ERR_SSL_BAD_RECORD_MAC_ALERT; 4058 alias ERR_PROXY_AUTH_REQUESTED = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED; 4059 alias ERR_PROXY_CONNECTION_FAILED = cef_errorcode_t.ERR_PROXY_CONNECTION_FAILED; 4060 alias ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = cef_errorcode_t.ERR_MANDATORY_PROXY_CONFIGURATION_FAILED; 4061 alias ERR_PRECONNECT_MAX_SOCKET_LIMIT = cef_errorcode_t.ERR_PRECONNECT_MAX_SOCKET_LIMIT; 4062 alias ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED; 4063 alias ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY; 4064 alias ERR_PROXY_CERTIFICATE_INVALID = cef_errorcode_t.ERR_PROXY_CERTIFICATE_INVALID; 4065 alias ERR_NAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_NAME_RESOLUTION_FAILED; 4066 alias ERR_NETWORK_ACCESS_DENIED = cef_errorcode_t.ERR_NETWORK_ACCESS_DENIED; 4067 alias ERR_TEMPORARILY_THROTTLED = cef_errorcode_t.ERR_TEMPORARILY_THROTTLED; 4068 alias ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = cef_errorcode_t.ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT; 4069 alias ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED; 4070 alias ERR_MSG_TOO_BIG = cef_errorcode_t.ERR_MSG_TOO_BIG; 4071 alias ERR_WS_PROTOCOL_ERROR = cef_errorcode_t.ERR_WS_PROTOCOL_ERROR; 4072 alias ERR_ADDRESS_IN_USE = cef_errorcode_t.ERR_ADDRESS_IN_USE; 4073 alias ERR_SSL_HANDSHAKE_NOT_COMPLETED = cef_errorcode_t.ERR_SSL_HANDSHAKE_NOT_COMPLETED; 4074 alias ERR_SSL_BAD_PEER_PUBLIC_KEY = cef_errorcode_t.ERR_SSL_BAD_PEER_PUBLIC_KEY; 4075 alias ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = cef_errorcode_t.ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN; 4076 alias ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = cef_errorcode_t.ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED; 4077 alias ERR_SSL_DECRYPT_ERROR_ALERT = cef_errorcode_t.ERR_SSL_DECRYPT_ERROR_ALERT; 4078 alias ERR_WS_THROTTLE_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_WS_THROTTLE_QUEUE_TOO_LARGE; 4079 alias ERR_SSL_SERVER_CERT_CHANGED = cef_errorcode_t.ERR_SSL_SERVER_CERT_CHANGED; 4080 alias ERR_SSL_UNRECOGNIZED_NAME_ALERT = cef_errorcode_t.ERR_SSL_UNRECOGNIZED_NAME_ALERT; 4081 alias ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR; 4082 alias ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR; 4083 alias ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE; 4084 alias ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE; 4085 alias ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT; 4086 alias ERR_ICANN_NAME_COLLISION = cef_errorcode_t.ERR_ICANN_NAME_COLLISION; 4087 alias ERR_SSL_SERVER_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_SERVER_CERT_BAD_FORMAT; 4088 alias ERR_CT_STH_PARSING_FAILED = cef_errorcode_t.ERR_CT_STH_PARSING_FAILED; 4089 alias ERR_CT_STH_INCOMPLETE = cef_errorcode_t.ERR_CT_STH_INCOMPLETE; 4090 alias ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = cef_errorcode_t.ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH; 4091 alias ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = cef_errorcode_t.ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED; 4092 alias ERR_SSL_OBSOLETE_CIPHER = cef_errorcode_t.ERR_SSL_OBSOLETE_CIPHER; 4093 alias ERR_WS_UPGRADE = cef_errorcode_t.ERR_WS_UPGRADE; 4094 alias ERR_READ_IF_READY_NOT_IMPLEMENTED = cef_errorcode_t.ERR_READ_IF_READY_NOT_IMPLEMENTED; 4095 alias ERR_NO_BUFFER_SPACE = cef_errorcode_t.ERR_NO_BUFFER_SPACE; 4096 alias ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS; 4097 alias ERR_EARLY_DATA_REJECTED = cef_errorcode_t.ERR_EARLY_DATA_REJECTED; 4098 alias ERR_WRONG_VERSION_ON_EARLY_DATA = cef_errorcode_t.ERR_WRONG_VERSION_ON_EARLY_DATA; 4099 alias ERR_TLS13_DOWNGRADE_DETECTED = cef_errorcode_t.ERR_TLS13_DOWNGRADE_DETECTED; 4100 alias ERR_SSL_KEY_USAGE_INCOMPATIBLE = cef_errorcode_t.ERR_SSL_KEY_USAGE_INCOMPATIBLE; 4101 alias ERR_INVALID_ECH_CONFIG_LIST = cef_errorcode_t.ERR_INVALID_ECH_CONFIG_LIST; 4102 alias ERR_ECH_NOT_NEGOTIATED = cef_errorcode_t.ERR_ECH_NOT_NEGOTIATED; 4103 alias ERR_ECH_FALLBACK_CERTIFICATE_INVALID = cef_errorcode_t.ERR_ECH_FALLBACK_CERTIFICATE_INVALID; 4104 alias ERR_PROXY_UNABLE_TO_CONNECT_TO_DESTINATION = cef_errorcode_t.ERR_PROXY_UNABLE_TO_CONNECT_TO_DESTINATION; 4105 alias ERR_CERT_COMMON_NAME_INVALID = cef_errorcode_t.ERR_CERT_COMMON_NAME_INVALID; 4106 alias ERR_CERT_DATE_INVALID = cef_errorcode_t.ERR_CERT_DATE_INVALID; 4107 alias ERR_CERT_AUTHORITY_INVALID = cef_errorcode_t.ERR_CERT_AUTHORITY_INVALID; 4108 alias ERR_CERT_CONTAINS_ERRORS = cef_errorcode_t.ERR_CERT_CONTAINS_ERRORS; 4109 alias ERR_CERT_NO_REVOCATION_MECHANISM = cef_errorcode_t.ERR_CERT_NO_REVOCATION_MECHANISM; 4110 alias ERR_CERT_UNABLE_TO_CHECK_REVOCATION = cef_errorcode_t.ERR_CERT_UNABLE_TO_CHECK_REVOCATION; 4111 alias ERR_CERT_REVOKED = cef_errorcode_t.ERR_CERT_REVOKED; 4112 alias ERR_CERT_INVALID = cef_errorcode_t.ERR_CERT_INVALID; 4113 alias ERR_CERT_WEAK_SIGNATURE_ALGORITHM = cef_errorcode_t.ERR_CERT_WEAK_SIGNATURE_ALGORITHM; 4114 alias ERR_CERT_NON_UNIQUE_NAME = cef_errorcode_t.ERR_CERT_NON_UNIQUE_NAME; 4115 alias ERR_CERT_WEAK_KEY = cef_errorcode_t.ERR_CERT_WEAK_KEY; 4116 alias ERR_CERT_NAME_CONSTRAINT_VIOLATION = cef_errorcode_t.ERR_CERT_NAME_CONSTRAINT_VIOLATION; 4117 alias ERR_CERT_VALIDITY_TOO_LONG = cef_errorcode_t.ERR_CERT_VALIDITY_TOO_LONG; 4118 alias ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = cef_errorcode_t.ERR_CERTIFICATE_TRANSPARENCY_REQUIRED; 4119 alias ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = cef_errorcode_t.ERR_CERT_KNOWN_INTERCEPTION_BLOCKED; 4120 alias ERR_CERT_SELF_SIGNED_LOCAL_NETWORK = cef_errorcode_t.ERR_CERT_SELF_SIGNED_LOCAL_NETWORK; 4121 alias ERR_CERT_END = cef_errorcode_t.ERR_CERT_END; 4122 alias ERR_INVALID_URL = cef_errorcode_t.ERR_INVALID_URL; 4123 alias ERR_DISALLOWED_URL_SCHEME = cef_errorcode_t.ERR_DISALLOWED_URL_SCHEME; 4124 alias ERR_UNKNOWN_URL_SCHEME = cef_errorcode_t.ERR_UNKNOWN_URL_SCHEME; 4125 alias ERR_INVALID_REDIRECT = cef_errorcode_t.ERR_INVALID_REDIRECT; 4126 alias ERR_TOO_MANY_REDIRECTS = cef_errorcode_t.ERR_TOO_MANY_REDIRECTS; 4127 alias ERR_UNSAFE_REDIRECT = cef_errorcode_t.ERR_UNSAFE_REDIRECT; 4128 alias ERR_UNSAFE_PORT = cef_errorcode_t.ERR_UNSAFE_PORT; 4129 alias ERR_INVALID_RESPONSE = cef_errorcode_t.ERR_INVALID_RESPONSE; 4130 alias ERR_INVALID_CHUNKED_ENCODING = cef_errorcode_t.ERR_INVALID_CHUNKED_ENCODING; 4131 alias ERR_METHOD_NOT_SUPPORTED = cef_errorcode_t.ERR_METHOD_NOT_SUPPORTED; 4132 alias ERR_UNEXPECTED_PROXY_AUTH = cef_errorcode_t.ERR_UNEXPECTED_PROXY_AUTH; 4133 alias ERR_EMPTY_RESPONSE = cef_errorcode_t.ERR_EMPTY_RESPONSE; 4134 alias ERR_RESPONSE_HEADERS_TOO_BIG = cef_errorcode_t.ERR_RESPONSE_HEADERS_TOO_BIG; 4135 alias ERR_PAC_SCRIPT_FAILED = cef_errorcode_t.ERR_PAC_SCRIPT_FAILED; 4136 alias ERR_REQUEST_RANGE_NOT_SATISFIABLE = cef_errorcode_t.ERR_REQUEST_RANGE_NOT_SATISFIABLE; 4137 alias ERR_MALFORMED_IDENTITY = cef_errorcode_t.ERR_MALFORMED_IDENTITY; 4138 alias ERR_CONTENT_DECODING_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_FAILED; 4139 alias ERR_NETWORK_IO_SUSPENDED = cef_errorcode_t.ERR_NETWORK_IO_SUSPENDED; 4140 alias ERR_SYN_REPLY_NOT_RECEIVED = cef_errorcode_t.ERR_SYN_REPLY_NOT_RECEIVED; 4141 alias ERR_ENCODING_CONVERSION_FAILED = cef_errorcode_t.ERR_ENCODING_CONVERSION_FAILED; 4142 alias ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = cef_errorcode_t.ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT; 4143 alias ERR_NO_SUPPORTED_PROXIES = cef_errorcode_t.ERR_NO_SUPPORTED_PROXIES; 4144 alias ERR_HTTP2_PROTOCOL_ERROR = cef_errorcode_t.ERR_HTTP2_PROTOCOL_ERROR; 4145 alias ERR_INVALID_AUTH_CREDENTIALS = cef_errorcode_t.ERR_INVALID_AUTH_CREDENTIALS; 4146 alias ERR_UNSUPPORTED_AUTH_SCHEME = cef_errorcode_t.ERR_UNSUPPORTED_AUTH_SCHEME; 4147 alias ERR_ENCODING_DETECTION_FAILED = cef_errorcode_t.ERR_ENCODING_DETECTION_FAILED; 4148 alias ERR_MISSING_AUTH_CREDENTIALS = cef_errorcode_t.ERR_MISSING_AUTH_CREDENTIALS; 4149 alias ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS; 4150 alias ERR_MISCONFIGURED_AUTH_ENVIRONMENT = cef_errorcode_t.ERR_MISCONFIGURED_AUTH_ENVIRONMENT; 4151 alias ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS; 4152 alias ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = cef_errorcode_t.ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN; 4153 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH; 4154 alias ERR_INCOMPLETE_HTTP2_HEADERS = cef_errorcode_t.ERR_INCOMPLETE_HTTP2_HEADERS; 4155 alias ERR_PAC_NOT_IN_DHCP = cef_errorcode_t.ERR_PAC_NOT_IN_DHCP; 4156 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION; 4157 alias ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION; 4158 alias ERR_HTTP2_SERVER_REFUSED_STREAM = cef_errorcode_t.ERR_HTTP2_SERVER_REFUSED_STREAM; 4159 alias ERR_HTTP2_PING_FAILED = cef_errorcode_t.ERR_HTTP2_PING_FAILED; 4160 alias ERR_CONTENT_LENGTH_MISMATCH = cef_errorcode_t.ERR_CONTENT_LENGTH_MISMATCH; 4161 alias ERR_INCOMPLETE_CHUNKED_ENCODING = cef_errorcode_t.ERR_INCOMPLETE_CHUNKED_ENCODING; 4162 alias ERR_QUIC_PROTOCOL_ERROR = cef_errorcode_t.ERR_QUIC_PROTOCOL_ERROR; 4163 alias ERR_RESPONSE_HEADERS_TRUNCATED = cef_errorcode_t.ERR_RESPONSE_HEADERS_TRUNCATED; 4164 alias ERR_QUIC_HANDSHAKE_FAILED = cef_errorcode_t.ERR_QUIC_HANDSHAKE_FAILED; 4165 alias ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = cef_errorcode_t.ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY; 4166 alias ERR_HTTP2_FLOW_CONTROL_ERROR = cef_errorcode_t.ERR_HTTP2_FLOW_CONTROL_ERROR; 4167 alias ERR_HTTP2_FRAME_SIZE_ERROR = cef_errorcode_t.ERR_HTTP2_FRAME_SIZE_ERROR; 4168 alias ERR_HTTP2_COMPRESSION_ERROR = cef_errorcode_t.ERR_HTTP2_COMPRESSION_ERROR; 4169 alias ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION; 4170 alias ERR_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_HTTP_1_1_REQUIRED; 4171 alias ERR_PROXY_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_PROXY_HTTP_1_1_REQUIRED; 4172 alias ERR_PAC_SCRIPT_TERMINATED = cef_errorcode_t.ERR_PAC_SCRIPT_TERMINATED; 4173 alias ERR_PROXY_REQUIRED = cef_errorcode_t.ERR_PROXY_REQUIRED; 4174 alias ERR_INVALID_HTTP_RESPONSE = cef_errorcode_t.ERR_INVALID_HTTP_RESPONSE; 4175 alias ERR_CONTENT_DECODING_INIT_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_INIT_FAILED; 4176 alias ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = cef_errorcode_t.ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED; 4177 alias ERR_TOO_MANY_RETRIES = cef_errorcode_t.ERR_TOO_MANY_RETRIES; 4178 alias ERR_HTTP2_STREAM_CLOSED = cef_errorcode_t.ERR_HTTP2_STREAM_CLOSED; 4179 alias ERR_HTTP_RESPONSE_CODE_FAILURE = cef_errorcode_t.ERR_HTTP_RESPONSE_CODE_FAILURE; 4180 alias ERR_QUIC_CERT_ROOT_NOT_KNOWN = cef_errorcode_t.ERR_QUIC_CERT_ROOT_NOT_KNOWN; 4181 alias ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = cef_errorcode_t.ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED; 4182 alias ERR_TOO_MANY_ACCEPT_CH_RESTARTS = cef_errorcode_t.ERR_TOO_MANY_ACCEPT_CH_RESTARTS; 4183 alias ERR_INCONSISTENT_IP_ADDRESS_SPACE = cef_errorcode_t.ERR_INCONSISTENT_IP_ADDRESS_SPACE; 4184 alias ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY = cef_errorcode_t.ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY; 4185 alias ERR_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_CHECKS = cef_errorcode_t.ERR_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_CHECKS; 4186 alias ERR_ZSTD_WINDOW_SIZE_TOO_BIG = cef_errorcode_t.ERR_ZSTD_WINDOW_SIZE_TOO_BIG; 4187 alias ERR_DICTIONARY_LOAD_FAILED = cef_errorcode_t.ERR_DICTIONARY_LOAD_FAILED; 4188 alias ERR_UNEXPECTED_CONTENT_DICTIONARY_HEADER = cef_errorcode_t.ERR_UNEXPECTED_CONTENT_DICTIONARY_HEADER; 4189 alias ERR_CACHE_MISS = cef_errorcode_t.ERR_CACHE_MISS; 4190 alias ERR_CACHE_READ_FAILURE = cef_errorcode_t.ERR_CACHE_READ_FAILURE; 4191 alias ERR_CACHE_WRITE_FAILURE = cef_errorcode_t.ERR_CACHE_WRITE_FAILURE; 4192 alias ERR_CACHE_OPERATION_NOT_SUPPORTED = cef_errorcode_t.ERR_CACHE_OPERATION_NOT_SUPPORTED; 4193 alias ERR_CACHE_OPEN_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_FAILURE; 4194 alias ERR_CACHE_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_CREATE_FAILURE; 4195 alias ERR_CACHE_RACE = cef_errorcode_t.ERR_CACHE_RACE; 4196 alias ERR_CACHE_CHECKSUM_READ_FAILURE = cef_errorcode_t.ERR_CACHE_CHECKSUM_READ_FAILURE; 4197 alias ERR_CACHE_CHECKSUM_MISMATCH = cef_errorcode_t.ERR_CACHE_CHECKSUM_MISMATCH; 4198 alias ERR_CACHE_LOCK_TIMEOUT = cef_errorcode_t.ERR_CACHE_LOCK_TIMEOUT; 4199 alias ERR_CACHE_AUTH_FAILURE_AFTER_READ = cef_errorcode_t.ERR_CACHE_AUTH_FAILURE_AFTER_READ; 4200 alias ERR_CACHE_ENTRY_NOT_SUITABLE = cef_errorcode_t.ERR_CACHE_ENTRY_NOT_SUITABLE; 4201 alias ERR_CACHE_DOOM_FAILURE = cef_errorcode_t.ERR_CACHE_DOOM_FAILURE; 4202 alias ERR_CACHE_OPEN_OR_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_OR_CREATE_FAILURE; 4203 alias ERR_INSECURE_RESPONSE = cef_errorcode_t.ERR_INSECURE_RESPONSE; 4204 alias ERR_NO_PRIVATE_KEY_FOR_CERT = cef_errorcode_t.ERR_NO_PRIVATE_KEY_FOR_CERT; 4205 alias ERR_ADD_USER_CERT_FAILED = cef_errorcode_t.ERR_ADD_USER_CERT_FAILED; 4206 alias ERR_INVALID_SIGNED_EXCHANGE = cef_errorcode_t.ERR_INVALID_SIGNED_EXCHANGE; 4207 alias ERR_INVALID_WEB_BUNDLE = cef_errorcode_t.ERR_INVALID_WEB_BUNDLE; 4208 alias ERR_TRUST_TOKEN_OPERATION_FAILED = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_FAILED; 4209 alias ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST; 4210 alias ERR_PKCS12_IMPORT_BAD_PASSWORD = cef_errorcode_t.ERR_PKCS12_IMPORT_BAD_PASSWORD; 4211 alias ERR_PKCS12_IMPORT_FAILED = cef_errorcode_t.ERR_PKCS12_IMPORT_FAILED; 4212 alias ERR_IMPORT_CA_CERT_NOT_CA = cef_errorcode_t.ERR_IMPORT_CA_CERT_NOT_CA; 4213 alias ERR_IMPORT_CERT_ALREADY_EXISTS = cef_errorcode_t.ERR_IMPORT_CERT_ALREADY_EXISTS; 4214 alias ERR_IMPORT_CA_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_CA_CERT_FAILED; 4215 alias ERR_IMPORT_SERVER_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_SERVER_CERT_FAILED; 4216 alias ERR_PKCS12_IMPORT_INVALID_MAC = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_MAC; 4217 alias ERR_PKCS12_IMPORT_INVALID_FILE = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_FILE; 4218 alias ERR_PKCS12_IMPORT_UNSUPPORTED = cef_errorcode_t.ERR_PKCS12_IMPORT_UNSUPPORTED; 4219 alias ERR_KEY_GENERATION_FAILED = cef_errorcode_t.ERR_KEY_GENERATION_FAILED; 4220 alias ERR_PRIVATE_KEY_EXPORT_FAILED = cef_errorcode_t.ERR_PRIVATE_KEY_EXPORT_FAILED; 4221 alias ERR_SELF_SIGNED_CERT_GENERATION_FAILED = cef_errorcode_t.ERR_SELF_SIGNED_CERT_GENERATION_FAILED; 4222 alias ERR_CERT_DATABASE_CHANGED = cef_errorcode_t.ERR_CERT_DATABASE_CHANGED; 4223 alias ERR_CERT_VERIFIER_CHANGED = cef_errorcode_t.ERR_CERT_VERIFIER_CHANGED; 4224 alias ERR_DNS_MALFORMED_RESPONSE = cef_errorcode_t.ERR_DNS_MALFORMED_RESPONSE; 4225 alias ERR_DNS_SERVER_REQUIRES_TCP = cef_errorcode_t.ERR_DNS_SERVER_REQUIRES_TCP; 4226 alias ERR_DNS_SERVER_FAILED = cef_errorcode_t.ERR_DNS_SERVER_FAILED; 4227 alias ERR_DNS_TIMED_OUT = cef_errorcode_t.ERR_DNS_TIMED_OUT; 4228 alias ERR_DNS_CACHE_MISS = cef_errorcode_t.ERR_DNS_CACHE_MISS; 4229 alias ERR_DNS_SEARCH_EMPTY = cef_errorcode_t.ERR_DNS_SEARCH_EMPTY; 4230 alias ERR_DNS_SORT_ERROR = cef_errorcode_t.ERR_DNS_SORT_ERROR; 4231 alias ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED; 4232 alias ERR_DNS_NAME_HTTPS_ONLY = cef_errorcode_t.ERR_DNS_NAME_HTTPS_ONLY; 4233 alias ERR_DNS_REQUEST_CANCELLED = cef_errorcode_t.ERR_DNS_REQUEST_CANCELLED; 4234 alias ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = cef_errorcode_t.ERR_DNS_NO_MATCHING_SUPPORTED_ALPN; 4235 alias ERR_DNS_SECURE_PROBE_RECORD_INVALID = cef_errorcode_t.ERR_DNS_SECURE_PROBE_RECORD_INVALID; 4236 alias ERR_BLOB_INVALID_CONSTRUCTION_ARGUMENTS = cef_errorcode_t.ERR_BLOB_INVALID_CONSTRUCTION_ARGUMENTS; 4237 alias ERR_BLOB_OUT_OF_MEMORY = cef_errorcode_t.ERR_BLOB_OUT_OF_MEMORY; 4238 alias ERR_BLOB_FILE_WRITE_FAILED = cef_errorcode_t.ERR_BLOB_FILE_WRITE_FAILED; 4239 alias ERR_BLOB_SOURCE_DIED_IN_TRANSIT = cef_errorcode_t.ERR_BLOB_SOURCE_DIED_IN_TRANSIT; 4240 alias ERR_BLOB_DEREFERENCED_WHILE_BUILDING = cef_errorcode_t.ERR_BLOB_DEREFERENCED_WHILE_BUILDING; 4241 alias ERR_BLOB_REFERENCED_BLOB_BROKEN = cef_errorcode_t.ERR_BLOB_REFERENCED_BLOB_BROKEN; 4242 alias ERR_BLOB_REFERENCED_FILE_UNAVAILABLE = cef_errorcode_t.ERR_BLOB_REFERENCED_FILE_UNAVAILABLE; 4243 4244 enum cef_cert_status_t 4245 { 4246 CERT_STATUS_NONE = 0, 4247 CERT_STATUS_COMMON_NAME_INVALID = 1 << 0, 4248 CERT_STATUS_DATE_INVALID = 1 << 1, 4249 CERT_STATUS_AUTHORITY_INVALID = 1 << 2, 4250 CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4, 4251 CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5, 4252 CERT_STATUS_REVOKED = 1 << 6, 4253 CERT_STATUS_INVALID = 1 << 7, 4254 CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8, 4255 CERT_STATUS_NON_UNIQUE_NAME = 1 << 10, 4256 CERT_STATUS_WEAK_KEY = 1 << 11, 4257 CERT_STATUS_PINNED_KEY_MISSING = 1 << 13, 4258 CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14, 4259 CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15, 4260 CERT_STATUS_IS_EV = 1 << 16, 4261 CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17, 4262 CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19, 4263 CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20 4264 } 4265 4266 alias CERT_STATUS_NONE = cef_cert_status_t.CERT_STATUS_NONE; 4267 alias CERT_STATUS_COMMON_NAME_INVALID = cef_cert_status_t.CERT_STATUS_COMMON_NAME_INVALID; 4268 alias CERT_STATUS_DATE_INVALID = cef_cert_status_t.CERT_STATUS_DATE_INVALID; 4269 alias CERT_STATUS_AUTHORITY_INVALID = cef_cert_status_t.CERT_STATUS_AUTHORITY_INVALID; 4270 alias CERT_STATUS_NO_REVOCATION_MECHANISM = cef_cert_status_t.CERT_STATUS_NO_REVOCATION_MECHANISM; 4271 alias CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = cef_cert_status_t.CERT_STATUS_UNABLE_TO_CHECK_REVOCATION; 4272 alias CERT_STATUS_REVOKED = cef_cert_status_t.CERT_STATUS_REVOKED; 4273 alias CERT_STATUS_INVALID = cef_cert_status_t.CERT_STATUS_INVALID; 4274 alias CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = cef_cert_status_t.CERT_STATUS_WEAK_SIGNATURE_ALGORITHM; 4275 alias CERT_STATUS_NON_UNIQUE_NAME = cef_cert_status_t.CERT_STATUS_NON_UNIQUE_NAME; 4276 alias CERT_STATUS_WEAK_KEY = cef_cert_status_t.CERT_STATUS_WEAK_KEY; 4277 alias CERT_STATUS_PINNED_KEY_MISSING = cef_cert_status_t.CERT_STATUS_PINNED_KEY_MISSING; 4278 alias CERT_STATUS_NAME_CONSTRAINT_VIOLATION = cef_cert_status_t.CERT_STATUS_NAME_CONSTRAINT_VIOLATION; 4279 alias CERT_STATUS_VALIDITY_TOO_LONG = cef_cert_status_t.CERT_STATUS_VALIDITY_TOO_LONG; 4280 alias CERT_STATUS_IS_EV = cef_cert_status_t.CERT_STATUS_IS_EV; 4281 alias CERT_STATUS_REV_CHECKING_ENABLED = cef_cert_status_t.CERT_STATUS_REV_CHECKING_ENABLED; 4282 alias CERT_STATUS_SHA1_SIGNATURE_PRESENT = cef_cert_status_t.CERT_STATUS_SHA1_SIGNATURE_PRESENT; 4283 alias CERT_STATUS_CT_COMPLIANCE_FAILED = cef_cert_status_t.CERT_STATUS_CT_COMPLIANCE_FAILED; 4284 4285 enum cef_resultcode_t 4286 { 4287 CEF_RESULT_CODE_NORMAL_EXIT = 0, 4288 CEF_RESULT_CODE_KILLED = 1, 4289 CEF_RESULT_CODE_HUNG = 2, 4290 CEF_RESULT_CODE_KILLED_BAD_MESSAGE = 3, 4291 CEF_RESULT_CODE_GPU_DEAD_ON_ARRIVAL = 4, 4292 CEF_RESULT_CODE_CHROME_FIRST = 5, 4293 CEF_RESULT_CODE_BAD_PROCESS_TYPE = 6, 4294 CEF_RESULT_CODE_MISSING_DATA = 7, 4295 CEF_RESULT_CODE_UNSUPPORTED_PARAM = 13, 4296 CEF_RESULT_CODE_PROFILE_IN_USE = 21, 4297 CEF_RESULT_CODE_PACK_EXTENSION_ERROR = 22, 4298 CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED = 24, 4299 CEF_RESULT_CODE_INVALID_SANDBOX_STATE = 31, 4300 CEF_RESULT_CODE_CLOUD_POLICY_ENROLLMENT_FAILED = 32, 4301 CEF_RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST = 34, 4302 CEF_RESULT_CODE_NORMAL_EXIT_PACK_EXTENSION_SUCCESS = 36, 4303 CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED = 37, 4304 CEF_RESULT_CODE_NORMAL_EXIT_AUTO_DE_ELEVATED = 38, 4305 CEF_RESULT_CODE_TERMINATED_BY_OTHER_PROCESS_ON_COMMIT_FAILURE = 39, 4306 CEF_RESULT_CODE_CHROME_LAST = 40, 4307 CEF_RESULT_CODE_SANDBOX_FATAL_FIRST = 7006, 4308 CEF_RESULT_CODE_SANDBOX_FATAL_INTEGRITY = CEF_RESULT_CODE_SANDBOX_FATAL_FIRST, 4309 CEF_RESULT_CODE_SANDBOX_FATAL_DROPTOKEN = 7007, 4310 CEF_RESULT_CODE_SANDBOX_FATAL_FLUSHANDLES = 7008, 4311 CEF_RESULT_CODE_SANDBOX_FATAL_CACHEDISABLE = 7009, 4312 CEF_RESULT_CODE_SANDBOX_FATAL_CLOSEHANDLES = 7010, 4313 CEF_RESULT_CODE_SANDBOX_FATAL_MITIGATION = 7011, 4314 CEF_RESULT_CODE_SANDBOX_FATAL_MEMORY_EXCEEDED = 7012, 4315 CEF_RESULT_CODE_SANDBOX_FATAL_WARMUP = 7013, 4316 CEF_RESULT_CODE_SANDBOX_FATAL_BROKER_SHUTDOWN_HUNG = 7014, 4317 CEF_RESULT_CODE_SANDBOX_FATAL_LAST = 7015, 4318 CEF_RESULT_CODE_NUM_VALUES = 7016 4319 } 4320 4321 alias CEF_RESULT_CODE_NORMAL_EXIT = cef_resultcode_t.CEF_RESULT_CODE_NORMAL_EXIT; 4322 alias CEF_RESULT_CODE_KILLED = cef_resultcode_t.CEF_RESULT_CODE_KILLED; 4323 alias CEF_RESULT_CODE_HUNG = cef_resultcode_t.CEF_RESULT_CODE_HUNG; 4324 alias CEF_RESULT_CODE_KILLED_BAD_MESSAGE = cef_resultcode_t.CEF_RESULT_CODE_KILLED_BAD_MESSAGE; 4325 alias CEF_RESULT_CODE_GPU_DEAD_ON_ARRIVAL = cef_resultcode_t.CEF_RESULT_CODE_GPU_DEAD_ON_ARRIVAL; 4326 alias CEF_RESULT_CODE_CHROME_FIRST = cef_resultcode_t.CEF_RESULT_CODE_CHROME_FIRST; 4327 alias CEF_RESULT_CODE_BAD_PROCESS_TYPE = cef_resultcode_t.CEF_RESULT_CODE_BAD_PROCESS_TYPE; 4328 alias CEF_RESULT_CODE_MISSING_DATA = cef_resultcode_t.CEF_RESULT_CODE_MISSING_DATA; 4329 alias CEF_RESULT_CODE_UNSUPPORTED_PARAM = cef_resultcode_t.CEF_RESULT_CODE_UNSUPPORTED_PARAM; 4330 alias CEF_RESULT_CODE_PROFILE_IN_USE = cef_resultcode_t.CEF_RESULT_CODE_PROFILE_IN_USE; 4331 alias CEF_RESULT_CODE_PACK_EXTENSION_ERROR = cef_resultcode_t.CEF_RESULT_CODE_PACK_EXTENSION_ERROR; 4332 alias CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED = cef_resultcode_t.CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED; 4333 alias CEF_RESULT_CODE_INVALID_SANDBOX_STATE = cef_resultcode_t.CEF_RESULT_CODE_INVALID_SANDBOX_STATE; 4334 alias CEF_RESULT_CODE_CLOUD_POLICY_ENROLLMENT_FAILED = cef_resultcode_t.CEF_RESULT_CODE_CLOUD_POLICY_ENROLLMENT_FAILED; 4335 alias CEF_RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST = cef_resultcode_t.CEF_RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST; 4336 alias CEF_RESULT_CODE_NORMAL_EXIT_PACK_EXTENSION_SUCCESS = cef_resultcode_t.CEF_RESULT_CODE_NORMAL_EXIT_PACK_EXTENSION_SUCCESS; 4337 alias CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED = cef_resultcode_t.CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED; 4338 alias CEF_RESULT_CODE_NORMAL_EXIT_AUTO_DE_ELEVATED = cef_resultcode_t.CEF_RESULT_CODE_NORMAL_EXIT_AUTO_DE_ELEVATED; 4339 alias CEF_RESULT_CODE_TERMINATED_BY_OTHER_PROCESS_ON_COMMIT_FAILURE = cef_resultcode_t.CEF_RESULT_CODE_TERMINATED_BY_OTHER_PROCESS_ON_COMMIT_FAILURE; 4340 alias CEF_RESULT_CODE_CHROME_LAST = cef_resultcode_t.CEF_RESULT_CODE_CHROME_LAST; 4341 alias CEF_RESULT_CODE_SANDBOX_FATAL_FIRST = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_FIRST; 4342 alias CEF_RESULT_CODE_SANDBOX_FATAL_INTEGRITY = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_INTEGRITY; 4343 alias CEF_RESULT_CODE_SANDBOX_FATAL_DROPTOKEN = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_DROPTOKEN; 4344 alias CEF_RESULT_CODE_SANDBOX_FATAL_FLUSHANDLES = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_FLUSHANDLES; 4345 alias CEF_RESULT_CODE_SANDBOX_FATAL_CACHEDISABLE = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_CACHEDISABLE; 4346 alias CEF_RESULT_CODE_SANDBOX_FATAL_CLOSEHANDLES = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_CLOSEHANDLES; 4347 alias CEF_RESULT_CODE_SANDBOX_FATAL_MITIGATION = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_MITIGATION; 4348 alias CEF_RESULT_CODE_SANDBOX_FATAL_MEMORY_EXCEEDED = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_MEMORY_EXCEEDED; 4349 alias CEF_RESULT_CODE_SANDBOX_FATAL_WARMUP = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_WARMUP; 4350 alias CEF_RESULT_CODE_SANDBOX_FATAL_BROKER_SHUTDOWN_HUNG = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_BROKER_SHUTDOWN_HUNG; 4351 alias CEF_RESULT_CODE_SANDBOX_FATAL_LAST = cef_resultcode_t.CEF_RESULT_CODE_SANDBOX_FATAL_LAST; 4352 alias CEF_RESULT_CODE_NUM_VALUES = cef_resultcode_t.CEF_RESULT_CODE_NUM_VALUES; 4353 4354 enum cef_window_open_disposition_t 4355 { 4356 CEF_WOD_UNKNOWN = 0, 4357 CEF_WOD_CURRENT_TAB = 1, 4358 CEF_WOD_SINGLETON_TAB = 2, 4359 CEF_WOD_NEW_FOREGROUND_TAB = 3, 4360 CEF_WOD_NEW_BACKGROUND_TAB = 4, 4361 CEF_WOD_NEW_POPUP = 5, 4362 CEF_WOD_NEW_WINDOW = 6, 4363 CEF_WOD_SAVE_TO_DISK = 7, 4364 CEF_WOD_OFF_THE_RECORD = 8, 4365 CEF_WOD_IGNORE_ACTION = 9, 4366 CEF_WOD_SWITCH_TO_TAB = 10, 4367 CEF_WOD_NEW_PICTURE_IN_PICTURE = 11, 4368 CEF_WOD_NUM_VALUES = 12 4369 } 4370 4371 alias CEF_WOD_UNKNOWN = cef_window_open_disposition_t.CEF_WOD_UNKNOWN; 4372 alias CEF_WOD_CURRENT_TAB = cef_window_open_disposition_t.CEF_WOD_CURRENT_TAB; 4373 alias CEF_WOD_SINGLETON_TAB = cef_window_open_disposition_t.CEF_WOD_SINGLETON_TAB; 4374 alias CEF_WOD_NEW_FOREGROUND_TAB = cef_window_open_disposition_t.CEF_WOD_NEW_FOREGROUND_TAB; 4375 alias CEF_WOD_NEW_BACKGROUND_TAB = cef_window_open_disposition_t.CEF_WOD_NEW_BACKGROUND_TAB; 4376 alias CEF_WOD_NEW_POPUP = cef_window_open_disposition_t.CEF_WOD_NEW_POPUP; 4377 alias CEF_WOD_NEW_WINDOW = cef_window_open_disposition_t.CEF_WOD_NEW_WINDOW; 4378 alias CEF_WOD_SAVE_TO_DISK = cef_window_open_disposition_t.CEF_WOD_SAVE_TO_DISK; 4379 alias CEF_WOD_OFF_THE_RECORD = cef_window_open_disposition_t.CEF_WOD_OFF_THE_RECORD; 4380 alias CEF_WOD_IGNORE_ACTION = cef_window_open_disposition_t.CEF_WOD_IGNORE_ACTION; 4381 alias CEF_WOD_SWITCH_TO_TAB = cef_window_open_disposition_t.CEF_WOD_SWITCH_TO_TAB; 4382 alias CEF_WOD_NEW_PICTURE_IN_PICTURE = cef_window_open_disposition_t.CEF_WOD_NEW_PICTURE_IN_PICTURE; 4383 alias CEF_WOD_NUM_VALUES = cef_window_open_disposition_t.CEF_WOD_NUM_VALUES; 4384 4385 enum cef_drag_operations_mask_t 4386 { 4387 DRAG_OPERATION_NONE = 0, 4388 DRAG_OPERATION_COPY = 1, 4389 DRAG_OPERATION_LINK = 2, 4390 DRAG_OPERATION_GENERIC = 4, 4391 DRAG_OPERATION_PRIVATE = 8, 4392 DRAG_OPERATION_MOVE = 16, 4393 DRAG_OPERATION_DELETE = 32, 4394 DRAG_OPERATION_EVERY = UINT_MAX 4395 } 4396 4397 alias DRAG_OPERATION_NONE = cef_drag_operations_mask_t.DRAG_OPERATION_NONE; 4398 alias DRAG_OPERATION_COPY = cef_drag_operations_mask_t.DRAG_OPERATION_COPY; 4399 alias DRAG_OPERATION_LINK = cef_drag_operations_mask_t.DRAG_OPERATION_LINK; 4400 alias DRAG_OPERATION_GENERIC = cef_drag_operations_mask_t.DRAG_OPERATION_GENERIC; 4401 alias DRAG_OPERATION_PRIVATE = cef_drag_operations_mask_t.DRAG_OPERATION_PRIVATE; 4402 alias DRAG_OPERATION_MOVE = cef_drag_operations_mask_t.DRAG_OPERATION_MOVE; 4403 alias DRAG_OPERATION_DELETE = cef_drag_operations_mask_t.DRAG_OPERATION_DELETE; 4404 alias DRAG_OPERATION_EVERY = cef_drag_operations_mask_t.DRAG_OPERATION_EVERY; 4405 4406 enum cef_text_input_mode_t 4407 { 4408 CEF_TEXT_INPUT_MODE_DEFAULT = 0, 4409 CEF_TEXT_INPUT_MODE_NONE = 1, 4410 CEF_TEXT_INPUT_MODE_TEXT = 2, 4411 CEF_TEXT_INPUT_MODE_TEL = 3, 4412 CEF_TEXT_INPUT_MODE_URL = 4, 4413 CEF_TEXT_INPUT_MODE_EMAIL = 5, 4414 CEF_TEXT_INPUT_MODE_NUMERIC = 6, 4415 CEF_TEXT_INPUT_MODE_DECIMAL = 7, 4416 CEF_TEXT_INPUT_MODE_SEARCH = 8, 4417 4418 CEF_TEXT_INPUT_MODE_NUM_VALUES = 9 4419 } 4420 4421 alias CEF_TEXT_INPUT_MODE_DEFAULT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DEFAULT; 4422 alias CEF_TEXT_INPUT_MODE_NONE = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NONE; 4423 alias CEF_TEXT_INPUT_MODE_TEXT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEXT; 4424 alias CEF_TEXT_INPUT_MODE_TEL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEL; 4425 alias CEF_TEXT_INPUT_MODE_URL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_URL; 4426 alias CEF_TEXT_INPUT_MODE_EMAIL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_EMAIL; 4427 alias CEF_TEXT_INPUT_MODE_NUMERIC = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NUMERIC; 4428 alias CEF_TEXT_INPUT_MODE_DECIMAL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DECIMAL; 4429 alias CEF_TEXT_INPUT_MODE_SEARCH = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_SEARCH; 4430 alias CEF_TEXT_INPUT_MODE_NUM_VALUES = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NUM_VALUES; 4431 4432 /// 4433 /// V8 property attribute values. 4434 /// 4435 enum cef_v8_propertyattribute_t 4436 { 4437 /// 4438 /// Writeable, Enumerable, Configurable 4439 /// 4440 V8_PROPERTY_ATTRIBUTE_NONE = 0, 4441 4442 /// 4443 /// Not writeable 4444 /// 4445 V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, 4446 4447 /// 4448 /// Not enumerable 4449 /// 4450 V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, 4451 4452 /// 4453 /// Not configurable 4454 /// 4455 V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 4456 } 4457 4458 alias V8_PROPERTY_ATTRIBUTE_NONE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_NONE; 4459 alias V8_PROPERTY_ATTRIBUTE_READONLY = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_READONLY; 4460 alias V8_PROPERTY_ATTRIBUTE_DONTENUM = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTENUM; 4461 alias V8_PROPERTY_ATTRIBUTE_DONTDELETE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTDELETE; 4462 4463 /// 4464 /// Post data elements may represent either bytes or files. 4465 /// 4466 enum cef_postdataelement_type_t 4467 { 4468 PDE_TYPE_EMPTY = 0, 4469 PDE_TYPE_BYTES = 1, 4470 PDE_TYPE_FILE = 2, 4471 4472 PDE_TYPE_NUM_VALUES = 3 4473 } 4474 4475 alias PDE_TYPE_EMPTY = cef_postdataelement_type_t.PDE_TYPE_EMPTY; 4476 alias PDE_TYPE_BYTES = cef_postdataelement_type_t.PDE_TYPE_BYTES; 4477 alias PDE_TYPE_FILE = cef_postdataelement_type_t.PDE_TYPE_FILE; 4478 alias PDE_TYPE_NUM_VALUES = cef_postdataelement_type_t.PDE_TYPE_NUM_VALUES; 4479 4480 /// 4481 /// Resource type for a request. These constants match their equivalents in 4482 /// Chromium's ResourceType and should not be renumbered. 4483 /// 4484 enum cef_resource_type_t 4485 { 4486 /// 4487 /// Top level page. 4488 /// 4489 RT_MAIN_FRAME = 0, 4490 4491 /// 4492 /// Frame or iframe. 4493 /// 4494 RT_SUB_FRAME = 1, 4495 4496 /// 4497 /// CSS stylesheet. 4498 /// 4499 RT_STYLESHEET = 2, 4500 4501 /// 4502 /// External script. 4503 /// 4504 RT_SCRIPT = 3, 4505 4506 /// 4507 /// Image (jpg/gif/png/etc). 4508 /// 4509 RT_IMAGE = 4, 4510 4511 /// 4512 /// Font. 4513 /// 4514 RT_FONT_RESOURCE = 5, 4515 4516 /// 4517 /// Some other subresource. This is the default type if the actual type is 4518 /// unknown. 4519 /// 4520 RT_SUB_RESOURCE = 6, 4521 4522 /// 4523 /// Object (or embed) tag for a plugin, or a resource that a plugin requested. 4524 /// 4525 RT_OBJECT = 7, 4526 4527 /// 4528 /// Media resource. 4529 /// 4530 RT_MEDIA = 8, 4531 4532 /// 4533 /// Main resource of a dedicated worker. 4534 /// 4535 RT_WORKER = 9, 4536 4537 /// 4538 /// Main resource of a shared worker. 4539 /// 4540 RT_SHARED_WORKER = 10, 4541 4542 /// 4543 /// Explicitly requested prefetch. 4544 /// 4545 RT_PREFETCH = 11, 4546 4547 /// 4548 /// Favicon. 4549 /// 4550 RT_FAVICON = 12, 4551 4552 /// 4553 /// XMLHttpRequest. 4554 /// 4555 RT_XHR = 13, 4556 4557 /// 4558 /// A request for a "<ping>". 4559 /// 4560 RT_PING = 14, 4561 4562 /// 4563 /// Main resource of a service worker. 4564 /// 4565 RT_SERVICE_WORKER = 15, 4566 4567 /// 4568 /// A report of Content Security Policy violations. 4569 /// 4570 RT_CSP_REPORT = 16, 4571 4572 /// 4573 /// A resource that a plugin requested. 4574 /// 4575 RT_PLUGIN_RESOURCE = 17, 4576 4577 /// 4578 /// A main-frame service worker navigation preload request. 4579 /// 4580 RT_NAVIGATION_PRELOAD_MAIN_FRAME = 19, 4581 4582 /// 4583 /// A sub-frame service worker navigation preload request. 4584 /// 4585 RT_NAVIGATION_PRELOAD_SUB_FRAME = 20, 4586 4587 RT_NUM_VALUES = 21 4588 } 4589 4590 alias RT_MAIN_FRAME = cef_resource_type_t.RT_MAIN_FRAME; 4591 alias RT_SUB_FRAME = cef_resource_type_t.RT_SUB_FRAME; 4592 alias RT_STYLESHEET = cef_resource_type_t.RT_STYLESHEET; 4593 alias RT_SCRIPT = cef_resource_type_t.RT_SCRIPT; 4594 alias RT_IMAGE = cef_resource_type_t.RT_IMAGE; 4595 alias RT_FONT_RESOURCE = cef_resource_type_t.RT_FONT_RESOURCE; 4596 alias RT_SUB_RESOURCE = cef_resource_type_t.RT_SUB_RESOURCE; 4597 alias RT_OBJECT = cef_resource_type_t.RT_OBJECT; 4598 alias RT_MEDIA = cef_resource_type_t.RT_MEDIA; 4599 alias RT_WORKER = cef_resource_type_t.RT_WORKER; 4600 alias RT_SHARED_WORKER = cef_resource_type_t.RT_SHARED_WORKER; 4601 alias RT_PREFETCH = cef_resource_type_t.RT_PREFETCH; 4602 alias RT_FAVICON = cef_resource_type_t.RT_FAVICON; 4603 alias RT_XHR = cef_resource_type_t.RT_XHR; 4604 alias RT_PING = cef_resource_type_t.RT_PING; 4605 alias RT_SERVICE_WORKER = cef_resource_type_t.RT_SERVICE_WORKER; 4606 alias RT_CSP_REPORT = cef_resource_type_t.RT_CSP_REPORT; 4607 alias RT_PLUGIN_RESOURCE = cef_resource_type_t.RT_PLUGIN_RESOURCE; 4608 alias RT_NAVIGATION_PRELOAD_MAIN_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_MAIN_FRAME; 4609 alias RT_NAVIGATION_PRELOAD_SUB_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_SUB_FRAME; 4610 alias RT_NUM_VALUES = cef_resource_type_t.RT_NUM_VALUES; 4611 4612 /// 4613 /// Transition type for a request. Made up of one source value and 0 or more 4614 /// qualifiers. 4615 /// 4616 enum cef_transition_type_t 4617 { 4618 /// 4619 /// Source is a link click or the JavaScript window.open function. This is 4620 /// also the default value for requests like sub-resource loads that are not 4621 /// navigations. 4622 /// 4623 TT_LINK = 0, 4624 4625 /// 4626 /// Source is some other "explicit" navigation. This is the default value for 4627 /// navigations where the actual type is unknown. See also 4628 /// TT_DIRECT_LOAD_FLAG. 4629 /// 4630 TT_EXPLICIT = 1, 4631 4632 /// 4633 /// User got to this page through a suggestion in the UI (for example, via the 4634 /// destinations page). Chrome style only. 4635 /// 4636 TT_AUTO_BOOKMARK = 2, 4637 4638 /// 4639 /// Source is a subframe navigation. This is any content that is automatically 4640 /// loaded in a non-toplevel frame. For example, if a page consists of several 4641 /// frames containing ads, those ad URLs will have this transition type. 4642 /// The user may not even realize the content in these pages is a separate 4643 /// frame, so may not care about the URL. 4644 /// 4645 TT_AUTO_SUBFRAME = 3, 4646 4647 /// 4648 /// Source is a subframe navigation explicitly requested by the user that will 4649 /// generate new navigation entries in the back/forward list. These are 4650 /// probably more important than frames that were automatically loaded in 4651 /// the background because the user probably cares about the fact that this 4652 /// link was loaded. 4653 /// 4654 TT_MANUAL_SUBFRAME = 4, 4655 4656 /// 4657 /// User got to this page by typing in the URL bar and selecting an entry 4658 /// that did not look like a URL. For example, a match might have the URL 4659 /// of a Google search result page, but appear like "Search Google for ...". 4660 /// These are not quite the same as EXPLICIT navigations because the user 4661 /// didn't type or see the destination URL. Chrome style only. 4662 /// See also TT_KEYWORD. 4663 /// 4664 TT_GENERATED = 5, 4665 4666 /// 4667 /// This is a toplevel navigation. This is any content that is automatically 4668 /// loaded in a toplevel frame. For example, opening a tab to show the ASH 4669 /// screen saver, opening the devtools window, opening the NTP after the safe 4670 /// browsing warning, opening web-based dialog boxes are examples of 4671 /// AUTO_TOPLEVEL navigations. Chrome style only. 4672 /// 4673 TT_AUTO_TOPLEVEL = 6, 4674 4675 /// 4676 /// Source is a form submission by the user. NOTE: In some situations 4677 /// submitting a form does not result in this transition type. This can happen 4678 /// if the form uses a script to submit the contents. 4679 /// 4680 TT_FORM_SUBMIT = 7, 4681 4682 /// 4683 /// Source is a "reload" of the page via the Reload function or by re-visiting 4684 /// the same URL. NOTE: This is distinct from the concept of whether a 4685 /// particular load uses "reload semantics" (i.e. bypasses cached data). 4686 /// 4687 TT_RELOAD = 8, 4688 4689 /// 4690 /// The url was generated from a replaceable keyword other than the default 4691 /// search provider. If the user types a keyword (which also applies to 4692 /// tab-to-search) in the omnibox this qualifier is applied to the transition 4693 /// type of the generated url. TemplateURLModel then may generate an 4694 /// additional visit with a transition type of TT_KEYWORD_GENERATED against 4695 /// the url 'http://' + keyword. For example, if you do a tab-to-search 4696 /// against wikipedia the generated url has a transition qualifer of 4697 /// TT_KEYWORD, and TemplateURLModel generates a visit for 'wikipedia.org' 4698 /// with a transition type of TT_KEYWORD_GENERATED. Chrome style only. 4699 /// 4700 TT_KEYWORD = 9, 4701 4702 /// 4703 /// Corresponds to a visit generated for a keyword. See description of 4704 /// TT_KEYWORD for more details. Chrome style only. 4705 /// 4706 TT_KEYWORD_GENERATED = 10, 4707 4708 TT_NUM_VALUES = 11, 4709 4710 /// 4711 /// General mask defining the bits used for the source values. 4712 /// 4713 TT_SOURCE_MASK = 0xFF, 4714 4715 /// Qualifiers. 4716 /// Any of the core values above can be augmented by one or more qualifiers. 4717 /// These qualifiers further define the transition. 4718 4719 /// 4720 /// Attempted to visit a URL but was blocked. 4721 /// 4722 TT_BLOCKED_FLAG = 0x00800000, 4723 4724 /// 4725 /// Used the Forward or Back function to navigate among browsing history. 4726 /// Will be ORed to the transition type for the original load. 4727 /// 4728 TT_FORWARD_BACK_FLAG = 0x01000000, 4729 4730 /// 4731 /// Loaded a URL directly via CreateBrowser, LoadURL or LoadRequest. 4732 /// 4733 TT_DIRECT_LOAD_FLAG = 0x02000000, 4734 4735 /// 4736 /// User is navigating to the home page. Chrome style only. 4737 /// 4738 TT_HOME_PAGE_FLAG = 0x04000000, 4739 4740 /// 4741 /// The transition originated from an external application; the exact 4742 /// definition of this is embedder dependent. Chrome style only. 4743 /// 4744 TT_FROM_API_FLAG = 0x08000000, 4745 4746 /// 4747 /// The beginning of a navigation chain. 4748 /// 4749 TT_CHAIN_START_FLAG = 0x10000000, 4750 4751 /// 4752 /// The last transition in a redirect chain. 4753 /// 4754 TT_CHAIN_END_FLAG = 0x20000000, 4755 4756 /// 4757 /// Redirects caused by JavaScript or a meta refresh tag on the page. 4758 /// 4759 TT_CLIENT_REDIRECT_FLAG = 0x40000000, 4760 4761 /// 4762 /// Redirects sent from the server by HTTP headers. 4763 /// 4764 TT_SERVER_REDIRECT_FLAG = 0x80000000, 4765 4766 /// 4767 /// Used to test whether a transition involves a redirect. 4768 /// 4769 TT_IS_REDIRECT_MASK = 0xC0000000, 4770 4771 /// 4772 /// General mask defining the bits used for the qualifiers. 4773 /// 4774 TT_QUALIFIER_MASK = 0xFFFFFF00 4775 } 4776 4777 alias TT_LINK = cef_transition_type_t.TT_LINK; 4778 alias TT_EXPLICIT = cef_transition_type_t.TT_EXPLICIT; 4779 alias TT_AUTO_BOOKMARK = cef_transition_type_t.TT_AUTO_BOOKMARK; 4780 alias TT_AUTO_SUBFRAME = cef_transition_type_t.TT_AUTO_SUBFRAME; 4781 alias TT_MANUAL_SUBFRAME = cef_transition_type_t.TT_MANUAL_SUBFRAME; 4782 alias TT_GENERATED = cef_transition_type_t.TT_GENERATED; 4783 alias TT_AUTO_TOPLEVEL = cef_transition_type_t.TT_AUTO_TOPLEVEL; 4784 alias TT_FORM_SUBMIT = cef_transition_type_t.TT_FORM_SUBMIT; 4785 alias TT_RELOAD = cef_transition_type_t.TT_RELOAD; 4786 alias TT_KEYWORD = cef_transition_type_t.TT_KEYWORD; 4787 alias TT_KEYWORD_GENERATED = cef_transition_type_t.TT_KEYWORD_GENERATED; 4788 alias TT_NUM_VALUES = cef_transition_type_t.TT_NUM_VALUES; 4789 alias TT_SOURCE_MASK = cef_transition_type_t.TT_SOURCE_MASK; 4790 alias TT_BLOCKED_FLAG = cef_transition_type_t.TT_BLOCKED_FLAG; 4791 alias TT_FORWARD_BACK_FLAG = cef_transition_type_t.TT_FORWARD_BACK_FLAG; 4792 alias TT_DIRECT_LOAD_FLAG = cef_transition_type_t.TT_DIRECT_LOAD_FLAG; 4793 alias TT_HOME_PAGE_FLAG = cef_transition_type_t.TT_HOME_PAGE_FLAG; 4794 alias TT_FROM_API_FLAG = cef_transition_type_t.TT_FROM_API_FLAG; 4795 alias TT_CHAIN_START_FLAG = cef_transition_type_t.TT_CHAIN_START_FLAG; 4796 alias TT_CHAIN_END_FLAG = cef_transition_type_t.TT_CHAIN_END_FLAG; 4797 alias TT_CLIENT_REDIRECT_FLAG = cef_transition_type_t.TT_CLIENT_REDIRECT_FLAG; 4798 alias TT_SERVER_REDIRECT_FLAG = cef_transition_type_t.TT_SERVER_REDIRECT_FLAG; 4799 alias TT_IS_REDIRECT_MASK = cef_transition_type_t.TT_IS_REDIRECT_MASK; 4800 alias TT_QUALIFIER_MASK = cef_transition_type_t.TT_QUALIFIER_MASK; 4801 4802 /// 4803 /// Flags used to customize the behavior of CefURLRequest. 4804 /// 4805 enum cef_urlrequest_flags_t 4806 { 4807 /// 4808 /// Default behavior. 4809 /// 4810 UR_FLAG_NONE = 0, 4811 4812 /// 4813 /// If set the cache will be skipped when handling the request. Setting this 4814 /// value is equivalent to specifying the "Cache-Control: no-cache" request 4815 /// header. Setting this value in combination with UR_FLAG_ONLY_FROM_CACHE 4816 /// will cause the request to fail. 4817 /// 4818 UR_FLAG_SKIP_CACHE = 1 << 0, 4819 4820 /// 4821 /// If set the request will fail if it cannot be served from the cache (or 4822 /// some equivalent local store). Setting this value is equivalent to 4823 /// specifying the "Cache-Control: only-if-cached" request header. Setting 4824 /// this value in combination with UR_FLAG_SKIP_CACHE or UR_FLAG_DISABLE_CACHE 4825 /// will cause the request to fail. 4826 /// 4827 UR_FLAG_ONLY_FROM_CACHE = 1 << 1, 4828 4829 /// 4830 /// If set the cache will not be used at all. Setting this value is equivalent 4831 /// to specifying the "Cache-Control: no-store" request header. Setting this 4832 /// value in combination with UR_FLAG_ONLY_FROM_CACHE will cause the request 4833 /// to fail. 4834 /// 4835 UR_FLAG_DISABLE_CACHE = 1 << 2, 4836 4837 /// 4838 /// If set user name, password, and cookies may be sent with the request, and 4839 /// cookies may be saved from the response. 4840 /// 4841 UR_FLAG_ALLOW_STORED_CREDENTIALS = 1 << 3, 4842 4843 /// 4844 /// If set upload progress events will be generated when a request has a body. 4845 /// 4846 UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 4, 4847 4848 /// 4849 /// If set the CefURLRequestClient::OnDownloadData method will not be called. 4850 /// 4851 UR_FLAG_NO_DOWNLOAD_DATA = 1 << 5, 4852 4853 /// 4854 /// If set 5XX redirect errors will be propagated to the observer instead of 4855 /// automatically re-tried. This currently only applies for requests 4856 /// originated in the browser process. 4857 /// 4858 UR_FLAG_NO_RETRY_ON_5XX = 1 << 6, 4859 4860 /// 4861 /// If set 3XX responses will cause the fetch to halt immediately rather than 4862 /// continue through the redirect. 4863 /// 4864 UR_FLAG_STOP_ON_REDIRECT = 1 << 7 4865 } 4866 4867 alias UR_FLAG_NONE = cef_urlrequest_flags_t.UR_FLAG_NONE; 4868 alias UR_FLAG_SKIP_CACHE = cef_urlrequest_flags_t.UR_FLAG_SKIP_CACHE; 4869 alias UR_FLAG_ONLY_FROM_CACHE = cef_urlrequest_flags_t.UR_FLAG_ONLY_FROM_CACHE; 4870 alias UR_FLAG_DISABLE_CACHE = cef_urlrequest_flags_t.UR_FLAG_DISABLE_CACHE; 4871 alias UR_FLAG_ALLOW_STORED_CREDENTIALS = cef_urlrequest_flags_t.UR_FLAG_ALLOW_STORED_CREDENTIALS; 4872 alias UR_FLAG_REPORT_UPLOAD_PROGRESS = cef_urlrequest_flags_t.UR_FLAG_REPORT_UPLOAD_PROGRESS; 4873 alias UR_FLAG_NO_DOWNLOAD_DATA = cef_urlrequest_flags_t.UR_FLAG_NO_DOWNLOAD_DATA; 4874 alias UR_FLAG_NO_RETRY_ON_5XX = cef_urlrequest_flags_t.UR_FLAG_NO_RETRY_ON_5XX; 4875 alias UR_FLAG_STOP_ON_REDIRECT = cef_urlrequest_flags_t.UR_FLAG_STOP_ON_REDIRECT; 4876 4877 /// 4878 /// Flags that represent CefURLRequest status. 4879 /// 4880 enum cef_urlrequest_status_t 4881 { 4882 /// 4883 /// Unknown status. 4884 /// 4885 UR_UNKNOWN = 0, 4886 4887 /// 4888 /// Request succeeded. 4889 /// 4890 UR_SUCCESS = 1, 4891 4892 /// 4893 /// An IO request is pending, and the caller will be informed when it is 4894 /// completed. 4895 /// 4896 UR_IO_PENDING = 2, 4897 4898 /// 4899 /// Request was canceled programatically. 4900 /// 4901 UR_CANCELED = 3, 4902 4903 /// 4904 /// Request failed for some reason. 4905 /// 4906 UR_FAILED = 4, 4907 4908 UR_NUM_VALUES = 5 4909 } 4910 4911 alias UR_UNKNOWN = cef_urlrequest_status_t.UR_UNKNOWN; 4912 alias UR_SUCCESS = cef_urlrequest_status_t.UR_SUCCESS; 4913 alias UR_IO_PENDING = cef_urlrequest_status_t.UR_IO_PENDING; 4914 alias UR_CANCELED = cef_urlrequest_status_t.UR_CANCELED; 4915 alias UR_FAILED = cef_urlrequest_status_t.UR_FAILED; 4916 alias UR_NUM_VALUES = cef_urlrequest_status_t.UR_NUM_VALUES; 4917 4918 /// Structure representing a draggable region. 4919 /// 4920 struct cef_draggable_region_t 4921 { 4922 /// 4923 /// Bounds of the region. 4924 /// 4925 4926 cef_rect_t bounds; 4927 4928 /// 4929 /// True (1) this this region is draggable and false (0) otherwise. 4930 /// 4931 int draggable; 4932 } 4933 4934 4935 4936 /// 4937 /// Existing process IDs. 4938 /// 4939 enum cef_process_id_t 4940 { 4941 /// 4942 /// Browser process. 4943 /// 4944 PID_BROWSER = 0, 4945 /// 4946 /// Renderer process. 4947 /// 4948 PID_RENDERER = 1 4949 } 4950 4951 alias PID_BROWSER = cef_process_id_t.PID_BROWSER; 4952 alias PID_RENDERER = cef_process_id_t.PID_RENDERER; 4953 4954 /// 4955 /// Existing thread IDs. 4956 /// 4957 enum cef_thread_id_t 4958 { 4959 // BROWSER PROCESS THREADS -- Only available in the browser process. 4960 4961 /// 4962 /// The main thread in the browser. This will be the same as the main 4963 /// application thread if CefInitialize() is called with a 4964 /// CefSettings.multi_threaded_message_loop value of false. Do not perform 4965 /// blocking tasks on this thread. All tasks posted after 4966 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 4967 /// are guaranteed to run. This thread will outlive all other CEF threads. 4968 /// 4969 TID_UI = 0, 4970 4971 /// 4972 /// Used for blocking tasks like file system access where the user won't 4973 /// notice if the task takes an arbitrarily long time to complete. All tasks 4974 /// posted after CefBrowserProcessHandler::OnContextInitialized() and before 4975 /// CefShutdown() are guaranteed to run. 4976 /// 4977 TID_FILE_BACKGROUND = 1, 4978 4979 /// 4980 /// Used for blocking tasks like file system access that affect UI or 4981 /// responsiveness of future user interactions. Do not use if an immediate 4982 /// response to a user interaction is expected. All tasks posted after 4983 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 4984 /// are guaranteed to run. 4985 /// Examples: 4986 /// - Updating the UI to reflect progress on a long task. 4987 /// - Loading data that might be shown in the UI after a future user 4988 /// interaction. 4989 /// 4990 TID_FILE_USER_VISIBLE = 2, 4991 4992 /// 4993 /// Used for blocking tasks like file system access that affect UI 4994 /// immediately after a user interaction. All tasks posted after 4995 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 4996 /// are guaranteed to run. 4997 /// Example: Generating data shown in the UI immediately after a click. 4998 /// 4999 TID_FILE_USER_BLOCKING = 3, 5000 5001 /// 5002 /// Used to launch and terminate browser processes. 5003 /// 5004 TID_PROCESS_LAUNCHER = 4, 5005 5006 /// 5007 /// Used to process IPC and network messages. Do not perform blocking tasks on 5008 /// this thread. All tasks posted after 5009 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 5010 /// are guaranteed to run. 5011 /// 5012 TID_IO = 5, 5013 5014 // RENDER PROCESS THREADS -- Only available in the render process. 5015 5016 /// 5017 /// The main thread in the renderer. Used for all WebKit and V8 interaction. 5018 /// Tasks may be posted to this thread after 5019 /// CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to 5020 /// run before sub-process termination (sub-processes may be killed at any 5021 /// time without warning). 5022 /// 5023 TID_RENDERER = 6, 5024 5025 TID_NUM_VALUES = 7 5026 } 5027 5028 alias TID_UI = cef_thread_id_t.TID_UI; 5029 alias TID_FILE_BACKGROUND = cef_thread_id_t.TID_FILE_BACKGROUND; 5030 alias TID_FILE_USER_VISIBLE = cef_thread_id_t.TID_FILE_USER_VISIBLE; 5031 alias TID_FILE_USER_BLOCKING = cef_thread_id_t.TID_FILE_USER_BLOCKING; 5032 alias TID_PROCESS_LAUNCHER = cef_thread_id_t.TID_PROCESS_LAUNCHER; 5033 alias TID_IO = cef_thread_id_t.TID_IO; 5034 alias TID_RENDERER = cef_thread_id_t.TID_RENDERER; 5035 alias TID_NUM_VALUES = cef_thread_id_t.TID_NUM_VALUES; 5036 5037 /// 5038 /// Thread priority values listed in increasing order of importance. 5039 /// 5040 enum cef_thread_priority_t 5041 { 5042 /// 5043 /// Suitable for threads that shouldn't disrupt high priority work. 5044 /// 5045 TP_BACKGROUND = 0, 5046 5047 /// 5048 /// Default priority level. 5049 /// 5050 TP_NORMAL = 1, 5051 5052 /// 5053 /// Suitable for threads which generate data for the display (at ~60Hz). 5054 /// 5055 TP_DISPLAY = 2, 5056 5057 /// 5058 /// Suitable for low-latency, glitch-resistant audio. 5059 /// 5060 TP_REALTIME_AUDIO = 3, 5061 5062 TP_NUM_VALUES = 4 5063 } 5064 5065 alias TP_BACKGROUND = cef_thread_priority_t.TP_BACKGROUND; 5066 alias TP_NORMAL = cef_thread_priority_t.TP_NORMAL; 5067 alias TP_DISPLAY = cef_thread_priority_t.TP_DISPLAY; 5068 alias TP_REALTIME_AUDIO = cef_thread_priority_t.TP_REALTIME_AUDIO; 5069 alias TP_NUM_VALUES = cef_thread_priority_t.TP_NUM_VALUES; 5070 5071 /// 5072 /// Message loop types. Indicates the set of asynchronous events that a message 5073 /// loop can process. 5074 /// 5075 enum cef_message_loop_type_t 5076 { 5077 /// 5078 /// Supports tasks and timers. 5079 /// 5080 ML_TYPE_DEFAULT = 0, 5081 5082 /// 5083 /// Supports tasks, timers and native UI events (e.g. Windows messages). 5084 /// 5085 ML_TYPE_UI = 1, 5086 5087 /// 5088 /// Supports tasks, timers and asynchronous IO events. 5089 /// 5090 ML_TYPE_IO = 2, 5091 5092 ML_NUM_VALUES = 3 5093 } 5094 5095 alias ML_TYPE_DEFAULT = cef_message_loop_type_t.ML_TYPE_DEFAULT; 5096 alias ML_TYPE_UI = cef_message_loop_type_t.ML_TYPE_UI; 5097 alias ML_TYPE_IO = cef_message_loop_type_t.ML_TYPE_IO; 5098 alias ML_NUM_VALUES = cef_message_loop_type_t.ML_NUM_VALUES; 5099 5100 /// 5101 /// Windows COM initialization mode. Specifies how COM will be initialized for a 5102 /// new thread. 5103 /// 5104 enum cef_com_init_mode_t 5105 { 5106 /// 5107 /// No COM initialization. 5108 /// 5109 COM_INIT_MODE_NONE = 0, 5110 5111 /// 5112 /// Initialize COM using single-threaded apartments. 5113 /// 5114 COM_INIT_MODE_STA = 1, 5115 5116 /// 5117 /// Initialize COM using multi-threaded apartments. 5118 /// 5119 COM_INIT_MODE_MTA = 2 5120 } 5121 5122 alias COM_INIT_MODE_NONE = cef_com_init_mode_t.COM_INIT_MODE_NONE; 5123 alias COM_INIT_MODE_STA = cef_com_init_mode_t.COM_INIT_MODE_STA; 5124 alias COM_INIT_MODE_MTA = cef_com_init_mode_t.COM_INIT_MODE_MTA; 5125 5126 /// 5127 /// Supported value types. 5128 /// 5129 enum cef_value_type_t 5130 { 5131 VTYPE_INVALID = 0, 5132 VTYPE_NULL = 1, 5133 VTYPE_BOOL = 2, 5134 VTYPE_INT = 3, 5135 VTYPE_DOUBLE = 4, 5136 VTYPE_STRING = 5, 5137 VTYPE_BINARY = 6, 5138 VTYPE_DICTIONARY = 7, 5139 VTYPE_LIST = 8, 5140 5141 VTYPE_NUM_VALUES = 9 5142 } 5143 5144 alias VTYPE_INVALID = cef_value_type_t.VTYPE_INVALID; 5145 alias VTYPE_NULL = cef_value_type_t.VTYPE_NULL; 5146 alias VTYPE_BOOL = cef_value_type_t.VTYPE_BOOL; 5147 alias VTYPE_INT = cef_value_type_t.VTYPE_INT; 5148 alias VTYPE_DOUBLE = cef_value_type_t.VTYPE_DOUBLE; 5149 alias VTYPE_STRING = cef_value_type_t.VTYPE_STRING; 5150 alias VTYPE_BINARY = cef_value_type_t.VTYPE_BINARY; 5151 alias VTYPE_DICTIONARY = cef_value_type_t.VTYPE_DICTIONARY; 5152 alias VTYPE_LIST = cef_value_type_t.VTYPE_LIST; 5153 alias VTYPE_NUM_VALUES = cef_value_type_t.VTYPE_NUM_VALUES; 5154 5155 /// 5156 /// Supported JavaScript dialog types. 5157 /// 5158 enum cef_jsdialog_type_t 5159 { 5160 JSDIALOGTYPE_ALERT = 0, 5161 JSDIALOGTYPE_CONFIRM = 1, 5162 JSDIALOGTYPE_PROMPT = 2, 5163 5164 JSDIALOGTYPE_NUM_VALUES = 3 5165 } 5166 5167 alias JSDIALOGTYPE_ALERT = cef_jsdialog_type_t.JSDIALOGTYPE_ALERT; 5168 alias JSDIALOGTYPE_CONFIRM = cef_jsdialog_type_t.JSDIALOGTYPE_CONFIRM; 5169 alias JSDIALOGTYPE_PROMPT = cef_jsdialog_type_t.JSDIALOGTYPE_PROMPT; 5170 alias JSDIALOGTYPE_NUM_VALUES = cef_jsdialog_type_t.JSDIALOGTYPE_NUM_VALUES; 5171 5172 /// 5173 /// Screen information used when window rendering is disabled. This structure is 5174 /// passed as a parameter to CefRenderHandler::GetScreenInfo and should be 5175 /// filled in by the client. 5176 /// 5177 struct cef_screen_info_t 5178 { 5179 /// 5180 /// Size of this structure. 5181 /// 5182 size_t size; 5183 5184 /// 5185 /// Device scale factor. Specifies the ratio between physical and logical 5186 /// pixels. 5187 /// 5188 float device_scale_factor; 5189 5190 /// 5191 /// The screen depth in bits per pixel. 5192 /// 5193 int depth; 5194 5195 /// 5196 /// The bits per color component. This assumes that the colors are balanced 5197 /// equally. 5198 /// 5199 int depth_per_component; 5200 5201 /// 5202 /// This can be true for black and white printers. 5203 /// 5204 int is_monochrome; 5205 5206 /// 5207 /// This is set from the rcMonitor member of MONITORINFOEX, to whit: 5208 /// "A RECT structure that specifies the display monitor rectangle, 5209 /// expressed in virtual-screen coordinates. Note that if the monitor 5210 /// is not the primary display monitor, some of the rectangle's 5211 /// coordinates may be negative values." 5212 // 5213 /// The |rect| and |available_rect| properties are used to determine the 5214 /// available surface for rendering popup views. 5215 /// 5216 cef_rect_t rect; 5217 5218 /// 5219 /// This is set from the rcWork member of MONITORINFOEX, to whit: 5220 /// "A RECT structure that specifies the work area rectangle of the 5221 /// display monitor that can be used by applications, expressed in 5222 /// virtual-screen coordinates. Windows uses this rectangle to 5223 /// maximize an application on the monitor. The rest of the area in 5224 /// rcMonitor contains system windows such as the task bar and side 5225 /// bars. Note that if the monitor is not the primary display monitor, 5226 /// some of the rectangle's coordinates may be negative values". 5227 // 5228 /// The |rect| and |available_rect| properties are used to determine the 5229 /// available surface for rendering popup views. 5230 /// 5231 cef_rect_t available_rect; 5232 } 5233 5234 5235 5236 /// 5237 /// Linux window properties, such as X11's WM_CLASS or Wayland's app_id. 5238 /// Those are passed to CefWindowDelegate, so the client can set them 5239 /// for the CefWindow's top-level. Thus, allowing window managers to correctly 5240 /// display the application's information (e.g., icons). 5241 /// 5242 struct cef_linux_window_properties_t 5243 { 5244 /// 5245 /// Size of this structure. 5246 /// 5247 size_t size; 5248 5249 /// 5250 /// Main window's Wayland's app_id 5251 /// 5252 cef_string_t wayland_app_id; 5253 5254 /// 5255 /// Main window's WM_CLASS_CLASS in X11 5256 /// 5257 cef_string_t wm_class_class; 5258 5259 /// 5260 /// Main window's WM_CLASS_NAME in X11 5261 /// 5262 cef_string_t wm_class_name; 5263 5264 /// 5265 /// Main window's WM_WINDOW_ROLE in X11 5266 /// 5267 cef_string_t wm_role_name; 5268 } 5269 5270 5271 5272 /// 5273 /// Supported menu IDs. Non-English translations can be provided for the 5274 /// IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString(). 5275 /// 5276 enum cef_menu_id_t 5277 { 5278 // Navigation. 5279 MENU_ID_BACK = 100, 5280 MENU_ID_FORWARD = 101, 5281 MENU_ID_RELOAD = 102, 5282 MENU_ID_RELOAD_NOCACHE = 103, 5283 MENU_ID_STOPLOAD = 104, 5284 5285 // Editing. 5286 MENU_ID_UNDO = 110, 5287 MENU_ID_REDO = 111, 5288 MENU_ID_CUT = 112, 5289 MENU_ID_COPY = 113, 5290 MENU_ID_PASTE = 114, 5291 MENU_ID_PASTE_MATCH_STYLE = 115, 5292 MENU_ID_DELETE = 116, 5293 MENU_ID_SELECT_ALL = 117, 5294 5295 // Miscellaneous. 5296 MENU_ID_FIND = 130, 5297 MENU_ID_PRINT = 131, 5298 MENU_ID_VIEW_SOURCE = 132, 5299 5300 // Spell checking word correction suggestions. 5301 MENU_ID_SPELLCHECK_SUGGESTION_0 = 200, 5302 MENU_ID_SPELLCHECK_SUGGESTION_1 = 201, 5303 MENU_ID_SPELLCHECK_SUGGESTION_2 = 202, 5304 MENU_ID_SPELLCHECK_SUGGESTION_3 = 203, 5305 MENU_ID_SPELLCHECK_SUGGESTION_4 = 204, 5306 MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204, 5307 MENU_ID_NO_SPELLING_SUGGESTIONS = 205, 5308 MENU_ID_ADD_TO_DICTIONARY = 206, 5309 5310 // Custom menu items originating from the renderer process. 5311 MENU_ID_CUSTOM_FIRST = 220, 5312 MENU_ID_CUSTOM_LAST = 250, 5313 5314 // All user-defined menu IDs should come between MENU_ID_USER_FIRST and 5315 // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges 5316 // defined in the tools/gritsettings/resource_ids file. 5317 MENU_ID_USER_FIRST = 26500, 5318 MENU_ID_USER_LAST = 28500 5319 } 5320 5321 alias MENU_ID_BACK = cef_menu_id_t.MENU_ID_BACK; 5322 alias MENU_ID_FORWARD = cef_menu_id_t.MENU_ID_FORWARD; 5323 alias MENU_ID_RELOAD = cef_menu_id_t.MENU_ID_RELOAD; 5324 alias MENU_ID_RELOAD_NOCACHE = cef_menu_id_t.MENU_ID_RELOAD_NOCACHE; 5325 alias MENU_ID_STOPLOAD = cef_menu_id_t.MENU_ID_STOPLOAD; 5326 alias MENU_ID_UNDO = cef_menu_id_t.MENU_ID_UNDO; 5327 alias MENU_ID_REDO = cef_menu_id_t.MENU_ID_REDO; 5328 alias MENU_ID_CUT = cef_menu_id_t.MENU_ID_CUT; 5329 alias MENU_ID_COPY = cef_menu_id_t.MENU_ID_COPY; 5330 alias MENU_ID_PASTE = cef_menu_id_t.MENU_ID_PASTE; 5331 alias MENU_ID_PASTE_MATCH_STYLE = cef_menu_id_t.MENU_ID_PASTE_MATCH_STYLE; 5332 alias MENU_ID_DELETE = cef_menu_id_t.MENU_ID_DELETE; 5333 alias MENU_ID_SELECT_ALL = cef_menu_id_t.MENU_ID_SELECT_ALL; 5334 alias MENU_ID_FIND = cef_menu_id_t.MENU_ID_FIND; 5335 alias MENU_ID_PRINT = cef_menu_id_t.MENU_ID_PRINT; 5336 alias MENU_ID_VIEW_SOURCE = cef_menu_id_t.MENU_ID_VIEW_SOURCE; 5337 alias MENU_ID_SPELLCHECK_SUGGESTION_0 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_0; 5338 alias MENU_ID_SPELLCHECK_SUGGESTION_1 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_1; 5339 alias MENU_ID_SPELLCHECK_SUGGESTION_2 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_2; 5340 alias MENU_ID_SPELLCHECK_SUGGESTION_3 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_3; 5341 alias MENU_ID_SPELLCHECK_SUGGESTION_4 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_4; 5342 alias MENU_ID_SPELLCHECK_SUGGESTION_LAST = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_LAST; 5343 alias MENU_ID_NO_SPELLING_SUGGESTIONS = cef_menu_id_t.MENU_ID_NO_SPELLING_SUGGESTIONS; 5344 alias MENU_ID_ADD_TO_DICTIONARY = cef_menu_id_t.MENU_ID_ADD_TO_DICTIONARY; 5345 alias MENU_ID_CUSTOM_FIRST = cef_menu_id_t.MENU_ID_CUSTOM_FIRST; 5346 alias MENU_ID_CUSTOM_LAST = cef_menu_id_t.MENU_ID_CUSTOM_LAST; 5347 alias MENU_ID_USER_FIRST = cef_menu_id_t.MENU_ID_USER_FIRST; 5348 alias MENU_ID_USER_LAST = cef_menu_id_t.MENU_ID_USER_LAST; 5349 5350 /// 5351 /// Mouse button types. 5352 /// 5353 enum cef_mouse_button_type_t 5354 { 5355 MBT_LEFT = 0, 5356 MBT_MIDDLE = 1, 5357 MBT_RIGHT = 2 5358 } 5359 5360 alias MBT_LEFT = cef_mouse_button_type_t.MBT_LEFT; 5361 alias MBT_MIDDLE = cef_mouse_button_type_t.MBT_MIDDLE; 5362 alias MBT_RIGHT = cef_mouse_button_type_t.MBT_RIGHT; 5363 5364 /// 5365 /// Structure representing mouse event information. 5366 /// 5367 struct cef_mouse_event_t 5368 { 5369 /// 5370 /// X coordinate relative to the left side of the view. 5371 /// 5372 int x; 5373 5374 /// 5375 /// Y coordinate relative to the top side of the view. 5376 /// 5377 int y; 5378 5379 /// 5380 /// Bit flags describing any pressed modifier keys. See 5381 /// cef_event_flags_t for values. 5382 /// 5383 uint modifiers; 5384 } 5385 5386 5387 5388 /// 5389 /// Touch points states types. 5390 /// 5391 enum cef_touch_event_type_t 5392 { 5393 CEF_TET_RELEASED = 0, 5394 CEF_TET_PRESSED = 1, 5395 CEF_TET_MOVED = 2, 5396 CEF_TET_CANCELLED = 3 5397 } 5398 5399 alias CEF_TET_RELEASED = cef_touch_event_type_t.CEF_TET_RELEASED; 5400 alias CEF_TET_PRESSED = cef_touch_event_type_t.CEF_TET_PRESSED; 5401 alias CEF_TET_MOVED = cef_touch_event_type_t.CEF_TET_MOVED; 5402 alias CEF_TET_CANCELLED = cef_touch_event_type_t.CEF_TET_CANCELLED; 5403 5404 /// 5405 /// The device type that caused the event. 5406 /// 5407 enum cef_pointer_type_t 5408 { 5409 CEF_POINTER_TYPE_TOUCH = 0, 5410 CEF_POINTER_TYPE_MOUSE = 1, 5411 CEF_POINTER_TYPE_PEN = 2, 5412 CEF_POINTER_TYPE_ERASER = 3, 5413 CEF_POINTER_TYPE_UNKNOWN = 4 5414 } 5415 5416 alias CEF_POINTER_TYPE_TOUCH = cef_pointer_type_t.CEF_POINTER_TYPE_TOUCH; 5417 alias CEF_POINTER_TYPE_MOUSE = cef_pointer_type_t.CEF_POINTER_TYPE_MOUSE; 5418 alias CEF_POINTER_TYPE_PEN = cef_pointer_type_t.CEF_POINTER_TYPE_PEN; 5419 alias CEF_POINTER_TYPE_ERASER = cef_pointer_type_t.CEF_POINTER_TYPE_ERASER; 5420 alias CEF_POINTER_TYPE_UNKNOWN = cef_pointer_type_t.CEF_POINTER_TYPE_UNKNOWN; 5421 5422 /// 5423 /// Structure representing touch event information. 5424 /// 5425 struct cef_touch_event_t 5426 { 5427 /// 5428 /// Id of a touch point. Must be unique per touch, can be any number except 5429 /// -1. Note that a maximum of 16 concurrent touches will be tracked; touches 5430 /// beyond that will be ignored. 5431 /// 5432 int id; 5433 5434 /// 5435 /// X coordinate relative to the left side of the view. 5436 /// 5437 float x; 5438 5439 /// 5440 /// Y coordinate relative to the top side of the view. 5441 /// 5442 float y; 5443 5444 /// 5445 /// X radius in pixels. Set to 0 if not applicable. 5446 /// 5447 float radius_x; 5448 5449 /// 5450 /// Y radius in pixels. Set to 0 if not applicable. 5451 /// 5452 float radius_y; 5453 5454 /// 5455 /// Rotation angle in radians. Set to 0 if not applicable. 5456 /// 5457 float rotation_angle; 5458 5459 /// 5460 /// The normalized pressure of the pointer input in the range of [0,1]. 5461 /// Set to 0 if not applicable. 5462 /// 5463 float pressure; 5464 5465 /// 5466 /// The state of the touch point. Touches begin with one CEF_TET_PRESSED event 5467 /// followed by zero or more CEF_TET_MOVED events and finally one 5468 /// CEF_TET_RELEASED or CEF_TET_CANCELLED event. Events not respecting this 5469 /// order will be ignored. 5470 /// 5471 cef_touch_event_type_t type; 5472 5473 /// 5474 /// Bit flags describing any pressed modifier keys. See 5475 /// cef_event_flags_t for values. 5476 /// 5477 uint modifiers; 5478 5479 /// 5480 /// The device type that caused the event. 5481 /// 5482 cef_pointer_type_t pointer_type; 5483 } 5484 5485 5486 5487 /// 5488 /// Paint element types. 5489 /// 5490 enum cef_paint_element_type_t 5491 { 5492 PET_VIEW = 0, 5493 PET_POPUP = 1 5494 } 5495 5496 alias PET_VIEW = cef_paint_element_type_t.PET_VIEW; 5497 alias PET_POPUP = cef_paint_element_type_t.PET_POPUP; 5498 5499 /// 5500 /// Supported event bit flags. 5501 /// 5502 enum cef_event_flags_t 5503 { 5504 EVENTFLAG_NONE = 0, 5505 EVENTFLAG_CAPS_LOCK_ON = 1 << 0, 5506 EVENTFLAG_SHIFT_DOWN = 1 << 1, 5507 EVENTFLAG_CONTROL_DOWN = 1 << 2, 5508 EVENTFLAG_ALT_DOWN = 1 << 3, 5509 EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4, 5510 EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5, 5511 EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6, 5512 /// Mac OS-X command key. 5513 EVENTFLAG_COMMAND_DOWN = 1 << 7, 5514 EVENTFLAG_NUM_LOCK_ON = 1 << 8, 5515 EVENTFLAG_IS_KEY_PAD = 1 << 9, 5516 EVENTFLAG_IS_LEFT = 1 << 10, 5517 EVENTFLAG_IS_RIGHT = 1 << 11, 5518 EVENTFLAG_ALTGR_DOWN = 1 << 12, 5519 EVENTFLAG_IS_REPEAT = 1 << 13, 5520 EVENTFLAG_PRECISION_SCROLLING_DELTA = 1 << 14, 5521 EVENTFLAG_SCROLL_BY_PAGE = 1 << 15 5522 } 5523 5524 alias EVENTFLAG_NONE = cef_event_flags_t.EVENTFLAG_NONE; 5525 alias EVENTFLAG_CAPS_LOCK_ON = cef_event_flags_t.EVENTFLAG_CAPS_LOCK_ON; 5526 alias EVENTFLAG_SHIFT_DOWN = cef_event_flags_t.EVENTFLAG_SHIFT_DOWN; 5527 alias EVENTFLAG_CONTROL_DOWN = cef_event_flags_t.EVENTFLAG_CONTROL_DOWN; 5528 alias EVENTFLAG_ALT_DOWN = cef_event_flags_t.EVENTFLAG_ALT_DOWN; 5529 alias EVENTFLAG_LEFT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_LEFT_MOUSE_BUTTON; 5530 alias EVENTFLAG_MIDDLE_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_MIDDLE_MOUSE_BUTTON; 5531 alias EVENTFLAG_RIGHT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_RIGHT_MOUSE_BUTTON; 5532 alias EVENTFLAG_COMMAND_DOWN = cef_event_flags_t.EVENTFLAG_COMMAND_DOWN; 5533 alias EVENTFLAG_NUM_LOCK_ON = cef_event_flags_t.EVENTFLAG_NUM_LOCK_ON; 5534 alias EVENTFLAG_IS_KEY_PAD = cef_event_flags_t.EVENTFLAG_IS_KEY_PAD; 5535 alias EVENTFLAG_IS_LEFT = cef_event_flags_t.EVENTFLAG_IS_LEFT; 5536 alias EVENTFLAG_IS_RIGHT = cef_event_flags_t.EVENTFLAG_IS_RIGHT; 5537 alias EVENTFLAG_ALTGR_DOWN = cef_event_flags_t.EVENTFLAG_ALTGR_DOWN; 5538 alias EVENTFLAG_IS_REPEAT = cef_event_flags_t.EVENTFLAG_IS_REPEAT; 5539 alias EVENTFLAG_PRECISION_SCROLLING_DELTA = cef_event_flags_t.EVENTFLAG_PRECISION_SCROLLING_DELTA; 5540 alias EVENTFLAG_SCROLL_BY_PAGE = cef_event_flags_t.EVENTFLAG_SCROLL_BY_PAGE; 5541 5542 /// 5543 /// Supported menu item types. 5544 /// 5545 enum cef_menu_item_type_t 5546 { 5547 MENUITEMTYPE_NONE = 0, 5548 MENUITEMTYPE_COMMAND = 1, 5549 MENUITEMTYPE_CHECK = 2, 5550 MENUITEMTYPE_RADIO = 3, 5551 MENUITEMTYPE_SEPARATOR = 4, 5552 MENUITEMTYPE_SUBMENU = 5 5553 } 5554 5555 alias MENUITEMTYPE_NONE = cef_menu_item_type_t.MENUITEMTYPE_NONE; 5556 alias MENUITEMTYPE_COMMAND = cef_menu_item_type_t.MENUITEMTYPE_COMMAND; 5557 alias MENUITEMTYPE_CHECK = cef_menu_item_type_t.MENUITEMTYPE_CHECK; 5558 alias MENUITEMTYPE_RADIO = cef_menu_item_type_t.MENUITEMTYPE_RADIO; 5559 alias MENUITEMTYPE_SEPARATOR = cef_menu_item_type_t.MENUITEMTYPE_SEPARATOR; 5560 alias MENUITEMTYPE_SUBMENU = cef_menu_item_type_t.MENUITEMTYPE_SUBMENU; 5561 5562 /// 5563 /// Supported context menu type flags. 5564 /// 5565 enum cef_context_menu_type_flags_t 5566 { 5567 /// 5568 /// No node is selected. 5569 /// 5570 CM_TYPEFLAG_NONE = 0, 5571 /// 5572 /// The top page is selected. 5573 /// 5574 CM_TYPEFLAG_PAGE = 1 << 0, 5575 /// 5576 /// A subframe page is selected. 5577 /// 5578 CM_TYPEFLAG_FRAME = 1 << 1, 5579 /// 5580 /// A link is selected. 5581 /// 5582 CM_TYPEFLAG_LINK = 1 << 2, 5583 /// 5584 /// A media node is selected. 5585 /// 5586 CM_TYPEFLAG_MEDIA = 1 << 3, 5587 /// 5588 /// There is a textual or mixed selection that is selected. 5589 /// 5590 CM_TYPEFLAG_SELECTION = 1 << 4, 5591 /// 5592 /// An editable element is selected. 5593 /// 5594 CM_TYPEFLAG_EDITABLE = 1 << 5 5595 } 5596 5597 alias CM_TYPEFLAG_NONE = cef_context_menu_type_flags_t.CM_TYPEFLAG_NONE; 5598 alias CM_TYPEFLAG_PAGE = cef_context_menu_type_flags_t.CM_TYPEFLAG_PAGE; 5599 alias CM_TYPEFLAG_FRAME = cef_context_menu_type_flags_t.CM_TYPEFLAG_FRAME; 5600 alias CM_TYPEFLAG_LINK = cef_context_menu_type_flags_t.CM_TYPEFLAG_LINK; 5601 alias CM_TYPEFLAG_MEDIA = cef_context_menu_type_flags_t.CM_TYPEFLAG_MEDIA; 5602 alias CM_TYPEFLAG_SELECTION = cef_context_menu_type_flags_t.CM_TYPEFLAG_SELECTION; 5603 alias CM_TYPEFLAG_EDITABLE = cef_context_menu_type_flags_t.CM_TYPEFLAG_EDITABLE; 5604 5605 /// 5606 /// Supported context menu media types. These constants match their equivalents 5607 /// in Chromium's ContextMenuDataMediaType and should not be renumbered. 5608 /// 5609 enum cef_context_menu_media_type_t 5610 { 5611 /// 5612 /// No special node is in context. 5613 /// 5614 CM_MEDIATYPE_NONE = 0, 5615 /// 5616 /// An image node is selected. 5617 /// 5618 CM_MEDIATYPE_IMAGE = 1, 5619 /// 5620 /// A video node is selected. 5621 /// 5622 CM_MEDIATYPE_VIDEO = 2, 5623 /// 5624 /// An audio node is selected. 5625 /// 5626 CM_MEDIATYPE_AUDIO = 3, 5627 /// 5628 /// An canvas node is selected. 5629 /// 5630 CM_MEDIATYPE_CANVAS = 4, 5631 /// 5632 /// A file node is selected. 5633 /// 5634 CM_MEDIATYPE_FILE = 5, 5635 /// 5636 /// A plugin node is selected. 5637 /// 5638 CM_MEDIATYPE_PLUGIN = 6, 5639 5640 CM_MEDIATYPE_NUM_VALUES = 7 5641 } 5642 5643 alias CM_MEDIATYPE_NONE = cef_context_menu_media_type_t.CM_MEDIATYPE_NONE; 5644 alias CM_MEDIATYPE_IMAGE = cef_context_menu_media_type_t.CM_MEDIATYPE_IMAGE; 5645 alias CM_MEDIATYPE_VIDEO = cef_context_menu_media_type_t.CM_MEDIATYPE_VIDEO; 5646 alias CM_MEDIATYPE_AUDIO = cef_context_menu_media_type_t.CM_MEDIATYPE_AUDIO; 5647 alias CM_MEDIATYPE_CANVAS = cef_context_menu_media_type_t.CM_MEDIATYPE_CANVAS; 5648 alias CM_MEDIATYPE_FILE = cef_context_menu_media_type_t.CM_MEDIATYPE_FILE; 5649 alias CM_MEDIATYPE_PLUGIN = cef_context_menu_media_type_t.CM_MEDIATYPE_PLUGIN; 5650 alias CM_MEDIATYPE_NUM_VALUES = cef_context_menu_media_type_t.CM_MEDIATYPE_NUM_VALUES; 5651 5652 /// 5653 /// Supported context menu media state bit flags. These constants match their 5654 /// equivalents in Chromium's ContextMenuData::MediaFlags and should not be 5655 /// renumbered. 5656 /// 5657 enum cef_context_menu_media_state_flags_t 5658 { 5659 CM_MEDIAFLAG_NONE = 0, 5660 CM_MEDIAFLAG_IN_ERROR = 1 << 0, 5661 CM_MEDIAFLAG_PAUSED = 1 << 1, 5662 CM_MEDIAFLAG_MUTED = 1 << 2, 5663 CM_MEDIAFLAG_LOOP = 1 << 3, 5664 CM_MEDIAFLAG_CAN_SAVE = 1 << 4, 5665 CM_MEDIAFLAG_HAS_AUDIO = 1 << 5, 5666 CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = 1 << 6, 5667 CM_MEDIAFLAG_CONTROLS = 1 << 7, 5668 CM_MEDIAFLAG_CAN_PRINT = 1 << 8, 5669 CM_MEDIAFLAG_CAN_ROTATE = 1 << 9, 5670 CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = 1 << 10, 5671 CM_MEDIAFLAG_PICTURE_IN_PICTURE = 1 << 11, 5672 CM_MEDIAFLAG_CAN_LOOP = 1 << 12 5673 } 5674 5675 alias CM_MEDIAFLAG_NONE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_NONE; 5676 alias CM_MEDIAFLAG_IN_ERROR = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_IN_ERROR; 5677 alias CM_MEDIAFLAG_PAUSED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PAUSED; 5678 alias CM_MEDIAFLAG_MUTED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_MUTED; 5679 alias CM_MEDIAFLAG_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_LOOP; 5680 alias CM_MEDIAFLAG_CAN_SAVE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_SAVE; 5681 alias CM_MEDIAFLAG_HAS_AUDIO = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_HAS_AUDIO; 5682 alias CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS; 5683 alias CM_MEDIAFLAG_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CONTROLS; 5684 alias CM_MEDIAFLAG_CAN_PRINT = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PRINT; 5685 alias CM_MEDIAFLAG_CAN_ROTATE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_ROTATE; 5686 alias CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE; 5687 alias CM_MEDIAFLAG_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PICTURE_IN_PICTURE; 5688 alias CM_MEDIAFLAG_CAN_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_LOOP; 5689 5690 /// 5691 /// Supported context menu edit state bit flags. These constants match their 5692 /// equivalents in Chromium's ContextMenuDataEditFlags and should not be 5693 /// renumbered. 5694 /// 5695 enum cef_context_menu_edit_state_flags_t 5696 { 5697 CM_EDITFLAG_NONE = 0, 5698 CM_EDITFLAG_CAN_UNDO = 1 << 0, 5699 CM_EDITFLAG_CAN_REDO = 1 << 1, 5700 CM_EDITFLAG_CAN_CUT = 1 << 2, 5701 CM_EDITFLAG_CAN_COPY = 1 << 3, 5702 CM_EDITFLAG_CAN_PASTE = 1 << 4, 5703 CM_EDITFLAG_CAN_DELETE = 1 << 5, 5704 CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6, 5705 CM_EDITFLAG_CAN_TRANSLATE = 1 << 7, 5706 CM_EDITFLAG_CAN_EDIT_RICHLY = 1 << 8 5707 } 5708 5709 alias CM_EDITFLAG_NONE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_NONE; 5710 alias CM_EDITFLAG_CAN_UNDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_UNDO; 5711 alias CM_EDITFLAG_CAN_REDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_REDO; 5712 alias CM_EDITFLAG_CAN_CUT = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_CUT; 5713 alias CM_EDITFLAG_CAN_COPY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_COPY; 5714 alias CM_EDITFLAG_CAN_PASTE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_PASTE; 5715 alias CM_EDITFLAG_CAN_DELETE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_DELETE; 5716 alias CM_EDITFLAG_CAN_SELECT_ALL = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_SELECT_ALL; 5717 alias CM_EDITFLAG_CAN_TRANSLATE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_TRANSLATE; 5718 alias CM_EDITFLAG_CAN_EDIT_RICHLY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_EDIT_RICHLY; 5719 5720 /// 5721 /// Supported quick menu state bit flags. 5722 /// 5723 enum cef_quick_menu_edit_state_flags_t 5724 { 5725 QM_EDITFLAG_NONE = 0, 5726 QM_EDITFLAG_CAN_ELLIPSIS = 1 << 0, 5727 QM_EDITFLAG_CAN_CUT = 1 << 1, 5728 QM_EDITFLAG_CAN_COPY = 1 << 2, 5729 QM_EDITFLAG_CAN_PASTE = 1 << 3 5730 } 5731 5732 alias QM_EDITFLAG_NONE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_NONE; 5733 alias QM_EDITFLAG_CAN_ELLIPSIS = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_ELLIPSIS; 5734 alias QM_EDITFLAG_CAN_CUT = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_CUT; 5735 alias QM_EDITFLAG_CAN_COPY = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_COPY; 5736 alias QM_EDITFLAG_CAN_PASTE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_PASTE; 5737 5738 /// 5739 /// Key event types. 5740 /// 5741 enum cef_key_event_type_t 5742 { 5743 /// 5744 /// Notification that a key transitioned from "up" to "down". 5745 /// 5746 KEYEVENT_RAWKEYDOWN = 0, 5747 5748 /// 5749 /// Notification that a key was pressed. This does not necessarily correspond 5750 /// to a character depending on the key and language. Use KEYEVENT_CHAR for 5751 /// character input. 5752 /// 5753 KEYEVENT_KEYDOWN = 1, 5754 5755 /// 5756 /// Notification that a key was released. 5757 /// 5758 KEYEVENT_KEYUP = 2, 5759 5760 /// 5761 /// Notification that a character was typed. Use this for text input. Key 5762 /// down events may generate 0, 1, or more than one character event depending 5763 /// on the key, locale, and operating system. 5764 /// 5765 KEYEVENT_CHAR = 3 5766 } 5767 5768 alias KEYEVENT_RAWKEYDOWN = cef_key_event_type_t.KEYEVENT_RAWKEYDOWN; 5769 alias KEYEVENT_KEYDOWN = cef_key_event_type_t.KEYEVENT_KEYDOWN; 5770 alias KEYEVENT_KEYUP = cef_key_event_type_t.KEYEVENT_KEYUP; 5771 alias KEYEVENT_CHAR = cef_key_event_type_t.KEYEVENT_CHAR; 5772 5773 /// 5774 /// Structure representing keyboard event information. 5775 /// 5776 struct cef_key_event_t 5777 { 5778 /// 5779 /// Size of this structure. 5780 /// 5781 size_t size; 5782 5783 /// 5784 /// The type of keyboard event. 5785 /// 5786 cef_key_event_type_t type; 5787 5788 /// 5789 /// Bit flags describing any pressed modifier keys. See 5790 /// cef_event_flags_t for values. 5791 /// 5792 uint modifiers; 5793 5794 /// 5795 /// The Windows key code for the key event. This value is used by the DOM 5796 /// specification. Sometimes it comes directly from the event (i.e. on 5797 /// Windows) and sometimes it's determined using a mapping function. See 5798 /// WebCore/platform/chromium/KeyboardCodes.h for the list of values. 5799 /// 5800 int windows_key_code; 5801 5802 /// 5803 /// The actual key code genenerated by the platform. 5804 /// 5805 int native_key_code; 5806 5807 /// 5808 /// Indicates whether the event is considered a "system key" event (see 5809 /// http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). 5810 /// This value will always be false on non-Windows platforms. 5811 /// 5812 int is_system_key; 5813 5814 /// 5815 /// The character generated by the keystroke. 5816 /// 5817 alias char16_t = ushort; 5818 char16_t character; 5819 5820 /// 5821 /// Same as |character| but unmodified by any concurrently-held modifiers 5822 /// (except shift). This is useful for working out shortcut keys. 5823 /// 5824 char16_t unmodified_character; 5825 5826 /// 5827 /// True if the focus is currently on an editable field on the page. This is 5828 /// useful for determining if standard key events should be intercepted. 5829 /// 5830 int focus_on_editable_field; 5831 } 5832 5833 5834 5835 /// 5836 /// Focus sources. 5837 /// 5838 enum cef_focus_source_t 5839 { 5840 /// 5841 /// The source is explicit navigation via the API (LoadURL(), etc). 5842 /// 5843 FOCUS_SOURCE_NAVIGATION = 0, 5844 /// 5845 /// The source is a system-generated focus event. 5846 /// 5847 FOCUS_SOURCE_SYSTEM = 1, 5848 5849 FOCUS_SOURCE_NUM_VALUES = 2 5850 } 5851 5852 alias FOCUS_SOURCE_NAVIGATION = cef_focus_source_t.FOCUS_SOURCE_NAVIGATION; 5853 alias FOCUS_SOURCE_SYSTEM = cef_focus_source_t.FOCUS_SOURCE_SYSTEM; 5854 alias FOCUS_SOURCE_NUM_VALUES = cef_focus_source_t.FOCUS_SOURCE_NUM_VALUES; 5855 5856 /// 5857 /// Navigation types. 5858 /// 5859 enum cef_navigation_type_t 5860 { 5861 NAVIGATION_LINK_CLICKED = 0, 5862 NAVIGATION_FORM_SUBMITTED = 1, 5863 NAVIGATION_BACK_FORWARD = 2, 5864 NAVIGATION_RELOAD = 3, 5865 NAVIGATION_FORM_RESUBMITTED = 4, 5866 NAVIGATION_OTHER = 5, 5867 NAVIGATION_NUM_VALUES = 6 5868 } 5869 5870 alias NAVIGATION_LINK_CLICKED = cef_navigation_type_t.NAVIGATION_LINK_CLICKED; 5871 alias NAVIGATION_FORM_SUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_SUBMITTED; 5872 alias NAVIGATION_BACK_FORWARD = cef_navigation_type_t.NAVIGATION_BACK_FORWARD; 5873 alias NAVIGATION_RELOAD = cef_navigation_type_t.NAVIGATION_RELOAD; 5874 alias NAVIGATION_FORM_RESUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_RESUBMITTED; 5875 alias NAVIGATION_OTHER = cef_navigation_type_t.NAVIGATION_OTHER; 5876 alias NAVIGATION_NUM_VALUES = cef_navigation_type_t.NAVIGATION_NUM_VALUES; 5877 5878 /// 5879 /// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and 5880 /// UTF16 (LE and BE) by default. All other types must be translated to UTF8 5881 /// before being passed to the parser. If a BOM is detected and the correct 5882 /// decoder is available then that decoder will be used automatically. 5883 /// 5884 enum cef_xml_encoding_type_t 5885 { 5886 XML_ENCODING_NONE = 0, 5887 XML_ENCODING_UTF8 = 1, 5888 XML_ENCODING_UTF16LE = 2, 5889 XML_ENCODING_UTF16BE = 3, 5890 XML_ENCODING_ASCII = 4, 5891 XML_ENCODING_NUM_VALUES = 5 5892 } 5893 5894 alias XML_ENCODING_NONE = cef_xml_encoding_type_t.XML_ENCODING_NONE; 5895 alias XML_ENCODING_UTF8 = cef_xml_encoding_type_t.XML_ENCODING_UTF8; 5896 alias XML_ENCODING_UTF16LE = cef_xml_encoding_type_t.XML_ENCODING_UTF16LE; 5897 alias XML_ENCODING_UTF16BE = cef_xml_encoding_type_t.XML_ENCODING_UTF16BE; 5898 alias XML_ENCODING_ASCII = cef_xml_encoding_type_t.XML_ENCODING_ASCII; 5899 alias XML_ENCODING_NUM_VALUES = cef_xml_encoding_type_t.XML_ENCODING_NUM_VALUES; 5900 5901 /// 5902 /// XML node types. 5903 /// 5904 enum cef_xml_node_type_t 5905 { 5906 XML_NODE_UNSUPPORTED = 0, 5907 XML_NODE_PROCESSING_INSTRUCTION = 1, 5908 XML_NODE_DOCUMENT_TYPE = 2, 5909 XML_NODE_ELEMENT_START = 3, 5910 XML_NODE_ELEMENT_END = 4, 5911 XML_NODE_ATTRIBUTE = 5, 5912 XML_NODE_TEXT = 6, 5913 XML_NODE_CDATA = 7, 5914 XML_NODE_ENTITY_REFERENCE = 8, 5915 XML_NODE_WHITESPACE = 9, 5916 XML_NODE_COMMENT = 10, 5917 XML_NODE_NUM_VALUES = 11 5918 } 5919 5920 alias XML_NODE_UNSUPPORTED = cef_xml_node_type_t.XML_NODE_UNSUPPORTED; 5921 alias XML_NODE_PROCESSING_INSTRUCTION = cef_xml_node_type_t.XML_NODE_PROCESSING_INSTRUCTION; 5922 alias XML_NODE_DOCUMENT_TYPE = cef_xml_node_type_t.XML_NODE_DOCUMENT_TYPE; 5923 alias XML_NODE_ELEMENT_START = cef_xml_node_type_t.XML_NODE_ELEMENT_START; 5924 alias XML_NODE_ELEMENT_END = cef_xml_node_type_t.XML_NODE_ELEMENT_END; 5925 alias XML_NODE_ATTRIBUTE = cef_xml_node_type_t.XML_NODE_ATTRIBUTE; 5926 alias XML_NODE_TEXT = cef_xml_node_type_t.XML_NODE_TEXT; 5927 alias XML_NODE_CDATA = cef_xml_node_type_t.XML_NODE_CDATA; 5928 alias XML_NODE_ENTITY_REFERENCE = cef_xml_node_type_t.XML_NODE_ENTITY_REFERENCE; 5929 alias XML_NODE_WHITESPACE = cef_xml_node_type_t.XML_NODE_WHITESPACE; 5930 alias XML_NODE_COMMENT = cef_xml_node_type_t.XML_NODE_COMMENT; 5931 alias XML_NODE_NUM_VALUES = cef_xml_node_type_t.XML_NODE_NUM_VALUES; 5932 5933 /// 5934 /// Popup window features. 5935 /// 5936 struct cef_popup_features_t 5937 { 5938 /// 5939 /// Size of this structure. 5940 /// 5941 size_t size; 5942 5943 int x; 5944 int xSet; 5945 int y; 5946 int ySet; 5947 int width; 5948 int widthSet; 5949 int height; 5950 int heightSet; 5951 5952 /// 5953 /// True (1) if browser interface elements should be hidden. 5954 /// 5955 int isPopup; 5956 } 5957 5958 5959 5960 /// 5961 /// DOM document types. 5962 /// 5963 enum cef_dom_document_type_t 5964 { 5965 DOM_DOCUMENT_TYPE_UNKNOWN = 0, 5966 DOM_DOCUMENT_TYPE_HTML = 1, 5967 DOM_DOCUMENT_TYPE_XHTML = 2, 5968 DOM_DOCUMENT_TYPE_PLUGIN = 3, 5969 DOM_DOCUMENT_TYPE_NUM_VALUES = 4 5970 } 5971 5972 alias DOM_DOCUMENT_TYPE_UNKNOWN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_UNKNOWN; 5973 alias DOM_DOCUMENT_TYPE_HTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_HTML; 5974 alias DOM_DOCUMENT_TYPE_XHTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_XHTML; 5975 alias DOM_DOCUMENT_TYPE_PLUGIN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_PLUGIN; 5976 alias DOM_DOCUMENT_TYPE_NUM_VALUES = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_NUM_VALUES; 5977 5978 /// 5979 /// DOM event category flags. 5980 /// 5981 enum cef_dom_event_category_t 5982 { 5983 DOM_EVENT_CATEGORY_UNKNOWN = 0x0, 5984 DOM_EVENT_CATEGORY_UI = 0x1, 5985 DOM_EVENT_CATEGORY_MOUSE = 0x2, 5986 DOM_EVENT_CATEGORY_MUTATION = 0x4, 5987 DOM_EVENT_CATEGORY_KEYBOARD = 0x8, 5988 DOM_EVENT_CATEGORY_TEXT = 0x10, 5989 DOM_EVENT_CATEGORY_COMPOSITION = 0x20, 5990 DOM_EVENT_CATEGORY_DRAG = 0x40, 5991 DOM_EVENT_CATEGORY_CLIPBOARD = 0x80, 5992 DOM_EVENT_CATEGORY_MESSAGE = 0x100, 5993 DOM_EVENT_CATEGORY_WHEEL = 0x200, 5994 DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400, 5995 DOM_EVENT_CATEGORY_OVERFLOW = 0x800, 5996 DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000, 5997 DOM_EVENT_CATEGORY_POPSTATE = 0x2000, 5998 DOM_EVENT_CATEGORY_PROGRESS = 0x4000, 5999 DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000 6000 } 6001 6002 alias DOM_EVENT_CATEGORY_UNKNOWN = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UNKNOWN; 6003 alias DOM_EVENT_CATEGORY_UI = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UI; 6004 alias DOM_EVENT_CATEGORY_MOUSE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MOUSE; 6005 alias DOM_EVENT_CATEGORY_MUTATION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MUTATION; 6006 alias DOM_EVENT_CATEGORY_KEYBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_KEYBOARD; 6007 alias DOM_EVENT_CATEGORY_TEXT = cef_dom_event_category_t.DOM_EVENT_CATEGORY_TEXT; 6008 alias DOM_EVENT_CATEGORY_COMPOSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_COMPOSITION; 6009 alias DOM_EVENT_CATEGORY_DRAG = cef_dom_event_category_t.DOM_EVENT_CATEGORY_DRAG; 6010 alias DOM_EVENT_CATEGORY_CLIPBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_CLIPBOARD; 6011 alias DOM_EVENT_CATEGORY_MESSAGE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MESSAGE; 6012 alias DOM_EVENT_CATEGORY_WHEEL = cef_dom_event_category_t.DOM_EVENT_CATEGORY_WHEEL; 6013 alias DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = cef_dom_event_category_t.DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED; 6014 alias DOM_EVENT_CATEGORY_OVERFLOW = cef_dom_event_category_t.DOM_EVENT_CATEGORY_OVERFLOW; 6015 alias DOM_EVENT_CATEGORY_PAGE_TRANSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PAGE_TRANSITION; 6016 alias DOM_EVENT_CATEGORY_POPSTATE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_POPSTATE; 6017 alias DOM_EVENT_CATEGORY_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PROGRESS; 6018 alias DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS; 6019 6020 /// 6021 /// DOM event processing phases. 6022 /// 6023 enum cef_dom_event_phase_t 6024 { 6025 DOM_EVENT_PHASE_UNKNOWN = 0, 6026 DOM_EVENT_PHASE_CAPTURING = 1, 6027 DOM_EVENT_PHASE_AT_TARGET = 2, 6028 DOM_EVENT_PHASE_BUBBLING = 3, 6029 DOM_EVENT_PHASE_NUM_VALUES = 4 6030 } 6031 6032 alias DOM_EVENT_PHASE_UNKNOWN = cef_dom_event_phase_t.DOM_EVENT_PHASE_UNKNOWN; 6033 alias DOM_EVENT_PHASE_CAPTURING = cef_dom_event_phase_t.DOM_EVENT_PHASE_CAPTURING; 6034 alias DOM_EVENT_PHASE_AT_TARGET = cef_dom_event_phase_t.DOM_EVENT_PHASE_AT_TARGET; 6035 alias DOM_EVENT_PHASE_BUBBLING = cef_dom_event_phase_t.DOM_EVENT_PHASE_BUBBLING; 6036 alias DOM_EVENT_PHASE_NUM_VALUES = cef_dom_event_phase_t.DOM_EVENT_PHASE_NUM_VALUES; 6037 6038 /// 6039 /// DOM node types. 6040 /// 6041 enum cef_dom_node_type_t 6042 { 6043 DOM_NODE_TYPE_UNSUPPORTED = 0, 6044 DOM_NODE_TYPE_ELEMENT = 1, 6045 DOM_NODE_TYPE_ATTRIBUTE = 2, 6046 DOM_NODE_TYPE_TEXT = 3, 6047 DOM_NODE_TYPE_CDATA_SECTION = 4, 6048 DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = 5, 6049 DOM_NODE_TYPE_COMMENT = 6, 6050 DOM_NODE_TYPE_DOCUMENT = 7, 6051 DOM_NODE_TYPE_DOCUMENT_TYPE = 8, 6052 DOM_NODE_TYPE_DOCUMENT_FRAGMENT = 9, 6053 DOM_NODE_TYPE_NUM_VALUES = 10 6054 } 6055 6056 alias DOM_NODE_TYPE_UNSUPPORTED = cef_dom_node_type_t.DOM_NODE_TYPE_UNSUPPORTED; 6057 alias DOM_NODE_TYPE_ELEMENT = cef_dom_node_type_t.DOM_NODE_TYPE_ELEMENT; 6058 alias DOM_NODE_TYPE_ATTRIBUTE = cef_dom_node_type_t.DOM_NODE_TYPE_ATTRIBUTE; 6059 alias DOM_NODE_TYPE_TEXT = cef_dom_node_type_t.DOM_NODE_TYPE_TEXT; 6060 alias DOM_NODE_TYPE_CDATA_SECTION = cef_dom_node_type_t.DOM_NODE_TYPE_CDATA_SECTION; 6061 alias DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = cef_dom_node_type_t.DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS; 6062 alias DOM_NODE_TYPE_COMMENT = cef_dom_node_type_t.DOM_NODE_TYPE_COMMENT; 6063 alias DOM_NODE_TYPE_DOCUMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT; 6064 alias DOM_NODE_TYPE_DOCUMENT_TYPE = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_TYPE; 6065 alias DOM_NODE_TYPE_DOCUMENT_FRAGMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_FRAGMENT; 6066 alias DOM_NODE_TYPE_NUM_VALUES = cef_dom_node_type_t.DOM_NODE_TYPE_NUM_VALUES; 6067 6068 /// 6069 /// DOM form control types. Should be kept in sync with Chromium's 6070 /// blink::mojom::FormControlType type. 6071 /// 6072 enum cef_dom_form_control_type_t 6073 { 6074 DOM_FORM_CONTROL_TYPE_UNSUPPORTED = 0, 6075 DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = 1, 6076 DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = 2, 6077 DOM_FORM_CONTROL_TYPE_BUTTON_RESET = 3, 6078 DOM_FORM_CONTROL_TYPE_BUTTON_POPOVER = 4, 6079 DOM_FORM_CONTROL_TYPE_FIELDSET = 5, 6080 DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = 6, 6081 DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = 7, 6082 DOM_FORM_CONTROL_TYPE_INPUT_COLOR = 8, 6083 DOM_FORM_CONTROL_TYPE_INPUT_DATE = 9, 6084 DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = 10, 6085 DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = 11, 6086 DOM_FORM_CONTROL_TYPE_INPUT_FILE = 12, 6087 DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = 13, 6088 DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = 14, 6089 DOM_FORM_CONTROL_TYPE_INPUT_MONTH = 15, 6090 DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = 16, 6091 DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = 17, 6092 DOM_FORM_CONTROL_TYPE_INPUT_RADIO = 18, 6093 DOM_FORM_CONTROL_TYPE_INPUT_RANGE = 19, 6094 DOM_FORM_CONTROL_TYPE_INPUT_RESET = 20, 6095 DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = 21, 6096 DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = 22, 6097 DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = 23, 6098 DOM_FORM_CONTROL_TYPE_INPUT_TEXT = 24, 6099 DOM_FORM_CONTROL_TYPE_INPUT_TIME = 25, 6100 DOM_FORM_CONTROL_TYPE_INPUT_URL = 26, 6101 DOM_FORM_CONTROL_TYPE_INPUT_WEEK = 27, 6102 DOM_FORM_CONTROL_TYPE_OUTPUT = 28, 6103 DOM_FORM_CONTROL_TYPE_SELECT_ONE = 29, 6104 DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = 30, 6105 DOM_FORM_CONTROL_TYPE_TEXT_AREA = 31, 6106 DOM_FORM_CONTROL_TYPE_NUM_VALUES = 32 6107 } 6108 6109 alias DOM_FORM_CONTROL_TYPE_UNSUPPORTED = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_UNSUPPORTED; 6110 alias DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON; 6111 alias DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT; 6112 alias DOM_FORM_CONTROL_TYPE_BUTTON_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_RESET; 6113 alias DOM_FORM_CONTROL_TYPE_BUTTON_POPOVER = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_POPOVER; 6114 alias DOM_FORM_CONTROL_TYPE_FIELDSET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_FIELDSET; 6115 alias DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_BUTTON; 6116 alias DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX; 6117 alias DOM_FORM_CONTROL_TYPE_INPUT_COLOR = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_COLOR; 6118 alias DOM_FORM_CONTROL_TYPE_INPUT_DATE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATE; 6119 alias DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL; 6120 alias DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_EMAIL; 6121 alias DOM_FORM_CONTROL_TYPE_INPUT_FILE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_FILE; 6122 alias DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN; 6123 alias DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_IMAGE; 6124 alias DOM_FORM_CONTROL_TYPE_INPUT_MONTH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_MONTH; 6125 alias DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_NUMBER; 6126 alias DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD; 6127 alias DOM_FORM_CONTROL_TYPE_INPUT_RADIO = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RADIO; 6128 alias DOM_FORM_CONTROL_TYPE_INPUT_RANGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RANGE; 6129 alias DOM_FORM_CONTROL_TYPE_INPUT_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RESET; 6130 alias DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SEARCH; 6131 alias DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT; 6132 alias DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE; 6133 alias DOM_FORM_CONTROL_TYPE_INPUT_TEXT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TEXT; 6134 alias DOM_FORM_CONTROL_TYPE_INPUT_TIME = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TIME; 6135 alias DOM_FORM_CONTROL_TYPE_INPUT_URL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_URL; 6136 alias DOM_FORM_CONTROL_TYPE_INPUT_WEEK = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_WEEK; 6137 alias DOM_FORM_CONTROL_TYPE_OUTPUT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_OUTPUT; 6138 alias DOM_FORM_CONTROL_TYPE_SELECT_ONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_ONE; 6139 alias DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE; 6140 alias DOM_FORM_CONTROL_TYPE_TEXT_AREA = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_TEXT_AREA; 6141 alias DOM_FORM_CONTROL_TYPE_NUM_VALUES = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_NUM_VALUES; 6142 6143 /// 6144 /// Supported file dialog modes. 6145 /// 6146 enum cef_file_dialog_mode_t 6147 { 6148 /// 6149 /// Requires that the file exists before allowing the user to pick it. 6150 /// 6151 FILE_DIALOG_OPEN = 0, 6152 6153 /// 6154 /// Like Open, but allows picking multiple files to open. 6155 /// 6156 FILE_DIALOG_OPEN_MULTIPLE = 1, 6157 6158 /// 6159 /// Like Open, but selects a folder to open. 6160 /// 6161 FILE_DIALOG_OPEN_FOLDER = 2, 6162 6163 /// 6164 /// Allows picking a nonexistent file, and prompts to overwrite if the file 6165 /// already exists. 6166 /// 6167 FILE_DIALOG_SAVE = 3, 6168 6169 FILE_DIALOG_NUM_VALUES = 4 6170 } 6171 6172 alias FILE_DIALOG_OPEN = cef_file_dialog_mode_t.FILE_DIALOG_OPEN; 6173 alias FILE_DIALOG_OPEN_MULTIPLE = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_MULTIPLE; 6174 alias FILE_DIALOG_OPEN_FOLDER = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_FOLDER; 6175 alias FILE_DIALOG_SAVE = cef_file_dialog_mode_t.FILE_DIALOG_SAVE; 6176 alias FILE_DIALOG_NUM_VALUES = cef_file_dialog_mode_t.FILE_DIALOG_NUM_VALUES; 6177 6178 /// 6179 /// Print job color mode values. 6180 /// 6181 enum cef_color_model_t 6182 { 6183 COLOR_MODEL_UNKNOWN = 0, 6184 COLOR_MODEL_GRAY = 1, 6185 COLOR_MODEL_COLOR = 2, 6186 COLOR_MODEL_CMYK = 3, 6187 COLOR_MODEL_CMY = 4, 6188 COLOR_MODEL_KCMY = 5, 6189 COLOR_MODEL_CMY_K = 6, // CMY_K represents CMY+K. 6190 COLOR_MODEL_BLACK = 7, 6191 COLOR_MODEL_GRAYSCALE = 8, 6192 COLOR_MODEL_RGB = 9, 6193 COLOR_MODEL_RGB16 = 10, 6194 COLOR_MODEL_RGBA = 11, 6195 COLOR_MODEL_COLORMODE_COLOR = 12, // Used in samsung printer ppds. 6196 COLOR_MODEL_COLORMODE_MONOCHROME = 13, // Used in samsung printer ppds. 6197 COLOR_MODEL_HP_COLOR_COLOR = 14, // Used in HP color printer ppds. 6198 COLOR_MODEL_HP_COLOR_BLACK = 15, // Used in HP color printer ppds. 6199 COLOR_MODEL_PRINTOUTMODE_NORMAL = 16, // Used in foomatic ppds. 6200 COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = 17, // Used in foomatic ppds. 6201 COLOR_MODEL_PROCESSCOLORMODEL_CMYK = 18, // Used in canon printer ppds. 6202 COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = 19, // Used in canon printer ppds. 6203 COLOR_MODEL_PROCESSCOLORMODEL_RGB = 20, // Used in canon printer ppds 6204 COLOR_MODEL_NUM_VALUES = 21 6205 } 6206 6207 alias COLOR_MODEL_UNKNOWN = cef_color_model_t.COLOR_MODEL_UNKNOWN; 6208 alias COLOR_MODEL_GRAY = cef_color_model_t.COLOR_MODEL_GRAY; 6209 alias COLOR_MODEL_COLOR = cef_color_model_t.COLOR_MODEL_COLOR; 6210 alias COLOR_MODEL_CMYK = cef_color_model_t.COLOR_MODEL_CMYK; 6211 alias COLOR_MODEL_CMY = cef_color_model_t.COLOR_MODEL_CMY; 6212 alias COLOR_MODEL_KCMY = cef_color_model_t.COLOR_MODEL_KCMY; 6213 alias COLOR_MODEL_CMY_K = cef_color_model_t.COLOR_MODEL_CMY_K; 6214 alias COLOR_MODEL_BLACK = cef_color_model_t.COLOR_MODEL_BLACK; 6215 alias COLOR_MODEL_GRAYSCALE = cef_color_model_t.COLOR_MODEL_GRAYSCALE; 6216 alias COLOR_MODEL_RGB = cef_color_model_t.COLOR_MODEL_RGB; 6217 alias COLOR_MODEL_RGB16 = cef_color_model_t.COLOR_MODEL_RGB16; 6218 alias COLOR_MODEL_RGBA = cef_color_model_t.COLOR_MODEL_RGBA; 6219 alias COLOR_MODEL_COLORMODE_COLOR = cef_color_model_t.COLOR_MODEL_COLORMODE_COLOR; 6220 alias COLOR_MODEL_COLORMODE_MONOCHROME = cef_color_model_t.COLOR_MODEL_COLORMODE_MONOCHROME; 6221 alias COLOR_MODEL_HP_COLOR_COLOR = cef_color_model_t.COLOR_MODEL_HP_COLOR_COLOR; 6222 alias COLOR_MODEL_HP_COLOR_BLACK = cef_color_model_t.COLOR_MODEL_HP_COLOR_BLACK; 6223 alias COLOR_MODEL_PRINTOUTMODE_NORMAL = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL; 6224 alias COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY; 6225 alias COLOR_MODEL_PROCESSCOLORMODEL_CMYK = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_CMYK; 6226 alias COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE; 6227 alias COLOR_MODEL_PROCESSCOLORMODEL_RGB = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_RGB; 6228 alias COLOR_MODEL_NUM_VALUES = cef_color_model_t.COLOR_MODEL_NUM_VALUES; 6229 6230 /// 6231 /// Print job duplex mode values. 6232 /// 6233 enum cef_duplex_mode_t 6234 { 6235 DUPLEX_MODE_UNKNOWN = -1, 6236 DUPLEX_MODE_SIMPLEX = 0, 6237 DUPLEX_MODE_LONG_EDGE = 1, 6238 DUPLEX_MODE_SHORT_EDGE = 2, 6239 DUPLEX_MODE_NUM_VALUES = 3 6240 } 6241 6242 alias DUPLEX_MODE_UNKNOWN = cef_duplex_mode_t.DUPLEX_MODE_UNKNOWN; 6243 alias DUPLEX_MODE_SIMPLEX = cef_duplex_mode_t.DUPLEX_MODE_SIMPLEX; 6244 alias DUPLEX_MODE_LONG_EDGE = cef_duplex_mode_t.DUPLEX_MODE_LONG_EDGE; 6245 alias DUPLEX_MODE_SHORT_EDGE = cef_duplex_mode_t.DUPLEX_MODE_SHORT_EDGE; 6246 alias DUPLEX_MODE_NUM_VALUES = cef_duplex_mode_t.DUPLEX_MODE_NUM_VALUES; 6247 6248 /// 6249 /// Cursor type values. 6250 /// 6251 enum cef_cursor_type_t 6252 { 6253 CT_POINTER = 0, 6254 CT_CROSS = 1, 6255 CT_HAND = 2, 6256 CT_IBEAM = 3, 6257 CT_WAIT = 4, 6258 CT_HELP = 5, 6259 CT_EASTRESIZE = 6, 6260 CT_NORTHRESIZE = 7, 6261 CT_NORTHEASTRESIZE = 8, 6262 CT_NORTHWESTRESIZE = 9, 6263 CT_SOUTHRESIZE = 10, 6264 CT_SOUTHEASTRESIZE = 11, 6265 CT_SOUTHWESTRESIZE = 12, 6266 CT_WESTRESIZE = 13, 6267 CT_NORTHSOUTHRESIZE = 14, 6268 CT_EASTWESTRESIZE = 15, 6269 CT_NORTHEASTSOUTHWESTRESIZE = 16, 6270 CT_NORTHWESTSOUTHEASTRESIZE = 17, 6271 CT_COLUMNRESIZE = 18, 6272 CT_ROWRESIZE = 19, 6273 CT_MIDDLEPANNING = 20, 6274 CT_EASTPANNING = 21, 6275 CT_NORTHPANNING = 22, 6276 CT_NORTHEASTPANNING = 23, 6277 CT_NORTHWESTPANNING = 24, 6278 CT_SOUTHPANNING = 25, 6279 CT_SOUTHEASTPANNING = 26, 6280 CT_SOUTHWESTPANNING = 27, 6281 CT_WESTPANNING = 28, 6282 CT_MOVE = 29, 6283 CT_VERTICALTEXT = 30, 6284 CT_CELL = 31, 6285 CT_CONTEXTMENU = 32, 6286 CT_ALIAS = 33, 6287 CT_PROGRESS = 34, 6288 CT_NODROP = 35, 6289 CT_COPY = 36, 6290 CT_NONE = 37, 6291 CT_NOTALLOWED = 38, 6292 CT_ZOOMIN = 39, 6293 CT_ZOOMOUT = 40, 6294 CT_GRAB = 41, 6295 CT_GRABBING = 42, 6296 CT_MIDDLE_PANNING_VERTICAL = 43, 6297 CT_MIDDLE_PANNING_HORIZONTAL = 44, 6298 CT_CUSTOM = 45, 6299 CT_DND_NONE = 46, 6300 CT_DND_MOVE = 47, 6301 CT_DND_COPY = 48, 6302 CT_DND_LINK = 49, 6303 CT_NUM_VALUES = 50 6304 } 6305 6306 alias CT_POINTER = cef_cursor_type_t.CT_POINTER; 6307 alias CT_CROSS = cef_cursor_type_t.CT_CROSS; 6308 alias CT_HAND = cef_cursor_type_t.CT_HAND; 6309 alias CT_IBEAM = cef_cursor_type_t.CT_IBEAM; 6310 alias CT_WAIT = cef_cursor_type_t.CT_WAIT; 6311 alias CT_HELP = cef_cursor_type_t.CT_HELP; 6312 alias CT_EASTRESIZE = cef_cursor_type_t.CT_EASTRESIZE; 6313 alias CT_NORTHRESIZE = cef_cursor_type_t.CT_NORTHRESIZE; 6314 alias CT_NORTHEASTRESIZE = cef_cursor_type_t.CT_NORTHEASTRESIZE; 6315 alias CT_NORTHWESTRESIZE = cef_cursor_type_t.CT_NORTHWESTRESIZE; 6316 alias CT_SOUTHRESIZE = cef_cursor_type_t.CT_SOUTHRESIZE; 6317 alias CT_SOUTHEASTRESIZE = cef_cursor_type_t.CT_SOUTHEASTRESIZE; 6318 alias CT_SOUTHWESTRESIZE = cef_cursor_type_t.CT_SOUTHWESTRESIZE; 6319 alias CT_WESTRESIZE = cef_cursor_type_t.CT_WESTRESIZE; 6320 alias CT_NORTHSOUTHRESIZE = cef_cursor_type_t.CT_NORTHSOUTHRESIZE; 6321 alias CT_EASTWESTRESIZE = cef_cursor_type_t.CT_EASTWESTRESIZE; 6322 alias CT_NORTHEASTSOUTHWESTRESIZE = cef_cursor_type_t.CT_NORTHEASTSOUTHWESTRESIZE; 6323 alias CT_NORTHWESTSOUTHEASTRESIZE = cef_cursor_type_t.CT_NORTHWESTSOUTHEASTRESIZE; 6324 alias CT_COLUMNRESIZE = cef_cursor_type_t.CT_COLUMNRESIZE; 6325 alias CT_ROWRESIZE = cef_cursor_type_t.CT_ROWRESIZE; 6326 alias CT_MIDDLEPANNING = cef_cursor_type_t.CT_MIDDLEPANNING; 6327 alias CT_EASTPANNING = cef_cursor_type_t.CT_EASTPANNING; 6328 alias CT_NORTHPANNING = cef_cursor_type_t.CT_NORTHPANNING; 6329 alias CT_NORTHEASTPANNING = cef_cursor_type_t.CT_NORTHEASTPANNING; 6330 alias CT_NORTHWESTPANNING = cef_cursor_type_t.CT_NORTHWESTPANNING; 6331 alias CT_SOUTHPANNING = cef_cursor_type_t.CT_SOUTHPANNING; 6332 alias CT_SOUTHEASTPANNING = cef_cursor_type_t.CT_SOUTHEASTPANNING; 6333 alias CT_SOUTHWESTPANNING = cef_cursor_type_t.CT_SOUTHWESTPANNING; 6334 alias CT_WESTPANNING = cef_cursor_type_t.CT_WESTPANNING; 6335 alias CT_MOVE = cef_cursor_type_t.CT_MOVE; 6336 alias CT_VERTICALTEXT = cef_cursor_type_t.CT_VERTICALTEXT; 6337 alias CT_CELL = cef_cursor_type_t.CT_CELL; 6338 alias CT_CONTEXTMENU = cef_cursor_type_t.CT_CONTEXTMENU; 6339 alias CT_ALIAS = cef_cursor_type_t.CT_ALIAS; 6340 alias CT_PROGRESS = cef_cursor_type_t.CT_PROGRESS; 6341 alias CT_NODROP = cef_cursor_type_t.CT_NODROP; 6342 alias CT_COPY = cef_cursor_type_t.CT_COPY; 6343 alias CT_NONE = cef_cursor_type_t.CT_NONE; 6344 alias CT_NOTALLOWED = cef_cursor_type_t.CT_NOTALLOWED; 6345 alias CT_ZOOMIN = cef_cursor_type_t.CT_ZOOMIN; 6346 alias CT_ZOOMOUT = cef_cursor_type_t.CT_ZOOMOUT; 6347 alias CT_GRAB = cef_cursor_type_t.CT_GRAB; 6348 alias CT_GRABBING = cef_cursor_type_t.CT_GRABBING; 6349 alias CT_MIDDLE_PANNING_VERTICAL = cef_cursor_type_t.CT_MIDDLE_PANNING_VERTICAL; 6350 alias CT_MIDDLE_PANNING_HORIZONTAL = cef_cursor_type_t.CT_MIDDLE_PANNING_HORIZONTAL; 6351 alias CT_CUSTOM = cef_cursor_type_t.CT_CUSTOM; 6352 alias CT_DND_NONE = cef_cursor_type_t.CT_DND_NONE; 6353 alias CT_DND_MOVE = cef_cursor_type_t.CT_DND_MOVE; 6354 alias CT_DND_COPY = cef_cursor_type_t.CT_DND_COPY; 6355 alias CT_DND_LINK = cef_cursor_type_t.CT_DND_LINK; 6356 alias CT_NUM_VALUES = cef_cursor_type_t.CT_NUM_VALUES; 6357 6358 /// 6359 /// Structure representing cursor information. |buffer| will be 6360 /// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with 6361 /// an upper-left origin. 6362 /// 6363 struct cef_cursor_info_t 6364 { 6365 6366 cef_point_t hotspot; 6367 float image_scale_factor; 6368 void* buffer; 6369 6370 cef_size_t size; 6371 } 6372 6373 6374 6375 /// 6376 /// URI unescape rules passed to CefURIDecode(). 6377 /// 6378 enum cef_uri_unescape_rule_t 6379 { 6380 /// 6381 /// Don't unescape anything at all. 6382 /// 6383 UU_NONE = 0, 6384 6385 /// 6386 /// Don't unescape anything special, but all normal unescaping will happen. 6387 /// This is a placeholder and can't be combined with other flags (since it's 6388 /// just the absence of them). All other unescape rules imply "normal" in 6389 /// addition to their special meaning. Things like escaped letters, digits, 6390 /// and most symbols will get unescaped with this mode. 6391 /// 6392 UU_NORMAL = 1 << 0, 6393 6394 /// 6395 /// Convert %20 to spaces. In some places where we're showing URLs, we may 6396 /// want this. In places where the URL may be copied and pasted out, then 6397 /// you wouldn't want this since it might not be interpreted in one piece 6398 /// by other applications. 6399 /// 6400 UU_SPACES = 1 << 1, 6401 6402 /// 6403 /// Unescapes '/' and '\\'. If these characters were unescaped, the resulting 6404 /// URL won't be the same as the source one. Moreover, they are dangerous to 6405 /// unescape in strings that will be used as file paths or names. This value 6406 /// should only be used when slashes don't have special meaning, like data 6407 /// URLs. 6408 /// 6409 UU_PATH_SEPARATORS = 1 << 2, 6410 6411 /// 6412 /// Unescapes various characters that will change the meaning of URLs, 6413 /// including '%', '+', '&', '#'. Does not unescape path separators. 6414 /// If these characters were unescaped, the resulting URL won't be the same 6415 /// as the source one. This flag is used when generating final output like 6416 /// filenames for URLs where we won't be interpreting as a URL and want to do 6417 /// as much unescaping as possible. 6418 /// 6419 UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3, 6420 6421 /// 6422 /// URL queries use "+" for space. This flag controls that replacement. 6423 /// 6424 UU_REPLACE_PLUS_WITH_SPACE = 1 << 4 6425 } 6426 6427 alias UU_NONE = cef_uri_unescape_rule_t.UU_NONE; 6428 alias UU_NORMAL = cef_uri_unescape_rule_t.UU_NORMAL; 6429 alias UU_SPACES = cef_uri_unescape_rule_t.UU_SPACES; 6430 alias UU_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_PATH_SEPARATORS; 6431 alias UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS; 6432 alias UU_REPLACE_PLUS_WITH_SPACE = cef_uri_unescape_rule_t.UU_REPLACE_PLUS_WITH_SPACE; 6433 6434 /// 6435 /// Options that can be passed to CefParseJSON. 6436 /// 6437 enum cef_json_parser_options_t 6438 { 6439 /// 6440 /// Parses the input strictly according to RFC 4627. See comments in 6441 /// Chromium's base/json/json_reader.h file for known limitations/ 6442 /// deviations from the RFC. 6443 /// 6444 JSON_PARSER_RFC = 0, 6445 6446 /// 6447 /// Allows commas to exist after the last element in structures. 6448 /// 6449 JSON_PARSER_ALLOW_TRAILING_COMMAS = 1 << 0 6450 } 6451 6452 alias JSON_PARSER_RFC = cef_json_parser_options_t.JSON_PARSER_RFC; 6453 alias JSON_PARSER_ALLOW_TRAILING_COMMAS = cef_json_parser_options_t.JSON_PARSER_ALLOW_TRAILING_COMMAS; 6454 6455 /// 6456 /// Options that can be passed to CefWriteJSON. 6457 /// 6458 enum cef_json_writer_options_t 6459 { 6460 /// 6461 /// Default behavior. 6462 /// 6463 JSON_WRITER_DEFAULT = 0, 6464 6465 /// 6466 /// This option instructs the writer that if a Binary value is encountered, 6467 /// the value (and key if within a dictionary) will be omitted from the 6468 /// output, and success will be returned. Otherwise, if a binary value is 6469 /// encountered, failure will be returned. 6470 /// 6471 JSON_WRITER_OMIT_BINARY_VALUES = 1 << 0, 6472 6473 /// 6474 /// This option instructs the writer to write doubles that have no fractional 6475 /// part as a normal integer (i.e., without using exponential notation 6476 /// or appending a '.0') as long as the value is within the range of a 6477 /// 64-bit int. 6478 /// 6479 JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1, 6480 6481 /// 6482 /// Return a slightly nicer formatted json string (pads with whitespace to 6483 /// help with readability). 6484 /// 6485 JSON_WRITER_PRETTY_PRINT = 1 << 2 6486 } 6487 6488 alias JSON_WRITER_DEFAULT = cef_json_writer_options_t.JSON_WRITER_DEFAULT; 6489 alias JSON_WRITER_OMIT_BINARY_VALUES = cef_json_writer_options_t.JSON_WRITER_OMIT_BINARY_VALUES; 6490 alias JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = cef_json_writer_options_t.JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION; 6491 alias JSON_WRITER_PRETTY_PRINT = cef_json_writer_options_t.JSON_WRITER_PRETTY_PRINT; 6492 6493 /// 6494 /// Margin type for PDF printing. 6495 /// 6496 enum cef_pdf_print_margin_type_t 6497 { 6498 /// 6499 /// Default margins of 1cm (~0.4 inches). 6500 /// 6501 PDF_PRINT_MARGIN_DEFAULT = 0, 6502 6503 /// 6504 /// No margins. 6505 /// 6506 PDF_PRINT_MARGIN_NONE = 1, 6507 6508 /// 6509 /// Custom margins using the |margin_*| values from cef_pdf_print_settings_t. 6510 /// 6511 PDF_PRINT_MARGIN_CUSTOM = 2 6512 } 6513 6514 alias PDF_PRINT_MARGIN_DEFAULT = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_DEFAULT; 6515 alias PDF_PRINT_MARGIN_NONE = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_NONE; 6516 alias PDF_PRINT_MARGIN_CUSTOM = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_CUSTOM; 6517 6518 /// 6519 /// Structure representing PDF print settings. These values match the parameters 6520 /// supported by the DevTools Page.printToPDF function. See 6521 /// https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF 6522 /// 6523 struct cef_pdf_print_settings_t 6524 { 6525 /// 6526 /// Size of this structure. 6527 /// 6528 size_t size; 6529 6530 /// 6531 /// Set to true (1) for landscape mode or false (0) for portrait mode. 6532 /// 6533 int landscape; 6534 6535 /// 6536 /// Set to true (1) to print background graphics. 6537 /// 6538 int print_background; 6539 6540 /// 6541 /// The percentage to scale the PDF by before printing (e.g. .5 is 50%). 6542 /// If this value is less than or equal to zero the default value of 1.0 6543 /// will be used. 6544 /// 6545 double scale; 6546 6547 /// 6548 /// Output paper size in inches. If either of these values is less than or 6549 /// equal to zero then the default paper size (letter, 8.5 x 11 inches) will 6550 /// be used. 6551 /// 6552 double paper_width; 6553 double paper_height; 6554 6555 /// 6556 /// Set to true (1) to prefer page size as defined by css. Defaults to false 6557 /// (0), in which case the content will be scaled to fit the paper size. 6558 /// 6559 int prefer_css_page_size; 6560 6561 /// 6562 /// Margin type. 6563 /// 6564 cef_pdf_print_margin_type_t margin_type; 6565 6566 /// 6567 /// Margins in inches. Only used if |margin_type| is set to 6568 /// PDF_PRINT_MARGIN_CUSTOM. 6569 /// 6570 double margin_top; 6571 double margin_right; 6572 double margin_bottom; 6573 double margin_left; 6574 6575 /// 6576 /// Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed 6577 /// in the document order, not in the order specified, and no more than once. 6578 /// Defaults to empty string, which implies the entire document is printed. 6579 /// The page numbers are quietly capped to actual page count of the document, 6580 /// and ranges beyond the end of the document are ignored. If this results in 6581 /// no pages to print, an error is reported. It is an error to specify a range 6582 /// with start greater than end. 6583 /// 6584 cef_string_t page_ranges; 6585 6586 /// 6587 /// Set to true (1) to display the header and/or footer. Modify 6588 /// |header_template| and/or |footer_template| to customize the display. 6589 /// 6590 int display_header_footer; 6591 6592 /// 6593 /// HTML template for the print header. Only displayed if 6594 /// |display_header_footer| is true (1). Should be valid HTML markup with 6595 /// the following classes used to inject printing values into them: 6596 /// 6597 /// - date: formatted print date 6598 /// - title: document title 6599 /// - url: document location 6600 /// - pageNumber: current page number 6601 /// - totalPages: total pages in the document 6602 /// 6603 /// For example, "<span class=title></span>" would generate a span containing 6604 /// the title. 6605 /// 6606 cef_string_t header_template; 6607 6608 /// 6609 /// HTML template for the print footer. Only displayed if 6610 /// |display_header_footer| is true (1). Uses the same format as 6611 /// |header_template|. 6612 /// 6613 cef_string_t footer_template; 6614 6615 /// 6616 /// Set to true (1) to generate tagged (accessible) PDF. 6617 /// 6618 int generate_tagged_pdf; 6619 6620 /// 6621 /// Set to true (1) to generate a document outline. 6622 /// 6623 int generate_document_outline; 6624 } 6625 6626 6627 6628 /// 6629 /// Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for 6630 /// density independent resources such as string, html/js files or an image that 6631 /// can be used for any scale factors (such as wallpapers). 6632 /// 6633 enum cef_scale_factor_t 6634 { 6635 SCALE_FACTOR_NONE = 0, 6636 SCALE_FACTOR_100P = 1, 6637 SCALE_FACTOR_125P = 2, 6638 SCALE_FACTOR_133P = 3, 6639 SCALE_FACTOR_140P = 4, 6640 SCALE_FACTOR_150P = 5, 6641 SCALE_FACTOR_180P = 6, 6642 SCALE_FACTOR_200P = 7, 6643 SCALE_FACTOR_250P = 8, 6644 SCALE_FACTOR_300P = 9, 6645 SCALE_FACTOR_NUM_VALUES = 10 6646 } 6647 6648 alias SCALE_FACTOR_NONE = cef_scale_factor_t.SCALE_FACTOR_NONE; 6649 alias SCALE_FACTOR_100P = cef_scale_factor_t.SCALE_FACTOR_100P; 6650 alias SCALE_FACTOR_125P = cef_scale_factor_t.SCALE_FACTOR_125P; 6651 alias SCALE_FACTOR_133P = cef_scale_factor_t.SCALE_FACTOR_133P; 6652 alias SCALE_FACTOR_140P = cef_scale_factor_t.SCALE_FACTOR_140P; 6653 alias SCALE_FACTOR_150P = cef_scale_factor_t.SCALE_FACTOR_150P; 6654 alias SCALE_FACTOR_180P = cef_scale_factor_t.SCALE_FACTOR_180P; 6655 alias SCALE_FACTOR_200P = cef_scale_factor_t.SCALE_FACTOR_200P; 6656 alias SCALE_FACTOR_250P = cef_scale_factor_t.SCALE_FACTOR_250P; 6657 alias SCALE_FACTOR_300P = cef_scale_factor_t.SCALE_FACTOR_300P; 6658 alias SCALE_FACTOR_NUM_VALUES = cef_scale_factor_t.SCALE_FACTOR_NUM_VALUES; 6659 6660 /// 6661 /// Policy for how the Referrer HTTP header value will be sent during 6662 /// navigation. If the `--no-referrers` command-line flag is specified then the 6663 /// policy value will be ignored and the Referrer value will never be sent. Must 6664 /// be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium. 6665 /// 6666 enum cef_referrer_policy_t 6667 { 6668 /// 6669 /// Clear the referrer header if the header value is HTTPS but the request 6670 /// destination is HTTP. This is the default behavior. 6671 /// 6672 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0, 6673 REFERRER_POLICY_DEFAULT = REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, 6674 6675 /// 6676 /// A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: 6677 /// If the request destination is HTTP, an HTTPS referrer will be cleared. If 6678 /// the request's destination is cross-origin with the referrer (but does not 6679 /// downgrade), the referrer's granularity will be stripped down to an origin 6680 /// rather than a full URL. Same-origin requests will send the full referrer. 6681 /// 6682 REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1, 6683 6684 /// 6685 /// Strip the referrer down to an origin when the origin of the referrer is 6686 /// different from the destination's origin. 6687 /// 6688 REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2, 6689 6690 /// 6691 /// Never change the referrer. 6692 /// 6693 REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3, 6694 6695 /// 6696 /// Strip the referrer down to the origin regardless of the redirect location. 6697 /// 6698 REFERRER_POLICY_ORIGIN = 4, 6699 6700 /// 6701 /// Clear the referrer when the request's referrer is cross-origin with the 6702 /// request's destination. 6703 /// 6704 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5, 6705 6706 /// 6707 /// Strip the referrer down to the origin, but clear it entirely if the 6708 /// referrer value is HTTPS and the destination is HTTP. 6709 /// 6710 REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6, 6711 6712 /// 6713 /// Always clear the referrer regardless of the request destination. 6714 /// 6715 REFERRER_POLICY_NO_REFERRER = 7, 6716 6717 /// Always the last value in this enumeration. 6718 REFERRER_POLICY_NUM_VALUES = 8 6719 } 6720 6721 alias REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = cef_referrer_policy_t.REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE; 6722 alias REFERRER_POLICY_DEFAULT = cef_referrer_policy_t.REFERRER_POLICY_DEFAULT; 6723 alias REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN; 6724 alias REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN; 6725 alias REFERRER_POLICY_NEVER_CLEAR_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NEVER_CLEAR_REFERRER; 6726 alias REFERRER_POLICY_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN; 6727 alias REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN; 6728 alias REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE; 6729 alias REFERRER_POLICY_NO_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NO_REFERRER; 6730 alias REFERRER_POLICY_NUM_VALUES = cef_referrer_policy_t.REFERRER_POLICY_NUM_VALUES; 6731 6732 /// 6733 /// Return values for CefResponseFilter::Filter(). 6734 /// 6735 enum cef_response_filter_status_t 6736 { 6737 /// 6738 /// Some or all of the pre-filter data was read successfully but more data is 6739 /// needed in order to continue filtering (filtered output is pending). 6740 /// 6741 RESPONSE_FILTER_NEED_MORE_DATA = 0, 6742 6743 /// 6744 /// Some or all of the pre-filter data was read successfully and all available 6745 /// filtered output has been written. 6746 /// 6747 RESPONSE_FILTER_DONE = 1, 6748 6749 /// 6750 /// An error occurred during filtering. 6751 /// 6752 RESPONSE_FILTER_ERROR = 2 6753 } 6754 6755 alias RESPONSE_FILTER_NEED_MORE_DATA = cef_response_filter_status_t.RESPONSE_FILTER_NEED_MORE_DATA; 6756 alias RESPONSE_FILTER_DONE = cef_response_filter_status_t.RESPONSE_FILTER_DONE; 6757 alias RESPONSE_FILTER_ERROR = cef_response_filter_status_t.RESPONSE_FILTER_ERROR; 6758 6759 /// 6760 /// Describes how to interpret the alpha component of a pixel. 6761 /// 6762 enum cef_alpha_type_t 6763 { 6764 /// 6765 /// No transparency. The alpha component is ignored. 6766 /// 6767 CEF_ALPHA_TYPE_OPAQUE = 0, 6768 6769 /// 6770 /// Transparency with pre-multiplied alpha component. 6771 /// 6772 CEF_ALPHA_TYPE_PREMULTIPLIED = 1, 6773 6774 /// 6775 /// Transparency with post-multiplied alpha component. 6776 /// 6777 CEF_ALPHA_TYPE_POSTMULTIPLIED = 2 6778 } 6779 6780 alias CEF_ALPHA_TYPE_OPAQUE = cef_alpha_type_t.CEF_ALPHA_TYPE_OPAQUE; 6781 alias CEF_ALPHA_TYPE_PREMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_PREMULTIPLIED; 6782 alias CEF_ALPHA_TYPE_POSTMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_POSTMULTIPLIED; 6783 6784 /// 6785 /// Text style types. Should be kepy in sync with gfx::TextStyle. 6786 /// 6787 enum cef_text_style_t 6788 { 6789 CEF_TEXT_STYLE_BOLD = 0, 6790 CEF_TEXT_STYLE_ITALIC = 1, 6791 CEF_TEXT_STYLE_STRIKE = 2, 6792 CEF_TEXT_STYLE_DIAGONAL_STRIKE = 3, 6793 CEF_TEXT_STYLE_UNDERLINE = 4, 6794 CEF_TEXT_STYLE_NUM_VALUES = 5 6795 } 6796 6797 alias CEF_TEXT_STYLE_BOLD = cef_text_style_t.CEF_TEXT_STYLE_BOLD; 6798 alias CEF_TEXT_STYLE_ITALIC = cef_text_style_t.CEF_TEXT_STYLE_ITALIC; 6799 alias CEF_TEXT_STYLE_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_STRIKE; 6800 alias CEF_TEXT_STYLE_DIAGONAL_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_DIAGONAL_STRIKE; 6801 alias CEF_TEXT_STYLE_UNDERLINE = cef_text_style_t.CEF_TEXT_STYLE_UNDERLINE; 6802 alias CEF_TEXT_STYLE_NUM_VALUES = cef_text_style_t.CEF_TEXT_STYLE_NUM_VALUES; 6803 6804 /// 6805 /// Specifies where along the axis the CefBoxLayout child views should be laid 6806 /// out. Should be kept in sync with Chromium's views::LayoutAlignment type. 6807 /// 6808 enum cef_axis_alignment_t 6809 { 6810 /// Child views will be left/top-aligned. 6811 CEF_AXIS_ALIGNMENT_START = 0, 6812 6813 /// Child views will be center-aligned. 6814 CEF_AXIS_ALIGNMENT_CENTER = 1, 6815 6816 /// Child views will be right/bottom-aligned. 6817 CEF_AXIS_ALIGNMENT_END = 2, 6818 6819 /// Child views will be stretched to fit. 6820 CEF_AXIS_ALIGNMENT_STRETCH = 3, 6821 6822 CEF_AXIS_ALIGNMENT_NUM_VALUES = 4 6823 } 6824 6825 alias CEF_AXIS_ALIGNMENT_START = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_START; 6826 alias CEF_AXIS_ALIGNMENT_CENTER = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_CENTER; 6827 alias CEF_AXIS_ALIGNMENT_END = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_END; 6828 alias CEF_AXIS_ALIGNMENT_STRETCH = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_STRETCH; 6829 alias CEF_AXIS_ALIGNMENT_NUM_VALUES = cef_axis_alignment_t.CEF_AXIS_ALIGNMENT_NUM_VALUES; 6830 6831 /// 6832 /// Settings used when initializing a CefBoxLayout. 6833 /// 6834 struct cef_box_layout_settings_t 6835 { 6836 /// 6837 /// Size of this structure. 6838 /// 6839 size_t size; 6840 6841 /// 6842 /// If true (1) the layout will be horizontal, otherwise the layout will be 6843 /// vertical. 6844 /// 6845 int horizontal; 6846 6847 /// 6848 /// Adds additional horizontal space between the child view area and the host 6849 /// view border. 6850 /// 6851 int inside_border_horizontal_spacing; 6852 6853 /// 6854 /// Adds additional vertical space between the child view area and the host 6855 /// view border. 6856 /// 6857 int inside_border_vertical_spacing; 6858 6859 /// 6860 /// Adds additional space around the child view area. 6861 /// 6862 6863 cef_insets_t inside_border_insets; 6864 6865 /// 6866 /// Adds additional space between child views. 6867 /// 6868 int between_child_spacing; 6869 6870 /// 6871 /// Specifies where along the main axis the child views should be laid out. 6872 /// 6873 cef_axis_alignment_t main_axis_alignment; 6874 6875 /// 6876 /// Specifies where along the cross axis the child views should be laid out. 6877 /// 6878 cef_axis_alignment_t cross_axis_alignment; 6879 6880 /// 6881 /// Minimum cross axis size. 6882 /// 6883 int minimum_cross_axis_size; 6884 6885 /// 6886 /// Default flex for views when none is specified via CefBoxLayout methods. 6887 /// Using the preferred size as the basis, free space along the main axis is 6888 /// distributed to views in the ratio of their flex weights. Similarly, if the 6889 /// views will overflow the parent, space is subtracted in these ratios. A 6890 /// flex of 0 means this view is not resized. Flex values must not be 6891 /// negative. 6892 /// 6893 int default_flex; 6894 } 6895 6896 6897 6898 /// 6899 /// Specifies the button display state. 6900 /// 6901 enum cef_button_state_t 6902 { 6903 CEF_BUTTON_STATE_NORMAL = 0, 6904 CEF_BUTTON_STATE_HOVERED = 1, 6905 CEF_BUTTON_STATE_PRESSED = 2, 6906 CEF_BUTTON_STATE_DISABLED = 3, 6907 CEF_BUTTON_STATE_NUM_VALUES = 4 6908 } 6909 6910 alias CEF_BUTTON_STATE_NORMAL = cef_button_state_t.CEF_BUTTON_STATE_NORMAL; 6911 alias CEF_BUTTON_STATE_HOVERED = cef_button_state_t.CEF_BUTTON_STATE_HOVERED; 6912 alias CEF_BUTTON_STATE_PRESSED = cef_button_state_t.CEF_BUTTON_STATE_PRESSED; 6913 alias CEF_BUTTON_STATE_DISABLED = cef_button_state_t.CEF_BUTTON_STATE_DISABLED; 6914 alias CEF_BUTTON_STATE_NUM_VALUES = cef_button_state_t.CEF_BUTTON_STATE_NUM_VALUES; 6915 6916 /// 6917 /// Specifies the horizontal text alignment mode. 6918 /// 6919 enum cef_horizontal_alignment_t 6920 { 6921 /// 6922 /// Align the text's left edge with that of its display area. 6923 /// 6924 CEF_HORIZONTAL_ALIGNMENT_LEFT = 0, 6925 6926 /// 6927 /// Align the text's center with that of its display area. 6928 /// 6929 CEF_HORIZONTAL_ALIGNMENT_CENTER = 1, 6930 6931 /// 6932 /// Align the text's right edge with that of its display area. 6933 /// 6934 CEF_HORIZONTAL_ALIGNMENT_RIGHT = 2 6935 } 6936 6937 alias CEF_HORIZONTAL_ALIGNMENT_LEFT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_LEFT; 6938 alias CEF_HORIZONTAL_ALIGNMENT_CENTER = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_CENTER; 6939 alias CEF_HORIZONTAL_ALIGNMENT_RIGHT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_RIGHT; 6940 6941 /// 6942 /// Specifies how a menu will be anchored for non-RTL languages. The opposite 6943 /// position will be used for RTL languages. 6944 /// 6945 enum cef_menu_anchor_position_t 6946 { 6947 CEF_MENU_ANCHOR_TOPLEFT = 0, 6948 CEF_MENU_ANCHOR_TOPRIGHT = 1, 6949 CEF_MENU_ANCHOR_BOTTOMCENTER = 2, 6950 CEF_MENU_ANCHOR_NUM_VALUES = 3 6951 } 6952 6953 alias CEF_MENU_ANCHOR_TOPLEFT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPLEFT; 6954 alias CEF_MENU_ANCHOR_TOPRIGHT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPRIGHT; 6955 alias CEF_MENU_ANCHOR_BOTTOMCENTER = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_BOTTOMCENTER; 6956 alias CEF_MENU_ANCHOR_NUM_VALUES = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_NUM_VALUES; 6957 6958 /// 6959 /// Supported color types for menu items. 6960 /// 6961 enum cef_menu_color_type_t 6962 { 6963 CEF_MENU_COLOR_TEXT = 0, 6964 CEF_MENU_COLOR_TEXT_HOVERED = 1, 6965 CEF_MENU_COLOR_TEXT_ACCELERATOR = 2, 6966 CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = 3, 6967 CEF_MENU_COLOR_BACKGROUND = 4, 6968 CEF_MENU_COLOR_BACKGROUND_HOVERED = 5, 6969 CEF_MENU_COLOR_NUM_VALUES = 6 6970 } 6971 6972 alias CEF_MENU_COLOR_TEXT = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT; 6973 alias CEF_MENU_COLOR_TEXT_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_HOVERED; 6974 alias CEF_MENU_COLOR_TEXT_ACCELERATOR = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR; 6975 alias CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED; 6976 alias CEF_MENU_COLOR_BACKGROUND = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND; 6977 alias CEF_MENU_COLOR_BACKGROUND_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND_HOVERED; 6978 alias CEF_MENU_COLOR_NUM_VALUES = cef_menu_color_type_t.CEF_MENU_COLOR_NUM_VALUES; 6979 6980 /// Supported SSL version values. See net/ssl/ssl_connection_status_flags.h 6981 /// for more information. 6982 enum cef_ssl_version_t 6983 { 6984 /// Unknown SSL version. 6985 SSL_CONNECTION_VERSION_UNKNOWN = 0, 6986 SSL_CONNECTION_VERSION_SSL2 = 1, 6987 SSL_CONNECTION_VERSION_SSL3 = 2, 6988 SSL_CONNECTION_VERSION_TLS1 = 3, 6989 SSL_CONNECTION_VERSION_TLS1_1 = 4, 6990 SSL_CONNECTION_VERSION_TLS1_2 = 5, 6991 SSL_CONNECTION_VERSION_TLS1_3 = 6, 6992 SSL_CONNECTION_VERSION_QUIC = 7, 6993 SSL_CONNECTION_VERSION_NUM_VALUES = 8 6994 } 6995 6996 alias SSL_CONNECTION_VERSION_UNKNOWN = cef_ssl_version_t.SSL_CONNECTION_VERSION_UNKNOWN; 6997 alias SSL_CONNECTION_VERSION_SSL2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL2; 6998 alias SSL_CONNECTION_VERSION_SSL3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL3; 6999 alias SSL_CONNECTION_VERSION_TLS1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1; 7000 alias SSL_CONNECTION_VERSION_TLS1_1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_1; 7001 alias SSL_CONNECTION_VERSION_TLS1_2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_2; 7002 alias SSL_CONNECTION_VERSION_TLS1_3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_3; 7003 alias SSL_CONNECTION_VERSION_QUIC = cef_ssl_version_t.SSL_CONNECTION_VERSION_QUIC; 7004 alias SSL_CONNECTION_VERSION_NUM_VALUES = cef_ssl_version_t.SSL_CONNECTION_VERSION_NUM_VALUES; 7005 7006 /// Supported SSL content status flags. See content/public/common/ssl_status.h 7007 /// for more information. 7008 enum cef_ssl_content_status_t 7009 { 7010 SSL_CONTENT_NORMAL_CONTENT = 0, 7011 SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = 1 << 0, 7012 SSL_CONTENT_RAN_INSECURE_CONTENT = 1 << 1 7013 } 7014 7015 alias SSL_CONTENT_NORMAL_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_NORMAL_CONTENT; 7016 alias SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_DISPLAYED_INSECURE_CONTENT; 7017 alias SSL_CONTENT_RAN_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_RAN_INSECURE_CONTENT; 7018 7019 // 7020 /// Configuration options for registering a custom scheme. 7021 /// These values are used when calling AddCustomScheme. 7022 // 7023 enum cef_scheme_options_t 7024 { 7025 CEF_SCHEME_OPTION_NONE = 0, 7026 7027 /// 7028 /// If CEF_SCHEME_OPTION_STANDARD is set the scheme will be treated as a 7029 /// standard scheme. Standard schemes are subject to URL canonicalization and 7030 /// parsing rules as defined in the Common Internet Scheme Syntax RFC 1738 7031 /// Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt 7032 // 7033 /// In particular, the syntax for standard scheme URLs must be of the form: 7034 /// <pre> 7035 /// [scheme]://[username]:[password]@[host]:[port]/[url-path] 7036 /// </pre> Standard scheme URLs must have a host component that is a fully 7037 /// qualified domain name as defined in Section 3.5 of RFC 1034 [13] and 7038 /// Section 2.1 of RFC 1123. These URLs will be canonicalized to 7039 /// "scheme://host/path" in the simplest case and 7040 /// "scheme://username:password@host:port/path" in the most explicit case. For 7041 /// example, "scheme:host/path" and "scheme:///host/path" will both be 7042 /// canonicalized to "scheme://host/path". The origin of a standard scheme URL 7043 /// is the combination of scheme, host and port (i.e., "scheme://host:port" in 7044 /// the most explicit case). 7045 // 7046 /// For non-standard scheme URLs only the "scheme:" component is parsed and 7047 /// canonicalized. The remainder of the URL will be passed to the handler as- 7048 /// is. For example, "scheme:///some%20text" will remain the same. 7049 /// Non-standard scheme URLs cannot be used as a target for form submission. 7050 /// 7051 CEF_SCHEME_OPTION_STANDARD = 1 << 0, 7052 7053 /// 7054 /// If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same 7055 /// security rules as those applied to "file" URLs. Normal pages cannot link 7056 /// to or access local URLs. Also, by default, local URLs can only perform 7057 /// XMLHttpRequest calls to the same URL (origin + path) that originated the 7058 /// request. To allow XMLHttpRequest calls from a local URL to other URLs with 7059 /// the same origin set the CefSettings.file_access_from_file_urls_allowed 7060 /// value to true (1). To allow XMLHttpRequest calls from a local URL to all 7061 /// origins set the CefSettings.universal_access_from_file_urls_allowed value 7062 /// to true (1). 7063 /// 7064 CEF_SCHEME_OPTION_LOCAL = 1 << 1, 7065 7066 /// 7067 /// If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be 7068 /// displayed from other content hosted with the same scheme. For example, 7069 /// pages in other origins cannot create iframes or hyperlinks to URLs with 7070 /// the scheme. For schemes that must be accessible from other schemes don't 7071 /// set this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS 7072 /// "Access-Control-Allow-Origin" headers to further restrict access. 7073 /// 7074 CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2, 7075 7076 /// 7077 /// If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the 7078 /// same security rules as those applied to "https" URLs. For example, loading 7079 /// this scheme from other secure schemes will not trigger mixed content 7080 /// warnings. 7081 /// 7082 CEF_SCHEME_OPTION_SECURE = 1 << 3, 7083 7084 /// 7085 /// If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS 7086 /// requests. This value should be set in most cases where 7087 /// CEF_SCHEME_OPTION_STANDARD is set. 7088 /// 7089 CEF_SCHEME_OPTION_CORS_ENABLED = 1 << 4, 7090 7091 /// 7092 /// If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content- 7093 /// Security-Policy (CSP) checks. This value should not be set in most cases 7094 /// where CEF_SCHEME_OPTION_STANDARD is set. 7095 /// 7096 CEF_SCHEME_OPTION_CSP_BYPASSING = 1 << 5, 7097 7098 /// 7099 /// If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API 7100 /// requests. 7101 /// 7102 CEF_SCHEME_OPTION_FETCH_ENABLED = 1 << 6 7103 } 7104 7105 alias CEF_SCHEME_OPTION_NONE = cef_scheme_options_t.CEF_SCHEME_OPTION_NONE; 7106 alias CEF_SCHEME_OPTION_STANDARD = cef_scheme_options_t.CEF_SCHEME_OPTION_STANDARD; 7107 alias CEF_SCHEME_OPTION_LOCAL = cef_scheme_options_t.CEF_SCHEME_OPTION_LOCAL; 7108 alias CEF_SCHEME_OPTION_DISPLAY_ISOLATED = cef_scheme_options_t.CEF_SCHEME_OPTION_DISPLAY_ISOLATED; 7109 alias CEF_SCHEME_OPTION_SECURE = cef_scheme_options_t.CEF_SCHEME_OPTION_SECURE; 7110 alias CEF_SCHEME_OPTION_CORS_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_CORS_ENABLED; 7111 alias CEF_SCHEME_OPTION_CSP_BYPASSING = cef_scheme_options_t.CEF_SCHEME_OPTION_CSP_BYPASSING; 7112 alias CEF_SCHEME_OPTION_FETCH_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_FETCH_ENABLED; 7113 7114 /// 7115 /// Structure representing a range. 7116 /// 7117 struct cef_range_t 7118 { 7119 uint from; 7120 uint to; 7121 } 7122 7123 7124 7125 /// 7126 /// Composition underline style. 7127 /// 7128 enum cef_composition_underline_style_t 7129 { 7130 CEF_CUS_SOLID = 0, 7131 CEF_CUS_DOT = 1, 7132 CEF_CUS_DASH = 2, 7133 CEF_CUS_NONE = 3, 7134 CEF_CUS_NUM_VALUES = 4 7135 } 7136 7137 alias CEF_CUS_SOLID = cef_composition_underline_style_t.CEF_CUS_SOLID; 7138 alias CEF_CUS_DOT = cef_composition_underline_style_t.CEF_CUS_DOT; 7139 alias CEF_CUS_DASH = cef_composition_underline_style_t.CEF_CUS_DASH; 7140 alias CEF_CUS_NONE = cef_composition_underline_style_t.CEF_CUS_NONE; 7141 alias CEF_CUS_NUM_VALUES = cef_composition_underline_style_t.CEF_CUS_NUM_VALUES; 7142 7143 /// 7144 /// Structure representing IME composition underline information. This is a thin 7145 /// wrapper around Blink's WebCompositionUnderline class and should be kept in 7146 /// sync with that. 7147 /// 7148 struct cef_composition_underline_t 7149 { 7150 /// 7151 /// Size of this structure. 7152 /// 7153 size_t size; 7154 7155 /// 7156 /// Underline character range. 7157 /// 7158 cef_range_t range; 7159 7160 /// 7161 /// Text color. 7162 /// 7163 cef_color_t color; 7164 7165 /// 7166 /// Background color. 7167 /// 7168 cef_color_t background_color; 7169 7170 /// 7171 /// Set to true (1) for thick underline. 7172 /// 7173 int thick; 7174 7175 /// 7176 /// Style. 7177 /// 7178 cef_composition_underline_style_t style; 7179 } 7180 7181 7182 7183 /// 7184 /// Enumerates the various representations of the ordering of audio channels. 7185 /// Must be kept synchronized with media::ChannelLayout from Chromium. 7186 /// See media\base\channel_layout.h 7187 /// 7188 enum cef_channel_layout_t 7189 { 7190 CEF_CHANNEL_LAYOUT_NONE = 0, 7191 CEF_CHANNEL_LAYOUT_UNSUPPORTED = 1, 7192 7193 /// Front C 7194 CEF_CHANNEL_LAYOUT_MONO = 2, 7195 7196 /// Front L, Front R 7197 CEF_CHANNEL_LAYOUT_STEREO = 3, 7198 7199 /// Front L, Front R, Back C 7200 CEF_CHANNEL_LAYOUT_2_1 = 4, 7201 7202 /// Front L, Front R, Front C 7203 CEF_CHANNEL_LAYOUT_SURROUND = 5, 7204 7205 /// Front L, Front R, Front C, Back C 7206 CEF_CHANNEL_LAYOUT_4_0 = 6, 7207 7208 /// Front L, Front R, Side L, Side R 7209 CEF_CHANNEL_LAYOUT_2_2 = 7, 7210 7211 /// Front L, Front R, Back L, Back R 7212 CEF_CHANNEL_LAYOUT_QUAD = 8, 7213 7214 /// Front L, Front R, Front C, Side L, Side R 7215 CEF_CHANNEL_LAYOUT_5_0 = 9, 7216 7217 /// Front L, Front R, Front C, LFE, Side L, Side R 7218 CEF_CHANNEL_LAYOUT_5_1 = 10, 7219 7220 /// Front L, Front R, Front C, Back L, Back R 7221 CEF_CHANNEL_LAYOUT_5_0_BACK = 11, 7222 7223 /// Front L, Front R, Front C, LFE, Back L, Back R 7224 CEF_CHANNEL_LAYOUT_5_1_BACK = 12, 7225 7226 /// Front L, Front R, Front C, Back L, Back R, Side L, Side R 7227 CEF_CHANNEL_LAYOUT_7_0 = 13, 7228 7229 /// Front L, Front R, Front C, LFE, Back L, Back R, Side L, Side R 7230 CEF_CHANNEL_LAYOUT_7_1 = 14, 7231 7232 /// Front L, Front R, Front C, LFE, Front LofC, Front RofC, Side L, Side R 7233 CEF_CHANNEL_LAYOUT_7_1_WIDE = 15, 7234 7235 /// Front L, Front R 7236 CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = 16, 7237 7238 /// Front L, Front R, LFE 7239 CEF_CHANNEL_LAYOUT_2POINT1 = 17, 7240 7241 /// Front L, Front R, Front C, LFE 7242 CEF_CHANNEL_LAYOUT_3_1 = 18, 7243 7244 /// Front L, Front R, Front C, LFE, Back C 7245 CEF_CHANNEL_LAYOUT_4_1 = 19, 7246 7247 /// Front L, Front R, Front C, Back C, Side L, Side R 7248 CEF_CHANNEL_LAYOUT_6_0 = 20, 7249 7250 /// Front L, Front R, Front LofC, Front RofC, Side L, Side R 7251 CEF_CHANNEL_LAYOUT_6_0_FRONT = 21, 7252 7253 /// Front L, Front R, Front C, Back L, Back R, Back C 7254 CEF_CHANNEL_LAYOUT_HEXAGONAL = 22, 7255 7256 /// Front L, Front R, Front C, LFE, Back C, Side L, Side R 7257 CEF_CHANNEL_LAYOUT_6_1 = 23, 7258 7259 /// Front L, Front R, Front C, LFE, Back L, Back R, Back C 7260 CEF_CHANNEL_LAYOUT_6_1_BACK = 24, 7261 7262 /// Front L, Front R, LFE, Front LofC, Front RofC, Side L, Side R 7263 CEF_CHANNEL_LAYOUT_6_1_FRONT = 25, 7264 7265 /// Front L, Front R, Front C, Front LofC, Front RofC, Side L, Side R 7266 CEF_CHANNEL_LAYOUT_7_0_FRONT = 26, 7267 7268 /// Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC 7269 CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = 27, 7270 7271 /// Front L, Front R, Front C, Back L, Back R, Back C, Side L, Side R 7272 CEF_CHANNEL_LAYOUT_OCTAGONAL = 28, 7273 7274 /// Channels are not explicitly mapped to speakers. 7275 CEF_CHANNEL_LAYOUT_DISCRETE = 29, 7276 7277 /// Deprecated, but keeping the enum value for UMA consistency. 7278 /// Front L, Front R, Front C. Front C contains the keyboard mic audio. This 7279 /// layout is only intended for input for WebRTC. The Front C channel 7280 /// is stripped away in the WebRTC audio input pipeline and never seen outside 7281 /// of that. 7282 CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30, 7283 7284 /// Front L, Front R, LFE, Side L, Side R 7285 CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31, 7286 7287 /// Actual channel layout is specified in the bitstream and the actual channel 7288 /// count is unknown at Chromium media pipeline level (useful for audio 7289 /// pass-through mode). 7290 CEF_CHANNEL_LAYOUT_BITSTREAM = 32, 7291 7292 /// Front L, Front R, Front C, LFE, Side L, Side R, 7293 /// Front Height L, Front Height R, Rear Height L, Rear Height R 7294 /// Will be represented as six channels (5.1) due to eight channel limit 7295 /// kMaxConcurrentChannels 7296 CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = 33, 7297 7298 /// Front C, LFE 7299 CEF_CHANNEL_LAYOUT_1_1 = 34, 7300 7301 /// Front L, Front R, LFE, Back C 7302 CEF_CHANNEL_LAYOUT_3_1_BACK = 35, 7303 7304 CEF_CHANNEL_NUM_VALUES = 36 7305 } 7306 7307 alias CEF_CHANNEL_LAYOUT_NONE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_NONE; 7308 alias CEF_CHANNEL_LAYOUT_UNSUPPORTED = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_UNSUPPORTED; 7309 alias CEF_CHANNEL_LAYOUT_MONO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_MONO; 7310 alias CEF_CHANNEL_LAYOUT_STEREO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO; 7311 alias CEF_CHANNEL_LAYOUT_2_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_1; 7312 alias CEF_CHANNEL_LAYOUT_SURROUND = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_SURROUND; 7313 alias CEF_CHANNEL_LAYOUT_4_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_0; 7314 alias CEF_CHANNEL_LAYOUT_2_2 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_2; 7315 alias CEF_CHANNEL_LAYOUT_QUAD = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_QUAD; 7316 alias CEF_CHANNEL_LAYOUT_5_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0; 7317 alias CEF_CHANNEL_LAYOUT_5_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1; 7318 alias CEF_CHANNEL_LAYOUT_5_0_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0_BACK; 7319 alias CEF_CHANNEL_LAYOUT_5_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_BACK; 7320 alias CEF_CHANNEL_LAYOUT_7_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0; 7321 alias CEF_CHANNEL_LAYOUT_7_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1; 7322 alias CEF_CHANNEL_LAYOUT_7_1_WIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE; 7323 alias CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX; 7324 alias CEF_CHANNEL_LAYOUT_2POINT1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2POINT1; 7325 alias CEF_CHANNEL_LAYOUT_3_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_3_1; 7326 alias CEF_CHANNEL_LAYOUT_4_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1; 7327 alias CEF_CHANNEL_LAYOUT_6_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0; 7328 alias CEF_CHANNEL_LAYOUT_6_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0_FRONT; 7329 alias CEF_CHANNEL_LAYOUT_HEXAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_HEXAGONAL; 7330 alias CEF_CHANNEL_LAYOUT_6_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1; 7331 alias CEF_CHANNEL_LAYOUT_6_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_BACK; 7332 alias CEF_CHANNEL_LAYOUT_6_1_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_FRONT; 7333 alias CEF_CHANNEL_LAYOUT_7_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0_FRONT; 7334 alias CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK; 7335 alias CEF_CHANNEL_LAYOUT_OCTAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_OCTAGONAL; 7336 alias CEF_CHANNEL_LAYOUT_DISCRETE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_DISCRETE; 7337 alias CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC; 7338 alias CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE; 7339 alias CEF_CHANNEL_LAYOUT_BITSTREAM = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_BITSTREAM; 7340 alias CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX; 7341 alias CEF_CHANNEL_LAYOUT_1_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_1_1; 7342 alias CEF_CHANNEL_LAYOUT_3_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_3_1_BACK; 7343 alias CEF_CHANNEL_NUM_VALUES = cef_channel_layout_t.CEF_CHANNEL_NUM_VALUES; 7344 7345 /// 7346 /// Structure representing the audio parameters for setting up the audio 7347 /// handler. 7348 /// 7349 struct cef_audio_parameters_t 7350 { 7351 /// 7352 /// Size of this structure. 7353 /// 7354 size_t size; 7355 7356 /// 7357 /// Layout of the audio channels 7358 /// 7359 cef_channel_layout_t channel_layout; 7360 7361 /// 7362 /// Sample rate 7363 // 7364 int sample_rate; 7365 7366 /// 7367 /// Number of frames per buffer 7368 /// 7369 int frames_per_buffer; 7370 } 7371 7372 7373 7374 /// 7375 /// Result codes for CefMediaRouter::CreateRoute. Should be kept in sync with 7376 /// Chromium's media_router::mojom::RouteRequestResultCode type. 7377 /// 7378 enum cef_media_route_create_result_t 7379 { 7380 CEF_MRCR_UNKNOWN_ERROR = 0, 7381 CEF_MRCR_OK = 1, 7382 CEF_MRCR_TIMED_OUT = 2, 7383 CEF_MRCR_ROUTE_NOT_FOUND = 3, 7384 CEF_MRCR_SINK_NOT_FOUND = 4, 7385 CEF_MRCR_INVALID_ORIGIN = 5, 7386 CEF_MRCR_OFF_THE_RECORD_MISMATCH_DEPRECATED = 6, 7387 CEF_MRCR_NO_SUPPORTED_PROVIDER = 7, 7388 CEF_MRCR_CANCELLED = 8, 7389 CEF_MRCR_ROUTE_ALREADY_EXISTS = 9, 7390 CEF_MRCR_DESKTOP_PICKER_FAILED = 10, 7391 CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11, 7392 CEF_MRCR_REDUNDANT_REQUEST = 12, 7393 CEF_MRCR_USER_NOT_ALLOWED = 13, 7394 CEF_MRCR_NOTIFICATION_DISABLED = 14, 7395 CEF_MRCR_NUM_VALUES = 15 7396 } 7397 7398 alias CEF_MRCR_UNKNOWN_ERROR = cef_media_route_create_result_t.CEF_MRCR_UNKNOWN_ERROR; 7399 alias CEF_MRCR_OK = cef_media_route_create_result_t.CEF_MRCR_OK; 7400 alias CEF_MRCR_TIMED_OUT = cef_media_route_create_result_t.CEF_MRCR_TIMED_OUT; 7401 alias CEF_MRCR_ROUTE_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_ROUTE_NOT_FOUND; 7402 alias CEF_MRCR_SINK_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_SINK_NOT_FOUND; 7403 alias CEF_MRCR_INVALID_ORIGIN = cef_media_route_create_result_t.CEF_MRCR_INVALID_ORIGIN; 7404 alias CEF_MRCR_OFF_THE_RECORD_MISMATCH_DEPRECATED = cef_media_route_create_result_t.CEF_MRCR_OFF_THE_RECORD_MISMATCH_DEPRECATED; 7405 alias CEF_MRCR_NO_SUPPORTED_PROVIDER = cef_media_route_create_result_t.CEF_MRCR_NO_SUPPORTED_PROVIDER; 7406 alias CEF_MRCR_CANCELLED = cef_media_route_create_result_t.CEF_MRCR_CANCELLED; 7407 alias CEF_MRCR_ROUTE_ALREADY_EXISTS = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_EXISTS; 7408 alias CEF_MRCR_DESKTOP_PICKER_FAILED = cef_media_route_create_result_t.CEF_MRCR_DESKTOP_PICKER_FAILED; 7409 alias CEF_MRCR_ROUTE_ALREADY_TERMINATED = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_TERMINATED; 7410 alias CEF_MRCR_REDUNDANT_REQUEST = cef_media_route_create_result_t.CEF_MRCR_REDUNDANT_REQUEST; 7411 alias CEF_MRCR_USER_NOT_ALLOWED = cef_media_route_create_result_t.CEF_MRCR_USER_NOT_ALLOWED; 7412 alias CEF_MRCR_NOTIFICATION_DISABLED = cef_media_route_create_result_t.CEF_MRCR_NOTIFICATION_DISABLED; 7413 alias CEF_MRCR_NUM_VALUES = cef_media_route_create_result_t.CEF_MRCR_NUM_VALUES; 7414 7415 /// 7416 /// Connection state for a MediaRoute object. Should be kept in sync with 7417 /// Chromium's blink::mojom::PresentationConnectionState type. 7418 /// 7419 enum cef_media_route_connection_state_t 7420 { 7421 CEF_MRCS_UNKNOWN = -1, 7422 CEF_MRCS_CONNECTING = 0, 7423 CEF_MRCS_CONNECTED = 1, 7424 CEF_MRCS_CLOSED = 2, 7425 CEF_MRCS_TERMINATED = 3, 7426 CEF_MRCS_NUM_VALUES = 4 7427 } 7428 7429 alias CEF_MRCS_UNKNOWN = cef_media_route_connection_state_t.CEF_MRCS_UNKNOWN; 7430 alias CEF_MRCS_CONNECTING = cef_media_route_connection_state_t.CEF_MRCS_CONNECTING; 7431 alias CEF_MRCS_CONNECTED = cef_media_route_connection_state_t.CEF_MRCS_CONNECTED; 7432 alias CEF_MRCS_CLOSED = cef_media_route_connection_state_t.CEF_MRCS_CLOSED; 7433 alias CEF_MRCS_TERMINATED = cef_media_route_connection_state_t.CEF_MRCS_TERMINATED; 7434 alias CEF_MRCS_NUM_VALUES = cef_media_route_connection_state_t.CEF_MRCS_NUM_VALUES; 7435 7436 /// 7437 /// Icon types for a MediaSink object. Should be kept in sync with Chromium's 7438 /// media_router::SinkIconType type. 7439 /// 7440 enum cef_media_sink_icon_type_t 7441 { 7442 CEF_MSIT_CAST = 0, 7443 CEF_MSIT_CAST_AUDIO_GROUP = 1, 7444 CEF_MSIT_CAST_AUDIO = 2, 7445 CEF_MSIT_MEETING = 3, 7446 CEF_MSIT_HANGOUT = 4, 7447 CEF_MSIT_EDUCATION = 5, 7448 CEF_MSIT_WIRED_DISPLAY = 6, 7449 CEF_MSIT_GENERIC = 7, 7450 CEF_MSIT_NUM_VALUES = 8 7451 } 7452 7453 alias CEF_MSIT_CAST = cef_media_sink_icon_type_t.CEF_MSIT_CAST; 7454 alias CEF_MSIT_CAST_AUDIO_GROUP = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO_GROUP; 7455 alias CEF_MSIT_CAST_AUDIO = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO; 7456 alias CEF_MSIT_MEETING = cef_media_sink_icon_type_t.CEF_MSIT_MEETING; 7457 alias CEF_MSIT_HANGOUT = cef_media_sink_icon_type_t.CEF_MSIT_HANGOUT; 7458 alias CEF_MSIT_EDUCATION = cef_media_sink_icon_type_t.CEF_MSIT_EDUCATION; 7459 alias CEF_MSIT_WIRED_DISPLAY = cef_media_sink_icon_type_t.CEF_MSIT_WIRED_DISPLAY; 7460 alias CEF_MSIT_GENERIC = cef_media_sink_icon_type_t.CEF_MSIT_GENERIC; 7461 alias CEF_MSIT_NUM_VALUES = cef_media_sink_icon_type_t.CEF_MSIT_NUM_VALUES; 7462 7463 /// 7464 /// Device information for a MediaSink object. 7465 /// 7466 struct cef_media_sink_device_info_t 7467 { 7468 /// 7469 /// Size of this structure. 7470 /// 7471 size_t size; 7472 7473 cef_string_t ip_address; 7474 int port; 7475 cef_string_t model_name; 7476 } 7477 7478 7479 7480 /// 7481 /// Represents commands available to TextField. Should be kept in sync with 7482 /// Chromium's views::TextField::MenuCommands type. 7483 /// 7484 enum cef_text_field_commands_t 7485 { 7486 CEF_TFC_UNKNOWN = 0, 7487 CEF_TFC_CUT = 1, 7488 CEF_TFC_COPY = 2, 7489 CEF_TFC_PASTE = 3, 7490 CEF_TFC_SELECT_ALL = 4, 7491 CEF_TFC_SELECT_WORD = 5, 7492 CEF_TFC_UNDO = 6, 7493 CEF_TFC_DELETE = 7, 7494 CEF_TFC_NUM_VALUES = 8 7495 } 7496 7497 alias CEF_TFC_UNKNOWN = cef_text_field_commands_t.CEF_TFC_UNKNOWN; 7498 alias CEF_TFC_CUT = cef_text_field_commands_t.CEF_TFC_CUT; 7499 alias CEF_TFC_COPY = cef_text_field_commands_t.CEF_TFC_COPY; 7500 alias CEF_TFC_PASTE = cef_text_field_commands_t.CEF_TFC_PASTE; 7501 alias CEF_TFC_SELECT_ALL = cef_text_field_commands_t.CEF_TFC_SELECT_ALL; 7502 alias CEF_TFC_SELECT_WORD = cef_text_field_commands_t.CEF_TFC_SELECT_WORD; 7503 alias CEF_TFC_UNDO = cef_text_field_commands_t.CEF_TFC_UNDO; 7504 alias CEF_TFC_DELETE = cef_text_field_commands_t.CEF_TFC_DELETE; 7505 alias CEF_TFC_NUM_VALUES = cef_text_field_commands_t.CEF_TFC_NUM_VALUES; 7506 7507 /// 7508 /// Chrome toolbar types. 7509 /// 7510 enum cef_chrome_toolbar_type_t 7511 { 7512 CEF_CTT_UNKNOWN = 0, 7513 CEF_CTT_NONE = 1, 7514 CEF_CTT_NORMAL = 2, 7515 CEF_CTT_LOCATION = 3, 7516 CEF_CTT_NUM_VALUES = 4 7517 } 7518 7519 alias CEF_CTT_UNKNOWN = cef_chrome_toolbar_type_t.CEF_CTT_UNKNOWN; 7520 alias CEF_CTT_NONE = cef_chrome_toolbar_type_t.CEF_CTT_NONE; 7521 alias CEF_CTT_NORMAL = cef_chrome_toolbar_type_t.CEF_CTT_NORMAL; 7522 alias CEF_CTT_LOCATION = cef_chrome_toolbar_type_t.CEF_CTT_LOCATION; 7523 alias CEF_CTT_NUM_VALUES = cef_chrome_toolbar_type_t.CEF_CTT_NUM_VALUES; 7524 7525 /// 7526 /// Chrome page action icon types. Should be kept in sync with Chromium's 7527 /// PageActionIconType type. 7528 /// 7529 enum cef_chrome_page_action_icon_type_t 7530 { 7531 CEF_CPAIT_BOOKMARK_STAR = 0, 7532 CEF_CPAIT_CLICK_TO_CALL = 1, 7533 CEF_CPAIT_COOKIE_CONTROLS = 2, 7534 CEF_CPAIT_FILE_SYSTEM_ACCESS = 3, 7535 CEF_CPAIT_FIND = 4, 7536 CEF_CPAIT_MEMORY_SAVER = 5, 7537 CEF_CPAIT_INTENT_PICKER = 6, 7538 CEF_CPAIT_LOCAL_CARD_MIGRATION = 7, 7539 CEF_CPAIT_MANAGE_PASSWORDS = 8, 7540 CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = 9, 7541 CEF_CPAIT_PRICE_TRACKING = 10, 7542 CEF_CPAIT_PWA_INSTALL = 11, 7543 CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED = 12, 7544 CEF_CPAIT_READER_MODE_DEPRECATED = 13, 7545 CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = 14, 7546 CEF_CPAIT_SAVE_CARD = 15, 7547 CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED = 16, 7548 CEF_CPAIT_SHARING_HUB = 17, 7549 CEF_CPAIT_SIDE_SEARCH_DEPRECATED = 18, 7550 CEF_CPAIT_SMS_REMOTE_FETCHER = 19, 7551 CEF_CPAIT_TRANSLATE = 20, 7552 CEF_CPAIT_VIRTUAL_CARD_ENROLL = 21, 7553 CEF_CPAIT_VIRTUAL_CARD_INFORMATION = 22, 7554 CEF_CPAIT_ZOOM = 23, 7555 CEF_CPAIT_SAVE_IBAN = 24, 7556 CEF_CPAIT_MANDATORY_REAUTH = 25, 7557 CEF_CPAIT_PRICE_INSIGHTS = 26, 7558 CEF_CPAIT_READ_ANYTHING_DEPRECATED = 27, 7559 CEF_CPAIT_PRODUCT_SPECIFICATIONS = 28, 7560 CEF_CPAIT_LENS_OVERLAY = 29, 7561 CEF_CPAIT_DISCOUNTS = 30, 7562 CEF_CPAIT_OPTIMIZATION_GUIDE = 31, 7563 7564 CEF_CPAIT_COLLABORATION_MESSAGING = 32, 7565 7566 CEF_CPAIT_CHANGE_PASSWORD = 33, 7567 7568 CEF_CPAIT_LENS_OVERLAY_HOMEWORK = 34, 7569 7570 CEF_CPAIT_AI_MODE = 35, 7571 7572 CEF_CPAIT_NUM_VALUES = 36 7573 } 7574 7575 alias CEF_CPAIT_BOOKMARK_STAR = cef_chrome_page_action_icon_type_t.CEF_CPAIT_BOOKMARK_STAR; 7576 alias CEF_CPAIT_CLICK_TO_CALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_CLICK_TO_CALL; 7577 alias CEF_CPAIT_COOKIE_CONTROLS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_COOKIE_CONTROLS; 7578 alias CEF_CPAIT_FILE_SYSTEM_ACCESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FILE_SYSTEM_ACCESS; 7579 alias CEF_CPAIT_FIND = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FIND; 7580 alias CEF_CPAIT_MEMORY_SAVER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MEMORY_SAVER; 7581 alias CEF_CPAIT_INTENT_PICKER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_INTENT_PICKER; 7582 alias CEF_CPAIT_LOCAL_CARD_MIGRATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_LOCAL_CARD_MIGRATION; 7583 alias CEF_CPAIT_MANAGE_PASSWORDS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANAGE_PASSWORDS; 7584 alias CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION; 7585 alias CEF_CPAIT_PRICE_TRACKING = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_TRACKING; 7586 alias CEF_CPAIT_PWA_INSTALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PWA_INSTALL; 7587 alias CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED; 7588 alias CEF_CPAIT_READER_MODE_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_READER_MODE_DEPRECATED; 7589 alias CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_AUTOFILL_ADDRESS; 7590 alias CEF_CPAIT_SAVE_CARD = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_CARD; 7591 alias CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED; 7592 alias CEF_CPAIT_SHARING_HUB = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SHARING_HUB; 7593 alias CEF_CPAIT_SIDE_SEARCH_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SIDE_SEARCH_DEPRECATED; 7594 alias CEF_CPAIT_SMS_REMOTE_FETCHER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SMS_REMOTE_FETCHER; 7595 alias CEF_CPAIT_TRANSLATE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_TRANSLATE; 7596 alias CEF_CPAIT_VIRTUAL_CARD_ENROLL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_ENROLL; 7597 alias CEF_CPAIT_VIRTUAL_CARD_INFORMATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_INFORMATION; 7598 alias CEF_CPAIT_ZOOM = cef_chrome_page_action_icon_type_t.CEF_CPAIT_ZOOM; 7599 alias CEF_CPAIT_SAVE_IBAN = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_IBAN; 7600 alias CEF_CPAIT_MANDATORY_REAUTH = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANDATORY_REAUTH; 7601 alias CEF_CPAIT_PRICE_INSIGHTS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_INSIGHTS; 7602 alias CEF_CPAIT_READ_ANYTHING_DEPRECATED = cef_chrome_page_action_icon_type_t.CEF_CPAIT_READ_ANYTHING_DEPRECATED; 7603 alias CEF_CPAIT_PRODUCT_SPECIFICATIONS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRODUCT_SPECIFICATIONS; 7604 alias CEF_CPAIT_LENS_OVERLAY = cef_chrome_page_action_icon_type_t.CEF_CPAIT_LENS_OVERLAY; 7605 alias CEF_CPAIT_DISCOUNTS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_DISCOUNTS; 7606 alias CEF_CPAIT_OPTIMIZATION_GUIDE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_OPTIMIZATION_GUIDE; 7607 alias CEF_CPAIT_COLLABORATION_MESSAGING = cef_chrome_page_action_icon_type_t.CEF_CPAIT_COLLABORATION_MESSAGING; 7608 alias CEF_CPAIT_CHANGE_PASSWORD = cef_chrome_page_action_icon_type_t.CEF_CPAIT_CHANGE_PASSWORD; 7609 alias CEF_CPAIT_LENS_OVERLAY_HOMEWORK = cef_chrome_page_action_icon_type_t.CEF_CPAIT_LENS_OVERLAY_HOMEWORK; 7610 alias CEF_CPAIT_AI_MODE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_AI_MODE; 7611 alias CEF_CPAIT_NUM_VALUES = cef_chrome_page_action_icon_type_t.CEF_CPAIT_NUM_VALUES; 7612 7613 /// 7614 /// Chrome toolbar button types. Should be kept in sync with CEF's internal 7615 /// ToolbarButtonType type. 7616 /// 7617 enum cef_chrome_toolbar_button_type_t 7618 { 7619 CEF_CTBT_CAST_DEPRECATED = 0, 7620 7621 CEF_CTBT_DOWNLOAD_DEPRECATED = 1, 7622 CEF_CTBT_SEND_TAB_TO_SELF_DEPRECATED = 2, 7623 7624 CEF_CTBT_SIDE_PANEL_DEPRECATED = 3, 7625 CEF_CTBT_MEDIA = 4, 7626 CEF_CTBT_TAB_SEARCH = 5, 7627 CEF_CTBT_BATTERY_SAVER = 6, 7628 CEF_CTBT_AVATAR = 7, 7629 7630 CEF_CTBT_NUM_VALUES = 8 7631 } 7632 7633 alias CEF_CTBT_CAST_DEPRECATED = cef_chrome_toolbar_button_type_t.CEF_CTBT_CAST_DEPRECATED; 7634 alias CEF_CTBT_DOWNLOAD_DEPRECATED = cef_chrome_toolbar_button_type_t.CEF_CTBT_DOWNLOAD_DEPRECATED; 7635 alias CEF_CTBT_SEND_TAB_TO_SELF_DEPRECATED = cef_chrome_toolbar_button_type_t.CEF_CTBT_SEND_TAB_TO_SELF_DEPRECATED; 7636 alias CEF_CTBT_SIDE_PANEL_DEPRECATED = cef_chrome_toolbar_button_type_t.CEF_CTBT_SIDE_PANEL_DEPRECATED; 7637 alias CEF_CTBT_MEDIA = cef_chrome_toolbar_button_type_t.CEF_CTBT_MEDIA; 7638 alias CEF_CTBT_TAB_SEARCH = cef_chrome_toolbar_button_type_t.CEF_CTBT_TAB_SEARCH; 7639 alias CEF_CTBT_BATTERY_SAVER = cef_chrome_toolbar_button_type_t.CEF_CTBT_BATTERY_SAVER; 7640 alias CEF_CTBT_AVATAR = cef_chrome_toolbar_button_type_t.CEF_CTBT_AVATAR; 7641 alias CEF_CTBT_NUM_VALUES = cef_chrome_toolbar_button_type_t.CEF_CTBT_NUM_VALUES; 7642 7643 /// 7644 /// Docking modes supported by CefWindow::AddOverlay. 7645 /// 7646 enum cef_docking_mode_t 7647 { 7648 CEF_DOCKING_MODE_TOP_LEFT = 0, 7649 CEF_DOCKING_MODE_TOP_RIGHT = 1, 7650 CEF_DOCKING_MODE_BOTTOM_LEFT = 2, 7651 CEF_DOCKING_MODE_BOTTOM_RIGHT = 3, 7652 CEF_DOCKING_MODE_CUSTOM = 4, 7653 CEF_DOCKING_MODE_NUM_VALUES = 5 7654 } 7655 7656 alias CEF_DOCKING_MODE_TOP_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_LEFT; 7657 alias CEF_DOCKING_MODE_TOP_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_RIGHT; 7658 alias CEF_DOCKING_MODE_BOTTOM_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_LEFT; 7659 alias CEF_DOCKING_MODE_BOTTOM_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_RIGHT; 7660 alias CEF_DOCKING_MODE_CUSTOM = cef_docking_mode_t.CEF_DOCKING_MODE_CUSTOM; 7661 alias CEF_DOCKING_MODE_NUM_VALUES = cef_docking_mode_t.CEF_DOCKING_MODE_NUM_VALUES; 7662 7663 /// 7664 /// Show states supported by CefWindowDelegate::GetInitialShowState. 7665 /// 7666 enum cef_show_state_t 7667 { 7668 // Show the window as normal. 7669 CEF_SHOW_STATE_NORMAL = 0, 7670 7671 // Show the window as minimized. 7672 CEF_SHOW_STATE_MINIMIZED = 1, 7673 7674 // Show the window as maximized. 7675 CEF_SHOW_STATE_MAXIMIZED = 2, 7676 7677 // Show the window as fullscreen. 7678 CEF_SHOW_STATE_FULLSCREEN = 3, 7679 7680 // Show the window as hidden (no dock thumbnail). 7681 // Only supported on MacOS. 7682 CEF_SHOW_STATE_HIDDEN = 4, 7683 7684 CEF_SHOW_STATE_NUM_VALUES = 5 7685 } 7686 7687 alias CEF_SHOW_STATE_NORMAL = cef_show_state_t.CEF_SHOW_STATE_NORMAL; 7688 alias CEF_SHOW_STATE_MINIMIZED = cef_show_state_t.CEF_SHOW_STATE_MINIMIZED; 7689 alias CEF_SHOW_STATE_MAXIMIZED = cef_show_state_t.CEF_SHOW_STATE_MAXIMIZED; 7690 alias CEF_SHOW_STATE_FULLSCREEN = cef_show_state_t.CEF_SHOW_STATE_FULLSCREEN; 7691 alias CEF_SHOW_STATE_HIDDEN = cef_show_state_t.CEF_SHOW_STATE_HIDDEN; 7692 alias CEF_SHOW_STATE_NUM_VALUES = cef_show_state_t.CEF_SHOW_STATE_NUM_VALUES; 7693 7694 /// 7695 /// Values indicating what state of the touch handle is set. 7696 /// 7697 enum cef_touch_handle_state_flags_t 7698 { 7699 CEF_THS_FLAG_NONE = 0, 7700 CEF_THS_FLAG_ENABLED = 1 << 0, 7701 CEF_THS_FLAG_ORIENTATION = 1 << 1, 7702 CEF_THS_FLAG_ORIGIN = 1 << 2, 7703 CEF_THS_FLAG_ALPHA = 1 << 3 7704 } 7705 7706 alias CEF_THS_FLAG_NONE = cef_touch_handle_state_flags_t.CEF_THS_FLAG_NONE; 7707 alias CEF_THS_FLAG_ENABLED = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ENABLED; 7708 alias CEF_THS_FLAG_ORIENTATION = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIENTATION; 7709 alias CEF_THS_FLAG_ORIGIN = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIGIN; 7710 alias CEF_THS_FLAG_ALPHA = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ALPHA; 7711 7712 struct cef_touch_handle_state_t 7713 { 7714 /// 7715 /// Size of this structure. 7716 /// 7717 size_t size; 7718 7719 /// 7720 /// Touch handle id. Increments for each new touch handle. 7721 /// 7722 int touch_handle_id; 7723 7724 /// 7725 /// Combination of cef_touch_handle_state_flags_t values indicating what state 7726 /// is set. 7727 /// 7728 uint flags; 7729 7730 /// 7731 /// Enabled state. Only set if |flags| contains CEF_THS_FLAG_ENABLED. 7732 /// 7733 int enabled; 7734 7735 /// 7736 /// Orientation state. Only set if |flags| contains CEF_THS_FLAG_ORIENTATION. 7737 /// 7738 cef_horizontal_alignment_t orientation; 7739 int mirror_vertical; 7740 int mirror_horizontal; 7741 7742 /// 7743 /// Origin state. Only set if |flags| contains CEF_THS_FLAG_ORIGIN. 7744 /// 7745 cef_point_t origin; 7746 7747 /// 7748 /// Alpha state. Only set if |flags| contains CEF_THS_FLAG_ALPHA. 7749 /// 7750 float alpha; 7751 } 7752 7753 7754 7755 /// 7756 /// Media access permissions used by OnRequestMediaAccessPermission. 7757 /// 7758 enum cef_media_access_permission_types_t 7759 { 7760 /// 7761 /// No permission. 7762 /// 7763 CEF_MEDIA_PERMISSION_NONE = 0, 7764 7765 /// 7766 /// Device audio capture permission. 7767 /// 7768 CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = 1 << 0, 7769 7770 /// 7771 /// Device video capture permission. 7772 /// 7773 CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = 1 << 1, 7774 7775 /// 7776 /// Desktop audio capture permission. 7777 /// 7778 CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = 1 << 2, 7779 7780 /// 7781 /// Desktop video capture permission. 7782 /// 7783 CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = 1 << 3 7784 } 7785 7786 alias CEF_MEDIA_PERMISSION_NONE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_NONE; 7787 alias CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE; 7788 alias CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE; 7789 alias CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE; 7790 alias CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE; 7791 7792 /// 7793 /// Permission types used with OnShowPermissionPrompt. Some types are 7794 /// platform-specific or only supported with Chrome style. Should be kept 7795 /// in sync with Chromium's permissions::RequestType type. 7796 /// 7797 enum cef_permission_request_types_t 7798 { 7799 CEF_PERMISSION_TYPE_NONE = 0, 7800 CEF_PERMISSION_TYPE_AR_SESSION = 1 << 0, 7801 CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 1, 7802 CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 2, 7803 CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL = 1 << 3, 7804 CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 4, 7805 CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 5, 7806 CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 6, 7807 CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 7, 7808 CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8, 7809 CEF_PERMISSION_TYPE_HAND_TRACKING = 1 << 9, 7810 CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = 1 << 10, 7811 CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 11, 7812 CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 12, 7813 CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 13, 7814 CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 14, 7815 CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 15, 7816 CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 << 16, 7817 CEF_PERMISSION_TYPE_POINTER_LOCK = 1 << 17, 7818 CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 18, 7819 CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 19, 7820 CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 20, 7821 CEF_PERMISSION_TYPE_VR_SESSION = 1 << 21, 7822 CEF_PERMISSION_TYPE_WEB_APP_INSTALLATION = 1 << 22, 7823 CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 23, 7824 CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 24, 7825 7826 CEF_PERMISSION_TYPE_LOCAL_NETWORK_ACCESS = 1 << 25 7827 } 7828 7829 alias CEF_PERMISSION_TYPE_NONE = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NONE; 7830 alias CEF_PERMISSION_TYPE_AR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_AR_SESSION; 7831 alias CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM; 7832 alias CEF_PERMISSION_TYPE_CAMERA_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_STREAM; 7833 alias CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL; 7834 alias CEF_PERMISSION_TYPE_CLIPBOARD = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CLIPBOARD; 7835 alias CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS; 7836 alias CEF_PERMISSION_TYPE_DISK_QUOTA = cef_permission_request_types_t.CEF_PERMISSION_TYPE_DISK_QUOTA; 7837 alias CEF_PERMISSION_TYPE_LOCAL_FONTS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_LOCAL_FONTS; 7838 alias CEF_PERMISSION_TYPE_GEOLOCATION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_GEOLOCATION; 7839 alias CEF_PERMISSION_TYPE_HAND_TRACKING = cef_permission_request_types_t.CEF_PERMISSION_TYPE_HAND_TRACKING; 7840 alias CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_IDENTITY_PROVIDER; 7841 alias CEF_PERMISSION_TYPE_IDLE_DETECTION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_IDLE_DETECTION; 7842 alias CEF_PERMISSION_TYPE_MIC_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIC_STREAM; 7843 alias CEF_PERMISSION_TYPE_MIDI_SYSEX = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIDI_SYSEX; 7844 alias CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS; 7845 alias CEF_PERMISSION_TYPE_NOTIFICATIONS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NOTIFICATIONS; 7846 alias CEF_PERMISSION_TYPE_KEYBOARD_LOCK = cef_permission_request_types_t.CEF_PERMISSION_TYPE_KEYBOARD_LOCK; 7847 alias CEF_PERMISSION_TYPE_POINTER_LOCK = cef_permission_request_types_t.CEF_PERMISSION_TYPE_POINTER_LOCK; 7848 alias CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER; 7849 alias CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER; 7850 alias CEF_PERMISSION_TYPE_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_STORAGE_ACCESS; 7851 alias CEF_PERMISSION_TYPE_VR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_VR_SESSION; 7852 alias CEF_PERMISSION_TYPE_WEB_APP_INSTALLATION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_WEB_APP_INSTALLATION; 7853 alias CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = cef_permission_request_types_t.CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT; 7854 alias CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS; 7855 alias CEF_PERMISSION_TYPE_LOCAL_NETWORK_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_LOCAL_NETWORK_ACCESS; 7856 7857 /// 7858 /// Permission request results. 7859 /// 7860 enum cef_permission_request_result_t 7861 { 7862 /// 7863 /// Accept the permission request as an explicit user action. 7864 /// 7865 CEF_PERMISSION_RESULT_ACCEPT = 0, 7866 7867 /// 7868 /// Deny the permission request as an explicit user action. 7869 /// 7870 CEF_PERMISSION_RESULT_DENY = 1, 7871 7872 /// 7873 /// Dismiss the permission request as an explicit user action. 7874 /// 7875 CEF_PERMISSION_RESULT_DISMISS = 2, 7876 7877 /// 7878 /// Ignore the permission request. If the prompt remains unhandled (e.g. 7879 /// OnShowPermissionPrompt returns false and there is no default permissions 7880 /// UI) then any related promises may remain unresolved. 7881 /// 7882 CEF_PERMISSION_RESULT_IGNORE = 3, 7883 7884 CEF_PERMISSION_RESULT_NUM_VALUES = 4 7885 } 7886 7887 alias CEF_PERMISSION_RESULT_ACCEPT = cef_permission_request_result_t.CEF_PERMISSION_RESULT_ACCEPT; 7888 alias CEF_PERMISSION_RESULT_DENY = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DENY; 7889 alias CEF_PERMISSION_RESULT_DISMISS = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DISMISS; 7890 alias CEF_PERMISSION_RESULT_IGNORE = cef_permission_request_result_t.CEF_PERMISSION_RESULT_IGNORE; 7891 alias CEF_PERMISSION_RESULT_NUM_VALUES = cef_permission_request_result_t.CEF_PERMISSION_RESULT_NUM_VALUES; 7892 7893 /// 7894 /// Certificate types supported by CefTestServer::CreateAndStart. The matching 7895 /// certificate file must exist in the "net/data/ssl/certificates" directory. 7896 /// See CefSetDataDirectoryForTests() for related configuration. 7897 /// 7898 enum cef_test_cert_type_t 7899 { 7900 /// Valid certificate using the IP (127.0.0.1). Loads the "ok_cert.pem" file. 7901 CEF_TEST_CERT_OK_IP = 0, 7902 7903 /// Valid certificate using the domain ("localhost"). Loads the 7904 /// "localhost_cert.pem" file. 7905 CEF_TEST_CERT_OK_DOMAIN = 1, 7906 7907 /// Expired certificate. Loads the "expired_cert.pem" file. 7908 CEF_TEST_CERT_EXPIRED = 2, 7909 7910 CEF_TEST_CERT_NUM_VALUES = 3 7911 } 7912 7913 alias CEF_TEST_CERT_OK_IP = cef_test_cert_type_t.CEF_TEST_CERT_OK_IP; 7914 alias CEF_TEST_CERT_OK_DOMAIN = cef_test_cert_type_t.CEF_TEST_CERT_OK_DOMAIN; 7915 alias CEF_TEST_CERT_EXPIRED = cef_test_cert_type_t.CEF_TEST_CERT_EXPIRED; 7916 alias CEF_TEST_CERT_NUM_VALUES = cef_test_cert_type_t.CEF_TEST_CERT_NUM_VALUES; 7917 7918 /// 7919 /// Preferences type passed to 7920 /// CefBrowserProcessHandler::OnRegisterCustomPreferences. 7921 /// 7922 enum cef_preferences_type_t 7923 { 7924 /// Global preferences registered a single time at application startup. 7925 CEF_PREFERENCES_TYPE_GLOBAL = 0, 7926 7927 /// Request context preferences registered each time a new CefRequestContext 7928 /// is created. 7929 CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = 1, 7930 7931 CEF_PREFERENCES_TYPE_NUM_VALUES = 2 7932 } 7933 7934 alias CEF_PREFERENCES_TYPE_GLOBAL = cef_preferences_type_t.CEF_PREFERENCES_TYPE_GLOBAL; 7935 alias CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = cef_preferences_type_t.CEF_PREFERENCES_TYPE_REQUEST_CONTEXT; 7936 alias CEF_PREFERENCES_TYPE_NUM_VALUES = cef_preferences_type_t.CEF_PREFERENCES_TYPE_NUM_VALUES; 7937 7938 /// 7939 /// Download interrupt reasons. Should be kept in sync with 7940 /// Chromium's download::DownloadInterruptReason type. 7941 /// 7942 enum cef_download_interrupt_reason_t 7943 { 7944 CEF_DOWNLOAD_INTERRUPT_REASON_NONE = 0, 7945 7946 /// Generic file operation failure. 7947 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = 1, 7948 7949 /// The file cannot be accessed due to security restrictions. 7950 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = 2, 7951 7952 /// There is not enough room on the drive. 7953 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = 3, 7954 7955 /// The directory or file name is too long. 7956 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = 5, 7957 7958 /// The file is too large for the file system to handle. 7959 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = 6, 7960 7961 /// The file contains a virus. 7962 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = 7, 7963 7964 /// The file was in use. Too many files are opened at once. We have run out of 7965 /// memory. 7966 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = 10, 7967 7968 /// The file was blocked due to local policy. 7969 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = 11, 7970 7971 /// An attempt to check the safety of the download failed due to unexpected 7972 /// reasons. See http://crbug.com/153212. 7973 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = 12, 7974 7975 /// An attempt was made to seek past the end of a file in opening 7976 /// a file (as part of resuming a previously interrupted download). 7977 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = 13, 7978 7979 /// The partial file didn't match the expected hash. 7980 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = 14, 7981 7982 /// The source and the target of the download were the same. 7983 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = 15, 7984 7985 // Network errors. 7986 7987 /// Generic network failure. 7988 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = 20, 7989 7990 /// The network operation timed out. 7991 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = 21, 7992 7993 /// The network connection has been lost. 7994 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = 22, 7995 7996 /// The server has gone down. 7997 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = 23, 7998 7999 /// The network request was invalid. This may be due to the original URL or a 8000 /// redirected URL: 8001 /// - Having an unsupported scheme. 8002 /// - Being an invalid URL. 8003 /// - Being disallowed by policy. 8004 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = 24, 8005 8006 // Server responses. 8007 8008 /// The server indicates that the operation has failed (generic). 8009 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = 30, 8010 8011 /// The server does not support range requests. 8012 /// Internal use only: must restart from the beginning. 8013 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = 31, 8014 8015 /// The server does not have the requested data. 8016 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = 33, 8017 8018 /// Server didn't authorize access to resource. 8019 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = 34, 8020 8021 /// Server certificate problem. 8022 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = 35, 8023 8024 /// Server access forbidden. 8025 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = 36, 8026 8027 /// Unexpected server response. This might indicate that the responding server 8028 /// may not be the intended server. 8029 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = 37, 8030 8031 /// The server sent fewer bytes than the content-length header. It may 8032 /// indicate that the connection was closed prematurely, or the Content-Length 8033 /// header was invalid. The download is only interrupted if strong validators 8034 /// are present. Otherwise, it is treated as finished. 8035 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = 38, 8036 8037 /// An unexpected cross-origin redirect happened. 8038 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = 39, 8039 8040 // User input. 8041 8042 /// The user canceled the download. 8043 CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = 40, 8044 8045 /// The user shut down the browser. 8046 /// Internal use only: resume pending downloads if possible. 8047 CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = 41, 8048 8049 // Crash. 8050 8051 /// The browser crashed. 8052 /// Internal use only: resume pending downloads if possible. 8053 CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50 8054 } 8055 8056 alias CEF_DOWNLOAD_INTERRUPT_REASON_NONE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NONE; 8057 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED; 8058 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED; 8059 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE; 8060 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG; 8061 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE; 8062 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED; 8063 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR; 8064 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED; 8065 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED; 8066 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT; 8067 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH; 8068 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE; 8069 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED; 8070 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT; 8071 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED; 8072 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN; 8073 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; 8074 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED; 8075 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE; 8076 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT; 8077 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED; 8078 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM; 8079 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN; 8080 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE; 8081 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH; 8082 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT; 8083 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED; 8084 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN; 8085 alias CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_CRASH; 8086 8087 /// 8088 /// Specifies the gesture commands. 8089 /// 8090 enum cef_gesture_command_t 8091 { 8092 CEF_GESTURE_COMMAND_BACK = 0, 8093 CEF_GESTURE_COMMAND_FORWARD = 1 8094 } 8095 8096 alias CEF_GESTURE_COMMAND_BACK = cef_gesture_command_t.CEF_GESTURE_COMMAND_BACK; 8097 alias CEF_GESTURE_COMMAND_FORWARD = cef_gesture_command_t.CEF_GESTURE_COMMAND_FORWARD; 8098 8099 /// 8100 /// Specifies the zoom commands supported by CefBrowserHost::Zoom. 8101 /// 8102 enum cef_zoom_command_t 8103 { 8104 CEF_ZOOM_COMMAND_OUT = 0, 8105 CEF_ZOOM_COMMAND_RESET = 1, 8106 CEF_ZOOM_COMMAND_IN = 2 8107 } 8108 8109 alias CEF_ZOOM_COMMAND_OUT = cef_zoom_command_t.CEF_ZOOM_COMMAND_OUT; 8110 alias CEF_ZOOM_COMMAND_RESET = cef_zoom_command_t.CEF_ZOOM_COMMAND_RESET; 8111 alias CEF_ZOOM_COMMAND_IN = cef_zoom_command_t.CEF_ZOOM_COMMAND_IN; 8112 8113 /// 8114 /// Specifies the color variants supported by 8115 /// CefRequestContext::SetChromeThemeColor. 8116 /// 8117 enum cef_color_variant_t 8118 { 8119 CEF_COLOR_VARIANT_SYSTEM = 0, 8120 CEF_COLOR_VARIANT_LIGHT = 1, 8121 CEF_COLOR_VARIANT_DARK = 2, 8122 CEF_COLOR_VARIANT_TONAL_SPOT = 3, 8123 CEF_COLOR_VARIANT_NEUTRAL = 4, 8124 CEF_COLOR_VARIANT_VIBRANT = 5, 8125 CEF_COLOR_VARIANT_EXPRESSIVE = 6, 8126 CEF_COLOR_VARIANT_NUM_VALUES = 7 8127 } 8128 8129 alias CEF_COLOR_VARIANT_SYSTEM = cef_color_variant_t.CEF_COLOR_VARIANT_SYSTEM; 8130 alias CEF_COLOR_VARIANT_LIGHT = cef_color_variant_t.CEF_COLOR_VARIANT_LIGHT; 8131 alias CEF_COLOR_VARIANT_DARK = cef_color_variant_t.CEF_COLOR_VARIANT_DARK; 8132 alias CEF_COLOR_VARIANT_TONAL_SPOT = cef_color_variant_t.CEF_COLOR_VARIANT_TONAL_SPOT; 8133 alias CEF_COLOR_VARIANT_NEUTRAL = cef_color_variant_t.CEF_COLOR_VARIANT_NEUTRAL; 8134 alias CEF_COLOR_VARIANT_VIBRANT = cef_color_variant_t.CEF_COLOR_VARIANT_VIBRANT; 8135 alias CEF_COLOR_VARIANT_EXPRESSIVE = cef_color_variant_t.CEF_COLOR_VARIANT_EXPRESSIVE; 8136 alias CEF_COLOR_VARIANT_NUM_VALUES = cef_color_variant_t.CEF_COLOR_VARIANT_NUM_VALUES; 8137 8138 /// 8139 /// Specifies the task type variants supported by CefTaskManager. 8140 /// Should be kept in sync with Chromium's task_manager::Task::Type type. 8141 /// 8142 enum cef_task_type_t 8143 { 8144 CEF_TASK_TYPE_UNKNOWN = 0, 8145 /// The main browser process. 8146 CEF_TASK_TYPE_BROWSER = 1, 8147 /// A graphics process. 8148 CEF_TASK_TYPE_GPU = 2, 8149 /// A Linux zygote process. 8150 CEF_TASK_TYPE_ZYGOTE = 3, 8151 /// A browser utility process. 8152 CEF_TASK_TYPE_UTILITY = 4, 8153 /// A normal WebContents renderer process. 8154 CEF_TASK_TYPE_RENDERER = 5, 8155 /// An extension or app process. 8156 CEF_TASK_TYPE_EXTENSION = 6, 8157 /// A browser plugin guest process. 8158 CEF_TASK_TYPE_GUEST = 7, 8159 8160 CEF_TASK_TYPE_PLUGIN_DEPRECATED = 8, 8161 8162 /// A plugin process. 8163 8164 /// A sandbox helper process 8165 CEF_TASK_TYPE_SANDBOX_HELPER = 9, 8166 /// A dedicated worker running on the renderer process. 8167 CEF_TASK_TYPE_DEDICATED_WORKER = 10, 8168 /// A shared worker running on the renderer process. 8169 CEF_TASK_TYPE_SHARED_WORKER = 11, 8170 /// A service worker running on the renderer process. 8171 CEF_TASK_TYPE_SERVICE_WORKER = 12, 8172 8173 CEF_TASK_TYPE_NUM_VALUES = 13 8174 } 8175 8176 alias CEF_TASK_TYPE_UNKNOWN = cef_task_type_t.CEF_TASK_TYPE_UNKNOWN; 8177 alias CEF_TASK_TYPE_BROWSER = cef_task_type_t.CEF_TASK_TYPE_BROWSER; 8178 alias CEF_TASK_TYPE_GPU = cef_task_type_t.CEF_TASK_TYPE_GPU; 8179 alias CEF_TASK_TYPE_ZYGOTE = cef_task_type_t.CEF_TASK_TYPE_ZYGOTE; 8180 alias CEF_TASK_TYPE_UTILITY = cef_task_type_t.CEF_TASK_TYPE_UTILITY; 8181 alias CEF_TASK_TYPE_RENDERER = cef_task_type_t.CEF_TASK_TYPE_RENDERER; 8182 alias CEF_TASK_TYPE_EXTENSION = cef_task_type_t.CEF_TASK_TYPE_EXTENSION; 8183 alias CEF_TASK_TYPE_GUEST = cef_task_type_t.CEF_TASK_TYPE_GUEST; 8184 alias CEF_TASK_TYPE_PLUGIN_DEPRECATED = cef_task_type_t.CEF_TASK_TYPE_PLUGIN_DEPRECATED; 8185 alias CEF_TASK_TYPE_SANDBOX_HELPER = cef_task_type_t.CEF_TASK_TYPE_SANDBOX_HELPER; 8186 alias CEF_TASK_TYPE_DEDICATED_WORKER = cef_task_type_t.CEF_TASK_TYPE_DEDICATED_WORKER; 8187 alias CEF_TASK_TYPE_SHARED_WORKER = cef_task_type_t.CEF_TASK_TYPE_SHARED_WORKER; 8188 alias CEF_TASK_TYPE_SERVICE_WORKER = cef_task_type_t.CEF_TASK_TYPE_SERVICE_WORKER; 8189 alias CEF_TASK_TYPE_NUM_VALUES = cef_task_type_t.CEF_TASK_TYPE_NUM_VALUES; 8190 8191 /// 8192 /// Structure representing task information provided by CefTaskManager. 8193 /// 8194 struct cef_task_info_t 8195 { 8196 /// 8197 /// Size of this structure. 8198 /// 8199 size_t size; 8200 8201 /// The task ID. 8202 long id; 8203 /// The task type. 8204 cef_task_type_t type; 8205 /// Set to true (1) if the task is killable. 8206 int is_killable; 8207 /// The task title. 8208 cef_string_t title; 8209 /// The CPU usage of the process on which the task is running. The value is 8210 /// in the range zero to number_of_processors * 100%. 8211 double cpu_usage; 8212 /// The number of processors available on the system. 8213 int number_of_processors; 8214 /// The memory footprint of the task in bytes. A value of -1 means no valid 8215 /// value is currently available. 8216 long memory; 8217 /// The GPU memory usage of the task in bytes. A value of -1 means no valid 8218 /// value is currently available. 8219 long gpu_memory; 8220 /// Set to true (1) if this task process' GPU resource count is inflated 8221 /// because it is counting other processes' resources (e.g, the GPU process 8222 /// has this value set to true because it is the aggregate of all processes). 8223 int is_gpu_memory_inflated; 8224 } 8225 8226 8227 8228 // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ 8229 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 8230 // 8231 // Redistribution and use in source and binary forms, with or without 8232 // modification, are permitted provided that the following conditions are 8233 // met: 8234 // 8235 // * Redistributions of source code must retain the above copyright 8236 // notice, this list of conditions and the following disclaimer. 8237 // * Redistributions in binary form must reproduce the above 8238 // copyright notice, this list of conditions and the following disclaimer 8239 // in the documentation and/or other materials provided with the 8240 // distribution. 8241 // * Neither the name of Google Inc. nor the name Chromium Embedded 8242 // Framework nor the names of its contributors may be used to endorse 8243 // or promote products derived from this software without specific prior 8244 // written permission. 8245 // 8246 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8247 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8248 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8249 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8250 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8251 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8252 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8253 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8254 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8255 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8256 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8257 // 8258 // --------------------------------------------------------------------------- 8259 // 8260 // This file was generated by the CEF translator tool and should not edited 8261 // by hand. See the translator.README.txt file in the tools directory for 8262 // more information. 8263 // 8264 // $hash=5fdf00ffc44f242afeba750876f072b712e7a6b5$ 8265 // 8266 8267 extern (C): 8268 8269 /// 8270 /// Implement this structure to receive accessibility notification when 8271 /// accessibility events have been registered. The functions of this structure 8272 /// will be called on the UI thread. 8273 /// 8274 /// NOTE: This struct is allocated client-side. 8275 /// 8276 struct cef_accessibility_handler_t 8277 { 8278 /// 8279 /// Base structure. 8280 /// 8281 8282 /// 8283 /// Called after renderer process sends accessibility tree changes to the 8284 /// browser process. 8285 /// 8286 8287 /// 8288 /// Called after renderer process sends accessibility location changes to the 8289 /// browser process. 8290 /// 8291 8292 cef_base_ref_counted_t base; 8293 extern(System) void function ( 8294 cef_accessibility_handler_t* self, 8295 cef_value_t* value) nothrow on_accessibility_tree_change; 8296 extern(System) void function ( 8297 cef_accessibility_handler_t* self, 8298 cef_value_t* value) nothrow on_accessibility_location_change; 8299 } 8300 8301 8302 8303 // CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_ 8304 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 8305 // 8306 // Redistribution and use in source and binary forms, with or without 8307 // modification, are permitted provided that the following conditions are 8308 // met: 8309 // 8310 // * Redistributions of source code must retain the above copyright 8311 // notice, this list of conditions and the following disclaimer. 8312 // * Redistributions in binary form must reproduce the above 8313 // copyright notice, this list of conditions and the following disclaimer 8314 // in the documentation and/or other materials provided with the 8315 // distribution. 8316 // * Neither the name of Google Inc. nor the name Chromium Embedded 8317 // Framework nor the names of its contributors may be used to endorse 8318 // or promote products derived from this software without specific prior 8319 // written permission. 8320 // 8321 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8322 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8323 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8324 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8325 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8326 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8327 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8328 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8329 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8330 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8331 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8332 // 8333 // --------------------------------------------------------------------------- 8334 // 8335 // This file was generated by the CEF translator tool and should not edited 8336 // by hand. See the translator.README.txt file in the tools directory for 8337 // more information. 8338 // 8339 // $hash=b5657e265452f5e0b7b19edbe25bb1d9e88c4b31$ 8340 // 8341 8342 extern (C): 8343 8344 /// 8345 /// Implement this structure to provide handler implementations. Methods will be 8346 /// called by the process and/or thread indicated. 8347 /// 8348 /// NOTE: This struct is allocated client-side. 8349 /// 8350 struct cef_app_t 8351 { 8352 /// 8353 /// Base structure. 8354 /// 8355 8356 /// 8357 /// Provides an opportunity to view and/or modify command-line arguments 8358 /// before processing by CEF and Chromium. The |process_type| value will be 8359 /// NULL for the browser process. Do not keep a reference to the 8360 /// cef_command_line_t object passed to this function. The 8361 8362 cef_base_ref_counted_t base; /// cef_settings_t.command_line_args_disabled value can be used to start with 8363 /// an NULL command-line object. Any values specified in CefSettings that 8364 /// equate to command-line arguments will be set before this function is 8365 /// called. Be cautious when using this function to modify command-line 8366 /// arguments for non-browser processes as this may result in undefined 8367 /// behavior including crashes. 8368 /// 8369 extern(System) void function ( 8370 cef_app_t* self, 8371 const(cef_string_t)* process_type, 8372 cef_command_line_t* command_line) nothrow on_before_command_line_processing; 8373 8374 /// 8375 /// Provides an opportunity to register custom schemes. Do not keep a 8376 /// reference to the |registrar| object. This function is called on the main 8377 /// thread for each process and the registered schemes should be the same 8378 /// across all processes. 8379 /// 8380 extern(System) void function ( 8381 cef_app_t* self, 8382 cef_scheme_registrar_t* registrar) nothrow on_register_custom_schemes; 8383 8384 /// 8385 /// Return the handler for resource bundle events. If no handler is returned 8386 /// resources will be loaded from pack files. This function is called by the 8387 /// browser and render processes on multiple threads. 8388 /// 8389 extern(System) cef_resource_bundle_handler_t* function ( 8390 cef_app_t* self) nothrow get_resource_bundle_handler; 8391 8392 /// 8393 /// Return the handler for functionality specific to the browser process. This 8394 /// function is called on multiple threads in the browser process. 8395 /// 8396 extern(System) cef_browser_process_handler_t* function ( 8397 cef_app_t* self) nothrow get_browser_process_handler; 8398 8399 /// 8400 /// Return the handler for functionality specific to the render process. This 8401 /// function is called on the render process main thread. 8402 /// 8403 extern(System) cef_render_process_handler_t* function ( 8404 cef_app_t* self) nothrow get_render_process_handler; 8405 } 8406 8407 8408 8409 /// 8410 /// This function should be called from the application entry point function to 8411 /// execute a secondary process. It can be used to run secondary processes from 8412 /// the browser client executable (default behavior) or from a separate 8413 /// executable specified by the cef_settings_t.browser_subprocess_path value. If 8414 /// called for the browser process (identified by no "type" command-line value) 8415 /// it will return immediately with a value of -1. If called for a recognized 8416 /// secondary process it will block until the process should exit and then 8417 /// return the process exit code. The |application| parameter may be NULL. The 8418 /// |windows_sandbox_info| parameter is only used on Windows and may be NULL 8419 /// (see cef_sandbox_win.h for details). 8420 /// 8421 int cef_execute_process ( 8422 const(cef_main_args_t)* args, 8423 cef_app_t* application, 8424 void* windows_sandbox_info); 8425 8426 /// 8427 /// This function should be called on the main application thread to initialize 8428 /// the CEF browser process. The |application| parameter may be NULL. Returns 8429 /// true (1) if initialization succeeds. Returns false (0) if initialization 8430 /// fails or if early exit is desired (for example, due to process singleton 8431 /// relaunch behavior). If this function returns false (0) then the application 8432 /// should exit immediately without calling any other CEF functions except, 8433 /// optionally, CefGetExitCode. The |windows_sandbox_info| parameter is only 8434 /// used on Windows and may be NULL (see cef_sandbox_win.h for details). 8435 /// 8436 int cef_initialize ( 8437 const(cef_main_args_t)* args, 8438 const(cef_settings_t)* settings, 8439 cef_app_t* application, 8440 void* windows_sandbox_info); 8441 8442 /// 8443 /// This function can optionally be called on the main application thread after 8444 /// CefInitialize to retrieve the initialization exit code. When CefInitialize 8445 /// returns true (1) the exit code will be 0 (CEF_RESULT_CODE_NORMAL_EXIT). 8446 /// Otherwise, see cef_resultcode_t for possible exit code values including 8447 /// browser process initialization errors and normal early exit conditions (such 8448 /// as CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED for process singleton 8449 /// relaunch behavior). 8450 /// 8451 int cef_get_exit_code (); 8452 8453 /// 8454 /// This function should be called on the main application thread to shut down 8455 /// the CEF browser process before the application exits. Do not call any other 8456 /// CEF functions after calling this function. 8457 /// 8458 void cef_shutdown (); 8459 8460 /// 8461 /// Perform a single iteration of CEF message loop processing. This function is 8462 /// provided for cases where the CEF message loop must be integrated into an 8463 /// existing application message loop. Use of this function is not recommended 8464 /// for most users; use either the cef_run_message_loop() function or 8465 /// cef_settings_t.multi_threaded_message_loop if possible. When using this 8466 /// function care must be taken to balance performance against excessive CPU 8467 /// usage. It is recommended to enable the cef_settings_t.external_message_pump 8468 /// option when using this function so that 8469 /// cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can 8470 /// facilitate the scheduling process. This function should only be called on 8471 /// the main application thread and only if cef_initialize() is called with a 8472 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function 8473 /// will not block. 8474 /// 8475 void cef_do_message_loop_work (); 8476 8477 /// 8478 /// Run the CEF message loop. Use this function instead of an application- 8479 /// provided message loop to get the best balance between performance and CPU 8480 /// usage. This function should only be called on the main application thread 8481 /// and only if cef_initialize() is called with a 8482 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function 8483 /// will block until a quit message is received by the system. 8484 /// 8485 void cef_run_message_loop (); 8486 8487 /// 8488 /// Quit the CEF message loop that was started by calling 8489 /// cef_run_message_loop(). This function should only be called on the main 8490 /// application thread and only if cef_run_message_loop() was used. 8491 /// 8492 void cef_quit_message_loop (); 8493 8494 /// 8495 /// Set to true (1) before calling OS APIs on the CEF UI thread that will enter 8496 /// a native message loop (see usage restrictions below). Set to false (0) after 8497 /// exiting the native message loop. On Windows, use the CefSetOSModalLoop 8498 /// function instead in cases like native top menus where resize of the browser 8499 /// content is not required, or in cases like printer APIs where reentrancy 8500 /// safety cannot be guaranteed. 8501 /// 8502 /// Nested processing of Chromium tasks is disabled by default because common 8503 /// controls and/or printer functions may use nested native message loops that 8504 /// lead to unplanned reentrancy. This function re-enables nested processing in 8505 /// the scope of an upcoming native message loop. It must only be used in cases 8506 /// where the stack is reentrancy safe and processing nestable tasks is 8507 /// explicitly safe. Do not use in cases (like the printer example) where an OS 8508 /// API may experience unplanned reentrancy as a result of a new task executing 8509 /// immediately. 8510 /// 8511 /// For instance, 8512 /// - The UI thread is running a message loop. 8513 /// - It receives a task #1 and executes it. 8514 /// - The task #1 implicitly starts a nested message loop. For example, via 8515 /// Windows APIs such as MessageBox or GetSaveFileName, or default handling of 8516 /// a user-initiated drag/resize operation (e.g. DefWindowProc handling of 8517 /// WM_SYSCOMMAND for SC_MOVE/SC_SIZE). 8518 /// - The UI thread receives a task #2 before or while in this second message 8519 /// loop. 8520 /// - With NestableTasksAllowed set to true (1), the task #2 will run right 8521 /// away. Otherwise, it will be executed right after task #1 completes at 8522 /// "thread message loop level". 8523 /// 8524 void cef_set_nestable_tasks_allowed (int allowed); 8525 8526 // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ 8527 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 8528 // 8529 // Redistribution and use in source and binary forms, with or without 8530 // modification, are permitted provided that the following conditions are 8531 // met: 8532 // 8533 // * Redistributions of source code must retain the above copyright 8534 // notice, this list of conditions and the following disclaimer. 8535 // * Redistributions in binary form must reproduce the above 8536 // copyright notice, this list of conditions and the following disclaimer 8537 // in the documentation and/or other materials provided with the 8538 // distribution. 8539 // * Neither the name of Google Inc. nor the name Chromium Embedded 8540 // Framework nor the names of its contributors may be used to endorse 8541 // or promote products derived from this software without specific prior 8542 // written permission. 8543 // 8544 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8545 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8546 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8547 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8548 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8549 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8550 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8551 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8552 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8553 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8554 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8555 // 8556 // --------------------------------------------------------------------------- 8557 // 8558 // This file was generated by the CEF translator tool and should not edited 8559 // by hand. See the translator.README.txt file in the tools directory for 8560 // more information. 8561 // 8562 // $hash=d5ffacfa715e53e29eda66ba1adbc2fe36a0f136$ 8563 // 8564 8565 extern (C): 8566 8567 /// 8568 /// Implement this structure to handle audio events. 8569 /// 8570 /// NOTE: This struct is allocated client-side. 8571 /// 8572 struct cef_audio_handler_t 8573 { 8574 /// 8575 /// Base structure. 8576 /// 8577 8578 /// 8579 /// Called on the UI thread to allow configuration of audio stream parameters. 8580 /// Return true (1) to proceed with audio stream capture, or false (0) to 8581 /// cancel it. All members of |params| can optionally be configured here, but 8582 /// they are also pre-filled with some sensible defaults. 8583 /// 8584 8585 /// 8586 /// Called on a browser audio capture thread when the browser starts streaming 8587 8588 cef_base_ref_counted_t base; 8589 extern(System) int function ( 8590 cef_audio_handler_t* self, 8591 cef_browser_t* browser, 8592 cef_audio_parameters_t* params) nothrow get_audio_parameters; /// audio. OnAudioStreamStopped will always be called after 8593 /// OnAudioStreamStarted; both functions may be called multiple times for the 8594 /// same browser. |params| contains the audio parameters like sample rate and 8595 /// channel layout. |channels| is the number of channels. 8596 /// 8597 extern(System) void function ( 8598 cef_audio_handler_t* self, 8599 cef_browser_t* browser, 8600 const(cef_audio_parameters_t)* params, 8601 int channels) nothrow on_audio_stream_started; 8602 8603 /// 8604 /// Called on the audio stream thread when a PCM packet is received for the 8605 /// stream. |data| is an array representing the raw PCM data as a floating 8606 /// point type, i.e. 4-byte value(s). |frames| is the number of frames in the 8607 /// PCM packet. |pts| is the presentation timestamp (in milliseconds since the 8608 /// Unix Epoch) and represents the time at which the decompressed packet 8609 /// should be presented to the user. Based on |frames| and the 8610 /// |channel_layout| value passed to OnAudioStreamStarted you can calculate 8611 /// the size of the |data| array in bytes. 8612 /// 8613 extern(System) void function ( 8614 cef_audio_handler_t* self, 8615 cef_browser_t* browser, 8616 const(float*)* data, 8617 int frames, 8618 long pts) nothrow on_audio_stream_packet; 8619 8620 /// 8621 /// Called on the UI thread when the stream has stopped. OnAudioSteamStopped 8622 /// will always be called after OnAudioStreamStarted; both functions may be 8623 /// called multiple times for the same stream. 8624 /// 8625 extern(System) void function ( 8626 cef_audio_handler_t* self, 8627 cef_browser_t* browser) nothrow on_audio_stream_stopped; 8628 8629 /// 8630 /// Called on the UI or audio stream thread when an error occurred. During the 8631 /// stream creation phase this callback will be called on the UI thread while 8632 /// in the capturing phase it will be called on the audio stream thread. The 8633 /// stream will be stopped immediately. 8634 /// 8635 extern(System) void function ( 8636 cef_audio_handler_t* self, 8637 cef_browser_t* browser, 8638 const(cef_string_t)* message) nothrow on_audio_stream_error; 8639 } 8640 8641 8642 8643 // CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_ 8644 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 8645 // 8646 // Redistribution and use in source and binary forms, with or without 8647 // modification, are permitted provided that the following conditions are 8648 // met: 8649 // 8650 // * Redistributions of source code must retain the above copyright 8651 // notice, this list of conditions and the following disclaimer. 8652 // * Redistributions in binary form must reproduce the above 8653 // copyright notice, this list of conditions and the following disclaimer 8654 // in the documentation and/or other materials provided with the 8655 // distribution. 8656 // * Neither the name of Google Inc. nor the name Chromium Embedded 8657 // Framework nor the names of its contributors may be used to endorse 8658 // or promote products derived from this software without specific prior 8659 // written permission. 8660 // 8661 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8662 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8663 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8664 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8665 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8666 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8667 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8668 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8669 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8670 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8671 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8672 // 8673 // --------------------------------------------------------------------------- 8674 // 8675 // This file was generated by the CEF translator tool and should not edited 8676 // by hand. See the translator.README.txt file in the tools directory for 8677 // more information. 8678 // 8679 // $hash=c75890ff2b7a45a39fc51492ddb16d6f6107b7ef$ 8680 // 8681 8682 extern (C): 8683 8684 /// 8685 /// Callback structure used for asynchronous continuation of authentication 8686 /// requests. 8687 /// 8688 /// NOTE: This struct is allocated DLL-side. 8689 /// 8690 struct cef_auth_callback_t 8691 { 8692 /// 8693 /// Base structure. 8694 /// 8695 8696 /// 8697 /// Continue the authentication request. 8698 /// 8699 8700 /// 8701 /// Cancel the authentication request. 8702 /// 8703 8704 // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ 8705 8706 cef_base_ref_counted_t base; 8707 extern(System) void function ( 8708 cef_auth_callback_t* self, 8709 const(cef_string_t)* username, 8710 const(cef_string_t)* password) nothrow cont; 8711 extern(System) void function (cef_auth_callback_t* self) nothrow cancel; 8712 } 8713 8714 8715 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 8716 // 8717 // Redistribution and use in source and binary forms, with or without 8718 // modification, are permitted provided that the following conditions are 8719 // met: 8720 // 8721 // * Redistributions of source code must retain the above copyright 8722 // notice, this list of conditions and the following disclaimer. 8723 // * Redistributions in binary form must reproduce the above 8724 // copyright notice, this list of conditions and the following disclaimer 8725 // in the documentation and/or other materials provided with the 8726 // distribution. 8727 // * Neither the name of Google Inc. nor the name Chromium Embedded 8728 // Framework nor the names of its contributors may be used to endorse 8729 // or promote products derived from this software without specific prior 8730 // written permission. 8731 // 8732 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8733 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8734 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8735 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8736 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8737 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8738 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8739 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8740 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8741 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8742 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8743 8744 import core.stdc.config; 8745 8746 extern (C): 8747 8748 /// 8749 /// All ref-counted framework structures must include this structure first. 8750 /// 8751 struct cef_base_ref_counted_t 8752 { 8753 /// 8754 /// Size of the data structure. 8755 /// 8756 8757 /// 8758 /// Called to increment the reference count for the object. Should be called 8759 /// for every new copy of a pointer to a given object. 8760 /// 8761 8762 /// 8763 /// Called to decrement the reference count for the object. If the reference 8764 size_t size; 8765 extern(System) void function (cef_base_ref_counted_t* self) nothrow add_ref; 8766 /// count falls to 0 the object should self-delete. Returns true (1) if the 8767 /// resulting reference count is 0. 8768 /// 8769 extern(System) int function (cef_base_ref_counted_t* self) nothrow release; 8770 8771 /// 8772 /// Returns true (1) if the current reference count is 1. 8773 /// 8774 extern(System) int function (cef_base_ref_counted_t* self) nothrow has_one_ref; 8775 8776 /// 8777 /// Returns true (1) if the current reference count is at least 1. 8778 /// 8779 extern(System) int function (cef_base_ref_counted_t* self) nothrow has_at_least_one_ref; 8780 } 8781 8782 8783 8784 /// 8785 /// All scoped framework structures must include this structure first. 8786 /// 8787 struct cef_base_scoped_t 8788 { 8789 /// 8790 /// Size of the data structure. 8791 /// 8792 size_t size; 8793 8794 /// 8795 /// Called to delete this object. May be NULL if the object is not owned. 8796 /// 8797 extern(System) void function (cef_base_scoped_t* self) nothrow del; 8798 } 8799 8800 8801 8802 // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ 8803 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 8804 // 8805 // Redistribution and use in source and binary forms, with or without 8806 // modification, are permitted provided that the following conditions are 8807 // met: 8808 // 8809 // * Redistributions of source code must retain the above copyright 8810 // notice, this list of conditions and the following disclaimer. 8811 // * Redistributions in binary form must reproduce the above 8812 // copyright notice, this list of conditions and the following disclaimer 8813 // in the documentation and/or other materials provided with the 8814 // distribution. 8815 // * Neither the name of Google Inc. nor the name Chromium Embedded 8816 // Framework nor the names of its contributors may be used to endorse 8817 // or promote products derived from this software without specific prior 8818 // written permission. 8819 // 8820 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8821 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8822 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8823 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8824 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8825 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8826 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8827 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8828 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8829 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8830 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8831 // 8832 // --------------------------------------------------------------------------- 8833 // 8834 // This file was generated by the CEF translator tool and should not edited 8835 // by hand. See the translator.README.txt file in the tools directory for 8836 // more information. 8837 // 8838 // $hash=dab511b5ae8accb4f252f7a21a41b626c6417330$ 8839 // 8840 8841 extern (C): 8842 8843 8844 8845 /// 8846 /// Structure used to represent a browser. When used in the browser process the 8847 /// functions of this structure may be called on any thread unless otherwise 8848 /// indicated in the comments. When used in the render process the functions of 8849 /// this structure may only be called on the main thread. 8850 /// 8851 /// NOTE: This struct is allocated DLL-side. 8852 /// 8853 struct cef_browser_t 8854 { 8855 /// 8856 /// Base structure. 8857 /// 8858 8859 cef_base_ref_counted_t base; /// 8860 /// True if this object is currently valid. This will return false (0) after 8861 /// cef_life_span_handler_t::OnBeforeClose is called. 8862 /// 8863 extern(System) int function (cef_browser_t* self) nothrow is_valid; 8864 8865 /// 8866 /// Returns the browser host object. This function can only be called in the 8867 /// browser process. 8868 /// 8869 extern(System) cef_browser_host_t* function (cef_browser_t* self) nothrow get_host; 8870 8871 /// 8872 /// Returns true (1) if the browser can navigate backwards. 8873 /// 8874 extern(System) int function (cef_browser_t* self) nothrow can_go_back; 8875 8876 /// 8877 /// Navigate backwards. 8878 /// 8879 extern(System) void function (cef_browser_t* self) nothrow go_back; 8880 8881 /// 8882 /// Returns true (1) if the browser can navigate forwards. 8883 /// 8884 extern(System) int function (cef_browser_t* self) nothrow can_go_forward; 8885 8886 /// 8887 /// Navigate forwards. 8888 /// 8889 extern(System) void function (cef_browser_t* self) nothrow go_forward; 8890 8891 /// 8892 /// Returns true (1) if the browser is currently loading. 8893 /// 8894 extern(System) int function (cef_browser_t* self) nothrow is_loading; 8895 8896 /// 8897 /// Reload the current page. 8898 /// 8899 extern(System) void function (cef_browser_t* self) nothrow reload; 8900 8901 /// 8902 /// Reload the current page ignoring any cached data. 8903 /// 8904 extern(System) void function (cef_browser_t* self) nothrow reload_ignore_cache; 8905 8906 /// 8907 /// Stop loading the page. 8908 /// 8909 extern(System) void function (cef_browser_t* self) nothrow stop_load; 8910 8911 /// 8912 /// Returns the globally unique identifier for this browser. This value is 8913 /// also used as the tabId for extension APIs. 8914 /// 8915 extern(System) int function (cef_browser_t* self) nothrow get_identifier; 8916 8917 /// 8918 /// Returns true (1) if this object is pointing to the same handle as |that| 8919 /// object. 8920 /// 8921 extern(System) int function (cef_browser_t* self, cef_browser_t* that) nothrow is_same; 8922 8923 /// 8924 /// Returns true (1) if the browser is a popup. 8925 /// 8926 extern(System) int function (cef_browser_t* self) nothrow is_popup; 8927 8928 /// 8929 /// Returns true (1) if a document has been loaded in the browser. 8930 /// 8931 extern(System) int function (cef_browser_t* self) nothrow has_document; 8932 8933 /// 8934 /// Returns the main (top-level) frame for the browser. In the browser process 8935 /// this will return a valid object until after 8936 /// cef_life_span_handler_t::OnBeforeClose is called. In the renderer process 8937 /// this will return NULL if the main frame is hosted in a different renderer 8938 /// process (e.g. for cross-origin sub-frames). The main frame object will 8939 /// change during cross-origin navigation or re-navigation after renderer 8940 /// process termination (due to crashes, etc). 8941 /// 8942 extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_main_frame; 8943 8944 /// 8945 /// Returns the focused frame for the browser. 8946 /// 8947 extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_focused_frame; 8948 8949 /// 8950 /// Returns the frame with the specified identifier, or NULL if not found. 8951 /// 8952 extern(System) cef_frame_t* function ( 8953 cef_browser_t* self, 8954 const(cef_string_t)* identifier) nothrow get_frame_by_identifier; 8955 8956 /// 8957 /// Returns the frame with the specified name, or NULL if not found. 8958 /// 8959 extern(System) cef_frame_t* function ( 8960 cef_browser_t* self, 8961 const(cef_string_t)* name) nothrow get_frame_by_name; 8962 8963 /// 8964 /// Returns the number of frames that currently exist. 8965 /// 8966 extern(System) size_t function (cef_browser_t* self) nothrow get_frame_count; 8967 8968 /// 8969 /// Returns the identifiers of all existing frames. 8970 /// 8971 extern(System) void function ( 8972 cef_browser_t* self, 8973 cef_string_list_t identifiers) nothrow get_frame_identifiers; 8974 8975 /// 8976 /// Returns the names of all existing frames. 8977 /// 8978 extern(System) void function ( 8979 cef_browser_t* self, 8980 cef_string_list_t names) nothrow get_frame_names; 8981 } 8982 8983 8984 8985 /// 8986 /// Callback structure for cef_browser_host_t::RunFileDialog. The functions of 8987 /// this structure will be called on the browser process UI thread. 8988 /// 8989 /// NOTE: This struct is allocated client-side. 8990 /// 8991 struct cef_run_file_dialog_callback_t 8992 { 8993 /// 8994 /// Base structure. 8995 /// 8996 cef_base_ref_counted_t base; 8997 8998 /// 8999 /// Called asynchronously after the file dialog is dismissed. |file_paths| 9000 /// will be a single value or a list of values depending on the dialog mode. 9001 /// If the selection was cancelled |file_paths| will be NULL. 9002 /// 9003 extern(System) void function ( 9004 cef_run_file_dialog_callback_t* self, 9005 cef_string_list_t file_paths) nothrow on_file_dialog_dismissed; 9006 } 9007 9008 9009 9010 /// 9011 /// Callback structure for cef_browser_host_t::GetNavigationEntries. The 9012 /// functions of this structure will be called on the browser process UI thread. 9013 /// 9014 /// NOTE: This struct is allocated client-side. 9015 /// 9016 struct cef_navigation_entry_visitor_t 9017 { 9018 /// 9019 /// Base structure. 9020 /// 9021 cef_base_ref_counted_t base; 9022 9023 /// 9024 /// Method that will be executed. Do not keep a reference to |entry| outside 9025 /// of this callback. Return true (1) to continue visiting entries or false 9026 /// (0) to stop. |current| is true (1) if this entry is the currently loaded 9027 /// navigation entry. |index| is the 0-based index of this entry and |total| 9028 /// is the total number of entries. 9029 /// 9030 extern(System) int function ( 9031 cef_navigation_entry_visitor_t* self, 9032 cef_navigation_entry_t* entry, 9033 int current, 9034 int index, 9035 int total) nothrow visit; 9036 } 9037 9038 9039 9040 /// 9041 /// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this 9042 /// structure will be called on the browser process UI thread. 9043 /// 9044 /// NOTE: This struct is allocated client-side. 9045 /// 9046 struct cef_pdf_print_callback_t 9047 { 9048 /// 9049 /// Base structure. 9050 /// 9051 cef_base_ref_counted_t base; 9052 9053 /// 9054 /// Method that will be executed when the PDF printing has completed. |path| 9055 /// is the output path. |ok| will be true (1) if the printing completed 9056 /// successfully or false (0) otherwise. 9057 /// 9058 extern(System) void function ( 9059 cef_pdf_print_callback_t* self, 9060 const(cef_string_t)* path, 9061 int ok) nothrow on_pdf_print_finished; 9062 } 9063 9064 9065 9066 /// 9067 /// Callback structure for cef_browser_host_t::DownloadImage. The functions of 9068 /// this structure will be called on the browser process UI thread. 9069 /// 9070 /// NOTE: This struct is allocated client-side. 9071 /// 9072 struct cef_download_image_callback_t 9073 { 9074 /// 9075 /// Base structure. 9076 /// 9077 cef_base_ref_counted_t base; 9078 9079 /// 9080 /// Method that will be executed when the image download has completed. 9081 /// |image_url| is the URL that was downloaded and |http_status_code| is the 9082 /// resulting HTTP status code. |image| is the resulting image, possibly at 9083 /// multiple scale factors, or NULL if the download failed. 9084 /// 9085 extern(System) void function ( 9086 cef_download_image_callback_t* self, 9087 const(cef_string_t)* image_url, 9088 int http_status_code, 9089 cef_image_t* image) nothrow on_download_image_finished; 9090 } 9091 9092 9093 9094 /// 9095 /// Structure used to represent the browser process aspects of a browser. The 9096 /// functions of this structure can only be called in the browser process. They 9097 /// may be called on any thread in that process unless otherwise indicated in 9098 /// the comments. 9099 /// 9100 /// NOTE: This struct is allocated DLL-side. 9101 /// 9102 struct cef_browser_host_t 9103 { 9104 /// 9105 /// Base structure. 9106 /// 9107 cef_base_ref_counted_t base; 9108 9109 /// 9110 /// Returns the hosted browser object. 9111 /// 9112 extern(System) cef_browser_t* function (cef_browser_host_t* self) nothrow get_browser; 9113 9114 /// 9115 /// Request that the browser close. Closing a browser is a multi-stage process 9116 /// that may complete either synchronously or asynchronously, and involves 9117 /// callbacks such as cef_life_span_handler_t::DoClose (Alloy style only), 9118 /// cef_life_span_handler_t::OnBeforeClose, and a top-level window close 9119 /// handler such as cef_window_delegate_t::CanClose (or platform-specific 9120 /// equivalent). In some cases a close request may be delayed or canceled by 9121 /// the user. Using try_close_browser() instead of close_browser() is 9122 /// recommended for most use cases. See cef_life_span_handler_t::do_close() 9123 /// documentation for detailed usage and examples. 9124 /// 9125 /// If |force_close| is false (0) then JavaScript unload handlers, if any, may 9126 /// be fired and the close may be delayed or canceled by the user. If 9127 /// |force_close| is true (1) then the user will not be prompted and the close 9128 /// will proceed immediately (possibly asynchronously). If browser close is 9129 /// delayed and not canceled the default behavior is to call the top-level 9130 /// window close handler once the browser is ready to be closed. This default 9131 /// behavior can be changed for Alloy style browsers by implementing 9132 /// cef_life_span_handler_t::do_close(). is_ready_to_be_closed() can be used 9133 /// to detect mandatory browser close events when customizing close behavior 9134 /// on the browser process UI thread. 9135 /// 9136 extern(System) void function (cef_browser_host_t* self, int force_close) nothrow close_browser; 9137 9138 /// 9139 /// Helper for closing a browser. This is similar in behavior to 9140 /// CLoseBrowser(false (0)) but returns a boolean to reflect the immediate 9141 /// close status. Call this function from a top-level window close handler 9142 /// such as cef_window_delegate_t::CanClose (or platform-specific equivalent) 9143 /// to request that the browser close, and return the result to indicate if 9144 /// the window close should proceed. Returns false (0) if the close will be 9145 /// delayed (JavaScript unload handlers triggered but still pending) or true 9146 /// (1) if the close will proceed immediately (possibly asynchronously). See 9147 /// close_browser() documentation for additional usage information. This 9148 /// function must be called on the browser process UI thread. 9149 /// 9150 extern(System) int function (cef_browser_host_t* self) nothrow try_close_browser; 9151 9152 /// 9153 /// Returns true (1) if the browser is ready to be closed, meaning that the 9154 /// close has already been initiated and that JavaScript unload handlers have 9155 /// already executed or should be ignored. This can be used from a top-level 9156 /// window close handler such as cef_window_delegate_t::CanClose (or platform- 9157 /// specific equivalent) to distringuish between potentially cancelable 9158 /// browser close events (like the user clicking the top-level window close 9159 /// button before browser close has started) and mandatory browser close 9160 /// events (like JavaScript `window.close()` or after browser close has 9161 /// started in response to [Try]close_browser()). Not completing the browser 9162 /// close for mandatory close events (when this function returns true (1)) 9163 /// will leave the browser in a partially closed state that interferes with 9164 /// proper functioning. See close_browser() documentation for additional usage 9165 /// information. This function must be called on the browser process UI 9166 /// thread. 9167 /// 9168 extern(System) int function (cef_browser_host_t* self) nothrow is_ready_to_be_closed; 9169 9170 /// 9171 /// Set whether the browser is focused. 9172 /// 9173 extern(System) void function (cef_browser_host_t* self, int focus) nothrow set_focus; 9174 9175 /// 9176 /// Retrieve the window handle (if any) for this browser. If this browser is 9177 /// wrapped in a cef_browser_view_t this function should be called on the 9178 /// browser process UI thread and it will return the handle for the top-level 9179 /// native window. 9180 /// 9181 extern(System) cef_window_handle_t function (cef_browser_host_t* self) nothrow get_window_handle; 9182 9183 /// 9184 /// Retrieve the window handle (if any) of the browser that opened this 9185 /// browser. Will return NULL for non-popup browsers or if this browser is 9186 /// wrapped in a cef_browser_view_t. This function can be used in combination 9187 /// with custom handling of modal windows. 9188 /// 9189 extern(System) cef_window_handle_t function ( 9190 cef_browser_host_t* self) nothrow get_opener_window_handle; 9191 9192 /// 9193 /// Retrieve the unique identifier of the browser that opened this browser. 9194 /// Will return 0 for non-popup browsers. 9195 /// 9196 extern(System) int function (cef_browser_host_t* self) nothrow get_opener_identifier; 9197 9198 /// 9199 /// Returns true (1) if this browser is wrapped in a cef_browser_view_t. 9200 /// 9201 extern(System) int function (cef_browser_host_t* self) nothrow has_view; 9202 9203 /// 9204 /// Returns the client for this browser. 9205 /// 9206 extern(System) cef_client_t* function (cef_browser_host_t* self) nothrow get_client; 9207 9208 /// 9209 /// Returns the request context for this browser. 9210 /// 9211 extern(System) cef_request_context_t* function ( 9212 cef_browser_host_t* self) nothrow get_request_context; 9213 9214 /// 9215 /// Returns true (1) if this browser can execute the specified zoom command. 9216 /// This function can only be called on the UI thread. 9217 /// 9218 extern(System) int function ( 9219 cef_browser_host_t* self, 9220 cef_zoom_command_t command) nothrow can_zoom; 9221 9222 /// 9223 /// Execute a zoom command in this browser. If called on the UI thread the 9224 /// change will be applied immediately. Otherwise, the change will be applied 9225 /// asynchronously on the UI thread. 9226 /// 9227 extern(System) void function (cef_browser_host_t* self, cef_zoom_command_t command) nothrow zoom; 9228 9229 /// 9230 /// Get the default zoom level. This value will be 0.0 by default but can be 9231 /// configured. This function can only be called on the UI thread. 9232 /// 9233 extern(System) double function (cef_browser_host_t* self) nothrow get_default_zoom_level; 9234 9235 /// 9236 /// Get the current zoom level. This function can only be called on the UI 9237 /// thread. 9238 /// 9239 extern(System) double function (cef_browser_host_t* self) nothrow get_zoom_level; 9240 9241 /// 9242 /// Change the zoom level to the specified value. Specify 0.0 to reset the 9243 /// zoom level to the default. If called on the UI thread the change will be 9244 /// applied immediately. Otherwise, the change will be applied asynchronously 9245 /// on the UI thread. 9246 /// 9247 extern(System) void function (cef_browser_host_t* self, double zoomLevel) nothrow set_zoom_level; 9248 9249 /// 9250 /// Call to run a file chooser dialog. Only a single file chooser dialog may 9251 /// be pending at any given time. |mode| represents the type of dialog to 9252 /// display. |title| to the title to be used for the dialog and may be NULL to 9253 /// show the default title ("Open" or "Save" depending on the mode). 9254 /// |default_file_path| is the path with optional directory and/or file name 9255 /// component that will be initially selected in the dialog. |accept_filters| 9256 /// are used to restrict the selectable file types and may any combination of 9257 /// (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b) 9258 /// individual file extensions (e.g. ".txt" or ".png"), or (c) combined 9259 /// description and file extension delimited using "|" and ";" (e.g. "Image 9260 /// Types|.png;.gif;.jpg"). |callback| will be executed after the dialog is 9261 /// dismissed or immediately if another dialog is already pending. The dialog 9262 /// will be initiated asynchronously on the UI thread. 9263 /// 9264 extern(System) void function ( 9265 cef_browser_host_t* self, 9266 cef_file_dialog_mode_t mode, 9267 const(cef_string_t)* title, 9268 const(cef_string_t)* default_file_path, 9269 cef_string_list_t accept_filters, 9270 cef_run_file_dialog_callback_t* callback) nothrow run_file_dialog; 9271 9272 /// 9273 /// Download the file at |url| using cef_download_handler_t. 9274 /// 9275 extern(System) void function ( 9276 cef_browser_host_t* self, 9277 const(cef_string_t)* url) nothrow start_download; 9278 9279 /// 9280 /// Download |image_url| and execute |callback| on completion with the images 9281 /// received from the renderer. If |is_favicon| is true (1) then cookies are 9282 /// not sent and not accepted during download. Images with density independent 9283 /// pixel (DIP) sizes larger than |max_image_size| are filtered out from the 9284 /// image results. Versions of the image at different scale factors may be 9285 /// downloaded up to the maximum scale factor supported by the system. If 9286 /// there are no image results <= |max_image_size| then the smallest image is 9287 /// resized to |max_image_size| and is the only result. A |max_image_size| of 9288 /// 0 means unlimited. If |bypass_cache| is true (1) then |image_url| is 9289 /// requested from the server even if it is present in the browser cache. 9290 /// 9291 extern(System) void function ( 9292 cef_browser_host_t* self, 9293 const(cef_string_t)* image_url, 9294 int is_favicon, 9295 uint max_image_size, 9296 int bypass_cache, 9297 cef_download_image_callback_t* callback) nothrow download_image; 9298 9299 /// 9300 /// Print the current browser contents. 9301 /// 9302 extern(System) void function (cef_browser_host_t* self) nothrow print; 9303 9304 /// 9305 /// Print the current browser contents to the PDF file specified by |path| and 9306 /// execute |callback| on completion. The caller is responsible for deleting 9307 /// |path| when done. For PDF printing to work on Linux you must implement the 9308 /// cef_print_handler_t::GetPdfPaperSize function. 9309 /// 9310 extern(System) void function ( 9311 cef_browser_host_t* self, 9312 const(cef_string_t)* path, 9313 const(cef_pdf_print_settings_t)* settings, 9314 cef_pdf_print_callback_t* callback) nothrow print_to_pdf; 9315 9316 /// 9317 /// Search for |searchText|. |forward| indicates whether to search forward or 9318 /// backward within the page. |matchCase| indicates whether the search should 9319 /// be case-sensitive. |findNext| indicates whether this is the first request 9320 /// or a follow-up. The search will be restarted if |searchText| or 9321 /// |matchCase| change. The search will be stopped if |searchText| is NULL. 9322 /// The cef_find_handler_t instance, if any, returned via 9323 /// cef_client_t::GetFindHandler will be called to report find results. 9324 /// 9325 extern(System) void function ( 9326 cef_browser_host_t* self, 9327 const(cef_string_t)* searchText, 9328 int forward, 9329 int matchCase, 9330 int findNext) nothrow find; 9331 9332 /// 9333 /// Cancel all searches that are currently going on. 9334 /// 9335 extern(System) void function (cef_browser_host_t* self, int clearSelection) nothrow stop_finding; 9336 9337 /// 9338 /// Open developer tools (DevTools) in its own browser. The DevTools browser 9339 /// will remain associated with this browser. If the DevTools browser is 9340 /// already open then it will be focused, in which case the |windowInfo|, 9341 /// |client| and |settings| parameters will be ignored. If 9342 /// |inspect_element_at| is non-NULL then the element at the specified (x,y) 9343 /// location will be inspected. The |windowInfo| parameter will be ignored if 9344 /// this browser is wrapped in a cef_browser_view_t. 9345 /// 9346 extern(System) void function ( 9347 cef_browser_host_t* self, 9348 const(cef_window_info_t)* windowInfo, 9349 cef_client_t* client, 9350 const(cef_browser_settings_t)* settings, 9351 const(cef_point_t)* inspect_element_at) nothrow show_dev_tools; 9352 9353 /// 9354 /// Explicitly close the associated DevTools browser, if any. 9355 /// 9356 extern(System) void function (cef_browser_host_t* self) nothrow close_dev_tools; 9357 9358 /// 9359 /// Returns true (1) if this browser currently has an associated DevTools 9360 /// browser. Must be called on the browser process UI thread. 9361 /// 9362 extern(System) int function (cef_browser_host_t* self) nothrow has_dev_tools; 9363 9364 /// 9365 /// Send a function call message over the DevTools protocol. |message| must be 9366 /// a UTF8-encoded JSON dictionary that contains "id" (int), "function" 9367 /// (string) and "params" (dictionary, optional) values. See the DevTools 9368 /// protocol documentation at https://chromedevtools.github.io/devtools- 9369 /// protocol/ for details of supported functions and the expected "params" 9370 /// dictionary contents. |message| will be copied if necessary. This function 9371 /// will return true (1) if called on the UI thread and the message was 9372 /// successfully submitted for validation, otherwise false (0). Validation 9373 /// will be applied asynchronously and any messages that fail due to 9374 /// formatting errors or missing parameters may be discarded without 9375 /// notification. Prefer ExecuteDevToolsMethod if a more structured approach 9376 /// to message formatting is desired. 9377 /// 9378 /// Every valid function call will result in an asynchronous function result 9379 /// or error message that references the sent message "id". Event messages are 9380 /// received while notifications are enabled (for example, between function 9381 /// calls for "Page.enable" and "Page.disable"). All received messages will be 9382 /// delivered to the observer(s) registered with AddDevToolsMessageObserver. 9383 /// See cef_dev_tools_message_observer_t::OnDevToolsMessage documentation for 9384 /// details of received message contents. 9385 /// 9386 /// Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and 9387 /// AddDevToolsMessageObserver functions does not require an active DevTools 9388 /// front-end or remote-debugging session. Other active DevTools sessions will 9389 /// continue to function independently. However, any modification of global 9390 /// browser state by one session may not be reflected in the UI of other 9391 /// sessions. 9392 /// 9393 /// Communication with the DevTools front-end (when displayed) can be logged 9394 /// for development purposes by passing the `--devtools-protocol-log- 9395 /// file=<path>` command-line flag. 9396 /// 9397 extern(System) int function ( 9398 cef_browser_host_t* self, 9399 const(void)* message, 9400 size_t message_size) nothrow send_dev_tools_message; 9401 9402 /// 9403 /// Execute a function call over the DevTools protocol. This is a more 9404 /// structured version of SendDevToolsMessage. |message_id| is an incremental 9405 /// number that uniquely identifies the message (pass 0 to have the next 9406 /// number assigned automatically based on previous values). |function| is the 9407 /// function name. |params| are the function parameters, which may be NULL. 9408 /// See the DevTools protocol documentation (linked above) for details of 9409 /// supported functions and the expected |params| dictionary contents. This 9410 /// function will return the assigned message ID if called on the UI thread 9411 /// and the message was successfully submitted for validation, otherwise 0. 9412 /// See the SendDevToolsMessage documentation for additional usage 9413 /// information. 9414 /// 9415 extern(System) int function ( 9416 cef_browser_host_t* self, 9417 int message_id, 9418 const(cef_string_t)* method, 9419 cef_dictionary_value_t* params) nothrow execute_dev_tools_method; 9420 9421 /// 9422 /// Add an observer for DevTools protocol messages (function results and 9423 /// events). The observer will remain registered until the returned 9424 /// Registration object is destroyed. See the SendDevToolsMessage 9425 /// documentation for additional usage information. 9426 /// 9427 extern(System) cef_registration_t* function ( 9428 cef_browser_host_t* self, 9429 cef_dev_tools_message_observer_t* observer) nothrow add_dev_tools_message_observer; 9430 9431 /// 9432 /// Retrieve a snapshot of current navigation entries as values sent to the 9433 /// specified visitor. If |current_only| is true (1) only the current 9434 /// navigation entry will be sent, otherwise all navigation entries will be 9435 /// sent. 9436 /// 9437 extern(System) void function ( 9438 cef_browser_host_t* self, 9439 cef_navigation_entry_visitor_t* visitor, 9440 int current_only) nothrow get_navigation_entries; 9441 9442 /// 9443 /// If a misspelled word is currently selected in an editable node calling 9444 /// this function will replace it with the specified |word|. 9445 /// 9446 extern(System) void function ( 9447 cef_browser_host_t* self, 9448 const(cef_string_t)* word) nothrow replace_misspelling; 9449 9450 /// 9451 /// Add the specified |word| to the spelling dictionary. 9452 /// 9453 extern(System) void function ( 9454 cef_browser_host_t* self, 9455 const(cef_string_t)* word) nothrow add_word_to_dictionary; 9456 9457 /// 9458 /// Returns true (1) if window rendering is disabled. 9459 /// 9460 extern(System) int function (cef_browser_host_t* self) nothrow is_window_rendering_disabled; 9461 9462 /// 9463 /// Notify the browser that the widget has been resized. The browser will 9464 /// first call cef_render_handler_t::GetViewRect to get the new size and then 9465 /// call cef_render_handler_t::OnPaint asynchronously with the updated 9466 /// regions. This function is only used when window rendering is disabled. 9467 /// 9468 extern(System) void function (cef_browser_host_t* self) nothrow was_resized; 9469 9470 /// 9471 /// Notify the browser that it has been hidden or shown. Layouting and 9472 /// cef_render_handler_t::OnPaint notification will stop when the browser is 9473 /// hidden. This function is only used when window rendering is disabled. 9474 /// 9475 extern(System) void function (cef_browser_host_t* self, int hidden) nothrow was_hidden; 9476 9477 /// 9478 /// Notify the browser that screen information has changed. Updated 9479 /// information will be sent to the renderer process to configure screen size 9480 /// and position values used by CSS and JavaScript (window.deviceScaleFactor, 9481 /// window.screenX/Y, window.outerWidth/Height, etc.). For background see 9482 /// https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown- 9483 /// header-coordinate-systems 9484 /// 9485 /// This function is used with (a) windowless rendering and (b) windowed 9486 /// rendering with external (client-provided) root window. 9487 /// 9488 /// With windowless rendering the browser will call 9489 /// cef_render_handler_t::GetScreenInfo, 9490 /// cef_render_handler_t::GetRootScreenRect and 9491 /// cef_render_handler_t::GetViewRect. This simulates moving or resizing the 9492 /// root window in the current display, moving the root window from one 9493 /// display to another, or changing the properties of the current display. 9494 /// 9495 /// With windowed rendering the browser will call 9496 /// cef_display_handler_t::GetRootWindowScreenRect and use the associated 9497 /// display properties. 9498 /// 9499 extern(System) void function (cef_browser_host_t* self) nothrow notify_screen_info_changed; 9500 9501 /// 9502 /// Invalidate the view. The browser will call cef_render_handler_t::OnPaint 9503 /// asynchronously. This function is only used when window rendering is 9504 /// disabled. 9505 /// 9506 extern(System) void function ( 9507 cef_browser_host_t* self, 9508 cef_paint_element_type_t type) nothrow invalidate; 9509 9510 /// 9511 /// Issue a BeginFrame request to Chromium. Only valid when 9512 /// cef_window_tInfo::external_begin_frame_enabled is set to true (1). 9513 /// 9514 extern(System) void function (cef_browser_host_t* self) nothrow send_external_begin_frame; 9515 9516 /// 9517 /// Send a key event to the browser. 9518 /// 9519 extern(System) void function ( 9520 cef_browser_host_t* self, 9521 const(cef_key_event_t)* event) nothrow send_key_event; 9522 9523 /// 9524 /// Send a mouse click event to the browser. The |x| and |y| coordinates are 9525 /// relative to the upper-left corner of the view. 9526 /// 9527 extern(System) void function ( 9528 cef_browser_host_t* self, 9529 const(cef_mouse_event_t)* event, 9530 cef_mouse_button_type_t type, 9531 int mouseUp, 9532 int clickCount) nothrow send_mouse_click_event; 9533 9534 /// 9535 /// Send a mouse move event to the browser. The |x| and |y| coordinates are 9536 /// relative to the upper-left corner of the view. 9537 /// 9538 extern(System) void function ( 9539 cef_browser_host_t* self, 9540 const(cef_mouse_event_t)* event, 9541 int mouseLeave) nothrow send_mouse_move_event; 9542 9543 /// 9544 /// Send a mouse wheel event to the browser. The |x| and |y| coordinates are 9545 /// relative to the upper-left corner of the view. The |deltaX| and |deltaY| 9546 /// values represent the movement delta in the X and Y directions 9547 /// respectively. In order to scroll inside select popups with window 9548 /// rendering disabled cef_render_handler_t::GetScreenPoint should be 9549 /// implemented properly. 9550 /// 9551 extern(System) void function ( 9552 cef_browser_host_t* self, 9553 const(cef_mouse_event_t)* event, 9554 int deltaX, 9555 int deltaY) nothrow send_mouse_wheel_event; 9556 9557 /// 9558 /// Send a touch event to the browser for a windowless browser. 9559 /// 9560 extern(System) void function ( 9561 cef_browser_host_t* self, 9562 const(cef_touch_event_t)* event) nothrow send_touch_event; 9563 9564 /// 9565 /// Send a capture lost event to the browser. 9566 /// 9567 extern(System) void function (cef_browser_host_t* self) nothrow send_capture_lost_event; 9568 9569 /// 9570 /// Notify the browser that the window hosting it is about to be moved or 9571 /// resized. This function is only used on Windows and Linux. 9572 /// 9573 extern(System) void function (cef_browser_host_t* self) nothrow notify_move_or_resize_started; 9574 9575 /// 9576 /// Returns the maximum rate in frames per second (fps) that 9577 /// cef_render_handler_t::OnPaint will be called for a windowless browser. The 9578 /// actual fps may be lower if the browser cannot generate frames at the 9579 /// requested rate. The minimum value is 1 and the default value is 30. This 9580 /// function can only be called on the UI thread. 9581 /// 9582 extern(System) int function (cef_browser_host_t* self) nothrow get_windowless_frame_rate; 9583 9584 /// 9585 /// Set the maximum rate in frames per second (fps) that 9586 /// cef_render_handler_t:: OnPaint will be called for a windowless browser. 9587 /// The actual fps may be lower if the browser cannot generate frames at the 9588 /// requested rate. The minimum value is 1 and the default value is 30. Can 9589 /// also be set at browser creation via 9590 /// cef_browser_tSettings.windowless_frame_rate. 9591 /// 9592 extern(System) void function ( 9593 cef_browser_host_t* self, 9594 int frame_rate) nothrow set_windowless_frame_rate; 9595 9596 /// 9597 /// Begins a new composition or updates the existing composition. Blink has a 9598 /// special node (a composition node) that allows the input function to change 9599 /// text without affecting other DOM nodes. |text| is the optional text that 9600 /// will be inserted into the composition node. |underlines| is an optional 9601 /// set of ranges that will be underlined in the resulting text. 9602 /// |replacement_range| is an optional range of the existing text that will be 9603 /// replaced. |selection_range| is an optional range of the resulting text 9604 /// that will be selected after insertion or replacement. The 9605 /// |replacement_range| value is only used on OS X. 9606 /// 9607 /// This function may be called multiple times as the composition changes. 9608 /// When the client is done making changes the composition should either be 9609 /// canceled or completed. To cancel the composition call 9610 /// ImeCancelComposition. To complete the composition call either 9611 /// ImeCommitText or ImeFinishComposingText. Completion is usually signaled 9612 /// when: 9613 /// 9614 /// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR 9615 /// flag (on Windows), or; 9616 /// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or; 9617 /// 3. insertText of NSTextInput is called (on Mac). 9618 /// 9619 /// This function is only used when window rendering is disabled. 9620 /// 9621 extern(System) void function ( 9622 cef_browser_host_t* self, 9623 const(cef_string_t)* text, 9624 size_t underlinesCount, 9625 const(cef_composition_underline_t)* underlines, 9626 const(cef_range_t)* replacement_range, 9627 const(cef_range_t)* selection_range) nothrow ime_set_composition; 9628 9629 /// 9630 /// Completes the existing composition by optionally inserting the specified 9631 /// |text| into the composition node. |replacement_range| is an optional range 9632 /// of the existing text that will be replaced. |relative_cursor_pos| is where 9633 /// the cursor will be positioned relative to the current cursor position. See 9634 /// comments on ImeSetComposition for usage. The |replacement_range| and 9635 /// |relative_cursor_pos| values are only used on OS X. This function is only 9636 /// used when window rendering is disabled. 9637 /// 9638 extern(System) void function ( 9639 cef_browser_host_t* self, 9640 const(cef_string_t)* text, 9641 const(cef_range_t)* replacement_range, 9642 int relative_cursor_pos) nothrow ime_commit_text; 9643 9644 /// 9645 /// Completes the existing composition by applying the current composition 9646 /// node contents. If |keep_selection| is false (0) the current selection, if 9647 /// any, will be discarded. See comments on ImeSetComposition for usage. This 9648 /// function is only used when window rendering is disabled. 9649 /// 9650 extern(System) void function ( 9651 cef_browser_host_t* self, 9652 int keep_selection) nothrow ime_finish_composing_text; 9653 9654 /// 9655 /// Cancels the existing composition and discards the composition node 9656 /// contents without applying them. See comments on ImeSetComposition for 9657 /// usage. This function is only used when window rendering is disabled. 9658 /// 9659 extern(System) void function (cef_browser_host_t* self) nothrow ime_cancel_composition; 9660 9661 /// 9662 /// Call this function when the user drags the mouse into the web view (before 9663 /// calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data| 9664 /// should not contain file contents as this type of data is not allowed to be 9665 /// dragged into the web view. File contents can be removed using 9666 /// cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from 9667 /// cef_render_handler_t::StartDragging). This function is only used when 9668 /// window rendering is disabled. 9669 /// 9670 extern(System) void function ( 9671 cef_browser_host_t* self, 9672 cef_drag_data_t* drag_data, 9673 const(cef_mouse_event_t)* event, 9674 cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_enter; 9675 9676 /// 9677 /// Call this function each time the mouse is moved across the web view during 9678 /// a drag operation (after calling DragTargetDragEnter and before calling 9679 /// DragTargetDragLeave/DragTargetDrop). This function is only used when 9680 /// window rendering is disabled. 9681 /// 9682 extern(System) void function ( 9683 cef_browser_host_t* self, 9684 const(cef_mouse_event_t)* event, 9685 cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_over; 9686 9687 /// 9688 /// Call this function when the user drags the mouse out of the web view 9689 /// (after calling DragTargetDragEnter). This function is only used when 9690 /// window rendering is disabled. 9691 /// 9692 extern(System) void function (cef_browser_host_t* self) nothrow drag_target_drag_leave; 9693 9694 /// 9695 /// Call this function when the user completes the drag operation by dropping 9696 /// the object onto the web view (after calling DragTargetDragEnter). The 9697 /// object being dropped is |drag_data|, given as an argument to the previous 9698 /// DragTargetDragEnter call. This function is only used when window rendering 9699 /// is disabled. 9700 /// 9701 extern(System) void function ( 9702 cef_browser_host_t* self, 9703 const(cef_mouse_event_t)* event) nothrow drag_target_drop; 9704 9705 /// 9706 /// Call this function when the drag operation started by a 9707 /// cef_render_handler_t::StartDragging call has ended either in a drop or by 9708 /// being cancelled. |x| and |y| are mouse coordinates relative to the upper- 9709 /// left corner of the view. If the web view is both the drag source and the 9710 /// drag target then all DragTarget* functions should be called before 9711 /// DragSource* mthods. This function is only used when window rendering is 9712 /// disabled. 9713 /// 9714 extern(System) void function ( 9715 cef_browser_host_t* self, 9716 int x, 9717 int y, 9718 cef_drag_operations_mask_t op) nothrow drag_source_ended_at; 9719 9720 /// 9721 /// Call this function when the drag operation started by a 9722 /// cef_render_handler_t::StartDragging call has completed. This function may 9723 /// be called immediately without first calling DragSourceEndedAt to cancel a 9724 /// drag operation. If the web view is both the drag source and the drag 9725 /// target then all DragTarget* functions should be called before DragSource* 9726 /// mthods. This function is only used when window rendering is disabled. 9727 /// 9728 extern(System) void function (cef_browser_host_t* self) nothrow drag_source_system_drag_ended; 9729 9730 /// 9731 /// Returns the current visible navigation entry for this browser. This 9732 /// function can only be called on the UI thread. 9733 /// 9734 extern(System) cef_navigation_entry_t* function ( 9735 cef_browser_host_t* self) nothrow get_visible_navigation_entry; 9736 9737 /// 9738 /// Set accessibility state for all frames. |accessibility_state| may be 9739 /// default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT 9740 /// then accessibility will be disabled by default and the state may be 9741 /// further controlled with the "force-renderer-accessibility" and "disable- 9742 /// renderer-accessibility" command-line switches. If |accessibility_state| is 9743 /// STATE_ENABLED then accessibility will be enabled. If |accessibility_state| 9744 /// is STATE_DISABLED then accessibility will be completely disabled. 9745 /// 9746 /// For windowed browsers accessibility will be enabled in Complete mode 9747 /// (which corresponds to kAccessibilityModeComplete in Chromium). In this 9748 /// mode all platform accessibility objects will be created and managed by 9749 /// Chromium's internal implementation. The client needs only to detect the 9750 /// screen reader and call this function appropriately. For example, on macOS 9751 /// the client can handle the @"AXEnhancedUserStructure" accessibility 9752 /// attribute to detect VoiceOver state changes and on Windows the client can 9753 /// handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers. 9754 /// 9755 /// For windowless browsers accessibility will be enabled in TreeOnly mode 9756 /// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In 9757 /// this mode renderer accessibility is enabled, the full tree is computed, 9758 /// and events are passed to CefAccessibiltyHandler, but platform 9759 /// accessibility objects are not created. The client may implement platform 9760 /// accessibility objects using CefAccessibiltyHandler callbacks if desired. 9761 /// 9762 extern(System) void function ( 9763 cef_browser_host_t* self, 9764 cef_state_t accessibility_state) nothrow set_accessibility_state; 9765 9766 /// 9767 /// Enable notifications of auto resize via 9768 /// cef_display_handler_t::OnAutoResize. Notifications are disabled by 9769 /// default. |min_size| and |max_size| define the range of allowed sizes. 9770 /// 9771 extern(System) void function ( 9772 cef_browser_host_t* self, 9773 int enabled, 9774 const(cef_size_t)* min_size, 9775 const(cef_size_t)* max_size) nothrow set_auto_resize_enabled; 9776 9777 /// 9778 /// Set whether the browser's audio is muted. 9779 /// 9780 extern(System) void function (cef_browser_host_t* self, int mute) nothrow set_audio_muted; 9781 9782 /// 9783 /// Returns true (1) if the browser's audio is muted. This function can only 9784 /// be called on the UI thread. 9785 /// 9786 extern(System) int function (cef_browser_host_t* self) nothrow is_audio_muted; 9787 9788 /// 9789 /// Returns true (1) if the renderer is currently in browser fullscreen. This 9790 /// differs from window fullscreen in that browser fullscreen is entered using 9791 /// the JavaScript Fullscreen API and modifies CSS attributes such as the 9792 /// ::backdrop pseudo-element and :fullscreen pseudo-structure. This function 9793 /// can only be called on the UI thread. 9794 /// 9795 extern(System) int function (cef_browser_host_t* self) nothrow is_fullscreen; 9796 9797 /// 9798 /// Requests the renderer to exit browser fullscreen. In most cases exiting 9799 /// window fullscreen should also exit browser fullscreen. With Alloy style 9800 /// this function should be called in response to a user action such as 9801 /// clicking the green traffic light button on MacOS 9802 /// (cef_window_delegate_t::OnWindowFullscreenTransition callback) or pressing 9803 /// the "ESC" key (cef_keyboard_handler_t::OnPreKeyEvent callback). With 9804 /// Chrome style these standard exit actions are handled internally but 9805 /// new/additional user actions can use this function. Set |will_cause_resize| 9806 /// to true (1) if exiting browser fullscreen will cause a view resize. 9807 /// 9808 extern(System) void function ( 9809 cef_browser_host_t* self, 9810 int will_cause_resize) nothrow exit_fullscreen; 9811 9812 /// 9813 /// Returns true (1) if a Chrome command is supported and enabled. Use the 9814 /// cef_id_for_command_id_name() function for version-safe mapping of command 9815 /// IDC names from cef_command_ids.h to version-specific numerical 9816 /// |command_id| values. This function can only be called on the UI thread. 9817 /// Only used with Chrome style. 9818 /// 9819 extern(System) int function ( 9820 cef_browser_host_t* self, 9821 int command_id) nothrow can_execute_chrome_command; 9822 9823 /// 9824 /// Execute a Chrome command. Use the cef_id_for_command_id_name() function 9825 /// for version-safe mapping of command IDC names from cef_command_ids.h to 9826 /// version-specific numerical |command_id| values. |disposition| provides 9827 /// information about the intended command target. Only used with Chrome 9828 /// style. 9829 /// 9830 extern(System) void function ( 9831 cef_browser_host_t* self, 9832 int command_id, 9833 cef_window_open_disposition_t disposition) nothrow execute_chrome_command; 9834 9835 /// 9836 /// Returns true (1) if the render process associated with this browser is 9837 /// currently unresponsive as indicated by a lack of input event processing 9838 /// for at least 15 seconds. To receive associated state change notifications 9839 /// and optionally handle an unresponsive render process implement 9840 /// cef_request_handler_t::OnRenderProcessUnresponsive. This function can only 9841 /// be called on the UI thread. 9842 /// 9843 extern(System) int function (cef_browser_host_t* self) nothrow is_render_process_unresponsive; 9844 9845 /// 9846 /// Returns the runtime style for this browser (ALLOY or CHROME). See 9847 /// cef_runtime_style_t documentation for details. 9848 /// 9849 extern(System) cef_runtime_style_t function (cef_browser_host_t* self) nothrow get_runtime_style; 9850 } 9851 9852 9853 9854 /// 9855 /// Create a new browser using the window parameters specified by |windowInfo|. 9856 /// All values will be copied internally and the actual window (if any) will be 9857 /// created on the UI thread. If |request_context| is NULL the global request 9858 /// context will be used. This function can be called on any browser process 9859 /// thread and will not block. The optional |extra_info| parameter provides an 9860 /// opportunity to specify extra information specific to the created browser 9861 /// that will be passed to cef_render_process_handler_t::on_browser_created() in 9862 /// the render process. 9863 /// 9864 int cef_browser_host_create_browser ( 9865 const(cef_window_info_t)* windowInfo, 9866 cef_client_t* client, 9867 const(cef_string_t)* url, 9868 const(cef_browser_settings_t)* settings, 9869 cef_dictionary_value_t* extra_info, 9870 cef_request_context_t* request_context); 9871 9872 /// 9873 /// Create a new browser using the window parameters specified by |windowInfo|. 9874 /// If |request_context| is NULL the global request context will be used. This 9875 /// function can only be called on the browser process UI thread. The optional 9876 /// |extra_info| parameter provides an opportunity to specify extra information 9877 /// specific to the created browser that will be passed to 9878 /// cef_render_process_handler_t::on_browser_created() in the render process. 9879 /// 9880 cef_browser_t* cef_browser_host_create_browser_sync ( 9881 const(cef_window_info_t)* windowInfo, 9882 cef_client_t* client, 9883 const(cef_string_t)* url, 9884 const(cef_browser_settings_t)* settings, 9885 cef_dictionary_value_t* extra_info, 9886 cef_request_context_t* request_context); 9887 9888 /// 9889 /// Returns the browser (if any) with the specified identifier. 9890 /// 9891 cef_browser_t* cef_browser_host_get_browser_by_identifier (int browser_id); 9892 9893 // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ 9894 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 9895 // 9896 // Redistribution and use in source and binary forms, with or without 9897 // modification, are permitted provided that the following conditions are 9898 // met: 9899 // 9900 // * Redistributions of source code must retain the above copyright 9901 // notice, this list of conditions and the following disclaimer. 9902 // * Redistributions in binary form must reproduce the above 9903 // copyright notice, this list of conditions and the following disclaimer 9904 // in the documentation and/or other materials provided with the 9905 // distribution. 9906 // * Neither the name of Google Inc. nor the name Chromium Embedded 9907 // Framework nor the names of its contributors may be used to endorse 9908 // or promote products derived from this software without specific prior 9909 // written permission. 9910 // 9911 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9912 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9913 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9914 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9915 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9916 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9917 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9918 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9919 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9920 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9921 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9922 // 9923 // --------------------------------------------------------------------------- 9924 // 9925 // This file was generated by the CEF translator tool and should not edited 9926 // by hand. See the translator.README.txt file in the tools directory for 9927 // more information. 9928 // 9929 // $hash=75439e8ba353162c029448b1f7ed536e3d20598a$ 9930 // 9931 9932 extern (C): 9933 9934 /// 9935 /// Structure used to implement browser process callbacks. The functions of this 9936 /// structure will be called on the browser process main thread unless otherwise 9937 /// indicated. 9938 /// 9939 /// NOTE: This struct is allocated client-side. 9940 /// 9941 struct cef_browser_process_handler_t 9942 { 9943 /// 9944 /// Base structure. 9945 /// 9946 9947 /// 9948 /// Provides an opportunity to register custom preferences prior to global and 9949 /// request context initialization. 9950 /// 9951 /// If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be 9952 /// accessed via cef_preference_manager_t::GetGlobalPreferences after 9953 9954 cef_base_ref_counted_t base; /// OnContextInitialized is called. Global preferences are registered a single 9955 /// time at application startup. See related cef_settings_t.cache_path 9956 /// configuration. 9957 /// 9958 /// If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be 9959 /// accessed via the cef_request_context_t after 9960 /// cef_request_context_handler_t::OnRequestContextInitialized is called. 9961 /// Request context preferences are registered each time a new 9962 /// cef_request_context_t is created. It is intended but not required that all 9963 /// request contexts have the same registered preferences. See related 9964 /// cef_request_context_settings_t.cache_path configuration. 9965 /// 9966 /// Do not keep a reference to the |registrar| object. This function is called 9967 /// on the browser process UI thread. 9968 /// 9969 extern(System) void function ( 9970 cef_browser_process_handler_t* self, 9971 cef_preferences_type_t type, 9972 cef_preference_registrar_t* registrar) nothrow on_register_custom_preferences; 9973 9974 /// 9975 /// Called on the browser process UI thread immediately after the CEF context 9976 /// has been initialized. 9977 /// 9978 extern(System) void function ( 9979 cef_browser_process_handler_t* self) nothrow on_context_initialized; 9980 9981 /// 9982 /// Called before a child process is launched. Will be called on the browser 9983 /// process UI thread when launching a render process and on the browser 9984 /// process IO thread when launching a GPU process. Provides an opportunity to 9985 /// modify the child process command line. Do not keep a reference to 9986 /// |command_line| outside of this function. 9987 /// 9988 extern(System) void function ( 9989 cef_browser_process_handler_t* self, 9990 cef_command_line_t* command_line) nothrow on_before_child_process_launch; 9991 9992 /// 9993 /// Implement this function to provide app-specific behavior when an already 9994 /// running app is relaunched with the same CefSettings.root_cache_path value. 9995 /// For example, activate an existing app window or create a new app window. 9996 /// |command_line| will be read-only. Do not keep a reference to 9997 /// |command_line| outside of this function. Return true (1) if the relaunch 9998 /// is handled or false (0) for default relaunch behavior. Default behavior 9999 /// will create a new default styled Chrome window. 10000 /// 10001 /// To avoid cache corruption only a single app instance is allowed to run for 10002 /// a given CefSettings.root_cache_path value. On relaunch the app checks a 10003 /// process singleton lock and then forwards the new launch arguments to the 10004 /// already running app process before exiting early. Client apps should 10005 /// therefore check the cef_initialize() return value for early exit before 10006 /// proceeding. 10007 /// 10008 /// This function will be called on the browser process UI thread. 10009 /// 10010 extern(System) int function ( 10011 cef_browser_process_handler_t* self, 10012 cef_command_line_t* command_line, 10013 const(cef_string_t)* current_directory) nothrow on_already_running_app_relaunch; 10014 10015 /// 10016 /// Called from any thread when work has been scheduled for the browser 10017 /// process main (UI) thread. This callback is used in combination with 10018 /// cef_settings_t.external_message_pump and cef_do_message_loop_work() in 10019 /// cases where the CEF message loop must be integrated into an existing 10020 /// application message loop (see additional comments and warnings on 10021 /// CefDoMessageLoopWork). This callback should schedule a 10022 /// cef_do_message_loop_work() call to happen on the main (UI) thread. 10023 /// |delay_ms| is the requested delay in milliseconds. If |delay_ms| is <= 0 10024 /// then the call should happen reasonably soon. If |delay_ms| is > 0 then the 10025 /// call should be scheduled to happen after the specified delay and any 10026 /// currently pending scheduled call should be cancelled. 10027 /// 10028 extern(System) void function ( 10029 cef_browser_process_handler_t* self, 10030 long delay_ms) nothrow on_schedule_message_pump_work; 10031 10032 /// 10033 /// Return the default client for use with a newly created browser window 10034 /// (cef_browser_t object). If null is returned the cef_browser_t will be 10035 /// unmanaged (no callbacks will be executed for that cef_browser_t) and 10036 /// application shutdown will be blocked until the browser window is closed 10037 /// manually. This function is currently only used with Chrome style when 10038 /// creating new browser windows via Chrome UI. 10039 /// 10040 extern(System) cef_client_t* function ( 10041 cef_browser_process_handler_t* self) nothrow get_default_client; 10042 10043 /// 10044 /// Return the default handler for use with a new user or incognito profile 10045 /// (cef_request_context_t object). If null is returned the 10046 /// cef_request_context_t will be unmanaged (no callbacks will be executed for 10047 /// that cef_request_context_t). This function is currently only used with 10048 /// Chrome style when creating new browser windows via Chrome UI. 10049 /// 10050 extern(System) cef_request_context_handler_t* function ( 10051 cef_browser_process_handler_t* self) nothrow get_default_request_context_handler; 10052 } 10053 10054 10055 10056 // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ 10057 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 10058 // 10059 // Redistribution and use in source and binary forms, with or without 10060 // modification, are permitted provided that the following conditions are 10061 // met: 10062 // 10063 // * Redistributions of source code must retain the above copyright 10064 // notice, this list of conditions and the following disclaimer. 10065 // * Redistributions in binary form must reproduce the above 10066 // copyright notice, this list of conditions and the following disclaimer 10067 // in the documentation and/or other materials provided with the 10068 // distribution. 10069 // * Neither the name of Google Inc. nor the name Chromium Embedded 10070 // Framework nor the names of its contributors may be used to endorse 10071 // or promote products derived from this software without specific prior 10072 // written permission. 10073 // 10074 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10075 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10076 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10077 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10078 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10079 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10080 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10081 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10082 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10083 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10084 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10085 // 10086 // --------------------------------------------------------------------------- 10087 // 10088 // This file was generated by the CEF translator tool and should not edited 10089 // by hand. See the translator.README.txt file in the tools directory for 10090 // more information. 10091 // 10092 // $hash=ba91cbebd3f8dda1131713c51cd4621069939589$ 10093 // 10094 10095 extern (C): 10096 10097 /// 10098 /// Generic callback structure used for asynchronous continuation. 10099 /// 10100 /// NOTE: This struct is allocated DLL-side. 10101 /// 10102 struct cef_callback_t 10103 { 10104 /// 10105 /// Base structure. 10106 /// 10107 10108 /// 10109 /// Continue processing. 10110 /// 10111 10112 /// 10113 /// Cancel processing. 10114 /// 10115 10116 /// 10117 /// Generic callback structure used for asynchronous completion. 10118 /// 10119 /// NOTE: This struct is allocated client-side. 10120 /// 10121 10122 /// 10123 /// Base structure. 10124 /// 10125 10126 /// 10127 /// Method that will be called once the task is complete. 10128 /// 10129 10130 cef_base_ref_counted_t base; 10131 extern(System) void function (cef_callback_t* self) nothrow cont; 10132 extern(System) void function (cef_callback_t* self) nothrow cancel; 10133 } 10134 10135 10136 10137 struct cef_completion_callback_t 10138 { 10139 cef_base_ref_counted_t base; 10140 extern(System) void function (cef_completion_callback_t* self) nothrow on_complete; 10141 } 10142 10143 10144 10145 // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 10146 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 10147 // 10148 // Redistribution and use in source and binary forms, with or without 10149 // modification, are permitted provided that the following conditions are 10150 // met: 10151 // 10152 // * Redistributions of source code must retain the above copyright 10153 // notice, this list of conditions and the following disclaimer. 10154 // * Redistributions in binary form must reproduce the above 10155 // copyright notice, this list of conditions and the following disclaimer 10156 // in the documentation and/or other materials provided with the 10157 // distribution. 10158 // * Neither the name of Google Inc. nor the name Chromium Embedded 10159 // Framework nor the names of its contributors may be used to endorse 10160 // or promote products derived from this software without specific prior 10161 // written permission. 10162 // 10163 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10164 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10165 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10166 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10167 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10168 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10169 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10170 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10171 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10172 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10173 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10174 // 10175 // --------------------------------------------------------------------------- 10176 // 10177 // This file was generated by the CEF translator tool and should not edited 10178 // by hand. See the translator.README.txt file in the tools directory for 10179 // more information. 10180 // 10181 // $hash=89798b8a3a9a4ae14a57e81dfaad1e05a2c23639$ 10182 // 10183 10184 extern (C): 10185 10186 /// 10187 /// Implement this structure to provide handler implementations. 10188 /// 10189 /// NOTE: This struct is allocated client-side. 10190 /// 10191 struct cef_client_t 10192 { 10193 /// 10194 /// Base structure. 10195 /// 10196 10197 cef_base_ref_counted_t base; 10198 10199 /// 10200 /// Return the handler for audio rendering events. 10201 /// 10202 extern(System) cef_audio_handler_t* function (cef_client_t* self) nothrow get_audio_handler; 10203 10204 /// 10205 /// Return the handler for commands. If no handler is provided the default 10206 /// implementation will be used. 10207 /// 10208 extern(System) cef_command_handler_t* function (cef_client_t* self) nothrow get_command_handler; 10209 10210 /// 10211 /// Return the handler for context menus. If no handler is provided the 10212 /// default implementation will be used. 10213 /// 10214 extern(System) cef_context_menu_handler_t* function ( 10215 cef_client_t* self) nothrow get_context_menu_handler; 10216 10217 /// 10218 /// Return the handler for dialogs. If no handler is provided the default 10219 /// implementation will be used. 10220 /// 10221 extern(System) cef_dialog_handler_t* function (cef_client_t* self) nothrow get_dialog_handler; 10222 10223 /// 10224 /// Return the handler for browser display state events. 10225 /// 10226 extern(System) cef_display_handler_t* function (cef_client_t* self) nothrow get_display_handler; 10227 10228 /// 10229 /// Return the handler for download events. If no handler is returned 10230 /// downloads will not be allowed. 10231 /// 10232 extern(System) cef_download_handler_t* function ( 10233 cef_client_t* self) nothrow get_download_handler; 10234 10235 /// 10236 /// Return the handler for drag events. 10237 /// 10238 extern(System) cef_drag_handler_t* function (cef_client_t* self) nothrow get_drag_handler; 10239 10240 /// 10241 /// Return the handler for find result events. 10242 /// 10243 extern(System) cef_find_handler_t* function (cef_client_t* self) nothrow get_find_handler; 10244 10245 /// 10246 /// Return the handler for focus events. 10247 /// 10248 extern(System) cef_focus_handler_t* function (cef_client_t* self) nothrow get_focus_handler; 10249 10250 /// 10251 /// Return the handler for events related to cef_frame_t lifespan. This 10252 /// function will be called once during cef_browser_t creation and the result 10253 /// will be cached for performance reasons. 10254 /// 10255 extern(System) cef_frame_handler_t* function (cef_client_t* self) nothrow get_frame_handler; 10256 10257 /// 10258 /// Return the handler for permission requests. 10259 /// 10260 extern(System) cef_permission_handler_t* function ( 10261 cef_client_t* self) nothrow get_permission_handler; 10262 10263 /// 10264 /// Return the handler for JavaScript dialogs. If no handler is provided the 10265 /// default implementation will be used. 10266 /// 10267 extern(System) cef_jsdialog_handler_t* function ( 10268 cef_client_t* self) nothrow get_jsdialog_handler; 10269 10270 /// 10271 /// Return the handler for keyboard events. 10272 /// 10273 extern(System) cef_keyboard_handler_t* function ( 10274 cef_client_t* self) nothrow get_keyboard_handler; 10275 10276 /// 10277 /// Return the handler for browser life span events. 10278 /// 10279 extern(System) cef_life_span_handler_t* function ( 10280 cef_client_t* self) nothrow get_life_span_handler; 10281 10282 /// 10283 /// Return the handler for browser load status events. 10284 /// 10285 extern(System) cef_load_handler_t* function (cef_client_t* self) nothrow get_load_handler; 10286 10287 /// 10288 /// Return the handler for printing on Linux. If a print handler is not 10289 /// provided then printing will not be supported on the Linux platform. 10290 /// 10291 extern(System) cef_print_handler_t* function (cef_client_t* self) nothrow get_print_handler; 10292 10293 /// 10294 /// Return the handler for off-screen rendering events. 10295 /// 10296 extern(System) cef_render_handler_t* function (cef_client_t* self) nothrow get_render_handler; 10297 10298 /// 10299 /// Return the handler for browser request events. 10300 /// 10301 extern(System) cef_request_handler_t* function (cef_client_t* self) nothrow get_request_handler; 10302 10303 /// 10304 /// Called when a new message is received from a different process. Return 10305 /// true (1) if the message was handled or false (0) otherwise. It is safe to 10306 /// keep a reference to |message| outside of this callback. 10307 /// 10308 extern(System) int function ( 10309 cef_client_t* self, 10310 cef_browser_t* browser, 10311 cef_frame_t* frame, 10312 cef_process_id_t source_process, 10313 cef_process_message_t* message) nothrow on_process_message_received; 10314 } 10315 10316 10317 10318 // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 10319 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 10320 // 10321 // Redistribution and use in source and binary forms, with or without 10322 // modification, are permitted provided that the following conditions are 10323 // met: 10324 // 10325 // * Redistributions of source code must retain the above copyright 10326 // notice, this list of conditions and the following disclaimer. 10327 // * Redistributions in binary form must reproduce the above 10328 // copyright notice, this list of conditions and the following disclaimer 10329 // in the documentation and/or other materials provided with the 10330 // distribution. 10331 // * Neither the name of Google Inc. nor the name Chromium Embedded 10332 // Framework nor the names of its contributors may be used to endorse 10333 // or promote products derived from this software without specific prior 10334 // written permission. 10335 // 10336 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10337 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10338 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10339 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10340 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10341 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10342 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10343 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10344 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10345 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10346 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10347 // 10348 // --------------------------------------------------------------------------- 10349 // 10350 // This file was generated by the CEF translator tool and should not edited 10351 // by hand. See the translator.README.txt file in the tools directory for 10352 // more information. 10353 // 10354 // $hash=979f6d810588e94c86b94cd204f27175bd5b85aa$ 10355 // 10356 10357 extern (C): 10358 10359 /// 10360 /// Implement this structure to handle events related to commands. The functions 10361 /// of this structure will be called on the UI thread. 10362 /// 10363 /// NOTE: This struct is allocated client-side. 10364 /// 10365 struct cef_command_handler_t 10366 { 10367 /// 10368 /// Base structure. 10369 /// 10370 10371 /// 10372 /// Called to execute a Chrome command triggered via menu selection or 10373 /// keyboard shortcut. Use the cef_id_for_command_id_name() function for 10374 /// version-safe mapping of command IDC names from cef_command_ids.h to 10375 /// version-specific numerical |command_id| values. |disposition| provides 10376 /// information about the intended command target. Return true (1) if the 10377 /// command was handled or false (0) for the default implementation. For 10378 /// context menu commands this will be called after 10379 10380 cef_base_ref_counted_t base; 10381 /// cef_context_menu_handler_t::OnContextMenuCommand. Only used with Chrome 10382 /// style. 10383 /// 10384 extern(System) int function ( 10385 cef_command_handler_t* self, 10386 cef_browser_t* browser, 10387 int command_id, 10388 cef_window_open_disposition_t disposition) nothrow on_chrome_command; 10389 10390 /// 10391 /// Called to check if a Chrome app menu item should be visible. Use the 10392 /// cef_id_for_command_id_name() function for version-safe mapping of command 10393 /// IDC names from cef_command_ids.h to version-specific numerical 10394 /// |command_id| values. Only called for menu items that would be visible by 10395 /// default. Only used with Chrome style. 10396 /// 10397 extern(System) int function ( 10398 cef_command_handler_t* self, 10399 cef_browser_t* browser, 10400 int command_id) nothrow is_chrome_app_menu_item_visible; 10401 10402 /// 10403 /// Called to check if a Chrome app menu item should be enabled. Use the 10404 /// cef_id_for_command_id_name() function for version-safe mapping of command 10405 /// IDC names from cef_command_ids.h to version-specific numerical 10406 /// |command_id| values. Only called for menu items that would be enabled by 10407 /// default. Only used with Chrome style. 10408 /// 10409 extern(System) int function ( 10410 cef_command_handler_t* self, 10411 cef_browser_t* browser, 10412 int command_id) nothrow is_chrome_app_menu_item_enabled; 10413 10414 /// 10415 /// Called during browser creation to check if a Chrome page action icon 10416 /// should be visible. Only called for icons that would be visible by default. 10417 /// Only used with Chrome style. 10418 /// 10419 extern(System) int function ( 10420 cef_command_handler_t* self, 10421 cef_chrome_page_action_icon_type_t icon_type) nothrow is_chrome_page_action_icon_visible; 10422 10423 /// 10424 /// Called during browser creation to check if a Chrome toolbar button should 10425 /// be visible. Only called for buttons that would be visible by default. Only 10426 /// used with Chrome style. 10427 /// 10428 extern(System) int function ( 10429 cef_command_handler_t* self, 10430 cef_chrome_toolbar_button_type_t button_type) nothrow is_chrome_toolbar_button_visible; 10431 } 10432 10433 10434 10435 // CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_ 10436 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 10437 // 10438 // Redistribution and use in source and binary forms, with or without 10439 // modification, are permitted provided that the following conditions are 10440 // met: 10441 // 10442 // * Redistributions of source code must retain the above copyright 10443 // notice, this list of conditions and the following disclaimer. 10444 // * Redistributions in binary form must reproduce the above 10445 // copyright notice, this list of conditions and the following disclaimer 10446 // in the documentation and/or other materials provided with the 10447 // distribution. 10448 // * Neither the name of Google Inc. nor the name Chromium Embedded 10449 // Framework nor the names of its contributors may be used to endorse 10450 // or promote products derived from this software without specific prior 10451 // written permission. 10452 // 10453 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10454 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10455 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10456 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10457 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10458 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10459 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10460 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10461 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10462 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10463 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10464 // 10465 // --------------------------------------------------------------------------- 10466 // 10467 // This file was generated by the CEF translator tool and should not edited 10468 // by hand. See the translator.README.txt file in the tools directory for 10469 // more information. 10470 // 10471 // $hash=f98a12929fbf9bb6be2c784de22a56f34863255d$ 10472 // 10473 10474 extern (C): 10475 10476 /// 10477 /// Structure used to create and/or parse command line arguments. Arguments with 10478 /// "--", "-" and, on Windows, "/" prefixes are considered switches. Switches 10479 /// will always precede any arguments without switch prefixes. Switches can 10480 /// optionally have a value specified using the "=" delimiter (e.g. 10481 /// "-switch=value"). An argument of "--" will terminate switch parsing with all 10482 /// subsequent tokens, regardless of prefix, being interpreted as non-switch 10483 /// arguments. Switch names should be lowercase ASCII and will be converted to 10484 /// such if necessary. Switch values will retain the original case and UTF8 10485 /// encoding. This structure can be used before cef_initialize() is called. 10486 /// 10487 /// NOTE: This struct is allocated DLL-side. 10488 /// 10489 struct cef_command_line_t 10490 { 10491 /// 10492 /// Base structure. 10493 /// 10494 10495 cef_base_ref_counted_t base; 10496 /// 10497 /// Returns true (1) if this object is valid. Do not call any other functions 10498 /// if this function returns false (0). 10499 /// 10500 extern(System) int function (cef_command_line_t* self) nothrow is_valid; 10501 10502 /// 10503 /// Returns true (1) if the values of this object are read-only. Some APIs may 10504 /// expose read-only objects. 10505 /// 10506 extern(System) int function (cef_command_line_t* self) nothrow is_read_only; 10507 10508 /// 10509 /// Returns a writable copy of this object. 10510 /// 10511 extern(System) cef_command_line_t* function (cef_command_line_t* self) nothrow copy; 10512 10513 /// 10514 /// Initialize the command line with the specified |argc| and |argv| values. 10515 /// The first argument must be the name of the program. This function is only 10516 /// supported on non-Windows platforms. 10517 /// 10518 extern(System) void function ( 10519 cef_command_line_t* self, 10520 int argc, 10521 const(char*)* argv) nothrow init_from_argv; 10522 10523 /// 10524 /// Initialize the command line with the string returned by calling 10525 /// GetCommandLineW(). This function is only supported on Windows. 10526 /// 10527 extern(System) void function ( 10528 cef_command_line_t* self, 10529 const(cef_string_t)* command_line) nothrow init_from_string; 10530 10531 /// 10532 /// Reset the command-line switches and arguments but leave the program 10533 /// component unchanged. 10534 /// 10535 extern(System) void function (cef_command_line_t* self) nothrow reset; 10536 10537 /// 10538 /// Retrieve the original command line string as a vector of strings. The argv 10539 /// array: `{ program, [(--|-|/)switch[=value]]*, [--], [argument]* }` 10540 /// 10541 extern(System) void function (cef_command_line_t* self, cef_string_list_t argv) nothrow get_argv; 10542 10543 /// 10544 /// Constructs and returns the represented command line string. Use this 10545 /// function cautiously because quoting behavior is unclear. 10546 /// 10547 // The resulting string must be freed by calling cef_string_userfree_free(). 10548 extern(System) cef_string_userfree_t function ( 10549 cef_command_line_t* self) nothrow get_command_line_string; 10550 10551 /// 10552 /// Get the program part of the command line string (the first item). 10553 /// 10554 // The resulting string must be freed by calling cef_string_userfree_free(). 10555 extern(System) cef_string_userfree_t function (cef_command_line_t* self) nothrow get_program; 10556 10557 /// 10558 /// Set the program part of the command line string (the first item). 10559 /// 10560 extern(System) void function ( 10561 cef_command_line_t* self, 10562 const(cef_string_t)* program) nothrow set_program; 10563 10564 /// 10565 /// Returns true (1) if the command line has switches. 10566 /// 10567 extern(System) int function (cef_command_line_t* self) nothrow has_switches; 10568 10569 /// 10570 /// Returns true (1) if the command line contains the given switch. 10571 /// 10572 extern(System) int function ( 10573 cef_command_line_t* self, 10574 const(cef_string_t)* name) nothrow has_switch; 10575 10576 /// 10577 /// Returns the value associated with the given switch. If the switch has no 10578 /// value or isn't present this function returns the NULL string. 10579 /// 10580 // The resulting string must be freed by calling cef_string_userfree_free(). 10581 extern(System) cef_string_userfree_t function ( 10582 cef_command_line_t* self, 10583 const(cef_string_t)* name) nothrow get_switch_value; 10584 10585 /// 10586 /// Returns the map of switch names and values. If a switch has no value an 10587 /// NULL string is returned. 10588 /// 10589 extern(System) void function ( 10590 cef_command_line_t* self, 10591 cef_string_map_t switches) nothrow get_switches; 10592 10593 /// 10594 /// Add a switch to the end of the command line. 10595 /// 10596 extern(System) void function ( 10597 cef_command_line_t* self, 10598 const(cef_string_t)* name) nothrow append_switch; 10599 10600 /// 10601 /// Add a switch with the specified value to the end of the command line. If 10602 /// the switch has no value pass an NULL value string. 10603 /// 10604 extern(System) void function ( 10605 cef_command_line_t* self, 10606 const(cef_string_t)* name, 10607 const(cef_string_t)* value) nothrow append_switch_with_value; 10608 10609 /// 10610 /// True if there are remaining command line arguments. 10611 /// 10612 extern(System) int function (cef_command_line_t* self) nothrow has_arguments; 10613 10614 /// 10615 /// Get the remaining command line arguments. 10616 /// 10617 extern(System) void function ( 10618 cef_command_line_t* self, 10619 cef_string_list_t arguments) nothrow get_arguments; 10620 10621 /// 10622 /// Add an argument to the end of the command line. 10623 /// 10624 extern(System) void function ( 10625 cef_command_line_t* self, 10626 const(cef_string_t)* argument) nothrow append_argument; 10627 10628 /// 10629 /// Insert a command before the current command. Common for debuggers, like 10630 /// "valgrind" or "gdb --args". 10631 /// 10632 extern(System) void function ( 10633 cef_command_line_t* self, 10634 const(cef_string_t)* wrapper) nothrow prepend_wrapper; 10635 10636 /// 10637 /// Remove a switch from the command line. If no such switch is present, this 10638 /// has no effect. 10639 /// 10640 extern(System) void function ( 10641 cef_command_line_t* self, 10642 const(cef_string_t)* name) nothrow remove_switch; 10643 } 10644 10645 10646 10647 /// 10648 /// Create a new cef_command_line_t instance. 10649 /// 10650 cef_command_line_t* cef_command_line_create (); 10651 10652 /// 10653 /// Returns the singleton global cef_command_line_t object. The returned object 10654 /// will be read-only. 10655 /// 10656 cef_command_line_t* cef_command_line_get_global (); 10657 10658 // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ 10659 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 10660 // 10661 // Redistribution and use in source and binary forms, with or without 10662 // modification, are permitted provided that the following conditions are 10663 // met: 10664 // 10665 // * Redistributions of source code must retain the above copyright 10666 // notice, this list of conditions and the following disclaimer. 10667 // * Redistributions in binary form must reproduce the above 10668 // copyright notice, this list of conditions and the following disclaimer 10669 // in the documentation and/or other materials provided with the 10670 // distribution. 10671 // * Neither the name of Google Inc. nor the name Chromium Embedded 10672 // Framework nor the names of its contributors may be used to endorse 10673 // or promote products derived from this software without specific prior 10674 // written permission. 10675 // 10676 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10677 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10678 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10679 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10680 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10681 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10682 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10683 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10684 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10685 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10686 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10687 // 10688 // --------------------------------------------------------------------------- 10689 // 10690 // This file was generated by the CEF translator tool and should not edited 10691 // by hand. See the translator.README.txt file in the tools directory for 10692 // more information. 10693 // 10694 // $hash=524f53a1411035ac6050853e6c52f17f9bd4eaa9$ 10695 // 10696 10697 extern (C): 10698 10699 /// 10700 /// Callback structure used for continuation of custom context menu display. 10701 /// 10702 /// NOTE: This struct is allocated DLL-side. 10703 /// 10704 struct cef_run_context_menu_callback_t 10705 { 10706 /// 10707 /// Base structure. 10708 /// 10709 10710 /// 10711 /// Complete context menu display by selecting the specified |command_id| and 10712 /// |event_flags|. 10713 /// 10714 10715 /// 10716 /// Cancel context menu display. 10717 /// 10718 10719 cef_base_ref_counted_t base; 10720 extern(System) void function ( 10721 cef_run_context_menu_callback_t* self, 10722 int command_id, 10723 cef_event_flags_t event_flags) nothrow cont; 10724 extern(System) void function (cef_run_context_menu_callback_t* self) nothrow cancel; 10725 } 10726 10727 10728 10729 /// 10730 /// Callback structure used for continuation of custom quick menu display. 10731 /// 10732 /// NOTE: This struct is allocated DLL-side. 10733 /// 10734 struct cef_run_quick_menu_callback_t 10735 { 10736 /// 10737 /// Base structure. 10738 /// 10739 cef_base_ref_counted_t base; 10740 10741 /// 10742 /// Complete quick menu display by selecting the specified |command_id| and 10743 /// |event_flags|. 10744 /// 10745 extern(System) void function ( 10746 cef_run_quick_menu_callback_t* self, 10747 int command_id, 10748 cef_event_flags_t event_flags) nothrow cont; 10749 10750 /// 10751 /// Cancel quick menu display. 10752 /// 10753 extern(System) void function (cef_run_quick_menu_callback_t* self) nothrow cancel; 10754 } 10755 10756 10757 10758 /// 10759 /// Implement this structure to handle context menu events. The functions of 10760 /// this structure will be called on the UI thread. 10761 /// 10762 /// NOTE: This struct is allocated client-side. 10763 /// 10764 struct cef_context_menu_handler_t 10765 { 10766 /// 10767 /// Base structure. 10768 /// 10769 cef_base_ref_counted_t base; 10770 10771 /// 10772 /// Called before a context menu is displayed. |params| provides information 10773 /// about the context menu state. |model| initially contains the default 10774 /// context menu. The |model| can be cleared to show no context menu or 10775 /// modified to show a custom menu. Do not keep references to |params| or 10776 /// |model| outside of this callback. 10777 /// 10778 extern(System) void function ( 10779 cef_context_menu_handler_t* self, 10780 cef_browser_t* browser, 10781 cef_frame_t* frame, 10782 cef_context_menu_params_t* params, 10783 cef_menu_model_t* model) nothrow on_before_context_menu; 10784 10785 /// 10786 /// Called to allow custom display of the context menu. |params| provides 10787 /// information about the context menu state. |model| contains the context 10788 /// menu model resulting from OnBeforeContextMenu. For custom display return 10789 /// true (1) and execute |callback| either synchronously or asynchronously 10790 /// with the selected command ID. For default display return false (0). Do not 10791 /// keep references to |params| or |model| outside of this callback. 10792 /// 10793 extern(System) int function ( 10794 cef_context_menu_handler_t* self, 10795 cef_browser_t* browser, 10796 cef_frame_t* frame, 10797 cef_context_menu_params_t* params, 10798 cef_menu_model_t* model, 10799 cef_run_context_menu_callback_t* callback) nothrow run_context_menu; 10800 10801 /// 10802 /// Called to execute a command selected from the context menu. Return true 10803 /// (1) if the command was handled or false (0) for the default 10804 /// implementation. See cef_menu_id_t for the command ids that have default 10805 /// implementations. All user-defined command ids should be between 10806 /// MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |params| will have the same 10807 /// values as what was passed to on_before_context_menu(). Do not keep a 10808 /// reference to |params| outside of this callback. 10809 /// 10810 extern(System) int function ( 10811 cef_context_menu_handler_t* self, 10812 cef_browser_t* browser, 10813 cef_frame_t* frame, 10814 cef_context_menu_params_t* params, 10815 int command_id, 10816 cef_event_flags_t event_flags) nothrow on_context_menu_command; 10817 10818 /// 10819 /// Called when the context menu is dismissed irregardless of whether the menu 10820 /// was canceled or a command was selected. 10821 /// 10822 extern(System) void function ( 10823 cef_context_menu_handler_t* self, 10824 cef_browser_t* browser, 10825 cef_frame_t* frame) nothrow on_context_menu_dismissed; 10826 10827 /// 10828 /// Called to allow custom display of the quick menu for a windowless browser. 10829 /// |location| is the top left corner of the selected region. |size| is the 10830 /// size of the selected region. |edit_state_flags| is a combination of flags 10831 /// that represent the state of the quick menu. Return true (1) if the menu 10832 /// will be handled and execute |callback| either synchronously or 10833 /// asynchronously with the selected command ID. Return false (0) to cancel 10834 /// the menu. 10835 /// 10836 extern(System) int function ( 10837 cef_context_menu_handler_t* self, 10838 cef_browser_t* browser, 10839 cef_frame_t* frame, 10840 const(cef_point_t)* location, 10841 const(cef_size_t)* size, 10842 cef_quick_menu_edit_state_flags_t edit_state_flags, 10843 cef_run_quick_menu_callback_t* callback) nothrow run_quick_menu; 10844 10845 /// 10846 /// Called to execute a command selected from the quick menu for a windowless 10847 /// browser. Return true (1) if the command was handled or false (0) for the 10848 /// default implementation. See cef_menu_id_t for command IDs that have 10849 /// default implementations. 10850 /// 10851 extern(System) int function ( 10852 cef_context_menu_handler_t* self, 10853 cef_browser_t* browser, 10854 cef_frame_t* frame, 10855 int command_id, 10856 cef_event_flags_t event_flags) nothrow on_quick_menu_command; 10857 10858 /// 10859 /// Called when the quick menu for a windowless browser is dismissed 10860 /// irregardless of whether the menu was canceled or a command was selected. 10861 /// 10862 extern(System) void function ( 10863 cef_context_menu_handler_t* self, 10864 cef_browser_t* browser, 10865 cef_frame_t* frame) nothrow on_quick_menu_dismissed; 10866 } 10867 10868 10869 10870 /// 10871 /// Provides information about the context menu state. The functions of this 10872 /// structure can only be accessed on browser process the UI thread. 10873 /// 10874 /// NOTE: This struct is allocated DLL-side. 10875 /// 10876 struct cef_context_menu_params_t 10877 { 10878 /// 10879 /// Base structure. 10880 /// 10881 cef_base_ref_counted_t base; 10882 10883 /// 10884 /// Returns the X coordinate of the mouse where the context menu was invoked. 10885 /// Coords are relative to the associated RenderView's origin. 10886 /// 10887 extern(System) int function (cef_context_menu_params_t* self) nothrow get_xcoord; 10888 10889 /// 10890 /// Returns the Y coordinate of the mouse where the context menu was invoked. 10891 /// Coords are relative to the associated RenderView's origin. 10892 /// 10893 extern(System) int function (cef_context_menu_params_t* self) nothrow get_ycoord; 10894 10895 /// 10896 /// Returns flags representing the type of node that the context menu was 10897 /// invoked on. 10898 /// 10899 extern(System) cef_context_menu_type_flags_t function ( 10900 cef_context_menu_params_t* self) nothrow get_type_flags; 10901 10902 /// 10903 /// Returns the URL of the link, if any, that encloses the node that the 10904 /// context menu was invoked on. 10905 /// 10906 // The resulting string must be freed by calling cef_string_userfree_free(). 10907 extern(System) cef_string_userfree_t function ( 10908 cef_context_menu_params_t* self) nothrow get_link_url; 10909 10910 /// 10911 /// Returns the link URL, if any, to be used ONLY for "copy link address". We 10912 /// don't validate this field in the frontend process. 10913 /// 10914 // The resulting string must be freed by calling cef_string_userfree_free(). 10915 extern(System) cef_string_userfree_t function ( 10916 cef_context_menu_params_t* self) nothrow get_unfiltered_link_url; 10917 10918 /// 10919 /// Returns the source URL, if any, for the element that the context menu was 10920 /// invoked on. Example of elements with source URLs are img, audio, and 10921 /// video. 10922 /// 10923 // The resulting string must be freed by calling cef_string_userfree_free(). 10924 extern(System) cef_string_userfree_t function ( 10925 cef_context_menu_params_t* self) nothrow get_source_url; 10926 10927 /// 10928 /// Returns true (1) if the context menu was invoked on an image which has 10929 /// non-NULL contents. 10930 /// 10931 extern(System) int function (cef_context_menu_params_t* self) nothrow has_image_contents; 10932 10933 /// 10934 /// Returns the title text or the alt text if the context menu was invoked on 10935 /// an image. 10936 /// 10937 // The resulting string must be freed by calling cef_string_userfree_free(). 10938 extern(System) cef_string_userfree_t function ( 10939 cef_context_menu_params_t* self) nothrow get_title_text; 10940 10941 /// 10942 /// Returns the URL of the top level page that the context menu was invoked 10943 /// on. 10944 /// 10945 // The resulting string must be freed by calling cef_string_userfree_free(). 10946 extern(System) cef_string_userfree_t function ( 10947 cef_context_menu_params_t* self) nothrow get_page_url; 10948 10949 /// 10950 /// Returns the URL of the subframe that the context menu was invoked on. 10951 /// 10952 // The resulting string must be freed by calling cef_string_userfree_free(). 10953 extern(System) cef_string_userfree_t function ( 10954 cef_context_menu_params_t* self) nothrow get_frame_url; 10955 10956 /// 10957 /// Returns the character encoding of the subframe that the context menu was 10958 /// invoked on. 10959 /// 10960 // The resulting string must be freed by calling cef_string_userfree_free(). 10961 extern(System) cef_string_userfree_t function ( 10962 cef_context_menu_params_t* self) nothrow get_frame_charset; 10963 10964 /// 10965 /// Returns the type of context node that the context menu was invoked on. 10966 /// 10967 extern(System) cef_context_menu_media_type_t function ( 10968 cef_context_menu_params_t* self) nothrow get_media_type; 10969 10970 /// 10971 /// Returns flags representing the actions supported by the media element, if 10972 /// any, that the context menu was invoked on. 10973 /// 10974 extern(System) cef_context_menu_media_state_flags_t function ( 10975 cef_context_menu_params_t* self) nothrow get_media_state_flags; 10976 10977 /// 10978 /// Returns the text of the selection, if any, that the context menu was 10979 /// invoked on. 10980 /// 10981 // The resulting string must be freed by calling cef_string_userfree_free(). 10982 extern(System) cef_string_userfree_t function ( 10983 cef_context_menu_params_t* self) nothrow get_selection_text; 10984 10985 /// 10986 /// Returns the text of the misspelled word, if any, that the context menu was 10987 /// invoked on. 10988 /// 10989 // The resulting string must be freed by calling cef_string_userfree_free(). 10990 extern(System) cef_string_userfree_t function ( 10991 cef_context_menu_params_t* self) nothrow get_misspelled_word; 10992 10993 /// 10994 /// Returns true (1) if suggestions exist, false (0) otherwise. Fills in 10995 /// |suggestions| from the spell check service for the misspelled word if 10996 /// there is one. 10997 /// 10998 extern(System) int function ( 10999 cef_context_menu_params_t* self, 11000 cef_string_list_t suggestions) nothrow get_dictionary_suggestions; 11001 11002 /// 11003 /// Returns true (1) if the context menu was invoked on an editable node. 11004 /// 11005 extern(System) int function (cef_context_menu_params_t* self) nothrow is_editable; 11006 11007 /// 11008 /// Returns true (1) if the context menu was invoked on an editable node where 11009 /// spell-check is enabled. 11010 /// 11011 extern(System) int function (cef_context_menu_params_t* self) nothrow is_spell_check_enabled; 11012 11013 /// 11014 /// Returns flags representing the actions supported by the editable node, if 11015 /// any, that the context menu was invoked on. 11016 /// 11017 extern(System) cef_context_menu_edit_state_flags_t function ( 11018 cef_context_menu_params_t* self) nothrow get_edit_state_flags; 11019 11020 /// 11021 /// Returns true (1) if the context menu contains items specified by the 11022 /// renderer process. 11023 /// 11024 extern(System) int function (cef_context_menu_params_t* self) nothrow is_custom_menu; 11025 } 11026 11027 11028 11029 // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ 11030 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 11031 // 11032 // Redistribution and use in source and binary forms, with or without 11033 // modification, are permitted provided that the following conditions are 11034 // met: 11035 // 11036 // * Redistributions of source code must retain the above copyright 11037 // notice, this list of conditions and the following disclaimer. 11038 // * Redistributions in binary form must reproduce the above 11039 // copyright notice, this list of conditions and the following disclaimer 11040 // in the documentation and/or other materials provided with the 11041 // distribution. 11042 // * Neither the name of Google Inc. nor the name Chromium Embedded 11043 // Framework nor the names of its contributors may be used to endorse 11044 // or promote products derived from this software without specific prior 11045 // written permission. 11046 // 11047 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11048 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11049 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11050 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11051 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11052 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11053 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11054 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11055 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11056 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11057 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11058 // 11059 // --------------------------------------------------------------------------- 11060 // 11061 // This file was generated by the CEF translator tool and should not edited 11062 // by hand. See the translator.README.txt file in the tools directory for 11063 // more information. 11064 // 11065 // $hash=438975254d7d0a4b97d7ad05e745e544728d41d6$ 11066 // 11067 11068 extern (C): 11069 11070 /// 11071 /// Structure used for managing cookies. The functions of this structure may be 11072 /// called on any thread unless otherwise indicated. 11073 /// 11074 /// NOTE: This struct is allocated DLL-side. 11075 /// 11076 struct cef_cookie_manager_t 11077 { 11078 /// 11079 /// Base structure. 11080 /// 11081 11082 /// 11083 /// Visit all cookies on the UI thread. The returned cookies are ordered by 11084 /// longest path, then by earliest creation date. Returns false (0) if cookies 11085 /// cannot be accessed. 11086 /// 11087 11088 /// 11089 /// Visit a subset of cookies on the UI thread. The results are filtered by 11090 11091 cef_base_ref_counted_t base; 11092 extern(System) int function ( 11093 cef_cookie_manager_t* self, 11094 cef_cookie_visitor_t* visitor) nothrow visit_all_cookies; 11095 /// the given url scheme, host, domain and path. If |includeHttpOnly| is true 11096 /// (1) HTTP-only cookies will also be included in the results. The returned 11097 /// cookies are ordered by longest path, then by earliest creation date. 11098 /// Returns false (0) if cookies cannot be accessed. 11099 /// 11100 extern(System) int function ( 11101 cef_cookie_manager_t* self, 11102 const(cef_string_t)* url, 11103 int includeHttpOnly, 11104 cef_cookie_visitor_t* visitor) nothrow visit_url_cookies; 11105 11106 /// 11107 /// Sets a cookie given a valid URL and explicit user-provided cookie 11108 /// attributes. This function expects each attribute to be well-formed. It 11109 /// will check for disallowed characters (e.g. the ';' character is disallowed 11110 /// within the cookie value attribute) and fail without setting the cookie if 11111 /// such characters are found. If |callback| is non-NULL it will be executed 11112 /// asnychronously on the UI thread after the cookie has been set. Returns 11113 /// false (0) if an invalid URL is specified or if cookies cannot be accessed. 11114 /// 11115 extern(System) int function ( 11116 cef_cookie_manager_t* self, 11117 const(cef_string_t)* url, 11118 const(cef_cookie_t)* cookie, 11119 cef_set_cookie_callback_t* callback) nothrow set_cookie; 11120 11121 /// 11122 /// Delete all cookies that match the specified parameters. If both |url| and 11123 /// |cookie_name| values are specified all host and domain cookies matching 11124 /// both will be deleted. If only |url| is specified all host cookies (but not 11125 /// domain cookies) irrespective of path will be deleted. If |url| is NULL all 11126 /// cookies for all hosts and domains will be deleted. If |callback| is non- 11127 /// NULL it will be executed asnychronously on the UI thread after the cookies 11128 /// have been deleted. Returns false (0) if a non-NULL invalid URL is 11129 /// specified or if cookies cannot be accessed. Cookies can alternately be 11130 /// deleted using the Visit*Cookies() functions. 11131 /// 11132 extern(System) int function ( 11133 cef_cookie_manager_t* self, 11134 const(cef_string_t)* url, 11135 const(cef_string_t)* cookie_name, 11136 cef_delete_cookies_callback_t* callback) nothrow delete_cookies; 11137 11138 /// 11139 /// Flush the backing store (if any) to disk. If |callback| is non-NULL it 11140 /// will be executed asnychronously on the UI thread after the flush is 11141 /// complete. Returns false (0) if cookies cannot be accessed. 11142 /// 11143 extern(System) int function ( 11144 cef_cookie_manager_t* self, 11145 cef_completion_callback_t* callback) nothrow flush_store; 11146 } 11147 11148 11149 11150 /// 11151 /// Returns the global cookie manager. By default data will be stored at 11152 /// cef_settings_t.cache_path if specified or in memory otherwise. If |callback| 11153 /// is non-NULL it will be executed asnychronously on the UI thread after the 11154 /// manager's storage has been initialized. Using this function is equivalent to 11155 /// calling cef_request_context_t::cef_request_context_get_global_context()->Get 11156 /// DefaultCookieManager(). 11157 /// 11158 cef_cookie_manager_t* cef_cookie_manager_get_global_manager ( 11159 cef_completion_callback_t* callback); 11160 11161 /// 11162 /// Structure to implement for visiting cookie values. The functions of this 11163 /// structure will always be called on the UI thread. 11164 /// 11165 /// NOTE: This struct is allocated client-side. 11166 /// 11167 struct cef_cookie_visitor_t 11168 { 11169 /// 11170 /// Base structure. 11171 /// 11172 cef_base_ref_counted_t base; 11173 11174 /// 11175 /// Method that will be called once for each cookie. |count| is the 0-based 11176 /// index for the current cookie. |total| is the total number of cookies. Set 11177 /// |deleteCookie| to true (1) to delete the cookie currently being visited. 11178 /// Return false (0) to stop visiting cookies. This function may never be 11179 /// called if no cookies are found. 11180 /// 11181 extern(System) int function ( 11182 cef_cookie_visitor_t* self, 11183 const(cef_cookie_t)* cookie, 11184 int count, 11185 int total, 11186 int* deleteCookie) nothrow visit; 11187 } 11188 11189 11190 11191 /// 11192 /// Structure to implement to be notified of asynchronous completion via 11193 /// cef_cookie_manager_t::set_cookie(). 11194 /// 11195 /// NOTE: This struct is allocated client-side. 11196 /// 11197 struct cef_set_cookie_callback_t 11198 { 11199 /// 11200 /// Base structure. 11201 /// 11202 cef_base_ref_counted_t base; 11203 11204 /// 11205 /// Method that will be called upon completion. |success| will be true (1) if 11206 /// the cookie was set successfully. 11207 /// 11208 extern(System) void function (cef_set_cookie_callback_t* self, int success) nothrow on_complete; 11209 } 11210 11211 11212 11213 /// 11214 /// Structure to implement to be notified of asynchronous completion via 11215 /// cef_cookie_manager_t::delete_cookies(). 11216 /// 11217 /// NOTE: This struct is allocated client-side. 11218 /// 11219 struct cef_delete_cookies_callback_t 11220 { 11221 /// 11222 /// Base structure. 11223 /// 11224 cef_base_ref_counted_t base; 11225 11226 /// 11227 /// Method that will be called upon completion. |num_deleted| will be the 11228 /// number of cookies that were deleted. 11229 /// 11230 extern(System) void function ( 11231 cef_delete_cookies_callback_t* self, 11232 int num_deleted) nothrow on_complete; 11233 } 11234 11235 11236 11237 // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ 11238 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 11239 // 11240 // Redistribution and use in source and binary forms, with or without 11241 // modification, are permitted provided that the following conditions are 11242 // met: 11243 // 11244 // * Redistributions of source code must retain the above copyright 11245 // notice, this list of conditions and the following disclaimer. 11246 // * Redistributions in binary form must reproduce the above 11247 // copyright notice, this list of conditions and the following disclaimer 11248 // in the documentation and/or other materials provided with the 11249 // distribution. 11250 // * Neither the name of Google Inc. nor the name Chromium Embedded 11251 // Framework nor the names of its contributors may be used to endorse 11252 // or promote products derived from this software without specific prior 11253 // written permission. 11254 // 11255 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11256 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11257 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11258 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11259 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11260 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11261 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11262 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11263 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11264 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11265 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11266 // 11267 // --------------------------------------------------------------------------- 11268 // 11269 // This file was generated by the CEF translator tool and should not edited 11270 // by hand. See the translator.README.txt file in the tools directory for 11271 // more information. 11272 // 11273 // $hash=79ce82867dc40d8d2ebc54e17b8bc181b81df870$ 11274 // 11275 11276 extern (C): 11277 11278 /// 11279 /// Crash reporting is configured using an INI-style config file named 11280 /// "crash_reporter.cfg". On Windows and Linux this file must be placed next to 11281 /// the main application executable. On macOS this file must be placed in the 11282 /// top-level app bundle Resources directory (e.g. 11283 /// "<appname>.app/Contents/Resources"). File contents are as follows: 11284 /// 11285 /// <pre> 11286 /// # Comments start with a hash character and must be on their own line. 11287 /// 11288 /// [Config] 11289 /// ProductName=<Value of the "prod" crash key; defaults to "cef"> 11290 /// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version> 11291 /// AppName=<Windows only; App-specific folder name component for storing crash 11292 /// information; default to "CEF"> 11293 /// ExternalHandler=<Windows only; Name of the external handler exe to use 11294 /// instead of re-launching the main exe; default to empty> 11295 /// BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes 11296 /// should be forwarded to the system crash 11297 /// reporter; default to false> 11298 /// ServerURL=<crash server URL; default to empty> 11299 /// RateLimitEnabled=<True if uploads should be rate limited; default to true> 11300 /// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled; 11301 /// default to 5> 11302 /// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value 11303 /// will cause older reports to be deleted; default to 20> 11304 /// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted; 11305 /// default to 5> 11306 /// 11307 /// [CrashKeys] 11308 /// my_key1=<small|medium|large> 11309 /// my_key2=<small|medium|large> 11310 /// </pre> 11311 /// 11312 /// <b>Config section:</b> 11313 /// 11314 /// If "ProductName" and/or "ProductVersion" are set then the specified values 11315 /// will be included in the crash dump metadata. On macOS if these values are 11316 /// set to NULL then they will be retrieved from the Info.plist file using the 11317 /// "CFBundleName" and "CFBundleShortVersionString" keys respectively. 11318 /// 11319 /// If "AppName" is set on Windows then crash report information (metrics, 11320 /// database and dumps) will be stored locally on disk under the 11321 /// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other 11322 /// platforms the cef_settings_t.root_cache_path value will be used. 11323 /// 11324 /// If "ExternalHandler" is set on Windows then the specified exe will be 11325 /// launched as the crashpad-handler instead of re-launching the main process 11326 /// exe. The value can be an absolute path or a path relative to the main exe 11327 /// directory. On Linux the cef_settings_t.browser_subprocess_path value will be 11328 /// used. On macOS the existing subprocess app bundle will be used. 11329 /// 11330 /// If "BrowserCrashForwardingEnabled" is set to true (1) on macOS then browser 11331 /// process crashes will be forwarded to the system crash reporter. This results 11332 /// in the crash UI dialog being displayed to the user and crash reports being 11333 /// logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports 11334 /// from non-browser processes and Debug builds is always disabled. 11335 /// 11336 /// If "ServerURL" is set then crashes will be uploaded as a multi-part POST 11337 /// request to the specified URL. Otherwise, reports will only be stored locally 11338 /// on disk. 11339 /// 11340 /// If "RateLimitEnabled" is set to true (1) then crash report uploads will be 11341 /// rate limited as follows: 11342 /// 1. If "MaxUploadsPerDay" is set to a positive value then at most the 11343 /// specified number of crashes will be uploaded in each 24 hour period. 11344 /// 2. If crash upload fails due to a network or server error then an 11345 /// incremental backoff delay up to a maximum of 24 hours will be applied 11346 /// for retries. 11347 /// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the 11348 /// "MaxUploadsPerDay" value will be reduced to 1 until the client is 11349 /// restarted. This helps to avoid an upload flood when the network or 11350 /// server error is resolved. 11351 /// Rate limiting is not supported on Linux. 11352 /// 11353 /// If "MaxDatabaseSizeInMb" is set to a positive value then crash report 11354 /// storage on disk will be limited to that size in megabytes. For example, on 11355 /// Windows each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 11356 /// equates to about 34 crash reports stored on disk. Not supported on Linux. 11357 /// 11358 /// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports 11359 /// older than the specified age in days will be deleted. Not supported on 11360 /// Linux. 11361 /// 11362 /// <b>CrashKeys section:</b> 11363 /// 11364 /// A maximum of 26 crash keys of each size can be specified for use by the 11365 /// application. Crash key values will be truncated based on the specified size 11366 /// (small = 64 bytes, medium = 256 bytes, large = 1024 bytes). The value of 11367 /// crash keys can be set from any thread or process using the 11368 /// CefSetCrashKeyValue function. These key/value pairs will be sent to the 11369 /// crash server along with the crash dump file. 11370 /// 11371 int cef_crash_reporting_enabled (); 11372 11373 /// 11374 /// Sets or clears a specific key-value pair from the crash metadata. 11375 /// 11376 void cef_set_crash_key_value ( 11377 const(cef_string_t)* key, 11378 const(cef_string_t)* value); 11379 11380 // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_ 11381 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 11382 // 11383 // Redistribution and use in source and binary forms, with or without 11384 // modification, are permitted provided that the following conditions are 11385 // met: 11386 // 11387 // * Redistributions of source code must retain the above copyright 11388 // notice, this list of conditions and the following disclaimer. 11389 // * Redistributions in binary form must reproduce the above 11390 // copyright notice, this list of conditions and the following disclaimer 11391 // in the documentation and/or other materials provided with the 11392 // distribution. 11393 // * Neither the name of Google Inc. nor the name Chromium Embedded 11394 // Framework nor the names of its contributors may be used to endorse 11395 // or promote products derived from this software without specific prior 11396 // written permission. 11397 // 11398 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11399 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11400 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11401 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11402 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11403 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11404 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11405 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11406 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11407 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11408 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11409 // 11410 // --------------------------------------------------------------------------- 11411 // 11412 // This file was generated by the CEF translator tool and should not edited 11413 // by hand. See the translator.README.txt file in the tools directory for 11414 // more information. 11415 // 11416 // $hash=62859097510036135679070817e19b339ec1248b$ 11417 // 11418 11419 extern (C): 11420 11421 11422 11423 /// 11424 /// Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The 11425 /// functions of this structure will be called on the browser process UI thread. 11426 /// 11427 /// NOTE: This struct is allocated client-side. 11428 /// 11429 struct cef_dev_tools_message_observer_t 11430 { 11431 /// 11432 /// Base structure. 11433 /// 11434 11435 /// 11436 /// Method that will be called on receipt of a DevTools protocol message. 11437 /// |browser| is the originating browser instance. |message| is a UTF8-encoded 11438 /// JSON dictionary representing either a function result or an event. 11439 /// |message| is only valid for the scope of this callback and should be 11440 /// copied if necessary. Return true (1) if the message was handled or false 11441 /// (0) if the message should be further processed and passed to the 11442 11443 cef_base_ref_counted_t base; 11444 /// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate. 11445 /// 11446 /// Method result dictionaries include an "id" (int) value that identifies the 11447 /// orginating function call sent from 11448 /// cef_browser_host_t::SendDevToolsMessage, and optionally either a "result" 11449 /// (dictionary) or "error" (dictionary) value. The "error" dictionary will 11450 /// contain "code" (int) and "message" (string) values. Event dictionaries 11451 /// include a "function" (string) value and optionally a "params" (dictionary) 11452 /// value. See the DevTools protocol documentation at 11453 /// https://chromedevtools.github.io/devtools-protocol/ for details of 11454 /// supported function calls and the expected "result" or "params" dictionary 11455 /// contents. JSON dictionaries can be parsed using the CefParseJSON function 11456 /// if desired, however be aware of performance considerations when parsing 11457 /// large messages (some of which may exceed 1MB in size). 11458 /// 11459 extern(System) int function ( 11460 cef_dev_tools_message_observer_t* self, 11461 cef_browser_t* browser, 11462 const(void)* message, 11463 size_t message_size) nothrow on_dev_tools_message; 11464 11465 /// 11466 /// Method that will be called after attempted execution of a DevTools 11467 /// protocol function. |browser| is the originating browser instance. 11468 /// |message_id| is the "id" value that identifies the originating function 11469 /// call message. If the function succeeded |success| will be true (1) and 11470 /// |result| will be the UTF8-encoded JSON "result" dictionary value (which 11471 /// may be NULL). If the function failed |success| will be false (0) and 11472 /// |result| will be the UTF8-encoded JSON "error" dictionary value. |result| 11473 /// is only valid for the scope of this callback and should be copied if 11474 /// necessary. See the OnDevToolsMessage documentation for additional details 11475 /// on |result| contents. 11476 /// 11477 extern(System) void function ( 11478 cef_dev_tools_message_observer_t* self, 11479 cef_browser_t* browser, 11480 int message_id, 11481 int success, 11482 const(void)* result, 11483 size_t result_size) nothrow on_dev_tools_method_result; 11484 11485 /// 11486 /// Method that will be called on receipt of a DevTools protocol event. 11487 /// |browser| is the originating browser instance. |function| is the 11488 /// "function" value. |params| is the UTF8-encoded JSON "params" dictionary 11489 /// value (which may be NULL). |params| is only valid for the scope of this 11490 /// callback and should be copied if necessary. See the OnDevToolsMessage 11491 /// documentation for additional details on |params| contents. 11492 /// 11493 extern(System) void function ( 11494 cef_dev_tools_message_observer_t* self, 11495 cef_browser_t* browser, 11496 const(cef_string_t)* method, 11497 const(void)* params, 11498 size_t params_size) nothrow on_dev_tools_event; 11499 11500 /// 11501 /// Method that will be called when the DevTools agent has attached. |browser| 11502 /// is the originating browser instance. This will generally occur in response 11503 /// to the first message sent while the agent is detached. 11504 /// 11505 extern(System) void function ( 11506 cef_dev_tools_message_observer_t* self, 11507 cef_browser_t* browser) nothrow on_dev_tools_agent_attached; 11508 11509 /// 11510 /// Method that will be called when the DevTools agent has detached. |browser| 11511 /// is the originating browser instance. Any function results that were 11512 /// pending before the agent became detached will not be delivered, and any 11513 /// active event subscriptions will be canceled. 11514 /// 11515 extern(System) void function ( 11516 cef_dev_tools_message_observer_t* self, 11517 cef_browser_t* browser) nothrow on_dev_tools_agent_detached; 11518 } 11519 11520 11521 11522 // CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_ 11523 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 11524 // 11525 // Redistribution and use in source and binary forms, with or without 11526 // modification, are permitted provided that the following conditions are 11527 // met: 11528 // 11529 // * Redistributions of source code must retain the above copyright 11530 // notice, this list of conditions and the following disclaimer. 11531 // * Redistributions in binary form must reproduce the above 11532 // copyright notice, this list of conditions and the following disclaimer 11533 // in the documentation and/or other materials provided with the 11534 // distribution. 11535 // * Neither the name of Google Inc. nor the name Chromium Embedded 11536 // Framework nor the names of its contributors may be used to endorse 11537 // or promote products derived from this software without specific prior 11538 // written permission. 11539 // 11540 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11541 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11542 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11543 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11544 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11545 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11546 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11547 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11548 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11549 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11550 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11551 // 11552 // --------------------------------------------------------------------------- 11553 // 11554 // This file was generated by the CEF translator tool and should not edited 11555 // by hand. See the translator.README.txt file in the tools directory for 11556 // more information. 11557 // 11558 // $hash=091879ed08a62dbcb50c30db695fc51fb6496b64$ 11559 // 11560 11561 extern (C): 11562 11563 /// 11564 /// Callback structure for asynchronous continuation of file dialog requests. 11565 /// 11566 /// NOTE: This struct is allocated DLL-side. 11567 /// 11568 struct cef_file_dialog_callback_t 11569 { 11570 /// 11571 /// Base structure. 11572 /// 11573 11574 /// 11575 /// Continue the file selection. |file_paths| should be a single value or a 11576 /// list of values depending on the dialog mode. An NULL |file_paths| value is 11577 /// treated the same as calling cancel(). 11578 /// 11579 11580 /// 11581 /// Cancel the file selection. 11582 /// 11583 11584 /// 11585 /// Implement this structure to handle dialog events. The functions of this 11586 11587 cef_base_ref_counted_t base; 11588 extern(System) void function ( 11589 cef_file_dialog_callback_t* self, 11590 cef_string_list_t file_paths) nothrow cont; 11591 extern(System) void function (cef_file_dialog_callback_t* self) nothrow cancel; 11592 } 11593 11594 11595 /// structure will be called on the browser process UI thread. 11596 /// 11597 /// NOTE: This struct is allocated client-side. 11598 /// 11599 struct cef_dialog_handler_t 11600 { 11601 /// 11602 /// Base structure. 11603 /// 11604 cef_base_ref_counted_t base; 11605 11606 /// 11607 /// Called to run a file chooser dialog. |mode| represents the type of dialog 11608 /// to display. |title| to the title to be used for the dialog and may be NULL 11609 /// to show the default title ("Open" or "Save" depending on the mode). 11610 /// |default_file_path| is the path with optional directory and/or file name 11611 /// component that should be initially selected in the dialog. 11612 /// |accept_filters| are used to restrict the selectable file types and may be 11613 /// any combination of valid lower-cased MIME types (e.g. "text/*" or 11614 /// "image/*") and individual file extensions (e.g. ".txt" or ".png"). 11615 /// |accept_extensions| provides the semicolon-delimited expansion of MIME 11616 /// types to file extensions (if known, or NULL string otherwise). 11617 /// |accept_descriptions| provides the descriptions for MIME types (if known, 11618 /// or NULL string otherwise). For example, the "image/*" mime type might have 11619 /// extensions ".png;.jpg;.bmp;..." and description "Image Files". 11620 /// |accept_filters|, |accept_extensions| and |accept_descriptions| will all 11621 /// be the same size. To display a custom dialog return true (1) and execute 11622 /// |callback| either inline or at a later time. To display the default dialog 11623 /// return false (0). If this function returns false (0) it may be called an 11624 /// additional time for the same dialog (both before and after MIME type 11625 /// expansion). 11626 /// 11627 extern(System) int function ( 11628 cef_dialog_handler_t* self, 11629 cef_browser_t* browser, 11630 cef_file_dialog_mode_t mode, 11631 const(cef_string_t)* title, 11632 const(cef_string_t)* default_file_path, 11633 cef_string_list_t accept_filters, 11634 cef_string_list_t accept_extensions, 11635 cef_string_list_t accept_descriptions, 11636 cef_file_dialog_callback_t* callback) nothrow on_file_dialog; 11637 } 11638 11639 11640 11641 // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ 11642 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 11643 // 11644 // Redistribution and use in source and binary forms, with or without 11645 // modification, are permitted provided that the following conditions are 11646 // met: 11647 // 11648 // * Redistributions of source code must retain the above copyright 11649 // notice, this list of conditions and the following disclaimer. 11650 // * Redistributions in binary form must reproduce the above 11651 // copyright notice, this list of conditions and the following disclaimer 11652 // in the documentation and/or other materials provided with the 11653 // distribution. 11654 // * Neither the name of Google Inc. nor the name Chromium Embedded 11655 // Framework nor the names of its contributors may be used to endorse 11656 // or promote products derived from this software without specific prior 11657 // written permission. 11658 // 11659 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11660 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11661 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11662 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11663 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11664 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11665 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11666 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11667 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11668 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11669 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11670 // 11671 // --------------------------------------------------------------------------- 11672 // 11673 // This file was generated by the CEF translator tool and should not edited 11674 // by hand. See the translator.README.txt file in the tools directory for 11675 // more information. 11676 // 11677 // $hash=27540cd0fcf6e7aa7543b832e4c68bae12c732b7$ 11678 // 11679 11680 extern (C): 11681 11682 /// 11683 /// Implement this structure to handle events related to browser display state. 11684 /// The functions of this structure will be called on the UI thread. 11685 /// 11686 /// NOTE: This struct is allocated client-side. 11687 /// 11688 struct cef_display_handler_t 11689 { 11690 /// 11691 /// Base structure. 11692 /// 11693 11694 /// 11695 /// Called when a frame's address has changed. 11696 /// 11697 11698 /// 11699 /// Called when the page title changes. 11700 11701 cef_base_ref_counted_t base; 11702 extern(System) void function ( 11703 cef_display_handler_t* self, 11704 cef_browser_t* browser, 11705 cef_frame_t* frame, 11706 const(cef_string_t)* url) nothrow on_address_change; 11707 /// 11708 extern(System) void function ( 11709 cef_display_handler_t* self, 11710 cef_browser_t* browser, 11711 const(cef_string_t)* title) nothrow on_title_change; 11712 11713 /// 11714 /// Called when the page icon changes. 11715 /// 11716 extern(System) void function ( 11717 cef_display_handler_t* self, 11718 cef_browser_t* browser, 11719 cef_string_list_t icon_urls) nothrow on_favicon_urlchange; 11720 11721 /// 11722 /// Called when web content in the page has toggled fullscreen mode. If 11723 /// |fullscreen| is true (1) the content will automatically be sized to fill 11724 /// the browser content area. If |fullscreen| is false (0) the content will 11725 /// automatically return to its original size and position. With Alloy style 11726 /// the client is responsible for triggering the fullscreen transition (for 11727 /// example, by calling cef_window_t::SetFullscreen when using Views). With 11728 /// Chrome style the fullscreen transition will be triggered automatically. 11729 /// The cef_window_delegate_t::OnWindowFullscreenTransition function will be 11730 /// called during the fullscreen transition for notification purposes. 11731 /// 11732 extern(System) void function ( 11733 cef_display_handler_t* self, 11734 cef_browser_t* browser, 11735 int fullscreen) nothrow on_fullscreen_mode_change; 11736 11737 /// 11738 /// Called when the browser is about to display a tooltip. |text| contains the 11739 /// text that will be displayed in the tooltip. To handle the display of the 11740 /// tooltip yourself return true (1). Otherwise, you can optionally modify 11741 /// |text| and then return false (0) to allow the browser to display the 11742 /// tooltip. When window rendering is disabled the application is responsible 11743 /// for drawing tooltips and the return value is ignored. 11744 /// 11745 extern(System) int function ( 11746 cef_display_handler_t* self, 11747 cef_browser_t* browser, 11748 cef_string_t* text) nothrow on_tooltip; 11749 11750 /// 11751 /// Called when the browser receives a status message. |value| contains the 11752 /// text that will be displayed in the status message. 11753 /// 11754 extern(System) void function ( 11755 cef_display_handler_t* self, 11756 cef_browser_t* browser, 11757 const(cef_string_t)* value) nothrow on_status_message; 11758 11759 /// 11760 /// Called to display a console message. Return true (1) to stop the message 11761 /// from being output to the console. 11762 /// 11763 extern(System) int function ( 11764 cef_display_handler_t* self, 11765 cef_browser_t* browser, 11766 cef_log_severity_t level, 11767 const(cef_string_t)* message, 11768 const(cef_string_t)* source, 11769 int line) nothrow on_console_message; 11770 11771 /// 11772 /// Called when auto-resize is enabled via 11773 /// cef_browser_host_t::SetAutoResizeEnabled and the contents have auto- 11774 /// resized. |new_size| will be the desired size in DIP coordinates. Return 11775 /// true (1) if the resize was handled or false (0) for default handling. 11776 /// 11777 extern(System) int function ( 11778 cef_display_handler_t* self, 11779 cef_browser_t* browser, 11780 const(cef_size_t)* new_size) nothrow on_auto_resize; 11781 11782 /// 11783 /// Called when the overall page loading progress has changed. |progress| 11784 /// ranges from 0.0 to 1.0. 11785 /// 11786 extern(System) void function ( 11787 cef_display_handler_t* self, 11788 cef_browser_t* browser, 11789 double progress) nothrow on_loading_progress_change; 11790 11791 /// 11792 /// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then 11793 /// |custom_cursor_info| will be populated with the custom cursor information. 11794 /// Return true (1) if the cursor change was handled or false (0) for default 11795 /// handling. 11796 /// 11797 extern(System) int function ( 11798 cef_display_handler_t* self, 11799 cef_browser_t* browser, 11800 cef_cursor_handle_t cursor, 11801 cef_cursor_type_t type, 11802 const(cef_cursor_info_t)* custom_cursor_info) nothrow on_cursor_change; 11803 11804 /// 11805 /// Called when the browser's access to an audio and/or video source has 11806 /// changed. 11807 /// 11808 extern(System) void function ( 11809 cef_display_handler_t* self, 11810 cef_browser_t* browser, 11811 int has_video_access, 11812 int has_audio_access) nothrow on_media_access_change; 11813 11814 /// 11815 /// Called when JavaScript is requesting new bounds via window.moveTo/By() or 11816 /// window.resizeTo/By(). |new_bounds| are in DIP screen coordinates. 11817 /// 11818 /// With Views-hosted browsers |new_bounds| are the desired bounds for the 11819 /// containing cef_window_t and may be passed directly to 11820 /// cef_window_t::SetBounds. With external (client-provided) parent on macOS 11821 /// and Windows |new_bounds| are the desired frame bounds for the containing 11822 /// root window. With other non-Views browsers |new_bounds| are the desired 11823 /// bounds for the browser content only unless the client implements either 11824 /// cef_display_handler_t::GetRootWindowScreenRect for windowed browsers or 11825 /// cef_render_handler_t::GetWindowScreenRect for windowless browsers. Clients 11826 /// may expand browser content bounds to window bounds using OS-specific or 11827 /// cef_display_t functions. 11828 /// 11829 /// Return true (1) if this function was handled or false (0) for default 11830 /// handling. Default move/resize behavior is only provided with Views-hosted 11831 /// Chrome style browsers. 11832 /// 11833 extern(System) int function ( 11834 cef_display_handler_t* self, 11835 cef_browser_t* browser, 11836 const(cef_rect_t)* new_bounds) nothrow on_contents_bounds_change; 11837 11838 /// 11839 /// Called to retrieve the external (client-provided) root window rectangle in 11840 /// screen DIP coordinates. Only called for windowed browsers on Windows and 11841 /// Linux. Return true (1) if the rectangle was provided. Return false (0) to 11842 /// use the root window bounds on Windows or the browser content bounds on 11843 /// Linux. For additional usage details see 11844 /// cef_browser_host_t::NotifyScreenInfoChanged. 11845 /// 11846 extern(System) int function ( 11847 cef_display_handler_t* self, 11848 cef_browser_t* browser, 11849 cef_rect_t* rect) nothrow get_root_window_screen_rect; 11850 } 11851 11852 11853 11854 // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ 11855 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 11856 // 11857 // Redistribution and use in source and binary forms, with or without 11858 // modification, are permitted provided that the following conditions are 11859 // met: 11860 // 11861 // * Redistributions of source code must retain the above copyright 11862 // notice, this list of conditions and the following disclaimer. 11863 // * Redistributions in binary form must reproduce the above 11864 // copyright notice, this list of conditions and the following disclaimer 11865 // in the documentation and/or other materials provided with the 11866 // distribution. 11867 // * Neither the name of Google Inc. nor the name Chromium Embedded 11868 // Framework nor the names of its contributors may be used to endorse 11869 // or promote products derived from this software without specific prior 11870 // written permission. 11871 // 11872 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11873 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11874 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11875 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11876 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11877 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11878 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11879 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11880 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11881 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11882 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11883 // 11884 // --------------------------------------------------------------------------- 11885 // 11886 // This file was generated by the CEF translator tool and should not edited 11887 // by hand. See the translator.README.txt file in the tools directory for 11888 // more information. 11889 // 11890 // $hash=ca21c122172743af8b747eb6dbef6eed5280b97f$ 11891 // 11892 11893 extern (C): 11894 11895 /// 11896 /// Structure to implement for visiting the DOM. The functions of this structure 11897 /// will be called on the render process main thread. 11898 /// 11899 /// NOTE: This struct is allocated client-side. 11900 /// 11901 struct cef_domvisitor_t 11902 { 11903 /// 11904 /// Base structure. 11905 /// 11906 11907 /// 11908 /// Method executed for visiting the DOM. The document object passed to this 11909 /// function represents a snapshot of the DOM at the time this function is 11910 /// executed. DOM objects are only valid for the scope of this function. Do 11911 /// not keep references to or attempt to access any DOM objects outside the 11912 /// scope of this function. 11913 /// 11914 11915 cef_base_ref_counted_t base; 11916 extern(System) void function ( 11917 cef_domvisitor_t* self, 11918 cef_domdocument_t* document) nothrow visit; 11919 } 11920 11921 11922 11923 /// 11924 /// Structure used to represent a DOM document. The functions of this structure 11925 /// should only be called on the render process main thread thread. 11926 /// 11927 /// NOTE: This struct is allocated DLL-side. 11928 /// 11929 struct cef_domdocument_t 11930 { 11931 /// 11932 /// Base structure. 11933 /// 11934 cef_base_ref_counted_t base; 11935 11936 /// 11937 /// Returns the document type. 11938 /// 11939 extern(System) cef_dom_document_type_t function (cef_domdocument_t* self) nothrow get_type; 11940 11941 /// 11942 /// Returns the root document node. 11943 /// 11944 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_document; 11945 11946 /// 11947 /// Returns the BODY node of an HTML document. 11948 /// 11949 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_body; 11950 11951 /// 11952 /// Returns the HEAD node of an HTML document. 11953 /// 11954 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_head; 11955 11956 /// 11957 /// Returns the title of an HTML document. 11958 /// 11959 // The resulting string must be freed by calling cef_string_userfree_free(). 11960 extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_title; 11961 11962 /// 11963 /// Returns the document element with the specified ID value. 11964 /// 11965 extern(System) cef_domnode_t* function ( 11966 cef_domdocument_t* self, 11967 const(cef_string_t)* id) nothrow get_element_by_id; 11968 11969 /// 11970 /// Returns the node that currently has keyboard focus. 11971 /// 11972 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_focused_node; 11973 11974 /// 11975 /// Returns true (1) if a portion of the document is selected. 11976 /// 11977 extern(System) int function (cef_domdocument_t* self) nothrow has_selection; 11978 11979 /// 11980 /// Returns the selection offset within the start node. 11981 /// 11982 extern(System) int function (cef_domdocument_t* self) nothrow get_selection_start_offset; 11983 11984 /// 11985 /// Returns the selection offset within the end node. 11986 /// 11987 extern(System) int function (cef_domdocument_t* self) nothrow get_selection_end_offset; 11988 11989 /// 11990 /// Returns the contents of this selection as markup. 11991 /// 11992 // The resulting string must be freed by calling cef_string_userfree_free(). 11993 extern(System) cef_string_userfree_t function ( 11994 cef_domdocument_t* self) nothrow get_selection_as_markup; 11995 11996 /// 11997 /// Returns the contents of this selection as text. 11998 /// 11999 // The resulting string must be freed by calling cef_string_userfree_free(). 12000 extern(System) cef_string_userfree_t function ( 12001 cef_domdocument_t* self) nothrow get_selection_as_text; 12002 12003 /// 12004 /// Returns the base URL for the document. 12005 /// 12006 // The resulting string must be freed by calling cef_string_userfree_free(). 12007 extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_base_url; 12008 12009 /// 12010 /// Returns a complete URL based on the document base URL and the specified 12011 /// partial URL. 12012 /// 12013 // The resulting string must be freed by calling cef_string_userfree_free(). 12014 extern(System) cef_string_userfree_t function ( 12015 cef_domdocument_t* self, 12016 const(cef_string_t)* partialURL) nothrow get_complete_url; 12017 } 12018 12019 12020 12021 /// 12022 /// Structure used to represent a DOM node. The functions of this structure 12023 /// should only be called on the render process main thread. 12024 /// 12025 /// NOTE: This struct is allocated DLL-side. 12026 /// 12027 struct cef_domnode_t 12028 { 12029 /// 12030 /// Base structure. 12031 /// 12032 cef_base_ref_counted_t base; 12033 12034 /// 12035 /// Returns the type for this node. 12036 /// 12037 extern(System) cef_dom_node_type_t function (cef_domnode_t* self) nothrow get_type; 12038 12039 /// 12040 /// Returns true (1) if this is a text node. 12041 /// 12042 extern(System) int function (cef_domnode_t* self) nothrow is_text; 12043 12044 /// 12045 /// Returns true (1) if this is an element node. 12046 /// 12047 extern(System) int function (cef_domnode_t* self) nothrow is_element; 12048 12049 /// 12050 /// Returns true (1) if this is an editable node. 12051 /// 12052 extern(System) int function (cef_domnode_t* self) nothrow is_editable; 12053 12054 /// 12055 /// Returns true (1) if this is a form control element node. 12056 /// 12057 extern(System) int function (cef_domnode_t* self) nothrow is_form_control_element; 12058 12059 /// 12060 /// Returns the type of this form control element node. 12061 /// 12062 extern(System) cef_dom_form_control_type_t function ( 12063 cef_domnode_t* self) nothrow get_form_control_element_type; 12064 12065 /// 12066 /// Returns true (1) if this object is pointing to the same handle as |that| 12067 /// object. 12068 /// 12069 extern(System) int function (cef_domnode_t* self, cef_domnode_t* that) nothrow is_same; 12070 12071 /// 12072 /// Returns the name of this node. 12073 /// 12074 // The resulting string must be freed by calling cef_string_userfree_free(). 12075 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_name; 12076 12077 /// 12078 /// Returns the value of this node. 12079 /// 12080 // The resulting string must be freed by calling cef_string_userfree_free(). 12081 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_value; 12082 12083 /// 12084 /// Set the value of this node. Returns true (1) on success. 12085 /// 12086 extern(System) int function (cef_domnode_t* self, const(cef_string_t)* value) nothrow set_value; 12087 12088 /// 12089 /// Returns the contents of this node as markup. 12090 /// 12091 // The resulting string must be freed by calling cef_string_userfree_free(). 12092 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_as_markup; 12093 12094 /// 12095 /// Returns the document associated with this node. 12096 /// 12097 extern(System) cef_domdocument_t* function (cef_domnode_t* self) nothrow get_document; 12098 12099 /// 12100 /// Returns the parent node. 12101 /// 12102 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_parent; 12103 12104 /// 12105 /// Returns the previous sibling node. 12106 /// 12107 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_previous_sibling; 12108 12109 /// 12110 /// Returns the next sibling node. 12111 /// 12112 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_next_sibling; 12113 12114 /// 12115 /// Returns true (1) if this node has child nodes. 12116 /// 12117 extern(System) int function (cef_domnode_t* self) nothrow has_children; 12118 12119 /// 12120 /// Return the first child node. 12121 /// 12122 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_first_child; 12123 12124 /// 12125 /// Returns the last child node. 12126 /// 12127 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_last_child; 12128 12129 /// 12130 /// Returns the tag name of this element. 12131 /// 12132 // The resulting string must be freed by calling cef_string_userfree_free(). 12133 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_element_tag_name; 12134 12135 /// 12136 /// Returns true (1) if this element has attributes. 12137 /// 12138 extern(System) int function (cef_domnode_t* self) nothrow has_element_attributes; 12139 12140 /// 12141 /// Returns true (1) if this element has an attribute named |attrName|. 12142 /// 12143 extern(System) int function ( 12144 cef_domnode_t* self, 12145 const(cef_string_t)* attrName) nothrow has_element_attribute; 12146 12147 /// 12148 /// Returns the element attribute named |attrName|. 12149 /// 12150 // The resulting string must be freed by calling cef_string_userfree_free(). 12151 extern(System) cef_string_userfree_t function ( 12152 cef_domnode_t* self, 12153 const(cef_string_t)* attrName) nothrow get_element_attribute; 12154 12155 /// 12156 /// Returns a map of all element attributes. 12157 /// 12158 extern(System) void function ( 12159 cef_domnode_t* self, 12160 cef_string_map_t attrMap) nothrow get_element_attributes; 12161 12162 /// 12163 /// Set the value for the element attribute named |attrName|. Returns true (1) 12164 /// on success. 12165 /// 12166 extern(System) int function ( 12167 cef_domnode_t* self, 12168 const(cef_string_t)* attrName, 12169 const(cef_string_t)* value) nothrow set_element_attribute; 12170 12171 /// 12172 /// Returns the inner text of the element. 12173 /// 12174 // The resulting string must be freed by calling cef_string_userfree_free(). 12175 extern(System) cef_string_userfree_t function ( 12176 cef_domnode_t* self) nothrow get_element_inner_text; 12177 12178 /// 12179 /// Returns the bounds of the element in device pixels. Use 12180 /// "window.devicePixelRatio" to convert to/from CSS pixels. 12181 /// 12182 extern(System) cef_rect_t function (cef_domnode_t* self) nothrow get_element_bounds; 12183 } 12184 12185 12186 12187 // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_ 12188 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 12189 // 12190 // Redistribution and use in source and binary forms, with or without 12191 // modification, are permitted provided that the following conditions are 12192 // met: 12193 // 12194 // * Redistributions of source code must retain the above copyright 12195 // notice, this list of conditions and the following disclaimer. 12196 // * Redistributions in binary form must reproduce the above 12197 // copyright notice, this list of conditions and the following disclaimer 12198 // in the documentation and/or other materials provided with the 12199 // distribution. 12200 // * Neither the name of Google Inc. nor the name Chromium Embedded 12201 // Framework nor the names of its contributors may be used to endorse 12202 // or promote products derived from this software without specific prior 12203 // written permission. 12204 // 12205 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12206 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12207 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12208 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12209 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12210 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12211 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12212 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12213 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12214 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12215 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12216 // 12217 // --------------------------------------------------------------------------- 12218 // 12219 // This file was generated by the CEF translator tool and should not edited 12220 // by hand. See the translator.README.txt file in the tools directory for 12221 // more information. 12222 // 12223 // $hash=409a438b598bdae8a0728cb6d1a281d550c44841$ 12224 // 12225 12226 extern (C): 12227 12228 /// 12229 /// Callback structure used to asynchronously continue a download. 12230 /// 12231 /// NOTE: This struct is allocated DLL-side. 12232 /// 12233 struct cef_before_download_callback_t 12234 { 12235 /// 12236 /// Base structure. 12237 /// 12238 12239 /// 12240 /// Call to continue the download. Set |download_path| to the full file path 12241 /// for the download including the file name or leave blank to use the 12242 /// suggested name and the default temp directory. Set |show_dialog| to true 12243 /// (1) if you do wish to show the default "Save As" dialog. 12244 /// 12245 12246 cef_base_ref_counted_t base; 12247 extern(System) void function ( 12248 cef_before_download_callback_t* self, 12249 const(cef_string_t)* download_path, 12250 int show_dialog) nothrow cont; 12251 } 12252 12253 /// 12254 /// Callback structure used to asynchronously cancel a download. 12255 /// 12256 /// NOTE: This struct is allocated DLL-side. 12257 /// 12258 struct cef_download_item_callback_t 12259 { 12260 /// 12261 /// Base structure. 12262 /// 12263 cef_base_ref_counted_t base; 12264 12265 /// 12266 /// Call to cancel the download. 12267 /// 12268 extern(System) void function (cef_download_item_callback_t* self) nothrow cancel; 12269 12270 /// 12271 /// Call to pause the download. 12272 /// 12273 extern(System) void function (cef_download_item_callback_t* self) nothrow pause; 12274 12275 /// 12276 /// Call to resume the download. 12277 /// 12278 extern(System) void function (cef_download_item_callback_t* self) nothrow resume; 12279 } 12280 12281 12282 12283 /// 12284 /// Structure used to handle file downloads. The functions of this structure 12285 /// will called on the browser process UI thread. 12286 /// 12287 /// NOTE: This struct is allocated client-side. 12288 /// 12289 struct cef_download_handler_t 12290 { 12291 /// 12292 /// Base structure. 12293 /// 12294 cef_base_ref_counted_t base; 12295 12296 /// 12297 /// Called before a download begins in response to a user-initiated action 12298 /// (e.g. alt + link click or link click that returns a `Content-Disposition: 12299 /// attachment` response from the server). |url| is the target download URL 12300 /// and |request_function| is the target function (GET, POST, etc) nothrow. Return 12301 /// true (1) to proceed with the download or false (0) to cancel the download. 12302 /// 12303 extern(System) int function ( 12304 cef_download_handler_t* self, 12305 cef_browser_t* browser, 12306 const(cef_string_t)* url, 12307 const(cef_string_t)* request_method) nothrow can_download; 12308 12309 /// 12310 /// Called before a download begins. |suggested_name| is the suggested name 12311 /// for the download file. Return true (1) and execute |callback| either 12312 /// asynchronously or in this function to continue or cancel the download. 12313 /// Return false (0) to proceed with default handling (cancel with Alloy 12314 /// style, download shelf with Chrome style). Do not keep a reference to 12315 /// |download_item| outside of this function. 12316 /// 12317 extern(System) int function ( 12318 cef_download_handler_t* self, 12319 cef_browser_t* browser, 12320 cef_download_item_t* download_item, 12321 const(cef_string_t)* suggested_name, 12322 cef_before_download_callback_t* callback) nothrow on_before_download; 12323 12324 /// 12325 /// Called when a download's status or progress information has been updated. 12326 /// This may be called multiple times before and after on_before_download(). 12327 /// Execute |callback| either asynchronously or in this function to cancel the 12328 /// download if desired. Do not keep a reference to |download_item| outside of 12329 /// this function. 12330 /// 12331 extern(System) void function ( 12332 cef_download_handler_t* self, 12333 cef_browser_t* browser, 12334 cef_download_item_t* download_item, 12335 cef_download_item_callback_t* callback) nothrow on_download_updated; 12336 } 12337 12338 12339 12340 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ 12341 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 12342 // 12343 // Redistribution and use in source and binary forms, with or without 12344 // modification, are permitted provided that the following conditions are 12345 // met: 12346 // 12347 // * Redistributions of source code must retain the above copyright 12348 // notice, this list of conditions and the following disclaimer. 12349 // * Redistributions in binary form must reproduce the above 12350 // copyright notice, this list of conditions and the following disclaimer 12351 // in the documentation and/or other materials provided with the 12352 // distribution. 12353 // * Neither the name of Google Inc. nor the name Chromium Embedded 12354 // Framework nor the names of its contributors may be used to endorse 12355 // or promote products derived from this software without specific prior 12356 // written permission. 12357 // 12358 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12359 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12360 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12361 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12362 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12363 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12364 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12365 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12366 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12367 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12368 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12369 // 12370 // --------------------------------------------------------------------------- 12371 // 12372 // This file was generated by the CEF translator tool and should not edited 12373 // by hand. See the translator.README.txt file in the tools directory for 12374 // more information. 12375 // 12376 // $hash=7a70a551184bfa12ef6dddeea66fd585943c3c70$ 12377 // 12378 12379 extern (C): 12380 12381 /// 12382 /// Structure used to represent a download item. 12383 /// 12384 /// NOTE: This struct is allocated DLL-side. 12385 /// 12386 struct cef_download_item_t 12387 { 12388 /// 12389 /// Base structure. 12390 /// 12391 12392 /// 12393 /// Returns true (1) if this object is valid. Do not call any other functions 12394 /// if this function returns false (0). 12395 /// 12396 12397 /// 12398 /// Returns true (1) if the download is in progress. 12399 /// 12400 12401 /// 12402 /// Returns true (1) if the download is complete. 12403 /// 12404 12405 /// 12406 /// Returns true (1) if the download has been canceled. 12407 /// 12408 12409 cef_base_ref_counted_t base; 12410 extern(System) int function (cef_download_item_t* self) nothrow is_valid; 12411 extern(System) int function (cef_download_item_t* self) nothrow is_in_progress; 12412 extern(System) int function (cef_download_item_t* self) nothrow is_complete; 12413 extern(System) int function (cef_download_item_t* self) nothrow is_canceled; 12414 12415 /// 12416 /// Returns true (1) if the download has been interrupted. 12417 /// 12418 extern(System) int function (cef_download_item_t* self) nothrow is_interrupted; 12419 12420 /// 12421 /// Returns the most recent interrupt reason. 12422 /// 12423 extern(System) cef_download_interrupt_reason_t function ( 12424 cef_download_item_t* self) nothrow get_interrupt_reason; 12425 12426 /// 12427 /// Returns a simple speed estimate in bytes/s. 12428 /// 12429 extern(System) long function (cef_download_item_t* self) nothrow get_current_speed; 12430 12431 /// 12432 /// Returns the rough percent complete or -1 if the receive total size is 12433 /// unknown. 12434 /// 12435 extern(System) int function (cef_download_item_t* self) nothrow get_percent_complete; 12436 12437 /// 12438 /// Returns the total number of bytes. 12439 /// 12440 extern(System) long function (cef_download_item_t* self) nothrow get_total_bytes; 12441 12442 /// 12443 /// Returns the number of received bytes. 12444 /// 12445 extern(System) long function (cef_download_item_t* self) nothrow get_received_bytes; 12446 12447 /// 12448 /// Returns the time that the download started. 12449 /// 12450 extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_start_time; 12451 12452 /// 12453 /// Returns the time that the download ended. 12454 /// 12455 extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_end_time; 12456 12457 /// 12458 /// Returns the full path to the downloaded or downloading file. 12459 /// 12460 // The resulting string must be freed by calling cef_string_userfree_free(). 12461 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_full_path; 12462 12463 /// 12464 /// Returns the unique identifier for this download. 12465 /// 12466 extern(System) uint function (cef_download_item_t* self) nothrow get_id; 12467 12468 /// 12469 /// Returns the URL. 12470 /// 12471 // The resulting string must be freed by calling cef_string_userfree_free(). 12472 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_url; 12473 12474 /// 12475 /// Returns the original URL before any redirections. 12476 /// 12477 // The resulting string must be freed by calling cef_string_userfree_free(). 12478 extern(System) cef_string_userfree_t function ( 12479 cef_download_item_t* self) nothrow get_original_url; 12480 12481 /// 12482 /// Returns the suggested file name. 12483 /// 12484 // The resulting string must be freed by calling cef_string_userfree_free(). 12485 extern(System) cef_string_userfree_t function ( 12486 cef_download_item_t* self) nothrow get_suggested_file_name; 12487 12488 /// 12489 /// Returns the content disposition. 12490 /// 12491 // The resulting string must be freed by calling cef_string_userfree_free(). 12492 extern(System) cef_string_userfree_t function ( 12493 cef_download_item_t* self) nothrow get_content_disposition; 12494 12495 /// 12496 /// Returns the mime type. 12497 /// 12498 // The resulting string must be freed by calling cef_string_userfree_free(). 12499 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_mime_type; 12500 } 12501 12502 12503 12504 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ 12505 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 12506 // 12507 // Redistribution and use in source and binary forms, with or without 12508 // modification, are permitted provided that the following conditions are 12509 // met: 12510 // 12511 // * Redistributions of source code must retain the above copyright 12512 // notice, this list of conditions and the following disclaimer. 12513 // * Redistributions in binary form must reproduce the above 12514 // copyright notice, this list of conditions and the following disclaimer 12515 // in the documentation and/or other materials provided with the 12516 // distribution. 12517 // * Neither the name of Google Inc. nor the name Chromium Embedded 12518 // Framework nor the names of its contributors may be used to endorse 12519 // or promote products derived from this software without specific prior 12520 // written permission. 12521 // 12522 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12523 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12524 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12525 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12526 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12527 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12528 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12529 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12530 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12531 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12532 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12533 // 12534 // --------------------------------------------------------------------------- 12535 // 12536 // This file was generated by the CEF translator tool and should not edited 12537 // by hand. See the translator.README.txt file in the tools directory for 12538 // more information. 12539 // 12540 // $hash=54a8ac1ecd79da5fe7a02bc176c9b9d9a480f0d1$ 12541 // 12542 12543 extern (C): 12544 12545 /// 12546 /// Structure used to represent drag data. The functions of this structure may 12547 /// be called on any thread. 12548 /// 12549 /// NOTE: This struct is allocated DLL-side. 12550 /// 12551 struct cef_drag_data_t 12552 { 12553 /// 12554 /// Base structure. 12555 /// 12556 12557 /// 12558 /// Returns a copy of the current object. 12559 /// 12560 12561 /// 12562 /// Returns true (1) if this object is read-only. 12563 /// 12564 12565 /// 12566 /// Returns true (1) if the drag data is a link. 12567 /// 12568 12569 /// 12570 /// Returns true (1) if the drag data is a text or html fragment. 12571 /// 12572 12573 cef_base_ref_counted_t base; 12574 extern(System) cef_drag_data_t* function (cef_drag_data_t* self) nothrow clone; 12575 extern(System) int function (cef_drag_data_t* self) nothrow is_read_only; 12576 extern(System) int function (cef_drag_data_t* self) nothrow is_link; 12577 extern(System) int function (cef_drag_data_t* self) nothrow is_fragment; 12578 12579 /// 12580 /// Returns true (1) if the drag data is a file. 12581 /// 12582 extern(System) int function (cef_drag_data_t* self) nothrow is_file; 12583 12584 /// 12585 /// Return the link URL that is being dragged. 12586 /// 12587 // The resulting string must be freed by calling cef_string_userfree_free(). 12588 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_url; 12589 12590 /// 12591 /// Return the title associated with the link being dragged. 12592 /// 12593 // The resulting string must be freed by calling cef_string_userfree_free(). 12594 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_title; 12595 12596 /// 12597 /// Return the metadata, if any, associated with the link being dragged. 12598 /// 12599 // The resulting string must be freed by calling cef_string_userfree_free(). 12600 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_metadata; 12601 12602 /// 12603 /// Return the plain text fragment that is being dragged. 12604 /// 12605 // The resulting string must be freed by calling cef_string_userfree_free(). 12606 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_text; 12607 12608 /// 12609 /// Return the text/html fragment that is being dragged. 12610 /// 12611 // The resulting string must be freed by calling cef_string_userfree_free(). 12612 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_html; 12613 12614 /// 12615 /// Return the base URL that the fragment came from. This value is used for 12616 /// resolving relative URLs and may be NULL. 12617 /// 12618 // The resulting string must be freed by calling cef_string_userfree_free(). 12619 extern(System) cef_string_userfree_t function ( 12620 cef_drag_data_t* self) nothrow get_fragment_base_url; 12621 12622 /// 12623 /// Return the name of the file being dragged out of the browser window. 12624 /// 12625 // The resulting string must be freed by calling cef_string_userfree_free(). 12626 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_file_name; 12627 12628 /// 12629 /// Write the contents of the file being dragged out of the web view into 12630 /// |writer|. Returns the number of bytes sent to |writer|. If |writer| is 12631 /// NULL this function will return the size of the file contents in bytes. 12632 /// Call get_file_name() to get a suggested name for the file. 12633 /// 12634 extern(System) size_t function ( 12635 cef_drag_data_t* self, 12636 cef_stream_writer_t* writer) nothrow get_file_contents; 12637 12638 /// 12639 /// Retrieve the list of file names that are being dragged into the browser 12640 /// window. 12641 /// 12642 extern(System) int function ( 12643 cef_drag_data_t* self, 12644 cef_string_list_t names) nothrow get_file_names; 12645 12646 /// 12647 /// Retrieve the list of file paths that are being dragged into the browser 12648 /// window. 12649 /// 12650 extern(System) int function ( 12651 cef_drag_data_t* self, 12652 cef_string_list_t paths) nothrow get_file_paths; 12653 12654 /// 12655 /// Set the link URL that is being dragged. 12656 /// 12657 extern(System) void function ( 12658 cef_drag_data_t* self, 12659 const(cef_string_t)* url) nothrow set_link_url; 12660 12661 /// 12662 /// Set the title associated with the link being dragged. 12663 /// 12664 extern(System) void function ( 12665 cef_drag_data_t* self, 12666 const(cef_string_t)* title) nothrow set_link_title; 12667 12668 /// 12669 /// Set the metadata associated with the link being dragged. 12670 /// 12671 extern(System) void function ( 12672 cef_drag_data_t* self, 12673 const(cef_string_t)* data) nothrow set_link_metadata; 12674 12675 /// 12676 /// Set the plain text fragment that is being dragged. 12677 /// 12678 extern(System) void function ( 12679 cef_drag_data_t* self, 12680 const(cef_string_t)* text) nothrow set_fragment_text; 12681 12682 /// 12683 /// Set the text/html fragment that is being dragged. 12684 /// 12685 extern(System) void function ( 12686 cef_drag_data_t* self, 12687 const(cef_string_t)* html) nothrow set_fragment_html; 12688 12689 /// 12690 /// Set the base URL that the fragment came from. 12691 /// 12692 extern(System) void function ( 12693 cef_drag_data_t* self, 12694 const(cef_string_t)* base_url) nothrow set_fragment_base_url; 12695 12696 /// 12697 /// Reset the file contents. You should do this before calling 12698 /// cef_browser_host_t::DragTargetDragEnter as the web view does not allow us 12699 /// to drag in this kind of data. 12700 /// 12701 extern(System) void function (cef_drag_data_t* self) nothrow reset_file_contents; 12702 12703 /// 12704 /// Add a file that is being dragged into the webview. 12705 /// 12706 extern(System) void function ( 12707 cef_drag_data_t* self, 12708 const(cef_string_t)* path, 12709 const(cef_string_t)* display_name) nothrow add_file; 12710 12711 /// 12712 /// Clear list of filenames. 12713 /// 12714 extern(System) void function (cef_drag_data_t* self) nothrow clear_filenames; 12715 12716 /// 12717 /// Get the image representation of drag data. May return NULL if no image 12718 /// representation is available. 12719 /// 12720 extern(System) cef_image_t* function (cef_drag_data_t* self) nothrow get_image; 12721 12722 /// 12723 /// Get the image hotspot (drag start location relative to image dimensions). 12724 /// 12725 extern(System) cef_point_t function (cef_drag_data_t* self) nothrow get_image_hotspot; 12726 12727 /// 12728 /// Returns true (1) if an image representation of drag data is available. 12729 /// 12730 extern(System) int function (cef_drag_data_t* self) nothrow has_image; 12731 } 12732 12733 12734 12735 /// 12736 /// Create a new cef_drag_data_t object. 12737 /// 12738 cef_drag_data_t* cef_drag_data_create (); 12739 12740 // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_ 12741 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 12742 // 12743 // Redistribution and use in source and binary forms, with or without 12744 // modification, are permitted provided that the following conditions are 12745 // met: 12746 // 12747 // * Redistributions of source code must retain the above copyright 12748 // notice, this list of conditions and the following disclaimer. 12749 // * Redistributions in binary form must reproduce the above 12750 // copyright notice, this list of conditions and the following disclaimer 12751 // in the documentation and/or other materials provided with the 12752 // distribution. 12753 // * Neither the name of Google Inc. nor the name Chromium Embedded 12754 // Framework nor the names of its contributors may be used to endorse 12755 // or promote products derived from this software without specific prior 12756 // written permission. 12757 // 12758 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12759 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12760 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12761 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12762 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12763 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12764 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12765 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12766 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12767 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12768 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12769 // 12770 // --------------------------------------------------------------------------- 12771 // 12772 // This file was generated by the CEF translator tool and should not edited 12773 // by hand. See the translator.README.txt file in the tools directory for 12774 // more information. 12775 // 12776 // $hash=8f69a9cffadf663bbe69230e8210dcda768038e5$ 12777 // 12778 12779 extern (C): 12780 12781 /// 12782 /// Implement this structure to handle events related to dragging. The functions 12783 /// of this structure will be called on the UI thread. 12784 /// 12785 /// NOTE: This struct is allocated client-side. 12786 /// 12787 struct cef_drag_handler_t 12788 { 12789 /// 12790 /// Base structure. 12791 /// 12792 12793 /// 12794 /// Called when an external drag event enters the browser window. |dragData| 12795 /// contains the drag event data and |mask| represents the type of drag 12796 /// operation. Return false (0) for default drag handling behavior or true (1) 12797 /// to cancel the drag event. 12798 /// 12799 12800 cef_base_ref_counted_t base; 12801 extern(System) int function ( 12802 cef_drag_handler_t* self, 12803 cef_browser_t* browser, 12804 cef_drag_data_t* dragData, 12805 cef_drag_operations_mask_t mask) nothrow on_drag_enter; 12806 12807 /// 12808 /// Called whenever draggable regions for the browser window change. These can 12809 /// be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If 12810 /// draggable regions are never defined in a document this function will also 12811 /// never be called. If the last draggable region is removed from a document 12812 /// this function will be called with an NULL vector. 12813 /// 12814 extern(System) void function ( 12815 cef_drag_handler_t* self, 12816 cef_browser_t* browser, 12817 cef_frame_t* frame, 12818 size_t regionsCount, 12819 const(cef_draggable_region_t)* regions) nothrow on_draggable_regions_changed; 12820 } 12821 12822 12823 12824 // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ 12825 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 12826 // 12827 // Redistribution and use in source and binary forms, with or without 12828 // modification, are permitted provided that the following conditions are 12829 // met: 12830 // 12831 // * Redistributions of source code must retain the above copyright 12832 // notice, this list of conditions and the following disclaimer. 12833 // * Redistributions in binary form must reproduce the above 12834 // copyright notice, this list of conditions and the following disclaimer 12835 // in the documentation and/or other materials provided with the 12836 // distribution. 12837 // * Neither the name of Google Inc. nor the name Chromium Embedded 12838 // Framework nor the names of its contributors may be used to endorse 12839 // or promote products derived from this software without specific prior 12840 // written permission. 12841 // 12842 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12843 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12844 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12845 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12846 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12847 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12848 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12849 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12850 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12851 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12852 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12853 // 12854 // --------------------------------------------------------------------------- 12855 // 12856 // This file was generated by the CEF translator tool and should not edited 12857 // by hand. See the translator.README.txt file in the tools directory for 12858 // more information. 12859 // 12860 // $hash=05bfcb46c5f93e280a389f4fb7108483f5324db5$ 12861 // 12862 12863 extern (C): 12864 12865 /// 12866 /// Creates a directory and all parent directories if they don't already exist. 12867 /// Returns true (1) on successful creation or if the directory already exists. 12868 /// The directory is only readable by the current user. Calling this function on 12869 /// the browser process UI or IO threads is not allowed. 12870 /// 12871 int cef_create_directory (const(cef_string_t)* full_path); 12872 12873 /// 12874 /// Get the temporary directory provided by the system. 12875 /// 12876 /// WARNING: In general, you should use the temp directory variants below 12877 /// instead of this function. Those variants will ensure that the proper 12878 /// permissions are set so that other users on the system can't edit them while 12879 /// they're open (which could lead to security issues). 12880 /// 12881 int cef_get_temp_directory (cef_string_t* temp_dir); 12882 12883 /// 12884 /// Creates a new directory. On Windows if |prefix| is provided the new 12885 /// directory name is in the format of "prefixyyyy". Returns true (1) on success 12886 /// and sets |new_temp_path| to the full path of the directory that was created. 12887 /// The directory is only readable by the current user. Calling this function on 12888 /// the browser process UI or IO threads is not allowed. 12889 /// 12890 int cef_create_new_temp_directory ( 12891 const(cef_string_t)* prefix, 12892 cef_string_t* new_temp_path); 12893 12894 /// 12895 /// Creates a directory within another directory. Extra characters will be 12896 /// appended to |prefix| to ensure that the new directory does not have the same 12897 /// name as an existing directory. Returns true (1) on success and sets 12898 /// |new_dir| to the full path of the directory that was created. The directory 12899 /// is only readable by the current user. Calling this function on the browser 12900 /// process UI or IO threads is not allowed. 12901 /// 12902 int cef_create_temp_directory_in_directory ( 12903 const(cef_string_t)* base_dir, 12904 const(cef_string_t)* prefix, 12905 cef_string_t* new_dir); 12906 12907 /// 12908 /// Returns true (1) if the given path exists and is a directory. Calling this 12909 /// function on the browser process UI or IO threads is not allowed. 12910 /// 12911 int cef_directory_exists (const(cef_string_t)* path); 12912 12913 /// 12914 /// Deletes the given path whether it's a file or a directory. If |path| is a 12915 /// directory all contents will be deleted. If |recursive| is true (1) any sub- 12916 /// directories and their contents will also be deleted (equivalent to executing 12917 /// "rm -rf", so use with caution). On POSIX environments if |path| is a 12918 /// symbolic link then only the symlink will be deleted. Returns true (1) on 12919 /// successful deletion or if |path| does not exist. Calling this function on 12920 /// the browser process UI or IO threads is not allowed. 12921 /// 12922 int cef_delete_file (const(cef_string_t)* path, int recursive); 12923 12924 /// 12925 /// Writes the contents of |src_dir| into a zip archive at |dest_file|. If 12926 /// |include_hidden_files| is true (1) files starting with "." will be included. 12927 /// Returns true (1) on success. Calling this function on the browser process 12928 /// UI or IO threads is not allowed. 12929 /// 12930 int cef_zip_directory ( 12931 const(cef_string_t)* src_dir, 12932 const(cef_string_t)* dest_file, 12933 int include_hidden_files); 12934 12935 /// 12936 /// Loads the existing "Certificate Revocation Lists" file that is managed by 12937 /// Google Chrome. This file can generally be found in Chrome's User Data 12938 /// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on 12939 /// Windows) and is updated periodically by Chrome's component updater service. 12940 /// Must be called in the browser process after the context has been 12941 /// initialized. See https://dev.chromium.org/Home/chromium-security/crlsets for 12942 /// background. 12943 /// 12944 void cef_load_crlsets_file (const(cef_string_t)* path); 12945 12946 // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_ 12947 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 12948 // 12949 // Redistribution and use in source and binary forms, with or without 12950 // modification, are permitted provided that the following conditions are 12951 // met: 12952 // 12953 // * Redistributions of source code must retain the above copyright 12954 // notice, this list of conditions and the following disclaimer. 12955 // * Redistributions in binary form must reproduce the above 12956 // copyright notice, this list of conditions and the following disclaimer 12957 // in the documentation and/or other materials provided with the 12958 // distribution. 12959 // * Neither the name of Google Inc. nor the name Chromium Embedded 12960 // Framework nor the names of its contributors may be used to endorse 12961 // or promote products derived from this software without specific prior 12962 // written permission. 12963 // 12964 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12965 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12966 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12967 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12968 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12969 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12970 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12971 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12972 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12973 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12974 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12975 // 12976 // --------------------------------------------------------------------------- 12977 // 12978 // This file was generated by the CEF translator tool and should not edited 12979 // by hand. See the translator.README.txt file in the tools directory for 12980 // more information. 12981 // 12982 // $hash=dedc73aa9a27ee614d17cf1f15670675c31351ac$ 12983 // 12984 12985 extern (C): 12986 12987 /// 12988 /// Implement this structure to handle events related to find results. The 12989 /// functions of this structure will be called on the UI thread. 12990 /// 12991 /// NOTE: This struct is allocated client-side. 12992 /// 12993 struct cef_find_handler_t 12994 { 12995 /// 12996 /// Base structure. 12997 /// 12998 12999 /// 13000 /// Called to report find results returned by cef_browser_host_t::find(). 13001 /// |identifer| is a unique incremental identifier for the currently active 13002 /// search, |count| is the number of matches currently identified, 13003 /// |selectionRect| is the location of where the match was found (in window 13004 /// coordinates), |activeMatchOrdinal| is the current position in the search 13005 /// results, and |finalUpdate| is true (1) if this is the last find 13006 /// notification. 13007 /// 13008 13009 cef_base_ref_counted_t base; 13010 extern(System) void function ( 13011 cef_find_handler_t* self, 13012 cef_browser_t* browser, 13013 int identifier, 13014 int count, 13015 const(cef_rect_t)* selectionRect, 13016 int activeMatchOrdinal, 13017 int finalUpdate) nothrow on_find_result; 13018 } 13019 13020 13021 13022 // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_ 13023 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 13024 // 13025 // Redistribution and use in source and binary forms, with or without 13026 // modification, are permitted provided that the following conditions are 13027 // met: 13028 // 13029 // * Redistributions of source code must retain the above copyright 13030 // notice, this list of conditions and the following disclaimer. 13031 // * Redistributions in binary form must reproduce the above 13032 // copyright notice, this list of conditions and the following disclaimer 13033 // in the documentation and/or other materials provided with the 13034 // distribution. 13035 // * Neither the name of Google Inc. nor the name Chromium Embedded 13036 // Framework nor the names of its contributors may be used to endorse 13037 // or promote products derived from this software without specific prior 13038 // written permission. 13039 // 13040 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13041 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13042 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13043 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13044 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13045 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13046 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13047 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13048 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13049 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13050 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13051 // 13052 // --------------------------------------------------------------------------- 13053 // 13054 // This file was generated by the CEF translator tool and should not edited 13055 // by hand. See the translator.README.txt file in the tools directory for 13056 // more information. 13057 // 13058 // $hash=985e0376dc9951e1801f24d09d232705e9bf6373$ 13059 // 13060 13061 extern (C): 13062 13063 /// 13064 /// Implement this structure to handle events related to focus. The functions of 13065 /// this structure will be called on the UI thread. 13066 /// 13067 /// NOTE: This struct is allocated client-side. 13068 /// 13069 struct cef_focus_handler_t 13070 { 13071 /// 13072 /// Base structure. 13073 /// 13074 13075 /// 13076 /// Called when the browser component is about to loose focus. For instance, 13077 /// if focus was on the last HTML element and the user pressed the TAB key. 13078 /// |next| will be true (1) if the browser is giving focus to the next 13079 /// component and false (0) if the browser is giving focus to the previous 13080 /// component. 13081 /// 13082 13083 cef_base_ref_counted_t base; 13084 extern(System) void function ( 13085 cef_focus_handler_t* self, 13086 cef_browser_t* browser, 13087 int next) nothrow on_take_focus; 13088 13089 /// 13090 /// Called when the browser component is requesting focus. |source| indicates 13091 /// where the focus request is originating from. Return false (0) to allow the 13092 /// focus to be set or true (1) to cancel setting the focus. 13093 /// 13094 extern(System) int function ( 13095 cef_focus_handler_t* self, 13096 cef_browser_t* browser, 13097 cef_focus_source_t source) nothrow on_set_focus; 13098 13099 /// 13100 /// Called when the browser component has received focus. 13101 /// 13102 extern(System) void function ( 13103 cef_focus_handler_t* self, 13104 cef_browser_t* browser) nothrow on_got_focus; 13105 } 13106 13107 13108 13109 // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ 13110 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 13111 // 13112 // Redistribution and use in source and binary forms, with or without 13113 // modification, are permitted provided that the following conditions are 13114 // met: 13115 // 13116 // * Redistributions of source code must retain the above copyright 13117 // notice, this list of conditions and the following disclaimer. 13118 // * Redistributions in binary form must reproduce the above 13119 // copyright notice, this list of conditions and the following disclaimer 13120 // in the documentation and/or other materials provided with the 13121 // distribution. 13122 // * Neither the name of Google Inc. nor the name Chromium Embedded 13123 // Framework nor the names of its contributors may be used to endorse 13124 // or promote products derived from this software without specific prior 13125 // written permission. 13126 // 13127 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13128 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13129 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13130 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13131 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13132 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13133 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13134 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13135 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13136 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13137 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13138 // 13139 // --------------------------------------------------------------------------- 13140 // 13141 // This file was generated by the CEF translator tool and should not edited 13142 // by hand. See the translator.README.txt file in the tools directory for 13143 // more information. 13144 // 13145 // $hash=b0b10042cc19c3120f0ee101ed86ab3e5bd9de9d$ 13146 // 13147 13148 extern (C): 13149 13150 13151 13152 13153 13154 13155 /// 13156 /// Structure used to represent a frame in the browser window. When used in the 13157 /// browser process the functions of this structure may be called on any thread 13158 /// unless otherwise indicated in the comments. When used in the render process 13159 /// the functions of this structure may only be called on the main thread. 13160 /// 13161 /// NOTE: This struct is allocated DLL-side. 13162 /// 13163 struct cef_frame_t 13164 { 13165 /// 13166 /// Base structure. 13167 /// 13168 13169 /// 13170 /// True if this object is currently attached to a valid frame. 13171 13172 cef_base_ref_counted_t base; 13173 /// 13174 extern(System) int function (cef_frame_t* self) nothrow is_valid; 13175 13176 /// 13177 /// Execute undo in this frame. 13178 /// 13179 extern(System) void function (cef_frame_t* self) nothrow undo; 13180 13181 /// 13182 /// Execute redo in this frame. 13183 /// 13184 extern(System) void function (cef_frame_t* self) nothrow redo; 13185 13186 /// 13187 /// Execute cut in this frame. 13188 /// 13189 extern(System) void function (cef_frame_t* self) nothrow cut; 13190 13191 /// 13192 /// Execute copy in this frame. 13193 /// 13194 extern(System) void function (cef_frame_t* self) nothrow copy; 13195 13196 /// 13197 /// Execute paste in this frame. 13198 /// 13199 extern(System) void function (cef_frame_t* self) nothrow paste; 13200 13201 /// 13202 /// Execute paste and match style in this frame. 13203 /// 13204 extern(System) void function (cef_frame_t* self) nothrow paste_and_match_style; 13205 13206 /// 13207 /// Execute delete in this frame. 13208 /// 13209 extern(System) void function (cef_frame_t* self) nothrow del; 13210 13211 /// 13212 /// Execute select all in this frame. 13213 /// 13214 extern(System) void function (cef_frame_t* self) nothrow select_all; 13215 13216 /// 13217 /// Save this frame's HTML source to a temporary file and open it in the 13218 /// default text viewing application. This function can only be called from 13219 /// the browser process. 13220 /// 13221 extern(System) void function (cef_frame_t* self) nothrow view_source; 13222 13223 /// 13224 /// Retrieve this frame's HTML source as a string sent to the specified 13225 /// visitor. 13226 /// 13227 extern(System) void function ( 13228 cef_frame_t* self, 13229 cef_string_visitor_t* visitor) nothrow get_source; 13230 13231 /// 13232 /// Retrieve this frame's display text as a string sent to the specified 13233 /// visitor. 13234 /// 13235 extern(System) void function ( 13236 cef_frame_t* self, 13237 cef_string_visitor_t* visitor) nothrow get_text; 13238 13239 /// 13240 /// Load the request represented by the |request| object. 13241 /// 13242 /// WARNING: This function will fail with "bad IPC message" reason 13243 /// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request 13244 /// origin using some other mechanism (LoadURL, link click, etc). 13245 /// 13246 extern(System) void function (cef_frame_t* self, cef_request_t* request) nothrow load_request; 13247 13248 /// 13249 /// Load the specified |url|. 13250 /// 13251 extern(System) void function (cef_frame_t* self, const(cef_string_t)* url) nothrow load_url; 13252 13253 /// 13254 /// Execute a string of JavaScript code in this frame. The |script_url| 13255 /// parameter is the URL where the script in question can be found, if any. 13256 /// The renderer may request this URL to show the developer the source of the 13257 /// error. The |start_line| parameter is the base line number to use for 13258 /// error reporting. 13259 /// 13260 extern(System) void function ( 13261 cef_frame_t* self, 13262 const(cef_string_t)* code, 13263 const(cef_string_t)* script_url, 13264 int start_line) nothrow execute_java_script; 13265 13266 /// 13267 /// Returns true (1) if this is the main (top-level) frame. 13268 /// 13269 extern(System) int function (cef_frame_t* self) nothrow is_main; 13270 13271 /// 13272 /// Returns true (1) if this is the focused frame. 13273 /// 13274 extern(System) int function (cef_frame_t* self) nothrow is_focused; 13275 13276 /// 13277 /// Returns the name for this frame. If the frame has an assigned name (for 13278 /// example, set via the iframe "name" attribute) then that value will be 13279 /// returned. Otherwise a unique name will be constructed based on the frame 13280 /// parent hierarchy. The main (top-level) frame will always have an NULL name 13281 /// value. 13282 /// 13283 // The resulting string must be freed by calling cef_string_userfree_free(). 13284 extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_name; 13285 13286 /// 13287 /// Returns the globally unique identifier for this frame or NULL if the 13288 /// underlying frame does not yet exist. 13289 /// 13290 // The resulting string must be freed by calling cef_string_userfree_free(). 13291 extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_identifier; 13292 13293 /// 13294 /// Returns the parent of this frame or NULL if this is the main (top-level) 13295 /// frame. 13296 /// 13297 extern(System) cef_frame_t* function (cef_frame_t* self) nothrow get_parent; 13298 13299 /// 13300 /// Returns the URL currently loaded in this frame. 13301 /// 13302 // The resulting string must be freed by calling cef_string_userfree_free(). 13303 extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_url; 13304 13305 /// 13306 /// Returns the browser that this frame belongs to. 13307 /// 13308 extern(System) cef_browser_t* function (cef_frame_t* self) nothrow get_browser; 13309 13310 /// 13311 /// Get the V8 context associated with the frame. This function can only be 13312 /// called from the render process. 13313 /// 13314 extern(System) cef_v8_context_t* function (cef_frame_t* self) nothrow get_v8_context; 13315 13316 /// 13317 /// Visit the DOM document. This function can only be called from the render 13318 /// process. 13319 /// 13320 extern(System) void function (cef_frame_t* self, cef_domvisitor_t* visitor) nothrow visit_dom; 13321 13322 /// 13323 /// Create a new URL request that will be treated as originating from this 13324 /// frame and the associated browser. Use cef_urlrequest_t::Create instead if 13325 /// you do not want the request to have this association, in which case it may 13326 /// be handled differently (see documentation on that function). A request 13327 /// created with this function may only originate from the browser process, 13328 /// and will behave as follows: 13329 /// - It may be intercepted by the client via CefResourceRequestHandler or 13330 /// CefSchemeHandlerFactory. 13331 /// - POST data may only contain a single element of type PDE_TYPE_FILE or 13332 /// PDE_TYPE_BYTES. 13333 /// 13334 /// The |request| object will be marked as read-only after calling this 13335 /// function. 13336 /// 13337 extern(System) cef_urlrequest_t* function ( 13338 cef_frame_t* self, 13339 cef_request_t* request, 13340 cef_urlrequest_client_t* client) nothrow create_urlrequest; 13341 13342 /// 13343 /// Send a message to the specified |target_process|. Ownership of the message 13344 /// contents will be transferred and the |message| reference will be 13345 /// invalidated. Message delivery is not guaranteed in all cases (for example, 13346 /// if the browser is closing, navigating, or if the target process crashes). 13347 /// Send an ACK message back from the target process if confirmation is 13348 /// required. 13349 /// 13350 extern(System) void function ( 13351 cef_frame_t* self, 13352 cef_process_id_t target_process, 13353 cef_process_message_t* message) nothrow send_process_message; 13354 } 13355 13356 13357 13358 // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ 13359 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 13360 // 13361 // Redistribution and use in source and binary forms, with or without 13362 // modification, are permitted provided that the following conditions are 13363 // met: 13364 // 13365 // * Redistributions of source code must retain the above copyright 13366 // notice, this list of conditions and the following disclaimer. 13367 // * Redistributions in binary form must reproduce the above 13368 // copyright notice, this list of conditions and the following disclaimer 13369 // in the documentation and/or other materials provided with the 13370 // distribution. 13371 // * Neither the name of Google Inc. nor the name Chromium Embedded 13372 // Framework nor the names of its contributors may be used to endorse 13373 // or promote products derived from this software without specific prior 13374 // written permission. 13375 // 13376 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13377 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13378 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13379 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13380 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13381 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13382 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13383 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13384 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13385 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13386 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13387 // 13388 // --------------------------------------------------------------------------- 13389 // 13390 // This file was generated by the CEF translator tool and should not edited 13391 // by hand. See the translator.README.txt file in the tools directory for 13392 // more information. 13393 // 13394 // $hash=965da5d7c93b61b4ce758db80f1c49ceeb2cd9e9$ 13395 // 13396 13397 extern (C): 13398 13399 /// 13400 /// Implement this structure to handle events related to cef_frame_t life span. 13401 /// The order of callbacks is: 13402 /// 13403 /// (1) During initial cef_browser_host_t creation and navigation of the main 13404 /// frame: 13405 /// - cef_frame_handler_t::OnFrameCreated => The initial main frame object has 13406 /// been created. Any commands will be queued until the frame is attached. 13407 /// - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object 13408 /// has been assigned to the browser. 13409 /// - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and 13410 /// can be used. 13411 /// - cef_frame_handler_t::OnFrameAttached => The initial main frame object is 13412 /// now connected to its peer in the renderer process. Commands can be routed. 13413 /// 13414 /// (2) During further cef_browser_host_t navigation/loading of the main frame 13415 /// and/or sub-frames: 13416 /// - cef_frame_handler_t::OnFrameCreated => A new main frame or sub-frame 13417 /// object has been created. Any commands will be queued until the frame is 13418 /// attached. 13419 /// - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame 13420 /// object is now connected to its peer in the renderer process. Commands can 13421 /// be routed. 13422 /// - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub- 13423 /// frame object has lost its connection to the renderer process. If multiple 13424 /// objects are detached at the same time then notifications will be sent for 13425 /// any sub-frame objects before the main frame object. Commands can no longer 13426 /// be routed and will be discarded. 13427 /// - CefFremeHadler::OnFrameDestroyed => An existing main frame or sub-frame 13428 /// object has been destroyed. 13429 /// - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has 13430 /// been assigned to the browser. This will only occur with cross-origin 13431 /// navigation or re-navigation after renderer process termination (due to 13432 /// crashes, etc). 13433 /// 13434 /// (3) During final cef_browser_host_t destruction of the main frame: 13435 /// - cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost 13436 /// their connection to the renderer process. Commands can no longer be routed 13437 /// and will be discarded. 13438 /// - CefFreameHandler::OnFrameDestroyed => Any sub-frame objects have been 13439 /// destroyed. 13440 /// - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed. 13441 /// - cef_frame_handler_t::OnFrameDetached => The main frame object have lost 13442 /// its connection to the renderer process. Notifications will be sent for any 13443 /// sub-frame objects before the main frame object. Commands can no longer be 13444 /// routed and will be discarded. 13445 /// - CefFreameHandler::OnFrameDestroyed => The main frame object has been 13446 /// destroyed. 13447 /// - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has 13448 /// been removed from the browser. 13449 /// 13450 /// Special handling applies for cross-origin loading on creation/navigation of 13451 /// sub-frames, and cross-origin loading on creation of new popup browsers. A 13452 /// temporary frame will first be created in the parent frame's renderer 13453 /// process. This temporary frame will never attach and will be discarded after 13454 /// the real cross-origin frame is created in the new/target renderer process. 13455 /// The client will receive creation callbacks for the temporary frame, followed 13456 /// by cross-origin navigation callbacks (2) for the transition from the 13457 /// temporary frame to the real frame. The temporary frame will not receive or 13458 /// execute commands during this transitional period (any sent commands will be 13459 /// discarded). 13460 /// 13461 /// When the main frame navigates to a different origin the OnMainFrameChanged 13462 /// callback (2) will be executed with the old and new main frame objects. 13463 /// 13464 /// Callbacks will not be executed for placeholders that may be created during 13465 /// pre-commit navigation for sub-frames that do not yet exist in the renderer 13466 /// process. Placeholders will have cef_frame_t::get_identifier() == -4. 13467 /// 13468 /// The functions of this structure will be called on the UI thread unless 13469 /// otherwise indicated. 13470 /// 13471 /// NOTE: This struct is allocated client-side. 13472 /// 13473 struct cef_frame_handler_t 13474 { 13475 /// 13476 /// Base structure. 13477 /// 13478 13479 cef_base_ref_counted_t base; 13480 13481 /// 13482 /// Called when a new frame is created. This will be the first notification 13483 /// that references |frame|. Any commands that require transport to the 13484 /// associated renderer process (LoadRequest, SendProcessMessage, GetSource, 13485 /// etc.) will be queued. The queued commands will be sent before 13486 /// OnFrameAttached or discarded before OnFrameDestroyed if the frame never 13487 /// attaches. 13488 /// 13489 extern(System) void function ( 13490 cef_frame_handler_t* self, 13491 cef_browser_t* browser, 13492 cef_frame_t* frame) nothrow on_frame_created; 13493 13494 /// 13495 /// Called when an existing frame is destroyed. This will be the last 13496 /// notification that references |frame| and cef_frame_t::is_valid() will 13497 /// return false (0) for |frame|. If called during browser destruction and 13498 /// after cef_life_span_handler_t::on_before_close() then 13499 /// cef_browser_t::is_valid() will return false (0) for |browser|. Any queued 13500 /// commands that have not been sent will be discarded before this callback. 13501 /// 13502 extern(System) void function ( 13503 cef_frame_handler_t* self, 13504 cef_browser_t* browser, 13505 cef_frame_t* frame) nothrow on_frame_destroyed; 13506 13507 /// 13508 /// Called when a frame can begin routing commands to/from the associated 13509 /// renderer process. |reattached| will be true (1) if the frame was re- 13510 /// attached after exiting the BackForwardCache or after encountering a 13511 /// recoverable connection error. Any queued commands will now have been 13512 /// dispatched. This function will not be called for temporary frames created 13513 /// during cross-origin navigation. 13514 /// 13515 extern(System) void function ( 13516 cef_frame_handler_t* self, 13517 cef_browser_t* browser, 13518 cef_frame_t* frame, 13519 int reattached) nothrow on_frame_attached; 13520 13521 /// 13522 /// Called when a frame loses its connection to the renderer process. This may 13523 /// occur when a frame is destroyed, enters the BackForwardCache, or 13524 /// encounters a rare connection error. In the case of frame destruction this 13525 /// call will be followed by a (potentially async) call to OnFrameDestroyed. 13526 /// If frame destruction is occuring synchronously then 13527 /// cef_frame_t::is_valid() will return false (0) for |frame|. If called 13528 /// during browser destruction and after 13529 /// cef_life_span_handler_t::on_before_close() then cef_browser_t::is_valid() 13530 /// will return false (0) for |browser|. If, in the non-destruction case, the 13531 /// same frame later exits the BackForwardCache or recovers from a connection 13532 /// error then there will be a follow-up call to OnFrameAttached. This 13533 /// function will not be called for temporary frames created during cross- 13534 /// origin navigation. 13535 /// 13536 extern(System) void function ( 13537 cef_frame_handler_t* self, 13538 cef_browser_t* browser, 13539 cef_frame_t* frame) nothrow on_frame_detached; 13540 13541 /// 13542 /// Called when the main frame changes due to (a) initial browser creation, 13543 /// (b) final browser destruction, (c) cross-origin navigation or (d) re- 13544 /// navigation after renderer process termination (due to crashes, etc). 13545 /// |old_frame| will be NULL and |new_frame| will be non-NULL when a main 13546 /// frame is assigned to |browser| for the first time. |old_frame| will be 13547 /// non-NULL and |new_frame| will be NULL when a main frame is removed from 13548 /// |browser| for the last time. Both |old_frame| and |new_frame| will be non- 13549 /// NULL for cross-origin navigations or re-navigation after renderer process 13550 /// termination. This function will be called after on_frame_created() for 13551 /// |new_frame| and/or after on_frame_destroyed() for |old_frame|. If called 13552 /// during browser destruction and after 13553 /// cef_life_span_handler_t::on_before_close() then cef_browser_t::is_valid() 13554 /// will return false (0) for |browser|. 13555 /// 13556 extern(System) void function ( 13557 cef_frame_handler_t* self, 13558 cef_browser_t* browser, 13559 cef_frame_t* old_frame, 13560 cef_frame_t* new_frame) nothrow on_main_frame_changed; 13561 } 13562 13563 13564 13565 // CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_ 13566 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 13567 // 13568 // Redistribution and use in source and binary forms, with or without 13569 // modification, are permitted provided that the following conditions are 13570 // met: 13571 // 13572 // * Redistributions of source code must retain the above copyright 13573 // notice, this list of conditions and the following disclaimer. 13574 // * Redistributions in binary form must reproduce the above 13575 // copyright notice, this list of conditions and the following disclaimer 13576 // in the documentation and/or other materials provided with the 13577 // distribution. 13578 // * Neither the name of Google Inc. nor the name Chromium Embedded 13579 // Framework nor the names of its contributors may be used to endorse 13580 // or promote products derived from this software without specific prior 13581 // written permission. 13582 // 13583 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13584 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13585 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13586 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13587 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13588 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13589 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13590 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13591 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13592 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13593 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13594 // 13595 // --------------------------------------------------------------------------- 13596 // 13597 // This file was generated by the CEF translator tool and should not edited 13598 // by hand. See the translator.README.txt file in the tools directory for 13599 // more information. 13600 // 13601 // $hash=fc600dc0b69aa3deef96205d41cb96883cc6bcac$ 13602 // 13603 13604 extern (C): 13605 13606 /// 13607 /// Returns true (1) if the application text direction is right-to-left. 13608 /// 13609 int cef_is_rtl (); 13610 13611 // CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_ 13612 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 13613 // 13614 // Redistribution and use in source and binary forms, with or without 13615 // modification, are permitted provided that the following conditions are 13616 // met: 13617 // 13618 // * Redistributions of source code must retain the above copyright 13619 // notice, this list of conditions and the following disclaimer. 13620 // * Redistributions in binary form must reproduce the above 13621 // copyright notice, this list of conditions and the following disclaimer 13622 // in the documentation and/or other materials provided with the 13623 // distribution. 13624 // * Neither the name of Google Inc. nor the name Chromium Embedded 13625 // Framework nor the names of its contributors may be used to endorse 13626 // or promote products derived from this software without specific prior 13627 // written permission. 13628 // 13629 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13630 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13631 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13632 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13633 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13634 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13635 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13636 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13637 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13638 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13639 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13640 // 13641 // --------------------------------------------------------------------------- 13642 // 13643 // This file was generated by the CEF translator tool and should not edited 13644 // by hand. See the translator.README.txt file in the tools directory for 13645 // more information. 13646 // 13647 // $hash=06efd881efedad55a31769af58c3fd2b52d68b70$ 13648 // 13649 13650 extern (C): 13651 13652 /// 13653 /// Container for a single image represented at different scale factors. All 13654 /// image representations should be the same size in density independent pixel 13655 /// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels 13656 /// then the image at scale factor 2.0 should be 200x200 pixels -- both images 13657 /// will display with a DIP size of 100x100 units. The functions of this 13658 /// structure can be called on any browser process thread. 13659 /// 13660 /// NOTE: This struct is allocated DLL-side. 13661 /// 13662 struct cef_image_t 13663 { 13664 /// 13665 /// Base structure. 13666 /// 13667 13668 /// 13669 /// Returns true (1) if this Image is NULL. 13670 /// 13671 13672 /// 13673 /// Returns true (1) if this Image and |that| Image share the same underlying 13674 13675 cef_base_ref_counted_t base; 13676 extern(System) int function (cef_image_t* self) nothrow is_empty; /// storage. Will also return true (1) if both images are NULL. 13677 /// 13678 extern(System) int function (cef_image_t* self, cef_image_t* that) nothrow is_same; 13679 13680 /// 13681 /// Add a bitmap image representation for |scale_factor|. Only 32-bit 13682 /// RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the 13683 /// bitmap representation size in pixel coordinates. |pixel_data| is the array 13684 /// of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in 13685 /// size. |color_type| and |alpha_type| values specify the pixel format. 13686 /// 13687 extern(System) int function ( 13688 cef_image_t* self, 13689 float scale_factor, 13690 int pixel_width, 13691 int pixel_height, 13692 cef_color_type_t color_type, 13693 cef_alpha_type_t alpha_type, 13694 const(void)* pixel_data, 13695 size_t pixel_data_size) nothrow add_bitmap; 13696 13697 /// 13698 /// Add a PNG image representation for |scale_factor|. |png_data| is the image 13699 /// data of size |png_data_size|. Any alpha transparency in the PNG data will 13700 /// be maintained. 13701 /// 13702 extern(System) int function ( 13703 cef_image_t* self, 13704 float scale_factor, 13705 const(void)* png_data, 13706 size_t png_data_size) nothrow add_png; 13707 13708 /// 13709 /// Create a JPEG image representation for |scale_factor|. |jpeg_data| is the 13710 /// image data of size |jpeg_data_size|. The JPEG format does not support 13711 /// transparency so the alpha byte will be set to 0xFF for all pixels. 13712 /// 13713 extern(System) int function ( 13714 cef_image_t* self, 13715 float scale_factor, 13716 const(void)* jpeg_data, 13717 size_t jpeg_data_size) nothrow add_jpeg; 13718 13719 /// 13720 /// Returns the image width in density independent pixel (DIP) units. 13721 /// 13722 extern(System) size_t function (cef_image_t* self) nothrow get_width; 13723 13724 /// 13725 /// Returns the image height in density independent pixel (DIP) units. 13726 /// 13727 extern(System) size_t function (cef_image_t* self) nothrow get_height; 13728 13729 /// 13730 /// Returns true (1) if this image contains a representation for 13731 /// |scale_factor|. 13732 /// 13733 extern(System) int function (cef_image_t* self, float scale_factor) nothrow has_representation; 13734 13735 /// 13736 /// Removes the representation for |scale_factor|. Returns true (1) on 13737 /// success. 13738 /// 13739 extern(System) int function ( 13740 cef_image_t* self, 13741 float scale_factor) nothrow remove_representation; 13742 13743 /// 13744 /// Returns information for the representation that most closely matches 13745 /// |scale_factor|. |actual_scale_factor| is the actual scale factor for the 13746 /// representation. |pixel_width| and |pixel_height| are the representation 13747 /// size in pixel coordinates. Returns true (1) on success. 13748 /// 13749 extern(System) int function ( 13750 cef_image_t* self, 13751 float scale_factor, 13752 float* actual_scale_factor, 13753 int* pixel_width, 13754 int* pixel_height) nothrow get_representation_info; 13755 13756 /// 13757 /// Returns the bitmap representation that most closely matches 13758 /// |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type| 13759 /// and |alpha_type| values specify the desired output pixel format. 13760 /// |pixel_width| and |pixel_height| are the output representation size in 13761 /// pixel coordinates. Returns a cef_binary_value_t containing the pixel data 13762 /// on success or NULL on failure. 13763 /// 13764 extern(System) cef_binary_value_t* function ( 13765 cef_image_t* self, 13766 float scale_factor, 13767 cef_color_type_t color_type, 13768 cef_alpha_type_t alpha_type, 13769 int* pixel_width, 13770 int* pixel_height) nothrow get_as_bitmap; 13771 13772 /// 13773 /// Returns the PNG representation that most closely matches |scale_factor|. 13774 /// If |with_transparency| is true (1) any alpha transparency in the image 13775 /// will be represented in the resulting PNG data. |pixel_width| and 13776 /// |pixel_height| are the output representation size in pixel coordinates. 13777 /// Returns a cef_binary_value_t containing the PNG image data on success or 13778 /// NULL on failure. 13779 /// 13780 extern(System) cef_binary_value_t* function ( 13781 cef_image_t* self, 13782 float scale_factor, 13783 int with_transparency, 13784 int* pixel_width, 13785 int* pixel_height) nothrow get_as_png; 13786 13787 /// 13788 /// Returns the JPEG representation that most closely matches |scale_factor|. 13789 /// |quality| determines the compression level with 0 == lowest and 100 == 13790 /// highest. The JPEG format does not support alpha transparency and the alpha 13791 /// channel, if any, will be discarded. |pixel_width| and |pixel_height| are 13792 /// the output representation size in pixel coordinates. Returns a 13793 /// cef_binary_value_t containing the JPEG image data on success or NULL on 13794 /// failure. 13795 /// 13796 extern(System) cef_binary_value_t* function ( 13797 cef_image_t* self, 13798 float scale_factor, 13799 int quality, 13800 int* pixel_width, 13801 int* pixel_height) nothrow get_as_jpeg; 13802 } 13803 13804 13805 13806 /// 13807 /// Create a new cef_image_t. It will initially be NULL. Use the Add*() 13808 /// functions to add representations at different scale factors. 13809 /// 13810 cef_image_t* cef_image_create (); 13811 13812 // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_ 13813 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 13814 // 13815 // Redistribution and use in source and binary forms, with or without 13816 // modification, are permitted provided that the following conditions are 13817 // met: 13818 // 13819 // * Redistributions of source code must retain the above copyright 13820 // notice, this list of conditions and the following disclaimer. 13821 // * Redistributions in binary form must reproduce the above 13822 // copyright notice, this list of conditions and the following disclaimer 13823 // in the documentation and/or other materials provided with the 13824 // distribution. 13825 // * Neither the name of Google Inc. nor the name Chromium Embedded 13826 // Framework nor the names of its contributors may be used to endorse 13827 // or promote products derived from this software without specific prior 13828 // written permission. 13829 // 13830 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13831 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13832 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13833 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13834 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13835 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13836 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13837 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13838 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13839 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13840 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13841 // 13842 // --------------------------------------------------------------------------- 13843 // 13844 // This file was generated by the CEF translator tool and should not edited 13845 // by hand. See the translator.README.txt file in the tools directory for 13846 // more information. 13847 // 13848 // $hash=99272ca9b4c3fdc748a57d8b259503c723dd09ce$ 13849 // 13850 13851 extern (C): 13852 13853 /// 13854 /// Callback structure used for asynchronous continuation of JavaScript dialog 13855 /// requests. 13856 /// 13857 /// NOTE: This struct is allocated DLL-side. 13858 /// 13859 struct cef_jsdialog_callback_t 13860 { 13861 /// 13862 /// Base structure. 13863 /// 13864 13865 /// 13866 /// Continue the JS dialog request. Set |success| to true (1) if the OK button 13867 /// was pressed. The |user_input| value should be specified for prompt 13868 /// dialogs. 13869 /// 13870 13871 /// 13872 /// Implement this structure to handle events related to JavaScript dialogs. The 13873 /// functions of this structure will be called on the UI thread. 13874 13875 cef_base_ref_counted_t base; 13876 extern(System) void function ( 13877 cef_jsdialog_callback_t* self, 13878 int success, 13879 const(cef_string_t)* user_input) nothrow cont; 13880 } 13881 13882 13883 /// 13884 /// NOTE: This struct is allocated client-side. 13885 /// 13886 struct cef_jsdialog_handler_t 13887 { 13888 /// 13889 /// Base structure. 13890 /// 13891 cef_base_ref_counted_t base; 13892 13893 /// 13894 /// Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be 13895 /// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure 13896 /// and user-friendly display string. The |default_prompt_text| value will be 13897 /// specified for prompt dialogs only. Set |suppress_message| to true (1) and 13898 /// return false (0) to suppress the message (suppressing messages is 13899 /// preferable to immediately executing the callback as this is used to detect 13900 /// presumably malicious behavior like spamming alert messages in 13901 /// onbeforeunload). Set |suppress_message| to false (0) and return false (0) 13902 /// to use the default implementation (the default implementation will show 13903 /// one modal dialog at a time and suppress any additional dialog requests 13904 /// until the displayed dialog is dismissed). Return true (1) if the 13905 /// application will use a custom dialog or if the callback has been executed 13906 /// immediately. Custom dialogs may be either modal or modeless. If a custom 13907 /// dialog is used the application must execute |callback| once the custom 13908 /// dialog is dismissed. 13909 /// 13910 extern(System) int function ( 13911 cef_jsdialog_handler_t* self, 13912 cef_browser_t* browser, 13913 const(cef_string_t)* origin_url, 13914 cef_jsdialog_type_t dialog_type, 13915 const(cef_string_t)* message_text, 13916 const(cef_string_t)* default_prompt_text, 13917 cef_jsdialog_callback_t* callback, 13918 int* suppress_message) nothrow on_jsdialog; 13919 13920 /// 13921 /// Called to run a dialog asking the user if they want to leave a page. 13922 /// Return false (0) to use the default dialog implementation. Return true (1) 13923 /// if the application will use a custom dialog or if the callback has been 13924 /// executed immediately. Custom dialogs may be either modal or modeless. If a 13925 /// custom dialog is used the application must execute |callback| once the 13926 /// custom dialog is dismissed. 13927 /// 13928 extern(System) int function ( 13929 cef_jsdialog_handler_t* self, 13930 cef_browser_t* browser, 13931 const(cef_string_t)* message_text, 13932 int is_reload, 13933 cef_jsdialog_callback_t* callback) nothrow on_before_unload_dialog; 13934 13935 /// 13936 /// Called to cancel any pending dialogs and reset any saved dialog state. 13937 /// Will be called due to events like page navigation irregardless of whether 13938 /// any dialogs are currently pending. 13939 /// 13940 extern(System) void function ( 13941 cef_jsdialog_handler_t* self, 13942 cef_browser_t* browser) nothrow on_reset_dialog_state; 13943 13944 /// 13945 /// Called when the dialog is closed. 13946 /// 13947 extern(System) void function ( 13948 cef_jsdialog_handler_t* self, 13949 cef_browser_t* browser) nothrow on_dialog_closed; 13950 } 13951 13952 13953 13954 // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ 13955 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 13956 // 13957 // Redistribution and use in source and binary forms, with or without 13958 // modification, are permitted provided that the following conditions are 13959 // met: 13960 // 13961 // * Redistributions of source code must retain the above copyright 13962 // notice, this list of conditions and the following disclaimer. 13963 // * Redistributions in binary form must reproduce the above 13964 // copyright notice, this list of conditions and the following disclaimer 13965 // in the documentation and/or other materials provided with the 13966 // distribution. 13967 // * Neither the name of Google Inc. nor the name Chromium Embedded 13968 // Framework nor the names of its contributors may be used to endorse 13969 // or promote products derived from this software without specific prior 13970 // written permission. 13971 // 13972 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13973 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13974 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13975 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13976 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13977 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13978 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13979 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13980 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13981 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13982 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13983 // 13984 // --------------------------------------------------------------------------- 13985 // 13986 // This file was generated by the CEF translator tool and should not edited 13987 // by hand. See the translator.README.txt file in the tools directory for 13988 // more information. 13989 // 13990 // $hash=d3eaf55b4b5742d2a83bed3517f64900b9423eec$ 13991 // 13992 13993 extern (C): 13994 13995 /// 13996 /// Implement this structure to handle events related to keyboard input. The 13997 /// functions of this structure will be called on the UI thread. 13998 /// 13999 /// NOTE: This struct is allocated client-side. 14000 /// 14001 struct cef_keyboard_handler_t 14002 { 14003 /// 14004 /// Base structure. 14005 /// 14006 14007 /// 14008 /// Called before a keyboard event is sent to the renderer. |event| contains 14009 /// information about the keyboard event. |os_event| is the operating system 14010 /// event message, if any. Return true (1) if the event was handled or false 14011 /// (0) otherwise. If the event will be handled in on_key_event() as a 14012 /// keyboard shortcut set |is_keyboard_shortcut| to true (1) and return false 14013 /// (0). 14014 /// 14015 14016 cef_base_ref_counted_t base; 14017 extern(System) int function ( 14018 cef_keyboard_handler_t* self, 14019 cef_browser_t* browser, 14020 const(cef_key_event_t)* event, 14021 cef_event_handle_t os_event, 14022 int* is_keyboard_shortcut) nothrow on_pre_key_event; 14023 14024 /// 14025 /// Called after the renderer and JavaScript in the page has had a chance to 14026 /// handle the event. |event| contains information about the keyboard event. 14027 /// |os_event| is the operating system event message, if any. Return true (1) 14028 /// if the keyboard event was handled or false (0) otherwise. 14029 /// 14030 extern(System) int function ( 14031 cef_keyboard_handler_t* self, 14032 cef_browser_t* browser, 14033 const(cef_key_event_t)* event, 14034 cef_event_handle_t os_event) nothrow on_key_event; 14035 } 14036 14037 14038 14039 // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ 14040 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 14041 // 14042 // Redistribution and use in source and binary forms, with or without 14043 // modification, are permitted provided that the following conditions are 14044 // met: 14045 // 14046 // * Redistributions of source code must retain the above copyright 14047 // notice, this list of conditions and the following disclaimer. 14048 // * Redistributions in binary form must reproduce the above 14049 // copyright notice, this list of conditions and the following disclaimer 14050 // in the documentation and/or other materials provided with the 14051 // distribution. 14052 // * Neither the name of Google Inc. nor the name Chromium Embedded 14053 // Framework nor the names of its contributors may be used to endorse 14054 // or promote products derived from this software without specific prior 14055 // written permission. 14056 // 14057 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14058 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14059 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14060 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14061 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14062 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14063 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14064 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14065 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14066 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14067 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14068 // 14069 // --------------------------------------------------------------------------- 14070 // 14071 // This file was generated by the CEF translator tool and should not edited 14072 // by hand. See the translator.README.txt file in the tools directory for 14073 // more information. 14074 // 14075 // $hash=239f4760e09071556a555cdce7d945e7e2169e4e$ 14076 // 14077 14078 extern (C): 14079 14080 14081 14082 /// 14083 /// Implement this structure to handle events related to browser life span. The 14084 /// functions of this structure will be called on the UI thread unless otherwise 14085 /// indicated. 14086 /// 14087 /// NOTE: This struct is allocated client-side. 14088 /// 14089 struct cef_life_span_handler_t 14090 { 14091 /// 14092 /// Base structure. 14093 /// 14094 14095 /// 14096 /// Called on the UI thread before a new popup browser is created. The 14097 /// |browser| and |frame| values represent the source of the popup request 14098 /// (opener browser and frame). The |popup_id| value uniquely identifies the 14099 /// popup in the context of the opener browser. The |target_url| and 14100 /// |target_frame_name| values indicate where the popup browser should 14101 /// navigate and may be NULL if not specified with the request. The 14102 14103 cef_base_ref_counted_t base; 14104 /// |target_disposition| value indicates where the user intended to open the 14105 /// popup (e.g. current tab, new tab, etc). The |user_gesture| value will be 14106 /// true (1) if the popup was opened via explicit user gesture (e.g. clicking 14107 /// a link) or false (0) if the popup opened automatically (e.g. via the 14108 /// DomContentLoaded event). The |popupFeatures| structure contains additional 14109 /// information about the requested popup window. To allow creation of the 14110 /// popup browser optionally modify |windowInfo|, |client|, |settings| and 14111 /// |no_javascript_access| and return false (0). To cancel creation of the 14112 /// popup browser return true (1). The |client| and |settings| values will 14113 /// default to the source browser's values. If the |no_javascript_access| 14114 /// value is set to false (0) the new browser will not be scriptable and may 14115 /// not be hosted in the same renderer process as the source browser. Any 14116 /// modifications to |windowInfo| will be ignored if the parent browser is 14117 /// wrapped in a cef_browser_view_t. The |extra_info| parameter provides an 14118 /// opportunity to specify extra information specific to the created popup 14119 /// browser that will be passed to 14120 /// cef_render_process_handler_t::on_browser_created() in the render process. 14121 /// 14122 /// If popup browser creation succeeds then OnAfterCreated will be called for 14123 /// the new popup browser. If popup browser creation fails, and if the opener 14124 /// browser has not yet been destroyed, then OnBeforePopupAborted will be 14125 /// called for the opener browser. See OnBeforePopupAborted documentation for 14126 /// additional details. 14127 /// 14128 extern(System) int function ( 14129 cef_life_span_handler_t* self, 14130 cef_browser_t* browser, 14131 cef_frame_t* frame, 14132 int popup_id, 14133 const(cef_string_t)* target_url, 14134 const(cef_string_t)* target_frame_name, 14135 cef_window_open_disposition_t target_disposition, 14136 int user_gesture, 14137 const(cef_popup_features_t)* popupFeatures, 14138 cef_window_info_t* windowInfo, 14139 cef_client_t** client, 14140 cef_browser_settings_t* settings, 14141 cef_dictionary_value_t** extra_info, 14142 int* no_javascript_access) nothrow on_before_popup; 14143 14144 /// 14145 /// Called on the UI thread if a new popup browser is aborted. This only 14146 /// occurs if the popup is allowed in OnBeforePopup and creation fails before 14147 /// OnAfterCreated is called for the new popup browser. The |browser| value is 14148 /// the source of the popup request (opener browser). The |popup_id| value 14149 /// uniquely identifies the popup in the context of the opener browser, and is 14150 /// the same value that was passed to OnBeforePopup. 14151 /// 14152 /// Any client state associated with pending popups should be cleared in 14153 /// OnBeforePopupAborted, OnAfterCreated of the popup browser, or 14154 /// OnBeforeClose of the opener browser. OnBeforeClose of the opener browser 14155 /// may be called before this function in cases where the opener is closing 14156 /// during popup creation, in which case cef_browser_host_t::IsValid will 14157 /// return false (0) in this function. 14158 /// 14159 extern(System) void function ( 14160 cef_life_span_handler_t* self, 14161 cef_browser_t* browser, 14162 int popup_id) nothrow on_before_popup_aborted; 14163 14164 /// 14165 /// Called on the UI thread before a new DevTools popup browser is created. 14166 /// The |browser| value represents the source of the popup request. Optionally 14167 /// modify |windowInfo|, |client|, |settings| and |extra_info| values. The 14168 /// |client|, |settings| and |extra_info| values will default to the source 14169 /// browser's values. Any modifications to |windowInfo| will be ignored if the 14170 /// parent browser is Views-hosted (wrapped in a cef_browser_view_t). 14171 /// 14172 /// The |extra_info| parameter provides an opportunity to specify extra 14173 /// information specific to the created popup browser that will be passed to 14174 /// cef_render_process_handler_t::on_browser_created() in the render process. 14175 /// The existing |extra_info| object, if any, will be read-only but may be 14176 /// replaced with a new object. 14177 /// 14178 /// Views-hosted source browsers will create Views-hosted DevTools popups 14179 /// unless |use_default_window| is set to to true (1). DevTools popups can be 14180 /// blocked by returning true (1) from cef_command_handler_t::OnChromeCommand 14181 /// for IDC_DEV_TOOLS. Only used with Chrome style. 14182 /// 14183 extern(System) void function ( 14184 cef_life_span_handler_t* self, 14185 cef_browser_t* browser, 14186 cef_window_info_t* windowInfo, 14187 cef_client_t** client, 14188 cef_browser_settings_t* settings, 14189 cef_dictionary_value_t** extra_info, 14190 int* use_default_window) nothrow on_before_dev_tools_popup; 14191 14192 /// 14193 /// Called after a new browser is created. It is now safe to begin performing 14194 /// actions with |browser|. cef_frame_handler_t callbacks related to initial 14195 /// main frame creation will arrive before this callback. See 14196 /// cef_frame_handler_t documentation for additional usage information. 14197 /// 14198 extern(System) void function ( 14199 cef_life_span_handler_t* self, 14200 cef_browser_t* browser) nothrow on_after_created; 14201 14202 /// 14203 /// Called when an Alloy style browser is ready to be closed, meaning that the 14204 /// close has already been initiated and that JavaScript unload handlers have 14205 /// already executed or should be ignored. This may result directly from a 14206 /// call to cef_browser_host_t::[Try]close_browser() or indirectly if the 14207 /// browser's top-level parent window was created by CEF and the user attempts 14208 /// to close that window (by clicking the 'X', for example). do_close() will 14209 /// not be called if the browser's host window/view has already been destroyed 14210 /// (via parent window/view hierarchy tear-down, for example), as it is no 14211 /// longer possible to customize the close behavior at that point. 14212 /// 14213 /// An application should handle top-level parent window close notifications 14214 /// by calling cef_browser_host_t::try_close_browser() or 14215 /// cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window 14216 /// to close immediately (see the examples below). This gives CEF an 14217 /// opportunity to process JavaScript unload handlers and optionally cancel 14218 /// the close before do_close() is called. 14219 /// 14220 /// When windowed rendering is enabled CEF will create an internal child 14221 /// window/view to host the browser. In that case returning false (0) from 14222 /// do_close() will send the standard close notification to the browser's top- 14223 /// level parent window (e.g. WM_CLOSE on Windows, performClose: on OS X, 14224 /// "delete_event" on Linux or cef_window_delegate_t::can_close() callback 14225 /// from Views). 14226 /// 14227 /// When windowed rendering is disabled there is no internal window/view and 14228 /// returning false (0) from do_close() will cause the browser object to be 14229 /// destroyed immediately. 14230 /// 14231 /// If the browser's top-level parent window requires a non-standard close 14232 /// notification then send that notification from do_close() and return true 14233 /// (1). You are still required to complete the browser close as soon as 14234 /// possible (either by calling [Try]close_browser() or by proceeding with 14235 /// window/view hierarchy tear-down), otherwise the browser will be left in a 14236 /// partially closed state that interferes with proper functioning. Top-level 14237 /// windows created on the browser process UI thread can alternately call 14238 /// cef_browser_host_t::is_ready_to_be_closed() in the close handler to check 14239 /// close status instead of relying on custom do_close() handling. See 14240 /// documentation on that function for additional details. 14241 /// 14242 /// The cef_life_span_handler_t::on_before_close() function will be called 14243 /// after do_close() (if do_close() is called) and immediately before the 14244 /// browser object is destroyed. The application should only exit after 14245 /// on_before_close() has been called for all existing browsers. 14246 /// 14247 /// The below examples describe what should happen during window close when 14248 /// the browser is parented to an application-provided top-level window. 14249 /// 14250 /// Example 1: Using cef_browser_host_t::try_close_browser(). This is 14251 /// recommended for clients using standard close handling and windows created 14252 /// on the browser process UI thread. 1. User clicks the window close button 14253 /// which sends a close notification 14254 /// to the application's top-level window. 14255 /// 2. Application's top-level window receives the close notification and 14256 /// calls TryCloseBrowser() (similar to calling CloseBrowser(false)). 14257 /// TryCloseBrowser() returns false so the client cancels the window 14258 /// close. 14259 /// 3. JavaScript 'onbeforeunload' handler executes and shows the close 14260 /// confirmation dialog (which can be overridden via 14261 /// CefJSDialogHandler::OnBeforeUnloadDialog()). 14262 /// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 14263 /// 6. Application's do_close() handler is called and returns false (0) by 14264 /// default. 14265 /// 7. CEF sends a close notification to the application's top-level window 14266 /// (because DoClose() returned false). 14267 /// 8. Application's top-level window receives the close notification and 14268 /// calls TryCloseBrowser(). TryCloseBrowser() returns true so the client 14269 /// allows the window close. 14270 /// 9. Application's top-level window is destroyed, triggering destruction 14271 /// of the child browser window. 14272 /// 10. Application's on_before_close() handler is called and the browser 14273 /// object 14274 /// is destroyed. 14275 /// 11. Application exits by calling cef_quit_message_loop() if no other 14276 /// browsers 14277 /// exist. 14278 /// 14279 /// Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and 14280 /// implementing the do_close() callback. This is recommended for clients 14281 /// using non-standard close handling or windows that were not created on the 14282 /// browser process UI thread. 1. User clicks the window close button which 14283 /// sends a close notification 14284 /// to the application's top-level window. 14285 /// 2. Application's top-level window receives the close notification and: 14286 /// A. Calls CefBrowserHost::CloseBrowser(false). 14287 /// B. Cancels the window close. 14288 /// 3. JavaScript 'onbeforeunload' handler executes and shows the close 14289 /// confirmation dialog (which can be overridden via 14290 /// CefJSDialogHandler::OnBeforeUnloadDialog()). 14291 /// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 14292 /// 6. Application's do_close() handler is called. Application will: 14293 /// A. Set a flag to indicate that the next top-level window close attempt 14294 /// will be allowed. 14295 /// B. Return false. 14296 /// 7. CEF sends a close notification to the application's top-level window 14297 /// (because DoClose() returned false). 14298 /// 8. Application's top-level window receives the close notification and 14299 /// allows the window to close based on the flag from #6A. 14300 /// 9. Application's top-level window is destroyed, triggering destruction 14301 /// of the child browser window. 14302 /// 10. Application's on_before_close() handler is called and the browser 14303 /// object 14304 /// is destroyed. 14305 /// 11. Application exits by calling cef_quit_message_loop() if no other 14306 /// browsers 14307 /// exist. 14308 /// 14309 extern(System) int function ( 14310 cef_life_span_handler_t* self, 14311 cef_browser_t* browser) nothrow do_close; 14312 14313 /// 14314 /// Called just before a browser is destroyed. Release all references to the 14315 /// browser object and do not attempt to execute any functions on the browser 14316 /// object (other than IsValid, GetIdentifier or IsSame) after this callback 14317 /// returns. cef_frame_handler_t callbacks related to final main frame 14318 /// destruction, and OnBeforePopupAborted callbacks for any pending popups, 14319 /// will arrive after this callback and cef_browser_t::IsValid will return 14320 /// false (0) at that time. Any in-progress network requests associated with 14321 /// |browser| will be aborted when the browser is destroyed, and 14322 /// cef_resource_request_handler_t callbacks related to those requests may 14323 /// still arrive on the IO thread after this callback. See cef_frame_handler_t 14324 /// and do_close() documentation for additional usage information. 14325 /// 14326 extern(System) void function ( 14327 cef_life_span_handler_t* self, 14328 cef_browser_t* browser) nothrow on_before_close; 14329 } 14330 14331 14332 14333 // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_ 14334 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 14335 // 14336 // Redistribution and use in source and binary forms, with or without 14337 // modification, are permitted provided that the following conditions are 14338 // met: 14339 // 14340 // * Redistributions of source code must retain the above copyright 14341 // notice, this list of conditions and the following disclaimer. 14342 // * Redistributions in binary form must reproduce the above 14343 // copyright notice, this list of conditions and the following disclaimer 14344 // in the documentation and/or other materials provided with the 14345 // distribution. 14346 // * Neither the name of Google Inc. nor the name Chromium Embedded 14347 // Framework nor the names of its contributors may be used to endorse 14348 // or promote products derived from this software without specific prior 14349 // written permission. 14350 // 14351 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14352 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14353 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14354 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14355 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14356 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14357 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14358 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14359 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14360 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14361 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14362 // 14363 // --------------------------------------------------------------------------- 14364 // 14365 // This file was generated by the CEF translator tool and should not edited 14366 // by hand. See the translator.README.txt file in the tools directory for 14367 // more information. 14368 // 14369 // $hash=f4ea0f8d1157566cf53d2f35ba118afde12d0dcc$ 14370 // 14371 14372 extern (C): 14373 14374 /// 14375 /// Implement this structure to handle events related to browser load status. 14376 /// The functions of this structure will be called on the browser process UI 14377 /// thread or render process main thread (TID_RENDERER). 14378 /// 14379 /// NOTE: This struct is allocated client-side. 14380 /// 14381 struct cef_load_handler_t 14382 { 14383 /// 14384 /// Base structure. 14385 /// 14386 14387 /// 14388 /// Called when the loading state has changed. This callback will be executed 14389 /// twice -- once when loading is initiated either programmatically or by user 14390 /// action, and once when loading is terminated due to completion, 14391 /// cancellation of failure. It will be called before any calls to OnLoadStart 14392 /// and after all calls to OnLoadError and/or OnLoadEnd. 14393 14394 cef_base_ref_counted_t base; 14395 /// 14396 extern(System) void function ( 14397 cef_load_handler_t* self, 14398 cef_browser_t* browser, 14399 int isLoading, 14400 int canGoBack, 14401 int canGoForward) nothrow on_loading_state_change; 14402 14403 /// 14404 /// Called after a navigation has been committed and before the browser begins 14405 /// loading contents in the frame. The |frame| value will never be NULL -- 14406 /// call the is_main() function to check if this frame is the main frame. 14407 /// |transition_type| provides information about the source of the navigation 14408 /// and an accurate value is only available in the browser process. Multiple 14409 /// frames may be loading at the same time. Sub-frames may start or continue 14410 /// loading after the main frame load has ended. This function will not be 14411 /// called for same page navigations (fragments, history state, etc.) or for 14412 /// navigations that fail or are canceled before commit. For notification of 14413 /// overall browser load status use OnLoadingStateChange instead. 14414 /// 14415 extern(System) void function ( 14416 cef_load_handler_t* self, 14417 cef_browser_t* browser, 14418 cef_frame_t* frame, 14419 cef_transition_type_t transition_type) nothrow on_load_start; 14420 14421 /// 14422 /// Called when the browser is done loading a frame. The |frame| value will 14423 /// never be NULL -- call the is_main() function to check if this frame is the 14424 /// main frame. Multiple frames may be loading at the same time. Sub-frames 14425 /// may start or continue loading after the main frame load has ended. This 14426 /// function will not be called for same page navigations (fragments, history 14427 /// state, etc.) or for navigations that fail or are canceled before commit. 14428 /// For notification of overall browser load status use OnLoadingStateChange 14429 /// instead. 14430 /// 14431 extern(System) void function ( 14432 cef_load_handler_t* self, 14433 cef_browser_t* browser, 14434 cef_frame_t* frame, 14435 int httpStatusCode) nothrow on_load_end; 14436 14437 /// 14438 /// Called when a navigation fails or is canceled. This function may be called 14439 /// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if 14440 /// after commit. |errorCode| is the error code number, |errorText| is the 14441 /// error text and |failedUrl| is the URL that failed to load. See 14442 /// net\base\net_error_list.h for complete descriptions of the error codes. 14443 /// 14444 extern(System) void function ( 14445 cef_load_handler_t* self, 14446 cef_browser_t* browser, 14447 cef_frame_t* frame, 14448 cef_errorcode_t errorCode, 14449 const(cef_string_t)* errorText, 14450 const(cef_string_t)* failedUrl) nothrow on_load_error; 14451 } 14452 14453 14454 14455 // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ 14456 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 14457 // 14458 // Redistribution and use in source and binary forms, with or without 14459 // modification, are permitted provided that the following conditions are 14460 // met: 14461 // 14462 // * Redistributions of source code must retain the above copyright 14463 // notice, this list of conditions and the following disclaimer. 14464 // * Redistributions in binary form must reproduce the above 14465 // copyright notice, this list of conditions and the following disclaimer 14466 // in the documentation and/or other materials provided with the 14467 // distribution. 14468 // * Neither the name of Google Inc. nor the name Chromium Embedded 14469 // Framework nor the names of its contributors may be used to endorse 14470 // or promote products derived from this software without specific prior 14471 // written permission. 14472 // 14473 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14474 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14475 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14476 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14477 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14478 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14479 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14480 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14481 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14482 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14483 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14484 // 14485 // --------------------------------------------------------------------------- 14486 // 14487 // This file was generated by the CEF translator tool and should not edited 14488 // by hand. See the translator.README.txt file in the tools directory for 14489 // more information. 14490 // 14491 // $hash=42fa8dfb3dec7ef405b5d1ea27dfff54b2ec0ca8$ 14492 // 14493 14494 extern (C): 14495 14496 /// 14497 /// Supports discovery of and communication with media devices on the local 14498 /// network via the Cast and DIAL protocols. The functions of this structure may 14499 /// be called on any browser process thread unless otherwise indicated. 14500 /// 14501 /// NOTE: This struct is allocated DLL-side. 14502 /// 14503 struct cef_media_router_t 14504 { 14505 /// 14506 /// Base structure. 14507 /// 14508 14509 /// 14510 /// Add an observer for MediaRouter events. The observer will remain 14511 /// registered until the returned Registration object is destroyed. 14512 14513 cef_base_ref_counted_t base; 14514 /// 14515 extern(System) cef_registration_t* function ( 14516 cef_media_router_t* self, 14517 cef_media_observer_t* observer) nothrow add_observer; 14518 14519 /// 14520 /// Returns a MediaSource object for the specified media source URN. Supported 14521 /// URN schemes include "cast:" and "dial:", and will be already known by the 14522 /// client application (e.g. "cast:<appId>?clientId=<clientId>"). 14523 /// 14524 extern(System) cef_media_source_t* function ( 14525 cef_media_router_t* self, 14526 const(cef_string_t)* urn) nothrow get_source; 14527 14528 /// 14529 /// Trigger an asynchronous call to cef_media_observer_t::OnSinks on all 14530 /// registered observers. 14531 /// 14532 extern(System) void function (cef_media_router_t* self) nothrow notify_current_sinks; 14533 14534 /// 14535 /// Create a new route between |source| and |sink|. Source and sink must be 14536 /// valid, compatible (as reported by cef_media_sink_t::IsCompatibleWith), and 14537 /// a route between them must not already exist. |callback| will be executed 14538 /// on success or failure. If route creation succeeds it will also trigger an 14539 /// asynchronous call to cef_media_observer_t::OnRoutes on all registered 14540 /// observers. 14541 /// 14542 extern(System) void function ( 14543 cef_media_router_t* self, 14544 cef_media_source_t* source, 14545 cef_media_sink_t* sink, 14546 cef_media_route_create_callback_t* callback) nothrow create_route; 14547 14548 /// 14549 /// Trigger an asynchronous call to cef_media_observer_t::OnRoutes on all 14550 /// registered observers. 14551 /// 14552 extern(System) void function (cef_media_router_t* self) nothrow notify_current_routes; 14553 } 14554 14555 14556 14557 /// 14558 /// Returns the MediaRouter object associated with the global request context. 14559 /// If |callback| is non-NULL it will be executed asnychronously on the UI 14560 /// thread after the manager's storage has been initialized. Equivalent to 14561 /// calling cef_request_context_t::cef_request_context_get_global_context()->get 14562 /// _media_router(). 14563 /// 14564 cef_media_router_t* cef_media_router_get_global ( 14565 cef_completion_callback_t* callback); 14566 14567 /// 14568 /// Implemented by the client to observe MediaRouter events and registered via 14569 /// cef_media_router_t::AddObserver. The functions of this structure will be 14570 /// called on the browser process UI thread. 14571 /// 14572 /// NOTE: This struct is allocated client-side. 14573 /// 14574 struct cef_media_observer_t 14575 { 14576 /// 14577 /// Base structure. 14578 /// 14579 cef_base_ref_counted_t base; 14580 14581 /// 14582 /// The list of available media sinks has changed or 14583 /// cef_media_router_t::NotifyCurrentSinks was called. 14584 /// 14585 extern(System) void function ( 14586 cef_media_observer_t* self, 14587 size_t sinksCount, 14588 cef_media_sink_t** sinks) nothrow on_sinks; 14589 14590 /// 14591 /// The list of available media routes has changed or 14592 /// cef_media_router_t::NotifyCurrentRoutes was called. 14593 /// 14594 extern(System) void function ( 14595 cef_media_observer_t* self, 14596 size_t routesCount, 14597 cef_media_route_t** routes) nothrow on_routes; 14598 14599 /// 14600 /// The connection state of |route| has changed. 14601 /// 14602 extern(System) void function ( 14603 cef_media_observer_t* self, 14604 cef_media_route_t* route, 14605 cef_media_route_connection_state_t state) nothrow on_route_state_changed; 14606 14607 /// 14608 /// A message was received over |route|. |message| is only valid for the scope 14609 /// of this callback and should be copied if necessary. 14610 /// 14611 extern(System) void function ( 14612 cef_media_observer_t* self, 14613 cef_media_route_t* route, 14614 const(void)* message, 14615 size_t message_size) nothrow on_route_message_received; 14616 } 14617 14618 14619 14620 /// 14621 /// Represents the route between a media source and sink. Instances of this 14622 /// object are created via cef_media_router_t::CreateRoute and retrieved via 14623 /// cef_media_observer_t::OnRoutes. Contains the status and metadata of a 14624 /// routing operation. The functions of this structure may be called on any 14625 /// browser process thread unless otherwise indicated. 14626 /// 14627 /// NOTE: This struct is allocated DLL-side. 14628 /// 14629 struct cef_media_route_t 14630 { 14631 /// 14632 /// Base structure. 14633 /// 14634 cef_base_ref_counted_t base; 14635 14636 /// 14637 /// Returns the ID for this route. 14638 /// 14639 // The resulting string must be freed by calling cef_string_userfree_free(). 14640 extern(System) cef_string_userfree_t function (cef_media_route_t* self) nothrow get_id; 14641 14642 /// 14643 /// Returns the source associated with this route. 14644 /// 14645 extern(System) cef_media_source_t* function (cef_media_route_t* self) nothrow get_source; 14646 14647 /// 14648 /// Returns the sink associated with this route. 14649 /// 14650 extern(System) cef_media_sink_t* function (cef_media_route_t* self) nothrow get_sink; 14651 14652 /// 14653 /// Send a message over this route. |message| will be copied if necessary. 14654 /// 14655 extern(System) void function ( 14656 cef_media_route_t* self, 14657 const(void)* message, 14658 size_t message_size) nothrow send_route_message; 14659 14660 /// 14661 /// Terminate this route. Will result in an asynchronous call to 14662 /// cef_media_observer_t::OnRoutes on all registered observers. 14663 /// 14664 extern(System) void function (cef_media_route_t* self) nothrow terminate; 14665 } 14666 14667 14668 14669 /// 14670 /// Callback structure for cef_media_router_t::CreateRoute. The functions of 14671 /// this structure will be called on the browser process UI thread. 14672 /// 14673 /// NOTE: This struct is allocated client-side. 14674 /// 14675 struct cef_media_route_create_callback_t 14676 { 14677 /// 14678 /// Base structure. 14679 /// 14680 cef_base_ref_counted_t base; 14681 14682 /// 14683 /// Method that will be executed when the route creation has finished. 14684 /// |result| will be CEF_MRCR_OK if the route creation succeeded. |error| will 14685 /// be a description of the error if the route creation failed. |route| is the 14686 /// resulting route, or NULL if the route creation failed. 14687 /// 14688 extern(System) void function ( 14689 cef_media_route_create_callback_t* self, 14690 cef_media_route_create_result_t result, 14691 const(cef_string_t)* error, 14692 cef_media_route_t* route) nothrow on_media_route_create_finished; 14693 } 14694 14695 14696 14697 /// 14698 /// Represents a sink to which media can be routed. Instances of this object are 14699 /// retrieved via cef_media_observer_t::OnSinks. The functions of this structure 14700 /// may be called on any browser process thread unless otherwise indicated. 14701 /// 14702 /// NOTE: This struct is allocated DLL-side. 14703 /// 14704 struct cef_media_sink_t 14705 { 14706 /// 14707 /// Base structure. 14708 /// 14709 cef_base_ref_counted_t base; 14710 14711 /// 14712 /// Returns the ID for this sink. 14713 /// 14714 // The resulting string must be freed by calling cef_string_userfree_free(). 14715 extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_id; 14716 14717 /// 14718 /// Returns the name of this sink. 14719 /// 14720 // The resulting string must be freed by calling cef_string_userfree_free(). 14721 extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_name; 14722 14723 /// 14724 /// Returns the icon type for this sink. 14725 /// 14726 extern(System) cef_media_sink_icon_type_t function ( 14727 cef_media_sink_t* self) nothrow get_icon_type; 14728 14729 /// 14730 /// Asynchronously retrieves device info. 14731 /// 14732 extern(System) void function ( 14733 cef_media_sink_t* self, 14734 cef_media_sink_device_info_callback_t* callback) nothrow get_device_info; 14735 14736 /// 14737 /// Returns true (1) if this sink accepts content via Cast. 14738 /// 14739 extern(System) int function (cef_media_sink_t* self) nothrow is_cast_sink; 14740 14741 /// 14742 /// Returns true (1) if this sink accepts content via DIAL. 14743 /// 14744 extern(System) int function (cef_media_sink_t* self) nothrow is_dial_sink; 14745 14746 /// 14747 /// Returns true (1) if this sink is compatible with |source|. 14748 /// 14749 extern(System) int function ( 14750 cef_media_sink_t* self, 14751 cef_media_source_t* source) nothrow is_compatible_with; 14752 } 14753 14754 14755 14756 /// 14757 /// Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of 14758 /// this structure will be called on the browser process UI thread. 14759 /// 14760 /// NOTE: This struct is allocated client-side. 14761 /// 14762 struct cef_media_sink_device_info_callback_t 14763 { 14764 /// 14765 /// Base structure. 14766 /// 14767 cef_base_ref_counted_t base; 14768 14769 /// 14770 /// Method that will be executed asyncronously once device information has 14771 /// been retrieved. 14772 /// 14773 extern(System) void function ( 14774 cef_media_sink_device_info_callback_t* self, 14775 const(cef_media_sink_device_info_t)* device_info) nothrow on_media_sink_device_info; 14776 } 14777 14778 14779 14780 /// 14781 /// Represents a source from which media can be routed. Instances of this object 14782 /// are retrieved via cef_media_router_t::GetSource. The functions of this 14783 /// structure may be called on any browser process thread unless otherwise 14784 /// indicated. 14785 /// 14786 /// NOTE: This struct is allocated DLL-side. 14787 /// 14788 struct cef_media_source_t 14789 { 14790 /// 14791 /// Base structure. 14792 /// 14793 cef_base_ref_counted_t base; 14794 14795 /// 14796 /// Returns the ID (media source URN or URL) for this source. 14797 /// 14798 // The resulting string must be freed by calling cef_string_userfree_free(). 14799 extern(System) cef_string_userfree_t function (cef_media_source_t* self) nothrow get_id; 14800 14801 /// 14802 /// Returns true (1) if this source outputs its content via Cast. 14803 /// 14804 extern(System) int function (cef_media_source_t* self) nothrow is_cast_source; 14805 14806 /// 14807 /// Returns true (1) if this source outputs its content via DIAL. 14808 /// 14809 extern(System) int function (cef_media_source_t* self) nothrow is_dial_source; 14810 } 14811 14812 14813 14814 // CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_ 14815 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 14816 // 14817 // Redistribution and use in source and binary forms, with or without 14818 // modification, are permitted provided that the following conditions are 14819 // met: 14820 // 14821 // * Redistributions of source code must retain the above copyright 14822 // notice, this list of conditions and the following disclaimer. 14823 // * Redistributions in binary form must reproduce the above 14824 // copyright notice, this list of conditions and the following disclaimer 14825 // in the documentation and/or other materials provided with the 14826 // distribution. 14827 // * Neither the name of Google Inc. nor the name Chromium Embedded 14828 // Framework nor the names of its contributors may be used to endorse 14829 // or promote products derived from this software without specific prior 14830 // written permission. 14831 // 14832 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14833 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14834 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14835 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14836 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14837 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14838 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14839 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14840 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14841 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14842 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14843 // 14844 // --------------------------------------------------------------------------- 14845 // 14846 // This file was generated by the CEF translator tool and should not edited 14847 // by hand. See the translator.README.txt file in the tools directory for 14848 // more information. 14849 // 14850 // $hash=3faec922bbb345e8bc5429dabe8ebdc2275253dd$ 14851 // 14852 14853 extern (C): 14854 14855 /// 14856 /// Supports creation and modification of menus. See cef_menu_id_t for the 14857 /// command ids that have default implementations. All user-defined command ids 14858 /// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of 14859 /// this structure can only be accessed on the browser process the UI thread. 14860 /// 14861 /// NOTE: This struct is allocated DLL-side. 14862 /// 14863 struct cef_menu_model_t 14864 { 14865 /// 14866 /// Base structure. 14867 /// 14868 14869 /// 14870 /// Returns true (1) if this menu is a submenu. 14871 /// 14872 14873 /// 14874 /// Clears the menu. Returns true (1) on success. 14875 /// 14876 14877 /// 14878 /// Returns the number of items in this menu. 14879 14880 cef_base_ref_counted_t base; 14881 extern(System) int function (cef_menu_model_t* self) nothrow is_sub_menu; 14882 extern(System) int function (cef_menu_model_t* self) nothrow clear; 14883 /// 14884 extern(System) size_t function (cef_menu_model_t* self) nothrow get_count; 14885 14886 /// 14887 /// Add a separator to the menu. Returns true (1) on success. 14888 /// 14889 extern(System) int function (cef_menu_model_t* self) nothrow add_separator; 14890 14891 /// 14892 /// Add an item to the menu. Returns true (1) on success. 14893 /// 14894 extern(System) int function ( 14895 cef_menu_model_t* self, 14896 int command_id, 14897 const(cef_string_t)* label) nothrow add_item; 14898 14899 /// 14900 /// Add a check item to the menu. Returns true (1) on success. 14901 /// 14902 extern(System) int function ( 14903 cef_menu_model_t* self, 14904 int command_id, 14905 const(cef_string_t)* label) nothrow add_check_item; 14906 14907 /// 14908 /// Add a radio item to the menu. Only a single item with the specified 14909 /// |group_id| can be checked at a time. Returns true (1) on success. 14910 /// 14911 extern(System) int function ( 14912 cef_menu_model_t* self, 14913 int command_id, 14914 const(cef_string_t)* label, 14915 int group_id) nothrow add_radio_item; 14916 14917 /// 14918 /// Add a sub-menu to the menu. The new sub-menu is returned. 14919 /// 14920 extern(System) cef_menu_model_t* function ( 14921 cef_menu_model_t* self, 14922 int command_id, 14923 const(cef_string_t)* label) nothrow add_sub_menu; 14924 14925 /// 14926 /// Insert a separator in the menu at the specified |index|. Returns true (1) 14927 /// on success. 14928 /// 14929 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow insert_separator_at; 14930 14931 /// 14932 /// Insert an item in the menu at the specified |index|. Returns true (1) on 14933 /// success. 14934 /// 14935 extern(System) int function ( 14936 cef_menu_model_t* self, 14937 size_t index, 14938 int command_id, 14939 const(cef_string_t)* label) nothrow insert_item_at; 14940 14941 /// 14942 /// Insert a check item in the menu at the specified |index|. Returns true (1) 14943 /// on success. 14944 /// 14945 extern(System) int function ( 14946 cef_menu_model_t* self, 14947 size_t index, 14948 int command_id, 14949 const(cef_string_t)* label) nothrow insert_check_item_at; 14950 14951 /// 14952 /// Insert a radio item in the menu at the specified |index|. Only a single 14953 /// item with the specified |group_id| can be checked at a time. Returns true 14954 /// (1) on success. 14955 /// 14956 extern(System) int function ( 14957 cef_menu_model_t* self, 14958 size_t index, 14959 int command_id, 14960 const(cef_string_t)* label, 14961 int group_id) nothrow insert_radio_item_at; 14962 14963 /// 14964 /// Insert a sub-menu in the menu at the specified |index|. The new sub-menu 14965 /// is returned. 14966 /// 14967 extern(System) cef_menu_model_t* function ( 14968 cef_menu_model_t* self, 14969 size_t index, 14970 int command_id, 14971 const(cef_string_t)* label) nothrow insert_sub_menu_at; 14972 14973 /// 14974 /// Removes the item with the specified |command_id|. Returns true (1) on 14975 /// success. 14976 /// 14977 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove; 14978 14979 /// 14980 /// Removes the item at the specified |index|. Returns true (1) on success. 14981 /// 14982 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_at; 14983 14984 /// 14985 /// Returns the index associated with the specified |command_id| or -1 if not 14986 /// found due to the command id not existing in the menu. 14987 /// 14988 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_index_of; 14989 14990 /// 14991 /// Returns the command id at the specified |index| or -1 if not found due to 14992 /// invalid range or the index being a separator. 14993 /// 14994 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_command_id_at; 14995 14996 /// 14997 /// Sets the command id at the specified |index|. Returns true (1) on success. 14998 /// 14999 extern(System) int function ( 15000 cef_menu_model_t* self, 15001 size_t index, 15002 int command_id) nothrow set_command_id_at; 15003 15004 /// 15005 /// Returns the label for the specified |command_id| or NULL if not found. 15006 /// 15007 // The resulting string must be freed by calling cef_string_userfree_free(). 15008 extern(System) cef_string_userfree_t function ( 15009 cef_menu_model_t* self, 15010 int command_id) nothrow get_label; 15011 15012 /// 15013 /// Returns the label at the specified |index| or NULL if not found due to 15014 /// invalid range or the index being a separator. 15015 /// 15016 // The resulting string must be freed by calling cef_string_userfree_free(). 15017 extern(System) cef_string_userfree_t function ( 15018 cef_menu_model_t* self, 15019 size_t index) nothrow get_label_at; 15020 15021 /// 15022 /// Sets the label for the specified |command_id|. Returns true (1) on 15023 /// success. 15024 /// 15025 extern(System) int function ( 15026 cef_menu_model_t* self, 15027 int command_id, 15028 const(cef_string_t)* label) nothrow set_label; 15029 15030 /// 15031 /// Set the label at the specified |index|. Returns true (1) on success. 15032 /// 15033 extern(System) int function ( 15034 cef_menu_model_t* self, 15035 size_t index, 15036 const(cef_string_t)* label) nothrow set_label_at; 15037 15038 /// 15039 /// Returns the item type for the specified |command_id|. 15040 /// 15041 extern(System) cef_menu_item_type_t function ( 15042 cef_menu_model_t* self, 15043 int command_id) nothrow get_type; 15044 15045 /// 15046 /// Returns the item type at the specified |index|. 15047 /// 15048 extern(System) cef_menu_item_type_t function ( 15049 cef_menu_model_t* self, 15050 size_t index) nothrow get_type_at; 15051 15052 /// 15053 /// Returns the group id for the specified |command_id| or -1 if invalid. 15054 /// 15055 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_group_id; 15056 15057 /// 15058 /// Returns the group id at the specified |index| or -1 if invalid. 15059 /// 15060 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_group_id_at; 15061 15062 /// 15063 /// Sets the group id for the specified |command_id|. Returns true (1) on 15064 /// success. 15065 /// 15066 extern(System) int function ( 15067 cef_menu_model_t* self, 15068 int command_id, 15069 int group_id) nothrow set_group_id; 15070 15071 /// 15072 /// Sets the group id at the specified |index|. Returns true (1) on success. 15073 /// 15074 extern(System) int function ( 15075 cef_menu_model_t* self, 15076 size_t index, 15077 int group_id) nothrow set_group_id_at; 15078 15079 /// 15080 /// Returns the submenu for the specified |command_id| or NULL if invalid. 15081 /// 15082 extern(System) cef_menu_model_t* function ( 15083 cef_menu_model_t* self, 15084 int command_id) nothrow get_sub_menu; 15085 15086 /// 15087 /// Returns the submenu at the specified |index| or NULL if invalid. 15088 /// 15089 extern(System) cef_menu_model_t* function ( 15090 cef_menu_model_t* self, 15091 size_t index) nothrow get_sub_menu_at; 15092 15093 /// 15094 /// Returns true (1) if the specified |command_id| is visible. 15095 /// 15096 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_visible; 15097 15098 /// 15099 /// Returns true (1) if the specified |index| is visible. 15100 /// 15101 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_visible_at; 15102 15103 /// 15104 /// Change the visibility of the specified |command_id|. Returns true (1) on 15105 /// success. 15106 /// 15107 extern(System) int function ( 15108 cef_menu_model_t* self, 15109 int command_id, 15110 int visible) nothrow set_visible; 15111 15112 /// 15113 /// Change the visibility at the specified |index|. Returns true (1) on 15114 /// success. 15115 /// 15116 extern(System) int function ( 15117 cef_menu_model_t* self, 15118 size_t index, 15119 int visible) nothrow set_visible_at; 15120 15121 /// 15122 /// Returns true (1) if the specified |command_id| is enabled. 15123 /// 15124 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_enabled; 15125 15126 /// 15127 /// Returns true (1) if the specified |index| is enabled. 15128 /// 15129 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_enabled_at; 15130 15131 /// 15132 /// Change the enabled status of the specified |command_id|. Returns true (1) 15133 /// on success. 15134 /// 15135 extern(System) int function ( 15136 cef_menu_model_t* self, 15137 int command_id, 15138 int enabled) nothrow set_enabled; 15139 15140 /// 15141 /// Change the enabled status at the specified |index|. Returns true (1) on 15142 /// success. 15143 /// 15144 extern(System) int function ( 15145 cef_menu_model_t* self, 15146 size_t index, 15147 int enabled) nothrow set_enabled_at; 15148 15149 /// 15150 /// Returns true (1) if the specified |command_id| is checked. Only applies to 15151 /// check and radio items. 15152 /// 15153 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_checked; 15154 15155 /// 15156 /// Returns true (1) if the specified |index| is checked. Only applies to 15157 /// check and radio items. 15158 /// 15159 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_checked_at; 15160 15161 /// 15162 /// Check the specified |command_id|. Only applies to check and radio items. 15163 /// Returns true (1) on success. 15164 /// 15165 extern(System) int function ( 15166 cef_menu_model_t* self, 15167 int command_id, 15168 int checked) nothrow set_checked; 15169 15170 /// 15171 /// Check the specified |index|. Only applies to check and radio items. 15172 /// Returns true (1) on success. 15173 /// 15174 extern(System) int function ( 15175 cef_menu_model_t* self, 15176 size_t index, 15177 int checked) nothrow set_checked_at; 15178 15179 /// 15180 /// Returns true (1) if the specified |command_id| has a keyboard accelerator 15181 /// assigned. 15182 /// 15183 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow has_accelerator; 15184 15185 /// 15186 /// Returns true (1) if the specified |index| has a keyboard accelerator 15187 /// assigned. 15188 /// 15189 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow has_accelerator_at; 15190 15191 /// 15192 /// Set the keyboard accelerator for the specified |command_id|. |key_code| 15193 /// can be any virtual key or character value. Returns true (1) on success. 15194 /// 15195 extern(System) int function ( 15196 cef_menu_model_t* self, 15197 int command_id, 15198 int key_code, 15199 int shift_pressed, 15200 int ctrl_pressed, 15201 int alt_pressed) nothrow set_accelerator; 15202 15203 /// 15204 /// Set the keyboard accelerator at the specified |index|. |key_code| can be 15205 /// any virtual key or character value. Returns true (1) on success. 15206 /// 15207 extern(System) int function ( 15208 cef_menu_model_t* self, 15209 size_t index, 15210 int key_code, 15211 int shift_pressed, 15212 int ctrl_pressed, 15213 int alt_pressed) nothrow set_accelerator_at; 15214 15215 /// 15216 /// Remove the keyboard accelerator for the specified |command_id|. Returns 15217 /// true (1) on success. 15218 /// 15219 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove_accelerator; 15220 15221 /// 15222 /// Remove the keyboard accelerator at the specified |index|. Returns true (1) 15223 /// on success. 15224 /// 15225 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_accelerator_at; 15226 15227 /// 15228 /// Retrieves the keyboard accelerator for the specified |command_id|. Returns 15229 /// true (1) on success. 15230 /// 15231 extern(System) int function ( 15232 cef_menu_model_t* self, 15233 int command_id, 15234 int* key_code, 15235 int* shift_pressed, 15236 int* ctrl_pressed, 15237 int* alt_pressed) nothrow get_accelerator; 15238 15239 /// 15240 /// Retrieves the keyboard accelerator for the specified |index|. Returns true 15241 /// (1) on success. 15242 /// 15243 extern(System) int function ( 15244 cef_menu_model_t* self, 15245 size_t index, 15246 int* key_code, 15247 int* shift_pressed, 15248 int* ctrl_pressed, 15249 int* alt_pressed) nothrow get_accelerator_at; 15250 15251 /// 15252 /// Set the explicit color for |command_id| and |color_type| to |color|. 15253 /// Specify a |color| value of 0 to remove the explicit color. If no explicit 15254 /// color or default color is set for |color_type| then the system color will 15255 /// be used. Returns true (1) on success. 15256 /// 15257 extern(System) int function ( 15258 cef_menu_model_t* self, 15259 int command_id, 15260 cef_menu_color_type_t color_type, 15261 cef_color_t color) nothrow set_color; 15262 15263 /// 15264 /// Set the explicit color for |command_id| and |index| to |color|. Specify a 15265 /// |color| value of 0 to remove the explicit color. Specify an |index| value 15266 /// of -1 to set the default color for items that do not have an explicit 15267 /// color set. If no explicit color or default color is set for |color_type| 15268 /// then the system color will be used. Returns true (1) on success. 15269 /// 15270 extern(System) int function ( 15271 cef_menu_model_t* self, 15272 int index, 15273 cef_menu_color_type_t color_type, 15274 cef_color_t color) nothrow set_color_at; 15275 15276 /// 15277 /// Returns in |color| the color that was explicitly set for |command_id| and 15278 /// |color_type|. If a color was not set then 0 will be returned in |color|. 15279 /// Returns true (1) on success. 15280 /// 15281 extern(System) int function ( 15282 cef_menu_model_t* self, 15283 int command_id, 15284 cef_menu_color_type_t color_type, 15285 cef_color_t* color) nothrow get_color; 15286 15287 /// 15288 /// Returns in |color| the color that was explicitly set for |command_id| and 15289 /// |color_type|. Specify an |index| value of -1 to return the default color 15290 /// in |color|. If a color was not set then 0 will be returned in |color|. 15291 /// Returns true (1) on success. 15292 /// 15293 extern(System) int function ( 15294 cef_menu_model_t* self, 15295 int index, 15296 cef_menu_color_type_t color_type, 15297 cef_color_t* color) nothrow get_color_at; 15298 15299 /// 15300 /// Sets the font list for the specified |command_id|. If |font_list| is NULL 15301 /// the system font will be used. Returns true (1) on success. The format is 15302 /// "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: 15303 /// - FONT_FAMILY_LIST is a comma-separated list of font family names, 15304 /// - STYLES is an optional space-separated list of style names (case- 15305 /// sensitive "Bold" and "Italic" are supported), and 15306 /// - SIZE is an integer font size in pixels with the suffix "px". 15307 /// 15308 /// Here are examples of valid font description strings: 15309 /// - "Arial, Helvetica, Bold Italic 14px" 15310 /// - "Arial, 14px" 15311 /// 15312 extern(System) int function ( 15313 cef_menu_model_t* self, 15314 int command_id, 15315 const(cef_string_t)* font_list) nothrow set_font_list; 15316 15317 /// 15318 /// Sets the font list for the specified |index|. Specify an |index| value of 15319 /// - 1 to set the default font. If |font_list| is NULL the system font will 15320 /// - FONT_FAMILY_LIST is a comma-separated list of font family names, 15321 /// - STYLES is an optional space-separated list of style names (case- 15322 /// sensitive "Bold" and "Italic" are supported), and 15323 /// - SIZE is an integer font size in pixels with the suffix "px". 15324 /// 15325 /// Here are examples of valid font description strings: 15326 /// - "Arial, Helvetica, Bold Italic 14px" 15327 /// - "Arial, 14px" 15328 /// 15329 extern(System) int function ( 15330 cef_menu_model_t* self, 15331 int index, 15332 const(cef_string_t)* font_list) nothrow set_font_list_at; 15333 } 15334 15335 15336 15337 /// 15338 /// Create a new MenuModel with the specified |delegate|. 15339 /// 15340 cef_menu_model_t* cef_menu_model_create (cef_menu_model_delegate_t* delegate_); 15341 15342 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ 15343 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 15344 // 15345 // Redistribution and use in source and binary forms, with or without 15346 // modification, are permitted provided that the following conditions are 15347 // met: 15348 // 15349 // * Redistributions of source code must retain the above copyright 15350 // notice, this list of conditions and the following disclaimer. 15351 // * Redistributions in binary form must reproduce the above 15352 // copyright notice, this list of conditions and the following disclaimer 15353 // in the documentation and/or other materials provided with the 15354 // distribution. 15355 // * Neither the name of Google Inc. nor the name Chromium Embedded 15356 // Framework nor the names of its contributors may be used to endorse 15357 // or promote products derived from this software without specific prior 15358 // written permission. 15359 // 15360 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15361 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15362 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15363 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15364 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15365 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15366 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15367 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15368 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15369 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15370 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15371 // 15372 // --------------------------------------------------------------------------- 15373 // 15374 // This file was generated by the CEF translator tool and should not edited 15375 // by hand. See the translator.README.txt file in the tools directory for 15376 // more information. 15377 // 15378 // $hash=356622117a74adbc02a4b778985a3dcf402992f6$ 15379 // 15380 15381 extern (C): 15382 15383 15384 15385 /// 15386 /// Implement this structure to handle menu model events. The functions of this 15387 /// structure will be called on the browser process UI thread unless otherwise 15388 /// indicated. 15389 /// 15390 /// NOTE: This struct is allocated client-side. 15391 /// 15392 struct cef_menu_model_delegate_t 15393 { 15394 /// 15395 /// Base structure. 15396 /// 15397 15398 /// 15399 /// Perform the action associated with the specified |command_id| and optional 15400 /// |event_flags|. 15401 /// 15402 15403 /// 15404 /// Called when the user moves the mouse outside the menu and over the owning 15405 15406 cef_base_ref_counted_t base; 15407 extern(System) void function ( 15408 cef_menu_model_delegate_t* self, 15409 cef_menu_model_t* menu_model, 15410 int command_id, 15411 cef_event_flags_t event_flags) nothrow execute_command; 15412 /// window. 15413 /// 15414 extern(System) void function ( 15415 cef_menu_model_delegate_t* self, 15416 cef_menu_model_t* menu_model, 15417 const(cef_point_t)* screen_point) nothrow mouse_outside_menu; 15418 15419 /// 15420 /// Called on unhandled open submenu keyboard commands. |is_rtl| will be true 15421 /// (1) if the menu is displaying a right-to-left language. 15422 /// 15423 extern(System) void function ( 15424 cef_menu_model_delegate_t* self, 15425 cef_menu_model_t* menu_model, 15426 int is_rtl) nothrow unhandled_open_submenu; 15427 15428 /// 15429 /// Called on unhandled close submenu keyboard commands. |is_rtl| will be true 15430 /// (1) if the menu is displaying a right-to-left language. 15431 /// 15432 extern(System) void function ( 15433 cef_menu_model_delegate_t* self, 15434 cef_menu_model_t* menu_model, 15435 int is_rtl) nothrow unhandled_close_submenu; 15436 15437 /// 15438 /// The menu is about to show. 15439 /// 15440 extern(System) void function ( 15441 cef_menu_model_delegate_t* self, 15442 cef_menu_model_t* menu_model) nothrow menu_will_show; 15443 15444 /// 15445 /// The menu has closed. 15446 /// 15447 extern(System) void function ( 15448 cef_menu_model_delegate_t* self, 15449 cef_menu_model_t* menu_model) nothrow menu_closed; 15450 15451 /// 15452 /// Optionally modify a menu item label. Return true (1) if |label| was 15453 /// modified. 15454 /// 15455 extern(System) int function ( 15456 cef_menu_model_delegate_t* self, 15457 cef_menu_model_t* menu_model, 15458 cef_string_t* label) nothrow format_label; 15459 } 15460 15461 15462 15463 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_ 15464 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 15465 // 15466 // Redistribution and use in source and binary forms, with or without 15467 // modification, are permitted provided that the following conditions are 15468 // met: 15469 // 15470 // * Redistributions of source code must retain the above copyright 15471 // notice, this list of conditions and the following disclaimer. 15472 // * Redistributions in binary form must reproduce the above 15473 // copyright notice, this list of conditions and the following disclaimer 15474 // in the documentation and/or other materials provided with the 15475 // distribution. 15476 // * Neither the name of Google Inc. nor the name Chromium Embedded 15477 // Framework nor the names of its contributors may be used to endorse 15478 // or promote products derived from this software without specific prior 15479 // written permission. 15480 // 15481 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15482 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15483 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15484 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15485 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15486 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15487 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15488 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15489 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15490 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15491 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15492 // 15493 // --------------------------------------------------------------------------- 15494 // 15495 // This file was generated by the CEF translator tool and should not edited 15496 // by hand. See the translator.README.txt file in the tools directory for 15497 // more information. 15498 // 15499 // $hash=ee689e4f8ec74d73a3b89f039fc0df900fa2611e$ 15500 // 15501 15502 extern (C): 15503 15504 /// 15505 /// Structure used to represent an entry in navigation history. 15506 /// 15507 /// NOTE: This struct is allocated DLL-side. 15508 /// 15509 struct cef_navigation_entry_t 15510 { 15511 /// 15512 /// Base structure. 15513 /// 15514 15515 /// 15516 /// Returns true (1) if this object is valid. Do not call any other functions 15517 /// if this function returns false (0). 15518 /// 15519 15520 /// 15521 /// Returns the actual URL of the page. For some pages this may be data: URL 15522 /// or similar. Use get_display_url() to return a display-friendly version. 15523 /// 15524 // The resulting string must be freed by calling cef_string_userfree_free(). 15525 15526 cef_base_ref_counted_t base; 15527 extern(System) int function (cef_navigation_entry_t* self) nothrow is_valid; 15528 extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_url; 15529 15530 /// 15531 /// Returns a display-friendly version of the URL. 15532 /// 15533 // The resulting string must be freed by calling cef_string_userfree_free(). 15534 extern(System) cef_string_userfree_t function ( 15535 cef_navigation_entry_t* self) nothrow get_display_url; 15536 15537 /// 15538 /// Returns the original URL that was entered by the user before any 15539 /// redirects. 15540 /// 15541 // The resulting string must be freed by calling cef_string_userfree_free(). 15542 extern(System) cef_string_userfree_t function ( 15543 cef_navigation_entry_t* self) nothrow get_original_url; 15544 15545 /// 15546 /// Returns the title set by the page. This value may be NULL. 15547 /// 15548 // The resulting string must be freed by calling cef_string_userfree_free(). 15549 extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_title; 15550 15551 /// 15552 /// Returns the transition type which indicates what the user did to move to 15553 /// this page from the previous page. 15554 /// 15555 extern(System) cef_transition_type_t function ( 15556 cef_navigation_entry_t* self) nothrow get_transition_type; 15557 15558 /// 15559 /// Returns true (1) if this navigation includes post data. 15560 /// 15561 extern(System) int function (cef_navigation_entry_t* self) nothrow has_post_data; 15562 15563 /// 15564 /// Returns the time for the last known successful navigation completion. A 15565 /// navigation may be completed more than once if the page is reloaded. May be 15566 /// 0 if the navigation has not yet completed. 15567 /// 15568 extern(System) cef_basetime_t function ( 15569 cef_navigation_entry_t* self) nothrow get_completion_time; 15570 15571 /// 15572 /// Returns the HTTP status code for the last known successful navigation 15573 /// response. May be 0 if the response has not yet been received or if the 15574 /// navigation has not yet completed. 15575 /// 15576 extern(System) int function (cef_navigation_entry_t* self) nothrow get_http_status_code; 15577 15578 /// 15579 /// Returns the SSL information for this navigation entry. 15580 /// 15581 extern(System) cef_sslstatus_t* function (cef_navigation_entry_t* self) nothrow get_sslstatus; 15582 } 15583 15584 15585 15586 // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_ 15587 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 15588 // 15589 // Redistribution and use in source and binary forms, with or without 15590 // modification, are permitted provided that the following conditions are 15591 // met: 15592 // 15593 // * Redistributions of source code must retain the above copyright 15594 // notice, this list of conditions and the following disclaimer. 15595 // * Redistributions in binary form must reproduce the above 15596 // copyright notice, this list of conditions and the following disclaimer 15597 // in the documentation and/or other materials provided with the 15598 // distribution. 15599 // * Neither the name of Google Inc. nor the name Chromium Embedded 15600 // Framework nor the names of its contributors may be used to endorse 15601 // or promote products derived from this software without specific prior 15602 // written permission. 15603 // 15604 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15605 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15606 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15607 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15608 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15609 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15610 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15611 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15612 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15613 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15614 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15615 // 15616 // --------------------------------------------------------------------------- 15617 // 15618 // This file was generated by the CEF translator tool and should not edited 15619 // by hand. See the translator.README.txt file in the tools directory for 15620 // more information. 15621 // 15622 // $hash=c79c0b685306bfc5de847142f9c0abb36e88c891$ 15623 // 15624 15625 extern (C): 15626 15627 /// 15628 /// Add an entry to the cross-origin access whitelist. 15629 /// 15630 /// The same-origin policy restricts how scripts hosted from different origins 15631 /// (scheme + domain + port) can communicate. By default, scripts can only 15632 /// access resources with the same origin. Scripts hosted on the HTTP and HTTPS 15633 /// schemes (but no other schemes) can use the "Access-Control-Allow-Origin" 15634 /// header to allow cross-origin requests. For example, 15635 /// https://source.example.com can make XMLHttpRequest requests on 15636 /// http://target.example.com if the http://target.example.com request returns 15637 /// an "Access-Control-Allow-Origin: https://source.example.com" response 15638 /// header. 15639 /// 15640 /// Scripts in separate frames or iframes and hosted from the same protocol and 15641 /// domain suffix can execute cross-origin JavaScript if both pages set the 15642 /// document.domain value to the same domain suffix. For example, 15643 /// scheme://foo.example.com and scheme://bar.example.com can communicate using 15644 /// JavaScript if both domains set document.domain="example.com". 15645 /// 15646 /// This function is used to allow access to origins that would otherwise 15647 /// violate the same-origin policy. Scripts hosted underneath the fully 15648 /// qualified |source_origin| URL (like http://www.example.com) will be allowed 15649 /// access to all resources hosted on the specified |target_protocol| and 15650 /// |target_domain|. If |target_domain| is non-NULL and 15651 /// |allow_target_subdomains| is false (0) only exact domain matches will be 15652 /// allowed. If |target_domain| contains a top- level domain component (like 15653 /// "example.com") and |allow_target_subdomains| is true (1) sub-domain matches 15654 /// will be allowed. If |target_domain| is NULL and |allow_target_subdomains| if 15655 /// true (1) all domains and IP addresses will be allowed. 15656 /// 15657 /// This function cannot be used to bypass the restrictions on local or display 15658 /// isolated schemes. See the comments on CefRegisterCustomScheme for more 15659 /// information. 15660 /// 15661 /// This function may be called on any thread. Returns false (0) if 15662 /// |source_origin| is invalid or the whitelist cannot be accessed. 15663 /// 15664 int cef_add_cross_origin_whitelist_entry ( 15665 const(cef_string_t)* source_origin, 15666 const(cef_string_t)* target_protocol, 15667 const(cef_string_t)* target_domain, 15668 int allow_target_subdomains); 15669 15670 /// 15671 /// Remove an entry from the cross-origin access whitelist. Returns false (0) if 15672 /// |source_origin| is invalid or the whitelist cannot be accessed. 15673 /// 15674 int cef_remove_cross_origin_whitelist_entry ( 15675 const(cef_string_t)* source_origin, 15676 const(cef_string_t)* target_protocol, 15677 const(cef_string_t)* target_domain, 15678 int allow_target_subdomains); 15679 15680 /// 15681 /// Remove all entries from the cross-origin access whitelist. Returns false (0) 15682 /// if the whitelist cannot be accessed. 15683 /// 15684 int cef_clear_cross_origin_whitelist (); 15685 15686 // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_ 15687 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 15688 // 15689 // Redistribution and use in source and binary forms, with or without 15690 // modification, are permitted provided that the following conditions are 15691 // met: 15692 // 15693 // * Redistributions of source code must retain the above copyright 15694 // notice, this list of conditions and the following disclaimer. 15695 // * Redistributions in binary form must reproduce the above 15696 // copyright notice, this list of conditions and the following disclaimer 15697 // in the documentation and/or other materials provided with the 15698 // distribution. 15699 // * Neither the name of Google Inc. nor the name Chromium Embedded 15700 // Framework nor the names of its contributors may be used to endorse 15701 // or promote products derived from this software without specific prior 15702 // written permission. 15703 // 15704 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15705 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15706 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15707 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15708 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15709 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15710 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15711 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15712 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15713 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15714 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15715 // 15716 // --------------------------------------------------------------------------- 15717 // 15718 // This file was generated by the CEF translator tool and should not edited 15719 // by hand. See the translator.README.txt file in the tools directory for 15720 // more information. 15721 // 15722 // $hash=76d89f9af92afd53c32f711d9f48528f52b071e9$ 15723 // 15724 15725 extern (C): 15726 15727 /// 15728 /// Combines specified |base_url| and |relative_url| into |resolved_url|. 15729 /// Returns false (0) if one of the URLs is NULL or invalid. 15730 /// 15731 int cef_resolve_url ( 15732 const(cef_string_t)* base_url, 15733 const(cef_string_t)* relative_url, 15734 cef_string_t* resolved_url); 15735 15736 /// 15737 /// Parse the specified |url| into its component parts. Returns false (0) if the 15738 /// URL is NULL or invalid. 15739 /// 15740 int cef_parse_url (const(cef_string_t)* url, cef_urlparts_t* parts); 15741 15742 /// 15743 /// Creates a URL from the specified |parts|, which must contain a non-NULL spec 15744 /// or a non-NULL host and path (at a minimum), but not both. Returns false (0) 15745 /// if |parts| isn't initialized as described. 15746 /// 15747 int cef_create_url (const(cef_urlparts_t)* parts, cef_string_t* url); 15748 15749 /// 15750 /// This is a convenience function for formatting a URL in a concise and human- 15751 /// friendly way to help users make security-related decisions (or in other 15752 /// circumstances when people need to distinguish sites, origins, or otherwise- 15753 /// simplified URLs from each other). Internationalized domain names (IDN) may 15754 /// be presented in Unicode if the conversion is considered safe. The returned 15755 /// value will (a) omit the path for standard schemes, excepting file and 15756 /// filesystem, and (b) omit the port if it is the default for the scheme. Do 15757 /// not use this for URLs which will be parsed or sent to other applications. 15758 /// 15759 // The resulting string must be freed by calling cef_string_userfree_free(). 15760 cef_string_userfree_t cef_format_url_for_security_display ( 15761 const(cef_string_t)* origin_url); 15762 15763 /// 15764 /// Returns the mime type for the specified file extension or an NULL string if 15765 /// unknown. 15766 /// 15767 // The resulting string must be freed by calling cef_string_userfree_free(). 15768 cef_string_userfree_t cef_get_mime_type (const(cef_string_t)* extension); 15769 15770 /// 15771 /// Get the extensions associated with the given mime type. This should be 15772 /// passed in lower case. There could be multiple extensions for a given mime 15773 /// type, like "html,htm" for "text/html", or "txt,text,html,..." for "text/*". 15774 /// Any existing elements in the provided vector will not be erased. 15775 /// 15776 void cef_get_extensions_for_mime_type ( 15777 const(cef_string_t)* mime_type, 15778 cef_string_list_t extensions); 15779 15780 /// 15781 /// Encodes |data| as a base64 string. 15782 /// 15783 // The resulting string must be freed by calling cef_string_userfree_free(). 15784 cef_string_userfree_t cef_base64_encode (const(void)* data, size_t data_size); 15785 15786 /// 15787 /// Decodes the base64 encoded string |data|. The returned value will be NULL if 15788 /// the decoding fails. 15789 /// 15790 15791 cef_binary_value_t* cef_base64_decode (const(cef_string_t)* data); 15792 15793 /// 15794 /// Escapes characters in |text| which are unsuitable for use as a query 15795 /// parameter value. Everything except alphanumerics and -_.!~*'() will be 15796 /// converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The 15797 /// result is basically the same as encodeURIComponent in Javacript. 15798 /// 15799 // The resulting string must be freed by calling cef_string_userfree_free(). 15800 cef_string_userfree_t cef_uriencode (const(cef_string_t)* text, int use_plus); 15801 15802 /// 15803 /// Unescapes |text| and returns the result. Unescaping consists of looking for 15804 /// the exact pattern "%XX" where each X is a hex digit and converting to the 15805 /// character with the numerical value of those digits (e.g. "i%20=%203%3b" 15806 /// unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will 15807 /// attempt to interpret the initial decoded result as UTF-8. If the result is 15808 /// convertable into UTF-8 it will be returned as converted. Otherwise the 15809 /// initial decoded result will be returned. The |unescape_rule| parameter 15810 /// supports further customization the decoding process. 15811 /// 15812 // The resulting string must be freed by calling cef_string_userfree_free(). 15813 cef_string_userfree_t cef_uridecode ( 15814 const(cef_string_t)* text, 15815 int convert_to_utf8, 15816 cef_uri_unescape_rule_t unescape_rule); 15817 15818 /// 15819 /// Parses the specified |json_string| and returns a dictionary or list 15820 /// representation. If JSON parsing fails this function returns NULL. 15821 /// 15822 15823 cef_value_t* cef_parse_json ( 15824 const(cef_string_t)* json_string, 15825 cef_json_parser_options_t options); 15826 15827 /// 15828 /// Parses the specified UTF8-encoded |json| buffer of size |json_size| and 15829 /// returns a dictionary or list representation. If JSON parsing fails this 15830 /// function returns NULL. 15831 /// 15832 cef_value_t* cef_parse_json_buffer ( 15833 const(void)* json, 15834 size_t json_size, 15835 cef_json_parser_options_t options); 15836 15837 /// 15838 /// Parses the specified |json_string| and returns a dictionary or list 15839 /// representation. If JSON parsing fails this function returns NULL and 15840 /// populates |error_msg_out| with a formatted error message. 15841 /// 15842 cef_value_t* cef_parse_jsonand_return_error ( 15843 const(cef_string_t)* json_string, 15844 cef_json_parser_options_t options, 15845 cef_string_t* error_msg_out); 15846 15847 /// 15848 /// Generates a JSON string from the specified root |node| which should be a 15849 /// dictionary or list value. Returns an NULL string on failure. This function 15850 /// requires exclusive access to |node| including any underlying data. 15851 /// 15852 // The resulting string must be freed by calling cef_string_userfree_free(). 15853 cef_string_userfree_t cef_write_json ( 15854 cef_value_t* node, 15855 cef_json_writer_options_t options); 15856 15857 // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_ 15858 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 15859 // 15860 // Redistribution and use in source and binary forms, with or without 15861 // modification, are permitted provided that the following conditions are 15862 // met: 15863 // 15864 // * Redistributions of source code must retain the above copyright 15865 // notice, this list of conditions and the following disclaimer. 15866 // * Redistributions in binary form must reproduce the above 15867 // copyright notice, this list of conditions and the following disclaimer 15868 // in the documentation and/or other materials provided with the 15869 // distribution. 15870 // * Neither the name of Google Inc. nor the name Chromium Embedded 15871 // Framework nor the names of its contributors may be used to endorse 15872 // or promote products derived from this software without specific prior 15873 // written permission. 15874 // 15875 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15876 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15877 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15878 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15879 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15880 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15881 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15882 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15883 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15884 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15885 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15886 // 15887 // --------------------------------------------------------------------------- 15888 // 15889 // This file was generated by the CEF translator tool and should not edited 15890 // by hand. See the translator.README.txt file in the tools directory for 15891 // more information. 15892 // 15893 // $hash=996b61439db40a3a21b3395999451ab754911fbe$ 15894 // 15895 15896 extern (C): 15897 15898 /// 15899 /// Retrieve the path associated with the specified |key|. Returns true (1) on 15900 /// success. Can be called on any thread in the browser process. 15901 /// 15902 int cef_get_path (cef_path_key_t key, cef_string_t* path); 15903 15904 // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 15905 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 15906 // 15907 // Redistribution and use in source and binary forms, with or without 15908 // modification, are permitted provided that the following conditions are 15909 // met: 15910 // 15911 // * Redistributions of source code must retain the above copyright 15912 // notice, this list of conditions and the following disclaimer. 15913 // * Redistributions in binary form must reproduce the above 15914 // copyright notice, this list of conditions and the following disclaimer 15915 // in the documentation and/or other materials provided with the 15916 // distribution. 15917 // * Neither the name of Google Inc. nor the name Chromium Embedded 15918 // Framework nor the names of its contributors may be used to endorse 15919 // or promote products derived from this software without specific prior 15920 // written permission. 15921 // 15922 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15923 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15924 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15925 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15926 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15927 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15928 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15929 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15930 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15931 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15932 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15933 // 15934 // --------------------------------------------------------------------------- 15935 // 15936 // This file was generated by the CEF translator tool and should not edited 15937 // by hand. See the translator.README.txt file in the tools directory for 15938 // more information. 15939 // 15940 // $hash=c68d422a83fa1de8bd4e53e8b95223303cff206e$ 15941 // 15942 15943 extern (C): 15944 15945 /// 15946 /// Callback structure used for asynchronous continuation of media access 15947 /// permission requests. 15948 /// 15949 /// NOTE: This struct is allocated DLL-side. 15950 /// 15951 struct cef_media_access_callback_t 15952 { 15953 /// 15954 /// Base structure. 15955 /// 15956 15957 /// 15958 /// Call to allow or deny media access. If this callback was initiated in 15959 /// response to a getUserMedia (indicated by 15960 /// CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE and/or 15961 /// CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE being set) then 15962 /// |allowed_permissions| must match |required_permissions| passed to 15963 /// OnRequestMediaAccessPermission. 15964 /// 15965 15966 /// 15967 /// Cancel the media access request. 15968 15969 cef_base_ref_counted_t base; 15970 extern(System) void function ( 15971 cef_media_access_callback_t* self, 15972 uint allowed_permissions) nothrow cont; 15973 /// 15974 extern(System) void function (cef_media_access_callback_t* self) nothrow cancel; 15975 } 15976 15977 15978 15979 /// 15980 /// Callback structure used for asynchronous continuation of permission prompts. 15981 /// 15982 /// NOTE: This struct is allocated DLL-side. 15983 /// 15984 struct cef_permission_prompt_callback_t 15985 { 15986 /// 15987 /// Base structure. 15988 /// 15989 cef_base_ref_counted_t base; 15990 15991 /// 15992 /// Complete the permissions request with the specified |result|. 15993 /// 15994 extern(System) void function ( 15995 cef_permission_prompt_callback_t* self, 15996 cef_permission_request_result_t result) nothrow cont; 15997 } 15998 15999 16000 16001 /// 16002 /// Implement this structure to handle events related to permission requests. 16003 /// The functions of this structure will be called on the browser process UI 16004 /// thread. 16005 /// 16006 /// NOTE: This struct is allocated client-side. 16007 /// 16008 struct cef_permission_handler_t 16009 { 16010 /// 16011 /// Base structure. 16012 /// 16013 cef_base_ref_counted_t base; 16014 16015 /// 16016 /// Called when a page requests permission to access media. 16017 /// |requesting_origin| is the URL origin requesting permission. 16018 /// |requested_permissions| is a combination of values from 16019 /// cef_media_access_permission_types_t that represent the requested 16020 /// permissions. Return true (1) and call cef_media_access_callback_t 16021 /// functions either in this function or at a later time to continue or cancel 16022 /// the request. Return false (0) to proceed with default handling. With 16023 /// Chrome style, default handling will display the permission request UI. 16024 /// With Alloy style, default handling will deny the request. This function 16025 /// will not be called if the "--enable-media-stream" command-line switch is 16026 /// used to grant all permissions. 16027 /// 16028 extern(System) int function ( 16029 cef_permission_handler_t* self, 16030 cef_browser_t* browser, 16031 cef_frame_t* frame, 16032 const(cef_string_t)* requesting_origin, 16033 uint requested_permissions, 16034 cef_media_access_callback_t* callback) nothrow on_request_media_access_permission; 16035 16036 /// 16037 /// Called when a page should show a permission prompt. |prompt_id| uniquely 16038 /// identifies the prompt. |requesting_origin| is the URL origin requesting 16039 /// permission. |requested_permissions| is a combination of values from 16040 /// cef_permission_request_types_t that represent the requested permissions. 16041 /// Return true (1) and call cef_permission_prompt_callback_t::Continue either 16042 /// in this function or at a later time to continue or cancel the request. 16043 /// Return false (0) to proceed with default handling. With Chrome style, 16044 /// default handling will display the permission prompt UI. With Alloy style, 16045 /// default handling is CEF_PERMISSION_RESULT_IGNORE. 16046 /// 16047 extern(System) int function ( 16048 cef_permission_handler_t* self, 16049 cef_browser_t* browser, 16050 ulong prompt_id, 16051 const(cef_string_t)* requesting_origin, 16052 uint requested_permissions, 16053 cef_permission_prompt_callback_t* callback) nothrow on_show_permission_prompt; 16054 16055 /// 16056 /// Called when a permission prompt handled via OnShowPermissionPrompt is 16057 /// dismissed. |prompt_id| will match the value that was passed to 16058 /// OnShowPermissionPrompt. |result| will be the value passed to 16059 /// cef_permission_prompt_callback_t::Continue or CEF_PERMISSION_RESULT_IGNORE 16060 /// if the dialog was dismissed for other reasons such as navigation, browser 16061 /// closure, etc. This function will not be called if OnShowPermissionPrompt 16062 /// returned false (0) for |prompt_id|. 16063 /// 16064 extern(System) void function ( 16065 cef_permission_handler_t* self, 16066 cef_browser_t* browser, 16067 ulong prompt_id, 16068 cef_permission_request_result_t result) nothrow on_dismiss_permission_prompt; 16069 } 16070 16071 16072 16073 // CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_ 16074 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 16075 // 16076 // Redistribution and use in source and binary forms, with or without 16077 // modification, are permitted provided that the following conditions are 16078 // met: 16079 // 16080 // * Redistributions of source code must retain the above copyright 16081 // notice, this list of conditions and the following disclaimer. 16082 // * Redistributions in binary form must reproduce the above 16083 // copyright notice, this list of conditions and the following disclaimer 16084 // in the documentation and/or other materials provided with the 16085 // distribution. 16086 // * Neither the name of Google Inc. nor the name Chromium Embedded 16087 // Framework nor the names of its contributors may be used to endorse 16088 // or promote products derived from this software without specific prior 16089 // written permission. 16090 // 16091 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16092 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16093 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16094 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16095 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16096 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16097 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16098 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16099 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16100 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16101 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16102 // 16103 // --------------------------------------------------------------------------- 16104 // 16105 // This file was generated by the CEF translator tool and should not edited 16106 // by hand. See the translator.README.txt file in the tools directory for 16107 // more information. 16108 // 16109 // $hash=fb4ae87f82c143a82ddc5e4855624f9555c0d617$ 16110 // 16111 16112 extern (C): 16113 16114 /// 16115 /// Structure that manages custom preference registrations. 16116 /// 16117 /// NOTE: This struct is allocated DLL-side. 16118 /// 16119 struct cef_preference_registrar_t 16120 { 16121 /// 16122 /// Base structure. 16123 /// 16124 16125 /// 16126 /// Register a preference with the specified |name| and |default_value|. To 16127 /// avoid conflicts with built-in preferences the |name| value should contain 16128 /// an application-specific prefix followed by a period (e.g. "myapp.value"). 16129 /// The contents of |default_value| will be copied. The data type for the 16130 /// preference will be inferred from |default_value|'s type and cannot be 16131 /// changed after registration. Returns true (1) on success. Returns false (0) 16132 /// if |name| is already registered or if |default_value| has an invalid type. 16133 /// This function must be called from within the scope of the 16134 16135 /// cef_browser_process_handler_t::OnRegisterCustomPreferences callback. 16136 /// 16137 16138 cef_base_scoped_t base; 16139 extern(System) int function ( 16140 cef_preference_registrar_t* self, 16141 const(cef_string_t)* name, 16142 cef_value_t* default_value) nothrow add_preference; 16143 } 16144 16145 16146 /// 16147 /// Implemented by the client to observe preference changes and registered via 16148 /// cef_preference_manager_t::AddPreferenceObserver. The functions of this 16149 /// structure will be called on the browser process UI thread. 16150 /// 16151 /// NOTE: This struct is allocated client-side. 16152 /// 16153 struct cef_preference_observer_t 16154 { 16155 /// 16156 /// Base structure. 16157 /// 16158 16159 cef_base_ref_counted_t base; 16160 16161 /// 16162 /// Called when a preference has changed. The new value can be retrieved using 16163 /// cef_preference_manager_t::GetPreference. 16164 /// 16165 extern(System) void function ( 16166 cef_preference_observer_t* self, 16167 const(cef_string_t)* name) nothrow on_preference_changed; 16168 } 16169 16170 16171 16172 // CEF_API_ADDED(13401) 16173 16174 /// 16175 /// Manage access to preferences. Many built-in preferences are registered by 16176 /// Chromium. Custom preferences can be registered in 16177 /// cef_browser_process_handler_t::OnRegisterCustomPreferences. 16178 /// 16179 /// NOTE: This struct is allocated DLL-side. 16180 /// 16181 struct cef_preference_manager_t 16182 { 16183 /// 16184 /// Base structure. 16185 /// 16186 cef_base_ref_counted_t base; 16187 16188 /// 16189 /// Returns true (1) if a preference with the specified |name| exists. This 16190 /// function must be called on the browser process UI thread. 16191 /// 16192 extern(System) int function ( 16193 cef_preference_manager_t* self, 16194 const(cef_string_t)* name) nothrow has_preference; 16195 16196 /// 16197 /// Returns the value for the preference with the specified |name|. Returns 16198 /// NULL if the preference does not exist. The returned object contains a copy 16199 /// of the underlying preference value and modifications to the returned 16200 /// object will not modify the underlying preference value. This function must 16201 /// be called on the browser process UI thread. 16202 /// 16203 extern(System) cef_value_t* function ( 16204 cef_preference_manager_t* self, 16205 const(cef_string_t)* name) nothrow get_preference; 16206 16207 /// 16208 /// Returns all preferences as a dictionary. If |include_defaults| is true (1) 16209 /// then preferences currently at their default value will be included. The 16210 /// returned object contains a copy of the underlying preference values and 16211 /// modifications to the returned object will not modify the underlying 16212 /// preference values. This function must be called on the browser process UI 16213 /// thread. 16214 /// 16215 extern(System) cef_dictionary_value_t* function ( 16216 cef_preference_manager_t* self, 16217 int include_defaults) nothrow get_all_preferences; 16218 16219 /// 16220 /// Returns true (1) if the preference with the specified |name| can be 16221 /// modified using SetPreference. As one example preferences set via the 16222 /// command-line usually cannot be modified. This function must be called on 16223 /// the browser process UI thread. 16224 /// 16225 extern(System) int function ( 16226 cef_preference_manager_t* self, 16227 const(cef_string_t)* name) nothrow can_set_preference; 16228 16229 /// 16230 /// Set the |value| associated with preference |name|. Returns true (1) if the 16231 /// value is set successfully and false (0) otherwise. If |value| is NULL the 16232 /// preference will be restored to its default value. If setting the 16233 /// preference fails then |error| will be populated with a detailed 16234 /// description of the problem. This function must be called on the browser 16235 /// process UI thread. 16236 /// 16237 extern(System) int function ( 16238 cef_preference_manager_t* self, 16239 const(cef_string_t)* name, 16240 cef_value_t* value, 16241 cef_string_t* error) nothrow set_preference; 16242 16243 /// 16244 /// Add an observer for preference changes. |name| is the name of the 16245 /// preference to observe. If |name| is NULL then all preferences will be 16246 /// observed. Observing all preferences has performance consequences and is 16247 /// not recommended outside of testing scenarios. The observer will remain 16248 /// registered until the returned Registration object is destroyed. This 16249 /// function must be called on the browser process UI thread. 16250 /// 16251 extern(System) cef_registration_t* function ( 16252 cef_preference_manager_t* self, 16253 const(cef_string_t)* name, 16254 cef_preference_observer_t* observer) nothrow add_preference_observer; 16255 } 16256 16257 16258 16259 /// 16260 /// Returns the current Chrome Variations configuration (combination of field 16261 /// trials and chrome://flags) as equivalent command-line switches 16262 /// (`--[enable|disable]-features=XXXX`, etc). These switches can be used to 16263 /// apply the same configuration when launching a CEF-based application. See 16264 /// https://developer.chrome.com/docs/web-platform/chrome-variations for 16265 /// background and details. Note that field trial tests are disabled by default 16266 /// in Official CEF builds (via the `disable_fieldtrial_testing_config=true (1)` 16267 /// GN flag). This function must be called on the browser process UI thread. 16268 /// 16269 void cef_preference_manager_get_chrome_variations_as_switches ( 16270 cef_string_list_t switches); 16271 16272 /// 16273 /// Returns the current Chrome Variations configuration (combination of field 16274 /// trials and chrome://flags) as human-readable strings. This is the human- 16275 /// readable equivalent of the "Active Variations" section of chrome://version. 16276 /// See https://developer.chrome.com/docs/web-platform/chrome-variations for 16277 /// background and details. Note that field trial tests are disabled by default 16278 /// in Official CEF builds (via the `disable_fieldtrial_testing_config=true (1)` 16279 /// GN flag). This function must be called on the browser process UI thread. 16280 /// 16281 void cef_preference_manager_get_chrome_variations_as_strings ( 16282 cef_string_list_t strings); 16283 16284 /// 16285 /// Returns the global preference manager object. 16286 /// 16287 cef_preference_manager_t* cef_preference_manager_get_global (); 16288 16289 // CEF_INCLUDE_CAPI_CEF_PREFERENCE_CAPI_H_ 16290 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 16291 // 16292 // Redistribution and use in source and binary forms, with or without 16293 // modification, are permitted provided that the following conditions are 16294 // met: 16295 // 16296 // * Redistributions of source code must retain the above copyright 16297 // notice, this list of conditions and the following disclaimer. 16298 // * Redistributions in binary form must reproduce the above 16299 // copyright notice, this list of conditions and the following disclaimer 16300 // in the documentation and/or other materials provided with the 16301 // distribution. 16302 // * Neither the name of Google Inc. nor the name Chromium Embedded 16303 // Framework nor the names of its contributors may be used to endorse 16304 // or promote products derived from this software without specific prior 16305 // written permission. 16306 // 16307 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16308 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16309 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16310 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16311 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16312 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16313 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16314 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16315 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16316 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16317 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16318 // 16319 // --------------------------------------------------------------------------- 16320 // 16321 // This file was generated by the CEF translator tool and should not edited 16322 // by hand. See the translator.README.txt file in the tools directory for 16323 // more information. 16324 // 16325 // $hash=6ee45d7ffdb5670f98e8a042ed0c4db5cabc6d12$ 16326 // 16327 16328 extern (C): 16329 16330 /// 16331 /// Callback structure for asynchronous continuation of print dialog requests. 16332 /// 16333 /// NOTE: This struct is allocated DLL-side. 16334 /// 16335 struct cef_print_dialog_callback_t 16336 { 16337 /// 16338 /// Base structure. 16339 /// 16340 16341 /// 16342 /// Continue printing with the specified |settings|. 16343 /// 16344 16345 /// 16346 /// Cancel the printing. 16347 /// 16348 16349 /// 16350 /// Callback structure for asynchronous continuation of print job requests. 16351 /// 16352 /// NOTE: This struct is allocated DLL-side. 16353 /// 16354 16355 cef_base_ref_counted_t base; 16356 extern(System) void function ( 16357 cef_print_dialog_callback_t* self, 16358 cef_print_settings_t* settings) nothrow cont; 16359 extern(System) void function (cef_print_dialog_callback_t* self) nothrow cancel; 16360 } 16361 16362 16363 16364 struct cef_print_job_callback_t 16365 { 16366 /// 16367 /// Base structure. 16368 /// 16369 cef_base_ref_counted_t base; 16370 16371 /// 16372 /// Indicate completion of the print job. 16373 /// 16374 extern(System) void function (cef_print_job_callback_t* self) nothrow cont; 16375 } 16376 16377 16378 16379 /// 16380 /// Implement this structure to handle printing on Linux. Each browser will have 16381 /// only one print job in progress at a time. The functions of this structure 16382 /// will be called on the browser process UI thread. 16383 /// 16384 /// NOTE: This struct is allocated client-side. 16385 /// 16386 struct cef_print_handler_t 16387 { 16388 /// 16389 /// Base structure. 16390 /// 16391 cef_base_ref_counted_t base; 16392 16393 /// 16394 /// Called when printing has started for the specified |browser|. This 16395 /// function will be called before the other OnPrint*() functions and 16396 /// irrespective of how printing was initiated (e.g. 16397 /// cef_browser_host_t::print(), JavaScript window.print() or PDF extension 16398 /// print button). 16399 /// 16400 extern(System) void function ( 16401 cef_print_handler_t* self, 16402 cef_browser_t* browser) nothrow on_print_start; 16403 16404 /// 16405 /// Synchronize |settings| with client state. If |get_defaults| is true (1) 16406 /// then populate |settings| with the default print settings. Do not keep a 16407 /// reference to |settings| outside of this callback. 16408 /// 16409 extern(System) void function ( 16410 cef_print_handler_t* self, 16411 cef_browser_t* browser, 16412 cef_print_settings_t* settings, 16413 int get_defaults) nothrow on_print_settings; 16414 16415 /// 16416 /// Show the print dialog. Execute |callback| once the dialog is dismissed. 16417 /// Return true (1) if the dialog will be displayed or false (0) to cancel the 16418 /// printing immediately. 16419 /// 16420 extern(System) int function ( 16421 cef_print_handler_t* self, 16422 cef_browser_t* browser, 16423 int has_selection, 16424 cef_print_dialog_callback_t* callback) nothrow on_print_dialog; 16425 16426 /// 16427 /// Send the print job to the printer. Execute |callback| once the job is 16428 /// completed. Return true (1) if the job will proceed or false (0) to cancel 16429 /// the job immediately. 16430 /// 16431 extern(System) int function ( 16432 cef_print_handler_t* self, 16433 cef_browser_t* browser, 16434 const(cef_string_t)* document_name, 16435 const(cef_string_t)* pdf_file_path, 16436 cef_print_job_callback_t* callback) nothrow on_print_job; 16437 16438 /// 16439 /// Reset client state related to printing. 16440 /// 16441 extern(System) void function ( 16442 cef_print_handler_t* self, 16443 cef_browser_t* browser) nothrow on_print_reset; 16444 16445 /// 16446 /// Return the PDF paper size in device units. Used in combination with 16447 /// cef_browser_host_t::print_to_pdf(). 16448 /// 16449 extern(System) cef_size_t function ( 16450 cef_print_handler_t* self, 16451 cef_browser_t* browser, 16452 int device_units_per_inch) nothrow get_pdf_paper_size; 16453 } 16454 16455 16456 16457 // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_ 16458 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 16459 // 16460 // Redistribution and use in source and binary forms, with or without 16461 // modification, are permitted provided that the following conditions are 16462 // met: 16463 // 16464 // * Redistributions of source code must retain the above copyright 16465 // notice, this list of conditions and the following disclaimer. 16466 // * Redistributions in binary form must reproduce the above 16467 // copyright notice, this list of conditions and the following disclaimer 16468 // in the documentation and/or other materials provided with the 16469 // distribution. 16470 // * Neither the name of Google Inc. nor the name Chromium Embedded 16471 // Framework nor the names of its contributors may be used to endorse 16472 // or promote products derived from this software without specific prior 16473 // written permission. 16474 // 16475 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16476 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16477 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16478 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16479 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16480 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16481 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16482 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16483 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16484 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16485 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16486 // 16487 // --------------------------------------------------------------------------- 16488 // 16489 // This file was generated by the CEF translator tool and should not edited 16490 // by hand. See the translator.README.txt file in the tools directory for 16491 // more information. 16492 // 16493 // $hash=69993ccc7b3ffcb04b8a892d6607a005b6e8dcc9$ 16494 // 16495 16496 extern (C): 16497 16498 /// 16499 /// Structure representing print settings. 16500 /// 16501 /// NOTE: This struct is allocated DLL-side. 16502 /// 16503 struct cef_print_settings_t 16504 { 16505 /// 16506 /// Base structure. 16507 /// 16508 16509 /// 16510 /// Returns true (1) if this object is valid. Do not call any other functions 16511 /// if this function returns false (0). 16512 /// 16513 16514 /// 16515 /// Returns true (1) if the values of this object are read-only. Some APIs may 16516 /// expose read-only objects. 16517 /// 16518 16519 /// 16520 /// Set the page orientation. 16521 /// 16522 16523 /// 16524 /// Returns true (1) if the orientation is landscape. 16525 16526 cef_base_ref_counted_t base; 16527 extern(System) int function (cef_print_settings_t* self) nothrow is_valid; 16528 extern(System) int function (cef_print_settings_t* self) nothrow is_read_only; 16529 extern(System) void function (cef_print_settings_t* self, int landscape) nothrow set_orientation; 16530 /// 16531 extern(System) int function (cef_print_settings_t* self) nothrow is_landscape; 16532 16533 /// 16534 /// Set the printer printable area in device units. Some platforms already 16535 /// provide flipped area. Set |landscape_needs_flip| to false (0) on those 16536 /// platforms to avoid double flipping. 16537 /// 16538 extern(System) void function ( 16539 cef_print_settings_t* self, 16540 const(cef_size_t)* physical_size_device_units, 16541 const(cef_rect_t)* printable_area_device_units, 16542 int landscape_needs_flip) nothrow set_printer_printable_area; 16543 16544 /// 16545 /// Set the device name. 16546 /// 16547 extern(System) void function ( 16548 cef_print_settings_t* self, 16549 const(cef_string_t)* name) nothrow set_device_name; 16550 16551 /// 16552 /// Get the device name. 16553 /// 16554 // The resulting string must be freed by calling cef_string_userfree_free(). 16555 extern(System) cef_string_userfree_t function ( 16556 cef_print_settings_t* self) nothrow get_device_name; 16557 16558 /// 16559 /// Set the DPI (dots per inch). 16560 /// 16561 extern(System) void function (cef_print_settings_t* self, int dpi) nothrow set_dpi; 16562 16563 /// 16564 /// Get the DPI (dots per inch). 16565 /// 16566 extern(System) int function (cef_print_settings_t* self) nothrow get_dpi; 16567 16568 /// 16569 /// Set the page ranges. 16570 /// 16571 extern(System) void function ( 16572 cef_print_settings_t* self, 16573 size_t rangesCount, 16574 const(cef_range_t)* ranges) nothrow set_page_ranges; 16575 16576 /// 16577 /// Returns the number of page ranges that currently exist. 16578 /// 16579 extern(System) size_t function (cef_print_settings_t* self) nothrow get_page_ranges_count; 16580 16581 /// 16582 /// Retrieve the page ranges. 16583 /// 16584 extern(System) void function ( 16585 cef_print_settings_t* self, 16586 size_t* rangesCount, 16587 cef_range_t* ranges) nothrow get_page_ranges; 16588 16589 /// 16590 /// Set whether only the selection will be printed. 16591 /// 16592 extern(System) void function ( 16593 cef_print_settings_t* self, 16594 int selection_only) nothrow set_selection_only; 16595 16596 /// 16597 /// Returns true (1) if only the selection will be printed. 16598 /// 16599 extern(System) int function (cef_print_settings_t* self) nothrow is_selection_only; 16600 16601 /// 16602 /// Set whether pages will be collated. 16603 /// 16604 extern(System) void function (cef_print_settings_t* self, int collate) nothrow set_collate; 16605 16606 /// 16607 /// Returns true (1) if pages will be collated. 16608 /// 16609 extern(System) int function (cef_print_settings_t* self) nothrow will_collate; 16610 16611 /// 16612 /// Set the color model. 16613 /// 16614 extern(System) void function ( 16615 cef_print_settings_t* self, 16616 cef_color_model_t model) nothrow set_color_model; 16617 16618 /// 16619 /// Get the color model. 16620 /// 16621 extern(System) cef_color_model_t function (cef_print_settings_t* self) nothrow get_color_model; 16622 16623 /// 16624 /// Set the number of copies. 16625 /// 16626 extern(System) void function (cef_print_settings_t* self, int copies) nothrow set_copies; 16627 16628 /// 16629 /// Get the number of copies. 16630 /// 16631 extern(System) int function (cef_print_settings_t* self) nothrow get_copies; 16632 16633 /// 16634 /// Set the duplex mode. 16635 /// 16636 extern(System) void function ( 16637 cef_print_settings_t* self, 16638 cef_duplex_mode_t mode) nothrow set_duplex_mode; 16639 16640 /// 16641 /// Get the duplex mode. 16642 /// 16643 extern(System) cef_duplex_mode_t function (cef_print_settings_t* self) nothrow get_duplex_mode; 16644 } 16645 16646 16647 16648 /// 16649 /// Create a new cef_print_settings_t object. 16650 /// 16651 cef_print_settings_t* cef_print_settings_create (); 16652 16653 // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_ 16654 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 16655 // 16656 // Redistribution and use in source and binary forms, with or without 16657 // modification, are permitted provided that the following conditions are 16658 // met: 16659 // 16660 // * Redistributions of source code must retain the above copyright 16661 // notice, this list of conditions and the following disclaimer. 16662 // * Redistributions in binary form must reproduce the above 16663 // copyright notice, this list of conditions and the following disclaimer 16664 // in the documentation and/or other materials provided with the 16665 // distribution. 16666 // * Neither the name of Google Inc. nor the name Chromium Embedded 16667 // Framework nor the names of its contributors may be used to endorse 16668 // or promote products derived from this software without specific prior 16669 // written permission. 16670 // 16671 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16672 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16673 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16674 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16675 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16676 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16677 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16678 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16679 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16680 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16681 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16682 // 16683 // --------------------------------------------------------------------------- 16684 // 16685 // This file was generated by the CEF translator tool and should not edited 16686 // by hand. See the translator.README.txt file in the tools directory for 16687 // more information. 16688 // 16689 // $hash=3b2decb52f84b67988dc2ae791efc7223b0f35ed$ 16690 // 16691 16692 extern (C): 16693 16694 /// 16695 /// Structure representing a message. Can be used on any process and thread. 16696 /// 16697 /// NOTE: This struct is allocated DLL-side. 16698 /// 16699 struct cef_process_message_t 16700 { 16701 /// 16702 /// Base structure. 16703 /// 16704 16705 /// 16706 /// Returns true (1) if this object is valid. Do not call any other functions 16707 /// if this function returns false (0). 16708 /// 16709 16710 /// 16711 /// Returns true (1) if the values of this object are read-only. Some APIs may 16712 /// expose read-only objects. 16713 /// 16714 16715 /// 16716 /// Returns a writable copy of this object. Returns nullptr when message 16717 16718 cef_base_ref_counted_t base; 16719 extern(System) int function (cef_process_message_t* self) nothrow is_valid; 16720 extern(System) int function (cef_process_message_t* self) nothrow is_read_only; 16721 /// contains a shared memory region. 16722 /// 16723 extern(System) cef_process_message_t* function (cef_process_message_t* self) nothrow copy; 16724 16725 /// 16726 /// Returns the message name. 16727 /// 16728 // The resulting string must be freed by calling cef_string_userfree_free(). 16729 extern(System) cef_string_userfree_t function (cef_process_message_t* self) nothrow get_name; 16730 16731 /// 16732 /// Returns the list of arguments. Returns nullptr when message contains a 16733 /// shared memory region. 16734 /// 16735 extern(System) cef_list_value_t* function ( 16736 cef_process_message_t* self) nothrow get_argument_list; 16737 16738 /// 16739 /// Returns the shared memory region. Returns nullptr when message contains an 16740 /// argument list. 16741 /// 16742 extern(System) cef_shared_memory_region_t* function ( 16743 cef_process_message_t* self) nothrow get_shared_memory_region; 16744 } 16745 16746 16747 16748 /// 16749 /// Create a new cef_process_message_t object with the specified name. 16750 /// 16751 cef_process_message_t* cef_process_message_create (const(cef_string_t)* name); 16752 16753 // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ 16754 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 16755 // 16756 // Redistribution and use in source and binary forms, with or without 16757 // modification, are permitted provided that the following conditions are 16758 // met: 16759 // 16760 // * Redistributions of source code must retain the above copyright 16761 // notice, this list of conditions and the following disclaimer. 16762 // * Redistributions in binary form must reproduce the above 16763 // copyright notice, this list of conditions and the following disclaimer 16764 // in the documentation and/or other materials provided with the 16765 // distribution. 16766 // * Neither the name of Google Inc. nor the name Chromium Embedded 16767 // Framework nor the names of its contributors may be used to endorse 16768 // or promote products derived from this software without specific prior 16769 // written permission. 16770 // 16771 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16772 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16773 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16774 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16775 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16776 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16777 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16778 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16779 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16780 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16781 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16782 // 16783 // --------------------------------------------------------------------------- 16784 // 16785 // This file was generated by the CEF translator tool and should not edited 16786 // by hand. See the translator.README.txt file in the tools directory for 16787 // more information. 16788 // 16789 // $hash=3f9182df1fe85fe89287c4260c60ce224fef6d27$ 16790 // 16791 16792 extern (C): 16793 16794 /// 16795 /// Launches the process specified via |command_line|. Returns true (1) upon 16796 /// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. 16797 /// 16798 /// Unix-specific notes: 16799 /// - All file descriptors open in the parent process will be closed in the 16800 /// child process except for stdin, stdout, and stderr. 16801 /// - If the first argument on the command line does not contain a slash, PATH 16802 /// will be searched. (See man execvp.) 16803 /// 16804 int cef_launch_process (cef_command_line_t* command_line); 16805 16806 // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 16807 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 16808 // 16809 // Redistribution and use in source and binary forms, with or without 16810 // modification, are permitted provided that the following conditions are 16811 // met: 16812 // 16813 // * Redistributions of source code must retain the above copyright 16814 // notice, this list of conditions and the following disclaimer. 16815 // * Redistributions in binary form must reproduce the above 16816 // copyright notice, this list of conditions and the following disclaimer 16817 // in the documentation and/or other materials provided with the 16818 // distribution. 16819 // * Neither the name of Google Inc. nor the name Chromium Embedded 16820 // Framework nor the names of its contributors may be used to endorse 16821 // or promote products derived from this software without specific prior 16822 // written permission. 16823 // 16824 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16825 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16826 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16827 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16828 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16829 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16830 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16831 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16832 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16833 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16834 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16835 // 16836 // --------------------------------------------------------------------------- 16837 // 16838 // This file was generated by the CEF translator tool and should not edited 16839 // by hand. See the translator.README.txt file in the tools directory for 16840 // more information. 16841 // 16842 // $hash=04c145d2d938e84ac015c3f8265f942d187943f7$ 16843 // 16844 16845 extern (C): 16846 16847 /// 16848 /// Generic callback structure used for managing the lifespan of a registration. 16849 /// 16850 /// NOTE: This struct is allocated DLL-side. 16851 /// 16852 struct cef_registration_t 16853 { 16854 /// 16855 /// Base structure. 16856 /// 16857 16858 // CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_ 16859 16860 cef_base_ref_counted_t base; 16861 } 16862 16863 16864 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 16865 // 16866 // Redistribution and use in source and binary forms, with or without 16867 // modification, are permitted provided that the following conditions are 16868 // met: 16869 // 16870 // * Redistributions of source code must retain the above copyright 16871 // notice, this list of conditions and the following disclaimer. 16872 // * Redistributions in binary form must reproduce the above 16873 // copyright notice, this list of conditions and the following disclaimer 16874 // in the documentation and/or other materials provided with the 16875 // distribution. 16876 // * Neither the name of Google Inc. nor the name Chromium Embedded 16877 // Framework nor the names of its contributors may be used to endorse 16878 // or promote products derived from this software without specific prior 16879 // written permission. 16880 // 16881 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16882 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16883 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16884 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16885 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16886 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16887 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16888 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16889 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16890 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16891 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16892 // 16893 // --------------------------------------------------------------------------- 16894 // 16895 // This file was generated by the CEF translator tool and should not edited 16896 // by hand. See the translator.README.txt file in the tools directory for 16897 // more information. 16898 // 16899 // $hash=b5a7e3a696d67577cfeeb3739086fc3a2c8287d1$ 16900 // 16901 16902 extern (C): 16903 16904 /// 16905 /// Implement this structure to handle events when window rendering is disabled. 16906 /// The functions of this structure will be called on the UI thread. 16907 /// 16908 /// NOTE: This struct is allocated client-side. 16909 /// 16910 struct cef_render_handler_t 16911 { 16912 /// 16913 /// Base structure. 16914 /// 16915 16916 /// 16917 /// Return the handler for accessibility notifications. If no handler is 16918 /// provided the default implementation will be used. 16919 /// 16920 16921 /// 16922 /// Called to retrieve the root window rectangle in screen DIP coordinates. 16923 /// Return true (1) if the rectangle was provided. If this function returns 16924 16925 cef_base_ref_counted_t base; 16926 extern(System) cef_accessibility_handler_t* function ( 16927 cef_render_handler_t* self) nothrow get_accessibility_handler; 16928 /// false (0) the rectangle from GetViewRect will be used. 16929 /// 16930 extern(System) int function ( 16931 cef_render_handler_t* self, 16932 cef_browser_t* browser, 16933 cef_rect_t* rect) nothrow get_root_screen_rect; 16934 16935 /// 16936 /// Called to retrieve the view rectangle in screen DIP coordinates. This 16937 /// function must always provide a non-NULL rectangle. 16938 /// 16939 extern(System) void function ( 16940 cef_render_handler_t* self, 16941 cef_browser_t* browser, 16942 cef_rect_t* rect) nothrow get_view_rect; 16943 16944 /// 16945 /// Called to retrieve the translation from view DIP coordinates to screen 16946 /// coordinates. Windows/Linux should provide screen device (pixel) 16947 /// coordinates and MacOS should provide screen DIP coordinates. Return true 16948 /// (1) if the requested coordinates were provided. 16949 /// 16950 extern(System) int function ( 16951 cef_render_handler_t* self, 16952 cef_browser_t* browser, 16953 int viewX, 16954 int viewY, 16955 int* screenX, 16956 int* screenY) nothrow get_screen_point; 16957 16958 /// 16959 /// Called to allow the client to fill in the CefScreenInfo object with 16960 /// appropriate values. Return true (1) if the |screen_info| structure has 16961 /// been modified. 16962 /// 16963 /// If the screen info rectangle is left NULL the rectangle from GetViewRect 16964 /// will be used. If the rectangle is still NULL or invalid popups may not be 16965 /// drawn correctly. 16966 /// 16967 extern(System) int function ( 16968 cef_render_handler_t* self, 16969 cef_browser_t* browser, 16970 cef_screen_info_t* screen_info) nothrow get_screen_info; 16971 16972 /// 16973 /// Called when the browser wants to show or hide the popup widget. The popup 16974 /// should be shown if |show| is true (1) and hidden if |show| is false (0). 16975 /// 16976 extern(System) void function ( 16977 cef_render_handler_t* self, 16978 cef_browser_t* browser, 16979 int show) nothrow on_popup_show; 16980 16981 /// 16982 /// Called when the browser wants to move or resize the popup widget. |rect| 16983 /// contains the new location and size in view coordinates. 16984 /// 16985 extern(System) void function ( 16986 cef_render_handler_t* self, 16987 cef_browser_t* browser, 16988 const(cef_rect_t)* rect) nothrow on_popup_size; 16989 16990 /// 16991 /// Called when an element should be painted. Pixel values passed to this 16992 /// function are scaled relative to view coordinates based on the value of 16993 /// CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type| 16994 /// indicates whether the element is the view or the popup widget. |buffer| 16995 /// contains the pixel data for the whole image. |dirtyRects| contains the set 16996 /// of rectangles in pixel coordinates that need to be repainted. |buffer| 16997 /// will be |width|*|height|*4 bytes in size and represents a BGRA image with 16998 /// an upper-left origin. This function is only called when 16999 /// cef_window_tInfo::shared_texture_enabled is set to false (0). 17000 /// 17001 extern(System) void function ( 17002 cef_render_handler_t* self, 17003 cef_browser_t* browser, 17004 cef_paint_element_type_t type, 17005 size_t dirtyRectsCount, 17006 const(cef_rect_t)* dirtyRects, 17007 const(void)* buffer, 17008 int width, 17009 int height) nothrow on_paint; 17010 17011 /// 17012 /// Called when an element has been rendered to the shared texture handle. 17013 /// |type| indicates whether the element is the view or the popup widget. 17014 /// |dirtyRects| contains the set of rectangles in pixel coordinates that need 17015 /// to be repainted. |info| contains the shared handle; on Windows it is a 17016 /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource, on 17017 /// macOS it is an IOSurface pointer that can be opened with Metal or OpenGL, 17018 /// and on Linux it contains several planes, each with an fd to the underlying 17019 /// system native buffer. 17020 /// 17021 /// The underlying implementation uses a pool to deliver frames. As a result, 17022 /// the handle may differ every frame depending on how many frames are in- 17023 /// progress. The handle's resource cannot be cached and cannot be accessed 17024 /// outside of this callback. It should be reopened each time this callback is 17025 /// executed and the contents should be copied to a texture owned by the 17026 /// client application. The contents of |info| will be released back to the 17027 /// pool after this callback returns. 17028 /// 17029 extern(System) void function ( 17030 cef_render_handler_t* self, 17031 cef_browser_t* browser, 17032 cef_paint_element_type_t type, 17033 size_t dirtyRectsCount, 17034 const(cef_rect_t)* dirtyRects, 17035 const(cef_accelerated_paint_info_t)* info) nothrow on_accelerated_paint; 17036 17037 /// 17038 /// Called to retrieve the size of the touch handle for the specified 17039 /// |orientation|. 17040 /// 17041 extern(System) void function ( 17042 cef_render_handler_t* self, 17043 cef_browser_t* browser, 17044 cef_horizontal_alignment_t orientation, 17045 cef_size_t* size) nothrow get_touch_handle_size; 17046 17047 /// 17048 /// Called when touch handle state is updated. The client is responsible for 17049 /// rendering the touch handles. 17050 /// 17051 extern(System) void function ( 17052 cef_render_handler_t* self, 17053 cef_browser_t* browser, 17054 const(cef_touch_handle_state_t)* state) nothrow on_touch_handle_state_changed; 17055 17056 /// 17057 /// Called when the user starts dragging content in the web view. Contextual 17058 /// information about the dragged content is supplied by |drag_data|. (|x|, 17059 /// |y|) is the drag start location in screen coordinates. OS APIs that run a 17060 /// system message loop may be used within the StartDragging call. 17061 /// 17062 /// Return false (0) to abort the drag operation. Don't call any of 17063 /// cef_browser_host_t::DragSource*Ended* functions after returning false (0). 17064 /// 17065 /// Return true (1) to handle the drag operation. Call 17066 /// cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either 17067 /// synchronously or asynchronously to inform the web view that the drag 17068 /// operation has ended. 17069 /// 17070 extern(System) int function ( 17071 cef_render_handler_t* self, 17072 cef_browser_t* browser, 17073 cef_drag_data_t* drag_data, 17074 cef_drag_operations_mask_t allowed_ops, 17075 int x, 17076 int y) nothrow start_dragging; 17077 17078 /// 17079 /// Called when the web view wants to update the mouse cursor during a drag & 17080 /// drop operation. |operation| describes the allowed operation (none, move, 17081 /// copy, link). 17082 /// 17083 extern(System) void function ( 17084 cef_render_handler_t* self, 17085 cef_browser_t* browser, 17086 cef_drag_operations_mask_t operation) nothrow update_drag_cursor; 17087 17088 /// 17089 /// Called when the scroll offset has changed. 17090 /// 17091 extern(System) void function ( 17092 cef_render_handler_t* self, 17093 cef_browser_t* browser, 17094 double x, 17095 double y) nothrow on_scroll_offset_changed; 17096 17097 /// 17098 /// Called when the IME composition range has changed. |selected_range| is the 17099 /// range of characters that have been selected. |character_bounds| is the 17100 /// bounds of each character in view coordinates. 17101 /// 17102 extern(System) void function ( 17103 cef_render_handler_t* self, 17104 cef_browser_t* browser, 17105 const(cef_range_t)* selected_range, 17106 size_t character_boundsCount, 17107 const(cef_rect_t)* character_bounds) nothrow on_ime_composition_range_changed; 17108 17109 /// 17110 /// Called when text selection has changed for the specified |browser|. 17111 /// |selected_text| is the currently selected text and |selected_range| is the 17112 /// character range. 17113 /// 17114 extern(System) void function ( 17115 cef_render_handler_t* self, 17116 cef_browser_t* browser, 17117 const(cef_string_t)* selected_text, 17118 const(cef_range_t)* selected_range) nothrow on_text_selection_changed; 17119 17120 /// 17121 /// Called when an on-screen keyboard should be shown or hidden for the 17122 /// specified |browser|. |input_mode| specifies what kind of keyboard should 17123 /// be opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing 17124 /// keyboard for this browser should be hidden. 17125 /// 17126 extern(System) void function ( 17127 cef_render_handler_t* self, 17128 cef_browser_t* browser, 17129 cef_text_input_mode_t input_mode) nothrow on_virtual_keyboard_requested; 17130 } 17131 17132 17133 17134 // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ 17135 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 17136 // 17137 // Redistribution and use in source and binary forms, with or without 17138 // modification, are permitted provided that the following conditions are 17139 // met: 17140 // 17141 // * Redistributions of source code must retain the above copyright 17142 // notice, this list of conditions and the following disclaimer. 17143 // * Redistributions in binary form must reproduce the above 17144 // copyright notice, this list of conditions and the following disclaimer 17145 // in the documentation and/or other materials provided with the 17146 // distribution. 17147 // * Neither the name of Google Inc. nor the name Chromium Embedded 17148 // Framework nor the names of its contributors may be used to endorse 17149 // or promote products derived from this software without specific prior 17150 // written permission. 17151 // 17152 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17153 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17154 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17155 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17156 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17157 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17158 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17159 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17160 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17161 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17162 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17163 // 17164 // --------------------------------------------------------------------------- 17165 // 17166 // This file was generated by the CEF translator tool and should not edited 17167 // by hand. See the translator.README.txt file in the tools directory for 17168 // more information. 17169 // 17170 // $hash=5f9161db67adb86dc477f51aa775956c5ebbdf36$ 17171 // 17172 17173 extern (C): 17174 17175 /// 17176 /// Structure used to implement render process callbacks. The functions of this 17177 /// structure will be called on the render process main thread (TID_RENDERER) 17178 /// unless otherwise indicated. 17179 /// 17180 /// NOTE: This struct is allocated client-side. 17181 /// 17182 struct cef_render_process_handler_t 17183 { 17184 /// 17185 /// Base structure. 17186 /// 17187 17188 /// 17189 /// Called after WebKit has been initialized. 17190 /// 17191 17192 cef_base_ref_counted_t base; 17193 extern(System) void function (cef_render_process_handler_t* self) nothrow on_web_kit_initialized; 17194 17195 /// 17196 /// Called after a browser has been created. When browsing cross-origin a new 17197 /// browser will be created before the old browser with the same identifier is 17198 /// destroyed. |extra_info| is an optional read-only value originating from 17199 /// cef_browser_host_t::cef_browser_host_create_browser(), 17200 /// cef_browser_host_t::cef_browser_host_create_browser_sync(), 17201 /// cef_life_span_handler_t::on_before_popup() or 17202 /// cef_browser_view_t::cef_browser_view_create(). 17203 /// 17204 extern(System) void function ( 17205 cef_render_process_handler_t* self, 17206 cef_browser_t* browser, 17207 cef_dictionary_value_t* extra_info) nothrow on_browser_created; 17208 17209 /// 17210 /// Called before a browser is destroyed. 17211 /// 17212 extern(System) void function ( 17213 cef_render_process_handler_t* self, 17214 cef_browser_t* browser) nothrow on_browser_destroyed; 17215 17216 /// 17217 /// Return the handler for browser load status events. 17218 /// 17219 extern(System) cef_load_handler_t* function ( 17220 cef_render_process_handler_t* self) nothrow get_load_handler; 17221 17222 /// 17223 /// Called immediately after the V8 context for a frame has been created. To 17224 /// retrieve the JavaScript 'window' object use the 17225 /// cef_v8_context_t::get_global() function. V8 handles can only be accessed 17226 /// from the thread on which they are created. A task runner for posting tasks 17227 /// on the associated thread can be retrieved via the 17228 /// cef_v8_context_t::get_task_runner() function. 17229 /// 17230 extern(System) void function ( 17231 cef_render_process_handler_t* self, 17232 cef_browser_t* browser, 17233 cef_frame_t* frame, 17234 cef_v8_context_t* context) nothrow on_context_created; 17235 17236 /// 17237 /// Called immediately before the V8 context for a frame is released. No 17238 /// references to the context should be kept after this function is called. 17239 /// 17240 extern(System) void function ( 17241 cef_render_process_handler_t* self, 17242 cef_browser_t* browser, 17243 cef_frame_t* frame, 17244 cef_v8_context_t* context) nothrow on_context_released; 17245 17246 /// 17247 /// Called for global uncaught exceptions in a frame. Execution of this 17248 /// callback is disabled by default. To enable set 17249 /// cef_settings_t.uncaught_exception_stack_size > 0. 17250 /// 17251 extern(System) void function ( 17252 cef_render_process_handler_t* self, 17253 cef_browser_t* browser, 17254 cef_frame_t* frame, 17255 cef_v8_context_t* context, 17256 cef_v8_exception_t* exception, 17257 cef_v8_stack_trace_t* stackTrace) nothrow on_uncaught_exception; 17258 17259 /// 17260 /// Called when a new node in the the browser gets focus. The |node| value may 17261 /// be NULL if no specific node has gained focus. The node object passed to 17262 /// this function represents a snapshot of the DOM at the time this function 17263 /// is executed. DOM objects are only valid for the scope of this function. Do 17264 /// not keep references to or attempt to access any DOM objects outside the 17265 /// scope of this function. 17266 /// 17267 extern(System) void function ( 17268 cef_render_process_handler_t* self, 17269 cef_browser_t* browser, 17270 cef_frame_t* frame, 17271 cef_domnode_t* node) nothrow on_focused_node_changed; 17272 17273 /// 17274 /// Called when a new message is received from a different process. Return 17275 /// true (1) if the message was handled or false (0) otherwise. It is safe to 17276 /// keep a reference to |message| outside of this callback. 17277 /// 17278 extern(System) int function ( 17279 cef_render_process_handler_t* self, 17280 cef_browser_t* browser, 17281 cef_frame_t* frame, 17282 cef_process_id_t source_process, 17283 cef_process_message_t* message) nothrow on_process_message_received; 17284 } 17285 17286 17287 17288 // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ 17289 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 17290 // 17291 // Redistribution and use in source and binary forms, with or without 17292 // modification, are permitted provided that the following conditions are 17293 // met: 17294 // 17295 // * Redistributions of source code must retain the above copyright 17296 // notice, this list of conditions and the following disclaimer. 17297 // * Redistributions in binary form must reproduce the above 17298 // copyright notice, this list of conditions and the following disclaimer 17299 // in the documentation and/or other materials provided with the 17300 // distribution. 17301 // * Neither the name of Google Inc. nor the name Chromium Embedded 17302 // Framework nor the names of its contributors may be used to endorse 17303 // or promote products derived from this software without specific prior 17304 // written permission. 17305 // 17306 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17307 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17308 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17309 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17310 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17311 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17312 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17313 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17314 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17315 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17316 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17317 // 17318 // --------------------------------------------------------------------------- 17319 // 17320 // This file was generated by the CEF translator tool and should not edited 17321 // by hand. See the translator.README.txt file in the tools directory for 17322 // more information. 17323 // 17324 // $hash=956f208ecbbbdee8e0db8a066de1c4e154d12e4a$ 17325 // 17326 17327 extern (C): 17328 17329 /// 17330 /// Structure used to represent a web request. The functions of this structure 17331 /// may be called on any thread. 17332 /// 17333 /// NOTE: This struct is allocated DLL-side. 17334 /// 17335 struct cef_request_t 17336 { 17337 /// 17338 /// Base structure. 17339 /// 17340 17341 /// 17342 /// Returns true (1) if this object is read-only. 17343 /// 17344 17345 /// 17346 /// Get the fully qualified URL. 17347 /// 17348 // The resulting string must be freed by calling cef_string_userfree_free(). 17349 17350 /// 17351 /// Set the fully qualified URL. 17352 /// 17353 17354 /// 17355 /// Get the request function type. The value will default to POST if post data 17356 17357 cef_base_ref_counted_t base; 17358 extern(System) int function (cef_request_t* self) nothrow is_read_only; 17359 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_url; 17360 extern(System) void function (cef_request_t* self, const(cef_string_t)* url) nothrow set_url; 17361 /// is provided and GET otherwise. 17362 /// 17363 // The resulting string must be freed by calling cef_string_userfree_free(). 17364 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_method; 17365 17366 /// 17367 /// Set the request function type. 17368 /// 17369 extern(System) void function ( 17370 cef_request_t* self, 17371 const(cef_string_t)* method) nothrow set_method; 17372 17373 /// 17374 /// Set the referrer URL and policy. If non-NULL the referrer URL must be 17375 /// fully qualified with an HTTP or HTTPS scheme component. Any username, 17376 /// password or ref component will be removed. 17377 /// 17378 extern(System) void function ( 17379 cef_request_t* self, 17380 const(cef_string_t)* referrer_url, 17381 cef_referrer_policy_t policy) nothrow set_referrer; 17382 17383 /// 17384 /// Get the referrer URL. 17385 /// 17386 // The resulting string must be freed by calling cef_string_userfree_free(). 17387 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_referrer_url; 17388 17389 /// 17390 /// Get the referrer policy. 17391 /// 17392 extern(System) cef_referrer_policy_t function (cef_request_t* self) nothrow get_referrer_policy; 17393 17394 /// 17395 /// Get the post data. 17396 /// 17397 extern(System) cef_post_data_t* function (cef_request_t* self) nothrow get_post_data; 17398 17399 /// 17400 /// Set the post data. 17401 /// 17402 extern(System) void function ( 17403 cef_request_t* self, 17404 cef_post_data_t* postData) nothrow set_post_data; 17405 17406 /// 17407 /// Get the header values. Will not include the Referer value if any. 17408 /// 17409 extern(System) void function ( 17410 cef_request_t* self, 17411 cef_string_multimap_t headerMap) nothrow get_header_map; 17412 17413 /// 17414 /// Set the header values. If a Referer value exists in the header map it will 17415 /// be removed and ignored. 17416 /// 17417 extern(System) void function ( 17418 cef_request_t* self, 17419 cef_string_multimap_t headerMap) nothrow set_header_map; 17420 17421 /// 17422 /// Returns the first header value for |name| or an NULL string if not found. 17423 /// Will not return the Referer value if any. Use GetHeaderMap instead if 17424 /// |name| might have multiple values. 17425 /// 17426 // The resulting string must be freed by calling cef_string_userfree_free(). 17427 extern(System) cef_string_userfree_t function ( 17428 cef_request_t* self, 17429 const(cef_string_t)* name) nothrow get_header_by_name; 17430 17431 /// 17432 /// Set the header |name| to |value|. If |overwrite| is true (1) any existing 17433 /// values will be replaced with the new value. If |overwrite| is false (0) 17434 /// any existing values will not be overwritten. The Referer value cannot be 17435 /// set using this function. 17436 /// 17437 extern(System) void function ( 17438 cef_request_t* self, 17439 const(cef_string_t)* name, 17440 const(cef_string_t)* value, 17441 int overwrite) nothrow set_header_by_name; 17442 17443 /// 17444 /// Set all values at one time. 17445 /// 17446 extern(System) void function ( 17447 cef_request_t* self, 17448 const(cef_string_t)* url, 17449 const(cef_string_t)* method, 17450 cef_post_data_t* postData, 17451 cef_string_multimap_t headerMap) nothrow set; 17452 17453 /// 17454 /// Get the flags used in combination with cef_urlrequest_t. See 17455 /// cef_urlrequest_flags_t for supported values. 17456 /// 17457 extern(System) int function (cef_request_t* self) nothrow get_flags; 17458 17459 /// 17460 /// Set the flags used in combination with cef_urlrequest_t. See 17461 /// cef_urlrequest_flags_t for supported values. 17462 /// 17463 extern(System) void function (cef_request_t* self, int flags) nothrow set_flags; 17464 17465 /// 17466 /// Get the URL to the first party for cookies used in combination with 17467 /// cef_urlrequest_t. 17468 /// 17469 // The resulting string must be freed by calling cef_string_userfree_free(). 17470 extern(System) cef_string_userfree_t function ( 17471 cef_request_t* self) nothrow get_first_party_for_cookies; 17472 17473 /// 17474 /// Set the URL to the first party for cookies used in combination with 17475 /// cef_urlrequest_t. 17476 /// 17477 extern(System) void function ( 17478 cef_request_t* self, 17479 const(cef_string_t)* url) nothrow set_first_party_for_cookies; 17480 17481 /// 17482 /// Get the resource type for this request. Only available in the browser 17483 /// process. 17484 /// 17485 extern(System) cef_resource_type_t function (cef_request_t* self) nothrow get_resource_type; 17486 17487 /// 17488 /// Get the transition type for this request. Only available in the browser 17489 /// process and only applies to requests that represent a main frame or sub- 17490 /// frame navigation. 17491 /// 17492 extern(System) cef_transition_type_t function (cef_request_t* self) nothrow get_transition_type; 17493 17494 /// 17495 /// Returns the globally unique identifier for this request or 0 if not 17496 /// specified. Can be used by cef_resource_request_handler_t implementations 17497 /// in the browser process to track a single request across multiple 17498 /// callbacks. 17499 /// 17500 extern(System) ulong function (cef_request_t* self) nothrow get_identifier; 17501 } 17502 17503 17504 17505 /// 17506 /// Create a new cef_request_t object. 17507 /// 17508 cef_request_t* cef_request_create (); 17509 17510 /// 17511 /// Structure used to represent post data for a web request. The functions of 17512 /// this structure may be called on any thread. 17513 /// 17514 /// NOTE: This struct is allocated DLL-side. 17515 /// 17516 struct cef_post_data_t 17517 { 17518 /// 17519 /// Base structure. 17520 /// 17521 cef_base_ref_counted_t base; 17522 17523 /// 17524 /// Returns true (1) if this object is read-only. 17525 /// 17526 extern(System) int function (cef_post_data_t* self) nothrow is_read_only; 17527 17528 /// 17529 /// Returns true (1) if the underlying POST data includes elements that are 17530 /// not represented by this cef_post_data_t object (for example, multi-part 17531 /// file upload data). Modifying cef_post_data_t objects with excluded 17532 /// elements may result in the request failing. 17533 /// 17534 extern(System) int function (cef_post_data_t* self) nothrow has_excluded_elements; 17535 17536 /// 17537 /// Returns the number of existing post data elements. 17538 /// 17539 extern(System) size_t function (cef_post_data_t* self) nothrow get_element_count; 17540 17541 /// 17542 /// Retrieve the post data elements. 17543 /// 17544 extern(System) void function ( 17545 cef_post_data_t* self, 17546 size_t* elementsCount, 17547 cef_post_data_element_t** elements) nothrow get_elements; 17548 17549 /// 17550 /// Remove the specified post data element. Returns true (1) if the removal 17551 /// succeeds. 17552 /// 17553 extern(System) int function ( 17554 cef_post_data_t* self, 17555 cef_post_data_element_t* element) nothrow remove_element; 17556 17557 /// 17558 /// Add the specified post data element. Returns true (1) if the add 17559 /// succeeds. 17560 /// 17561 extern(System) int function ( 17562 cef_post_data_t* self, 17563 cef_post_data_element_t* element) nothrow add_element; 17564 17565 /// 17566 /// Remove all existing post data elements. 17567 /// 17568 extern(System) void function (cef_post_data_t* self) nothrow remove_elements; 17569 } 17570 17571 17572 17573 /// 17574 /// Create a new cef_post_data_t object. 17575 /// 17576 cef_post_data_t* cef_post_data_create (); 17577 17578 /// 17579 /// Structure used to represent a single element in the request post data. The 17580 /// functions of this structure may be called on any thread. 17581 /// 17582 /// NOTE: This struct is allocated DLL-side. 17583 /// 17584 struct cef_post_data_element_t 17585 { 17586 /// 17587 /// Base structure. 17588 /// 17589 cef_base_ref_counted_t base; 17590 17591 /// 17592 /// Returns true (1) if this object is read-only. 17593 /// 17594 extern(System) int function (cef_post_data_element_t* self) nothrow is_read_only; 17595 17596 /// 17597 /// Remove all contents from the post data element. 17598 /// 17599 extern(System) void function (cef_post_data_element_t* self) nothrow set_to_empty; 17600 17601 /// 17602 /// The post data element will represent a file. 17603 /// 17604 extern(System) void function ( 17605 cef_post_data_element_t* self, 17606 const(cef_string_t)* fileName) nothrow set_to_file; 17607 17608 /// 17609 /// The post data element will represent bytes. The bytes passed in will be 17610 /// copied. 17611 /// 17612 extern(System) void function ( 17613 cef_post_data_element_t* self, 17614 size_t size, 17615 const(void)* bytes) nothrow set_to_bytes; 17616 17617 /// 17618 /// Return the type of this post data element. 17619 /// 17620 extern(System) cef_postdataelement_type_t function ( 17621 cef_post_data_element_t* self) nothrow get_type; 17622 17623 /// 17624 /// Return the file name. 17625 /// 17626 // The resulting string must be freed by calling cef_string_userfree_free(). 17627 extern(System) cef_string_userfree_t function (cef_post_data_element_t* self) nothrow get_file; 17628 17629 /// 17630 /// Return the number of bytes. 17631 /// 17632 extern(System) size_t function (cef_post_data_element_t* self) nothrow get_bytes_count; 17633 17634 /// 17635 /// Read up to |size| bytes into |bytes| and return the number of bytes 17636 /// actually read. 17637 /// 17638 extern(System) size_t function ( 17639 cef_post_data_element_t* self, 17640 size_t size, 17641 void* bytes) nothrow get_bytes; 17642 } 17643 17644 17645 17646 /// 17647 /// Create a new cef_post_data_element_t object. 17648 /// 17649 cef_post_data_element_t* cef_post_data_element_create (); 17650 17651 // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_ 17652 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 17653 // 17654 // Redistribution and use in source and binary forms, with or without 17655 // modification, are permitted provided that the following conditions are 17656 // met: 17657 // 17658 // * Redistributions of source code must retain the above copyright 17659 // notice, this list of conditions and the following disclaimer. 17660 // * Redistributions in binary form must reproduce the above 17661 // copyright notice, this list of conditions and the following disclaimer 17662 // in the documentation and/or other materials provided with the 17663 // distribution. 17664 // * Neither the name of Google Inc. nor the name Chromium Embedded 17665 // Framework nor the names of its contributors may be used to endorse 17666 // or promote products derived from this software without specific prior 17667 // written permission. 17668 // 17669 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17670 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17671 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17672 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17673 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17674 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17675 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17676 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17677 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17678 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17679 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17680 // 17681 // --------------------------------------------------------------------------- 17682 // 17683 // This file was generated by the CEF translator tool and should not edited 17684 // by hand. See the translator.README.txt file in the tools directory for 17685 // more information. 17686 // 17687 // $hash=f2001cd5df8882c3f3a796dbf224b094c0d681f0$ 17688 // 17689 17690 extern (C): 17691 17692 17693 17694 17695 /// 17696 /// Callback structure for cef_request_context_t::ResolveHost. 17697 /// 17698 /// NOTE: This struct is allocated client-side. 17699 /// 17700 struct cef_resolve_callback_t 17701 { 17702 /// 17703 /// Base structure. 17704 /// 17705 17706 /// 17707 /// Called on the UI thread after the ResolveHost request has completed. 17708 /// |result| will be the result code. |resolved_ips| will be the list of 17709 /// resolved IP addresses or NULL if the resolution failed. 17710 /// 17711 17712 cef_base_ref_counted_t base; 17713 extern(System) void function ( 17714 cef_resolve_callback_t* self, 17715 cef_errorcode_t result, 17716 cef_string_list_t resolved_ips) nothrow on_resolve_completed; 17717 } 17718 17719 17720 17721 /// 17722 /// Implemented by the client to observe content and website setting changes and 17723 /// registered via cef_request_context_t::AddSettingObserver. The functions of 17724 /// this structure will be called on the browser process UI thread. 17725 /// 17726 /// NOTE: This struct is allocated client-side. 17727 /// 17728 struct cef_setting_observer_t 17729 { 17730 /// 17731 /// Base structure. 17732 /// 17733 cef_base_ref_counted_t base; 17734 17735 /// 17736 /// Called when a content or website setting has changed. The new value can be 17737 /// retrieved using cef_request_context_t::GetContentSetting or 17738 /// cef_request_context_t::GetWebsiteSetting. 17739 /// 17740 extern(System) void function ( 17741 cef_setting_observer_t* self, 17742 const(cef_string_t)* requesting_url, 17743 const(cef_string_t)* top_level_url, 17744 cef_content_setting_types_t content_type) nothrow on_setting_changed; 17745 } 17746 17747 17748 17749 // CEF_API_ADDED(13401) 17750 17751 /// 17752 /// A request context provides request handling for a set of related browser or 17753 /// URL request objects. A request context can be specified when creating a new 17754 /// browser via the cef_browser_host_t static factory functions or when creating 17755 /// a new URL request via the cef_urlrequest_t static factory functions. Browser 17756 /// objects with different request contexts will never be hosted in the same 17757 /// render process. Browser objects with the same request context may or may not 17758 /// be hosted in the same render process depending on the process model. Browser 17759 /// objects created indirectly via the JavaScript window.open function or 17760 /// targeted links will share the same render process and the same request 17761 /// context as the source browser. When running in single-process mode there is 17762 /// only a single render process (the main process) and so all browsers created 17763 /// in single-process mode will share the same request context. This will be the 17764 /// first request context passed into a cef_browser_host_t static factory 17765 /// function and all other request context objects will be ignored. 17766 /// 17767 /// NOTE: This struct is allocated DLL-side. 17768 /// 17769 struct cef_request_context_t 17770 { 17771 /// 17772 /// Base structure. 17773 /// 17774 17775 /// 17776 /// Returns true (1) if this object is pointing to the same context as |that| 17777 /// object. 17778 /// 17779 17780 /// 17781 /// Returns true (1) if this object is sharing the same storage as |that| 17782 /// object. 17783 /// 17784 17785 /// 17786 /// Returns true (1) if this object is the global context. The global context 17787 /// is used by default when creating a browser or URL request with a NULL 17788 /// context argument. 17789 /// 17790 17791 /// 17792 /// Returns the handler for this context if any. 17793 /// 17794 17795 /// 17796 /// Returns the cache path for this object. If NULL an "incognito mode" in- 17797 /// memory cache is being used. 17798 /// 17799 // The resulting string must be freed by calling cef_string_userfree_free(). 17800 17801 /// 17802 /// Returns the cookie manager for this object. If |callback| is non-NULL it 17803 /// will be executed asnychronously on the UI thread after the manager's 17804 /// storage has been initialized. 17805 /// 17806 17807 /// 17808 /// Register a scheme handler factory for the specified |scheme_name| and 17809 /// optional |domain_name|. An NULL |domain_name| value for a standard scheme 17810 /// will cause the factory to match all domain names. The |domain_name| value 17811 /// will be ignored for non-standard schemes. If |scheme_name| is a built-in 17812 /// scheme and no handler is returned by |factory| then the built-in scheme 17813 /// handler factory will be called. If |scheme_name| is a custom scheme then 17814 /// you must also implement the cef_app_t::on_register_custom_schemes() 17815 /// function in all processes. This function may be called multiple times to 17816 /// change or remove the factory that matches the specified |scheme_name| and 17817 /// optional |domain_name|. Returns false (0) if an error occurs. This 17818 17819 cef_preference_manager_t base; 17820 extern(System) int function ( 17821 cef_request_context_t* self, 17822 cef_request_context_t* other) nothrow is_same; 17823 extern(System) int function ( 17824 cef_request_context_t* self, 17825 cef_request_context_t* other) nothrow is_sharing_with; 17826 extern(System) int function (cef_request_context_t* self) nothrow is_global; 17827 extern(System) cef_request_context_handler_t* function ( 17828 cef_request_context_t* self) nothrow get_handler; 17829 extern(System) cef_string_userfree_t function ( 17830 cef_request_context_t* self) nothrow get_cache_path; 17831 extern(System) cef_cookie_manager_t* function ( 17832 cef_request_context_t* self, 17833 cef_completion_callback_t* callback) nothrow get_cookie_manager; 17834 /// function may be called on any thread in the browser process. 17835 /// 17836 extern(System) int function ( 17837 cef_request_context_t* self, 17838 const(cef_string_t)* scheme_name, 17839 const(cef_string_t)* domain_name, 17840 cef_scheme_handler_factory_t* factory) nothrow register_scheme_handler_factory; 17841 17842 /// 17843 /// Clear all registered scheme handler factories. Returns false (0) on error. 17844 /// This function may be called on any thread in the browser process. 17845 /// 17846 extern(System) int function (cef_request_context_t* self) nothrow clear_scheme_handler_factories; 17847 17848 /// 17849 /// Clears all certificate exceptions that were added as part of handling 17850 /// cef_request_handler_t::on_certificate_error(). If you call this it is 17851 /// recommended that you also call close_all_connections() or you risk not 17852 /// being prompted again for server certificates if you reconnect quickly. If 17853 /// |callback| is non-NULL it will be executed on the UI thread after 17854 /// completion. 17855 /// 17856 extern(System) void function ( 17857 cef_request_context_t* self, 17858 cef_completion_callback_t* callback) nothrow clear_certificate_exceptions; 17859 17860 /// 17861 /// Clears all HTTP authentication credentials that were added as part of 17862 /// handling GetAuthCredentials. If |callback| is non-NULL it will be executed 17863 /// on the UI thread after completion. 17864 /// 17865 extern(System) void function ( 17866 cef_request_context_t* self, 17867 cef_completion_callback_t* callback) nothrow clear_http_auth_credentials; 17868 17869 /// 17870 /// Clears all active and idle connections that Chromium currently has. This 17871 /// is only recommended if you have released all other CEF objects but don't 17872 /// yet want to call cef_shutdown(). If |callback| is non-NULL it will be 17873 /// executed on the UI thread after completion. 17874 /// 17875 extern(System) void function ( 17876 cef_request_context_t* self, 17877 cef_completion_callback_t* callback) nothrow close_all_connections; 17878 17879 /// 17880 /// Attempts to resolve |origin| to a list of associated IP addresses. 17881 /// |callback| will be executed on the UI thread after completion. 17882 /// 17883 extern(System) void function ( 17884 cef_request_context_t* self, 17885 const(cef_string_t)* origin, 17886 cef_resolve_callback_t* callback) nothrow resolve_host; 17887 17888 /// 17889 /// Returns the MediaRouter object associated with this context. If 17890 /// |callback| is non-NULL it will be executed asnychronously on the UI thread 17891 /// after the manager's context has been initialized. 17892 /// 17893 extern(System) cef_media_router_t* function ( 17894 cef_request_context_t* self, 17895 cef_completion_callback_t* callback) nothrow get_media_router; 17896 17897 /// 17898 /// Returns the current value for |content_type| that applies for the 17899 /// specified URLs. If both URLs are NULL the default value will be returned. 17900 /// Returns nullptr if no value is configured. Must be called on the browser 17901 /// process UI thread. 17902 /// 17903 extern(System) cef_value_t* function ( 17904 cef_request_context_t* self, 17905 const(cef_string_t)* requesting_url, 17906 const(cef_string_t)* top_level_url, 17907 cef_content_setting_types_t content_type) nothrow get_website_setting; 17908 17909 /// 17910 /// Sets the current value for |content_type| for the specified URLs in the 17911 /// default scope. If both URLs are NULL, and the context is not incognito, 17912 /// the default value will be set. Pass nullptr for |value| to remove the 17913 /// default value for this content type. 17914 /// 17915 /// WARNING: Incorrect usage of this function may cause instability or 17916 /// security issues in Chromium. Make sure that you first understand the 17917 /// potential impact of any changes to |content_type| by reviewing the related 17918 /// source code in Chromium. For example, if you plan to modify 17919 /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of 17920 /// ContentSettingsType::POPUPS in Chromium: 17921 /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS 17922 /// 17923 extern(System) void function ( 17924 cef_request_context_t* self, 17925 const(cef_string_t)* requesting_url, 17926 const(cef_string_t)* top_level_url, 17927 cef_content_setting_types_t content_type, 17928 cef_value_t* value) nothrow set_website_setting; 17929 17930 /// 17931 /// Returns the current value for |content_type| that applies for the 17932 /// specified URLs. If both URLs are NULL the default value will be returned. 17933 /// Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must 17934 /// be called on the browser process UI thread. 17935 /// 17936 extern(System) cef_content_setting_values_t function ( 17937 cef_request_context_t* self, 17938 const(cef_string_t)* requesting_url, 17939 const(cef_string_t)* top_level_url, 17940 cef_content_setting_types_t content_type) nothrow get_content_setting; 17941 17942 /// 17943 /// Sets the current value for |content_type| for the specified URLs in the 17944 /// default scope. If both URLs are NULL, and the context is not incognito, 17945 /// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for 17946 /// |value| to use the default value for this content type. 17947 /// 17948 /// WARNING: Incorrect usage of this function may cause instability or 17949 /// security issues in Chromium. Make sure that you first understand the 17950 /// potential impact of any changes to |content_type| by reviewing the related 17951 /// source code in Chromium. For example, if you plan to modify 17952 /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of 17953 /// ContentSettingsType::POPUPS in Chromium: 17954 /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS 17955 /// 17956 extern(System) void function ( 17957 cef_request_context_t* self, 17958 const(cef_string_t)* requesting_url, 17959 const(cef_string_t)* top_level_url, 17960 cef_content_setting_types_t content_type, 17961 cef_content_setting_values_t value) nothrow set_content_setting; 17962 17963 /// 17964 /// Sets the Chrome color scheme for all browsers that share this request 17965 /// context. |variant| values of SYSTEM, LIGHT and DARK change the underlying 17966 /// color mode (e.g. light vs dark). Other |variant| values determine how 17967 /// |user_color| will be applied in the current color mode. If |user_color| is 17968 /// transparent (0) the default color will be used. 17969 /// 17970 extern(System) void function ( 17971 cef_request_context_t* self, 17972 cef_color_variant_t variant, 17973 cef_color_t user_color) nothrow set_chrome_color_scheme; 17974 17975 /// 17976 /// Returns the current Chrome color scheme mode (SYSTEM, LIGHT or DARK). Must 17977 /// be called on the browser process UI thread. 17978 /// 17979 extern(System) cef_color_variant_t function ( 17980 cef_request_context_t* self) nothrow get_chrome_color_scheme_mode; 17981 17982 /// 17983 /// Returns the current Chrome color scheme color, or transparent (0) for the 17984 /// default color. Must be called on the browser process UI thread. 17985 /// 17986 extern(System) cef_color_t function ( 17987 cef_request_context_t* self) nothrow get_chrome_color_scheme_color; 17988 17989 /// 17990 /// Returns the current Chrome color scheme variant. Must be called on the 17991 /// browser process UI thread. 17992 /// 17993 extern(System) cef_color_variant_t function ( 17994 cef_request_context_t* self) nothrow get_chrome_color_scheme_variant; 17995 17996 /// 17997 /// Add an observer for content and website setting changes. The observer will 17998 /// remain registered until the returned Registration object is destroyed. 17999 /// This function must be called on the browser process UI thread. 18000 /// 18001 extern(System) cef_registration_t* function ( 18002 cef_request_context_t* self, 18003 cef_setting_observer_t* observer) nothrow add_setting_observer; 18004 } 18005 18006 18007 18008 /// 18009 /// Returns the global context object. 18010 /// 18011 cef_request_context_t* cef_request_context_get_global_context (); 18012 18013 /// 18014 /// Creates a new context object with the specified |settings| and optional 18015 /// |handler|. 18016 /// 18017 cef_request_context_t* cef_request_context_create_context ( 18018 const(cef_request_context_settings_t)* settings, 18019 cef_request_context_handler_t* handler); 18020 18021 /// 18022 /// Creates a new context object that shares storage with |other| and uses an 18023 /// optional |handler|. 18024 /// 18025 /+ 18026 cef_request_context_t* cef_request_contextcef_create_context_shared ( 18027 cef_request_context_t* other, 18028 cef_request_context_handler_t* handler); 18029 +/ 18030 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ 18031 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 18032 // 18033 // Redistribution and use in source and binary forms, with or without 18034 // modification, are permitted provided that the following conditions are 18035 // met: 18036 // 18037 // * Redistributions of source code must retain the above copyright 18038 // notice, this list of conditions and the following disclaimer. 18039 // * Redistributions in binary form must reproduce the above 18040 // copyright notice, this list of conditions and the following disclaimer 18041 // in the documentation and/or other materials provided with the 18042 // distribution. 18043 // * Neither the name of Google Inc. nor the name Chromium Embedded 18044 // Framework nor the names of its contributors may be used to endorse 18045 // or promote products derived from this software without specific prior 18046 // written permission. 18047 // 18048 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18049 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18050 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18051 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18052 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18053 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18054 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18055 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18056 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18057 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18058 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18059 // 18060 // --------------------------------------------------------------------------- 18061 // 18062 // This file was generated by the CEF translator tool and should not edited 18063 // by hand. See the translator.README.txt file in the tools directory for 18064 // more information. 18065 // 18066 // $hash=fef0d3340e7c791bed431719a7864f707a830ddc$ 18067 // 18068 18069 extern (C): 18070 18071 /// 18072 /// Implement this structure to provide handler implementations. The handler 18073 /// instance will not be released until all objects related to the context have 18074 /// been destroyed. 18075 /// 18076 /// NOTE: This struct is allocated client-side. 18077 /// 18078 struct cef_request_context_handler_t 18079 { 18080 /// 18081 /// Base structure. 18082 /// 18083 18084 /// 18085 /// Called on the browser process UI thread immediately after the request 18086 /// context has been initialized. 18087 /// 18088 18089 cef_base_ref_counted_t base; 18090 extern(System) void function ( 18091 cef_request_context_handler_t* self, 18092 cef_request_context_t* request_context) nothrow on_request_context_initialized; 18093 18094 /// 18095 /// Called on the browser process IO thread before a resource request is 18096 /// initiated. The |browser| and |frame| values represent the source of the 18097 /// request, and may be NULL for requests originating from service workers or 18098 /// cef_urlrequest_t. |request| represents the request contents and cannot be 18099 /// modified in this callback. |is_navigation| will be true (1) if the 18100 /// resource request is a navigation. |is_download| will be true (1) if the 18101 /// resource request is a download. |request_initiator| is the origin (scheme 18102 /// + domain) of the page that initiated the request. Set 18103 /// |disable_default_handling| to true (1) to disable default handling of the 18104 /// request, in which case it will need to be handled via 18105 /// cef_resource_request_handler_t::GetResourceHandler or it will be canceled. 18106 /// To allow the resource load to proceed with default handling return NULL. 18107 /// To specify a handler for the resource return a 18108 /// cef_resource_request_handler_t object. This function will not be called if 18109 /// the client associated with |browser| returns a non-NULL value from 18110 /// cef_request_handler_t::GetResourceRequestHandler for the same request 18111 /// (identified by cef_request_t::GetIdentifier). 18112 /// 18113 extern(System) cef_resource_request_handler_t* function ( 18114 cef_request_context_handler_t* self, 18115 cef_browser_t* browser, 18116 cef_frame_t* frame, 18117 cef_request_t* request, 18118 int is_navigation, 18119 int is_download, 18120 const(cef_string_t)* request_initiator, 18121 int* disable_default_handling) nothrow get_resource_request_handler; 18122 } 18123 18124 18125 18126 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_ 18127 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 18128 // 18129 // Redistribution and use in source and binary forms, with or without 18130 // modification, are permitted provided that the following conditions are 18131 // met: 18132 // 18133 // * Redistributions of source code must retain the above copyright 18134 // notice, this list of conditions and the following disclaimer. 18135 // * Redistributions in binary form must reproduce the above 18136 // copyright notice, this list of conditions and the following disclaimer 18137 // in the documentation and/or other materials provided with the 18138 // distribution. 18139 // * Neither the name of Google Inc. nor the name Chromium Embedded 18140 // Framework nor the names of its contributors may be used to endorse 18141 // or promote products derived from this software without specific prior 18142 // written permission. 18143 // 18144 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18145 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18146 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18147 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18148 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18149 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18150 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18151 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18152 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18153 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18154 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18155 // 18156 // --------------------------------------------------------------------------- 18157 // 18158 // This file was generated by the CEF translator tool and should not edited 18159 // by hand. See the translator.README.txt file in the tools directory for 18160 // more information. 18161 // 18162 // $hash=64d01e47680a1451cddf1135d383cd9ce8abc3ed$ 18163 // 18164 18165 extern (C): 18166 18167 /// 18168 /// Callback structure used to select a client certificate for authentication. 18169 /// 18170 /// NOTE: This struct is allocated DLL-side. 18171 /// 18172 struct cef_select_client_certificate_callback_t 18173 { 18174 /// 18175 /// Base structure. 18176 /// 18177 18178 /// 18179 /// Chooses the specified certificate for client certificate authentication. 18180 /// NULL value means that no client certificate should be used. 18181 18182 cef_base_ref_counted_t base; 18183 /// 18184 extern(System) void function ( 18185 cef_select_client_certificate_callback_t* self, 18186 cef_x509_certificate_t* cert) nothrow select; 18187 } 18188 18189 18190 18191 /// 18192 /// Implement this structure to handle events related to browser requests. The 18193 /// functions of this structure will be called on the thread indicated. 18194 /// 18195 /// NOTE: This struct is allocated client-side. 18196 /// 18197 struct cef_request_handler_t 18198 { 18199 /// 18200 /// Base structure. 18201 /// 18202 cef_base_ref_counted_t base; 18203 18204 /// 18205 /// Called on the UI thread before browser navigation. Return true (1) to 18206 /// cancel the navigation or false (0) to allow the navigation to proceed. The 18207 /// |request| object cannot be modified in this callback. 18208 /// cef_load_handler_t::OnLoadingStateChange will be called twice in all 18209 /// cases. If the navigation is allowed cef_load_handler_t::OnLoadStart and 18210 /// cef_load_handler_t::OnLoadEnd will be called. If the navigation is 18211 /// canceled cef_load_handler_t::OnLoadError will be called with an 18212 /// |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true 18213 /// (1) if the browser navigated via explicit user gesture (e.g. clicking a 18214 /// link) or false (0) if it navigated automatically (e.g. via the 18215 /// DomContentLoaded event). 18216 /// 18217 extern(System) int function ( 18218 cef_request_handler_t* self, 18219 cef_browser_t* browser, 18220 cef_frame_t* frame, 18221 cef_request_t* request, 18222 int user_gesture, 18223 int is_redirect) nothrow on_before_browse; 18224 18225 /// 18226 /// Called on the UI thread before OnBeforeBrowse in certain limited cases 18227 /// where navigating a new or different browser might be desirable. This 18228 /// includes user-initiated navigation that might open in a special way (e.g. 18229 /// links clicked via middle-click or ctrl + left-click) and certain types of 18230 /// cross-origin navigation initiated from the renderer process (e.g. 18231 /// navigating the top-level frame to/from a file URL). The |browser| and 18232 /// |frame| values represent the source of the navigation. The 18233 /// |target_disposition| value indicates where the user intended to navigate 18234 /// the browser based on standard Chromium behaviors (e.g. current tab, new 18235 /// tab, etc). The |user_gesture| value will be true (1) if the browser 18236 /// navigated via explicit user gesture (e.g. clicking a link) or false (0) if 18237 /// it navigated automatically (e.g. via the DomContentLoaded event). Return 18238 /// true (1) to cancel the navigation or false (0) to allow the navigation to 18239 /// proceed in the source browser's top-level frame. 18240 /// 18241 extern(System) int function ( 18242 cef_request_handler_t* self, 18243 cef_browser_t* browser, 18244 cef_frame_t* frame, 18245 const(cef_string_t)* target_url, 18246 cef_window_open_disposition_t target_disposition, 18247 int user_gesture) nothrow on_open_urlfrom_tab; 18248 18249 /// 18250 /// Called on the browser process IO thread before a resource request is 18251 /// initiated. The |browser| and |frame| values represent the source of the 18252 /// request. |request| represents the request contents and cannot be modified 18253 /// in this callback. |is_navigation| will be true (1) if the resource request 18254 /// is a navigation. |is_download| will be true (1) if the resource request is 18255 /// a download. |request_initiator| is the origin (scheme + domain) of the 18256 /// page that initiated the request. Set |disable_default_handling| to true 18257 /// (1) to disable default handling of the request, in which case it will need 18258 /// to be handled via cef_resource_request_handler_t::GetResourceHandler or it 18259 /// will be canceled. To allow the resource load to proceed with default 18260 /// handling return NULL. To specify a handler for the resource return a 18261 /// cef_resource_request_handler_t object. If this callback returns NULL the 18262 /// same function will be called on the associated 18263 /// cef_request_context_handler_t, if any. 18264 /// 18265 extern(System) cef_resource_request_handler_t* function ( 18266 cef_request_handler_t* self, 18267 cef_browser_t* browser, 18268 cef_frame_t* frame, 18269 cef_request_t* request, 18270 int is_navigation, 18271 int is_download, 18272 const(cef_string_t)* request_initiator, 18273 int* disable_default_handling) nothrow get_resource_request_handler; 18274 18275 /// 18276 /// Called on the IO thread when the browser needs credentials from the user. 18277 /// |origin_url| is the origin making this authentication request. |isProxy| 18278 /// indicates whether the host is a proxy server. |host| contains the hostname 18279 /// and |port| contains the port number. |realm| is the realm of the challenge 18280 /// and may be NULL. |scheme| is the authentication scheme used, such as 18281 /// "basic" or "digest", and will be NULL if the source of the request is an 18282 /// FTP server. Return true (1) to continue the request and call 18283 /// cef_auth_callback_t::cont() either in this function or at a later time 18284 /// when the authentication information is available. Return false (0) to 18285 /// cancel the request immediately. 18286 /// 18287 extern(System) int function ( 18288 cef_request_handler_t* self, 18289 cef_browser_t* browser, 18290 const(cef_string_t)* origin_url, 18291 int isProxy, 18292 const(cef_string_t)* host, 18293 int port, 18294 const(cef_string_t)* realm, 18295 const(cef_string_t)* scheme, 18296 cef_auth_callback_t* callback) nothrow get_auth_credentials; 18297 18298 /// 18299 /// Called on the UI thread to handle requests for URLs with an invalid SSL 18300 /// certificate. Return true (1) and call cef_callback_t functions either in 18301 /// this function or at a later time to continue or cancel the request. Return 18302 /// false (0) to cancel the request immediately. If 18303 /// cef_settings_t.ignore_certificate_errors is set all invalid certificates 18304 /// will be accepted without calling this function. 18305 /// 18306 extern(System) int function ( 18307 cef_request_handler_t* self, 18308 cef_browser_t* browser, 18309 cef_errorcode_t cert_error, 18310 const(cef_string_t)* request_url, 18311 cef_sslinfo_t* ssl_info, 18312 cef_callback_t* callback) nothrow on_certificate_error; 18313 18314 /// 18315 /// Called on the UI thread when a client certificate is being requested for 18316 /// authentication. Return false (0) to use the default behavior. If the 18317 /// |certificates| list is not NULL the default behavior will be to display a 18318 /// dialog for certificate selection. If the |certificates| list is NULL then 18319 /// the default behavior will be not to show a dialog and it will continue 18320 /// without using any certificate. Return true (1) and call 18321 /// cef_select_client_certificate_callback_t::Select either in this function 18322 /// or at a later time to select a certificate. Do not call Select or call it 18323 /// with NULL to continue without using any certificate. |isProxy| indicates 18324 /// whether the host is an HTTPS proxy or the origin server. |host| and |port| 18325 /// contains the hostname and port of the SSL server. |certificates| is the 18326 /// list of certificates to choose from; this list has already been pruned by 18327 /// Chromium so that it only contains certificates from issuers that the 18328 /// server trusts. 18329 /// 18330 extern(System) int function ( 18331 cef_request_handler_t* self, 18332 cef_browser_t* browser, 18333 int isProxy, 18334 const(cef_string_t)* host, 18335 int port, 18336 size_t certificatesCount, 18337 cef_x509_certificate_t** certificates, 18338 cef_select_client_certificate_callback_t* callback) nothrow on_select_client_certificate; 18339 18340 /// 18341 /// Called on the browser process UI thread when the render view associated 18342 /// with |browser| is ready to receive/handle IPC messages in the render 18343 /// process. 18344 /// 18345 extern(System) void function ( 18346 cef_request_handler_t* self, 18347 cef_browser_t* browser) nothrow on_render_view_ready; 18348 18349 /// 18350 /// Called on the browser process UI thread when the render process is 18351 /// unresponsive as indicated by a lack of input event processing for at least 18352 /// 15 seconds. Return false (0) for the default behavior which is to continue 18353 /// waiting with Alloy style or display of the "Page unresponsive" dialog with 18354 /// Chrome style. Return true (1) and don't execute the callback to continue 18355 /// waiting without display of the Chrome style dialog. Return true (1) and 18356 /// call cef_unresponsive_process_callback_t::Wait either in this function or 18357 /// at a later time to reset the wait timer. In cases where you continue 18358 /// waiting there may be another call to this function if the process remains 18359 /// unresponsive. Return true (1) and call 18360 /// cef_unresponsive_process_callback_t::Terminate either in this function or 18361 /// at a later time to terminate the unresponsive process, resulting in a call 18362 /// to OnRenderProcessTerminated. OnRenderProcessResponsive will be called if 18363 /// the process becomes responsive after this function is called. This 18364 /// functionality depends on the hang monitor which can be disabled by passing 18365 /// the `--disable-hang-monitor` command-line flag. 18366 /// 18367 extern(System) int function ( 18368 cef_request_handler_t* self, 18369 cef_browser_t* browser, 18370 cef_unresponsive_process_callback_t* callback) nothrow on_render_process_unresponsive; 18371 18372 /// 18373 /// Called on the browser process UI thread when the render process becomes 18374 /// responsive after previously being unresponsive. See documentation on 18375 /// OnRenderProcessUnresponsive. 18376 /// 18377 extern(System) void function ( 18378 cef_request_handler_t* self, 18379 cef_browser_t* browser) nothrow on_render_process_responsive; 18380 18381 /// 18382 /// Called on the browser process UI thread when the render process terminates 18383 /// unexpectedly. |status| indicates how the process terminated. |error_code| 18384 /// and |error_string| represent the error that would be displayed in Chrome's 18385 /// "Aw, Snap!" view. Possible |error_code| values include cef_resultcode_t 18386 /// non-normal exit values and platform-specific crash values (for example, a 18387 /// Posix signal or Windows hardware exception). 18388 /// 18389 extern(System) void function ( 18390 cef_request_handler_t* self, 18391 cef_browser_t* browser, 18392 cef_termination_status_t status, 18393 int error_code, 18394 const(cef_string_t)* error_string) nothrow on_render_process_terminated; 18395 18396 /// 18397 /// Called on the browser process UI thread when the window.document object of 18398 /// the main frame has been created. 18399 /// 18400 extern(System) void function ( 18401 cef_request_handler_t* self, 18402 cef_browser_t* browser) nothrow on_document_available_in_main_frame; 18403 } 18404 18405 18406 18407 // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ 18408 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 18409 // 18410 // Redistribution and use in source and binary forms, with or without 18411 // modification, are permitted provided that the following conditions are 18412 // met: 18413 // 18414 // * Redistributions of source code must retain the above copyright 18415 // notice, this list of conditions and the following disclaimer. 18416 // * Redistributions in binary form must reproduce the above 18417 // copyright notice, this list of conditions and the following disclaimer 18418 // in the documentation and/or other materials provided with the 18419 // distribution. 18420 // * Neither the name of Google Inc. nor the name Chromium Embedded 18421 // Framework nor the names of its contributors may be used to endorse 18422 // or promote products derived from this software without specific prior 18423 // written permission. 18424 // 18425 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18426 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18427 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18428 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18429 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18430 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18431 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18432 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18433 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18434 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18435 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18436 // 18437 // --------------------------------------------------------------------------- 18438 // 18439 // This file was generated by the CEF translator tool and should not edited 18440 // by hand. See the translator.README.txt file in the tools directory for 18441 // more information. 18442 // 18443 // $hash=f47f2838ce9498bf79366713ae03573c3d0e50d5$ 18444 // 18445 18446 extern (C): 18447 18448 /// 18449 /// Structure used for retrieving resources from the resource bundle (*.pak) 18450 /// files loaded by CEF during startup or via the cef_resource_bundle_handler_t 18451 /// returned from cef_app_t::GetResourceBundleHandler. See CefSettings for 18452 /// additional options related to resource bundle loading. The functions of this 18453 /// structure may be called on any thread unless otherwise indicated. 18454 /// 18455 /// NOTE: This struct is allocated DLL-side. 18456 /// 18457 struct cef_resource_bundle_t 18458 { 18459 /// 18460 /// Base structure. 18461 /// 18462 18463 /// 18464 /// Returns the localized string for the specified |string_id| or an NULL 18465 /// string if the value is not found. Use the cef_id_for_pack_string_name() 18466 /// function for version-safe mapping of string IDS names from 18467 /// cef_pack_strings.h to version-specific numerical |string_id| values. 18468 18469 cef_base_ref_counted_t base; 18470 /// 18471 // The resulting string must be freed by calling cef_string_userfree_free(). 18472 extern(System) cef_string_userfree_t function ( 18473 cef_resource_bundle_t* self, 18474 int string_id) nothrow get_localized_string; 18475 18476 /// 18477 /// Returns a cef_binary_value_t containing the decompressed contents of the 18478 /// specified scale independent |resource_id| or NULL if not found. Use the 18479 /// cef_id_for_pack_resource_name() function for version-safe mapping of 18480 /// resource IDR names from cef_pack_resources.h to version-specific numerical 18481 /// |resource_id| values. 18482 /// 18483 extern(System) cef_binary_value_t* function ( 18484 cef_resource_bundle_t* self, 18485 int resource_id) nothrow get_data_resource; 18486 18487 /// 18488 /// Returns a cef_binary_value_t containing the decompressed contents of the 18489 /// specified |resource_id| nearest the scale factor |scale_factor| or NULL if 18490 /// not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale 18491 /// independent resources or call GetDataResource instead. Use the 18492 /// cef_id_for_pack_resource_name() function for version-safe mapping of 18493 /// resource IDR names from cef_pack_resources.h to version-specific numerical 18494 /// |resource_id| values. 18495 /// 18496 extern(System) cef_binary_value_t* function ( 18497 cef_resource_bundle_t* self, 18498 int resource_id, 18499 cef_scale_factor_t scale_factor) nothrow get_data_resource_for_scale; 18500 } 18501 18502 18503 18504 /// 18505 /// Returns the global resource bundle instance. 18506 /// 18507 cef_resource_bundle_t* cef_resource_bundle_get_global (); 18508 18509 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_ 18510 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 18511 // 18512 // Redistribution and use in source and binary forms, with or without 18513 // modification, are permitted provided that the following conditions are 18514 // met: 18515 // 18516 // * Redistributions of source code must retain the above copyright 18517 // notice, this list of conditions and the following disclaimer. 18518 // * Redistributions in binary form must reproduce the above 18519 // copyright notice, this list of conditions and the following disclaimer 18520 // in the documentation and/or other materials provided with the 18521 // distribution. 18522 // * Neither the name of Google Inc. nor the name Chromium Embedded 18523 // Framework nor the names of its contributors may be used to endorse 18524 // or promote products derived from this software without specific prior 18525 // written permission. 18526 // 18527 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18528 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18529 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18530 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18531 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18532 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18533 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18534 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18535 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18536 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18537 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18538 // 18539 // --------------------------------------------------------------------------- 18540 // 18541 // This file was generated by the CEF translator tool and should not edited 18542 // by hand. See the translator.README.txt file in the tools directory for 18543 // more information. 18544 // 18545 // $hash=7943ef07f085554227d0f3c42eaa0af46865d06e$ 18546 // 18547 18548 extern (C): 18549 18550 /// 18551 /// Structure used to implement a custom resource bundle structure. See 18552 /// CefSettings for additional options related to resource bundle loading. The 18553 /// functions of this structure may be called on multiple threads. 18554 /// 18555 /// NOTE: This struct is allocated client-side. 18556 /// 18557 struct cef_resource_bundle_handler_t 18558 { 18559 /// 18560 /// Base structure. 18561 /// 18562 18563 /// 18564 /// Called to retrieve a localized translation for the specified |string_id|. 18565 /// To provide the translation set |string| to the translation string and 18566 /// return true (1). To use the default translation return false (0). Use the 18567 /// cef_id_for_pack_string_name() function for version-safe mapping of string 18568 /// IDS names from cef_pack_strings.h to version-specific numerical 18569 /// |string_id| values. 18570 18571 cef_base_ref_counted_t base; 18572 /// 18573 extern(System) int function ( 18574 cef_resource_bundle_handler_t* self, 18575 int string_id, 18576 cef_string_t* string) nothrow get_localized_string; 18577 18578 /// 18579 /// Called to retrieve data for the specified scale independent |resource_id|. 18580 /// To provide the resource data set |data| and |data_size| to the data 18581 /// pointer and size respectively and return true (1). To use the default 18582 /// resource data return false (0). The resource data will not be copied and 18583 /// must remain resident in memory. Use the cef_id_for_pack_resource_name() 18584 /// function for version-safe mapping of resource IDR names from 18585 /// cef_pack_resources.h to version-specific numerical |resource_id| values. 18586 /// 18587 extern(System) int function ( 18588 cef_resource_bundle_handler_t* self, 18589 int resource_id, 18590 void** data, 18591 size_t* data_size) nothrow get_data_resource; 18592 18593 /// 18594 /// Called to retrieve data for the specified |resource_id| nearest the scale 18595 /// factor |scale_factor|. To provide the resource data set |data| and 18596 /// |data_size| to the data pointer and size respectively and return true (1). 18597 /// To use the default resource data return false (0). The resource data will 18598 /// not be copied and must remain resident in memory. Use the 18599 /// cef_id_for_pack_resource_name() function for version-safe mapping of 18600 /// resource IDR names from cef_pack_resources.h to version-specific numerical 18601 /// |resource_id| values. 18602 /// 18603 extern(System) int function ( 18604 cef_resource_bundle_handler_t* self, 18605 int resource_id, 18606 cef_scale_factor_t scale_factor, 18607 void** data, 18608 size_t* data_size) nothrow get_data_resource_for_scale; 18609 } 18610 18611 18612 18613 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_ 18614 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 18615 // 18616 // Redistribution and use in source and binary forms, with or without 18617 // modification, are permitted provided that the following conditions are 18618 // met: 18619 // 18620 // * Redistributions of source code must retain the above copyright 18621 // notice, this list of conditions and the following disclaimer. 18622 // * Redistributions in binary form must reproduce the above 18623 // copyright notice, this list of conditions and the following disclaimer 18624 // in the documentation and/or other materials provided with the 18625 // distribution. 18626 // * Neither the name of Google Inc. nor the name Chromium Embedded 18627 // Framework nor the names of its contributors may be used to endorse 18628 // or promote products derived from this software without specific prior 18629 // written permission. 18630 // 18631 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18632 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18633 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18634 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18635 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18636 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18637 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18638 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18639 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18640 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18641 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18642 // 18643 // --------------------------------------------------------------------------- 18644 // 18645 // This file was generated by the CEF translator tool and should not edited 18646 // by hand. See the translator.README.txt file in the tools directory for 18647 // more information. 18648 // 18649 // $hash=dcc85bc129a43eca533e2f6cce32d04926f1efae$ 18650 // 18651 18652 extern (C): 18653 18654 /// 18655 /// Callback for asynchronous continuation of cef_resource_handler_t::skip(). 18656 /// 18657 /// NOTE: This struct is allocated DLL-side. 18658 /// 18659 struct cef_resource_skip_callback_t 18660 { 18661 /// 18662 /// Base structure. 18663 /// 18664 18665 /// 18666 /// Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0 18667 /// then either skip() will be called again until the requested number of 18668 /// bytes have been skipped or the request will proceed. If |bytes_skipped| <= 18669 /// 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE. 18670 /// 18671 18672 cef_base_ref_counted_t base; 18673 extern(System) void function ( 18674 cef_resource_skip_callback_t* self, 18675 long bytes_skipped) nothrow cont; 18676 } 18677 18678 18679 18680 /// 18681 /// Callback for asynchronous continuation of cef_resource_handler_t::read(). 18682 /// 18683 /// NOTE: This struct is allocated DLL-side. 18684 /// 18685 struct cef_resource_read_callback_t 18686 { 18687 /// 18688 /// Base structure. 18689 /// 18690 cef_base_ref_counted_t base; 18691 18692 /// 18693 /// Callback for asynchronous continuation of read(). If |bytes_read| == 0 the 18694 /// response will be considered complete. If |bytes_read| > 0 then read() will 18695 /// be called again until the request is complete (based on either the result 18696 /// or the expected content length). If |bytes_read| < 0 then the request will 18697 /// fail and the |bytes_read| value will be treated as the error code. 18698 /// 18699 extern(System) void function (cef_resource_read_callback_t* self, int bytes_read) nothrow cont; 18700 } 18701 18702 18703 18704 /// 18705 /// Structure used to implement a custom request handler structure. The 18706 /// functions of this structure will be called on the IO thread unless otherwise 18707 /// indicated. 18708 /// 18709 /// NOTE: This struct is allocated client-side. 18710 /// 18711 struct cef_resource_handler_t 18712 { 18713 /// 18714 /// Base structure. 18715 /// 18716 cef_base_ref_counted_t base; 18717 18718 /// 18719 /// Open the response stream. To handle the request immediately set 18720 /// |handle_request| to true (1) and return true (1). To decide at a later 18721 /// time set |handle_request| to false (0), return true (1), and execute 18722 /// |callback| to continue or cancel the request. To cancel the request 18723 /// immediately set |handle_request| to true (1) and return false (0). This 18724 /// function will be called in sequence but not from a dedicated thread. For 18725 /// backwards compatibility set |handle_request| to false (0) and return false 18726 /// (0) and the ProcessRequest function will be called. 18727 /// 18728 extern(System) int function ( 18729 cef_resource_handler_t* self, 18730 cef_request_t* request, 18731 int* handle_request, 18732 cef_callback_t* callback) nothrow open; 18733 18734 /// 18735 /// Begin processing the request. To handle the request return true (1) and 18736 /// call cef_callback_t::cont() once the response header information is 18737 /// available (cef_callback_t::cont() can also be called from inside this 18738 /// function if header information is available immediately). To cancel the 18739 /// request return false (0). 18740 /// 18741 /// WARNING: This function is deprecated. Use Open instead. 18742 /// 18743 extern(System) int function ( 18744 cef_resource_handler_t* self, 18745 cef_request_t* request, 18746 cef_callback_t* callback) nothrow process_request; 18747 18748 /// 18749 /// Retrieve response header information. If the response length is not known 18750 /// set |response_length| to -1 and read_response() will be called until it 18751 /// returns false (0). If the response length is known set |response_length| 18752 /// to a positive value and read_response() will be called until it returns 18753 /// false (0) or the specified number of bytes have been read. Use the 18754 /// |response| object to set the mime type, http status code and other 18755 /// optional header values. To redirect the request to a new URL set 18756 /// |redirectUrl| to the new URL. |redirectUrl| can be either a relative or 18757 /// fully qualified URL. It is also possible to set |response| to a redirect 18758 /// http status code and pass the new URL via a Location header. Likewise with 18759 /// |redirectUrl| it is valid to set a relative or fully qualified URL as the 18760 /// Location header value. If an error occured while setting up the request 18761 /// you can call set_error() on |response| to indicate the error condition. 18762 /// 18763 extern(System) void function ( 18764 cef_resource_handler_t* self, 18765 cef_response_t* response, 18766 long* response_length, 18767 cef_string_t* redirectUrl) nothrow get_response_headers; 18768 18769 /// 18770 /// Skip response data when requested by a Range header. Skip over and discard 18771 /// |bytes_to_skip| bytes of response data. If data is available immediately 18772 /// set |bytes_skipped| to the number of bytes skipped and return true (1). To 18773 /// read the data at a later time set |bytes_skipped| to 0, return true (1) 18774 /// and execute |callback| when the data is available. To indicate failure set 18775 /// |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This 18776 /// function will be called in sequence but not from a dedicated thread. 18777 /// 18778 extern(System) int function ( 18779 cef_resource_handler_t* self, 18780 long bytes_to_skip, 18781 long* bytes_skipped, 18782 cef_resource_skip_callback_t* callback) nothrow skip; 18783 18784 /// 18785 /// Read response data. If data is available immediately copy up to 18786 /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of 18787 /// bytes copied, and return true (1). To read the data at a later time keep a 18788 /// pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute 18789 /// |callback| when the data is available (|data_out| will remain valid until 18790 /// the callback is executed). To indicate response completion set 18791 /// |bytes_read| to 0 and return false (0). To indicate failure set 18792 /// |bytes_read| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This 18793 /// function will be called in sequence but not from a dedicated thread. For 18794 /// backwards compatibility set |bytes_read| to -1 and return false (0) and 18795 /// the ReadResponse function will be called. 18796 /// 18797 extern(System) int function ( 18798 cef_resource_handler_t* self, 18799 void* data_out, 18800 int bytes_to_read, 18801 int* bytes_read, 18802 cef_resource_read_callback_t* callback) nothrow read; 18803 18804 /// 18805 /// Read response data. If data is available immediately copy up to 18806 /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of 18807 /// bytes copied, and return true (1). To read the data at a later time set 18808 /// |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when 18809 /// the data is available. To indicate response completion return false (0). 18810 /// 18811 /// WARNING: This function is deprecated. Use Skip and Read instead. 18812 /// 18813 extern(System) int function ( 18814 cef_resource_handler_t* self, 18815 void* data_out, 18816 int bytes_to_read, 18817 int* bytes_read, 18818 cef_callback_t* callback) nothrow read_response; 18819 18820 /// 18821 /// Request processing has been canceled. 18822 /// 18823 extern(System) void function (cef_resource_handler_t* self) nothrow cancel; 18824 } 18825 18826 18827 18828 // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ 18829 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 18830 // 18831 // Redistribution and use in source and binary forms, with or without 18832 // modification, are permitted provided that the following conditions are 18833 // met: 18834 // 18835 // * Redistributions of source code must retain the above copyright 18836 // notice, this list of conditions and the following disclaimer. 18837 // * Redistributions in binary form must reproduce the above 18838 // copyright notice, this list of conditions and the following disclaimer 18839 // in the documentation and/or other materials provided with the 18840 // distribution. 18841 // * Neither the name of Google Inc. nor the name Chromium Embedded 18842 // Framework nor the names of its contributors may be used to endorse 18843 // or promote products derived from this software without specific prior 18844 // written permission. 18845 // 18846 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18847 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18848 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18849 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18850 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18851 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18852 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18853 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18854 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18855 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18856 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18857 // 18858 // --------------------------------------------------------------------------- 18859 // 18860 // This file was generated by the CEF translator tool and should not edited 18861 // by hand. See the translator.README.txt file in the tools directory for 18862 // more information. 18863 // 18864 // $hash=9bcfb08e73653706d1c2f0ea9cab3fe41c4f5806$ 18865 // 18866 18867 extern (C): 18868 18869 /// 18870 /// Implement this structure to handle events related to browser requests. The 18871 /// functions of this structure will be called on the IO thread unless otherwise 18872 /// indicated. 18873 /// 18874 /// NOTE: This struct is allocated client-side. 18875 /// 18876 struct cef_resource_request_handler_t 18877 { 18878 /// 18879 /// Base structure. 18880 /// 18881 18882 /// 18883 /// Called on the IO thread before a resource request is loaded. The |browser| 18884 /// and |frame| values represent the source of the request, and may be NULL 18885 18886 cef_base_ref_counted_t base; 18887 /// for requests originating from service workers or cef_urlrequest_t. To 18888 /// optionally filter cookies for the request return a 18889 /// cef_cookie_access_filter_t object. The |request| object cannot not be 18890 /// modified in this callback. 18891 /// 18892 extern(System) cef_cookie_access_filter_t* function ( 18893 cef_resource_request_handler_t* self, 18894 cef_browser_t* browser, 18895 cef_frame_t* frame, 18896 cef_request_t* request) nothrow get_cookie_access_filter; 18897 18898 /// 18899 /// Called on the IO thread before a resource request is loaded. The |browser| 18900 /// and |frame| values represent the source of the request, and may be NULL 18901 /// for requests originating from service workers or cef_urlrequest_t. To 18902 /// redirect or change the resource load optionally modify |request|. 18903 /// Modification of the request URL will be treated as a redirect. Return 18904 /// RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC 18905 /// and call cef_callback_t functions at a later time to continue or cancel 18906 /// the request asynchronously. Return RV_CANCEL to cancel the request 18907 /// immediately. 18908 /// 18909 extern(System) cef_return_value_t function ( 18910 cef_resource_request_handler_t* self, 18911 cef_browser_t* browser, 18912 cef_frame_t* frame, 18913 cef_request_t* request, 18914 cef_callback_t* callback) nothrow on_before_resource_load; 18915 18916 /// 18917 /// Called on the IO thread before a resource is loaded. The |browser| and 18918 /// |frame| values represent the source of the request, and may be NULL for 18919 /// requests originating from service workers or cef_urlrequest_t. To allow 18920 /// the resource to load using the default network loader return NULL. To 18921 /// specify a handler for the resource return a cef_resource_handler_t object. 18922 /// The |request| object cannot not be modified in this callback. 18923 /// 18924 extern(System) cef_resource_handler_t* function ( 18925 cef_resource_request_handler_t* self, 18926 cef_browser_t* browser, 18927 cef_frame_t* frame, 18928 cef_request_t* request) nothrow get_resource_handler; 18929 18930 /// 18931 /// Called on the IO thread when a resource load is redirected. The |browser| 18932 /// and |frame| values represent the source of the request, and may be NULL 18933 /// for requests originating from service workers or cef_urlrequest_t. The 18934 /// |request| parameter will contain the old URL and other request-related 18935 /// information. The |response| parameter will contain the response that 18936 /// resulted in the redirect. The |new_url| parameter will contain the new URL 18937 /// and can be changed if desired. The |request| and |response| objects cannot 18938 /// be modified in this callback. 18939 /// 18940 extern(System) void function ( 18941 cef_resource_request_handler_t* self, 18942 cef_browser_t* browser, 18943 cef_frame_t* frame, 18944 cef_request_t* request, 18945 cef_response_t* response, 18946 cef_string_t* new_url) nothrow on_resource_redirect; 18947 18948 /// 18949 /// Called on the IO thread when a resource response is received. The 18950 /// |browser| and |frame| values represent the source of the request, and may 18951 /// be NULL for requests originating from service workers or cef_urlrequest_t. 18952 /// To allow the resource load to proceed without modification return false 18953 /// (0). To redirect or retry the resource load optionally modify |request| 18954 /// and return true (1). Modification of the request URL will be treated as a 18955 /// redirect. Requests handled using the default network loader cannot be 18956 /// redirected in this callback. The |response| object cannot be modified in 18957 /// this callback. 18958 /// 18959 /// WARNING: Redirecting using this function is deprecated. Use 18960 /// OnBeforeResourceLoad or GetResourceHandler to perform redirects. 18961 /// 18962 extern(System) int function ( 18963 cef_resource_request_handler_t* self, 18964 cef_browser_t* browser, 18965 cef_frame_t* frame, 18966 cef_request_t* request, 18967 cef_response_t* response) nothrow on_resource_response; 18968 18969 /// 18970 /// Called on the IO thread to optionally filter resource response content. 18971 /// The |browser| and |frame| values represent the source of the request, and 18972 /// may be NULL for requests originating from service workers or 18973 /// cef_urlrequest_t. |request| and |response| represent the request and 18974 /// response respectively and cannot be modified in this callback. 18975 /// 18976 extern(System) cef_response_filter_t* function ( 18977 cef_resource_request_handler_t* self, 18978 cef_browser_t* browser, 18979 cef_frame_t* frame, 18980 cef_request_t* request, 18981 cef_response_t* response) nothrow get_resource_response_filter; 18982 18983 /// 18984 /// Called on the IO thread when a resource load has completed. The |browser| 18985 /// and |frame| values represent the source of the request, and may be NULL 18986 /// for requests originating from service workers or cef_urlrequest_t. 18987 /// |request| and |response| represent the request and response respectively 18988 /// and cannot be modified in this callback. |status| indicates the load 18989 /// completion status. |received_content_length| is the number of response 18990 /// bytes actually read. This function will be called for all requests, 18991 /// including requests that are aborted due to CEF shutdown or destruction of 18992 /// the associated browser. In cases where the associated browser is destroyed 18993 /// this callback may arrive after the cef_life_span_handler_t::OnBeforeClose 18994 /// callback for that browser. The cef_frame_t::IsValid function can be used 18995 /// to test for this situation, and care should be taken not to call |browser| 18996 /// or |frame| functions that modify state (like LoadURL, SendProcessMessage, 18997 /// etc.) if the frame is invalid. 18998 /// 18999 extern(System) void function ( 19000 cef_resource_request_handler_t* self, 19001 cef_browser_t* browser, 19002 cef_frame_t* frame, 19003 cef_request_t* request, 19004 cef_response_t* response, 19005 cef_urlrequest_status_t status, 19006 long received_content_length) nothrow on_resource_load_complete; 19007 19008 /// 19009 /// Called on the IO thread to handle requests for URLs with an unknown 19010 /// protocol component. The |browser| and |frame| values represent the source 19011 /// of the request, and may be NULL for requests originating from service 19012 /// workers or cef_urlrequest_t. |request| cannot be modified in this 19013 /// callback. Set |allow_os_execution| to true (1) to attempt execution via 19014 /// the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD 19015 /// USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL 19016 /// ANALYSIS BEFORE ALLOWING OS EXECUTION. 19017 /// 19018 extern(System) void function ( 19019 cef_resource_request_handler_t* self, 19020 cef_browser_t* browser, 19021 cef_frame_t* frame, 19022 cef_request_t* request, 19023 int* allow_os_execution) nothrow on_protocol_execution; 19024 } 19025 19026 19027 19028 /// 19029 /// Implement this structure to filter cookies that may be sent or received from 19030 /// resource requests. The functions of this structure will be called on the IO 19031 /// thread unless otherwise indicated. 19032 /// 19033 /// NOTE: This struct is allocated client-side. 19034 /// 19035 struct cef_cookie_access_filter_t 19036 { 19037 /// 19038 /// Base structure. 19039 /// 19040 cef_base_ref_counted_t base; 19041 19042 /// 19043 /// Called on the IO thread before a resource request is sent. The |browser| 19044 /// and |frame| values represent the source of the request, and may be NULL 19045 /// for requests originating from service workers or cef_urlrequest_t. 19046 /// |request| cannot be modified in this callback. Return true (1) if the 19047 /// specified cookie can be sent with the request or false (0) otherwise. 19048 /// 19049 extern(System) int function ( 19050 cef_cookie_access_filter_t* self, 19051 cef_browser_t* browser, 19052 cef_frame_t* frame, 19053 cef_request_t* request, 19054 const(cef_cookie_t)* cookie) nothrow can_send_cookie; 19055 19056 /// 19057 /// Called on the IO thread after a resource response is received. The 19058 /// |browser| and |frame| values represent the source of the request, and may 19059 /// be NULL for requests originating from service workers or cef_urlrequest_t. 19060 /// |request| cannot be modified in this callback. Return true (1) if the 19061 /// specified cookie returned with the response can be saved or false (0) 19062 /// otherwise. 19063 /// 19064 extern(System) int function ( 19065 cef_cookie_access_filter_t* self, 19066 cef_browser_t* browser, 19067 cef_frame_t* frame, 19068 cef_request_t* request, 19069 cef_response_t* response, 19070 const(cef_cookie_t)* cookie) nothrow can_save_cookie; 19071 } 19072 19073 19074 19075 // CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_ 19076 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 19077 // 19078 // Redistribution and use in source and binary forms, with or without 19079 // modification, are permitted provided that the following conditions are 19080 // met: 19081 // 19082 // * Redistributions of source code must retain the above copyright 19083 // notice, this list of conditions and the following disclaimer. 19084 // * Redistributions in binary form must reproduce the above 19085 // copyright notice, this list of conditions and the following disclaimer 19086 // in the documentation and/or other materials provided with the 19087 // distribution. 19088 // * Neither the name of Google Inc. nor the name Chromium Embedded 19089 // Framework nor the names of its contributors may be used to endorse 19090 // or promote products derived from this software without specific prior 19091 // written permission. 19092 // 19093 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19094 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19095 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19096 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19097 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19098 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19099 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19100 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19101 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19102 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19103 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19104 // 19105 // --------------------------------------------------------------------------- 19106 // 19107 // This file was generated by the CEF translator tool and should not edited 19108 // by hand. See the translator.README.txt file in the tools directory for 19109 // more information. 19110 // 19111 // $hash=48b607ec385e08b767b6ac1ab132121204f075fc$ 19112 // 19113 19114 extern (C): 19115 19116 /// 19117 /// Structure used to represent a web response. The functions of this structure 19118 /// may be called on any thread. 19119 /// 19120 /// NOTE: This struct is allocated DLL-side. 19121 /// 19122 struct cef_response_t 19123 { 19124 /// 19125 /// Base structure. 19126 /// 19127 19128 /// 19129 /// Returns true (1) if this object is read-only. 19130 /// 19131 19132 /// 19133 /// Get the response error code. Returns ERR_NONE if there was no error. 19134 /// 19135 19136 /// 19137 /// Set the response error code. This can be used by custom scheme handlers to 19138 /// return errors during initial request processing. 19139 /// 19140 19141 /// 19142 19143 cef_base_ref_counted_t base; 19144 extern(System) int function (cef_response_t* self) nothrow is_read_only; 19145 extern(System) cef_errorcode_t function (cef_response_t* self) nothrow get_error; 19146 extern(System) void function (cef_response_t* self, cef_errorcode_t error) nothrow set_error; 19147 /// Get the response status code. 19148 /// 19149 extern(System) int function (cef_response_t* self) nothrow get_status; 19150 19151 /// 19152 /// Set the response status code. 19153 /// 19154 extern(System) void function (cef_response_t* self, int status) nothrow set_status; 19155 19156 /// 19157 /// Get the response status text. 19158 /// 19159 // The resulting string must be freed by calling cef_string_userfree_free(). 19160 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_status_text; 19161 19162 /// 19163 /// Set the response status text. 19164 /// 19165 extern(System) void function ( 19166 cef_response_t* self, 19167 const(cef_string_t)* statusText) nothrow set_status_text; 19168 19169 /// 19170 /// Get the response mime type. 19171 /// 19172 // The resulting string must be freed by calling cef_string_userfree_free(). 19173 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_mime_type; 19174 19175 /// 19176 /// Set the response mime type. 19177 /// 19178 extern(System) void function ( 19179 cef_response_t* self, 19180 const(cef_string_t)* mimeType) nothrow set_mime_type; 19181 19182 /// 19183 /// Get the response charset. 19184 /// 19185 // The resulting string must be freed by calling cef_string_userfree_free(). 19186 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_charset; 19187 19188 /// 19189 /// Set the response charset. 19190 /// 19191 extern(System) void function ( 19192 cef_response_t* self, 19193 const(cef_string_t)* charset) nothrow set_charset; 19194 19195 /// 19196 /// Get the value for the specified response header field. 19197 /// 19198 // The resulting string must be freed by calling cef_string_userfree_free(). 19199 extern(System) cef_string_userfree_t function ( 19200 cef_response_t* self, 19201 const(cef_string_t)* name) nothrow get_header_by_name; 19202 19203 /// 19204 /// Set the header |name| to |value|. If |overwrite| is true (1) any existing 19205 /// values will be replaced with the new value. If |overwrite| is false (0) 19206 /// any existing values will not be overwritten. 19207 /// 19208 extern(System) void function ( 19209 cef_response_t* self, 19210 const(cef_string_t)* name, 19211 const(cef_string_t)* value, 19212 int overwrite) nothrow set_header_by_name; 19213 19214 /// 19215 /// Get all response header fields. 19216 /// 19217 extern(System) void function ( 19218 cef_response_t* self, 19219 cef_string_multimap_t headerMap) nothrow get_header_map; 19220 19221 /// 19222 /// Set all response header fields. 19223 /// 19224 extern(System) void function ( 19225 cef_response_t* self, 19226 cef_string_multimap_t headerMap) nothrow set_header_map; 19227 19228 /// 19229 /// Get the resolved URL after redirects or changed as a result of HSTS. 19230 /// 19231 // The resulting string must be freed by calling cef_string_userfree_free(). 19232 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_url; 19233 19234 /// 19235 /// Set the resolved URL after redirects or changed as a result of HSTS. 19236 /// 19237 extern(System) void function (cef_response_t* self, const(cef_string_t)* url) nothrow set_url; 19238 } 19239 19240 19241 19242 /// 19243 /// Create a new cef_response_t object. 19244 /// 19245 cef_response_t* cef_response_create (); 19246 19247 // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ 19248 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 19249 // 19250 // Redistribution and use in source and binary forms, with or without 19251 // modification, are permitted provided that the following conditions are 19252 // met: 19253 // 19254 // * Redistributions of source code must retain the above copyright 19255 // notice, this list of conditions and the following disclaimer. 19256 // * Redistributions in binary form must reproduce the above 19257 // copyright notice, this list of conditions and the following disclaimer 19258 // in the documentation and/or other materials provided with the 19259 // distribution. 19260 // * Neither the name of Google Inc. nor the name Chromium Embedded 19261 // Framework nor the names of its contributors may be used to endorse 19262 // or promote products derived from this software without specific prior 19263 // written permission. 19264 // 19265 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19266 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19267 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19268 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19269 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19270 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19271 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19272 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19273 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19274 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19275 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19276 // 19277 // --------------------------------------------------------------------------- 19278 // 19279 // This file was generated by the CEF translator tool and should not edited 19280 // by hand. See the translator.README.txt file in the tools directory for 19281 // more information. 19282 // 19283 // $hash=bd8bf0bc352c1ff20740c04a8cd5f9df4841c8f0$ 19284 // 19285 19286 extern (C): 19287 19288 /// 19289 /// Implement this structure to filter resource response content. The functions 19290 /// of this structure will be called on the browser process IO thread. 19291 /// 19292 /// NOTE: This struct is allocated client-side. 19293 /// 19294 struct cef_response_filter_t 19295 { 19296 /// 19297 /// Base structure. 19298 /// 19299 19300 /// 19301 /// Initialize the response filter. Will only be called a single time. The 19302 /// filter will not be installed if this function returns false (0). 19303 /// 19304 19305 /// 19306 /// Called to filter a chunk of data. Expected usage is as follows: 19307 /// 19308 /// 1. Read input data from |data_in| and set |data_in_read| to the number of 19309 /// bytes that were read up to a maximum of |data_in_size|. |data_in| will 19310 /// be NULL if |data_in_size| is zero. 19311 19312 cef_base_ref_counted_t base; 19313 extern(System) int function (cef_response_filter_t* self) nothrow init_filter; /// 2. Write filtered output data to |data_out| and set |data_out_written| to 19314 /// the number of bytes that were written up to a maximum of 19315 /// |data_out_size|. If no output data was written then all data must be 19316 /// read from |data_in| (user must set |data_in_read| = |data_in_size|). 19317 /// 3. Return RESPONSE_FILTER_DONE if all output data was written or 19318 /// RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending. 19319 /// 19320 /// This function will be called repeatedly until the input buffer has been 19321 /// fully read (user sets |data_in_read| = |data_in_size|) and there is no 19322 /// more input data to filter (the resource response is complete). This 19323 /// function may then be called an additional time with an NULL input buffer 19324 /// if the user filled the output buffer (set |data_out_written| = 19325 /// |data_out_size|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate 19326 /// that output data is still pending. 19327 /// 19328 /// Calls to this function will stop when one of the following conditions is 19329 /// met: 19330 /// 19331 /// 1. There is no more input data to filter (the resource response is 19332 /// complete) and the user sets |data_out_written| = 0 or returns 19333 /// RESPONSE_FILTER_DONE to indicate that all data has been written, or; 19334 /// 2. The user returns RESPONSE_FILTER_ERROR to indicate an error. 19335 /// 19336 /// Do not keep a reference to the buffers passed to this function. 19337 /// 19338 extern(System) cef_response_filter_status_t function ( 19339 cef_response_filter_t* self, 19340 void* data_in, 19341 size_t data_in_size, 19342 size_t* data_in_read, 19343 void* data_out, 19344 size_t data_out_size, 19345 size_t* data_out_written) nothrow filter; 19346 } 19347 19348 19349 19350 // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_ 19351 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 19352 // 19353 // Redistribution and use in source and binary forms, with or without 19354 // modification, are permitted provided that the following conditions are 19355 // met: 19356 // 19357 // * Redistributions of source code must retain the above copyright 19358 // notice, this list of conditions and the following disclaimer. 19359 // * Redistributions in binary form must reproduce the above 19360 // copyright notice, this list of conditions and the following disclaimer 19361 // in the documentation and/or other materials provided with the 19362 // distribution. 19363 // * Neither the name of Google Inc. nor the name Chromium Embedded 19364 // Framework nor the names of its contributors may be used to endorse 19365 // or promote products derived from this software without specific prior 19366 // written permission. 19367 // 19368 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19369 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19370 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19371 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19372 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19373 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19374 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19375 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19376 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19377 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19378 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19379 // 19380 // --------------------------------------------------------------------------- 19381 // 19382 // This file was generated by the CEF translator tool and should not edited 19383 // by hand. See the translator.README.txt file in the tools directory for 19384 // more information. 19385 // 19386 // $hash=3cfed97fc270ad63fb8aed253ba5f8d3121cf8ca$ 19387 // 19388 19389 extern (C): 19390 19391 /// 19392 /// Structure that manages custom scheme registrations. 19393 /// 19394 /// NOTE: This struct is allocated DLL-side. 19395 /// 19396 struct cef_scheme_registrar_t 19397 { 19398 /// 19399 /// Base structure. 19400 /// 19401 19402 /// 19403 /// Register a custom scheme. This function should not be called for the 19404 /// built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. 19405 /// 19406 /// See cef_scheme_options_t for possible values for |options|. 19407 /// 19408 /// This function may be called on any thread. It should only be called once 19409 /// per unique |scheme_name| value. If |scheme_name| is already registered or 19410 /// if an error occurs this function will return false (0). 19411 19412 /// 19413 19414 /// 19415 /// Structure that creates cef_resource_handler_t instances for handling scheme 19416 19417 cef_base_scoped_t base; 19418 extern(System) int function ( 19419 cef_scheme_registrar_t* self, 19420 const(cef_string_t)* scheme_name, 19421 int options) nothrow add_custom_scheme; 19422 } 19423 19424 19425 /// requests. The functions of this structure will always be called on the IO 19426 /// thread. 19427 /// 19428 /// NOTE: This struct is allocated client-side. 19429 /// 19430 struct cef_scheme_handler_factory_t 19431 { 19432 /// 19433 /// Base structure. 19434 /// 19435 19436 cef_base_ref_counted_t base; 19437 19438 /// 19439 /// Return a new resource handler instance to handle the request or an NULL 19440 /// reference to allow default handling of the request. |browser| and |frame| 19441 /// will be the browser window and frame respectively that originated the 19442 /// request or NULL if the request did not originate from a browser window 19443 /// (for example, if the request came from cef_urlrequest_t). The |request| 19444 /// object passed to this function cannot be modified. 19445 /// 19446 extern(System) cef_resource_handler_t* function ( 19447 cef_scheme_handler_factory_t* self, 19448 cef_browser_t* browser, 19449 cef_frame_t* frame, 19450 const(cef_string_t)* scheme_name, 19451 cef_request_t* request) nothrow create; 19452 } 19453 19454 19455 19456 /// 19457 /// Register a scheme handler factory with the global request context. An NULL 19458 /// |domain_name| value for a standard scheme will cause the factory to match 19459 /// all domain names. The |domain_name| value will be ignored for non-standard 19460 /// schemes. If |scheme_name| is a built-in scheme and no handler is returned by 19461 /// |factory| then the built-in scheme handler factory will be called. If 19462 /// |scheme_name| is a custom scheme then you must also implement the 19463 /// cef_app_t::on_register_custom_schemes() function in all processes. This 19464 /// function may be called multiple times to change or remove the factory that 19465 /// matches the specified |scheme_name| and optional |domain_name|. Returns 19466 /// false (0) if an error occurs. This function may be called on any thread in 19467 /// the browser process. Using this function is equivalent to calling cef_reques 19468 /// t_context_t::cef_request_context_get_global_context()->register_scheme_handl 19469 /// er_factory(). 19470 /// 19471 int cef_register_scheme_handler_factory ( 19472 const(cef_string_t)* scheme_name, 19473 const(cef_string_t)* domain_name, 19474 cef_scheme_handler_factory_t* factory); 19475 19476 /// 19477 /// Clear all scheme handler factories registered with the global request 19478 /// context. Returns false (0) on error. This function may be called on any 19479 /// thread in the browser process. Using this function is equivalent to calling 19480 /// cef_request_context_t::cef_request_context_get_global_context()->clear_schem 19481 /// e_handler_factories(). 19482 /// 19483 int cef_clear_scheme_handler_factories (); 19484 19485 // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ 19486 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 19487 // 19488 // Redistribution and use in source and binary forms, with or without 19489 // modification, are permitted provided that the following conditions are 19490 // met: 19491 // 19492 // * Redistributions of source code must retain the above copyright 19493 // notice, this list of conditions and the following disclaimer. 19494 // * Redistributions in binary form must reproduce the above 19495 // copyright notice, this list of conditions and the following disclaimer 19496 // in the documentation and/or other materials provided with the 19497 // distribution. 19498 // * Neither the name of Google Inc. nor the name Chromium Embedded 19499 // Framework nor the names of its contributors may be used to endorse 19500 // or promote products derived from this software without specific prior 19501 // written permission. 19502 // 19503 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19504 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19505 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19506 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19507 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19508 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19509 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19510 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19511 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19512 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19513 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19514 // 19515 // --------------------------------------------------------------------------- 19516 // 19517 // This file was generated by the CEF translator tool and should not edited 19518 // by hand. See the translator.README.txt file in the tools directory for 19519 // more information. 19520 // 19521 // $hash=ccb8dd9df0cd92e44f2a95bc6ee32cc66af6fd45$ 19522 // 19523 19524 extern (C): 19525 19526 /// 19527 /// Structure representing a server that supports HTTP and WebSocket requests. 19528 /// Server capacity is limited and is intended to handle only a small number of 19529 /// simultaneous connections (e.g. for communicating between applications on 19530 /// localhost). The functions of this structure are safe to call from any thread 19531 /// in the brower process unless otherwise indicated. 19532 /// 19533 /// NOTE: This struct is allocated DLL-side. 19534 /// 19535 struct cef_server_t 19536 { 19537 /// 19538 /// Base structure. 19539 /// 19540 19541 /// 19542 /// Returns the task runner for the dedicated server thread. 19543 /// 19544 19545 cef_base_ref_counted_t base; 19546 extern(System) cef_task_runner_t* function (cef_server_t* self) nothrow get_task_runner; 19547 19548 /// 19549 /// Stop the server and shut down the dedicated server thread. See 19550 /// cef_server_handler_t::OnServerCreated documentation for a description of 19551 /// server lifespan. 19552 /// 19553 extern(System) void function (cef_server_t* self) nothrow shutdown; 19554 19555 /// 19556 /// Returns true (1) if the server is currently running and accepting incoming 19557 /// connections. See cef_server_handler_t::OnServerCreated documentation for a 19558 /// description of server lifespan. This function must be called on the 19559 /// dedicated server thread. 19560 /// 19561 extern(System) int function (cef_server_t* self) nothrow is_running; 19562 19563 /// 19564 /// Returns the server address including the port number. 19565 /// 19566 // The resulting string must be freed by calling cef_string_userfree_free(). 19567 extern(System) cef_string_userfree_t function (cef_server_t* self) nothrow get_address; 19568 19569 /// 19570 /// Returns true (1) if the server currently has a connection. This function 19571 /// must be called on the dedicated server thread. 19572 /// 19573 extern(System) int function (cef_server_t* self) nothrow has_connection; 19574 19575 /// 19576 /// Returns true (1) if |connection_id| represents a valid connection. This 19577 /// function must be called on the dedicated server thread. 19578 /// 19579 extern(System) int function (cef_server_t* self, int connection_id) nothrow is_valid_connection; 19580 19581 /// 19582 /// Send an HTTP 200 "OK" response to the connection identified by 19583 /// |connection_id|. |content_type| is the response content type (e.g. 19584 /// "text/html"), |data| is the response content, and |data_size| is the size 19585 /// of |data| in bytes. The contents of |data| will be copied. The connection 19586 /// will be closed automatically after the response is sent. 19587 /// 19588 extern(System) void function ( 19589 cef_server_t* self, 19590 int connection_id, 19591 const(cef_string_t)* content_type, 19592 const(void)* data, 19593 size_t data_size) nothrow send_http200_response; 19594 19595 /// 19596 /// Send an HTTP 404 "Not Found" response to the connection identified by 19597 /// |connection_id|. The connection will be closed automatically after the 19598 /// response is sent. 19599 /// 19600 extern(System) void function ( 19601 cef_server_t* self, 19602 int connection_id) nothrow send_http404_response; 19603 19604 /// 19605 /// Send an HTTP 500 "Internal Server Error" response to the connection 19606 /// identified by |connection_id|. |error_message| is the associated error 19607 /// message. The connection will be closed automatically after the response is 19608 /// sent. 19609 /// 19610 extern(System) void function ( 19611 cef_server_t* self, 19612 int connection_id, 19613 const(cef_string_t)* error_message) nothrow send_http500_response; 19614 19615 /// 19616 /// Send a custom HTTP response to the connection identified by 19617 /// |connection_id|. |response_code| is the HTTP response code sent in the 19618 /// status line (e.g. 200), |content_type| is the response content type sent 19619 /// as the "Content-Type" header (e.g. "text/html"), |content_length| is the 19620 /// expected content length, and |extra_headers| is the map of extra response 19621 /// headers. If |content_length| is >= 0 then the "Content-Length" header will 19622 /// be sent. If |content_length| is 0 then no content is expected and the 19623 /// connection will be closed automatically after the response is sent. If 19624 /// |content_length| is < 0 then no "Content-Length" header will be sent and 19625 /// the client will continue reading until the connection is closed. Use the 19626 /// SendRawData function to send the content, if applicable, and call 19627 /// CloseConnection after all content has been sent. 19628 /// 19629 extern(System) void function ( 19630 cef_server_t* self, 19631 int connection_id, 19632 int response_code, 19633 const(cef_string_t)* content_type, 19634 long content_length, 19635 cef_string_multimap_t extra_headers) nothrow send_http_response; 19636 19637 /// 19638 /// Send raw data directly to the connection identified by |connection_id|. 19639 /// |data| is the raw data and |data_size| is the size of |data| in bytes. The 19640 /// contents of |data| will be copied. No validation of |data| is performed 19641 /// internally so the client should be careful to send the amount indicated by 19642 /// the "Content-Length" header, if specified. See SendHttpResponse 19643 /// documentation for intended usage. 19644 /// 19645 extern(System) void function ( 19646 cef_server_t* self, 19647 int connection_id, 19648 const(void)* data, 19649 size_t data_size) nothrow send_raw_data; 19650 19651 /// 19652 /// Close the connection identified by |connection_id|. See SendHttpResponse 19653 /// documentation for intended usage. 19654 /// 19655 extern(System) void function (cef_server_t* self, int connection_id) nothrow close_connection; 19656 19657 /// 19658 /// Send a WebSocket message to the connection identified by |connection_id|. 19659 /// |data| is the response content and |data_size| is the size of |data| in 19660 /// bytes. The contents of |data| will be copied. See 19661 /// cef_server_handler_t::OnWebSocketRequest documentation for intended usage. 19662 /// 19663 extern(System) void function ( 19664 cef_server_t* self, 19665 int connection_id, 19666 const(void)* data, 19667 size_t data_size) nothrow send_web_socket_message; 19668 } 19669 19670 19671 19672 /// 19673 /// Create a new server that binds to |address| and |port|. |address| must be a 19674 /// valid IPv4 or IPv6 address (e.g. 127.0.0.1 or ::1) and |port| must be a port 19675 /// number outside of the reserved range (e.g. between 1025 and 65535 on most 19676 /// platforms). |backlog| is the maximum number of pending connections. A new 19677 /// thread will be created for each CreateServer call (the "dedicated server 19678 /// thread"). It is therefore recommended to use a different 19679 /// cef_server_handler_t instance for each CreateServer call to avoid thread 19680 /// safety issues in the cef_server_handler_t implementation. The 19681 /// cef_server_handler_t::OnServerCreated function will be called on the 19682 /// dedicated server thread to report success or failure. See 19683 /// cef_server_handler_t::OnServerCreated documentation for a description of 19684 /// server lifespan. 19685 /// 19686 void cef_server_create ( 19687 const(cef_string_t)* address, 19688 ushort port, 19689 int backlog, 19690 cef_server_handler_t* handler); 19691 19692 /// 19693 /// Implement this structure to handle HTTP server requests. A new thread will 19694 /// be created for each cef_server_t::CreateServer call (the "dedicated server 19695 /// thread"), and the functions of this structure will be called on that thread. 19696 /// It is therefore recommended to use a different cef_server_handler_t instance 19697 /// for each cef_server_t::CreateServer call to avoid thread safety issues in 19698 /// the cef_server_handler_t implementation. 19699 /// 19700 /// NOTE: This struct is allocated client-side. 19701 /// 19702 struct cef_server_handler_t 19703 { 19704 /// 19705 /// Base structure. 19706 /// 19707 cef_base_ref_counted_t base; 19708 19709 /// 19710 /// Called when |server| is created. If the server was started successfully 19711 /// then cef_server_t::IsRunning will return true (1). The server will 19712 /// continue running until cef_server_t::Shutdown is called, after which time 19713 /// OnServerDestroyed will be called. If the server failed to start then 19714 /// OnServerDestroyed will be called immediately after this function returns. 19715 /// 19716 extern(System) void function ( 19717 cef_server_handler_t* self, 19718 cef_server_t* server) nothrow on_server_created; 19719 19720 /// 19721 /// Called when |server| is destroyed. The server thread will be stopped after 19722 /// this function returns. The client should release any references to 19723 /// |server| when this function is called. See OnServerCreated documentation 19724 /// for a description of server lifespan. 19725 /// 19726 extern(System) void function ( 19727 cef_server_handler_t* self, 19728 cef_server_t* server) nothrow on_server_destroyed; 19729 19730 /// 19731 /// Called when a client connects to |server|. |connection_id| uniquely 19732 /// identifies the connection. Each call to this function will have a matching 19733 /// call to OnClientDisconnected. 19734 /// 19735 extern(System) void function ( 19736 cef_server_handler_t* self, 19737 cef_server_t* server, 19738 int connection_id) nothrow on_client_connected; 19739 19740 /// 19741 /// Called when a client disconnects from |server|. |connection_id| uniquely 19742 /// identifies the connection. The client should release any data associated 19743 /// with |connection_id| when this function is called and |connection_id| 19744 /// should no longer be passed to cef_server_t functions. Disconnects can 19745 /// originate from either the client or the server. For example, the server 19746 /// will disconnect automatically after a cef_server_t::SendHttpXXXResponse 19747 /// function is called. 19748 /// 19749 extern(System) void function ( 19750 cef_server_handler_t* self, 19751 cef_server_t* server, 19752 int connection_id) nothrow on_client_disconnected; 19753 19754 /// 19755 /// Called when |server| receives an HTTP request. |connection_id| uniquely 19756 /// identifies the connection, |client_address| is the requesting IPv4 or IPv6 19757 /// client address including port number, and |request| contains the request 19758 /// contents (URL, function, headers and optional POST data). Call 19759 /// cef_server_t functions either synchronously or asynchronusly to send a 19760 /// response. 19761 /// 19762 extern(System) void function ( 19763 cef_server_handler_t* self, 19764 cef_server_t* server, 19765 int connection_id, 19766 const(cef_string_t)* client_address, 19767 cef_request_t* request) nothrow on_http_request; 19768 19769 /// 19770 /// Called when |server| receives a WebSocket request. |connection_id| 19771 /// uniquely identifies the connection, |client_address| is the requesting 19772 /// IPv4 or IPv6 client address including port number, and |request| contains 19773 /// the request contents (URL, function, headers and optional POST data). 19774 /// Execute |callback| either synchronously or asynchronously to accept or 19775 /// decline the WebSocket connection. If the request is accepted then 19776 /// OnWebSocketConnected will be called after the WebSocket has connected and 19777 /// incoming messages will be delivered to the OnWebSocketMessage callback. If 19778 /// the request is declined then the client will be disconnected and 19779 /// OnClientDisconnected will be called. Call the 19780 /// cef_server_t::SendWebSocketMessage function after receiving the 19781 /// OnWebSocketConnected callback to respond with WebSocket messages. 19782 /// 19783 extern(System) void function ( 19784 cef_server_handler_t* self, 19785 cef_server_t* server, 19786 int connection_id, 19787 const(cef_string_t)* client_address, 19788 cef_request_t* request, 19789 cef_callback_t* callback) nothrow on_web_socket_request; 19790 19791 /// 19792 /// Called after the client has accepted the WebSocket connection for |server| 19793 /// and |connection_id| via the OnWebSocketRequest callback. See 19794 /// OnWebSocketRequest documentation for intended usage. 19795 /// 19796 extern(System) void function ( 19797 cef_server_handler_t* self, 19798 cef_server_t* server, 19799 int connection_id) nothrow on_web_socket_connected; 19800 19801 /// 19802 /// Called when |server| receives an WebSocket message. |connection_id| 19803 /// uniquely identifies the connection, |data| is the message content and 19804 /// |data_size| is the size of |data| in bytes. Do not keep a reference to 19805 /// |data| outside of this function. See OnWebSocketRequest documentation for 19806 /// intended usage. 19807 /// 19808 extern(System) void function ( 19809 cef_server_handler_t* self, 19810 cef_server_t* server, 19811 int connection_id, 19812 const(void)* data, 19813 size_t data_size) nothrow on_web_socket_message; 19814 } 19815 19816 19817 19818 // CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_ 19819 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 19820 // 19821 // Redistribution and use in source and binary forms, with or without 19822 // modification, are permitted provided that the following conditions are 19823 // met: 19824 // 19825 // * Redistributions of source code must retain the above copyright 19826 // notice, this list of conditions and the following disclaimer. 19827 // * Redistributions in binary form must reproduce the above 19828 // copyright notice, this list of conditions and the following disclaimer 19829 // in the documentation and/or other materials provided with the 19830 // distribution. 19831 // * Neither the name of Google Inc. nor the name Chromium Embedded 19832 // Framework nor the names of its contributors may be used to endorse 19833 // or promote products derived from this software without specific prior 19834 // written permission. 19835 // 19836 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19837 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19838 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19839 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19840 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19841 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19842 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19843 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19844 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19845 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19846 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19847 // 19848 // --------------------------------------------------------------------------- 19849 // 19850 // This file was generated by the CEF translator tool and should not edited 19851 // by hand. See the translator.README.txt file in the tools directory for 19852 // more information. 19853 // 19854 // $hash=70d9aba509f824a05c705e07fd008185a41e3ad9$ 19855 // 19856 19857 extern (C): 19858 19859 /// 19860 /// Structure that wraps platform-dependent share memory region mapping. 19861 /// 19862 /// NOTE: This struct is allocated DLL-side. 19863 /// 19864 struct cef_shared_memory_region_t 19865 { 19866 /// 19867 /// Base structure. 19868 /// 19869 19870 /// 19871 /// Returns true (1) if the mapping is valid. 19872 /// 19873 19874 /// 19875 /// Returns the size of the mapping in bytes. Returns 0 for invalid instances. 19876 /// 19877 19878 /// 19879 /// Returns the pointer to the memory. Returns nullptr for invalid instances. 19880 /// The returned pointer is only valid for the life span of this object. 19881 /// 19882 19883 cef_base_ref_counted_t base; 19884 extern(System) int function (cef_shared_memory_region_t* self) nothrow is_valid; 19885 extern(System) size_t function (cef_shared_memory_region_t* self) nothrow size; 19886 extern(System) void* function (cef_shared_memory_region_t* self) nothrow memory; 19887 } 19888 19889 19890 19891 // CEF_INCLUDE_CAPI_CEF_SHARED_MEMORY_REGION_CAPI_H_ 19892 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 19893 // 19894 // Redistribution and use in source and binary forms, with or without 19895 // modification, are permitted provided that the following conditions are 19896 // met: 19897 // 19898 // * Redistributions of source code must retain the above copyright 19899 // notice, this list of conditions and the following disclaimer. 19900 // * Redistributions in binary form must reproduce the above 19901 // copyright notice, this list of conditions and the following disclaimer 19902 // in the documentation and/or other materials provided with the 19903 // distribution. 19904 // * Neither the name of Google Inc. nor the name Chromium Embedded 19905 // Framework nor the names of its contributors may be used to endorse 19906 // or promote products derived from this software without specific prior 19907 // written permission. 19908 // 19909 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19910 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19911 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19912 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19913 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19914 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19915 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19916 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19917 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19918 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19919 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19920 // 19921 // --------------------------------------------------------------------------- 19922 // 19923 // This file was generated by the CEF translator tool and should not edited 19924 // by hand. See the translator.README.txt file in the tools directory for 19925 // more information. 19926 // 19927 // $hash=63bb39e8c19a16637af5ee4dfeaa2c6aa2c3bdf3$ 19928 // 19929 19930 extern (C): 19931 19932 /// 19933 /// Structure that builds a cef_process_message_t containing a shared memory 19934 /// region. This structure is not thread-safe but may be used exclusively on a 19935 /// different thread from the one which constructed it. 19936 /// 19937 /// NOTE: This struct is allocated DLL-side. 19938 /// 19939 struct cef_shared_process_message_builder_t 19940 { 19941 /// 19942 /// Base structure. 19943 /// 19944 19945 /// 19946 /// Returns true (1) if the builder is valid. 19947 /// 19948 19949 /// 19950 /// Returns the size of the shared memory region in bytes. Returns 0 for 19951 /// invalid instances. 19952 /// 19953 19954 /// 19955 /// Returns the pointer to the writable memory. Returns nullptr for invalid 19956 19957 cef_base_ref_counted_t base; 19958 extern(System) int function (cef_shared_process_message_builder_t* self) nothrow is_valid; 19959 extern(System) size_t function (cef_shared_process_message_builder_t* self) nothrow size; 19960 /// instances. The returned pointer is only valid for the life span of this 19961 /// object. 19962 /// 19963 extern(System) void* function (cef_shared_process_message_builder_t* self) nothrow memory; 19964 19965 /// 19966 /// Creates a new cef_process_message_t from the data provided to the builder. 19967 /// Returns nullptr for invalid instances. Invalidates the builder instance. 19968 /// 19969 extern(System) cef_process_message_t* function ( 19970 cef_shared_process_message_builder_t* self) nothrow build; 19971 } 19972 19973 19974 19975 /// 19976 /// Creates a new cef_shared_process_message_builder_t with the specified |name| 19977 /// and shared memory region of specified |byte_size|. 19978 /// 19979 cef_shared_process_message_builder_t* cef_shared_process_message_builder_create ( 19980 const(cef_string_t)* name, 19981 size_t byte_size); 19982 19983 // CEF_INCLUDE_CAPI_CEF_SHARED_PROCESS_MESSAGE_BUILDER_CAPI_H_ 19984 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 19985 // 19986 // Redistribution and use in source and binary forms, with or without 19987 // modification, are permitted provided that the following conditions are 19988 // met: 19989 // 19990 // * Redistributions of source code must retain the above copyright 19991 // notice, this list of conditions and the following disclaimer. 19992 // * Redistributions in binary form must reproduce the above 19993 // copyright notice, this list of conditions and the following disclaimer 19994 // in the documentation and/or other materials provided with the 19995 // distribution. 19996 // * Neither the name of Google Inc. nor the name Chromium Embedded 19997 // Framework nor the names of its contributors may be used to endorse 19998 // or promote products derived from this software without specific prior 19999 // written permission. 20000 // 20001 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20002 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20003 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20004 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20005 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20006 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20007 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20008 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20009 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20010 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20011 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20012 // 20013 // --------------------------------------------------------------------------- 20014 // 20015 // This file was generated by the CEF translator tool and should not edited 20016 // by hand. See the translator.README.txt file in the tools directory for 20017 // more information. 20018 // 20019 // $hash=dce2233cf08d4c9a55470aa11e4f8fab3cb2bede$ 20020 // 20021 20022 extern (C): 20023 20024 /// 20025 /// Structure representing SSL information. 20026 /// 20027 /// NOTE: This struct is allocated DLL-side. 20028 /// 20029 struct cef_sslinfo_t 20030 { 20031 /// 20032 /// Base structure. 20033 /// 20034 20035 /// 20036 /// Returns a bitmask containing any and all problems verifying the server 20037 /// certificate. 20038 /// 20039 20040 /// 20041 /// Returns the X.509 certificate. 20042 /// 20043 20044 /// 20045 /// Returns true (1) if the certificate status represents an error. 20046 /// 20047 20048 cef_base_ref_counted_t base; 20049 extern(System) cef_cert_status_t function (cef_sslinfo_t* self) nothrow get_cert_status; 20050 extern(System) cef_x509_certificate_t* function ( 20051 cef_sslinfo_t* self) nothrow get_x509_certificate; 20052 } 20053 20054 20055 int cef_is_cert_status_error (cef_cert_status_t status); 20056 20057 // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_ 20058 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20059 // 20060 // Redistribution and use in source and binary forms, with or without 20061 // modification, are permitted provided that the following conditions are 20062 // met: 20063 // 20064 // * Redistributions of source code must retain the above copyright 20065 // notice, this list of conditions and the following disclaimer. 20066 // * Redistributions in binary form must reproduce the above 20067 // copyright notice, this list of conditions and the following disclaimer 20068 // in the documentation and/or other materials provided with the 20069 // distribution. 20070 // * Neither the name of Google Inc. nor the name Chromium Embedded 20071 // Framework nor the names of its contributors may be used to endorse 20072 // or promote products derived from this software without specific prior 20073 // written permission. 20074 // 20075 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20076 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20077 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20078 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20079 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20080 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20081 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20082 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20083 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20084 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20085 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20086 // 20087 // --------------------------------------------------------------------------- 20088 // 20089 // This file was generated by the CEF translator tool and should not edited 20090 // by hand. See the translator.README.txt file in the tools directory for 20091 // more information. 20092 // 20093 // $hash=9f93bc0dbf57e4dda50f1f1100ccd52249bd3aa7$ 20094 // 20095 20096 extern (C): 20097 20098 /// 20099 /// Structure representing the SSL information for a navigation entry. 20100 /// 20101 /// NOTE: This struct is allocated DLL-side. 20102 /// 20103 struct cef_sslstatus_t 20104 { 20105 /// 20106 /// Base structure. 20107 /// 20108 20109 /// 20110 /// Returns true (1) if the status is related to a secure SSL/TLS connection. 20111 /// 20112 20113 /// 20114 /// Returns a bitmask containing any and all problems verifying the server 20115 /// certificate. 20116 /// 20117 20118 /// 20119 /// Returns the SSL version used for the SSL connection. 20120 /// 20121 20122 cef_base_ref_counted_t base; 20123 extern(System) int function (cef_sslstatus_t* self) nothrow is_secure_connection; 20124 extern(System) cef_cert_status_t function (cef_sslstatus_t* self) nothrow get_cert_status; 20125 extern(System) cef_ssl_version_t function (cef_sslstatus_t* self) nothrow get_sslversion; 20126 20127 /// 20128 /// Returns a bitmask containing the page security content status. 20129 /// 20130 extern(System) cef_ssl_content_status_t function ( 20131 cef_sslstatus_t* self) nothrow get_content_status; 20132 20133 /// 20134 /// Returns the X.509 certificate. 20135 /// 20136 extern(System) cef_x509_certificate_t* function ( 20137 cef_sslstatus_t* self) nothrow get_x509_certificate; 20138 } 20139 20140 20141 20142 // CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_ 20143 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20144 // 20145 // Redistribution and use in source and binary forms, with or without 20146 // modification, are permitted provided that the following conditions are 20147 // met: 20148 // 20149 // * Redistributions of source code must retain the above copyright 20150 // notice, this list of conditions and the following disclaimer. 20151 // * Redistributions in binary form must reproduce the above 20152 // copyright notice, this list of conditions and the following disclaimer 20153 // in the documentation and/or other materials provided with the 20154 // distribution. 20155 // * Neither the name of Google Inc. nor the name Chromium Embedded 20156 // Framework nor the names of its contributors may be used to endorse 20157 // or promote products derived from this software without specific prior 20158 // written permission. 20159 // 20160 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20161 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20162 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20163 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20164 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20165 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20166 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20167 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20168 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20169 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20170 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20171 // 20172 // --------------------------------------------------------------------------- 20173 // 20174 // This file was generated by the CEF translator tool and should not edited 20175 // by hand. See the translator.README.txt file in the tools directory for 20176 // more information. 20177 // 20178 // $hash=650f1218832c4b81610ba0ddc8c77d307ce2a993$ 20179 // 20180 20181 extern (C): 20182 20183 /// 20184 /// Structure the client can implement to provide a custom stream reader. The 20185 /// functions of this structure may be called on any thread. 20186 /// 20187 /// NOTE: This struct is allocated client-side. 20188 /// 20189 struct cef_read_handler_t 20190 { 20191 /// 20192 /// Base structure. 20193 /// 20194 20195 /// 20196 /// Read raw binary data. 20197 /// 20198 20199 /// 20200 /// Seek to the specified offset position. |whence| may be any one of 20201 /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on 20202 /// failure. 20203 /// 20204 20205 cef_base_ref_counted_t base; 20206 extern(System) size_t function ( 20207 cef_read_handler_t* self, 20208 void* ptr, 20209 size_t size, 20210 size_t n) nothrow read; 20211 extern(System) int function (cef_read_handler_t* self, long offset, int whence) nothrow seek; 20212 20213 /// 20214 /// Return the current offset position. 20215 /// 20216 extern(System) long function (cef_read_handler_t* self) nothrow tell; 20217 20218 /// 20219 /// Return non-zero if at end of file. 20220 /// 20221 extern(System) int function (cef_read_handler_t* self) nothrow eof; 20222 20223 /// 20224 /// Return true (1) if this handler performs work like accessing the file 20225 /// system which may block. Used as a hint for determining the thread to 20226 /// access the handler from. 20227 /// 20228 extern(System) int function (cef_read_handler_t* self) nothrow may_block; 20229 } 20230 20231 20232 20233 /// 20234 /// Structure used to read data from a stream. The functions of this structure 20235 /// may be called on any thread. 20236 /// 20237 /// NOTE: This struct is allocated DLL-side. 20238 /// 20239 struct cef_stream_reader_t 20240 { 20241 /// 20242 /// Base structure. 20243 /// 20244 cef_base_ref_counted_t base; 20245 20246 /// 20247 /// Read raw binary data. 20248 /// 20249 extern(System) size_t function ( 20250 cef_stream_reader_t* self, 20251 void* ptr, 20252 size_t size, 20253 size_t n) nothrow read; 20254 20255 /// 20256 /// Seek to the specified offset position. |whence| may be any one of 20257 /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on 20258 /// failure. 20259 /// 20260 extern(System) int function (cef_stream_reader_t* self, long offset, int whence) nothrow seek; 20261 20262 /// 20263 /// Return the current offset position. 20264 /// 20265 extern(System) long function (cef_stream_reader_t* self) nothrow tell; 20266 20267 /// 20268 /// Return non-zero if at end of file. 20269 /// 20270 extern(System) int function (cef_stream_reader_t* self) nothrow eof; 20271 20272 /// 20273 /// Returns true (1) if this reader performs work like accessing the file 20274 /// system which may block. Used as a hint for determining the thread to 20275 /// access the reader from. 20276 /// 20277 extern(System) int function (cef_stream_reader_t* self) nothrow may_block; 20278 } 20279 20280 20281 20282 /// 20283 /// Create a new cef_stream_reader_t object from a file. 20284 /// 20285 cef_stream_reader_t* cef_stream_reader_create_for_file ( 20286 const(cef_string_t)* fileName); 20287 20288 /// 20289 /// Create a new cef_stream_reader_t object from data. 20290 /// 20291 cef_stream_reader_t* cef_stream_reader_create_for_data ( 20292 void* data, 20293 size_t size); 20294 20295 /// 20296 /// Create a new cef_stream_reader_t object from a custom handler. 20297 /// 20298 cef_stream_reader_t* cef_stream_reader_create_for_handler ( 20299 cef_read_handler_t* handler); 20300 20301 /// 20302 /// Structure the client can implement to provide a custom stream writer. The 20303 /// functions of this structure may be called on any thread. 20304 /// 20305 /// NOTE: This struct is allocated client-side. 20306 /// 20307 struct cef_write_handler_t 20308 { 20309 /// 20310 /// Base structure. 20311 /// 20312 cef_base_ref_counted_t base; 20313 20314 /// 20315 /// Write raw binary data. 20316 /// 20317 extern(System) size_t function ( 20318 cef_write_handler_t* self, 20319 const(void)* ptr, 20320 size_t size, 20321 size_t n) nothrow write; 20322 20323 /// 20324 /// Seek to the specified offset position. |whence| may be any one of 20325 /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on 20326 /// failure. 20327 /// 20328 extern(System) int function (cef_write_handler_t* self, long offset, int whence) nothrow seek; 20329 20330 /// 20331 /// Return the current offset position. 20332 /// 20333 extern(System) long function (cef_write_handler_t* self) nothrow tell; 20334 20335 /// 20336 /// Flush the stream. 20337 /// 20338 extern(System) int function (cef_write_handler_t* self) nothrow flush; 20339 20340 /// 20341 /// Return true (1) if this handler performs work like accessing the file 20342 /// system which may block. Used as a hint for determining the thread to 20343 /// access the handler from. 20344 /// 20345 extern(System) int function (cef_write_handler_t* self) nothrow may_block; 20346 } 20347 20348 20349 20350 /// 20351 /// Structure used to write data to a stream. The functions of this structure 20352 /// may be called on any thread. 20353 /// 20354 /// NOTE: This struct is allocated DLL-side. 20355 /// 20356 struct cef_stream_writer_t 20357 { 20358 /// 20359 /// Base structure. 20360 /// 20361 cef_base_ref_counted_t base; 20362 20363 /// 20364 /// Write raw binary data. 20365 /// 20366 extern(System) size_t function ( 20367 cef_stream_writer_t* self, 20368 const(void)* ptr, 20369 size_t size, 20370 size_t n) nothrow write; 20371 20372 /// 20373 /// Seek to the specified offset position. |whence| may be any one of 20374 /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on 20375 /// failure. 20376 /// 20377 extern(System) int function (cef_stream_writer_t* self, long offset, int whence) nothrow seek; 20378 20379 /// 20380 /// Return the current offset position. 20381 /// 20382 extern(System) long function (cef_stream_writer_t* self) nothrow tell; 20383 20384 /// 20385 /// Flush the stream. 20386 /// 20387 extern(System) int function (cef_stream_writer_t* self) nothrow flush; 20388 20389 /// 20390 /// Returns true (1) if this writer performs work like accessing the file 20391 /// system which may block. Used as a hint for determining the thread to 20392 /// access the writer from. 20393 /// 20394 extern(System) int function (cef_stream_writer_t* self) nothrow may_block; 20395 } 20396 20397 20398 20399 /// 20400 /// Create a new cef_stream_writer_t object for a file. 20401 /// 20402 cef_stream_writer_t* cef_stream_writer_create_for_file ( 20403 const(cef_string_t)* fileName); 20404 20405 /// 20406 /// Create a new cef_stream_writer_t object for a custom handler. 20407 /// 20408 cef_stream_writer_t* cef_stream_writer_create_for_handler ( 20409 cef_write_handler_t* handler); 20410 20411 // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_ 20412 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20413 // 20414 // Redistribution and use in source and binary forms, with or without 20415 // modification, are permitted provided that the following conditions are 20416 // met: 20417 // 20418 // * Redistributions of source code must retain the above copyright 20419 // notice, this list of conditions and the following disclaimer. 20420 // * Redistributions in binary form must reproduce the above 20421 // copyright notice, this list of conditions and the following disclaimer 20422 // in the documentation and/or other materials provided with the 20423 // distribution. 20424 // * Neither the name of Google Inc. nor the name Chromium Embedded 20425 // Framework nor the names of its contributors may be used to endorse 20426 // or promote products derived from this software without specific prior 20427 // written permission. 20428 // 20429 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20430 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20431 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20432 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20433 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20434 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20435 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20436 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20437 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20438 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20439 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20440 // 20441 // --------------------------------------------------------------------------- 20442 // 20443 // This file was generated by the CEF translator tool and should not edited 20444 // by hand. See the translator.README.txt file in the tools directory for 20445 // more information. 20446 // 20447 // $hash=e8c2b9b6b1e907c6c042cbd38fc8dab5ce4c744e$ 20448 // 20449 20450 extern (C): 20451 20452 /// 20453 /// Implement this structure to receive string values asynchronously. 20454 /// 20455 /// NOTE: This struct is allocated client-side. 20456 /// 20457 struct cef_string_visitor_t 20458 { 20459 /// 20460 /// Base structure. 20461 /// 20462 20463 /// 20464 /// Method that will be executed. 20465 /// 20466 20467 // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 20468 20469 cef_base_ref_counted_t base; 20470 extern(System) void function ( 20471 cef_string_visitor_t* self, 20472 const(cef_string_t)* string) nothrow visit; 20473 } 20474 20475 20476 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20477 // 20478 // Redistribution and use in source and binary forms, with or without 20479 // modification, are permitted provided that the following conditions are 20480 // met: 20481 // 20482 // * Redistributions of source code must retain the above copyright 20483 // notice, this list of conditions and the following disclaimer. 20484 // * Redistributions in binary form must reproduce the above 20485 // copyright notice, this list of conditions and the following disclaimer 20486 // in the documentation and/or other materials provided with the 20487 // distribution. 20488 // * Neither the name of Google Inc. nor the name Chromium Embedded 20489 // Framework nor the names of its contributors may be used to endorse 20490 // or promote products derived from this software without specific prior 20491 // written permission. 20492 // 20493 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20494 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20495 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20496 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20497 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20498 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20499 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20500 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20501 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20502 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20503 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20504 // 20505 // --------------------------------------------------------------------------- 20506 // 20507 // This file was generated by the CEF translator tool and should not edited 20508 // by hand. See the translator.README.txt file in the tools directory for 20509 // more information. 20510 // 20511 // $hash=d075982ed273707bf193b608acabf26db8896303$ 20512 // 20513 20514 extern (C): 20515 20516 /// 20517 /// Implement this structure for asynchronous task execution. If the task is 20518 /// posted successfully and if the associated message loop is still running then 20519 /// the execute() function will be called on the target thread. If the task 20520 /// fails to post then the task object may be destroyed on the source thread 20521 /// instead of the target thread. For this reason be cautious when performing 20522 /// work in the task object destructor. 20523 /// 20524 /// NOTE: This struct is allocated client-side. 20525 /// 20526 struct cef_task_t 20527 { 20528 /// 20529 /// Base structure. 20530 /// 20531 20532 /// 20533 /// Method that will be executed on the target thread. 20534 /// 20535 20536 /// 20537 /// Structure that asynchronously executes tasks on the associated thread. It is 20538 /// safe to call the functions of this structure on any thread. 20539 20540 cef_base_ref_counted_t base; 20541 extern(System) void function (cef_task_t* self) nothrow execute; 20542 } 20543 20544 20545 /// 20546 /// CEF maintains multiple internal threads that are used for handling different 20547 /// types of tasks in different processes. The cef_thread_id_t definitions in 20548 /// cef_types.h list the common CEF threads. Task runners are also available for 20549 /// other CEF threads as appropriate (for example, V8 WebWorker threads). 20550 /// 20551 /// NOTE: This struct is allocated DLL-side. 20552 /// 20553 struct cef_task_runner_t 20554 { 20555 /// 20556 /// Base structure. 20557 /// 20558 cef_base_ref_counted_t base; 20559 20560 /// 20561 /// Returns true (1) if this object is pointing to the same task runner as 20562 /// |that| object. 20563 /// 20564 extern(System) int function (cef_task_runner_t* self, cef_task_runner_t* that) nothrow is_same; 20565 20566 /// 20567 /// Returns true (1) if this task runner belongs to the current thread. 20568 /// 20569 extern(System) int function (cef_task_runner_t* self) nothrow belongs_to_current_thread; 20570 20571 /// 20572 /// Returns true (1) if this task runner is for the specified CEF thread. 20573 /// 20574 extern(System) int function ( 20575 cef_task_runner_t* self, 20576 cef_thread_id_t threadId) nothrow belongs_to_thread; 20577 20578 /// 20579 /// Post a task for execution on the thread associated with this task runner. 20580 /// Execution will occur asynchronously. 20581 /// 20582 extern(System) int function (cef_task_runner_t* self, cef_task_t* task) nothrow post_task; 20583 20584 /// 20585 /// Post a task for delayed execution on the thread associated with this task 20586 /// runner. Execution will occur asynchronously. Delayed tasks are not 20587 /// supported on V8 WebWorker threads and will be executed without the 20588 /// specified delay. 20589 /// 20590 extern(System) int function ( 20591 cef_task_runner_t* self, 20592 cef_task_t* task, 20593 long delay_ms) nothrow post_delayed_task; 20594 } 20595 20596 20597 20598 /// 20599 /// Returns the task runner for the current thread. Only CEF threads will have 20600 /// task runners. An NULL reference will be returned if this function is called 20601 /// on an invalid thread. 20602 /// 20603 cef_task_runner_t* cef_task_runner_get_for_current_thread (); 20604 20605 /// 20606 /// Returns the task runner for the specified CEF thread. 20607 /// 20608 cef_task_runner_t* cef_task_runner_get_for_thread (cef_thread_id_t threadId); 20609 20610 /// 20611 /// Returns true (1) if called on the specified thread. Equivalent to using 20612 /// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread(). 20613 /// 20614 int cef_currently_on (cef_thread_id_t threadId); 20615 20616 /// 20617 /// Post a task for execution on the specified thread. Equivalent to using 20618 /// cef_task_runner_t::GetForThread(threadId)->PostTask(task). 20619 /// 20620 int cef_post_task (cef_thread_id_t threadId, cef_task_t* task); 20621 20622 /// 20623 /// Post a task for delayed execution on the specified thread. Equivalent to 20624 /// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task, 20625 /// delay_ms). 20626 /// 20627 int cef_post_delayed_task ( 20628 cef_thread_id_t threadId, 20629 cef_task_t* task, 20630 long delay_ms); 20631 20632 // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ 20633 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20634 // 20635 // Redistribution and use in source and binary forms, with or without 20636 // modification, are permitted provided that the following conditions are 20637 // met: 20638 // 20639 // * Redistributions of source code must retain the above copyright 20640 // notice, this list of conditions and the following disclaimer. 20641 // * Redistributions in binary form must reproduce the above 20642 // copyright notice, this list of conditions and the following disclaimer 20643 // in the documentation and/or other materials provided with the 20644 // distribution. 20645 // * Neither the name of Google Inc. nor the name Chromium Embedded 20646 // Framework nor the names of its contributors may be used to endorse 20647 // or promote products derived from this software without specific prior 20648 // written permission. 20649 // 20650 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20651 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20652 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20653 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20654 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20655 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20656 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20657 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20658 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20659 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20660 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20661 // 20662 // --------------------------------------------------------------------------- 20663 // 20664 // This file was generated by the CEF translator tool and should not edited 20665 // by hand. See the translator.README.txt file in the tools directory for 20666 // more information. 20667 // 20668 // $hash=98fbe5c90a7eb86068787b850ecf0b119719a0d4$ 20669 // 20670 20671 extern (C): 20672 20673 /// 20674 /// Structure that facilitates managing the browser-related tasks. The functions 20675 /// of this structure may only be called on the UI thread. 20676 /// 20677 /// NOTE: This struct is allocated DLL-side. 20678 /// 20679 struct cef_task_manager_t 20680 { 20681 /// 20682 /// Base structure. 20683 /// 20684 20685 /// 20686 /// Returns the number of tasks currently tracked by the task manager. Returns 20687 /// 0 if the function was called from the incorrect thread. 20688 /// 20689 20690 /// 20691 /// Gets the list of task IDs currently tracked by the task manager. Tasks 20692 /// that share the same process id will always be consecutive. The list will 20693 /// be sorted in a way that reflects the process tree: the browser process 20694 /// will be first, followed by the gpu process if it exists. Related processes 20695 20696 cef_base_ref_counted_t base; 20697 extern(System) size_t function (cef_task_manager_t* self) nothrow get_tasks_count; 20698 /// (e.g., a subframe process and its parent) will be kept together if 20699 /// possible. Callers can expect this ordering to be stable when a process is 20700 /// added or removed. The task IDs are unique within the application lifespan. 20701 /// Returns false (0) if the function was called from the incorrect thread. 20702 /// 20703 extern(System) int function ( 20704 cef_task_manager_t* self, 20705 size_t* task_idsCount, 20706 long* task_ids) nothrow get_task_ids_list; 20707 20708 /// 20709 /// Gets information about the task with |task_id|. Returns true (1) if the 20710 /// information about the task was successfully retrieved and false (0) if the 20711 /// |task_id| is invalid or the function was called from the incorrect thread. 20712 /// 20713 extern(System) int function ( 20714 cef_task_manager_t* self, 20715 long task_id, 20716 cef_task_info_t* info) nothrow get_task_info; 20717 20718 /// 20719 /// Attempts to terminate a task with |task_id|. Returns false (0) if the 20720 /// |task_id| is invalid, the call is made from an incorrect thread, or if the 20721 /// task cannot be terminated. 20722 /// 20723 extern(System) int function (cef_task_manager_t* self, long task_id) nothrow kill_task; 20724 20725 /// 20726 /// Returns the task ID associated with the main task for |browser_id| (value 20727 /// from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid, 20728 /// does not currently have an associated task, or the function was called 20729 /// from the incorrect thread. 20730 /// 20731 extern(System) long function ( 20732 cef_task_manager_t* self, 20733 int browser_id) nothrow get_task_id_for_browser_id; 20734 } 20735 20736 20737 20738 /// 20739 /// Returns the global task manager object. Returns nullptr if the function was 20740 /// called from the incorrect thread. 20741 /// 20742 cef_task_manager_t* cef_task_manager_get (); 20743 20744 // CEF_INCLUDE_CAPI_CEF_TASK_MANAGER_CAPI_H_ 20745 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20746 // 20747 // Redistribution and use in source and binary forms, with or without 20748 // modification, are permitted provided that the following conditions are 20749 // met: 20750 // 20751 // * Redistributions of source code must retain the above copyright 20752 // notice, this list of conditions and the following disclaimer. 20753 // * Redistributions in binary form must reproduce the above 20754 // copyright notice, this list of conditions and the following disclaimer 20755 // in the documentation and/or other materials provided with the 20756 // distribution. 20757 // * Neither the name of Google Inc. nor the name Chromium Embedded 20758 // Framework nor the names of its contributors may be used to endorse 20759 // or promote products derived from this software without specific prior 20760 // written permission. 20761 // 20762 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20763 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20764 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20765 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20766 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20767 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20768 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20769 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20770 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20771 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20772 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20773 // 20774 // --------------------------------------------------------------------------- 20775 // 20776 // This file was generated by the CEF translator tool and should not edited 20777 // by hand. See the translator.README.txt file in the tools directory for 20778 // more information. 20779 // 20780 // $hash=cfb6c14f5002cca121bef52933749d37097a244e$ 20781 // 20782 20783 extern (C): 20784 20785 /// 20786 /// A simple thread abstraction that establishes a message loop on a new thread. 20787 /// The consumer uses cef_task_runner_t to execute code on the thread's message 20788 /// loop. The thread is terminated when the cef_thread_t object is destroyed or 20789 /// stop() is called. All pending tasks queued on the thread's message loop will 20790 /// run to completion before the thread is terminated. cef_thread_create() can 20791 /// be called on any valid CEF thread in either the browser or render process. 20792 /// This structure should only be used for tasks that require a dedicated 20793 /// thread. In most cases you can post tasks to an existing CEF thread instead 20794 /// of creating a new one; see cef_task.h for details. 20795 /// 20796 /// NOTE: This struct is allocated DLL-side. 20797 /// 20798 struct cef_thread_t 20799 { 20800 /// 20801 /// Base structure. 20802 /// 20803 20804 cef_base_ref_counted_t base; 20805 /// 20806 /// Returns the cef_task_runner_t that will execute code on this thread's 20807 /// message loop. This function is safe to call from any thread. 20808 /// 20809 extern(System) cef_task_runner_t* function (cef_thread_t* self) nothrow get_task_runner; 20810 20811 /// 20812 /// Returns the platform thread ID. It will return the same value after stop() 20813 /// is called. This function is safe to call from any thread. 20814 /// 20815 extern(System) cef_platform_thread_id_t function ( 20816 cef_thread_t* self) nothrow get_platform_thread_id; 20817 20818 /// 20819 /// Stop and join the thread. This function must be called from the same 20820 /// thread that called cef_thread_create(). Do not call this function if 20821 /// cef_thread_create() was called with a |stoppable| value of false (0). 20822 /// 20823 extern(System) void function (cef_thread_t* self) nothrow stop; 20824 20825 /// 20826 /// Returns true (1) if the thread is currently running. This function must be 20827 /// called from the same thread that called cef_thread_create(). 20828 /// 20829 extern(System) int function (cef_thread_t* self) nothrow is_running; 20830 } 20831 20832 20833 20834 /// 20835 /// Create and start a new thread. This function does not block waiting for the 20836 /// thread to run initialization. |display_name| is the name that will be used 20837 /// to identify the thread. |priority| is the thread execution priority. 20838 /// |message_loop_type| indicates the set of asynchronous events that the thread 20839 /// can process. If |stoppable| is true (1) the thread will stopped and joined 20840 /// on destruction or when stop() is called; otherwise, the thread cannot be 20841 /// stopped and will be leaked on shutdown. On Windows the |com_init_mode| value 20842 /// specifies how COM will be initialized for the thread. If |com_init_mode| is 20843 /// set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI. 20844 /// 20845 cef_thread_t* cef_thread_create ( 20846 const(cef_string_t)* display_name, 20847 cef_thread_priority_t priority, 20848 cef_message_loop_type_t message_loop_type, 20849 int stoppable, 20850 cef_com_init_mode_t com_init_mode); 20851 20852 // CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_ 20853 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20854 // 20855 // Redistribution and use in source and binary forms, with or without 20856 // modification, are permitted provided that the following conditions are 20857 // met: 20858 // 20859 // * Redistributions of source code must retain the above copyright 20860 // notice, this list of conditions and the following disclaimer. 20861 // * Redistributions in binary form must reproduce the above 20862 // copyright notice, this list of conditions and the following disclaimer 20863 // in the documentation and/or other materials provided with the 20864 // distribution. 20865 // * Neither the name of Google Inc. nor the name Chromium Embedded 20866 // Framework nor the names of its contributors may be used to endorse 20867 // or promote products derived from this software without specific prior 20868 // written permission. 20869 // 20870 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20871 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20872 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20873 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20874 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20875 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20876 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20877 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20878 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20879 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20880 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20881 // 20882 // --------------------------------------------------------------------------- 20883 // 20884 // This file was generated by the CEF translator tool and should not edited 20885 // by hand. See the translator.README.txt file in the tools directory for 20886 // more information. 20887 // 20888 // $hash=5e961bec40c2a8602d6625af303791e33aa16f8d$ 20889 // 20890 20891 extern (C): 20892 20893 /// 20894 /// Implement this structure to receive notification when tracing has completed. 20895 /// The functions of this structure will be called on the browser process UI 20896 /// thread. 20897 /// 20898 /// NOTE: This struct is allocated client-side. 20899 /// 20900 struct cef_end_tracing_callback_t 20901 { 20902 /// 20903 /// Base structure. 20904 /// 20905 20906 /// 20907 /// Called after all processes have sent their trace data. |tracing_file| is 20908 /// the path at which tracing data was written. The client is responsible for 20909 /// deleting |tracing_file|. 20910 /// 20911 20912 /// 20913 /// Start tracing events on all processes. Tracing is initialized asynchronously 20914 /// and |callback| will be executed on the UI thread after initialization is 20915 20916 cef_base_ref_counted_t base; 20917 extern(System) void function ( 20918 cef_end_tracing_callback_t* self, 20919 const(cef_string_t)* tracing_file) nothrow on_end_tracing_complete; 20920 } 20921 20922 20923 /// complete. 20924 /// 20925 /// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is 20926 /// pending, CefBeginTracing will fail and return false (0). 20927 /// 20928 /// |categories| is a comma-delimited list of category wildcards. A category can 20929 /// have an optional '-' prefix to make it an excluded category. Having both 20930 /// included and excluded categories in the same list is not supported. 20931 /// 20932 /// Examples: 20933 /// - "test_MyTest*" 20934 /// - "test_MyTest*,test_OtherStuff" 20935 /// - "-excluded_category1,-excluded_category2" 20936 /// 20937 /// This function must be called on the browser process UI thread. 20938 /// 20939 int cef_begin_tracing ( 20940 const(cef_string_t)* categories, 20941 cef_completion_callback_t* callback); 20942 20943 /// 20944 /// Stop tracing events on all processes. 20945 /// 20946 /// This function will fail and return false (0) if a previous call to 20947 /// CefEndTracingAsync is already pending or if CefBeginTracing was not called. 20948 /// 20949 /// |tracing_file| is the path at which tracing data will be written and 20950 /// |callback| is the callback that will be executed once all processes have 20951 /// sent their trace data. If |tracing_file| is NULL a new temporary file path 20952 /// will be used. If |callback| is NULL no trace data will be written. 20953 /// 20954 /// This function must be called on the browser process UI thread. 20955 /// 20956 int cef_end_tracing ( 20957 const(cef_string_t)* tracing_file, 20958 cef_end_tracing_callback_t* callback); 20959 20960 /// 20961 /// Returns the current system trace time or, if none is defined, the current 20962 /// high-res time. Can be used by clients to synchronize with the time 20963 /// information in trace events. 20964 /// 20965 long cef_now_from_system_trace_time (); 20966 20967 // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ 20968 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 20969 // 20970 // Redistribution and use in source and binary forms, with or without 20971 // modification, are permitted provided that the following conditions are 20972 // met: 20973 // 20974 // * Redistributions of source code must retain the above copyright 20975 // notice, this list of conditions and the following disclaimer. 20976 // * Redistributions in binary form must reproduce the above 20977 // copyright notice, this list of conditions and the following disclaimer 20978 // in the documentation and/or other materials provided with the 20979 // distribution. 20980 // * Neither the name of Google Inc. nor the name Chromium Embedded 20981 // Framework nor the names of its contributors may be used to endorse 20982 // or promote products derived from this software without specific prior 20983 // written permission. 20984 // 20985 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20986 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20987 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20988 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20989 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20990 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20991 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20992 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20993 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20994 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20995 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20996 // 20997 // --------------------------------------------------------------------------- 20998 // 20999 // This file was generated by the CEF translator tool and should not edited 21000 // by hand. See the translator.README.txt file in the tools directory for 21001 // more information. 21002 // 21003 // $hash=8c45f30dd1dc404020c91509d0f93e03fa363007$ 21004 // 21005 21006 extern (C): 21007 21008 /// 21009 /// Callback structure for asynchronous handling of an unresponsive process. 21010 /// 21011 /// NOTE: This struct is allocated DLL-side. 21012 /// 21013 struct cef_unresponsive_process_callback_t 21014 { 21015 /// 21016 /// Base structure. 21017 /// 21018 21019 /// 21020 /// Reset the timeout for the unresponsive process. 21021 /// 21022 21023 /// 21024 /// Terminate the unresponsive process. 21025 /// 21026 21027 // CEF_INCLUDE_CAPI_CEF_UNRESPONSIVE_PROCESS_CALLBACK_CAPI_H_ 21028 21029 cef_base_ref_counted_t base; 21030 extern(System) void function (cef_unresponsive_process_callback_t* self) nothrow wait; 21031 extern(System) void function (cef_unresponsive_process_callback_t* self) nothrow terminate; 21032 } 21033 21034 21035 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 21036 // 21037 // Redistribution and use in source and binary forms, with or without 21038 // modification, are permitted provided that the following conditions are 21039 // met: 21040 // 21041 // * Redistributions of source code must retain the above copyright 21042 // notice, this list of conditions and the following disclaimer. 21043 // * Redistributions in binary form must reproduce the above 21044 // copyright notice, this list of conditions and the following disclaimer 21045 // in the documentation and/or other materials provided with the 21046 // distribution. 21047 // * Neither the name of Google Inc. nor the name Chromium Embedded 21048 // Framework nor the names of its contributors may be used to endorse 21049 // or promote products derived from this software without specific prior 21050 // written permission. 21051 // 21052 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21053 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21054 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21055 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21056 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21057 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21058 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21059 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21060 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21061 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 21062 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21063 // 21064 // --------------------------------------------------------------------------- 21065 // 21066 // This file was generated by the CEF translator tool and should not edited 21067 // by hand. See the translator.README.txt file in the tools directory for 21068 // more information. 21069 // 21070 // $hash=142a3f70bf67cc526ac7d6d88e878e8954d9e5fe$ 21071 // 21072 21073 extern (C): 21074 21075 /// 21076 /// Structure used to make a URL request. URL requests are not associated with a 21077 /// browser instance so no cef_client_t callbacks will be executed. URL requests 21078 /// can be created on any valid CEF thread in either the browser or render 21079 /// process. Once created the functions of the URL request object must be 21080 /// accessed on the same thread that created it. 21081 /// 21082 /// NOTE: This struct is allocated DLL-side. 21083 /// 21084 struct cef_urlrequest_t 21085 { 21086 /// 21087 /// Base structure. 21088 /// 21089 21090 /// 21091 /// Returns the request object used to create this URL request. The returned 21092 /// object is read-only and should not be modified. 21093 21094 cef_base_ref_counted_t base; /// 21095 extern(System) cef_request_t* function (cef_urlrequest_t* self) nothrow get_request; 21096 21097 /// 21098 /// Returns the client. 21099 /// 21100 extern(System) cef_urlrequest_client_t* function (cef_urlrequest_t* self) nothrow get_client; 21101 21102 /// 21103 /// Returns the request status. 21104 /// 21105 extern(System) cef_urlrequest_status_t function ( 21106 cef_urlrequest_t* self) nothrow get_request_status; 21107 21108 /// 21109 /// Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 21110 /// otherwise. 21111 /// 21112 extern(System) cef_errorcode_t function (cef_urlrequest_t* self) nothrow get_request_error; 21113 21114 /// 21115 /// Returns the response, or NULL if no response information is available. 21116 /// Response information will only be available after the upload has 21117 /// completed. The returned object is read-only and should not be modified. 21118 /// 21119 extern(System) cef_response_t* function (cef_urlrequest_t* self) nothrow get_response; 21120 21121 /// 21122 /// Returns true (1) if the response body was served from the cache. This 21123 /// includes responses for which revalidation was required. 21124 /// 21125 extern(System) int function (cef_urlrequest_t* self) nothrow response_was_cached; 21126 21127 /// 21128 /// Cancel the request. 21129 /// 21130 extern(System) void function (cef_urlrequest_t* self) nothrow cancel; 21131 } 21132 21133 21134 21135 /// 21136 /// Create a new URL request that is not associated with a specific browser or 21137 /// frame. Use cef_frame_t::CreateURLRequest instead if you want the request to 21138 /// have this association, in which case it may be handled differently (see 21139 /// documentation on that function). A request created with this function may 21140 /// only originate from the browser process, and will behave as follows: 21141 /// - It may be intercepted by the client via CefResourceRequestHandler or 21142 /// CefSchemeHandlerFactory. 21143 /// - POST data may only contain only a single element of type PDE_TYPE_FILE 21144 /// or PDE_TYPE_BYTES. 21145 /// - If |request_context| is empty the global request context will be used. 21146 /// 21147 /// The |request| object will be marked as read-only after calling this 21148 /// function. 21149 /// 21150 cef_urlrequest_t* cef_urlrequest_create ( 21151 cef_request_t* request, 21152 cef_urlrequest_client_t* client, 21153 cef_request_context_t* request_context); 21154 21155 /// 21156 /// Structure that should be implemented by the cef_urlrequest_t client. The 21157 /// functions of this structure will be called on the same thread that created 21158 /// the request unless otherwise documented. 21159 /// 21160 /// NOTE: This struct is allocated client-side. 21161 /// 21162 struct cef_urlrequest_client_t 21163 { 21164 /// 21165 /// Base structure. 21166 /// 21167 cef_base_ref_counted_t base; 21168 21169 /// 21170 /// Notifies the client that the request has completed. Use the 21171 /// cef_urlrequest_t::GetRequestStatus function to determine if the request 21172 /// was successful or not. 21173 /// 21174 extern(System) void function ( 21175 cef_urlrequest_client_t* self, 21176 cef_urlrequest_t* request) nothrow on_request_complete; 21177 21178 /// 21179 /// Notifies the client of upload progress. |current| denotes the number of 21180 /// bytes sent so far and |total| is the total size of uploading data (or -1 21181 /// if chunked upload is enabled). This function will only be called if the 21182 /// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. 21183 /// 21184 extern(System) void function ( 21185 cef_urlrequest_client_t* self, 21186 cef_urlrequest_t* request, 21187 long current, 21188 long total) nothrow on_upload_progress; 21189 21190 /// 21191 /// Notifies the client of download progress. |current| denotes the number of 21192 /// bytes received up to the call and |total| is the expected total size of 21193 /// the response (or -1 if not determined). 21194 /// 21195 extern(System) void function ( 21196 cef_urlrequest_client_t* self, 21197 cef_urlrequest_t* request, 21198 long current, 21199 long total) nothrow on_download_progress; 21200 21201 /// 21202 /// Called when some part of the response is read. |data| contains the current 21203 /// bytes received since the last call. This function will not be called if 21204 /// the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. 21205 /// 21206 extern(System) void function ( 21207 cef_urlrequest_client_t* self, 21208 cef_urlrequest_t* request, 21209 const(void)* data, 21210 size_t data_length) nothrow on_download_data; 21211 21212 /// 21213 /// Called on the IO thread when the browser needs credentials from the user. 21214 /// |isProxy| indicates whether the host is a proxy server. |host| contains 21215 /// the hostname and |port| contains the port number. Return true (1) to 21216 /// continue the request and call cef_auth_callback_t::cont() when the 21217 /// authentication information is available. If the request has an associated 21218 /// browser/frame then returning false (0) will result in a call to 21219 /// GetAuthCredentials on the cef_request_handler_t associated with that 21220 /// browser, if any. Otherwise, returning false (0) will cancel the request 21221 /// immediately. This function will only be called for requests initiated from 21222 /// the browser process. 21223 /// 21224 extern(System) int function ( 21225 cef_urlrequest_client_t* self, 21226 int isProxy, 21227 const(cef_string_t)* host, 21228 int port, 21229 const(cef_string_t)* realm, 21230 const(cef_string_t)* scheme, 21231 cef_auth_callback_t* callback) nothrow get_auth_credentials; 21232 } 21233 21234 21235 21236 // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ 21237 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 21238 // 21239 // Redistribution and use in source and binary forms, with or without 21240 // modification, are permitted provided that the following conditions are 21241 // met: 21242 // 21243 // * Redistributions of source code must retain the above copyright 21244 // notice, this list of conditions and the following disclaimer. 21245 // * Redistributions in binary form must reproduce the above 21246 // copyright notice, this list of conditions and the following disclaimer 21247 // in the documentation and/or other materials provided with the 21248 // distribution. 21249 // * Neither the name of Google Inc. nor the name Chromium Embedded 21250 // Framework nor the names of its contributors may be used to endorse 21251 // or promote products derived from this software without specific prior 21252 // written permission. 21253 // 21254 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21255 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21256 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21257 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21258 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21259 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21260 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21261 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21262 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21263 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 21264 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21265 // 21266 // --------------------------------------------------------------------------- 21267 // 21268 // This file was generated by the CEF translator tool and should not edited 21269 // by hand. See the translator.README.txt file in the tools directory for 21270 // more information. 21271 // 21272 // $hash=0a0b3e73342e72ae6aa846b67318516be5933bd9$ 21273 // 21274 21275 extern (C): 21276 21277 /// 21278 /// Structure representing a V8 context handle. V8 handles can only be accessed 21279 /// from the thread on which they are created. Valid threads for creating a V8 21280 /// handle include the render process main thread (TID_RENDERER) and WebWorker 21281 /// threads. A task runner for posting tasks on the associated thread can be 21282 /// retrieved via the cef_v8_context_t::get_task_runner() function. 21283 /// 21284 /// NOTE: This struct is allocated DLL-side. 21285 /// 21286 struct cef_v8_context_t 21287 { 21288 /// 21289 /// Base structure. 21290 /// 21291 21292 /// 21293 /// Returns the task runner associated with this context. V8 handles can only 21294 21295 cef_base_ref_counted_t base; 21296 /// be accessed from the thread on which they are created. This function can 21297 /// be called on any render process thread. 21298 /// 21299 extern(System) cef_task_runner_t* function (cef_v8_context_t* self) nothrow get_task_runner; 21300 21301 /// 21302 /// Returns true (1) if the underlying handle is valid and it can be accessed 21303 /// on the current thread. Do not call any other functions if this function 21304 /// returns false (0). 21305 /// 21306 extern(System) int function (cef_v8_context_t* self) nothrow is_valid; 21307 21308 /// 21309 /// Returns the browser for this context. This function will return an NULL 21310 /// reference for WebWorker contexts. 21311 /// 21312 extern(System) cef_browser_t* function (cef_v8_context_t* self) nothrow get_browser; 21313 21314 /// 21315 /// Returns the frame for this context. This function will return an NULL 21316 /// reference for WebWorker contexts. 21317 /// 21318 extern(System) cef_frame_t* function (cef_v8_context_t* self) nothrow get_frame; 21319 21320 /// 21321 /// Returns the global object for this context. The context must be entered 21322 /// before calling this function. 21323 /// 21324 extern(System) cef_v8_value_t* function (cef_v8_context_t* self) nothrow get_global; 21325 21326 /// 21327 /// Enter this context. A context must be explicitly entered before creating a 21328 /// V8 Object, Array, Function or Date asynchronously. exit() must be called 21329 /// the same number of times as enter() before releasing this context. V8 21330 /// objects belong to the context in which they are created. Returns true (1) 21331 /// if the scope was entered successfully. 21332 /// 21333 extern(System) int function (cef_v8_context_t* self) nothrow enter; 21334 21335 /// 21336 /// Exit this context. Call this function only after calling enter(). Returns 21337 /// true (1) if the scope was exited successfully. 21338 /// 21339 extern(System) int function (cef_v8_context_t* self) nothrow exit; 21340 21341 /// 21342 /// Returns true (1) if this object is pointing to the same handle as |that| 21343 /// object. 21344 /// 21345 extern(System) int function (cef_v8_context_t* self, cef_v8_context_t* that) nothrow is_same; 21346 21347 /// 21348 /// Execute a string of JavaScript code in this V8 context. The |script_url| 21349 /// parameter is the URL where the script in question can be found, if any. 21350 /// The |start_line| parameter is the base line number to use for error 21351 /// reporting. On success |retval| will be set to the return value, if any, 21352 /// and the function will return true (1). On failure |exception| will be set 21353 /// to the exception, if any, and the function will return false (0). 21354 /// 21355 extern(System) int function ( 21356 cef_v8_context_t* self, 21357 const(cef_string_t)* code, 21358 const(cef_string_t)* script_url, 21359 int start_line, 21360 cef_v8_value_t** retval, 21361 cef_v8_exception_t** exception) nothrow eval; 21362 } 21363 21364 21365 21366 /// 21367 /// Returns the current (top) context object in the V8 context stack. 21368 /// 21369 cef_v8_context_t* cef_v8_context_get_current_context (); 21370 21371 /// 21372 /// Returns the entered (bottom) context object in the V8 context stack. 21373 /// 21374 cef_v8_context_t* cef_v8_context_get_entered_context (); 21375 21376 /// 21377 /// Returns true (1) if V8 is currently inside a context. 21378 /// 21379 int cef_v8_context_in_context (); 21380 21381 /// 21382 /// Structure that should be implemented to handle V8 function calls. The 21383 /// functions of this structure will be called on the thread associated with the 21384 /// V8 function. 21385 /// 21386 /// NOTE: This struct is allocated client-side. 21387 /// 21388 struct cef_v8_handler_t 21389 { 21390 /// 21391 /// Base structure. 21392 /// 21393 cef_base_ref_counted_t base; 21394 21395 /// 21396 /// Handle execution of the function identified by |name|. |object| is the 21397 /// receiver ('this' object) of the function. |arguments| is the list of 21398 /// arguments passed to the function. If execution succeeds set |retval| to 21399 /// the function return value. If execution fails set |exception| to the 21400 /// exception that will be thrown. Return true (1) if execution was handled. 21401 /// 21402 extern(System) int function ( 21403 cef_v8_handler_t* self, 21404 const(cef_string_t)* name, 21405 cef_v8_value_t* object, 21406 size_t argumentsCount, 21407 cef_v8_value_t** arguments, 21408 cef_v8_value_t** retval, 21409 cef_string_t* exception) nothrow execute; 21410 } 21411 21412 21413 21414 /// 21415 /// Structure that should be implemented to handle V8 accessor calls. Accessor 21416 /// identifiers are registered by calling cef_v8_value_t::set_value(). The 21417 /// functions of this structure will be called on the thread associated with the 21418 /// V8 accessor. 21419 /// 21420 /// NOTE: This struct is allocated client-side. 21421 /// 21422 struct cef_v8_accessor_t 21423 { 21424 /// 21425 /// Base structure. 21426 /// 21427 cef_base_ref_counted_t base; 21428 21429 /// 21430 /// Handle retrieval the accessor value identified by |name|. |object| is the 21431 /// receiver ('this' object) of the accessor. If retrieval succeeds set 21432 /// |retval| to the return value. If retrieval fails set |exception| to the 21433 /// exception that will be thrown. Return true (1) if accessor retrieval was 21434 /// handled. 21435 /// 21436 extern(System) int function ( 21437 cef_v8_accessor_t* self, 21438 const(cef_string_t)* name, 21439 cef_v8_value_t* object, 21440 cef_v8_value_t** retval, 21441 cef_string_t* exception) nothrow get; 21442 21443 /// 21444 /// Handle assignment of the accessor value identified by |name|. |object| is 21445 /// the receiver ('this' object) of the accessor. |value| is the new value 21446 /// being assigned to the accessor. If assignment fails set |exception| to the 21447 /// exception that will be thrown. Return true (1) if accessor assignment was 21448 /// handled. 21449 /// 21450 extern(System) int function ( 21451 cef_v8_accessor_t* self, 21452 const(cef_string_t)* name, 21453 cef_v8_value_t* object, 21454 cef_v8_value_t* value, 21455 cef_string_t* exception) nothrow set; 21456 } 21457 21458 21459 21460 /// 21461 /// Structure that should be implemented to handle V8 interceptor calls. The 21462 /// functions of this structure will be called on the thread associated with the 21463 /// V8 interceptor. Interceptor's named property handlers (with first argument 21464 /// of type CefString) are called when object is indexed by string. Indexed 21465 /// property handlers (with first argument of type int) are called when object 21466 /// is indexed by integer. 21467 /// 21468 /// NOTE: This struct is allocated client-side. 21469 /// 21470 struct cef_v8_interceptor_t 21471 { 21472 /// 21473 /// Base structure. 21474 /// 21475 cef_base_ref_counted_t base; 21476 21477 /// 21478 /// Handle retrieval of the interceptor value identified by |name|. |object| 21479 /// is the receiver ('this' object) of the interceptor. If retrieval succeeds, 21480 /// set |retval| to the return value. If the requested value does not exist, 21481 /// don't set either |retval| or |exception|. If retrieval fails, set 21482 /// |exception| to the exception that will be thrown. If the property has an 21483 /// associated accessor, it will be called only if you don't set |retval|. 21484 /// Return true (1) if interceptor retrieval was handled, false (0) otherwise. 21485 /// 21486 extern(System) int function ( 21487 cef_v8_interceptor_t* self, 21488 const(cef_string_t)* name, 21489 cef_v8_value_t* object, 21490 cef_v8_value_t** retval, 21491 cef_string_t* exception) nothrow get_byname; 21492 21493 /// 21494 /// Handle retrieval of the interceptor value identified by |index|. |object| 21495 /// is the receiver ('this' object) of the interceptor. If retrieval succeeds, 21496 /// set |retval| to the return value. If the requested value does not exist, 21497 /// don't set either |retval| or |exception|. If retrieval fails, set 21498 /// |exception| to the exception that will be thrown. Return true (1) if 21499 /// interceptor retrieval was handled, false (0) otherwise. 21500 /// 21501 extern(System) int function ( 21502 cef_v8_interceptor_t* self, 21503 int index, 21504 cef_v8_value_t* object, 21505 cef_v8_value_t** retval, 21506 cef_string_t* exception) nothrow get_byindex; 21507 21508 /// 21509 /// Handle assignment of the interceptor value identified by |name|. |object| 21510 /// is the receiver ('this' object) of the interceptor. |value| is the new 21511 /// value being assigned to the interceptor. If assignment fails, set 21512 /// |exception| to the exception that will be thrown. This setter will always 21513 /// be called, even when the property has an associated accessor. Return true 21514 /// (1) if interceptor assignment was handled, false (0) otherwise. 21515 /// 21516 extern(System) int function ( 21517 cef_v8_interceptor_t* self, 21518 const(cef_string_t)* name, 21519 cef_v8_value_t* object, 21520 cef_v8_value_t* value, 21521 cef_string_t* exception) nothrow set_byname; 21522 21523 /// 21524 /// Handle assignment of the interceptor value identified by |index|. |object| 21525 /// is the receiver ('this' object) of the interceptor. |value| is the new 21526 /// value being assigned to the interceptor. If assignment fails, set 21527 /// |exception| to the exception that will be thrown. Return true (1) if 21528 /// interceptor assignment was handled, false (0) otherwise. 21529 /// 21530 extern(System) int function ( 21531 cef_v8_interceptor_t* self, 21532 int index, 21533 cef_v8_value_t* object, 21534 cef_v8_value_t* value, 21535 cef_string_t* exception) nothrow set_byindex; 21536 } 21537 21538 21539 21540 /// 21541 /// Structure representing a V8 exception. The functions of this structure may 21542 /// be called on any render process thread. 21543 /// 21544 /// NOTE: This struct is allocated DLL-side. 21545 /// 21546 struct cef_v8_exception_t 21547 { 21548 /// 21549 /// Base structure. 21550 /// 21551 cef_base_ref_counted_t base; 21552 21553 /// 21554 /// Returns the exception message. 21555 /// 21556 // The resulting string must be freed by calling cef_string_userfree_free(). 21557 extern(System) cef_string_userfree_t function (cef_v8_exception_t* self) nothrow get_message; 21558 21559 /// 21560 /// Returns the line of source code that the exception occurred within. 21561 /// 21562 // The resulting string must be freed by calling cef_string_userfree_free(). 21563 extern(System) cef_string_userfree_t function (cef_v8_exception_t* self) nothrow get_source_line; 21564 21565 /// 21566 /// Returns the resource name for the script from where the function causing 21567 /// the error originates. 21568 /// 21569 // The resulting string must be freed by calling cef_string_userfree_free(). 21570 extern(System) cef_string_userfree_t function ( 21571 cef_v8_exception_t* self) nothrow get_script_resource_name; 21572 21573 /// 21574 /// Returns the 1-based number of the line where the error occurred or 0 if 21575 /// the line number is unknown. 21576 /// 21577 extern(System) int function (cef_v8_exception_t* self) nothrow get_line_number; 21578 21579 /// 21580 /// Returns the index within the script of the first character where the error 21581 /// occurred. 21582 /// 21583 extern(System) int function (cef_v8_exception_t* self) nothrow get_start_position; 21584 21585 /// 21586 /// Returns the index within the script of the last character where the error 21587 /// occurred. 21588 /// 21589 extern(System) int function (cef_v8_exception_t* self) nothrow get_end_position; 21590 21591 /// 21592 /// Returns the index within the line of the first character where the error 21593 /// occurred. 21594 /// 21595 extern(System) int function (cef_v8_exception_t* self) nothrow get_start_column; 21596 21597 /// 21598 /// Returns the index within the line of the last character where the error 21599 /// occurred. 21600 /// 21601 extern(System) int function (cef_v8_exception_t* self) nothrow get_end_column; 21602 } 21603 21604 21605 21606 /// 21607 /// Callback structure that is passed to cef_v8_value_t::CreateArrayBuffer. 21608 /// 21609 /// NOTE: This struct is allocated client-side. 21610 /// 21611 struct cef_v8_array_buffer_release_callback_t 21612 { 21613 /// 21614 /// Base structure. 21615 /// 21616 cef_base_ref_counted_t base; 21617 21618 /// 21619 /// Called to release |buffer| when the ArrayBuffer JS object is garbage 21620 /// collected. |buffer| is the value that was passed to CreateArrayBuffer 21621 /// along with this object. 21622 /// 21623 extern(System) void function ( 21624 cef_v8_array_buffer_release_callback_t* self, 21625 void* buffer) nothrow release_buffer; 21626 } 21627 21628 21629 21630 /// 21631 /// Structure representing a V8 value handle. V8 handles can only be accessed 21632 /// from the thread on which they are created. Valid threads for creating a V8 21633 /// handle include the render process main thread (TID_RENDERER) and WebWorker 21634 /// threads. A task runner for posting tasks on the associated thread can be 21635 /// retrieved via the cef_v8_context_t::get_task_runner() function. 21636 /// 21637 /// NOTE: This struct is allocated DLL-side. 21638 /// 21639 struct cef_v8_value_t 21640 { 21641 /// 21642 /// Base structure. 21643 /// 21644 cef_base_ref_counted_t base; 21645 21646 /// 21647 /// Returns true (1) if the underlying handle is valid and it can be accessed 21648 /// on the current thread. Do not call any other functions if this function 21649 /// returns false (0). 21650 /// 21651 extern(System) int function (cef_v8_value_t* self) nothrow is_valid; 21652 21653 /// 21654 /// True if the value type is undefined. 21655 /// 21656 extern(System) int function (cef_v8_value_t* self) nothrow is_undefined; 21657 21658 /// 21659 /// True if the value type is null. 21660 /// 21661 extern(System) int function (cef_v8_value_t* self) nothrow is_null; 21662 21663 /// 21664 /// True if the value type is bool. 21665 /// 21666 extern(System) int function (cef_v8_value_t* self) nothrow is_bool; 21667 21668 /// 21669 /// True if the value type is int. 21670 /// 21671 extern(System) int function (cef_v8_value_t* self) nothrow is_int; 21672 21673 /// 21674 /// True if the value type is unsigned int. 21675 /// 21676 extern(System) int function (cef_v8_value_t* self) nothrow is_uint; 21677 21678 /// 21679 /// True if the value type is double. 21680 /// 21681 extern(System) int function (cef_v8_value_t* self) nothrow is_double; 21682 21683 /// 21684 /// True if the value type is Date. 21685 /// 21686 extern(System) int function (cef_v8_value_t* self) nothrow is_date; 21687 21688 /// 21689 /// True if the value type is string. 21690 /// 21691 extern(System) int function (cef_v8_value_t* self) nothrow is_string; 21692 21693 /// 21694 /// True if the value type is object. 21695 /// 21696 extern(System) int function (cef_v8_value_t* self) nothrow is_object; 21697 21698 /// 21699 /// True if the value type is array. 21700 /// 21701 extern(System) int function (cef_v8_value_t* self) nothrow is_array; 21702 21703 /// 21704 /// True if the value type is an ArrayBuffer. 21705 /// 21706 extern(System) int function (cef_v8_value_t* self) nothrow is_array_buffer; 21707 21708 /// 21709 /// True if the value type is function. 21710 /// 21711 extern(System) int function (cef_v8_value_t* self) nothrow is_function; 21712 21713 /// 21714 /// True if the value type is a Promise. 21715 /// 21716 extern(System) int function (cef_v8_value_t* self) nothrow is_promise; 21717 21718 /// 21719 /// Returns true (1) if this object is pointing to the same handle as |that| 21720 /// object. 21721 /// 21722 extern(System) int function (cef_v8_value_t* self, cef_v8_value_t* that) nothrow is_same; 21723 21724 /// 21725 /// Return a bool value. 21726 /// 21727 extern(System) int function (cef_v8_value_t* self) nothrow get_bool_value; 21728 21729 /// 21730 /// Return an int value. 21731 /// 21732 extern(System) int function (cef_v8_value_t* self) nothrow get_int_value; 21733 21734 /// 21735 /// Return an unsigned int value. 21736 /// 21737 extern(System) uint function (cef_v8_value_t* self) nothrow get_uint_value; 21738 21739 /// 21740 /// Return a double value. 21741 /// 21742 extern(System) double function (cef_v8_value_t* self) nothrow get_double_value; 21743 21744 /// 21745 /// Return a Date value. 21746 /// 21747 extern(System) cef_basetime_t function (cef_v8_value_t* self) nothrow get_date_value; 21748 21749 /// 21750 /// Return a string value. 21751 /// 21752 // The resulting string must be freed by calling cef_string_userfree_free(). 21753 extern(System) cef_string_userfree_t function (cef_v8_value_t* self) nothrow get_string_value; 21754 21755 /// 21756 /// Returns true (1) if this is a user created object. 21757 /// 21758 extern(System) int function (cef_v8_value_t* self) nothrow is_user_created; 21759 21760 /// 21761 /// Returns true (1) if the last function call resulted in an exception. This 21762 /// attribute exists only in the scope of the current CEF value object. 21763 /// 21764 extern(System) int function (cef_v8_value_t* self) nothrow has_exception; 21765 21766 /// 21767 /// Returns the exception resulting from the last function call. This 21768 /// attribute exists only in the scope of the current CEF value object. 21769 /// 21770 extern(System) cef_v8_exception_t* function (cef_v8_value_t* self) nothrow get_exception; 21771 21772 /// 21773 /// Clears the last exception and returns true (1) on success. 21774 /// 21775 extern(System) int function (cef_v8_value_t* self) nothrow clear_exception; 21776 21777 /// 21778 /// Returns true (1) if this object will re-throw future exceptions. This 21779 /// attribute exists only in the scope of the current CEF value object. 21780 /// 21781 extern(System) int function (cef_v8_value_t* self) nothrow will_rethrow_exceptions; 21782 21783 /// 21784 /// Set whether this object will re-throw future exceptions. By default 21785 /// exceptions are not re-thrown. If a exception is re-thrown the current 21786 /// context should not be accessed again until after the exception has been 21787 /// caught and not re-thrown. Returns true (1) on success. This attribute 21788 /// exists only in the scope of the current CEF value object. 21789 /// 21790 extern(System) int function (cef_v8_value_t* self, int rethrow) nothrow set_rethrow_exceptions; 21791 21792 /// 21793 /// Returns true (1) if the object has a value with the specified identifier. 21794 /// 21795 extern(System) int function ( 21796 cef_v8_value_t* self, 21797 const(cef_string_t)* key) nothrow has_value_bykey; 21798 21799 /// 21800 /// Returns true (1) if the object has a value with the specified identifier. 21801 /// 21802 extern(System) int function (cef_v8_value_t* self, int index) nothrow has_value_byindex; 21803 21804 /// 21805 /// Deletes the value with the specified identifier and returns true (1) on 21806 /// success. Returns false (0) if this function is called incorrectly or an 21807 /// exception is thrown. For read-only and don't-delete values this function 21808 /// will return true (1) even though deletion failed. 21809 /// 21810 extern(System) int function ( 21811 cef_v8_value_t* self, 21812 const(cef_string_t)* key) nothrow delete_value_bykey; 21813 21814 /// 21815 /// Deletes the value with the specified identifier and returns true (1) on 21816 /// success. Returns false (0) if this function is called incorrectly, 21817 /// deletion fails or an exception is thrown. For read-only and don't-delete 21818 /// values this function will return true (1) even though deletion failed. 21819 /// 21820 extern(System) int function (cef_v8_value_t* self, int index) nothrow delete_value_byindex; 21821 21822 /// 21823 /// Returns the value with the specified identifier on success. Returns NULL 21824 /// if this function is called incorrectly or an exception is thrown. 21825 /// 21826 extern(System) cef_v8_value_t* function ( 21827 cef_v8_value_t* self, 21828 const(cef_string_t)* key) nothrow get_value_bykey; 21829 21830 /// 21831 /// Returns the value with the specified identifier on success. Returns NULL 21832 /// if this function is called incorrectly or an exception is thrown. 21833 /// 21834 extern(System) cef_v8_value_t* function ( 21835 cef_v8_value_t* self, 21836 int index) nothrow get_value_byindex; 21837 21838 /// 21839 /// Associates a value with the specified identifier and returns true (1) on 21840 /// success. Returns false (0) if this function is called incorrectly or an 21841 /// exception is thrown. For read-only values this function will return true 21842 /// (1) even though assignment failed. 21843 /// 21844 extern(System) int function ( 21845 cef_v8_value_t* self, 21846 const(cef_string_t)* key, 21847 cef_v8_value_t* value, 21848 cef_v8_propertyattribute_t attribute) nothrow set_value_bykey; 21849 21850 /// 21851 /// Associates a value with the specified identifier and returns true (1) on 21852 /// success. Returns false (0) if this function is called incorrectly or an 21853 /// exception is thrown. For read-only values this function will return true 21854 /// (1) even though assignment failed. 21855 /// 21856 extern(System) int function ( 21857 cef_v8_value_t* self, 21858 int index, 21859 cef_v8_value_t* value) nothrow set_value_byindex; 21860 21861 /// 21862 /// Registers an identifier and returns true (1) on success. Access to the 21863 /// identifier will be forwarded to the cef_v8_accessor_t instance passed to 21864 /// cef_v8_value_t::cef_v8_value_create_object(). Returns false (0) if this 21865 /// function is called incorrectly or an exception is thrown. For read-only 21866 /// values this function will return true (1) even though assignment failed. 21867 /// 21868 extern(System) int function ( 21869 cef_v8_value_t* self, 21870 const(cef_string_t)* key, 21871 cef_v8_propertyattribute_t attribute) nothrow set_value_byaccessor; 21872 21873 /// 21874 /// Read the keys for the object's values into the specified vector. Integer- 21875 /// based keys will also be returned as strings. 21876 /// 21877 extern(System) int function (cef_v8_value_t* self, cef_string_list_t keys) nothrow get_keys; 21878 21879 /// 21880 /// Sets the user data for this object and returns true (1) on success. 21881 /// Returns false (0) if this function is called incorrectly. This function 21882 /// can only be called on user created objects. 21883 /// 21884 extern(System) int function ( 21885 cef_v8_value_t* self, 21886 cef_base_ref_counted_t* user_data) nothrow set_user_data; 21887 21888 /// 21889 /// Returns the user data, if any, assigned to this object. 21890 /// 21891 extern(System) cef_base_ref_counted_t* function (cef_v8_value_t* self) nothrow get_user_data; 21892 21893 /// 21894 /// Returns the amount of externally allocated memory registered for the 21895 /// object. 21896 /// 21897 extern(System) int function (cef_v8_value_t* self) nothrow get_externally_allocated_memory; 21898 21899 /// 21900 /// Adjusts the amount of registered external memory for the object. Used to 21901 /// give V8 an indication of the amount of externally allocated memory that is 21902 /// kept alive by JavaScript objects. V8 uses this information to decide when 21903 /// to perform global garbage collection. Each cef_v8_value_t tracks the 21904 /// amount of external memory associated with it and automatically decreases 21905 /// the global total by the appropriate amount on its destruction. 21906 /// |change_in_bytes| specifies the number of bytes to adjust by. This 21907 /// function returns the number of bytes associated with the object after the 21908 /// adjustment. This function can only be called on user created objects. 21909 /// 21910 extern(System) int function ( 21911 cef_v8_value_t* self, 21912 int change_in_bytes) nothrow adjust_externally_allocated_memory; 21913 21914 /// 21915 /// Returns the number of elements in the array. 21916 /// 21917 extern(System) int function (cef_v8_value_t* self) nothrow get_array_length; 21918 21919 /// 21920 /// Returns the ReleaseCallback object associated with the ArrayBuffer or NULL 21921 /// if the ArrayBuffer was not created with CreateArrayBuffer. 21922 /// 21923 extern(System) cef_v8_array_buffer_release_callback_t* function ( 21924 cef_v8_value_t* self) nothrow get_array_buffer_release_callback; 21925 21926 /// 21927 /// Prevent the ArrayBuffer from using it's memory block by setting the length 21928 /// to zero. This operation cannot be undone. If the ArrayBuffer was created 21929 /// with CreateArrayBuffer then 21930 /// cef_v8_array_buffer_release_callback_t::ReleaseBuffer will be called to 21931 /// release the underlying buffer. 21932 /// 21933 extern(System) int function (cef_v8_value_t* self) nothrow neuter_array_buffer; 21934 21935 /// 21936 /// Returns the length (in bytes) of the ArrayBuffer. 21937 /// 21938 extern(System) size_t function (cef_v8_value_t* self) nothrow get_array_buffer_byte_length; 21939 21940 /// 21941 /// Returns a pointer to the beginning of the memory block for this 21942 /// ArrayBuffer backing store. The returned pointer is valid as long as the 21943 /// cef_v8_value_t is alive. 21944 /// 21945 extern(System) void* function (cef_v8_value_t* self) nothrow get_array_buffer_data; 21946 21947 /// 21948 /// Returns the function name. 21949 /// 21950 // The resulting string must be freed by calling cef_string_userfree_free(). 21951 extern(System) cef_string_userfree_t function (cef_v8_value_t* self) nothrow get_function_name; 21952 21953 /// 21954 /// Returns the function handler or NULL if not a CEF-created function. 21955 /// 21956 extern(System) cef_v8_handler_t* function (cef_v8_value_t* self) nothrow get_function_handler; 21957 21958 /// 21959 /// Execute the function using the current V8 context. This function should 21960 /// only be called from within the scope of a cef_v8_handler_t or 21961 /// cef_v8_accessor_t callback, or in combination with calling enter() and 21962 /// exit() on a stored cef_v8_context_t reference. |object| is the receiver 21963 /// ('this' object) of the function. If |object| is NULL the current context's 21964 /// global object will be used. |arguments| is the list of arguments that will 21965 /// be passed to the function. Returns the function return value on success. 21966 /// Returns NULL if this function is called incorrectly or an exception is 21967 /// thrown. 21968 /// 21969 extern(System) cef_v8_value_t* function ( 21970 cef_v8_value_t* self, 21971 cef_v8_value_t* object, 21972 size_t argumentsCount, 21973 cef_v8_value_t** arguments) nothrow execute_function; 21974 21975 /// 21976 /// Execute the function using the specified V8 context. |object| is the 21977 /// receiver ('this' object) of the function. If |object| is NULL the 21978 /// specified context's global object will be used. |arguments| is the list of 21979 /// arguments that will be passed to the function. Returns the function return 21980 /// value on success. Returns NULL if this function is called incorrectly or 21981 /// an exception is thrown. 21982 /// 21983 extern(System) cef_v8_value_t* function ( 21984 cef_v8_value_t* self, 21985 cef_v8_context_t* context, 21986 cef_v8_value_t* object, 21987 size_t argumentsCount, 21988 cef_v8_value_t** arguments) nothrow execute_function_with_context; 21989 21990 /// 21991 /// Resolve the Promise using the current V8 context. This function should 21992 /// only be called from within the scope of a cef_v8_handler_t or 21993 /// cef_v8_accessor_t callback, or in combination with calling enter() and 21994 /// exit() on a stored cef_v8_context_t reference. |arg| is the argument 21995 /// passed to the resolved promise. Returns true (1) on success. Returns false 21996 /// (0) if this function is called incorrectly or an exception is thrown. 21997 /// 21998 extern(System) int function (cef_v8_value_t* self, cef_v8_value_t* arg) nothrow resolve_promise; 21999 22000 /// 22001 /// Reject the Promise using the current V8 context. This function should only 22002 /// be called from within the scope of a cef_v8_handler_t or cef_v8_accessor_t 22003 /// callback, or in combination with calling enter() and exit() on a stored 22004 /// cef_v8_context_t reference. Returns true (1) on success. Returns false (0) 22005 /// if this function is called incorrectly or an exception is thrown. 22006 /// 22007 extern(System) int function ( 22008 cef_v8_value_t* self, 22009 const(cef_string_t)* errorMsg) nothrow reject_promise; 22010 } 22011 22012 22013 22014 /// 22015 /// Create a new cef_v8_value_t object of type undefined. 22016 /// 22017 cef_v8_value_t* cef_v8_value_create_undefined (); 22018 22019 /// 22020 /// Create a new cef_v8_value_t object of type null. 22021 /// 22022 cef_v8_value_t* cef_v8_value_create_null (); 22023 22024 /// 22025 /// Create a new cef_v8_value_t object of type bool. 22026 /// 22027 cef_v8_value_t* cef_v8_value_create_bool (int value); 22028 22029 /// 22030 /// Create a new cef_v8_value_t object of type int. 22031 /// 22032 cef_v8_value_t* cef_v8_value_create_int (int value); 22033 22034 /// 22035 /// Create a new cef_v8_value_t object of type unsigned int. 22036 /// 22037 cef_v8_value_t* cef_v8_value_create_uint (uint value); 22038 22039 /// 22040 /// Create a new cef_v8_value_t object of type double. 22041 /// 22042 cef_v8_value_t* cef_v8_value_create_double (double value); 22043 22044 /// 22045 /// Create a new cef_v8_value_t object of type Date. This function should only 22046 /// be called from within the scope of a cef_render_process_handler_t, 22047 /// cef_v8_handler_t or cef_v8_accessor_t callback, or in combination with 22048 /// calling enter() and exit() on a stored cef_v8_context_t reference. 22049 /// 22050 cef_v8_value_t* cef_v8_value_create_date (cef_basetime_t date); 22051 22052 /// 22053 /// Create a new cef_v8_value_t object of type string. 22054 /// 22055 cef_v8_value_t* cef_v8_value_create_string (const(cef_string_t)* value); 22056 22057 /// 22058 /// Create a new cef_v8_value_t object of type object with optional accessor 22059 /// and/or interceptor. This function should only be called from within the 22060 /// scope of a cef_render_process_handler_t, cef_v8_handler_t or 22061 /// cef_v8_accessor_t callback, or in combination with calling enter() and 22062 /// exit() on a stored cef_v8_context_t reference. 22063 /// 22064 cef_v8_value_t* cef_v8_value_create_object ( 22065 cef_v8_accessor_t* accessor, 22066 cef_v8_interceptor_t* interceptor); 22067 22068 /// 22069 /// Create a new cef_v8_value_t object of type array with the specified 22070 /// |length|. If |length| is negative the returned array will have length 0. 22071 /// This function should only be called from within the scope of a 22072 /// cef_render_process_handler_t, cef_v8_handler_t or cef_v8_accessor_t 22073 /// callback, or in combination with calling enter() and exit() on a stored 22074 /// cef_v8_context_t reference. 22075 /// 22076 cef_v8_value_t* cef_v8_value_create_array (int length); 22077 22078 /// 22079 /// Create a new cef_v8_value_t object of type ArrayBuffer which wraps the 22080 /// provided |buffer| of size |length| bytes. The ArrayBuffer is externalized, 22081 /// meaning that it does not own |buffer|. The caller is responsible for freeing 22082 /// |buffer| when requested via a call to 22083 /// cef_v8_array_buffer_release_callback_t::ReleaseBuffer. This function should 22084 /// only be called from within the scope of a cef_render_process_handler_t, 22085 /// cef_v8_handler_t or cef_v8_accessor_t callback, or in combination with 22086 /// calling enter() and exit() on a stored cef_v8_context_t reference. 22087 /// 22088 /// NOTE: Always returns nullptr when V8 sandbox is enabled. 22089 /// 22090 cef_v8_value_t* cef_v8_value_create_array_buffer ( 22091 void* buffer, 22092 size_t length, 22093 cef_v8_array_buffer_release_callback_t* release_callback); 22094 22095 /// 22096 /// Create a new cef_v8_value_t object of type ArrayBuffer which copies the 22097 /// provided |buffer| of size |length| bytes. This function should only be 22098 /// called from within the scope of a cef_render_process_handler_t, 22099 /// cef_v8_handler_t or cef_v8_accessor_t callback, or in combination with 22100 /// calling enter() and exit() on a stored cef_v8_context_t reference. 22101 /// 22102 cef_v8_value_t* cef_v8_value_create_array_buffer_with_copy ( 22103 void* buffer, 22104 size_t length); 22105 22106 /// 22107 /// Create a new cef_v8_value_t object of type function. This function should 22108 /// only be called from within the scope of a cef_render_process_handler_t, 22109 /// cef_v8_handler_t or cef_v8_accessor_t callback, or in combination with 22110 /// calling enter() and exit() on a stored cef_v8_context_t reference. 22111 /// 22112 extern(System) cef_v8_value_t* cef_v8_value_create_function ( 22113 const(cef_string_t)* name, 22114 cef_v8_handler_t* handler) nothrow; 22115 22116 /// 22117 /// Create a new cef_v8_value_t object of type Promise. This function should 22118 /// only be called from within the scope of a cef_render_process_handler_t, 22119 /// cef_v8_handler_t or cef_v8_accessor_t callback, or in combination with 22120 /// calling enter() and exit() on a stored cef_v8_context_t reference. 22121 /// 22122 cef_v8_value_t* cef_v8_value_create_promise (); 22123 22124 /// 22125 /// Structure representing a V8 stack trace handle. V8 handles can only be 22126 /// accessed from the thread on which they are created. Valid threads for 22127 /// creating a V8 handle include the render process main thread (TID_RENDERER) 22128 /// and WebWorker threads. A task runner for posting tasks on the associated 22129 /// thread can be retrieved via the cef_v8_context_t::get_task_runner() 22130 /// function. 22131 /// 22132 /// NOTE: This struct is allocated DLL-side. 22133 /// 22134 struct cef_v8_stack_trace_t 22135 { 22136 /// 22137 /// Base structure. 22138 /// 22139 cef_base_ref_counted_t base; 22140 22141 /// 22142 /// Returns true (1) if the underlying handle is valid and it can be accessed 22143 /// on the current thread. Do not call any other functions if this function 22144 /// returns false (0). 22145 /// 22146 extern(System) int function (cef_v8_stack_trace_t* self) nothrow is_valid; 22147 22148 /// 22149 /// Returns the number of stack frames. 22150 /// 22151 extern(System) int function (cef_v8_stack_trace_t* self) nothrow get_frame_count; 22152 22153 /// 22154 /// Returns the stack frame at the specified 0-based index. 22155 /// 22156 extern(System) cef_v8_stack_frame_t* function ( 22157 cef_v8_stack_trace_t* self, 22158 int index) nothrow get_frame; 22159 } 22160 22161 22162 22163 /// 22164 /// Returns the stack trace for the currently active context. |frame_limit| is 22165 /// the maximum number of frames that will be captured. 22166 /// 22167 cef_v8_stack_trace_t* cef_v8_stack_trace_get_current (int frame_limit); 22168 22169 /// 22170 /// Structure representing a V8 stack frame handle. V8 handles can only be 22171 /// accessed from the thread on which they are created. Valid threads for 22172 /// creating a V8 handle include the render process main thread (TID_RENDERER) 22173 /// and WebWorker threads. A task runner for posting tasks on the associated 22174 /// thread can be retrieved via the cef_v8_context_t::get_task_runner() 22175 /// function. 22176 /// 22177 /// NOTE: This struct is allocated DLL-side. 22178 /// 22179 struct cef_v8_stack_frame_t 22180 { 22181 /// 22182 /// Base structure. 22183 /// 22184 cef_base_ref_counted_t base; 22185 22186 /// 22187 /// Returns true (1) if the underlying handle is valid and it can be accessed 22188 /// on the current thread. Do not call any other functions if this function 22189 /// returns false (0). 22190 /// 22191 extern(System) int function (cef_v8_stack_frame_t* self) nothrow is_valid; 22192 22193 /// 22194 /// Returns the name of the resource script that contains the function. 22195 /// 22196 // The resulting string must be freed by calling cef_string_userfree_free(). 22197 extern(System) cef_string_userfree_t function ( 22198 cef_v8_stack_frame_t* self) nothrow get_script_name; 22199 22200 /// 22201 /// Returns the name of the resource script that contains the function or the 22202 /// sourceURL value if the script name is undefined and its source ends with a 22203 /// "//@ sourceURL=..." string. 22204 /// 22205 // The resulting string must be freed by calling cef_string_userfree_free(). 22206 extern(System) cef_string_userfree_t function ( 22207 cef_v8_stack_frame_t* self) nothrow get_script_name_or_source_url; 22208 22209 /// 22210 /// Returns the name of the function. 22211 /// 22212 // The resulting string must be freed by calling cef_string_userfree_free(). 22213 extern(System) cef_string_userfree_t function ( 22214 cef_v8_stack_frame_t* self) nothrow get_function_name; 22215 22216 /// 22217 /// Returns the 1-based line number for the function call or 0 if unknown. 22218 /// 22219 extern(System) int function (cef_v8_stack_frame_t* self) nothrow get_line_number; 22220 22221 /// 22222 /// Returns the 1-based column offset on the line for the function call or 0 22223 /// if unknown. 22224 /// 22225 extern(System) int function (cef_v8_stack_frame_t* self) nothrow get_column; 22226 22227 /// 22228 /// Returns true (1) if the function was compiled using eval(). 22229 /// 22230 extern(System) int function (cef_v8_stack_frame_t* self) nothrow is_eval; 22231 22232 /// 22233 /// Returns true (1) if the function was called as a constructor via "new". 22234 /// 22235 extern(System) int function (cef_v8_stack_frame_t* self) nothrow is_constructor; 22236 } 22237 22238 22239 22240 /// 22241 /// Register a new V8 extension with the specified JavaScript extension code and 22242 /// handler. Functions implemented by the handler are prototyped using the 22243 /// keyword 'native'. The calling of a native function is restricted to the 22244 /// scope in which the prototype of the native function is defined. This 22245 /// function may only be called on the render process main thread. 22246 /// 22247 /// Example JavaScript extension code: <pre> 22248 /// // create the 'example' global object if it doesn't already exist. 22249 /// if (!example) 22250 /// example = {}; 22251 /// // create the 'example.test' global object if it doesn't already exist. 22252 /// if (!example.test) 22253 /// example.test = {}; 22254 /// (function() { 22255 /// // Define the function 'example.test.myfunction'. 22256 /// example.test.myfunction = function() { 22257 /// // Call CefV8Handler::Execute() with the function name 'MyFunction' 22258 /// // and no arguments. 22259 /// native function MyFunction(); 22260 /// return MyFunction(); 22261 /// }; 22262 /// // Define the getter function for parameter 'example.test.myparam'. 22263 /// example.test.__defineGetter__('myparam', function() { 22264 /// // Call CefV8Handler::Execute() with the function name 'GetMyParam' 22265 /// // and no arguments. 22266 /// native function GetMyParam(); 22267 /// return GetMyParam(); 22268 /// }); 22269 /// // Define the setter function for parameter 'example.test.myparam'. 22270 /// example.test.__defineSetter__('myparam', function(b) { 22271 /// // Call CefV8Handler::Execute() with the function name 'SetMyParam' 22272 /// // and a single argument. 22273 /// native function SetMyParam(); 22274 /// if(b) SetMyParam(b); 22275 /// }); 22276 /// 22277 /// // Extension definitions can also contain normal JavaScript variables 22278 /// // and functions. 22279 /// var myint = 0; 22280 /// example.test.increment = function() { 22281 /// myint += 1; 22282 /// return myint; 22283 /// }; 22284 /// })(); 22285 /// </pre> 22286 /// 22287 /// Example usage in the page: <pre> 22288 /// // Call the function. 22289 /// example.test.myfunction(); 22290 /// // Set the parameter. 22291 /// example.test.myparam = value; 22292 /// // Get the parameter. 22293 /// value = example.test.myparam; 22294 /// // Call another function. 22295 /// example.test.increment(); 22296 /// </pre> 22297 /// 22298 int cef_register_extension ( 22299 const(cef_string_t)* extension_name, 22300 const(cef_string_t)* javascript_code, 22301 cef_v8_handler_t* handler); 22302 22303 // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ 22304 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 22305 // 22306 // Redistribution and use in source and binary forms, with or without 22307 // modification, are permitted provided that the following conditions are 22308 // met: 22309 // 22310 // * Redistributions of source code must retain the above copyright 22311 // notice, this list of conditions and the following disclaimer. 22312 // * Redistributions in binary form must reproduce the above 22313 // copyright notice, this list of conditions and the following disclaimer 22314 // in the documentation and/or other materials provided with the 22315 // distribution. 22316 // * Neither the name of Google Inc. nor the name Chromium Embedded 22317 // Framework nor the names of its contributors may be used to endorse 22318 // or promote products derived from this software without specific prior 22319 // written permission. 22320 // 22321 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22322 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22323 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22324 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22325 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22326 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22327 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22328 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22329 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22330 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22331 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22332 // 22333 // --------------------------------------------------------------------------- 22334 // 22335 // This file was generated by the CEF translator tool and should not edited 22336 // by hand. See the translator.README.txt file in the tools directory for 22337 // more information. 22338 // 22339 // $hash=aab41106167d5748ab4d15e255ffd0b68160fd7e$ 22340 // 22341 22342 extern (C): 22343 22344 /// 22345 /// Structure that wraps other data value types. Complex types (binary, 22346 /// dictionary and list) will be referenced but not owned by this object. Can be 22347 /// used on any process and thread. 22348 /// 22349 /// NOTE: This struct is allocated DLL-side. 22350 /// 22351 struct cef_value_t 22352 { 22353 /// 22354 /// Base structure. 22355 /// 22356 22357 /// 22358 /// Returns true (1) if the underlying data is valid. This will always be true 22359 /// (1) for simple types. For complex types (binary, dictionary and list) the 22360 /// underlying data may become invalid if owned by another object (e.g. list 22361 /// or dictionary) and that other object is then modified or destroyed. This 22362 /// value object can be re-used by calling Set*() even if the underlying data 22363 /// is invalid. 22364 22365 cef_base_ref_counted_t base; /// 22366 extern(System) int function (cef_value_t* self) nothrow is_valid; 22367 22368 /// 22369 /// Returns true (1) if the underlying data is owned by another object. 22370 /// 22371 extern(System) int function (cef_value_t* self) nothrow is_owned; 22372 22373 /// 22374 /// Returns true (1) if the underlying data is read-only. Some APIs may expose 22375 /// read-only objects. 22376 /// 22377 extern(System) int function (cef_value_t* self) nothrow is_read_only; 22378 22379 /// 22380 /// Returns true (1) if this object and |that| object have the same underlying 22381 /// data. If true (1) modifications to this object will also affect |that| 22382 /// object and vice-versa. 22383 /// 22384 extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_same; 22385 22386 /// 22387 /// Returns true (1) if this object and |that| object have an equivalent 22388 /// underlying value but are not necessarily the same object. 22389 /// 22390 extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_equal; 22391 22392 /// 22393 /// Returns a copy of this object. The underlying data will also be copied. 22394 /// 22395 extern(System) cef_value_t* function (cef_value_t* self) nothrow copy; 22396 22397 /// 22398 /// Returns the underlying value type. 22399 /// 22400 extern(System) cef_value_type_t function (cef_value_t* self) nothrow get_type; 22401 22402 /// 22403 /// Returns the underlying value as type bool. 22404 /// 22405 extern(System) int function (cef_value_t* self) nothrow get_bool; 22406 22407 /// 22408 /// Returns the underlying value as type int. 22409 /// 22410 extern(System) int function (cef_value_t* self) nothrow get_int; 22411 22412 /// 22413 /// Returns the underlying value as type double. 22414 /// 22415 extern(System) double function (cef_value_t* self) nothrow get_double; 22416 22417 /// 22418 /// Returns the underlying value as type string. 22419 /// 22420 // The resulting string must be freed by calling cef_string_userfree_free(). 22421 extern(System) cef_string_userfree_t function (cef_value_t* self) nothrow get_string; 22422 22423 /// 22424 /// Returns the underlying value as type binary. The returned reference may 22425 /// become invalid if the value is owned by another object or if ownership is 22426 /// transferred to another object in the future. To maintain a reference to 22427 /// the value after assigning ownership to a dictionary or list pass this 22428 /// object to the set_value() function instead of passing the returned 22429 /// reference to set_binary(). 22430 /// 22431 extern(System) cef_binary_value_t* function (cef_value_t* self) nothrow get_binary; 22432 22433 /// 22434 /// Returns the underlying value as type dictionary. The returned reference 22435 /// may become invalid if the value is owned by another object or if ownership 22436 /// is transferred to another object in the future. To maintain a reference to 22437 /// the value after assigning ownership to a dictionary or list pass this 22438 /// object to the set_value() function instead of passing the returned 22439 /// reference to set_dictionary(). 22440 /// 22441 extern(System) cef_dictionary_value_t* function (cef_value_t* self) nothrow get_dictionary; 22442 22443 /// 22444 /// Returns the underlying value as type list. The returned reference may 22445 /// become invalid if the value is owned by another object or if ownership is 22446 /// transferred to another object in the future. To maintain a reference to 22447 /// the value after assigning ownership to a dictionary or list pass this 22448 /// object to the set_value() function instead of passing the returned 22449 /// reference to set_list(). 22450 /// 22451 extern(System) cef_list_value_t* function (cef_value_t* self) nothrow get_list; 22452 22453 /// 22454 /// Sets the underlying value as type null. Returns true (1) if the value was 22455 /// set successfully. 22456 /// 22457 extern(System) int function (cef_value_t* self) nothrow set_null; 22458 22459 /// 22460 /// Sets the underlying value as type bool. Returns true (1) if the value was 22461 /// set successfully. 22462 /// 22463 extern(System) int function (cef_value_t* self, int value) nothrow set_bool; 22464 22465 /// 22466 /// Sets the underlying value as type int. Returns true (1) if the value was 22467 /// set successfully. 22468 /// 22469 extern(System) int function (cef_value_t* self, int value) nothrow set_int; 22470 22471 /// 22472 /// Sets the underlying value as type double. Returns true (1) if the value 22473 /// was set successfully. 22474 /// 22475 extern(System) int function (cef_value_t* self, double value) nothrow set_double; 22476 22477 /// 22478 /// Sets the underlying value as type string. Returns true (1) if the value 22479 /// was set successfully. 22480 /// 22481 extern(System) int function (cef_value_t* self, const(cef_string_t)* value) nothrow set_string; 22482 22483 /// 22484 /// Sets the underlying value as type binary. Returns true (1) if the value 22485 /// was set successfully. This object keeps a reference to |value| and 22486 /// ownership of the underlying data remains unchanged. 22487 /// 22488 extern(System) int function (cef_value_t* self, cef_binary_value_t* value) nothrow set_binary; 22489 22490 /// 22491 /// Sets the underlying value as type dict. Returns true (1) if the value was 22492 /// set successfully. This object keeps a reference to |value| and ownership 22493 /// of the underlying data remains unchanged. 22494 /// 22495 extern(System) int function ( 22496 cef_value_t* self, 22497 cef_dictionary_value_t* value) nothrow set_dictionary; 22498 22499 /// 22500 /// Sets the underlying value as type list. Returns true (1) if the value was 22501 /// set successfully. This object keeps a reference to |value| and ownership 22502 /// of the underlying data remains unchanged. 22503 /// 22504 extern(System) int function (cef_value_t* self, cef_list_value_t* value) nothrow set_list; 22505 } 22506 22507 22508 22509 /// 22510 /// Creates a new object. 22511 /// 22512 cef_value_t* cef_value_create (); 22513 22514 /// 22515 /// Structure representing a binary value. Can be used on any process and 22516 /// thread. 22517 /// 22518 /// NOTE: This struct is allocated DLL-side. 22519 /// 22520 struct cef_binary_value_t 22521 { 22522 /// 22523 /// Base structure. 22524 /// 22525 cef_base_ref_counted_t base; 22526 22527 /// 22528 /// Returns true (1) if this object is valid. This object may become invalid 22529 /// if the underlying data is owned by another object (e.g. list or 22530 /// dictionary) and that other object is then modified or destroyed. Do not 22531 /// call any other functions if this function returns false (0). 22532 /// 22533 extern(System) int function (cef_binary_value_t* self) nothrow is_valid; 22534 22535 /// 22536 /// Returns true (1) if this object is currently owned by another object. 22537 /// 22538 extern(System) int function (cef_binary_value_t* self) nothrow is_owned; 22539 22540 /// 22541 /// Returns true (1) if this object and |that| object have the same underlying 22542 /// data. 22543 /// 22544 extern(System) int function ( 22545 cef_binary_value_t* self, 22546 cef_binary_value_t* that) nothrow is_same; 22547 22548 /// 22549 /// Returns true (1) if this object and |that| object have an equivalent 22550 /// underlying value but are not necessarily the same object. 22551 /// 22552 extern(System) int function ( 22553 cef_binary_value_t* self, 22554 cef_binary_value_t* that) nothrow is_equal; 22555 22556 /// 22557 /// Returns a copy of this object. The data in this object will also be 22558 /// copied. 22559 /// 22560 extern(System) cef_binary_value_t* function (cef_binary_value_t* self) nothrow copy; 22561 22562 /// 22563 /// Returns a pointer to the beginning of the memory block. The returned 22564 /// pointer is valid as long as the cef_binary_value_t is alive. 22565 /// 22566 extern(System) const(void)* function (cef_binary_value_t* self) nothrow get_raw_data; 22567 22568 /// 22569 /// Returns the data size. 22570 /// 22571 extern(System) size_t function (cef_binary_value_t* self) nothrow get_size; 22572 22573 /// 22574 /// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at 22575 /// the specified byte |data_offset|. Returns the number of bytes read. 22576 /// 22577 extern(System) size_t function ( 22578 cef_binary_value_t* self, 22579 void* buffer, 22580 size_t buffer_size, 22581 size_t data_offset) nothrow get_data; 22582 } 22583 22584 22585 22586 /// 22587 /// Creates a new object that is not owned by any other object. The specified 22588 /// |data| will be copied. 22589 /// 22590 cef_binary_value_t* cef_binary_value_create ( 22591 const(void)* data, 22592 size_t data_size); 22593 22594 /// 22595 /// Structure representing a dictionary value. Can be used on any process and 22596 /// thread. 22597 /// 22598 /// NOTE: This struct is allocated DLL-side. 22599 /// 22600 struct cef_dictionary_value_t 22601 { 22602 /// 22603 /// Base structure. 22604 /// 22605 cef_base_ref_counted_t base; 22606 22607 /// 22608 /// Returns true (1) if this object is valid. This object may become invalid 22609 /// if the underlying data is owned by another object (e.g. list or 22610 /// dictionary) and that other object is then modified or destroyed. Do not 22611 /// call any other functions if this function returns false (0). 22612 /// 22613 extern(System) int function (cef_dictionary_value_t* self) nothrow is_valid; 22614 22615 /// 22616 /// Returns true (1) if this object is currently owned by another object. 22617 /// 22618 extern(System) int function (cef_dictionary_value_t* self) nothrow is_owned; 22619 22620 /// 22621 /// Returns true (1) if the values of this object are read-only. Some APIs may 22622 /// expose read-only objects. 22623 /// 22624 extern(System) int function (cef_dictionary_value_t* self) nothrow is_read_only; 22625 22626 /// 22627 /// Returns true (1) if this object and |that| object have the same underlying 22628 /// data. If true (1) modifications to this object will also affect |that| 22629 /// object and vice-versa. 22630 /// 22631 extern(System) int function ( 22632 cef_dictionary_value_t* self, 22633 cef_dictionary_value_t* that) nothrow is_same; 22634 22635 /// 22636 /// Returns true (1) if this object and |that| object have an equivalent 22637 /// underlying value but are not necessarily the same object. 22638 /// 22639 extern(System) int function ( 22640 cef_dictionary_value_t* self, 22641 cef_dictionary_value_t* that) nothrow is_equal; 22642 22643 /// 22644 /// Returns a writable copy of this object. If |exclude_NULL_children| is true 22645 /// (1) any NULL dictionaries or lists will be excluded from the copy. 22646 /// 22647 extern(System) cef_dictionary_value_t* function ( 22648 cef_dictionary_value_t* self, 22649 int exclude_empty_children) nothrow copy; 22650 22651 /// 22652 /// Returns the number of values. 22653 /// 22654 extern(System) size_t function (cef_dictionary_value_t* self) nothrow get_size; 22655 22656 /// 22657 /// Removes all values. Returns true (1) on success. 22658 /// 22659 extern(System) int function (cef_dictionary_value_t* self) nothrow clear; 22660 22661 /// 22662 /// Returns true (1) if the current dictionary has a value for the given key. 22663 /// 22664 extern(System) int function ( 22665 cef_dictionary_value_t* self, 22666 const(cef_string_t)* key) nothrow has_key; 22667 22668 /// 22669 /// Reads all keys for this dictionary into the specified vector. 22670 /// 22671 extern(System) int function ( 22672 cef_dictionary_value_t* self, 22673 cef_string_list_t keys) nothrow get_keys; 22674 22675 /// 22676 /// Removes the value at the specified key. Returns true (1) is the value was 22677 /// removed successfully. 22678 /// 22679 extern(System) int function ( 22680 cef_dictionary_value_t* self, 22681 const(cef_string_t)* key) nothrow remove; 22682 22683 /// 22684 /// Returns the value type for the specified key. 22685 /// 22686 extern(System) cef_value_type_t function ( 22687 cef_dictionary_value_t* self, 22688 const(cef_string_t)* key) nothrow get_type; 22689 22690 /// 22691 /// Returns the value at the specified key. For simple types the returned 22692 /// value will copy existing data and modifications to the value will not 22693 /// modify this object. For complex types (binary, dictionary and list) the 22694 /// returned value will reference existing data and modifications to the value 22695 /// will modify this object. 22696 /// 22697 extern(System) cef_value_t* function ( 22698 cef_dictionary_value_t* self, 22699 const(cef_string_t)* key) nothrow get_value; 22700 22701 /// 22702 /// Returns the value at the specified key as type bool. 22703 /// 22704 extern(System) int function ( 22705 cef_dictionary_value_t* self, 22706 const(cef_string_t)* key) nothrow get_bool; 22707 22708 /// 22709 /// Returns the value at the specified key as type int. 22710 /// 22711 extern(System) int function ( 22712 cef_dictionary_value_t* self, 22713 const(cef_string_t)* key) nothrow get_int; 22714 22715 /// 22716 /// Returns the value at the specified key as type double. 22717 /// 22718 extern(System) double function ( 22719 cef_dictionary_value_t* self, 22720 const(cef_string_t)* key) nothrow get_double; 22721 22722 /// 22723 /// Returns the value at the specified key as type string. 22724 /// 22725 // The resulting string must be freed by calling cef_string_userfree_free(). 22726 extern(System) cef_string_userfree_t function ( 22727 cef_dictionary_value_t* self, 22728 const(cef_string_t)* key) nothrow get_string; 22729 22730 /// 22731 /// Returns the value at the specified key as type binary. The returned value 22732 /// will reference existing data. 22733 /// 22734 extern(System) cef_binary_value_t* function ( 22735 cef_dictionary_value_t* self, 22736 const(cef_string_t)* key) nothrow get_binary; 22737 22738 /// 22739 /// Returns the value at the specified key as type dictionary. The returned 22740 /// value will reference existing data and modifications to the value will 22741 /// modify this object. 22742 /// 22743 extern(System) cef_dictionary_value_t* function ( 22744 cef_dictionary_value_t* self, 22745 const(cef_string_t)* key) nothrow get_dictionary; 22746 22747 /// 22748 /// Returns the value at the specified key as type list. The returned value 22749 /// will reference existing data and modifications to the value will modify 22750 /// this object. 22751 /// 22752 extern(System) cef_list_value_t* function ( 22753 cef_dictionary_value_t* self, 22754 const(cef_string_t)* key) nothrow get_list; 22755 22756 /// 22757 /// Sets the value at the specified key. Returns true (1) if the value was set 22758 /// successfully. If |value| represents simple data then the underlying data 22759 /// will be copied and modifications to |value| will not modify this object. 22760 /// If |value| represents complex data (binary, dictionary or list) then the 22761 /// underlying data will be referenced and modifications to |value| will 22762 /// modify this object. 22763 /// 22764 extern(System) int function ( 22765 cef_dictionary_value_t* self, 22766 const(cef_string_t)* key, 22767 cef_value_t* value) nothrow set_value; 22768 22769 /// 22770 /// Sets the value at the specified key as type null. Returns true (1) if the 22771 /// value was set successfully. 22772 /// 22773 extern(System) int function ( 22774 cef_dictionary_value_t* self, 22775 const(cef_string_t)* key) nothrow set_null; 22776 22777 /// 22778 /// Sets the value at the specified key as type bool. Returns true (1) if the 22779 /// value was set successfully. 22780 /// 22781 extern(System) int function ( 22782 cef_dictionary_value_t* self, 22783 const(cef_string_t)* key, 22784 int value) nothrow set_bool; 22785 22786 /// 22787 /// Sets the value at the specified key as type int. Returns true (1) if the 22788 /// value was set successfully. 22789 /// 22790 extern(System) int function ( 22791 cef_dictionary_value_t* self, 22792 const(cef_string_t)* key, 22793 int value) nothrow set_int; 22794 22795 /// 22796 /// Sets the value at the specified key as type double. Returns true (1) if 22797 /// the value was set successfully. 22798 /// 22799 extern(System) int function ( 22800 cef_dictionary_value_t* self, 22801 const(cef_string_t)* key, 22802 double value) nothrow set_double; 22803 22804 /// 22805 /// Sets the value at the specified key as type string. Returns true (1) if 22806 /// the value was set successfully. 22807 /// 22808 extern(System) int function ( 22809 cef_dictionary_value_t* self, 22810 const(cef_string_t)* key, 22811 const(cef_string_t)* value) nothrow set_string; 22812 22813 /// 22814 /// Sets the value at the specified key as type binary. Returns true (1) if 22815 /// the value was set successfully. If |value| is currently owned by another 22816 /// object then the value will be copied and the |value| reference will not 22817 /// change. Otherwise, ownership will be transferred to this object and the 22818 /// |value| reference will be invalidated. 22819 /// 22820 extern(System) int function ( 22821 cef_dictionary_value_t* self, 22822 const(cef_string_t)* key, 22823 cef_binary_value_t* value) nothrow set_binary; 22824 22825 /// 22826 /// Sets the value at the specified key as type dict. Returns true (1) if the 22827 /// value was set successfully. If |value| is currently owned by another 22828 /// object then the value will be copied and the |value| reference will not 22829 /// change. Otherwise, ownership will be transferred to this object and the 22830 /// |value| reference will be invalidated. 22831 /// 22832 extern(System) int function ( 22833 cef_dictionary_value_t* self, 22834 const(cef_string_t)* key, 22835 cef_dictionary_value_t* value) nothrow set_dictionary; 22836 22837 /// 22838 /// Sets the value at the specified key as type list. Returns true (1) if the 22839 /// value was set successfully. If |value| is currently owned by another 22840 /// object then the value will be copied and the |value| reference will not 22841 /// change. Otherwise, ownership will be transferred to this object and the 22842 /// |value| reference will be invalidated. 22843 /// 22844 extern(System) int function ( 22845 cef_dictionary_value_t* self, 22846 const(cef_string_t)* key, 22847 cef_list_value_t* value) nothrow set_list; 22848 } 22849 22850 22851 22852 /// 22853 /// Creates a new object that is not owned by any other object. 22854 /// 22855 cef_dictionary_value_t* cef_dictionary_value_create (); 22856 22857 /// 22858 /// Structure representing a list value. Can be used on any process and thread. 22859 /// 22860 /// NOTE: This struct is allocated DLL-side. 22861 /// 22862 struct cef_list_value_t 22863 { 22864 /// 22865 /// Base structure. 22866 /// 22867 cef_base_ref_counted_t base; 22868 22869 /// 22870 /// Returns true (1) if this object is valid. This object may become invalid 22871 /// if the underlying data is owned by another object (e.g. list or 22872 /// dictionary) and that other object is then modified or destroyed. Do not 22873 /// call any other functions if this function returns false (0). 22874 /// 22875 extern(System) int function (cef_list_value_t* self) nothrow is_valid; 22876 22877 /// 22878 /// Returns true (1) if this object is currently owned by another object. 22879 /// 22880 extern(System) int function (cef_list_value_t* self) nothrow is_owned; 22881 22882 /// 22883 /// Returns true (1) if the values of this object are read-only. Some APIs may 22884 /// expose read-only objects. 22885 /// 22886 extern(System) int function (cef_list_value_t* self) nothrow is_read_only; 22887 22888 /// 22889 /// Returns true (1) if this object and |that| object have the same underlying 22890 /// data. If true (1) modifications to this object will also affect |that| 22891 /// object and vice-versa. 22892 /// 22893 extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_same; 22894 22895 /// 22896 /// Returns true (1) if this object and |that| object have an equivalent 22897 /// underlying value but are not necessarily the same object. 22898 /// 22899 extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_equal; 22900 22901 /// 22902 /// Returns a writable copy of this object. 22903 /// 22904 extern(System) cef_list_value_t* function (cef_list_value_t* self) nothrow copy; 22905 22906 /// 22907 /// Sets the number of values. If the number of values is expanded all new 22908 /// value slots will default to type null. Returns true (1) on success. 22909 /// 22910 extern(System) int function (cef_list_value_t* self, size_t size) nothrow set_size; 22911 22912 /// 22913 /// Returns the number of values. 22914 /// 22915 extern(System) size_t function (cef_list_value_t* self) nothrow get_size; 22916 22917 /// 22918 /// Removes all values. Returns true (1) on success. 22919 /// 22920 extern(System) int function (cef_list_value_t* self) nothrow clear; 22921 22922 /// 22923 /// Removes the value at the specified index. 22924 /// 22925 extern(System) int function (cef_list_value_t* self, size_t index) nothrow remove; 22926 22927 /// 22928 /// Returns the value type at the specified index. 22929 /// 22930 extern(System) cef_value_type_t function (cef_list_value_t* self, size_t index) nothrow get_type; 22931 22932 /// 22933 /// Returns the value at the specified index. For simple types the returned 22934 /// value will copy existing data and modifications to the value will not 22935 /// modify this object. For complex types (binary, dictionary and list) the 22936 /// returned value will reference existing data and modifications to the value 22937 /// will modify this object. 22938 /// 22939 extern(System) cef_value_t* function (cef_list_value_t* self, size_t index) nothrow get_value; 22940 22941 /// 22942 /// Returns the value at the specified index as type bool. 22943 /// 22944 extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_bool; 22945 22946 /// 22947 /// Returns the value at the specified index as type int. 22948 /// 22949 extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_int; 22950 22951 /// 22952 /// Returns the value at the specified index as type double. 22953 /// 22954 extern(System) double function (cef_list_value_t* self, size_t index) nothrow get_double; 22955 22956 /// 22957 /// Returns the value at the specified index as type string. 22958 /// 22959 // The resulting string must be freed by calling cef_string_userfree_free(). 22960 extern(System) cef_string_userfree_t function ( 22961 cef_list_value_t* self, 22962 size_t index) nothrow get_string; 22963 22964 /// 22965 /// Returns the value at the specified index as type binary. The returned 22966 /// value will reference existing data. 22967 /// 22968 extern(System) cef_binary_value_t* function ( 22969 cef_list_value_t* self, 22970 size_t index) nothrow get_binary; 22971 22972 /// 22973 /// Returns the value at the specified index as type dictionary. The returned 22974 /// value will reference existing data and modifications to the value will 22975 /// modify this object. 22976 /// 22977 extern(System) cef_dictionary_value_t* function ( 22978 cef_list_value_t* self, 22979 size_t index) nothrow get_dictionary; 22980 22981 /// 22982 /// Returns the value at the specified index as type list. The returned value 22983 /// will reference existing data and modifications to the value will modify 22984 /// this object. 22985 /// 22986 extern(System) cef_list_value_t* function ( 22987 cef_list_value_t* self, 22988 size_t index) nothrow get_list; 22989 22990 /// 22991 /// Sets the value at the specified index. Returns true (1) if the value was 22992 /// set successfully. If |value| represents simple data then the underlying 22993 /// data will be copied and modifications to |value| will not modify this 22994 /// object. If |value| represents complex data (binary, dictionary or list) 22995 /// then the underlying data will be referenced and modifications to |value| 22996 /// will modify this object. 22997 /// 22998 extern(System) int function ( 22999 cef_list_value_t* self, 23000 size_t index, 23001 cef_value_t* value) nothrow set_value; 23002 23003 /// 23004 /// Sets the value at the specified index as type null. Returns true (1) if 23005 /// the value was set successfully. 23006 /// 23007 extern(System) int function (cef_list_value_t* self, size_t index) nothrow set_null; 23008 23009 /// 23010 /// Sets the value at the specified index as type bool. Returns true (1) if 23011 /// the value was set successfully. 23012 /// 23013 extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_bool; 23014 23015 /// 23016 /// Sets the value at the specified index as type int. Returns true (1) if the 23017 /// value was set successfully. 23018 /// 23019 extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_int; 23020 23021 /// 23022 /// Sets the value at the specified index as type double. Returns true (1) if 23023 /// the value was set successfully. 23024 /// 23025 extern(System) int function ( 23026 cef_list_value_t* self, 23027 size_t index, 23028 double value) nothrow set_double; 23029 23030 /// 23031 /// Sets the value at the specified index as type string. Returns true (1) if 23032 /// the value was set successfully. 23033 /// 23034 extern(System) int function ( 23035 cef_list_value_t* self, 23036 size_t index, 23037 const(cef_string_t)* value) nothrow set_string; 23038 23039 /// 23040 /// Sets the value at the specified index as type binary. Returns true (1) if 23041 /// the value was set successfully. If |value| is currently owned by another 23042 /// object then the value will be copied and the |value| reference will not 23043 /// change. Otherwise, ownership will be transferred to this object and the 23044 /// |value| reference will be invalidated. 23045 /// 23046 extern(System) int function ( 23047 cef_list_value_t* self, 23048 size_t index, 23049 cef_binary_value_t* value) nothrow set_binary; 23050 23051 /// 23052 /// Sets the value at the specified index as type dict. Returns true (1) if 23053 /// the value was set successfully. If |value| is currently owned by another 23054 /// object then the value will be copied and the |value| reference will not 23055 /// change. Otherwise, ownership will be transferred to this object and the 23056 /// |value| reference will be invalidated. 23057 /// 23058 extern(System) int function ( 23059 cef_list_value_t* self, 23060 size_t index, 23061 cef_dictionary_value_t* value) nothrow set_dictionary; 23062 23063 /// 23064 /// Sets the value at the specified index as type list. Returns true (1) if 23065 /// the value was set successfully. If |value| is currently owned by another 23066 /// object then the value will be copied and the |value| reference will not 23067 /// change. Otherwise, ownership will be transferred to this object and the 23068 /// |value| reference will be invalidated. 23069 /// 23070 extern(System) int function ( 23071 cef_list_value_t* self, 23072 size_t index, 23073 cef_list_value_t* value) nothrow set_list; 23074 } 23075 23076 23077 23078 /// 23079 /// Creates a new object that is not owned by any other object. 23080 /// 23081 cef_list_value_t* cef_list_value_create (); 23082 23083 // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ 23084 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 23085 // 23086 // Redistribution and use in source and binary forms, with or without 23087 // modification, are permitted provided that the following conditions are 23088 // met: 23089 // 23090 // * Redistributions of source code must retain the above copyright 23091 // notice, this list of conditions and the following disclaimer. 23092 // * Redistributions in binary form must reproduce the above 23093 // copyright notice, this list of conditions and the following disclaimer 23094 // in the documentation and/or other materials provided with the 23095 // distribution. 23096 // * Neither the name of Google Inc. nor the name Chromium Embedded 23097 // Framework nor the names of its contributors may be used to endorse 23098 // or promote products derived from this software without specific prior 23099 // written permission. 23100 // 23101 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23102 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23103 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23104 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23105 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23106 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23107 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23108 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23109 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23110 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23111 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23112 // 23113 // --------------------------------------------------------------------------- 23114 // 23115 // This file was generated by the CEF translator tool and should not edited 23116 // by hand. See the translator.README.txt file in the tools directory for 23117 // more information. 23118 // 23119 // $hash=9557ee036441059712a50397b99979c3c232dc27$ 23120 // 23121 23122 extern (C): 23123 23124 /// 23125 /// WaitableEvent is a thread synchronization tool that allows one thread to 23126 /// wait for another thread to finish some work. This is equivalent to using a 23127 /// Lock+ConditionVariable to protect a simple boolean value. However, using 23128 /// WaitableEvent in conjunction with a Lock to wait for a more complex state 23129 /// change (e.g., for an item to be added to a queue) is not recommended. In 23130 /// that case consider using a ConditionVariable instead of a WaitableEvent. It 23131 /// is safe to create and/or signal a WaitableEvent from any thread. Blocking on 23132 /// a WaitableEvent by calling the *wait() functions is not allowed on the 23133 /// browser process UI or IO threads. 23134 /// 23135 /// NOTE: This struct is allocated DLL-side. 23136 /// 23137 struct cef_waitable_event_t 23138 { 23139 /// 23140 /// Base structure. 23141 /// 23142 23143 cef_base_ref_counted_t base; 23144 /// 23145 /// Put the event in the un-signaled state. 23146 /// 23147 extern(System) void function (cef_waitable_event_t* self) nothrow reset; 23148 23149 /// 23150 /// Put the event in the signaled state. This causes any thread blocked on 23151 /// Wait to be woken up. 23152 /// 23153 extern(System) void function (cef_waitable_event_t* self) nothrow signal; 23154 23155 /// 23156 /// Returns true (1) if the event is in the signaled state, else false (0). If 23157 /// the event was created with |automatic_reset| set to true (1) then calling 23158 /// this function will also cause a reset. 23159 /// 23160 extern(System) int function (cef_waitable_event_t* self) nothrow is_signaled; 23161 23162 /// 23163 /// Wait indefinitely for the event to be signaled. This function will not 23164 /// return until after the call to signal() has completed. This function 23165 /// cannot be called on the browser process UI or IO threads. 23166 /// 23167 extern(System) void function (cef_waitable_event_t* self) nothrow wait; 23168 23169 /// 23170 /// Wait up to |max_ms| milliseconds for the event to be signaled. Returns 23171 /// true (1) if the event was signaled. A return value of false (0) does not 23172 /// necessarily mean that |max_ms| was exceeded. This function will not return 23173 /// until after the call to signal() has completed. This function cannot be 23174 /// called on the browser process UI or IO threads. 23175 /// 23176 extern(System) int function (cef_waitable_event_t* self, long max_ms) nothrow timed_wait; 23177 } 23178 23179 23180 23181 /// 23182 /// Create a new waitable event. If |automatic_reset| is true (1) then the event 23183 /// state is automatically reset to un-signaled after a single waiting thread 23184 /// has been released; otherwise, the state remains signaled until reset() is 23185 /// called manually. If |initially_signaled| is true (1) then the event will 23186 /// start in the signaled state. 23187 /// 23188 cef_waitable_event_t* cef_waitable_event_create ( 23189 int automatic_reset, 23190 int initially_signaled); 23191 23192 // CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_ 23193 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 23194 // 23195 // Redistribution and use in source and binary forms, with or without 23196 // modification, are permitted provided that the following conditions are 23197 // met: 23198 // 23199 // * Redistributions of source code must retain the above copyright 23200 // notice, this list of conditions and the following disclaimer. 23201 // * Redistributions in binary form must reproduce the above 23202 // copyright notice, this list of conditions and the following disclaimer 23203 // in the documentation and/or other materials provided with the 23204 // distribution. 23205 // * Neither the name of Google Inc. nor the name Chromium Embedded 23206 // Framework nor the names of its contributors may be used to endorse 23207 // or promote products derived from this software without specific prior 23208 // written permission. 23209 // 23210 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23211 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23212 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23213 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23214 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23215 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23216 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23217 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23218 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23219 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23220 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23221 // 23222 // --------------------------------------------------------------------------- 23223 // 23224 // This file was generated by the CEF translator tool and should not edited 23225 // by hand. See the translator.README.txt file in the tools directory for 23226 // more information. 23227 // 23228 // $hash=2c9a65c33971ecb12e76d207894650ac53f024e5$ 23229 // 23230 23231 extern (C): 23232 23233 /// 23234 /// Structure representing the issuer or subject field of an X.509 certificate. 23235 /// 23236 /// NOTE: This struct is allocated DLL-side. 23237 /// 23238 struct cef_x509_cert_principal_t 23239 { 23240 /// 23241 /// Base structure. 23242 /// 23243 23244 /// 23245 /// Returns a name that can be used to represent the issuer. It tries in this 23246 /// order: Common Name (CN), Organization Name (O) and Organizational Unit 23247 /// Name (OU) and returns the first non-NULL one found. 23248 /// 23249 // The resulting string must be freed by calling cef_string_userfree_free(). 23250 23251 /// 23252 /// Returns the common name. 23253 /// 23254 // The resulting string must be freed by calling cef_string_userfree_free(). 23255 23256 cef_base_ref_counted_t base; 23257 extern(System) cef_string_userfree_t function ( 23258 cef_x509_cert_principal_t* self) nothrow get_display_name; 23259 extern(System) cef_string_userfree_t function ( 23260 cef_x509_cert_principal_t* self) nothrow get_common_name; 23261 23262 /// 23263 /// Returns the locality name. 23264 /// 23265 // The resulting string must be freed by calling cef_string_userfree_free(). 23266 extern(System) cef_string_userfree_t function ( 23267 cef_x509_cert_principal_t* self) nothrow get_locality_name; 23268 23269 /// 23270 /// Returns the state or province name. 23271 /// 23272 // The resulting string must be freed by calling cef_string_userfree_free(). 23273 extern(System) cef_string_userfree_t function ( 23274 cef_x509_cert_principal_t* self) nothrow get_state_or_province_name; 23275 23276 /// 23277 /// Returns the country name. 23278 /// 23279 // The resulting string must be freed by calling cef_string_userfree_free(). 23280 extern(System) cef_string_userfree_t function ( 23281 cef_x509_cert_principal_t* self) nothrow get_country_name; 23282 23283 /// 23284 /// Retrieve the list of organization names. 23285 /// 23286 extern(System) void function ( 23287 cef_x509_cert_principal_t* self, 23288 cef_string_list_t names) nothrow get_organization_names; 23289 23290 /// 23291 /// Retrieve the list of organization unit names. 23292 /// 23293 extern(System) void function ( 23294 cef_x509_cert_principal_t* self, 23295 cef_string_list_t names) nothrow get_organization_unit_names; 23296 } 23297 23298 23299 23300 /// 23301 /// Structure representing a X.509 certificate. 23302 /// 23303 /// NOTE: This struct is allocated DLL-side. 23304 /// 23305 struct cef_x509_certificate_t 23306 { 23307 /// 23308 /// Base structure. 23309 /// 23310 cef_base_ref_counted_t base; 23311 23312 /// 23313 /// Returns the subject of the X.509 certificate. For HTTPS server 23314 /// certificates this represents the web server. The common name of the 23315 /// subject should match the host name of the web server. 23316 /// 23317 extern(System) cef_x509_cert_principal_t* function ( 23318 cef_x509_certificate_t* self) nothrow get_subject; 23319 23320 /// 23321 /// Returns the issuer of the X.509 certificate. 23322 /// 23323 extern(System) cef_x509_cert_principal_t* function ( 23324 cef_x509_certificate_t* self) nothrow get_issuer; 23325 23326 /// 23327 /// Returns the DER encoded serial number for the X.509 certificate. The value 23328 /// possibly includes a leading 00 byte. 23329 /// 23330 extern(System) cef_binary_value_t* function ( 23331 cef_x509_certificate_t* self) nothrow get_serial_number; 23332 23333 /// 23334 /// Returns the date before which the X.509 certificate is invalid. 23335 /// CefBaseTime.GetTimeT() will return 0 if no date was specified. 23336 /// 23337 extern(System) cef_basetime_t function (cef_x509_certificate_t* self) nothrow get_valid_start; 23338 23339 /// 23340 /// Returns the date after which the X.509 certificate is invalid. 23341 /// CefBaseTime.GetTimeT() will return 0 if no date was specified. 23342 /// 23343 extern(System) cef_basetime_t function (cef_x509_certificate_t* self) nothrow get_valid_expiry; 23344 23345 /// 23346 /// Returns the DER encoded data for the X.509 certificate. 23347 /// 23348 extern(System) cef_binary_value_t* function ( 23349 cef_x509_certificate_t* self) nothrow get_derencoded; 23350 23351 /// 23352 /// Returns the PEM encoded data for the X.509 certificate. 23353 /// 23354 extern(System) cef_binary_value_t* function ( 23355 cef_x509_certificate_t* self) nothrow get_pemencoded; 23356 23357 /// 23358 /// Returns the number of certificates in the issuer chain. If 0, the 23359 /// certificate is self-signed. 23360 /// 23361 extern(System) size_t function (cef_x509_certificate_t* self) nothrow get_issuer_chain_size; 23362 23363 /// 23364 /// Returns the DER encoded data for the certificate issuer chain. If we 23365 /// failed to encode a certificate in the chain it is still present in the 23366 /// array but is an NULL string. 23367 /// 23368 extern(System) void function ( 23369 cef_x509_certificate_t* self, 23370 size_t* chainCount, 23371 cef_binary_value_t** chain) nothrow get_derencoded_issuer_chain; 23372 23373 /// 23374 /// Returns the PEM encoded data for the certificate issuer chain. If we 23375 /// failed to encode a certificate in the chain it is still present in the 23376 /// array but is an NULL string. 23377 /// 23378 extern(System) void function ( 23379 cef_x509_certificate_t* self, 23380 size_t* chainCount, 23381 cef_binary_value_t** chain) nothrow get_pemencoded_issuer_chain; 23382 } 23383 23384 23385 23386 // CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_ 23387 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 23388 // 23389 // Redistribution and use in source and binary forms, with or without 23390 // modification, are permitted provided that the following conditions are 23391 // met: 23392 // 23393 // * Redistributions of source code must retain the above copyright 23394 // notice, this list of conditions and the following disclaimer. 23395 // * Redistributions in binary form must reproduce the above 23396 // copyright notice, this list of conditions and the following disclaimer 23397 // in the documentation and/or other materials provided with the 23398 // distribution. 23399 // * Neither the name of Google Inc. nor the name Chromium Embedded 23400 // Framework nor the names of its contributors may be used to endorse 23401 // or promote products derived from this software without specific prior 23402 // written permission. 23403 // 23404 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23405 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23406 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23407 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23408 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23409 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23410 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23411 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23412 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23413 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23414 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23415 // 23416 // --------------------------------------------------------------------------- 23417 // 23418 // This file was generated by the CEF translator tool and should not edited 23419 // by hand. See the translator.README.txt file in the tools directory for 23420 // more information. 23421 // 23422 // $hash=af8006814745c9ec2f51018f578d3e592933046b$ 23423 // 23424 23425 extern (C): 23426 23427 /// 23428 /// Structure that supports the reading of XML data via the libxml streaming 23429 /// API. The functions of this structure should only be called on the thread 23430 /// that creates the object. 23431 /// 23432 /// NOTE: This struct is allocated DLL-side. 23433 /// 23434 struct cef_xml_reader_t 23435 { 23436 /// 23437 /// Base structure. 23438 /// 23439 23440 /// 23441 /// Moves the cursor to the next node in the document. This function must be 23442 /// called at least once to set the current cursor position. Returns true (1) 23443 /// if the cursor position was set successfully. 23444 /// 23445 23446 /// 23447 /// Close the document. This should be called directly to ensure that cleanup 23448 /// occurs on the correct thread. 23449 /// 23450 23451 cef_base_ref_counted_t base; 23452 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_node; 23453 extern(System) int function (cef_xml_reader_t* self) nothrow close; 23454 23455 /// 23456 /// Returns true (1) if an error has been reported by the XML parser. 23457 /// 23458 extern(System) int function (cef_xml_reader_t* self) nothrow has_error; 23459 23460 /// 23461 /// Returns the error string. 23462 /// 23463 // The resulting string must be freed by calling cef_string_userfree_free(). 23464 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_error; 23465 23466 /// 23467 /// Returns the node type. 23468 /// 23469 extern(System) cef_xml_node_type_t function (cef_xml_reader_t* self) nothrow get_type; 23470 23471 /// 23472 /// Returns the node depth. Depth starts at 0 for the root node. 23473 /// 23474 extern(System) int function (cef_xml_reader_t* self) nothrow get_depth; 23475 23476 /// 23477 /// Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT- 23478 /// LocalPart for additional details. 23479 /// 23480 // The resulting string must be freed by calling cef_string_userfree_free(). 23481 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_local_name; 23482 23483 /// 23484 /// Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for 23485 /// additional details. 23486 /// 23487 // The resulting string must be freed by calling cef_string_userfree_free(). 23488 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_prefix; 23489 23490 /// 23491 /// Returns the qualified name, equal to (Prefix:)LocalName. See 23492 /// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details. 23493 /// 23494 // The resulting string must be freed by calling cef_string_userfree_free(). 23495 extern(System) cef_string_userfree_t function ( 23496 cef_xml_reader_t* self) nothrow get_qualified_name; 23497 23498 /// 23499 /// Returns the URI defining the namespace associated with the node. See 23500 /// http://www.w3.org/TR/REC-xml-names/ for additional details. 23501 /// 23502 // The resulting string must be freed by calling cef_string_userfree_free(). 23503 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_namespace_uri; 23504 23505 /// 23506 /// Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for 23507 /// additional details. 23508 /// 23509 // The resulting string must be freed by calling cef_string_userfree_free(). 23510 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_base_uri; 23511 23512 /// 23513 /// Returns the xml:lang scope within which the node resides. See 23514 /// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details. 23515 /// 23516 // The resulting string must be freed by calling cef_string_userfree_free(). 23517 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_xml_lang; 23518 23519 /// 23520 /// Returns true (1) if the node represents an NULL element. "<a/>" is 23521 /// considered NULL but "<a></a>" is not. 23522 /// 23523 extern(System) int function (cef_xml_reader_t* self) nothrow is_empty_element; 23524 23525 /// 23526 /// Returns true (1) if the node has a text value. 23527 /// 23528 extern(System) int function (cef_xml_reader_t* self) nothrow has_value; 23529 23530 /// 23531 /// Returns the text value. 23532 /// 23533 // The resulting string must be freed by calling cef_string_userfree_free(). 23534 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_value; 23535 23536 /// 23537 /// Returns true (1) if the node has attributes. 23538 /// 23539 extern(System) int function (cef_xml_reader_t* self) nothrow has_attributes; 23540 23541 /// 23542 /// Returns the number of attributes. 23543 /// 23544 extern(System) size_t function (cef_xml_reader_t* self) nothrow get_attribute_count; 23545 23546 /// 23547 /// Returns the value of the attribute at the specified 0-based index. 23548 /// 23549 // The resulting string must be freed by calling cef_string_userfree_free(). 23550 extern(System) cef_string_userfree_t function ( 23551 cef_xml_reader_t* self, 23552 int index) nothrow get_attribute_byindex; 23553 23554 /// 23555 /// Returns the value of the attribute with the specified qualified name. 23556 /// 23557 // The resulting string must be freed by calling cef_string_userfree_free(). 23558 extern(System) cef_string_userfree_t function ( 23559 cef_xml_reader_t* self, 23560 const(cef_string_t)* qualifiedName) nothrow get_attribute_byqname; 23561 23562 /// 23563 /// Returns the value of the attribute with the specified local name and 23564 /// namespace URI. 23565 /// 23566 // The resulting string must be freed by calling cef_string_userfree_free(). 23567 extern(System) cef_string_userfree_t function ( 23568 cef_xml_reader_t* self, 23569 const(cef_string_t)* localName, 23570 const(cef_string_t)* namespaceURI) nothrow get_attribute_bylname; 23571 23572 /// 23573 /// Returns an XML representation of the current node's children. 23574 /// 23575 // The resulting string must be freed by calling cef_string_userfree_free(). 23576 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_inner_xml; 23577 23578 /// 23579 /// Returns an XML representation of the current node including its children. 23580 /// 23581 // The resulting string must be freed by calling cef_string_userfree_free(). 23582 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_outer_xml; 23583 23584 /// 23585 /// Returns the line number for the current node. 23586 /// 23587 extern(System) int function (cef_xml_reader_t* self) nothrow get_line_number; 23588 23589 /// 23590 /// Moves the cursor to the attribute at the specified 0-based index. Returns 23591 /// true (1) if the cursor position was set successfully. 23592 /// 23593 extern(System) int function ( 23594 cef_xml_reader_t* self, 23595 int index) nothrow move_to_attribute_byindex; 23596 23597 /// 23598 /// Moves the cursor to the attribute with the specified qualified name. 23599 /// Returns true (1) if the cursor position was set successfully. 23600 /// 23601 extern(System) int function ( 23602 cef_xml_reader_t* self, 23603 const(cef_string_t)* qualifiedName) nothrow move_to_attribute_byqname; 23604 23605 /// 23606 /// Moves the cursor to the attribute with the specified local name and 23607 /// namespace URI. Returns true (1) if the cursor position was set 23608 /// successfully. 23609 /// 23610 extern(System) int function ( 23611 cef_xml_reader_t* self, 23612 const(cef_string_t)* localName, 23613 const(cef_string_t)* namespaceURI) nothrow move_to_attribute_bylname; 23614 23615 /// 23616 /// Moves the cursor to the first attribute in the current element. Returns 23617 /// true (1) if the cursor position was set successfully. 23618 /// 23619 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_first_attribute; 23620 23621 /// 23622 /// Moves the cursor to the next attribute in the current element. Returns 23623 /// true (1) if the cursor position was set successfully. 23624 /// 23625 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_attribute; 23626 23627 /// 23628 /// Moves the cursor back to the carrying element. Returns true (1) if the 23629 /// cursor position was set successfully. 23630 /// 23631 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_carrying_element; 23632 } 23633 23634 23635 23636 /// 23637 /// Create a new cef_xml_reader_t object. The returned object's functions can 23638 /// only be called from the thread that created the object. 23639 /// 23640 cef_xml_reader_t* cef_xml_reader_create ( 23641 cef_stream_reader_t* stream, 23642 cef_xml_encoding_type_t encodingType, 23643 const(cef_string_t)* URI); 23644 23645 // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_ 23646 // Copyright (c) 2025 Marshall A. Greenblatt. All rights reserved. 23647 // 23648 // Redistribution and use in source and binary forms, with or without 23649 // modification, are permitted provided that the following conditions are 23650 // met: 23651 // 23652 // * Redistributions of source code must retain the above copyright 23653 // notice, this list of conditions and the following disclaimer. 23654 // * Redistributions in binary form must reproduce the above 23655 // copyright notice, this list of conditions and the following disclaimer 23656 // in the documentation and/or other materials provided with the 23657 // distribution. 23658 // * Neither the name of Google Inc. nor the name Chromium Embedded 23659 // Framework nor the names of its contributors may be used to endorse 23660 // or promote products derived from this software without specific prior 23661 // written permission. 23662 // 23663 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23664 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23665 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23666 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23667 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23668 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23669 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23670 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23671 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23672 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23673 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23674 // 23675 // --------------------------------------------------------------------------- 23676 // 23677 // This file was generated by the CEF translator tool and should not edited 23678 // by hand. See the translator.README.txt file in the tools directory for 23679 // more information. 23680 // 23681 // $hash=94f18dd234f8478eb4f167febc3d821e30432e3c$ 23682 // 23683 23684 extern (C): 23685 23686 /// 23687 /// Structure that supports the reading of zip archives via the zlib unzip API. 23688 /// The functions of this structure should only be called on the thread that 23689 /// creates the object. 23690 /// 23691 /// NOTE: This struct is allocated DLL-side. 23692 /// 23693 struct cef_zip_reader_t 23694 { 23695 /// 23696 /// Base structure. 23697 /// 23698 23699 /// 23700 /// Moves the cursor to the first file in the archive. Returns true (1) if the 23701 /// cursor position was set successfully. 23702 /// 23703 23704 /// 23705 /// Moves the cursor to the next file in the archive. Returns true (1) if the 23706 /// cursor position was set successfully. 23707 /// 23708 23709 /// 23710 /// Moves the cursor to the specified file in the archive. If |caseSensitive| 23711 23712 cef_base_ref_counted_t base; 23713 extern(System) int function (cef_zip_reader_t* self) nothrow move_to_first_file; 23714 extern(System) int function (cef_zip_reader_t* self) nothrow move_to_next_file; 23715 /// is true (1) then the search will be case sensitive. Returns true (1) if 23716 /// the cursor position was set successfully. 23717 /// 23718 extern(System) int function ( 23719 cef_zip_reader_t* self, 23720 const(cef_string_t)* fileName, 23721 int caseSensitive) nothrow move_to_file; 23722 23723 /// 23724 /// Closes the archive. This should be called directly to ensure that cleanup 23725 /// occurs on the correct thread. 23726 /// 23727 extern(System) int function (cef_zip_reader_t* self) nothrow close; 23728 23729 /// 23730 /// Returns the name of the file. 23731 /// 23732 // The resulting string must be freed by calling cef_string_userfree_free(). 23733 extern(System) cef_string_userfree_t function (cef_zip_reader_t* self) nothrow get_file_name; 23734 23735 /// 23736 /// Returns the uncompressed size of the file. 23737 /// 23738 extern(System) long function (cef_zip_reader_t* self) nothrow get_file_size; 23739 23740 /// 23741 /// Returns the last modified timestamp for the file. 23742 /// 23743 extern(System) cef_basetime_t function (cef_zip_reader_t* self) nothrow get_file_last_modified; 23744 23745 /// 23746 /// Opens the file for reading of uncompressed data. A read password may 23747 /// optionally be specified. 23748 /// 23749 extern(System) int function ( 23750 cef_zip_reader_t* self, 23751 const(cef_string_t)* password) nothrow open_file; 23752 23753 /// 23754 /// Closes the file. 23755 /// 23756 extern(System) int function (cef_zip_reader_t* self) nothrow close_file; 23757 23758 /// 23759 /// Read uncompressed file contents into the specified buffer. Returns < 0 if 23760 /// an error occurred, 0 if at the end of file, or the number of bytes read. 23761 /// 23762 extern(System) int function ( 23763 cef_zip_reader_t* self, 23764 void* buffer, 23765 size_t bufferSize) nothrow read_file; 23766 23767 /// 23768 /// Returns the current offset in the uncompressed file contents. 23769 /// 23770 extern(System) long function (cef_zip_reader_t* self) nothrow tell; 23771 23772 /// 23773 /// Returns true (1) if at end of the file contents. 23774 /// 23775 extern(System) int function (cef_zip_reader_t* self) nothrow eof; 23776 } 23777 23778 23779 23780 /// 23781 /// Create a new cef_zip_reader_t object. The returned object's functions can 23782 /// only be called from the thread that created the object. 23783 /// 23784 cef_zip_reader_t* cef_zip_reader_create (cef_stream_reader_t* stream); 23785 23786 // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_ 23787 } 23788 23789 } 23790 23791 23792 version(Windows) { 23793 23794 /+ 23795 ***** Webview2 Bindings ***** 23796 23797 TO UPDATE THIS: 23798 23799 Get the new package from https://www.nuget.org/packages/Microsoft.Web.WebView2 23800 Note that is a .zip file so you can extract the WebView2.idl file by just treating it as such 23801 23802 Use my idl2d fork (from ~/program/idl2d or dub) on it `./idl2d WebView2.idl` to make webview2.d. 23803 23804 Just delete any `import sdk.*` lines. Comment out the lines that mention `DEFINE_ENUM_FLAG_OPERATORS` (there's like a dozen, it is some C macro that isn't translated and i don't think it is important). 23805 23806 And paste it in the version(inline_webview2_bindings) block. 23807 +/ 23808 23809 alias EventRegistrationToken = long; 23810 version=inline_webview2_bindings; 23811 23812 version(inline_webview2_bindings) { 23813 public import core.sys.windows.windows; 23814 public import core.sys.windows.unknwn; 23815 public import core.sys.windows.oaidl; 23816 public import core.sys.windows.objidl; 23817 23818 23819 // Copyright (C) Microsoft Corporation. All rights reserved. 23820 // Use of this source code is governed by a BSD-style license that can be 23821 // found in the LICENSE file. 23822 23823 @("uuid(26d34152-879f-4065-bea2-3daa2cfadfb8), version(1.0)") 23824 enum LibraryInfo; 23825 version(all) 23826 { /+ library WebView2 +/ 23827 23828 // Interface forward declarations 23829 23830 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs; +/ 23831 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs2; +/ 23832 /+ interface ICoreWebView2AcceleratorKeyPressedEventHandler; +/ 23833 /+ interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler; +/ 23834 /+ interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler; +/ 23835 /+ interface ICoreWebView2CapturePreviewCompletedHandler; +/ 23836 /+ interface ICoreWebView2; +/ 23837 /+ interface ICoreWebView2_2; +/ 23838 /+ interface ICoreWebView2_3; +/ 23839 /+ interface ICoreWebView2_4; +/ 23840 /+ interface ICoreWebView2_5; +/ 23841 /+ interface ICoreWebView2_6; +/ 23842 /+ interface ICoreWebView2_7; +/ 23843 /+ interface ICoreWebView2_8; +/ 23844 /+ interface ICoreWebView2_9; +/ 23845 /+ interface ICoreWebView2_10; +/ 23846 /+ interface ICoreWebView2_11; +/ 23847 /+ interface ICoreWebView2_12; +/ 23848 /+ interface ICoreWebView2_13; +/ 23849 /+ interface ICoreWebView2_14; +/ 23850 /+ interface ICoreWebView2_15; +/ 23851 /+ interface ICoreWebView2_16; +/ 23852 /+ interface ICoreWebView2_17; +/ 23853 /+ interface ICoreWebView2_18; +/ 23854 /+ interface ICoreWebView2_19; +/ 23855 /+ interface ICoreWebView2_20; +/ 23856 /+ interface ICoreWebView2BasicAuthenticationRequestedEventArgs; +/ 23857 /+ interface ICoreWebView2BasicAuthenticationRequestedEventHandler; +/ 23858 /+ interface ICoreWebView2BasicAuthenticationResponse; +/ 23859 /+ interface ICoreWebView2BrowserProcessExitedEventArgs; +/ 23860 /+ interface ICoreWebView2BrowserProcessExitedEventHandler; +/ 23861 /+ interface ICoreWebView2BytesReceivedChangedEventHandler; +/ 23862 /+ interface ICoreWebView2CompositionController; +/ 23863 /+ interface ICoreWebView2CompositionController2; +/ 23864 /+ interface ICoreWebView2CompositionController3; +/ 23865 /+ interface ICoreWebView2Controller; +/ 23866 /+ interface ICoreWebView2Controller2; +/ 23867 /+ interface ICoreWebView2Controller3; +/ 23868 /+ interface ICoreWebView2Controller4; +/ 23869 /+ interface ICoreWebView2ControllerOptions; +/ 23870 /+ interface ICoreWebView2ControllerOptions2; +/ 23871 /+ interface ICoreWebView2ContentLoadingEventArgs; +/ 23872 /+ interface ICoreWebView2ContentLoadingEventHandler; +/ 23873 /+ interface ICoreWebView2ContextMenuRequestedEventArgs; +/ 23874 /+ interface ICoreWebView2ContextMenuRequestedEventHandler; +/ 23875 /+ interface ICoreWebView2Cookie; +/ 23876 /+ interface ICoreWebView2CookieList; +/ 23877 /+ interface ICoreWebView2CookieManager; +/ 23878 /+ interface ICoreWebView2Certificate; +/ 23879 /+ interface ICoreWebView2ClientCertificate; +/ 23880 /+ interface ICoreWebView2StringCollection; +/ 23881 /+ interface ICoreWebView2ClearBrowsingDataCompletedHandler; +/ 23882 /+ interface ICoreWebView2ClientCertificateCollection; +/ 23883 /+ interface ICoreWebView2ClientCertificateRequestedEventArgs; +/ 23884 /+ interface ICoreWebView2ClientCertificateRequestedEventHandler; +/ 23885 /+ interface ICoreWebView2ContextMenuItem; +/ 23886 /+ interface ICoreWebView2ContextMenuItemCollection; +/ 23887 /+ interface ICoreWebView2ContextMenuRequestedEventArgs; +/ 23888 /+ interface ICoreWebView2ContextMenuRequestedEventHandler; +/ 23889 /+ interface ICoreWebView2ContextMenuTarget; +/ 23890 /+ interface ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler; +/ 23891 /+ interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler; +/ 23892 /+ interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler; +/ 23893 /+ interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler; +/ 23894 /+ interface ICoreWebView2ContainsFullScreenElementChangedEventHandler; +/ 23895 /+ interface ICoreWebView2CursorChangedEventHandler; +/ 23896 /+ interface ICoreWebView2CustomItemSelectedEventHandler; +/ 23897 /+ interface ICoreWebView2CustomSchemeRegistration; +/ 23898 /+ interface ICoreWebView2DocumentTitleChangedEventHandler; +/ 23899 /+ interface ICoreWebView2DOMContentLoadedEventArgs; +/ 23900 /+ interface ICoreWebView2DOMContentLoadedEventHandler; +/ 23901 /+ interface ICoreWebView2Deferral; +/ 23902 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs; +/ 23903 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs2; +/ 23904 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler; +/ 23905 /+ interface ICoreWebView2DevToolsProtocolEventReceiver; +/ 23906 /+ interface ICoreWebView2DownloadOperation; +/ 23907 /+ interface ICoreWebView2DownloadStartingEventArgs; +/ 23908 /+ interface ICoreWebView2DownloadStartingEventHandler; +/ 23909 /+ interface ICoreWebView2Environment; +/ 23910 /+ interface ICoreWebView2Environment2; +/ 23911 /+ interface ICoreWebView2Environment3; +/ 23912 /+ interface ICoreWebView2Environment4; +/ 23913 /+ interface ICoreWebView2Environment5; +/ 23914 /+ interface ICoreWebView2Environment6; +/ 23915 /+ interface ICoreWebView2Environment7; +/ 23916 /+ interface ICoreWebView2Environment8; +/ 23917 /+ interface ICoreWebView2Environment9; +/ 23918 /+ interface ICoreWebView2Environment10; +/ 23919 /+ interface ICoreWebView2Environment11; +/ 23920 /+ interface ICoreWebView2Environment12; +/ 23921 /+ interface ICoreWebView2Environment13; +/ 23922 /+ interface ICoreWebView2EnvironmentOptions; +/ 23923 /+ interface ICoreWebView2EnvironmentOptions2; +/ 23924 /+ interface ICoreWebView2EnvironmentOptions3; +/ 23925 /+ interface ICoreWebView2EnvironmentOptions4; +/ 23926 /+ interface ICoreWebView2EnvironmentOptions5; +/ 23927 /+ interface ICoreWebView2EnvironmentOptions6; +/ 23928 /+ interface ICoreWebView2EstimatedEndTimeChangedEventHandler; +/ 23929 /+ interface ICoreWebView2ExecuteScriptCompletedHandler; +/ 23930 /+ interface ICoreWebView2GetProcessExtendedInfosCompletedHandler; +/ 23931 /+ interface ICoreWebView2ProcessExtendedInfo; +/ 23932 /+ interface ICoreWebView2ProcessExtendedInfoCollection; +/ 23933 /+ interface ICoreWebView2Frame; +/ 23934 /+ interface ICoreWebView2Frame2; +/ 23935 /+ interface ICoreWebView2Frame3; +/ 23936 /+ interface ICoreWebView2Frame4; +/ 23937 /+ interface ICoreWebView2Frame5; +/ 23938 /+ interface ICoreWebView2FrameContentLoadingEventHandler; +/ 23939 /+ interface ICoreWebView2FrameCreatedEventArgs; +/ 23940 /+ interface ICoreWebView2FrameCreatedEventHandler; +/ 23941 /+ interface ICoreWebView2FrameDestroyedEventHandler; +/ 23942 /+ interface ICoreWebView2FrameDOMContentLoadedEventHandler; +/ 23943 /+ interface ICoreWebView2FrameNameChangedEventHandler; +/ 23944 /+ interface ICoreWebView2FrameNavigationCompletedEventHandler; +/ 23945 /+ interface ICoreWebView2FrameNavigationStartingEventHandler; +/ 23946 /+ interface ICoreWebView2FramePermissionRequestedEventHandler; +/ 23947 /+ interface ICoreWebView2FrameWebMessageReceivedEventHandler; +/ 23948 /+ interface ICoreWebView2FrameInfo; +/ 23949 /+ interface ICoreWebView2FrameInfo2; +/ 23950 /+ interface ICoreWebView2FrameInfoCollection; +/ 23951 /+ interface ICoreWebView2FrameInfoCollectionIterator; +/ 23952 /+ interface ICoreWebView2FocusChangedEventHandler; +/ 23953 /+ interface ICoreWebView2GetCookiesCompletedHandler; +/ 23954 /+ interface ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler; +/ 23955 /+ interface ICoreWebView2HistoryChangedEventHandler; +/ 23956 /+ interface ICoreWebView2HttpHeadersCollectionIterator; +/ 23957 /+ interface ICoreWebView2HttpRequestHeaders; +/ 23958 /+ interface ICoreWebView2HttpResponseHeaders; +/ 23959 /+ interface ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler; +/ 23960 /+ interface ICoreWebView2LaunchingExternalUriSchemeEventArgs; +/ 23961 /+ interface ICoreWebView2LaunchingExternalUriSchemeEventHandler; +/ 23962 /+ interface ICoreWebView2MoveFocusRequestedEventArgs; +/ 23963 /+ interface ICoreWebView2MoveFocusRequestedEventHandler; +/ 23964 /+ interface ICoreWebView2NavigationCompletedEventArgs; +/ 23965 /+ interface ICoreWebView2NavigationCompletedEventArgs2; +/ 23966 /+ interface ICoreWebView2NavigationCompletedEventHandler; +/ 23967 /+ interface ICoreWebView2NavigationStartingEventArgs; +/ 23968 /+ interface ICoreWebView2NavigationStartingEventArgs2; +/ 23969 /+ interface ICoreWebView2NavigationStartingEventArgs3; +/ 23970 /+ interface ICoreWebView2NavigationStartingEventHandler; +/ 23971 /+ interface ICoreWebView2NewBrowserVersionAvailableEventHandler; +/ 23972 /+ interface ICoreWebView2NewWindowRequestedEventArgs; +/ 23973 /+ interface ICoreWebView2NewWindowRequestedEventArgs2; +/ 23974 /+ interface ICoreWebView2NewWindowRequestedEventArgs3; +/ 23975 /+ interface ICoreWebView2NewWindowRequestedEventHandler; +/ 23976 /+ interface ICoreWebView2PermissionRequestedEventArgs; +/ 23977 /+ interface ICoreWebView2PermissionRequestedEventArgs2; +/ 23978 /+ interface ICoreWebView2PermissionRequestedEventArgs3; +/ 23979 /+ interface ICoreWebView2PermissionRequestedEventHandler; +/ 23980 /+ interface ICoreWebView2PermissionSettingCollectionView; +/ 23981 /+ interface ICoreWebView2PermissionSetting; +/ 23982 /+ interface ICoreWebView2PointerInfo; +/ 23983 /+ interface ICoreWebView2PrintSettings; +/ 23984 /+ interface ICoreWebView2PrintSettings2; +/ 23985 /+ interface ICoreWebView2PrintToPdfCompletedHandler; +/ 23986 /+ interface ICoreWebView2PrintCompletedHandler; +/ 23987 /+ interface ICoreWebView2PrintToPdfStreamCompletedHandler; +/ 23988 /+ interface ICoreWebView2ProcessFailedEventArgs; +/ 23989 /+ interface ICoreWebView2ProcessFailedEventArgs2; +/ 23990 /+ interface ICoreWebView2ProcessFailedEventHandler; +/ 23991 /+ interface ICoreWebView2Profile; +/ 23992 /+ interface ICoreWebView2Profile2; +/ 23993 /+ interface ICoreWebView2Profile3; +/ 23994 /+ interface ICoreWebView2Profile4; +/ 23995 /+ interface ICoreWebView2Profile5; +/ 23996 /+ interface ICoreWebView2Profile6; +/ 23997 /+ interface ICoreWebView2Profile7; +/ 23998 /+ interface ICoreWebView2Profile8; +/ 23999 /+ interface ICoreWebView2ProfileDeletedEventHandler; +/ 24000 /+ interface ICoreWebView2RasterizationScaleChangedEventHandler; +/ 24001 /+ interface ICoreWebView2ServerCertificateErrorDetectedEventArgs; +/ 24002 /+ interface ICoreWebView2ServerCertificateErrorDetectedEventHandler; +/ 24003 /+ interface ICoreWebView2SetPermissionStateCompletedHandler; +/ 24004 /+ interface ICoreWebView2ScriptDialogOpeningEventArgs; +/ 24005 /+ interface ICoreWebView2ScriptDialogOpeningEventHandler; +/ 24006 /+ interface ICoreWebView2Settings; +/ 24007 /+ interface ICoreWebView2Settings2; +/ 24008 /+ interface ICoreWebView2Settings3; +/ 24009 /+ interface ICoreWebView2Settings4; +/ 24010 /+ interface ICoreWebView2Settings5; +/ 24011 /+ interface ICoreWebView2Settings6; +/ 24012 /+ interface ICoreWebView2Settings7; +/ 24013 /+ interface ICoreWebView2Settings8; +/ 24014 /+ interface ICoreWebView2SharedBuffer; +/ 24015 /+ interface ICoreWebView2SourceChangedEventArgs; +/ 24016 /+ interface ICoreWebView2SourceChangedEventHandler; +/ 24017 /+ interface ICoreWebView2StateChangedEventHandler; +/ 24018 /+ interface ICoreWebView2StatusBarTextChangedEventHandler; +/ 24019 /+ interface ICoreWebView2TrySuspendCompletedHandler; +/ 24020 /+ interface ICoreWebView2WebMessageReceivedEventArgs; +/ 24021 /+ interface ICoreWebView2WebMessageReceivedEventHandler; +/ 24022 /+ interface ICoreWebView2WebResourceRequest; +/ 24023 /+ interface ICoreWebView2WebResourceRequestedEventArgs; +/ 24024 /+ interface ICoreWebView2WebResourceRequestedEventHandler; +/ 24025 /+ interface ICoreWebView2WebResourceResponse; +/ 24026 /+ interface ICoreWebView2WebResourceResponseReceivedEventHandler; +/ 24027 /+ interface ICoreWebView2WebResourceResponseReceivedEventArgs; +/ 24028 /+ interface ICoreWebView2WebResourceResponseView; +/ 24029 /+ interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler; +/ 24030 /+ interface ICoreWebView2WindowCloseRequestedEventHandler; +/ 24031 /+ interface ICoreWebView2WindowFeatures; +/ 24032 /+ interface ICoreWebView2ZoomFactorChangedEventHandler; +/ 24033 /+ interface ICoreWebView2IsMutedChangedEventHandler; +/ 24034 /+ interface ICoreWebView2IsDocumentPlayingAudioChangedEventHandler; +/ 24035 /+ interface ICoreWebView2ProcessInfo; +/ 24036 /+ interface ICoreWebView2ProcessInfoCollection; +/ 24037 /+ interface ICoreWebView2ProcessInfosChangedEventHandler; +/ 24038 /+ interface ICoreWebView2FaviconChangedEventHandler; +/ 24039 /+ interface ICoreWebView2GetFaviconCompletedHandler; +/ 24040 /+ interface ICoreWebView2ProfileAddBrowserExtensionCompletedHandler; +/ 24041 /+ interface ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler; +/ 24042 /+ interface ICoreWebView2BrowserExtensionList; +/ 24043 /+ interface ICoreWebView2BrowserExtension; +/ 24044 /+ interface ICoreWebView2BrowserExtensionEnableCompletedHandler; +/ 24045 /+ interface ICoreWebView2BrowserExtensionRemoveCompletedHandler; +/ 24046 24047 // Enums and structs 24048 24049 /// Specifies the image format for the `ICoreWebView2::CapturePreview` method. 24050 24051 @("v1_enum") 24052 enum /+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT+/ 24053 { 24054 24055 /// Indicates that the PNG image format is used. 24056 24057 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG, 24058 24059 /// Indicates the JPEG image format is used. 24060 24061 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG, 24062 } 24063 alias int COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT; 24064 24065 /// Kind of cookie SameSite status used in the ICoreWebView2Cookie interface. 24066 /// These fields match those as specified in https://developer.mozilla.org/docs/Web/HTTP/Cookies#. 24067 /// Learn more about SameSite cookies here: https://tools.ietf.org/html/draft-west-first-party-cookies-07 24068 @("v1_enum") 24069 enum /+ COREWEBVIEW2_COOKIE_SAME_SITE_KIND+/ 24070 { 24071 /// None SameSite type. No restrictions on cross-site requests. 24072 COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE, 24073 /// Lax SameSite type. The cookie will be sent with "same-site" requests, and with "cross-site" top level navigation. 24074 COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX, 24075 /// Strict SameSite type. The cookie will only be sent along with "same-site" requests. 24076 COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT, 24077 } 24078 alias int COREWEBVIEW2_COOKIE_SAME_SITE_KIND; 24079 24080 /// Kind of cross origin resource access allowed for host resources during download. 24081 /// Note that other normal access checks like same origin DOM access check and [Content 24082 /// Security Policy](https://developer.mozilla.org/docs/Web/HTTP/CSP) still apply. 24083 /// The following table illustrates the host resource cross origin access according to 24084 /// access context and `COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND`. 24085 /// 24086 /// Cross Origin Access Context | DENY | ALLOW | DENY_CORS 24087 /// --- | --- | --- | --- 24088 /// From DOM like src of img, script or iframe element| Deny | Allow | Allow 24089 /// From Script like Fetch or XMLHttpRequest| Deny | Allow | Deny 24090 @("v1_enum") 24091 enum /+ COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND+/ 24092 { 24093 /// All cross origin resource access is denied, including normal sub resource access 24094 /// as src of a script or image element. 24095 COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY, 24096 24097 /// All cross origin resource access is allowed, including accesses that are 24098 /// subject to Cross-Origin Resource Sharing(CORS) check. The behavior is similar to 24099 /// a web site sends back http header Access-Control-Allow-Origin: *. 24100 COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW, 24101 24102 /// Cross origin resource access is allowed for normal sub resource access like 24103 /// as src of a script or image element, while any access that subjects to CORS check 24104 /// will be denied. 24105 /// See [Cross-Origin Resource Sharing](https://developer.mozilla.org/docs/Web/HTTP/CORS) 24106 /// for more information. 24107 COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS, 24108 } 24109 alias int COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND; 24110 24111 /// Specifies the JavaScript dialog type used in the 24112 /// `ICoreWebView2ScriptDialogOpeningEventHandler` interface. 24113 24114 @("v1_enum") 24115 enum /+ COREWEBVIEW2_SCRIPT_DIALOG_KIND+/ 24116 { 24117 24118 /// Indicates that the dialog uses the `window.alert` JavaScript function. 24119 24120 COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT, 24121 24122 /// Indicates that the dialog uses the `window.confirm` JavaScript function. 24123 24124 COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM, 24125 24126 /// Indicates that the dialog uses the `window.prompt` JavaScript function. 24127 24128 COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT, 24129 24130 /// Indicates that the dialog uses the `beforeunload` JavaScript event. 24131 24132 COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD, 24133 } 24134 alias int COREWEBVIEW2_SCRIPT_DIALOG_KIND; 24135 24136 /// Specifies the process failure type used in the 24137 /// `ICoreWebView2ProcessFailedEventArgs` interface. The values in this enum 24138 /// make reference to the process kinds in the Chromium architecture. For more 24139 /// information about what these processes are and what they do, see 24140 /// [Browser Architecture - Inside look at modern web browser](https://developers.google.com/web/updates/2018/09/inside-browser-part1). 24141 24142 @("v1_enum") 24143 enum /+ COREWEBVIEW2_PROCESS_FAILED_KIND+/ 24144 { 24145 24146 /// Indicates that the browser process ended unexpectedly. The WebView 24147 /// automatically moves to the Closed state. The app has to recreate a new 24148 /// WebView to recover from this failure. 24149 24150 COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED, 24151 24152 /// Indicates that the main frame's render process ended unexpectedly. Any 24153 /// subframes in the WebView will be gone too. A new render process is 24154 /// created automatically and navigated to an error page. You can use the 24155 /// `Reload` method to try to recover from this failure. Alternatively, you 24156 /// can `Close` and recreate the WebView. 24157 24158 COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED, 24159 24160 /// Indicates that the main frame's render process is unresponsive. Renderer 24161 /// process unresponsiveness can happen for the following reasons: 24162 /// 24163 /// * There is a **long-running script** being executed. For example, the 24164 /// web content in your WebView might be performing a synchronous XHR, or have 24165 /// entered an infinite loop. 24166 /// * The **system is busy**. 24167 /// 24168 /// The `ProcessFailed` event will continue to be raised every few seconds 24169 /// until the renderer process has become responsive again. The application 24170 /// can consider taking action if the event keeps being raised. For example, 24171 /// the application might show UI for the user to decide to keep waiting or 24172 /// reload the page, or navigate away. 24173 24174 COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE, 24175 24176 /// Indicates that a frame-only render process ended unexpectedly. The process 24177 /// exit does not affect the top-level document, only a subset of the 24178 /// subframes within it. The content in these frames is replaced with an error 24179 /// page in the frame. Your application can communicate with the main frame to 24180 /// recover content in the impacted frames, using 24181 /// `ICoreWebView2ProcessFailedEventArgs2::FrameInfosForFailedProcess` to get 24182 /// information about the impacted frames. 24183 24184 COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED, 24185 24186 /// Indicates that a utility process ended unexpectedly. The failed process 24187 /// is recreated automatically. Your application does **not** need to handle 24188 /// recovery for this event, but can use `ICoreWebView2ProcessFailedEventArgs` 24189 /// and `ICoreWebView2ProcessFailedEventArgs2` to collect information about 24190 /// the failure, including `ProcessDescription`. 24191 24192 COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED, 24193 24194 /// Indicates that a sandbox helper process ended unexpectedly. This failure 24195 /// is not fatal. Your application does **not** need to handle recovery for 24196 /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and 24197 /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about 24198 /// the failure. 24199 24200 COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED, 24201 24202 /// Indicates that the GPU process ended unexpectedly. The failed process 24203 /// is recreated automatically. Your application does **not** need to handle 24204 /// recovery for this event, but can use `ICoreWebView2ProcessFailedEventArgs` 24205 /// and `ICoreWebView2ProcessFailedEventArgs2` to collect information about 24206 /// the failure. 24207 24208 COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED, 24209 24210 /// Indicates that a PPAPI plugin process ended unexpectedly. This failure 24211 /// is not fatal. Your application does **not** need to handle recovery for 24212 /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and 24213 /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about 24214 /// the failure, including `ProcessDescription`. 24215 24216 COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED, 24217 24218 /// Indicates that a PPAPI plugin broker process ended unexpectedly. This failure 24219 /// is not fatal. Your application does **not** need to handle recovery for 24220 /// this event, but can use `ICoreWebView2ProcessFailedEventArgs` and 24221 /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about 24222 /// the failure. 24223 24224 COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED, 24225 24226 /// Indicates that a process of unspecified kind ended unexpectedly. Your 24227 /// application can use `ICoreWebView2ProcessFailedEventArgs` and 24228 /// `ICoreWebView2ProcessFailedEventArgs2` to collect information about 24229 /// the failure. 24230 24231 COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED, 24232 } 24233 alias int COREWEBVIEW2_PROCESS_FAILED_KIND; 24234 24235 /// Specifies the process failure reason used in the 24236 /// `ICoreWebView2ProcessFailedEventArgs` interface. For process failures where 24237 /// a process has exited, it indicates the type of issue that produced the 24238 /// process exit. 24239 24240 @("v1_enum") 24241 enum /+ COREWEBVIEW2_PROCESS_FAILED_REASON+/ 24242 { 24243 24244 /// An unexpected process failure occurred. 24245 COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED, 24246 24247 /// The process became unresponsive. 24248 /// This only applies to the main frame's render process. 24249 24250 COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE, 24251 24252 /// The process was terminated. For example, from Task Manager. 24253 24254 COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED, 24255 24256 /// The process crashed. Most crashes will generate dumps in the location 24257 /// indicated by `ICoreWebView2Environment11::get_FailureReportFolderPath`. 24258 24259 COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED, 24260 24261 /// The process failed to launch. 24262 24263 COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED, 24264 24265 /// The process terminated due to running out of memory. 24266 24267 COREWEBVIEW2_PROCESS_FAILED_REASON_OUT_OF_MEMORY, 24268 24269 /// The process exited because its corresponding profile was deleted. 24270 COREWEBVIEW2_PROCESS_FAILED_REASON_PROFILE_DELETED, 24271 } 24272 alias int COREWEBVIEW2_PROCESS_FAILED_REASON; 24273 24274 /// Indicates the type of a permission request. 24275 24276 @("v1_enum") 24277 enum /+ COREWEBVIEW2_PERMISSION_KIND+/ 24278 { 24279 24280 /// Indicates an unknown permission. 24281 24282 COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION, 24283 24284 /// Indicates permission to capture audio. 24285 24286 COREWEBVIEW2_PERMISSION_KIND_MICROPHONE, 24287 24288 /// Indicates permission to capture video. 24289 24290 COREWEBVIEW2_PERMISSION_KIND_CAMERA, 24291 24292 /// Indicates permission to access geolocation. 24293 24294 COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION, 24295 24296 /// Indicates permission to send web notifications. Apps that would like to 24297 /// show notifications should handle `PermissionRequested` events 24298 /// and no browser permission prompt will be shown for notification requests. 24299 /// Note that push notifications are currently unavailable in WebView2. 24300 24301 COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS, 24302 24303 /// Indicates permission to access generic sensor. Generic Sensor covering 24304 /// ambient-light-sensor, accelerometer, gyroscope, and magnetometer. 24305 24306 COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS, 24307 24308 /// Indicates permission to read the system clipboard without a user gesture. 24309 24310 COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ, 24311 24312 /// Indicates permission to automatically download multiple files. Permission 24313 /// is requested when multiple downloads are triggered in quick succession. 24314 24315 COREWEBVIEW2_PERMISSION_KIND_MULTIPLE_AUTOMATIC_DOWNLOADS, 24316 24317 /// Indicates permission to read and write to files or folders on the device. 24318 /// Permission is requested when developers use the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API) 24319 /// to show the file or folder picker to the end user, and then request 24320 /// "readwrite" permission for the user's selection. 24321 24322 COREWEBVIEW2_PERMISSION_KIND_FILE_READ_WRITE, 24323 24324 /// Indicates permission to play audio and video automatically on sites. This 24325 /// permission affects the autoplay attribute and play method of the audio and 24326 /// video HTML elements, and the start method of the Web Audio API. See the 24327 /// [Autoplay guide for media and Web Audio APIs](https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide) for details. 24328 24329 COREWEBVIEW2_PERMISSION_KIND_AUTOPLAY, 24330 24331 /// Indicates permission to use fonts on the device. Permission is requested 24332 /// when developers use the [Local Font Access API](https://wicg.github.io/local-font-access/) 24333 /// to query the system fonts available for styling web content. 24334 24335 COREWEBVIEW2_PERMISSION_KIND_LOCAL_FONTS, 24336 24337 /// Indicates permission to send and receive system exclusive messages to/from MIDI 24338 /// (Musical Instrument Digital Interface) devices. Permission is requested 24339 /// when developers use the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API) 24340 /// to request access to system exclusive MIDI messages. 24341 COREWEBVIEW2_PERMISSION_KIND_MIDI_SYSTEM_EXCLUSIVE_MESSAGES, 24342 24343 /// Indicates permission to open and place windows on the screen. Permission is 24344 /// requested when developers use the [Multi-Screen Window Placement API](https://www.w3.org/TR/window-placement/) 24345 /// to get screen details. 24346 COREWEBVIEW2_PERMISSION_KIND_WINDOW_MANAGEMENT, 24347 } 24348 alias int COREWEBVIEW2_PERMISSION_KIND; 24349 24350 /// Specifies the response to a permission request. 24351 24352 @("v1_enum") 24353 enum /+ COREWEBVIEW2_PERMISSION_STATE+/ 24354 { 24355 24356 /// Specifies that the default browser behavior is used, which normally 24357 /// prompt users for decision. 24358 24359 COREWEBVIEW2_PERMISSION_STATE_DEFAULT, 24360 24361 /// Specifies that the permission request is granted. 24362 24363 COREWEBVIEW2_PERMISSION_STATE_ALLOW, 24364 24365 /// Specifies that the permission request is denied. 24366 24367 COREWEBVIEW2_PERMISSION_STATE_DENY, 24368 } 24369 alias int COREWEBVIEW2_PERMISSION_STATE; 24370 24371 /// Indicates the error status values for web navigations. 24372 24373 @("v1_enum") 24374 enum /+ COREWEBVIEW2_WEB_ERROR_STATUS+/ 24375 { 24376 24377 /// Indicates that an unknown error occurred. 24378 24379 COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN, 24380 24381 /// Indicates that the SSL certificate common name does not match the web 24382 /// address. 24383 24384 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT, 24385 24386 /// Indicates that the SSL certificate has expired. 24387 24388 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED, 24389 24390 /// Indicates that the SSL client certificate contains errors. 24391 24392 COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS, 24393 24394 /// Indicates that the SSL certificate has been revoked. 24395 24396 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED, 24397 24398 /// Indicates that the SSL certificate is not valid. The certificate may not 24399 /// match the public key pins for the host name, the certificate is signed 24400 /// by an untrusted authority or using a weak sign algorithm, the certificate 24401 /// claimed DNS names violate name constraints, the certificate contains a 24402 /// weak key, the validity period of the certificate is too long, lack of 24403 /// revocation information or revocation mechanism, non-unique host name, 24404 /// lack of certificate transparency information, or the certificate is 24405 /// chained to a 24406 /// [legacy Symantec root](https://security.googleblog.com/2018/03/distrust-of-symantec-pki-immediate.html). 24407 24408 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID, 24409 24410 /// Indicates that the host is unreachable. 24411 24412 COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE, 24413 24414 /// Indicates that the connection has timed out. 24415 24416 COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT, 24417 24418 /// Indicates that the server returned an invalid or unrecognized response. 24419 24420 COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE, 24421 24422 /// Indicates that the connection was stopped. 24423 24424 COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED, 24425 24426 /// Indicates that the connection was reset. 24427 24428 COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET, 24429 24430 /// Indicates that the Internet connection has been lost. 24431 24432 COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED, 24433 24434 /// Indicates that a connection to the destination was not established. 24435 24436 COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT, 24437 24438 /// Indicates that the provided host name was not able to be resolved. 24439 24440 COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED, 24441 24442 /// Indicates that the operation was canceled. This status code is also used 24443 /// in the following cases: 24444 /// - When the app cancels a navigation via NavigationStarting event. 24445 /// - For original navigation if the app navigates the WebView2 in a rapid succession 24446 /// away after the load for original navigation commenced, but before it completed. 24447 24448 COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED, 24449 24450 /// Indicates that the request redirect failed. 24451 24452 COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED, 24453 24454 /// Indicates that an unexpected error occurred. 24455 24456 COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR, 24457 24458 /// Indicates that user is prompted with a login, waiting on user action. 24459 /// Initial navigation to a login site will always return this even if app provides 24460 /// credential using BasicAuthenticationRequested. 24461 /// HTTP response status code in this case is 401. 24462 /// See status code reference here: https://developer.mozilla.org/docs/Web/HTTP/Status. 24463 24464 COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED, 24465 24466 /// Indicates that user lacks proper authentication credentials for a proxy server. 24467 /// HTTP response status code in this case is 407. 24468 /// See status code reference here: https://developer.mozilla.org/docs/Web/HTTP/Status. 24469 24470 COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED, 24471 } 24472 alias int COREWEBVIEW2_WEB_ERROR_STATUS; 24473 24474 /// Specifies the web resource request contexts. 24475 24476 @("v1_enum") 24477 enum /+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT+/ 24478 { 24479 24480 /// Specifies all resources. 24481 24482 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL, 24483 24484 /// Specifies a document resource. 24485 24486 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT, 24487 24488 /// Specifies a CSS resource. 24489 24490 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET, 24491 24492 /// Specifies an image resource. 24493 24494 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE, 24495 24496 /// Specifies another media resource such as a video. 24497 24498 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA, 24499 24500 /// Specifies a font resource. 24501 24502 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT, 24503 24504 /// Specifies a script resource. 24505 24506 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT, 24507 24508 /// Specifies an XML HTTP request, Fetch and EventSource API communication. 24509 24510 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST, 24511 24512 /// Specifies a Fetch API communication. 24513 24514 // Note that this isn't working. Fetch API requests are fired as a part 24515 // of COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST. 24516 24517 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH, 24518 24519 /// Specifies a TextTrack resource. 24520 24521 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK, 24522 24523 /// Specifies an EventSource API communication. 24524 24525 // Note that this isn't working. EventSource API requests are fired as a part 24526 // of COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST. 24527 24528 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE, 24529 24530 /// Specifies a WebSocket API communication. 24531 24532 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET, 24533 24534 /// Specifies a Web App Manifest. 24535 24536 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST, 24537 24538 /// Specifies a Signed HTTP Exchange. 24539 24540 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE, 24541 24542 /// Specifies a Ping request. 24543 24544 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING, 24545 24546 /// Specifies a CSP Violation Report. 24547 24548 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT, 24549 24550 /// Specifies an other resource. 24551 24552 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER 24553 } 24554 alias int COREWEBVIEW2_WEB_RESOURCE_CONTEXT; 24555 24556 /// Specifies the reason for moving focus. 24557 24558 @("v1_enum") 24559 enum /+ COREWEBVIEW2_MOVE_FOCUS_REASON+/ 24560 { 24561 24562 /// Specifies that the code is setting focus into WebView. 24563 24564 COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC, 24565 24566 /// Specifies that the focus is moving due to Tab traversal forward. 24567 24568 COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT, 24569 24570 /// Specifies that the focus is moving due to Tab traversal backward. 24571 24572 COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS, 24573 } 24574 alias int COREWEBVIEW2_MOVE_FOCUS_REASON; 24575 24576 /// Specifies the key event type that triggered an `AcceleratorKeyPressed` 24577 /// event. 24578 24579 @("v1_enum") 24580 enum /+ COREWEBVIEW2_KEY_EVENT_KIND+/ 24581 { 24582 24583 /// Specifies that the key event type corresponds to window message 24584 /// `WM_KEYDOWN`. 24585 24586 COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN, 24587 24588 /// Specifies that the key event type corresponds to window message 24589 /// `WM_KEYUP`. 24590 24591 COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP, 24592 24593 /// Specifies that the key event type corresponds to window message 24594 /// `WM_SYSKEYDOWN`. 24595 24596 COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN, 24597 24598 /// Specifies that the key event type corresponds to window message 24599 /// `WM_SYSKEYUP`. 24600 24601 COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP, 24602 } 24603 alias int COREWEBVIEW2_KEY_EVENT_KIND; 24604 24605 /// Specifies the browser process exit type used in the 24606 /// `ICoreWebView2BrowserProcessExitedEventArgs` interface. 24607 24608 @("v1_enum") 24609 enum /+ COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND+/ 24610 { 24611 24612 /// Indicates that the browser process ended normally. 24613 24614 COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_NORMAL, 24615 24616 /// Indicates that the browser process ended unexpectedly. 24617 /// A `ProcessFailed` event will also be sent to listening WebViews from the 24618 /// `ICoreWebView2Environment` associated to the failed process. 24619 24620 COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_FAILED 24621 } 24622 alias int COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND; 24623 24624 /// Contains the information packed into the `LPARAM` sent to a Win32 key 24625 /// event. For more information about `WM_KEYDOWN`, navigate to 24626 /// [WM_KEYDOWN message](/windows/win32/inputdev/wm-keydown). 24627 24628 struct COREWEBVIEW2_PHYSICAL_KEY_STATUS 24629 { 24630 24631 /// Specifies the repeat count for the current message. 24632 24633 UINT32 RepeatCount; 24634 24635 /// Specifies the scan code. 24636 24637 UINT32 ScanCode; 24638 24639 /// Indicates that the key is an extended key. 24640 24641 BOOL IsExtendedKey; 24642 24643 /// Indicates that a menu key is held down (context code). 24644 24645 BOOL IsMenuKeyDown; 24646 24647 /// Indicates that the key was held down. 24648 24649 BOOL WasKeyDown; 24650 24651 /// Indicates that the key was released. 24652 24653 BOOL IsKeyReleased; 24654 } 24655 24656 /// A value representing RGBA color (Red, Green, Blue, Alpha) for WebView2. 24657 /// Each component takes a value from 0 to 255, with 0 being no intensity 24658 /// and 255 being the highest intensity. 24659 24660 struct COREWEBVIEW2_COLOR 24661 { 24662 24663 /// Specifies the intensity of the Alpha ie. opacity value. 0 is transparent, 24664 /// 255 is opaque. 24665 24666 BYTE A; 24667 24668 /// Specifies the intensity of the Red color. 24669 24670 BYTE R; 24671 24672 /// Specifies the intensity of the Green color. 24673 24674 BYTE G; 24675 24676 /// Specifies the intensity of the Blue color. 24677 24678 BYTE B; 24679 } 24680 24681 /// Mouse event type used by SendMouseInput to convey the type of mouse event 24682 /// being sent to WebView. The values of this enum align with the matching 24683 /// WM_* window messages. 24684 24685 @("v1_enum") 24686 enum /+ COREWEBVIEW2_MOUSE_EVENT_KIND+/ 24687 { 24688 24689 /// Mouse horizontal wheel scroll event, WM_MOUSEHWHEEL. 24690 24691 COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL = 0x020E, 24692 24693 /// Left button double click mouse event, WM_LBUTTONDBLCLK. 24694 24695 COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOUBLE_CLICK = 0x0203, 24696 24697 /// Left button down mouse event, WM_LBUTTONDOWN. 24698 24699 COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOWN = 0x0201, 24700 24701 /// Left button up mouse event, WM_LBUTTONUP. 24702 24703 COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_UP = 0x0202, 24704 24705 /// Mouse leave event, WM_MOUSELEAVE. 24706 24707 COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE = 0x02A3, 24708 24709 /// Middle button double click mouse event, WM_MBUTTONDBLCLK. 24710 24711 COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOUBLE_CLICK = 0x0209, 24712 24713 /// Middle button down mouse event, WM_MBUTTONDOWN. 24714 24715 COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOWN = 0x0207, 24716 24717 /// Middle button up mouse event, WM_MBUTTONUP. 24718 24719 COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_UP = 0x0208, 24720 24721 /// Mouse move event, WM_MOUSEMOVE. 24722 24723 COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE = 0x0200, 24724 24725 /// Right button double click mouse event, WM_RBUTTONDBLCLK. 24726 24727 COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOUBLE_CLICK = 0x0206, 24728 24729 /// Right button down mouse event, WM_RBUTTONDOWN. 24730 24731 COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOWN = 0x0204, 24732 24733 /// Right button up mouse event, WM_RBUTTONUP. 24734 24735 COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_UP = 0x0205, 24736 24737 /// Mouse wheel scroll event, WM_MOUSEWHEEL. 24738 24739 COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL = 0x020A, 24740 24741 /// First or second X button double click mouse event, WM_XBUTTONDBLCLK. 24742 24743 COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK = 0x020D, 24744 24745 /// First or second X button down mouse event, WM_XBUTTONDOWN. 24746 24747 COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN = 0x020B, 24748 24749 /// First or second X button up mouse event, WM_XBUTTONUP. 24750 24751 COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP = 0x020C, 24752 24753 /// Mouse Right Button Down event over a nonclient area, WM_NCRBUTTONDOWN. 24754 24755 COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_DOWN = 0x00A4, 24756 24757 /// Mouse Right Button up event over a nonclient area, WM_NCRBUTTONUP. 24758 24759 COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_UP = 0x00A5, 24760 } 24761 alias int COREWEBVIEW2_MOUSE_EVENT_KIND; 24762 24763 /// Mouse event virtual keys associated with a COREWEBVIEW2_MOUSE_EVENT_KIND for 24764 /// SendMouseInput. These values can be combined into a bit flag if more than 24765 /// one virtual key is pressed for the event. The values of this enum align 24766 /// with the matching MK_* mouse keys. 24767 24768 @("v1_enum") 24769 enum /+ COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS+/ 24770 { 24771 24772 /// No additional keys pressed. 24773 24774 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_NONE = 0x0, 24775 24776 /// Left mouse button is down, MK_LBUTTON. 24777 24778 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_LEFT_BUTTON = 0x0001, 24779 24780 /// Right mouse button is down, MK_RBUTTON. 24781 24782 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_RIGHT_BUTTON = 0x0002, 24783 24784 /// SHIFT key is down, MK_SHIFT. 24785 24786 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_SHIFT = 0x0004, 24787 24788 /// CTRL key is down, MK_CONTROL. 24789 24790 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_CONTROL = 0x0008, 24791 24792 /// Middle mouse button is down, MK_MBUTTON. 24793 24794 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_MIDDLE_BUTTON = 0x0010, 24795 24796 /// First X button is down, MK_XBUTTON1 24797 24798 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON1 = 0x0020, 24799 24800 /// Second X button is down, MK_XBUTTON2 24801 24802 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON2 = 0x0040, 24803 } 24804 alias int COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS; 24805 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS) 24806 24807 /// Pointer event type used by SendPointerInput to convey the type of pointer 24808 /// event being sent to WebView. The values of this enum align with the 24809 /// matching WM_POINTER* window messages. 24810 24811 @("v1_enum") 24812 enum /+ COREWEBVIEW2_POINTER_EVENT_KIND+/ 24813 { 24814 24815 /// Corresponds to WM_POINTERACTIVATE. 24816 24817 COREWEBVIEW2_POINTER_EVENT_KIND_ACTIVATE = 0x024B, 24818 24819 /// Corresponds to WM_POINTERDOWN. 24820 24821 COREWEBVIEW2_POINTER_EVENT_KIND_DOWN = 0x0246, 24822 24823 /// Corresponds to WM_POINTERENTER. 24824 24825 COREWEBVIEW2_POINTER_EVENT_KIND_ENTER = 0x0249, 24826 24827 /// Corresponds to WM_POINTERLEAVE. 24828 24829 COREWEBVIEW2_POINTER_EVENT_KIND_LEAVE = 0x024A, 24830 24831 /// Corresponds to WM_POINTERUP. 24832 24833 COREWEBVIEW2_POINTER_EVENT_KIND_UP = 0x0247, 24834 24835 /// Corresponds to WM_POINTERUPDATE. 24836 24837 COREWEBVIEW2_POINTER_EVENT_KIND_UPDATE = 0x0245, 24838 } 24839 alias int COREWEBVIEW2_POINTER_EVENT_KIND; 24840 24841 /// Mode for how the Bounds property is interpreted in relation to the RasterizationScale property. 24842 @("v1_enum") 24843 enum /+ COREWEBVIEW2_BOUNDS_MODE+/ 24844 { 24845 24846 /// Bounds property represents raw pixels. Physical size of Webview is not impacted by RasterizationScale. 24847 24848 COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS, 24849 24850 /// Bounds property represents logical pixels and the RasterizationScale property is used to get the physical size of the WebView. 24851 24852 COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE, 24853 } 24854 alias int COREWEBVIEW2_BOUNDS_MODE; 24855 24856 /// Specifies the client certificate kind. 24857 @("v1_enum") enum /+ COREWEBVIEW2_CLIENT_CERTIFICATE_KIND+/ 24858 { 24859 /// Specifies smart card certificate. 24860 COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_SMART_CARD, 24861 /// Specifies PIN certificate. 24862 COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_PIN, 24863 /// Specifies other certificate. 24864 COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_OTHER, 24865 } 24866 alias int COREWEBVIEW2_CLIENT_CERTIFICATE_KIND; 24867 24868 /// State of the download operation. 24869 @("v1_enum") 24870 enum /+ COREWEBVIEW2_DOWNLOAD_STATE+/ 24871 { 24872 /// The download is in progress. 24873 COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS, 24874 /// The connection with the file host was broken. The `InterruptReason` property 24875 /// can be accessed from `ICoreWebView2DownloadOperation`. See 24876 /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON` for descriptions of kinds of 24877 /// interrupt reasons. Host can check whether an interrupted download can be 24878 /// resumed with the `CanResume` property on the `ICoreWebView2DownloadOperation`. 24879 /// Once resumed, a download is in the `COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS` state. 24880 COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED, 24881 /// The download completed successfully. 24882 COREWEBVIEW2_DOWNLOAD_STATE_COMPLETED, 24883 } 24884 alias int COREWEBVIEW2_DOWNLOAD_STATE; 24885 24886 /// Reason why a download was interrupted. 24887 @("v1_enum") 24888 enum /+ COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON+/ 24889 { 24890 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE, 24891 24892 /// Generic file error. 24893 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED, 24894 /// Access denied due to security restrictions. 24895 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED, 24896 /// Disk full. User should free some space or choose a different location to 24897 /// store the file. 24898 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE, 24899 /// Result file path with file name is too long. 24900 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG, 24901 /// File is too large for file system. 24902 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE, 24903 /// Microsoft Defender Smartscreen detected a virus in the file. 24904 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS, 24905 /// File was in use, too many files opened, or out of memory. 24906 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR, 24907 /// File blocked by local policy. 24908 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED_BY_POLICY, 24909 /// Security check failed unexpectedly. Microsoft Defender SmartScreen could 24910 /// not scan this file. 24911 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED, 24912 /// Seeking past the end of a file in opening a file, as part of resuming an 24913 /// interrupted download. The file did not exist or was not as large as 24914 /// expected. Partially downloaded file was truncated or deleted, and download 24915 /// will be restarted automatically. 24916 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT, 24917 /// Partial file did not match the expected hash and was deleted. Download 24918 /// will be restarted automatically. 24919 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH, 24920 24921 /// Generic network error. User can retry the download manually. 24922 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED, 24923 /// Network operation timed out. 24924 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT, 24925 /// Network connection lost. User can retry the download manually. 24926 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, 24927 /// Server has gone down. User can retry the download manually. 24928 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN, 24929 /// Network request invalid because original or redirected URI is invalid, has 24930 /// an unsupported scheme, or is disallowed by network policy. 24931 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST, 24932 24933 /// Generic server error. User can retry the download manually. 24934 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, 24935 /// Server does not support range requests. 24936 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE, 24937 /// Server does not have the requested data. 24938 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT, 24939 /// Server did not authorize access to resource. 24940 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED, 24941 /// Server certificate problem. 24942 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CERTIFICATE_PROBLEM, 24943 /// Server access forbidden. 24944 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN, 24945 /// Unexpected server response. Responding server may not be intended server. 24946 /// User can retry the download manually. 24947 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE, 24948 /// Server sent fewer bytes than the Content-Length header. Content-length 24949 /// header may be invalid or connection may have closed. Download is treated 24950 /// as complete unless there are 24951 /// [strong validators](https://tools.ietf.org/html/rfc7232#section-2) present 24952 /// to interrupt the download. 24953 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH, 24954 /// Unexpected cross-origin redirect. 24955 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT, 24956 24957 /// User canceled the download. 24958 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED, 24959 /// User shut down the WebView. Resuming downloads that were interrupted 24960 /// during shutdown is not yet supported. 24961 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN, 24962 /// User paused the download. 24963 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED, 24964 24965 /// WebView crashed. 24966 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED, 24967 } 24968 alias int COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON; 24969 24970 /// The orientation for printing, used by the `Orientation` property on 24971 /// `ICoreWebView2PrintSettings`. 24972 @("v1_enum") 24973 enum /+ COREWEBVIEW2_PRINT_ORIENTATION+/ 24974 { 24975 /// Print the page(s) in portrait orientation. 24976 COREWEBVIEW2_PRINT_ORIENTATION_PORTRAIT, 24977 24978 /// Print the page(s) in landscape orientation. 24979 COREWEBVIEW2_PRINT_ORIENTATION_LANDSCAPE, 24980 } 24981 alias int COREWEBVIEW2_PRINT_ORIENTATION; 24982 24983 /// The default download dialog can be aligned to any of the WebView corners 24984 /// by setting the `DefaultDownloadDialogCornerAlignment` property. The default 24985 /// position is top-right corner. 24986 @("v1_enum") 24987 enum /+ COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT+/ 24988 { 24989 24990 /// Top-left corner of the WebView. 24991 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_LEFT, 24992 24993 /// Top-right corner of the WebView. 24994 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_RIGHT, 24995 24996 /// Bottom-left corner of the WebView. 24997 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_LEFT, 24998 24999 /// Bottom-right corner of the WebView. 25000 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_RIGHT, 25001 } 25002 alias int COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT; 25003 25004 /// Indicates the process type used in the ICoreWebView2ProcessInfo interface. 25005 @("v1_enum") 25006 enum /+ COREWEBVIEW2_PROCESS_KIND+/ 25007 { 25008 /// Indicates the browser process kind. 25009 COREWEBVIEW2_PROCESS_KIND_BROWSER, 25010 25011 /// Indicates the render process kind. 25012 COREWEBVIEW2_PROCESS_KIND_RENDERER, 25013 25014 /// Indicates the utility process kind. 25015 COREWEBVIEW2_PROCESS_KIND_UTILITY, 25016 25017 /// Indicates the sandbox helper process kind. 25018 COREWEBVIEW2_PROCESS_KIND_SANDBOX_HELPER, 25019 25020 /// Indicates the GPU process kind. 25021 COREWEBVIEW2_PROCESS_KIND_GPU, 25022 25023 /// Indicates the PPAPI plugin process kind. 25024 COREWEBVIEW2_PROCESS_KIND_PPAPI_PLUGIN, 25025 25026 /// Indicates the PPAPI plugin broker process kind. 25027 COREWEBVIEW2_PROCESS_KIND_PPAPI_BROKER, 25028 } 25029 alias int COREWEBVIEW2_PROCESS_KIND; 25030 25031 // PDF toolbar item. This enum must be in sync with ToolBarItem in pdf-store-data-types.ts 25032 /// Specifies the PDF toolbar item types used for the `ICoreWebView2Settings::put_HiddenPdfToolbarItems` method. 25033 @("v1_enum") 25034 enum /+ COREWEBVIEW2_PDF_TOOLBAR_ITEMS+/ 25035 { 25036 25037 /// No item 25038 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE = 0x0, 25039 25040 /// The save button 25041 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE = 0x0001, 25042 25043 /// The print button 25044 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PRINT = 0x0002, 25045 25046 /// The save as button 25047 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE_AS = 0x0004, 25048 25049 /// The zoom in button 25050 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_IN = 0x0008, 25051 25052 /// The zoom out button 25053 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_OUT = 0x0010, 25054 25055 /// The rotate button 25056 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ROTATE = 0x0020, 25057 25058 /// The fit page button 25059 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FIT_PAGE = 0x0040, 25060 25061 /// The page layout button 25062 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_LAYOUT = 0x0080, 25063 25064 /// The bookmarks button 25065 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_BOOKMARKS = 0x0100, 25066 25067 /// The page select button 25068 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_SELECTOR = 0x0200, 25069 25070 /// The search button 25071 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SEARCH = 0x0400, 25072 25073 /// The full screen button 25074 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FULL_SCREEN = 0x0800, 25075 25076 /// The more settings button 25077 COREWEBVIEW2_PDF_TOOLBAR_ITEMS_MORE_SETTINGS = 0x1000, 25078 } 25079 alias int COREWEBVIEW2_PDF_TOOLBAR_ITEMS; 25080 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_PDF_TOOLBAR_ITEMS) 25081 25082 /// Indicates the kind of context for which the context menu was created 25083 /// for the `ICoreWebView2ContextMenuTarget::get_Kind` method. 25084 /// This enum will always represent the active element that caused the context menu request. 25085 /// If there is a selection with multiple images, audio and text, for example, the element that 25086 /// the end user right clicks on within this selection will be the option represented by this enum. 25087 @("v1_enum") 25088 enum /+ COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND+/ 25089 { 25090 /// Indicates that the context menu was created for the page without any additional content. 25091 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_PAGE, 25092 25093 /// Indicates that the context menu was created for an image element. 25094 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_IMAGE, 25095 25096 /// Indicates that the context menu was created for selected text. 25097 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_SELECTED_TEXT, 25098 25099 /// Indicates that the context menu was created for an audio element. 25100 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_AUDIO, 25101 25102 /// Indicates that the context menu was created for a video element. 25103 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_VIDEO, 25104 } 25105 alias int COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND; 25106 25107 /// Specifies the menu item kind 25108 /// for the `ICoreWebView2ContextMenuItem::get_Kind` method 25109 @("v1_enum") 25110 enum /+ COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND+/ 25111 { 25112 /// Specifies a command menu item kind. 25113 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_COMMAND, 25114 25115 /// Specifies a check box menu item kind. `ContextMenuItem` objects of this kind 25116 /// will need the `IsChecked` property to determine current state of the check box. 25117 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_CHECK_BOX, 25118 25119 /// Specifies a radio button menu item kind. `ContextMenuItem` objects of this kind 25120 /// will need the `IsChecked` property to determine current state of the radio button. 25121 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_RADIO, 25122 25123 /// Specifies a separator menu item kind. `ContextMenuItem` objects of this kind 25124 /// are used to signal a visual separator with no functionality. 25125 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SEPARATOR, 25126 25127 /// Specifies a submenu menu item kind. `ContextMenuItem` objects of this kind will contain 25128 /// a `ContextMenuItemCollection` of its children `ContextMenuItem` objects. 25129 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SUBMENU, 25130 } 25131 alias int COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND; 25132 25133 /// An enum to represent the options for WebView2 color scheme: auto, light, or dark. 25134 @("v1_enum") 25135 enum /+ COREWEBVIEW2_PREFERRED_COLOR_SCHEME+/ 25136 { 25137 /// Auto color scheme. 25138 COREWEBVIEW2_PREFERRED_COLOR_SCHEME_AUTO, 25139 25140 /// Light color scheme. 25141 COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT, 25142 25143 /// Dark color scheme. 25144 COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK 25145 } 25146 alias int COREWEBVIEW2_PREFERRED_COLOR_SCHEME; 25147 25148 /// Specifies the datatype for the 25149 /// `ICoreWebView2Profile2::ClearBrowsingData` method. 25150 @("v1_enum") 25151 enum /+ COREWEBVIEW2_BROWSING_DATA_KINDS+/ 25152 { 25153 25154 /// Specifies file systems data. 25155 COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS = 1 << 0, 25156 25157 /// Specifies data stored by the IndexedDB DOM feature. 25158 COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB = 1 << 1, 25159 25160 /// Specifies data stored by the localStorage DOM API. 25161 COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE = 1 << 2, 25162 25163 /// Specifies data stored by the Web SQL database DOM API. 25164 COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL = 1 << 3, 25165 25166 /// Specifies data stored by the CacheStorage DOM API. 25167 COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE = 1 << 4, 25168 25169 /// Specifies DOM storage data, now and future. This browsing data kind is 25170 /// inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS, 25171 /// COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB, 25172 /// COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE, 25173 /// COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL, 25174 /// COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS, 25175 /// COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE, 25176 /// and some other data kinds not listed yet to keep consistent with 25177 /// [DOM-accessible storage](https://www.w3.org/TR/clear-site-data/#storage). 25178 COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE = 1 << 5, 25179 25180 /// Specifies HTTP cookies data. 25181 COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES = 1 << 6, 25182 25183 /// Specifies all site data, now and future. This browsing data kind 25184 /// is inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE and 25185 /// COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES. New site data types 25186 /// may be added to this data kind in the future. 25187 COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE = 1 << 7, 25188 25189 /// Specifies disk cache. 25190 COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE = 1 << 8, 25191 25192 /// Specifies download history data. 25193 COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY = 1 << 9, 25194 25195 /// Specifies general autofill form data. 25196 /// This excludes password information and includes information like: 25197 /// names, street and email addresses, phone numbers, and arbitrary input. 25198 /// This also includes payment data. 25199 COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL = 1 << 10, 25200 25201 /// Specifies password autosave data. 25202 COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE = 1 << 11, 25203 25204 /// Specifies browsing history data. 25205 COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY = 1 << 12, 25206 25207 /// Specifies settings data. 25208 COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS = 1 << 13, 25209 25210 /// Specifies profile data that should be wiped to make it look like a new profile. 25211 /// This does not delete account-scoped data like passwords but will remove access 25212 /// to account-scoped data by signing the user out. 25213 /// Specifies all profile data, now and future. New profile data types may be added 25214 /// to this data kind in the future. 25215 /// This browsing data kind is inclusive of COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE, 25216 /// COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE, 25217 /// COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY, 25218 /// COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL, 25219 /// COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE, 25220 /// COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY, and 25221 /// COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS. 25222 COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_PROFILE = 1 << 14, 25223 25224 /// Specifies service workers registered for an origin, and clear will result in 25225 /// termination and deregistration of them. 25226 COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS = 1 << 15, 25227 } 25228 alias int COREWEBVIEW2_BROWSING_DATA_KINDS; 25229 // DEFINE_ENUM_FLAG_OPERATORS(COREWEBVIEW2_BROWSING_DATA_KINDS) 25230 25231 /// Specifies the action type when server certificate error is detected to be 25232 /// used in the `ICoreWebView2ServerCertificateErrorDetectedEventArgs` 25233 /// interface. 25234 @("v1_enum") enum /+ COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION+/ 25235 { 25236 /// Indicates to ignore the warning and continue the request with the TLS 25237 /// certificate. This decision is cached for the RequestUri's host and the 25238 /// server certificate in the session. 25239 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW, 25240 25241 /// Indicates to reject the certificate and cancel the request. 25242 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_CANCEL, 25243 25244 /// Indicates to display the default TLS interstitial error page to user for 25245 /// page navigations. 25246 /// For others TLS certificate is rejected and the request is cancelled. 25247 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT 25248 } 25249 alias int COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION; 25250 25251 /// Specifies the image format to use for favicon. 25252 @("v1_enum") 25253 enum /+ COREWEBVIEW2_FAVICON_IMAGE_FORMAT+/ 25254 { 25255 /// Indicates that the PNG image format is used. 25256 COREWEBVIEW2_FAVICON_IMAGE_FORMAT_PNG, 25257 25258 /// Indicates the JPEG image format is used. 25259 COREWEBVIEW2_FAVICON_IMAGE_FORMAT_JPEG, 25260 } 25261 alias int COREWEBVIEW2_FAVICON_IMAGE_FORMAT; 25262 25263 /// Specifies the print dialog kind. 25264 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_DIALOG_KIND+/ 25265 { 25266 /// Opens the browser print preview dialog. 25267 COREWEBVIEW2_PRINT_DIALOG_KIND_BROWSER, 25268 25269 /// Opens the system print dialog. 25270 COREWEBVIEW2_PRINT_DIALOG_KIND_SYSTEM, 25271 } 25272 alias int COREWEBVIEW2_PRINT_DIALOG_KIND; 25273 25274 /// Specifies the duplex option for a print. 25275 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_DUPLEX+/ 25276 { 25277 /// The default duplex for a printer. 25278 COREWEBVIEW2_PRINT_DUPLEX_DEFAULT, 25279 25280 /// Print on only one side of the sheet. 25281 COREWEBVIEW2_PRINT_DUPLEX_ONE_SIDED, 25282 25283 /// Print on both sides of the sheet, flipped along the long edge. 25284 COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_LONG_EDGE, 25285 25286 /// Print on both sides of the sheet, flipped along the short edge. 25287 COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_SHORT_EDGE, 25288 } 25289 alias int COREWEBVIEW2_PRINT_DUPLEX; 25290 25291 /// Specifies the color mode for a print. 25292 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_COLOR_MODE+/ 25293 { 25294 /// The default color mode for a printer. 25295 COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT, 25296 25297 /// Indicate that the printed output will be in color. 25298 COREWEBVIEW2_PRINT_COLOR_MODE_COLOR, 25299 25300 /// Indicate that the printed output will be in shades of gray. 25301 COREWEBVIEW2_PRINT_COLOR_MODE_GRAYSCALE, 25302 } 25303 alias int COREWEBVIEW2_PRINT_COLOR_MODE; 25304 25305 /// Specifies the collation for a print. 25306 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_COLLATION+/ 25307 { 25308 /// The default collation for a printer. 25309 COREWEBVIEW2_PRINT_COLLATION_DEFAULT, 25310 25311 /// Indicate that the collation has been selected for the printed output. 25312 COREWEBVIEW2_PRINT_COLLATION_COLLATED, 25313 25314 /// Indicate that the collation has not been selected for the printed output. 25315 COREWEBVIEW2_PRINT_COLLATION_UNCOLLATED, 25316 } 25317 alias int COREWEBVIEW2_PRINT_COLLATION; 25318 25319 /// Specifies the media size for a print. 25320 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_MEDIA_SIZE+/ 25321 { 25322 /// The default media size for a printer. 25323 COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT, 25324 25325 /// Indicate custom media size that is specific to the printer. 25326 COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM, 25327 } 25328 alias int COREWEBVIEW2_PRINT_MEDIA_SIZE; 25329 25330 /// Indicates the status for printing. 25331 @("v1_enum") enum /+ COREWEBVIEW2_PRINT_STATUS+/ 25332 { 25333 /// Indicates that the print operation is succeeded. 25334 COREWEBVIEW2_PRINT_STATUS_SUCCEEDED, 25335 25336 /// Indicates that the printer is not available. 25337 COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE, 25338 25339 /// Indicates that the print operation is failed. 25340 COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR, 25341 } 25342 alias int COREWEBVIEW2_PRINT_STATUS; 25343 25344 /// Tracking prevention levels. 25345 @("v1_enum") enum /+ COREWEBVIEW2_TRACKING_PREVENTION_LEVEL+/ 25346 { 25347 /// Tracking prevention is turned off. 25348 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE, 25349 /// The least restrictive level of tracking prevention. Set to this level to 25350 /// protect against malicious trackers but allows most other trackers and 25351 /// personalize content and ads. 25352 /// 25353 /// See [Current tracking prevention 25354 /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior) 25355 /// for fine-grained information on what is being blocked with this level and 25356 /// can change with different Edge versions. 25357 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BASIC, 25358 /// The default level of tracking prevention. Set to this level to 25359 /// protect against social media tracking on top of malicious trackers. 25360 /// Content and ads will likely be less personalized. 25361 /// 25362 /// See [Current tracking prevention 25363 /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior) 25364 /// for fine-grained information on what is being blocked with this level and 25365 /// can change with different Edge versions. 25366 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED, 25367 /// The most restrictive level of tracking prevention. Set to this level to 25368 /// protect 25369 /// against malicious trackers and most trackers across sites. Content and ads 25370 /// will likely have minimal personalization. 25371 /// 25372 /// This level blocks the most trackers but could cause some websites to not 25373 /// behave as expected. 25374 /// 25375 /// See [Current tracking prevention 25376 /// behavior](/microsoft-edge/web-platform/tracking-prevention#current-tracking-prevention-behavior) 25377 /// for fine-grained information on what is being blocked with this level and 25378 /// can change with different Edge versions. 25379 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_STRICT, 25380 } 25381 alias int COREWEBVIEW2_TRACKING_PREVENTION_LEVEL; 25382 25383 /// Specifies the desired access from script to `CoreWebView2SharedBuffer`. 25384 @("v1_enum") 25385 enum /+ COREWEBVIEW2_SHARED_BUFFER_ACCESS+/ 25386 { 25387 /// Script from web page only has read access to the shared buffer. 25388 COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, 25389 25390 /// Script from web page has read and write access to the shared buffer. 25391 COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_WRITE 25392 } 25393 alias int COREWEBVIEW2_SHARED_BUFFER_ACCESS; 25394 25395 /// Specifies memory usage target level of WebView. 25396 @("v1_enum") 25397 enum /+ COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL+/ 25398 { 25399 /// Specifies normal memory usage target level. 25400 COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL, 25401 25402 /// Specifies low memory usage target level. 25403 /// Used for inactivate WebView for reduced memory consumption. 25404 COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW, 25405 } 25406 alias int COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL; 25407 25408 /// Specifies the navigation kind of each navigation. 25409 @("v1_enum") 25410 enum /+ COREWEBVIEW2_NAVIGATION_KIND+/ 25411 { 25412 /// A navigation caused by `CoreWebView2.Reload()`, `location.reload()`, the end user 25413 /// using F5 or other UX, or other reload mechanisms to reload the current document 25414 /// without modifying the navigation history. 25415 COREWEBVIEW2_NAVIGATION_KIND_RELOAD = 0, 25416 25417 /// A navigation back or forward to a different entry in the session navigation history, 25418 /// like via `CoreWebView2.Back()`, `location.back()`, the end user pressing Alt+Left 25419 /// or other UX, or other mechanisms to navigate back or forward in the current 25420 /// session navigation history. 25421 /// 25422 // Note: This kind doesn't distinguish back or forward, because we can't 25423 // distinguish it from origin source `blink.mojom.NavigationType`. 25424 COREWEBVIEW2_NAVIGATION_KIND_BACK_OR_FORWARD = 1, 25425 25426 /// A navigation to another document, which can be caused by `CoreWebView2.Navigate()`, 25427 /// `window.location.href = ...`, or other WebView2 or DOM APIs that navigate to a new URI. 25428 COREWEBVIEW2_NAVIGATION_KIND_NEW_DOCUMENT = 2, 25429 } 25430 alias int COREWEBVIEW2_NAVIGATION_KIND; 25431 25432 /// Indicates the frame type used in the `ICoreWebView2FrameInfo` interface. 25433 @("v1_enum") 25434 enum /+ COREWEBVIEW2_FRAME_KIND+/ 25435 { 25436 /// Indicates that the frame is an unknown type frame. We may extend this enum 25437 /// type to identify more frame kinds in the future. 25438 COREWEBVIEW2_FRAME_KIND_UNKNOWN, 25439 /// Indicates that the frame is a primary main frame(webview). 25440 COREWEBVIEW2_FRAME_KIND_MAIN_FRAME, 25441 /// Indicates that the frame is an iframe. 25442 COREWEBVIEW2_FRAME_KIND_IFRAME, 25443 /// Indicates that the frame is an embed element. 25444 COREWEBVIEW2_FRAME_KIND_EMBED, 25445 /// Indicates that the frame is an object element. 25446 COREWEBVIEW2_FRAME_KIND_OBJECT, 25447 } 25448 alias int COREWEBVIEW2_FRAME_KIND; 25449 25450 // End of enums and structs 25451 25452 /// WebView2 enables you to host web content using the latest Microsoft Edge 25453 /// browser and web technology. 25454 25455 const GUID IID_ICoreWebView2 = ICoreWebView2.iid; 25456 25457 interface ICoreWebView2 : IUnknown 25458 { 25459 static const GUID iid = { 0x76eceacb,0x0462,0x4d94,[ 0xac,0x83,0x42,0x3a,0x67,0x93,0x77,0x5e ] }; 25460 25461 /// The `ICoreWebView2Settings` object contains various modifiable settings 25462 /// for the running WebView. 25463 25464 @(" propget") 25465 HRESULT get_Settings(@("out, retval") ICoreWebView2Settings * settings); 25466 25467 /// The URI of the current top level document. This value potentially 25468 /// changes as a part of the `SourceChanged` event that runs for some cases 25469 /// such as navigating to a different site or fragment navigations. It 25470 /// remains the same for other types of navigations such as page refreshes 25471 /// or `history.pushState` with the same URL as the current page. 25472 /// 25473 /// The caller must free the returned string with `CoTaskMemFree`. See 25474 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 25475 /// 25476 /// \snippet ControlComponent.cpp SourceChanged 25477 @(" propget") 25478 HRESULT get_Source(@("out, retval") LPWSTR* uri); 25479 25480 /// Cause a navigation of the top-level document to run to the specified URI. 25481 /// For more information, navigate to [Navigation 25482 /// events](/microsoft-edge/webview2/concepts/navigation-events). 25483 /// 25484 /// \> [!NOTE]\n\> This operation starts a navigation and the corresponding 25485 /// `NavigationStarting` event triggers sometime after `Navigate` runs. 25486 /// 25487 /// \snippet ControlComponent.cpp Navigate 25488 HRESULT Navigate(in LPCWSTR uri); 25489 25490 /// Initiates a navigation to htmlContent as source HTML of a new document. 25491 /// The `htmlContent` parameter may not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size. 25492 /// The origin of the new page is `about:blank`. 25493 /// 25494 /// ```cpp 25495 /// SetVirtualHostNameToFolderMapping( 25496 /// L"appassets.example", L"assets", 25497 /// COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY); 25498 /// 25499 /// WCHAR c_navString[] = LR" 25500 /// <head><link rel='stylesheet' href ='http://appassets.example/wv2.css'/></head> 25501 /// <body> 25502 /// <img src='http://appassets.example/wv2.png' /> 25503 /// <p><a href='http://appassets.example/winrt_test.txt'>Click me</a></p> 25504 /// </body>"; 25505 /// m_webView->NavigateToString(c_navString); 25506 /// ``` 25507 /// \snippet SettingsComponent.cpp NavigateToString 25508 HRESULT NavigateToString(in LPCWSTR htmlContent); 25509 25510 /// Add an event handler for the `NavigationStarting` event. 25511 /// `NavigationStarting` runs when the WebView main frame is requesting 25512 /// permission to navigate to a different URI. Redirects trigger this 25513 /// operation as well, and the navigation id is the same as the original 25514 /// one. 25515 /// 25516 /// Navigations will be blocked until all `NavigationStarting` event handlers 25517 /// return. 25518 /// 25519 /// \snippet SettingsComponent.cpp NavigationStarting 25520 HRESULT add_NavigationStarting( 25521 /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler, 25522 @("out") EventRegistrationToken* token); 25523 25524 /// Remove an event handler previously added with `add_NavigationStarting`. 25525 HRESULT remove_NavigationStarting( 25526 in EventRegistrationToken token); 25527 25528 /// Add an event handler for the `ContentLoading` event. `ContentLoading` 25529 /// triggers before any content is loaded, including scripts added with 25530 /// `AddScriptToExecuteOnDocumentCreated`. `ContentLoading` does not trigger 25531 /// if a same page navigation occurs (such as through `fragment` 25532 /// navigations or `history.pushState` navigations). This operation 25533 /// follows the `NavigationStarting` and `SourceChanged` events and precedes 25534 /// the `HistoryChanged` and `NavigationCompleted` events. 25535 HRESULT add_ContentLoading( 25536 /+[in]+/ ICoreWebView2ContentLoadingEventHandler eventHandler, 25537 @("out") EventRegistrationToken* token); 25538 25539 /// Remove an event handler previously added with `add_ContentLoading`. 25540 HRESULT remove_ContentLoading( 25541 in EventRegistrationToken token); 25542 25543 /// Add an event handler for the `SourceChanged` event. `SourceChanged` 25544 /// triggers when the `Source` property changes. `SourceChanged` runs when 25545 /// navigating to a different site or fragment navigations. It does not 25546 /// trigger for other types of navigations such as page refreshes or 25547 /// `history.pushState` with the same URL as the current page. 25548 /// `SourceChanged` runs before `ContentLoading` for navigation to a new 25549 /// document. 25550 /// 25551 /// \snippet ControlComponent.cpp SourceChanged 25552 HRESULT add_SourceChanged( 25553 /+[in]+/ ICoreWebView2SourceChangedEventHandler eventHandler, 25554 @("out") EventRegistrationToken* token); 25555 25556 /// Remove an event handler previously added with `add_SourceChanged`. 25557 HRESULT remove_SourceChanged( 25558 in EventRegistrationToken token); 25559 25560 /// Add an event handler for the `HistoryChanged` event. `HistoryChanged` is 25561 /// raised for changes to joint session history, which consists of top-level 25562 /// and manual frame navigations. Use `HistoryChanged` to verify that the 25563 /// `CanGoBack` or `CanGoForward` value has changed. `HistoryChanged` also 25564 /// runs for using `GoBack` or `GoForward`. `HistoryChanged` runs after 25565 /// `SourceChanged` and `ContentLoading`. `CanGoBack` is false for 25566 /// navigations initiated through ICoreWebView2Frame APIs if there has not yet 25567 /// been a user gesture. 25568 /// 25569 /// \snippet ControlComponent.cpp HistoryChanged 25570 HRESULT add_HistoryChanged( 25571 /+[in]+/ ICoreWebView2HistoryChangedEventHandler eventHandler, 25572 @("out") EventRegistrationToken* token); 25573 25574 /// Remove an event handler previously added with `add_HistoryChanged`. 25575 HRESULT remove_HistoryChanged( 25576 in EventRegistrationToken token); 25577 25578 /// Add an event handler for the `NavigationCompleted` event. 25579 /// `NavigationCompleted` runs when the WebView has completely loaded 25580 /// (concurrently when `body.onload` runs) or loading stopped with error. 25581 /// 25582 /// \snippet ControlComponent.cpp NavigationCompleted 25583 HRESULT add_NavigationCompleted( 25584 /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler, 25585 @("out") EventRegistrationToken* token); 25586 25587 /// Remove an event handler previously added with `add_NavigationCompleted`. 25588 HRESULT remove_NavigationCompleted( 25589 in EventRegistrationToken token); 25590 25591 /// Add an event handler for the `FrameNavigationStarting` event. 25592 /// `FrameNavigationStarting` triggers when a child frame in the WebView 25593 /// requests permission to navigate to a different URI. Redirects trigger 25594 /// this operation as well, and the navigation id is the same as the original 25595 /// one. 25596 /// 25597 /// Navigations will be blocked until all `FrameNavigationStarting` event 25598 /// handlers return. 25599 /// 25600 /// \snippet SettingsComponent.cpp FrameNavigationStarting 25601 HRESULT add_FrameNavigationStarting( 25602 /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler, 25603 @("out") EventRegistrationToken* token); 25604 25605 /// Remove an event handler previously added with 25606 /// `add_FrameNavigationStarting`. 25607 HRESULT remove_FrameNavigationStarting( 25608 in EventRegistrationToken token); 25609 25610 /// Add an event handler for the `FrameNavigationCompleted` event. 25611 /// `FrameNavigationCompleted` triggers when a child frame has completely 25612 /// loaded (concurrently when `body.onload` has triggered) or loading stopped with error. 25613 /// 25614 /// \snippet ControlComponent.cpp FrameNavigationCompleted 25615 HRESULT add_FrameNavigationCompleted( 25616 /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler, 25617 @("out") EventRegistrationToken* token); 25618 25619 /// Remove an event handler previously added with 25620 /// `add_FrameNavigationCompleted`. 25621 HRESULT remove_FrameNavigationCompleted( 25622 in EventRegistrationToken token); 25623 25624 /// Add an event handler for the `ScriptDialogOpening` event. 25625 /// `ScriptDialogOpening` runs when a JavaScript dialog (`alert`, `confirm`, 25626 /// `prompt`, or `beforeunload`) displays for the webview. This event only 25627 /// triggers if the `ICoreWebView2Settings::AreDefaultScriptDialogsEnabled` 25628 /// property is set to `FALSE`. The `ScriptDialogOpening` event suppresses 25629 /// dialogs or replaces default dialogs with custom dialogs. 25630 /// 25631 /// If a deferral is not taken on the event args, the subsequent scripts are 25632 /// blocked until the event handler returns. If a deferral is taken, the 25633 /// scripts are blocked until the deferral is completed. 25634 /// 25635 /// \snippet SettingsComponent.cpp ScriptDialogOpening 25636 HRESULT add_ScriptDialogOpening( 25637 /+[in]+/ ICoreWebView2ScriptDialogOpeningEventHandler eventHandler, 25638 @("out") EventRegistrationToken* token); 25639 25640 /// Remove an event handler previously added with `add_ScriptDialogOpening`. 25641 HRESULT remove_ScriptDialogOpening( 25642 in EventRegistrationToken token); 25643 25644 /// Add an event handler for the `PermissionRequested` event. 25645 /// `PermissionRequested` runs when content in a WebView requests permission 25646 /// to access some privileged resources. 25647 /// 25648 /// If a deferral is not taken on the event args, the subsequent scripts are 25649 /// blocked until the event handler returns. If a deferral is taken, the 25650 /// scripts are blocked until the deferral is completed. 25651 /// 25652 /// \snippet SettingsComponent.cpp PermissionRequested0 25653 /// \snippet SettingsComponent.cpp PermissionRequested1 25654 HRESULT add_PermissionRequested( 25655 /+[in]+/ ICoreWebView2PermissionRequestedEventHandler eventHandler, 25656 @("out") EventRegistrationToken* token); 25657 25658 /// Remove an event handler previously added with `add_PermissionRequested`. 25659 HRESULT remove_PermissionRequested( 25660 in EventRegistrationToken token); 25661 25662 /// Add an event handler for the `ProcessFailed` event. 25663 /// `ProcessFailed` runs when any of the processes in the 25664 /// [WebView2 Process Group](/microsoft-edge/webview2/concepts/process-model?tabs=csharp#processes-in-the-webview2-runtime) 25665 /// encounters one of the following conditions: 25666 /// 25667 /// Condition | Details 25668 /// ---|--- 25669 /// Unexpected exit | The process indicated by the event args has exited unexpectedly (usually due to a crash). The failure might or might not be recoverable and some failures are auto-recoverable. 25670 /// Unresponsiveness | The process indicated by the event args has become unresponsive to user input. This is only reported for renderer processes, and will run every few seconds until the process becomes responsive again. 25671 /// 25672 /// \> [!NOTE]\n\> When the failing process is the browser process, a 25673 /// `ICoreWebView2Environment5::BrowserProcessExited` event will run too. 25674 /// 25675 /// Your application can use `ICoreWebView2ProcessFailedEventArgs` and 25676 /// `ICoreWebView2ProcessFailedEventArgs2` to identify which condition and 25677 /// process the event is for, and to collect diagnostics and handle recovery 25678 /// if necessary. For more details about which cases need to be handled by 25679 /// your application, see `COREWEBVIEW2_PROCESS_FAILED_KIND`. 25680 /// 25681 /// \snippet ProcessComponent.cpp ProcessFailed 25682 HRESULT add_ProcessFailed( 25683 /+[in]+/ ICoreWebView2ProcessFailedEventHandler eventHandler, 25684 @("out") EventRegistrationToken* token); 25685 25686 /// Remove an event handler previously added with `add_ProcessFailed`. 25687 HRESULT remove_ProcessFailed( 25688 in EventRegistrationToken token); 25689 25690 /// Add the provided JavaScript to a list of scripts that should be run after 25691 /// the global object has been created, but before the HTML document has 25692 /// been parsed and before any other script included by the HTML document is 25693 /// run. This method injects a script that runs on all top-level document 25694 /// and child frame page navigations. This method runs asynchronously, and 25695 /// you must wait for the completion handler to finish before the injected 25696 /// script is ready to run. When this method completes, the `Invoke` method 25697 /// of the handler is run with the `id` of the injected script. `id` is a 25698 /// string. To remove the injected script, use 25699 /// `RemoveScriptToExecuteOnDocumentCreated`. 25700 /// 25701 /// If the method is run in add_NewWindowRequested handler it should be called 25702 /// before the new window is set. If called after setting the NewWindow property, the initial script 25703 /// may or may not apply to the initial navigation and may only apply to the subsequent navigation. 25704 /// For more details see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`. 25705 /// 25706 /// \> [!NOTE]\n\> If an HTML document is running in a sandbox of some kind using 25707 /// [sandbox](https://developer.mozilla.org/docs/Web/HTML/Element/iframe#attr-sandbox) 25708 /// properties or the 25709 /// [Content-Security-Policy](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy) 25710 /// HTTP header affects the script that runs. For example, if the 25711 /// `allow-modals` keyword is not set then requests to run the `alert` 25712 /// function are ignored. 25713 /// 25714 /// \snippet ScriptComponent.cpp AddScriptToExecuteOnDocumentCreated 25715 HRESULT AddScriptToExecuteOnDocumentCreated( 25716 in LPCWSTR javaScript, 25717 /+[in]+/ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler handler); 25718 25719 /// Remove the corresponding JavaScript added using 25720 /// `AddScriptToExecuteOnDocumentCreated` with the specified script ID. The 25721 /// script ID should be the one returned by the `AddScriptToExecuteOnDocumentCreated`. 25722 /// Both use `AddScriptToExecuteOnDocumentCreated` and this method in `NewWindowRequested` 25723 /// event handler at the same time sometimes causes trouble. Since invalid scripts will 25724 /// be ignored, the script IDs you got may not be valid anymore. 25725 HRESULT RemoveScriptToExecuteOnDocumentCreated(in LPCWSTR id); 25726 25727 /// Run JavaScript code from the javascript parameter in the current 25728 /// top-level document rendered in the WebView. The result of evaluating 25729 /// the provided JavaScript is used in this parameter. The result value is 25730 /// a JSON encoded string. If the result is undefined, contains a reference 25731 /// cycle, or otherwise is not able to be encoded into JSON, then the result 25732 /// is considered to be null, which is encoded in JSON as the string "null". 25733 /// 25734 /// \> [!NOTE]\n\> A function that has no explicit return value returns undefined. If the 25735 /// script that was run throws an unhandled exception, then the result is 25736 /// also "null". This method is applied asynchronously. If the method is 25737 /// run after the `NavigationStarting` event during a navigation, the script 25738 /// runs in the new document when loading it, around the time 25739 /// `ContentLoading` is run. This operation executes the script even if 25740 /// `ICoreWebView2Settings::IsScriptEnabled` is set to `FALSE`. 25741 /// 25742 /// \snippet ScriptComponent.cpp ExecuteScript 25743 HRESULT ExecuteScript( 25744 in LPCWSTR javaScript, 25745 /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler); 25746 25747 /// Capture an image of what WebView is displaying. Specify the format of 25748 /// the image with the `imageFormat` parameter. The resulting image binary 25749 /// data is written to the provided `imageStream` parameter. When 25750 /// `CapturePreview` finishes writing to the stream, the `Invoke` method on 25751 /// the provided `handler` parameter is run. This method fails if called 25752 /// before the first ContentLoading event. For example if this is called in 25753 /// the NavigationStarting event for the first navigation it will fail. 25754 /// For subsequent navigations, the method may not fail, but will not capture 25755 /// an image of a given webpage until the ContentLoading event has been fired 25756 /// for it. Any call to this method prior to that will result in a capture of 25757 /// the page being navigated away from. 25758 /// 25759 /// \snippet FileComponent.cpp CapturePreview 25760 HRESULT CapturePreview( 25761 in COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat, 25762 in IStream* imageStream, 25763 /+[in]+/ ICoreWebView2CapturePreviewCompletedHandler handler); 25764 25765 /// Reload the current page. This is similar to navigating to the URI of 25766 /// current top level document including all navigation events firing and 25767 /// respecting any entries in the HTTP cache. But, the back or forward 25768 /// history are not modified. 25769 HRESULT Reload(); 25770 25771 /// Post the specified webMessage to the top level document in this WebView. 25772 /// The main page receives the message by subscribing to the `message` event of the 25773 /// `window.chrome.webview` of the page document. 25774 /// 25775 /// ```cpp 25776 /// window.chrome.webview.addEventListener('message', handler) 25777 /// window.chrome.webview.removeEventListener('message', handler) 25778 /// ``` 25779 /// 25780 /// The event args is an instance of `MessageEvent`. The 25781 /// `ICoreWebView2Settings::IsWebMessageEnabled` setting must be `TRUE` or 25782 /// the web message will not be sent. The `data` property of the event 25783 /// arg is the `webMessage` string parameter parsed as a JSON string into a 25784 /// JavaScript object. The `source` property of the event arg is a reference 25785 /// to the `window.chrome.webview` object. For information about sending 25786 /// messages from the HTML document in the WebView to the host, navigate to 25787 /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived). 25788 /// The message is delivered asynchronously. If a navigation occurs before 25789 /// the message is posted to the page, the message is discarded. 25790 /// 25791 /// \snippet ScenarioWebMessage.cpp WebMessageReceived 25792 HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson); 25793 25794 /// Posts a message that is a simple string rather than a JSON string 25795 /// representation of a JavaScript object. This behaves in exactly the same 25796 /// manner as `PostWebMessageAsJson`, but the `data` property of the event 25797 /// arg of the `window.chrome.webview` message is a string with the same 25798 /// value as `webMessageAsString`. Use this instead of 25799 /// `PostWebMessageAsJson` if you want to communicate using simple strings 25800 /// rather than JSON objects. 25801 HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString); 25802 25803 /// Add an event handler for the `WebMessageReceived` event. 25804 /// `WebMessageReceived` runs when the 25805 /// `ICoreWebView2Settings::IsWebMessageEnabled` setting is set and the 25806 /// top-level document of the WebView runs 25807 /// `window.chrome.webview.postMessage`. The `postMessage` function is 25808 /// `void postMessage(object)` where object is any object supported by JSON 25809 /// conversion. 25810 /// 25811 /// \snippet assets\ScenarioWebMessage.html chromeWebView 25812 /// 25813 /// When the page calls `postMessage`, the object parameter is converted to a 25814 /// JSON string and is posted asynchronously to the host process. This will 25815 /// result in the handler's `Invoke` method being called with the JSON string 25816 /// as a parameter. 25817 /// 25818 /// \snippet ScenarioWebMessage.cpp WebMessageReceived 25819 /// 25820 /// If the same page calls `postMessage` multiple times, the corresponding 25821 /// `WebMessageReceived` events are guaranteed to be fired in the same order. 25822 /// However, if multiple frames call `postMessage`, there is no guaranteed 25823 /// order. In addition, `WebMessageReceived` events caused by calls to 25824 /// `postMessage` are not guaranteed to be sequenced with events caused by DOM 25825 /// APIs. For example, if the page runs 25826 /// 25827 /// ```javascript 25828 /// chrome.webview.postMessage("message"); 25829 /// window.open(); 25830 /// ``` 25831 /// 25832 /// then the `NewWindowRequested` event might be fired before the 25833 /// `WebMessageReceived` event. If you need the `WebMessageReceived` event 25834 /// to happen before anything else, then in the `WebMessageReceived` handler 25835 /// you can post a message back to the page and have the page wait until it 25836 /// receives that message before continuing. 25837 HRESULT add_WebMessageReceived( 25838 /+[in]+/ ICoreWebView2WebMessageReceivedEventHandler handler, 25839 @("out") EventRegistrationToken* token); 25840 25841 /// Remove an event handler previously added with `add_WebMessageReceived`. 25842 HRESULT remove_WebMessageReceived( 25843 in EventRegistrationToken token); 25844 25845 /// Runs an asynchronous `DevToolsProtocol` method. For more information 25846 /// about available methods, navigate to 25847 /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot) 25848 /// . The `methodName` parameter is the full name of the method in the 25849 /// `{domain}.{method}` format. The `parametersAsJson` parameter is a JSON 25850 /// formatted string containing the parameters for the corresponding method. 25851 /// The `Invoke` method of the `handler` is run when the method 25852 /// asynchronously completes. `Invoke` is run with the return object of the 25853 /// method as a JSON string. This function returns E_INVALIDARG if the `methodName` is 25854 /// unknown or the `parametersAsJson` has an error. In the case of such an error, the 25855 /// `returnObjectAsJson` parameter of the handler will include information 25856 /// about the error. 25857 /// Note even though WebView2 dispatches the CDP messages in the order called, 25858 /// CDP method calls may be processed out of order. 25859 /// If you require CDP methods to run in a particular order, you should wait 25860 /// for the previous method's completed handler to run before calling the 25861 /// next method. 25862 /// 25863 /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethod 25864 HRESULT CallDevToolsProtocolMethod( 25865 in LPCWSTR methodName, 25866 in LPCWSTR parametersAsJson, 25867 /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler); 25868 25869 /// The process ID of the browser process that hosts the WebView. 25870 @(" propget") 25871 HRESULT get_BrowserProcessId(@("out, retval") UINT32* value); 25872 25873 /// `TRUE` if the WebView is able to navigate to a previous page in the 25874 /// navigation history. If `CanGoBack` changes value, the `HistoryChanged` 25875 /// event runs. 25876 @(" propget") 25877 HRESULT get_CanGoBack(@("out, retval") BOOL* canGoBack); 25878 25879 /// `TRUE` if the WebView is able to navigate to a next page in the 25880 /// navigation history. If `CanGoForward` changes value, the 25881 /// `HistoryChanged` event runs. 25882 @(" propget") 25883 HRESULT get_CanGoForward(@("out, retval") BOOL* canGoForward); 25884 25885 /// Navigates the WebView to the previous page in the navigation history. 25886 HRESULT GoBack(); 25887 25888 /// Navigates the WebView to the next page in the navigation history. 25889 HRESULT GoForward(); 25890 25891 /// Get a DevTools Protocol event receiver that allows you to subscribe to a 25892 /// DevTools Protocol event. The `eventName` parameter is the full name of 25893 /// the event in the format `{domain}.{event}`. For more information about 25894 /// DevTools Protocol events description and event args, navigate to 25895 /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot). 25896 /// 25897 /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived 25898 HRESULT GetDevToolsProtocolEventReceiver( 25899 in LPCWSTR eventName, 25900 @("out, retval") ICoreWebView2DevToolsProtocolEventReceiver * receiver); 25901 25902 /// Stop all navigations and pending resource fetches. Does not stop scripts. 25903 HRESULT Stop(); 25904 25905 /// Add an event handler for the `NewWindowRequested` event. 25906 /// `NewWindowRequested` runs when content inside the WebView requests to 25907 /// open a new window, such as through `window.open`. The app can pass a 25908 /// target WebView that is considered the opened window or mark the event as 25909 /// `Handled`, in which case WebView2 does not open a window. 25910 /// If either `Handled` or `NewWindow` properties are not set, the target 25911 /// content will be opened on a popup window. 25912 /// 25913 /// If a deferral is not taken on the event args, scripts that resulted in the 25914 /// new window that are requested are blocked until the event handler returns. 25915 /// If a deferral is taken, then scripts are blocked until the deferral is 25916 /// completed or new window is set. 25917 /// 25918 /// For more details and considerations on the target WebView to be supplied 25919 /// at the opened window, see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`. 25920 /// 25921 /// \snippet AppWindow.cpp NewWindowRequested 25922 HRESULT add_NewWindowRequested( 25923 /+[in]+/ ICoreWebView2NewWindowRequestedEventHandler eventHandler, 25924 @("out") EventRegistrationToken* token); 25925 25926 /// Remove an event handler previously added with `add_NewWindowRequested`. 25927 HRESULT remove_NewWindowRequested( 25928 in EventRegistrationToken token); 25929 25930 /// Add an event handler for the `DocumentTitleChanged` event. 25931 /// `DocumentTitleChanged` runs when the `DocumentTitle` property of the 25932 /// WebView changes and may run before or after the `NavigationCompleted` 25933 /// event. 25934 /// 25935 /// \snippet FileComponent.cpp DocumentTitleChanged 25936 HRESULT add_DocumentTitleChanged( 25937 /+[in]+/ ICoreWebView2DocumentTitleChangedEventHandler eventHandler, 25938 @("out") EventRegistrationToken* token); 25939 25940 /// Remove an event handler previously added with `add_DocumentTitleChanged`. 25941 HRESULT remove_DocumentTitleChanged( 25942 in EventRegistrationToken token); 25943 25944 /// The title for the current top-level document. If the document has no 25945 /// explicit title or is otherwise empty, a default that may or may not match 25946 /// the URI of the document is used. 25947 /// 25948 /// The caller must free the returned string with `CoTaskMemFree`. See 25949 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 25950 @(" propget") 25951 HRESULT get_DocumentTitle(@("out, retval") LPWSTR* title); 25952 25953 /// Add the provided host object to script running in the WebView with the 25954 /// specified name. Host objects are exposed as host object proxies using 25955 /// `window.chrome.webview.hostObjects.{name}`. Host object proxies are 25956 /// promises and resolves to an object representing the host object. The 25957 /// promise is rejected if the app has not added an object with the name. 25958 /// When JavaScript code access a property or method of the object, a promise 25959 /// is return, which resolves to the value returned from the host for the 25960 /// property or method, or rejected in case of error, for example, no 25961 /// property or method on the object or parameters are not valid. 25962 /// 25963 /// \> [!NOTE]\n\> While simple types, `IDispatch` and array are supported, and 25964 /// `IUnknown` objects that also implement `IDispatch` are treated as `IDispatch`, 25965 /// generic `IUnknown`, `VT_DECIMAL`, or `VT_RECORD` variant is not supported. 25966 /// Remote JavaScript objects like callback functions are represented as an 25967 /// `VT_DISPATCH` `VARIANT` with the object implementing `IDispatch`. The 25968 /// JavaScript callback method may be invoked using `DISPID_VALUE` for the 25969 /// `DISPID`. Such callback method invocations will return immediately and will 25970 /// not wait for the JavaScript function to run and so will not provide the return 25971 /// value of the JavaScript function. 25972 /// Nested arrays are supported up to a depth of 3. Arrays of by 25973 /// reference types are not supported. `VT_EMPTY` and `VT_NULL` are mapped 25974 /// into JavaScript as `null`. In JavaScript, `null` and undefined are 25975 /// mapped to `VT_EMPTY`. 25976 /// 25977 /// Additionally, all host objects are exposed as 25978 /// `window.chrome.webview.hostObjects.sync.{name}`. Here the host objects 25979 /// are exposed as synchronous host object proxies. These are not promises 25980 /// and function runtimes or property access synchronously block running 25981 /// script waiting to communicate cross process for the host code to run. 25982 /// Accordingly the result may have reliability issues and it is recommended 25983 /// that you use the promise-based asynchronous 25984 /// `window.chrome.webview.hostObjects.{name}` API. 25985 /// 25986 /// Synchronous host object proxies and asynchronous host object proxies may 25987 /// both use a proxy to the same host object. Remote changes made by one 25988 /// proxy propagates to any other proxy of that same host object whether 25989 /// the other proxies and synchronous or asynchronous. 25990 /// 25991 /// While JavaScript is blocked on a synchronous run to native code, that 25992 /// native code is unable to run back to JavaScript. Attempts to do so fail 25993 /// with `HRESULT_FROM_WIN32(ERROR_POSSIBLE_DEADLOCK)`. 25994 /// 25995 /// Host object proxies are JavaScript Proxy objects that intercept all 25996 /// property get, property set, and method invocations. Properties or methods 25997 /// that are a part of the Function or Object prototype are run locally. 25998 /// Additionally any property or method in the 25999 /// `chrome.webview.hostObjects.options.forceLocalProperties` 26000 /// array are also run locally. This defaults to including optional methods 26001 /// that have meaning in JavaScript like `toJSON` and `Symbol.toPrimitive`. 26002 /// Add more to the array as required. 26003 /// 26004 /// The `chrome.webview.hostObjects.cleanupSome` method performs a best 26005 /// effort garbage collection on host object proxies. 26006 /// 26007 /// The `chrome.webview.hostObjects.options` object provides the ability to 26008 /// change some functionality of host objects. 26009 /// 26010 /// Options property | Details 26011 /// ---|--- 26012 /// `forceLocalProperties` | This is an array of host object property names that will be run locally, instead of being called on the native host object. This defaults to `then`, `toJSON`, `Symbol.toString`, and `Symbol.toPrimitive`. You can add other properties to specify that they should be run locally on the javascript host object proxy. 26013 /// `log` | This is a callback that will be called with debug information. For example, you can set this to `console.log.bind(console)` to have it print debug information to the console to help when troubleshooting host object usage. By default this is null. 26014 /// `shouldSerializeDates` | By default this is false, and javascript Date objects will be sent to host objects as a string using `JSON.stringify`. You can set this property to true to have Date objects properly serialize as a `VT_DATE` when sending to the native host object, and have `VT_DATE` properties and return values create a javascript Date object. 26015 /// `defaultSyncProxy` | When calling a method on a synchronous proxy, the result should also be a synchronous proxy. But in some cases, the sync/async context is lost (for example, when providing to native code a reference to a function, and then calling that function in native code). In these cases, the proxy will be asynchronous, unless this property is set. 26016 /// `forceAsyncMethodMatches ` | This is an array of regular expressions. When calling a method on a synchronous proxy, the method call will be performed asynchronously if the method name matches a string or regular expression in this array. Setting this value to `Async` will make any method that ends with Async be an asynchronous method call. If an async method doesn't match here and isn't forced to be asynchronous, the method will be invoked synchronously, blocking execution of the calling JavaScript and then returning the resolution of the promise, rather than returning a promise. 26017 /// `ignoreMemberNotFoundError` | By default, an exception is thrown when attempting to get the value of a proxy property that doesn't exist on the corresponding native class. Setting this property to `true` switches the behavior to match Chakra WinRT projection (and general JavaScript) behavior of returning `undefined` with no error. 26018 /// 26019 /// Host object proxies additionally have the following methods which run 26020 /// locally. 26021 /// 26022 /// Method name | Details 26023 /// ---|--- 26024 ///`applyHostFunction`, `getHostProperty`, `setHostProperty` | Perform a method invocation, property get, or property set on the host object. Use the methods to explicitly force a method or property to run remotely if a conflicting local method or property exists. For instance, `proxy.toString()` runs the local `toString` method on the proxy object. But proxy.applyHostFunction('toString') runs `toString` on the host proxied object instead. 26025 ///`getLocalProperty`, `setLocalProperty` | Perform property get, or property set locally. Use the methods to force getting or setting a property on the host object proxy rather than on the host object it represents. For instance, `proxy.unknownProperty` gets the property named `unknownProperty` from the host proxied object. But proxy.getLocalProperty('unknownProperty') gets the value of the property `unknownProperty` on the proxy object. 26026 ///`sync` | Asynchronous host object proxies expose a sync method which returns a promise for a synchronous host object proxy for the same host object. For example, `chrome.webview.hostObjects.sample.methodCall()` returns an asynchronous host object proxy. Use the `sync` method to obtain a synchronous host object proxy instead: `const syncProxy = await chrome.webview.hostObjects.sample.methodCall().sync()`. 26027 ///`async` | Synchronous host object proxies expose an async method which blocks and returns an asynchronous host object proxy for the same host object. For example, `chrome.webview.hostObjects.sync.sample.methodCall()` returns a synchronous host object proxy. Running the `async` method on this blocks and then returns an asynchronous host object proxy for the same host object: `const asyncProxy = chrome.webview.hostObjects.sync.sample.methodCall().async()`. 26028 ///`then` | Asynchronous host object proxies have a `then` method. Allows proxies to be awaitable. `then` returns a promise that resolves with a representation of the host object. If the proxy represents a JavaScript literal, a copy of that is returned locally. If the proxy represents a function, a non-awaitable proxy is returned. If the proxy represents a JavaScript object with a mix of literal properties and function properties, the a copy of the object is returned with some properties as host object proxies. 26029 /// 26030 /// All other property and method invocations (other than the above Remote 26031 /// object proxy methods, `forceLocalProperties` list, and properties on 26032 /// Function and Object prototypes) are run remotely. Asynchronous host 26033 /// object proxies return a promise representing asynchronous completion of 26034 /// remotely invoking the method, or getting the property. The promise 26035 /// resolves after the remote operations complete and the promises resolve to 26036 /// the resulting value of the operation. Synchronous host object proxies 26037 /// work similarly, but block running JavaScript and wait for the remote 26038 /// operation to complete. 26039 /// 26040 /// Setting a property on an asynchronous host object proxy works slightly 26041 /// differently. The set returns immediately and the return value is the 26042 /// value that is set. This is a requirement of the JavaScript Proxy object. 26043 /// If you need to asynchronously wait for the property set to complete, use 26044 /// the `setHostProperty` method which returns a promise as described above. 26045 /// Synchronous object property set property synchronously blocks until the 26046 /// property is set. 26047 /// 26048 /// For example, suppose you have a COM object with the following interface. 26049 /// 26050 /// \snippet HostObjectSample.idl AddHostObjectInterface 26051 /// 26052 /// Add an instance of this interface into your JavaScript with 26053 /// `AddHostObjectToScript`. In this case, name it `sample`. 26054 /// 26055 /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScript 26056 /// 26057 /// In the HTML document, use the COM object using 26058 /// `chrome.webview.hostObjects.sample`. 26059 /// Note that `CoreWebView2.AddHostObjectToScript` only applies to the 26060 /// top-level document and not to frames. To add host objects to frames use 26061 /// `CoreWebView2Frame.AddHostObjectToScript`. 26062 /// 26063 /// \snippet assets\ScenarioAddHostObject.html HostObjectUsage 26064 /// 26065 /// Exposing host objects to script has security risk. For more information 26066 /// about best practices, navigate to 26067 /// [Best practices for developing secure WebView2 applications](/microsoft-edge/webview2/concepts/security). 26068 HRESULT AddHostObjectToScript(in LPCWSTR name, in VARIANT* object); 26069 26070 /// Remove the host object specified by the name so that it is no longer 26071 /// accessible from JavaScript code in the WebView. While new access 26072 /// attempts are denied, if the object is already obtained by JavaScript code 26073 /// in the WebView, the JavaScript code continues to have access to that 26074 /// object. Run this method for a name that is already removed or never 26075 /// added fails. 26076 HRESULT RemoveHostObjectFromScript(in LPCWSTR name); 26077 26078 /// Opens the DevTools window for the current document in the WebView. Does 26079 /// nothing if run when the DevTools window is already open. 26080 HRESULT OpenDevToolsWindow(); 26081 26082 /// Add an event handler for the `ContainsFullScreenElementChanged` event. 26083 /// `ContainsFullScreenElementChanged` triggers when the 26084 /// `ContainsFullScreenElement` property changes. An HTML element inside the 26085 /// WebView may enter fullscreen to the size of the WebView or leave 26086 /// fullscreen. This event is useful when, for example, a video element 26087 /// requests to go fullscreen. The listener of 26088 /// `ContainsFullScreenElementChanged` may resize the WebView in response. 26089 /// 26090 /// \snippet AppWindow.cpp ContainsFullScreenElementChanged 26091 HRESULT add_ContainsFullScreenElementChanged( 26092 /+[in]+/ ICoreWebView2ContainsFullScreenElementChangedEventHandler eventHandler, 26093 @("out") EventRegistrationToken* token); 26094 26095 /// Remove an event handler previously added with 26096 /// `add_ContainsFullScreenElementChanged`. 26097 HRESULT remove_ContainsFullScreenElementChanged( 26098 in EventRegistrationToken token); 26099 26100 /// Indicates if the WebView contains a fullscreen HTML element. 26101 @(" propget") 26102 HRESULT get_ContainsFullScreenElement( 26103 @("out, retval") BOOL* containsFullScreenElement); 26104 26105 /// Add an event handler for the `WebResourceRequested` event. 26106 /// `WebResourceRequested` runs when the WebView is performing a URL request 26107 /// to a matching URL and resource context filter that was added with 26108 /// `AddWebResourceRequestedFilter`. At least one filter must be added for 26109 /// the event to run. 26110 /// 26111 /// The web resource requested may be blocked until the event handler returns 26112 /// if a deferral is not taken on the event args. If a deferral is taken, 26113 /// then the web resource requested is blocked until the deferral is 26114 /// completed. 26115 /// 26116 /// If this event is subscribed in the add_NewWindowRequested handler it should be called 26117 /// after the new window is set. For more details see `ICoreWebView2NewWindowRequestedEventArgs::put_NewWindow`. 26118 /// 26119 /// This event is by default raised for file, http, and https URI schemes. 26120 /// This is also raised for registered custom URI schemes. For more details 26121 /// see `ICoreWebView2CustomSchemeRegistration`. 26122 /// 26123 /// \snippet SettingsComponent.cpp WebResourceRequested0 26124 /// \snippet SettingsComponent.cpp WebResourceRequested1 26125 HRESULT add_WebResourceRequested( 26126 /+[in]+/ ICoreWebView2WebResourceRequestedEventHandler eventHandler, 26127 @("out") EventRegistrationToken* token); 26128 26129 /// Remove an event handler previously added with `add_WebResourceRequested`. 26130 HRESULT remove_WebResourceRequested( 26131 in EventRegistrationToken token); 26132 26133 /// Adds a URI and resource context filter for the `WebResourceRequested` 26134 /// event. A web resource request with a resource context that matches this 26135 /// filter's resource context and a URI that matches this filter's URI 26136 /// wildcard string will be raised via the `WebResourceRequested` event. 26137 /// 26138 /// The `uri` parameter value is a wildcard string matched against the URI 26139 /// of the web resource request. This is a glob style 26140 /// wildcard string in which a `*` matches zero or more characters and a `?` 26141 /// matches exactly one character. 26142 /// These wildcard characters can be escaped using a backslash just before 26143 /// the wildcard character in order to represent the literal `*` or `?`. 26144 /// 26145 /// The matching occurs over the URI as a whole string and not limiting 26146 /// wildcard matches to particular parts of the URI. 26147 /// The wildcard filter is compared to the URI after the URI has been 26148 /// normalized, any URI fragment has been removed, and non-ASCII hostnames 26149 /// have been converted to punycode. 26150 /// 26151 /// Specifying a `nullptr` for the uri is equivalent to an empty string which 26152 /// matches no URIs. 26153 /// 26154 /// For more information about resource context filters, navigate to 26155 /// [COREWEBVIEW2_WEB_RESOURCE_CONTEXT](/microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_web_resource_context). 26156 /// 26157 /// | URI Filter String | Request URI | Match | Notes | 26158 /// | ---- | ---- | ---- | ---- | 26159 /// | `*` | `https://contoso.com/a/b/c` | Yes | A single * will match all URIs | 26160 /// | `*://contoso.com/*` | `https://contoso.com/a/b/c` | Yes | Matches everything in contoso.com across all schemes | 26161 /// | `*://contoso.com/*` | `https://example.com/?https://contoso.com/` | Yes | But also matches a URI with just the same text anywhere in the URI | 26162 /// | `example` | `https://contoso.com/example` | No | The filter does not perform partial matches | 26163 /// | `*example` | `https://contoso.com/example` | Yes | The filter matches across URI parts | 26164 /// | `*example` | `https://contoso.com/path/?example` | Yes | The filter matches across URI parts | 26165 /// | `*example` | `https://contoso.com/path/?query#example` | No | The filter is matched against the URI with no fragment | 26166 /// | `*example` | `https://example` | No | The URI is normalized before filter matching so the actual URI used for comparison is `https://example/` | 26167 /// | `*example/` | `https://example` | Yes | Just like above, but this time the filter ends with a / just like the normalized URI | 26168 /// | `https://xn--qei.example/` | `https://❤.example/` | Yes | Non-ASCII hostnames are normalized to punycode before wildcard comparison | 26169 /// | `https://❤.example/` | `https://xn--qei.example/` | No | Non-ASCII hostnames are normalized to punycode before wildcard comparison | 26170 HRESULT AddWebResourceRequestedFilter( 26171 in LPCWSTR /*const*/ uri, 26172 in COREWEBVIEW2_WEB_RESOURCE_CONTEXT /*const*/ resourceContext); 26173 26174 /// Removes a matching WebResource filter that was previously added for the 26175 /// `WebResourceRequested` event. If the same filter was added multiple 26176 /// times, then it must be removed as many times as it was added for the 26177 /// removal to be effective. Returns `E_INVALIDARG` for a filter that was 26178 /// never added. 26179 HRESULT RemoveWebResourceRequestedFilter( 26180 in LPCWSTR /*const*/ uri, 26181 in COREWEBVIEW2_WEB_RESOURCE_CONTEXT /*const*/ resourceContext); 26182 26183 /// Add an event handler for the `WindowCloseRequested` event. 26184 /// `WindowCloseRequested` triggers when content inside the WebView 26185 /// requested to close the window, such as after `window.close` is run. The 26186 /// app should close the WebView and related app window if that makes sense 26187 /// to the app. 26188 /// 26189 /// \snippet AppWindow.cpp WindowCloseRequested 26190 HRESULT add_WindowCloseRequested( 26191 /+[in]+/ ICoreWebView2WindowCloseRequestedEventHandler eventHandler, 26192 @("out") EventRegistrationToken* token); 26193 26194 /// Remove an event handler previously added with `add_WindowCloseRequested`. 26195 HRESULT remove_WindowCloseRequested( 26196 in EventRegistrationToken token); 26197 } 26198 26199 /// A continuation of the ICoreWebView2 interface. 26200 const GUID IID_ICoreWebView2_2 = ICoreWebView2_2.iid; 26201 26202 interface ICoreWebView2_2 : ICoreWebView2 26203 { 26204 static const GUID iid = { 0x9E8F0CF8,0xE670,0x4B5E,[ 0xB2,0xBC,0x73,0xE0,0x61,0xE3,0x18,0x4C ] }; 26205 /// Add an event handler for the WebResourceResponseReceived event. 26206 /// WebResourceResponseReceived is raised when the WebView receives the 26207 /// response for a request for a web resource (any URI resolution performed by 26208 /// the WebView; such as HTTP/HTTPS, file and data requests from redirects, 26209 /// navigations, declarations in HTML, implicit favicon lookups, and fetch API 26210 /// usage in the document). The host app can use this event to view the actual 26211 /// request and response for a web resource. There is no guarantee about the 26212 /// order in which the WebView processes the response and the host app's 26213 /// handler runs. The app's handler will not block the WebView from processing 26214 /// the response. 26215 /// \snippet ScenarioAuthentication.cpp WebResourceResponseReceived 26216 HRESULT add_WebResourceResponseReceived( 26217 /+[in]+/ ICoreWebView2WebResourceResponseReceivedEventHandler eventHandler, 26218 @("out") EventRegistrationToken* token); 26219 /// Remove an event handler previously added with 26220 /// add_WebResourceResponseReceived. 26221 HRESULT remove_WebResourceResponseReceived( 26222 in EventRegistrationToken token); 26223 26224 /// Navigates using a constructed WebResourceRequest object. This lets you 26225 /// provide post data or additional request headers during navigation. 26226 /// The headers in the WebResourceRequest override headers 26227 /// added by WebView2 runtime except for Cookie headers. 26228 /// Method can only be either "GET" or "POST". Provided post data will only 26229 /// be sent only if the method is "POST" and the uri scheme is HTTP(S). 26230 /// \snippet ScenarioNavigateWithWebResourceRequest.cpp NavigateWithWebResourceRequest 26231 HRESULT NavigateWithWebResourceRequest(/+[in]+/ ICoreWebView2WebResourceRequest request); 26232 26233 /// Add an event handler for the DOMContentLoaded event. 26234 /// DOMContentLoaded is raised when the initial html document has been parsed. 26235 /// This aligns with the document's DOMContentLoaded event in html. 26236 /// 26237 /// \snippet ScenarioDOMContentLoaded.cpp DOMContentLoaded 26238 HRESULT add_DOMContentLoaded( 26239 /+[in]+/ ICoreWebView2DOMContentLoadedEventHandler eventHandler, 26240 @("out") EventRegistrationToken* token); 26241 26242 /// Remove an event handler previously added with add_DOMContentLoaded. 26243 HRESULT remove_DOMContentLoaded( 26244 in EventRegistrationToken token); 26245 26246 /// Gets the cookie manager object associated with this ICoreWebView2. 26247 /// See ICoreWebView2CookieManager. 26248 /// 26249 /// \snippet ScenarioCookieManagement.cpp CookieManager 26250 @(" propget") 26251 HRESULT get_CookieManager(@("out, retval") ICoreWebView2CookieManager * cookieManager); 26252 26253 /// Exposes the CoreWebView2Environment used to create this CoreWebView2. 26254 @(" propget") 26255 HRESULT get_Environment(@("out, retval") ICoreWebView2Environment * environment); 26256 } 26257 26258 /// A continuation of the ICoreWebView2_2 interface. 26259 const GUID IID_ICoreWebView2_3 = ICoreWebView2_3.iid; 26260 26261 interface ICoreWebView2_3 : ICoreWebView2_2 26262 { 26263 static const GUID iid = { 0xA0D6DF20,0x3B92,0x416D,[ 0xAA,0x0C,0x43,0x7A,0x9C,0x72,0x78,0x57 ] }; 26264 /// An app may call the `TrySuspend` API to have the WebView2 consume less memory. 26265 /// This is useful when a Win32 app becomes invisible, or when a Universal Windows 26266 /// Platform app is being suspended, during the suspended event handler before completing 26267 /// the suspended event. 26268 /// The CoreWebView2Controller's IsVisible property must be false when the API is called. 26269 /// Otherwise, the API fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`. 26270 /// Suspending is similar to putting a tab to sleep in the Edge browser. Suspending pauses 26271 /// WebView script timers and animations, minimizes CPU usage for the associated 26272 /// browser renderer process and allows the operating system to reuse the memory that was 26273 /// used by the renderer process for other processes. 26274 /// Note that Suspend is best effort and considered completed successfully once the request 26275 /// is sent to browser renderer process. If there is a running script, the script will continue 26276 /// to run and the renderer process will be suspended after that script is done. 26277 /// See [Sleeping Tabs FAQ](https://techcommunity.microsoft.com/t5/articles/sleeping-tabs-faq/m-p/1705434) 26278 /// for conditions that might prevent WebView from being suspended. In those situations, 26279 /// the completed handler will be invoked with isSuccessful as false and errorCode as S_OK. 26280 /// The WebView will be automatically resumed when it becomes visible. Therefore, the 26281 /// app normally does not have to call `Resume` explicitly. 26282 /// The app can call `Resume` and then `TrySuspend` periodically for an invisible WebView so that 26283 /// the invisible WebView can sync up with latest data and the page ready to show fresh content 26284 /// when it becomes visible. 26285 /// All WebView APIs can still be accessed when a WebView is suspended. Some APIs like Navigate 26286 /// will auto resume the WebView. To avoid unexpected auto resume, check `IsSuspended` property 26287 /// before calling APIs that might change WebView state. 26288 /// 26289 /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize 26290 /// 26291 /// \snippet ViewComponent.cpp Suspend 26292 /// 26293 HRESULT TrySuspend(/+[in]+/ ICoreWebView2TrySuspendCompletedHandler handler); 26294 26295 /// Resumes the WebView so that it resumes activities on the web page. 26296 /// This API can be called while the WebView2 controller is invisible. 26297 /// The app can interact with the WebView immediately after `Resume`. 26298 /// WebView will be automatically resumed when it becomes visible. 26299 /// 26300 /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize 26301 /// 26302 /// \snippet ViewComponent.cpp Resume 26303 /// 26304 HRESULT Resume(); 26305 26306 /// Whether WebView is suspended. 26307 /// `TRUE` when WebView is suspended, from the time when TrySuspend has completed 26308 /// successfully until WebView is resumed. 26309 @(" propget") 26310 HRESULT get_IsSuspended(@("out, retval") BOOL* isSuspended); 26311 26312 /// Sets a mapping between a virtual host name and a folder path to make available to web sites 26313 /// via that host name. 26314 /// 26315 /// After setting the mapping, documents loaded in the WebView can use HTTP or HTTPS URLs at 26316 /// the specified host name specified by hostName to access files in the local folder specified 26317 /// by folderPath. 26318 /// 26319 /// This mapping applies to both top-level document and iframe navigations as well as subresource 26320 /// references from a document. This also applies to web workers including dedicated/shared worker 26321 /// and service worker, for loading either worker scripts or subresources 26322 /// (importScripts(), fetch(), XHR, etc.) issued from within a worker. 26323 /// For virtual host mapping to work with service worker, please keep the virtual host name 26324 /// mappings consistent among all WebViews sharing the same browser instance. As service worker 26325 /// works independently of WebViews, we merge mappings from all WebViews when resolving virtual 26326 /// host name, inconsistent mappings between WebViews would lead unexpected behavior. 26327 /// 26328 /// Due to a current implementation limitation, media files accessed using virtual host name can be 26329 /// very slow to load. 26330 /// As the resource loaders for the current page might have already been created and running, 26331 /// changes to the mapping might not be applied to the current page and a reload of the page is 26332 /// needed to apply the new mapping. 26333 /// 26334 /// Both absolute and relative paths are supported for folderPath. Relative paths are interpreted 26335 /// as relative to the folder where the exe of the app is in. 26336 /// 26337 /// Note that the folderPath length must not exceed the Windows MAX_PATH limit. 26338 /// 26339 /// accessKind specifies the level of access to resources under the virtual host from other sites. 26340 /// 26341 /// For example, after calling 26342 /// ```cpp 26343 /// SetVirtualHostNameToFolderMapping( 26344 /// L"appassets.example", L"assets", 26345 /// COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY); 26346 /// ``` 26347 /// navigating to `https://appassets.example/my-local-file.html` will 26348 /// show the content from my-local-file.html in the assets subfolder located on disk under 26349 /// the same path as the app's executable file. 26350 /// 26351 /// DOM elements that want to reference local files will have their host reference virtual host in the source. 26352 /// If there are multiple folders being used, define one unique virtual host per folder. 26353 /// For example, you can embed a local image like this 26354 /// ```cpp 26355 /// WCHAR c_navString[] = L"<img src=\"http://appassets.example/wv2.png\"/>"; 26356 /// m_webView->NavigateToString(c_navString); 26357 /// ``` 26358 /// The example above shows the image wv2.png by resolving the folder mapping above. 26359 /// 26360 /// You should typically choose virtual host names that are never used by real sites. 26361 /// If you own a domain such as example.com, another option is to use a subdomain reserved for 26362 /// the app (like my-app.example.com). 26363 /// 26364 /// [RFC 6761](https://tools.ietf.org/html/rfc6761) has reserved several special-use domain 26365 /// names that are guaranteed to not be used by real sites (for example, .example, .test, and 26366 /// .invalid.) 26367 /// 26368 /// Note that using `.local` as the top-level domain name will work but can cause a delay 26369 /// during navigations. You should avoid using `.local` if you can. 26370 /// 26371 /// Apps should use distinct domain names when mapping folder from different sources that 26372 /// should be isolated from each other. For instance, the app might use app-file.example for 26373 /// files that ship as part of the app, and book1.example might be used for files containing 26374 /// books from a less trusted source that were previously downloaded and saved to the disk by 26375 /// the app. 26376 /// 26377 /// The host name used in the APIs is canonicalized using Chromium's host name parsing logic 26378 /// before being used internally. For more information see [HTML5 2.6 URLs](https://dev.w3.org/html5/spec-LC/urls.html). 26379 /// 26380 /// All host names that are canonicalized to the same string are considered identical. 26381 /// For example, `EXAMPLE.COM` and `example.com` are treated as the same host name. 26382 /// An international host name and its Punycode-encoded host name are considered the same host 26383 /// name. There is no DNS resolution for host name and the trailing '.' is not normalized as 26384 /// part of canonicalization. 26385 /// 26386 /// Therefore `example.com` and `example.com.` are treated as different host names. Similarly, 26387 /// `virtual-host-name` and `virtual-host-name.example.com` are treated as different host names 26388 /// even if the machine has a DNS suffix of `example.com`. 26389 /// 26390 /// Specify the minimal cross-origin access necessary to run the app. If there is not a need to 26391 /// access local resources from other origins, use COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY. 26392 /// 26393 /// \snippet AppWindow.cpp AddVirtualHostNameToFolderMapping 26394 /// 26395 /// \snippet AppWindow.cpp LocalUrlUsage 26396 HRESULT SetVirtualHostNameToFolderMapping( 26397 in LPCWSTR hostName, 26398 in LPCWSTR folderPath, 26399 in COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND accessKind); 26400 26401 /// Clears a host name mapping for local folder that was added by `SetVirtualHostNameToFolderMapping`. 26402 HRESULT ClearVirtualHostNameToFolderMapping( 26403 in LPCWSTR hostName); 26404 } 26405 26406 /// A continuation of the ICoreWebView2_3 interface to support FrameCreated and 26407 /// DownloadStarting events. 26408 const GUID IID_ICoreWebView2_4 = ICoreWebView2_4.iid; 26409 26410 interface ICoreWebView2_4 : ICoreWebView2_3 26411 { 26412 static const GUID iid = { 0x20d02d59,0x6df2,0x42dc,[ 0xbd,0x06,0xf9,0x8a,0x69,0x4b,0x13,0x02 ] }; 26413 /// Raised when a new iframe is created. 26414 /// Handle this event to get access to ICoreWebView2Frame objects. 26415 /// Use ICoreWebView2Frame.add_Destroyed to listen for when this iframe goes 26416 /// away. 26417 HRESULT add_FrameCreated( 26418 /+[in]+/ ICoreWebView2FrameCreatedEventHandler eventHandler, 26419 @("out") EventRegistrationToken * token); 26420 26421 /// Remove an event handler previously added with add_FrameCreated. 26422 HRESULT remove_FrameCreated(in EventRegistrationToken token); 26423 26424 /// Add an event handler for the `DownloadStarting` event. This event is 26425 /// raised when a download has begun, blocking the default download dialog, 26426 /// but not blocking the progress of the download. 26427 /// 26428 /// The host can choose to cancel a download, change the result file path, 26429 /// and hide the default download dialog. 26430 /// If the host chooses to cancel the download, the download is not saved, no 26431 /// dialog is shown, and the state is changed to 26432 /// COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED with interrupt reason 26433 /// COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED. Otherwise, the 26434 /// download is saved to the default path after the event completes, 26435 /// and default download dialog is shown if the host did not choose to hide it. 26436 /// The host can change the visibility of the download dialog using the 26437 /// `Handled` property. If the event is not handled, downloads complete 26438 /// normally with the default dialog shown. 26439 /// 26440 /// \snippet ScenarioCustomDownloadExperience.cpp DownloadStarting 26441 HRESULT add_DownloadStarting( 26442 /+[in]+/ ICoreWebView2DownloadStartingEventHandler eventHandler, 26443 @("out") EventRegistrationToken* token); 26444 26445 /// Remove an event handler previously added with `add_DownloadStarting`. 26446 HRESULT remove_DownloadStarting( 26447 in EventRegistrationToken token); 26448 } 26449 26450 /// A continuation of the ICoreWebView2_4 interface to support ClientCertificateRequested 26451 /// event. 26452 const GUID IID_ICoreWebView2_5 = ICoreWebView2_5.iid; 26453 26454 interface ICoreWebView2_5 : ICoreWebView2_4 26455 { 26456 static const GUID iid = { 0xbedb11b8,0xd63c,0x11eb,[ 0xb8,0xbc,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 26457 /// Add an event handler for the ClientCertificateRequested event. 26458 /// The ClientCertificateRequested event is raised when the WebView2 26459 /// is making a request to an HTTP server that needs a client certificate 26460 /// for HTTP authentication. 26461 /// Read more about HTTP client certificates at 26462 /// [RFC 8446 The Transport Layer Security (TLS) Protocol Version 1.3](https://tools.ietf.org/html/rfc8446). 26463 /// 26464 /// With this event you have several options for responding to client certificate requests: 26465 /// 26466 /// Scenario | Handled | Cancel | SelectedCertificate 26467 /// ---------------------------------------------------------- | ------- | ------ | ------------------- 26468 /// Respond to server with a certificate | True | False | MutuallyTrustedCertificate value 26469 /// Respond to server without certificate | True | False | null 26470 /// Display default client certificate selection dialog prompt | False | False | n/a 26471 /// Cancel the request | n/a | True | n/a 26472 /// 26473 /// If you don't handle the event, WebView2 will 26474 /// show the default client certificate selection dialog prompt to user. 26475 /// 26476 /// \snippet SettingsComponent.cpp ClientCertificateRequested1 26477 /// \snippet ScenarioClientCertificateRequested.cpp ClientCertificateRequested2 26478 HRESULT add_ClientCertificateRequested( 26479 /+[in]+/ ICoreWebView2ClientCertificateRequestedEventHandler eventHandler, 26480 @("out") EventRegistrationToken* token); 26481 26482 /// Remove an event handler previously added with add_ClientCertificateRequested. 26483 HRESULT remove_ClientCertificateRequested(in EventRegistrationToken token); 26484 } 26485 26486 /// This interface is an extension of `ICoreWebView2_5` that manages opening 26487 /// the browser task manager window. 26488 const GUID IID_ICoreWebView2_6 = ICoreWebView2_6.iid; 26489 26490 interface ICoreWebView2_6 : ICoreWebView2_5 26491 { 26492 static const GUID iid = { 0x499aadac,0xd92c,0x4589,[ 0x8a,0x75,0x11,0x1b,0xfc,0x16,0x77,0x95 ] }; 26493 /// Opens the Browser Task Manager view as a new window in the foreground. 26494 /// If the Browser Task Manager is already open, this will bring it into 26495 /// the foreground. WebView2 currently blocks the Shift+Esc shortcut for 26496 /// opening the task manager. An end user can open the browser task manager 26497 /// manually via the `Browser task manager` entry of the DevTools window's 26498 /// title bar's context menu. 26499 HRESULT OpenTaskManagerWindow(); 26500 } 26501 26502 /// This interface is an extension of `ICoreWebView2_6` that supports printing 26503 /// to PDF. 26504 const GUID IID_ICoreWebView2_7 = ICoreWebView2_7.iid; 26505 26506 interface ICoreWebView2_7 : ICoreWebView2_6 26507 { 26508 static const GUID iid = { 0x79c24d83,0x09a3,0x45ae,[ 0x94,0x18,0x48,0x7f,0x32,0xa5,0x87,0x40 ] }; 26509 /// Print the current page to PDF asynchronously with the provided settings. 26510 /// See `ICoreWebView2PrintSettings` for description of settings. Passing 26511 /// nullptr for `printSettings` results in default print settings used. 26512 /// 26513 /// Use `resultFilePath` to specify the path to the PDF file. The host should 26514 /// provide an absolute path, including file name. If the path 26515 /// points to an existing file, the file will be overwritten. If the path is 26516 /// not valid, the method fails with `E_INVALIDARG`. 26517 /// 26518 /// The async `PrintToPdf` operation completes when the data has been written 26519 /// to the PDF file. At this time the 26520 /// `ICoreWebView2PrintToPdfCompletedHandler` is invoked. If the 26521 /// application exits before printing is complete, the file is not saved. 26522 /// Only one `Printing` operation can be in progress at a time. If 26523 /// `PrintToPdf` is called while a `PrintToPdf` or `PrintToPdfStream` or `Print` or 26524 /// `ShowPrintUI` job is in progress, the completed handler is immediately invoked 26525 /// with `isSuccessful` set to FALSE. 26526 /// 26527 /// \snippet FileComponent.cpp PrintToPdf 26528 HRESULT PrintToPdf( 26529 in LPCWSTR resultFilePath, 26530 /+[in]+/ ICoreWebView2PrintSettings printSettings, 26531 /+[in]+/ ICoreWebView2PrintToPdfCompletedHandler handler); 26532 } 26533 26534 /// This interface is an extension of `ICoreWebView2_7` that supports media features. 26535 const GUID IID_ICoreWebView2_8 = ICoreWebView2_8.iid; 26536 26537 interface ICoreWebView2_8 : ICoreWebView2_7 26538 { 26539 static const GUID iid = { 0xE9632730,0x6E1E,0x43AB,[ 0xB7,0xB8,0x7B,0x2C,0x9E,0x62,0xE0,0x94 ] }; 26540 /// Adds an event handler for the `IsMutedChanged` event. 26541 /// `IsMutedChanged` is raised when the IsMuted property changes value. 26542 /// 26543 /// \snippet AudioComponent.cpp IsMutedChanged 26544 HRESULT add_IsMutedChanged( 26545 /+[in]+/ ICoreWebView2IsMutedChangedEventHandler eventHandler, 26546 @("out") EventRegistrationToken* token); 26547 26548 /// Remove an event handler previously added with `add_IsMutedChanged`. 26549 HRESULT remove_IsMutedChanged( 26550 in EventRegistrationToken token); 26551 26552 /// Indicates whether all audio output from this CoreWebView2 is muted or not. 26553 /// 26554 /// \snippet AudioComponent.cpp ToggleIsMuted 26555 @(" propget") 26556 HRESULT get_IsMuted(@("out, retval") BOOL* value); 26557 26558 /// Sets the `IsMuted` property. 26559 /// 26560 /// \snippet AudioComponent.cpp ToggleIsMuted 26561 @(" propput") 26562 HRESULT put_IsMuted(in BOOL value); 26563 26564 /// Adds an event handler for the `IsDocumentPlayingAudioChanged` event. 26565 /// `IsDocumentPlayingAudioChanged` is raised when the IsDocumentPlayingAudio property changes value. 26566 /// 26567 /// \snippet AudioComponent.cpp IsDocumentPlayingAudioChanged 26568 HRESULT add_IsDocumentPlayingAudioChanged( 26569 /+[in]+/ ICoreWebView2IsDocumentPlayingAudioChangedEventHandler eventHandler, 26570 @("out") EventRegistrationToken* token); 26571 26572 /// Remove an event handler previously added with `add_IsDocumentPlayingAudioChanged`. 26573 HRESULT remove_IsDocumentPlayingAudioChanged( 26574 in EventRegistrationToken token); 26575 26576 /// Indicates whether any audio output from this CoreWebView2 is playing. 26577 /// This property will be true if audio is playing even if IsMuted is true. 26578 /// 26579 /// \snippet AudioComponent.cpp IsDocumentPlayingAudio 26580 @(" propget") 26581 HRESULT get_IsDocumentPlayingAudio(@("out, retval") BOOL* value); 26582 } 26583 26584 /// This interface is an extension of `ICoreWebView2_8` that default download 26585 /// dialog positioning and anchoring. 26586 const GUID IID_ICoreWebView2_9 = ICoreWebView2_9.iid; 26587 26588 interface ICoreWebView2_9 : ICoreWebView2_8 26589 { 26590 static const GUID iid = { 0x4d7b2eab,0x9fdc,0x468d,[ 0xb9,0x98,0xa9,0x26,0x0b,0x5e,0xd6,0x51 ] }; 26591 /// Raised when the `IsDefaultDownloadDialogOpen` property changes. This event 26592 /// comes after the `DownloadStarting` event. Setting the `Handled` property 26593 /// on the `DownloadStartingEventArgs` disables the default download dialog 26594 /// and ensures that this event is never raised. 26595 HRESULT add_IsDefaultDownloadDialogOpenChanged( 26596 /+[in]+/ ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler handler, 26597 @("out") EventRegistrationToken* token); 26598 26599 /// Remove an event handler previously added with 26600 /// `add_IsDefaultDownloadDialogOpenChanged`. 26601 HRESULT remove_IsDefaultDownloadDialogOpenChanged( 26602 in EventRegistrationToken token); 26603 26604 /// `TRUE` if the default download dialog is currently open. The value of this 26605 /// property changes only when the default download dialog is explicitly 26606 /// opened or closed. Hiding the WebView implicitly hides the dialog, but does 26607 /// not change the value of this property. 26608 @(" propget") 26609 HRESULT get_IsDefaultDownloadDialogOpen(@("out, retval") BOOL* value); 26610 26611 /// Open the default download dialog. If the dialog is opened before there 26612 /// are recent downloads, the dialog shows all past downloads for the 26613 /// current profile. Otherwise, the dialog shows only the recent downloads 26614 /// with a "See more" button for past downloads. Calling this method raises 26615 /// the `IsDefaultDownloadDialogOpenChanged` event if the dialog was closed. 26616 /// No effect if the dialog is already open. 26617 /// 26618 /// \snippet ViewComponent.cpp ToggleDefaultDownloadDialog 26619 HRESULT OpenDefaultDownloadDialog(); 26620 26621 /// Close the default download dialog. Calling this method raises the 26622 /// `IsDefaultDownloadDialogOpenChanged` event if the dialog was open. No 26623 /// effect if the dialog is already closed. 26624 HRESULT CloseDefaultDownloadDialog(); 26625 26626 /// Get the default download dialog corner alignment. 26627 @(" propget") 26628 HRESULT get_DefaultDownloadDialogCornerAlignment( 26629 @("out, retval") COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT* value); 26630 26631 /// Set the default download dialog corner alignment. The dialog can be 26632 /// aligned to any of the WebView corners (see 26633 /// COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT). When the WebView 26634 /// or dialog changes size, the dialog keeps its position relative to the 26635 /// corner. The dialog may become partially or completely outside of the 26636 /// WebView bounds if the WebView is small enough. Set the margin relative to 26637 /// the corner with the `DefaultDownloadDialogMargin` property. The corner 26638 /// alignment and margin should be set during initialization to ensure that 26639 /// they are correctly applied when the layout is first computed, otherwise 26640 /// they will not take effect until the next time the WebView position or size 26641 /// is updated. 26642 /// 26643 /// \snippet ViewComponent.cpp SetDefaultDownloadDialogPosition 26644 @(" propput") 26645 HRESULT put_DefaultDownloadDialogCornerAlignment( 26646 in COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT value); 26647 26648 /// Get the default download dialog margin. 26649 @(" propget") 26650 HRESULT get_DefaultDownloadDialogMargin(@("out, retval") POINT* value); 26651 26652 /// Set the default download dialog margin relative to the WebView corner 26653 /// specified by `DefaultDownloadDialogCornerAlignment`. The margin is a 26654 /// point that describes the vertical and horizontal distances between the 26655 /// chosen WebView corner and the default download dialog corner nearest to 26656 /// it. Positive values move the dialog towards the center of the WebView from 26657 /// the chosen WebView corner, and negative values move the dialog away from 26658 /// it. Use (0, 0) to align the dialog to the WebView corner with no margin. 26659 /// The corner alignment and margin should be set during initialization to 26660 /// ensure that they are correctly applied when the layout is first computed, 26661 /// otherwise they will not take effect until the next time the WebView 26662 /// position or size is updated. 26663 @(" propput") 26664 HRESULT put_DefaultDownloadDialogMargin(in POINT value); 26665 } 26666 26667 /// This interface is an extension of `ICoreWebView2_9` that supports 26668 /// BasicAuthenticationRequested event. 26669 const GUID IID_ICoreWebView2_10 = ICoreWebView2_10.iid; 26670 26671 interface ICoreWebView2_10 : ICoreWebView2_9 26672 { 26673 static const GUID iid = { 0xb1690564,0x6f5a,0x4983,[ 0x8e,0x48,0x31,0xd1,0x14,0x3f,0xec,0xdb ] }; 26674 /// Add an event handler for the BasicAuthenticationRequested event. 26675 /// BasicAuthenticationRequested event is raised when WebView encounters a 26676 /// Basic HTTP Authentication request as described in 26677 /// https://developer.mozilla.org/docs/Web/HTTP/Authentication, a Digest 26678 /// HTTP Authentication request as described in 26679 /// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#digest, 26680 /// an NTLM authentication or a Proxy Authentication request. 26681 /// 26682 /// The host can provide a response with credentials for the authentication or 26683 /// cancel the request. If the host sets the Cancel property to false but does not 26684 /// provide either UserName or Password properties on the Response property, then 26685 /// WebView2 will show the default authentication challenge dialog prompt to 26686 /// the user. 26687 /// 26688 /// \snippet ScenarioAuthentication.cpp BasicAuthenticationRequested 26689 HRESULT add_BasicAuthenticationRequested( 26690 /+[in]+/ ICoreWebView2BasicAuthenticationRequestedEventHandler eventHandler, 26691 @("out") EventRegistrationToken* token); 26692 26693 /// Remove an event handler previously added with add_BasicAuthenticationRequested. 26694 HRESULT remove_BasicAuthenticationRequested( 26695 in EventRegistrationToken token); 26696 } 26697 26698 /// This interface is an extension of `ICoreWebView2_10` that supports sessionId 26699 /// for CDP method calls and ContextMenuRequested event. 26700 const GUID IID_ICoreWebView2_11 = ICoreWebView2_11.iid; 26701 26702 interface ICoreWebView2_11 : ICoreWebView2_10 26703 { 26704 static const GUID iid = { 0x0be78e56,0xc193,0x4051,[ 0xb9,0x43,0x23,0xb4,0x60,0xc0,0x8b,0xdb ] }; 26705 /// Runs an asynchronous `DevToolsProtocol` method for a specific session of 26706 /// an attached target. 26707 /// There could be multiple `DevToolsProtocol` targets in a WebView. 26708 /// Besides the top level page, iframes from different origin and web workers 26709 /// are also separate targets. Attaching to these targets allows interaction with them. 26710 /// When the DevToolsProtocol is attached to a target, the connection is identified 26711 /// by a sessionId. 26712 /// To use this API, you must set the `flatten` parameter to true when calling 26713 /// `Target.attachToTarget` or `Target.setAutoAttach` `DevToolsProtocol` method. 26714 /// Using `Target.setAutoAttach` is recommended as that would allow you to attach 26715 /// to dedicated worker targets, which are not discoverable via other APIs like 26716 /// `Target.getTargets`. 26717 /// For more information about targets and sessions, navigate to 26718 /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot/Target). 26719 /// For more information about available methods, navigate to 26720 /// [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/tot) 26721 /// The `sessionId` parameter is the sessionId for an attached target. 26722 /// nullptr or empty string is treated as the session for the default target for the top page. 26723 /// The `methodName` parameter is the full name of the method in the 26724 /// `{domain}.{method}` format. The `parametersAsJson` parameter is a JSON 26725 /// formatted string containing the parameters for the corresponding method. 26726 /// The `Invoke` method of the `handler` is run when the method 26727 /// asynchronously completes. `Invoke` is run with the return object of the 26728 /// method as a JSON string. This function returns E_INVALIDARG if the `methodName` is 26729 /// unknown or the `parametersAsJson` has an error. In the case of such an error, the 26730 /// `returnObjectAsJson` parameter of the handler will include information 26731 /// about the error. 26732 /// 26733 /// \snippet ScriptComponent.cpp DevToolsProtocolMethodMultiSession 26734 /// 26735 /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethodForSession 26736 HRESULT CallDevToolsProtocolMethodForSession( 26737 in LPCWSTR sessionId, 26738 in LPCWSTR methodName, 26739 in LPCWSTR parametersAsJson, 26740 /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler); 26741 26742 /// Add an event handler for the `ContextMenuRequested` event. 26743 /// `ContextMenuRequested` event is raised when a context menu is requested by the user 26744 /// and the content inside WebView hasn't disabled context menus. 26745 /// The host has the option to create their own context menu with the information provided in 26746 /// the event or can add items to or remove items from WebView context menu. 26747 /// If the host doesn't handle the event, WebView will display the default context menu. 26748 /// 26749 /// \snippet SettingsComponent.cpp EnableCustomMenu 26750 HRESULT add_ContextMenuRequested( 26751 /+[in]+/ ICoreWebView2ContextMenuRequestedEventHandler eventHandler, 26752 @("out") EventRegistrationToken* token); 26753 26754 /// Remove an event handler previously added with `add_ContextMenuRequested`. 26755 HRESULT remove_ContextMenuRequested( 26756 in EventRegistrationToken token); 26757 } 26758 26759 /// This interface is an extension of `ICoreWebView2_11` that supports 26760 /// StatusBarTextChanged event. 26761 const GUID IID_ICoreWebView2_12 = ICoreWebView2_12.iid; 26762 26763 interface ICoreWebView2_12 : ICoreWebView2_11 26764 { 26765 static const GUID iid = { 0x35D69927,0xBCFA,0x4566,[ 0x93,0x49,0x6B,0x3E,0x0D,0x15,0x4C,0xAC ] }; 26766 /// Add an event handler for the `StatusBarTextChanged` event. 26767 /// `StatusBarTextChanged` fires when the WebView is showing a status message, 26768 /// a URL, or an empty string (an indication to hide the status bar). 26769 /// \snippet SettingsComponent.cpp StatusBarTextChanged 26770 HRESULT add_StatusBarTextChanged( 26771 /+[in]+/ ICoreWebView2StatusBarTextChangedEventHandler eventHandler, 26772 @("out") EventRegistrationToken* token); 26773 26774 /// Remove an event handler previously added with `add_StatusBarTextChanged`. 26775 HRESULT remove_StatusBarTextChanged(in EventRegistrationToken token); 26776 26777 /// The status message text. 26778 /// 26779 /// The caller must free the returned string with `CoTaskMemFree`. See 26780 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 26781 @(" propget") 26782 HRESULT get_StatusBarText(@("out, retval") LPWSTR* value); 26783 } 26784 26785 /// This interface is an extension of `ICoreWebView2_12` that supports Profile 26786 /// API. 26787 const GUID IID_ICoreWebView2_13 = ICoreWebView2_13.iid; 26788 26789 interface ICoreWebView2_13 : ICoreWebView2_12 26790 { 26791 static const GUID iid = { 0xF75F09A8,0x667E,0x4983,[ 0x88,0xD6,0xC8,0x77,0x3F,0x31,0x5E,0x84 ] }; 26792 /// The associated `ICoreWebView2Profile` object. If this CoreWebView2 was created with a 26793 /// CoreWebView2ControllerOptions, the CoreWebView2Profile will match those specified options. 26794 /// Otherwise if this CoreWebView2 was created without a CoreWebView2ControllerOptions, then 26795 /// this will be the default CoreWebView2Profile for the corresponding CoreWebView2Environment. 26796 /// 26797 /// \snippet AppWindow.cpp CoreWebView2Profile 26798 @(" propget") 26799 HRESULT get_Profile(@("out, retval") ICoreWebView2Profile * value); 26800 } 26801 26802 /// This interface is an extension of `ICoreWebView2_13` that adds 26803 /// ServerCertificate support. 26804 const GUID IID_ICoreWebView2_14 = ICoreWebView2_14.iid; 26805 26806 interface ICoreWebView2_14 : ICoreWebView2_13 26807 { 26808 static const GUID iid = { 0x6DAA4F10,0x4A90,0x4753,[ 0x88,0x98,0x77,0xC5,0xDF,0x53,0x41,0x65 ] }; 26809 /// Add an event handler for the ServerCertificateErrorDetected event. 26810 /// The ServerCertificateErrorDetected event is raised when the WebView2 26811 /// cannot verify server's digital certificate while loading a web page. 26812 /// 26813 /// This event will raise for all web resources and follows the `WebResourceRequested` event. 26814 /// 26815 /// If you don't handle the event, WebView2 will show the default TLS interstitial error page to the user 26816 /// for navigations, and for non-navigations the web request is cancelled. 26817 /// 26818 /// Note that WebView2 before raising `ServerCertificateErrorDetected` raises a `NavigationCompleted` event 26819 /// with `IsSuccess` as FALSE and any of the below WebErrorStatuses that indicate a certificate failure. 26820 /// 26821 /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT 26822 /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED 26823 /// - COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS 26824 /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED 26825 /// - COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID 26826 /// 26827 /// For more details see `ICoreWebView2NavigationCompletedEventArgs::get_IsSuccess` and handle 26828 /// ServerCertificateErrorDetected event or show the default TLS interstitial error page to the user 26829 /// according to the app needs. 26830 /// 26831 /// WebView2 caches the response when action is `COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW` 26832 /// for the RequestUri's host and the server certificate in the session and the `ServerCertificateErrorDetected` 26833 /// event won't be raised again. 26834 /// 26835 /// To raise the event again you must clear the cache using `ClearServerCertificateErrorActions`. 26836 /// 26837 /// \snippet SettingsComponent.cpp ServerCertificateErrorDetected1 26838 HRESULT add_ServerCertificateErrorDetected( 26839 /+[in]+/ ICoreWebView2ServerCertificateErrorDetectedEventHandler 26840 eventHandler, 26841 @("out") EventRegistrationToken* token); 26842 /// Remove an event handler previously added with add_ServerCertificateErrorDetected. 26843 HRESULT remove_ServerCertificateErrorDetected(in EventRegistrationToken token); 26844 26845 /// Clears all cached decisions to proceed with TLS certificate errors from the 26846 /// ServerCertificateErrorDetected event for all WebView2's sharing the same session. 26847 HRESULT ClearServerCertificateErrorActions( 26848 /+[in]+/ ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler 26849 handler); 26850 } 26851 26852 /// Receives `StatusBarTextChanged` events. 26853 const GUID IID_ICoreWebView2StatusBarTextChangedEventHandler = ICoreWebView2StatusBarTextChangedEventHandler.iid; 26854 26855 interface ICoreWebView2StatusBarTextChangedEventHandler : IUnknown 26856 { 26857 static const GUID iid = { 0xA5E3B0D0,0x10DF,0x4156,[ 0xBF,0xAD,0x3B,0x43,0x86,0x7A,0xCA,0xC6 ] }; 26858 /// Called to provide the implementer with the event args for the 26859 /// corresponding event. No event args exist and the `args` 26860 /// parameter is set to `null`. 26861 HRESULT Invoke( 26862 /+[in]+/ ICoreWebView2 sender, 26863 /+[in]+/ IUnknown args); 26864 } 26865 26866 /// This interface is an extension of `ICoreWebView2_14` that supports status Favicons. 26867 const GUID IID_ICoreWebView2_15 = ICoreWebView2_15.iid; 26868 26869 interface ICoreWebView2_15 : ICoreWebView2_14 26870 { 26871 static const GUID iid = { 0x517B2D1D,0x7DAE,0x4A66,[ 0xA4,0xF4,0x10,0x35,0x2F,0xFB,0x95,0x18 ] }; 26872 /// Add an event handler for the `FaviconChanged` event. 26873 /// The `FaviconChanged` event is raised when the 26874 /// [favicon](https://developer.mozilla.org/docs/Glossary/Favicon) 26875 /// had a different URL then the previous URL. 26876 /// The FaviconChanged event will be raised for first navigating to a new 26877 /// document, whether or not a document declares a Favicon in HTML if the 26878 /// favicon is different from the previous fav icon. The event will 26879 /// be raised again if a favicon is declared in its HTML or has script 26880 /// to set its favicon. The favicon information can then be retrieved with 26881 /// `GetFavicon` and `FaviconUri`. 26882 HRESULT add_FaviconChanged( 26883 /+[in]+/ ICoreWebView2FaviconChangedEventHandler eventHandler, 26884 @("out") EventRegistrationToken* token); 26885 26886 /// Remove the event handler for `FaviconChanged` event. 26887 HRESULT remove_FaviconChanged( 26888 in EventRegistrationToken token); 26889 26890 /// Get the current Uri of the favicon as a string. 26891 /// If the value is null, then the return value is `E_POINTER`, otherwise it is `S_OK`. 26892 /// If a page has no favicon then the value is an empty string. 26893 @(" propget") 26894 HRESULT get_FaviconUri(@("out, retval") LPWSTR* value); 26895 26896 /// Async function for getting the actual image data of the favicon. 26897 /// The image is copied to the `imageStream` object in `ICoreWebView2GetFaviconCompletedHandler`. 26898 /// If there is no image then no data would be copied into the imageStream. 26899 /// The `format` is the file format to return the image stream. 26900 /// `completedHandler` is executed at the end of the operation. 26901 /// 26902 /// \snippet SettingsComponent.cpp FaviconChanged 26903 HRESULT GetFavicon( 26904 in COREWEBVIEW2_FAVICON_IMAGE_FORMAT format, 26905 /+[in]+/ ICoreWebView2GetFaviconCompletedHandler completedHandler); 26906 } 26907 26908 /// A continuation of the `ICoreWebView2` interface to support printing. 26909 const GUID IID_ICoreWebView2_16 = ICoreWebView2_16.iid; 26910 26911 interface ICoreWebView2_16 : ICoreWebView2_15 26912 { 26913 static const GUID iid = { 0x0EB34DC9,0x9F91,0x41E1,[ 0x86,0x39,0x95,0xCD,0x59,0x43,0x90,0x6B ] }; 26914 /// Print the current web page asynchronously to the specified printer with the provided settings. 26915 /// See `ICoreWebView2PrintSettings` for description of settings. Passing 26916 /// nullptr for `printSettings` results in default print settings used. 26917 /// 26918 /// The handler will return `errorCode` as `S_OK` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE 26919 /// if `printerName` doesn't match with the name of any installed printers on the user OS. The handler 26920 /// will return `errorCode` as `E_INVALIDARG` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR 26921 /// if the caller provides invalid settings for a given printer. 26922 /// 26923 /// The async `Print` operation completes when it finishes printing to the printer. 26924 /// At this time the `ICoreWebView2PrintCompletedHandler` is invoked. 26925 /// Only one `Printing` operation can be in progress at a time. If `Print` is called while a `Print` or `PrintToPdf` 26926 /// or `PrintToPdfStream` or `ShowPrintUI` job is in progress, the completed handler is immediately invoked 26927 /// with `E_ABORT` and `printStatus` is COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR. 26928 /// This is only for printing operation on one webview. 26929 /// 26930 /// | errorCode | printStatus | Notes | 26931 /// | --- | --- | --- | 26932 /// | S_OK | COREWEBVIEW2_PRINT_STATUS_SUCCEEDED | Print operation succeeded. | 26933 /// | S_OK | COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE | If specified printer is not found or printer status is not available, offline or error state. | 26934 /// | S_OK | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR | Print operation is failed. | 26935 /// | E_INVALIDARG | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR | If the caller provides invalid settings for the specified printer. | 26936 /// | E_ABORT | COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR | Print operation is failed as printing job already in progress. | 26937 /// 26938 /// \snippet AppWindow.cpp PrintToPrinter 26939 HRESULT Print( 26940 /+[in]+/ ICoreWebView2PrintSettings printSettings, 26941 /+[in]+/ ICoreWebView2PrintCompletedHandler handler); 26942 26943 /// Opens the print dialog to print the current web page. See `COREWEBVIEW2_PRINT_DIALOG_KIND` 26944 /// for descriptions of print dialog kinds. 26945 /// 26946 /// Invoking browser or system print dialog doesn't open new print dialog if 26947 /// it is already open. 26948 /// 26949 /// \snippet AppWindow.cpp ShowPrintUI 26950 HRESULT ShowPrintUI(in COREWEBVIEW2_PRINT_DIALOG_KIND printDialogKind); 26951 26952 /// Provides the Pdf data of current web page asynchronously for the provided settings. 26953 /// Stream will be rewound to the start of the pdf data. 26954 /// 26955 /// See `ICoreWebView2PrintSettings` for description of settings. Passing 26956 /// nullptr for `printSettings` results in default print settings used. 26957 /// 26958 /// The async `PrintToPdfStream` operation completes when it finishes 26959 /// writing to the stream. At this time the `ICoreWebView2PrintToPdfStreamCompletedHandler` 26960 /// is invoked. Only one `Printing` operation can be in progress at a time. If 26961 /// `PrintToPdfStream` is called while a `PrintToPdfStream` or `PrintToPdf` or `Print` 26962 /// or `ShowPrintUI` job is in progress, the completed handler is immediately invoked with `E_ABORT`. 26963 /// This is only for printing operation on one webview. 26964 /// 26965 /// \snippet AppWindow.cpp PrintToPdfStream 26966 HRESULT PrintToPdfStream(/+[in]+/ ICoreWebView2PrintSettings printSettings, 26967 /+[in]+/ ICoreWebView2PrintToPdfStreamCompletedHandler handler); 26968 } 26969 26970 /// Receives the result of the `Print` method. 26971 const GUID IID_ICoreWebView2PrintCompletedHandler = ICoreWebView2PrintCompletedHandler.iid; 26972 26973 interface ICoreWebView2PrintCompletedHandler : IUnknown 26974 { 26975 static const GUID iid = { 0x8FD80075,0xED08,0x42DB,[ 0x85,0x70,0xF5,0xD1,0x49,0x77,0x46,0x1E ] }; 26976 /// Provides the result of the corresponding asynchronous method. 26977 HRESULT Invoke(in HRESULT errorCode, in COREWEBVIEW2_PRINT_STATUS printStatus); 26978 } 26979 26980 /// This interface is an extension of `ICoreWebView2_16` that supports shared buffer based on file mapping. 26981 const GUID IID_ICoreWebView2_17 = ICoreWebView2_17.iid; 26982 26983 interface ICoreWebView2_17 : ICoreWebView2_16 26984 { 26985 static const GUID iid = { 0x702E75D4,0xFD44,0x434D,[ 0x9D,0x70,0x1A,0x68,0xA6,0xB1,0x19,0x2A ] }; 26986 /// Share a shared buffer object with script of the main frame in the WebView. 26987 /// The script will receive a `sharedbufferreceived` event from chrome.webview. 26988 /// The event arg for that event will have the following methods and properties: 26989 /// `getBuffer()`: return an ArrayBuffer object with the backing content from the shared buffer. 26990 /// `additionalData`: an object as the result of parsing `additionalDataAsJson` as JSON string. 26991 /// This property will be `undefined` if `additionalDataAsJson` is nullptr or empty string. 26992 /// `source`: with a value set as `chrome.webview` object. 26993 /// If a string is provided as `additionalDataAsJson` but it is not a valid JSON string, 26994 /// the API will fail with `E_INVALIDARG`. 26995 /// If `access` is COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, the script will only have read access to the buffer. 26996 /// If the script tries to modify the content in a read only buffer, it will cause an access 26997 /// violation in WebView renderer process and crash the renderer process. 26998 /// If the shared buffer is already closed, the API will fail with `RO_E_CLOSED`. 26999 /// 27000 /// The script code should call `chrome.webview.releaseBuffer` with 27001 /// the shared buffer as the parameter to release underlying resources as soon 27002 /// as it does not need access to the shared buffer any more. 27003 /// 27004 /// The application can post the same shared buffer object to multiple web pages or iframes, or 27005 /// post to the same web page or iframe multiple times. Each `PostSharedBufferToScript` will 27006 /// create a separate ArrayBuffer object with its own view of the memory and is separately 27007 /// released. The underlying shared memory will be released when all the views are released. 27008 /// 27009 /// For example, if we want to send data to script for one time read only consumption. 27010 /// 27011 /// \snippet ScenarioSharedBuffer.cpp OneTimeShareBuffer 27012 /// 27013 /// In the HTML document, 27014 /// 27015 /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_1 27016 /// 27017 /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_2 27018 /// 27019 /// Sharing a buffer to script has security risk. You should only share buffer with trusted site. 27020 /// If a buffer is shared to a untrusted site, possible sensitive information could be leaked. 27021 /// If a buffer is shared as modifiable by the script and the script modifies it in an unexpected way, 27022 /// it could result in corrupted data that might even crash the application. 27023 /// 27024 HRESULT PostSharedBufferToScript( 27025 /+[in]+/ ICoreWebView2SharedBuffer sharedBuffer, 27026 in COREWEBVIEW2_SHARED_BUFFER_ACCESS access, 27027 in LPCWSTR additionalDataAsJson); 27028 } 27029 27030 /// Receives the result of the `PrintToPdfStream` method. 27031 /// `errorCode` returns S_OK if the PrintToPdfStream operation succeeded. 27032 /// The printable pdf data is returned in the `pdfStream` object. 27033 const GUID IID_ICoreWebView2PrintToPdfStreamCompletedHandler = ICoreWebView2PrintToPdfStreamCompletedHandler.iid; 27034 27035 interface ICoreWebView2PrintToPdfStreamCompletedHandler : IUnknown 27036 { 27037 static const GUID iid = { 0x4C9F8229,0x8F93,0x444F,[ 0xA7,0x11,0x2C,0x0D,0xFD,0x63,0x59,0xD5 ] }; 27038 /// Provides the result of the corresponding asynchronous method. 27039 HRESULT Invoke(in HRESULT errorCode, in IStream* pdfStream); 27040 } 27041 27042 /// Settings used by the `Print` method. 27043 const GUID IID_ICoreWebView2PrintSettings2 = ICoreWebView2PrintSettings2.iid; 27044 27045 interface ICoreWebView2PrintSettings2 : ICoreWebView2PrintSettings 27046 { 27047 static const GUID iid = { 0xCA7F0E1F,0x3484,0x41D1,[ 0x8C,0x1A,0x65,0xCD,0x44,0xA6,0x3F,0x8D ] }; 27048 /// Page range to print. Defaults to empty string, which means print all pages. 27049 /// If the Page range is empty string or null, then it applies the default. 27050 /// 27051 /// The PageRanges property is a list of page ranges specifying one or more pages that 27052 /// should be printed separated by commas. Any whitespace between page ranges is ignored. 27053 /// A valid page range is either a single integer identifying the page to print, or a range 27054 /// in the form `[start page]-[last page]` where `start page` and `last page` are integers 27055 /// identifying the first and last inclusive pages respectively to print. 27056 /// Every page identifier is an integer greater than 0 unless wildcards are used (see below examples). 27057 /// The first page is 1. 27058 /// 27059 /// In a page range of the form `[start page]-[last page]` the start page number must be 27060 /// larger than 0 and less than or equal to the document's total page count. 27061 /// If the `start page` is not present, then 1 is used as the `start page`. 27062 /// The `last page` must be larger than the `start page`. 27063 /// If the `last page` is not present, then the document total page count is used as the `last page`. 27064 /// 27065 /// Repeating a page does not print it multiple times. To print multiple times, use the `Copies` property. 27066 /// 27067 /// The pages are always printed in ascending order, even if specified in non-ascending order. 27068 /// 27069 /// If page range is not valid or if a page is greater than document total page count, 27070 /// `ICoreWebView2PrintCompletedHandler` or `ICoreWebView2PrintToPdfStreamCompletedHandler` 27071 /// handler will return `E_INVALIDARG`. 27072 /// 27073 /// The following examples assume a document with 20 total pages. 27074 /// 27075 /// | Example | Result | Notes | 27076 /// | --- | --- | --- | 27077 /// | "2" | Page 2 | | 27078 /// | "1-4, 9, 3-6, 10, 11" | Pages 1-6, 9-11 | | 27079 /// | "1-4, -6" | Pages 1-6 | The "-6" is interpreted as "1-6". | 27080 /// | "2-" | Pages 2-20 | The "2-" is interpreted as "pages 2 to the end of the document". | 27081 /// | "4-2, 11, -6" | Invalid | "4-2" is an invalid range. | 27082 /// | "-" | Pages 1-20 | The "-" is interpreted as "page 1 to the end of the document". | 27083 /// | "1-4dsf, 11" | Invalid | | 27084 /// | "2-2" | Page 2 | | 27085 /// 27086 /// The caller must free the returned string with `CoTaskMemFree`. See 27087 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings) 27088 @(" propget") 27089 HRESULT get_PageRanges(@("out, retval") LPWSTR* value); 27090 27091 /// Set the `PageRanges` property. 27092 @(" propput") 27093 HRESULT put_PageRanges(in LPCWSTR value); 27094 27095 /// Prints multiple pages of a document on a single piece of paper. Choose from 1, 2, 4, 6, 9 or 16. 27096 /// The default value is 1. 27097 @(" propget") 27098 HRESULT get_PagesPerSide(@("out, retval") INT32* value); 27099 27100 /// Set the `PagesPerSide` property. Returns `E_INVALIDARG` if an invalid value is 27101 /// provided, and the current value is not changed. 27102 /// 27103 /// Below examples shows print output for PagesPerSide and Duplex. 27104 /// 27105 /// | PagesPerSide | Total pages | Two-sided printing | Result | 27106 /// | --- | --- | --- | --- | 27107 /// | 1 | 1 | - | 1 page on the front side. | 27108 /// | 2 | 1 | Yes | 1 page on the front side. | 27109 /// | 2 | 4 | - | 2 pages on the first paper and 2 pages on the next paper. | 27110 /// | 2 | 4 | Yes | 2 pages on the front side and 2 pages on back side. | 27111 /// | 4 | 4 | Yes | 4 pages on the front side. | 27112 /// | 4 | 8 | Yes | 4 pages on the front side and 4 pages on the back side. | 27113 @(" propput") 27114 HRESULT put_PagesPerSide(in INT32 value); 27115 27116 /// Number of copies to print. Minimum value is `1` and the maximum copies count is `999`. 27117 /// The default value is 1. 27118 /// 27119 /// This value is ignored in PrintToPdfStream method. 27120 @(" propget") 27121 HRESULT get_Copies(@("out, retval") INT32* value); 27122 27123 /// Set the `Copies` property. Returns `E_INVALIDARG` if an invalid value is provided 27124 /// and the current value is not changed. 27125 @(" propput") 27126 HRESULT put_Copies(in INT32 value); 27127 27128 /// Printer collation. See `COREWEBVIEW2_PRINT_COLLATION` for descriptions of 27129 /// collation. The default value is `COREWEBVIEW2_PRINT_COLLATION_DEFAULT`. 27130 /// 27131 /// Printing uses default value of printer's collation if an invalid value is provided 27132 /// for the specific printer. 27133 /// 27134 /// This value is ignored in PrintToPdfStream method. 27135 @(" propget") 27136 HRESULT get_Collation(@("out, retval") COREWEBVIEW2_PRINT_COLLATION* value); 27137 27138 /// Set the `Collation` property. 27139 @(" propput") 27140 HRESULT put_Collation(in COREWEBVIEW2_PRINT_COLLATION value); 27141 27142 /// Printer color mode. See `COREWEBVIEW2_PRINT_COLOR_MODE` for descriptions 27143 /// of color modes. The default value is `COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT`. 27144 /// 27145 /// Printing uses default value of printer supported color if an invalid value is provided 27146 /// for the specific printer. 27147 @(" propget") 27148 HRESULT get_ColorMode(@("out, retval") COREWEBVIEW2_PRINT_COLOR_MODE* value); 27149 27150 /// Set the `ColorMode` property. 27151 @(" propput") 27152 HRESULT put_ColorMode(in COREWEBVIEW2_PRINT_COLOR_MODE value); 27153 27154 /// Printer duplex settings. See `COREWEBVIEW2_PRINT_DUPLEX` for descriptions of duplex. 27155 /// The default value is `COREWEBVIEW2_PRINT_DUPLEX_DEFAULT`. 27156 /// 27157 /// Printing uses default value of printer's duplex if an invalid value is provided 27158 /// for the specific printer. 27159 /// 27160 /// This value is ignored in PrintToPdfStream method. 27161 @(" propget") 27162 HRESULT get_Duplex(@("out, retval") COREWEBVIEW2_PRINT_DUPLEX* value); 27163 27164 /// Set the `Duplex` property. 27165 @(" propput") 27166 HRESULT put_Duplex(in COREWEBVIEW2_PRINT_DUPLEX value); 27167 27168 /// Printer media size. See `COREWEBVIEW2_PRINT_MEDIA_SIZE` for descriptions of media size. 27169 /// The default value is `COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT`. 27170 /// 27171 /// If media size is `COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM`, you should set the `PageWidth` 27172 /// and `PageHeight`. 27173 /// 27174 /// Printing uses default value of printer supported media size if an invalid value is provided 27175 /// for the specific printer. 27176 /// 27177 /// This value is ignored in PrintToPdfStream method. 27178 @(" propget") 27179 HRESULT get_MediaSize(@("out, retval") COREWEBVIEW2_PRINT_MEDIA_SIZE* value); 27180 27181 /// Set the `MediaSize` property. 27182 @(" propput") 27183 HRESULT put_MediaSize(in COREWEBVIEW2_PRINT_MEDIA_SIZE value); 27184 27185 /// The name of the printer to use. Defaults to empty string. 27186 /// If the printer name is empty string or null, then it prints to the default 27187 /// printer on the user OS. 27188 /// 27189 /// This value is ignored in PrintToPdfStream method. 27190 /// 27191 /// The caller must free the returned string with `CoTaskMemFree`. See 27192 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings) 27193 @(" propget") 27194 HRESULT get_PrinterName(@("out, retval") LPWSTR* value); 27195 27196 /// Set the `PrinterName` property. If provided printer name doesn't match 27197 /// with the name of any installed printers on the user OS, 27198 /// `ICoreWebView2PrintCompletedHandler` handler will return `errorCode` as 27199 /// `S_OK` and `printStatus` as COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE. 27200 /// 27201 /// Use [Enum Printers](/windows/win32/printdocs/enumprinters) 27202 /// to enumerate available printers. 27203 @(" propput") 27204 HRESULT put_PrinterName(in LPCWSTR value); 27205 } 27206 27207 /// This interface is an extension of `ICoreWebView2_17` that manages 27208 /// navigation requests to URI schemes registered with the OS. 27209 const GUID IID_ICoreWebView2_18 = ICoreWebView2_18.iid; 27210 27211 interface ICoreWebView2_18 : ICoreWebView2_17 27212 { 27213 static const GUID iid = { 0x7A626017,0x28BE,0x49B2,[ 0xB8,0x65,0x3B,0xA2,0xB3,0x52,0x2D,0x90 ] }; 27214 /// Add an event handler for the `LaunchingExternalUriScheme` event. 27215 /// The `LaunchingExternalUriScheme` event is raised when a navigation request is made to 27216 /// a URI scheme that is registered with the OS. 27217 /// The `LaunchingExternalUriScheme` event handler may suppress the default dialog 27218 /// or replace the default dialog with a custom dialog. 27219 /// 27220 /// If a deferral is not taken on the event args, the external URI scheme launch is 27221 /// blocked until the event handler returns. If a deferral is taken, the 27222 /// external URI scheme launch is blocked until the deferral is completed. 27223 /// The host also has the option to cancel the URI scheme launch. 27224 /// 27225 /// The `NavigationStarting` and `NavigationCompleted` events will be raised, 27226 /// regardless of whether the `Cancel` property is set to `TRUE` or 27227 /// `FALSE`. The `NavigationCompleted` event will be raised with the `IsSuccess` property 27228 /// set to `FALSE` and the `WebErrorStatus` property set to `ConnectionAborted` regardless of 27229 /// whether the host sets the `Cancel` property on the 27230 /// `ICoreWebView2LaunchingExternalUriSchemeEventArgs`. The `SourceChanged`, `ContentLoading`, 27231 /// and `HistoryChanged` events will not be raised for this navigation to the external URI 27232 /// scheme regardless of the `Cancel` property. 27233 /// The `LaunchingExternalUriScheme` event will be raised after the 27234 /// `NavigationStarting` event and before the `NavigationCompleted` event. 27235 /// The default `CoreWebView2Settings` will also be updated upon navigation to an external 27236 /// URI scheme. If a setting on the `CoreWebView2Settings` interface has been changed, 27237 /// navigating to an external URI scheme will trigger the `CoreWebView2Settings` to update. 27238 /// 27239 /// The WebView2 may not display the default dialog based on user settings, browser settings, 27240 /// and whether the origin is determined as a 27241 /// [trustworthy origin](https://w3c.github.io/webappsec-secure-contexts# 27242 /// potentially-trustworthy-origin); however, the event will still be raised. 27243 /// 27244 /// If the request is initiated by a cross-origin frame without a user gesture, 27245 /// the request will be blocked and the `LaunchingExternalUriScheme` event will not 27246 /// be raised. 27247 /// \snippet SettingsComponent.cpp ToggleLaunchingExternalUriScheme 27248 HRESULT add_LaunchingExternalUriScheme( 27249 /+[in]+/ ICoreWebView2LaunchingExternalUriSchemeEventHandler eventHandler, 27250 @("out") EventRegistrationToken* token); 27251 27252 /// Remove an event handler previously added with 27253 /// `add_LaunchingExternalUriScheme`. 27254 HRESULT remove_LaunchingExternalUriScheme( 27255 in EventRegistrationToken token); 27256 } 27257 27258 /// This interface is an extension of `ICoreWebView2_18` that manages memory usage 27259 /// target level. 27260 const GUID IID_ICoreWebView2_19 = ICoreWebView2_19.iid; 27261 27262 interface ICoreWebView2_19 : ICoreWebView2_18 27263 { 27264 static const GUID iid = { 0x6921F954,0x79B0,0x437F,[ 0xA9,0x97,0xC8,0x58,0x11,0x89,0x7C,0x68 ] }; 27265 27266 /// `MemoryUsageTargetLevel` indicates desired memory consumption level of 27267 /// WebView. 27268 @(" propget") 27269 HRESULT get_MemoryUsageTargetLevel( 27270 @("out, retval") COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL* level); 27271 27272 /// An app may set `MemoryUsageTargetLevel` to indicate desired memory 27273 /// consumption level of WebView. Scripts will not be impacted and continue 27274 /// to run. This is useful for inactive apps that still want to run scripts 27275 /// and/or keep network connections alive and therefore could not call 27276 /// `TrySuspend` and `Resume` to reduce memory consumption. These apps can 27277 /// set memory usage target level to `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW` 27278 /// when the app becomes inactive, and set back to 27279 /// `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL` when the app becomes 27280 /// active. It is not necessary to set CoreWebView2Controller's IsVisible 27281 /// property to false when setting the property. 27282 /// It is a best effort operation to change memory usage level, and the 27283 /// API will return before the operation completes. 27284 /// Setting the level to `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW` 27285 /// could potentially cause memory for some WebView browser processes to be 27286 /// swapped out to disk in some circumstances. 27287 /// It is a best effort to reduce memory usage as much as possible. If a script 27288 /// runs after its related memory has been swapped out, the memory will be swapped 27289 /// back in to ensure the script can still run, but performance might be impacted. 27290 /// Therefore, the app should set the level back to 27291 /// `COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL` when the app becomes 27292 /// active again. Setting memory usage target level back to normal will not happen 27293 /// automatically. 27294 /// An app should choose to use either the combination of `TrySuspend` and `Resume` 27295 /// or the combination of setting MemoryUsageTargetLevel to low and normal. It is 27296 /// not advisable to mix them. 27297 /// Trying to set `MemoryUsageTargetLevel` while suspended will be ignored. 27298 /// The `TrySuspend` and `Resume` methods will change the `MemoryUsageTargetLevel`. 27299 /// `TrySuspend` will automatically set `MemoryUsageTargetLevel` to low while 27300 /// `Resume` on suspended WebView will automatically set `MemoryUsageTargetLevel` 27301 /// to normal. Calling `Resume` when the WebView is not suspended would not change 27302 /// `MemoryUsageTargetLevel`. 27303 /// 27304 /// \snippet ViewComponent.cpp MemoryUsageTargetLevel 27305 @(" propput") 27306 HRESULT put_MemoryUsageTargetLevel( 27307 in COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL level); 27308 } 27309 27310 /// This interface is an extension of `ICoreWebView2_19` that provides the `FrameId` property. 27311 const GUID IID_ICoreWebView2_20 = ICoreWebView2_20.iid; 27312 27313 interface ICoreWebView2_20 : ICoreWebView2_19 27314 { 27315 static const GUID iid = { 0xb4bc1926,0x7305,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 27316 /// The unique identifier of the main frame. It's the same kind of ID as 27317 /// with the `FrameId` in `CoreWebView2Frame` and via `CoreWebView2FrameInfo`. 27318 /// Note that `FrameId` may not be valid if `CoreWebView2` has not done 27319 /// any navigation. It's safe to get this value during or after the first 27320 /// `ContentLoading` event. Otherwise, it could return the invalid frame Id 0. 27321 @(" propget") 27322 HRESULT get_FrameId(@("out, retval") UINT32* id); 27323 } 27324 27325 /// Event handler for the `LaunchingExternalUriScheme` event. 27326 const GUID IID_ICoreWebView2LaunchingExternalUriSchemeEventHandler = ICoreWebView2LaunchingExternalUriSchemeEventHandler.iid; 27327 27328 interface ICoreWebView2LaunchingExternalUriSchemeEventHandler : IUnknown 27329 { 27330 static const GUID iid = { 0x74F712E0,0x8165,0x43A9,[ 0xA1,0x3F,0x0C,0xCE,0x59,0x7E,0x75,0xDF ] }; 27331 /// Receives the event args for the corresponding event. 27332 HRESULT Invoke( 27333 /+[in]+/ ICoreWebView2 sender, 27334 /+[in]+/ ICoreWebView2LaunchingExternalUriSchemeEventArgs args); 27335 } 27336 27337 /// Event args for `LaunchingExternalUriScheme` event. 27338 const GUID IID_ICoreWebView2LaunchingExternalUriSchemeEventArgs = ICoreWebView2LaunchingExternalUriSchemeEventArgs.iid; 27339 27340 interface ICoreWebView2LaunchingExternalUriSchemeEventArgs : IUnknown 27341 { 27342 static const GUID iid = { 0x07D1A6C3,0x7175,0x4BA1,[ 0x93,0x06,0xE5,0x93,0xCA,0x07,0xE4,0x6C ] }; 27343 /// The URI with the external URI scheme to be launched. 27344 27345 @(" propget") 27346 HRESULT get_Uri(@("out, retval") LPWSTR* value); 27347 27348 /// The origin initiating the external URI scheme launch. 27349 /// The origin will be an empty string if the request is initiated by calling 27350 /// `CoreWebView2.Navigate` on the external URI scheme. If a script initiates 27351 /// the navigation, the `InitiatingOrigin` will be the top-level document's 27352 /// `Source`, for example, if `window.location` is set to `"calculator://", the 27353 /// `InitiatingOrigin` will be set to `calculator://`. If the request is initiated 27354 /// from a child frame, the `InitiatingOrigin` will be the source of that child frame. 27355 27356 @(" propget") 27357 HRESULT get_InitiatingOrigin(@("out, retval") LPWSTR* value); 27358 27359 /// `TRUE` when the external URI scheme request was initiated through a user gesture. 27360 /// 27361 /// \> [!NOTE]\n\> Being initiated through a user gesture does not mean that user intended 27362 /// to access the associated resource. 27363 27364 @(" propget") 27365 HRESULT get_IsUserInitiated(@("out, retval") BOOL* value); 27366 27367 /// The event handler may set this property to `TRUE` to cancel the external URI scheme 27368 /// launch. If set to `TRUE`, the external URI scheme will not be launched, and the default 27369 /// dialog is not displayed. This property can be used to replace the normal 27370 /// handling of launching an external URI scheme. 27371 /// The initial value of the `Cancel` property is `FALSE`. 27372 27373 @(" propget") 27374 HRESULT get_Cancel(@("out, retval") BOOL* value); 27375 27376 /// Sets the `Cancel` property. 27377 27378 @(" propput") 27379 HRESULT put_Cancel(in BOOL value); 27380 27381 /// Returns an `ICoreWebView2Deferral` object. Use this operation to 27382 /// complete the event at a later time. 27383 27384 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * value); 27385 } 27386 27387 /// The caller implements this interface to handle the BasicAuthenticationRequested event. 27388 const GUID IID_ICoreWebView2BasicAuthenticationRequestedEventHandler = ICoreWebView2BasicAuthenticationRequestedEventHandler.iid; 27389 27390 interface ICoreWebView2BasicAuthenticationRequestedEventHandler : IUnknown 27391 { 27392 static const GUID iid = { 0x58b4d6c2,0x18d4,0x497e,[ 0xb3,0x9b,0x9a,0x96,0x53,0x3f,0xa2,0x78 ] }; 27393 /// Called to provide the implementer with the event args for the 27394 /// corresponding event. 27395 HRESULT Invoke( 27396 /+[in]+/ ICoreWebView2 sender, 27397 /+[in]+/ ICoreWebView2BasicAuthenticationRequestedEventArgs args); 27398 } 27399 27400 /// Implements the interface to receive `IsDefaultDownloadDialogOpenChanged` 27401 /// events. 27402 const GUID IID_ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler = ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler.iid; 27403 27404 interface ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler : IUnknown 27405 { 27406 static const GUID iid = { 0x3117da26,0xae13,0x438d,[ 0xbd,0x46,0xed,0xbe,0xb2,0xc4,0xce,0x81 ] }; 27407 /// Provides the event args for the corresponding event. No event args exist 27408 /// and the `args` parameter is set to `null`. 27409 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, 27410 /+[in]+/ IUnknown args); 27411 } 27412 27413 /// Receives the result of the `PrintToPdf` method. If the print to PDF 27414 /// operation succeeds, `isSuccessful` is true. Otherwise, if the operation 27415 /// failed, `isSuccessful` is set to false. An invalid path returns 27416 /// `E_INVALIDARG`. 27417 const GUID IID_ICoreWebView2PrintToPdfCompletedHandler = ICoreWebView2PrintToPdfCompletedHandler.iid; 27418 27419 interface ICoreWebView2PrintToPdfCompletedHandler : IUnknown 27420 { 27421 static const GUID iid = { 0xccf1ef04,0xfd8e,0x4d5f,[ 0xb2,0xde,0x09,0x83,0xe4,0x1b,0x8c,0x36 ] }; 27422 27423 /// Provides the result of the corresponding asynchronous method. 27424 HRESULT Invoke(in HRESULT errorCode, BOOL isSuccessful); 27425 } 27426 27427 /// Settings used by the `PrintToPdf` method. 27428 const GUID IID_ICoreWebView2PrintSettings = ICoreWebView2PrintSettings.iid; 27429 27430 interface ICoreWebView2PrintSettings : IUnknown 27431 { 27432 static const GUID iid = { 0x377f3721,0xc74e,0x48ca,[ 0x8d,0xb1,0xdf,0x68,0xe5,0x1d,0x60,0xe2 ] }; 27433 27434 /// The orientation can be portrait or landscape. The default orientation is 27435 /// portrait. See `COREWEBVIEW2_PRINT_ORIENTATION`. 27436 @(" propget") 27437 HRESULT get_Orientation( 27438 @("out, retval") COREWEBVIEW2_PRINT_ORIENTATION* orientation); 27439 27440 /// Sets the `Orientation` property. 27441 @(" propput") 27442 HRESULT put_Orientation( 27443 in COREWEBVIEW2_PRINT_ORIENTATION orientation); 27444 27445 /// The scale factor is a value between 0.1 and 2.0. The default is 1.0. 27446 @(" propget") 27447 HRESULT get_ScaleFactor(@("out, retval") double* scaleFactor); 27448 27449 /// Sets the `ScaleFactor` property. Returns `E_INVALIDARG` if an invalid 27450 /// value is provided, and the current value is not changed. 27451 @(" propput") 27452 HRESULT put_ScaleFactor(in double scaleFactor); 27453 27454 /// The page width in inches. The default width is 8.5 inches. 27455 @(" propget") 27456 HRESULT get_PageWidth(@("out, retval") double* pageWidth); 27457 27458 /// Sets the `PageWidth` property. Returns `E_INVALIDARG` if the page width is 27459 /// less than or equal to zero, and the current value is not changed. 27460 @(" propput") 27461 HRESULT put_PageWidth(in double pageWidth); 27462 27463 /// The page height in inches. The default height is 11 inches. 27464 @(" propget") 27465 HRESULT get_PageHeight(@("out, retval") double* pageHeight); 27466 27467 /// Sets the `PageHeight` property. Returns `E_INVALIDARG` if the page height 27468 /// is less than or equal to zero, and the current value is not changed. 27469 @(" propput") 27470 HRESULT put_PageHeight(in double pageHeight); 27471 27472 /// The top margin in inches. The default is 1 cm, or ~0.4 inches. 27473 @(" propget") 27474 HRESULT get_MarginTop(@("out, retval") double* marginTop); 27475 27476 /// Sets the `MarginTop` property. A margin cannot be less than zero. 27477 /// Returns `E_INVALIDARG` if an invalid value is provided, and the current 27478 /// value is not changed. 27479 @(" propput") 27480 HRESULT put_MarginTop(in double marginTop); 27481 27482 /// The bottom margin in inches. The default is 1 cm, or ~0.4 inches. 27483 @(" propget") 27484 HRESULT get_MarginBottom(@("out, retval") double* marginBottom); 27485 27486 /// Sets the `MarginBottom` property. A margin cannot be less than zero. 27487 /// Returns `E_INVALIDARG` if an invalid value is provided, and the current 27488 /// value is not changed. 27489 @(" propput") 27490 HRESULT put_MarginBottom(in double marginBottom); 27491 27492 /// The left margin in inches. The default is 1 cm, or ~0.4 inches. 27493 @(" propget") 27494 HRESULT get_MarginLeft(@("out, retval") double* marginLeft); 27495 27496 /// Sets the `MarginLeft` property. A margin cannot be less than zero. 27497 /// Returns `E_INVALIDARG` if an invalid value is provided, and the current 27498 /// value is not changed. 27499 @(" propput") 27500 HRESULT put_MarginLeft(in double marginLeft); 27501 27502 /// The right margin in inches. The default is 1 cm, or ~0.4 inches. 27503 @(" propget") 27504 HRESULT get_MarginRight(@("out, retval") double* marginRight); 27505 27506 /// Set the `MarginRight` property.A margin cannot be less than zero. 27507 /// Returns `E_INVALIDARG` if an invalid value is provided, and the current 27508 /// value is not changed. 27509 @(" propput") 27510 HRESULT put_MarginRight(in double marginRight); 27511 27512 /// `TRUE` if background colors and images should be printed. The default value 27513 /// is `FALSE`. 27514 @(" propget") 27515 HRESULT get_ShouldPrintBackgrounds( 27516 @("out, retval") BOOL* shouldPrintBackgrounds); 27517 27518 /// Set the `ShouldPrintBackgrounds` property. 27519 @(" propput") 27520 HRESULT put_ShouldPrintBackgrounds(in BOOL shouldPrintBackgrounds); 27521 27522 /// `TRUE` if only the current end user's selection of HTML in the document 27523 /// should be printed. The default value is `FALSE`. 27524 @(" propget") 27525 HRESULT get_ShouldPrintSelectionOnly( 27526 @("out, retval") BOOL* shouldPrintSelectionOnly); 27527 27528 /// Set the `ShouldPrintSelectionOnly` property. 27529 @(" propput") 27530 HRESULT put_ShouldPrintSelectionOnly( 27531 in BOOL shouldPrintSelectionOnly); 27532 27533 /// `TRUE` if header and footer should be printed. The default value is `FALSE`. 27534 /// The header consists of the date and time of printing, and the title of the 27535 /// page. The footer consists of the URI and page number. The height of the 27536 /// header and footer is 0.5 cm, or ~0.2 inches. 27537 @(" propget") 27538 HRESULT get_ShouldPrintHeaderAndFooter( 27539 @("out, retval") BOOL* shouldPrintHeaderAndFooter); 27540 27541 /// Set the `ShouldPrintHeaderAndFooter` property. 27542 @(" propput") 27543 HRESULT put_ShouldPrintHeaderAndFooter( 27544 in BOOL shouldPrintHeaderAndFooter); 27545 27546 /// The title in the header if `ShouldPrintHeaderAndFooter` is `TRUE`. The 27547 /// default value is the title of the current document. 27548 /// 27549 /// The caller must free the returned string with `CoTaskMemFree`. See 27550 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 27551 @(" propget") 27552 HRESULT get_HeaderTitle(@("out, retval") LPWSTR* headerTitle); 27553 27554 /// Set the `HeaderTitle` property. If an empty string or null value is 27555 /// provided, no title is shown in the header. 27556 @(" propput") 27557 HRESULT put_HeaderTitle(in LPCWSTR headerTitle); 27558 27559 /// The URI in the footer if `ShouldPrintHeaderAndFooter` is `TRUE`. The 27560 /// default value is the current URI. 27561 /// 27562 /// The caller must free the returned string with `CoTaskMemFree`. See 27563 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 27564 @(" propget") 27565 HRESULT get_FooterUri(@("out, retval") LPWSTR* footerUri); 27566 27567 /// Set the `FooterUri` property. If an empty string or null value is 27568 /// provided, no URI is shown in the footer. 27569 @(" propput") 27570 HRESULT put_FooterUri(in LPCWSTR footerUri); 27571 } 27572 27573 /// The caller implements this interface to receive the TrySuspend result. 27574 const GUID IID_ICoreWebView2TrySuspendCompletedHandler = ICoreWebView2TrySuspendCompletedHandler.iid; 27575 27576 interface ICoreWebView2TrySuspendCompletedHandler : IUnknown 27577 { 27578 static const GUID iid = { 0x00F206A7,0x9D17,0x4605,[ 0x91,0xF6,0x4E,0x8E,0x4D,0xE1,0x92,0xE3 ] }; 27579 27580 /// Provides the result of the TrySuspend operation. 27581 /// See [Sleeping Tabs FAQ](https://techcommunity.microsoft.com/t5/articles/sleeping-tabs-faq/m-p/1705434) 27582 /// for conditions that might prevent WebView from being suspended. In those situations, 27583 /// isSuccessful will be false and errorCode is S_OK. 27584 HRESULT Invoke(in HRESULT errorCode, in BOOL isSuccessful); 27585 } 27586 27587 /// The owner of the `CoreWebView2` object that provides support for resizing, 27588 /// showing and hiding, focusing, and other functionality related to 27589 /// windowing and composition. The `CoreWebView2Controller` owns the 27590 /// `CoreWebView2`, and if all references to the `CoreWebView2Controller` go 27591 /// away, the WebView is closed. 27592 const GUID IID_ICoreWebView2Controller = ICoreWebView2Controller.iid; 27593 27594 interface ICoreWebView2Controller : IUnknown 27595 { 27596 static const GUID iid = { 0x4d00c0d1,0x9434,0x4eb6,[ 0x80,0x78,0x86,0x97,0xa5,0x60,0x33,0x4f ] }; 27597 27598 /// The `IsVisible` property determines whether to show or hide the WebView2. 27599 /// If `IsVisible` is set to `FALSE`, the WebView2 is transparent and is 27600 /// not rendered. However, this does not affect the window containing the 27601 /// WebView2 (the `HWND` parameter that was passed to 27602 /// `CreateCoreWebView2Controller`). If you want that window to disappear 27603 /// too, run `ShowWindow` on it directly in addition to modifying the 27604 /// `IsVisible` property. WebView2 as a child window does not get window 27605 /// messages when the top window is minimized or restored. For performance 27606 /// reasons, developers should set the `IsVisible` property of the WebView to 27607 /// `FALSE` when the app window is minimized and back to `TRUE` when the app 27608 /// window is restored. The app window does this by handling 27609 /// `SIZE_MINIMIZED and SIZE_RESTORED` command upon receiving `WM_SIZE` 27610 /// message. 27611 /// 27612 /// There are CPU and memory benefits when the page is hidden. For instance, 27613 /// Chromium has code that throttles activities on the page like animations 27614 /// and some tasks are run less frequently. Similarly, WebView2 will 27615 /// purge some caches to reduce memory usage. 27616 /// 27617 /// \snippet ViewComponent.cpp ToggleIsVisible 27618 @(" propget") 27619 HRESULT get_IsVisible(@("out, retval") BOOL* isVisible); 27620 27621 /// Sets the `IsVisible` property. 27622 /// 27623 /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize 27624 @(" propput") 27625 HRESULT put_IsVisible(in BOOL isVisible); 27626 27627 /// The WebView bounds. Bounds are relative to the parent `HWND`. The app 27628 /// has two ways to position a WebView. 27629 /// 27630 /// * Create a child `HWND` that is the WebView parent `HWND`. Position 27631 /// the window where the WebView should be. Use `(0, 0)` for the 27632 /// top-left corner (the offset) of the `Bounds` of the WebView. 27633 /// * Use the top-most window of the app as the WebView parent HWND. For 27634 /// example, to position WebView correctly in the app, set the top-left 27635 /// corner of the Bound of the WebView. 27636 /// 27637 /// The values of `Bounds` are limited by the coordinate space of the host. 27638 27639 @(" propget") 27640 HRESULT get_Bounds(@("out, retval") RECT* bounds); 27641 27642 /// Sets the `Bounds` property. 27643 /// 27644 /// \snippet ViewComponent.cpp ResizeWebView 27645 27646 @(" propput") 27647 HRESULT put_Bounds(in RECT bounds); 27648 27649 /// The zoom factor for the WebView. 27650 /// 27651 /// \> [!NOTE]\n\> Changing zoom factor may cause `window.innerWidth`, 27652 /// `window.innerHeight`, both, and page layout to change. A zoom factor 27653 /// that is applied by the host by running `ZoomFactor` becomes the new 27654 /// default zoom for the WebView. The zoom factor applies across navigations 27655 /// and is the zoom factor WebView is returned to when the user chooses 27656 /// Ctrl+0. When the zoom factor is changed by the user (resulting in 27657 /// the app receiving `ZoomFactorChanged`), that zoom applies only for the 27658 /// current page. Any user applied zoom is only for the current page and is 27659 /// reset on a navigation. Specifying a `zoomFactor` less than or equal to 27660 /// `0` is not allowed. WebView also has an internal supported zoom factor 27661 /// range. When a specified zoom factor is out of that range, it is 27662 /// normalized to be within the range, and a `ZoomFactorChanged` event is 27663 /// triggered for the real applied zoom factor. When the range normalization 27664 /// happens, the `ZoomFactor` property reports the zoom factor specified 27665 /// during the previous modification of the `ZoomFactor` property until the 27666 /// `ZoomFactorChanged` event is received after WebView applies the 27667 /// normalized zoom factor. 27668 27669 @(" propget") 27670 HRESULT get_ZoomFactor(@("out, retval") double* zoomFactor); 27671 27672 /// Sets the `ZoomFactor` property. 27673 27674 @(" propput") 27675 HRESULT put_ZoomFactor(in double zoomFactor); 27676 27677 /// Adds an event handler for the `ZoomFactorChanged` event. 27678 /// `ZoomFactorChanged` runs when the `ZoomFactor` property of the WebView 27679 /// changes. The event may run because the `ZoomFactor` property was 27680 /// modified, or due to the user manually modifying the zoom. When it is 27681 /// modified using the `ZoomFactor` property, the internal zoom factor is 27682 /// updated immediately and no `ZoomFactorChanged` event is triggered. 27683 /// WebView associates the last used zoom factor for each site. It is 27684 /// possible for the zoom factor to change when navigating to a different 27685 /// page. When the zoom factor changes due to a navigation change, the 27686 /// `ZoomFactorChanged` event runs right after the `ContentLoading` event. 27687 /// 27688 /// \snippet ViewComponent.cpp ZoomFactorChanged 27689 27690 HRESULT add_ZoomFactorChanged( 27691 /+[in]+/ ICoreWebView2ZoomFactorChangedEventHandler eventHandler, 27692 @("out") EventRegistrationToken* token); 27693 27694 /// Remove an event handler previously added with `add_ZoomFactorChanged`. 27695 27696 HRESULT remove_ZoomFactorChanged( 27697 in EventRegistrationToken token); 27698 27699 /// Updates `Bounds` and `ZoomFactor` properties at the same time. This 27700 /// operation is atomic from the perspective of the host. After returning 27701 /// from this function, the `Bounds` and `ZoomFactor` properties are both 27702 /// updated if the function is successful, or neither is updated if the 27703 /// function fails. If `Bounds` and `ZoomFactor` are both updated by the 27704 /// same scale (for example, `Bounds` and `ZoomFactor` are both doubled), 27705 /// then the page does not display a change in `window.innerWidth` or 27706 /// `window.innerHeight` and the WebView renders the content at the new size 27707 /// and zoom without intermediate renderings. This function also updates 27708 /// just one of `ZoomFactor` or `Bounds` by passing in the new value for one 27709 /// and the current value for the other. 27710 /// 27711 /// \snippet ViewComponent.cpp SetBoundsAndZoomFactor 27712 27713 HRESULT SetBoundsAndZoomFactor(in RECT bounds, in double zoomFactor); 27714 27715 /// Moves focus into WebView. WebView gets focus and focus is set to 27716 /// correspondent element in the page hosted in the WebView. For 27717 /// Programmatic reason, focus is set to previously focused element or the 27718 /// default element if no previously focused element exists. For `Next` 27719 /// reason, focus is set to the first element. For `Previous` reason, focus 27720 /// is set to the last element. WebView changes focus through user 27721 /// interaction including selecting into a WebView or Tab into it. For 27722 /// tabbing, the app runs MoveFocus with Next or Previous to align with Tab 27723 /// and Shift+Tab respectively when it decides the WebView is the next 27724 /// element that may exist in a tab. Or, the app runs `IsDialogMessage` 27725 /// as part of the associated message loop to allow the platform to auto 27726 /// handle tabbing. The platform rotates through all windows with 27727 /// `WS_TABSTOP`. When the WebView gets focus from `IsDialogMessage`, it is 27728 /// internally put the focus on the first or last element for tab and 27729 /// Shift+Tab respectively. 27730 /// 27731 /// \snippet App.cpp MoveFocus0 27732 /// 27733 /// \snippet ControlComponent.cpp MoveFocus1 27734 /// 27735 /// \snippet ControlComponent.cpp MoveFocus2 27736 27737 HRESULT MoveFocus(in COREWEBVIEW2_MOVE_FOCUS_REASON reason); 27738 27739 /// Adds an event handler for the `MoveFocusRequested` event. 27740 /// `MoveFocusRequested` runs when user tries to tab out of the WebView. The 27741 /// focus of the WebView has not changed when this event is run. 27742 /// 27743 /// \snippet ControlComponent.cpp MoveFocusRequested 27744 27745 HRESULT add_MoveFocusRequested( 27746 /+[in]+/ ICoreWebView2MoveFocusRequestedEventHandler eventHandler, 27747 @("out") EventRegistrationToken* token); 27748 27749 /// Removes an event handler previously added with `add_MoveFocusRequested`. 27750 27751 HRESULT remove_MoveFocusRequested( 27752 in EventRegistrationToken token); 27753 27754 /// Adds an event handler for the `GotFocus` event. `GotFocus` runs when 27755 /// WebView has focus. 27756 27757 HRESULT add_GotFocus( 27758 /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler, 27759 @("out") EventRegistrationToken* token); 27760 27761 /// Removes an event handler previously added with `add_GotFocus`. 27762 27763 HRESULT remove_GotFocus( 27764 in EventRegistrationToken token); 27765 27766 /// Adds an event handler for the `LostFocus` event. `LostFocus` runs when 27767 /// WebView loses focus. In the case where `MoveFocusRequested` event is 27768 /// run, the focus is still on WebView when `MoveFocusRequested` event runs. 27769 /// `LostFocus` only runs afterwards when code of the app or default action 27770 /// of `MoveFocusRequested` event set focus away from WebView. 27771 27772 HRESULT add_LostFocus( 27773 /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler, 27774 @("out") EventRegistrationToken* token); 27775 27776 /// Removes an event handler previously added with `add_LostFocus`. 27777 27778 HRESULT remove_LostFocus( 27779 in EventRegistrationToken token); 27780 27781 /// Adds an event handler for the `AcceleratorKeyPressed` event. 27782 /// `AcceleratorKeyPressed` runs when an accelerator key or key combo is 27783 /// pressed or released while the WebView is focused. A key is considered an 27784 /// accelerator if either of the following conditions are true. 27785 /// 27786 /// * Ctrl or Alt is currently being held. 27787 /// * The pressed key does not map to a character. 27788 /// 27789 /// A few specific keys are never considered accelerators, such as Shift. 27790 /// The `Escape` key is always considered an accelerator. 27791 /// 27792 /// Auto-repeated key events caused by holding the key down also triggers 27793 /// this event. Filter out the auto-repeated key events by verifying the 27794 /// `KeyEventLParam` or `PhysicalKeyStatus` event args. 27795 /// 27796 /// In windowed mode, the event handler is run synchronously. Until you 27797 /// run `Handled()` on the event args or the event handler returns, the 27798 /// browser process is blocked and outgoing cross-process COM requests fail 27799 /// with `RPC_E_CANTCALLOUT_ININPUTSYNCCALL`. All `CoreWebView2` API methods 27800 /// work, however. 27801 /// 27802 /// In windowless mode, the event handler is run asynchronously. Further 27803 /// input do not reach the browser until the event handler returns or 27804 /// `Handled()` is run, but the browser process is not blocked, and outgoing 27805 /// COM requests work normally. 27806 /// 27807 /// It is recommended to run `Handled(TRUE)` as early as are able to know 27808 /// that you want to handle the accelerator key. 27809 /// 27810 /// \snippet ControlComponent.cpp AcceleratorKeyPressed 27811 27812 HRESULT add_AcceleratorKeyPressed( 27813 /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventHandler eventHandler, 27814 @("out") EventRegistrationToken* token); 27815 27816 /// Removes an event handler previously added with 27817 /// `add_AcceleratorKeyPressed`. 27818 27819 HRESULT remove_AcceleratorKeyPressed( 27820 in EventRegistrationToken token); 27821 27822 /// The parent window provided by the app that this WebView is using to 27823 /// render content. This API initially returns the window passed into 27824 /// `CreateCoreWebView2Controller`. 27825 27826 @(" propget") 27827 HRESULT get_ParentWindow(@("out, retval") HWND* parentWindow); 27828 27829 /// Sets the parent window for the WebView. This causes the WebView to 27830 /// re-parent the main WebView window to the newly provided window. 27831 27832 @(" propput") 27833 HRESULT put_ParentWindow(in HWND parentWindow); 27834 27835 /// This is a notification separate from `Bounds` that tells WebView that the 27836 /// main WebView parent (or any ancestor) `HWND` moved. This is needed 27837 /// for accessibility and certain dialogs in WebView to work correctly. 27838 /// 27839 /// \snippet ViewComponent.cpp NotifyParentWindowPositionChanged 27840 27841 HRESULT NotifyParentWindowPositionChanged(); 27842 27843 /// Closes the WebView and cleans up the underlying browser instance. 27844 /// Cleaning up the browser instance releases the resources powering the 27845 /// WebView. The browser instance is shut down if no other WebViews are 27846 /// using it. 27847 /// 27848 /// After running `Close`, most methods will fail and event handlers stop 27849 /// running. Specifically, the WebView releases the associated references to 27850 /// any associated event handlers when `Close` is run. 27851 /// 27852 /// `Close` is implicitly run when the `CoreWebView2Controller` loses the 27853 /// final reference and is destructed. But it is best practice to 27854 /// explicitly run `Close` to avoid any accidental cycle of references 27855 /// between the WebView and the app code. Specifically, if you capture a 27856 /// reference to the WebView in an event handler you create a reference cycle 27857 /// between the WebView and the event handler. Run `Close` to break the 27858 /// cycle by releasing all event handlers. But to avoid the situation, it is 27859 /// best to both explicitly run `Close` on the WebView and to not capture a 27860 /// reference to the WebView to ensure the WebView is cleaned up correctly. 27861 /// `Close` is synchronous and won't trigger the `beforeunload` event. 27862 /// 27863 /// \snippet AppWindow.cpp Close 27864 HRESULT Close(); 27865 27866 /// Gets the `CoreWebView2` associated with this `CoreWebView2Controller`. 27867 27868 @(" propget") 27869 HRESULT get_CoreWebView2(@("out, retval") ICoreWebView2 * coreWebView2); 27870 } 27871 27872 /// A continuation of the ICoreWebView2Controller interface. 27873 const GUID IID_ICoreWebView2Controller2 = ICoreWebView2Controller2.iid; 27874 27875 interface ICoreWebView2Controller2 : ICoreWebView2Controller 27876 { 27877 static const GUID iid = { 0xc979903e,0xd4ca,0x4228,[ 0x92,0xeb,0x47,0xee,0x3f,0xa9,0x6e,0xab ] }; 27878 /// The `DefaultBackgroundColor` property is the color WebView renders 27879 /// underneath all web content. This means WebView renders this color when 27880 /// there is no web content loaded such as before the initial navigation or 27881 /// between navigations. This also means web pages with undefined css 27882 /// background properties or background properties containing transparent 27883 /// pixels will render their contents over this color. Web pages with defined 27884 /// and opaque background properties that span the page will obscure the 27885 /// `DefaultBackgroundColor` and display normally. The default value for this 27886 /// property is white to resemble the native browser experience. 27887 /// 27888 /// The Color is specified by the COREWEBVIEW2_COLOR that represents an RGBA 27889 /// value. The `A` represents an Alpha value, meaning 27890 /// `DefaultBackgroundColor` can be transparent. In the case of a transparent 27891 /// `DefaultBackgroundColor` WebView will render hosting app content as the 27892 /// background. This Alpha value is not supported on Windows 7. Any `A` value 27893 /// other than 255 will result in E_INVALIDARG on Windows 7. 27894 /// It is supported on all other WebView compatible platforms. 27895 /// 27896 /// Semi-transparent colors are not currently supported by this API and 27897 /// setting `DefaultBackgroundColor` to a semi-transparent color will fail 27898 /// with E_INVALIDARG. The only supported alpha values are 0 and 255, all 27899 /// other values will result in E_INVALIDARG. 27900 /// `DefaultBackgroundColor` can only be an opaque color or transparent. 27901 /// 27902 /// This value may also be set by using the 27903 /// `WEBVIEW2_DEFAULT_BACKGROUND_COLOR` environment variable. There is a 27904 /// known issue with background color where setting the color by API can 27905 /// still leave the app with a white flicker before the 27906 /// `DefaultBackgroundColor` takes effect. Setting the color via environment 27907 /// variable solves this issue. The value must be a hex value that can 27908 /// optionally prepend a 0x. The value must account for the alpha value 27909 /// which is represented by the first 2 digits. So any hex value fewer than 8 27910 /// digits will assume a prepended 00 to the hex value and result in a 27911 /// transparent color. 27912 /// `get_DefaultBackgroundColor` will return the result of this environment 27913 /// variable if used. This environment variable can only set the 27914 /// `DefaultBackgroundColor` once. Subsequent updates to background color 27915 /// must be done through API call. 27916 /// 27917 /// \snippet ViewComponent.cpp DefaultBackgroundColor 27918 @(" propget") 27919 HRESULT get_DefaultBackgroundColor( 27920 @("out, retval") COREWEBVIEW2_COLOR* backgroundColor); 27921 27922 /// Sets the `DefaultBackgroundColor` property. 27923 @(" propput") 27924 HRESULT put_DefaultBackgroundColor( 27925 in COREWEBVIEW2_COLOR backgroundColor); 27926 } 27927 27928 /// A continuation of the ICoreWebView2Controller2 interface. 27929 const GUID IID_ICoreWebView2Controller3 = ICoreWebView2Controller3.iid; 27930 27931 interface ICoreWebView2Controller3 : ICoreWebView2Controller2 27932 { 27933 static const GUID iid = { 0xf9614724,0x5d2b,0x41dc,[ 0xae,0xf7,0x73,0xd6,0x2b,0x51,0x54,0x3b ] }; 27934 /// The rasterization scale for the WebView. The rasterization scale is the 27935 /// combination of the monitor DPI scale and text scaling set by the user. 27936 /// This value should be updated when the DPI scale of the app's top level 27937 /// window changes (i.e. monitor DPI scale changes or window changes monitor) 27938 /// or when the text scale factor of the system changes. 27939 /// 27940 /// \snippet AppWindow.cpp DPIChanged 27941 /// 27942 /// \snippet AppWindow.cpp TextScaleChanged1 27943 /// 27944 /// \snippet AppWindow.cpp TextScaleChanged2 27945 /// 27946 /// Rasterization scale applies to the WebView content, as well as 27947 /// popups, context menus, scroll bars, and so on. Normal app scaling 27948 /// scenarios should use the ZoomFactor property or SetBoundsAndZoomFactor 27949 /// API which only scale the rendered HTML content and not popups, context 27950 /// menus, scroll bars, and so on. 27951 /// 27952 /// \snippet ViewComponent.cpp RasterizationScale 27953 @(" propget") 27954 HRESULT get_RasterizationScale(@("out, retval") double* scale); 27955 /// Set the rasterization scale property. 27956 @(" propput") 27957 HRESULT put_RasterizationScale(in double scale); 27958 27959 /// ShouldDetectMonitorScaleChanges property determines whether the WebView 27960 /// attempts to track monitor DPI scale changes. When true, the WebView will 27961 /// track monitor DPI scale changes, update the RasterizationScale property, 27962 /// and raises RasterizationScaleChanged event. When false, the WebView will 27963 /// not track monitor DPI scale changes, and the app must update the 27964 /// RasterizationScale property itself. RasterizationScaleChanged event will 27965 /// never raise when ShouldDetectMonitorScaleChanges is false. Apps that want 27966 /// to set their own rasterization scale should set this property to false to 27967 /// avoid the WebView2 updating the RasterizationScale property to match the 27968 /// monitor DPI scale. 27969 @(" propget") 27970 HRESULT get_ShouldDetectMonitorScaleChanges(@("out, retval") BOOL* value); 27971 /// Set the ShouldDetectMonitorScaleChanges property. 27972 @(" propput") 27973 HRESULT put_ShouldDetectMonitorScaleChanges(in BOOL value); 27974 27975 /// Add an event handler for the RasterizationScaleChanged event. 27976 /// The event is raised when the WebView detects that the monitor DPI scale 27977 /// has changed, ShouldDetectMonitorScaleChanges is true, and the WebView has 27978 /// changed the RasterizationScale property. 27979 /// 27980 /// \snippet ViewComponent.cpp RasterizationScaleChanged 27981 HRESULT add_RasterizationScaleChanged( 27982 /+[in]+/ ICoreWebView2RasterizationScaleChangedEventHandler eventHandler, 27983 @("out") EventRegistrationToken* token); 27984 /// Remove an event handler previously added with 27985 /// add_RasterizationScaleChanged. 27986 HRESULT remove_RasterizationScaleChanged( 27987 in EventRegistrationToken token); 27988 27989 /// BoundsMode affects how setting the Bounds and RasterizationScale 27990 /// properties work. Bounds mode can either be in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS 27991 /// mode or COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE mode. 27992 /// 27993 /// When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS, setting the bounds 27994 /// property will set the size of the WebView in raw screen pixels. Changing 27995 /// the rasterization scale in this mode won't change the raw pixel size of 27996 /// the WebView and will only change the rasterization scale. 27997 /// 27998 /// When the mode is in COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE, setting the 27999 /// bounds property will change the logical size of the WebView which can be 28000 /// described by the following equation: 28001 /// ```text 28002 /// Logical size * rasterization scale = Raw Pixel size 28003 /// ``` 28004 /// In this case, changing the rasterization scale will keep the logical size 28005 /// the same and change the raw pixel size. 28006 /// 28007 /// \snippet ViewComponent.cpp BoundsMode 28008 @(" propget") 28009 HRESULT get_BoundsMode( 28010 @("out, retval") COREWEBVIEW2_BOUNDS_MODE* boundsMode); 28011 /// Set the BoundsMode property. 28012 @(" propput") 28013 HRESULT put_BoundsMode(in COREWEBVIEW2_BOUNDS_MODE boundsMode); 28014 } 28015 28016 /// This is the ICoreWebView2Controller4 interface. 28017 /// The ICoreWebView2Controller4 provides interface to enable/disable external drop. 28018 const GUID IID_ICoreWebView2Controller4 = ICoreWebView2Controller4.iid; 28019 28020 interface ICoreWebView2Controller4 : ICoreWebView2Controller3 28021 { 28022 static const GUID iid = { 0x97d418d5,0xa426,0x4e49,[ 0xa1,0x51,0xe1,0xa1,0x0f,0x32,0x7d,0x9e ] }; 28023 /// Gets the `AllowExternalDrop` property which is used to configure the 28024 /// capability that dragging objects from outside the bounds of webview2 and 28025 /// dropping into webview2 is allowed or disallowed. The default value is 28026 /// TRUE. 28027 /// 28028 /// \snippet SettingsComponent.cpp ToggleAllowExternalDrop 28029 @(" propget") 28030 HRESULT get_AllowExternalDrop(@(" out, retval ") BOOL * value); 28031 /// Sets the `AllowExternalDrop` property which is used to configure the 28032 /// capability that dragging objects from outside the bounds of webview2 and 28033 /// dropping into webview2 is allowed or disallowed. 28034 /// 28035 /// \snippet SettingsComponent.cpp ToggleAllowExternalDrop 28036 @(" propput") 28037 HRESULT put_AllowExternalDrop(in BOOL value); 28038 } 28039 28040 /// This interface is an extension of the ICoreWebView2Controller interface to 28041 /// support visual hosting. An object implementing the 28042 /// ICoreWebView2CompositionController interface will also implement 28043 /// ICoreWebView2Controller. Callers are expected to use 28044 /// ICoreWebView2Controller for resizing, visibility, focus, and so on, and 28045 /// then use ICoreWebView2CompositionController to connect to a composition 28046 /// tree and provide input meant for the WebView. 28047 const GUID IID_ICoreWebView2CompositionController = ICoreWebView2CompositionController.iid; 28048 28049 interface ICoreWebView2CompositionController : IUnknown 28050 { 28051 static const GUID iid = { 0x3df9b733,0xb9ae,0x4a15,[ 0x86,0xb4,0xeb,0x9e,0xe9,0x82,0x64,0x69 ] }; 28052 /// The RootVisualTarget is a visual in the hosting app's visual tree. This 28053 /// visual is where the WebView will connect its visual tree. The app uses 28054 /// this visual to position the WebView within the app. The app still needs 28055 /// to use the Bounds property to size the WebView. The RootVisualTarget 28056 /// property can be an IDCompositionVisual or a 28057 /// Windows::UI::Composition::ContainerVisual. WebView will connect its visual 28058 /// tree to the provided visual before returning from the property setter. The 28059 /// app needs to commit on its device setting the RootVisualTarget property. 28060 /// The RootVisualTarget property supports being set to nullptr to disconnect 28061 /// the WebView from the app's visual tree. 28062 /// \snippet ViewComponent.cpp SetRootVisualTarget 28063 /// \snippet ViewComponent.cpp BuildDCompTree 28064 @(" propget") 28065 HRESULT get_RootVisualTarget(@("out, retval") IUnknown * target); 28066 /// Set the RootVisualTarget property. 28067 @(" propput") 28068 HRESULT put_RootVisualTarget(/+[in]+/ IUnknown target); 28069 28070 /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL or 28071 /// COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL, then mouseData specifies the amount of 28072 /// wheel movement. A positive value indicates that the wheel was rotated 28073 /// forward, away from the user; a negative value indicates that the wheel was 28074 /// rotated backward, toward the user. One wheel click is defined as 28075 /// WHEEL_DELTA, which is 120. 28076 /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK 28077 /// COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN, or 28078 /// COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP, then mouseData specifies which X 28079 /// buttons were pressed or released. This value should be 1 if the first X 28080 /// button is pressed/released and 2 if the second X button is 28081 /// pressed/released. 28082 /// If eventKind is COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE, then virtualKeys, 28083 /// mouseData, and point should all be zero. 28084 /// If eventKind is any other value, then mouseData should be zero. 28085 /// Point is expected to be in the client coordinate space of the WebView. 28086 /// To track mouse events that start in the WebView and can potentially move 28087 /// outside of the WebView and host application, calling SetCapture and 28088 /// ReleaseCapture is recommended. 28089 /// To dismiss hover popups, it is also recommended to send 28090 /// COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE messages. 28091 /// \snippet ViewComponent.cpp SendMouseInput 28092 HRESULT SendMouseInput( 28093 in COREWEBVIEW2_MOUSE_EVENT_KIND eventKind, 28094 in COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS virtualKeys, 28095 in UINT32 mouseData, 28096 in POINT point); 28097 28098 /// SendPointerInput accepts touch or pen pointer input of types defined in 28099 /// COREWEBVIEW2_POINTER_EVENT_KIND. Any pointer input from the system must be 28100 /// converted into an ICoreWebView2PointerInfo first. 28101 HRESULT SendPointerInput( 28102 in COREWEBVIEW2_POINTER_EVENT_KIND eventKind, 28103 /+[in]+/ ICoreWebView2PointerInfo pointerInfo); 28104 28105 /// The current cursor that WebView thinks it should be. The cursor should be 28106 /// set in WM_SETCURSOR through \::SetCursor or set on the corresponding 28107 /// parent/ancestor HWND of the WebView through \::SetClassLongPtr. The HCURSOR 28108 /// can be freed so CopyCursor/DestroyCursor is recommended to keep your own 28109 /// copy if you are doing more than immediately setting the cursor. 28110 @(" propget") 28111 HRESULT get_Cursor(@("out, retval") HCURSOR* cursor); 28112 28113 /// The current system cursor ID reported by the underlying rendering engine 28114 /// for WebView. For example, most of the time, when the cursor is over text, 28115 /// this will return the int value for IDC_IBEAM. The systemCursorId is only 28116 /// valid if the rendering engine reports a default Windows cursor resource 28117 /// value. Navigate to 28118 /// [LoadCursorW](/windows/win32/api/winuser/nf-winuser-loadcursorw) for more 28119 /// details. Otherwise, if custom CSS cursors are being used, this will return 28120 /// 0. To actually use systemCursorId in LoadCursor or LoadImage, 28121 /// MAKEINTRESOURCE must be called on it first. 28122 /// 28123 /// \snippet ViewComponent.cpp SystemCursorId 28124 @(" propget") 28125 HRESULT get_SystemCursorId(@("out, retval") UINT32* systemCursorId); 28126 28127 /// Add an event handler for the CursorChanged event. 28128 /// The event is raised when WebView thinks the cursor should be changed. For 28129 /// example, when the mouse cursor is currently the default cursor but is then 28130 /// moved over text, it may try to change to the IBeam cursor. 28131 /// 28132 /// It is expected for the developer to send 28133 /// COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE messages (in addition to 28134 /// COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE messages) through the SendMouseInput 28135 /// API. This is to ensure that the mouse is actually within the WebView that 28136 /// sends out CursorChanged events. 28137 /// 28138 /// \snippet ViewComponent.cpp CursorChanged 28139 HRESULT add_CursorChanged( 28140 /+[in]+/ ICoreWebView2CursorChangedEventHandler eventHandler, 28141 @("out") EventRegistrationToken* token); 28142 /// Remove an event handler previously added with add_CursorChanged. 28143 HRESULT remove_CursorChanged( 28144 in EventRegistrationToken token); 28145 } 28146 28147 /// A continuation of the ICoreWebView2CompositionController interface. 28148 const GUID IID_ICoreWebView2CompositionController2 = ICoreWebView2CompositionController2.iid; 28149 28150 interface ICoreWebView2CompositionController2 : ICoreWebView2CompositionController 28151 { 28152 static const GUID iid = { 0x0b6a3d24,0x49cb,0x4806,[ 0xba,0x20,0xb5,0xe0,0x73,0x4a,0x7b,0x26 ] }; 28153 /// Returns the Automation Provider for the WebView. This object implements 28154 /// IRawElementProviderSimple. 28155 @(" propget") 28156 HRESULT get_AutomationProvider(@("out, retval") IUnknown * provider); 28157 } 28158 28159 /// This interface is the continuation of the 28160 /// ICoreWebView2CompositionController2 interface to manage drag and drop. 28161 const GUID IID_ICoreWebView2CompositionController3 = ICoreWebView2CompositionController3.iid; 28162 28163 interface ICoreWebView2CompositionController3 : ICoreWebView2CompositionController2 28164 { 28165 static const GUID iid = { 0x9570570e,0x4d76,0x4361,[ 0x9e,0xe1,0xf0,0x4d,0x0d,0xbd,0xfb,0x1e ] }; 28166 /// This function corresponds to [IDropTarget::DragEnter](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragenter). 28167 /// 28168 /// This function has a dependency on AllowExternalDrop property of 28169 /// CoreWebView2Controller and return E_FAIL to callers to indicate this 28170 /// operation is not allowed if AllowExternalDrop property is set to false. 28171 /// 28172 /// The hosting application must register as an IDropTarget and implement 28173 /// and forward DragEnter calls to this function. 28174 /// 28175 /// point parameter must be modified to include the WebView's offset and be in 28176 /// the WebView's client coordinates (Similar to how SendMouseInput works). 28177 /// 28178 /// \snippet DropTarget.cpp DragEnter 28179 HRESULT DragEnter( 28180 in IDataObject* dataObject, 28181 in DWORD keyState, 28182 in POINT point, 28183 @("out, retval") DWORD* effect); 28184 28185 /// This function corresponds to [IDropTarget::DragLeave](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragleave). 28186 /// 28187 /// This function has a dependency on AllowExternalDrop property of 28188 /// CoreWebView2Controller and return E_FAIL to callers to indicate this 28189 /// operation is not allowed if AllowExternalDrop property is set to false. 28190 /// 28191 /// The hosting application must register as an IDropTarget and implement 28192 /// and forward DragLeave calls to this function. 28193 /// 28194 /// \snippet DropTarget.cpp DragLeave 28195 HRESULT DragLeave(); 28196 28197 /// This function corresponds to [IDropTarget::DragOver](/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragover). 28198 /// 28199 /// This function has a dependency on AllowExternalDrop property of 28200 /// CoreWebView2Controller and return E_FAIL to callers to indicate this 28201 /// operation is not allowed if AllowExternalDrop property is set to false. 28202 /// 28203 /// The hosting application must register as an IDropTarget and implement 28204 /// and forward DragOver calls to this function. 28205 /// 28206 /// point parameter must be modified to include the WebView's offset and be in 28207 /// the WebView's client coordinates (Similar to how SendMouseInput works). 28208 /// 28209 /// \snippet DropTarget.cpp DragOver 28210 HRESULT DragOver( 28211 in DWORD keyState, 28212 in POINT point, 28213 @("out, retval") DWORD* effect); 28214 28215 /// This function corresponds to [IDropTarget::Drop](/windows/win32/api/oleidl/nf-oleidl-idroptarget-drop). 28216 /// 28217 /// This function has a dependency on AllowExternalDrop property of 28218 /// CoreWebView2Controller and return E_FAIL to callers to indicate this 28219 /// operation is not allowed if AllowExternalDrop property is set to false. 28220 /// 28221 /// The hosting application must register as an IDropTarget and implement 28222 /// and forward Drop calls to this function. 28223 /// 28224 /// point parameter must be modified to include the WebView's offset and be in 28225 /// the WebView's client coordinates (Similar to how SendMouseInput works). 28226 /// 28227 /// \snippet DropTarget.cpp Drop 28228 HRESULT Drop( 28229 in IDataObject* dataObject, 28230 in DWORD keyState, 28231 in POINT point, 28232 @("out, retval") DWORD* effect); 28233 } 28234 28235 /// This interface is used to complete deferrals on event args that support 28236 /// getting deferrals using the `GetDeferral` method. 28237 28238 const GUID IID_ICoreWebView2Deferral = ICoreWebView2Deferral.iid; 28239 28240 interface ICoreWebView2Deferral : IUnknown 28241 { 28242 static const GUID iid = { 0xc10e7f7b,0xb585,0x46f0,[ 0xa6,0x23,0x8b,0xef,0xbf,0x3e,0x4e,0xe0 ] }; 28243 28244 /// Completes the associated deferred event. Complete should only be run 28245 /// once for each deferral taken. 28246 28247 HRESULT Complete(); 28248 } 28249 28250 /// Defines properties that enable, disable, or modify WebView features. 28251 /// Changes to `IsGeneralAutofillEnabled` and `IsPasswordAutosaveEnabled` 28252 /// apply immediately, while other setting changes made after `NavigationStarting` 28253 /// event do not apply until the next top-level navigation. 28254 28255 const GUID IID_ICoreWebView2Settings = ICoreWebView2Settings.iid; 28256 28257 interface ICoreWebView2Settings : IUnknown 28258 { 28259 static const GUID iid = { 0xe562e4f0,0xd7fa,0x43ac,[ 0x8d,0x71,0xc0,0x51,0x50,0x49,0x9f,0x00 ] }; 28260 28261 /// Controls if running JavaScript is enabled in all future navigations in 28262 /// the WebView. This only affects scripts in the document. Scripts 28263 /// injected with `ExecuteScript` runs even if script is disabled. 28264 /// The default value is `TRUE`. 28265 /// 28266 /// \snippet SettingsComponent.cpp IsScriptEnabled 28267 @(" propget") 28268 HRESULT get_IsScriptEnabled( 28269 @("out, retval") BOOL* isScriptEnabled); 28270 28271 /// Sets the `IsScriptEnabled` property. 28272 @(" propput") 28273 HRESULT put_IsScriptEnabled(in BOOL isScriptEnabled); 28274 28275 /// The `IsWebMessageEnabled` property is used when loading a new HTML 28276 /// document. If set to `TRUE`, communication from the host to the top-level 28277 /// HTML document of the WebView is allowed using `PostWebMessageAsJson`, 28278 /// `PostWebMessageAsString`, and message event of `window.chrome.webview`. 28279 /// For more information, navigate to PostWebMessageAsJson. Communication 28280 /// from the top-level HTML document of the WebView to the host is allowed 28281 /// using the postMessage function of `window.chrome.webview` and 28282 /// `add_WebMessageReceived` method. For more information, navigate to 28283 /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived). 28284 /// If set to false, then communication is disallowed. `PostWebMessageAsJson` 28285 /// and `PostWebMessageAsString` fails with `E_ACCESSDENIED` and 28286 /// `window.chrome.webview.postMessage` fails by throwing an instance of an 28287 /// `Error` object. The default value is `TRUE`. 28288 /// 28289 /// \snippet ScenarioWebMessage.cpp IsWebMessageEnabled 28290 @(" propget") 28291 HRESULT get_IsWebMessageEnabled( 28292 @("out, retval") BOOL* isWebMessageEnabled); 28293 28294 /// Sets the `IsWebMessageEnabled` property. 28295 @(" propput") 28296 HRESULT put_IsWebMessageEnabled(in BOOL isWebMessageEnabled); 28297 28298 /// `AreDefaultScriptDialogsEnabled` is used when loading a new HTML 28299 /// document. If set to `FALSE`, WebView2 does not render the default JavaScript 28300 /// dialog box (Specifically those displayed by the JavaScript alert, 28301 /// confirm, prompt functions and `beforeunload` event). Instead, if an 28302 /// event handler is set using `add_ScriptDialogOpening`, WebView sends an 28303 /// event that contains all of the information for the dialog and allow the 28304 /// host app to show a custom UI. 28305 /// The default value is `TRUE`. 28306 @(" propget") 28307 HRESULT get_AreDefaultScriptDialogsEnabled( 28308 @("out, retval") BOOL* areDefaultScriptDialogsEnabled); 28309 28310 /// Sets the `AreDefaultScriptDialogsEnabled` property. 28311 @(" propput") 28312 HRESULT put_AreDefaultScriptDialogsEnabled( 28313 in BOOL areDefaultScriptDialogsEnabled); 28314 28315 /// `IsStatusBarEnabled` controls whether the status bar is displayed. The 28316 /// status bar is usually displayed in the lower left of the WebView and 28317 /// shows things such as the URI of a link when the user hovers over it and 28318 /// other information. 28319 /// The default value is `TRUE`. 28320 /// The status bar UI can be altered by web content and should not be considered secure. 28321 @(" propget") 28322 HRESULT get_IsStatusBarEnabled(@("out, retval") BOOL* isStatusBarEnabled); 28323 28324 /// Sets the `IsStatusBarEnabled` property. 28325 @(" propput") 28326 HRESULT put_IsStatusBarEnabled(in BOOL isStatusBarEnabled); 28327 28328 /// `AreDevToolsEnabled` controls whether the user is able to use the context 28329 /// menu or keyboard shortcuts to open the DevTools window. 28330 /// The default value is `TRUE`. 28331 @(" propget") 28332 HRESULT get_AreDevToolsEnabled(@("out, retval") BOOL* areDevToolsEnabled); 28333 28334 /// Sets the `AreDevToolsEnabled` property. 28335 @(" propput") 28336 HRESULT put_AreDevToolsEnabled(in BOOL areDevToolsEnabled); 28337 28338 /// The `AreDefaultContextMenusEnabled` property is used to prevent default 28339 /// context menus from being shown to user in WebView. 28340 /// The default value is `TRUE`. 28341 /// 28342 /// \snippet SettingsComponent.cpp DisableContextMenu 28343 @(" propget") 28344 HRESULT get_AreDefaultContextMenusEnabled(@("out, retval") BOOL* enabled); 28345 28346 /// Sets the `AreDefaultContextMenusEnabled` property. 28347 @(" propput") 28348 HRESULT put_AreDefaultContextMenusEnabled(in BOOL enabled); 28349 28350 /// The `AreHostObjectsAllowed` property is used to control whether host 28351 /// objects are accessible from the page in WebView. 28352 /// The default value is `TRUE`. 28353 /// 28354 /// \snippet SettingsComponent.cpp HostObjectsAccess 28355 @(" propget") 28356 HRESULT get_AreHostObjectsAllowed(@("out, retval") BOOL* allowed); 28357 28358 /// Sets the `AreHostObjectsAllowed` property. 28359 28360 @(" propput") 28361 HRESULT put_AreHostObjectsAllowed(in BOOL allowed); 28362 28363 /// The `IsZoomControlEnabled` property is used to prevent the user from 28364 /// impacting the zoom of the WebView. When disabled, the user is not able 28365 /// to zoom using Ctrl++, Ctrl+-, or Ctrl+mouse wheel, but the zoom 28366 /// is set using `ZoomFactor` API. The default value is `TRUE`. 28367 /// 28368 /// \snippet SettingsComponent.cpp DisableZoomControl 28369 28370 @(" propget") 28371 HRESULT get_IsZoomControlEnabled(@("out, retval") BOOL* enabled); 28372 28373 /// Sets the `IsZoomControlEnabled` property. 28374 28375 @(" propput") 28376 HRESULT put_IsZoomControlEnabled(in BOOL enabled); 28377 28378 /// The `IsBuiltInErrorPageEnabled` property is used to disable built in 28379 /// error page for navigation failure and render process failure. When 28380 /// disabled, a blank page is displayed when the related error happens. 28381 /// The default value is `TRUE`. 28382 /// 28383 /// \snippet SettingsComponent.cpp BuiltInErrorPageEnabled 28384 @(" propget") 28385 HRESULT get_IsBuiltInErrorPageEnabled(@("out, retval") BOOL* enabled); 28386 28387 /// Sets the `IsBuiltInErrorPageEnabled` property. 28388 @(" propput") 28389 HRESULT put_IsBuiltInErrorPageEnabled(in BOOL enabled); 28390 } 28391 28392 /// A continuation of the ICoreWebView2Settings interface that manages the user agent. 28393 28394 const GUID IID_ICoreWebView2Settings2 = ICoreWebView2Settings2.iid; 28395 28396 interface ICoreWebView2Settings2 : ICoreWebView2Settings 28397 { 28398 static const GUID iid = { 0xee9a0f68,0xf46c,0x4e32,[ 0xac,0x23,0xef,0x8c,0xac,0x22,0x4d,0x2a ] }; 28399 /// Returns the User Agent. The default value is the default User Agent of the 28400 /// Microsoft Edge browser. 28401 /// 28402 /// The caller must free the returned string with `CoTaskMemFree`. See 28403 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28404 /// 28405 /// \snippet SettingsComponent.cpp UserAgent 28406 @(" propget") 28407 HRESULT get_UserAgent(@("out, retval") LPWSTR* userAgent); 28408 /// Sets the `UserAgent` property. This property may be overridden if 28409 /// the User-Agent header is set in a request. If the parameter is empty 28410 /// the User Agent will not be updated and the current User Agent will remain. 28411 /// Returns `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if the owning WebView is 28412 /// closed. 28413 @(" propput") 28414 HRESULT put_UserAgent(in LPCWSTR userAgent); 28415 } 28416 28417 /// A continuation of the ICoreWebView2Settings interface that manages whether 28418 /// browser accelerator keys are enabled. 28419 const GUID IID_ICoreWebView2Settings3 = ICoreWebView2Settings3.iid; 28420 28421 interface ICoreWebView2Settings3 : ICoreWebView2Settings2 28422 { 28423 static const GUID iid = { 0xfdb5ab74,0xaf33,0x4854,[ 0x84,0xf0,0x0a,0x63,0x1d,0xeb,0x5e,0xba ] }; 28424 /// When this setting is set to FALSE, it disables all accelerator keys that 28425 /// access features specific to a web browser, including but not limited to: 28426 /// - Ctrl-F and F3 for Find on Page 28427 /// - Ctrl-P for Print 28428 /// - Ctrl-R and F5 for Reload 28429 /// - Ctrl-Plus and Ctrl-Minus for zooming 28430 /// - Ctrl-Shift-C and F12 for DevTools 28431 /// - Special keys for browser functions, such as Back, Forward, and Search 28432 /// 28433 /// It does not disable accelerator keys related to movement and text editing, 28434 /// such as: 28435 /// - Home, End, Page Up, and Page Down 28436 /// - Ctrl-X, Ctrl-C, Ctrl-V 28437 /// - Ctrl-A for Select All 28438 /// - Ctrl-Z for Undo 28439 /// 28440 /// Those accelerator keys will always be enabled unless they are handled in 28441 /// the `AcceleratorKeyPressed` event. 28442 /// 28443 /// This setting has no effect on the `AcceleratorKeyPressed` event. The event 28444 /// will be fired for all accelerator keys, whether they are enabled or not. 28445 /// 28446 /// The default value for `AreBrowserAcceleratorKeysEnabled` is TRUE. 28447 /// 28448 /// \snippet SettingsComponent.cpp AreBrowserAcceleratorKeysEnabled 28449 @(" propget") 28450 HRESULT get_AreBrowserAcceleratorKeysEnabled( 28451 @("out, retval") BOOL* areBrowserAcceleratorKeysEnabled); 28452 28453 /// Sets the `AreBrowserAcceleratorKeysEnabled` property. 28454 @(" propput") 28455 HRESULT put_AreBrowserAcceleratorKeysEnabled( 28456 in BOOL areBrowserAcceleratorKeysEnabled); 28457 } 28458 28459 /// A continuation of the ICoreWebView2Settings interface to manage autofill. 28460 const GUID IID_ICoreWebView2Settings4 = ICoreWebView2Settings4.iid; 28461 28462 interface ICoreWebView2Settings4 : ICoreWebView2Settings3 28463 { 28464 static const GUID iid = { 0xcb56846c,0x4168,0x4d53,[ 0xb0,0x4f,0x03,0xb6,0xd6,0x79,0x6f,0xf2 ] }; 28465 /// IsPasswordAutosaveEnabled controls whether autosave for password 28466 /// information is enabled. The IsPasswordAutosaveEnabled property behaves 28467 /// independently of the IsGeneralAutofillEnabled property. When IsPasswordAutosaveEnabled is 28468 /// false, no new password data is saved and no Save/Update Password prompts are displayed. 28469 /// However, if there was password data already saved before disabling this setting, 28470 /// then that password information is auto-populated, suggestions are shown and clicking on 28471 /// one will populate the fields. 28472 /// When IsPasswordAutosaveEnabled is true, password information is auto-populated, 28473 /// suggestions are shown and clicking on one will populate the fields, new data 28474 /// is saved, and a Save/Update Password prompt is displayed. 28475 /// It will take effect immediately after setting. 28476 /// The default value is `FALSE`. 28477 /// This property has the same value as 28478 /// `CoreWebView2Profile.IsPasswordAutosaveEnabled`, and changing one will 28479 /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile` 28480 /// will share the same value for this property, so for the `CoreWebView2`s 28481 /// with the same profile, their 28482 /// `CoreWebView2Settings.IsPasswordAutosaveEnabled` and 28483 /// `CoreWebView2Profile.IsPasswordAutosaveEnabled` will always have the same 28484 /// value. 28485 /// 28486 /// \snippet SettingsComponent.cpp PasswordAutosaveEnabled 28487 @(" propget") 28488 HRESULT get_IsPasswordAutosaveEnabled(@("out, retval") BOOL* value); 28489 28490 /// Set the IsPasswordAutosaveEnabled property. 28491 @(" propput") 28492 HRESULT put_IsPasswordAutosaveEnabled(in BOOL value); 28493 28494 /// IsGeneralAutofillEnabled controls whether autofill for information 28495 /// like names, street and email addresses, phone numbers, and arbitrary input 28496 /// is enabled. This excludes password and credit card information. When 28497 /// IsGeneralAutofillEnabled is false, no suggestions appear, and no new information 28498 /// is saved. When IsGeneralAutofillEnabled is true, information is saved, suggestions 28499 /// appear and clicking on one will populate the form fields. 28500 /// It will take effect immediately after setting. 28501 /// The default value is `TRUE`. 28502 /// This property has the same value as 28503 /// `CoreWebView2Profile.IsGeneralAutofillEnabled`, and changing one will 28504 /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile` 28505 /// will share the same value for this property, so for the `CoreWebView2`s 28506 /// with the same profile, their 28507 /// `CoreWebView2Settings.IsGeneralAutofillEnabled` and 28508 /// `CoreWebView2Profile.IsGeneralAutofillEnabled` will always have the same 28509 /// value. 28510 /// 28511 /// \snippet SettingsComponent.cpp GeneralAutofillEnabled 28512 @(" propget") 28513 HRESULT get_IsGeneralAutofillEnabled(@("out, retval") BOOL* value); 28514 28515 /// Set the IsGeneralAutofillEnabled property. 28516 @(" propput") 28517 HRESULT put_IsGeneralAutofillEnabled(in BOOL value); 28518 } 28519 28520 /// A continuation of the ICoreWebView2Settings interface to manage pinch zoom. 28521 const GUID IID_ICoreWebView2Settings5 = ICoreWebView2Settings5.iid; 28522 28523 interface ICoreWebView2Settings5 : ICoreWebView2Settings4 28524 { 28525 static const GUID iid = { 0x183e7052,0x1d03,0x43a0,[ 0xab,0x99,0x98,0xe0,0x43,0xb6,0x6b,0x39 ] }; 28526 /// Pinch-zoom, referred to as "Page Scale" zoom, is performed as a post-rendering step, 28527 /// it changes the page scale factor property and scales the surface the web page is 28528 /// rendered onto when user performs a pinch zooming action. It does not change the layout 28529 /// but rather changes the viewport and clips the web content, the content outside of the 28530 /// viewport isn't visible onscreen and users can't reach this content using mouse. 28531 /// 28532 /// The `IsPinchZoomEnabled` property enables or disables the ability of 28533 /// the end user to use a pinching motion on touch input enabled devices 28534 /// to scale the web content in the WebView2. It defaults to `TRUE`. 28535 /// When set to `FALSE`, the end user cannot pinch zoom after the next navigation. 28536 /// Disabling/Enabling `IsPinchZoomEnabled` only affects the end user's ability to use 28537 /// pinch motions and does not change the page scale factor. 28538 /// This API only affects the Page Scale zoom and has no effect on the 28539 /// existing browser zoom properties (`IsZoomControlEnabled` and `ZoomFactor`) 28540 /// or other end user mechanisms for zooming. 28541 /// 28542 /// \snippet SettingsComponent.cpp TogglePinchZoomEnabled 28543 @(" propget") 28544 HRESULT get_IsPinchZoomEnabled(@("out, retval") BOOL* enabled); 28545 /// Set the `IsPinchZoomEnabled` property 28546 @(" propput") 28547 HRESULT put_IsPinchZoomEnabled(in BOOL enabled); 28548 } 28549 28550 /// A continuation of the ICoreWebView2Settings interface to manage swipe navigation. 28551 const GUID IID_ICoreWebView2Settings6 = ICoreWebView2Settings6.iid; 28552 28553 interface ICoreWebView2Settings6 : ICoreWebView2Settings5 28554 { 28555 static const GUID iid = { 0x11cb3acd,0x9bc8,0x43b8,[ 0x83,0xbf,0xf4,0x07,0x53,0x71,0x4f,0x87 ] }; 28556 /// The `IsSwipeNavigationEnabled` property enables or disables the ability of the 28557 /// end user to use swiping gesture on touch input enabled devices to 28558 /// navigate in WebView2. It defaults to `TRUE`. 28559 /// 28560 /// When this property is `TRUE`, then all configured navigation gestures are enabled: 28561 /// 1. Swiping left and right to navigate forward and backward is always configured. 28562 /// 2. Swiping down to refresh is off by default and not exposed via our API currently, 28563 /// it requires the "--pull-to-refresh" option to be included in the additional browser 28564 /// arguments to be configured. (See put_AdditionalBrowserArguments.) 28565 /// 28566 /// When set to `FALSE`, the end user cannot swipe to navigate or pull to refresh. 28567 /// This API only affects the overscrolling navigation functionality and has no 28568 /// effect on the scrolling interaction used to explore the web content shown 28569 /// in WebView2. 28570 /// 28571 /// Disabling/Enabling IsSwipeNavigationEnabled takes effect after the 28572 /// next navigation. 28573 /// 28574 /// \snippet SettingsComponent.cpp ToggleSwipeNavigationEnabled 28575 @(" propget") 28576 HRESULT get_IsSwipeNavigationEnabled(@("out, retval") BOOL* enabled); 28577 /// Set the `IsSwipeNavigationEnabled` property 28578 @(" propput") 28579 HRESULT put_IsSwipeNavigationEnabled(in BOOL enabled); 28580 } 28581 28582 /// A continuation of the ICoreWebView2Settings interface to hide Pdf toolbar items. 28583 const GUID IID_ICoreWebView2Settings7 = ICoreWebView2Settings7.iid; 28584 28585 interface ICoreWebView2Settings7 : ICoreWebView2Settings6 28586 { 28587 static const GUID iid = { 0x488dc902,0x35ef,0x42d2,[ 0xbc,0x7d,0x94,0xb6,0x5c,0x4b,0xc4,0x9c ] }; 28588 /// `HiddenPdfToolbarItems` is used to customize the PDF toolbar items. By default, it is COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE and so it displays all of the items. 28589 /// Changes to this property apply to all CoreWebView2s in the same environment and using the same profile. 28590 /// Changes to this setting apply only after the next navigation. 28591 /// \snippet SettingsComponent.cpp ToggleHidePdfToolbarItems 28592 @(" propget") 28593 HRESULT get_HiddenPdfToolbarItems(@("out, retval") COREWEBVIEW2_PDF_TOOLBAR_ITEMS* hidden_pdf_toolbar_items); 28594 28595 /// Set the `HiddenPdfToolbarItems` property. 28596 @(" propput") 28597 HRESULT put_HiddenPdfToolbarItems(in COREWEBVIEW2_PDF_TOOLBAR_ITEMS hidden_pdf_toolbar_items); 28598 } 28599 28600 /// A continuation of the ICoreWebView2Settings interface to manage smartscreen. 28601 const GUID IID_ICoreWebView2Settings8 = ICoreWebView2Settings8.iid; 28602 28603 interface ICoreWebView2Settings8 : ICoreWebView2Settings7 28604 { 28605 static const GUID iid = { 0x9e6b0e8f,0x86ad,0x4e81,[ 0x81,0x47,0xa9,0xb5,0xed,0xb6,0x86,0x50 ] }; 28606 /// SmartScreen helps webviews identify reported phishing and malware websites 28607 /// and also helps users make informed decisions about downloads. 28608 /// `IsReputationCheckingRequired` is used to control whether SmartScreen 28609 /// enabled or not. SmartScreen is enabled or disabled for all CoreWebView2s 28610 /// using the same user data folder. If 28611 /// CoreWebView2Setting.IsReputationCheckingRequired is true for any 28612 /// CoreWebView2 using the same user data folder, then SmartScreen is enabled. 28613 /// If CoreWebView2Setting.IsReputationCheckingRequired is false for all 28614 /// CoreWebView2 using the same user data folder, then SmartScreen is 28615 /// disabled. When it is changed, the change will be applied to all WebViews 28616 /// using the same user data folder on the next navigation or download. The 28617 /// default value for `IsReputationCheckingRequired` is true. If the newly 28618 /// created CoreWebview2 does not set SmartScreen to false, when 28619 /// navigating(Such as Navigate(), LoadDataUrl(), ExecuteScript(), etc.), the 28620 /// default value will be applied to all CoreWebview2 using the same user data 28621 /// folder. 28622 /// SmartScreen of WebView2 apps can be controlled by Windows system setting 28623 /// "SmartScreen for Microsoft Edge", specially, for WebView2 in Windows 28624 /// Store apps, SmartScreen is controlled by another Windows system setting 28625 /// "SmartScreen for Microsoft Store apps". When the Windows setting is enabled, the 28626 /// SmartScreen operates under the control of the `IsReputationCheckingRequired`. 28627 /// When the Windows setting is disabled, the SmartScreen will be disabled 28628 /// regardless of the `IsReputationCheckingRequired` value set in WebView2 apps. 28629 /// In other words, under this circumstance the value of 28630 /// `IsReputationCheckingRequired` will be saved but overridden by system setting. 28631 /// Upon re-enabling the Windows setting, the CoreWebview2 will reference the 28632 /// `IsReputationCheckingRequired` to determine the SmartScreen status. 28633 /// \snippet SettingsComponent.cpp ToggleSmartScreen 28634 @(" propget") 28635 HRESULT get_IsReputationCheckingRequired(@("out, retval") BOOL* value); 28636 28637 /// Sets whether this webview2 instance needs SmartScreen protection for its content. 28638 /// Set the `IsReputationCheckingRequired` property. 28639 @(" propput") 28640 HRESULT put_IsReputationCheckingRequired(in BOOL value); 28641 } 28642 28643 /// Event args for the `ProcessFailed` event. 28644 const GUID IID_ICoreWebView2ProcessFailedEventArgs = ICoreWebView2ProcessFailedEventArgs.iid; 28645 28646 interface ICoreWebView2ProcessFailedEventArgs : IUnknown 28647 { 28648 static const GUID iid = { 0x8155a9a4,0x1474,0x4a86,[ 0x8c,0xae,0x15,0x1b,0x0f,0xa6,0xb8,0xca ] }; 28649 28650 /// The kind of process failure that has occurred. This is a combination of 28651 /// process kind (for example, browser, renderer, gpu) and failure (exit, 28652 /// unresponsiveness). Renderer processes are further divided in _main frame_ 28653 /// renderer (`RenderProcessExited`, `RenderProcessUnresponsive`) and 28654 /// _subframe_ renderer (`FrameRenderProcessExited`). To learn about the 28655 /// conditions under which each failure kind occurs, see 28656 /// `COREWEBVIEW2_PROCESS_FAILED_KIND`. 28657 @(" propget") 28658 HRESULT get_ProcessFailedKind( 28659 @("out, retval") COREWEBVIEW2_PROCESS_FAILED_KIND* processFailedKind); 28660 } 28661 28662 /// Receives `ProcessFailed` events. 28663 const GUID IID_ICoreWebView2ProcessFailedEventHandler = ICoreWebView2ProcessFailedEventHandler.iid; 28664 28665 interface ICoreWebView2ProcessFailedEventHandler : IUnknown 28666 { 28667 static const GUID iid = { 0x79e0aea4,0x990b,0x42d9,[ 0xaa,0x1d,0x0f,0xcc,0x2e,0x5b,0xc7,0xf1 ] }; 28668 28669 /// Provides the event args for the corresponding event. 28670 28671 HRESULT Invoke( 28672 /+[in]+/ ICoreWebView2 sender, 28673 /+[in]+/ ICoreWebView2ProcessFailedEventArgs args); 28674 } 28675 28676 /// Implements the interface to receive `ZoomFactorChanged` events. Use the 28677 /// `ICoreWebView2Controller.ZoomFactor` property to get the modified zoom 28678 /// factor. 28679 28680 const GUID IID_ICoreWebView2ZoomFactorChangedEventHandler = ICoreWebView2ZoomFactorChangedEventHandler.iid; 28681 28682 interface ICoreWebView2ZoomFactorChangedEventHandler : IUnknown 28683 { 28684 static const GUID iid = { 0xb52d71d6,0xc4df,0x4543,[ 0xa9,0x0c,0x64,0xa3,0xe6,0x0f,0x38,0xcb ] }; 28685 28686 /// Provides the event args for the corresponding event. No event args exist 28687 /// and the `args` parameter is set to `null`. 28688 28689 HRESULT Invoke(/+[in]+/ ICoreWebView2Controller sender, /+[in]+/ IUnknown args); 28690 } 28691 28692 /// Iterator for a collection of HTTP headers. For more information, navigate 28693 /// to ICoreWebView2HttpRequestHeaders and ICoreWebView2HttpResponseHeaders. 28694 /// 28695 /// \snippet ScenarioWebViewEventMonitor.cpp HttpRequestHeaderIterator 28696 const GUID IID_ICoreWebView2HttpHeadersCollectionIterator = ICoreWebView2HttpHeadersCollectionIterator.iid; 28697 28698 interface ICoreWebView2HttpHeadersCollectionIterator : IUnknown 28699 { 28700 static const GUID iid = { 0x0702fc30,0xf43b,0x47bb,[ 0xab,0x52,0xa4,0x2c,0xb5,0x52,0xad,0x9f ] }; 28701 28702 /// Get the name and value of the current HTTP header of the iterator. If 28703 /// the previous `MoveNext` operation set the `hasNext` parameter to `FALSE`, 28704 /// this method fails. 28705 /// 28706 /// The caller must free the returned strings with `CoTaskMemFree`. See 28707 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28708 28709 HRESULT GetCurrentHeader(@("out") LPWSTR* name, 28710 @("out") LPWSTR* value); 28711 28712 /// `TRUE` when the iterator has not run out of headers. If the collection 28713 /// over which the iterator is iterating is empty or if the iterator has gone 28714 /// past the end of the collection then this is `FALSE`. 28715 28716 @(" propget") 28717 HRESULT get_HasCurrentHeader(@("out, retval") BOOL* hasCurrent); 28718 28719 /// Move the iterator to the next HTTP header in the collection. 28720 /// 28721 /// \> [!NOTE]\n \> If no more HTTP headers exist, the `hasNext` parameter is set to 28722 /// `FALSE`. After this occurs the `GetCurrentHeader` method fails. 28723 28724 HRESULT MoveNext(@("out, retval") BOOL* hasNext); 28725 } 28726 28727 /// HTTP request headers. Used to inspect the HTTP request on 28728 /// `WebResourceRequested` event and `NavigationStarting` event. 28729 /// 28730 /// \> [!NOTE]\n\> It is possible to modify the HTTP request from a `WebResourceRequested` 28731 /// event, but not from a `NavigationStarting` event. 28732 const GUID IID_ICoreWebView2HttpRequestHeaders = ICoreWebView2HttpRequestHeaders.iid; 28733 28734 interface ICoreWebView2HttpRequestHeaders : IUnknown 28735 { 28736 static const GUID iid = { 0xe86cac0e,0x5523,0x465c,[ 0xb5,0x36,0x8f,0xb9,0xfc,0x8c,0x8c,0x60 ] }; 28737 28738 /// Gets the header value matching the name. 28739 /// 28740 /// The caller must free the returned string with `CoTaskMemFree`. See 28741 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28742 28743 HRESULT GetHeader(in LPCWSTR name, 28744 @("out, retval") LPWSTR* value); 28745 28746 /// Gets the header value matching the name using an iterator. 28747 28748 HRESULT GetHeaders(in LPCWSTR name, 28749 @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator); 28750 28751 /// Verifies that the headers contain an entry that matches the header name. 28752 28753 HRESULT Contains(in LPCWSTR name, 28754 @("out, retval") BOOL* contains); 28755 28756 /// Adds or updates header that matches the name. 28757 28758 HRESULT SetHeader(in LPCWSTR name, in LPCWSTR value); 28759 28760 /// Removes header that matches the name. 28761 28762 HRESULT RemoveHeader(in LPCWSTR name); 28763 28764 /// Gets an iterator over the collection of request headers. 28765 28766 HRESULT GetIterator( 28767 @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator); 28768 } 28769 28770 /// HTTP response headers. Used to construct a `WebResourceResponse` for the 28771 /// `WebResourceRequested` event. 28772 const GUID IID_ICoreWebView2HttpResponseHeaders = ICoreWebView2HttpResponseHeaders.iid; 28773 28774 interface ICoreWebView2HttpResponseHeaders : IUnknown 28775 { 28776 static const GUID iid = { 0x03c5ff5a,0x9b45,0x4a88,[ 0x88,0x1c,0x89,0xa9,0xf3,0x28,0x61,0x9c ] }; 28777 28778 /// Appends header line with name and value. 28779 28780 HRESULT AppendHeader(in LPCWSTR name, in LPCWSTR value); 28781 28782 /// Verifies that the headers contain entries that match the header name. 28783 28784 HRESULT Contains(in LPCWSTR name, 28785 @("out, retval") BOOL* contains); 28786 28787 /// Gets the first header value in the collection matching the name. 28788 /// 28789 /// The caller must free the returned string with `CoTaskMemFree`. See 28790 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28791 28792 HRESULT GetHeader(in LPCWSTR name, 28793 @("out, retval") LPWSTR* value); 28794 28795 /// Gets the header values matching the name. 28796 28797 HRESULT GetHeaders(in LPCWSTR name, 28798 @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator); 28799 28800 /// Gets an iterator over the collection of entire response headers. 28801 28802 HRESULT GetIterator( 28803 @("out, retval") ICoreWebView2HttpHeadersCollectionIterator * iterator); 28804 } 28805 28806 /// An HTTP request used with the `WebResourceRequested` event. 28807 const GUID IID_ICoreWebView2WebResourceRequest = ICoreWebView2WebResourceRequest.iid; 28808 28809 interface ICoreWebView2WebResourceRequest : IUnknown 28810 { 28811 static const GUID iid = { 0x97055cd4,0x512c,0x4264,[ 0x8b,0x5f,0xe3,0xf4,0x46,0xce,0xa6,0xa5 ] }; 28812 28813 /// The request URI. 28814 /// 28815 /// The caller must free the returned string with `CoTaskMemFree`. See 28816 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28817 28818 @(" propget") 28819 HRESULT get_Uri(@("out, retval") LPWSTR* uri); 28820 28821 /// Sets the `Uri` property. 28822 28823 @(" propput") 28824 HRESULT put_Uri(in LPCWSTR uri); 28825 28826 /// The HTTP request method. 28827 /// 28828 /// The caller must free the returned string with `CoTaskMemFree`. See 28829 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28830 28831 @(" propget") 28832 HRESULT get_Method(@("out, retval") LPWSTR* method); 28833 28834 /// Sets the `Method` property. 28835 28836 @(" propput") 28837 HRESULT put_Method(in LPCWSTR method); 28838 28839 /// The HTTP request message body as stream. POST data should be here. If a 28840 /// stream is set, which overrides the message body, the stream must have 28841 /// all the content data available by the time the `WebResourceRequested` 28842 /// event deferral of this response is completed. Stream should be agile or 28843 /// be created from a background STA to prevent performance impact to the UI 28844 /// thread. `Null` means no content data. `IStream` semantics apply 28845 /// (return `S_OK` to `Read` runs until all data is exhausted). 28846 28847 @(" propget") 28848 HRESULT get_Content(@("out, retval") IStream** content); 28849 28850 /// Sets the `Content` property. 28851 28852 @(" propput") 28853 HRESULT put_Content(in IStream* content); 28854 28855 /// The mutable HTTP request headers 28856 28857 @(" propget") 28858 HRESULT get_Headers(@("out, retval") ICoreWebView2HttpRequestHeaders * headers); 28859 } 28860 28861 /// An HTTP response used with the `WebResourceRequested` event. 28862 const GUID IID_ICoreWebView2WebResourceResponse = ICoreWebView2WebResourceResponse.iid; 28863 28864 interface ICoreWebView2WebResourceResponse : IUnknown 28865 { 28866 static const GUID iid = { 0xaafcc94f,0xfa27,0x48fd,[ 0x97,0xdf,0x83,0x0e,0xf7,0x5a,0xae,0xc9 ] }; 28867 28868 /// HTTP response content as stream. Stream must have all the content data 28869 /// available by the time the `WebResourceRequested` event deferral of this 28870 /// response is completed. Stream should be agile or be created from a 28871 /// background thread to prevent performance impact to the UI thread. `Null` 28872 /// means no content data. `IStream` semantics apply (return `S_OK` to 28873 /// `Read` runs until all data is exhausted). 28874 /// When providing the response data, you should consider relevant HTTP 28875 /// request headers just like an HTTP server would do. For example, if the 28876 /// request was for a video resource in a HTML video element, the request may 28877 /// contain the [Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) 28878 /// header to request only a part of the video that is streaming. In this 28879 /// case, your response stream should be only the portion of the video 28880 /// specified by the range HTTP request headers and you should set the 28881 /// appropriate 28882 /// [Content-Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) 28883 /// header in the response. 28884 28885 @(" propget") 28886 HRESULT get_Content(@("out, retval") IStream** content); 28887 28888 /// Sets the `Content` property. 28889 28890 @(" propput") 28891 HRESULT put_Content(in IStream* content); 28892 28893 /// Overridden HTTP response headers. 28894 28895 @(" propget") 28896 HRESULT get_Headers(@("out, retval") ICoreWebView2HttpResponseHeaders * headers); 28897 28898 /// The HTTP response status code. 28899 28900 @(" propget") 28901 HRESULT get_StatusCode(@("out, retval") int* statusCode); 28902 28903 /// Sets the `StatusCode` property. 28904 28905 @(" propput") 28906 HRESULT put_StatusCode(in int statusCode); 28907 28908 /// The HTTP response reason phrase. 28909 /// 28910 /// The caller must free the returned string with `CoTaskMemFree`. See 28911 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28912 28913 @(" propget") 28914 HRESULT get_ReasonPhrase(@("out, retval") LPWSTR* reasonPhrase); 28915 28916 /// Sets the `ReasonPhrase` property. 28917 28918 @(" propput") 28919 HRESULT put_ReasonPhrase(in LPCWSTR reasonPhrase); 28920 } 28921 28922 /// Event args for the `NavigationStarting` event. 28923 const GUID IID_ICoreWebView2NavigationStartingEventArgs = ICoreWebView2NavigationStartingEventArgs.iid; 28924 28925 interface ICoreWebView2NavigationStartingEventArgs : IUnknown 28926 { 28927 static const GUID iid = { 0x5b495469,0xe119,0x438a,[ 0x9b,0x18,0x76,0x04,0xf2,0x5f,0x2e,0x49 ] }; 28928 28929 /// The uri of the requested navigation. 28930 /// 28931 /// The caller must free the returned string with `CoTaskMemFree`. See 28932 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28933 28934 @(" propget") 28935 HRESULT get_Uri(@("out, retval") LPWSTR* uri); 28936 28937 /// `TRUE` when the navigation was initiated through a user gesture as 28938 /// opposed to programmatic navigation by page script. Navigations initiated 28939 /// via WebView2 APIs are considered as user initiated. 28940 28941 @(" propget") 28942 HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated); 28943 28944 /// `TRUE` when the navigation is redirected. 28945 28946 @(" propget") 28947 HRESULT get_IsRedirected(@("out, retval") BOOL* isRedirected); 28948 28949 /// The HTTP request headers for the navigation. 28950 /// 28951 /// \> [!NOTE]\n\> You are not able to modify the HTTP request headers in a 28952 /// `NavigationStarting` event. 28953 28954 @(" propget") 28955 HRESULT get_RequestHeaders(@("out, retval") ICoreWebView2HttpRequestHeaders * requestHeaders); 28956 28957 /// The host may set this flag to cancel the navigation. If set, the 28958 /// navigation is not longer present and the content of the current page is 28959 /// intact. For performance reasons, `GET` HTTP requests may happen, while 28960 /// the host is responding. You may set cookies and use part of a request 28961 /// for the navigation. Cancellation for navigation to `about:blank` or 28962 /// frame navigation to `srcdoc` is not supported. Such attempts are 28963 /// ignored. A cancelled navigation will fire a `NavigationCompleted` event 28964 /// with a `WebErrorStatus` of 28965 /// `COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED`. 28966 28967 @(" propget") 28968 HRESULT get_Cancel(@("out, retval") BOOL* cancel); 28969 28970 /// Sets the `Cancel` property. 28971 28972 @(" propput") 28973 HRESULT put_Cancel(in BOOL cancel); 28974 28975 /// The ID of the navigation. 28976 28977 @(" propget") 28978 HRESULT get_NavigationId(@("out, retval") UINT64* navigationId); 28979 } 28980 28981 /// The AdditionalAllowedFrameAncestors API that enable developers to provide additional allowed frame ancestors. 28982 const GUID IID_ICoreWebView2NavigationStartingEventArgs2 = ICoreWebView2NavigationStartingEventArgs2.iid; 28983 28984 interface ICoreWebView2NavigationStartingEventArgs2 : ICoreWebView2NavigationStartingEventArgs 28985 { 28986 static const GUID iid = { 0x9086BE93,0x91AA,0x472D,[ 0xA7,0xE0,0x57,0x9F,0x2B,0xA0,0x06,0xAD ] }; 28987 28988 /// Get additional allowed frame ancestors set by the host app. 28989 /// 28990 /// The caller must free the returned string with `CoTaskMemFree`. See 28991 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 28992 @(" propget") 28993 HRESULT get_AdditionalAllowedFrameAncestors(@("out, retval") LPWSTR* value); 28994 28995 /// The app may set this property to allow a frame to be embedded by additional ancestors besides what is allowed by 28996 /// http header [X-Frame-Options](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Frame-Options) 28997 /// and [Content-Security-Policy frame-ancestors directive](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors). 28998 /// If set, a frame ancestor is allowed if it is allowed by the additional allowed frame 28999 /// ancestors or original http header from the site. 29000 /// Whether an ancestor is allowed by the additional allowed frame ancestors is done the same way as if the site provided 29001 /// it as the source list of the Content-Security-Policy frame-ancestors directive. 29002 /// For example, if `https://example.com` and `https://www.example.com` are the origins of the top 29003 /// page and intermediate iframes that embed a nested site-embedding iframe, and you fully trust 29004 /// those origins, you should set this property to `https://example.com https://www.example.com`. 29005 /// This property gives the app the ability to use iframe to embed sites that otherwise 29006 /// could not be embedded in an iframe in trusted app pages. 29007 /// This could potentially subject the embedded sites to [Clickjacking](https://en.wikipedia.org/wiki/Clickjacking) 29008 /// attack from the code running in the embedding web page. Therefore, you should only 29009 /// set this property with origins of fully trusted embedding page and any intermediate iframes. 29010 /// Whenever possible, you should use the list of specific origins of the top and intermediate 29011 /// frames instead of wildcard characters for this property. 29012 /// This API is to provide limited support for app scenarios that used to be supported by 29013 /// `<webview>` element in other solutions like JavaScript UWP apps and Electron. 29014 /// You should limit the usage of this property to trusted pages, and specific navigation 29015 /// target url, by checking the `Source` of the WebView2, and `Uri` of the event args. 29016 /// 29017 /// This property is ignored for top level document navigation. 29018 /// 29019 /// \snippet ScriptComponent.cpp AdditionalAllowedFrameAncestors_1 29020 /// 29021 /// \snippet ScriptComponent.cpp AdditionalAllowedFrameAncestors_2 29022 @(" propput") 29023 HRESULT put_AdditionalAllowedFrameAncestors(in LPCWSTR value); 29024 } 29025 29026 /// The NavigationKind API that enables developers to get more information about 29027 /// navigation type. 29028 const GUID IID_ICoreWebView2NavigationStartingEventArgs3 = ICoreWebView2NavigationStartingEventArgs3.iid; 29029 29030 interface ICoreWebView2NavigationStartingEventArgs3 : ICoreWebView2NavigationStartingEventArgs2 29031 { 29032 static const GUID iid = { 0xDDFFE494,0x4942,0x4BD2,[ 0xAB,0x73,0x35,0xB8,0xFF,0x40,0xE1,0x9F ] }; 29033 29034 /// Get the navigation kind of this navigation. 29035 /// 29036 @(" propget") 29037 HRESULT get_NavigationKind(@("out, retval") COREWEBVIEW2_NAVIGATION_KIND* navigation_kind); 29038 } 29039 29040 /// Receives `NavigationStarting` events. 29041 const GUID IID_ICoreWebView2NavigationStartingEventHandler = ICoreWebView2NavigationStartingEventHandler.iid; 29042 29043 interface ICoreWebView2NavigationStartingEventHandler : IUnknown 29044 { 29045 static const GUID iid = { 0x9adbe429,0xf36d,0x432b,[ 0x9d,0xdc,0xf8,0x88,0x1f,0xbd,0x76,0xe3 ] }; 29046 29047 /// Provides the event args for the corresponding event. 29048 29049 HRESULT Invoke( 29050 /+[in]+/ ICoreWebView2 sender, 29051 /+[in]+/ ICoreWebView2NavigationStartingEventArgs args); 29052 } 29053 29054 /// Event args for the `ContentLoading` event. 29055 const GUID IID_ICoreWebView2ContentLoadingEventArgs = ICoreWebView2ContentLoadingEventArgs.iid; 29056 29057 interface ICoreWebView2ContentLoadingEventArgs : IUnknown 29058 { 29059 static const GUID iid = { 0x0c8a1275,0x9b6b,0x4901,[ 0x87,0xad,0x70,0xdf,0x25,0xba,0xfa,0x6e ] }; 29060 29061 /// `TRUE` if the loaded content is an error page. 29062 29063 @(" propget") 29064 HRESULT get_IsErrorPage(@("out, retval") BOOL* isErrorPage); 29065 29066 /// The ID of the navigation. 29067 29068 @(" propget") 29069 HRESULT get_NavigationId(@("out, retval") UINT64* navigationId); 29070 } 29071 29072 /// Receives `ContentLoading` events. 29073 const GUID IID_ICoreWebView2ContentLoadingEventHandler = ICoreWebView2ContentLoadingEventHandler.iid; 29074 29075 interface ICoreWebView2ContentLoadingEventHandler : IUnknown 29076 { 29077 static const GUID iid = { 0x364471e7,0xf2be,0x4910,[ 0xbd,0xba,0xd7,0x20,0x77,0xd5,0x1c,0x4b ] }; 29078 29079 /// Provides the event args for the corresponding event. 29080 29081 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2ContentLoadingEventArgs args); 29082 } 29083 29084 /// Event args for the `SourceChanged` event. 29085 const GUID IID_ICoreWebView2SourceChangedEventArgs = ICoreWebView2SourceChangedEventArgs.iid; 29086 29087 interface ICoreWebView2SourceChangedEventArgs : IUnknown 29088 { 29089 static const GUID iid = { 0x31e0e545,0x1dba,0x4266,[ 0x89,0x14,0xf6,0x38,0x48,0xa1,0xf7,0xd7 ] }; 29090 29091 /// `TRUE` if the page being navigated to is a new document. 29092 29093 @(" propget") 29094 HRESULT get_IsNewDocument(@("out, retval") BOOL* isNewDocument); 29095 } 29096 29097 /// Receives `SourceChanged` events. 29098 const GUID IID_ICoreWebView2SourceChangedEventHandler = ICoreWebView2SourceChangedEventHandler.iid; 29099 29100 interface ICoreWebView2SourceChangedEventHandler : IUnknown 29101 { 29102 static const GUID iid = { 0x3c067f9f,0x5388,0x4772,[ 0x8b,0x48,0x79,0xf7,0xef,0x1a,0xb3,0x7c ] }; 29103 29104 /// Provides the event args for the corresponding event. 29105 29106 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2SourceChangedEventArgs args); 29107 } 29108 29109 /// Receives `HistoryChanged` events. 29110 const GUID IID_ICoreWebView2HistoryChangedEventHandler = ICoreWebView2HistoryChangedEventHandler.iid; 29111 29112 interface ICoreWebView2HistoryChangedEventHandler : IUnknown 29113 { 29114 static const GUID iid = { 0xc79a420c,0xefd9,0x4058,[ 0x92,0x95,0x3e,0x8b,0x4b,0xca,0xb6,0x45 ] }; 29115 29116 /// Provides the event args for the corresponding event. No event args exist 29117 /// and the `args` parameter is set to `null`. 29118 29119 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 29120 } 29121 29122 /// Event args for the `ScriptDialogOpening` event. 29123 const GUID IID_ICoreWebView2ScriptDialogOpeningEventArgs = ICoreWebView2ScriptDialogOpeningEventArgs.iid; 29124 29125 interface ICoreWebView2ScriptDialogOpeningEventArgs : IUnknown 29126 { 29127 static const GUID iid = { 0x7390bb70,0xabe0,0x4843,[ 0x95,0x29,0xf1,0x43,0xb3,0x1b,0x03,0xd6 ] }; 29128 29129 /// The URI of the page that requested the dialog box. 29130 /// 29131 /// The caller must free the returned string with `CoTaskMemFree`. See 29132 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29133 29134 @(" propget") 29135 HRESULT get_Uri(@("out, retval") LPWSTR* uri); 29136 29137 /// The kind of JavaScript dialog box. `alert`, `confirm`, `prompt`, or 29138 /// `beforeunload`. 29139 29140 @(" propget") 29141 HRESULT get_Kind(@("out, retval") COREWEBVIEW2_SCRIPT_DIALOG_KIND* kind); 29142 29143 /// The message of the dialog box. From JavaScript this is the first 29144 /// parameter passed to `alert`, `confirm`, and `prompt` and is empty for 29145 /// `beforeunload`. 29146 /// 29147 /// The caller must free the returned string with `CoTaskMemFree`. See 29148 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29149 29150 @(" propget") 29151 HRESULT get_Message(@("out, retval") LPWSTR* message); 29152 29153 /// The host may run this to respond with **OK** to `confirm`, `prompt`, and 29154 /// `beforeunload` dialogs. Do not run this method to indicate cancel. 29155 /// From JavaScript, this means that the `confirm` and `beforeunload` function 29156 /// returns `TRUE` if `Accept` is run. And for the prompt function it returns 29157 /// the value of `ResultText` if `Accept` is run and otherwise returns 29158 /// `FALSE`. 29159 29160 HRESULT Accept(); 29161 29162 /// The second parameter passed to the JavaScript prompt dialog. 29163 /// The result of the prompt JavaScript function uses this value as the 29164 /// default value. 29165 /// 29166 /// The caller must free the returned string with `CoTaskMemFree`. See 29167 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29168 29169 @(" propget") 29170 HRESULT get_DefaultText(@("out, retval") LPWSTR* defaultText); 29171 29172 /// The return value from the JavaScript prompt function if `Accept` is run. 29173 /// This value is ignored for dialog kinds other than prompt. If `Accept` 29174 /// is not run, this value is ignored and `FALSE` is returned from prompt. 29175 /// 29176 /// The caller must free the returned string with `CoTaskMemFree`. See 29177 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29178 29179 @(" propget") 29180 HRESULT get_ResultText(@("out, retval") LPWSTR* resultText); 29181 29182 /// Sets the `ResultText` property. 29183 29184 @(" propput") 29185 HRESULT put_ResultText(in LPCWSTR resultText); 29186 29187 /// Returns an `ICoreWebView2Deferral` object. Use this operation to 29188 /// complete the event at a later time. 29189 29190 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 29191 } 29192 29193 /// Receives `ScriptDialogOpening` events. 29194 const GUID IID_ICoreWebView2ScriptDialogOpeningEventHandler = ICoreWebView2ScriptDialogOpeningEventHandler.iid; 29195 29196 interface ICoreWebView2ScriptDialogOpeningEventHandler : IUnknown 29197 { 29198 static const GUID iid = { 0xef381bf9,0xafa8,0x4e37,[ 0x91,0xc4,0x8a,0xc4,0x85,0x24,0xbd,0xfb ] }; 29199 29200 /// Provides the event args for the corresponding event. 29201 29202 HRESULT Invoke( 29203 /+[in]+/ ICoreWebView2 sender, 29204 /+[in]+/ ICoreWebView2ScriptDialogOpeningEventArgs args); 29205 } 29206 29207 /// Event args for the `NavigationCompleted` event. 29208 const GUID IID_ICoreWebView2NavigationCompletedEventArgs = ICoreWebView2NavigationCompletedEventArgs.iid; 29209 29210 interface ICoreWebView2NavigationCompletedEventArgs : IUnknown 29211 { 29212 static const GUID iid = { 0x30d68b7d,0x20d9,0x4752,[ 0xa9,0xca,0xec,0x84,0x48,0xfb,0xb5,0xc1 ] }; 29213 29214 /// `TRUE` when the navigation is successful. `FALSE` for a navigation that 29215 /// ended up in an error page (failures due to no network, DNS lookup 29216 /// failure, HTTP server responds with 4xx), but may also be `FALSE` for 29217 /// additional scenarios such as `window.stop()` run on navigated page. 29218 /// Note that WebView2 will report the navigation as 'unsuccessful' if the load 29219 /// for the navigation did not reach the expected completion for any reason. Such 29220 /// reasons include potentially catastrophic issues such network and certificate 29221 /// issues, but can also be the result of intended actions such as the app canceling a navigation or 29222 /// navigating away before the original navigation completed. Applications should not 29223 /// just rely on this flag, but also consider the reported WebErrorStatus to 29224 /// determine whether the failure is indeed catastrophic in their context. 29225 /// WebErrorStatuses that may indicate a non-catastrophic failure include: 29226 /// - COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED 29227 /// - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED 29228 /// - COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED 29229 29230 @(" propget") 29231 HRESULT get_IsSuccess(@("out, retval") BOOL* isSuccess); 29232 29233 /// The error code if the navigation failed. 29234 29235 @(" propget") 29236 HRESULT get_WebErrorStatus(@("out, retval") COREWEBVIEW2_WEB_ERROR_STATUS* 29237 webErrorStatus); 29238 29239 /// The ID of the navigation. 29240 29241 @(" propget") 29242 HRESULT get_NavigationId(@("out, retval") UINT64* navigationId); 29243 } 29244 29245 /// This is an interface for the StatusCode property of 29246 /// ICoreWebView2NavigationCompletedEventArgs 29247 const GUID IID_ICoreWebView2NavigationCompletedEventArgs2 = ICoreWebView2NavigationCompletedEventArgs2.iid; 29248 29249 interface ICoreWebView2NavigationCompletedEventArgs2 : ICoreWebView2NavigationCompletedEventArgs 29250 { 29251 static const GUID iid = { 0xFDF8B738,0xEE1E,0x4DB2,[ 0xA3,0x29,0x8D,0x7D,0x7B,0x74,0xD7,0x92 ] }; 29252 /// The HTTP status code of the navigation if it involved an HTTP request. 29253 /// For instance, this will usually be 200 if the request was successful, 404 29254 /// if a page was not found, etc. See 29255 /// https://developer.mozilla.org/docs/Web/HTTP/Status for a list of 29256 /// common status codes. 29257 /// 29258 /// The `HttpStatusCode` property will be 0 in the following cases: 29259 /// * The navigation did not involve an HTTP request. For instance, if it was 29260 /// a navigation to a file:// URL, or if it was a same-document navigation. 29261 /// * The navigation failed before a response was received. For instance, if 29262 /// the hostname was not found, or if there was a network error. 29263 /// 29264 /// In those cases, you can get more information from the `IsSuccess` and 29265 /// `WebErrorStatus` properties. 29266 /// 29267 /// If the navigation receives a successful HTTP response, but the navigated 29268 /// page calls `window.stop()` before it finishes loading, then 29269 /// `HttpStatusCode` may contain a success code like 200, but `IsSuccess` will 29270 /// be FALSE and `WebErrorStatus` will be 29271 /// `COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED`. 29272 /// 29273 /// Since WebView2 handles HTTP continuations and redirects automatically, it 29274 /// is unlikely for `HttpStatusCode` to ever be in the 1xx or 3xx ranges. 29275 @(" propget") 29276 HRESULT get_HttpStatusCode(@("out, retval") int* http_status_code); 29277 } 29278 29279 /// Receives `NavigationCompleted` events. 29280 const GUID IID_ICoreWebView2NavigationCompletedEventHandler = ICoreWebView2NavigationCompletedEventHandler.iid; 29281 29282 interface ICoreWebView2NavigationCompletedEventHandler : IUnknown 29283 { 29284 static const GUID iid = { 0xd33a35bf,0x1c49,0x4f98,[ 0x93,0xab,0x00,0x6e,0x05,0x33,0xfe,0x1c ] }; 29285 29286 /// Provides the event args for the corresponding event. 29287 29288 HRESULT Invoke( 29289 /+[in]+/ ICoreWebView2 sender, 29290 /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args); 29291 } 29292 29293 /// Event args for the `PermissionRequested` event. 29294 const GUID IID_ICoreWebView2PermissionRequestedEventArgs = ICoreWebView2PermissionRequestedEventArgs.iid; 29295 29296 interface ICoreWebView2PermissionRequestedEventArgs : IUnknown 29297 { 29298 static const GUID iid = { 0x973ae2ef,0xff18,0x4894,[ 0x8f,0xb2,0x3c,0x75,0x8f,0x04,0x68,0x10 ] }; 29299 29300 /// The origin of the web content that requests the permission. 29301 /// 29302 /// The caller must free the returned string with `CoTaskMemFree`. See 29303 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29304 29305 @(" propget") 29306 HRESULT get_Uri(@("out, retval") LPWSTR* uri); 29307 29308 /// The type of the permission that is requested. 29309 29310 @(" propget") 29311 HRESULT get_PermissionKind(@("out, retval") COREWEBVIEW2_PERMISSION_KIND* permissionKind); 29312 29313 /// `TRUE` when the permission request was initiated through a user gesture. 29314 /// 29315 /// \> [!NOTE]\n\> Being initiated through a user gesture does not mean that user intended 29316 /// to access the associated resource. 29317 29318 @(" propget") 29319 HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated); 29320 29321 /// The status of a permission request, (for example is the request is granted). 29322 /// The default value is `COREWEBVIEW2_PERMISSION_STATE_DEFAULT`. 29323 29324 @(" propget") 29325 HRESULT get_State(@("out, retval") COREWEBVIEW2_PERMISSION_STATE* state); 29326 29327 /// Sets the `State` property. 29328 29329 @(" propput") 29330 HRESULT put_State(in COREWEBVIEW2_PERMISSION_STATE state); 29331 29332 /// Gets an `ICoreWebView2Deferral` object. Use the deferral object to make 29333 /// the permission decision at a later time. The deferral only applies to the 29334 /// current request, and does not prevent the `PermissionRequested` event from 29335 /// getting raised for new requests. However, for some permission kinds the 29336 /// WebView will avoid creating a new request if there is a pending request of 29337 /// the same kind. 29338 29339 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 29340 } 29341 29342 /// Receives `PermissionRequested` events. 29343 const GUID IID_ICoreWebView2PermissionRequestedEventHandler = ICoreWebView2PermissionRequestedEventHandler.iid; 29344 29345 interface ICoreWebView2PermissionRequestedEventHandler : IUnknown 29346 { 29347 static const GUID iid = { 0x15e1c6a3,0xc72a,0x4df3,[ 0x91,0xd7,0xd0,0x97,0xfb,0xec,0x6b,0xfd ] }; 29348 29349 /// Provides the event args for the corresponding event. 29350 29351 HRESULT Invoke( 29352 /+[in]+/ ICoreWebView2 sender, 29353 /+[in]+/ ICoreWebView2PermissionRequestedEventArgs args); 29354 } 29355 29356 /// Receives the result of the `AddScriptToExecuteOnDocumentCreated` method. 29357 const GUID IID_ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler = ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler.iid; 29358 29359 interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler : IUnknown 29360 { 29361 static const GUID iid = { 0xb99369f3,0x9b11,0x47b5,[ 0xbc,0x6f,0x8e,0x78,0x95,0xfc,0xea,0x17 ] }; 29362 29363 /// Provide the completion status and result of the corresponding 29364 /// asynchronous method. 29365 29366 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR id); 29367 } 29368 29369 /// Receives the result of the `ExecuteScript` method. 29370 const GUID IID_ICoreWebView2ExecuteScriptCompletedHandler = ICoreWebView2ExecuteScriptCompletedHandler.iid; 29371 29372 interface ICoreWebView2ExecuteScriptCompletedHandler : IUnknown 29373 { 29374 static const GUID iid = { 0x49511172,0xcc67,0x4bca,[ 0x99,0x23,0x13,0x71,0x12,0xf4,0xc4,0xcc ] }; 29375 29376 /// Provide the implementer with the completion status and result of the 29377 /// corresponding asynchronous method. 29378 29379 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR resultObjectAsJson); 29380 } 29381 29382 /// Event args for the `WebResourceRequested` event. 29383 const GUID IID_ICoreWebView2WebResourceRequestedEventArgs = ICoreWebView2WebResourceRequestedEventArgs.iid; 29384 29385 interface ICoreWebView2WebResourceRequestedEventArgs : IUnknown 29386 { 29387 static const GUID iid = { 0x453e667f,0x12c7,0x49d4,[ 0xbe,0x6d,0xdd,0xbe,0x79,0x56,0xf5,0x7a ] }; 29388 29389 /// The Web resource request. The request object may be missing some headers 29390 /// that are added by network stack at a later time. 29391 29392 @(" propget") 29393 HRESULT get_Request(@("out, retval") ICoreWebView2WebResourceRequest * request); 29394 29395 /// A placeholder for the web resource response object. If this object is 29396 /// set, the web resource request is completed with the specified response. 29397 29398 @(" propget") 29399 HRESULT get_Response(@("out, retval") ICoreWebView2WebResourceResponse * response); 29400 29401 /// Sets the `Response` property. Create an empty web resource response 29402 /// object with `CreateWebResourceResponse` and then modify it to construct 29403 /// the response. 29404 29405 @(" propput") 29406 HRESULT put_Response(/+[in]+/ ICoreWebView2WebResourceResponse response); 29407 29408 /// Obtain an `ICoreWebView2Deferral` object and put the event into a 29409 /// deferred state. Use the `ICoreWebView2Deferral` object to complete the 29410 /// request at a later time. 29411 29412 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 29413 29414 /// The web resource request context. 29415 29416 @(" propget") 29417 HRESULT get_ResourceContext(@("out, retval") COREWEBVIEW2_WEB_RESOURCE_CONTEXT* context); 29418 } 29419 29420 /// Runs when a URL request (through network, file, and so on) is made in 29421 /// the webview for a Web resource matching resource context filter and URL 29422 /// specified in `AddWebResourceRequestedFilter`. The host views and modifies 29423 /// the request or provide a response in a similar pattern to HTTP, in which 29424 /// case the request immediately completed. This may not contain any request 29425 /// headers that are added by the network stack, such as an `Authorization` 29426 /// header. 29427 const GUID IID_ICoreWebView2WebResourceRequestedEventHandler = ICoreWebView2WebResourceRequestedEventHandler.iid; 29428 29429 interface ICoreWebView2WebResourceRequestedEventHandler : IUnknown 29430 { 29431 static const GUID iid = { 0xab00b74c,0x15f1,0x4646,[ 0x80,0xe8,0xe7,0x63,0x41,0xd2,0x5d,0x71 ] }; 29432 29433 /// Provides the event args for the corresponding event. 29434 29435 HRESULT Invoke( 29436 /+[in]+/ ICoreWebView2 sender, 29437 /+[in]+/ ICoreWebView2WebResourceRequestedEventArgs args); 29438 } 29439 29440 /// Receives the result of the `CapturePreview` method. The result is written 29441 /// to the stream provided in the `CapturePreview` method. 29442 29443 const GUID IID_ICoreWebView2CapturePreviewCompletedHandler = ICoreWebView2CapturePreviewCompletedHandler.iid; 29444 29445 interface ICoreWebView2CapturePreviewCompletedHandler : IUnknown 29446 { 29447 static const GUID iid = { 0x697e05e9,0x3d8f,0x45fa,[ 0x96,0xf4,0x8f,0xfe,0x1e,0xde,0xda,0xf5 ] }; 29448 29449 /// Provides the completion status of the corresponding asynchronous method. 29450 29451 HRESULT Invoke(in HRESULT errorCode); 29452 } 29453 29454 /// Receives `GotFocus` and `LostFocus` events. 29455 29456 const GUID IID_ICoreWebView2FocusChangedEventHandler = ICoreWebView2FocusChangedEventHandler.iid; 29457 29458 interface ICoreWebView2FocusChangedEventHandler : IUnknown 29459 { 29460 static const GUID iid = { 0x05ea24bd,0x6452,0x4926,[ 0x90,0x14,0x4b,0x82,0xb4,0x98,0x13,0x5d ] }; 29461 29462 /// Provides the event args for the corresponding event. No event args exist 29463 /// and the `args` parameter is set to `null`. 29464 29465 HRESULT Invoke( 29466 /+[in]+/ ICoreWebView2Controller sender, 29467 /+[in]+/ IUnknown args); 29468 } 29469 29470 /// Event args for the `MoveFocusRequested` event. 29471 29472 const GUID IID_ICoreWebView2MoveFocusRequestedEventArgs = ICoreWebView2MoveFocusRequestedEventArgs.iid; 29473 29474 interface ICoreWebView2MoveFocusRequestedEventArgs : IUnknown 29475 { 29476 static const GUID iid = { 0x2d6aa13b,0x3839,0x4a15,[ 0x92,0xfc,0xd8,0x8b,0x3c,0x0d,0x9c,0x9d ] }; 29477 29478 /// The reason for WebView to run the `MoveFocusRequested` event. 29479 29480 @(" propget") 29481 HRESULT get_Reason(@("out, retval") COREWEBVIEW2_MOVE_FOCUS_REASON* reason); 29482 29483 /// Indicates whether the event has been handled by the app. If the app has 29484 /// moved the focus to another desired location, it should set the `Handled` 29485 /// property to `TRUE`. When the `Handled` property is `FALSE` after the 29486 /// event handler returns, default action is taken. The default action is to 29487 /// try to find the next tab stop child window in the app and try to move 29488 /// focus to that window. If no other window exists to move focus, focus is 29489 /// cycled within the web content of the WebView. 29490 29491 @(" propget") 29492 HRESULT get_Handled(@("out, retval") BOOL* value); 29493 29494 /// Sets the `Handled` property. 29495 29496 @(" propput") 29497 HRESULT put_Handled(in BOOL value); 29498 } 29499 29500 /// Receives `MoveFocusRequested` events. 29501 29502 const GUID IID_ICoreWebView2MoveFocusRequestedEventHandler = ICoreWebView2MoveFocusRequestedEventHandler.iid; 29503 29504 interface ICoreWebView2MoveFocusRequestedEventHandler : IUnknown 29505 { 29506 static const GUID iid = { 0x69035451,0x6dc7,0x4cb8,[ 0x9b,0xce,0xb2,0xbd,0x70,0xad,0x28,0x9f ] }; 29507 29508 /// Provides the event args for the corresponding event. 29509 29510 HRESULT Invoke( 29511 /+[in]+/ ICoreWebView2Controller sender, 29512 /+[in]+/ ICoreWebView2MoveFocusRequestedEventArgs args); 29513 } 29514 29515 /// Event args for the `WebMessageReceived` event. 29516 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs = ICoreWebView2WebMessageReceivedEventArgs.iid; 29517 29518 interface ICoreWebView2WebMessageReceivedEventArgs : IUnknown 29519 { 29520 static const GUID iid = { 0x0f99a40c,0xe962,0x4207,[ 0x9e,0x92,0xe3,0xd5,0x42,0xef,0xf8,0x49 ] }; 29521 29522 /// The URI of the document that sent this web message. 29523 /// 29524 /// The caller must free the returned string with `CoTaskMemFree`. See 29525 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29526 29527 @(" propget") 29528 HRESULT get_Source(@("out, retval") LPWSTR* source); 29529 29530 /// The message posted from the WebView content to the host converted to a 29531 /// JSON string. Run this operation to communicate using JavaScript objects. 29532 /// 29533 /// For example, the following `postMessage` runs result in the following 29534 /// `WebMessageAsJson` values. 29535 /// 29536 /// ```json 29537 /// postMessage({'a': 'b'}) L"{\"a\": \"b\"}" 29538 /// postMessage(1.2) L"1.2" 29539 /// postMessage('example') L"\"example\"" 29540 /// ``` 29541 /// 29542 /// The caller must free the returned string with `CoTaskMemFree`. See 29543 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29544 29545 @(" propget") 29546 HRESULT get_WebMessageAsJson(@("out, retval") LPWSTR* webMessageAsJson); 29547 29548 /// If the message posted from the WebView content to the host is a string 29549 /// type, this method returns the value of that string. If the message 29550 /// posted is some other kind of JavaScript type this method fails with the 29551 /// following error. 29552 /// 29553 /// ```text 29554 /// E_INVALIDARG 29555 /// ``` 29556 /// 29557 /// Run this operation to communicate using simple strings. 29558 /// 29559 /// For example, the following `postMessage` runs result in the following 29560 /// `WebMessageAsString` values. 29561 /// 29562 /// ```json 29563 /// postMessage({'a': 'b'}) E_INVALIDARG 29564 /// postMessage(1.2) E_INVALIDARG 29565 /// postMessage('example') L"example" 29566 /// ``` 29567 /// 29568 /// The caller must free the returned string with `CoTaskMemFree`. See 29569 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29570 29571 HRESULT TryGetWebMessageAsString(@("out, retval") LPWSTR* webMessageAsString); 29572 } 29573 29574 /// Receives `WebMessageReceived` events. 29575 const GUID IID_ICoreWebView2WebMessageReceivedEventHandler = ICoreWebView2WebMessageReceivedEventHandler.iid; 29576 29577 interface ICoreWebView2WebMessageReceivedEventHandler : IUnknown 29578 { 29579 static const GUID iid = { 0x57213f19,0x00e6,0x49fa,[ 0x8e,0x07,0x89,0x8e,0xa0,0x1e,0xcb,0xd2 ] }; 29580 29581 /// Provides the event args for the corresponding event. 29582 29583 HRESULT Invoke( 29584 /+[in]+/ ICoreWebView2 sender, 29585 /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args); 29586 } 29587 29588 /// Event args for the `DevToolsProtocolEventReceived` event. 29589 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs = ICoreWebView2DevToolsProtocolEventReceivedEventArgs.iid; 29590 29591 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs : IUnknown 29592 { 29593 static const GUID iid = { 0x653c2959,0xbb3a,0x4377,[ 0x86,0x32,0xb5,0x8a,0xda,0x4e,0x66,0xc4 ] }; 29594 29595 /// The parameter object of the corresponding `DevToolsProtocol` event 29596 /// represented as a JSON string. 29597 /// 29598 /// The caller must free the returned string with `CoTaskMemFree`. See 29599 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29600 29601 @(" propget") 29602 HRESULT get_ParameterObjectAsJson(@("out, retval") LPWSTR* 29603 parameterObjectAsJson); 29604 } 29605 29606 /// This is a continuation of the `ICoreWebView2DevToolsProtocolEventReceivedEventArgs` 29607 /// interface that provides the session ID of the target where the event originates from. 29608 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 = ICoreWebView2DevToolsProtocolEventReceivedEventArgs2.iid; 29609 29610 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 : ICoreWebView2DevToolsProtocolEventReceivedEventArgs 29611 { 29612 static const GUID iid = { 0x2DC4959D,0x1494,0x4393,[ 0x95,0xBA,0xBE,0xA4,0xCB,0x9E,0xBD,0x1B ] }; 29613 29614 /// The sessionId of the target where the event originates from. 29615 /// Empty string is returned as sessionId if the event comes from the default 29616 /// session for the top page. 29617 /// 29618 /// The caller must free the returned string with `CoTaskMemFree`. See 29619 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29620 /// 29621 /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceivedSessionId 29622 @(" propget") 29623 HRESULT get_SessionId(@("out, retval") LPWSTR* sessionId); 29624 } 29625 29626 /// Receives `DevToolsProtocolEventReceived` events from the WebView. 29627 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventHandler = ICoreWebView2DevToolsProtocolEventReceivedEventHandler.iid; 29628 29629 interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler : IUnknown 29630 { 29631 static const GUID iid = { 0xe2fda4be,0x5456,0x406c,[ 0xa2,0x61,0x3d,0x45,0x21,0x38,0x36,0x2c ] }; 29632 29633 /// Provides the event args for the corresponding event. 29634 29635 HRESULT Invoke( 29636 /+[in]+/ ICoreWebView2 sender, 29637 /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventArgs args); 29638 } 29639 29640 /// Receives `CallDevToolsProtocolMethod` completion results. 29641 const GUID IID_ICoreWebView2CallDevToolsProtocolMethodCompletedHandler = ICoreWebView2CallDevToolsProtocolMethodCompletedHandler.iid; 29642 29643 interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler : IUnknown 29644 { 29645 static const GUID iid = { 0x5c4889f0,0x5ef6,0x4c5a,[ 0x95,0x2c,0xd8,0xf1,0xb9,0x2d,0x05,0x74 ] }; 29646 29647 /// Provides the completion status and result of the corresponding 29648 /// asynchronous method. 29649 29650 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR returnObjectAsJson); 29651 } 29652 29653 /// Receives the `CoreWebView2Controller` created using `CreateCoreWebView2Controller`. 29654 29655 const GUID IID_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler = ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.iid; 29656 29657 interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler : IUnknown 29658 { 29659 static const GUID iid = { 0x6c4819f3,0xc9b7,0x4260,[ 0x81,0x27,0xc9,0xf5,0xbd,0xe7,0xf6,0x8c ] }; 29660 29661 /// Provides the completion status and result of the corresponding 29662 /// asynchronous method. 29663 29664 HRESULT Invoke(HRESULT errorCode, ICoreWebView2Controller createdController); 29665 } 29666 29667 /// The caller implements this interface to receive the CoreWebView2Controller 29668 /// created via CreateCoreWebView2CompositionController. 29669 const GUID IID_ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler = ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler.iid; 29670 29671 interface ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler : IUnknown 29672 { 29673 static const GUID iid = { 0x02fab84b,0x1428,0x4fb7,[ 0xad,0x45,0x1b,0x2e,0x64,0x73,0x61,0x84 ] }; 29674 /// Called to provide the implementer with the completion status and result 29675 /// of the corresponding asynchronous method call. 29676 HRESULT Invoke( 29677 HRESULT errorCode, 29678 ICoreWebView2CompositionController webView); 29679 } 29680 29681 /// Event args for the `NewWindowRequested` event. The event is run when 29682 /// content inside webview requested to a open a new window (through 29683 /// `window.open()` and so on). 29684 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs = ICoreWebView2NewWindowRequestedEventArgs.iid; 29685 29686 interface ICoreWebView2NewWindowRequestedEventArgs : IUnknown 29687 { 29688 static const GUID iid = { 0x34acb11c,0xfc37,0x4418,[ 0x91,0x32,0xf9,0xc2,0x1d,0x1e,0xaf,0xb9 ] }; 29689 29690 /// The target uri of the new window requested. 29691 /// 29692 /// The caller must free the returned string with `CoTaskMemFree`. See 29693 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29694 29695 @(" propget") 29696 HRESULT get_Uri(@("out, retval") LPWSTR* uri); 29697 29698 /// Sets a CoreWebView2 as a result of the NewWindowRequested event. Provides 29699 /// a WebView as the target for a `window.open()` from inside the 29700 /// requesting WebView. If this is set, the top-level window of this WebView 29701 /// is returned as the opened 29702 /// [WindowProxy](https://developer.mozilla.org/en-US/docs/glossary/windowproxy) 29703 /// to the opener script. If this is not set, then `Handled` is checked to 29704 /// determine behavior for NewWindowRequested event. 29705 /// CoreWebView2 provided in the `NewWindow` property must be on the same 29706 /// Environment as the opener WebView and should not have been navigated 29707 /// previously. Don't use methods that cause navigation or interact with the 29708 /// DOM on this CoreWebView2 until the target content has loaded. Setting event 29709 /// handlers, changing Settings properties, or other methods are fine to call. 29710 /// Changes to settings should be made before `put_NewWindow` is called to 29711 /// ensure that those settings take effect for the newly setup WebView. Once the 29712 /// NewWindow is set the underlying web contents of this CoreWebView2 will be 29713 /// replaced and navigated as appropriate for the new window. After setting 29714 /// new window it cannot be changed and error will be return otherwise. 29715 /// 29716 /// The methods which should affect the new web contents like 29717 /// AddScriptToExecuteOnDocumentCreated has to be called and completed before setting NewWindow. 29718 /// Other methods which should affect the new web contents like add_WebResourceRequested have to be called after setting NewWindow. 29719 /// It is best not to use RemoveScriptToExecuteOnDocumentCreated before setting NewWindow, otherwise it may not work for later added scripts. 29720 /// 29721 /// The new WebView must have the same profile as the opener WebView. 29722 29723 @(" propput") 29724 HRESULT put_NewWindow(/+[in]+/ ICoreWebView2 newWindow); 29725 29726 /// Gets the new window. 29727 29728 @(" propget") 29729 HRESULT get_NewWindow(@("out, retval") ICoreWebView2 * newWindow); 29730 29731 /// Sets whether the `NewWindowRequested` event is handled by host. If this 29732 /// is `FALSE` and no `NewWindow` is set, the WebView opens a popup window 29733 /// and it returns as opened `WindowProxy`. If set to `TRUE` and no 29734 /// `NewWindow` is set for `window.open`, the opened `WindowProxy` is for an 29735 /// testing window object and no window loads. 29736 /// The default value is `FALSE`. 29737 29738 @(" propput") 29739 HRESULT put_Handled(in BOOL handled); 29740 29741 /// Gets whether the `NewWindowRequested` event is handled by host. 29742 29743 @(" propget") 29744 HRESULT get_Handled(@("out, retval") BOOL* handled); 29745 29746 /// `TRUE` when the new window request was initiated through a user gesture. 29747 /// Examples of user initiated requests are: 29748 /// 29749 /// - Selecting an anchor tag with target 29750 /// - Programmatic window open from a script that directly run as a result of 29751 /// user interaction such as via onclick handlers. 29752 /// 29753 /// Non-user initiated requests are programmatic window opens from a script 29754 /// that are not directly triggered by user interaction, such as those that 29755 /// run while loading a new page or via timers. 29756 /// The Microsoft Edge popup blocker is disabled for WebView so the app is 29757 /// able to use this flag to block non-user initiated popups. 29758 29759 @(" propget") 29760 HRESULT get_IsUserInitiated(@("out, retval") BOOL* isUserInitiated); 29761 29762 /// Obtain an `ICoreWebView2Deferral` object and put the event into a 29763 /// deferred state. Use the `ICoreWebView2Deferral` object to complete the 29764 /// window open request at a later time. While this event is deferred the 29765 /// opener window returns a `WindowProxy` to an un-navigated window, which 29766 /// navigates when the deferral is complete. 29767 29768 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 29769 29770 /// Window features specified by the `window.open`. The features should be 29771 /// considered for positioning and sizing of new webview windows. 29772 29773 @(" propget") 29774 HRESULT get_WindowFeatures(@("out, retval") ICoreWebView2WindowFeatures * value); 29775 } 29776 29777 /// This is a continuation of the `ICoreWebView2NewWindowRequestedEventArgs` interface. 29778 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs2 = ICoreWebView2NewWindowRequestedEventArgs2.iid; 29779 29780 interface ICoreWebView2NewWindowRequestedEventArgs2 : ICoreWebView2NewWindowRequestedEventArgs 29781 { 29782 static const GUID iid = { 0xbbc7baed,0x74c6,0x4c92,[ 0xb6,0x3a,0x7f,0x5a,0xea,0xe0,0x3d,0xe3 ] }; 29783 /// Gets the name of the new window. This window can be created via `window.open(url, windowName)`, 29784 /// where the windowName parameter corresponds to `Name` property. 29785 /// If no windowName is passed to `window.open`, then the `Name` property 29786 /// will be set to an empty string. Additionally, if window is opened through other means, 29787 /// such as `<a target="windowName">...</a>` or `<iframe name="windowName">...</iframe>`, 29788 /// then the `Name` property will be set accordingly. In the case of target=_blank, 29789 /// the `Name` property will be an empty string. 29790 /// Opening a window via ctrl+clicking a link would result in the `Name` property 29791 /// being set to an empty string. 29792 /// 29793 /// The caller must free the returned string with `CoTaskMemFree`. See 29794 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 29795 @(" propget") 29796 HRESULT get_Name(@("out, retval") LPWSTR* value); 29797 } 29798 29799 /// The window features for a WebView popup window. The fields match the 29800 /// `windowFeatures` passed to `window.open` as specified in 29801 /// [Window features](https://developer.mozilla.org/docs/Web/API/Window/open#Window_features) 29802 /// on MDN. 29803 /// 29804 /// There is no requirement for you to respect the values. If your app does 29805 /// not have corresponding UI features (for example, no toolbar) or if all 29806 /// instance of WebView are opened in tabs and do not have distinct size or 29807 /// positions, then your app does not respect the values. You may want to 29808 /// respect values, but perhaps only some apply to the UI of you app. 29809 /// Accordingly, you may respect all, some, or none of the properties as 29810 /// appropriate for your app. For all numeric properties, if the value that is 29811 /// passed to `window.open` is outside the range of an unsigned 32bit int, the 29812 /// resulting value is the absolute value of the maximum for unsigned 32bit 29813 /// integer. If you are not able to parse the value an integer, it is 29814 /// considered `0`. If the value is a floating point value, it is rounded down 29815 /// to an integer. 29816 /// 29817 /// In runtime versions 98 or later, the values of `ShouldDisplayMenuBar`, 29818 /// `ShouldDisplayStatus`, `ShouldDisplayToolbar`, and `ShouldDisplayScrollBars` 29819 /// will not directly depend on the equivalent fields in the `windowFeatures` 29820 /// string. Instead, they will all be false if the window is expected to be a 29821 /// popup, and true if it is not. 29822 const GUID IID_ICoreWebView2WindowFeatures = ICoreWebView2WindowFeatures.iid; 29823 29824 interface ICoreWebView2WindowFeatures : IUnknown 29825 { 29826 static const GUID iid = { 0x5eaf559f,0xb46e,0x4397,[ 0x88,0x60,0xe4,0x22,0xf2,0x87,0xff,0x1e ] }; 29827 29828 /// Specifies left and top values. 29829 29830 @(" propget") 29831 HRESULT get_HasPosition(@("out, retval") BOOL* value); 29832 29833 /// Specifies height and width values. 29834 29835 @(" propget") 29836 HRESULT get_HasSize(@("out, retval") BOOL* value); 29837 29838 /// Specifies the left position of the window. If `HasPosition` is set to 29839 /// `FALSE`, this field is ignored. 29840 29841 @(" propget") 29842 HRESULT get_Left(@("out, retval") UINT32* value); 29843 29844 /// Specifies the top position of the window. If `HasPosition` is set to 29845 /// `FALSE`, this field is ignored. 29846 29847 @(" propget") 29848 HRESULT get_Top(@("out, retval") UINT32* value); 29849 29850 /// Specifies the height of the window. Minimum value is `100`. If 29851 /// `HasSize` is set to `FALSE`, this field is ignored. 29852 29853 @(" propget") 29854 HRESULT get_Height(@("out, retval") UINT32* value); 29855 29856 /// Specifies the width of the window. Minimum value is `100`. If `HasSize` 29857 /// is set to `FALSE`, this field is ignored. 29858 29859 @(" propget") 29860 HRESULT get_Width(@("out, retval") UINT32* value); 29861 29862 /// Indicates that the menu bar is displayed. 29863 29864 @(" propget") 29865 HRESULT get_ShouldDisplayMenuBar(@("out, retval") BOOL* value); 29866 29867 /// Indicates that the status bar is displayed. 29868 29869 @(" propget") 29870 HRESULT get_ShouldDisplayStatus(@("out, retval") BOOL* value); 29871 29872 /// Indicates that the browser toolbar is displayed. 29873 29874 @(" propget") 29875 HRESULT get_ShouldDisplayToolbar(@("out, retval") BOOL* value); 29876 29877 /// Indicates that the scroll bars are displayed. 29878 29879 @(" propget") 29880 HRESULT get_ShouldDisplayScrollBars(@("out, retval") BOOL* value); 29881 } 29882 29883 /// Receives `NewWindowRequested` events. 29884 const GUID IID_ICoreWebView2NewWindowRequestedEventHandler = ICoreWebView2NewWindowRequestedEventHandler.iid; 29885 29886 interface ICoreWebView2NewWindowRequestedEventHandler : IUnknown 29887 { 29888 static const GUID iid = { 0xd4c185fe,0xc81c,0x4989,[ 0x97,0xaf,0x2d,0x3f,0xa7,0xab,0x56,0x51 ] }; 29889 29890 /// Provides the event args for the corresponding event. 29891 29892 HRESULT Invoke( 29893 /+[in]+/ ICoreWebView2 sender, 29894 /+[in]+/ ICoreWebView2NewWindowRequestedEventArgs args); 29895 } 29896 29897 /// Receives `DocumentTitleChanged` events. Use the `DocumentTitle` property 29898 /// to get the modified title. 29899 29900 const GUID IID_ICoreWebView2DocumentTitleChangedEventHandler = ICoreWebView2DocumentTitleChangedEventHandler.iid; 29901 29902 interface ICoreWebView2DocumentTitleChangedEventHandler : IUnknown 29903 { 29904 static const GUID iid = { 0xf5f2b923,0x953e,0x4042,[ 0x9f,0x95,0xf3,0xa1,0x18,0xe1,0xaf,0xd4 ] }; 29905 29906 /// Provides the event args for the corresponding event. No event args exist 29907 /// and the `args` parameter is set to `null`. 29908 29909 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 29910 } 29911 29912 /// Event args for the `AcceleratorKeyPressed` event. 29913 29914 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs = ICoreWebView2AcceleratorKeyPressedEventArgs.iid; 29915 29916 interface ICoreWebView2AcceleratorKeyPressedEventArgs : IUnknown 29917 { 29918 static const GUID iid = { 0x9f760f8a,0xfb79,0x42be,[ 0x99,0x90,0x7b,0x56,0x90,0x0f,0xa9,0xc7 ] }; 29919 29920 /// The key event type that caused the event to run. 29921 29922 @(" propget") 29923 HRESULT get_KeyEventKind(@("out, retval") COREWEBVIEW2_KEY_EVENT_KIND* keyEventKind); 29924 29925 /// The Win32 virtual key code of the key that was pressed or released. It 29926 /// is one of the Win32 virtual key constants such as `VK_RETURN` or an 29927 /// (uppercase) ASCII value such as `A`. Verify whether Ctrl or Alt 29928 /// are pressed by running `GetKeyState(VK_CONTROL)` or 29929 /// `GetKeyState(VK_MENU)`. 29930 29931 @(" propget") 29932 HRESULT get_VirtualKey(@("out, retval") UINT* virtualKey); 29933 29934 /// The `LPARAM` value that accompanied the window message. For more 29935 /// information, navigate to [WM_KEYDOWN](/windows/win32/inputdev/wm-keydown) 29936 /// and [WM_KEYUP](/windows/win32/inputdev/wm-keyup). 29937 29938 @(" propget") 29939 HRESULT get_KeyEventLParam(@("out, retval") INT* lParam); 29940 29941 /// A structure representing the information passed in the `LPARAM` of the 29942 /// window message. 29943 29944 @(" propget") 29945 HRESULT get_PhysicalKeyStatus( 29946 @("out, retval") COREWEBVIEW2_PHYSICAL_KEY_STATUS* physicalKeyStatus); 29947 29948 /// During `AcceleratorKeyPressedEvent` handler invocation the WebView is 29949 /// blocked waiting for the decision of if the accelerator is handled by the 29950 /// host (or not). If the `Handled` property is set to `TRUE` then this 29951 /// prevents the WebView from performing the default action for this 29952 /// accelerator key. Otherwise the WebView performs the default action for 29953 /// the accelerator key. 29954 29955 @(" propget") 29956 HRESULT get_Handled(@("out, retval") BOOL* handled); 29957 29958 /// Sets the `Handled` property. 29959 29960 @(" propput") 29961 HRESULT put_Handled(in BOOL handled); 29962 } 29963 29964 /// This is This is a continuation of the ICoreWebView2AcceleratorKeyPressedEventArgs interface. 29965 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs2 = ICoreWebView2AcceleratorKeyPressedEventArgs2.iid; 29966 29967 interface ICoreWebView2AcceleratorKeyPressedEventArgs2 : ICoreWebView2AcceleratorKeyPressedEventArgs 29968 { 29969 static const GUID iid = { 0x03b2c8c8,0x7799,0x4e34,[ 0xbd,0x66,0xed,0x26,0xaa,0x85,0xf2,0xbf ] }; 29970 /// This property allows developers to enable or disable the browser from handling a specific 29971 /// browser accelerator key such as Ctrl+P or F3, etc. 29972 /// 29973 /// Browser accelerator keys are the keys/key combinations that access features specific to 29974 /// a web browser, including but not limited to: 29975 /// - Ctrl-F and F3 for Find on Page 29976 /// - Ctrl-P for Print 29977 /// - Ctrl-R and F5 for Reload 29978 /// - Ctrl-Plus and Ctrl-Minus for zooming 29979 /// - Ctrl-Shift-C and F12 for DevTools 29980 /// - Special keys for browser functions, such as Back, Forward, and Search 29981 /// 29982 /// This property does not disable accelerator keys related to movement and text editing, 29983 /// such as: 29984 /// - Home, End, Page Up, and Page Down 29985 /// - Ctrl-X, Ctrl-C, Ctrl-V 29986 /// - Ctrl-A for Select All 29987 /// - Ctrl-Z for Undo 29988 /// 29989 /// The `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` API is a convenient setting 29990 /// for developers to disable all the browser accelerator keys together, and sets the default 29991 /// value for the `IsBrowserAcceleratorKeyEnabled` property. 29992 /// By default, `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` is `TRUE` and 29993 /// `IsBrowserAcceleratorKeyEnabled` is `TRUE`. 29994 /// When developers change `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting to `FALSE`, 29995 /// this will change default value for `IsBrowserAcceleratorKeyEnabled` to `FALSE`. 29996 /// If developers want specific keys to be handled by the browser after changing the 29997 /// `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting to `FALSE`, they need to enable 29998 /// these keys by setting `IsBrowserAcceleratorKeyEnabled` to `TRUE`. 29999 /// This API will give the event arg higher priority over the 30000 /// `CoreWebView2Settings.AreBrowserAcceleratorKeysEnabled` setting when we handle the keys. 30001 /// 30002 /// For browser accelerator keys, when an accelerator key is pressed, the propagation and 30003 /// processing order is: 30004 /// 1. A CoreWebView2Controller.AcceleratorKeyPressed event is raised 30005 /// 2. WebView2 browser feature accelerator key handling 30006 /// 3. Web Content Handling: If the key combination isn't reserved for browser actions, 30007 /// the key event propagates to the web content, where JavaScript event listeners can 30008 /// capture and respond to it. 30009 /// 30010 /// `ICoreWebView2AcceleratorKeyPressedEventArgs` has a `Handled` property, that developers 30011 /// can use to mark a key as handled. When the key is marked as handled anywhere along 30012 /// the path, the event propagation stops, and web content will not receive the key. 30013 /// With `IsBrowserAcceleratorKeyEnabled` property, if developers mark 30014 /// `IsBrowserAcceleratorKeyEnabled` as `FALSE`, the browser will skip the WebView2 30015 /// browser feature accelerator key handling process, but the event propagation 30016 /// continues, and web content will receive the key combination. 30017 /// 30018 /// \snippet ScenarioAcceleratorKeyPressed.cpp IsBrowserAcceleratorKeyEnabled 30019 /// Gets the `IsBrowserAcceleratorKeyEnabled` property. 30020 @(" propget") 30021 HRESULT get_IsBrowserAcceleratorKeyEnabled(@("out, retval") BOOL* value); 30022 30023 /// Sets the `IsBrowserAcceleratorKeyEnabled` property. 30024 @(" propput") 30025 HRESULT put_IsBrowserAcceleratorKeyEnabled(in BOOL value); 30026 } 30027 30028 /// Receives `AcceleratorKeyPressed` events. 30029 30030 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventHandler = ICoreWebView2AcceleratorKeyPressedEventHandler.iid; 30031 30032 interface ICoreWebView2AcceleratorKeyPressedEventHandler : IUnknown 30033 { 30034 static const GUID iid = { 0xb29c7e28,0xfa79,0x41a8,[ 0x8e,0x44,0x65,0x81,0x1c,0x76,0xdc,0xb2 ] }; 30035 30036 /// Provides the event args for the corresponding event. 30037 30038 HRESULT Invoke( 30039 /+[in]+/ ICoreWebView2Controller sender, 30040 /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventArgs args); 30041 } 30042 30043 /// Receives `NewBrowserVersionAvailable` events. 30044 const GUID IID_ICoreWebView2NewBrowserVersionAvailableEventHandler = ICoreWebView2NewBrowserVersionAvailableEventHandler.iid; 30045 30046 interface ICoreWebView2NewBrowserVersionAvailableEventHandler : IUnknown 30047 { 30048 static const GUID iid = { 0xf9a2976e,0xd34e,0x44fc,[ 0xad,0xee,0x81,0xb6,0xb5,0x7c,0xa9,0x14 ] }; 30049 30050 /// Provides the event args for the corresponding event. 30051 30052 HRESULT Invoke(/+[in]+/ ICoreWebView2Environment sender, 30053 /+[in]+/ IUnknown args); 30054 } 30055 30056 /// Receives `BrowserProcessExited` events. 30057 const GUID IID_ICoreWebView2BrowserProcessExitedEventHandler = ICoreWebView2BrowserProcessExitedEventHandler.iid; 30058 30059 interface ICoreWebView2BrowserProcessExitedEventHandler : IUnknown 30060 { 30061 static const GUID iid = { 0xfa504257,0xa216,0x4911,[ 0xa8,0x60,0xfe,0x88,0x25,0x71,0x28,0x61 ] }; 30062 /// Provides the event args for the corresponding event. 30063 HRESULT Invoke( 30064 /+[in]+/ ICoreWebView2Environment sender, 30065 /+[in]+/ ICoreWebView2BrowserProcessExitedEventArgs args); 30066 } 30067 30068 /// Receives `ContainsFullScreenElementChanged` events. 30069 30070 const GUID IID_ICoreWebView2ContainsFullScreenElementChangedEventHandler = ICoreWebView2ContainsFullScreenElementChangedEventHandler.iid; 30071 30072 interface ICoreWebView2ContainsFullScreenElementChangedEventHandler : IUnknown 30073 { 30074 static const GUID iid = { 0xe45d98b1,0xafef,0x45be,[ 0x8b,0xaf,0x6c,0x77,0x28,0x86,0x7f,0x73 ] }; 30075 30076 /// Provides the event args for the corresponding event. No event args exist 30077 /// and the `args` parameter is set to `null`. 30078 30079 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 30080 } 30081 30082 /// Receives `WindowCloseRequested` events. 30083 const GUID IID_ICoreWebView2WindowCloseRequestedEventHandler = ICoreWebView2WindowCloseRequestedEventHandler.iid; 30084 30085 interface ICoreWebView2WindowCloseRequestedEventHandler : IUnknown 30086 { 30087 static const GUID iid = { 0x5c19e9e0,0x092f,0x486b,[ 0xaf,0xfa,0xca,0x82,0x31,0x91,0x30,0x39 ] }; 30088 30089 /// Provides the event args for the corresponding event. No event args exist 30090 /// and the `args` parameter is set to `null`. 30091 30092 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 30093 } 30094 30095 /// Receives `WebResourceResponseReceived` events. 30096 const GUID IID_ICoreWebView2WebResourceResponseReceivedEventHandler = ICoreWebView2WebResourceResponseReceivedEventHandler.iid; 30097 30098 interface ICoreWebView2WebResourceResponseReceivedEventHandler : IUnknown 30099 { 30100 static const GUID iid = { 0x7DE9898A,0x24F5,0x40C3,[ 0xA2,0xDE,0xD4,0xF4,0x58,0xE6,0x98,0x28 ] }; 30101 /// Provides the event args for the corresponding event. 30102 HRESULT Invoke( 30103 /+[in]+/ ICoreWebView2 sender, 30104 /+[in]+/ ICoreWebView2WebResourceResponseReceivedEventArgs args); 30105 } 30106 30107 /// Event args for the `BrowserProcessExited` event. 30108 const GUID IID_ICoreWebView2BrowserProcessExitedEventArgs = ICoreWebView2BrowserProcessExitedEventArgs.iid; 30109 30110 interface ICoreWebView2BrowserProcessExitedEventArgs : IUnknown 30111 { 30112 static const GUID iid = { 0x1f00663f,0xaf8c,0x4782,[ 0x9c,0xdd,0xdd,0x01,0xc5,0x2e,0x34,0xcb ] }; 30113 /// The kind of browser process exit that has occurred. 30114 @(" propget") 30115 HRESULT get_BrowserProcessExitKind( 30116 @("out, retval") COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND* browserProcessExitKind); 30117 30118 /// The process ID of the browser process that has exited. 30119 @(" propget") 30120 HRESULT get_BrowserProcessId(@("out, retval") UINT32* value); 30121 } 30122 30123 /// Event args for the WebResourceResponseReceived event. 30124 const GUID IID_ICoreWebView2WebResourceResponseReceivedEventArgs = ICoreWebView2WebResourceResponseReceivedEventArgs.iid; 30125 30126 interface ICoreWebView2WebResourceResponseReceivedEventArgs : IUnknown 30127 { 30128 static const GUID iid = { 0xD1DB483D,0x6796,0x4B8B,[ 0x80,0xFC,0x13,0x71,0x2B,0xB7,0x16,0xF4 ] }; 30129 /// The request object for the web resource, as committed. This includes 30130 /// headers added by the network stack that were not be included during the 30131 /// associated WebResourceRequested event, such as Authentication headers. 30132 /// Modifications to this object have no effect on how the request is 30133 /// processed as it has already been sent. 30134 @(" propget") 30135 HRESULT get_Request(@("out, retval") ICoreWebView2WebResourceRequest * request); 30136 /// View of the response object received for the web resource. 30137 @(" propget") 30138 HRESULT get_Response(@("out, retval") ICoreWebView2WebResourceResponseView * response); 30139 } 30140 30141 /// View of the HTTP representation for a web resource response. The properties 30142 /// of this object are not mutable. This response view is used with the 30143 /// WebResourceResponseReceived event. 30144 const GUID IID_ICoreWebView2WebResourceResponseView = ICoreWebView2WebResourceResponseView.iid; 30145 30146 interface ICoreWebView2WebResourceResponseView : IUnknown 30147 { 30148 static const GUID iid = { 0x79701053,0x7759,0x4162,[ 0x8F,0x7D,0xF1,0xB3,0xF0,0x84,0x92,0x8D ] }; 30149 /// The HTTP response headers as received. 30150 @(" propget") 30151 HRESULT get_Headers( 30152 @("out, retval") ICoreWebView2HttpResponseHeaders * headers); 30153 /// The HTTP response status code. 30154 @(" propget") 30155 HRESULT get_StatusCode(@("out, retval") int* statusCode); 30156 /// The HTTP response reason phrase. 30157 /// 30158 /// The caller must free the returned string with `CoTaskMemFree`. See 30159 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30160 @(" propget") 30161 HRESULT get_ReasonPhrase(@("out, retval") LPWSTR* reasonPhrase); 30162 30163 /// Get the response content asynchronously. The handler will receive the 30164 /// response content stream. 30165 /// 30166 /// This method returns null if content size is more than 123MB or for navigations that become downloads 30167 /// or if response is downloadable content type (e.g., application/octet-stream). 30168 /// See `add_DownloadStarting` event to handle the response. 30169 /// 30170 /// If this method is being called again before a first call has completed, 30171 /// the handler will be invoked at the same time the handlers from prior calls 30172 /// are invoked. 30173 /// If this method is being called after a first call has completed, the 30174 /// handler will be invoked immediately. 30175 /// \snippet ScenarioWebViewEventMonitor.cpp GetContent 30176 HRESULT GetContent( 30177 /+[in]+/ ICoreWebView2WebResourceResponseViewGetContentCompletedHandler handler); 30178 } 30179 30180 /// Receives the result of the 30181 /// `ICoreWebView2WebResourceResponseView::GetContent` method. 30182 const GUID IID_ICoreWebView2WebResourceResponseViewGetContentCompletedHandler = ICoreWebView2WebResourceResponseViewGetContentCompletedHandler.iid; 30183 30184 interface ICoreWebView2WebResourceResponseViewGetContentCompletedHandler : IUnknown 30185 { 30186 static const GUID iid = { 0x875738E1,0x9FA2,0x40E3,[ 0x8B,0x74,0x2E,0x89,0x72,0xDD,0x6F,0xE7 ] }; 30187 /// Provides the completion status and result of the corresponding 30188 /// asynchronous method call. A failure `errorCode` will be passed if the 30189 /// content failed to load. `E_ABORT` means the response loading was blocked 30190 /// (e.g., by CORS policy); `ERROR_CANCELLED` means the response loading was 30191 /// cancelled. `ERROR_NO_DATA` means the response has no content data, 30192 /// `content` is `null` in this case. Note content (if any) is ignored for 30193 /// redirects, 204 No Content, 205 Reset Content, and HEAD-request responses. 30194 HRESULT Invoke(in HRESULT errorCode, in IStream* content); 30195 } 30196 30197 /// Event args for the DOMContentLoaded event. 30198 const GUID IID_ICoreWebView2DOMContentLoadedEventArgs = ICoreWebView2DOMContentLoadedEventArgs.iid; 30199 30200 interface ICoreWebView2DOMContentLoadedEventArgs : IUnknown 30201 { 30202 static const GUID iid = { 0x16B1E21A,0xC503,0x44F2,[ 0x84,0xC9,0x70,0xAB,0xA5,0x03,0x12,0x83 ] }; 30203 /// The ID of the navigation which corresponds to other navigation ID properties on other navigation events. 30204 @(" propget") 30205 HRESULT get_NavigationId(@("out, retval") UINT64* navigationId); 30206 } 30207 30208 /// Receives `DOMContentLoaded` events. 30209 const GUID IID_ICoreWebView2DOMContentLoadedEventHandler = ICoreWebView2DOMContentLoadedEventHandler.iid; 30210 30211 interface ICoreWebView2DOMContentLoadedEventHandler : IUnknown 30212 { 30213 static const GUID iid = { 0x4BAC7E9C,0x199E,0x49ED,[ 0x87,0xED,0x24,0x93,0x03,0xAC,0xF0,0x19 ] }; 30214 /// Provides the event args for the corresponding event. 30215 HRESULT Invoke( 30216 /+[in]+/ ICoreWebView2 sender, 30217 /+[in]+/ ICoreWebView2DOMContentLoadedEventArgs args); 30218 } 30219 30220 /// Provides a set of properties that are used to manage an 30221 /// ICoreWebView2Cookie. 30222 /// 30223 /// \snippet ScenarioCookieManagement.cpp CookieObject 30224 const GUID IID_ICoreWebView2Cookie = ICoreWebView2Cookie.iid; 30225 30226 interface ICoreWebView2Cookie : IUnknown 30227 { 30228 static const GUID iid = { 0xAD26D6BE,0x1486,0x43E6,[ 0xBF,0x87,0xA2,0x03,0x40,0x06,0xCA,0x21 ] }; 30229 /// Cookie name. 30230 /// 30231 /// The caller must free the returned string with `CoTaskMemFree`. See 30232 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30233 @(" propget") 30234 HRESULT get_Name(@("out, retval") LPWSTR* name); 30235 30236 /// Cookie value. 30237 /// 30238 /// The caller must free the returned string with `CoTaskMemFree`. See 30239 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30240 @(" propget") 30241 HRESULT get_Value(@("out, retval") LPWSTR* value); 30242 /// Set the cookie value property. 30243 @(" propput") 30244 HRESULT put_Value(in LPCWSTR value); 30245 30246 /// The domain for which the cookie is valid. 30247 /// The default is the host that this cookie has been received from. 30248 /// Note that, for instance, ".bing.com", "bing.com", and "www.bing.com" are 30249 /// considered different domains. 30250 /// 30251 /// The caller must free the returned string with `CoTaskMemFree`. See 30252 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30253 @(" propget") 30254 HRESULT get_Domain(@("out, retval") LPWSTR* domain); 30255 30256 /// The path for which the cookie is valid. The default is "/", which means 30257 /// this cookie will be sent to all pages on the Domain. 30258 /// 30259 /// The caller must free the returned string with `CoTaskMemFree`. See 30260 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30261 @(" propget") 30262 HRESULT get_Path(@("out, retval") LPWSTR* path); 30263 30264 /// The expiration date and time for the cookie as the number of seconds since the UNIX epoch. 30265 /// The default is -1.0, which means cookies are session cookies by default. 30266 @(" propget") 30267 HRESULT get_Expires(@("out, retval") double* expires); 30268 /// Set the Expires property. Cookies are session cookies and will not be 30269 /// persistent if Expires is set to -1.0. NaN, infinity, and any negative 30270 /// value set other than -1.0 is disallowed. 30271 @(" propput") 30272 HRESULT put_Expires(in double expires); 30273 30274 /// Whether this cookie is http-only. 30275 /// True if a page script or other active content cannot access this 30276 /// cookie. The default is false. 30277 @(" propget") 30278 HRESULT get_IsHttpOnly(@("out, retval") BOOL* isHttpOnly); 30279 /// Set the IsHttpOnly property. 30280 @(" propput") 30281 HRESULT put_IsHttpOnly(in BOOL isHttpOnly); 30282 30283 /// SameSite status of the cookie which represents the enforcement mode of the cookie. 30284 /// The default is COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX. 30285 @(" propget") 30286 HRESULT get_SameSite(@("out, retval") COREWEBVIEW2_COOKIE_SAME_SITE_KIND* sameSite); 30287 /// Set the SameSite property. 30288 @(" propput") 30289 HRESULT put_SameSite(in COREWEBVIEW2_COOKIE_SAME_SITE_KIND sameSite); 30290 30291 /// The security level of this cookie. True if the client is only to return 30292 /// the cookie in subsequent requests if those requests use HTTPS. 30293 /// The default is false. 30294 /// Note that cookie that requests COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE but 30295 /// is not marked Secure will be rejected. 30296 @(" propget") 30297 HRESULT get_IsSecure(@("out, retval") BOOL* isSecure); 30298 /// Set the IsSecure property. 30299 @(" propput") 30300 HRESULT put_IsSecure(in BOOL isSecure); 30301 30302 /// Whether this is a session cookie. The default is false. 30303 @(" propget") 30304 HRESULT get_IsSession(@("out, retval") BOOL* isSession); 30305 } 30306 30307 /// Creates, adds or updates, gets, or or view the cookies. The changes would 30308 /// apply to the context of the user profile. That is, other WebViews under the 30309 /// same user profile could be affected. 30310 const GUID IID_ICoreWebView2CookieManager = ICoreWebView2CookieManager.iid; 30311 30312 interface ICoreWebView2CookieManager : IUnknown 30313 { 30314 static const GUID iid = { 0x177CD9E7,0xB6F5,0x451A,[ 0x94,0xA0,0x5D,0x7A,0x3A,0x4C,0x41,0x41 ] }; 30315 /// Create a cookie object with a specified name, value, domain, and path. 30316 /// One can set other optional properties after cookie creation. 30317 /// This only creates a cookie object and it is not added to the cookie 30318 /// manager until you call AddOrUpdateCookie. 30319 /// Leading or trailing whitespace(s), empty string, and special characters 30320 /// are not allowed for name. 30321 /// See ICoreWebView2Cookie for more details. 30322 HRESULT CreateCookie( 30323 in LPCWSTR name, 30324 in LPCWSTR value, 30325 in LPCWSTR domain, 30326 in LPCWSTR path, 30327 @("out, retval") ICoreWebView2Cookie * cookie); 30328 30329 /// Creates a cookie whose params matches those of the specified cookie. 30330 HRESULT CopyCookie( 30331 /+[in]+/ ICoreWebView2Cookie cookieParam, 30332 @("out, retval") ICoreWebView2Cookie * cookie); 30333 30334 /// Gets a list of cookies matching the specific URI. 30335 /// If uri is empty string or null, all cookies under the same profile are 30336 /// returned. 30337 /// You can modify the cookie objects by calling 30338 /// ICoreWebView2CookieManager::AddOrUpdateCookie, and the changes 30339 /// will be applied to the webview. 30340 /// \snippet ScenarioCookieManagement.cpp GetCookies 30341 HRESULT GetCookies( 30342 in LPCWSTR uri, 30343 /+[in]+/ ICoreWebView2GetCookiesCompletedHandler handler); 30344 30345 /// Adds or updates a cookie with the given cookie data; may overwrite 30346 /// cookies with matching name, domain, and path if they exist. 30347 /// This method will fail if the domain of the given cookie is not specified. 30348 /// \snippet ScenarioCookieManagement.cpp AddOrUpdateCookie 30349 HRESULT AddOrUpdateCookie(/+[in]+/ ICoreWebView2Cookie cookie); 30350 30351 /// Deletes a cookie whose name and domain/path pair 30352 /// match those of the specified cookie. 30353 HRESULT DeleteCookie(/+[in]+/ ICoreWebView2Cookie cookie); 30354 30355 /// Deletes cookies with matching name and uri. 30356 /// Cookie name is required. 30357 /// All cookies with the given name where domain 30358 /// and path match provided URI are deleted. 30359 HRESULT DeleteCookies(in LPCWSTR name, in LPCWSTR uri); 30360 30361 /// Deletes cookies with matching name and domain/path pair. 30362 /// Cookie name is required. 30363 /// If domain is specified, deletes only cookies with the exact domain. 30364 /// If path is specified, deletes only cookies with the exact path. 30365 HRESULT DeleteCookiesWithDomainAndPath(in LPCWSTR name, in LPCWSTR domain, in LPCWSTR path); 30366 30367 /// Deletes all cookies under the same profile. 30368 /// This could affect other WebViews under the same user profile. 30369 HRESULT DeleteAllCookies(); 30370 } 30371 30372 /// A list of cookie objects. See `ICoreWebView2Cookie`. 30373 /// \snippet ScenarioCookieManagement.cpp GetCookies 30374 const GUID IID_ICoreWebView2CookieList = ICoreWebView2CookieList.iid; 30375 30376 interface ICoreWebView2CookieList : IUnknown 30377 { 30378 static const GUID iid = { 0xF7F6F714,0x5D2A,0x43C6,[ 0x95,0x03,0x34,0x6E,0xCE,0x02,0xD1,0x86 ] }; 30379 /// The number of cookies contained in the ICoreWebView2CookieList. 30380 @(" propget") 30381 HRESULT get_Count(@("out, retval") UINT* count); 30382 30383 /// Gets the cookie object at the given index. 30384 HRESULT GetValueAtIndex(in UINT index, 30385 @("out, retval") ICoreWebView2Cookie * cookie); 30386 } 30387 30388 /// Receives the result of the `GetCookies` method. The result is written to 30389 /// the cookie list provided in the `GetCookies` method call. 30390 const GUID IID_ICoreWebView2GetCookiesCompletedHandler = ICoreWebView2GetCookiesCompletedHandler.iid; 30391 30392 interface ICoreWebView2GetCookiesCompletedHandler : IUnknown 30393 { 30394 static const GUID iid = { 0x5A4F5069,0x5C15,0x47C3,[ 0x86,0x46,0xF4,0xDE,0x1C,0x11,0x66,0x70 ] }; 30395 /// Provides the completion status of the corresponding asynchronous method 30396 /// call. 30397 HRESULT Invoke(HRESULT result, ICoreWebView2CookieList cookieList); 30398 } 30399 30400 /// Provides access to the client certificate metadata. 30401 const GUID IID_ICoreWebView2ClientCertificate = ICoreWebView2ClientCertificate.iid; 30402 30403 interface ICoreWebView2ClientCertificate : IUnknown 30404 { 30405 static const GUID iid = { 0xe7188076,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 30406 /// Subject of the certificate. 30407 /// 30408 /// The caller must free the returned string with `CoTaskMemFree`. See 30409 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30410 @(" propget") 30411 HRESULT get_Subject(@("out, retval") LPWSTR* value); 30412 /// Name of the certificate authority that issued the certificate. 30413 /// 30414 /// The caller must free the returned string with `CoTaskMemFree`. See 30415 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30416 @(" propget") 30417 HRESULT get_Issuer(@("out, retval") LPWSTR* value); 30418 /// The valid start date and time for the certificate as the number of seconds since 30419 /// the UNIX epoch. 30420 @(" propget") 30421 HRESULT get_ValidFrom(@("out, retval") double* value); 30422 /// The valid expiration date and time for the certificate as the number of seconds since 30423 /// the UNIX epoch. 30424 @(" propget") 30425 HRESULT get_ValidTo(@("out, retval") double* value); 30426 /// Base64 encoding of DER encoded serial number of the certificate. 30427 /// Read more about DER at [RFC 7468 DER] 30428 /// (https://tools.ietf.org/html/rfc7468#appendix-B). 30429 /// 30430 /// The caller must free the returned string with `CoTaskMemFree`. See 30431 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30432 @(" propget") 30433 HRESULT get_DerEncodedSerialNumber(@("out, retval") LPWSTR* value); 30434 /// Display name for a certificate. 30435 /// 30436 /// The caller must free the returned string with `CoTaskMemFree`. See 30437 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30438 @(" propget") 30439 HRESULT get_DisplayName(@("out, retval") LPWSTR* value); 30440 /// PEM encoded data for the certificate. 30441 /// Returns Base64 encoding of DER encoded certificate. 30442 /// Read more about PEM at [RFC 1421 Privacy Enhanced Mail] 30443 /// (https://tools.ietf.org/html/rfc1421). 30444 /// 30445 /// The caller must free the returned string with `CoTaskMemFree`. See 30446 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30447 HRESULT ToPemEncoding(@("out, retval") LPWSTR* pemEncodedData); 30448 /// Collection of PEM encoded client certificate issuer chain. 30449 /// In this collection first element is the current certificate followed by 30450 /// intermediate1, intermediate2...intermediateN-1. Root certificate is the 30451 /// last element in collection. 30452 @(" propget") 30453 HRESULT get_PemEncodedIssuerCertificateChain(@("out, retval") 30454 ICoreWebView2StringCollection * value); 30455 /// Kind of a certificate (eg., smart card, pin, other). 30456 @(" propget") 30457 HRESULT get_Kind(@("out, retval") 30458 COREWEBVIEW2_CLIENT_CERTIFICATE_KIND* value); 30459 } 30460 30461 /// A collection of client certificate object. 30462 const GUID IID_ICoreWebView2ClientCertificateCollection = ICoreWebView2ClientCertificateCollection.iid; 30463 30464 interface ICoreWebView2ClientCertificateCollection : IUnknown 30465 { 30466 static const GUID iid = { 0xef5674d2,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 30467 /// The number of client certificates contained in the 30468 /// ICoreWebView2ClientCertificateCollection. 30469 @(" propget") 30470 HRESULT get_Count(@("out, retval") UINT* value); 30471 /// Gets the certificate object at the given index. 30472 HRESULT GetValueAtIndex(in UINT index, 30473 @("out, retval") ICoreWebView2ClientCertificate * certificate); 30474 } 30475 30476 /// A collection of strings. 30477 const GUID IID_ICoreWebView2StringCollection = ICoreWebView2StringCollection.iid; 30478 30479 interface ICoreWebView2StringCollection : IUnknown 30480 { 30481 static const GUID iid = { 0xf41f3f8a,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 30482 /// The number of strings contained in ICoreWebView2StringCollection. 30483 @(" propget") 30484 HRESULT get_Count(@("out, retval") UINT* value); 30485 30486 /// Gets the value at a given index. 30487 /// 30488 /// The caller must free the returned string with `CoTaskMemFree`. See 30489 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30490 HRESULT GetValueAtIndex(in UINT index, 30491 @("out, retval") LPWSTR* value); 30492 } 30493 30494 /// An event handler for the `ClientCertificateRequested` event. 30495 const GUID IID_ICoreWebView2ClientCertificateRequestedEventHandler = ICoreWebView2ClientCertificateRequestedEventHandler.iid; 30496 30497 interface ICoreWebView2ClientCertificateRequestedEventHandler : IUnknown 30498 { 30499 static const GUID iid = { 0xd7175ba2,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 30500 /// Provides the event args for the corresponding event. 30501 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, 30502 /+[in]+/ ICoreWebView2ClientCertificateRequestedEventArgs args); 30503 } 30504 30505 /// Event args for the `ClientCertificateRequested` event. 30506 const GUID IID_ICoreWebView2ClientCertificateRequestedEventArgs = ICoreWebView2ClientCertificateRequestedEventArgs.iid; 30507 30508 interface ICoreWebView2ClientCertificateRequestedEventArgs : IUnknown 30509 { 30510 static const GUID iid = { 0xbc59db28,0xbcc3,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 30511 /// Host name of the server that requested client certificate authentication. 30512 /// Normalization rules applied to the hostname are: 30513 /// * Convert to lowercase characters for ascii characters. 30514 /// * Punycode is used for representing non ascii characters. 30515 /// * Strip square brackets for IPV6 address. 30516 /// 30517 /// The caller must free the returned string with `CoTaskMemFree`. See 30518 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 30519 @(" propget") 30520 HRESULT get_Host(@("out, retval") LPWSTR* value); 30521 30522 /// Port of the server that requested client certificate authentication. 30523 @(" propget") 30524 HRESULT get_Port(@("out, retval") int* value); 30525 30526 /// Returns true if the server that issued this request is an http proxy. 30527 /// Returns false if the server is the origin server. 30528 @(" propget") 30529 HRESULT get_IsProxy(@("out, retval") BOOL* value); 30530 30531 /// Returns the `ICoreWebView2StringCollection`. 30532 /// The collection contains Base64 encoding of DER encoded distinguished names of 30533 /// certificate authorities allowed by the server. 30534 @(" propget") 30535 HRESULT get_AllowedCertificateAuthorities(@("out, retval") 30536 ICoreWebView2StringCollection * value); 30537 30538 /// Returns the `ICoreWebView2ClientCertificateCollection` when client 30539 /// certificate authentication is requested. The collection contains mutually 30540 /// trusted CA certificates. 30541 @(" propget") 30542 HRESULT get_MutuallyTrustedCertificates(@("out, retval") 30543 ICoreWebView2ClientCertificateCollection * value); 30544 30545 /// Returns the selected certificate. 30546 @(" propget") 30547 HRESULT get_SelectedCertificate(@("out, retval") 30548 ICoreWebView2ClientCertificate * value); 30549 30550 /// Sets the certificate to respond to the server. 30551 @(" propput") 30552 HRESULT put_SelectedCertificate( 30553 /+[in]+/ ICoreWebView2ClientCertificate value); 30554 30555 /// You may set this flag to cancel the certificate selection. If canceled, 30556 /// the request is aborted regardless of the `Handled` property. By default the 30557 /// value is `FALSE`. 30558 @(" propget") 30559 HRESULT get_Cancel(@("out, retval") BOOL* value); 30560 30561 /// Sets the `Cancel` property. 30562 @(" propput") 30563 HRESULT put_Cancel(in BOOL value); 30564 30565 /// You may set this flag to `TRUE` to respond to the server with or 30566 /// without a certificate. If this flag is `TRUE` with a `SelectedCertificate` 30567 /// it responds to the server with the selected certificate otherwise respond to the 30568 /// server without a certificate. By default the value of `Handled` and `Cancel` are `FALSE` 30569 /// and display default client certificate selection dialog prompt to allow the user to 30570 /// choose a certificate. The `SelectedCertificate` is ignored unless `Handled` is set `TRUE`. 30571 @(" propget") 30572 HRESULT get_Handled(@("out, retval") BOOL* value); 30573 30574 /// Sets the `Handled` property. 30575 @(" propput") 30576 HRESULT put_Handled(in BOOL value); 30577 30578 /// Returns an `ICoreWebView2Deferral` object. Use this operation to 30579 /// complete the event at a later time. 30580 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 30581 } 30582 30583 /// This mostly represents a combined win32 30584 /// POINTER_INFO/POINTER_TOUCH_INFO/POINTER_PEN_INFO object. It takes fields 30585 /// from all three and excludes some win32 specific data types like HWND and 30586 /// HANDLE. Note, sourceDevice is taken out but we expect the PointerDeviceRect 30587 /// and DisplayRect to cover the existing use cases of sourceDevice. 30588 /// Another big difference is that any of the point or rect locations are 30589 /// expected to be in WebView physical coordinates. That is, coordinates 30590 /// relative to the WebView and no DPI scaling applied. 30591 // 30592 // The PointerId, PointerFlags, ButtonChangeKind, PenFlags, PenMask, TouchFlags, 30593 // and TouchMask are all #defined flags or enums in the 30594 // POINTER_INFO/POINTER_TOUCH_INFO/POINTER_PEN_INFO structure. We define those 30595 // properties here as UINT32 or INT32 and expect the developer to know how to 30596 // populate those values based on the Windows definitions. 30597 const GUID IID_ICoreWebView2PointerInfo = ICoreWebView2PointerInfo.iid; 30598 30599 interface ICoreWebView2PointerInfo : IUnknown 30600 { 30601 static const GUID iid = { 0xe6995887,0xd10d,0x4f5d,[ 0x93,0x59,0x4c,0xe4,0x6e,0x4f,0x96,0xb9 ] }; 30602 /// Get the PointerKind of the pointer event. This corresponds to the 30603 /// pointerKind property of the POINTER_INFO struct. The values are defined by 30604 /// the POINTER_INPUT_KIND enum in the Windows SDK (winuser.h). Supports 30605 /// PT_PEN and PT_TOUCH. 30606 @(" propget") 30607 HRESULT get_PointerKind(@("out, retval") DWORD* pointerKind); 30608 /// Set the PointerKind of the pointer event. This corresponds to the 30609 /// pointerKind property of the POINTER_INFO struct. The values are defined by 30610 /// the POINTER_INPUT_KIND enum in the Windows SDK (winuser.h). Supports 30611 /// PT_PEN and PT_TOUCH. 30612 @(" propput") 30613 HRESULT put_PointerKind(in DWORD pointerKind); 30614 30615 /// Get the PointerId of the pointer event. This corresponds to the pointerId 30616 /// property of the POINTER_INFO struct as defined in the Windows SDK 30617 /// (winuser.h). 30618 @(" propget") 30619 HRESULT get_PointerId(@("out, retval") UINT32* pointerId); 30620 /// Set the PointerId of the pointer event. This corresponds to the pointerId 30621 /// property of the POINTER_INFO struct as defined in the Windows SDK 30622 /// (winuser.h). 30623 @(" propput") 30624 HRESULT put_PointerId(in UINT32 pointerId); 30625 30626 /// Get the FrameID of the pointer event. This corresponds to the frameId 30627 /// property of the POINTER_INFO struct as defined in the Windows SDK 30628 /// (winuser.h). 30629 @(" propget") 30630 HRESULT get_FrameId(@("out, retval") UINT32* frameId); 30631 /// Set the FrameID of the pointer event. This corresponds to the frameId 30632 /// property of the POINTER_INFO struct as defined in the Windows SDK 30633 /// (winuser.h). 30634 @(" propput") 30635 HRESULT put_FrameId(in UINT32 frameId); 30636 30637 /// Get the PointerFlags of the pointer event. This corresponds to the 30638 /// pointerFlags property of the POINTER_INFO struct. The values are defined 30639 /// by the POINTER_FLAGS constants in the Windows SDK (winuser.h). 30640 @(" propget") 30641 HRESULT get_PointerFlags(@("out, retval") UINT32* pointerFlags); 30642 /// Set the PointerFlags of the pointer event. This corresponds to the 30643 /// pointerFlags property of the POINTER_INFO struct. The values are defined 30644 /// by the POINTER_FLAGS constants in the Windows SDK (winuser.h). 30645 @(" propput") 30646 HRESULT put_PointerFlags(in UINT32 pointerFlags); 30647 30648 /// Get the PointerDeviceRect of the sourceDevice property of the 30649 /// POINTER_INFO struct as defined in the Windows SDK (winuser.h). 30650 @(" propget") 30651 HRESULT get_PointerDeviceRect(@("out, retval") RECT* pointerDeviceRect); 30652 /// Set the PointerDeviceRect of the sourceDevice property of the 30653 /// POINTER_INFO struct as defined in the Windows SDK (winuser.h). 30654 @(" propput") 30655 HRESULT put_PointerDeviceRect(in RECT pointerDeviceRect); 30656 30657 /// Get the DisplayRect of the sourceDevice property of the POINTER_INFO 30658 /// struct as defined in the Windows SDK (winuser.h). 30659 @(" propget") 30660 HRESULT get_DisplayRect(@("out, retval") RECT* displayRect); 30661 /// Set the DisplayRect of the sourceDevice property of the POINTER_INFO 30662 /// struct as defined in the Windows SDK (winuser.h). 30663 @(" propput") 30664 HRESULT put_DisplayRect(in RECT displayRect); 30665 30666 /// Get the PixelLocation of the pointer event. This corresponds to the 30667 /// ptPixelLocation property of the POINTER_INFO struct as defined in the 30668 /// Windows SDK (winuser.h). 30669 @(" propget") 30670 HRESULT get_PixelLocation(@("out, retval") POINT* pixelLocation); 30671 /// Set the PixelLocation of the pointer event. This corresponds to the 30672 /// ptPixelLocation property of the POINTER_INFO struct as defined in the 30673 /// Windows SDK (winuser.h). 30674 @(" propput") 30675 HRESULT put_PixelLocation(in POINT pixelLocation); 30676 30677 /// Get the HimetricLocation of the pointer event. This corresponds to the 30678 /// ptHimetricLocation property of the POINTER_INFO struct as defined in the 30679 /// Windows SDK (winuser.h). 30680 @(" propget") 30681 HRESULT get_HimetricLocation(@("out, retval") POINT* himetricLocation); 30682 /// Set the HimetricLocation of the pointer event. This corresponds to the 30683 /// ptHimetricLocation property of the POINTER_INFO struct as defined in the 30684 /// Windows SDK (winuser.h). 30685 @(" propput") 30686 HRESULT put_HimetricLocation(in POINT himetricLocation); 30687 30688 /// Get the PixelLocationRaw of the pointer event. This corresponds to the 30689 /// ptPixelLocationRaw property of the POINTER_INFO struct as defined in the 30690 /// Windows SDK (winuser.h). 30691 @(" propget") 30692 HRESULT get_PixelLocationRaw(@("out, retval") POINT* pixelLocationRaw); 30693 /// Set the PixelLocationRaw of the pointer event. This corresponds to the 30694 /// ptPixelLocationRaw property of the POINTER_INFO struct as defined in the 30695 /// Windows SDK (winuser.h). 30696 @(" propput") 30697 HRESULT put_PixelLocationRaw(in POINT pixelLocationRaw); 30698 30699 /// Get the HimetricLocationRaw of the pointer event. This corresponds to the 30700 /// ptHimetricLocationRaw property of the POINTER_INFO struct as defined in 30701 /// the Windows SDK (winuser.h). 30702 @(" propget") 30703 HRESULT get_HimetricLocationRaw(@("out, retval") POINT* himetricLocationRaw); 30704 /// Set the HimetricLocationRaw of the pointer event. This corresponds to the 30705 /// ptHimetricLocationRaw property of the POINTER_INFO struct as defined in 30706 /// the Windows SDK (winuser.h). 30707 @(" propput") 30708 HRESULT put_HimetricLocationRaw(in POINT himetricLocationRaw); 30709 30710 /// Get the Time of the pointer event. This corresponds to the dwTime property 30711 /// of the POINTER_INFO struct as defined in the Windows SDK (winuser.h). 30712 @(" propget") 30713 HRESULT get_Time(@("out, retval") DWORD* time); 30714 /// Set the Time of the pointer event. This corresponds to the dwTime property 30715 /// of the POINTER_INFO struct as defined in the Windows SDK (winuser.h). 30716 @(" propput") 30717 HRESULT put_Time(in DWORD time); 30718 30719 /// Get the HistoryCount of the pointer event. This corresponds to the 30720 /// historyCount property of the POINTER_INFO struct as defined in the Windows 30721 /// SDK (winuser.h). 30722 @(" propget") 30723 HRESULT get_HistoryCount(@("out, retval") UINT32* historyCount); 30724 /// Set the HistoryCount of the pointer event. This corresponds to the 30725 /// historyCount property of the POINTER_INFO struct as defined in the Windows 30726 /// SDK (winuser.h). 30727 @(" propput") 30728 HRESULT put_HistoryCount(in UINT32 historyCount); 30729 30730 /// Get the InputData of the pointer event. This corresponds to the InputData 30731 /// property of the POINTER_INFO struct as defined in the Windows SDK 30732 /// (winuser.h). 30733 @(" propget") 30734 HRESULT get_InputData(@("out, retval") INT32* inputData); 30735 /// Set the InputData of the pointer event. This corresponds to the InputData 30736 /// property of the POINTER_INFO struct as defined in the Windows SDK 30737 /// (winuser.h). 30738 @(" propput") 30739 HRESULT put_InputData(in INT32 inputData); 30740 30741 /// Get the KeyStates of the pointer event. This corresponds to the 30742 /// dwKeyStates property of the POINTER_INFO struct as defined in the Windows 30743 /// SDK (winuser.h). 30744 @(" propget") 30745 HRESULT get_KeyStates(@("out, retval") DWORD* keyStates); 30746 /// Set the KeyStates of the pointer event. This corresponds to the 30747 /// dwKeyStates property of the POINTER_INFO struct as defined in the Windows 30748 /// SDK (winuser.h). 30749 @(" propput") 30750 HRESULT put_KeyStates(in DWORD keyStates); 30751 30752 /// Get the PerformanceCount of the pointer event. This corresponds to the 30753 /// PerformanceCount property of the POINTER_INFO struct as defined in the 30754 /// Windows SDK (winuser.h). 30755 @(" propget") 30756 HRESULT get_PerformanceCount(@("out, retval") UINT64* performanceCount); 30757 /// Set the PerformanceCount of the pointer event. This corresponds to the 30758 /// PerformanceCount property of the POINTER_INFO struct as defined in the 30759 /// Windows SDK (winuser.h). 30760 @(" propput") 30761 HRESULT put_PerformanceCount(in UINT64 performanceCount); 30762 30763 /// Get the ButtonChangeKind of the pointer event. This corresponds to the 30764 /// ButtonChangeKind property of the POINTER_INFO struct. The values are 30765 /// defined by the POINTER_BUTTON_CHANGE_KIND enum in the Windows SDK 30766 /// (winuser.h). 30767 @(" propget") 30768 HRESULT get_ButtonChangeKind(@("out, retval") INT32* buttonChangeKind); 30769 /// Set the ButtonChangeKind of the pointer event. This corresponds to the 30770 /// ButtonChangeKind property of the POINTER_INFO struct. The values are 30771 /// defined by the POINTER_BUTTON_CHANGE_KIND enum in the Windows SDK 30772 /// (winuser.h). 30773 @(" propput") 30774 HRESULT put_ButtonChangeKind(in INT32 buttonChangeKind); 30775 30776 // Pen specific attributes 30777 30778 /// Get the PenFlags of the pointer event. This corresponds to the penFlags 30779 /// property of the POINTER_PEN_INFO struct. The values are defined by the 30780 /// PEN_FLAGS constants in the Windows SDK (winuser.h). 30781 @(" propget") 30782 HRESULT get_PenFlags(@("out, retval") UINT32* penFLags); 30783 /// Set the PenFlags of the pointer event. This corresponds to the penFlags 30784 /// property of the POINTER_PEN_INFO struct. The values are defined by the 30785 /// PEN_FLAGS constants in the Windows SDK (winuser.h). 30786 @(" propput") 30787 HRESULT put_PenFlags(in UINT32 penFLags); 30788 30789 /// Get the PenMask of the pointer event. This corresponds to the penMask 30790 /// property of the POINTER_PEN_INFO struct. The values are defined by the 30791 /// PEN_MASK constants in the Windows SDK (winuser.h). 30792 @(" propget") 30793 HRESULT get_PenMask(@("out, retval") UINT32* penMask); 30794 /// Set the PenMask of the pointer event. This corresponds to the penMask 30795 /// property of the POINTER_PEN_INFO struct. The values are defined by the 30796 /// PEN_MASK constants in the Windows SDK (winuser.h). 30797 @(" propput") 30798 HRESULT put_PenMask(in UINT32 penMask); 30799 30800 /// Get the PenPressure of the pointer event. This corresponds to the pressure 30801 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30802 /// (winuser.h). 30803 @(" propget") 30804 HRESULT get_PenPressure(@("out, retval") UINT32* penPressure); 30805 /// Set the PenPressure of the pointer event. This corresponds to the pressure 30806 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30807 /// (winuser.h). 30808 @(" propput") 30809 HRESULT put_PenPressure(in UINT32 penPressure); 30810 30811 /// Get the PenRotation of the pointer event. This corresponds to the rotation 30812 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30813 /// (winuser.h). 30814 @(" propget") 30815 HRESULT get_PenRotation(@("out, retval") UINT32* penRotation); 30816 /// Set the PenRotation of the pointer event. This corresponds to the rotation 30817 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30818 /// (winuser.h). 30819 @(" propput") 30820 HRESULT put_PenRotation(in UINT32 penRotation); 30821 30822 /// Get the PenTiltX of the pointer event. This corresponds to the tiltX 30823 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30824 /// (winuser.h). 30825 @(" propget") 30826 HRESULT get_PenTiltX(@("out, retval") INT32* penTiltX); 30827 /// Set the PenTiltX of the pointer event. This corresponds to the tiltX 30828 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30829 /// (winuser.h). 30830 @(" propput") 30831 HRESULT put_PenTiltX(in INT32 penTiltX); 30832 30833 /// Get the PenTiltY of the pointer event. This corresponds to the tiltY 30834 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30835 /// (winuser.h). 30836 @(" propget") 30837 HRESULT get_PenTiltY(@("out, retval") INT32* penTiltY); 30838 /// Set the PenTiltY of the pointer event. This corresponds to the tiltY 30839 /// property of the POINTER_PEN_INFO struct as defined in the Windows SDK 30840 /// (winuser.h). 30841 @(" propput") 30842 HRESULT put_PenTiltY(in INT32 penTiltY); 30843 30844 // Touch specific attributes 30845 30846 /// Get the TouchFlags of the pointer event. This corresponds to the 30847 /// touchFlags property of the POINTER_TOUCH_INFO struct. The values are 30848 /// defined by the TOUCH_FLAGS constants in the Windows SDK (winuser.h). 30849 @(" propget") 30850 HRESULT get_TouchFlags(@("out, retval") UINT32* touchFlags); 30851 /// Set the TouchFlags of the pointer event. This corresponds to the 30852 /// touchFlags property of the POINTER_TOUCH_INFO struct. The values are 30853 /// defined by the TOUCH_FLAGS constants in the Windows SDK (winuser.h). 30854 @(" propput") 30855 HRESULT put_TouchFlags(in UINT32 touchFlags); 30856 30857 /// Get the TouchMask of the pointer event. This corresponds to the 30858 /// touchMask property of the POINTER_TOUCH_INFO struct. The values are 30859 /// defined by the TOUCH_MASK constants in the Windows SDK (winuser.h). 30860 @(" propget") 30861 HRESULT get_TouchMask(@("out, retval") UINT32* touchMask); 30862 /// Set the TouchMask of the pointer event. This corresponds to the 30863 /// touchMask property of the POINTER_TOUCH_INFO struct. The values are 30864 /// defined by the TOUCH_MASK constants in the Windows SDK (winuser.h). 30865 @(" propput") 30866 HRESULT put_TouchMask(in UINT32 touchMask); 30867 30868 /// Get the TouchContact of the pointer event. This corresponds to the 30869 /// rcContact property of the POINTER_TOUCH_INFO struct as defined in the 30870 /// Windows SDK (winuser.h). 30871 @(" propget") 30872 HRESULT get_TouchContact(@("out, retval") RECT* touchContact); 30873 /// Set the TouchContact of the pointer event. This corresponds to the 30874 /// rcContact property of the POINTER_TOUCH_INFO struct as defined in the 30875 /// Windows SDK (winuser.h). 30876 @(" propput") 30877 HRESULT put_TouchContact(in RECT touchContact); 30878 30879 /// Get the TouchContactRaw of the pointer event. This corresponds to the 30880 /// rcContactRaw property of the POINTER_TOUCH_INFO struct as defined in the 30881 /// Windows SDK (winuser.h). 30882 @(" propget") 30883 HRESULT get_TouchContactRaw(@("out, retval") RECT* touchContactRaw); 30884 /// Set the TouchContactRaw of the pointer event. This corresponds to the 30885 /// rcContactRaw property of the POINTER_TOUCH_INFO struct as defined in the 30886 /// Windows SDK (winuser.h). 30887 @(" propput") 30888 HRESULT put_TouchContactRaw(in RECT touchContactRaw); 30889 30890 /// Get the TouchOrientation of the pointer event. This corresponds to the 30891 /// orientation property of the POINTER_TOUCH_INFO struct as defined in the 30892 /// Windows SDK (winuser.h). 30893 @(" propget") 30894 HRESULT get_TouchOrientation(@("out, retval") UINT32* touchOrientation); 30895 /// Set the TouchOrientation of the pointer event. This corresponds to the 30896 /// orientation property of the POINTER_TOUCH_INFO struct as defined in the 30897 /// Windows SDK (winuser.h). 30898 @(" propput") 30899 HRESULT put_TouchOrientation(in UINT32 touchOrientation); 30900 30901 /// Get the TouchPressure of the pointer event. This corresponds to the 30902 /// pressure property of the POINTER_TOUCH_INFO struct as defined in the 30903 /// Windows SDK (winuser.h). 30904 @(" propget") 30905 HRESULT get_TouchPressure(@("out, retval") UINT32* touchPressure); 30906 /// Set the TouchPressure of the pointer event. This corresponds to the 30907 /// pressure property of the POINTER_TOUCH_INFO struct as defined in the 30908 /// Windows SDK (winuser.h). 30909 @(" propput") 30910 HRESULT put_TouchPressure(in UINT32 touchPressure); 30911 } 30912 30913 /// The caller implements this interface to receive CursorChanged events. Use 30914 /// the Cursor property to get the new cursor. 30915 const GUID IID_ICoreWebView2CursorChangedEventHandler = ICoreWebView2CursorChangedEventHandler.iid; 30916 30917 interface ICoreWebView2CursorChangedEventHandler : IUnknown 30918 { 30919 static const GUID iid = { 0x9da43ccc,0x26e1,0x4dad,[ 0xb5,0x6c,0xd8,0x96,0x1c,0x94,0xc5,0x71 ] }; 30920 /// Called to provide the implementer with the event args for the 30921 /// corresponding event. There are no event args and the args 30922 /// parameter will be null. 30923 HRESULT Invoke(/+[in]+/ ICoreWebView2CompositionController sender, /+[in]+/ IUnknown args); 30924 } 30925 30926 /// Receives `RasterizationScaleChanged` events. Use the `RasterizationScale` 30927 /// property to get the modified scale. 30928 30929 const GUID IID_ICoreWebView2RasterizationScaleChangedEventHandler = ICoreWebView2RasterizationScaleChangedEventHandler.iid; 30930 30931 interface ICoreWebView2RasterizationScaleChangedEventHandler : IUnknown 30932 { 30933 static const GUID iid = { 0x9c98c8b1,0xac53,0x427e,[ 0xa3,0x45,0x30,0x49,0xb5,0x52,0x4b,0xbe ] }; 30934 /// Called to provide the implementer with the event args for the 30935 /// corresponding event. There are no event args and the args 30936 /// parameter will be null. 30937 HRESULT Invoke( 30938 /+[in]+/ ICoreWebView2Controller sender, 30939 /+[in]+/ IUnknown args); 30940 } 30941 30942 /// Represents the WebView2 Environment. WebViews created from an environment 30943 /// run on the browser process specified with environment parameters and 30944 /// objects created from an environment should be used in the same 30945 /// environment. Using it in different environments are not guaranteed to be 30946 /// compatible and may fail. 30947 30948 const GUID IID_ICoreWebView2Environment = ICoreWebView2Environment.iid; 30949 30950 interface ICoreWebView2Environment : IUnknown 30951 { 30952 static const GUID iid = { 0xb96d755e,0x0319,0x4e92,[ 0xa2,0x96,0x23,0x43,0x6f,0x46,0xa1,0xfc ] }; 30953 30954 /// Asynchronously create a new WebView. 30955 /// 30956 /// `parentWindow` is the `HWND` in which the WebView should be displayed and 30957 /// from which receive input. The WebView adds a child window to the 30958 /// provided window before this function returns. Z-order and other things 30959 /// impacted by sibling window order are affected accordingly. If you want to 30960 /// move the WebView to a different parent after it has been created, you must 30961 /// call put_ParentWindow to update tooltip positions, accessibility trees, 30962 /// and such. 30963 /// 30964 /// HWND_MESSAGE is a valid parameter for `parentWindow` for an invisible 30965 /// WebView for Windows 8 and above. In this case the window will never 30966 /// become visible. You are not able to reparent the window after you have 30967 /// created the WebView. This is not supported in Windows 7 or below. 30968 /// Passing this parameter in Windows 7 or below will return 30969 /// ERROR_INVALID_WINDOW_HANDLE in the controller callback. 30970 /// 30971 /// It is recommended that the app set Application User Model ID for the 30972 /// process or the app window. If none is set, during WebView creation a 30973 /// generated Application User Model ID is set to root window of 30974 /// `parentWindow`. 30975 /// 30976 /// \snippet AppWindow.cpp CreateCoreWebView2Controller 30977 /// 30978 /// It is recommended that the app handles restart manager messages, to 30979 /// gracefully restart it in the case when the app is using the WebView2 30980 /// Runtime from a certain installation and that installation is being 30981 /// uninstalled. For example, if a user installs a version of the WebView2 30982 /// Runtime and opts to use another version of the WebView2 Runtime for 30983 /// testing the app, and then uninstalls the 1st version of the WebView2 30984 /// Runtime without closing the app, the app restarts to allow 30985 /// un-installation to succeed. 30986 /// 30987 /// \snippet AppWindow.cpp RestartManager 30988 /// 30989 /// The app should retry `CreateCoreWebView2Controller` upon failure, unless the 30990 /// error code is `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`. 30991 /// When the app retries `CreateCoreWebView2Controller` upon failure, it is 30992 /// recommended that the app restarts from creating a new WebView2 30993 /// Environment. If a WebView2 Runtime update happens, the version 30994 /// associated with a WebView2 Environment may have been removed and causing 30995 /// the object to no longer work. Creating a new WebView2 Environment works 30996 /// since it uses the latest version. 30997 /// 30998 /// WebView creation fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if a 30999 /// running instance using the same user data folder exists, and the Environment 31000 /// objects have different `EnvironmentOptions`. For example, if a WebView was 31001 /// created with one language, an attempt to create a WebView with a different 31002 /// language using the same user data folder will fail. 31003 /// 31004 /// The creation will fail with `E_ABORT` if `parentWindow` is destroyed 31005 /// before the creation is finished. If this is caused by a call to 31006 /// `DestroyWindow`, the creation completed handler will be invoked before 31007 /// `DestroyWindow` returns, so you can use this to cancel creation and clean 31008 /// up resources synchronously when quitting a thread. 31009 /// 31010 /// In rare cases the creation can fail with `E_UNEXPECTED` if runtime does not have 31011 /// permissions to the user data folder. 31012 31013 HRESULT CreateCoreWebView2Controller( 31014 HWND parentWindow, 31015 ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler); 31016 31017 /// Create a new web resource response object. The `headers` parameter is 31018 /// the raw response header string delimited by newline. It is also possible 31019 /// to create this object with null headers string and then use the 31020 /// `ICoreWebView2HttpResponseHeaders` to construct the headers line by line. 31021 /// For more information about other parameters, navigate to 31022 /// [ICoreWebView2WebResourceResponse](/microsoft-edge/webview2/reference/win32/icorewebview2webresourceresponse). 31023 /// 31024 /// \snippet SettingsComponent.cpp WebResourceRequested0 31025 /// \snippet SettingsComponent.cpp WebResourceRequested1 31026 HRESULT CreateWebResourceResponse( 31027 in IStream* content, 31028 in int statusCode, 31029 in LPCWSTR reasonPhrase, 31030 in LPCWSTR headers, 31031 @("out, retval") ICoreWebView2WebResourceResponse * response); 31032 31033 /// The browser version info of the current `ICoreWebView2Environment`, 31034 /// including channel name if it is not the WebView2 Runtime. It matches the 31035 /// format of the `GetAvailableCoreWebView2BrowserVersionString` API. 31036 /// Channel names are `beta`, `dev`, and `canary`. 31037 /// 31038 /// The caller must free the returned string with `CoTaskMemFree`. See 31039 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 31040 /// 31041 /// \snippet AppWindow.cpp GetBrowserVersionString 31042 @(" propget") 31043 HRESULT get_BrowserVersionString(@("out, retval") LPWSTR* versionInfo); 31044 31045 /// Add an event handler for the `NewBrowserVersionAvailable` event. 31046 /// `NewBrowserVersionAvailable` runs when a newer version of the WebView2 31047 /// Runtime is installed and available using WebView2. To use the newer 31048 /// version of the browser you must create a new environment and WebView. 31049 /// The event only runs for new version from the same WebView2 Runtime from 31050 /// which the code is running. When not running with installed WebView2 31051 /// Runtime, no event is run. 31052 /// 31053 /// Because a user data folder is only able to be used by one browser 31054 /// process at a time, if you want to use the same user data folder in the 31055 /// WebView using the new version of the browser, you must close the 31056 /// environment and instance of WebView that are using the older version of 31057 /// the browser first. Or simply prompt the user to restart the app. 31058 /// 31059 /// \snippet AppWindow.cpp NewBrowserVersionAvailable 31060 HRESULT add_NewBrowserVersionAvailable( 31061 /+[in]+/ ICoreWebView2NewBrowserVersionAvailableEventHandler eventHandler, 31062 @("out") EventRegistrationToken* token); 31063 31064 /// Remove an event handler previously added with `add_NewBrowserVersionAvailable`. 31065 HRESULT remove_NewBrowserVersionAvailable( 31066 in EventRegistrationToken token); 31067 } 31068 31069 /// A continuation of the ICoreWebView2Environment interface. 31070 const GUID IID_ICoreWebView2Environment2 = ICoreWebView2Environment2.iid; 31071 31072 interface ICoreWebView2Environment2 : ICoreWebView2Environment 31073 { 31074 static const GUID iid = { 0x41F3632B,0x5EF4,0x404F,[ 0xAD,0x82,0x2D,0x60,0x6C,0x5A,0x9A,0x21 ] }; 31075 /// Create a new web resource request object. 31076 /// URI parameter must be absolute URI. 31077 /// The headers string is the raw request header string delimited by CRLF 31078 /// (optional in last header). 31079 /// It's also possible to create this object with null headers string 31080 /// and then use the ICoreWebView2HttpRequestHeaders to construct the headers 31081 /// line by line. 31082 /// For information on other parameters see ICoreWebView2WebResourceRequest. 31083 /// 31084 /// \snippet ScenarioNavigateWithWebResourceRequest.cpp NavigateWithWebResourceRequest 31085 HRESULT CreateWebResourceRequest(in LPCWSTR uri, 31086 in LPCWSTR method, 31087 in IStream* postData, 31088 in LPCWSTR headers, 31089 @("out, retval") ICoreWebView2WebResourceRequest * request); 31090 } 31091 31092 /// A continuation of the ICoreWebView2Environment2 interface. 31093 const GUID IID_ICoreWebView2Environment3 = ICoreWebView2Environment3.iid; 31094 31095 interface ICoreWebView2Environment3 : ICoreWebView2Environment2 31096 { 31097 static const GUID iid = { 0x80a22ae3,0xbe7c,0x4ce2,[ 0xaf,0xe1,0x5a,0x50,0x05,0x6c,0xde,0xeb ] }; 31098 /// Asynchronously create a new WebView for use with visual hosting. 31099 /// 31100 /// parentWindow is the HWND in which the app will connect the visual tree of 31101 /// the WebView. This will be the HWND that the app will receive pointer/ 31102 /// mouse input meant for the WebView (and will need to use SendMouseInput/ 31103 /// SendPointerInput to forward). If the app moves the WebView visual tree to 31104 /// underneath a different window, then it needs to call put_ParentWindow to 31105 /// update the new parent HWND of the visual tree. 31106 /// 31107 /// HWND_MESSAGE is not a valid parameter for `parentWindow` for visual hosting. 31108 /// The underlying implementation of supporting HWND_MESSAGE would break 31109 /// accessibility for visual hosting. This is supported in windowed 31110 /// WebViews - see CreateCoreWebView2Controller. 31111 /// 31112 /// Use put_RootVisualTarget on the created CoreWebView2CompositionController to 31113 /// provide a visual to host the browser's visual tree. 31114 /// 31115 /// It is recommended that the application set Application User Model ID for 31116 /// the process or the application window. If none is set, during WebView 31117 /// creation a generated Application User Model ID is set to root window of 31118 /// parentWindow. 31119 /// \snippet AppWindow.cpp CreateCoreWebView2Controller 31120 /// 31121 /// It is recommended that the application handles restart manager messages 31122 /// so that it can be restarted gracefully in the case when the app is using 31123 /// Edge for WebView from a certain installation and that installation is 31124 /// being uninstalled. For example, if a user installs Edge from Dev channel 31125 /// and opts to use Edge from that channel for testing the app, and then 31126 /// uninstalls Edge from that channel without closing the app, the app will 31127 /// be restarted to allow uninstallation of the dev channel to succeed. 31128 /// \snippet AppWindow.cpp RestartManager 31129 /// 31130 /// The app should retry `CreateCoreWebView2CompositionController` upon failure, 31131 /// unless the error code is `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`. 31132 /// When the app retries `CreateCoreWebView2CompositionController` 31133 /// upon failure, it is recommended that the app restarts from creating a new 31134 /// WebView2 Environment. If a WebView2 Runtime update happens, the version 31135 /// associated with a WebView2 Environment may have been removed and causing 31136 /// the object to no longer work. Creating a new WebView2 Environment works 31137 /// since it uses the latest version. 31138 /// 31139 /// WebView creation fails with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if a 31140 /// running instance using the same user data folder exists, and the Environment 31141 /// objects have different `EnvironmentOptions`. For example, if a WebView was 31142 /// created with one language, an attempt to create a WebView with a different 31143 /// language using the same user data folder will fail. 31144 /// 31145 /// The creation will fail with `E_ABORT` if `parentWindow` is destroyed 31146 /// before the creation is finished. If this is caused by a call to 31147 /// `DestroyWindow`, the creation completed handler will be invoked before 31148 /// `DestroyWindow` returns, so you can use this to cancel creation and clean 31149 /// up resources synchronously when quitting a thread. 31150 /// 31151 /// In rare cases the creation can fail with `E_UNEXPECTED` if runtime does not have 31152 /// permissions to the user data folder. 31153 /// 31154 /// CreateCoreWebView2CompositionController is supported in the following versions of Windows: 31155 /// 31156 /// - Windows 11 31157 /// - Windows 10 31158 /// - Windows Server 2019 31159 /// - Windows Server 2016 31160 /// 31161 HRESULT CreateCoreWebView2CompositionController( 31162 HWND parentWindow, 31163 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler handler); 31164 31165 /// Create an empty ICoreWebView2PointerInfo. The returned 31166 /// ICoreWebView2PointerInfo needs to be populated with all of the relevant 31167 /// info before calling SendPointerInput. 31168 HRESULT CreateCoreWebView2PointerInfo( 31169 @("out, retval") ICoreWebView2PointerInfo * pointerInfo); 31170 } 31171 31172 /// A continuation of the ICoreWebView2Environment3 interface. 31173 const GUID IID_ICoreWebView2Environment4 = ICoreWebView2Environment4.iid; 31174 31175 interface ICoreWebView2Environment4 : ICoreWebView2Environment3 31176 { 31177 static const GUID iid = { 0x20944379,0x6dcf,0x41d6,[ 0xa0,0xa0,0xab,0xc0,0xfc,0x50,0xde,0x0d ] }; 31178 /// Returns the Automation Provider for the WebView that matches the provided 31179 /// window. Host apps are expected to implement 31180 /// IRawElementProviderHwndOverride. When GetOverrideProviderForHwnd is 31181 /// called, the app can pass the HWND to GetAutomationProviderForWindow to 31182 /// find the matching WebView Automation Provider. 31183 HRESULT GetAutomationProviderForWindow(in HWND hwnd, 31184 @("out, retval") IUnknown * provider); 31185 } 31186 31187 /// A continuation of the `ICoreWebView2Environment4` interface that supports 31188 /// the `BrowserProcessExited` event. 31189 const GUID IID_ICoreWebView2Environment5 = ICoreWebView2Environment5.iid; 31190 31191 interface ICoreWebView2Environment5 : ICoreWebView2Environment4 31192 { 31193 static const GUID iid = { 0x319e423d,0xe0d7,0x4b8d,[ 0x92,0x54,0xae,0x94,0x75,0xde,0x9b,0x17 ] }; 31194 /// Add an event handler for the `BrowserProcessExited` event. 31195 /// The `BrowserProcessExited` event is raised when the collection of WebView2 31196 /// Runtime processes for the browser process of this environment terminate 31197 /// due to browser process failure or normal shutdown (for example, when all 31198 /// associated WebViews are closed), after all resources have been released 31199 /// (including the user data folder). To learn about what these processes are, 31200 /// go to [Process model](/microsoft-edge/webview2/concepts/process-model). 31201 /// 31202 /// A handler added with this method is called until removed with 31203 /// `remove_BrowserProcessExited`, even if a new browser process is bound to 31204 /// this environment after earlier `BrowserProcessExited` events are raised. 31205 /// 31206 /// Multiple app processes can share a browser process by creating their webviews 31207 /// from a `ICoreWebView2Environment` with the same user data folder. When the entire 31208 /// collection of WebView2Runtime processes for the browser process exit, all 31209 /// associated `ICoreWebView2Environment` objects receive the `BrowserProcessExited` 31210 /// event. Multiple processes sharing the same browser process need to coordinate 31211 /// their use of the shared user data folder to avoid race conditions and 31212 /// unnecessary waits. For example, one process should not clear the user data 31213 /// folder at the same time that another process recovers from a crash by recreating 31214 /// its WebView controls; one process should not block waiting for the event if 31215 /// other app processes are using the same browser process (the browser process will 31216 /// not exit until those other processes have closed their webviews too). 31217 /// 31218 /// Note this is an event from the `ICoreWebView2Environment3` interface, not 31219 /// the `ICoreWebView2` one. The difference between `BrowserProcessExited` and 31220 /// `ICoreWebView2`'s `ProcessFailed` is that `BrowserProcessExited` is 31221 /// raised for any **browser process** exit (expected or unexpected, after all 31222 /// associated processes have exited too), while `ProcessFailed` is raised for 31223 /// **unexpected** process exits of any kind (browser, render, GPU, and all 31224 /// other types), or for main frame **render process** unresponsiveness. To 31225 /// learn more about the WebView2 Process Model, go to 31226 /// [Process model](/microsoft-edge/webview2/concepts/process-model). 31227 /// 31228 /// In the case the browser process crashes, both `BrowserProcessExited` and 31229 /// `ProcessFailed` events are raised, but the order is not guaranteed. These 31230 /// events are intended for different scenarios. It is up to the app to 31231 /// coordinate the handlers so they do not try to perform reliability recovery 31232 /// while also trying to move to a new WebView2 Runtime version or remove the 31233 /// user data folder. 31234 /// 31235 /// \snippet AppWindow.cpp Close 31236 HRESULT add_BrowserProcessExited( 31237 /+[in]+/ ICoreWebView2BrowserProcessExitedEventHandler eventHandler, 31238 @("out") EventRegistrationToken* token); 31239 31240 /// Remove an event handler previously added with `add_BrowserProcessExited`. 31241 HRESULT remove_BrowserProcessExited(in EventRegistrationToken token); 31242 } 31243 31244 /// This interface is an extension of the ICoreWebView2Environment that supports 31245 /// creating print settings for printing to PDF. 31246 const GUID IID_ICoreWebView2Environment6 = ICoreWebView2Environment6.iid; 31247 31248 interface ICoreWebView2Environment6 : ICoreWebView2Environment5 31249 { 31250 static const GUID iid = { 0xe59ee362,0xacbd,0x4857,[ 0x9a,0x8e,0xd3,0x64,0x4d,0x94,0x59,0xa9 ] }; 31251 /// Creates the `ICoreWebView2PrintSettings` used by the `PrintToPdf` 31252 /// method. 31253 HRESULT CreatePrintSettings( 31254 @("out, retval") ICoreWebView2PrintSettings * printSettings); 31255 } 31256 31257 /// This interface is an extension of the ICoreWebView2Environment. An object 31258 /// implementing the ICoreWebView2Environment7 interface will also 31259 /// implement ICoreWebView2Environment. 31260 const GUID IID_ICoreWebView2Environment7 = ICoreWebView2Environment7.iid; 31261 31262 interface ICoreWebView2Environment7 : ICoreWebView2Environment6 31263 { 31264 static const GUID iid = { 0x43C22296,0x3BBD,0x43A4,[ 0x9C,0x00,0x5C,0x0D,0xF6,0xDD,0x29,0xA2 ] }; 31265 /// Returns the user data folder that all CoreWebView2's created from this 31266 /// environment are using. 31267 /// This could be either the value passed in by the developer when creating 31268 /// the environment object or the calculated one for default handling. It 31269 /// will always be an absolute path. 31270 /// 31271 /// The caller must free the returned string with `CoTaskMemFree`. See 31272 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 31273 /// 31274 /// \snippet AppWindow.cpp GetUserDataFolder 31275 @(" propget") 31276 HRESULT get_UserDataFolder(@(" out, retval ") LPWSTR * value); 31277 } 31278 31279 /// A continuation of the `ICoreWebView2Environment7` interface that supports 31280 /// the `ProcessInfosChanged` event. 31281 const GUID IID_ICoreWebView2Environment8 = ICoreWebView2Environment8.iid; 31282 31283 interface ICoreWebView2Environment8 : ICoreWebView2Environment7 31284 { 31285 static const GUID iid = { 0xD6EB91DD,0xC3D2,0x45E5,[ 0xBD,0x29,0x6D,0xC2,0xBC,0x4D,0xE9,0xCF ] }; 31286 /// Adds an event handler for the `ProcessInfosChanged` event. 31287 /// 31288 /// \snippet ProcessComponent.cpp ProcessInfosChanged 31289 /// \snippet ProcessComponent.cpp ProcessInfosChanged1 31290 HRESULT add_ProcessInfosChanged( 31291 /+[in]+/ ICoreWebView2ProcessInfosChangedEventHandler eventHandler, 31292 @("out") EventRegistrationToken* token); 31293 31294 /// Remove an event handler previously added with `add_ProcessInfosChanged`. 31295 HRESULT remove_ProcessInfosChanged( 31296 in EventRegistrationToken token); 31297 31298 /// Returns the `ICoreWebView2ProcessInfoCollection` 31299 /// Provide a list of all process using same user data folder except for crashpad process. 31300 HRESULT GetProcessInfos(@("out, retval")ICoreWebView2ProcessInfoCollection * value); 31301 } 31302 31303 /// Provides a set of properties for a process in the `ICoreWebView2Environment`. 31304 const GUID IID_ICoreWebView2ProcessInfo = ICoreWebView2ProcessInfo.iid; 31305 31306 interface ICoreWebView2ProcessInfo : IUnknown 31307 { 31308 static const GUID iid = { 0x84FA7612,0x3F3D,0x4FBF,[ 0x88,0x9D,0xFA,0xD0,0x00,0x49,0x2D,0x72 ] }; 31309 31310 /// The process id of the process. 31311 @(" propget") 31312 HRESULT get_ProcessId(@("out, retval") INT32* value); 31313 31314 /// The kind of the process. 31315 @(" propget") 31316 HRESULT get_Kind(@("out, retval") COREWEBVIEW2_PROCESS_KIND* kind); 31317 } 31318 31319 /// A continuation of the ICoreWebView2Environment interface for 31320 /// creating CoreWebView2 ContextMenuItem objects. 31321 const GUID IID_ICoreWebView2Environment9 = ICoreWebView2Environment9.iid; 31322 31323 interface ICoreWebView2Environment9 : ICoreWebView2Environment8 31324 { 31325 static const GUID iid = { 0xf06f41bf,0x4b5a,0x49d8,[ 0xb9,0xf6,0xfa,0x16,0xcd,0x29,0xf2,0x74 ] }; 31326 /// Create a custom `ContextMenuItem` object to insert into the WebView context menu. 31327 /// CoreWebView2 will rewind the icon stream before decoding. 31328 /// There is a limit of 1000 active custom context menu items at a given time. 31329 /// Attempting to create more before deleting existing ones will fail with 31330 /// ERROR_NOT_ENOUGH_QUOTA. 31331 /// It is recommended to reuse ContextMenuItems across ContextMenuRequested events 31332 /// for performance. 31333 /// The returned ContextMenuItem object's `IsEnabled` property will default to `TRUE` 31334 /// and `IsChecked` property will default to `FALSE`. A `CommandId` will be assigned 31335 /// to the ContextMenuItem object that's unique across active custom context menu items, 31336 /// but command ID values of deleted ContextMenuItems can be reassigned. 31337 HRESULT CreateContextMenuItem( 31338 in LPCWSTR label, 31339 in IStream* iconStream, 31340 in COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND kind, 31341 @("out, retval") ICoreWebView2ContextMenuItem * item); 31342 } 31343 31344 /// This interface is used to create `ICoreWebView2ControllerOptions` object, which 31345 /// can be passed as a parameter in `CreateCoreWebView2ControllerWithOptions` and 31346 /// `CreateCoreWebView2CompositionControllerWithOptions` function for multiple profiles support. 31347 /// The profile will be created on disk or opened when calling `CreateCoreWebView2ControllerWithOptions` or 31348 /// `CreateCoreWebView2CompositionControllerWithOptions` no matter InPrivate mode is enabled or not, and 31349 /// it will be released in memory when the corresponding controller is closed but still remain on disk. 31350 /// If you create a WebView2Controller with {ProfileName="name", InPrivate=false} and then later create another 31351 /// one with {ProfileName="name", InPrivate=true}, these two controllers using the same profile would be allowed to 31352 /// run at the same time. 31353 /// As WebView2 is built on top of Edge browser, it follows Edge's behavior pattern. To create an InPrivate WebView, 31354 /// we gets an off-the-record profile (an InPrivate profile) from a regular profile, then create the WebView with the 31355 /// off-the-record profile. 31356 /// 31357 /// \snippet AppWindow.cpp CreateControllerWithOptions 31358 const GUID IID_ICoreWebView2Environment10 = ICoreWebView2Environment10.iid; 31359 31360 interface ICoreWebView2Environment10 : ICoreWebView2Environment9 31361 { 31362 static const GUID iid = { 0xee0eb9df,0x6f12,0x46ce,[ 0xb5,0x3f,0x3f,0x47,0xb9,0xc9,0x28,0xe0 ] }; 31363 /// Create a new ICoreWebView2ControllerOptions to be passed as a parameter of 31364 /// CreateCoreWebView2ControllerWithOptions and CreateCoreWebView2CompositionControllerWithOptions. 31365 /// The 'options' is settable and in it the default value for profile name is the empty string, 31366 /// and the default value for IsInPrivateModeEnabled is false. 31367 /// Also the profile name can be reused. 31368 HRESULT CreateCoreWebView2ControllerOptions( 31369 @("out, retval") ICoreWebView2ControllerOptions * options); 31370 31371 /// Create a new WebView with options. 31372 HRESULT CreateCoreWebView2ControllerWithOptions( 31373 in HWND parentWindow, 31374 /+[in]+/ ICoreWebView2ControllerOptions options, 31375 /+[in]+/ ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler); 31376 31377 /// Create a new WebView in visual hosting mode with options. 31378 HRESULT CreateCoreWebView2CompositionControllerWithOptions( 31379 in HWND parentWindow, 31380 /+[in]+/ ICoreWebView2ControllerOptions options, 31381 /+[in]+/ ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler handler); 31382 } 31383 31384 /// A list containing process id and corresponding process type. 31385 const GUID IID_ICoreWebView2ProcessInfoCollection = ICoreWebView2ProcessInfoCollection.iid; 31386 31387 interface ICoreWebView2ProcessInfoCollection : IUnknown 31388 { 31389 static const GUID iid = { 0x402B99CD,0xA0CC,0x4FA5,[ 0xB7,0xA5,0x51,0xD8,0x6A,0x1D,0x23,0x39 ] }; 31390 /// The number of process contained in the ICoreWebView2ProcessInfoCollection. 31391 @(" propget") 31392 HRESULT get_Count(@("out, retval") UINT* count); 31393 31394 /// Gets the `ICoreWebView2ProcessInfo` located in the `ICoreWebView2ProcessInfoCollection` 31395 /// at the given index. 31396 HRESULT GetValueAtIndex(in UINT32 index, 31397 @("out, retval") ICoreWebView2ProcessInfo * processInfo); 31398 } 31399 31400 /// An event handler for the `ProcessInfosChanged` event. 31401 const GUID IID_ICoreWebView2ProcessInfosChangedEventHandler = ICoreWebView2ProcessInfosChangedEventHandler.iid; 31402 31403 interface ICoreWebView2ProcessInfosChangedEventHandler : IUnknown 31404 { 31405 static const GUID iid = { 0xF4AF0C39,0x44B9,0x40E9,[ 0x8B,0x11,0x04,0x84,0xCF,0xB9,0xE0,0xA1 ] }; 31406 /// Provides the event args for the corresponding event. No event args exist 31407 /// and the `args` parameter is set to `null`. 31408 HRESULT Invoke(/+[in]+/ ICoreWebView2Environment sender, /+[in]+/ IUnknown args); 31409 } 31410 31411 /// Options used to create WebView2 Environment. A default implementation is 31412 /// provided in `WebView2EnvironmentOptions.h`. 31413 /// 31414 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions 31415 31416 const GUID IID_ICoreWebView2EnvironmentOptions = ICoreWebView2EnvironmentOptions.iid; 31417 31418 interface ICoreWebView2EnvironmentOptions : IUnknown 31419 { 31420 static const GUID iid = { 0x2fde08a8,0x1e9a,0x4766,[ 0x8c,0x05,0x95,0xa9,0xce,0xb9,0xd1,0xc5 ] }; 31421 31422 /// Changes the behavior of the WebView. The arguments are passed to the 31423 /// browser process as part of the command. For more information about 31424 /// using command-line switches with Chromium browser processes, navigate to 31425 /// [Run Chromium with Flags](https://www.chromium.org/developers/how-tos/run-chromium-with-flags). 31426 /// The value appended to a switch is appended to the browser process, for 31427 /// example, in `--edge-webview-switches=xxx` the value is `xxx`. If you 31428 /// specify a switch that is important to WebView functionality, it is 31429 /// ignored, for example, `--user-data-dir`. Specific features are disabled 31430 /// internally and blocked from being enabled. If a switch is specified 31431 /// multiple times, only the last instance is used. 31432 /// 31433 /// \> [!NOTE]\n\> A merge of the different values of the same switch is not attempted, 31434 /// except for disabled and enabled features. The features specified by 31435 /// `--enable-features` and `--disable-features` are merged with simple 31436 /// logic.\n\> * The features is the union of the specified features 31437 /// and built-in features. If a feature is disabled, it is removed from the 31438 /// enabled features list. 31439 /// 31440 /// If you specify command-line switches and use the 31441 /// `additionalBrowserArguments` parameter, the `--edge-webview-switches` 31442 /// value takes precedence and is processed last. If a switch fails to 31443 /// parse, the switch is ignored. The default state for the operation is 31444 /// to run the browser process with no extra flags. 31445 /// 31446 /// The caller must free the returned string with `CoTaskMemFree`. See 31447 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 31448 @(" propget") 31449 HRESULT get_AdditionalBrowserArguments(@("out, retval") LPWSTR* value); 31450 31451 /// Sets the `AdditionalBrowserArguments` property. 31452 /// 31453 /// Please note that calling this API twice will replace the previous value 31454 /// rather than appending to it. If there are multiple switches, there 31455 /// should be a space in between them. The one exception is if multiple 31456 /// features are being enabled/disabled for a single switch, in which 31457 /// case the features should be comma-seperated. 31458 /// Ex. "--disable-features=feature1,feature2 --some-other-switch --do-something" 31459 @(" propput") 31460 HRESULT put_AdditionalBrowserArguments(in LPCWSTR value); 31461 31462 /// The default display language for WebView. It applies to browser UI such as 31463 /// context menu and dialogs. It also applies to the `accept-languages` HTTP 31464 /// header that WebView sends to websites. The intended locale value is in the 31465 /// format of BCP 47 Language Tags. More information can be found from 31466 /// [IETF BCP47](https://www.ietf.org/rfc/bcp/bcp47.html). 31467 /// 31468 /// The caller must free the returned string with `CoTaskMemFree`. See 31469 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 31470 @(" propget") 31471 HRESULT get_Language(@("out, retval") LPWSTR* value); 31472 31473 /// Sets the `Language` property. 31474 @(" propput") 31475 HRESULT put_Language(in LPCWSTR value); 31476 31477 /// Specifies the version of the WebView2 Runtime binaries required to be 31478 /// compatible with your app. This defaults to the WebView2 Runtime version 31479 /// that corresponds with the version of the SDK the app is using. The 31480 /// format of this value is the same as the format of the 31481 /// `BrowserVersionString` property and other `BrowserVersion` values. Only 31482 /// the version part of the `BrowserVersion` value is respected. The channel 31483 /// suffix, if it exists, is ignored. The version of the WebView2 Runtime 31484 /// binaries actually used may be different from the specified 31485 /// `TargetCompatibleBrowserVersion`. The binaries are only guaranteed to be 31486 /// compatible. Verify the actual version on the `BrowserVersionString` 31487 /// property on the `ICoreWebView2Environment`. 31488 /// 31489 /// The caller must free the returned string with `CoTaskMemFree`. See 31490 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 31491 @(" propget") 31492 HRESULT get_TargetCompatibleBrowserVersion(@("out, retval") LPWSTR* value); 31493 31494 /// Sets the `TargetCompatibleBrowserVersion` property. 31495 @(" propput") 31496 HRESULT put_TargetCompatibleBrowserVersion(in LPCWSTR value); 31497 31498 /// The `AllowSingleSignOnUsingOSPrimaryAccount` property is used to enable 31499 /// single sign on with Azure Active Directory (AAD) and personal Microsoft 31500 /// Account (MSA) resources inside WebView. All AAD accounts, connected to 31501 /// Windows and shared for all apps, are supported. For MSA, SSO is only enabled 31502 /// for the account associated for Windows account login, if any. 31503 /// Default is disabled. Universal Windows Platform apps must also declare 31504 /// `enterpriseCloudSSO` 31505 /// [Restricted capabilities](/windows/uwp/packaging/app-capability-declarations\#restricted-capabilities) 31506 /// for the single sign on (SSO) to work. 31507 @(" propget") 31508 HRESULT get_AllowSingleSignOnUsingOSPrimaryAccount(@("out, retval") BOOL* allow); 31509 31510 /// Sets the `AllowSingleSignOnUsingOSPrimaryAccount` property. 31511 @(" propput") 31512 HRESULT put_AllowSingleSignOnUsingOSPrimaryAccount(in BOOL allow); 31513 } 31514 31515 /// Additional options used to create WebView2 Environment. A default implementation is 31516 /// provided in `WebView2EnvironmentOptions.h`. 31517 /// 31518 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions 31519 31520 // Note: ICoreWebView2EnvironmentOptions* interfaces derive from IUnknown to make moving 31521 // the API from experimental to public smoothier. These interfaces are mostly internal to 31522 // WebView's own code. Normal apps just use the objects we provided and never interact 31523 // with the interfaces. Advanced apps might implement their own options object. In that 31524 // case, it is also easier for them to implement the interface if it is derived from IUnknown. 31525 const GUID IID_ICoreWebView2EnvironmentOptions2 = ICoreWebView2EnvironmentOptions2.iid; 31526 31527 interface ICoreWebView2EnvironmentOptions2 : IUnknown 31528 { 31529 static const GUID iid = { 0xFF85C98A,0x1BA7,0x4A6B,[ 0x90,0xC8,0x2B,0x75,0x2C,0x89,0xE9,0xE2 ] }; 31530 31531 /// Whether other processes can create WebView2 from WebView2Environment created with the 31532 /// same user data folder and therefore sharing the same WebView browser process instance. 31533 /// Default is FALSE. 31534 @(" propget") 31535 HRESULT get_ExclusiveUserDataFolderAccess(@("out, retval") BOOL* value); 31536 31537 /// Sets the `ExclusiveUserDataFolderAccess` property. 31538 /// The `ExclusiveUserDataFolderAccess` property specifies that the WebView environment 31539 /// obtains exclusive access to the user data folder. 31540 /// If the user data folder is already being used by another WebView environment with a 31541 /// different value for `ExclusiveUserDataFolderAccess` property, the creation of a WebView2Controller 31542 /// using the environment object will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`. 31543 /// When set as TRUE, no other WebView can be created from other processes using WebView2Environment 31544 /// objects with the same UserDataFolder. This prevents other processes from creating WebViews 31545 /// which share the same browser process instance, since sharing is performed among 31546 /// WebViews that have the same UserDataFolder. When another process tries to create a 31547 /// WebView2Controller from an WebView2Environment object created with the same user data folder, 31548 /// it will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`. 31549 @(" propput") 31550 HRESULT put_ExclusiveUserDataFolderAccess(in BOOL value); 31551 } 31552 31553 /// Additional options used to create WebView2 Environment to manage crash 31554 /// reporting. 31555 const GUID IID_ICoreWebView2EnvironmentOptions3 = ICoreWebView2EnvironmentOptions3.iid; 31556 31557 interface ICoreWebView2EnvironmentOptions3 : IUnknown 31558 { 31559 static const GUID iid = { 0x4A5C436E,0xA9E3,0x4A2E,[ 0x89,0xC3,0x91,0x0D,0x35,0x13,0xF5,0xCC ] }; 31560 /// When `IsCustomCrashReportingEnabled` is set to `TRUE`, Windows won't send crash data to Microsoft endpoint. 31561 /// `IsCustomCrashReportingEnabled` is default to be `FALSE`, in this case, WebView will respect OS consent. 31562 @(" propget") 31563 HRESULT get_IsCustomCrashReportingEnabled(@("out, retval") BOOL* value); 31564 31565 /// Sets the `IsCustomCrashReportingEnabled` property. 31566 @(" propput") 31567 HRESULT put_IsCustomCrashReportingEnabled(in BOOL value); 31568 } 31569 31570 /// Additional options used to create WebView2 Environment that manages custom scheme registration. 31571 const GUID IID_ICoreWebView2EnvironmentOptions4 = ICoreWebView2EnvironmentOptions4.iid; 31572 31573 interface ICoreWebView2EnvironmentOptions4 : IUnknown 31574 { 31575 static const GUID iid = { 0xac52d13f,0x0d38,0x475a,[ 0x9d,0xca,0x87,0x65,0x80,0xd6,0x79,0x3e ] }; 31576 /// Array of custom scheme registrations. The returned 31577 /// ICoreWebView2CustomSchemeRegistration pointers must be released, and the 31578 /// array itself must be deallocated with CoTaskMemFree. 31579 HRESULT GetCustomSchemeRegistrations( 31580 @("out") UINT32* count, 31581 @("out") ICoreWebView2CustomSchemeRegistration ** schemeRegistrations); 31582 /// Set the array of custom scheme registrations to be used. 31583 /// \snippet AppWindow.cpp CoreWebView2CustomSchemeRegistration 31584 HRESULT SetCustomSchemeRegistrations( 31585 in UINT32 count, 31586 /+[in]+/ ICoreWebView2CustomSchemeRegistration * schemeRegistrations); 31587 } 31588 31589 /// Additional options used to create WebView2 Environment to manage tracking 31590 /// prevention. 31591 const GUID IID_ICoreWebView2EnvironmentOptions5 = ICoreWebView2EnvironmentOptions5.iid; 31592 31593 interface ICoreWebView2EnvironmentOptions5 : IUnknown 31594 { 31595 static const GUID iid = { 0x0AE35D64,0xC47F,0x4464,[ 0x81,0x4E,0x25,0x9C,0x34,0x5D,0x15,0x01 ] }; 31596 /// The `EnableTrackingPrevention` property is used to enable/disable tracking prevention 31597 /// feature in WebView2. This property enable/disable tracking prevention for all the 31598 /// WebView2's created in the same environment. By default this feature is enabled to block 31599 /// potentially harmful trackers and trackers from sites that aren't visited before and set to 31600 /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED` or whatever value was last changed/persisted 31601 /// on the profile. 31602 /// 31603 /// You can set this property to false to disable the tracking prevention feature if the app only 31604 /// renders content in the WebView2 that is known to be safe. Disabling this feature when creating 31605 /// environment also improves runtime performance by skipping related code. 31606 /// 31607 /// You shouldn't disable this property if WebView2 is being used as a "full browser" with arbitrary 31608 /// navigation and should protect end user privacy. 31609 /// 31610 /// There is `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` property to control levels of 31611 /// tracking prevention of the WebView2's associated with a same profile. However, you can also disable 31612 /// tracking prevention later using `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` property and 31613 /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE` value but that doesn't improves runtime performance. 31614 /// 31615 /// See `ICoreWebView2Profile3::PreferredTrackingPreventionLevel` for more details. 31616 /// 31617 /// Tracking prevention protects users from online tracking by restricting the ability of trackers to 31618 /// access browser-based storage as well as the network. See [Tracking prevention](/microsoft-edge/web-platform/tracking-prevention). 31619 @(" propget") 31620 HRESULT get_EnableTrackingPrevention(@("out, retval") BOOL* value); 31621 /// Sets the `EnableTrackingPrevention` property. 31622 @(" propput") 31623 HRESULT put_EnableTrackingPrevention(in BOOL value); 31624 } 31625 31626 /// Additional options used to create WebView2 Environment to manage browser extensions. 31627 const GUID IID_ICoreWebView2EnvironmentOptions6 = ICoreWebView2EnvironmentOptions6.iid; 31628 31629 interface ICoreWebView2EnvironmentOptions6 : IUnknown 31630 { 31631 static const GUID iid = { 0x57D29CC3,0xC84F,0x42A0,[ 0xB0,0xE2,0xEF,0xFB,0xD5,0xE1,0x79,0xDE ] }; 31632 /// When `AreBrowserExtensionsEnabled` is set to `TRUE`, new extensions can be added to user 31633 /// profile and used. `AreBrowserExtensionsEnabled` is default to be `FALSE`, in this case, 31634 /// new extensions can't be installed, and already installed extension won't be 31635 /// available to use in user profile. 31636 /// If connecting to an already running environment with a different value for `AreBrowserExtensionsEnabled` 31637 /// property, it will fail with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)`. 31638 /// See `ICoreWebView2BrowserExtension` for Extensions API details. 31639 @(" propget") 31640 HRESULT get_AreBrowserExtensionsEnabled(@("out, retval") BOOL* value); 31641 /// Sets the `AreBrowserExtensionsEnabled` property. 31642 @(" propput") 31643 HRESULT put_AreBrowserExtensionsEnabled(in BOOL value); 31644 } 31645 31646 /// A continuation of the ICoreWebView2Environment interface for 31647 /// getting the crash dump folder path. 31648 const GUID IID_ICoreWebView2Environment11 = ICoreWebView2Environment11.iid; 31649 31650 interface ICoreWebView2Environment11 : ICoreWebView2Environment10 31651 { 31652 static const GUID iid = { 0xF0913DC6,0xA0EC,0x42EF,[ 0x98,0x05,0x91,0xDF,0xF3,0xA2,0x96,0x6A ] }; 31653 /// `FailureReportFolderPath` returns the path of the folder where minidump files are written. 31654 /// Whenever a WebView2 process crashes, a crash dump file will be created in the crash dump folder. 31655 /// The crash dump format is minidump files. Please see 31656 /// [Minidump Files documentation](/windows/win32/debug/minidump-files) for detailed information. 31657 /// Normally when a single child process fails, a minidump will be generated and written to disk, 31658 /// then the `ProcessFailed` event is raised. But for unexpected crashes, a minidump file might not be generated 31659 /// at all, despite whether `ProcessFailed` event is raised. If there are multiple 31660 /// process failures at once, multiple minidump files could be generated. Thus `FailureReportFolderPath` 31661 /// could contain old minidump files that are not associated with a specific `ProcessFailed` event. 31662 /// \snippet AppWindow.cpp GetFailureReportFolder 31663 @(" propget") 31664 HRESULT get_FailureReportFolderPath(@("out, retval") LPWSTR* value); 31665 } 31666 31667 /// A continuation of the ICoreWebView2Environment interface for creating shared buffer object. 31668 const GUID IID_ICoreWebView2Environment12 = ICoreWebView2Environment12.iid; 31669 31670 interface ICoreWebView2Environment12 : ICoreWebView2Environment11 31671 { 31672 static const GUID iid = { 0xF503DB9B,0x739F,0x48DD,[ 0xB1,0x51,0xFD,0xFC,0xF2,0x53,0xF5,0x4E ] }; 31673 /// Create a shared memory based buffer with the specified size in bytes. 31674 /// The buffer can be shared with web contents in WebView by calling 31675 /// `PostSharedBufferToScript` on `CoreWebView2` or `CoreWebView2Frame` object. 31676 /// Once shared, the same content of the buffer will be accessible from both 31677 /// the app process and script in WebView. Modification to the content will be visible 31678 /// to all parties that have access to the buffer. 31679 /// The shared buffer is presented to the script as ArrayBuffer. All JavaScript APIs 31680 /// that work for ArrayBuffer including Atomics APIs can be used on it. 31681 /// There is currently a limitation that only size less than 2GB is supported. 31682 HRESULT CreateSharedBuffer( 31683 in UINT64 size, 31684 @("out, retval") ICoreWebView2SharedBuffer * shared_buffer); 31685 } 31686 31687 /// Receives the `WebView2Environment` created using 31688 /// `CreateCoreWebView2Environment`. 31689 const GUID IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler.iid; 31690 31691 interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler : IUnknown 31692 { 31693 static const GUID iid = { 0x4e8a3389,0xc9d8,0x4bd2,[ 0xb6,0xb5,0x12,0x4f,0xee,0x6c,0xc1,0x4d ] }; 31694 31695 /// Provides the completion status and result of the corresponding 31696 /// asynchronous method. 31697 31698 HRESULT Invoke(HRESULT errorCode, ICoreWebView2Environment createdEnvironment); 31699 } 31700 31701 /// A Receiver is created for a particular DevTools Protocol event and allows 31702 /// you to subscribe and unsubscribe from that event. Obtained from the 31703 /// WebView object using `GetDevToolsProtocolEventReceiver`. 31704 const GUID IID_ICoreWebView2DevToolsProtocolEventReceiver = ICoreWebView2DevToolsProtocolEventReceiver.iid; 31705 31706 interface ICoreWebView2DevToolsProtocolEventReceiver : IUnknown 31707 { 31708 static const GUID iid = { 0xb32ca51a,0x8371,0x45e9,[ 0x93,0x17,0xaf,0x02,0x1d,0x08,0x03,0x67 ] }; 31709 31710 /// Subscribe to a `DevToolsProtocol` event. The `Invoke` method of the 31711 /// `handler` runs whenever the corresponding `DevToolsProtocol` event runs. 31712 /// `Invoke` runs with an event args object containing the parameter object 31713 /// of the DevTools Protocol event as a JSON string. 31714 /// 31715 /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived 31716 31717 HRESULT add_DevToolsProtocolEventReceived( 31718 /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventHandler handler, 31719 @("out") EventRegistrationToken* token); 31720 31721 /// Remove an event handler previously added with 31722 /// `add_DevToolsProtocolEventReceived`. 31723 31724 HRESULT remove_DevToolsProtocolEventReceived( 31725 in EventRegistrationToken token); 31726 } 31727 31728 /// A continuation of the ICoreWebView2Environment interface for getting process 31729 /// with associated information. 31730 const GUID IID_ICoreWebView2Environment13 = ICoreWebView2Environment13.iid; 31731 31732 interface ICoreWebView2Environment13 : ICoreWebView2Environment12 31733 { 31734 static const GUID iid = { 0xaf641f58,0x72b2,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 31735 /// Gets a snapshot collection of `ProcessExtendedInfo`s corresponding to all 31736 /// currently running processes associated with this `CoreWebView2Environment` 31737 /// excludes crashpad process. 31738 /// This provides the same list of `ProcessInfo`s as what's provided in 31739 /// `GetProcessInfos`, but additionally provides a list of associated `FrameInfo`s 31740 /// which are actively running (showing or hiding UI elements) in the renderer 31741 /// process. See `AssociatedFrameInfos` for more information. 31742 /// 31743 /// \snippet ProcessComponent.cpp GetProcessExtendedInfos 31744 HRESULT GetProcessExtendedInfos(/+[in]+/ ICoreWebView2GetProcessExtendedInfosCompletedHandler handler); 31745 } 31746 31747 /// Receives the result of the `GetProcessExtendedInfos` method. 31748 /// The result is written to the collection of `ProcessExtendedInfo`s provided 31749 /// in the `GetProcessExtendedInfos` method call. 31750 const GUID IID_ICoreWebView2GetProcessExtendedInfosCompletedHandler = ICoreWebView2GetProcessExtendedInfosCompletedHandler.iid; 31751 31752 interface ICoreWebView2GetProcessExtendedInfosCompletedHandler : IUnknown 31753 { 31754 static const GUID iid = { 0xf45e55aa,0x3bc2,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 31755 /// Provides the process extended info list for the `GetProcessExtendedInfos`. 31756 HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2ProcessExtendedInfoCollection value); 31757 } 31758 31759 /// Provides process with associated extended information in the `ICoreWebView2Environment`. 31760 const GUID IID_ICoreWebView2ProcessExtendedInfo = ICoreWebView2ProcessExtendedInfo.iid; 31761 31762 interface ICoreWebView2ProcessExtendedInfo : IUnknown 31763 { 31764 static const GUID iid = { 0xaf4c4c2e,0x45db,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 31765 /// The process info of the current process. 31766 @(" propget") 31767 HRESULT get_ProcessInfo( 31768 @("out, retval") ICoreWebView2ProcessInfo * processInfo); 31769 31770 /// The collection of associated `FrameInfo`s which are actively running 31771 /// (showing or hiding UI elements) in this renderer process. `AssociatedFrameInfos` 31772 /// will only be populated when this `CoreWebView2ProcessExtendedInfo` 31773 /// corresponds to a renderer process. Non-renderer processes will always 31774 /// have an empty `AssociatedFrameInfos`. The `AssociatedFrameInfos` may 31775 /// also be empty for renderer processes that have no active frames. 31776 /// 31777 /// \snippet ProcessComponent.cpp AssociatedFrameInfos 31778 @(" propget") 31779 HRESULT get_AssociatedFrameInfos( 31780 @("out, retval") ICoreWebView2FrameInfoCollection * frames); 31781 } 31782 31783 /// A list containing processInfo and associated extended information. 31784 const GUID IID_ICoreWebView2ProcessExtendedInfoCollection = ICoreWebView2ProcessExtendedInfoCollection.iid; 31785 31786 interface ICoreWebView2ProcessExtendedInfoCollection : IUnknown 31787 { 31788 static const GUID iid = { 0x32efa696,0x407a,0x11ee,[ 0xbe,0x56,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 31789 /// The number of process contained in the `ICoreWebView2ProcessExtendedInfoCollection`. 31790 @(" propget") 31791 HRESULT get_Count(@("out, retval") UINT* count); 31792 31793 /// Gets the `ICoreWebView2ProcessExtendedInfo` located in the 31794 /// `ICoreWebView2ProcessExtendedInfoCollection` at the given index. 31795 HRESULT GetValueAtIndex(in UINT32 index, 31796 @("out, retval") ICoreWebView2ProcessExtendedInfo * processInfo); 31797 } 31798 31799 /// ICoreWebView2Frame provides direct access to the iframes information. 31800 /// You can get an ICoreWebView2Frame by handling the ICoreWebView2_4::add_FrameCreated event. 31801 const GUID IID_ICoreWebView2Frame = ICoreWebView2Frame.iid; 31802 31803 interface ICoreWebView2Frame : IUnknown 31804 { 31805 static const GUID iid = { 0xf1131a5e,0x9ba9,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 31806 /// The name of the iframe from the iframe html tag declaring it. 31807 /// You can access this property even if the iframe is destroyed. 31808 /// 31809 /// The caller must free the returned string with `CoTaskMemFree`. See 31810 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 31811 @(" propget") 31812 HRESULT get_Name(@(" out, retval ") LPWSTR * name); 31813 /// Raised when the iframe changes its window.name property. 31814 HRESULT add_NameChanged( 31815 /+[in]+/ ICoreWebView2FrameNameChangedEventHandler eventHandler, 31816 @("out") EventRegistrationToken * token); 31817 /// Remove an event handler previously added with add_NameChanged. 31818 HRESULT remove_NameChanged(in EventRegistrationToken token); 31819 31820 /// Add the provided host object to script running in the iframe with the 31821 /// specified name for the list of the specified origins. The host object 31822 /// will be accessible for this iframe only if the iframe's origin during 31823 /// access matches one of the origins which are passed. The provided origins 31824 /// will be normalized before comparing to the origin of the document. 31825 /// So the scheme name is made lower case, the host will be punycode decoded 31826 /// as appropriate, default port values will be removed, and so on. 31827 /// This means the origin's host may be punycode encoded or not and will match 31828 /// regardless. If list contains malformed origin the call will fail. 31829 /// The method can be called multiple times in a row without calling 31830 /// RemoveHostObjectFromScript for the same object name. It will replace 31831 /// the previous object with the new object and new list of origins. 31832 /// List of origins will be treated as following: 31833 /// 1. empty list - call will succeed and object will be added for the iframe 31834 /// but it will not be exposed to any origin; 31835 /// 2. list with origins - during access to host object from iframe the 31836 /// origin will be checked that it belongs to this list; 31837 /// 3. list with "*" element - host object will be available for iframe for 31838 /// all origins. We suggest not to use this feature without understanding 31839 /// security implications of giving access to host object from from iframes 31840 /// with unknown origins. 31841 /// 4. list with "file://" element - host object will be available for iframes 31842 /// loaded via file protocol. 31843 /// Calling this method fails if it is called after the iframe is destroyed. 31844 /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScriptWithOrigins 31845 /// For more information about host objects navigate to 31846 /// ICoreWebView2::AddHostObjectToScript. 31847 HRESULT AddHostObjectToScriptWithOrigins( 31848 in LPCWSTR name, 31849 in VARIANT * object, 31850 in UINT32 originsCount, 31851 @(" size_is (originsCount)") in LPCWSTR * origins); 31852 /// Remove the host object specified by the name so that it is no longer 31853 /// accessible from JavaScript code in the iframe. While new access 31854 /// attempts are denied, if the object is already obtained by JavaScript code 31855 /// in the iframe, the JavaScript code continues to have access to that 31856 /// object. Calling this method for a name that is already removed or was 31857 /// never added fails. If the iframe is destroyed this method will return fail 31858 /// also. 31859 HRESULT RemoveHostObjectFromScript(in LPCWSTR name); 31860 31861 /// The Destroyed event is raised when the iframe corresponding 31862 /// to this CoreWebView2Frame object is removed or the document 31863 /// containing that iframe is destroyed. 31864 HRESULT add_Destroyed( 31865 /+[in]+/ ICoreWebView2FrameDestroyedEventHandler eventHandler, 31866 @("out") EventRegistrationToken * token); 31867 /// Remove an event handler previously added with add_Destroyed. 31868 HRESULT remove_Destroyed(in EventRegistrationToken token); 31869 /// Check whether a frame is destroyed. Returns true during 31870 /// the Destroyed event. 31871 HRESULT IsDestroyed(@(" out, retval ") BOOL * destroyed); 31872 } 31873 31874 /// A continuation of the ICoreWebView2Frame interface with navigation events, 31875 /// executing script and posting web messages. 31876 const GUID IID_ICoreWebView2Frame2 = ICoreWebView2Frame2.iid; 31877 31878 interface ICoreWebView2Frame2 : ICoreWebView2Frame 31879 { 31880 static const GUID iid = { 0x7a6a5834,0xd185,0x4dbf,[ 0xb6,0x3f,0x4a,0x9b,0xc4,0x31,0x07,0xd4 ] }; 31881 /// Add an event handler for the `NavigationStarting` event. 31882 /// A frame navigation will raise a `NavigationStarting` event and 31883 /// a `CoreWebView2.FrameNavigationStarting` event. All of the 31884 /// `FrameNavigationStarting` event handlers for the current frame will be 31885 /// run before the `NavigationStarting` event handlers. All of the event handlers 31886 /// share a common `NavigationStartingEventArgs` object. Whichever event handler is 31887 /// last to change the `NavigationStartingEventArgs.Cancel` property will 31888 /// decide if the frame navigation will be cancelled. Redirects raise this 31889 /// event as well, and the navigation id is the same as the original one. 31890 /// 31891 /// Navigations will be blocked until all `NavigationStarting` and 31892 /// `CoreWebView2.FrameNavigationStarting` event handlers return. 31893 HRESULT add_NavigationStarting( 31894 /+[in]+/ ICoreWebView2FrameNavigationStartingEventHandler eventHandler, 31895 @("out") EventRegistrationToken* token); 31896 31897 /// Remove an event handler previously added with `add_NavigationStarting`. 31898 HRESULT remove_NavigationStarting( 31899 in EventRegistrationToken token); 31900 31901 /// Add an event handler for the `ContentLoading` event. `ContentLoading` 31902 /// triggers before any content is loaded, including scripts added with 31903 /// `AddScriptToExecuteOnDocumentCreated`. `ContentLoading` does not trigger 31904 /// if a same page navigation occurs (such as through `fragment` 31905 /// navigations or `history.pushState` navigations). This operation 31906 /// follows the `NavigationStarting` and precedes `NavigationCompleted` events. 31907 HRESULT add_ContentLoading( 31908 /+[in]+/ ICoreWebView2FrameContentLoadingEventHandler eventHandler, 31909 @("out") EventRegistrationToken* token); 31910 31911 /// Remove an event handler previously added with `add_ContentLoading`. 31912 HRESULT remove_ContentLoading( 31913 in EventRegistrationToken token); 31914 31915 /// Add an event handler for the `NavigationCompleted` event. 31916 /// `NavigationCompleted` runs when the CoreWebView2Frame has completely 31917 /// loaded (concurrently when `body.onload` runs) or loading stopped with error. 31918 HRESULT add_NavigationCompleted( 31919 /+[in]+/ ICoreWebView2FrameNavigationCompletedEventHandler 31920 eventHandler, 31921 @("out") EventRegistrationToken* token); 31922 31923 /// Remove an event handler previously added with `add_NavigationCompleted`. 31924 HRESULT remove_NavigationCompleted( 31925 in EventRegistrationToken token); 31926 31927 /// Add an event handler for the DOMContentLoaded event. 31928 /// DOMContentLoaded is raised when the iframe html document has been parsed. 31929 /// This aligns with the document's DOMContentLoaded event in html. 31930 HRESULT add_DOMContentLoaded( 31931 /+[in]+/ ICoreWebView2FrameDOMContentLoadedEventHandler eventHandler, 31932 @("out") EventRegistrationToken* token); 31933 /// Remove an event handler previously added with add_DOMContentLoaded. 31934 HRESULT remove_DOMContentLoaded( 31935 in EventRegistrationToken token); 31936 31937 /// Run JavaScript code from the javascript parameter in the current frame. 31938 /// The result of evaluating the provided JavaScript is passed to the completion handler. 31939 /// The result value is a JSON encoded string. If the result is undefined, 31940 /// contains a reference cycle, or otherwise is not able to be encoded into 31941 /// JSON, then the result is considered to be null, which is encoded 31942 /// in JSON as the string "null". 31943 /// 31944 /// \> [!NOTE]\n\> A function that has no explicit return value returns undefined. If the 31945 /// script that was run throws an unhandled exception, then the result is 31946 /// also "null". This method is applied asynchronously. If the method is 31947 /// run before `ContentLoading`, the script will not be executed 31948 /// and the string "null" will be returned. 31949 /// This operation executes the script even if `ICoreWebView2Settings::IsScriptEnabled` is 31950 /// set to `FALSE`. 31951 /// 31952 /// \snippet ScenarioDOMContentLoaded.cpp ExecuteScriptFrame 31953 HRESULT ExecuteScript( 31954 in LPCWSTR javaScript, 31955 /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler); 31956 31957 /// Posts the specified webMessage to the frame. 31958 /// The frame receives the message by subscribing to the `message` event of 31959 /// the `window.chrome.webview` of the frame document. 31960 /// 31961 /// ```cpp 31962 /// window.chrome.webview.addEventListener('message', handler) 31963 /// window.chrome.webview.removeEventListener('message', handler) 31964 /// ``` 31965 /// 31966 /// The event args is an instances of `MessageEvent`. The 31967 /// `ICoreWebView2Settings::IsWebMessageEnabled` setting must be `TRUE` or 31968 /// the message will not be sent. The `data` property of the event 31969 /// args is the `webMessage` string parameter parsed as a JSON string into a 31970 /// JavaScript object. The `source` property of the event args is a reference 31971 /// to the `window.chrome.webview` object. For information about sending 31972 /// messages from the HTML document in the WebView to the host, navigate to 31973 /// [add_WebMessageReceived](/microsoft-edge/webview2/reference/win32/icorewebview2#add_webmessagereceived). 31974 /// The message is delivered asynchronously. If a navigation occurs before the 31975 /// message is posted to the page, the message is discarded. 31976 HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson); 31977 31978 /// Posts a message that is a simple string rather than a JSON string 31979 /// representation of a JavaScript object. This behaves in exactly the same 31980 /// manner as `PostWebMessageAsJson`, but the `data` property of the event 31981 /// args of the `window.chrome.webview` message is a string with the same 31982 /// value as `webMessageAsString`. Use this instead of 31983 /// `PostWebMessageAsJson` if you want to communicate using simple strings 31984 /// rather than JSON objects. 31985 HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString); 31986 31987 /// Add an event handler for the `WebMessageReceived` event. 31988 /// `WebMessageReceived` runs when the 31989 /// `ICoreWebView2Settings::IsWebMessageEnabled` setting is set and the 31990 /// frame document runs `window.chrome.webview.postMessage`. 31991 /// The `postMessage` function is `void postMessage(object)` 31992 /// where object is any object supported by JSON conversion. 31993 /// 31994 /// \snippet assets\ScenarioWebMessage.html chromeWebView 31995 /// 31996 /// When the frame calls `postMessage`, the object parameter is converted to a 31997 /// JSON string and is posted asynchronously to the host process. This will 31998 /// result in the handlers `Invoke` method being called with the JSON string 31999 /// as its parameter. 32000 /// 32001 /// \snippet ScenarioWebMessage.cpp WebMessageReceivedIFrame 32002 HRESULT add_WebMessageReceived( 32003 /+[in]+/ ICoreWebView2FrameWebMessageReceivedEventHandler 32004 handler, 32005 @("out") EventRegistrationToken * token); 32006 32007 /// Remove an event handler previously added with `add_WebMessageReceived`. 32008 HRESULT remove_WebMessageReceived(in EventRegistrationToken token); 32009 } 32010 32011 /// Receives `FrameCreated` event. 32012 const GUID IID_ICoreWebView2FrameCreatedEventHandler = ICoreWebView2FrameCreatedEventHandler.iid; 32013 32014 interface ICoreWebView2FrameCreatedEventHandler : IUnknown 32015 { 32016 static const GUID iid = { 0x38059770,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 32017 /// Provides the result for the iframe created event. 32018 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, 32019 /+[in]+/ ICoreWebView2FrameCreatedEventArgs args); 32020 } 32021 32022 /// Receives `FrameNameChanged` event. 32023 const GUID IID_ICoreWebView2FrameNameChangedEventHandler = ICoreWebView2FrameNameChangedEventHandler.iid; 32024 32025 interface ICoreWebView2FrameNameChangedEventHandler : IUnknown 32026 { 32027 static const GUID iid = { 0x435c7dc8,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 32028 /// Provides the result for the iframe name changed event. 32029 /// No event args exist and the `args` parameter is set to `null`. 32030 HRESULT Invoke(/+[in]+/ ICoreWebView2Frame sender, /+[in]+/ IUnknown args); 32031 } 32032 32033 /// Receives `NavigationStarting` events for iframe. 32034 const GUID IID_ICoreWebView2FrameNavigationStartingEventHandler = ICoreWebView2FrameNavigationStartingEventHandler.iid; 32035 32036 interface ICoreWebView2FrameNavigationStartingEventHandler : IUnknown 32037 { 32038 static const GUID iid = { 0xe79908bf,0x2d5d,0x4968,[ 0x83,0xdb,0x26,0x3f,0xea,0x2c,0x1d,0xa3 ] }; 32039 /// Provides the event args for the corresponding event. 32040 HRESULT Invoke( 32041 /+[in]+/ ICoreWebView2Frame sender, 32042 /+[in]+/ ICoreWebView2NavigationStartingEventArgs args); 32043 } 32044 32045 /// Receives `ContentLoading` events for iframe. 32046 const GUID IID_ICoreWebView2FrameContentLoadingEventHandler = ICoreWebView2FrameContentLoadingEventHandler.iid; 32047 32048 interface ICoreWebView2FrameContentLoadingEventHandler : IUnknown 32049 { 32050 static const GUID iid = { 0x0d6156f2,0xd332,0x49a7,[ 0x9e,0x03,0x7d,0x8f,0x2f,0xee,0xee,0x54 ] }; 32051 /// Provides the event args for the corresponding event. 32052 HRESULT Invoke( 32053 /+[in]+/ ICoreWebView2Frame sender, 32054 /+[in]+/ ICoreWebView2ContentLoadingEventArgs args); 32055 } 32056 32057 /// Receives `NavigationCompleted` events for iframe. 32058 const GUID IID_ICoreWebView2FrameNavigationCompletedEventHandler = ICoreWebView2FrameNavigationCompletedEventHandler.iid; 32059 32060 interface ICoreWebView2FrameNavigationCompletedEventHandler : IUnknown 32061 { 32062 static const GUID iid = { 0x609302ad,0x0e36,0x4f9a,[ 0xa2,0x10,0x6a,0x45,0x27,0x28,0x42,0xa9 ] }; 32063 /// Provides the event args for the corresponding event. 32064 HRESULT Invoke( 32065 /+[in]+/ ICoreWebView2Frame sender, 32066 /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args); 32067 } 32068 32069 /// Receives `DOMContentLoaded` events for iframe. 32070 const GUID IID_ICoreWebView2FrameDOMContentLoadedEventHandler = ICoreWebView2FrameDOMContentLoadedEventHandler.iid; 32071 32072 interface ICoreWebView2FrameDOMContentLoadedEventHandler : IUnknown 32073 { 32074 static const GUID iid = { 0x38d9520d,0x340f,0x4d1e,[ 0xa7,0x75,0x43,0xfc,0xe9,0x75,0x36,0x83 ] }; 32075 /// Provides the event args for the corresponding event. 32076 HRESULT Invoke( 32077 /+[in]+/ ICoreWebView2Frame sender, 32078 /+[in]+/ ICoreWebView2DOMContentLoadedEventArgs args); 32079 } 32080 32081 /// Receives `WebMessageReceived` events for iframe. 32082 const GUID IID_ICoreWebView2FrameWebMessageReceivedEventHandler = ICoreWebView2FrameWebMessageReceivedEventHandler.iid; 32083 32084 interface ICoreWebView2FrameWebMessageReceivedEventHandler : IUnknown 32085 { 32086 static const GUID iid = { 0xe371e005,0x6d1d,0x4517,[ 0x93,0x4b,0xa8,0xf1,0x62,0x9c,0x62,0xa5 ] }; 32087 /// Provides the event args for the corresponding event. 32088 HRESULT Invoke( 32089 /+[in]+/ ICoreWebView2Frame sender, 32090 /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args); 32091 } 32092 32093 /// Event args for the `FrameCreated` events. 32094 const GUID IID_ICoreWebView2FrameCreatedEventArgs = ICoreWebView2FrameCreatedEventArgs.iid; 32095 32096 interface ICoreWebView2FrameCreatedEventArgs : IUnknown 32097 { 32098 static const GUID iid = { 0x4d6e7b5e,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 32099 /// The frame which was created. 32100 @(" propget") 32101 HRESULT get_Frame(@(" out, retval ") ICoreWebView2Frame *frame); 32102 } 32103 32104 /// Receives `FrameDestroyed` event. 32105 const GUID IID_ICoreWebView2FrameDestroyedEventHandler = ICoreWebView2FrameDestroyedEventHandler.iid; 32106 32107 interface ICoreWebView2FrameDestroyedEventHandler : IUnknown 32108 { 32109 static const GUID iid = { 0x59dd7b4c,0x9baa,0x11eb,[ 0xa8,0xb3,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 32110 /// Provides the result for the iframe destroyed event. 32111 /// No event args exist and the `args` parameter is set to `null`. 32112 HRESULT Invoke(/+[in]+/ ICoreWebView2Frame sender, /+[in]+/ IUnknown args); 32113 } 32114 32115 /// Add an event handler for the `DownloadStarting` event. 32116 const GUID IID_ICoreWebView2DownloadStartingEventHandler = ICoreWebView2DownloadStartingEventHandler.iid; 32117 32118 interface ICoreWebView2DownloadStartingEventHandler : IUnknown 32119 { 32120 static const GUID iid = { 0xefedc989,0xc396,0x41ca,[ 0x83,0xf7,0x07,0xf8,0x45,0xa5,0x57,0x24 ] }; 32121 /// Provides the event args for the corresponding event. 32122 HRESULT Invoke( 32123 /+[in]+/ ICoreWebView2 sender, 32124 /+[in]+/ ICoreWebView2DownloadStartingEventArgs args); 32125 } 32126 32127 /// Event args for the `DownloadStarting` event. 32128 const GUID IID_ICoreWebView2DownloadStartingEventArgs = ICoreWebView2DownloadStartingEventArgs.iid; 32129 32130 interface ICoreWebView2DownloadStartingEventArgs : IUnknown 32131 { 32132 static const GUID iid = { 0xe99bbe21,0x43e9,0x4544,[ 0xa7,0x32,0x28,0x27,0x64,0xea,0xfa,0x60 ] }; 32133 /// Returns the `ICoreWebView2DownloadOperation` for the download that 32134 /// has started. 32135 @(" propget") 32136 HRESULT get_DownloadOperation( 32137 @("out, retval") ICoreWebView2DownloadOperation * downloadOperation); 32138 32139 /// The host may set this flag to cancel the download. If canceled, the 32140 /// download save dialog is not displayed regardless of the 32141 /// `Handled` property. 32142 @(" propget") 32143 HRESULT get_Cancel(@("out, retval") BOOL* cancel); 32144 32145 /// Sets the `Cancel` property. 32146 @(" propput") 32147 HRESULT put_Cancel(in BOOL cancel); 32148 32149 /// The path to the file. If setting the path, the host should ensure that it 32150 /// is an absolute path, including the file name, and that the path does not 32151 /// point to an existing file. If the path points to an existing file, the 32152 /// file will be overwritten. If the directory does not exist, it is created. 32153 /// 32154 /// The caller must free the returned string with `CoTaskMemFree`. See 32155 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32156 @(" propget") 32157 HRESULT get_ResultFilePath(@("out, retval") LPWSTR* resultFilePath); 32158 32159 /// Sets the `ResultFilePath` property. 32160 @(" propput") 32161 HRESULT put_ResultFilePath(in LPCWSTR resultFilePath); 32162 32163 /// The host may set this flag to `TRUE` to hide the default download dialog 32164 /// for this download. The download will progress as normal if it is not 32165 /// canceled, there will just be no default UI shown. By default the value is 32166 /// `FALSE` and the default download dialog is shown. 32167 @(" propget") 32168 HRESULT get_Handled(@("out, retval") BOOL* handled); 32169 32170 /// Sets the `Handled` property. 32171 @(" propput") 32172 HRESULT put_Handled(in BOOL handled); 32173 32174 /// Returns an `ICoreWebView2Deferral` object. Use this operation to 32175 /// complete the event at a later time. 32176 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 32177 } 32178 32179 /// Implements the interface to receive `BytesReceivedChanged` event. Use the 32180 /// `ICoreWebView2DownloadOperation.BytesReceived` property to get the received 32181 /// bytes count. 32182 const GUID IID_ICoreWebView2BytesReceivedChangedEventHandler = ICoreWebView2BytesReceivedChangedEventHandler.iid; 32183 32184 interface ICoreWebView2BytesReceivedChangedEventHandler : IUnknown 32185 { 32186 static const GUID iid = { 0x828e8ab6,0xd94c,0x4264,[ 0x9c,0xef,0x52,0x17,0x17,0x0d,0x62,0x51 ] }; 32187 /// Provides the event args for the corresponding event. No event args exist 32188 /// and the `args` parameter is set to `null`. 32189 HRESULT Invoke( 32190 /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args); 32191 } 32192 32193 /// Implements the interface to receive `EstimatedEndTimeChanged` event. Use the 32194 /// `ICoreWebView2DownloadOperation.EstimatedEndTime` property to get the new 32195 /// estimated end time. 32196 const GUID IID_ICoreWebView2EstimatedEndTimeChangedEventHandler = ICoreWebView2EstimatedEndTimeChangedEventHandler.iid; 32197 32198 interface ICoreWebView2EstimatedEndTimeChangedEventHandler : IUnknown 32199 { 32200 static const GUID iid = { 0x28f0d425,0x93fe,0x4e63,[ 0x9f,0x8d,0x2a,0xee,0xc6,0xd3,0xba,0x1e ] }; 32201 /// Provides the event args for the corresponding event. No event args exist 32202 /// and the `args` parameter is set to `null`. 32203 HRESULT Invoke( 32204 /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args); 32205 } 32206 32207 /// Implements the interface to receive `StateChanged` event. Use the 32208 /// `ICoreWebView2DownloadOperation.State` property to get the current state, 32209 /// which can be in progress, interrupted, or completed. Use the 32210 /// `ICoreWebView2DownloadOperation.InterruptReason` property to get the 32211 /// interrupt reason if the download is interrupted. 32212 const GUID IID_ICoreWebView2StateChangedEventHandler = ICoreWebView2StateChangedEventHandler.iid; 32213 32214 interface ICoreWebView2StateChangedEventHandler : IUnknown 32215 { 32216 static const GUID iid = { 0x81336594,0x7ede,0x4ba9,[ 0xbf,0x71,0xac,0xf0,0xa9,0x5b,0x58,0xdd ] }; 32217 /// Provides the event args for the corresponding event. No event args exist 32218 /// and the `args` parameter is set to `null`. 32219 HRESULT Invoke( 32220 /+[in]+/ ICoreWebView2DownloadOperation sender, /+[in]+/ IUnknown args); 32221 } 32222 32223 /// Represents a download operation. Gives access to the download's metadata 32224 /// and supports a user canceling, pausing, or resuming the download. 32225 const GUID IID_ICoreWebView2DownloadOperation = ICoreWebView2DownloadOperation.iid; 32226 32227 interface ICoreWebView2DownloadOperation : IUnknown 32228 { 32229 static const GUID iid = { 0x3d6b6cf2,0xafe1,0x44c7,[ 0xa9,0x95,0xc6,0x51,0x17,0x71,0x43,0x36 ] }; 32230 /// Add an event handler for the `BytesReceivedChanged` event. 32231 /// 32232 /// \snippet ScenarioCustomDownloadExperience.cpp BytesReceivedChanged 32233 HRESULT add_BytesReceivedChanged( 32234 /+[in]+/ ICoreWebView2BytesReceivedChangedEventHandler eventHandler, 32235 @("out") EventRegistrationToken* token); 32236 32237 /// Remove an event handler previously added with `add_BytesReceivedChanged`. 32238 HRESULT remove_BytesReceivedChanged( 32239 in EventRegistrationToken token); 32240 32241 /// Add an event handler for the `EstimatedEndTimeChanged` event. 32242 HRESULT add_EstimatedEndTimeChanged( 32243 /+[in]+/ ICoreWebView2EstimatedEndTimeChangedEventHandler eventHandler, 32244 @("out") EventRegistrationToken* token); 32245 32246 /// Remove an event handler previously added with `add_EstimatedEndTimeChanged`. 32247 HRESULT remove_EstimatedEndTimeChanged( 32248 in EventRegistrationToken token); 32249 32250 /// Add an event handler for the `StateChanged` event. 32251 /// 32252 /// \snippet ScenarioCustomDownloadExperience.cpp StateChanged 32253 HRESULT add_StateChanged( 32254 /+[in]+/ ICoreWebView2StateChangedEventHandler eventHandler, 32255 @("out") EventRegistrationToken* token); 32256 32257 /// Remove an event handler previously added with `add_StateChanged`. 32258 HRESULT remove_StateChanged( 32259 in EventRegistrationToken token); 32260 32261 /// The URI of the download. 32262 /// 32263 /// The caller must free the returned string with `CoTaskMemFree`. See 32264 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32265 @(" propget") 32266 HRESULT get_Uri(@("out, retval") LPWSTR* uri); 32267 32268 /// The Content-Disposition header value from the download's HTTP response. 32269 /// 32270 /// The caller must free the returned string with `CoTaskMemFree`. See 32271 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32272 @(" propget") 32273 HRESULT get_ContentDisposition(@("out, retval") LPWSTR* contentDisposition); 32274 32275 /// MIME type of the downloaded content. 32276 /// 32277 /// The caller must free the returned string with `CoTaskMemFree`. See 32278 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32279 @(" propget") 32280 HRESULT get_MimeType(@("out, retval") LPWSTR* mimeType); 32281 32282 /// The expected size of the download in total number of bytes based on the 32283 /// HTTP Content-Length header. Returns -1 if the size is unknown. 32284 @(" propget") 32285 HRESULT get_TotalBytesToReceive(@("out, retval") INT64* totalBytesToReceive); 32286 32287 /// The number of bytes that have been written to the download file. 32288 @(" propget") 32289 HRESULT get_BytesReceived(@("out, retval") INT64* bytesReceived); 32290 32291 /// The estimated end time in [ISO 8601 Date and Time Format](https://www.iso.org/iso-8601-date-and-time-format.html). 32292 /// 32293 /// The caller must free the returned string with `CoTaskMemFree`. See 32294 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32295 @(" propget") 32296 HRESULT get_EstimatedEndTime(@("out, retval") LPWSTR* estimatedEndTime); 32297 32298 /// The absolute path to the download file, including file name. Host can change 32299 /// this from `ICoreWebView2DownloadStartingEventArgs`. 32300 /// 32301 /// The caller must free the returned string with `CoTaskMemFree`. See 32302 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32303 @(" propget") 32304 HRESULT get_ResultFilePath(@("out, retval") LPWSTR* resultFilePath); 32305 32306 /// The state of the download. A download can be in progress, interrupted, or 32307 /// completed. See `COREWEBVIEW2_DOWNLOAD_STATE` for descriptions of states. 32308 @(" propget") 32309 HRESULT get_State(@("out, retval") COREWEBVIEW2_DOWNLOAD_STATE* downloadState); 32310 32311 /// The reason why connection with file host was broken. 32312 @(" propget") 32313 HRESULT get_InterruptReason( 32314 @("out, retval") COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON* interruptReason); 32315 32316 /// Cancels the download. If canceled, the default download dialog shows 32317 /// that the download was canceled. Host should set the `Cancel` property from 32318 /// `ICoreWebView2SDownloadStartingEventArgs` if the download should be 32319 /// canceled without displaying the default download dialog. 32320 HRESULT Cancel(); 32321 32322 /// Pauses the download. If paused, the default download dialog shows that the 32323 /// download is paused. No effect if download is already paused. Pausing a 32324 /// download changes the state to `COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED` 32325 /// with `InterruptReason` set to `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED`. 32326 HRESULT Pause(); 32327 32328 /// Resumes a paused download. May also resume a download that was interrupted 32329 /// for another reason, if `CanResume` returns true. Resuming a download changes 32330 /// the state from `COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED` to 32331 /// `COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS`. 32332 HRESULT Resume(); 32333 32334 /// Returns true if an interrupted download can be resumed. Downloads with 32335 /// the following interrupt reasons may automatically resume without you 32336 /// calling any methods: 32337 /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE`, 32338 /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH`, 32339 /// `COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT`. 32340 /// In these cases download progress may be restarted with `BytesReceived` 32341 /// reset to 0. 32342 @(" propget") 32343 HRESULT get_CanResume(@("out, retval") BOOL* canResume); 32344 } 32345 32346 /// A continuation of the `ICoreWebView2ProcessFailedEventArgs` interface. 32347 const GUID IID_ICoreWebView2ProcessFailedEventArgs2 = ICoreWebView2ProcessFailedEventArgs2.iid; 32348 32349 interface ICoreWebView2ProcessFailedEventArgs2 : ICoreWebView2ProcessFailedEventArgs 32350 { 32351 static const GUID iid = { 0x4dab9422,0x46fa,0x4c3e,[ 0xa5,0xd2,0x41,0xd2,0x07,0x1d,0x36,0x80 ] }; 32352 32353 /// The reason for the process failure. Some of the reasons are only 32354 /// applicable to specific values of 32355 /// `ICoreWebView2ProcessFailedEventArgs::ProcessFailedKind`, and the 32356 /// following `ProcessFailedKind` values always return the indicated reason 32357 /// value: 32358 /// 32359 /// ProcessFailedKind | Reason 32360 /// ---|--- 32361 /// COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED | COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED 32362 /// COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE | COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE 32363 /// 32364 /// For other `ProcessFailedKind` values, the reason may be any of the reason 32365 /// values. To learn about what these values mean, see 32366 /// `COREWEBVIEW2_PROCESS_FAILED_REASON`. 32367 @(" propget") 32368 HRESULT get_Reason( 32369 @("out, retval") COREWEBVIEW2_PROCESS_FAILED_REASON* reason); 32370 32371 /// The exit code of the failing process, for telemetry purposes. The exit 32372 /// code is always `STILL_ACTIVE` (`259`) when `ProcessFailedKind` is 32373 /// `COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE`. 32374 @(" propget") 32375 HRESULT get_ExitCode( 32376 @("out, retval") int* exitCode); 32377 32378 /// Description of the process assigned by the WebView2 Runtime. This is a 32379 /// technical English term appropriate for logging or development purposes, 32380 /// and not localized for the end user. It applies to utility processes (for 32381 /// example, "Audio Service", "Video Capture") and plugin processes (for 32382 /// example, "Flash"). The returned `processDescription` is empty if the 32383 /// WebView2 Runtime did not assign a description to the process. 32384 /// 32385 /// The caller must free the returned string with `CoTaskMemFree`. See 32386 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32387 @(" propget") 32388 HRESULT get_ProcessDescription( 32389 @("out, retval") LPWSTR* processDescription); 32390 32391 /// The collection of `FrameInfo`s for frames in the `ICoreWebView2` that were 32392 /// being rendered by the failed process. The content in these frames is 32393 /// replaced with an error page. 32394 /// This is only available when `ProcessFailedKind` is 32395 /// `COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED`; 32396 /// `frames` is `null` for all other process failure kinds, including the case 32397 /// in which the failed process was the renderer for the main frame and 32398 /// subframes within it, for which the failure kind is 32399 /// `COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED`. 32400 @(" propget") 32401 HRESULT get_FrameInfosForFailedProcess( 32402 @("out, retval") ICoreWebView2FrameInfoCollection * frames); 32403 } 32404 32405 /// Collection of `FrameInfo`s (name and source). Used to list the affected 32406 /// frames' info when a frame-only render process failure occurs in the 32407 /// `ICoreWebView2`. 32408 const GUID IID_ICoreWebView2FrameInfoCollection = ICoreWebView2FrameInfoCollection.iid; 32409 32410 interface ICoreWebView2FrameInfoCollection : IUnknown 32411 { 32412 static const GUID iid = { 0x8f834154,0xd38e,0x4d90,[ 0xaf,0xfb,0x68,0x00,0xa7,0x27,0x28,0x39 ] }; 32413 32414 /// Gets an iterator over the collection of `FrameInfo`s. 32415 32416 HRESULT GetIterator( 32417 @("out, retval") ICoreWebView2FrameInfoCollectionIterator * iterator); 32418 } 32419 32420 /// Iterator for a collection of `FrameInfo`s. For more info, see 32421 /// `ICoreWebView2ProcessFailedEventArgs2` and 32422 /// `ICoreWebView2FrameInfoCollection`. 32423 const GUID IID_ICoreWebView2FrameInfoCollectionIterator = ICoreWebView2FrameInfoCollectionIterator.iid; 32424 32425 interface ICoreWebView2FrameInfoCollectionIterator : IUnknown 32426 { 32427 static const GUID iid = { 0x1bf89e2d,0x1b2b,0x4629,[ 0xb2,0x8f,0x05,0x09,0x9b,0x41,0xbb,0x03 ] }; 32428 32429 /// `TRUE` when the iterator has not run out of `FrameInfo`s. If the 32430 /// collection over which the iterator is iterating is empty or if the 32431 /// iterator has gone past the end of the collection, then this is `FALSE`. 32432 32433 @(" propget") 32434 HRESULT get_HasCurrent(@("out, retval") BOOL* hasCurrent); 32435 32436 /// Get the current `ICoreWebView2FrameInfo` of the iterator. 32437 /// Returns `HRESULT_FROM_WIN32(ERROR_INVALID_INDEX)` if HasCurrent is 32438 /// `FALSE`. 32439 32440 HRESULT GetCurrent(@("out, retval") ICoreWebView2FrameInfo * frameInfo); 32441 32442 /// Move the iterator to the next `FrameInfo` in the collection. 32443 32444 HRESULT MoveNext(@("out, retval") BOOL* hasNext); 32445 } 32446 32447 /// Provides a set of properties for a frame in the `ICoreWebView2`. 32448 const GUID IID_ICoreWebView2FrameInfo = ICoreWebView2FrameInfo.iid; 32449 32450 interface ICoreWebView2FrameInfo : IUnknown 32451 { 32452 static const GUID iid = { 0xda86b8a1,0xbdf3,0x4f11,[ 0x99,0x55,0x52,0x8c,0xef,0xa5,0x97,0x27 ] }; 32453 32454 /// The name attribute of the frame, as in `<iframe name="frame-name" ...>`. 32455 /// The returned string is empty when the frame has no name attribute. 32456 /// 32457 /// The caller must free the returned string with `CoTaskMemFree`. See 32458 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32459 32460 @(" propget") 32461 HRESULT get_Name(@("out, retval") LPWSTR* name); 32462 32463 /// The URI of the document in the frame. 32464 /// 32465 /// The caller must free the returned string with `CoTaskMemFree`. See 32466 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32467 32468 @(" propget") 32469 HRESULT get_Source(@("out, retval") LPWSTR* source); 32470 } 32471 32472 /// A continuation of the ICoreWebView2FrameInfo interface that provides 32473 /// `ParentFrameInfo`, `FrameId` and `FrameKind` properties. 32474 const GUID IID_ICoreWebView2FrameInfo2 = ICoreWebView2FrameInfo2.iid; 32475 32476 interface ICoreWebView2FrameInfo2 : ICoreWebView2FrameInfo 32477 { 32478 static const GUID iid = { 0x56f85cfa,0x72c4,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 32479 /// This parent frame's `FrameInfo`. `ParentFrameInfo` will only be 32480 /// populated when obtained via calling 32481 ///`CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`. 32482 /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed` will 32483 /// always have a `null` `ParentFrameInfo`. This property is also `null` for the 32484 /// main frame in the WebView2 which has no parent frame. 32485 /// Note that this `ParentFrameInfo` could be out of date as it's a snapshot. 32486 @(" propget") 32487 HRESULT get_ParentFrameInfo(@("out, retval") ICoreWebView2FrameInfo * frameInfo); 32488 /// The unique identifier of the frame associated with the current `FrameInfo`. 32489 /// It's the same kind of ID as with the `FrameId` in `CoreWebView2` and via 32490 /// `CoreWebView2Frame`. `FrameId` will only be populated (non-zero) when obtained 32491 /// calling `CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`. 32492 /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed` will 32493 /// always have an invalid frame Id 0. 32494 /// Note that this `FrameId` could be out of date as it's a snapshot. 32495 /// If there's WebView2 created or destroyed or `FrameCreated/FrameDestroyed` events 32496 /// after the asynchronous call `CoreWebView2Environment.GetProcessExtendedInfos` 32497 /// starts, you may want to call asynchronous method again to get the updated `FrameInfo`s. 32498 @(" propget") 32499 HRESULT get_FrameId(@("out, retval") UINT32* id); 32500 /// The frame kind of the frame. `FrameKind` will only be populated when 32501 /// obtained calling `CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos`. 32502 /// `CoreWebView2FrameInfo` objects obtained via `CoreWebView2.ProcessFailed` 32503 /// will always have the default value `COREWEBVIEW2_FRAME_KIND_UNKNOWN`. 32504 /// Note that this `FrameKind` could be out of date as it's a snapshot. 32505 @(" propget") 32506 HRESULT get_FrameKind(@("out, retval") COREWEBVIEW2_FRAME_KIND* kind); 32507 } 32508 32509 /// Represents a Basic HTTP authentication response that contains a user name 32510 /// and a password as according to RFC7617 (https://tools.ietf.org/html/rfc7617) 32511 const GUID IID_ICoreWebView2BasicAuthenticationResponse = ICoreWebView2BasicAuthenticationResponse.iid; 32512 32513 interface ICoreWebView2BasicAuthenticationResponse : IUnknown 32514 { 32515 static const GUID iid = { 0x07023f7d,0x2d77,0x4d67,[ 0x90,0x40,0x6e,0x7d,0x42,0x8c,0x6a,0x40 ] }; 32516 /// User name provided for authentication. 32517 /// 32518 /// The caller must free the returned string with `CoTaskMemFree`. See 32519 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32520 @(" propget") 32521 HRESULT get_UserName(@("out, retval") LPWSTR* userName); 32522 /// Set user name property 32523 @(" propput") 32524 HRESULT put_UserName(in LPCWSTR userName); 32525 32526 /// Password provided for authentication. 32527 /// 32528 /// The caller must free the returned string with `CoTaskMemFree`. See 32529 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32530 @(" propget") 32531 HRESULT get_Password(@("out, retval") LPWSTR* password); 32532 /// Set password property 32533 @(" propput") 32534 HRESULT put_Password(in LPCWSTR password); 32535 } 32536 32537 /// Event args for the BasicAuthenticationRequested event. Will contain the 32538 /// request that led to the HTTP authorization challenge, the challenge 32539 /// and allows the host to provide authentication response or cancel the request. 32540 const GUID IID_ICoreWebView2BasicAuthenticationRequestedEventArgs = ICoreWebView2BasicAuthenticationRequestedEventArgs.iid; 32541 32542 interface ICoreWebView2BasicAuthenticationRequestedEventArgs : IUnknown 32543 { 32544 static const GUID iid = { 0xef05516f,0xd897,0x4f9e,[ 0xb6,0x72,0xd8,0xe2,0x30,0x7a,0x3f,0xb0 ] }; 32545 /// The URI that led to the authentication challenge. For proxy authentication 32546 /// requests, this will be the URI of the proxy server. 32547 /// 32548 /// The caller must free the returned string with `CoTaskMemFree`. See 32549 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32550 @(" propget") 32551 HRESULT get_Uri(@("out, retval") LPWSTR* value); 32552 32553 /// The authentication challenge string 32554 /// 32555 /// The caller must free the returned string with `CoTaskMemFree`. See 32556 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32557 @(" propget") 32558 HRESULT get_Challenge(@("out, retval") LPWSTR* challenge); 32559 32560 /// Response to the authentication request with credentials. This object will be populated by the app 32561 /// if the host would like to provide authentication credentials. 32562 @(" propget") 32563 HRESULT get_Response(@("out, retval") ICoreWebView2BasicAuthenticationResponse * response); 32564 32565 /// Cancel the authentication request. False by default. 32566 /// If set to true, Response will be ignored. 32567 @(" propget") 32568 HRESULT get_Cancel(@("out, retval") BOOL* cancel); 32569 /// Set the Cancel property. 32570 @(" propput") 32571 HRESULT put_Cancel(in BOOL cancel); 32572 32573 /// Returns an `ICoreWebView2Deferral` object. Use this deferral to 32574 /// defer the decision to show the Basic Authentication dialog. 32575 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 32576 } 32577 32578 /// Implements the interface to receive `IsDocumentPlayingAudioChanged` events. Use the 32579 /// IsDocumentPlayingAudio property to get the audio playing state. 32580 const GUID IID_ICoreWebView2IsDocumentPlayingAudioChangedEventHandler = ICoreWebView2IsDocumentPlayingAudioChangedEventHandler.iid; 32581 32582 interface ICoreWebView2IsDocumentPlayingAudioChangedEventHandler : IUnknown 32583 { 32584 static const GUID iid = { 0x5DEF109A,0x2F4B,0x49FA,[ 0xB7,0xF6,0x11,0xC3,0x9E,0x51,0x33,0x28 ] }; 32585 /// Provides the event args for the corresponding event. No event args exist 32586 /// and the `args` parameter is set to `null`. 32587 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 32588 } 32589 32590 /// Implements the interface to receive `IsMutedChanged` events. Use the 32591 /// IsMuted property to get the mute state. 32592 const GUID IID_ICoreWebView2IsMutedChangedEventHandler = ICoreWebView2IsMutedChangedEventHandler.iid; 32593 32594 interface ICoreWebView2IsMutedChangedEventHandler : IUnknown 32595 { 32596 static const GUID iid = { 0x57D90347,0xCD0E,0x4952,[ 0xA4,0xA2,0x74,0x83,0xA2,0x75,0x6F,0x08 ] }; 32597 /// Provides the event args for the corresponding event. No event args exist 32598 /// and the `args` parameter is set to `null`. 32599 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 32600 } 32601 32602 /// This is an extension of the ICoreWebView2Frame interface that supports PermissionRequested 32603 const GUID IID_ICoreWebView2Frame3 = ICoreWebView2Frame3.iid; 32604 32605 interface ICoreWebView2Frame3 : ICoreWebView2Frame2 32606 { 32607 static const GUID iid = { 0xb50d82cc,0xcc28,0x481d,[ 0x96,0x14,0xcb,0x04,0x88,0x95,0xe6,0xa0 ] }; 32608 /// Add an event handler for the `PermissionRequested` event. 32609 /// `PermissionRequested` is raised when content in an iframe any of its 32610 /// descendant iframes requests permission to privileged resources. 32611 /// 32612 /// This relates to the `PermissionRequested` event on the `CoreWebView2`. 32613 /// Both these events will be raised in the case of an iframe requesting 32614 /// permission. The `CoreWebView2Frame`'s event handlers will be invoked 32615 /// before the event handlers on the `CoreWebView2`. If the `Handled` property 32616 /// of the `PermissionRequestedEventArgs` is set to TRUE within the 32617 /// `CoreWebView2Frame` event handler, then the event will not be 32618 /// raised on the `CoreWebView2`, and it's event handlers will not be invoked. 32619 /// 32620 /// In the case of nested iframes, the 'PermissionRequested' event will 32621 /// be raised from the top level iframe. 32622 /// 32623 /// If a deferral is not taken on the event args, the subsequent scripts are 32624 /// blocked until the event handler returns. If a deferral is taken, the 32625 /// scripts are blocked until the deferral is completed. 32626 /// 32627 /// \snippet ScenarioIFrameDevicePermission.cpp PermissionRequested0 32628 /// \snippet ScenarioIFrameDevicePermission.cpp PermissionRequested1 32629 HRESULT add_PermissionRequested( 32630 /+[in]+/ ICoreWebView2FramePermissionRequestedEventHandler handler, 32631 @("out") EventRegistrationToken* token); 32632 32633 /// Remove an event handler previously added with `add_PermissionRequested` 32634 HRESULT remove_PermissionRequested( 32635 in EventRegistrationToken token); 32636 } 32637 32638 /// This is an extension of the ICoreWebView2Frame interface that supports shared buffer based on file mapping. 32639 const GUID IID_ICoreWebView2Frame4 = ICoreWebView2Frame4.iid; 32640 32641 interface ICoreWebView2Frame4 : ICoreWebView2Frame3 32642 { 32643 static const GUID iid = { 0x188782DC,0x92AA,0x4732,[ 0xAB,0x3C,0xFC,0xC5,0x9F,0x6F,0x68,0xB9 ] }; 32644 /// Share a shared buffer object with script of the iframe in the WebView. 32645 /// The script will receive a `sharedbufferreceived` event from chrome.webview. 32646 /// The event arg for that event will have the following methods and properties: 32647 /// `getBuffer()`: return an ArrayBuffer object with the backing content from the shared buffer. 32648 /// `additionalData`: an object as the result of parsing `additionalDataAsJson` as JSON string. 32649 /// This property will be `undefined` if `additionalDataAsJson` is nullptr or empty string. 32650 /// `source`: with a value set as `chrome.webview` object. 32651 /// If a string is provided as `additionalDataAsJson` but it is not a valid JSON string, 32652 /// the API will fail with `E_INVALIDARG`. 32653 /// If `access` is COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY, the script will only have read access to the buffer. 32654 /// If the script tries to modify the content in a read only buffer, it will cause an access 32655 /// violation in WebView renderer process and crash the renderer process. 32656 /// If the shared buffer is already closed, the API will fail with `RO_E_CLOSED`. 32657 /// 32658 /// The script code should call `chrome.webview.releaseBuffer` with 32659 /// the shared buffer as the parameter to release underlying resources as soon 32660 /// as it does not need access to the shared buffer any more. 32661 /// 32662 /// The application can post the same shared buffer object to multiple web pages or iframes, or 32663 /// post to the same web page or iframe multiple times. Each `PostSharedBufferToScript` will 32664 /// create a separate ArrayBuffer object with its own view of the memory and is separately 32665 /// released. The underlying shared memory will be released when all the views are released. 32666 /// 32667 /// For example, if we want to send data to script for one time read only consumption. 32668 /// 32669 /// \snippet ScenarioSharedBuffer.cpp OneTimeShareBuffer 32670 /// 32671 /// In the HTML document, 32672 /// 32673 /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_1 32674 /// 32675 /// \snippet assets\ScenarioSharedBuffer.html ShareBufferScriptCode_2 32676 /// 32677 /// Sharing a buffer to script has security risk. You should only share buffer with trusted site. 32678 /// If a buffer is shared to a untrusted site, possible sensitive information could be leaked. 32679 /// If a buffer is shared as modifiable by the script and the script modifies it in an unexpected way, 32680 /// it could result in corrupted data that might even crash the application. 32681 HRESULT PostSharedBufferToScript( 32682 /+[in]+/ ICoreWebView2SharedBuffer sharedBuffer, 32683 in COREWEBVIEW2_SHARED_BUFFER_ACCESS access, 32684 in LPCWSTR additionalDataAsJson); 32685 } 32686 32687 /// This is an extension of the ICoreWebView2Frame interface that provides the `FrameId` property. 32688 const GUID IID_ICoreWebView2Frame5 = ICoreWebView2Frame5.iid; 32689 32690 interface ICoreWebView2Frame5 : ICoreWebView2Frame4 32691 { 32692 static const GUID iid = { 0x99d199c4,0x7305,0x11ee,[ 0xb9,0x62,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 32693 /// The unique identifier of the current frame. It's the same kind of ID as 32694 /// with the `FrameId` in `CoreWebView2` and via `CoreWebView2FrameInfo`. 32695 @(" propget") 32696 HRESULT get_FrameId(@("out, retval") UINT32* id); 32697 } 32698 32699 /// Receives `PermissionRequested` events for iframes. 32700 const GUID IID_ICoreWebView2FramePermissionRequestedEventHandler = ICoreWebView2FramePermissionRequestedEventHandler.iid; 32701 32702 interface ICoreWebView2FramePermissionRequestedEventHandler : IUnknown 32703 { 32704 static const GUID iid = { 0x845d0edd,0x8bd8,0x429b,[ 0x99,0x15,0x48,0x21,0x78,0x9f,0x23,0xe9 ] }; 32705 /// Provides the event args for the corresponding event. 32706 HRESULT Invoke( 32707 /+[in]+/ ICoreWebView2Frame sender, 32708 /+[in]+/ ICoreWebView2PermissionRequestedEventArgs2 args); 32709 } 32710 32711 /// This is a continuation of the `ICoreWebView2PermissionRequestedEventArgs` interface. 32712 const GUID IID_ICoreWebView2PermissionRequestedEventArgs2 = ICoreWebView2PermissionRequestedEventArgs2.iid; 32713 32714 interface ICoreWebView2PermissionRequestedEventArgs2 : ICoreWebView2PermissionRequestedEventArgs 32715 { 32716 static const GUID iid = { 0x74d7127f,0x9de6,0x4200,[ 0x87,0x34,0x42,0xd6,0xfb,0x4f,0xf7,0x41 ] }; 32717 /// By default, both the `PermissionRequested` event handlers on the 32718 /// `CoreWebView2Frame` and the `CoreWebView2` will be invoked, with the 32719 /// `CoreWebView2Frame` event handlers invoked first. The host may 32720 /// set this flag to `TRUE` within the `CoreWebView2Frame` event handlers 32721 /// to prevent the remaining `CoreWebView2` event handlers from being invoked. 32722 /// 32723 /// If a deferral is taken on the event args, then you must synchronously 32724 /// set `Handled` to TRUE prior to taking your deferral to prevent the 32725 /// `CoreWebView2`s event handlers from being invoked. 32726 @(" propget") 32727 HRESULT get_Handled(@("out, retval") BOOL* handled); 32728 32729 /// Sets the `Handled` property. 32730 @(" propput") 32731 HRESULT put_Handled(in BOOL handled); 32732 } 32733 32734 /// Represents a context menu item of a context menu displayed by WebView. 32735 const GUID IID_ICoreWebView2ContextMenuItem = ICoreWebView2ContextMenuItem.iid; 32736 32737 interface ICoreWebView2ContextMenuItem : IUnknown 32738 { 32739 static const GUID iid = { 0x7aed49e3,0xa93f,0x497a,[ 0x81,0x1c,0x74,0x9c,0x6b,0x6b,0x6c,0x65 ] }; 32740 /// Gets the unlocalized name for the `ContextMenuItem`. Use this to 32741 /// distinguish between context menu item types. This will be the English 32742 /// label of the menu item in lower camel case. For example, the "Save as" 32743 /// menu item will be "saveAs". Extension menu items will be "extension", 32744 /// custom menu items will be "custom" and spellcheck items will be 32745 /// "spellCheck". 32746 /// Some example context menu item names are: 32747 /// - "saveAs" 32748 /// - "copyImage" 32749 /// - "openLinkInNewWindow" 32750 /// - "cut" 32751 /// - "copy" 32752 /// - "paste" 32753 /// 32754 /// The caller must free the returned string with `CoTaskMemFree`. See 32755 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32756 @(" propget") 32757 HRESULT get_Name(@("out, retval") LPWSTR* value); 32758 32759 /// Gets the localized label for the `ContextMenuItem`. Will contain an 32760 /// ampersand for characters to be used as keyboard accelerator. 32761 /// 32762 /// The caller must free the returned string with `CoTaskMemFree`. See 32763 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32764 @(" propget") 32765 HRESULT get_Label(@("out, retval") LPWSTR* value); 32766 32767 /// Gets the Command ID for the `ContextMenuItem`. Use this to report the 32768 /// `SelectedCommandId` in `ContextMenuRequested` event. 32769 @(" propget") 32770 HRESULT get_CommandId(@("out, retval") INT32* value); 32771 32772 /// Gets the localized keyboard shortcut for this ContextMenuItem. It will be 32773 /// the empty string if there is no keyboard shortcut. This is text intended 32774 /// to be displayed to the end user to show the keyboard shortcut. For example 32775 /// this property is Ctrl+Shift+I for the "Inspect" `ContextMenuItem`. 32776 /// 32777 /// The caller must free the returned string with `CoTaskMemFree`. See 32778 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32779 @(" propget") 32780 HRESULT get_ShortcutKeyDescription(@("out, retval") LPWSTR* value); 32781 32782 /// Gets the Icon for the `ContextMenuItem` in PNG, Bitmap or SVG formats in the form of an IStream. 32783 /// Stream will be rewound to the start of the image data. 32784 @(" propget") 32785 HRESULT get_Icon(@("out, retval") IStream** value); 32786 32787 /// Gets the `ContextMenuItem` kind. 32788 @(" propget") 32789 HRESULT get_Kind(@("out, retval") COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND* value); 32790 32791 /// Sets the enabled property of the `ContextMenuItem`. Must only be used in the case of a 32792 /// custom context menu item. The default value for this is `TRUE`. 32793 @(" propput") 32794 HRESULT put_IsEnabled(in BOOL value); 32795 32796 /// Gets the enabled property of the `ContextMenuItem`. 32797 @(" propget") 32798 HRESULT get_IsEnabled(@("out, retval") BOOL* value); 32799 32800 /// Sets the checked property of the `ContextMenuItem`. Must only be used for custom context 32801 /// menu items that are of kind Check box or Radio. 32802 @(" propput") 32803 HRESULT put_IsChecked(in BOOL value); 32804 32805 /// Gets the checked property of the `ContextMenuItem`, used if the kind is Check box or Radio. 32806 @(" propget") 32807 HRESULT get_IsChecked(@("out, retval") BOOL* value); 32808 32809 /// Gets the list of children menu items through a `ContextMenuItemCollection` 32810 /// if the kind is Submenu. If the kind is not submenu, will return null. 32811 @(" propget") 32812 HRESULT get_Children(@("out, retval") ICoreWebView2ContextMenuItemCollection * value); 32813 32814 /// Add an event handler for the `CustomItemSelected` event. 32815 /// `CustomItemSelected` event is raised when the user selects this `ContextMenuItem`. 32816 /// Will only be raised for end developer created context menu items 32817 HRESULT add_CustomItemSelected( 32818 /+[in]+/ ICoreWebView2CustomItemSelectedEventHandler eventHandler, 32819 @("out") EventRegistrationToken* token); 32820 32821 /// Remove an event handler previously added with `add_CustomItemSelected`. 32822 HRESULT remove_CustomItemSelected( 32823 in EventRegistrationToken token); 32824 } 32825 32826 /// Represents a collection of `ContextMenuItem` objects. Used to get, remove and add 32827 /// `ContextMenuItem` objects at the specified index. 32828 const GUID IID_ICoreWebView2ContextMenuItemCollection = ICoreWebView2ContextMenuItemCollection.iid; 32829 32830 interface ICoreWebView2ContextMenuItemCollection : IUnknown 32831 { 32832 static const GUID iid = { 0xf562a2f5,0xc415,0x45cf,[ 0xb9,0x09,0xd4,0xb7,0xc1,0xe2,0x76,0xd3 ] }; 32833 /// Gets the number of `ContextMenuItem` objects contained in the `ContextMenuItemCollection`. 32834 @(" propget") 32835 HRESULT get_Count(@("out, retval") UINT32* value); 32836 32837 /// Gets the `ContextMenuItem` at the specified index. 32838 HRESULT GetValueAtIndex(in UINT32 index, 32839 @("out, retval") ICoreWebView2ContextMenuItem * value); 32840 32841 /// Removes the `ContextMenuItem` at the specified index. 32842 HRESULT RemoveValueAtIndex(in UINT32 index); 32843 32844 /// Inserts the `ContextMenuItem` at the specified index. 32845 HRESULT InsertValueAtIndex( 32846 in UINT32 index, 32847 /+[in]+/ ICoreWebView2ContextMenuItem value); 32848 } 32849 32850 /// Receives `ContextMenuRequested` events. 32851 const GUID IID_ICoreWebView2ContextMenuRequestedEventHandler = ICoreWebView2ContextMenuRequestedEventHandler.iid; 32852 32853 interface ICoreWebView2ContextMenuRequestedEventHandler : IUnknown 32854 { 32855 static const GUID iid = { 0x04d3fe1d,0xab87,0x42fb,[ 0xa8,0x98,0xda,0x24,0x1d,0x35,0xb6,0x3c ] }; 32856 /// Called to provide the event args when a context menu is requested on a 32857 /// WebView element. 32858 HRESULT Invoke( 32859 /+[in]+/ ICoreWebView2 sender, 32860 /+[in]+/ ICoreWebView2ContextMenuRequestedEventArgs args); 32861 } 32862 32863 /// Raised to notify the host that the end user selected a custom 32864 /// `ContextMenuItem`. `CustomItemSelected` event is raised on the specific 32865 /// `ContextMenuItem` that the end user selected. 32866 const GUID IID_ICoreWebView2CustomItemSelectedEventHandler = ICoreWebView2CustomItemSelectedEventHandler.iid; 32867 32868 interface ICoreWebView2CustomItemSelectedEventHandler : IUnknown 32869 { 32870 static const GUID iid = { 0x49e1d0bc,0xfe9e,0x4481,[ 0xb7,0xc2,0x32,0x32,0x4a,0xa2,0x19,0x98 ] }; 32871 /// Provides the event args for the corresponding event. No event args exist 32872 /// and the `args` parameter is set to `null`. 32873 HRESULT Invoke( 32874 /+[in]+/ ICoreWebView2ContextMenuItem sender, /+[in]+/ IUnknown args); 32875 } 32876 32877 /// Represents the information regarding the context menu target. 32878 /// Includes the context selected and the appropriate data used for the actions of a context menu. 32879 const GUID IID_ICoreWebView2ContextMenuTarget = ICoreWebView2ContextMenuTarget.iid; 32880 32881 interface ICoreWebView2ContextMenuTarget : IUnknown 32882 { 32883 static const GUID iid = { 0xb8611d99,0xeed6,0x4f3f,[ 0x90,0x2c,0xa1,0x98,0x50,0x2a,0xd4,0x72 ] }; 32884 /// Gets the kind of context that the user selected. 32885 @(" propget") 32886 HRESULT get_Kind(@("out, retval") COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND* value); 32887 32888 /// Returns TRUE if the context menu is requested on an editable component. 32889 @(" propget") 32890 HRESULT get_IsEditable(@("out, retval") BOOL* value); 32891 32892 /// Returns TRUE if the context menu was requested on the main frame and 32893 /// FALSE if invoked on another frame. 32894 @(" propget") 32895 HRESULT get_IsRequestedForMainFrame(@("out, retval") BOOL* value); 32896 32897 /// Gets the uri of the page. 32898 /// 32899 /// The caller must free the returned string with `CoTaskMemFree`. See 32900 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32901 @(" propget") 32902 HRESULT get_PageUri(@("out, retval") LPWSTR* value); 32903 32904 /// Gets the uri of the frame. Will match the PageUri if `IsRequestedForMainFrame` is TRUE. 32905 /// 32906 /// The caller must free the returned string with `CoTaskMemFree`. See 32907 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32908 @(" propget") 32909 HRESULT get_FrameUri(@("out, retval") LPWSTR* value); 32910 32911 /// Returns TRUE if the context menu is requested on HTML containing an anchor tag. 32912 @(" propget") 32913 HRESULT get_HasLinkUri(@("out, retval") BOOL* value); 32914 32915 /// Gets the uri of the link (if `HasLinkUri` is TRUE, null otherwise). 32916 /// 32917 /// The caller must free the returned string with `CoTaskMemFree`. See 32918 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32919 @(" propget") 32920 HRESULT get_LinkUri(@("out, retval") LPWSTR* value); 32921 32922 /// Returns TRUE if the context menu is requested on text element that contains an anchor tag. 32923 @(" propget") 32924 HRESULT get_HasLinkText(@("out, retval") BOOL* value); 32925 32926 /// Gets the text of the link (if `HasLinkText` is TRUE, null otherwise). 32927 /// 32928 /// The caller must free the returned string with `CoTaskMemFree`. See 32929 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32930 @(" propget") 32931 HRESULT get_LinkText(@("out, retval") LPWSTR * value); 32932 32933 /// Returns TRUE if the context menu is requested on HTML containing a source uri. 32934 @(" propget") 32935 HRESULT get_HasSourceUri(@("out, retval") BOOL* value); 32936 32937 /// Gets the active source uri of element (if `HasSourceUri` is TRUE, null otherwise). 32938 /// 32939 /// The caller must free the returned string with `CoTaskMemFree`. See 32940 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32941 @(" propget") 32942 HRESULT get_SourceUri(@("out, retval") LPWSTR* value); 32943 32944 /// Returns TRUE if the context menu is requested on a selection. 32945 @(" propget") 32946 HRESULT get_HasSelection(@("out, retval") BOOL* value); 32947 32948 /// Gets the selected text (if `HasSelection` is TRUE, null otherwise). 32949 /// 32950 /// The caller must free the returned string with `CoTaskMemFree`. See 32951 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 32952 @(" propget") 32953 HRESULT get_SelectionText(@("out, retval") LPWSTR* value); 32954 } 32955 32956 /// Event args for the `ContextMenuRequested` event. Will contain the selection information 32957 /// and a collection of all of the default context menu items that the WebView 32958 /// would show. Allows the app to draw its own context menu or add/remove 32959 /// from the default context menu. 32960 const GUID IID_ICoreWebView2ContextMenuRequestedEventArgs = ICoreWebView2ContextMenuRequestedEventArgs.iid; 32961 32962 interface ICoreWebView2ContextMenuRequestedEventArgs : IUnknown 32963 { 32964 static const GUID iid = { 0xa1d309ee,0xc03f,0x11eb,[ 0x85,0x29,0x02,0x42,0xac,0x13,0x00,0x03 ] }; 32965 /// Gets the collection of `ContextMenuItem` objects. 32966 /// See `ICoreWebView2ContextMenuItemCollection` for more details. 32967 @(" propget") 32968 HRESULT get_MenuItems(@("out, retval") ICoreWebView2ContextMenuItemCollection * value); 32969 32970 /// Gets the target information associated with the requested context menu. 32971 /// See `ICoreWebView2ContextMenuTarget` for more details. 32972 @(" propget") 32973 HRESULT get_ContextMenuTarget(@("out, retval") ICoreWebView2ContextMenuTarget * value); 32974 32975 /// Gets the coordinates where the context menu request occurred in relation to the upper 32976 /// left corner of the WebView bounds. 32977 @(" propget") 32978 HRESULT get_Location(@("out, retval") POINT* value); 32979 32980 /// Sets the selected context menu item's command ID. When this is set, 32981 /// WebView will execute the selected command. This 32982 /// value should always be obtained via the selected `ContextMenuItem`'s `CommandId` property. 32983 /// The default value is -1 which means that no selection occurred. The app can 32984 /// also report the selected command ID for a custom context menu item, which 32985 /// will cause the `CustomItemSelected` event to be fired for the custom item, however 32986 /// while command IDs for each custom context menu item is unique 32987 /// during a ContextMenuRequested event, CoreWebView2 may reassign command ID 32988 /// values of deleted custom ContextMenuItems to new objects and the command 32989 /// ID assigned to the same custom item can be different between each app runtime. 32990 @(" propput") 32991 HRESULT put_SelectedCommandId(in INT32 value); 32992 32993 /// Gets the selected CommandId. 32994 @(" propget") 32995 HRESULT get_SelectedCommandId(@("out, retval") INT32* value); 32996 32997 /// Sets whether the `ContextMenuRequested` event is handled by host after 32998 /// the event handler completes or if there is a deferral then after the deferral is completed. 32999 /// If `Handled` is set to TRUE then WebView will not display a context menu and will instead 33000 /// use the `SelectedCommandId` property to indicate which, if any, context menu item command to invoke. 33001 /// If after the event handler or deferral completes `Handled` is set to FALSE then WebView 33002 /// will display a context menu based on the contents of the `MenuItems` property. 33003 /// The default value is FALSE. 33004 @(" propput") 33005 HRESULT put_Handled(in BOOL value); 33006 33007 /// Gets whether the `ContextMenuRequested` event is handled by host. 33008 @(" propget") 33009 HRESULT get_Handled(@("out, retval") BOOL* value); 33010 33011 /// Returns an `ICoreWebView2Deferral` object. Use this operation to 33012 /// complete the event when the custom context menu is closed. 33013 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 33014 } 33015 33016 /// This interface is used to manage profile options that created by 'CreateCoreWebView2ControllerOptions'. 33017 /// 33018 /// \snippet AppWindow.cpp CreateControllerWithOptions 33019 const GUID IID_ICoreWebView2ControllerOptions = ICoreWebView2ControllerOptions.iid; 33020 33021 interface ICoreWebView2ControllerOptions : IUnknown 33022 { 33023 static const GUID iid = { 0x12aae616,0x8ccb,0x44ec,[ 0xbc,0xb3,0xeb,0x18,0x31,0x88,0x16,0x35 ] }; 33024 /// `ProfileName` property is to specify a profile name, which is only allowed to contain 33025 /// the following ASCII characters. It has a maximum length of 64 characters excluding the null-terminator. 33026 /// It is ASCII case insensitive. 33027 /// 33028 /// * alphabet characters: a-z and A-Z 33029 /// * digit characters: 0-9 33030 /// * and '#', '@', '$', '(', ')', '+', '-', '_', '~', '.', ' ' (space). 33031 /// 33032 /// Note: the text must not end with a period '.' or ' ' (space). And, although upper-case letters are 33033 /// allowed, they're treated just as lower-case counterparts because the profile name will be mapped to 33034 /// the real profile directory path on disk and Windows file system handles path names in a case-insensitive way. 33035 /// 33036 /// The caller must free the returned string with `CoTaskMemFree`. See 33037 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33038 @(" propget") 33039 HRESULT get_ProfileName(@("out, retval") LPWSTR* value); 33040 /// Sets the `ProfileName` property. 33041 @(" propput") 33042 HRESULT put_ProfileName(in LPCWSTR value); 33043 33044 /// `IsInPrivateModeEnabled` property is to enable/disable InPrivate mode. 33045 @(" propget") 33046 HRESULT get_IsInPrivateModeEnabled(@("out, retval") BOOL* value); 33047 /// Sets the `IsInPrivateModeEnabled` property. 33048 @(" propput") 33049 HRESULT put_IsInPrivateModeEnabled(in BOOL value); 33050 } 33051 33052 /// Provides a set of properties to configure a Profile object. 33053 /// 33054 /// \snippet AppWindow.cpp OnCreateCoreWebView2ControllerCompleted 33055 const GUID IID_ICoreWebView2Profile = ICoreWebView2Profile.iid; 33056 33057 interface ICoreWebView2Profile : IUnknown 33058 { 33059 static const GUID iid = { 0x79110ad3,0xcd5d,0x4373,[ 0x8b,0xc3,0xc6,0x06,0x58,0xf1,0x7a,0x5f ] }; 33060 /// Name of the profile. 33061 /// 33062 /// The caller must free the returned string with `CoTaskMemFree`. See 33063 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33064 @(" propget") 33065 HRESULT get_ProfileName(@("out, retval") LPWSTR* value); 33066 33067 /// InPrivate mode is enabled or not. 33068 @(" propget") 33069 HRESULT get_IsInPrivateModeEnabled(@("out, retval") BOOL* value); 33070 33071 /// Full path of the profile directory. 33072 /// 33073 /// The caller must free the returned string with `CoTaskMemFree`. See 33074 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33075 @(" propget") 33076 HRESULT get_ProfilePath(@("out, retval") LPWSTR* value); 33077 33078 /// Gets the `DefaultDownloadFolderPath` property. The default value is the 33079 /// system default download folder path for the user. 33080 /// 33081 /// The caller must free the returned string with `CoTaskMemFree`. See 33082 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33083 @(" propget") 33084 HRESULT get_DefaultDownloadFolderPath(@("out, retval") LPWSTR* value); 33085 33086 /// Sets the `DefaultDownloadFolderPath` property. The default download folder 33087 /// path is persisted in the user data folder across sessions. The value 33088 /// should be an absolute path to a folder that the user and application can 33089 /// write to. Returns `E_INVALIDARG` if the value is invalid, and the default 33090 /// download folder path is not changed. Otherwise the path is changed 33091 /// immediately. If the directory does not yet exist, it is created at the 33092 /// time of the next download. If the host application does not have 33093 /// permission to create the directory, then the user is prompted to provide a 33094 /// new path through the Save As dialog. The user can override the default 33095 /// download folder path for a given download by choosing a different path in 33096 /// the Save As dialog. 33097 @(" propput") 33098 HRESULT put_DefaultDownloadFolderPath(in LPCWSTR value); 33099 33100 /// The PreferredColorScheme property sets the overall color scheme of the 33101 /// WebView2s associated with this profile. This sets the color scheme for 33102 /// WebView2 UI like dialogs, prompts, and context menus by setting the 33103 /// media feature `prefers-color-scheme` for websites to respond to. 33104 /// 33105 /// The default value for this is COREWEBVIEW2_PREFERRED_COLOR_AUTO, 33106 /// which will follow whatever theme the OS is currently set to. 33107 /// 33108 /// \snippet ViewComponent.cpp SetPreferredColorScheme 33109 /// Returns the value of the `PreferredColorScheme` property. 33110 @(" propget") 33111 HRESULT get_PreferredColorScheme( 33112 @("out, retval") COREWEBVIEW2_PREFERRED_COLOR_SCHEME* value); 33113 33114 /// Sets the `PreferredColorScheme` property. 33115 @(" propput") 33116 HRESULT put_PreferredColorScheme( 33117 in COREWEBVIEW2_PREFERRED_COLOR_SCHEME value); 33118 } 33119 33120 /// Provides access to the certificate metadata. 33121 const GUID IID_ICoreWebView2Certificate = ICoreWebView2Certificate.iid; 33122 33123 interface ICoreWebView2Certificate : IUnknown 33124 { 33125 static const GUID iid = { 0xC5FB2FCE,0x1CAC,0x4AEE,[ 0x9C,0x79,0x5E,0xD0,0x36,0x2E,0xAA,0xE0 ] }; 33126 /// Subject of the certificate. 33127 /// 33128 /// The caller must free the returned string with `CoTaskMemFree`. See 33129 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33130 @(" propget") 33131 HRESULT get_Subject(@("out, retval") LPWSTR* value); 33132 /// Name of the certificate authority that issued the certificate. 33133 /// 33134 /// The caller must free the returned string with `CoTaskMemFree`. See 33135 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33136 @(" propget") 33137 HRESULT get_Issuer(@("out, retval") LPWSTR* value); 33138 /// The valid start date and time for the certificate as the number of seconds since 33139 /// the UNIX epoch. 33140 @(" propget") 33141 HRESULT get_ValidFrom(@("out, retval") double* value); 33142 /// The valid expiration date and time for the certificate as the number of seconds since 33143 /// the UNIX epoch. 33144 @(" propget") 33145 HRESULT get_ValidTo(@("out, retval") double* value); 33146 /// Base64 encoding of DER encoded serial number of the certificate. 33147 /// Read more about DER at [RFC 7468 DER] 33148 /// (https://tools.ietf.org/html/rfc7468#appendix-B). 33149 /// 33150 /// The caller must free the returned string with `CoTaskMemFree`. See 33151 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33152 @(" propget") 33153 HRESULT get_DerEncodedSerialNumber(@("out, retval") LPWSTR* value); 33154 /// Display name for a certificate. 33155 /// 33156 /// The caller must free the returned string with `CoTaskMemFree`. See 33157 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings) 33158 @(" propget") 33159 HRESULT get_DisplayName(@("out, retval") LPWSTR* value); 33160 /// PEM encoded data for the certificate. 33161 /// Returns Base64 encoding of DER encoded certificate. 33162 /// Read more about PEM at [RFC 1421 Privacy Enhanced Mail] 33163 /// (https://tools.ietf.org/html/rfc1421). 33164 /// 33165 /// The caller must free the returned string with `CoTaskMemFree`. See 33166 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings) 33167 HRESULT ToPemEncoding(@("out, retval") LPWSTR* pemEncodedData); 33168 /// Collection of PEM encoded certificate issuer chain. 33169 /// In this collection first element is the current certificate followed by 33170 /// intermediate1, intermediate2...intermediateN-1. Root certificate is the 33171 /// last element in collection. 33172 @(" propget") 33173 HRESULT get_PemEncodedIssuerCertificateChain(@("out, retval") 33174 ICoreWebView2StringCollection * value); 33175 } 33176 33177 /// An event handler for the `ServerCertificateErrorDetected` event. 33178 const GUID IID_ICoreWebView2ServerCertificateErrorDetectedEventHandler = ICoreWebView2ServerCertificateErrorDetectedEventHandler.iid; 33179 33180 interface ICoreWebView2ServerCertificateErrorDetectedEventHandler : IUnknown 33181 { 33182 static const GUID iid = { 0x969B3A26,0xD85E,0x4795,[ 0x81,0x99,0xFE,0xF5,0x73,0x44,0xDA,0x22 ] }; 33183 /// Provides the event args for the corresponding event. 33184 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, 33185 /+[in]+/ ICoreWebView2ServerCertificateErrorDetectedEventArgs 33186 args); 33187 } 33188 33189 /// Event args for the `ServerCertificateErrorDetected` event. 33190 const GUID IID_ICoreWebView2ServerCertificateErrorDetectedEventArgs = ICoreWebView2ServerCertificateErrorDetectedEventArgs.iid; 33191 33192 interface ICoreWebView2ServerCertificateErrorDetectedEventArgs : IUnknown 33193 { 33194 static const GUID iid = { 0x012193ED,0x7C13,0x48FF,[ 0x96,0x9D,0xA8,0x4C,0x1F,0x43,0x2A,0x14 ] }; 33195 /// The TLS error code for the invalid certificate. 33196 @(" propget") 33197 HRESULT get_ErrorStatus(@("out, retval") COREWEBVIEW2_WEB_ERROR_STATUS* value); 33198 33199 /// URI associated with the request for the invalid certificate. 33200 /// 33201 /// The caller must free the returned string with `CoTaskMemFree`. See 33202 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33203 @(" propget") 33204 HRESULT get_RequestUri(@("out, retval") LPWSTR* value); 33205 33206 /// Returns the server certificate. 33207 @(" propget") 33208 HRESULT get_ServerCertificate(@("out, retval") ICoreWebView2Certificate * value); 33209 33210 /// The action of the server certificate error detection. 33211 /// The default value is `COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT`. 33212 @(" propget") 33213 HRESULT get_Action(@("out, retval") COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION* value); 33214 33215 /// Sets the `Action` property. 33216 @(" propput") 33217 HRESULT put_Action(in COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION value); 33218 33219 /// Returns an `ICoreWebView2Deferral` object. Use this operation to 33220 /// complete the event at a later time. 33221 HRESULT GetDeferral(@("out, retval") ICoreWebView2Deferral * deferral); 33222 } 33223 33224 /// Receives the result of the `ClearServerCertificateErrorActions` method. 33225 const GUID IID_ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler = ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler.iid; 33226 33227 interface ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler : IUnknown 33228 { 33229 static const GUID iid = { 0x3B40AAC6,0xACFE,0x4FFD,[ 0x82,0x11,0xF6,0x07,0xB9,0x6E,0x2D,0x5B ] }; 33230 /// Provides the result of the corresponding asynchronous method. 33231 HRESULT Invoke(in HRESULT errorCode); 33232 } 33233 33234 /// Profile2 interface. 33235 /// 33236 const GUID IID_ICoreWebView2Profile2 = ICoreWebView2Profile2.iid; 33237 33238 interface ICoreWebView2Profile2 : ICoreWebView2Profile 33239 { 33240 static const GUID iid = { 0xfa740d4b,0x5eae,0x4344,[ 0xa8,0xad,0x74,0xbe,0x31,0x92,0x53,0x97 ] }; 33241 33242 /// Clear browsing data based on a data type. This method takes two parameters, 33243 /// the first being a mask of one or more `COREWEBVIEW2_BROWSING_DATA_KINDS`. OR 33244 /// operation(s) can be applied to multiple `COREWEBVIEW2_BROWSING_DATA_KINDS` to 33245 /// create a mask representing those data types. The browsing data kinds that are 33246 /// supported are listed below. These data kinds follow a hierarchical structure in 33247 /// which nested bullet points are included in their parent bullet point's data kind. 33248 /// Ex: All DOM storage is encompassed in all site data which is encompassed in 33249 /// all profile data. 33250 /// * All Profile 33251 /// * All Site Data 33252 /// * All DOM Storage: File Systems, Indexed DB, Local Storage, Web SQL, Cache 33253 /// Storage 33254 /// * Cookies 33255 /// * Disk Cache 33256 /// * Download History 33257 /// * General Autofill 33258 /// * Password Autosave 33259 /// * Browsing History 33260 /// * Settings 33261 /// The completed handler will be invoked when the browsing data has been cleared and 33262 /// will indicate if the specified data was properly cleared. In the case in which 33263 /// the operation is interrupted and the corresponding data is not fully cleared 33264 /// the handler will return `E_ABORT` and otherwise will return `S_OK`. 33265 /// Because this is an asynchronous operation, code that is dependent on the cleared 33266 /// data must be placed in the callback of this operation. 33267 /// If the WebView object is closed before the clear browsing data operation 33268 /// has completed, the handler will be released, but not invoked. In this case 33269 /// the clear browsing data operation may or may not be completed. 33270 /// ClearBrowsingData clears the `dataKinds` regardless of timestamp. 33271 33272 HRESULT ClearBrowsingData( 33273 in COREWEBVIEW2_BROWSING_DATA_KINDS dataKinds, 33274 /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler); 33275 33276 /// ClearBrowsingDataInTimeRange behaves like ClearBrowsingData except that it 33277 /// takes in two additional parameters for the start and end time for which it 33278 /// should clear the data between. The `startTime` and `endTime` 33279 /// parameters correspond to the number of seconds since the UNIX epoch. 33280 /// `startTime` is inclusive while `endTime` is exclusive, therefore the data will 33281 /// be cleared between [startTime, endTime). 33282 33283 HRESULT ClearBrowsingDataInTimeRange( 33284 in COREWEBVIEW2_BROWSING_DATA_KINDS dataKinds, 33285 in double startTime, 33286 in double endTime, 33287 /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler); 33288 33289 /// ClearBrowsingDataAll behaves like ClearBrowsingData except that it 33290 /// clears the entirety of the data associated with the profile it is called on. 33291 /// It clears the data regardless of timestamp. 33292 /// 33293 /// \snippet AppWindow.cpp ClearBrowsingData 33294 33295 HRESULT ClearBrowsingDataAll( 33296 /+[in]+/ ICoreWebView2ClearBrowsingDataCompletedHandler handler); 33297 } 33298 33299 /// The caller implements this interface to receive the ClearBrowsingData result. 33300 const GUID IID_ICoreWebView2ClearBrowsingDataCompletedHandler = ICoreWebView2ClearBrowsingDataCompletedHandler.iid; 33301 33302 interface ICoreWebView2ClearBrowsingDataCompletedHandler : IUnknown 33303 { 33304 static const GUID iid = { 0xe9710a06,0x1d1d,0x49b2,[ 0x82,0x34,0x22,0x6f,0x35,0x84,0x6a,0xe5 ] }; 33305 33306 /// Provide the completion status of the corresponding asynchronous method. 33307 HRESULT Invoke(in HRESULT errorCode); 33308 } 33309 33310 /// This is an extension of the ICoreWebView2Profile interface to control levels of tracking prevention. 33311 const GUID IID_ICoreWebView2Profile3 = ICoreWebView2Profile3.iid; 33312 33313 interface ICoreWebView2Profile3 : ICoreWebView2Profile2 33314 { 33315 static const GUID iid = { 0xB188E659,0x5685,0x4E05,[ 0xBD,0xBA,0xFC,0x64,0x0E,0x0F,0x19,0x92 ] }; 33316 /// The `PreferredTrackingPreventionLevel` property allows you to control levels of tracking prevention for WebView2 33317 /// which are associated with a profile. This level would apply to the context of the profile. That is, all WebView2s 33318 /// sharing the same profile will be affected and also the value is persisted in the user data folder. 33319 /// 33320 /// See `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL` for descriptions of levels. 33321 /// 33322 /// If tracking prevention feature is enabled when creating the WebView2 environment, you can also disable tracking 33323 /// prevention later using this property and `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE` value but that doesn't 33324 /// improves runtime performance. 33325 /// 33326 /// There is `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` property to enable/disable tracking prevention feature 33327 /// for all the WebView2's created in the same environment. If enabled, `PreferredTrackingPreventionLevel` is set to 33328 /// `COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED` by default for all the WebView2's and profiles created in the same 33329 /// environment or is set to the level whatever value was last changed/persisted to the profile. If disabled 33330 /// `PreferredTrackingPreventionLevel` is not respected by WebView2. If `PreferredTrackingPreventionLevel` is set when the 33331 /// feature is disabled, the property value get changed and persisted but it will takes effect only if 33332 /// `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is true. 33333 /// 33334 /// See `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` for more details. 33335 /// \snippet SettingsComponent.cpp SetTrackingPreventionLevel 33336 @(" propget") 33337 HRESULT get_PreferredTrackingPreventionLevel( 33338 @("out, retval") COREWEBVIEW2_TRACKING_PREVENTION_LEVEL* value); 33339 /// Set the `PreferredTrackingPreventionLevel` property. 33340 /// 33341 /// If `ICoreWebView2EnvironmentOptions5::EnableTrackingPrevention` is false, this property will be changed and persisted 33342 /// to the profile but the WebView2 ignores the level silently. 33343 @(" propput") 33344 HRESULT put_PreferredTrackingPreventionLevel( 33345 in COREWEBVIEW2_TRACKING_PREVENTION_LEVEL value); 33346 } 33347 33348 /// This interface is a handler for when the `Favicon` is changed. 33349 /// The sender is the ICoreWebView2 object the top-level document of 33350 /// which has changed favicon and the eventArgs is nullptr. Use the 33351 /// FaviconUri property and GetFavicon method to obtain the favicon 33352 /// data. The second argument is always null. 33353 /// For more information see `add_FaviconChanged`. 33354 const GUID IID_ICoreWebView2FaviconChangedEventHandler = ICoreWebView2FaviconChangedEventHandler.iid; 33355 33356 interface ICoreWebView2FaviconChangedEventHandler : IUnknown 33357 { 33358 static const GUID iid = { 0x2913DA94,0x833D,0x4DE0,[ 0x8D,0xCA,0x90,0x0F,0xC5,0x24,0xA1,0xA4 ] }; 33359 /// Called to notify the favicon changed. The event args are always null. 33360 HRESULT Invoke( 33361 /+[in]+/ ICoreWebView2 sender, 33362 /+[in]+/ IUnknown args); 33363 } 33364 33365 /// This interface is a handler for the completion of the population of 33366 /// `imageStream`. 33367 /// `errorCode` returns S_OK if the API succeeded. 33368 /// The image is returned in the `faviconStream` object. If there is no image 33369 /// then no data would be copied into the imageStream. 33370 /// For more details, see the `GetFavicon` API. 33371 const GUID IID_ICoreWebView2GetFaviconCompletedHandler = ICoreWebView2GetFaviconCompletedHandler.iid; 33372 33373 interface ICoreWebView2GetFaviconCompletedHandler : IUnknown 33374 { 33375 static const GUID iid = { 0xA2508329,0x7DA8,0x49D7,[ 0x8C,0x05,0xFA,0x12,0x5E,0x4A,0xEE,0x8D ] }; 33376 /// Called to notify the favicon has been retrieved. 33377 HRESULT Invoke( 33378 in HRESULT errorCode, 33379 in IStream* faviconStream); 33380 } 33381 33382 /// Represents the registration of a custom scheme with the 33383 /// CoreWebView2Environment. 33384 /// This allows the WebView2 app to be able to handle WebResourceRequested 33385 /// event for requests with the specified scheme and be able to navigate the 33386 /// WebView2 to the custom scheme. Once the environment is created, the 33387 /// registrations are valid and immutable throughout the lifetime of the 33388 /// associated WebView2s' browser process and any WebView2 environments 33389 /// sharing the browser process must be created with identical custom scheme 33390 /// registrations, otherwise the environment creation will fail. 33391 /// Any further attempts to register the same scheme will fail during environment creation. 33392 /// The URIs of registered custom schemes will be treated similar to http 33393 /// URIs for their origins. 33394 /// They will have tuple origins for URIs with host and opaque origins for 33395 /// URIs without host as specified in 33396 /// [7.5 Origin - HTML Living Standard](https://html.spec.whatwg.org/multipage/origin.html) 33397 /// 33398 /// Example: 33399 /// `custom-scheme-with-host://hostname/path/to/resource` has origin of 33400 /// `custom-scheme-with-host://hostname`. 33401 /// `custom-scheme-without-host:path/to/resource` has origin of 33402 /// `custom-scheme-without-host:path/to/resource`. 33403 /// For WebResourceRequested event, the cases of request URIs and filter URIs 33404 /// with custom schemes will be normalized according to generic URI syntax 33405 /// rules. Any non-ASCII characters will be preserved. 33406 /// The registered custom schemes also participate in 33407 /// [CORS](https://developer.mozilla.org/docs/Web/HTTP/CORS) and 33408 /// adheres to [CSP](https://developer.mozilla.org/docs/Web/HTTP/CSP). 33409 /// The app needs to set the appropriate access headers in its 33410 /// WebResourceRequested event handler to allow CORS requests. 33411 /// \snippet AppWindow.cpp CoreWebView2CustomSchemeRegistration 33412 const GUID IID_ICoreWebView2CustomSchemeRegistration = ICoreWebView2CustomSchemeRegistration.iid; 33413 33414 interface ICoreWebView2CustomSchemeRegistration : IUnknown 33415 { 33416 static const GUID iid = { 0xd60ac92c,0x37a6,0x4b26,[ 0xa3,0x9e,0x95,0xcf,0xe5,0x90,0x47,0xbb ] }; 33417 /// The name of the custom scheme to register. 33418 @(" propget") 33419 HRESULT get_SchemeName(@("out, retval") LPWSTR* schemeName); 33420 33421 /// Whether the sites with this scheme will be treated as a 33422 /// [Secure Context](https://developer.mozilla.org/docs/Web/Security/Secure_Contexts) 33423 /// like an HTTPS site. This flag is only effective when HasAuthorityComponent 33424 /// is also set to `true`. 33425 /// `false` by default. 33426 @(" propget") 33427 HRESULT get_TreatAsSecure(@("out, retval") BOOL* treatAsSecure); 33428 /// Set if the scheme will be treated as a Secure Context. 33429 @(" propput") 33430 HRESULT put_TreatAsSecure(in BOOL value); 33431 33432 /// List of origins that are allowed to issue requests with the custom 33433 /// scheme, such as XHRs and subresource requests that have an Origin header. 33434 /// The origin of any request (requests that have the 33435 /// [Origin header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Origin)) 33436 /// to the custom scheme URI needs to be in this list. No-origin requests 33437 /// are requests that do not have an Origin header, such as link 33438 /// navigations, embedded images and are always allowed. 33439 /// Note: POST requests always contain an Origin header, therefore 33440 /// AllowedOrigins must be set for even for same origin POST requests. 33441 /// Note that cross-origin restrictions still apply. 33442 /// From any opaque origin (Origin header is null), no cross-origin requests 33443 /// are allowed. 33444 /// If the list is empty, no cross-origin request to this scheme is 33445 /// allowed. 33446 /// Origins are specified as a string in the format of 33447 /// scheme://host:port. 33448 /// The origins are string pattern matched with `*` (matches 0 or more 33449 /// characters) and `?` (matches 0 or 1 character) wildcards just like 33450 /// the URI matching in the 33451 /// [AddWebResourceRequestedFilter API](/dotnet/api/microsoft.web.webview2.core.corewebview2.addwebresourcerequestedfilter). 33452 /// For example, "http://*.example.com:80". 33453 /// Here's a set of examples of what is allowed and not: 33454 /// 33455 /// | Request URI | Originating URL | AllowedOrigins | Allowed | 33456 /// | -- | -- | -- | -- | 33457 /// | `custom-scheme:request` | `https://www.example.com` | {"https://www.example.com"} | Yes | 33458 /// | `custom-scheme:request` | `https://www.example.com` | {"https://*.example.com"} | Yes | 33459 /// | `custom-scheme:request` | `https://www.example.com` | {"https://www.example2.com"} | No | 33460 /// | `custom-scheme-with-authority://host/path` | `custom-scheme-with-authority://host2` | {""} | No | 33461 /// | `custom-scheme-with-authority://host/path` | `custom-scheme-with-authority2://host` | {"custom-scheme-with-authority2://*"} | Yes | 33462 /// | `custom-scheme-without-authority:path` | custom-scheme-without-authority:path2 | {"custom-scheme-without-authority:*"} | No | 33463 /// | `custom-scheme-without-authority:path` | custom-scheme-without-authority:path2 | {"*"} | Yes | 33464 /// 33465 /// The returned strings and the array itself must be deallocated with 33466 /// CoTaskMemFree. 33467 HRESULT GetAllowedOrigins( 33468 @("out") UINT32* allowedOriginsCount, 33469 @("out") LPWSTR** allowedOrigins); 33470 /// Set the array of origins that are allowed to use the scheme. 33471 HRESULT SetAllowedOrigins( 33472 in UINT32 allowedOriginsCount, 33473 in LPCWSTR* allowedOrigins); 33474 33475 /// Set this property to `true` if the URIs with this custom 33476 /// scheme will have an authority component (a host for custom schemes). 33477 /// Specifically, if you have a URI of the following form you should set the 33478 /// `HasAuthorityComponent` value as listed. 33479 /// 33480 /// | URI | Recommended HasAuthorityComponent value | 33481 /// | -- | -- | 33482 /// | `custom-scheme-with-authority://host/path` | `true` | 33483 /// | `custom-scheme-without-authority:path` | `false` | 33484 /// 33485 /// When this property is set to `true`, the URIs with this scheme will be 33486 /// interpreted as having a 33487 /// [scheme and host](https://html.spec.whatwg.org/multipage/origin.html#concept-origin-tuple) 33488 /// origin similar to an http URI. Note that the port and user 33489 /// information are never included in the computation of origins for 33490 /// custom schemes. 33491 /// If this property is set to `false`, URIs with this scheme will have an 33492 /// [opaque origin](https://html.spec.whatwg.org/multipage/origin.html#concept-origin-opaque) 33493 /// similar to a data URI. 33494 /// This property is `false` by default. 33495 /// 33496 /// Note: For custom schemes registered as having authority component, 33497 /// navigations to URIs without authority of such custom schemes will fail. 33498 /// However, if the content inside WebView2 references 33499 /// a subresource with a URI that does not have 33500 /// an authority component, but of a custom scheme that is registered as 33501 /// having authority component, the URI will be interpreted as a relative path 33502 /// as specified in [RFC3986](https://www.rfc-editor.org/rfc/rfc3986). 33503 /// For example, `custom-scheme-with-authority:path` will be interpreted 33504 /// as `custom-scheme-with-authority://host/path`. 33505 /// However, this behavior cannot be guaranteed to remain in future 33506 /// releases so it is recommended not to rely on this behavior. 33507 @(" propget") 33508 HRESULT get_HasAuthorityComponent(@("out, retval") BOOL* hasAuthorityComponent); 33509 33510 /// Get has authority component. 33511 @(" propput") 33512 HRESULT put_HasAuthorityComponent(in BOOL hasAuthorityComponent); 33513 } 33514 33515 /// This is a continuation of the `ICoreWebView2PermissionRequestedEventArgs2` 33516 /// interface. 33517 const GUID IID_ICoreWebView2PermissionRequestedEventArgs3 = ICoreWebView2PermissionRequestedEventArgs3.iid; 33518 33519 interface ICoreWebView2PermissionRequestedEventArgs3 : 33520 ICoreWebView2PermissionRequestedEventArgs2 33521 { 33522 static const GUID iid = { 0xe61670bc,0x3dce,0x4177,[ 0x86,0xd2,0xc6,0x29,0xae,0x3c,0xb6,0xac ] }; 33523 /// The permission state set from the `PermissionRequested` event is saved in 33524 /// the profile by default; it persists across sessions and becomes the new 33525 /// default behavior for future `PermissionRequested` events. Browser 33526 /// heuristics can affect whether the event continues to be raised when the 33527 /// state is saved in the profile. Set the `SavesInProfile` property to 33528 /// `FALSE` to not persist the state beyond the current request, and to 33529 /// continue to receive `PermissionRequested` 33530 /// events for this origin and permission kind. 33531 @(" propget") 33532 HRESULT get_SavesInProfile(@("out, retval") BOOL* value); 33533 33534 /// Sets the `SavesInProfile` property. 33535 @(" propput") 33536 HRESULT put_SavesInProfile(in BOOL value); 33537 } 33538 33539 /// The caller implements this interface to handle the result of 33540 /// `SetPermissionState`. 33541 const GUID IID_ICoreWebView2SetPermissionStateCompletedHandler = ICoreWebView2SetPermissionStateCompletedHandler.iid; 33542 33543 interface ICoreWebView2SetPermissionStateCompletedHandler : IUnknown 33544 { 33545 static const GUID iid = { 0xfc77fb30,0x9c9e,0x4076,[ 0xb8,0xc7,0x76,0x44,0xa7,0x03,0xca,0x1b ] }; 33546 /// Provide the completion status of the corresponding asynchronous method. 33547 HRESULT Invoke(in HRESULT errorCode); 33548 } 33549 33550 /// The caller implements this interface to handle the result of 33551 /// `GetNonDefaultPermissionSettings`. 33552 const GUID IID_ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler = ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler.iid; 33553 33554 interface ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler : IUnknown 33555 { 33556 static const GUID iid = { 0x38274481,0xa15c,0x4563,[ 0x94,0xcf,0x99,0x0e,0xdc,0x9a,0xeb,0x95 ] }; 33557 /// Provides the permission setting collection for the requested permission kind. 33558 HRESULT Invoke(in HRESULT errorCode, 33559 /+[in]+/ ICoreWebView2PermissionSettingCollectionView collectionView); 33560 } 33561 33562 /// This is the ICoreWebView2Profile interface for the permission management APIs. 33563 const GUID IID_ICoreWebView2Profile4 = ICoreWebView2Profile4.iid; 33564 33565 interface ICoreWebView2Profile4 : ICoreWebView2Profile3 33566 { 33567 static const GUID iid = { 0x8F4ae680,0x192e,0x4eC8,[ 0x83,0x3a,0x21,0xcf,0xad,0xae,0xf6,0x28 ] }; 33568 /// Sets permission state for the given permission kind and origin 33569 /// asynchronously. The change persists across sessions until it is changed by 33570 /// another call to `SetPermissionState`, or by setting the `State` property 33571 /// in `PermissionRequestedEventArgs`. Setting the state to 33572 /// `COREWEBVIEW2_PERMISSION_STATE_DEFAULT` will erase any state saved in the 33573 /// profile and restore the default behavior. 33574 /// The origin should have a valid scheme and host (e.g. "https://www.example.com"), 33575 /// otherwise the method fails with `E_INVALIDARG`. Additional URI parts like 33576 /// path and fragment are ignored. For example, "https://wwww.example.com/app1/index.html/" 33577 /// is treated the same as "https://wwww.example.com". See the 33578 /// [MDN origin definition](https://developer.mozilla.org/en-US/docs/Glossary/Origin) 33579 /// for more details. 33580 /// 33581 /// \snippet ScenarioPermissionManagement.cpp SetPermissionState 33582 HRESULT SetPermissionState( 33583 in COREWEBVIEW2_PERMISSION_KIND permissionKind, 33584 in LPCWSTR origin, 33585 in COREWEBVIEW2_PERMISSION_STATE state, 33586 /+[in]+/ ICoreWebView2SetPermissionStateCompletedHandler completedHandler); 33587 33588 /// Invokes the handler with a collection of all nondefault permission settings. 33589 /// Use this method to get the permission state set in the current and previous 33590 /// sessions. 33591 /// 33592 /// \snippet ScenarioPermissionManagement.cpp GetNonDefaultPermissionSettings 33593 HRESULT GetNonDefaultPermissionSettings( 33594 /+[in]+/ ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler completedHandler); 33595 } 33596 33597 /// Read-only collection of `PermissionSetting`s (origin, kind, and state). Used to list 33598 /// the nondefault permission settings on the profile that are persisted across 33599 /// sessions. 33600 const GUID IID_ICoreWebView2PermissionSettingCollectionView = ICoreWebView2PermissionSettingCollectionView.iid; 33601 33602 interface ICoreWebView2PermissionSettingCollectionView : IUnknown 33603 { 33604 static const GUID iid = { 0xf5596f62,0x3de5,0x47b1,[ 0x91,0xe8,0xa4,0x10,0x4b,0x59,0x6b,0x96 ] }; 33605 /// Gets the `ICoreWebView2PermissionSetting` at the specified index. 33606 HRESULT GetValueAtIndex( 33607 in UINT32 index, 33608 @("out, retval") ICoreWebView2PermissionSetting * permissionSetting); 33609 33610 /// The number of `ICoreWebView2PermissionSetting`s in the collection. 33611 @(" propget") 33612 HRESULT get_Count(@("out, retval") UINT32* value); 33613 } 33614 33615 /// Provides a set of properties for a permission setting. 33616 const GUID IID_ICoreWebView2PermissionSetting = ICoreWebView2PermissionSetting.iid; 33617 33618 interface ICoreWebView2PermissionSetting : IUnknown 33619 { 33620 static const GUID iid = { 0x792b6eca,0x5576,0x421c,[ 0x91,0x19,0x74,0xeb,0xb3,0xa4,0xff,0xb3 ] }; 33621 /// The kind of the permission setting. See `COREWEBVIEW2_PERMISSION_KIND` for 33622 /// more details. 33623 @(" propget") 33624 HRESULT get_PermissionKind( 33625 @("out, retval") COREWEBVIEW2_PERMISSION_KIND* value); 33626 33627 /// The origin of the permission setting. 33628 @(" propget") 33629 HRESULT get_PermissionOrigin(@("out, retval") LPWSTR* value); 33630 33631 /// The state of the permission setting. 33632 @(" propget") 33633 HRESULT get_PermissionState( 33634 @("out, retval") COREWEBVIEW2_PERMISSION_STATE* value); 33635 } 33636 33637 /// This is the interface in ControllerOptions for ScriptLocale. 33638 const GUID IID_ICoreWebView2ControllerOptions2 = ICoreWebView2ControllerOptions2.iid; 33639 33640 interface ICoreWebView2ControllerOptions2 : ICoreWebView2ControllerOptions 33641 { 33642 static const GUID iid = { 0x06c991d8,0x9e7e,0x11ed,[ 0xa8,0xfc,0x02,0x42,0xac,0x12,0x00,0x02 ] }; 33643 /// The default locale for the WebView2. It sets the default locale for all 33644 /// Intl JavaScript APIs and other JavaScript APIs that depend on it, namely 33645 /// `Intl.DateTimeFormat()` which affects string formatting like 33646 /// in the time/date formats. Example: `Intl.DateTimeFormat().format(new Date())` 33647 /// The intended locale value is in the format of 33648 /// BCP 47 Language Tags. More information can be found from 33649 /// [IETF BCP47](https://www.ietf.org/rfc/bcp/bcp47.html). 33650 /// 33651 /// This property sets the locale for a CoreWebView2Environment used to create the 33652 /// WebView2ControllerOptions object, which is passed as a parameter in 33653 /// `CreateCoreWebView2ControllerWithOptions`. 33654 /// 33655 /// Changes to the ScriptLocale property apply to renderer processes created after 33656 /// the change. Any existing renderer processes will continue to use the previous 33657 /// ScriptLocale value. To ensure changes are applied to all renderer process, 33658 /// close and restart the CoreWebView2Environment and all associated WebView2 objects. 33659 /// 33660 /// The default value for ScriptLocale will depend on the WebView2 language 33661 /// and OS region. If the language portions of the WebView2 language and OS region 33662 /// match, then it will use the OS region. Otherwise, it will use the WebView2 33663 /// language. 33664 /// 33665 /// | OS Region | WebView2 Language | Default WebView2 ScriptLocale | 33666 /// |-----------|-------------------|-------------------------------| 33667 /// | en-GB | en-US | en-GB | 33668 /// | es-MX | en-US | en-US | 33669 /// | en-US | en-GB | en-US | 33670 /// 33671 /// You can set the ScriptLocale to the empty string to get the default ScriptLocale value. 33672 /// 33673 /// Use OS specific APIs to determine the OS region to use with this property 33674 /// if you want to match the OS. For example: 33675 /// 33676 /// Win32 C++: 33677 /// ```cpp 33678 /// wchar_t osLocale[LOCALE_NAME_MAX_LENGTH] = {0}; 33679 /// GetUserDefaultLocaleName(osLocale, LOCALE_NAME_MAX_LENGTH); 33680 /// ``` 33681 /// 33682 /// The caller must free the returned string with `CoTaskMemFree`. See 33683 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33684 /// \snippet AppWindow.cpp ScriptLocaleSetting 33685 @(" propget") 33686 HRESULT get_ScriptLocale(@("out, retval") LPWSTR* locale); 33687 /// Sets the `ScriptLocale` property. 33688 @(" propput") 33689 HRESULT put_ScriptLocale(in LPCWSTR locale); 33690 } 33691 33692 /// The shared buffer object that is created by [CreateSharedBuffer](/microsoft-edge/webview2/reference/win32/icorewebview2environment12#createsharedbuffer). 33693 /// The object is presented to script as ArrayBuffer when posted to script with 33694 /// [PostSharedBufferToScript](/microsoft-edge/webview2/reference/win32/icorewebview2_17#postsharedbuffertoscript). 33695 const GUID IID_ICoreWebView2SharedBuffer = ICoreWebView2SharedBuffer.iid; 33696 33697 interface ICoreWebView2SharedBuffer : IUnknown 33698 { 33699 static const GUID iid = { 0xB747A495,0x0C6F,0x449E,[ 0x97,0xB8,0x2F,0x81,0xE9,0xD6,0xAB,0x43 ] }; 33700 /// The size of the shared buffer in bytes. 33701 @(" propget") 33702 HRESULT get_Size(@("out, retval") UINT64* value); 33703 33704 /// The memory address of the shared buffer. 33705 @(" propget") 33706 HRESULT get_Buffer(@("out, retval") BYTE** value); 33707 33708 /// Get an IStream object that can be used to access the shared buffer. 33709 HRESULT OpenStream(@("out, retval") IStream** value); 33710 33711 /// Returns a handle to the file mapping object that backs this shared buffer. 33712 /// The returned handle is owned by the shared buffer object. You should not 33713 /// call CloseHandle on it. 33714 /// Normal app should use `Buffer` or `OpenStream` to get memory address 33715 /// or IStream object to access the buffer. 33716 /// For advanced scenarios, you could use file mapping APIs to obtain other views 33717 /// or duplicate this handle to another application process and create a view from 33718 /// the duplicated handle in that process to access the buffer from that separate process. 33719 @(" propget") 33720 HRESULT get_FileMappingHandle(@("out, retval") HANDLE* value); 33721 33722 /// Release the backing shared memory. The application should call this API when no 33723 /// access to the buffer is needed any more, to ensure that the underlying resources 33724 /// are released timely even if the shared buffer object itself is not released due to 33725 /// some leaked reference. 33726 /// After the shared buffer is closed, the buffer address and file mapping handle previously 33727 /// obtained becomes invalid and cannot be used anymore. Accessing properties of the object 33728 /// will fail with `RO_E_CLOSED`. Operations like Read or Write on the IStream objects returned 33729 /// from `OpenStream` will fail with `RO_E_CLOSED`. `PostSharedBufferToScript` will also 33730 /// fail with `RO_E_CLOSED`. 33731 /// 33732 /// The script code should call `chrome.webview.releaseBuffer` with 33733 /// the shared buffer as the parameter to release underlying resources as soon 33734 /// as it does not need access the shared buffer any more. 33735 /// When script tries to access the buffer after calling `chrome.webview.releaseBuffer`, 33736 /// JavaScript `TypeError` exception will be raised complaining about accessing a 33737 /// detached ArrayBuffer, the same exception when trying to access a transferred ArrayBuffer. 33738 /// 33739 /// Closing the buffer object on native side doesn't impact access from Script and releasing 33740 /// the buffer from script doesn't impact access to the buffer from native side. 33741 /// The underlying shared memory will be released by the OS when both native and script side 33742 /// release the buffer. 33743 HRESULT Close(); 33744 } 33745 33746 /// Representation of a DOM 33747 /// [File](https://developer.mozilla.org/en-US/docs/Web/API/File) object 33748 /// passed via WebMessage. You can use this object to obtain the path of a 33749 /// File dropped on WebView2. 33750 /// \snippet ScenarioDragDrop.cpp DroppedFilePath 33751 const GUID IID_ICoreWebView2File = ICoreWebView2File.iid; 33752 33753 interface ICoreWebView2File : IUnknown 33754 { 33755 static const GUID iid = { 0xf2c19559,0x6bc1,0x4583,[ 0xa7,0x57,0x90,0x02,0x1b,0xe9,0xaf,0xec ] }; 33756 /// Get the absolute file path. 33757 @(" propget") 33758 HRESULT get_Path(@("out, retval") LPWSTR* path); 33759 } 33760 33761 /// Read-only collection of generic objects. 33762 const GUID IID_ICoreWebView2ObjectCollectionView = ICoreWebView2ObjectCollectionView.iid; 33763 33764 interface ICoreWebView2ObjectCollectionView : IUnknown 33765 { 33766 static const GUID iid = { 0x0f36fd87,0x4f69,0x4415,[ 0x98,0xda,0x88,0x8f,0x89,0xfb,0x9a,0x33 ] }; 33767 /// Gets the number of items in the collection. 33768 @(" propget") 33769 HRESULT get_Count(@("out, retval") UINT32* value); 33770 33771 /// Gets the object at the specified index. Cast the object to the native type 33772 /// to access its specific properties. 33773 HRESULT GetValueAtIndex(in UINT32 index, 33774 @("out, retval") IUnknown * value); 33775 } 33776 33777 /// Extension of WebMessageReceivedEventArgs to provide access to additional 33778 /// WebMessage objects. 33779 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs2 = ICoreWebView2WebMessageReceivedEventArgs2.iid; 33780 33781 interface ICoreWebView2WebMessageReceivedEventArgs2 : ICoreWebView2WebMessageReceivedEventArgs 33782 { 33783 static const GUID iid = { 0x06fc7ab7,0xc90c,0x4297,[ 0x93,0x89,0x33,0xca,0x01,0xcf,0x6d,0x5e ] }; 33784 /// Additional received WebMessage objects. To pass `additionalObjects` via 33785 /// WebMessage to the app, use the 33786 /// `chrome.webview.postMessageWithAdditionalObjects` content API. 33787 /// Any DOM object type that can be natively representable that has been 33788 /// passed in to `additionalObjects` parameter will be accessible here. 33789 /// Currently a WebMessage object can be the `ICoreWebView2File` type. 33790 /// Entries in the collection can be `nullptr` if `null` or `undefined` was 33791 /// passed. 33792 @(" propget") 33793 HRESULT get_AdditionalObjects( 33794 @("out, retval") ICoreWebView2ObjectCollectionView * value); 33795 } 33796 33797 /// This is the ICoreWebView2Profile interface for cookie manager. 33798 const GUID IID_ICoreWebView2Profile5 = ICoreWebView2Profile5.iid; 33799 33800 interface ICoreWebView2Profile5 : ICoreWebView2Profile4 33801 { 33802 static const GUID iid = { 0x2EE5B76E,0x6E80,0x4DF2,[ 0xBC,0xD3,0xD4,0xEC,0x33,0x40,0xA0,0x1B ] }; 33803 /// Get the cookie manager for the profile. All CoreWebView2s associated with this 33804 /// profile share the same cookie values. Changes to cookies in this cookie manager apply to all 33805 /// CoreWebView2s associated with this profile. 33806 /// See ICoreWebView2CookieManager. 33807 /// 33808 /// \snippet ScenarioCookieManagement.cpp CookieManagerProfile 33809 @(" propget") 33810 HRESULT get_CookieManager(@("out, retval") ICoreWebView2CookieManager * cookieManager); 33811 } 33812 33813 /// Interfaces in profile for managing password-autosave and general-autofill. 33814 const GUID IID_ICoreWebView2Profile6 = ICoreWebView2Profile6.iid; 33815 33816 interface ICoreWebView2Profile6 : ICoreWebView2Profile5 33817 { 33818 static const GUID iid = { 0xBD82FA6A,0x1D65,0x4C33,[ 0xB2,0xB4,0x03,0x93,0x02,0x0C,0xC6,0x1B ] }; 33819 /// IsPasswordAutosaveEnabled controls whether autosave for password 33820 /// information is enabled. The IsPasswordAutosaveEnabled property behaves 33821 /// independently of the IsGeneralAutofillEnabled property. When IsPasswordAutosaveEnabled is 33822 /// false, no new password data is saved and no Save/Update Password prompts are displayed. 33823 /// However, if there was password data already saved before disabling this setting, 33824 /// then that password information is auto-populated, suggestions are shown and clicking on 33825 /// one will populate the fields. 33826 /// When IsPasswordAutosaveEnabled is true, password information is auto-populated, 33827 /// suggestions are shown and clicking on one will populate the fields, new data 33828 /// is saved, and a Save/Update Password prompt is displayed. 33829 /// It will take effect immediately after setting. 33830 /// The default value is `FALSE`. 33831 /// This property has the same value as 33832 /// `CoreWebView2Settings.IsPasswordAutosaveEnabled`, and changing one will 33833 /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile` 33834 /// will share the same value for this property, so for the `CoreWebView2`s 33835 /// with the same profile, their 33836 /// `CoreWebView2Settings.IsPasswordAutosaveEnabled` and 33837 /// `CoreWebView2Profile.IsPasswordAutosaveEnabled` will always have the same 33838 /// value. 33839 /// 33840 /// \snippet SettingsComponent.cpp ToggleProfilePasswordAutosaveEnabled 33841 @(" propget") 33842 HRESULT get_IsPasswordAutosaveEnabled(@("out, retval") BOOL* value); 33843 33844 /// Set the IsPasswordAutosaveEnabled property. 33845 @(" propput") 33846 HRESULT put_IsPasswordAutosaveEnabled(in BOOL value); 33847 33848 /// IsGeneralAutofillEnabled controls whether autofill for information 33849 /// like names, street and email addresses, phone numbers, and arbitrary input 33850 /// is enabled. This excludes password and credit card information. When 33851 /// IsGeneralAutofillEnabled is false, no suggestions appear, and no new information 33852 /// is saved. When IsGeneralAutofillEnabled is true, information is saved, suggestions 33853 /// appear and clicking on one will populate the form fields. 33854 /// It will take effect immediately after setting. 33855 /// The default value is `TRUE`. 33856 /// This property has the same value as 33857 /// `CoreWebView2Settings.IsGeneralAutofillEnabled`, and changing one will 33858 /// change the other. All `CoreWebView2`s with the same `CoreWebView2Profile` 33859 /// will share the same value for this property, so for the `CoreWebView2`s 33860 /// with the same profile, their 33861 /// `CoreWebView2Settings.IsGeneralAutofillEnabled` and 33862 /// `CoreWebView2Profile.IsGeneralAutofillEnabled` will always have the same 33863 /// value. 33864 /// 33865 /// \snippet SettingsComponent.cpp ToggleProfileGeneralAutofillEnabled 33866 @(" propget") 33867 HRESULT get_IsGeneralAutofillEnabled(@("out, retval") BOOL* value); 33868 33869 /// Set the IsGeneralAutofillEnabled property. 33870 @(" propput") 33871 HRESULT put_IsGeneralAutofillEnabled(in BOOL value); 33872 } 33873 33874 /// This is a continuation of the `ICoreWebView2NewWindowRequestedEventArgs` interface. 33875 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs3 = ICoreWebView2NewWindowRequestedEventArgs3.iid; 33876 33877 interface ICoreWebView2NewWindowRequestedEventArgs3 : ICoreWebView2NewWindowRequestedEventArgs2 33878 { 33879 static const GUID iid = { 0x842bed3c,0x6ad6,0x4dd9,[ 0xb9,0x38,0x28,0xc9,0x66,0x67,0xad,0x66 ] }; 33880 /// The frame info of the frame where the new window request originated. The 33881 /// `OriginalSourceFrameInfo` is a snapshot of frame information at the time when the 33882 /// new window was requested. See `ICoreWebView2FrameInfo` for details on frame 33883 /// properties. 33884 @(" propget") 33885 HRESULT get_OriginalSourceFrameInfo( 33886 @("out, retval") ICoreWebView2FrameInfo * frameInfo); 33887 } 33888 33889 /// Interfaces in profile for managing browser extensions. 33890 const GUID IID_ICoreWebView2Profile7 = ICoreWebView2Profile7.iid; 33891 33892 interface ICoreWebView2Profile7 : ICoreWebView2Profile6 33893 { 33894 static const GUID iid = { 0x7b4c7906,0xa1aa,0x4cb4,[ 0xb7,0x23,0xdb,0x09,0xf8,0x13,0xd5,0x41 ] }; 33895 /// Adds the [browser extension](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions) 33896 /// using the extension path for unpacked extensions from the local device. Extension is 33897 /// running right after installation. 33898 /// The extension folder path is the topmost folder of an unpacked browser extension and 33899 /// contains the browser extension manifest file. 33900 /// If the `extensionFolderPath` is an invalid path or doesn't contain the extension manifest.json 33901 /// file, this function will return `ERROR_FILE_NOT_FOUND` to callers. 33902 /// Installed extension will default `IsEnabled` to true. 33903 /// When `AreBrowserExtensionsEnabled` is `FALSE`, `AddBrowserExtension` will fail and return 33904 /// HRESULT `ERROR_NOT_SUPPORTED`. 33905 /// During installation, the content of the extension is not copied to the user data folder. 33906 /// Once the extension is installed, changing the content of the extension will cause the 33907 /// extension to be removed from the installed profile. 33908 /// When an extension is added the extension is persisted in the corresponding profile. The 33909 /// extension will still be installed the next time you use this profile. 33910 /// When an extension is installed from a folder path, adding the same extension from the same 33911 /// folder path means reinstalling this extension. When two extensions with the same Id are 33912 /// installed, only the later installed extension will be kept. 33913 /// 33914 /// Extensions that are designed to include any UI interactions (e.g. icon, badge, pop up, etc.) 33915 /// can be loaded and used but will have missing UI entry points due to the lack of browser 33916 /// UI elements to host these entry points in WebView2. 33917 /// 33918 /// The following summarizes the possible error values that can be returned from 33919 /// `AddBrowserExtension` and a description of why these errors occur. 33920 /// 33921 /// Error value | Description 33922 /// ----------------------------------------------- | -------------------------- 33923 /// `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)` | Extensions are disabled. 33924 /// `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` | Cannot find `manifest.json` file or it is not a valid extension manifest. 33925 /// `E_ACCESSDENIED` | Cannot load extension with file or directory name starting with \"_\", reserved for use by the system. 33926 /// `E_FAIL` | Extension failed to install with other unknown reasons. 33927 HRESULT AddBrowserExtension(in LPCWSTR extensionFolderPath, /+[in]+/ ICoreWebView2ProfileAddBrowserExtensionCompletedHandler handler); 33928 /// Gets a snapshot of the set of extensions installed at the time `GetBrowserExtensions` is 33929 /// called. If an extension is installed or uninstalled after `GetBrowserExtensions` completes, 33930 /// the list returned by `GetBrowserExtensions` remains the same. 33931 /// When `AreBrowserExtensionsEnabled` is `FALSE`, `GetBrowserExtensions` won't return any 33932 /// extensions on current user profile. 33933 HRESULT GetBrowserExtensions(/+[in]+/ ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler handler); 33934 } 33935 33936 /// Provides a set of properties for managing an Extension, which includes 33937 /// an ID, name, and whether it is enabled or not, and the ability to Remove 33938 /// the Extension, and enable or disable it. 33939 const GUID IID_ICoreWebView2BrowserExtension = ICoreWebView2BrowserExtension.iid; 33940 33941 interface ICoreWebView2BrowserExtension : IUnknown 33942 { 33943 static const GUID iid = { 0x7EF7FFA0,0xFAC5,0x462C,[ 0xB1,0x89,0x3D,0x9E,0xDB,0xE5,0x75,0xDA ] }; 33944 /// This is the browser extension's ID. This is the same browser extension ID returned by 33945 /// the browser extension API [`chrome.runtime.id`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/id). 33946 /// Please see that documentation for more details on how the ID is generated. 33947 /// After an extension is removed, calling `Id` will return the id of the extension that is removed. 33948 /// The caller must free the returned string with `CoTaskMemFree`. See 33949 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33950 @(" propget") 33951 HRESULT get_Id(@("out, retval") LPWSTR* value); 33952 /// This is the browser extension's name. This value is defined in this browser extension's 33953 /// manifest.json file. If manifest.json define extension's localized name, this value will 33954 /// be the localized version of the name. 33955 /// Please see [Manifest.json name](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/name) 33956 /// for more details. 33957 /// After an extension is removed, calling `Name` will return the name of the extension that is removed. 33958 /// The caller must free the returned string with `CoTaskMemFree`. See 33959 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 33960 @(" propget") 33961 HRESULT get_Name(@("out, retval") LPWSTR* value); 33962 /// Removes this browser extension from its WebView2 Profile. The browser extension is removed 33963 /// immediately including from all currently running HTML documents associated with this 33964 /// WebView2 Profile. The removal is persisted and future uses of this profile will not have this 33965 /// extension installed. After an extension is removed, calling `Remove` again will cause an exception. 33966 HRESULT Remove(/+[in]+/ ICoreWebView2BrowserExtensionRemoveCompletedHandler handler); 33967 /// If `isEnabled` is true then the Extension is enabled and running in WebView instances. 33968 /// If it is false then the Extension is disabled and not running in WebView instances. 33969 /// When a Extension is first installed, `IsEnable` are default to be `TRUE`. 33970 /// `isEnabled` is persisted per profile. 33971 /// After an extension is removed, calling `isEnabled` will return the value at the time it was removed. 33972 @(" propget") 33973 HRESULT get_IsEnabled(@("out, retval") BOOL* value); 33974 /// Sets whether this browser extension is enabled or disabled. This change applies immediately 33975 /// to the extension in all HTML documents in all WebView2s associated with this profile. 33976 /// After an extension is removed, calling `Enable` will not change the value of `IsEnabled`. 33977 HRESULT Enable(in BOOL isEnabled, /+[in]+/ ICoreWebView2BrowserExtensionEnableCompletedHandler handler); 33978 } 33979 33980 /// The caller implements this interface to receive the result of removing 33981 /// the browser Extension from the Profile. 33982 const GUID IID_ICoreWebView2BrowserExtensionRemoveCompletedHandler = ICoreWebView2BrowserExtensionRemoveCompletedHandler.iid; 33983 33984 interface ICoreWebView2BrowserExtensionRemoveCompletedHandler : IUnknown 33985 { 33986 static const GUID iid = { 0x8E41909A,0x9B18,0x4BB1,[ 0x8C,0xDF,0x93,0x0F,0x46,0x7A,0x50,0xBE ] }; 33987 /// Provides the result of the browser extension Remove operation. 33988 HRESULT Invoke(in HRESULT errorCode); 33989 } 33990 33991 /// The caller implements this interface to receive the result of setting the 33992 /// browser Extension as enabled or disabled. If enabled, the browser Extension is 33993 /// running in WebView instances. If disabled, the browser Extension is not running in WebView instances. 33994 const GUID IID_ICoreWebView2BrowserExtensionEnableCompletedHandler = ICoreWebView2BrowserExtensionEnableCompletedHandler.iid; 33995 33996 interface ICoreWebView2BrowserExtensionEnableCompletedHandler : IUnknown 33997 { 33998 static const GUID iid = { 0x30C186CE,0x7FAD,0x421F,[ 0xA3,0xBC,0xA8,0xEA,0xF0,0x71,0xDD,0xB8 ] }; 33999 /// Provides the result of the browser extension enable operation. 34000 HRESULT Invoke(in HRESULT errorCode); 34001 } 34002 34003 /// Provides a set of properties for managing browser Extension Lists from user profile. This 34004 /// includes the number of browser Extensions in the list, and the ability to get an browser 34005 /// Extension from the list at a particular index. 34006 const GUID IID_ICoreWebView2BrowserExtensionList = ICoreWebView2BrowserExtensionList.iid; 34007 34008 interface ICoreWebView2BrowserExtensionList : IUnknown 34009 { 34010 static const GUID iid = { 0x2EF3D2DC,0xBD5F,0x4F4D,[ 0x90,0xAF,0xFD,0x67,0x79,0x8F,0x0C,0x2F ] }; 34011 /// The number of browser Extensions in the list. 34012 @(" propget") 34013 HRESULT get_Count(@("out, retval") UINT* count); 34014 /// Gets the browser Extension located in the browser Extension List at the given index. 34015 HRESULT GetValueAtIndex(in UINT index, 34016 @("out, retval") ICoreWebView2BrowserExtension * extension); 34017 } 34018 34019 /// The caller implements this interface to receive the result of 34020 /// getting the browser Extensions. 34021 const GUID IID_ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler = ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler.iid; 34022 34023 interface ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler : IUnknown 34024 { 34025 static const GUID iid = { 0xFCE16A1C,0xF107,0x4601,[ 0x8B,0x75,0xFC,0x49,0x40,0xAE,0x25,0xD0 ] }; 34026 /// Provides the browser extension list for the requested user profile. 34027 HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2BrowserExtensionList extensionList); 34028 } 34029 34030 /// The caller implements this interface to receive the result 34031 /// of loading an browser Extension. 34032 const GUID IID_ICoreWebView2ProfileAddBrowserExtensionCompletedHandler = ICoreWebView2ProfileAddBrowserExtensionCompletedHandler.iid; 34033 34034 interface ICoreWebView2ProfileAddBrowserExtensionCompletedHandler : IUnknown 34035 { 34036 static const GUID iid = { 0xDF1AAB27,0x82B9,0x4AB6,[ 0xAA,0xE8,0x01,0x7A,0x49,0x39,0x8C,0x14 ] }; 34037 /// Provides the result of the `AddBrowserExtension` operation.g 34038 HRESULT Invoke(in HRESULT errorCode, /+[in]+/ ICoreWebView2BrowserExtension extension); 34039 } 34040 34041 /// This is the profile interface that manages profile 34042 /// deletion. 34043 const GUID IID_ICoreWebView2Profile8 = ICoreWebView2Profile8.iid; 34044 34045 interface ICoreWebView2Profile8 : ICoreWebView2Profile7 34046 { 34047 static const GUID iid = { 0xfbf70c2f,0xeb1f,0x4383,[ 0x85,0xa0,0x16,0x3e,0x92,0x04,0x40,0x11 ] }; 34048 /// After the API is called, the profile will be marked for deletion. The 34049 /// local profile's directory will be deleted at browser process exit. If it 34050 /// fails to delete, because something else is holding the files open, 34051 /// WebView2 will try to delete the profile at all future browser process 34052 /// starts until successful. 34053 /// The corresponding CoreWebView2s will be closed and the 34054 /// CoreWebView2Profile.Deleted event will be raised. See 34055 /// `CoreWebView2Profile.Deleted` for more information. 34056 /// If you try to create a new profile with the same name as an existing 34057 /// profile that has been marked as deleted but hasn't yet been deleted, 34058 /// profile creation will fail with HRESULT_FROM_WIN32(ERROR_DELETE_PENDING). 34059 /// 34060 /// \snippet SettingsComponent.cpp DeleteProfile 34061 HRESULT Delete(); 34062 34063 /// Add an event handler for the `Deleted` event. The `Deleted` event is 34064 /// raised when the profile is marked for deletion. When this event is 34065 /// raised, the CoreWebView2Profile and its corresponding CoreWebView2s have 34066 /// been closed, and cannot be used anymore. 34067 /// 34068 /// \snippet AppWindow.cpp ProfileDeleted 34069 HRESULT add_Deleted( 34070 /+[in]+/ ICoreWebView2ProfileDeletedEventHandler eventHandler, 34071 @("out") EventRegistrationToken* token); 34072 34073 /// Removes an event handler previously added with `add_Deleted`. 34074 HRESULT remove_Deleted( 34075 in EventRegistrationToken token); 34076 } 34077 34078 /// Receives the `CoreWebView2Profile.Deleted` event. 34079 const GUID IID_ICoreWebView2ProfileDeletedEventHandler = ICoreWebView2ProfileDeletedEventHandler.iid; 34080 34081 interface ICoreWebView2ProfileDeletedEventHandler : IUnknown 34082 { 34083 static const GUID iid = { 0xDF35055D,0x772E,0x4DBE,[ 0xB7,0x43,0x5F,0xBF,0x74,0xA2,0xB2,0x58 ] }; 34084 /// Called to provide the implementer with the event args for the 34085 /// profile deleted event. No event args exist and the `args` 34086 /// parameter is set to `null`. 34087 HRESULT Invoke( 34088 /+[in]+/ ICoreWebView2Profile sender, 34089 /+[in]+/ IUnknown args); 34090 } 34091 34092 // End of interfaces 34093 34094 /// DLL export to create a WebView2 environment with a custom version of 34095 /// WebView2 Runtime, user data folder, and with or without additional options. 34096 /// 34097 /// When WebView2 experimental APIs are used, make sure to provide a valid `environmentOptions` 34098 /// so that WebView2 runtime knows which version of the SDK that the app is using. Otherwise, 34099 /// WebView2 runtime assumes that the version of the SDK being used is the latest 34100 /// version known to it, which might not be the version of the SDK being used. 34101 /// This wrong SDK version assumption could result in some experimental APIs not being available. 34102 /// 34103 /// The WebView2 environment and all other WebView2 objects are single threaded 34104 /// and have dependencies on Windows components that require COM to be 34105 /// initialized for a single-threaded apartment. The app is expected to run 34106 /// `CoInitializeEx` before running `CreateCoreWebView2EnvironmentWithOptions`. 34107 /// 34108 /// ```text 34109 /// CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 34110 /// ``` 34111 /// 34112 /// If `CoInitializeEx` did not run or previously ran with 34113 /// `COINIT_MULTITHREADED`, `CreateCoreWebView2EnvironmentWithOptions` fails 34114 /// with one of the following errors. 34115 /// 34116 /// ```text 34117 /// CO_E_NOTINITIALIZED - if CoInitializeEx was not called 34118 /// RPC_E_CHANGED_MODE - if CoInitializeEx was previously called with 34119 /// COINIT_MULTITHREADED 34120 /// ``` 34121 /// 34122 /// 34123 /// Use `browserExecutableFolder` to specify whether WebView2 controls use a 34124 /// fixed or installed version of the WebView2 Runtime that exists on a user 34125 /// machine. To use a fixed version of the WebView2 Runtime, pass the 34126 /// folder path that contains the fixed version of the WebView2 Runtime to 34127 /// `browserExecutableFolder`. BrowserExecutableFolder supports both relative 34128 /// (to the application's executable) and absolute files paths. 34129 /// To create WebView2 controls that use the 34130 /// installed version of the WebView2 Runtime that exists on user machines, 34131 /// pass a `null` or empty string to `browserExecutableFolder`. In this 34132 /// scenario, the API tries to find a compatible version of the WebView2 34133 /// Runtime that is installed on the user machine (first at the machine level, 34134 /// and then per user) using the selected channel preference. The path of 34135 /// fixed version of the WebView2 Runtime should not contain 34136 /// `\Edge\Application\`. When such a path is used, the API fails 34137 /// with `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)`. 34138 /// 34139 /// The default channel search order is the WebView2 Runtime, Beta, Dev, and 34140 /// Canary. When an override `WEBVIEW2_RELEASE_CHANNEL_PREFERENCE` environment 34141 /// variable or applicable `releaseChannelPreference` registry value is set to 34142 /// `1`, the channel search order is reversed. 34143 /// 34144 /// You may specify the `userDataFolder` to change the default user data 34145 /// folder location for WebView2. The path is either an absolute file path 34146 /// or a relative file path that is interpreted as relative to the compiled 34147 /// code for the current process. For UWP apps, the default user data 34148 /// folder is the app data folder for the package. For non-UWP apps, the 34149 /// default user data (`{Executable File Name}.WebView2`) folder is 34150 /// created in the same directory next to the compiled code for the app. 34151 /// WebView2 creation fails if the compiled code is running in a directory in 34152 /// which the process does not have permission to create a new directory. The 34153 /// app is responsible to clean up the associated user data folder when it 34154 /// is done. 34155 /// 34156 /// \> [!NOTE]\n\> As a browser process may be shared among WebViews, WebView creation fails 34157 /// with `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` if the specified options 34158 /// does not match the options of the WebViews that are currently running in 34159 /// the shared browser process. 34160 /// 34161 /// `environmentCreatedHandler` is the handler result to the async operation 34162 /// that contains the `WebView2Environment` that was created. 34163 /// 34164 /// The `browserExecutableFolder`, `userDataFolder` and 34165 /// `additionalBrowserArguments` of the `environmentOptions` may be overridden 34166 /// by values either specified in environment variables or in the registry. 34167 /// 34168 /// When creating a `WebView2Environment` the following environment variables 34169 /// are verified. 34170 /// 34171 /// ```text 34172 /// WEBVIEW2_BROWSER_EXECUTABLE_FOLDER 34173 /// WEBVIEW2_USER_DATA_FOLDER 34174 /// WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS 34175 /// WEBVIEW2_RELEASE_CHANNEL_PREFERENCE 34176 /// ``` 34177 /// 34178 /// If you find an override environment variable, use the 34179 /// `browserExecutableFolder` and `userDataFolder` values as replacements for 34180 /// the corresponding values in `CreateCoreWebView2EnvironmentWithOptions` 34181 /// parameters. If `additionalBrowserArguments` is specified in environment 34182 /// variable or in the registry, it is appended to the corresponding values in 34183 /// `CreateCoreWebView2EnvironmentWithOptions` parameters. 34184 /// 34185 /// While not strictly overrides, additional environment variables may be set. 34186 /// 34187 /// ```text 34188 /// WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER 34189 /// ``` 34190 /// 34191 /// When found with a non-empty value, this indicates that the WebView is being 34192 /// launched under a script debugger. In this case, the WebView issues a 34193 /// `Page.waitForDebugger` CDP command that runs the script inside the WebView 34194 /// to pause on launch, until a debugger issues a corresponding 34195 /// `Runtime.runIfWaitingForDebugger` CDP command to resume the runtime. 34196 /// 34197 /// \> [!NOTE]\n\> The following environment variable does not have a registry key 34198 /// equivalent: `WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER`. 34199 /// 34200 /// When found with a non-empty value, it indicates that the WebView is being 34201 /// launched under a script debugger that also supports host apps that use 34202 /// multiple WebViews. The value is used as the identifier for a named pipe 34203 /// that is opened and written to when a new WebView is created by the host 34204 /// app. The payload should match the payload of the `remote-debugging-port` 34205 /// JSON target and an external debugger may use it to attach to a specific 34206 /// WebView instance. The format of the pipe created by the debugger should be 34207 /// `\\.\pipe\WebView2\Debugger\{app_name}\{pipe_name}`, where the following 34208 /// are true. 34209 /// 34210 /// * `{app_name}` is the host app exe file name, for example, 34211 /// `WebView2Example.exe` 34212 /// * `{pipe_name}` is the value set for `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER` 34213 /// 34214 /// To enable debugging of the targets identified by the JSON, you must set the 34215 /// `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variable to send 34216 /// `--remote-debugging-port={port_num}`, where the following is true. 34217 /// 34218 /// * `{port_num}` is the port on which the CDP server binds. 34219 /// 34220 /// \> [!WARNING]\n\> If you set both `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER` and 34221 /// `WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS` environment variables, the 34222 /// WebViews hosted in your app and associated contents may exposed to 3rd 34223 /// party apps such as debuggers. 34224 /// 34225 /// \> [!NOTE]\n\> The following environment variable does not have a registry key 34226 /// equivalent: `WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER`. 34227 /// 34228 /// If none of those environment variables exist, then the registry is examined 34229 /// next. The following registry values are verified. 34230 /// 34231 /// ```text 34232 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder 34233 /// "{AppId}"="" 34234 /// 34235 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannelPreference 34236 /// "{AppId}"="" 34237 /// 34238 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments 34239 /// "{AppId}"="" 34240 /// 34241 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\UserDataFolder 34242 /// "{AppId}"="" 34243 /// ``` 34244 /// 34245 /// Use a group policy under **Administrative Templates** > 34246 /// **Microsoft Edge WebView2** to configure `browserExecutableFolder` and 34247 /// `releaseChannelPreference`. 34248 /// 34249 /// In the unlikely scenario where some instances of WebView are open during a 34250 /// browser update, the deletion of the previous WebView2 Runtime may be 34251 /// blocked. To avoid running out of disk space, a new WebView creation fails 34252 /// with `HRESULT_FROM_WIN32(ERROR_DISK_FULL)` if it detects that too many 34253 /// previous WebView2 Runtime versions exist. 34254 /// 34255 /// The default maximum number of WebView2 Runtime versions allowed is `20`. 34256 /// To override the maximum number of the previous WebView2 Runtime versions 34257 /// allowed, set the value of the following environment variable. 34258 /// 34259 /// ```text 34260 /// COREWEBVIEW2_MAX_INSTANCES 34261 /// ``` 34262 /// 34263 /// If the Webview depends upon an installed WebView2 Runtime version and it is 34264 /// uninstalled, any subsequent creation fails with 34265 /// `HRESULT_FROM_WIN32(ERROR_PRODUCT_UNINSTALLED)`. 34266 /// 34267 /// First verify with Root as `HKLM` and then `HKCU`. `AppId` is first set to 34268 /// the Application User Model ID of the process, then if no corresponding 34269 /// registry key, the `AppId` is set to the compiled code name of the process, 34270 /// or if that is not a registry key then `*`. If an override registry key is 34271 /// found, use the `browserExecutableFolder` and `userDataFolder` registry 34272 /// values as replacements and append `additionalBrowserArguments` registry 34273 /// values for the corresponding values in 34274 /// `CreateCoreWebView2EnvironmentWithOptions` parameters. 34275 /// 34276 /// The following summarizes the possible error values that can be returned from 34277 /// `CreateCoreWebView2EnvironmentWithOptions` and a description of why these 34278 /// errors occur. 34279 /// 34280 /// Error value | Description 34281 /// ----------------------------------------------- | -------------------------- 34282 /// `CO_E_NOTINITIALIZED` | CoInitializeEx was not called. 34283 /// `RPC_E_CHANGED_MODE` | CoInitializeEx was previously called with COINIT_MULTITHREADED. 34284 /// `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)` | *\\Edge\\Application* path used in browserExecutableFolder. 34285 /// `HRESULT_FROM_WIN32(ERROR_INVALID_STATE)` | Specified options do not match the options of the WebViews that are currently running in the shared browser process. 34286 /// `HRESULT_FROM_WIN32(ERROR_DISK_FULL)` | In the unlikely scenario where some instances of WebView are open during a browser update, the deletion of the previous WebView2 Runtime may be blocked. To avoid running out of disk space, a new WebView creation fails with `HRESULT_FROM_WIN32(ERROR_DISK_FULL)` if it detects that too many previous WebView2 Runtime versions exist. 34287 /// `HRESULT_FROM_WIN32(ERROR_PRODUCT_UNINSTALLED)` | If the Webview depends upon an installed WebView2 Runtime version and it is uninstalled. 34288 /// `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` | Could not find Edge installation. 34289 /// `HRESULT_FROM_WIN32(ERROR_FILE_EXISTS)` | User data folder cannot be created because a file with the same name already exists. 34290 /// `E_ACCESSDENIED` | Unable to create user data folder, Access Denied. 34291 /// `E_FAIL` | Edge runtime unable to start. 34292 34293 extern(Windows) HRESULT CreateCoreWebView2EnvironmentWithOptions(PCWSTR browserExecutableFolder, PCWSTR userDataFolder, ICoreWebView2EnvironmentOptions environmentOptions, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler); 34294 34295 /// Creates an evergreen WebView2 Environment using the installed WebView2 34296 /// Runtime version. This is equivalent to running 34297 /// `CreateCoreWebView2EnvironmentWithOptions` with `nullptr` for 34298 /// `browserExecutableFolder`, `userDataFolder`, `additionalBrowserArguments`. 34299 /// For more information, navigate to 34300 /// `CreateCoreWebView2EnvironmentWithOptions`. 34301 34302 extern(Windows) HRESULT CreateCoreWebView2Environment(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler); 34303 34304 /// Get the browser version info including channel name if it is not the 34305 /// WebView2 Runtime. Channel names are Beta, Dev, and Canary. 34306 /// If an override exists for the `browserExecutableFolder` or the channel 34307 /// preference, the override is used. If an override is not specified, then 34308 /// the parameter value passed to 34309 /// `GetAvailableCoreWebView2BrowserVersionString` is used. 34310 /// Returns `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` if it fails to find an 34311 /// installed WebView2 runtime or non-stable Microsoft Edge installation. 34312 /// 34313 /// The caller must free the returned string with `CoTaskMemFree`. See 34314 /// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings). 34315 34316 extern(Windows) HRESULT GetAvailableCoreWebView2BrowserVersionString(PCWSTR browserExecutableFolder, LPWSTR* versionInfo); 34317 34318 /// This method is for anyone want to compare version correctly to determine 34319 /// which version is newer, older or same. Use it to determine whether 34320 /// to use webview2 or certain feature based upon version. Sets the value of 34321 /// result to `-1`, `0` or `1` if `version1` is less than, equal or greater 34322 /// than `version2` respectively. Returns `E_INVALIDARG` if it fails to parse 34323 /// any of the version strings or any input parameter is `null`. Directly use 34324 /// the `versionInfo` obtained from 34325 /// `GetAvailableCoreWebView2BrowserVersionString` with input, channel 34326 /// information is ignored. 34327 34328 extern(Windows) HRESULT CompareBrowserVersions(PCWSTR version1, PCWSTR version2, int* result); 34329 34330 } 34331 } 34332 }