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 2023-present: cef_binary_119.3.1+gf768881+chromium-119.0.6045.124_linux64_minimal.tar.bz2 13 14 November 2022: cef_binary_107.1.9+g1f0a21a+chromium-107.0.5304.110_linux64_minimal.tar.bz2 15 16 November 2021: 95.7.17+g4208276+chromium-95.0.4638.69 17 18 Note my ceftranslate.d for instructions to start the update process. 19 20 Then to install the cef put in the Resources in the Release directory (*.pak and *.dat 21 out of Resources, failure to do this will cause an abort on ICU file descriptor things) 22 and copy the locales to /opt/cef/Resources/Locales 23 24 You can download compatible builds from https://cef-builds.spotifycdn.com/index.html 25 just make sure to put in the version filter and check "all builds" to match it. 26 27 You do NOT actually need the cef to build the application, but it must be 28 on the user's machine to run it. It looks in /opt/cef/ on Linux. 29 30 Work in progress. DO NOT USE YET as I am prolly gonna break everything too. 31 32 On Windows, you need to distribute the WebView2Loader.dll with your exe. That 33 is found in the web view 2 sdk. Furthermore, users will have to install the runtime. 34 35 Please note; the Microsoft terms and conditions say they may be able to collect 36 information about your users if you use this on Windows. 37 see: https://developer.microsoft.com/en-us/microsoft-edge/webview2/ 38 39 40 +/ 41 module arsd.webview; 42 43 enum WebviewEngine { 44 none, 45 cef, 46 wv2, 47 webkit_gtk 48 } 49 // see activeEngine which is an enum you can static if on 50 51 52 // I might recover this gtk thing but i don't like gtk 53 // dmdi webview -version=linux_gtk -version=Demo 54 55 // the setup link for Microsoft: 56 // https://go.microsoft.com/fwlink/p/?LinkId=2124703 57 58 59 version(Windows) { 60 import arsd.simpledisplay; 61 import arsd.com; 62 import core.atomic; 63 64 //import std.stdio; 65 66 T callback(T)(typeof(&T.init.Invoke) dg) { 67 return new class T { 68 extern(Windows): 69 70 static if(is(typeof(T.init.Invoke) R == return)) 71 static if(is(typeof(T.init.Invoke) P == __parameters)) 72 override R Invoke(P _args_) { 73 return dg(_args_); 74 } 75 76 override HRESULT QueryInterface(const (IID)*riid, LPVOID *ppv) { 77 if (IID_IUnknown == *riid) { 78 *ppv = cast(void*) cast(IUnknown) this; 79 } 80 else if (T.iid == *riid) { 81 *ppv = cast(void*) cast(T) this; 82 } 83 else { 84 *ppv = null; 85 return E_NOINTERFACE; 86 } 87 88 AddRef(); 89 return NOERROR; 90 } 91 92 shared LONG count = 0; 93 ULONG AddRef() { 94 return atomicOp!"+="(count, 1); 95 } 96 ULONG Release() { 97 return atomicOp!"-="(count, 1); 98 } 99 }; 100 } 101 102 enum activeEngine = WebviewEngine.wv2; 103 104 struct RC(T) { 105 private T object; 106 this(T t) { 107 object = t; 108 object.AddRef(); 109 } 110 this(this) { 111 if(object is null) return; 112 object.AddRef(); 113 } 114 ~this() { 115 if(object is null) return; 116 object.Release(); 117 object = null; 118 } 119 120 bool opCast(T:bool)() nothrow { 121 return inner !is null; 122 } 123 124 void opAssign(T obj) { 125 obj.AddRef(); 126 if(object) 127 object.Release(); 128 this.object = obj; 129 } 130 131 T raw() { return object; } 132 133 T returnable() { 134 if(object is null) return null; 135 return object; 136 } 137 138 T passable() { 139 if(object is null) return null; 140 object.AddRef(); 141 return object; 142 } 143 144 static foreach(memberName; __traits(derivedMembers, T)) { 145 mixin ForwardMethod!(memberName); 146 } 147 } 148 149 extern(Windows) 150 alias StringMethod = int delegate(wchar**); 151 152 string toGC(scope StringMethod dg) { 153 wchar* t; 154 auto res = dg(&t); 155 if(res != S_OK) 156 throw new ComException(res); 157 158 auto ot = t; 159 160 string s; 161 162 // FIXME: encode properly in UTF-8 163 while(*t) { 164 s ~= *t; 165 t++; 166 } 167 168 auto ret = s; 169 170 CoTaskMemFree(ot); 171 172 return ret; 173 } 174 175 class ComException : Exception { 176 HRESULT errorCode; 177 this(HRESULT errorCode) { 178 import std.format; 179 super(format("HRESULT: 0x%08x", errorCode)); 180 // FIXME: call FormatMessage 181 } 182 } 183 184 mixin template ForwardMethod(string methodName) { 185 static if(methodName.length > 4 && methodName[0 .. 4] == "put_") { 186 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 187 private alias Type = Params[0]; 188 mixin(q{ @property void } ~ memberName[4 .. $] ~ q{(Type v) { 189 auto errorCode = __traits(getMember, object, memberName)(v); 190 if(errorCode) 191 throw new ComException(errorCode); 192 } 193 }); 194 } else 195 static if(methodName.length > 4 && methodName[0 .. 4] == "get_") { 196 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 197 private alias Type = typeof(*(Params[0].init)); 198 mixin(q{ @property Type } ~ memberName[4 .. $] ~ q{() { 199 Type response; 200 auto errorCode = __traits(getMember, object, memberName)(&response); 201 if(errorCode) 202 throw new ComException(errorCode); 203 return response; 204 } 205 }); 206 } else 207 static if(methodName.length > 4 && methodName[0 .. 4] == "add_") { 208 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 209 alias Handler = Params[0]; 210 alias HandlerDg = typeof(&Handler.init.Invoke); 211 mixin(q{ EventRegistrationToken } ~ memberName ~ q{ (HandlerDg handler) { 212 EventRegistrationToken token; 213 __traits(getMember, object, memberName)(callback!Handler(handler), &token); 214 return token; 215 }}); 216 } else 217 static if(methodName.length > 7 && methodName[0 .. 4] == "remove_") { 218 mixin(q{ void } ~ memberName ~ q{ (EventRegistrationToken token) { 219 __traits(getMember, object, memberName)(token); 220 }}); 221 } else { 222 // I could do the return value things by looking for these comments: 223 // /+[out]+/ but be warned it is possible or a thing to have multiple out params (only one such function in here though i think) 224 // /+[out, retval]+/ 225 // a find/replace could make them a UDA or something. 226 227 static if(is(typeof(__traits(getMember, T, memberName)) Params == function)) 228 static if(is(typeof(__traits(getMember, T, memberName)) Return == return)) 229 230 mixin(q{ Return } ~ memberName ~ q{ (Params p) { 231 // FIXME: check the return value and throw 232 return __traits(getMember, object, memberName)(p); 233 } 234 }); 235 236 } 237 } 238 239 struct Wv2App { 240 static bool active = false; 241 242 static HRESULT code; 243 static bool initialized = false; 244 static RC!ICoreWebView2Environment webview_env; 245 246 @disable this(this); 247 248 static void delegate(RC!ICoreWebView2Environment)[] pending; 249 this(void delegate(RC!ICoreWebView2Environment) withEnvironment) { 250 if(withEnvironment) 251 pending ~= withEnvironment; 252 253 import core.sys.windows.com; 254 CoInitializeEx(null, COINIT_APARTMENTTHREADED); 255 256 active = true; 257 258 auto lib = LoadLibraryW("WebView2Loader.dll"w.ptr); 259 typeof(&CreateCoreWebView2EnvironmentWithOptions) func; 260 261 if(lib is null) 262 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."); 263 func = cast(typeof(func)) GetProcAddress(lib, CreateCoreWebView2EnvironmentWithOptions.mangleof); 264 if(func is null) 265 throw new Exception("CreateCoreWebView2EnvironmentWithOptions failed from WebView2Loader..."); 266 267 auto result = func(null, null, null, 268 callback!(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler)( 269 delegate(error, env) { 270 initialized = true; 271 code = error; 272 273 if(error) 274 return error; 275 276 webview_env = env; 277 278 auto len = pending.length; 279 foreach(item; pending) { 280 item(webview_env); 281 } 282 283 pending = pending[len .. $]; 284 285 return S_OK; 286 } 287 ) 288 ); 289 290 if(result != S_OK) { 291 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) { 292 import std.process; 293 browse("https://go.microsoft.com/fwlink/p/?LinkId=2124703"); 294 } 295 throw new ComException(result); 296 } 297 } 298 299 @disable this(); 300 301 ~this() { 302 active = false; 303 } 304 305 static void useEnvironment(void delegate(RC!ICoreWebView2Environment) withEnvironment) { 306 assert(active); 307 assert(withEnvironment !is null); 308 if(initialized) { 309 if(code) 310 throw new ComException(code); 311 withEnvironment(webview_env); 312 } else 313 pending ~= withEnvironment; 314 } 315 } 316 } 317 318 319 320 /+ 321 interface WebView { 322 void refresh(); 323 void back(); 324 void forward(); 325 void stop(); 326 327 void navigate(string url); 328 329 // the url and line are for error reporting purposes 330 void executeJavascript(string code, string url = null, int line = 0); 331 332 void showDevTools(); 333 334 // these are get/set properties that you can subscribe to with some system 335 336 mixin Observable!(string, "title"); 337 mixin Observable!(string, "url"); 338 mixin Observable!(string, "status"); 339 mixin Observable!(int, "loadingProgress"); 340 } 341 +/ 342 343 344 version(linux) { 345 version(linux_gtk) {} else 346 version=cef; 347 } 348 349 350 version(cef) { 351 import arsd.simpledisplay; 352 353 //pragma(lib, "cef"); 354 355 class BrowserProcessHandler : CEF!cef_browser_process_handler_t { 356 override void on_context_initialized() { } 357 358 override void on_before_child_process_launch(RC!cef_command_line_t) { } 359 override void on_schedule_message_pump_work(long delayMs) { } 360 override cef_client_t* get_default_client() { return null; } 361 override void on_register_custom_preferences(cef_preferences_type_t, cef_preference_registrar_t*) {} 362 } 363 364 365 int cefProcessHelper() { 366 import core.runtime; 367 import core.stdc.stdlib; 368 369 cef_main_args_t main_args; 370 version(linux) { 371 main_args.argc = Runtime.cArgs.argc; 372 main_args.argv = Runtime.cArgs.argv; 373 } else version(Windows) { 374 main_args.instance = GetModuleHandle(null); 375 } 376 377 if(libcef.loadDynamicLibrary()) { 378 int code = libcef.execute_process(&main_args, null, null); 379 if(code >= 0) 380 exit(code); 381 return code; 382 } 383 return -1; 384 } 385 386 shared static this() { 387 cefProcessHelper(); 388 } 389 390 public struct CefApp { 391 static bool active() { 392 return count > 0; 393 } 394 395 private __gshared int count = 0; 396 397 @disable this(this); 398 @disable new(); 399 this(void delegate(cef_settings_t* settings) setSettings) { 400 401 if(!libcef.loadDynamicLibrary()) 402 throw new Exception("failed to load cef dll"); 403 404 count++; 405 406 import core.runtime; 407 import core.stdc.stdlib; 408 409 cef_main_args_t main_args; 410 version(linux) { 411 main_args.argc = Runtime.cArgs.argc; 412 main_args.argv = Runtime.cArgs.argv; 413 } else version(Windows) { 414 main_args.instance = GetModuleHandle(null); 415 } 416 417 cef_settings_t settings; 418 settings.size = cef_settings_t.sizeof; 419 //settings.log_severity = cef_log_severity_t.LOGSEVERITY_DISABLE; // Show only warnings/errors 420 settings.log_severity = cef_log_severity_t.LOGSEVERITY_INFO; // Show only warnings/errors 421 settings.multi_threaded_message_loop = 1; 422 settings.no_sandbox = 1; 423 424 version(linux) 425 settings.locales_dir_path = cef_string_t("/opt/cef/Resources/locales"); 426 427 if(setSettings !is null) 428 setSettings(&settings); 429 430 431 auto app = new class CEF!cef_app_t { 432 BrowserProcessHandler bph; 433 this() { 434 bph = new BrowserProcessHandler(); 435 } 436 override void on_before_command_line_processing(const(cef_string_t)*, RC!cef_command_line_t) {} 437 438 override cef_resource_bundle_handler_t* get_resource_bundle_handler() { 439 return null; 440 } 441 override cef_browser_process_handler_t* get_browser_process_handler() { 442 return bph.returnable; 443 } 444 override cef_render_process_handler_t* get_render_process_handler() { 445 return null; 446 } 447 override void on_register_custom_schemes(cef_scheme_registrar_t*) { 448 449 } 450 }; 451 452 if(!libcef.initialize(&main_args, &settings, app.passable, null)) { 453 throw new Exception("cef_initialize failed"); 454 } 455 } 456 457 ~this() { 458 count--; 459 // this call hangs and idk why. 460 // FIXME 461 //libcef.shutdown(); 462 } 463 } 464 465 466 version(Demo) 467 void main() { 468 auto app = CefApp(null); 469 470 auto window = new SimpleWindow(640, 480, "D Browser", Resizability.allowResizing); 471 flushGui; 472 473 cef_window_info_t window_info; 474 /* 475 window_info.x = 100; 476 window_info.y = 100; 477 window_info.width = 300; 478 window_info.height = 300; 479 */ 480 //window_info.parent_window = window.nativeWindowHandle; 481 482 cef_string_t cef_url = cef_string_t("http://dpldocs.info/");//"http://youtube.com/"w); 483 484 //string url = "http://arsdnet.net/"; 485 //cef_string_utf8_to_utf16(url.ptr, url.length, &cef_url); 486 487 cef_browser_settings_t browser_settings; 488 browser_settings.size = cef_browser_settings_t.sizeof; 489 490 auto client = new MyCefClient(); 491 492 auto got = libcef.browser_host_create_browser(&window_info, client.passable, &cef_url, &browser_settings, null, null); // or _sync 493 494 window.eventLoop(0); 495 } 496 497 498 /++ 499 This gives access to the CEF functions. If you get a linker error for using an undefined function, 500 it is probably because you did NOT go through this when dynamically loading. 501 502 (...similarly, if you get a segfault, it is probably because you DID go through this when static binding.) 503 +/ 504 struct libcef { 505 static __gshared: 506 507 bool isLoaded; 508 bool loadAttempted; 509 void* libHandle; 510 511 /// Make sure you call this only from one thread, probably at process startup. It caches internally and returns true if the load was successful. 512 bool loadDynamicLibrary() { 513 if(loadAttempted) 514 return isLoaded; 515 516 loadAttempted = true; 517 518 version(linux) { 519 import core.sys.posix.dlfcn; 520 libHandle = dlopen("libcef.so", RTLD_NOW); 521 522 static void* loadsym(const char* name) { 523 return dlsym(libHandle, name); 524 } 525 } else version(Windows) { 526 import core.sys.windows.windows; 527 libHandle = LoadLibrary("libcef.dll"); 528 529 static void* loadsym(const char* name) { 530 return GetProcAddress(libHandle, name); 531 } 532 } 533 534 //import std.stdio; 535 if(libHandle is null) { 536 // import std.stdio; writeln("libhandle null"); 537 import core.stdc.stdio; printf("%s\n", dlerror()); 538 // import core.stdc.errno; writeln(errno); 539 return false; 540 } 541 foreach(memberName; __traits(allMembers, libcef)[4 .. $]) { // cutting off everything until the actual static foreach below; this trims off isLoaded to loadDynamicLibrary 542 alias mem = __traits(getMember, libcef, memberName); 543 mem = cast(typeof(mem)) loadsym("cef_" ~ memberName); 544 if(mem is null) { 545 // import std.stdio; writeln(memberName); throw new Exception("cef_" ~ memberName ~ " failed to load"); 546 return false; 547 } 548 } 549 550 import core.stdc.string; 551 if(strcmp(libcef.api_hash(1), CEF_API_HASH_UNIVERSAL) != 0) 552 throw new Exception("libcef versions not matching bindings"); 553 554 isLoaded = true; 555 return true; 556 } 557 558 static foreach(memberName; __traits(allMembers, arsd.webview)) 559 static if(is(typeof(__traits(getMember, arsd.webview, memberName)) == function)) 560 static if(memberName.length > 4 && memberName[0 .. 4] == "cef_") { 561 mixin(q{ typeof(&__traits(getMember, arsd.webview, memberName)) } ~ memberName[4 .. $] ~ ";"); // = &" ~ memberName ~ ";"); 562 } 563 } 564 565 } 566 567 version(linux_gtk) 568 version(Demo) 569 void main() { 570 auto wv = new WebView(true, null); 571 wv.navigate("http://dpldocs.info/"); 572 wv.setTitle("omg a D webview"); 573 wv.setSize(500, 500, true); 574 wv.eval("console.log('just testing');"); 575 wv.run(); 576 } 577 578 version(linux_gtk) 579 enum activeEngine = WebviewEngine.webkit_gtk; 580 581 /++ 582 583 +/ 584 version(linux_gtk) 585 class WebView : browser_engine { 586 587 /++ 588 Creates a new webview instance. If dbg is non-zero - developer tools will 589 be enabled (if the platform supports them). Window parameter can be a 590 pointer to the native window handle. If it's non-null - then child WebView 591 is embedded into the given parent window. Otherwise a new window is created. 592 Depending on the platform, a GtkWindow, NSWindow or HWND pointer can be 593 passed here. 594 +/ 595 this(bool dbg, void* window) { 596 super(&on_message, dbg, window); 597 } 598 599 extern(C) 600 static void on_message(const char*) {} 601 602 /// Destroys a webview and closes the native window. 603 void destroy() { 604 605 } 606 607 /// Runs the main loop until it's terminated. After this function exits - you 608 /// must destroy the webview. 609 override void run() { super.run(); } 610 611 /// Stops the main loop. It is safe to call this function from another other 612 /// background thread. 613 override void terminate() { super.terminate(); } 614 615 /+ 616 /// Posts a function to be executed on the main thread. You normally do not need 617 /// to call this function, unless you want to tweak the native window. 618 void dispatch(void function(WebView w, void *arg) fn, void *arg) {} 619 +/ 620 621 /// Returns a native window handle pointer. When using GTK backend the pointer 622 /// is GtkWindow pointer, when using Cocoa backend the pointer is NSWindow 623 /// pointer, when using Win32 backend the pointer is HWND pointer. 624 void* getWindow() { return m_window; } 625 626 /// Updates the title of the native window. Must be called from the UI thread. 627 override void setTitle(const char *title) { super.setTitle(title); } 628 629 /// Navigates webview to the given URL. URL may be a data URI. 630 override void navigate(const char *url) { super.navigate(url); } 631 632 /// Injects JavaScript code at the initialization of the new page. Every time 633 /// the webview will open a the new page - this initialization code will be 634 /// executed. It is guaranteed that code is executed before window.onload. 635 override void init(const char *js) { super.init(js); } 636 637 /// Evaluates arbitrary JavaScript code. Evaluation happens asynchronously, also 638 /// the result of the expression is ignored. Use RPC bindings if you want to 639 /// receive notifications about the results of the evaluation. 640 override void eval(const char *js) { super.eval(js); } 641 642 /// Binds a native C callback so that it will appear under the given name as a 643 /// global JavaScript function. Internally it uses webview_init(). Callback 644 /// receives a request string and a user-provided argument pointer. Request 645 /// string is a JSON array of all the arguments passed to the JavaScript 646 /// function. 647 void bind(const char *name, void function(const char *, void *) fn, void *arg) {} 648 649 /// Allows to return a value from the native binding. Original request pointer 650 /// must be provided to help internal RPC engine match requests with responses. 651 /// If status is zero - result is expected to be a valid JSON result value. 652 /// If status is not zero - result is an error JSON object. 653 void webview_return(const char *req, int status, const char *result) {} 654 655 /* 656 void on_message(const char *msg) { 657 auto seq = json_parse(msg, "seq", 0); 658 auto name = json_parse(msg, "name", 0); 659 auto args = json_parse(msg, "args", 0); 660 auto fn = bindings[name]; 661 if (fn == null) { 662 return; 663 } 664 std::async(std::launch::async, [=]() { 665 auto result = (*fn)(args); 666 dispatch([=]() { 667 eval(("var b = window['" + name + "'];b['callbacks'][" + seq + "](" + 668 result + ");b['callbacks'][" + seq + 669 "] = undefined;b['errors'][" + seq + "] = undefined;") 670 .c_str()); 671 }); 672 }); 673 } 674 std::map<std::string, binding_t *> bindings; 675 676 alias binding_t = std::function<std::string(std::string)>; 677 678 void bind(const char *name, binding_t f) { 679 auto js = "(function() { var name = '" + std::string(name) + "';" + R"( 680 window[name] = function() { 681 var me = window[name]; 682 var errors = me['errors']; 683 var callbacks = me['callbacks']; 684 if (!callbacks) { 685 callbacks = {}; 686 me['callbacks'] = callbacks; 687 } 688 if (!errors) { 689 errors = {}; 690 me['errors'] = errors; 691 } 692 var seq = (me['lastSeq'] || 0) + 1; 693 me['lastSeq'] = seq; 694 var promise = new Promise(function(resolve, reject) { 695 callbacks[seq] = resolve; 696 errors[seq] = reject; 697 }); 698 window.external.invoke(JSON.stringify({ 699 name: name, 700 seq:seq, 701 args: Array.prototype.slice.call(arguments), 702 })); 703 return promise; 704 } 705 })())"; 706 init(js.c_str()); 707 bindings[name] = new binding_t(f); 708 } 709 710 */ 711 } 712 713 private extern(C) { 714 alias dispatch_fn_t = void function(); 715 alias msg_cb_t = void function(const char *msg); 716 } 717 718 version(linux_gtk) { 719 720 721 /* Original https://github.com/zserge/webview notice below: 722 * MIT License 723 * 724 * Copyright (c) 2017 Serge Zaitsev 725 * 726 * Permission is hereby granted, free of charge, to any person obtaining a copy 727 * of this software and associated documentation files (the "Software"), to deal 728 * in the Software without restriction, including without limitation the rights 729 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 730 * copies of the Software, and to permit persons to whom the Software is 731 * furnished to do so, subject to the following conditions: 732 * 733 * The above copyright notice and this permission notice shall be included in 734 * all copies or substantial portions of the Software. 735 * 736 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 737 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 738 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 739 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 740 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 741 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 742 * SOFTWARE. 743 */ 744 745 /* 746 Port to D by Adam D. Ruppe, November 30, 2019 747 */ 748 749 750 pragma(lib, "gtk-3"); 751 pragma(lib, "glib-2.0"); 752 pragma(lib, "gobject-2.0"); 753 pragma(lib, "webkit2gtk-4.0"); 754 pragma(lib, "javascriptcoregtk-4.0"); 755 756 private extern(C) { 757 import core.stdc.config; 758 alias GtkWidget = void; 759 enum GtkWindowType { 760 GTK_WINDOW_TOPLEVEL = 0 761 } 762 bool gtk_init_check(int*, char***); 763 GtkWidget* gtk_window_new(GtkWindowType); 764 c_ulong g_signal_connect_data(void*, const char*, void* /* function pointer!!! */, void*, void*, int); 765 GtkWidget* webkit_web_view_new(); 766 alias WebKitUserContentManager = void; 767 WebKitUserContentManager* webkit_web_view_get_user_content_manager(GtkWidget*); 768 769 void gtk_container_add(GtkWidget*, GtkWidget*); 770 void gtk_widget_grab_focus(GtkWidget*); 771 void gtk_widget_show_all(GtkWidget*); 772 void gtk_main(); 773 void gtk_main_quit(); 774 void webkit_web_view_load_uri(GtkWidget*, const char*); 775 alias WebKitSettings = void; 776 WebKitSettings* webkit_web_view_get_settings(GtkWidget*); 777 void webkit_settings_set_enable_write_console_messages_to_stdout(WebKitSettings*, bool); 778 void webkit_settings_set_enable_developer_extras(WebKitSettings*, bool); 779 void webkit_user_content_manager_register_script_message_handler(WebKitUserContentManager*, const char*); 780 alias JSCValue = void; 781 alias WebKitJavascriptResult = void; 782 JSCValue* webkit_javascript_result_get_js_value(WebKitJavascriptResult*); 783 char* jsc_value_to_string(JSCValue*); 784 void g_free(void*); 785 void webkit_web_view_run_javascript(GtkWidget*, const char*, void*, void*, void*); 786 alias WebKitUserScript = void; 787 void webkit_user_content_manager_add_script(WebKitUserContentManager*, WebKitUserScript*); 788 WebKitUserScript* webkit_user_script_new(const char*, WebKitUserContentInjectedFrames, WebKitUserScriptInjectionTime, const char*, const char*); 789 enum WebKitUserContentInjectedFrames { 790 WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES, 791 WEBKIT_USER_CONTENT_INJECT_TOP_FRAME 792 } 793 enum WebKitUserScriptInjectionTime { 794 WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, 795 WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END 796 } 797 void gtk_window_set_title(GtkWidget*, const char*); 798 799 void gtk_window_set_resizable(GtkWidget*, bool); 800 void gtk_window_set_default_size(GtkWidget*, int, int); 801 void gtk_widget_set_size_request(GtkWidget*, int, int); 802 } 803 804 private class browser_engine { 805 806 static extern(C) 807 void ondestroy (GtkWidget *w, void* arg) { 808 (cast(browser_engine) arg).terminate(); 809 } 810 811 static extern(C) 812 void smr(WebKitUserContentManager* m, WebKitJavascriptResult* r, void* arg) { 813 auto w = cast(browser_engine) arg; 814 JSCValue *value = webkit_javascript_result_get_js_value(r); 815 auto s = jsc_value_to_string(value); 816 w.m_cb(s); 817 g_free(s); 818 } 819 820 this(msg_cb_t cb, bool dbg, void* window) { 821 m_cb = cb; 822 823 gtk_init_check(null, null); 824 m_window = cast(GtkWidget*) window; 825 if (m_window == null) 826 m_window = gtk_window_new(GtkWindowType.GTK_WINDOW_TOPLEVEL); 827 828 g_signal_connect_data(m_window, "destroy", &ondestroy, cast(void*) this, null, 0); 829 830 m_webview = webkit_web_view_new(); 831 WebKitUserContentManager* manager = webkit_web_view_get_user_content_manager(m_webview); 832 833 g_signal_connect_data(manager, "script-message-received::external", &smr, cast(void*) this, null, 0); 834 webkit_user_content_manager_register_script_message_handler(manager, "external"); 835 init("window.external={invoke:function(s){window.webkit.messageHandlers.external.postMessage(s);}}"); 836 837 gtk_container_add(m_window, m_webview); 838 gtk_widget_grab_focus(m_webview); 839 840 if (dbg) { 841 WebKitSettings *settings = webkit_web_view_get_settings(m_webview); 842 webkit_settings_set_enable_write_console_messages_to_stdout(settings, true); 843 webkit_settings_set_enable_developer_extras(settings, true); 844 } 845 846 gtk_widget_show_all(m_window); 847 } 848 void run() { gtk_main(); } 849 void terminate() { gtk_main_quit(); } 850 851 void navigate(const char *url) { 852 webkit_web_view_load_uri(m_webview, url); 853 } 854 855 void setTitle(const char* title) { 856 gtk_window_set_title(m_window, title); 857 } 858 859 /+ 860 void dispatch(std::function<void()> f) { 861 g_idle_add_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)([](void *f) -> int { 862 (*static_cast<dispatch_fn_t *>(f))(); 863 return G_SOURCE_REMOVE; 864 }), 865 new std::function<void()>(f), 866 [](void *f) { delete static_cast<dispatch_fn_t *>(f); }); 867 } 868 +/ 869 870 void setSize(int width, int height, bool resizable) { 871 gtk_window_set_resizable(m_window, resizable); 872 if (resizable) { 873 gtk_window_set_default_size(m_window, width, height); 874 } 875 gtk_widget_set_size_request(m_window, width, height); 876 } 877 878 void init(const char *js) { 879 WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager(m_webview); 880 webkit_user_content_manager_add_script( 881 manager, webkit_user_script_new( 882 js, WebKitUserContentInjectedFrames.WEBKIT_USER_CONTENT_INJECT_TOP_FRAME, 883 WebKitUserScriptInjectionTime.WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START, null, null)); 884 } 885 886 void eval(const char *js) { 887 webkit_web_view_run_javascript(m_webview, js, null, null, null); 888 } 889 890 protected: 891 GtkWidget* m_window; 892 GtkWidget* m_webview; 893 msg_cb_t m_cb; 894 } 895 } else version(WEBVIEW_COCOA) { 896 /+ 897 898 // 899 // ==================================================================== 900 // 901 // This implementation uses Cocoa WKWebView backend on macOS. It is 902 // written using ObjC runtime and uses WKWebView class as a browser runtime. 903 // You should pass "-framework Webkit" flag to the compiler. 904 // 905 // ==================================================================== 906 // 907 908 #define OBJC_OLD_DISPATCH_PROTOTYPES 1 909 #include <CoreGraphics/CoreGraphics.h> 910 #include <objc/objc-runtime.h> 911 912 #define NSBackingStoreBuffered 2 913 914 #define NSWindowStyleMaskResizable 8 915 #define NSWindowStyleMaskMiniaturizable 4 916 #define NSWindowStyleMaskTitled 1 917 #define NSWindowStyleMaskClosable 2 918 919 #define NSApplicationActivationPolicyRegular 0 920 921 #define WKUserScriptInjectionTimeAtDocumentStart 0 922 923 id operator"" _cls(const char *s, std::size_t sz) { 924 return (id)objc_getClass(s); 925 } 926 SEL operator"" _sel(const char *s, std::size_t sz) { 927 return sel_registerName(s); 928 } 929 id operator"" _str(const char *s, std::size_t sz) { 930 return objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, s); 931 } 932 933 class browser_engine { 934 public: 935 browser_engine(msg_cb_t cb, bool dbg, void *window) : m_cb(cb) { 936 // Application 937 id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel); 938 objc_msgSend(app, "setActivationPolicy:"_sel, 939 NSApplicationActivationPolicyRegular); 940 941 // Delegate 942 auto cls = objc_allocateClassPair((Class) "NSObject"_cls, "AppDelegate", 0); 943 class_addProtocol(cls, objc_getProtocol("NSApplicationDelegate")); 944 class_addProtocol(cls, objc_getProtocol("WKScriptMessageHandler")); 945 class_addMethod( 946 cls, "applicationShouldTerminateAfterLastWindowClosed:"_sel, 947 (IMP)(+[](id self, SEL cmd, id notification) -> BOOL { return 1; }), 948 "c@:@"); 949 class_addMethod( 950 cls, "userContentController:didReceiveScriptMessage:"_sel, 951 (IMP)(+[](id self, SEL cmd, id notification, id msg) { 952 auto w = (browser_engine *)objc_getAssociatedObject(self, "webview"); 953 w->m_cb((const char *)objc_msgSend(objc_msgSend(msg, "body"_sel), 954 "UTF8String"_sel)); 955 }), 956 "v@:@@"); 957 objc_registerClassPair(cls); 958 959 auto delegate = objc_msgSend((id)cls, "new"_sel); 960 objc_setAssociatedObject(delegate, "webview", (id)this, 961 OBJC_ASSOCIATION_ASSIGN); 962 objc_msgSend(app, sel_registerName("setDelegate:"), delegate); 963 964 // Main window 965 if (window is null) { 966 m_window = objc_msgSend("NSWindow"_cls, "alloc"_sel); 967 m_window = objc_msgSend( 968 m_window, "initWithContentRect:styleMask:backing:defer:"_sel, 969 CGRectMake(0, 0, 0, 0), 0, NSBackingStoreBuffered, 0); 970 setSize(480, 320, true); 971 } else { 972 m_window = (id)window; 973 } 974 975 // Webview 976 auto config = objc_msgSend("WKWebViewConfiguration"_cls, "new"_sel); 977 m_manager = objc_msgSend(config, "userContentController"_sel); 978 m_webview = objc_msgSend("WKWebView"_cls, "alloc"_sel); 979 objc_msgSend(m_webview, "initWithFrame:configuration:"_sel, 980 CGRectMake(0, 0, 0, 0), config); 981 objc_msgSend(m_manager, "addScriptMessageHandler:name:"_sel, delegate, 982 "external"_str); 983 init(R"script( 984 window.external = { 985 invoke: function(s) { 986 window.webkit.messageHandlers.external.postMessage(s); 987 }, 988 }; 989 )script"); 990 if (dbg) { 991 objc_msgSend(objc_msgSend(config, "preferences"_sel), 992 "setValue:forKey:"_sel, 1, "developerExtrasEnabled"_str); 993 } 994 objc_msgSend(m_window, "setContentView:"_sel, m_webview); 995 objc_msgSend(m_window, "makeKeyAndOrderFront:"_sel, null); 996 } 997 ~browser_engine() { close(); } 998 void terminate() { close(); objc_msgSend("NSApp"_cls, "terminate:"_sel, null); } 999 void run() { 1000 id app = objc_msgSend("NSApplication"_cls, "sharedApplication"_sel); 1001 dispatch([&]() { objc_msgSend(app, "activateIgnoringOtherApps:"_sel, 1); }); 1002 objc_msgSend(app, "run"_sel); 1003 } 1004 void dispatch(std::function<void()> f) { 1005 dispatch_async_f(dispatch_get_main_queue(), new dispatch_fn_t(f), 1006 (dispatch_function_t)([](void *arg) { 1007 auto f = static_cast<dispatch_fn_t *>(arg); 1008 (*f)(); 1009 delete f; 1010 })); 1011 } 1012 void setTitle(const char *title) { 1013 objc_msgSend( 1014 m_window, "setTitle:"_sel, 1015 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, title)); 1016 } 1017 void setSize(int width, int height, bool resizable) { 1018 auto style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | 1019 NSWindowStyleMaskMiniaturizable; 1020 if (resizable) { 1021 style = style | NSWindowStyleMaskResizable; 1022 } 1023 objc_msgSend(m_window, "setStyleMask:"_sel, style); 1024 objc_msgSend(m_window, "setFrame:display:animate:"_sel, 1025 CGRectMake(0, 0, width, height), 1, 0); 1026 } 1027 void navigate(const char *url) { 1028 auto nsurl = objc_msgSend( 1029 "NSURL"_cls, "URLWithString:"_sel, 1030 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, url)); 1031 objc_msgSend( 1032 m_webview, "loadRequest:"_sel, 1033 objc_msgSend("NSURLRequest"_cls, "requestWithURL:"_sel, nsurl)); 1034 } 1035 void init(const char *js) { 1036 objc_msgSend( 1037 m_manager, "addUserScript:"_sel, 1038 objc_msgSend( 1039 objc_msgSend("WKUserScript"_cls, "alloc"_sel), 1040 "initWithSource:injectionTime:forMainFrameOnly:"_sel, 1041 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js), 1042 WKUserScriptInjectionTimeAtDocumentStart, 1)); 1043 } 1044 void eval(const char *js) { 1045 objc_msgSend(m_webview, "evaluateJavaScript:completionHandler:"_sel, 1046 objc_msgSend("NSString"_cls, "stringWithUTF8String:"_sel, js), 1047 null); 1048 } 1049 1050 protected: 1051 void close() { objc_msgSend(m_window, "close"_sel); } 1052 id m_window; 1053 id m_webview; 1054 id m_manager; 1055 msg_cb_t m_cb; 1056 }; 1057 1058 +/ 1059 1060 } 1061 1062 version(cef) { 1063 1064 /++ 1065 This creates a base class for a thing to help you implement the function pointers. 1066 1067 class MyApp : CEF!cef_app_t { 1068 1069 } 1070 +/ 1071 abstract class CEF(Base) { 1072 private struct Inner { 1073 Base c; 1074 CEF d_object; 1075 } 1076 private Inner inner; 1077 1078 this() nothrow { 1079 if(!__ctfe) construct(); 1080 } 1081 1082 // ONLY call this if you did a ctfe construction 1083 void construct() nothrow { 1084 assert(inner.c.base.size == 0); 1085 1086 import core.memory; 1087 GC.addRoot(cast(void*) this); 1088 inner.c.base.size = Inner.sizeof; 1089 inner.c.base.add_ref = &c_add_ref; 1090 inner.c.base.release = &c_release; 1091 inner.c.base.has_one_ref = &c_has_one_ref; 1092 inner.c.base.has_at_least_one_ref = &c_has_at_least_one_ref; 1093 inner.d_object = this; 1094 1095 static foreach(memberName; __traits(allMembers, Base)) { 1096 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1097 __traits(getMember, inner.c, memberName) = mixin("&c_" ~ memberName); 1098 } 1099 } 1100 } 1101 1102 private static nothrow @nogc extern(System) { 1103 void c_add_ref(cef_base_ref_counted_t* self) { 1104 return ((cast(Inner*) self).d_object).add_ref(); 1105 } 1106 int c_release(cef_base_ref_counted_t* self) { 1107 return ((cast(Inner*) self).d_object).release(); 1108 } 1109 int c_has_one_ref(cef_base_ref_counted_t* self) { 1110 return ((cast(Inner*) self).d_object).has_one_ref(); 1111 } 1112 int c_has_at_least_one_ref(cef_base_ref_counted_t* self) { 1113 return ((cast(Inner*) self).d_object).has_at_least_one_ref(); 1114 } 1115 } 1116 1117 private shared(int) refcount = 1; 1118 final void add_ref() { 1119 import core.atomic; 1120 atomicOp!"+="(refcount, 1); 1121 } 1122 final int release() { 1123 import core.atomic; 1124 auto v = atomicOp!"-="(refcount, 1); 1125 if(v == 0) { 1126 import core.memory; 1127 GC.removeRoot(cast(void*) this); 1128 return 1; 1129 } 1130 return 0; 1131 } 1132 final int has_one_ref() { 1133 return (cast() refcount) == 1; 1134 } 1135 final int has_at_least_one_ref() { 1136 return (cast() refcount) >= 1; 1137 } 1138 1139 /// Call this to pass to CEF. It will add ref for you. 1140 final Base* passable() { 1141 assert(inner.c.base.size); 1142 add_ref(); 1143 return returnable(); 1144 } 1145 1146 final Base* returnable() { 1147 assert(inner.c.base.size); 1148 return &inner.c; 1149 } 1150 1151 static foreach(memberName; __traits(allMembers, Base)) { 1152 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1153 mixin AbstractMethod!(memberName); 1154 } else { 1155 mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner.c, memberName); }}); 1156 } 1157 } 1158 } 1159 1160 // you implement this in D... 1161 private mixin template AbstractMethod(string name) { 1162 alias ptr = typeof(__traits(getMember, Base, name)); 1163 static if(is(ptr Return == return)) 1164 static if(is(typeof(*ptr) Params == function)) 1165 { 1166 mixin(q{abstract nothrow Return } ~ name ~ q{(CefToD!(Params[1 .. $]) p);}); 1167 // mixin(q{abstract nothrow Return } ~ name ~ q{(Params[1 .. $] p);}); 1168 1169 mixin(q{ 1170 private static nothrow extern(System) 1171 Return c_}~name~q{(Params p) { 1172 Base* self = p[0]; // a bit of a type check here... 1173 auto dobj = (cast(Inner*) self).d_object; // ...before this cast. 1174 1175 //return __traits(getMember, dobj, name)(p[1 .. $]); 1176 mixin(() { 1177 string code = "return __traits(getMember, dobj, name)("; 1178 1179 static foreach(idx; 1 .. p.length) { 1180 if(idx > 1) 1181 code ~= ", "; 1182 code ~= "cefToD(p[" ~ idx.stringof ~ "])"; 1183 } 1184 code ~= ");"; 1185 return code; 1186 }()); 1187 } 1188 }); 1189 } 1190 else static assert(0, name ~ " params"); 1191 else static assert(0, name ~ " return"); 1192 } 1193 1194 // you call this from D... 1195 private mixin template ForwardMethod(string name) { 1196 alias ptr = typeof(__traits(getMember, Base, name)); 1197 static if(is(ptr Return == return)) 1198 static if(is(typeof(*ptr) Params == function)) 1199 { 1200 mixin(q{nothrow auto } ~ name ~ q{(Params[1 .. $] p) { 1201 Base* self = inner; // a bit of a type check here... 1202 static if(is(Return == void)) 1203 return __traits(getMember, inner, name)(self, p); 1204 else 1205 return cefToD(__traits(getMember, inner, name)(self, p)); 1206 }}); 1207 } 1208 else static assert(0, name ~ " params"); 1209 else static assert(0, name ~ " return"); 1210 } 1211 1212 1213 private alias AliasSeq(T...) = T; 1214 1215 private template CefToD(T...) { 1216 static if(T.length == 0) { 1217 alias CefToD = T; 1218 } else static if(T.length == 1) { 1219 static if(is(typeof(T[0].base) == cef_base_ref_counted_t)) { 1220 alias CefToD = RC!(typeof(*T[0])); 1221 /+ 1222 static if(is(T[0] == I*, I)) { 1223 alias CefToD = CEF!(I); 1224 } else static assert(0, T[0]); 1225 +/ 1226 } else 1227 alias CefToD = T[0]; 1228 } else { 1229 alias CefToD = AliasSeq!(CefToD!(T[0]), CefToD!(T[1..$])); 1230 1231 } 1232 } 1233 1234 enum activeEngine = WebviewEngine.cef; 1235 1236 struct RC(Base) { 1237 private Base* inner; 1238 1239 this(Base* t) nothrow { 1240 inner = t; 1241 // assuming the refcount is already set here 1242 } 1243 this(this) nothrow { 1244 if(inner is null) return; 1245 inner.base.add_ref(&inner.base); 1246 } 1247 ~this() nothrow { 1248 if(inner is null) return; 1249 inner.base.release(&inner.base); 1250 inner = null; 1251 //sdpyPrintDebugString("omg release"); 1252 } 1253 bool opCast(T:bool)() nothrow { 1254 return inner !is null; 1255 } 1256 1257 Base* getRawPointer() nothrow { 1258 return inner; 1259 } 1260 1261 Base* passable() nothrow { 1262 if(inner is null) 1263 return inner; 1264 1265 inner.base.add_ref(&inner.base); 1266 return inner; 1267 } 1268 1269 static foreach(memberName; __traits(allMembers, Base)) { 1270 static if(is(typeof(__traits(getMember, Base, memberName)) == return)) { 1271 mixin ForwardMethod!(memberName); 1272 } else { 1273 mixin(q{final ref @property } ~ memberName ~ q{() { return __traits(getMember, inner, memberName); }}); 1274 } 1275 } 1276 } 1277 1278 auto cefToD(T)(T t) { 1279 static if(is(typeof(T.base) == cef_base_ref_counted_t)) { 1280 return RC!(typeof(*T))(t); 1281 } else { 1282 return t; 1283 } 1284 } 1285 1286 1287 string toGC(const cef_string_utf16_t str) nothrow { 1288 if(str.str is null) 1289 return null; 1290 1291 string s; 1292 s.reserve(str.length); 1293 1294 try 1295 foreach(char ch; str.str[0 .. str.length]) 1296 s ~= ch; 1297 catch(Exception e) {} 1298 return s; 1299 } 1300 1301 string toGC(const cef_string_utf16_t* str) nothrow { 1302 if(str is null) 1303 return null; 1304 return toGC(*str); 1305 } 1306 1307 string toGCAndFree(const cef_string_userfree_t str) nothrow { 1308 if(str is null) 1309 return null; 1310 1311 string s = toGC(str); 1312 libcef.string_userfree_utf16_free(str); 1313 //str = null; 1314 return s; 1315 } 1316 1317 // bindings follow, first some hand-written ones for Linux, then some machine translated things. More comments about the machine translation when it comes. 1318 1319 version(linux) 1320 struct cef_main_args_t { 1321 int argc; 1322 char** argv; 1323 } 1324 version(Windows) 1325 struct cef_main_args_t { 1326 HINSTANCE instance; 1327 } 1328 1329 // 0 - CEF_VERSION_MAJOR 1330 // 1 - CEF_VERSION_MINOR 1331 // 2 - CEF_VERSION_PATCH 1332 // 3 - CEF_COMMIT_NUMBER 1333 // 4 - CHROME_VERSION_MAJOR 1334 // 5 - CHROME_VERSION_MINOR 1335 // 6 - CHROME_VERSION_BUILD 1336 // 7 - CHROME_VERSION_PATCH 1337 1338 extern(C) nothrow 1339 int cef_string_utf8_to_utf16(const char* src, size_t src_len, cef_string_utf16_t* output); 1340 1341 struct cef_string_utf8_t { 1342 char* str; 1343 size_t length; 1344 void* dtor;// void (*dtor)(char* str); 1345 } 1346 1347 struct cef_basetime_t { 1348 long val; 1349 } 1350 1351 1352 struct cef_string_utf16_t { 1353 char16* str; 1354 size_t length; 1355 void* dtor; // voiod (*dtor)(char16* str); 1356 1357 this(wstring s) nothrow { 1358 this.str = cast(char16*) s.ptr; 1359 this.length = s.length; 1360 } 1361 1362 this(string s) nothrow { 1363 libcef.string_utf8_to_utf16(s.ptr, s.length, &this); 1364 } 1365 } 1366 1367 alias cef_string_t = cef_string_utf16_t; 1368 alias cef_window_handle_t = NativeWindowHandle; 1369 version(Windows) 1370 alias cef_cursor_handle_t = HCURSOR; 1371 else 1372 alias cef_cursor_handle_t = XID; 1373 1374 struct cef_time_t { 1375 int year; // Four or five digit year "2007" (1601 to 30827 on 1376 // Windows, 1970 to 2038 on 32-bit POSIX) 1377 int month; // 1-based month (values 1 = January, etc.) 1378 int day_of_week; // 0-based day of week (0 = Sunday, etc.) 1379 int day_of_month; // 1-based day of month (1-31) 1380 int hour; // Hour within the current day (0-23) 1381 int minute; // Minute within the current hour (0-59) 1382 int second; // Second within the current minute (0-59 plus leap 1383 // seconds which may take it up to 60). 1384 int millisecond; // Milliseconds within the current second (0-999) 1385 } 1386 1387 version(linux) 1388 struct cef_window_info_t { 1389 cef_string_t window_name; 1390 1391 uint x; 1392 uint y; 1393 uint width; 1394 uint height; 1395 1396 cef_window_handle_t parent_window; 1397 1398 int windowless_rendering_enabled; 1399 1400 int shared_texture_enabled; 1401 1402 int external_begin_frame_enabled; 1403 1404 cef_window_handle_t window; 1405 } 1406 1407 version(Windows) 1408 struct cef_window_info_t { 1409 DWORD ex_style; 1410 cef_string_t window_name; 1411 DWORD style; 1412 cef_rect_t bounds; 1413 cef_window_handle_t parent_window; 1414 HMENU menu; 1415 int windowless_rendering_enabled; 1416 int shared_texture_enabled; 1417 int external_begin_frame_enabled; 1418 cef_window_handle_t window; 1419 } 1420 1421 1422 1423 import core.stdc.config; 1424 alias int16 = short; 1425 alias uint16 = ushort; 1426 alias int32 = int; 1427 alias uint32 = uint; 1428 alias char16 = wchar; 1429 alias int64 = long; 1430 alias uint64 = ulong; 1431 1432 // these are supposed to just be opaque pointers but i want some type safety. this same abi wise.......... RIGHT? 1433 struct cef_string_list_t { void* r; } 1434 struct cef_string_multimap_t { void* r; } 1435 struct cef_string_map_t { void* r; } 1436 1437 1438 extern(C) nothrow { 1439 cef_string_list_t cef_string_list_alloc(); 1440 size_t cef_string_list_size(cef_string_list_t list); 1441 int cef_string_list_value(cef_string_list_t list, size_t index, cef_string_t* value); 1442 void cef_string_list_append(cef_string_list_t list, const cef_string_t* value); 1443 void cef_string_list_clear(cef_string_list_t list); 1444 void cef_string_list_free(cef_string_list_t list); 1445 cef_string_list_t cef_string_list_copy(cef_string_list_t list); 1446 } 1447 1448 1449 version(linux) { 1450 import core.sys.posix.sys.types; 1451 alias pid_t cef_platform_thread_id_t; 1452 alias OS_EVENT = XEvent; 1453 } else { 1454 import core.sys.windows.windows; 1455 alias HANDLE cef_platform_thread_id_t; 1456 alias OS_EVENT = void; 1457 } 1458 1459 nothrow @nogc extern(C) void cef_string_userfree_utf16_free(const cef_string_userfree_utf16_t str); 1460 struct cef_string_userfree_utf16_t { cef_string_utf16_t* it; alias it this; } 1461 alias cef_string_userfree_t = cef_string_userfree_utf16_t; 1462 1463 // ************** 1464 1465 // cef/include/capi$ for i in *.h; do dstep -I../.. $i; done 1466 // also dstep include/cef_version.h 1467 // update the CEF_VERSION and the CEF_API_HASH_UNIVERSAL out of cef_version.h and cef_api_hash.h 1468 // then concatenate the bodies of them and delete the translated macros and `struct .*;` stuff 1469 // 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 1470 // then select all and global replace s/_cef/cef/g 1471 // 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. 1472 1473 // and make sure version(linux) void cef_register_widevine_cdm ( if it is there. 1474 1475 // and extern (C) is wrong on the callbacks, they should all be extern(System) 1476 // `/function (<ENTER>Oextern(System)<ESC>` 1477 1478 1479 version=embedded_cef_bindings; 1480 1481 // everything inside these brackets are the bindings you can replace if update needed 1482 1483 version(embedded_cef_bindings) { 1484 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1485 // 1486 // Redistribution and use in source and binary forms, with or without 1487 // modification, are permitted provided that the following conditions are 1488 // met: 1489 // 1490 // * Redistributions of source code must retain the above copyright 1491 // notice, this list of conditions and the following disclaimer. 1492 // * Redistributions in binary form must reproduce the above 1493 // copyright notice, this list of conditions and the following disclaimer 1494 // in the documentation and/or other materials provided with the 1495 // distribution. 1496 // * Neither the name of Google Inc. nor the name Chromium Embedded 1497 // Framework nor the names of its contributors may be used to endorse 1498 // or promote products derived from this software without specific prior 1499 // written permission. 1500 // 1501 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1502 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1503 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1504 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1505 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1506 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1507 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1508 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1509 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1510 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1511 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1512 // 1513 // --------------------------------------------------------------------------- 1514 // 1515 // This file was generated by the make_version_header.py tool. 1516 // 1517 1518 extern (C): 1519 1520 enum CEF_VERSION = "119.3.1+gf768881+chromium-119.0.6045.124"; 1521 enum CEF_VERSION_MAJOR = 119; 1522 enum CEF_VERSION_MINOR = 3; 1523 enum CEF_VERSION_PATCH = 1; 1524 enum CEF_COMMIT_NUMBER = 2860; 1525 enum CEF_COMMIT_HASH = "f768881e641e15e42efe886babf41ed6a7fc45ca"; 1526 enum COPYRIGHT_YEAR = 2023; 1527 1528 enum CHROME_VERSION_MAJOR = 119; 1529 enum CHROME_VERSION_MINOR = 0; 1530 enum CHROME_VERSION_BUILD = 6045; 1531 enum CHROME_VERSION_PATCH = 124; 1532 1533 1534 // Returns CEF version information for the libcef library. The |entry| 1535 // parameter describes which version component will be returned: 1536 // 0 - CEF_VERSION_MAJOR 1537 // 1 - CEF_VERSION_MINOR 1538 // 2 - CEF_VERSION_PATCH 1539 // 3 - CEF_COMMIT_NUMBER 1540 // 4 - CHROME_VERSION_MAJOR 1541 // 5 - CHROME_VERSION_MINOR 1542 // 6 - CHROME_VERSION_BUILD 1543 // 7 - CHROME_VERSION_PATCH 1544 /// 1545 int cef_version_info (int entry); 1546 1547 // APSTUDIO_HIDDEN_SYMBOLS 1548 1549 1550 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1551 // 1552 // Redistribution and use in source and binary forms, with or without 1553 // modification, are permitted provided that the following conditions are 1554 // met: 1555 // 1556 // * Redistributions of source code must retain the above copyright 1557 // notice, this list of conditions and the following disclaimer. 1558 // * Redistributions in binary form must reproduce the above 1559 // copyright notice, this list of conditions and the following disclaimer 1560 // in the documentation and/or other materials provided with the 1561 // distribution. 1562 // * Neither the name of Google Inc. nor the name Chromium Embedded 1563 // Framework nor the names of its contributors may be used to endorse 1564 // or promote products derived from this software without specific prior 1565 // written permission. 1566 // 1567 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1568 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1569 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1570 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1571 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1572 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1573 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1574 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1575 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1576 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1577 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1578 1579 extern (C): 1580 1581 /// 1582 /// Supported content setting types. Some types are platform-specific or only 1583 /// supported with the Chrome runtime. Should be kept in sync with Chromium's 1584 /// ContentSettingsType type. 1585 /// 1586 enum cef_content_setting_types_t 1587 { 1588 // This setting governs whether cookies are enabled by the user in the 1589 /// provided context. However, it may be overridden by other settings. This 1590 /// enum should NOT be read directly to determine whether cookies are enabled; 1591 /// the client should instead rely on the CookieSettings API. 1592 CEF_CONTENT_SETTING_TYPE_COOKIES = 0, 1593 CEF_CONTENT_SETTING_TYPE_IMAGES = 1, 1594 CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = 2, 1595 1596 /// This setting governs both popups and unwanted redirects like tab-unders 1597 /// and framebusting. 1598 CEF_CONTENT_SETTING_TYPE_POPUPS = 3, 1599 1600 CEF_CONTENT_SETTING_TYPE_GEOLOCATION = 4, 1601 CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = 5, 1602 CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = 6, 1603 CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = 7, 1604 CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = 8, 1605 CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = 9, 1606 CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = 10, 1607 CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = 11, 1608 CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = 12, 1609 1610 /// Advanced device-specific functions on MIDI devices. MIDI-SysEx 1611 /// communications can be used for changing the MIDI device's persistent state 1612 /// such as firmware. 1613 CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = 13, 1614 1615 CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = 14, 1616 CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = 15, 1617 CEF_CONTENT_SETTING_TYPE_APP_BANNER = 16, 1618 CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = 17, 1619 CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = 18, 1620 CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = 19, 1621 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = 20, 1622 CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = 21, 1623 CEF_CONTENT_SETTING_TYPE_AUTOPLAY = 22, 1624 CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = 23, 1625 CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = 24, 1626 CEF_CONTENT_SETTING_TYPE_ADS = 25, 1627 1628 /// Website setting which stores metadata for the subresource filter to aid in 1629 /// decisions for whether or not to show the UI. 1630 CEF_CONTENT_SETTING_TYPE_ADS_DATA = 26, 1631 1632 /// MIDI stands for Musical Instrument Digital Interface. It is a standard 1633 /// that allows electronic musical instruments, computers, and other devices 1634 /// to communicate with each other. 1635 CEF_CONTENT_SETTING_TYPE_MIDI = 27, 1636 1637 /// This content setting type is for caching password protection service's 1638 /// verdicts of each origin. 1639 CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = 28, 1640 1641 /// Website setting which stores engagement data for media related to a 1642 /// specific origin. 1643 CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = 29, 1644 1645 /// Content setting which stores whether or not the site can play audible 1646 /// sound. This will not block playback but instead the user will not hear it. 1647 CEF_CONTENT_SETTING_TYPE_SOUND = 30, 1648 1649 /// Website setting which stores the list of client hints that the origin 1650 /// requested the browser to remember. The browser is expected to send all 1651 /// client hints in the HTTP request headers for every resource requested 1652 /// from that origin. 1653 CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = 31, 1654 1655 /// Generic Sensor API covering ambient-light-sensor, accelerometer, gyroscope 1656 /// and magnetometer are all mapped to a single content_settings_type. 1657 /// Setting for the Generic Sensor API covering ambient-light-sensor, 1658 /// accelerometer, gyroscope and magnetometer. These are all mapped to a 1659 /// single ContentSettingsType. 1660 CEF_CONTENT_SETTING_TYPE_SENSORS = 32, 1661 1662 /// Content setting which stores whether or not the user has granted the site 1663 /// permission to respond to accessibility events, which can be used to 1664 /// provide a custom accessibility experience. Requires explicit user consent 1665 /// because some users may not want sites to know they're using assistive 1666 /// technology. 1667 CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS = 33, 1668 1669 /// Used to store whether to allow a website to install a payment handler. 1670 CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = 34, 1671 1672 /// Content setting which stores whether to allow sites to ask for permission 1673 /// to access USB devices. If this is allowed specific device permissions are 1674 /// stored under USB_CHOOSER_DATA. 1675 CEF_CONTENT_SETTING_TYPE_USB_GUARD = 35, 1676 1677 /// Nothing is stored in this setting at present. Please refer to 1678 /// BackgroundFetchPermissionContext for details on how this permission 1679 /// is ascertained. 1680 CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = 36, 1681 1682 /// Website setting which stores the amount of times the user has dismissed 1683 /// intent picker UI without explicitly choosing an option. 1684 CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = 37, 1685 1686 /// Used to store whether to allow a website to detect user active/idle state. 1687 CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = 38, 1688 1689 /// Content settings for access to serial ports. The "guard" content setting 1690 /// stores whether to allow sites to ask for permission to access a port. The 1691 /// permissions granted to access particular ports are stored in the "chooser 1692 /// data" website setting. 1693 CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = 39, 1694 CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = 40, 1695 1696 /// Nothing is stored in this setting at present. Please refer to 1697 /// PeriodicBackgroundSyncPermissionContext for details on how this permission 1698 /// is ascertained. 1699 /// This content setting is not registered because it does not require access 1700 /// to any existing providers. 1701 CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = 41, 1702 1703 /// Content setting which stores whether to allow sites to ask for permission 1704 /// to do Bluetooth scanning. 1705 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = 42, 1706 1707 /// Content settings for access to HID devices. The "guard" content setting 1708 /// stores whether to allow sites to ask for permission to access a device. 1709 /// The permissions granted to access particular devices are stored in the 1710 /// "chooser data" website setting. 1711 CEF_CONTENT_SETTING_TYPE_HID_GUARD = 43, 1712 CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = 44, 1713 1714 /// Wake Lock API, which has two lock types: screen and system locks. 1715 /// Currently, screen locks do not need any additional permission, and system 1716 /// locks are always denied while the right UI is worked out. 1717 CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = 45, 1718 CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = 46, 1719 1720 /// Legacy SameSite cookie behavior. This disables SameSite=Lax-by-default, 1721 /// SameSite=None requires Secure, and Schemeful Same-Site, forcing the 1722 /// legacy behavior wherein 1) cookies that don't specify SameSite are treated 1723 /// as SameSite=None, 2) SameSite=None cookies are not required to be Secure, 1724 /// and 3) schemeful same-site is not active. 1725 /// 1726 /// This will also be used to revert to legacy behavior when future changes 1727 /// in cookie handling are introduced. 1728 CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = 47, 1729 1730 /// Content settings which stores whether to allow sites to ask for permission 1731 /// to save changes to an original file selected by the user through the 1732 /// File System Access API. 1733 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = 48, 1734 1735 /// Used to store whether to allow a website to exchange data with NFC 1736 /// devices. 1737 CEF_CONTENT_SETTING_TYPE_NFC = 49, 1738 1739 /// Website setting to store permissions granted to access particular 1740 /// Bluetooth devices. 1741 CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = 50, 1742 1743 /// Full access to the system clipboard (sanitized read without user gesture, 1744 /// and unsanitized read and write with user gesture). 1745 CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = 51, 1746 1747 /// This is special-cased in the permissions layer to always allow, and as 1748 /// such doesn't have associated prefs data. 1749 CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = 52, 1750 1751 /// This content setting type is for caching safe browsing real time url 1752 /// check's verdicts of each origin. 1753 CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = 53, 1754 1755 /// Used to store whether a site is allowed to request AR or VR sessions with 1756 /// the WebXr Device API. 1757 CEF_CONTENT_SETTING_TYPE_VR = 54, 1758 CEF_CONTENT_SETTING_TYPE_AR = 55, 1759 1760 /// Content setting which stores whether to allow site to open and read files 1761 /// and directories selected through the File System Access API. 1762 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = 56, 1763 1764 /// Access to first party storage in a third-party context. Exceptions are 1765 /// scoped to the combination of requesting/top-level origin, and are managed 1766 /// through the Storage Access API. For the time being, this content setting 1767 /// exists in parallel to third-party cookie rules stored in COOKIES. 1768 CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = 57, 1769 1770 /// Content setting which stores whether to allow a site to control camera 1771 /// movements. It does not give access to camera. 1772 CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = 58, 1773 1774 /// Content setting for Screen Enumeration and Screen Detail functionality. 1775 /// Permits access to detailed multi-screen information, like size and 1776 /// position. Permits placing fullscreen and windowed content on specific 1777 /// screens. See also: https://w3c.github.io/window-placement 1778 CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = 59, 1779 1780 /// Stores whether to allow insecure websites to make private network 1781 /// requests. 1782 /// See also: https://wicg.github.io/cors-rfc1918 1783 /// Set through enterprise policies only. 1784 CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK = 60, 1785 1786 /// Content setting which stores whether or not a site can access low-level 1787 /// locally installed font data using the Local Fonts Access API. 1788 CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = 61, 1789 1790 /// Stores per-origin state for permission auto-revocation (for all permission 1791 /// types). 1792 CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = 62, 1793 1794 /// Stores per-origin state of the most recently selected directory for the 1795 /// use by the File System Access API. 1796 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = 63, 1797 1798 /// Controls access to the getDisplayMedia API when {preferCurrentTab: true} 1799 /// is specified. 1800 CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = 64, 1801 1802 /// Website setting to store permissions metadata granted to paths on the 1803 /// local file system via the File System Access API. 1804 /// |FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting. The stored 1805 /// data represents valid permission only if 1806 /// |FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION| is enabled via user opt-in. 1807 /// Otherwise, they represent "recently granted but revoked permission", which 1808 /// are used to restore the permission. 1809 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = 65, 1810 1811 /// Stores a grant that allows a relying party to send a request for identity 1812 /// information to specified identity providers, potentially through any 1813 /// anti-tracking measures that would otherwise prevent it. This setting is 1814 /// associated with the relying party's origin. 1815 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = 66, 1816 1817 /// Whether to use the v8 optimized JIT for running JavaScript on the page. 1818 CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = 67, 1819 1820 /// Content setting which stores user decisions to allow loading a site over 1821 /// HTTP. Entries are added by hostname when a user bypasses the HTTPS-First 1822 /// Mode interstitial warning when a site does not support HTTPS. Allowed 1823 /// hosts are exact hostname matches -- subdomains of a host on the allowlist 1824 /// must be separately allowlisted. 1825 CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = 68, 1826 1827 /// Stores metadata related to form fill, such as e.g. whether user data was 1828 /// autofilled on a specific website. 1829 CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = 69, 1830 1831 /// Setting to indicate that there is an active federated sign-in session 1832 /// between a specified relying party and a specified identity provider for 1833 /// a specified account. When this is present it allows access to session 1834 /// management capabilities between the sites. This setting is associated 1835 /// with the relying party's origin. 1836 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION = 70, 1837 1838 /// Setting to indicate whether Chrome should automatically apply darkening to 1839 /// web content. 1840 CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = 71, 1841 1842 /// Setting to indicate whether Chrome should request the desktop view of a 1843 /// site instead of the mobile one. 1844 CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = 72, 1845 1846 /// Setting to indicate whether browser should allow signing into a website 1847 /// via the browser FedCM API. 1848 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = 73, 1849 1850 /// Stores notification interactions per origin for the past 90 days. 1851 /// Interactions per origin are pre-aggregated over seven-day windows: A 1852 /// notification interaction or display is assigned to the last Monday 1853 /// midnight in local time. 1854 CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = 74, 1855 1856 /// Website setting which stores the last reduced accept language negotiated 1857 /// for a given origin, to be used on future visits to the origin. 1858 CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = 75, 1859 1860 /// Website setting which is used for NotificationPermissionReviewService to 1861 /// store origin blocklist from review notification permissions feature. 1862 CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = 76, 1863 1864 /// Website setting to store permissions granted to access particular devices 1865 /// in private network. 1866 CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD = 77, 1867 CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA = 78, 1868 1869 /// Website setting which stores whether the browser has observed the user 1870 /// signing into an identity-provider based on observing the IdP-SignIn-Status 1871 /// HTTP header. 1872 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_SIGNIN_STATUS = 79, 1873 1874 /// Website setting which is used for UnusedSitePermissionsService to 1875 /// store revoked permissions of unused sites from unused site permissions 1876 /// feature. 1877 CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = 80, 1878 1879 /// Similar to STORAGE_ACCESS, but applicable at the page-level rather than 1880 /// being specific to a frame. 1881 CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = 81, 1882 1883 /// Setting to indicate whether user has opted in to allowing auto re-authn 1884 /// via the FedCM API. 1885 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = 82, 1886 1887 /// Website setting which stores whether the user has explicitly registered 1888 /// a website as an identity-provider. 1889 CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = 83, 1890 1891 /// Content setting which is used to indicate whether anti-abuse functionality 1892 /// should be enabled. 1893 CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = 84, 1894 1895 /// Content setting used to indicate whether third-party storage partitioning 1896 /// should be enabled. 1897 CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = 85, 1898 1899 /// Used to indicate whether HTTPS-First Mode is enabled on the hostname. 1900 CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = 86, 1901 1902 /// Setting for enabling the `getAllScreensMedia` API. Spec link: 1903 /// https://github.com/screen-share/capture-all-screens 1904 CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = 87, 1905 1906 /// Stores per origin metadata for cookie controls. 1907 CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = 88, 1908 1909 /// Content Setting for 3PC accesses granted via 3PC deprecation trial. 1910 CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT = 89, 1911 1912 /// Content setting used to indicate whether entering picture-in-picture 1913 /// automatically should be enabled. 1914 CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = 90, 1915 1916 /// Content Setting for 3PC accesses granted by metadata delivered via the 1917 /// component updater service. This type will only be used when 1918 /// `net::features::kTpcdMetadataGrants` is enabled. 1919 CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = 91, 1920 1921 /// Whether user has opted into keeping file/directory permissions persistent 1922 /// between visits for a given origin. When enabled, permission metadata 1923 /// stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming 1924 /// permission request. 1925 CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = 92, 1926 1927 CEF_CONTENT_SETTING_TYPE_NUM_TYPES = 93 1928 } 1929 1930 alias CEF_CONTENT_SETTING_TYPE_COOKIES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIES; 1931 alias CEF_CONTENT_SETTING_TYPE_IMAGES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMAGES; 1932 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT; 1933 alias CEF_CONTENT_SETTING_TYPE_POPUPS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_POPUPS; 1934 alias CEF_CONTENT_SETTING_TYPE_GEOLOCATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_GEOLOCATION; 1935 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATIONS; 1936 alias CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_SELECT_CERTIFICATE; 1937 alias CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIXEDSCRIPT; 1938 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_MIC; 1939 alias CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIASTREAM_CAMERA; 1940 alias CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTOCOL_HANDLERS; 1941 alias CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DEPRECATED_PPAPI_BROKER; 1942 alias CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOMATIC_DOWNLOADS; 1943 alias CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI_SYSEX; 1944 alias CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SSL_CERT_DECISIONS; 1945 alias CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PROTECTED_MEDIA_IDENTIFIER; 1946 alias CEF_CONTENT_SETTING_TYPE_APP_BANNER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_APP_BANNER; 1947 alias CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SITE_ENGAGEMENT; 1948 alias CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DURABLE_STORAGE; 1949 alias CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_CHOOSER_DATA; 1950 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_GUARD; 1951 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_SYNC; 1952 alias CEF_CONTENT_SETTING_TYPE_AUTOPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTOPLAY; 1953 alias CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IMPORTANT_SITE_INFO; 1954 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOBLOCKER_DATA; 1955 alias CEF_CONTENT_SETTING_TYPE_ADS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS; 1956 alias CEF_CONTENT_SETTING_TYPE_ADS_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ADS_DATA; 1957 alias CEF_CONTENT_SETTING_TYPE_MIDI = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MIDI; 1958 alias CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PASSWORD_PROTECTION; 1959 alias CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_MEDIA_ENGAGEMENT; 1960 alias CEF_CONTENT_SETTING_TYPE_SOUND = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SOUND; 1961 alias CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIENT_HINTS; 1962 alias CEF_CONTENT_SETTING_TYPE_SENSORS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SENSORS; 1963 alias CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ACCESSIBILITY_EVENTS; 1964 alias CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PAYMENT_HANDLER; 1965 alias CEF_CONTENT_SETTING_TYPE_USB_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_USB_GUARD; 1966 alias CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BACKGROUND_FETCH; 1967 alias CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INTENT_PICKER_DISPLAY; 1968 alias CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_IDLE_DETECTION; 1969 alias CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_GUARD; 1970 alias CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SERIAL_CHOOSER_DATA; 1971 alias CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERIODIC_BACKGROUND_SYNC; 1972 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_SCANNING; 1973 alias CEF_CONTENT_SETTING_TYPE_HID_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_GUARD; 1974 alias CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HID_CHOOSER_DATA; 1975 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SCREEN; 1976 alias CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WAKE_LOCK_SYSTEM; 1977 alias CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_ACCESS; 1978 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_WRITE_GUARD; 1979 alias CEF_CONTENT_SETTING_TYPE_NFC = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NFC; 1980 alias CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_BLUETOOTH_CHOOSER_DATA; 1981 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_READ_WRITE; 1982 alias CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CLIPBOARD_SANITIZED_WRITE; 1983 alias CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_SAFE_BROWSING_URL_CHECK_DATA; 1984 alias CEF_CONTENT_SETTING_TYPE_VR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_VR; 1985 alias CEF_CONTENT_SETTING_TYPE_AR = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AR; 1986 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_READ_GUARD; 1987 alias CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS; 1988 alias CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_CAMERA_PAN_TILT_ZOOM; 1989 alias CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_WINDOW_MANAGEMENT; 1990 alias CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_INSECURE_PRIVATE_NETWORK; 1991 alias CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_LOCAL_FONTS; 1992 alias CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PERMISSION_AUTOREVOCATION_DATA; 1993 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY; 1994 alias CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE; 1995 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA; 1996 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_SHARING; 1997 alias CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_JIT; 1998 alias CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTP_ALLOWED; 1999 alias CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FORMFILL_METADATA; 2000 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION; 2001 alias CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_DARK_WEB_CONTENT; 2002 alias CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REQUEST_DESKTOP_SITE; 2003 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_API; 2004 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_INTERACTIONS; 2005 alias CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REDUCED_ACCEPT_LANGUAGE; 2006 alias CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NOTIFICATION_PERMISSION_REVIEW; 2007 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_GUARD; 2008 alias CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_PRIVATE_NETWORK_CHOOSER_DATA; 2009 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; 2010 alias CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_REVOKED_UNUSED_SITE_PERMISSIONS; 2011 alias CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_STORAGE_ACCESS; 2012 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION; 2013 alias CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_IDENTITY_PROVIDER_REGISTRATION; 2014 alias CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ANTI_ABUSE; 2015 alias CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_THIRD_PARTY_STORAGE_PARTITIONING; 2016 alias CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_HTTPS_ENFORCED; 2017 alias CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_ALL_SCREEN_CAPTURE; 2018 alias CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA; 2019 alias CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT; 2020 alias CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE; 2021 alias CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS; 2022 alias CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION; 2023 alias CEF_CONTENT_SETTING_TYPE_NUM_TYPES = cef_content_setting_types_t.CEF_CONTENT_SETTING_TYPE_NUM_TYPES; 2024 2025 /// 2026 /// Supported content setting values. Should be kept in sync with Chromium's 2027 /// ContentSetting type. 2028 /// 2029 enum cef_content_setting_values_t 2030 { 2031 CEF_CONTENT_SETTING_VALUE_DEFAULT = 0, 2032 CEF_CONTENT_SETTING_VALUE_ALLOW = 1, 2033 CEF_CONTENT_SETTING_VALUE_BLOCK = 2, 2034 CEF_CONTENT_SETTING_VALUE_ASK = 3, 2035 CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = 4, 2036 CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT = 5, 2037 2038 CEF_CONTENT_SETTING_VALUE_NUM_VALUES = 6 2039 } 2040 2041 alias CEF_CONTENT_SETTING_VALUE_DEFAULT = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DEFAULT; 2042 alias CEF_CONTENT_SETTING_VALUE_ALLOW = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ALLOW; 2043 alias CEF_CONTENT_SETTING_VALUE_BLOCK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_BLOCK; 2044 alias CEF_CONTENT_SETTING_VALUE_ASK = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_ASK; 2045 alias CEF_CONTENT_SETTING_VALUE_SESSION_ONLY = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_SESSION_ONLY; 2046 alias CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_DETECT_IMPORTANT_CONTENT; 2047 alias CEF_CONTENT_SETTING_VALUE_NUM_VALUES = cef_content_setting_values_t.CEF_CONTENT_SETTING_VALUE_NUM_VALUES; 2048 2049 // CEF_INCLUDE_INTERNAL_CEF_TYPES_CONTENT_SETTINGS_H_ 2050 2051 // CEF_INCLUDE_CEF_VERSION_H_ 2052 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2053 // 2054 // Redistribution and use in source and binary forms, with or without 2055 // modification, are permitted provided that the following conditions are 2056 // met: 2057 // 2058 // * Redistributions of source code must retain the above copyright 2059 // notice, this list of conditions and the following disclaimer. 2060 // * Redistributions in binary form must reproduce the above 2061 // copyright notice, this list of conditions and the following disclaimer 2062 // in the documentation and/or other materials provided with the 2063 // distribution. 2064 // * Neither the name of Google Inc. nor the name Chromium Embedded 2065 // Framework nor the names of its contributors may be used to endorse 2066 // or promote products derived from this software without specific prior 2067 // written permission. 2068 // 2069 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2070 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2071 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2072 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2073 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2074 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2075 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2076 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2077 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2078 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2079 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2080 // 2081 // --------------------------------------------------------------------------- 2082 // 2083 // This file was generated by the make_api_hash_header.py tool. 2084 // 2085 2086 extern (C): 2087 2088 // The API hash is created by analyzing CEF header files for C API type 2089 // definitions. The hash value will change when header files are modified in a 2090 // way that may cause binary incompatibility with other builds. The universal 2091 // hash value will change if any platform is affected whereas the platform hash 2092 // values will change only if that particular platform is affected. 2093 enum CEF_API_HASH_UNIVERSAL = "c0c754c1ca4f72f6ca6a80861b38b34a61ed5116"; 2094 2095 enum CEF_API_HASH_PLATFORM = "75cbf2876ee57cc093f9ab7905e19034754a4b8a"; 2096 2097 /// 2098 // Returns CEF API hashes for the libcef library. The returned string is owned 2099 // by the library and should not be freed. The |entry| parameter describes which 2100 // hash value will be returned: 2101 // 0 - CEF_API_HASH_PLATFORM 2102 // 1 - CEF_API_HASH_UNIVERSAL 2103 // 2 - CEF_COMMIT_HASH (from cef_version.h) 2104 /// 2105 const(char)* cef_api_hash (int entry); 2106 2107 // CEF_INCLUDE_API_HASH_H_ 2108 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 2109 // 2110 // Redistribution and use in source and binary forms, with or without 2111 // modification, are permitted provided that the following conditions are 2112 // met: 2113 // 2114 // * Redistributions of source code must retain the above copyright 2115 // notice, this list of conditions and the following disclaimer. 2116 // * Redistributions in binary form must reproduce the above 2117 // copyright notice, this list of conditions and the following disclaimer 2118 // in the documentation and/or other materials provided with the 2119 // distribution. 2120 // * Neither the name of Google Inc. nor the name Chromium Embedded 2121 // Framework nor the names of its contributors may be used to endorse 2122 // or promote products derived from this software without specific prior 2123 // written permission. 2124 // 2125 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2126 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2127 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2128 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2129 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2130 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2131 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2132 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2133 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2134 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2135 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2136 2137 extern (C): 2138 2139 /// 2140 /// Structure representing a point. 2141 /// 2142 struct cef_point_t 2143 { 2144 int x; 2145 int y; 2146 } 2147 2148 2149 2150 /// 2151 /// Structure representing a rectangle. 2152 /// 2153 struct cef_rect_t 2154 { 2155 int x; 2156 int y; 2157 int width; 2158 int height; 2159 } 2160 2161 2162 2163 /// 2164 /// Structure representing a size. 2165 /// 2166 struct cef_size_t 2167 { 2168 int width; 2169 int height; 2170 } 2171 2172 2173 2174 /// 2175 /// Structure representing insets. 2176 /// 2177 struct cef_insets_t 2178 { 2179 int top; 2180 int left; 2181 int bottom; 2182 int right; 2183 } 2184 2185 2186 2187 // CEF_INCLUDE_INTERNAL_CEF_TYPES_GEOMETRY_H_ 2188 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 2189 // 2190 // Redistribution and use in source and binary forms, with or without 2191 // modification, are permitted provided that the following conditions are 2192 // met: 2193 // 2194 // * Redistributions of source code must retain the above copyright 2195 // notice, this list of conditions and the following disclaimer. 2196 // * Redistributions in binary form must reproduce the above 2197 // copyright notice, this list of conditions and the following disclaimer 2198 // in the documentation and/or other materials provided with the 2199 // distribution. 2200 // * Neither the name of Google Inc. nor the name Chromium Embedded 2201 // Framework nor the names of its contributors may be used to endorse 2202 // or promote products derived from this software without specific prior 2203 // written permission. 2204 // 2205 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2206 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2207 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2208 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2209 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2210 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2211 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2212 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2213 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2214 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2215 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2216 2217 import core.stdc.config; 2218 import core.stdc.limits; 2219 2220 extern (C): 2221 2222 // Bring in platform-specific definitions. 2223 2224 // 32-bit ARGB color value, not premultiplied. The color components are always 2225 // in a known order. Equivalent to the SkColor type. 2226 alias cef_color_t = uint; 2227 2228 // Return the alpha byte from a cef_color_t value. 2229 2230 2231 // Return the red byte from a cef_color_t value. 2232 2233 2234 // Return the green byte from a cef_color_t value. 2235 2236 2237 // Return the blue byte from a cef_color_t value. 2238 2239 2240 // Return an cef_color_t value with the specified byte component values. 2241 2242 2243 // Return an int64_t value with the specified low and high int32_t component 2244 // values. 2245 2246 2247 // Return the low int32_t value from an int64_t value. 2248 2249 2250 // Return the high int32_t value from an int64_t value. 2251 2252 2253 /// 2254 /// Log severity levels. 2255 /// 2256 enum cef_log_severity_t 2257 { 2258 /// 2259 /// Default logging (currently INFO logging). 2260 /// 2261 LOGSEVERITY_DEFAULT = 0, 2262 2263 /// 2264 /// Verbose logging. 2265 /// 2266 LOGSEVERITY_VERBOSE = 1, 2267 2268 /// 2269 /// DEBUG logging. 2270 /// 2271 LOGSEVERITY_DEBUG = LOGSEVERITY_VERBOSE, 2272 2273 /// 2274 /// INFO logging. 2275 /// 2276 LOGSEVERITY_INFO = 2, 2277 2278 /// 2279 /// WARNING logging. 2280 /// 2281 LOGSEVERITY_WARNING = 3, 2282 2283 /// 2284 /// ERROR logging. 2285 /// 2286 LOGSEVERITY_ERROR = 4, 2287 2288 /// 2289 /// FATAL logging. 2290 /// 2291 LOGSEVERITY_FATAL = 5, 2292 2293 /// 2294 /// Disable logging to file for all messages, and to stderr for messages with 2295 /// severity less than FATAL. 2296 /// 2297 LOGSEVERITY_DISABLE = 99 2298 } 2299 2300 alias LOGSEVERITY_DEFAULT = cef_log_severity_t.LOGSEVERITY_DEFAULT; 2301 alias LOGSEVERITY_VERBOSE = cef_log_severity_t.LOGSEVERITY_VERBOSE; 2302 alias LOGSEVERITY_DEBUG = cef_log_severity_t.LOGSEVERITY_DEBUG; 2303 alias LOGSEVERITY_INFO = cef_log_severity_t.LOGSEVERITY_INFO; 2304 alias LOGSEVERITY_WARNING = cef_log_severity_t.LOGSEVERITY_WARNING; 2305 alias LOGSEVERITY_ERROR = cef_log_severity_t.LOGSEVERITY_ERROR; 2306 alias LOGSEVERITY_FATAL = cef_log_severity_t.LOGSEVERITY_FATAL; 2307 alias LOGSEVERITY_DISABLE = cef_log_severity_t.LOGSEVERITY_DISABLE; 2308 2309 /// 2310 /// Log items prepended to each log line. 2311 /// 2312 enum cef_log_items_t 2313 { 2314 /// 2315 /// Prepend the default list of items. 2316 /// 2317 LOG_ITEMS_DEFAULT = 0, 2318 2319 /// 2320 /// Prepend no items. 2321 /// 2322 LOG_ITEMS_NONE = 1, 2323 2324 /// 2325 /// Prepend the process ID. 2326 /// 2327 LOG_ITEMS_FLAG_PROCESS_ID = 1 << 1, 2328 2329 /// 2330 /// Prepend the thread ID. 2331 /// 2332 LOG_ITEMS_FLAG_THREAD_ID = 1 << 2, 2333 2334 /// 2335 /// Prepend the timestamp. 2336 /// 2337 LOG_ITEMS_FLAG_TIME_STAMP = 1 << 3, 2338 2339 /// 2340 /// Prepend the tickcount. 2341 /// 2342 LOG_ITEMS_FLAG_TICK_COUNT = 1 << 4 2343 } 2344 2345 alias LOG_ITEMS_DEFAULT = cef_log_items_t.LOG_ITEMS_DEFAULT; 2346 alias LOG_ITEMS_NONE = cef_log_items_t.LOG_ITEMS_NONE; 2347 alias LOG_ITEMS_FLAG_PROCESS_ID = cef_log_items_t.LOG_ITEMS_FLAG_PROCESS_ID; 2348 alias LOG_ITEMS_FLAG_THREAD_ID = cef_log_items_t.LOG_ITEMS_FLAG_THREAD_ID; 2349 alias LOG_ITEMS_FLAG_TIME_STAMP = cef_log_items_t.LOG_ITEMS_FLAG_TIME_STAMP; 2350 alias LOG_ITEMS_FLAG_TICK_COUNT = cef_log_items_t.LOG_ITEMS_FLAG_TICK_COUNT; 2351 2352 /// 2353 /// Represents the state of a setting. 2354 /// 2355 enum cef_state_t 2356 { 2357 /// 2358 /// Use the default state for the setting. 2359 /// 2360 STATE_DEFAULT = 0, 2361 2362 /// 2363 /// Enable or allow the setting. 2364 /// 2365 STATE_ENABLED = 1, 2366 2367 /// 2368 /// Disable or disallow the setting. 2369 /// 2370 STATE_DISABLED = 2 2371 } 2372 2373 alias STATE_DEFAULT = cef_state_t.STATE_DEFAULT; 2374 alias STATE_ENABLED = cef_state_t.STATE_ENABLED; 2375 alias STATE_DISABLED = cef_state_t.STATE_DISABLED; 2376 2377 /// 2378 /// Initialization settings. Specify NULL or 0 to get the recommended default 2379 /// values. Many of these and other settings can also configured using command- 2380 /// line switches. 2381 /// 2382 struct cef_settings_t 2383 { 2384 /// 2385 /// Size of this structure. 2386 /// 2387 alias size_t = c_ulong; 2388 size_t size; 2389 2390 /// 2391 /// Set to true (1) to disable the sandbox for sub-processes. See 2392 /// cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also 2393 /// configurable using the "no-sandbox" command-line switch. 2394 /// 2395 int no_sandbox; 2396 2397 /// 2398 /// The path to a separate executable that will be launched for sub-processes. 2399 /// If this value is empty on Windows or Linux then the main process 2400 /// executable will be used. If this value is empty on macOS then a helper 2401 /// executable must exist at "Contents/Frameworks/<app> 2402 /// Helper.app/Contents/MacOS/<app> Helper" in the top-level app bundle. See 2403 /// the comments on CefExecuteProcess() for details. If this value is 2404 /// non-empty then it must be an absolute path. Also configurable using the 2405 /// "browser-subprocess-path" command-line switch. 2406 /// 2407 alias cef_string_t = cef_string_utf16_t; 2408 cef_string_t browser_subprocess_path; 2409 2410 /// 2411 /// The path to the CEF framework directory on macOS. If this value is empty 2412 /// then the framework must exist at "Contents/Frameworks/Chromium Embedded 2413 /// Framework.framework" in the top-level app bundle. If this value is 2414 /// non-empty then it must be an absolute path. Also configurable using the 2415 /// "framework-dir-path" command-line switch. 2416 /// 2417 cef_string_t framework_dir_path; 2418 2419 /// 2420 /// The path to the main bundle on macOS. If this value is empty then it 2421 /// defaults to the top-level app bundle. If this value is non-empty then it 2422 /// must be an absolute path. Also configurable using the "main-bundle-path" 2423 /// command-line switch. 2424 /// 2425 cef_string_t main_bundle_path; 2426 2427 /// 2428 /// Set to true (1) to enable use of the Chrome runtime in CEF. This feature 2429 /// is considered experimental and is not recommended for most users at this 2430 /// time. See issue #2969 for details. 2431 /// 2432 int chrome_runtime; 2433 2434 /// 2435 /// Set to true (1) to have the browser process message loop run in a separate 2436 /// thread. If false (0) then the CefDoMessageLoopWork() function must be 2437 /// called from your application message loop. This option is only supported 2438 /// on Windows and Linux. 2439 /// 2440 int multi_threaded_message_loop; 2441 2442 /// 2443 /// Set to true (1) to control browser process main (UI) thread message pump 2444 /// scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork() 2445 /// callback. This option is recommended for use in combination with the 2446 /// CefDoMessageLoopWork() function in cases where the CEF message loop must 2447 /// be integrated into an existing application message loop (see additional 2448 /// comments and warnings on CefDoMessageLoopWork). Enabling this option is 2449 /// not recommended for most users; leave this option disabled and use either 2450 /// the CefRunMessageLoop() function or multi_threaded_message_loop if 2451 /// possible. 2452 /// 2453 int external_message_pump; 2454 2455 /// 2456 /// Set to true (1) to enable windowless (off-screen) rendering support. Do 2457 /// not enable this value if the application does not use windowless rendering 2458 /// as it may reduce rendering performance on some systems. 2459 /// 2460 int windowless_rendering_enabled; 2461 2462 /// 2463 /// Set to true (1) to disable configuration of browser process features using 2464 /// standard CEF and Chromium command-line arguments. Configuration can still 2465 /// be specified using CEF data structures or via the 2466 /// CefApp::OnBeforeCommandLineProcessing() method. 2467 /// 2468 int command_line_args_disabled; 2469 2470 /// 2471 /// The location where data for the global browser cache will be stored on 2472 /// disk. If this value is non-empty then it must be an absolute path that is 2473 /// either equal to or a child directory of CefSettings.root_cache_path. If 2474 /// this value is empty then browsers will be created in "incognito mode" 2475 /// where in-memory caches are used for storage and no data is persisted to 2476 /// disk. HTML5 databases such as localStorage will only persist across 2477 /// sessions if a cache path is specified. Can be overridden for individual 2478 /// CefRequestContext instances via the CefRequestContextSettings.cache_path 2479 /// value. When using the Chrome runtime the "default" profile will be used if 2480 /// |cache_path| and |root_cache_path| have the same value. 2481 /// 2482 cef_string_t cache_path; 2483 2484 /// 2485 /// The root directory that all CefSettings.cache_path and 2486 /// CefRequestContextSettings.cache_path values must have in common. If this 2487 /// value is empty and CefSettings.cache_path is non-empty then it will 2488 /// default to the CefSettings.cache_path value. If both values are empty 2489 /// then the default platform-specific directory will be used 2490 /// ("~/.config/cef_user_data" directory on Linux, "~/Library/Application 2491 /// Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data" 2492 /// directory under the user profile directory on Windows). If this value is 2493 /// non-empty then it must be an absolute path. Failure to set this value 2494 /// correctly may result in the sandbox blocking read/write access to certain 2495 /// files. 2496 /// 2497 cef_string_t root_cache_path; 2498 2499 /// 2500 /// To persist session cookies (cookies without an expiry date or validity 2501 /// interval) by default when using the global cookie manager set this value 2502 /// to true (1). Session cookies are generally intended to be transient and 2503 /// most Web browsers do not persist them. A |cache_path| value must also be 2504 /// specified to enable this feature. Also configurable using the 2505 /// "persist-session-cookies" command-line switch. Can be overridden for 2506 /// individual CefRequestContext instances via the 2507 /// CefRequestContextSettings.persist_session_cookies value. 2508 /// 2509 int persist_session_cookies; 2510 2511 /// 2512 /// To persist user preferences as a JSON file in the cache path directory set 2513 /// this value to true (1). A |cache_path| value must also be specified 2514 /// to enable this feature. Also configurable using the 2515 /// "persist-user-preferences" command-line switch. Can be overridden for 2516 /// individual CefRequestContext instances via the 2517 /// CefRequestContextSettings.persist_user_preferences value. 2518 /// 2519 int persist_user_preferences; 2520 2521 /// 2522 /// Value that will be returned as the User-Agent HTTP header. If empty the 2523 /// default User-Agent string will be used. Also configurable using the 2524 /// "user-agent" command-line switch. 2525 /// 2526 cef_string_t user_agent; 2527 2528 /// 2529 /// Value that will be inserted as the product portion of the default 2530 /// User-Agent string. If empty the Chromium product version will be used. If 2531 /// |userAgent| is specified this value will be ignored. Also configurable 2532 /// using the "user-agent-product" command-line switch. 2533 /// 2534 cef_string_t user_agent_product; 2535 2536 /// 2537 /// The locale string that will be passed to WebKit. If empty the default 2538 /// locale of "en-US" will be used. This value is ignored on Linux where 2539 /// locale is determined using environment variable parsing with the 2540 /// precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also 2541 /// configurable using the "lang" command-line switch. 2542 /// 2543 cef_string_t locale; 2544 2545 /// 2546 /// The directory and file name to use for the debug log. If empty a default 2547 /// log file name and location will be used. On Windows and Linux a 2548 /// "debug.log" file will be written in the main executable directory. On 2549 /// MacOS a "~/Library/Logs/[app name]_debug.log" file will be written where 2550 /// [app name] is the name of the main app executable. Also configurable using 2551 /// the "log-file" command-line switch. 2552 /// 2553 cef_string_t log_file; 2554 2555 /// 2556 /// The log severity. Only messages of this severity level or higher will be 2557 /// logged. When set to DISABLE no messages will be written to the log file, 2558 /// but FATAL messages will still be output to stderr. Also configurable using 2559 /// the "log-severity" command-line switch with a value of "verbose", "info", 2560 /// "warning", "error", "fatal" or "disable". 2561 /// 2562 cef_log_severity_t log_severity; 2563 2564 /// 2565 /// The log items prepended to each log line. If not set the default log items 2566 /// will be used. Also configurable using the "log-items" command-line switch 2567 /// with a value of "none" for no log items, or a comma-delimited list of 2568 /// values "pid", "tid", "timestamp" or "tickcount" for custom log items. 2569 /// 2570 cef_log_items_t log_items; 2571 2572 /// 2573 /// Custom flags that will be used when initializing the V8 JavaScript engine. 2574 /// The consequences of using custom flags may not be well tested. Also 2575 /// configurable using the "js-flags" command-line switch. 2576 /// 2577 cef_string_t javascript_flags; 2578 2579 /// 2580 /// The fully qualified path for the resources directory. If this value is 2581 /// empty the *.pak files must be located in the module directory on 2582 /// Windows/Linux or the app bundle Resources directory on MacOS. If this 2583 /// value is non-empty then it must be an absolute path. Also configurable 2584 /// using the "resources-dir-path" command-line switch. 2585 /// 2586 cef_string_t resources_dir_path; 2587 2588 /// 2589 /// The fully qualified path for the locales directory. If this value is empty 2590 /// the locales directory must be located in the module directory. If this 2591 /// value is non-empty then it must be an absolute path. This value is ignored 2592 /// on MacOS where pack files are always loaded from the app bundle Resources 2593 /// directory. Also configurable using the "locales-dir-path" command-line 2594 /// switch. 2595 /// 2596 cef_string_t locales_dir_path; 2597 2598 /// 2599 /// Set to true (1) to disable loading of pack files for resources and 2600 /// locales. A resource bundle handler must be provided for the browser and 2601 /// render processes via CefApp::GetResourceBundleHandler() if loading of pack 2602 /// files is disabled. Also configurable using the "disable-pack-loading" 2603 /// command- line switch. 2604 /// 2605 int pack_loading_disabled; 2606 2607 /// 2608 /// Set to a value between 1024 and 65535 to enable remote debugging on the 2609 /// specified port. Also configurable using the "remote-debugging-port" 2610 /// command-line switch. Remote debugging can be accessed by loading the 2611 /// chrome://inspect page in Google Chrome. Port numbers 9222 and 9229 are 2612 /// discoverable by default. Other port numbers may need to be configured via 2613 /// "Discover network targets" on the Devices tab. 2614 /// 2615 int remote_debugging_port; 2616 2617 /// 2618 /// The number of stack trace frames to capture for uncaught exceptions. 2619 /// Specify a positive value to enable the 2620 /// CefRenderProcessHandler::OnUncaughtException() callback. Specify 0 2621 /// (default value) and OnUncaughtException() will not be called. Also 2622 /// configurable using the "uncaught-exception-stack-size" command-line 2623 /// switch. 2624 /// 2625 int uncaught_exception_stack_size; 2626 2627 /// 2628 /// Background color used for the browser before a document is loaded and when 2629 /// no document color is specified. The alpha component must be either fully 2630 /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully 2631 /// opaque then the RGB components will be used as the background color. If 2632 /// the alpha component is fully transparent for a windowed browser then the 2633 /// default value of opaque white be used. If the alpha component is fully 2634 /// transparent for a windowless (off-screen) browser then transparent 2635 /// painting will be enabled. 2636 /// 2637 cef_color_t background_color; 2638 2639 /// 2640 /// Comma delimited ordered list of language codes without any whitespace that 2641 /// will be used in the "Accept-Language" HTTP request header and 2642 /// "navigator.language" JS attribute. Can be overridden for individual 2643 /// CefRequestContext instances via the 2644 /// CefRequestContextSettings.accept_language_list value. 2645 /// 2646 cef_string_t accept_language_list; 2647 2648 /// 2649 /// Comma delimited list of schemes supported by the associated 2650 /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0) 2651 /// the default schemes ("http", "https", "ws" and "wss") will also be 2652 /// supported. Not specifying a |cookieable_schemes_list| value and setting 2653 /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading 2654 /// and saving of cookies. These settings will only impact the global 2655 /// CefRequestContext. Individual CefRequestContext instances can be 2656 /// configured via the CefRequestContextSettings.cookieable_schemes_list and 2657 /// CefRequestContextSettings.cookieable_schemes_exclude_defaults values. 2658 /// 2659 cef_string_t cookieable_schemes_list; 2660 int cookieable_schemes_exclude_defaults; 2661 2662 /// 2663 /// Specify an ID to enable Chrome policy management via Platform and OS-user 2664 /// policies. On Windows, this is a registry key like 2665 /// "SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like 2666 /// "com.google.Chrome". On Linux, this is an absolute directory path like 2667 /// "/etc/opt/chrome/policies". Only supported with the Chrome runtime. See 2668 /// https://support.google.com/chrome/a/answer/9037717 for details. 2669 /// 2670 /// Chrome Browser Cloud Management integration, when enabled via the 2671 /// "enable-chrome-browser-cloud-management" command-line flag, will also use 2672 /// the specified ID. See https://support.google.com/chrome/a/answer/9116814 2673 /// for details. 2674 /// 2675 cef_string_t chrome_policy_id; 2676 } 2677 2678 2679 2680 /// 2681 /// Request context initialization settings. Specify NULL or 0 to get the 2682 /// recommended default values. 2683 /// 2684 struct cef_request_context_settings_t 2685 { 2686 /// 2687 /// Size of this structure. 2688 /// 2689 size_t size; 2690 2691 /// 2692 /// The location where cache data for this request context will be stored on 2693 /// disk. If this value is non-empty then it must be an absolute path that is 2694 /// either equal to or a child directory of CefSettings.root_cache_path. If 2695 /// this value is empty then browsers will be created in "incognito mode" 2696 /// where in-memory caches are used for storage and no data is persisted to 2697 /// disk. HTML5 databases such as localStorage will only persist across 2698 /// sessions if a cache path is specified. To share the global browser cache 2699 /// and related configuration set this value to match the 2700 /// CefSettings.cache_path value. 2701 /// 2702 cef_string_t cache_path; 2703 2704 /// 2705 /// To persist session cookies (cookies without an expiry date or validity 2706 /// interval) by default when using the global cookie manager set this value 2707 /// to true (1). Session cookies are generally intended to be transient and 2708 /// most Web browsers do not persist them. Can be set globally using the 2709 /// CefSettings.persist_session_cookies value. This value will be ignored if 2710 /// |cache_path| is empty or if it matches the CefSettings.cache_path value. 2711 /// 2712 int persist_session_cookies; 2713 2714 /// 2715 /// To persist user preferences as a JSON file in the cache path directory set 2716 /// this value to true (1). Can be set globally using the 2717 /// CefSettings.persist_user_preferences value. This value will be ignored if 2718 /// |cache_path| is empty or if it matches the CefSettings.cache_path value. 2719 /// 2720 int persist_user_preferences; 2721 2722 /// 2723 /// Comma delimited ordered list of language codes without any whitespace that 2724 /// will be used in the "Accept-Language" HTTP request header and 2725 /// "navigator.language" JS attribute. Can be set globally using the 2726 /// CefSettings.accept_language_list value. If all values are empty then 2727 /// "en-US,en" will be used. This value will be ignored if |cache_path| 2728 /// matches the CefSettings.cache_path value. 2729 /// 2730 cef_string_t accept_language_list; 2731 2732 /// 2733 /// Comma delimited list of schemes supported by the associated 2734 /// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0) 2735 /// the default schemes ("http", "https", "ws" and "wss") will also be 2736 /// supported. Not specifying a |cookieable_schemes_list| value and setting 2737 /// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading 2738 /// and saving of cookies. These values will be ignored if |cache_path| 2739 /// matches the CefSettings.cache_path value. 2740 /// 2741 cef_string_t cookieable_schemes_list; 2742 int cookieable_schemes_exclude_defaults; 2743 } 2744 2745 2746 2747 /// 2748 /// Browser initialization settings. Specify NULL or 0 to get the recommended 2749 /// default values. The consequences of using custom values may not be well 2750 /// tested. Many of these and other settings can also configured using command- 2751 /// line switches. 2752 /// 2753 struct cef_browser_settings_t 2754 { 2755 /// 2756 /// Size of this structure. 2757 /// 2758 size_t size; 2759 2760 /// 2761 /// The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint 2762 /// will be called for a windowless browser. The actual fps may be lower if 2763 /// the browser cannot generate frames at the requested rate. The minimum 2764 /// value is 1 and the maximum value is 60 (default 30). This value can also 2765 /// be changed dynamically via CefBrowserHost::SetWindowlessFrameRate. 2766 /// 2767 int windowless_frame_rate; 2768 2769 /// BEGIN values that map to WebPreferences settings. 2770 2771 /// 2772 /// Font settings. 2773 /// 2774 cef_string_t standard_font_family; 2775 cef_string_t fixed_font_family; 2776 cef_string_t serif_font_family; 2777 cef_string_t sans_serif_font_family; 2778 cef_string_t cursive_font_family; 2779 cef_string_t fantasy_font_family; 2780 int default_font_size; 2781 int default_fixed_font_size; 2782 int minimum_font_size; 2783 int minimum_logical_font_size; 2784 2785 /// 2786 /// Default encoding for Web content. If empty "ISO-8859-1" will be used. Also 2787 /// configurable using the "default-encoding" command-line switch. 2788 /// 2789 cef_string_t default_encoding; 2790 2791 /// 2792 /// Controls the loading of fonts from remote sources. Also configurable using 2793 /// the "disable-remote-fonts" command-line switch. 2794 /// 2795 cef_state_t remote_fonts; 2796 2797 /// 2798 /// Controls whether JavaScript can be executed. Also configurable using the 2799 /// "disable-javascript" command-line switch. 2800 /// 2801 cef_state_t javascript; 2802 2803 /// 2804 /// Controls whether JavaScript can be used to close windows that were not 2805 /// opened via JavaScript. JavaScript can still be used to close windows that 2806 /// were opened via JavaScript or that have no back/forward history. Also 2807 /// configurable using the "disable-javascript-close-windows" command-line 2808 /// switch. 2809 /// 2810 cef_state_t javascript_close_windows; 2811 2812 /// 2813 /// Controls whether JavaScript can access the clipboard. Also configurable 2814 /// using the "disable-javascript-access-clipboard" command-line switch. 2815 /// 2816 cef_state_t javascript_access_clipboard; 2817 2818 /// 2819 /// Controls whether DOM pasting is supported in the editor via 2820 /// execCommand("paste"). The |javascript_access_clipboard| setting must also 2821 /// be enabled. Also configurable using the "disable-javascript-dom-paste" 2822 /// command-line switch. 2823 /// 2824 cef_state_t javascript_dom_paste; 2825 2826 /// 2827 /// Controls whether image URLs will be loaded from the network. A cached 2828 /// image will still be rendered if requested. Also configurable using the 2829 /// "disable-image-loading" command-line switch. 2830 /// 2831 cef_state_t image_loading; 2832 2833 /// 2834 /// Controls whether standalone images will be shrunk to fit the page. Also 2835 /// configurable using the "image-shrink-standalone-to-fit" command-line 2836 /// switch. 2837 /// 2838 cef_state_t image_shrink_standalone_to_fit; 2839 2840 /// 2841 /// Controls whether text areas can be resized. Also configurable using the 2842 /// "disable-text-area-resize" command-line switch. 2843 /// 2844 cef_state_t text_area_resize; 2845 2846 /// 2847 /// Controls whether the tab key can advance focus to links. Also configurable 2848 /// using the "disable-tab-to-links" command-line switch. 2849 /// 2850 cef_state_t tab_to_links; 2851 2852 /// 2853 /// Controls whether local storage can be used. Also configurable using the 2854 /// "disable-local-storage" command-line switch. 2855 /// 2856 cef_state_t local_storage; 2857 2858 /// 2859 /// Controls whether databases can be used. Also configurable using the 2860 /// "disable-databases" command-line switch. 2861 /// 2862 cef_state_t databases; 2863 2864 /// 2865 /// Controls whether WebGL can be used. Note that WebGL requires hardware 2866 /// support and may not work on all systems even when enabled. Also 2867 /// configurable using the "disable-webgl" command-line switch. 2868 /// 2869 cef_state_t webgl; 2870 2871 /// END values that map to WebPreferences settings. 2872 2873 /// 2874 /// Background color used for the browser before a document is loaded and when 2875 /// no document color is specified. The alpha component must be either fully 2876 /// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully 2877 /// opaque then the RGB components will be used as the background color. If 2878 /// the alpha component is fully transparent for a windowed browser then the 2879 /// CefSettings.background_color value will be used. If the alpha component is 2880 /// fully transparent for a windowless (off-screen) browser then transparent 2881 /// painting will be enabled. 2882 /// 2883 cef_color_t background_color; 2884 2885 /// 2886 /// Controls whether the Chrome status bubble will be used. Only supported 2887 /// with the Chrome runtime. For details about the status bubble see 2888 /// https://www.chromium.org/user-experience/status-bubble/ 2889 /// 2890 cef_state_t chrome_status_bubble; 2891 2892 /// 2893 /// Controls whether the Chrome zoom bubble will be shown when zooming. Only 2894 /// supported with the Chrome runtime. 2895 /// 2896 cef_state_t chrome_zoom_bubble; 2897 } 2898 2899 2900 2901 /// 2902 /// Return value types. 2903 /// 2904 enum cef_return_value_t 2905 { 2906 /// 2907 /// Cancel immediately. 2908 /// 2909 RV_CANCEL = 0, 2910 2911 /// 2912 /// Continue immediately. 2913 /// 2914 RV_CONTINUE = 1, 2915 2916 /// 2917 /// Continue asynchronously (usually via a callback). 2918 /// 2919 RV_CONTINUE_ASYNC = 2 2920 } 2921 2922 alias RV_CANCEL = cef_return_value_t.RV_CANCEL; 2923 alias RV_CONTINUE = cef_return_value_t.RV_CONTINUE; 2924 alias RV_CONTINUE_ASYNC = cef_return_value_t.RV_CONTINUE_ASYNC; 2925 2926 /// 2927 /// URL component parts. 2928 /// 2929 struct cef_urlparts_t 2930 { 2931 /// 2932 /// The complete URL specification. 2933 /// 2934 cef_string_t spec; 2935 2936 /// 2937 /// Scheme component not including the colon (e.g., "http"). 2938 /// 2939 cef_string_t scheme; 2940 2941 /// 2942 /// User name component. 2943 /// 2944 cef_string_t username; 2945 2946 /// 2947 /// Password component. 2948 /// 2949 cef_string_t password; 2950 2951 /// 2952 /// Host component. This may be a hostname, an IPv4 address or an IPv6 literal 2953 /// surrounded by square brackets (e.g., "[2001:db8::1]"). 2954 /// 2955 cef_string_t host; 2956 2957 /// 2958 /// Port number component. 2959 /// 2960 cef_string_t port; 2961 2962 /// 2963 /// Origin contains just the scheme, host, and port from a URL. Equivalent to 2964 /// clearing any username and password, replacing the path with a slash, and 2965 /// clearing everything after that. This value will be empty for non-standard 2966 /// URLs. 2967 /// 2968 cef_string_t origin; 2969 2970 /// 2971 /// Path component including the first slash following the host. 2972 /// 2973 cef_string_t path; 2974 2975 /// 2976 /// Query string component (i.e., everything following the '?'). 2977 /// 2978 cef_string_t query; 2979 2980 /// 2981 /// Fragment (hash) identifier component (i.e., the string following the '#'). 2982 /// 2983 cef_string_t fragment; 2984 } 2985 2986 2987 2988 /// 2989 /// Cookie priority values. 2990 /// 2991 enum cef_cookie_priority_t 2992 { 2993 CEF_COOKIE_PRIORITY_LOW = -1, 2994 CEF_COOKIE_PRIORITY_MEDIUM = 0, 2995 CEF_COOKIE_PRIORITY_HIGH = 1 2996 } 2997 2998 alias CEF_COOKIE_PRIORITY_LOW = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_LOW; 2999 alias CEF_COOKIE_PRIORITY_MEDIUM = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_MEDIUM; 3000 alias CEF_COOKIE_PRIORITY_HIGH = cef_cookie_priority_t.CEF_COOKIE_PRIORITY_HIGH; 3001 3002 /// 3003 /// Cookie same site values. 3004 /// 3005 enum cef_cookie_same_site_t 3006 { 3007 CEF_COOKIE_SAME_SITE_UNSPECIFIED = 0, 3008 CEF_COOKIE_SAME_SITE_NO_RESTRICTION = 1, 3009 CEF_COOKIE_SAME_SITE_LAX_MODE = 2, 3010 CEF_COOKIE_SAME_SITE_STRICT_MODE = 3 3011 } 3012 3013 alias CEF_COOKIE_SAME_SITE_UNSPECIFIED = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_UNSPECIFIED; 3014 alias CEF_COOKIE_SAME_SITE_NO_RESTRICTION = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_NO_RESTRICTION; 3015 alias CEF_COOKIE_SAME_SITE_LAX_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_LAX_MODE; 3016 alias CEF_COOKIE_SAME_SITE_STRICT_MODE = cef_cookie_same_site_t.CEF_COOKIE_SAME_SITE_STRICT_MODE; 3017 3018 /// 3019 /// Cookie information. 3020 /// 3021 struct cef_cookie_t 3022 { 3023 /// 3024 /// The cookie name. 3025 /// 3026 cef_string_t name; 3027 3028 /// 3029 /// The cookie value. 3030 /// 3031 cef_string_t value; 3032 3033 /// 3034 /// If |domain| is empty a host cookie will be created instead of a domain 3035 /// cookie. Domain cookies are stored with a leading "." and are visible to 3036 /// sub-domains whereas host cookies are not. 3037 /// 3038 cef_string_t domain; 3039 3040 /// 3041 /// If |path| is non-empty only URLs at or below the path will get the cookie 3042 /// value. 3043 /// 3044 cef_string_t path; 3045 3046 /// 3047 /// If |secure| is true the cookie will only be sent for HTTPS requests. 3048 /// 3049 int secure; 3050 3051 /// 3052 /// If |httponly| is true the cookie will only be sent for HTTP requests. 3053 /// 3054 int httponly; 3055 3056 /// 3057 /// The cookie creation date. This is automatically populated by the system on 3058 /// cookie creation. 3059 /// 3060 g 3061 cef_basetime_t creation; 3062 3063 /// 3064 /// The cookie last access date. This is automatically populated by the system 3065 /// on access. 3066 /// 3067 cef_basetime_t last_access; 3068 3069 /// 3070 /// The cookie expiration date is only valid if |has_expires| is true. 3071 /// 3072 int has_expires; 3073 cef_basetime_t expires; 3074 3075 /// 3076 /// Same site. 3077 /// 3078 cef_cookie_same_site_t same_site; 3079 3080 /// 3081 /// Priority. 3082 /// 3083 cef_cookie_priority_t priority; 3084 } 3085 3086 3087 3088 /// 3089 /// Process termination status values. 3090 /// 3091 enum cef_termination_status_t 3092 { 3093 /// 3094 /// Non-zero exit status. 3095 /// 3096 TS_ABNORMAL_TERMINATION = 0, 3097 3098 /// 3099 /// SIGKILL or task manager kill. 3100 /// 3101 TS_PROCESS_WAS_KILLED = 1, 3102 3103 /// 3104 /// Segmentation fault. 3105 /// 3106 TS_PROCESS_CRASHED = 2, 3107 3108 /// 3109 /// Out of memory. Some platforms may use TS_PROCESS_CRASHED instead. 3110 /// 3111 TS_PROCESS_OOM = 3 3112 } 3113 3114 alias TS_ABNORMAL_TERMINATION = cef_termination_status_t.TS_ABNORMAL_TERMINATION; 3115 alias TS_PROCESS_WAS_KILLED = cef_termination_status_t.TS_PROCESS_WAS_KILLED; 3116 alias TS_PROCESS_CRASHED = cef_termination_status_t.TS_PROCESS_CRASHED; 3117 alias TS_PROCESS_OOM = cef_termination_status_t.TS_PROCESS_OOM; 3118 3119 /// 3120 /// Path key values. 3121 /// 3122 enum cef_path_key_t 3123 { 3124 /// 3125 /// Current directory. 3126 /// 3127 PK_DIR_CURRENT = 0, 3128 3129 /// 3130 /// Directory containing PK_FILE_EXE. 3131 /// 3132 PK_DIR_EXE = 1, 3133 3134 /// 3135 /// Directory containing PK_FILE_MODULE. 3136 /// 3137 PK_DIR_MODULE = 2, 3138 3139 /// 3140 /// Temporary directory. 3141 /// 3142 PK_DIR_TEMP = 3, 3143 3144 /// 3145 /// Path and filename of the current executable. 3146 /// 3147 PK_FILE_EXE = 4, 3148 3149 /// 3150 /// Path and filename of the module containing the CEF code (usually the 3151 /// libcef module). 3152 /// 3153 PK_FILE_MODULE = 5, 3154 3155 /// 3156 /// "Local Settings\Application Data" directory under the user profile 3157 /// directory on Windows. 3158 /// 3159 PK_LOCAL_APP_DATA = 6, 3160 3161 /// 3162 /// "Application Data" directory under the user profile directory on Windows 3163 /// and "~/Library/Application Support" directory on MacOS. 3164 /// 3165 PK_USER_DATA = 7, 3166 3167 /// 3168 /// Directory containing application resources. Can be configured via 3169 /// CefSettings.resources_dir_path. 3170 /// 3171 PK_DIR_RESOURCES = 8 3172 } 3173 3174 alias PK_DIR_CURRENT = cef_path_key_t.PK_DIR_CURRENT; 3175 alias PK_DIR_EXE = cef_path_key_t.PK_DIR_EXE; 3176 alias PK_DIR_MODULE = cef_path_key_t.PK_DIR_MODULE; 3177 alias PK_DIR_TEMP = cef_path_key_t.PK_DIR_TEMP; 3178 alias PK_FILE_EXE = cef_path_key_t.PK_FILE_EXE; 3179 alias PK_FILE_MODULE = cef_path_key_t.PK_FILE_MODULE; 3180 alias PK_LOCAL_APP_DATA = cef_path_key_t.PK_LOCAL_APP_DATA; 3181 alias PK_USER_DATA = cef_path_key_t.PK_USER_DATA; 3182 alias PK_DIR_RESOURCES = cef_path_key_t.PK_DIR_RESOURCES; 3183 3184 /// 3185 /// Storage types. 3186 /// 3187 enum cef_storage_type_t 3188 { 3189 ST_LOCALSTORAGE = 0, 3190 ST_SESSIONSTORAGE = 1 3191 } 3192 3193 alias ST_LOCALSTORAGE = cef_storage_type_t.ST_LOCALSTORAGE; 3194 alias ST_SESSIONSTORAGE = cef_storage_type_t.ST_SESSIONSTORAGE; 3195 3196 /// 3197 /// Supported error code values. For the complete list of error values see 3198 /// "include/base/internal/cef_net_error_list.h". 3199 /// 3200 enum cef_errorcode_t 3201 { 3202 // No error. 3203 ERR_NONE = 0, 3204 ERR_IO_PENDING = -1, 3205 ERR_FAILED = -2, 3206 ERR_ABORTED = -3, 3207 ERR_INVALID_ARGUMENT = -4, 3208 ERR_INVALID_HANDLE = -5, 3209 ERR_FILE_NOT_FOUND = -6, 3210 ERR_TIMED_OUT = -7, 3211 ERR_FILE_TOO_BIG = -8, 3212 ERR_UNEXPECTED = -9, 3213 ERR_ACCESS_DENIED = -10, 3214 ERR_NOT_IMPLEMENTED = -11, 3215 ERR_INSUFFICIENT_RESOURCES = -12, 3216 ERR_OUT_OF_MEMORY = -13, 3217 ERR_UPLOAD_FILE_CHANGED = -14, 3218 ERR_SOCKET_NOT_CONNECTED = -15, 3219 ERR_FILE_EXISTS = -16, 3220 ERR_FILE_PATH_TOO_LONG = -17, 3221 ERR_FILE_NO_SPACE = -18, 3222 ERR_FILE_VIRUS_INFECTED = -19, 3223 ERR_BLOCKED_BY_CLIENT = -20, 3224 ERR_NETWORK_CHANGED = -21, 3225 ERR_BLOCKED_BY_ADMINISTRATOR = -22, 3226 ERR_SOCKET_IS_CONNECTED = -23, 3227 ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25, 3228 ERR_CONTEXT_SHUT_DOWN = -26, 3229 ERR_BLOCKED_BY_RESPONSE = -27, 3230 ERR_CLEARTEXT_NOT_PERMITTED = -29, 3231 ERR_BLOCKED_BY_CSP = -30, 3232 ERR_H2_OR_QUIC_REQUIRED = -31, 3233 ERR_BLOCKED_BY_ORB = -32, 3234 ERR_CONNECTION_CLOSED = -100, 3235 ERR_CONNECTION_RESET = -101, 3236 ERR_CONNECTION_REFUSED = -102, 3237 ERR_CONNECTION_ABORTED = -103, 3238 ERR_CONNECTION_FAILED = -104, 3239 ERR_NAME_NOT_RESOLVED = -105, 3240 ERR_INTERNET_DISCONNECTED = -106, 3241 ERR_SSL_PROTOCOL_ERROR = -107, 3242 ERR_ADDRESS_INVALID = -108, 3243 ERR_ADDRESS_UNREACHABLE = -109, 3244 ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, 3245 ERR_TUNNEL_CONNECTION_FAILED = -111, 3246 ERR_NO_SSL_VERSIONS_ENABLED = -112, 3247 ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, 3248 ERR_SSL_RENEGOTIATION_REQUESTED = -114, 3249 ERR_PROXY_AUTH_UNSUPPORTED = -115, 3250 ERR_BAD_SSL_CLIENT_AUTH_CERT = -117, 3251 ERR_CONNECTION_TIMED_OUT = -118, 3252 ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119, 3253 ERR_SOCKS_CONNECTION_FAILED = -120, 3254 ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121, 3255 ERR_ALPN_NEGOTIATION_FAILED = -122, 3256 ERR_SSL_NO_RENEGOTIATION = -123, 3257 ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124, 3258 ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125, 3259 ERR_SSL_BAD_RECORD_MAC_ALERT = -126, 3260 ERR_PROXY_AUTH_REQUESTED = -127, 3261 ERR_PROXY_CONNECTION_FAILED = -130, 3262 ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131, 3263 ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133, 3264 ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134, 3265 ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135, 3266 ERR_PROXY_CERTIFICATE_INVALID = -136, 3267 ERR_NAME_RESOLUTION_FAILED = -137, 3268 ERR_NETWORK_ACCESS_DENIED = -138, 3269 ERR_TEMPORARILY_THROTTLED = -139, 3270 ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140, 3271 ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141, 3272 ERR_MSG_TOO_BIG = -142, 3273 ERR_WS_PROTOCOL_ERROR = -145, 3274 ERR_ADDRESS_IN_USE = -147, 3275 ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148, 3276 ERR_SSL_BAD_PEER_PUBLIC_KEY = -149, 3277 ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150, 3278 ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151, 3279 ERR_SSL_DECRYPT_ERROR_ALERT = -153, 3280 ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154, 3281 ERR_SSL_SERVER_CERT_CHANGED = -156, 3282 ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159, 3283 ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160, 3284 ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161, 3285 ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162, 3286 ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163, 3287 ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164, 3288 ERR_ICANN_NAME_COLLISION = -166, 3289 ERR_SSL_SERVER_CERT_BAD_FORMAT = -167, 3290 ERR_CT_STH_PARSING_FAILED = -168, 3291 ERR_CT_STH_INCOMPLETE = -169, 3292 ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170, 3293 ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171, 3294 ERR_SSL_OBSOLETE_CIPHER = -172, 3295 ERR_WS_UPGRADE = -173, 3296 ERR_READ_IF_READY_NOT_IMPLEMENTED = -174, 3297 ERR_NO_BUFFER_SPACE = -176, 3298 ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177, 3299 ERR_EARLY_DATA_REJECTED = -178, 3300 ERR_WRONG_VERSION_ON_EARLY_DATA = -179, 3301 ERR_TLS13_DOWNGRADE_DETECTED = -180, 3302 ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181, 3303 ERR_INVALID_ECH_CONFIG_LIST = -182, 3304 ERR_ECH_NOT_NEGOTIATED = -183, 3305 ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184, 3306 ERR_CERT_COMMON_NAME_INVALID = -200, 3307 ERR_CERT_DATE_INVALID = -201, 3308 ERR_CERT_AUTHORITY_INVALID = -202, 3309 ERR_CERT_CONTAINS_ERRORS = -203, 3310 ERR_CERT_NO_REVOCATION_MECHANISM = -204, 3311 ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, 3312 ERR_CERT_REVOKED = -206, 3313 ERR_CERT_INVALID = -207, 3314 ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208, 3315 ERR_CERT_NON_UNIQUE_NAME = -210, 3316 ERR_CERT_WEAK_KEY = -211, 3317 ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212, 3318 ERR_CERT_VALIDITY_TOO_LONG = -213, 3319 ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214, 3320 ERR_CERT_SYMANTEC_LEGACY = -215, 3321 ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217, 3322 ERR_CERT_END = -219, 3323 ERR_INVALID_URL = -300, 3324 ERR_DISALLOWED_URL_SCHEME = -301, 3325 ERR_UNKNOWN_URL_SCHEME = -302, 3326 ERR_INVALID_REDIRECT = -303, 3327 ERR_TOO_MANY_REDIRECTS = -310, 3328 ERR_UNSAFE_REDIRECT = -311, 3329 ERR_UNSAFE_PORT = -312, 3330 ERR_INVALID_RESPONSE = -320, 3331 ERR_INVALID_CHUNKED_ENCODING = -321, 3332 ERR_METHOD_NOT_SUPPORTED = -322, 3333 ERR_UNEXPECTED_PROXY_AUTH = -323, 3334 ERR_EMPTY_RESPONSE = -324, 3335 ERR_RESPONSE_HEADERS_TOO_BIG = -325, 3336 ERR_PAC_SCRIPT_FAILED = -327, 3337 ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328, 3338 ERR_MALFORMED_IDENTITY = -329, 3339 ERR_CONTENT_DECODING_FAILED = -330, 3340 ERR_NETWORK_IO_SUSPENDED = -331, 3341 ERR_SYN_REPLY_NOT_RECEIVED = -332, 3342 ERR_ENCODING_CONVERSION_FAILED = -333, 3343 ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334, 3344 ERR_NO_SUPPORTED_PROXIES = -336, 3345 ERR_HTTP2_PROTOCOL_ERROR = -337, 3346 ERR_INVALID_AUTH_CREDENTIALS = -338, 3347 ERR_UNSUPPORTED_AUTH_SCHEME = -339, 3348 ERR_ENCODING_DETECTION_FAILED = -340, 3349 ERR_MISSING_AUTH_CREDENTIALS = -341, 3350 ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342, 3351 ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343, 3352 ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344, 3353 ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345, 3354 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346, 3355 ERR_INCOMPLETE_HTTP2_HEADERS = -347, 3356 ERR_PAC_NOT_IN_DHCP = -348, 3357 ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349, 3358 ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350, 3359 ERR_HTTP2_SERVER_REFUSED_STREAM = -351, 3360 ERR_HTTP2_PING_FAILED = -352, 3361 ERR_CONTENT_LENGTH_MISMATCH = -354, 3362 ERR_INCOMPLETE_CHUNKED_ENCODING = -355, 3363 ERR_QUIC_PROTOCOL_ERROR = -356, 3364 ERR_RESPONSE_HEADERS_TRUNCATED = -357, 3365 ERR_QUIC_HANDSHAKE_FAILED = -358, 3366 ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360, 3367 ERR_HTTP2_FLOW_CONTROL_ERROR = -361, 3368 ERR_HTTP2_FRAME_SIZE_ERROR = -362, 3369 ERR_HTTP2_COMPRESSION_ERROR = -363, 3370 ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364, 3371 ERR_HTTP_1_1_REQUIRED = -365, 3372 ERR_PROXY_HTTP_1_1_REQUIRED = -366, 3373 ERR_PAC_SCRIPT_TERMINATED = -367, 3374 ERR_INVALID_HTTP_RESPONSE = -370, 3375 ERR_CONTENT_DECODING_INIT_FAILED = -371, 3376 ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372, 3377 ERR_TOO_MANY_RETRIES = -375, 3378 ERR_HTTP2_STREAM_CLOSED = -376, 3379 ERR_HTTP_RESPONSE_CODE_FAILURE = -379, 3380 ERR_QUIC_CERT_ROOT_NOT_KNOWN = -380, 3381 ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381, 3382 ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382, 3383 ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383, 3384 ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY = -384, 3385 ERR_CACHE_MISS = -400, 3386 ERR_CACHE_READ_FAILURE = -401, 3387 ERR_CACHE_WRITE_FAILURE = -402, 3388 ERR_CACHE_OPERATION_NOT_SUPPORTED = -403, 3389 ERR_CACHE_OPEN_FAILURE = -404, 3390 ERR_CACHE_CREATE_FAILURE = -405, 3391 ERR_CACHE_RACE = -406, 3392 ERR_CACHE_CHECKSUM_READ_FAILURE = -407, 3393 ERR_CACHE_CHECKSUM_MISMATCH = -408, 3394 ERR_CACHE_LOCK_TIMEOUT = -409, 3395 ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410, 3396 3397 /// 3398 /// Supported certificate status code values. See net\cert\cert_status_flags.h 3399 /// for more information. CERT_STATUS_NONE is new in CEF because we use an 3400 /// enum while cert_status_flags.h uses a typedef and static const variables. 3401 ERR_CACHE_ENTRY_NOT_SUITABLE = -411, 3402 /// 3403 ERR_CACHE_DOOM_FAILURE = -412, 3404 3405 // 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP). 3406 ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413, 3407 ERR_INSECURE_RESPONSE = -501, 3408 ERR_NO_PRIVATE_KEY_FOR_CERT = -502, 3409 3410 // 1 << 9 was used for CERT_STATUS_NOT_IN_DNS 3411 ERR_ADD_USER_CERT_FAILED = -503, 3412 3413 // 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY 3414 ERR_INVALID_SIGNED_EXCHANGE = -504, 3415 ERR_INVALID_WEB_BUNDLE = -505, 3416 3417 // Bits 16 to 31 are for non-error statuses. 3418 3419 // Bit 18 was CERT_STATUS_IS_DNSSEC 3420 ERR_TRUST_TOKEN_OPERATION_FAILED = -506, 3421 3422 /// 3423 /// The manner in which a link click should be opened. These constants match 3424 /// their equivalents in Chromium's window_open_disposition.h and should not be 3425 /// renumbered. 3426 /// 3427 3428 /// 3429 /// Current tab. This is the default in most cases. 3430 /// 3431 3432 /// 3433 /// Indicates that only one tab with the url should exist in the same window. 3434 ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507, 3435 /// 3436 3437 /// 3438 /// Shift key + Middle mouse button or meta/ctrl key while clicking. 3439 /// 3440 3441 /// 3442 /// Middle mouse button or meta/ctrl key while clicking. 3443 ERR_FTP_FAILED = -601, 3444 /// 3445 3446 /// 3447 /// New popup window. 3448 /// 3449 3450 /// 3451 /// Shift key while clicking. 3452 /// 3453 ERR_FTP_SERVICE_UNAVAILABLE = -602, 3454 3455 /// 3456 /// Alt key while clicking. 3457 /// 3458 3459 /// 3460 /// New off-the-record (incognito) window. 3461 ERR_FTP_TRANSFER_ABORTED = -603, 3462 /// 3463 3464 /// 3465 /// Special case error condition from the renderer. 3466 /// 3467 3468 /// 3469 ERR_FTP_FILE_BUSY = -604, 3470 /// Activates an existing tab containing the url, rather than navigating. 3471 /// This is similar to SINGLETON_TAB, but searches across all windows from 3472 ERR_FTP_SYNTAX_ERROR = -605, 3473 /// the current profile and anonymity (instead of just the current one); 3474 /// closes the current tab on switching if the current tab was the NTP with 3475 ERR_FTP_COMMAND_NOT_SUPPORTED = -606, 3476 /// no session history; and behaves like CURRENT_TAB instead of 3477 /// NEW_FOREGROUND_TAB when no existing tab is found. 3478 ERR_FTP_BAD_COMMAND_SEQUENCE = -607, 3479 /// 3480 3481 /// 3482 /// Creates a new document picture-in-picture window showing a child WebView. 3483 ERR_PKCS12_IMPORT_BAD_PASSWORD = -701, 3484 /// 3485 ERR_PKCS12_IMPORT_FAILED = -702, 3486 3487 /// 3488 /// "Verb" of a drag-and-drop operation as negotiated between the source and 3489 ERR_IMPORT_CA_CERT_NOT_CA = -703, 3490 /// destination. These constants match their equivalents in WebCore's 3491 /// DragActions.h and should not be renumbered. 3492 /// 3493 ERR_IMPORT_CERT_ALREADY_EXISTS = -704, 3494 ERR_IMPORT_CA_CERT_FAILED = -705, 3495 ERR_IMPORT_SERVER_CERT_FAILED = -706, 3496 3497 /// 3498 /// Input mode of a virtual keyboard. These constants match their equivalents 3499 ERR_PKCS12_IMPORT_INVALID_MAC = -707, 3500 /// in Chromium's text_input_mode.h and should not be renumbered. 3501 /// See https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute 3502 ERR_PKCS12_IMPORT_INVALID_FILE = -708, 3503 /// 3504 ERR_PKCS12_IMPORT_UNSUPPORTED = -709, 3505 ERR_KEY_GENERATION_FAILED = -710, 3506 ERR_PRIVATE_KEY_EXPORT_FAILED = -712, 3507 ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713, 3508 3509 /// 3510 /// V8 access control values. 3511 /// 3512 ERR_CERT_DATABASE_CHANGED = -714, 3513 ERR_CERT_VERIFIER_CHANGED = -716, 3514 3515 /// 3516 /// V8 property attribute values. 3517 /// 3518 3519 /// 3520 /// Writeable, Enumerable, Configurable 3521 ERR_DNS_MALFORMED_RESPONSE = -800, 3522 /// 3523 3524 /// 3525 /// Not writeable 3526 ERR_DNS_SERVER_REQUIRES_TCP = -801, 3527 /// 3528 3529 /// 3530 /// Not enumerable 3531 /// 3532 3533 /// 3534 /// Not configurable 3535 /// 3536 3537 /// 3538 /// Post data elements may represent either bytes or files. 3539 /// 3540 3541 /// 3542 /// Resource type for a request. These constants match their equivalents in 3543 /// Chromium's ResourceType and should not be renumbered. 3544 ERR_DNS_SERVER_FAILED = -802, 3545 /// 3546 3547 /// 3548 /// Top level page. 3549 ERR_DNS_TIMED_OUT = -803, 3550 /// 3551 3552 /// 3553 /// Frame or iframe. 3554 /// 3555 3556 /// 3557 /// CSS stylesheet. 3558 /// 3559 3560 /// 3561 /// External script. 3562 /// 3563 3564 /// 3565 /// Image (jpg/gif/png/etc). 3566 /// 3567 3568 /// 3569 /// Font. 3570 /// 3571 ERR_DNS_CACHE_MISS = -804, 3572 3573 /// 3574 /// Some other subresource. This is the default type if the actual type is 3575 /// unknown. 3576 ERR_DNS_SEARCH_EMPTY = -805, 3577 /// 3578 3579 /// 3580 /// Object (or embed) tag for a plugin, or a resource that a plugin requested. 3581 ERR_DNS_SORT_ERROR = -806, 3582 /// 3583 3584 /// 3585 /// Media resource. 3586 /// 3587 3588 /// 3589 /// Main resource of a dedicated worker. 3590 ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808, 3591 /// 3592 3593 /// 3594 /// Main resource of a shared worker. 3595 /// 3596 3597 /// 3598 /// Explicitly requested prefetch. 3599 /// 3600 3601 /// 3602 /// Favicon. 3603 /// 3604 3605 /// 3606 /// XMLHttpRequest. 3607 ERR_DNS_NAME_HTTPS_ONLY = -809, 3608 /// 3609 3610 /// 3611 /// A request for a "<ping>". 3612 /// 3613 3614 /// 3615 /// Main resource of a service worker. 3616 ERR_DNS_REQUEST_CANCELLED = -810, 3617 /// 3618 3619 /// 3620 /// A report of Content Security Policy violations. 3621 /// 3622 3623 /// 3624 /// A resource that a plugin requested. 3625 ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811, 3626 /// 3627 3628 /// 3629 /// A main-frame service worker navigation preload request. 3630 ERR_DICTIONARY_LOAD_FAILED = -812 3631 } 3632 3633 alias ERR_NONE = cef_errorcode_t.ERR_NONE; 3634 alias ERR_IO_PENDING = cef_errorcode_t.ERR_IO_PENDING; 3635 alias ERR_FAILED = cef_errorcode_t.ERR_FAILED; 3636 alias ERR_ABORTED = cef_errorcode_t.ERR_ABORTED; 3637 alias ERR_INVALID_ARGUMENT = cef_errorcode_t.ERR_INVALID_ARGUMENT; 3638 alias ERR_INVALID_HANDLE = cef_errorcode_t.ERR_INVALID_HANDLE; 3639 alias ERR_FILE_NOT_FOUND = cef_errorcode_t.ERR_FILE_NOT_FOUND; 3640 alias ERR_TIMED_OUT = cef_errorcode_t.ERR_TIMED_OUT; 3641 alias ERR_FILE_TOO_BIG = cef_errorcode_t.ERR_FILE_TOO_BIG; 3642 alias ERR_UNEXPECTED = cef_errorcode_t.ERR_UNEXPECTED; 3643 alias ERR_ACCESS_DENIED = cef_errorcode_t.ERR_ACCESS_DENIED; 3644 alias ERR_NOT_IMPLEMENTED = cef_errorcode_t.ERR_NOT_IMPLEMENTED; 3645 alias ERR_INSUFFICIENT_RESOURCES = cef_errorcode_t.ERR_INSUFFICIENT_RESOURCES; 3646 alias ERR_OUT_OF_MEMORY = cef_errorcode_t.ERR_OUT_OF_MEMORY; 3647 alias ERR_UPLOAD_FILE_CHANGED = cef_errorcode_t.ERR_UPLOAD_FILE_CHANGED; 3648 alias ERR_SOCKET_NOT_CONNECTED = cef_errorcode_t.ERR_SOCKET_NOT_CONNECTED; 3649 alias ERR_FILE_EXISTS = cef_errorcode_t.ERR_FILE_EXISTS; 3650 alias ERR_FILE_PATH_TOO_LONG = cef_errorcode_t.ERR_FILE_PATH_TOO_LONG; 3651 alias ERR_FILE_NO_SPACE = cef_errorcode_t.ERR_FILE_NO_SPACE; 3652 alias ERR_FILE_VIRUS_INFECTED = cef_errorcode_t.ERR_FILE_VIRUS_INFECTED; 3653 alias ERR_BLOCKED_BY_CLIENT = cef_errorcode_t.ERR_BLOCKED_BY_CLIENT; 3654 alias ERR_NETWORK_CHANGED = cef_errorcode_t.ERR_NETWORK_CHANGED; 3655 alias ERR_BLOCKED_BY_ADMINISTRATOR = cef_errorcode_t.ERR_BLOCKED_BY_ADMINISTRATOR; 3656 alias ERR_SOCKET_IS_CONNECTED = cef_errorcode_t.ERR_SOCKET_IS_CONNECTED; 3657 alias ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = cef_errorcode_t.ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED; 3658 alias ERR_CONTEXT_SHUT_DOWN = cef_errorcode_t.ERR_CONTEXT_SHUT_DOWN; 3659 alias ERR_BLOCKED_BY_RESPONSE = cef_errorcode_t.ERR_BLOCKED_BY_RESPONSE; 3660 alias ERR_CLEARTEXT_NOT_PERMITTED = cef_errorcode_t.ERR_CLEARTEXT_NOT_PERMITTED; 3661 alias ERR_BLOCKED_BY_CSP = cef_errorcode_t.ERR_BLOCKED_BY_CSP; 3662 alias ERR_H2_OR_QUIC_REQUIRED = cef_errorcode_t.ERR_H2_OR_QUIC_REQUIRED; 3663 alias ERR_BLOCKED_BY_ORB = cef_errorcode_t.ERR_BLOCKED_BY_ORB; 3664 alias ERR_CONNECTION_CLOSED = cef_errorcode_t.ERR_CONNECTION_CLOSED; 3665 alias ERR_CONNECTION_RESET = cef_errorcode_t.ERR_CONNECTION_RESET; 3666 alias ERR_CONNECTION_REFUSED = cef_errorcode_t.ERR_CONNECTION_REFUSED; 3667 alias ERR_CONNECTION_ABORTED = cef_errorcode_t.ERR_CONNECTION_ABORTED; 3668 alias ERR_CONNECTION_FAILED = cef_errorcode_t.ERR_CONNECTION_FAILED; 3669 alias ERR_NAME_NOT_RESOLVED = cef_errorcode_t.ERR_NAME_NOT_RESOLVED; 3670 alias ERR_INTERNET_DISCONNECTED = cef_errorcode_t.ERR_INTERNET_DISCONNECTED; 3671 alias ERR_SSL_PROTOCOL_ERROR = cef_errorcode_t.ERR_SSL_PROTOCOL_ERROR; 3672 alias ERR_ADDRESS_INVALID = cef_errorcode_t.ERR_ADDRESS_INVALID; 3673 alias ERR_ADDRESS_UNREACHABLE = cef_errorcode_t.ERR_ADDRESS_UNREACHABLE; 3674 alias ERR_SSL_CLIENT_AUTH_CERT_NEEDED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NEEDED; 3675 alias ERR_TUNNEL_CONNECTION_FAILED = cef_errorcode_t.ERR_TUNNEL_CONNECTION_FAILED; 3676 alias ERR_NO_SSL_VERSIONS_ENABLED = cef_errorcode_t.ERR_NO_SSL_VERSIONS_ENABLED; 3677 alias ERR_SSL_VERSION_OR_CIPHER_MISMATCH = cef_errorcode_t.ERR_SSL_VERSION_OR_CIPHER_MISMATCH; 3678 alias ERR_SSL_RENEGOTIATION_REQUESTED = cef_errorcode_t.ERR_SSL_RENEGOTIATION_REQUESTED; 3679 alias ERR_PROXY_AUTH_UNSUPPORTED = cef_errorcode_t.ERR_PROXY_AUTH_UNSUPPORTED; 3680 alias ERR_BAD_SSL_CLIENT_AUTH_CERT = cef_errorcode_t.ERR_BAD_SSL_CLIENT_AUTH_CERT; 3681 alias ERR_CONNECTION_TIMED_OUT = cef_errorcode_t.ERR_CONNECTION_TIMED_OUT; 3682 alias ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_HOST_RESOLVER_QUEUE_TOO_LARGE; 3683 alias ERR_SOCKS_CONNECTION_FAILED = cef_errorcode_t.ERR_SOCKS_CONNECTION_FAILED; 3684 alias ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = cef_errorcode_t.ERR_SOCKS_CONNECTION_HOST_UNREACHABLE; 3685 alias ERR_ALPN_NEGOTIATION_FAILED = cef_errorcode_t.ERR_ALPN_NEGOTIATION_FAILED; 3686 alias ERR_SSL_NO_RENEGOTIATION = cef_errorcode_t.ERR_SSL_NO_RENEGOTIATION; 3687 alias ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = cef_errorcode_t.ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES; 3688 alias ERR_SSL_DECOMPRESSION_FAILURE_ALERT = cef_errorcode_t.ERR_SSL_DECOMPRESSION_FAILURE_ALERT; 3689 alias ERR_SSL_BAD_RECORD_MAC_ALERT = cef_errorcode_t.ERR_SSL_BAD_RECORD_MAC_ALERT; 3690 alias ERR_PROXY_AUTH_REQUESTED = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED; 3691 alias ERR_PROXY_CONNECTION_FAILED = cef_errorcode_t.ERR_PROXY_CONNECTION_FAILED; 3692 alias ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = cef_errorcode_t.ERR_MANDATORY_PROXY_CONFIGURATION_FAILED; 3693 alias ERR_PRECONNECT_MAX_SOCKET_LIMIT = cef_errorcode_t.ERR_PRECONNECT_MAX_SOCKET_LIMIT; 3694 alias ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED; 3695 alias ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY; 3696 alias ERR_PROXY_CERTIFICATE_INVALID = cef_errorcode_t.ERR_PROXY_CERTIFICATE_INVALID; 3697 alias ERR_NAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_NAME_RESOLUTION_FAILED; 3698 alias ERR_NETWORK_ACCESS_DENIED = cef_errorcode_t.ERR_NETWORK_ACCESS_DENIED; 3699 alias ERR_TEMPORARILY_THROTTLED = cef_errorcode_t.ERR_TEMPORARILY_THROTTLED; 3700 alias ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = cef_errorcode_t.ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT; 3701 alias ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED; 3702 alias ERR_MSG_TOO_BIG = cef_errorcode_t.ERR_MSG_TOO_BIG; 3703 alias ERR_WS_PROTOCOL_ERROR = cef_errorcode_t.ERR_WS_PROTOCOL_ERROR; 3704 alias ERR_ADDRESS_IN_USE = cef_errorcode_t.ERR_ADDRESS_IN_USE; 3705 alias ERR_SSL_HANDSHAKE_NOT_COMPLETED = cef_errorcode_t.ERR_SSL_HANDSHAKE_NOT_COMPLETED; 3706 alias ERR_SSL_BAD_PEER_PUBLIC_KEY = cef_errorcode_t.ERR_SSL_BAD_PEER_PUBLIC_KEY; 3707 alias ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = cef_errorcode_t.ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN; 3708 alias ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = cef_errorcode_t.ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED; 3709 alias ERR_SSL_DECRYPT_ERROR_ALERT = cef_errorcode_t.ERR_SSL_DECRYPT_ERROR_ALERT; 3710 alias ERR_WS_THROTTLE_QUEUE_TOO_LARGE = cef_errorcode_t.ERR_WS_THROTTLE_QUEUE_TOO_LARGE; 3711 alias ERR_SSL_SERVER_CERT_CHANGED = cef_errorcode_t.ERR_SSL_SERVER_CERT_CHANGED; 3712 alias ERR_SSL_UNRECOGNIZED_NAME_ALERT = cef_errorcode_t.ERR_SSL_UNRECOGNIZED_NAME_ALERT; 3713 alias ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR; 3714 alias ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = cef_errorcode_t.ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR; 3715 alias ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE; 3716 alias ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = cef_errorcode_t.ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE; 3717 alias ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT; 3718 alias ERR_ICANN_NAME_COLLISION = cef_errorcode_t.ERR_ICANN_NAME_COLLISION; 3719 alias ERR_SSL_SERVER_CERT_BAD_FORMAT = cef_errorcode_t.ERR_SSL_SERVER_CERT_BAD_FORMAT; 3720 alias ERR_CT_STH_PARSING_FAILED = cef_errorcode_t.ERR_CT_STH_PARSING_FAILED; 3721 alias ERR_CT_STH_INCOMPLETE = cef_errorcode_t.ERR_CT_STH_INCOMPLETE; 3722 alias ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = cef_errorcode_t.ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH; 3723 alias ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = cef_errorcode_t.ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED; 3724 alias ERR_SSL_OBSOLETE_CIPHER = cef_errorcode_t.ERR_SSL_OBSOLETE_CIPHER; 3725 alias ERR_WS_UPGRADE = cef_errorcode_t.ERR_WS_UPGRADE; 3726 alias ERR_READ_IF_READY_NOT_IMPLEMENTED = cef_errorcode_t.ERR_READ_IF_READY_NOT_IMPLEMENTED; 3727 alias ERR_NO_BUFFER_SPACE = cef_errorcode_t.ERR_NO_BUFFER_SPACE; 3728 alias ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = cef_errorcode_t.ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS; 3729 alias ERR_EARLY_DATA_REJECTED = cef_errorcode_t.ERR_EARLY_DATA_REJECTED; 3730 alias ERR_WRONG_VERSION_ON_EARLY_DATA = cef_errorcode_t.ERR_WRONG_VERSION_ON_EARLY_DATA; 3731 alias ERR_TLS13_DOWNGRADE_DETECTED = cef_errorcode_t.ERR_TLS13_DOWNGRADE_DETECTED; 3732 alias ERR_SSL_KEY_USAGE_INCOMPATIBLE = cef_errorcode_t.ERR_SSL_KEY_USAGE_INCOMPATIBLE; 3733 alias ERR_INVALID_ECH_CONFIG_LIST = cef_errorcode_t.ERR_INVALID_ECH_CONFIG_LIST; 3734 alias ERR_ECH_NOT_NEGOTIATED = cef_errorcode_t.ERR_ECH_NOT_NEGOTIATED; 3735 alias ERR_ECH_FALLBACK_CERTIFICATE_INVALID = cef_errorcode_t.ERR_ECH_FALLBACK_CERTIFICATE_INVALID; 3736 alias ERR_CERT_COMMON_NAME_INVALID = cef_errorcode_t.ERR_CERT_COMMON_NAME_INVALID; 3737 alias ERR_CERT_DATE_INVALID = cef_errorcode_t.ERR_CERT_DATE_INVALID; 3738 alias ERR_CERT_AUTHORITY_INVALID = cef_errorcode_t.ERR_CERT_AUTHORITY_INVALID; 3739 alias ERR_CERT_CONTAINS_ERRORS = cef_errorcode_t.ERR_CERT_CONTAINS_ERRORS; 3740 alias ERR_CERT_NO_REVOCATION_MECHANISM = cef_errorcode_t.ERR_CERT_NO_REVOCATION_MECHANISM; 3741 alias ERR_CERT_UNABLE_TO_CHECK_REVOCATION = cef_errorcode_t.ERR_CERT_UNABLE_TO_CHECK_REVOCATION; 3742 alias ERR_CERT_REVOKED = cef_errorcode_t.ERR_CERT_REVOKED; 3743 alias ERR_CERT_INVALID = cef_errorcode_t.ERR_CERT_INVALID; 3744 alias ERR_CERT_WEAK_SIGNATURE_ALGORITHM = cef_errorcode_t.ERR_CERT_WEAK_SIGNATURE_ALGORITHM; 3745 alias ERR_CERT_NON_UNIQUE_NAME = cef_errorcode_t.ERR_CERT_NON_UNIQUE_NAME; 3746 alias ERR_CERT_WEAK_KEY = cef_errorcode_t.ERR_CERT_WEAK_KEY; 3747 alias ERR_CERT_NAME_CONSTRAINT_VIOLATION = cef_errorcode_t.ERR_CERT_NAME_CONSTRAINT_VIOLATION; 3748 alias ERR_CERT_VALIDITY_TOO_LONG = cef_errorcode_t.ERR_CERT_VALIDITY_TOO_LONG; 3749 alias ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = cef_errorcode_t.ERR_CERTIFICATE_TRANSPARENCY_REQUIRED; 3750 alias ERR_CERT_SYMANTEC_LEGACY = cef_errorcode_t.ERR_CERT_SYMANTEC_LEGACY; 3751 alias ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = cef_errorcode_t.ERR_CERT_KNOWN_INTERCEPTION_BLOCKED; 3752 alias ERR_CERT_END = cef_errorcode_t.ERR_CERT_END; 3753 alias ERR_INVALID_URL = cef_errorcode_t.ERR_INVALID_URL; 3754 alias ERR_DISALLOWED_URL_SCHEME = cef_errorcode_t.ERR_DISALLOWED_URL_SCHEME; 3755 alias ERR_UNKNOWN_URL_SCHEME = cef_errorcode_t.ERR_UNKNOWN_URL_SCHEME; 3756 alias ERR_INVALID_REDIRECT = cef_errorcode_t.ERR_INVALID_REDIRECT; 3757 alias ERR_TOO_MANY_REDIRECTS = cef_errorcode_t.ERR_TOO_MANY_REDIRECTS; 3758 alias ERR_UNSAFE_REDIRECT = cef_errorcode_t.ERR_UNSAFE_REDIRECT; 3759 alias ERR_UNSAFE_PORT = cef_errorcode_t.ERR_UNSAFE_PORT; 3760 alias ERR_INVALID_RESPONSE = cef_errorcode_t.ERR_INVALID_RESPONSE; 3761 alias ERR_INVALID_CHUNKED_ENCODING = cef_errorcode_t.ERR_INVALID_CHUNKED_ENCODING; 3762 alias ERR_METHOD_NOT_SUPPORTED = cef_errorcode_t.ERR_METHOD_NOT_SUPPORTED; 3763 alias ERR_UNEXPECTED_PROXY_AUTH = cef_errorcode_t.ERR_UNEXPECTED_PROXY_AUTH; 3764 alias ERR_EMPTY_RESPONSE = cef_errorcode_t.ERR_EMPTY_RESPONSE; 3765 alias ERR_RESPONSE_HEADERS_TOO_BIG = cef_errorcode_t.ERR_RESPONSE_HEADERS_TOO_BIG; 3766 alias ERR_PAC_SCRIPT_FAILED = cef_errorcode_t.ERR_PAC_SCRIPT_FAILED; 3767 alias ERR_REQUEST_RANGE_NOT_SATISFIABLE = cef_errorcode_t.ERR_REQUEST_RANGE_NOT_SATISFIABLE; 3768 alias ERR_MALFORMED_IDENTITY = cef_errorcode_t.ERR_MALFORMED_IDENTITY; 3769 alias ERR_CONTENT_DECODING_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_FAILED; 3770 alias ERR_NETWORK_IO_SUSPENDED = cef_errorcode_t.ERR_NETWORK_IO_SUSPENDED; 3771 alias ERR_SYN_REPLY_NOT_RECEIVED = cef_errorcode_t.ERR_SYN_REPLY_NOT_RECEIVED; 3772 alias ERR_ENCODING_CONVERSION_FAILED = cef_errorcode_t.ERR_ENCODING_CONVERSION_FAILED; 3773 alias ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = cef_errorcode_t.ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT; 3774 alias ERR_NO_SUPPORTED_PROXIES = cef_errorcode_t.ERR_NO_SUPPORTED_PROXIES; 3775 alias ERR_HTTP2_PROTOCOL_ERROR = cef_errorcode_t.ERR_HTTP2_PROTOCOL_ERROR; 3776 alias ERR_INVALID_AUTH_CREDENTIALS = cef_errorcode_t.ERR_INVALID_AUTH_CREDENTIALS; 3777 alias ERR_UNSUPPORTED_AUTH_SCHEME = cef_errorcode_t.ERR_UNSUPPORTED_AUTH_SCHEME; 3778 alias ERR_ENCODING_DETECTION_FAILED = cef_errorcode_t.ERR_ENCODING_DETECTION_FAILED; 3779 alias ERR_MISSING_AUTH_CREDENTIALS = cef_errorcode_t.ERR_MISSING_AUTH_CREDENTIALS; 3780 alias ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS; 3781 alias ERR_MISCONFIGURED_AUTH_ENVIRONMENT = cef_errorcode_t.ERR_MISCONFIGURED_AUTH_ENVIRONMENT; 3782 alias ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = cef_errorcode_t.ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS; 3783 alias ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = cef_errorcode_t.ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN; 3784 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH; 3785 alias ERR_INCOMPLETE_HTTP2_HEADERS = cef_errorcode_t.ERR_INCOMPLETE_HTTP2_HEADERS; 3786 alias ERR_PAC_NOT_IN_DHCP = cef_errorcode_t.ERR_PAC_NOT_IN_DHCP; 3787 alias ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION; 3788 alias ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = cef_errorcode_t.ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION; 3789 alias ERR_HTTP2_SERVER_REFUSED_STREAM = cef_errorcode_t.ERR_HTTP2_SERVER_REFUSED_STREAM; 3790 alias ERR_HTTP2_PING_FAILED = cef_errorcode_t.ERR_HTTP2_PING_FAILED; 3791 alias ERR_CONTENT_LENGTH_MISMATCH = cef_errorcode_t.ERR_CONTENT_LENGTH_MISMATCH; 3792 alias ERR_INCOMPLETE_CHUNKED_ENCODING = cef_errorcode_t.ERR_INCOMPLETE_CHUNKED_ENCODING; 3793 alias ERR_QUIC_PROTOCOL_ERROR = cef_errorcode_t.ERR_QUIC_PROTOCOL_ERROR; 3794 alias ERR_RESPONSE_HEADERS_TRUNCATED = cef_errorcode_t.ERR_RESPONSE_HEADERS_TRUNCATED; 3795 alias ERR_QUIC_HANDSHAKE_FAILED = cef_errorcode_t.ERR_QUIC_HANDSHAKE_FAILED; 3796 alias ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = cef_errorcode_t.ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY; 3797 alias ERR_HTTP2_FLOW_CONTROL_ERROR = cef_errorcode_t.ERR_HTTP2_FLOW_CONTROL_ERROR; 3798 alias ERR_HTTP2_FRAME_SIZE_ERROR = cef_errorcode_t.ERR_HTTP2_FRAME_SIZE_ERROR; 3799 alias ERR_HTTP2_COMPRESSION_ERROR = cef_errorcode_t.ERR_HTTP2_COMPRESSION_ERROR; 3800 alias ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = cef_errorcode_t.ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION; 3801 alias ERR_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_HTTP_1_1_REQUIRED; 3802 alias ERR_PROXY_HTTP_1_1_REQUIRED = cef_errorcode_t.ERR_PROXY_HTTP_1_1_REQUIRED; 3803 alias ERR_PAC_SCRIPT_TERMINATED = cef_errorcode_t.ERR_PAC_SCRIPT_TERMINATED; 3804 alias ERR_INVALID_HTTP_RESPONSE = cef_errorcode_t.ERR_INVALID_HTTP_RESPONSE; 3805 alias ERR_CONTENT_DECODING_INIT_FAILED = cef_errorcode_t.ERR_CONTENT_DECODING_INIT_FAILED; 3806 alias ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = cef_errorcode_t.ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED; 3807 alias ERR_TOO_MANY_RETRIES = cef_errorcode_t.ERR_TOO_MANY_RETRIES; 3808 alias ERR_HTTP2_STREAM_CLOSED = cef_errorcode_t.ERR_HTTP2_STREAM_CLOSED; 3809 alias ERR_HTTP_RESPONSE_CODE_FAILURE = cef_errorcode_t.ERR_HTTP_RESPONSE_CODE_FAILURE; 3810 alias ERR_QUIC_CERT_ROOT_NOT_KNOWN = cef_errorcode_t.ERR_QUIC_CERT_ROOT_NOT_KNOWN; 3811 alias ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = cef_errorcode_t.ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED; 3812 alias ERR_TOO_MANY_ACCEPT_CH_RESTARTS = cef_errorcode_t.ERR_TOO_MANY_ACCEPT_CH_RESTARTS; 3813 alias ERR_INCONSISTENT_IP_ADDRESS_SPACE = cef_errorcode_t.ERR_INCONSISTENT_IP_ADDRESS_SPACE; 3814 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; 3815 alias ERR_CACHE_MISS = cef_errorcode_t.ERR_CACHE_MISS; 3816 alias ERR_CACHE_READ_FAILURE = cef_errorcode_t.ERR_CACHE_READ_FAILURE; 3817 alias ERR_CACHE_WRITE_FAILURE = cef_errorcode_t.ERR_CACHE_WRITE_FAILURE; 3818 alias ERR_CACHE_OPERATION_NOT_SUPPORTED = cef_errorcode_t.ERR_CACHE_OPERATION_NOT_SUPPORTED; 3819 alias ERR_CACHE_OPEN_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_FAILURE; 3820 alias ERR_CACHE_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_CREATE_FAILURE; 3821 alias ERR_CACHE_RACE = cef_errorcode_t.ERR_CACHE_RACE; 3822 alias ERR_CACHE_CHECKSUM_READ_FAILURE = cef_errorcode_t.ERR_CACHE_CHECKSUM_READ_FAILURE; 3823 alias ERR_CACHE_CHECKSUM_MISMATCH = cef_errorcode_t.ERR_CACHE_CHECKSUM_MISMATCH; 3824 alias ERR_CACHE_LOCK_TIMEOUT = cef_errorcode_t.ERR_CACHE_LOCK_TIMEOUT; 3825 alias ERR_CACHE_AUTH_FAILURE_AFTER_READ = cef_errorcode_t.ERR_CACHE_AUTH_FAILURE_AFTER_READ; 3826 alias ERR_CACHE_ENTRY_NOT_SUITABLE = cef_errorcode_t.ERR_CACHE_ENTRY_NOT_SUITABLE; 3827 alias ERR_CACHE_DOOM_FAILURE = cef_errorcode_t.ERR_CACHE_DOOM_FAILURE; 3828 alias ERR_CACHE_OPEN_OR_CREATE_FAILURE = cef_errorcode_t.ERR_CACHE_OPEN_OR_CREATE_FAILURE; 3829 alias ERR_INSECURE_RESPONSE = cef_errorcode_t.ERR_INSECURE_RESPONSE; 3830 alias ERR_NO_PRIVATE_KEY_FOR_CERT = cef_errorcode_t.ERR_NO_PRIVATE_KEY_FOR_CERT; 3831 alias ERR_ADD_USER_CERT_FAILED = cef_errorcode_t.ERR_ADD_USER_CERT_FAILED; 3832 alias ERR_INVALID_SIGNED_EXCHANGE = cef_errorcode_t.ERR_INVALID_SIGNED_EXCHANGE; 3833 alias ERR_INVALID_WEB_BUNDLE = cef_errorcode_t.ERR_INVALID_WEB_BUNDLE; 3834 alias ERR_TRUST_TOKEN_OPERATION_FAILED = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_FAILED; 3835 alias ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = cef_errorcode_t.ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST; 3836 alias ERR_FTP_FAILED = cef_errorcode_t.ERR_FTP_FAILED; 3837 alias ERR_FTP_SERVICE_UNAVAILABLE = cef_errorcode_t.ERR_FTP_SERVICE_UNAVAILABLE; 3838 alias ERR_FTP_TRANSFER_ABORTED = cef_errorcode_t.ERR_FTP_TRANSFER_ABORTED; 3839 alias ERR_FTP_FILE_BUSY = cef_errorcode_t.ERR_FTP_FILE_BUSY; 3840 alias ERR_FTP_SYNTAX_ERROR = cef_errorcode_t.ERR_FTP_SYNTAX_ERROR; 3841 alias ERR_FTP_COMMAND_NOT_SUPPORTED = cef_errorcode_t.ERR_FTP_COMMAND_NOT_SUPPORTED; 3842 alias ERR_FTP_BAD_COMMAND_SEQUENCE = cef_errorcode_t.ERR_FTP_BAD_COMMAND_SEQUENCE; 3843 alias ERR_PKCS12_IMPORT_BAD_PASSWORD = cef_errorcode_t.ERR_PKCS12_IMPORT_BAD_PASSWORD; 3844 alias ERR_PKCS12_IMPORT_FAILED = cef_errorcode_t.ERR_PKCS12_IMPORT_FAILED; 3845 alias ERR_IMPORT_CA_CERT_NOT_CA = cef_errorcode_t.ERR_IMPORT_CA_CERT_NOT_CA; 3846 alias ERR_IMPORT_CERT_ALREADY_EXISTS = cef_errorcode_t.ERR_IMPORT_CERT_ALREADY_EXISTS; 3847 alias ERR_IMPORT_CA_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_CA_CERT_FAILED; 3848 alias ERR_IMPORT_SERVER_CERT_FAILED = cef_errorcode_t.ERR_IMPORT_SERVER_CERT_FAILED; 3849 alias ERR_PKCS12_IMPORT_INVALID_MAC = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_MAC; 3850 alias ERR_PKCS12_IMPORT_INVALID_FILE = cef_errorcode_t.ERR_PKCS12_IMPORT_INVALID_FILE; 3851 alias ERR_PKCS12_IMPORT_UNSUPPORTED = cef_errorcode_t.ERR_PKCS12_IMPORT_UNSUPPORTED; 3852 alias ERR_KEY_GENERATION_FAILED = cef_errorcode_t.ERR_KEY_GENERATION_FAILED; 3853 alias ERR_PRIVATE_KEY_EXPORT_FAILED = cef_errorcode_t.ERR_PRIVATE_KEY_EXPORT_FAILED; 3854 alias ERR_SELF_SIGNED_CERT_GENERATION_FAILED = cef_errorcode_t.ERR_SELF_SIGNED_CERT_GENERATION_FAILED; 3855 alias ERR_CERT_DATABASE_CHANGED = cef_errorcode_t.ERR_CERT_DATABASE_CHANGED; 3856 alias ERR_CERT_VERIFIER_CHANGED = cef_errorcode_t.ERR_CERT_VERIFIER_CHANGED; 3857 alias ERR_DNS_MALFORMED_RESPONSE = cef_errorcode_t.ERR_DNS_MALFORMED_RESPONSE; 3858 alias ERR_DNS_SERVER_REQUIRES_TCP = cef_errorcode_t.ERR_DNS_SERVER_REQUIRES_TCP; 3859 alias ERR_DNS_SERVER_FAILED = cef_errorcode_t.ERR_DNS_SERVER_FAILED; 3860 alias ERR_DNS_TIMED_OUT = cef_errorcode_t.ERR_DNS_TIMED_OUT; 3861 alias ERR_DNS_CACHE_MISS = cef_errorcode_t.ERR_DNS_CACHE_MISS; 3862 alias ERR_DNS_SEARCH_EMPTY = cef_errorcode_t.ERR_DNS_SEARCH_EMPTY; 3863 alias ERR_DNS_SORT_ERROR = cef_errorcode_t.ERR_DNS_SORT_ERROR; 3864 alias ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = cef_errorcode_t.ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED; 3865 alias ERR_DNS_NAME_HTTPS_ONLY = cef_errorcode_t.ERR_DNS_NAME_HTTPS_ONLY; 3866 alias ERR_DNS_REQUEST_CANCELLED = cef_errorcode_t.ERR_DNS_REQUEST_CANCELLED; 3867 alias ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = cef_errorcode_t.ERR_DNS_NO_MATCHING_SUPPORTED_ALPN; 3868 alias ERR_DICTIONARY_LOAD_FAILED = cef_errorcode_t.ERR_DICTIONARY_LOAD_FAILED; 3869 3870 enum cef_cert_status_t 3871 { 3872 CERT_STATUS_NONE = 0, 3873 CERT_STATUS_COMMON_NAME_INVALID = 1 << 0, 3874 CERT_STATUS_DATE_INVALID = 1 << 1, 3875 CERT_STATUS_AUTHORITY_INVALID = 1 << 2, 3876 CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4, 3877 CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5, 3878 CERT_STATUS_REVOKED = 1 << 6, 3879 CERT_STATUS_INVALID = 1 << 7, 3880 CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8, 3881 CERT_STATUS_NON_UNIQUE_NAME = 1 << 10, 3882 CERT_STATUS_WEAK_KEY = 1 << 11, 3883 CERT_STATUS_PINNED_KEY_MISSING = 1 << 13, 3884 CERT_STATUS_NAME_CONSTRAINT_VIOLATION = 1 << 14, 3885 CERT_STATUS_VALIDITY_TOO_LONG = 1 << 15, 3886 CERT_STATUS_IS_EV = 1 << 16, 3887 CERT_STATUS_REV_CHECKING_ENABLED = 1 << 17, 3888 CERT_STATUS_SHA1_SIGNATURE_PRESENT = 1 << 19, 3889 CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20 3890 } 3891 3892 alias CERT_STATUS_NONE = cef_cert_status_t.CERT_STATUS_NONE; 3893 alias CERT_STATUS_COMMON_NAME_INVALID = cef_cert_status_t.CERT_STATUS_COMMON_NAME_INVALID; 3894 alias CERT_STATUS_DATE_INVALID = cef_cert_status_t.CERT_STATUS_DATE_INVALID; 3895 alias CERT_STATUS_AUTHORITY_INVALID = cef_cert_status_t.CERT_STATUS_AUTHORITY_INVALID; 3896 alias CERT_STATUS_NO_REVOCATION_MECHANISM = cef_cert_status_t.CERT_STATUS_NO_REVOCATION_MECHANISM; 3897 alias CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = cef_cert_status_t.CERT_STATUS_UNABLE_TO_CHECK_REVOCATION; 3898 alias CERT_STATUS_REVOKED = cef_cert_status_t.CERT_STATUS_REVOKED; 3899 alias CERT_STATUS_INVALID = cef_cert_status_t.CERT_STATUS_INVALID; 3900 alias CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = cef_cert_status_t.CERT_STATUS_WEAK_SIGNATURE_ALGORITHM; 3901 alias CERT_STATUS_NON_UNIQUE_NAME = cef_cert_status_t.CERT_STATUS_NON_UNIQUE_NAME; 3902 alias CERT_STATUS_WEAK_KEY = cef_cert_status_t.CERT_STATUS_WEAK_KEY; 3903 alias CERT_STATUS_PINNED_KEY_MISSING = cef_cert_status_t.CERT_STATUS_PINNED_KEY_MISSING; 3904 alias CERT_STATUS_NAME_CONSTRAINT_VIOLATION = cef_cert_status_t.CERT_STATUS_NAME_CONSTRAINT_VIOLATION; 3905 alias CERT_STATUS_VALIDITY_TOO_LONG = cef_cert_status_t.CERT_STATUS_VALIDITY_TOO_LONG; 3906 alias CERT_STATUS_IS_EV = cef_cert_status_t.CERT_STATUS_IS_EV; 3907 alias CERT_STATUS_REV_CHECKING_ENABLED = cef_cert_status_t.CERT_STATUS_REV_CHECKING_ENABLED; 3908 alias CERT_STATUS_SHA1_SIGNATURE_PRESENT = cef_cert_status_t.CERT_STATUS_SHA1_SIGNATURE_PRESENT; 3909 alias CERT_STATUS_CT_COMPLIANCE_FAILED = cef_cert_status_t.CERT_STATUS_CT_COMPLIANCE_FAILED; 3910 3911 enum cef_window_open_disposition_t 3912 { 3913 WOD_UNKNOWN = 0, 3914 WOD_CURRENT_TAB = 1, 3915 WOD_SINGLETON_TAB = 2, 3916 WOD_NEW_FOREGROUND_TAB = 3, 3917 WOD_NEW_BACKGROUND_TAB = 4, 3918 WOD_NEW_POPUP = 5, 3919 WOD_NEW_WINDOW = 6, 3920 WOD_SAVE_TO_DISK = 7, 3921 WOD_OFF_THE_RECORD = 8, 3922 WOD_IGNORE_ACTION = 9, 3923 WOD_SWITCH_TO_TAB = 10, 3924 WOD_NEW_PICTURE_IN_PICTURE = 11 3925 } 3926 3927 alias WOD_UNKNOWN = cef_window_open_disposition_t.WOD_UNKNOWN; 3928 alias WOD_CURRENT_TAB = cef_window_open_disposition_t.WOD_CURRENT_TAB; 3929 alias WOD_SINGLETON_TAB = cef_window_open_disposition_t.WOD_SINGLETON_TAB; 3930 alias WOD_NEW_FOREGROUND_TAB = cef_window_open_disposition_t.WOD_NEW_FOREGROUND_TAB; 3931 alias WOD_NEW_BACKGROUND_TAB = cef_window_open_disposition_t.WOD_NEW_BACKGROUND_TAB; 3932 alias WOD_NEW_POPUP = cef_window_open_disposition_t.WOD_NEW_POPUP; 3933 alias WOD_NEW_WINDOW = cef_window_open_disposition_t.WOD_NEW_WINDOW; 3934 alias WOD_SAVE_TO_DISK = cef_window_open_disposition_t.WOD_SAVE_TO_DISK; 3935 alias WOD_OFF_THE_RECORD = cef_window_open_disposition_t.WOD_OFF_THE_RECORD; 3936 alias WOD_IGNORE_ACTION = cef_window_open_disposition_t.WOD_IGNORE_ACTION; 3937 alias WOD_SWITCH_TO_TAB = cef_window_open_disposition_t.WOD_SWITCH_TO_TAB; 3938 alias WOD_NEW_PICTURE_IN_PICTURE = cef_window_open_disposition_t.WOD_NEW_PICTURE_IN_PICTURE; 3939 3940 enum cef_drag_operations_mask_t 3941 { 3942 DRAG_OPERATION_NONE = 0, 3943 DRAG_OPERATION_COPY = 1, 3944 DRAG_OPERATION_LINK = 2, 3945 DRAG_OPERATION_GENERIC = 4, 3946 DRAG_OPERATION_PRIVATE = 8, 3947 DRAG_OPERATION_MOVE = 16, 3948 DRAG_OPERATION_DELETE = 32, 3949 DRAG_OPERATION_EVERY = UINT_MAX 3950 } 3951 3952 alias DRAG_OPERATION_NONE = cef_drag_operations_mask_t.DRAG_OPERATION_NONE; 3953 alias DRAG_OPERATION_COPY = cef_drag_operations_mask_t.DRAG_OPERATION_COPY; 3954 alias DRAG_OPERATION_LINK = cef_drag_operations_mask_t.DRAG_OPERATION_LINK; 3955 alias DRAG_OPERATION_GENERIC = cef_drag_operations_mask_t.DRAG_OPERATION_GENERIC; 3956 alias DRAG_OPERATION_PRIVATE = cef_drag_operations_mask_t.DRAG_OPERATION_PRIVATE; 3957 alias DRAG_OPERATION_MOVE = cef_drag_operations_mask_t.DRAG_OPERATION_MOVE; 3958 alias DRAG_OPERATION_DELETE = cef_drag_operations_mask_t.DRAG_OPERATION_DELETE; 3959 alias DRAG_OPERATION_EVERY = cef_drag_operations_mask_t.DRAG_OPERATION_EVERY; 3960 3961 enum cef_text_input_mode_t 3962 { 3963 CEF_TEXT_INPUT_MODE_DEFAULT = 0, 3964 CEF_TEXT_INPUT_MODE_NONE = 1, 3965 CEF_TEXT_INPUT_MODE_TEXT = 2, 3966 CEF_TEXT_INPUT_MODE_TEL = 3, 3967 CEF_TEXT_INPUT_MODE_URL = 4, 3968 CEF_TEXT_INPUT_MODE_EMAIL = 5, 3969 CEF_TEXT_INPUT_MODE_NUMERIC = 6, 3970 CEF_TEXT_INPUT_MODE_DECIMAL = 7, 3971 CEF_TEXT_INPUT_MODE_SEARCH = 8, 3972 CEF_TEXT_INPUT_MODE_MAX = CEF_TEXT_INPUT_MODE_SEARCH 3973 } 3974 3975 alias CEF_TEXT_INPUT_MODE_DEFAULT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DEFAULT; 3976 alias CEF_TEXT_INPUT_MODE_NONE = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NONE; 3977 alias CEF_TEXT_INPUT_MODE_TEXT = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEXT; 3978 alias CEF_TEXT_INPUT_MODE_TEL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_TEL; 3979 alias CEF_TEXT_INPUT_MODE_URL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_URL; 3980 alias CEF_TEXT_INPUT_MODE_EMAIL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_EMAIL; 3981 alias CEF_TEXT_INPUT_MODE_NUMERIC = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_NUMERIC; 3982 alias CEF_TEXT_INPUT_MODE_DECIMAL = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_DECIMAL; 3983 alias CEF_TEXT_INPUT_MODE_SEARCH = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_SEARCH; 3984 alias CEF_TEXT_INPUT_MODE_MAX = cef_text_input_mode_t.CEF_TEXT_INPUT_MODE_MAX; 3985 3986 enum cef_v8_accesscontrol_t 3987 { 3988 V8_ACCESS_CONTROL_DEFAULT = 0, 3989 V8_ACCESS_CONTROL_ALL_CAN_READ = 1, 3990 V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1, 3991 V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2 3992 } 3993 3994 alias V8_ACCESS_CONTROL_DEFAULT = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_DEFAULT; 3995 alias V8_ACCESS_CONTROL_ALL_CAN_READ = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_ALL_CAN_READ; 3996 alias V8_ACCESS_CONTROL_ALL_CAN_WRITE = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_ALL_CAN_WRITE; 3997 alias V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = cef_v8_accesscontrol_t.V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING; 3998 3999 enum cef_v8_propertyattribute_t 4000 { 4001 V8_PROPERTY_ATTRIBUTE_NONE = 0, 4002 V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, 4003 V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, 4004 V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 4005 } 4006 4007 alias V8_PROPERTY_ATTRIBUTE_NONE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_NONE; 4008 alias V8_PROPERTY_ATTRIBUTE_READONLY = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_READONLY; 4009 alias V8_PROPERTY_ATTRIBUTE_DONTENUM = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTENUM; 4010 alias V8_PROPERTY_ATTRIBUTE_DONTDELETE = cef_v8_propertyattribute_t.V8_PROPERTY_ATTRIBUTE_DONTDELETE; 4011 4012 enum cef_postdataelement_type_t 4013 { 4014 PDE_TYPE_EMPTY = 0, 4015 PDE_TYPE_BYTES = 1, 4016 PDE_TYPE_FILE = 2 4017 } 4018 4019 alias PDE_TYPE_EMPTY = cef_postdataelement_type_t.PDE_TYPE_EMPTY; 4020 alias PDE_TYPE_BYTES = cef_postdataelement_type_t.PDE_TYPE_BYTES; 4021 alias PDE_TYPE_FILE = cef_postdataelement_type_t.PDE_TYPE_FILE; 4022 4023 enum cef_resource_type_t 4024 { 4025 RT_MAIN_FRAME = 0, 4026 RT_SUB_FRAME = 1, 4027 RT_STYLESHEET = 2, 4028 RT_SCRIPT = 3, 4029 RT_IMAGE = 4, 4030 RT_FONT_RESOURCE = 5, 4031 RT_SUB_RESOURCE = 6, 4032 RT_OBJECT = 7, 4033 RT_MEDIA = 8, 4034 RT_WORKER = 9, 4035 RT_SHARED_WORKER = 10, 4036 RT_PREFETCH = 11, 4037 RT_FAVICON = 12, 4038 RT_XHR = 13, 4039 RT_PING = 14, 4040 RT_SERVICE_WORKER = 15, 4041 RT_CSP_REPORT = 16, 4042 RT_PLUGIN_RESOURCE = 17, 4043 /// 4044 RT_NAVIGATION_PRELOAD_MAIN_FRAME = 19, 4045 4046 /// 4047 /// A sub-frame service worker navigation preload request. 4048 /// 4049 RT_NAVIGATION_PRELOAD_SUB_FRAME = 20 4050 } 4051 4052 alias RT_MAIN_FRAME = cef_resource_type_t.RT_MAIN_FRAME; 4053 alias RT_SUB_FRAME = cef_resource_type_t.RT_SUB_FRAME; 4054 alias RT_STYLESHEET = cef_resource_type_t.RT_STYLESHEET; 4055 alias RT_SCRIPT = cef_resource_type_t.RT_SCRIPT; 4056 alias RT_IMAGE = cef_resource_type_t.RT_IMAGE; 4057 alias RT_FONT_RESOURCE = cef_resource_type_t.RT_FONT_RESOURCE; 4058 alias RT_SUB_RESOURCE = cef_resource_type_t.RT_SUB_RESOURCE; 4059 alias RT_OBJECT = cef_resource_type_t.RT_OBJECT; 4060 alias RT_MEDIA = cef_resource_type_t.RT_MEDIA; 4061 alias RT_WORKER = cef_resource_type_t.RT_WORKER; 4062 alias RT_SHARED_WORKER = cef_resource_type_t.RT_SHARED_WORKER; 4063 alias RT_PREFETCH = cef_resource_type_t.RT_PREFETCH; 4064 alias RT_FAVICON = cef_resource_type_t.RT_FAVICON; 4065 alias RT_XHR = cef_resource_type_t.RT_XHR; 4066 alias RT_PING = cef_resource_type_t.RT_PING; 4067 alias RT_SERVICE_WORKER = cef_resource_type_t.RT_SERVICE_WORKER; 4068 alias RT_CSP_REPORT = cef_resource_type_t.RT_CSP_REPORT; 4069 alias RT_PLUGIN_RESOURCE = cef_resource_type_t.RT_PLUGIN_RESOURCE; 4070 alias RT_NAVIGATION_PRELOAD_MAIN_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_MAIN_FRAME; 4071 alias RT_NAVIGATION_PRELOAD_SUB_FRAME = cef_resource_type_t.RT_NAVIGATION_PRELOAD_SUB_FRAME; 4072 4073 /// 4074 /// Transition type for a request. Made up of one source value and 0 or more 4075 /// qualifiers. 4076 /// 4077 enum cef_transition_type_t 4078 { 4079 /// 4080 /// Source is a link click or the JavaScript window.open function. This is 4081 /// also the default value for requests like sub-resource loads that are not 4082 /// navigations. 4083 /// 4084 TT_LINK = 0, 4085 4086 /// 4087 /// Source is some other "explicit" navigation. This is the default value for 4088 /// navigations where the actual type is unknown. See also 4089 /// TT_DIRECT_LOAD_FLAG. 4090 /// 4091 TT_EXPLICIT = 1, 4092 4093 /// 4094 /// User got to this page through a suggestion in the UI (for example, via the 4095 /// destinations page). Chrome runtime only. 4096 /// 4097 TT_AUTO_BOOKMARK = 2, 4098 4099 /// 4100 /// Source is a subframe navigation. This is any content that is automatically 4101 /// loaded in a non-toplevel frame. For example, if a page consists of several 4102 /// frames containing ads, those ad URLs will have this transition type. 4103 /// The user may not even realize the content in these pages is a separate 4104 /// frame, so may not care about the URL. 4105 /// 4106 TT_AUTO_SUBFRAME = 3, 4107 4108 /// 4109 /// Source is a subframe navigation explicitly requested by the user that will 4110 /// generate new navigation entries in the back/forward list. These are 4111 /// probably more important than frames that were automatically loaded in 4112 /// the background because the user probably cares about the fact that this 4113 /// link was loaded. 4114 /// 4115 TT_MANUAL_SUBFRAME = 4, 4116 4117 /// 4118 /// User got to this page by typing in the URL bar and selecting an entry 4119 /// that did not look like a URL. For example, a match might have the URL 4120 /// of a Google search result page, but appear like "Search Google for ...". 4121 /// These are not quite the same as EXPLICIT navigations because the user 4122 /// didn't type or see the destination URL. Chrome runtime only. 4123 /// See also TT_KEYWORD. 4124 /// 4125 TT_GENERATED = 5, 4126 4127 /// 4128 /// This is a toplevel navigation. This is any content that is automatically 4129 /// loaded in a toplevel frame. For example, opening a tab to show the ASH 4130 /// screen saver, opening the devtools window, opening the NTP after the safe 4131 /// browsing warning, opening web-based dialog boxes are examples of 4132 /// AUTO_TOPLEVEL navigations. Chrome runtime only. 4133 /// 4134 TT_AUTO_TOPLEVEL = 6, 4135 4136 /// 4137 /// Source is a form submission by the user. NOTE: In some situations 4138 /// submitting a form does not result in this transition type. This can happen 4139 /// if the form uses a script to submit the contents. 4140 /// 4141 TT_FORM_SUBMIT = 7, 4142 4143 /// 4144 /// Source is a "reload" of the page via the Reload function or by re-visiting 4145 /// the same URL. NOTE: This is distinct from the concept of whether a 4146 /// particular load uses "reload semantics" (i.e. bypasses cached data). 4147 /// 4148 TT_RELOAD = 8, 4149 4150 /// 4151 /// The url was generated from a replaceable keyword other than the default 4152 /// search provider. If the user types a keyword (which also applies to 4153 /// tab-to-search) in the omnibox this qualifier is applied to the transition 4154 /// type of the generated url. TemplateURLModel then may generate an 4155 /// additional visit with a transition type of TT_KEYWORD_GENERATED against 4156 /// the url 'http://' + keyword. For example, if you do a tab-to-search 4157 /// against wikipedia the generated url has a transition qualifer of 4158 /// TT_KEYWORD, and TemplateURLModel generates a visit for 'wikipedia.org' 4159 /// with a transition type of TT_KEYWORD_GENERATED. Chrome runtime only. 4160 /// 4161 TT_KEYWORD = 9, 4162 4163 /// 4164 /// Corresponds to a visit generated for a keyword. See description of 4165 /// TT_KEYWORD for more details. Chrome runtime only. 4166 /// 4167 TT_KEYWORD_GENERATED = 10, 4168 4169 /// 4170 /// General mask defining the bits used for the source values. 4171 /// 4172 TT_SOURCE_MASK = 0xFF, 4173 4174 /// Qualifiers. 4175 /// Any of the core values above can be augmented by one or more qualifiers. 4176 /// These qualifiers further define the transition. 4177 4178 /// 4179 /// Attempted to visit a URL but was blocked. 4180 /// 4181 TT_BLOCKED_FLAG = 0x00800000, 4182 4183 /// 4184 /// Used the Forward or Back function to navigate among browsing history. 4185 /// Will be ORed to the transition type for the original load. 4186 /// 4187 TT_FORWARD_BACK_FLAG = 0x01000000, 4188 4189 /// 4190 /// Loaded a URL directly via CreateBrowser, LoadURL or LoadRequest. 4191 /// 4192 TT_DIRECT_LOAD_FLAG = 0x02000000, 4193 4194 /// 4195 /// User is navigating to the home page. Chrome runtime only. 4196 /// 4197 TT_HOME_PAGE_FLAG = 0x04000000, 4198 4199 /// 4200 /// The transition originated from an external application; the exact 4201 /// definition of this is embedder dependent. Chrome runtime and 4202 /// extension system only. 4203 /// 4204 TT_FROM_API_FLAG = 0x08000000, 4205 4206 /// 4207 /// The beginning of a navigation chain. 4208 /// 4209 TT_CHAIN_START_FLAG = 0x10000000, 4210 4211 /// 4212 /// The last transition in a redirect chain. 4213 /// 4214 TT_CHAIN_END_FLAG = 0x20000000, 4215 4216 /// 4217 /// Redirects caused by JavaScript or a meta refresh tag on the page. 4218 /// 4219 TT_CLIENT_REDIRECT_FLAG = 0x40000000, 4220 4221 /// 4222 /// Redirects sent from the server by HTTP headers. 4223 /// 4224 TT_SERVER_REDIRECT_FLAG = 0x80000000, 4225 4226 /// 4227 /// Used to test whether a transition involves a redirect. 4228 /// 4229 TT_IS_REDIRECT_MASK = 0xC0000000, 4230 4231 /// 4232 /// General mask defining the bits used for the qualifiers. 4233 /// 4234 TT_QUALIFIER_MASK = 0xFFFFFF00 4235 } 4236 4237 alias TT_LINK = cef_transition_type_t.TT_LINK; 4238 alias TT_EXPLICIT = cef_transition_type_t.TT_EXPLICIT; 4239 alias TT_AUTO_BOOKMARK = cef_transition_type_t.TT_AUTO_BOOKMARK; 4240 alias TT_AUTO_SUBFRAME = cef_transition_type_t.TT_AUTO_SUBFRAME; 4241 alias TT_MANUAL_SUBFRAME = cef_transition_type_t.TT_MANUAL_SUBFRAME; 4242 alias TT_GENERATED = cef_transition_type_t.TT_GENERATED; 4243 alias TT_AUTO_TOPLEVEL = cef_transition_type_t.TT_AUTO_TOPLEVEL; 4244 alias TT_FORM_SUBMIT = cef_transition_type_t.TT_FORM_SUBMIT; 4245 alias TT_RELOAD = cef_transition_type_t.TT_RELOAD; 4246 alias TT_KEYWORD = cef_transition_type_t.TT_KEYWORD; 4247 alias TT_KEYWORD_GENERATED = cef_transition_type_t.TT_KEYWORD_GENERATED; 4248 alias TT_SOURCE_MASK = cef_transition_type_t.TT_SOURCE_MASK; 4249 alias TT_BLOCKED_FLAG = cef_transition_type_t.TT_BLOCKED_FLAG; 4250 alias TT_FORWARD_BACK_FLAG = cef_transition_type_t.TT_FORWARD_BACK_FLAG; 4251 alias TT_DIRECT_LOAD_FLAG = cef_transition_type_t.TT_DIRECT_LOAD_FLAG; 4252 alias TT_HOME_PAGE_FLAG = cef_transition_type_t.TT_HOME_PAGE_FLAG; 4253 alias TT_FROM_API_FLAG = cef_transition_type_t.TT_FROM_API_FLAG; 4254 alias TT_CHAIN_START_FLAG = cef_transition_type_t.TT_CHAIN_START_FLAG; 4255 alias TT_CHAIN_END_FLAG = cef_transition_type_t.TT_CHAIN_END_FLAG; 4256 alias TT_CLIENT_REDIRECT_FLAG = cef_transition_type_t.TT_CLIENT_REDIRECT_FLAG; 4257 alias TT_SERVER_REDIRECT_FLAG = cef_transition_type_t.TT_SERVER_REDIRECT_FLAG; 4258 alias TT_IS_REDIRECT_MASK = cef_transition_type_t.TT_IS_REDIRECT_MASK; 4259 alias TT_QUALIFIER_MASK = cef_transition_type_t.TT_QUALIFIER_MASK; 4260 4261 /// 4262 /// Flags used to customize the behavior of CefURLRequest. 4263 /// 4264 enum cef_urlrequest_flags_t 4265 { 4266 /// 4267 /// Default behavior. 4268 /// 4269 UR_FLAG_NONE = 0, 4270 4271 /// 4272 /// If set the cache will be skipped when handling the request. Setting this 4273 /// value is equivalent to specifying the "Cache-Control: no-cache" request 4274 /// header. Setting this value in combination with UR_FLAG_ONLY_FROM_CACHE 4275 /// will cause the request to fail. 4276 /// 4277 UR_FLAG_SKIP_CACHE = 1 << 0, 4278 4279 /// 4280 /// If set the request will fail if it cannot be served from the cache (or 4281 /// some equivalent local store). Setting this value is equivalent to 4282 /// specifying the "Cache-Control: only-if-cached" request header. Setting 4283 /// this value in combination with UR_FLAG_SKIP_CACHE or UR_FLAG_DISABLE_CACHE 4284 /// will cause the request to fail. 4285 /// 4286 UR_FLAG_ONLY_FROM_CACHE = 1 << 1, 4287 4288 /// 4289 /// If set the cache will not be used at all. Setting this value is equivalent 4290 /// to specifying the "Cache-Control: no-store" request header. Setting this 4291 /// value in combination with UR_FLAG_ONLY_FROM_CACHE will cause the request 4292 /// to fail. 4293 /// 4294 UR_FLAG_DISABLE_CACHE = 1 << 2, 4295 4296 /// 4297 /// If set user name, password, and cookies may be sent with the request, and 4298 /// cookies may be saved from the response. 4299 /// 4300 UR_FLAG_ALLOW_STORED_CREDENTIALS = 1 << 3, 4301 4302 /// 4303 /// If set upload progress events will be generated when a request has a body. 4304 /// 4305 UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 4, 4306 4307 /// 4308 /// If set the CefURLRequestClient::OnDownloadData method will not be called. 4309 /// 4310 UR_FLAG_NO_DOWNLOAD_DATA = 1 << 5, 4311 4312 /// 4313 /// If set 5XX redirect errors will be propagated to the observer instead of 4314 /// automatically re-tried. This currently only applies for requests 4315 /// originated in the browser process. 4316 /// 4317 UR_FLAG_NO_RETRY_ON_5XX = 1 << 6, 4318 4319 /// 4320 /// If set 3XX responses will cause the fetch to halt immediately rather than 4321 /// continue through the redirect. 4322 /// 4323 UR_FLAG_STOP_ON_REDIRECT = 1 << 7 4324 } 4325 4326 alias UR_FLAG_NONE = cef_urlrequest_flags_t.UR_FLAG_NONE; 4327 alias UR_FLAG_SKIP_CACHE = cef_urlrequest_flags_t.UR_FLAG_SKIP_CACHE; 4328 alias UR_FLAG_ONLY_FROM_CACHE = cef_urlrequest_flags_t.UR_FLAG_ONLY_FROM_CACHE; 4329 alias UR_FLAG_DISABLE_CACHE = cef_urlrequest_flags_t.UR_FLAG_DISABLE_CACHE; 4330 alias UR_FLAG_ALLOW_STORED_CREDENTIALS = cef_urlrequest_flags_t.UR_FLAG_ALLOW_STORED_CREDENTIALS; 4331 alias UR_FLAG_REPORT_UPLOAD_PROGRESS = cef_urlrequest_flags_t.UR_FLAG_REPORT_UPLOAD_PROGRESS; 4332 alias UR_FLAG_NO_DOWNLOAD_DATA = cef_urlrequest_flags_t.UR_FLAG_NO_DOWNLOAD_DATA; 4333 alias UR_FLAG_NO_RETRY_ON_5XX = cef_urlrequest_flags_t.UR_FLAG_NO_RETRY_ON_5XX; 4334 alias UR_FLAG_STOP_ON_REDIRECT = cef_urlrequest_flags_t.UR_FLAG_STOP_ON_REDIRECT; 4335 4336 /// 4337 /// Flags that represent CefURLRequest status. 4338 /// 4339 enum cef_urlrequest_status_t 4340 { 4341 /// 4342 /// Unknown status. 4343 /// 4344 UR_UNKNOWN = 0, 4345 4346 /// 4347 /// Request succeeded. 4348 /// 4349 UR_SUCCESS = 1, 4350 4351 /// 4352 /// An IO request is pending, and the caller will be informed when it is 4353 /// completed. 4354 /// 4355 UR_IO_PENDING = 2, 4356 4357 /// 4358 /// Request was canceled programatically. 4359 /// 4360 UR_CANCELED = 3, 4361 4362 /// 4363 /// Request failed for some reason. 4364 /// 4365 UR_FAILED = 4 4366 } 4367 4368 alias UR_UNKNOWN = cef_urlrequest_status_t.UR_UNKNOWN; 4369 alias UR_SUCCESS = cef_urlrequest_status_t.UR_SUCCESS; 4370 alias UR_IO_PENDING = cef_urlrequest_status_t.UR_IO_PENDING; 4371 alias UR_CANCELED = cef_urlrequest_status_t.UR_CANCELED; 4372 alias UR_FAILED = cef_urlrequest_status_t.UR_FAILED; 4373 4374 /// Structure representing a draggable region. 4375 /// 4376 struct cef_draggable_region_t 4377 { 4378 /// 4379 /// Bounds of the region. 4380 /// 4381 g 4382 cef_rect_t bounds; 4383 4384 /// 4385 /// True (1) this this region is draggable and false (0) otherwise. 4386 /// 4387 int draggable; 4388 } 4389 4390 4391 4392 /// 4393 /// Existing process IDs. 4394 /// 4395 enum cef_process_id_t 4396 { 4397 /// 4398 /// Browser process. 4399 /// 4400 PID_BROWSER = 0, 4401 /// 4402 /// Renderer process. 4403 /// 4404 PID_RENDERER = 1 4405 } 4406 4407 alias PID_BROWSER = cef_process_id_t.PID_BROWSER; 4408 alias PID_RENDERER = cef_process_id_t.PID_RENDERER; 4409 4410 /// 4411 /// Existing thread IDs. 4412 /// 4413 enum cef_thread_id_t 4414 { 4415 // BROWSER PROCESS THREADS -- Only available in the browser process. 4416 4417 /// 4418 /// The main thread in the browser. This will be the same as the main 4419 /// application thread if CefInitialize() is called with a 4420 /// CefSettings.multi_threaded_message_loop value of false. Do not perform 4421 /// blocking tasks on this thread. All tasks posted after 4422 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 4423 /// are guaranteed to run. This thread will outlive all other CEF threads. 4424 /// 4425 TID_UI = 0, 4426 4427 /// 4428 /// Used for blocking tasks like file system access where the user won't 4429 /// notice if the task takes an arbitrarily long time to complete. All tasks 4430 /// posted after CefBrowserProcessHandler::OnContextInitialized() and before 4431 /// CefShutdown() are guaranteed to run. 4432 /// 4433 TID_FILE_BACKGROUND = 1, 4434 4435 /// 4436 /// Used for blocking tasks like file system access that affect UI or 4437 /// responsiveness of future user interactions. Do not use if an immediate 4438 /// response to a user interaction is expected. All tasks posted after 4439 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 4440 /// are guaranteed to run. 4441 /// Examples: 4442 /// - Updating the UI to reflect progress on a long task. 4443 /// - Loading data that might be shown in the UI after a future user 4444 /// interaction. 4445 /// 4446 TID_FILE_USER_VISIBLE = 2, 4447 4448 /// 4449 /// Used for blocking tasks like file system access that affect UI 4450 /// immediately after a user interaction. All tasks posted after 4451 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 4452 /// are guaranteed to run. 4453 /// Example: Generating data shown in the UI immediately after a click. 4454 /// 4455 TID_FILE_USER_BLOCKING = 3, 4456 4457 /// 4458 /// Used to launch and terminate browser processes. 4459 /// 4460 TID_PROCESS_LAUNCHER = 4, 4461 4462 /// 4463 /// Used to process IPC and network messages. Do not perform blocking tasks on 4464 /// this thread. All tasks posted after 4465 /// CefBrowserProcessHandler::OnContextInitialized() and before CefShutdown() 4466 /// are guaranteed to run. 4467 /// 4468 TID_IO = 5, 4469 4470 // RENDER PROCESS THREADS -- Only available in the render process. 4471 4472 /// 4473 /// The main thread in the renderer. Used for all WebKit and V8 interaction. 4474 /// Tasks may be posted to this thread after 4475 /// CefRenderProcessHandler::OnWebKitInitialized but are not guaranteed to 4476 /// run before sub-process termination (sub-processes may be killed at any 4477 /// time without warning). 4478 /// 4479 TID_RENDERER = 6 4480 } 4481 4482 alias TID_UI = cef_thread_id_t.TID_UI; 4483 alias TID_FILE_BACKGROUND = cef_thread_id_t.TID_FILE_BACKGROUND; 4484 alias TID_FILE_USER_VISIBLE = cef_thread_id_t.TID_FILE_USER_VISIBLE; 4485 alias TID_FILE_USER_BLOCKING = cef_thread_id_t.TID_FILE_USER_BLOCKING; 4486 alias TID_PROCESS_LAUNCHER = cef_thread_id_t.TID_PROCESS_LAUNCHER; 4487 alias TID_IO = cef_thread_id_t.TID_IO; 4488 alias TID_RENDERER = cef_thread_id_t.TID_RENDERER; 4489 4490 /// 4491 /// Thread priority values listed in increasing order of importance. 4492 /// 4493 enum cef_thread_priority_t 4494 { 4495 /// 4496 /// Suitable for threads that shouldn't disrupt high priority work. 4497 /// 4498 TP_BACKGROUND = 0, 4499 4500 /// 4501 /// Default priority level. 4502 /// 4503 TP_NORMAL = 1, 4504 4505 /// 4506 /// Suitable for threads which generate data for the display (at ~60Hz). 4507 /// 4508 TP_DISPLAY = 2, 4509 4510 /// 4511 /// Suitable for low-latency, glitch-resistant audio. 4512 /// 4513 TP_REALTIME_AUDIO = 3 4514 } 4515 4516 alias TP_BACKGROUND = cef_thread_priority_t.TP_BACKGROUND; 4517 alias TP_NORMAL = cef_thread_priority_t.TP_NORMAL; 4518 alias TP_DISPLAY = cef_thread_priority_t.TP_DISPLAY; 4519 alias TP_REALTIME_AUDIO = cef_thread_priority_t.TP_REALTIME_AUDIO; 4520 4521 /// 4522 /// Message loop types. Indicates the set of asynchronous events that a message 4523 /// loop can process. 4524 /// 4525 enum cef_message_loop_type_t 4526 { 4527 /// 4528 /// Supports tasks and timers. 4529 /// 4530 ML_TYPE_DEFAULT = 0, 4531 4532 /// 4533 /// Supports tasks, timers and native UI events (e.g. Windows messages). 4534 /// 4535 ML_TYPE_UI = 1, 4536 4537 /// 4538 /// Supports tasks, timers and asynchronous IO events. 4539 /// 4540 ML_TYPE_IO = 2 4541 } 4542 4543 alias ML_TYPE_DEFAULT = cef_message_loop_type_t.ML_TYPE_DEFAULT; 4544 alias ML_TYPE_UI = cef_message_loop_type_t.ML_TYPE_UI; 4545 alias ML_TYPE_IO = cef_message_loop_type_t.ML_TYPE_IO; 4546 4547 /// 4548 /// Windows COM initialization mode. Specifies how COM will be initialized for a 4549 /// new thread. 4550 /// 4551 enum cef_com_init_mode_t 4552 { 4553 /// 4554 /// No COM initialization. 4555 /// 4556 COM_INIT_MODE_NONE = 0, 4557 4558 /// 4559 /// Initialize COM using single-threaded apartments. 4560 /// 4561 COM_INIT_MODE_STA = 1, 4562 4563 /// 4564 /// Initialize COM using multi-threaded apartments. 4565 /// 4566 COM_INIT_MODE_MTA = 2 4567 } 4568 4569 alias COM_INIT_MODE_NONE = cef_com_init_mode_t.COM_INIT_MODE_NONE; 4570 alias COM_INIT_MODE_STA = cef_com_init_mode_t.COM_INIT_MODE_STA; 4571 alias COM_INIT_MODE_MTA = cef_com_init_mode_t.COM_INIT_MODE_MTA; 4572 4573 /// 4574 /// Supported value types. 4575 /// 4576 enum cef_value_type_t 4577 { 4578 VTYPE_INVALID = 0, 4579 VTYPE_NULL = 1, 4580 VTYPE_BOOL = 2, 4581 VTYPE_INT = 3, 4582 VTYPE_DOUBLE = 4, 4583 VTYPE_STRING = 5, 4584 VTYPE_BINARY = 6, 4585 VTYPE_DICTIONARY = 7, 4586 VTYPE_LIST = 8 4587 } 4588 4589 alias VTYPE_INVALID = cef_value_type_t.VTYPE_INVALID; 4590 alias VTYPE_NULL = cef_value_type_t.VTYPE_NULL; 4591 alias VTYPE_BOOL = cef_value_type_t.VTYPE_BOOL; 4592 alias VTYPE_INT = cef_value_type_t.VTYPE_INT; 4593 alias VTYPE_DOUBLE = cef_value_type_t.VTYPE_DOUBLE; 4594 alias VTYPE_STRING = cef_value_type_t.VTYPE_STRING; 4595 alias VTYPE_BINARY = cef_value_type_t.VTYPE_BINARY; 4596 alias VTYPE_DICTIONARY = cef_value_type_t.VTYPE_DICTIONARY; 4597 alias VTYPE_LIST = cef_value_type_t.VTYPE_LIST; 4598 4599 /// 4600 /// Supported JavaScript dialog types. 4601 /// 4602 enum cef_jsdialog_type_t 4603 { 4604 JSDIALOGTYPE_ALERT = 0, 4605 JSDIALOGTYPE_CONFIRM = 1, 4606 JSDIALOGTYPE_PROMPT = 2 4607 } 4608 4609 alias JSDIALOGTYPE_ALERT = cef_jsdialog_type_t.JSDIALOGTYPE_ALERT; 4610 alias JSDIALOGTYPE_CONFIRM = cef_jsdialog_type_t.JSDIALOGTYPE_CONFIRM; 4611 alias JSDIALOGTYPE_PROMPT = cef_jsdialog_type_t.JSDIALOGTYPE_PROMPT; 4612 4613 /// 4614 /// Screen information used when window rendering is disabled. This structure is 4615 /// passed as a parameter to CefRenderHandler::GetScreenInfo and should be 4616 /// filled in by the client. 4617 /// 4618 struct cef_screen_info_t 4619 { 4620 /// 4621 /// Device scale factor. Specifies the ratio between physical and logical 4622 /// pixels. 4623 /// 4624 float device_scale_factor; 4625 4626 /// 4627 /// The screen depth in bits per pixel. 4628 /// 4629 int depth; 4630 4631 /// 4632 /// The bits per color component. This assumes that the colors are balanced 4633 /// equally. 4634 /// 4635 int depth_per_component; 4636 4637 /// 4638 /// This can be true for black and white printers. 4639 /// 4640 int is_monochrome; 4641 4642 /// 4643 /// This is set from the rcMonitor member of MONITORINFOEX, to whit: 4644 /// "A RECT structure that specifies the display monitor rectangle, 4645 /// expressed in virtual-screen coordinates. Note that if the monitor 4646 /// is not the primary display monitor, some of the rectangle's 4647 /// coordinates may be negative values." 4648 // 4649 /// The |rect| and |available_rect| properties are used to determine the 4650 /// available surface for rendering popup views. 4651 /// 4652 cef_rect_t rect; 4653 4654 /// 4655 /// This is set from the rcWork member of MONITORINFOEX, to whit: 4656 /// "A RECT structure that specifies the work area rectangle of the 4657 /// display monitor that can be used by applications, expressed in 4658 /// virtual-screen coordinates. Windows uses this rectangle to 4659 /// maximize an application on the monitor. The rest of the area in 4660 /// rcMonitor contains system windows such as the task bar and side 4661 /// bars. Note that if the monitor is not the primary display monitor, 4662 /// some of the rectangle's coordinates may be negative values". 4663 // 4664 /// The |rect| and |available_rect| properties are used to determine the 4665 /// available surface for rendering popup views. 4666 /// 4667 cef_rect_t available_rect; 4668 } 4669 4670 4671 4672 /// 4673 /// Supported menu IDs. Non-English translations can be provided for the 4674 /// IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString(). 4675 /// 4676 enum cef_menu_id_t 4677 { 4678 // Navigation. 4679 MENU_ID_BACK = 100, 4680 MENU_ID_FORWARD = 101, 4681 MENU_ID_RELOAD = 102, 4682 MENU_ID_RELOAD_NOCACHE = 103, 4683 MENU_ID_STOPLOAD = 104, 4684 4685 // Editing. 4686 MENU_ID_UNDO = 110, 4687 MENU_ID_REDO = 111, 4688 MENU_ID_CUT = 112, 4689 MENU_ID_COPY = 113, 4690 MENU_ID_PASTE = 114, 4691 MENU_ID_DELETE = 115, 4692 MENU_ID_SELECT_ALL = 116, 4693 4694 // Miscellaneous. 4695 MENU_ID_FIND = 130, 4696 MENU_ID_PRINT = 131, 4697 MENU_ID_VIEW_SOURCE = 132, 4698 4699 // Spell checking word correction suggestions. 4700 MENU_ID_SPELLCHECK_SUGGESTION_0 = 200, 4701 MENU_ID_SPELLCHECK_SUGGESTION_1 = 201, 4702 MENU_ID_SPELLCHECK_SUGGESTION_2 = 202, 4703 MENU_ID_SPELLCHECK_SUGGESTION_3 = 203, 4704 MENU_ID_SPELLCHECK_SUGGESTION_4 = 204, 4705 MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204, 4706 MENU_ID_NO_SPELLING_SUGGESTIONS = 205, 4707 MENU_ID_ADD_TO_DICTIONARY = 206, 4708 4709 // Custom menu items originating from the renderer process. 4710 MENU_ID_CUSTOM_FIRST = 220, 4711 MENU_ID_CUSTOM_LAST = 250, 4712 4713 // All user-defined menu IDs should come between MENU_ID_USER_FIRST and 4714 // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges 4715 // defined in the tools/gritsettings/resource_ids file. 4716 MENU_ID_USER_FIRST = 26500, 4717 MENU_ID_USER_LAST = 28500 4718 } 4719 4720 alias MENU_ID_BACK = cef_menu_id_t.MENU_ID_BACK; 4721 alias MENU_ID_FORWARD = cef_menu_id_t.MENU_ID_FORWARD; 4722 alias MENU_ID_RELOAD = cef_menu_id_t.MENU_ID_RELOAD; 4723 alias MENU_ID_RELOAD_NOCACHE = cef_menu_id_t.MENU_ID_RELOAD_NOCACHE; 4724 alias MENU_ID_STOPLOAD = cef_menu_id_t.MENU_ID_STOPLOAD; 4725 alias MENU_ID_UNDO = cef_menu_id_t.MENU_ID_UNDO; 4726 alias MENU_ID_REDO = cef_menu_id_t.MENU_ID_REDO; 4727 alias MENU_ID_CUT = cef_menu_id_t.MENU_ID_CUT; 4728 alias MENU_ID_COPY = cef_menu_id_t.MENU_ID_COPY; 4729 alias MENU_ID_PASTE = cef_menu_id_t.MENU_ID_PASTE; 4730 alias MENU_ID_DELETE = cef_menu_id_t.MENU_ID_DELETE; 4731 alias MENU_ID_SELECT_ALL = cef_menu_id_t.MENU_ID_SELECT_ALL; 4732 alias MENU_ID_FIND = cef_menu_id_t.MENU_ID_FIND; 4733 alias MENU_ID_PRINT = cef_menu_id_t.MENU_ID_PRINT; 4734 alias MENU_ID_VIEW_SOURCE = cef_menu_id_t.MENU_ID_VIEW_SOURCE; 4735 alias MENU_ID_SPELLCHECK_SUGGESTION_0 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_0; 4736 alias MENU_ID_SPELLCHECK_SUGGESTION_1 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_1; 4737 alias MENU_ID_SPELLCHECK_SUGGESTION_2 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_2; 4738 alias MENU_ID_SPELLCHECK_SUGGESTION_3 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_3; 4739 alias MENU_ID_SPELLCHECK_SUGGESTION_4 = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_4; 4740 alias MENU_ID_SPELLCHECK_SUGGESTION_LAST = cef_menu_id_t.MENU_ID_SPELLCHECK_SUGGESTION_LAST; 4741 alias MENU_ID_NO_SPELLING_SUGGESTIONS = cef_menu_id_t.MENU_ID_NO_SPELLING_SUGGESTIONS; 4742 alias MENU_ID_ADD_TO_DICTIONARY = cef_menu_id_t.MENU_ID_ADD_TO_DICTIONARY; 4743 alias MENU_ID_CUSTOM_FIRST = cef_menu_id_t.MENU_ID_CUSTOM_FIRST; 4744 alias MENU_ID_CUSTOM_LAST = cef_menu_id_t.MENU_ID_CUSTOM_LAST; 4745 alias MENU_ID_USER_FIRST = cef_menu_id_t.MENU_ID_USER_FIRST; 4746 alias MENU_ID_USER_LAST = cef_menu_id_t.MENU_ID_USER_LAST; 4747 4748 /// 4749 /// Mouse button types. 4750 /// 4751 enum cef_mouse_button_type_t 4752 { 4753 MBT_LEFT = 0, 4754 MBT_MIDDLE = 1, 4755 MBT_RIGHT = 2 4756 } 4757 4758 alias MBT_LEFT = cef_mouse_button_type_t.MBT_LEFT; 4759 alias MBT_MIDDLE = cef_mouse_button_type_t.MBT_MIDDLE; 4760 alias MBT_RIGHT = cef_mouse_button_type_t.MBT_RIGHT; 4761 4762 /// 4763 /// Structure representing mouse event information. 4764 /// 4765 struct cef_mouse_event_t 4766 { 4767 /// 4768 /// X coordinate relative to the left side of the view. 4769 /// 4770 int x; 4771 4772 /// 4773 /// Y coordinate relative to the top side of the view. 4774 /// 4775 int y; 4776 4777 /// 4778 /// Bit flags describing any pressed modifier keys. See 4779 /// cef_event_flags_t for values. 4780 /// 4781 uint modifiers; 4782 } 4783 4784 4785 4786 /// 4787 /// Touch points states types. 4788 /// 4789 enum cef_touch_event_type_t 4790 { 4791 CEF_TET_RELEASED = 0, 4792 CEF_TET_PRESSED = 1, 4793 CEF_TET_MOVED = 2, 4794 CEF_TET_CANCELLED = 3 4795 } 4796 4797 alias CEF_TET_RELEASED = cef_touch_event_type_t.CEF_TET_RELEASED; 4798 alias CEF_TET_PRESSED = cef_touch_event_type_t.CEF_TET_PRESSED; 4799 alias CEF_TET_MOVED = cef_touch_event_type_t.CEF_TET_MOVED; 4800 alias CEF_TET_CANCELLED = cef_touch_event_type_t.CEF_TET_CANCELLED; 4801 4802 /// 4803 /// The device type that caused the event. 4804 /// 4805 enum cef_pointer_type_t 4806 { 4807 CEF_POINTER_TYPE_TOUCH = 0, 4808 CEF_POINTER_TYPE_MOUSE = 1, 4809 CEF_POINTER_TYPE_PEN = 2, 4810 CEF_POINTER_TYPE_ERASER = 3, 4811 CEF_POINTER_TYPE_UNKNOWN = 4 4812 } 4813 4814 alias CEF_POINTER_TYPE_TOUCH = cef_pointer_type_t.CEF_POINTER_TYPE_TOUCH; 4815 alias CEF_POINTER_TYPE_MOUSE = cef_pointer_type_t.CEF_POINTER_TYPE_MOUSE; 4816 alias CEF_POINTER_TYPE_PEN = cef_pointer_type_t.CEF_POINTER_TYPE_PEN; 4817 alias CEF_POINTER_TYPE_ERASER = cef_pointer_type_t.CEF_POINTER_TYPE_ERASER; 4818 alias CEF_POINTER_TYPE_UNKNOWN = cef_pointer_type_t.CEF_POINTER_TYPE_UNKNOWN; 4819 4820 /// 4821 /// Structure representing touch event information. 4822 /// 4823 struct cef_touch_event_t 4824 { 4825 /// 4826 /// Id of a touch point. Must be unique per touch, can be any number except 4827 /// -1. Note that a maximum of 16 concurrent touches will be tracked; touches 4828 /// beyond that will be ignored. 4829 /// 4830 int id; 4831 4832 /// 4833 /// X coordinate relative to the left side of the view. 4834 /// 4835 float x; 4836 4837 /// 4838 /// Y coordinate relative to the top side of the view. 4839 /// 4840 float y; 4841 4842 /// 4843 /// X radius in pixels. Set to 0 if not applicable. 4844 /// 4845 float radius_x; 4846 4847 /// 4848 /// Y radius in pixels. Set to 0 if not applicable. 4849 /// 4850 float radius_y; 4851 4852 /// 4853 /// Rotation angle in radians. Set to 0 if not applicable. 4854 /// 4855 float rotation_angle; 4856 4857 /// 4858 /// The normalized pressure of the pointer input in the range of [0,1]. 4859 /// Set to 0 if not applicable. 4860 /// 4861 float pressure; 4862 4863 /// 4864 /// The state of the touch point. Touches begin with one CEF_TET_PRESSED event 4865 /// followed by zero or more CEF_TET_MOVED events and finally one 4866 /// CEF_TET_RELEASED or CEF_TET_CANCELLED event. Events not respecting this 4867 /// order will be ignored. 4868 /// 4869 cef_touch_event_type_t type; 4870 4871 /// 4872 /// Bit flags describing any pressed modifier keys. See 4873 /// cef_event_flags_t for values. 4874 /// 4875 uint modifiers; 4876 4877 /// 4878 /// The device type that caused the event. 4879 /// 4880 cef_pointer_type_t pointer_type; 4881 } 4882 4883 4884 4885 /// 4886 /// Paint element types. 4887 /// 4888 enum cef_paint_element_type_t 4889 { 4890 PET_VIEW = 0, 4891 PET_POPUP = 1 4892 } 4893 4894 alias PET_VIEW = cef_paint_element_type_t.PET_VIEW; 4895 alias PET_POPUP = cef_paint_element_type_t.PET_POPUP; 4896 4897 /// 4898 /// Supported event bit flags. 4899 /// 4900 enum cef_event_flags_t 4901 { 4902 EVENTFLAG_NONE = 0, 4903 EVENTFLAG_CAPS_LOCK_ON = 1 << 0, 4904 EVENTFLAG_SHIFT_DOWN = 1 << 1, 4905 EVENTFLAG_CONTROL_DOWN = 1 << 2, 4906 EVENTFLAG_ALT_DOWN = 1 << 3, 4907 EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4, 4908 EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5, 4909 EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6, 4910 /// Mac OS-X command key. 4911 EVENTFLAG_COMMAND_DOWN = 1 << 7, 4912 EVENTFLAG_NUM_LOCK_ON = 1 << 8, 4913 EVENTFLAG_IS_KEY_PAD = 1 << 9, 4914 EVENTFLAG_IS_LEFT = 1 << 10, 4915 EVENTFLAG_IS_RIGHT = 1 << 11, 4916 EVENTFLAG_ALTGR_DOWN = 1 << 12, 4917 EVENTFLAG_IS_REPEAT = 1 << 13 4918 } 4919 4920 alias EVENTFLAG_NONE = cef_event_flags_t.EVENTFLAG_NONE; 4921 alias EVENTFLAG_CAPS_LOCK_ON = cef_event_flags_t.EVENTFLAG_CAPS_LOCK_ON; 4922 alias EVENTFLAG_SHIFT_DOWN = cef_event_flags_t.EVENTFLAG_SHIFT_DOWN; 4923 alias EVENTFLAG_CONTROL_DOWN = cef_event_flags_t.EVENTFLAG_CONTROL_DOWN; 4924 alias EVENTFLAG_ALT_DOWN = cef_event_flags_t.EVENTFLAG_ALT_DOWN; 4925 alias EVENTFLAG_LEFT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_LEFT_MOUSE_BUTTON; 4926 alias EVENTFLAG_MIDDLE_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_MIDDLE_MOUSE_BUTTON; 4927 alias EVENTFLAG_RIGHT_MOUSE_BUTTON = cef_event_flags_t.EVENTFLAG_RIGHT_MOUSE_BUTTON; 4928 alias EVENTFLAG_COMMAND_DOWN = cef_event_flags_t.EVENTFLAG_COMMAND_DOWN; 4929 alias EVENTFLAG_NUM_LOCK_ON = cef_event_flags_t.EVENTFLAG_NUM_LOCK_ON; 4930 alias EVENTFLAG_IS_KEY_PAD = cef_event_flags_t.EVENTFLAG_IS_KEY_PAD; 4931 alias EVENTFLAG_IS_LEFT = cef_event_flags_t.EVENTFLAG_IS_LEFT; 4932 alias EVENTFLAG_IS_RIGHT = cef_event_flags_t.EVENTFLAG_IS_RIGHT; 4933 alias EVENTFLAG_ALTGR_DOWN = cef_event_flags_t.EVENTFLAG_ALTGR_DOWN; 4934 alias EVENTFLAG_IS_REPEAT = cef_event_flags_t.EVENTFLAG_IS_REPEAT; 4935 4936 /// 4937 /// Supported menu item types. 4938 /// 4939 enum cef_menu_item_type_t 4940 { 4941 MENUITEMTYPE_NONE = 0, 4942 MENUITEMTYPE_COMMAND = 1, 4943 MENUITEMTYPE_CHECK = 2, 4944 MENUITEMTYPE_RADIO = 3, 4945 MENUITEMTYPE_SEPARATOR = 4, 4946 MENUITEMTYPE_SUBMENU = 5 4947 } 4948 4949 alias MENUITEMTYPE_NONE = cef_menu_item_type_t.MENUITEMTYPE_NONE; 4950 alias MENUITEMTYPE_COMMAND = cef_menu_item_type_t.MENUITEMTYPE_COMMAND; 4951 alias MENUITEMTYPE_CHECK = cef_menu_item_type_t.MENUITEMTYPE_CHECK; 4952 alias MENUITEMTYPE_RADIO = cef_menu_item_type_t.MENUITEMTYPE_RADIO; 4953 alias MENUITEMTYPE_SEPARATOR = cef_menu_item_type_t.MENUITEMTYPE_SEPARATOR; 4954 alias MENUITEMTYPE_SUBMENU = cef_menu_item_type_t.MENUITEMTYPE_SUBMENU; 4955 4956 /// 4957 /// Supported context menu type flags. 4958 /// 4959 enum cef_context_menu_type_flags_t 4960 { 4961 /// 4962 /// No node is selected. 4963 /// 4964 CM_TYPEFLAG_NONE = 0, 4965 /// 4966 /// The top page is selected. 4967 /// 4968 CM_TYPEFLAG_PAGE = 1 << 0, 4969 /// 4970 /// A subframe page is selected. 4971 /// 4972 CM_TYPEFLAG_FRAME = 1 << 1, 4973 /// 4974 /// A link is selected. 4975 /// 4976 CM_TYPEFLAG_LINK = 1 << 2, 4977 /// 4978 /// A media node is selected. 4979 /// 4980 CM_TYPEFLAG_MEDIA = 1 << 3, 4981 /// 4982 /// There is a textual or mixed selection that is selected. 4983 /// 4984 CM_TYPEFLAG_SELECTION = 1 << 4, 4985 /// 4986 /// An editable element is selected. 4987 /// 4988 CM_TYPEFLAG_EDITABLE = 1 << 5 4989 } 4990 4991 alias CM_TYPEFLAG_NONE = cef_context_menu_type_flags_t.CM_TYPEFLAG_NONE; 4992 alias CM_TYPEFLAG_PAGE = cef_context_menu_type_flags_t.CM_TYPEFLAG_PAGE; 4993 alias CM_TYPEFLAG_FRAME = cef_context_menu_type_flags_t.CM_TYPEFLAG_FRAME; 4994 alias CM_TYPEFLAG_LINK = cef_context_menu_type_flags_t.CM_TYPEFLAG_LINK; 4995 alias CM_TYPEFLAG_MEDIA = cef_context_menu_type_flags_t.CM_TYPEFLAG_MEDIA; 4996 alias CM_TYPEFLAG_SELECTION = cef_context_menu_type_flags_t.CM_TYPEFLAG_SELECTION; 4997 alias CM_TYPEFLAG_EDITABLE = cef_context_menu_type_flags_t.CM_TYPEFLAG_EDITABLE; 4998 4999 /// 5000 /// Supported context menu media types. These constants match their equivalents 5001 /// in Chromium's ContextMenuDataMediaType and should not be renumbered. 5002 /// 5003 enum cef_context_menu_media_type_t 5004 { 5005 /// 5006 /// No special node is in context. 5007 /// 5008 CM_MEDIATYPE_NONE = 0, 5009 /// 5010 /// An image node is selected. 5011 /// 5012 CM_MEDIATYPE_IMAGE = 1, 5013 /// 5014 /// A video node is selected. 5015 /// 5016 CM_MEDIATYPE_VIDEO = 2, 5017 /// 5018 /// An audio node is selected. 5019 /// 5020 CM_MEDIATYPE_AUDIO = 3, 5021 /// 5022 /// An canvas node is selected. 5023 /// 5024 CM_MEDIATYPE_CANVAS = 4, 5025 /// 5026 /// A file node is selected. 5027 /// 5028 CM_MEDIATYPE_FILE = 5, 5029 /// 5030 /// A plugin node is selected. 5031 /// 5032 CM_MEDIATYPE_PLUGIN = 6 5033 } 5034 5035 alias CM_MEDIATYPE_NONE = cef_context_menu_media_type_t.CM_MEDIATYPE_NONE; 5036 alias CM_MEDIATYPE_IMAGE = cef_context_menu_media_type_t.CM_MEDIATYPE_IMAGE; 5037 alias CM_MEDIATYPE_VIDEO = cef_context_menu_media_type_t.CM_MEDIATYPE_VIDEO; 5038 alias CM_MEDIATYPE_AUDIO = cef_context_menu_media_type_t.CM_MEDIATYPE_AUDIO; 5039 alias CM_MEDIATYPE_CANVAS = cef_context_menu_media_type_t.CM_MEDIATYPE_CANVAS; 5040 alias CM_MEDIATYPE_FILE = cef_context_menu_media_type_t.CM_MEDIATYPE_FILE; 5041 alias CM_MEDIATYPE_PLUGIN = cef_context_menu_media_type_t.CM_MEDIATYPE_PLUGIN; 5042 5043 /// 5044 /// Supported context menu media state bit flags. These constants match their 5045 /// equivalents in Chromium's ContextMenuData::MediaFlags and should not be 5046 /// renumbered. 5047 /// 5048 enum cef_context_menu_media_state_flags_t 5049 { 5050 CM_MEDIAFLAG_NONE = 0, 5051 CM_MEDIAFLAG_IN_ERROR = 1 << 0, 5052 CM_MEDIAFLAG_PAUSED = 1 << 1, 5053 CM_MEDIAFLAG_MUTED = 1 << 2, 5054 CM_MEDIAFLAG_LOOP = 1 << 3, 5055 CM_MEDIAFLAG_CAN_SAVE = 1 << 4, 5056 CM_MEDIAFLAG_HAS_AUDIO = 1 << 5, 5057 CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = 1 << 6, 5058 CM_MEDIAFLAG_CONTROLS = 1 << 7, 5059 CM_MEDIAFLAG_CAN_PRINT = 1 << 8, 5060 CM_MEDIAFLAG_CAN_ROTATE = 1 << 9, 5061 CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = 1 << 10, 5062 CM_MEDIAFLAG_PICTURE_IN_PICTURE = 1 << 11, 5063 CM_MEDIAFLAG_CAN_LOOP = 1 << 12 5064 } 5065 5066 alias CM_MEDIAFLAG_NONE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_NONE; 5067 alias CM_MEDIAFLAG_IN_ERROR = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_IN_ERROR; 5068 alias CM_MEDIAFLAG_PAUSED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PAUSED; 5069 alias CM_MEDIAFLAG_MUTED = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_MUTED; 5070 alias CM_MEDIAFLAG_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_LOOP; 5071 alias CM_MEDIAFLAG_CAN_SAVE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_SAVE; 5072 alias CM_MEDIAFLAG_HAS_AUDIO = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_HAS_AUDIO; 5073 alias CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_TOGGLE_CONTROLS; 5074 alias CM_MEDIAFLAG_CONTROLS = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CONTROLS; 5075 alias CM_MEDIAFLAG_CAN_PRINT = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PRINT; 5076 alias CM_MEDIAFLAG_CAN_ROTATE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_ROTATE; 5077 alias CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_PICTURE_IN_PICTURE; 5078 alias CM_MEDIAFLAG_PICTURE_IN_PICTURE = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_PICTURE_IN_PICTURE; 5079 alias CM_MEDIAFLAG_CAN_LOOP = cef_context_menu_media_state_flags_t.CM_MEDIAFLAG_CAN_LOOP; 5080 5081 /// 5082 /// Supported context menu edit state bit flags. These constants match their 5083 /// equivalents in Chromium's ContextMenuDataEditFlags and should not be 5084 /// renumbered. 5085 /// 5086 enum cef_context_menu_edit_state_flags_t 5087 { 5088 CM_EDITFLAG_NONE = 0, 5089 CM_EDITFLAG_CAN_UNDO = 1 << 0, 5090 CM_EDITFLAG_CAN_REDO = 1 << 1, 5091 CM_EDITFLAG_CAN_CUT = 1 << 2, 5092 CM_EDITFLAG_CAN_COPY = 1 << 3, 5093 CM_EDITFLAG_CAN_PASTE = 1 << 4, 5094 CM_EDITFLAG_CAN_DELETE = 1 << 5, 5095 CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6, 5096 CM_EDITFLAG_CAN_TRANSLATE = 1 << 7, 5097 CM_EDITFLAG_CAN_EDIT_RICHLY = 1 << 8 5098 } 5099 5100 alias CM_EDITFLAG_NONE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_NONE; 5101 alias CM_EDITFLAG_CAN_UNDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_UNDO; 5102 alias CM_EDITFLAG_CAN_REDO = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_REDO; 5103 alias CM_EDITFLAG_CAN_CUT = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_CUT; 5104 alias CM_EDITFLAG_CAN_COPY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_COPY; 5105 alias CM_EDITFLAG_CAN_PASTE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_PASTE; 5106 alias CM_EDITFLAG_CAN_DELETE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_DELETE; 5107 alias CM_EDITFLAG_CAN_SELECT_ALL = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_SELECT_ALL; 5108 alias CM_EDITFLAG_CAN_TRANSLATE = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_TRANSLATE; 5109 alias CM_EDITFLAG_CAN_EDIT_RICHLY = cef_context_menu_edit_state_flags_t.CM_EDITFLAG_CAN_EDIT_RICHLY; 5110 5111 /// 5112 /// Supported quick menu state bit flags. 5113 /// 5114 enum cef_quick_menu_edit_state_flags_t 5115 { 5116 QM_EDITFLAG_NONE = 0, 5117 QM_EDITFLAG_CAN_ELLIPSIS = 1 << 0, 5118 QM_EDITFLAG_CAN_CUT = 1 << 1, 5119 QM_EDITFLAG_CAN_COPY = 1 << 2, 5120 QM_EDITFLAG_CAN_PASTE = 1 << 3 5121 } 5122 5123 alias QM_EDITFLAG_NONE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_NONE; 5124 alias QM_EDITFLAG_CAN_ELLIPSIS = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_ELLIPSIS; 5125 alias QM_EDITFLAG_CAN_CUT = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_CUT; 5126 alias QM_EDITFLAG_CAN_COPY = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_COPY; 5127 alias QM_EDITFLAG_CAN_PASTE = cef_quick_menu_edit_state_flags_t.QM_EDITFLAG_CAN_PASTE; 5128 5129 /// 5130 /// Key event types. 5131 /// 5132 enum cef_key_event_type_t 5133 { 5134 /// 5135 /// Notification that a key transitioned from "up" to "down". 5136 /// 5137 KEYEVENT_RAWKEYDOWN = 0, 5138 5139 /// 5140 /// Notification that a key was pressed. This does not necessarily correspond 5141 /// to a character depending on the key and language. Use KEYEVENT_CHAR for 5142 /// character input. 5143 /// 5144 KEYEVENT_KEYDOWN = 1, 5145 5146 /// 5147 /// Notification that a key was released. 5148 /// 5149 KEYEVENT_KEYUP = 2, 5150 5151 /// 5152 /// Notification that a character was typed. Use this for text input. Key 5153 /// down events may generate 0, 1, or more than one character event depending 5154 /// on the key, locale, and operating system. 5155 /// 5156 KEYEVENT_CHAR = 3 5157 } 5158 5159 alias KEYEVENT_RAWKEYDOWN = cef_key_event_type_t.KEYEVENT_RAWKEYDOWN; 5160 alias KEYEVENT_KEYDOWN = cef_key_event_type_t.KEYEVENT_KEYDOWN; 5161 alias KEYEVENT_KEYUP = cef_key_event_type_t.KEYEVENT_KEYUP; 5162 alias KEYEVENT_CHAR = cef_key_event_type_t.KEYEVENT_CHAR; 5163 5164 /// 5165 /// Structure representing keyboard event information. 5166 /// 5167 struct cef_key_event_t 5168 { 5169 /// 5170 /// The type of keyboard event. 5171 /// 5172 cef_key_event_type_t type; 5173 5174 /// 5175 /// Bit flags describing any pressed modifier keys. See 5176 /// cef_event_flags_t for values. 5177 /// 5178 uint modifiers; 5179 5180 /// 5181 /// The Windows key code for the key event. This value is used by the DOM 5182 /// specification. Sometimes it comes directly from the event (i.e. on 5183 /// Windows) and sometimes it's determined using a mapping function. See 5184 /// WebCore/platform/chromium/KeyboardCodes.h for the list of values. 5185 /// 5186 int windows_key_code; 5187 5188 /// 5189 /// The actual key code genenerated by the platform. 5190 /// 5191 int native_key_code; 5192 5193 /// 5194 /// Indicates whether the event is considered a "system key" event (see 5195 /// http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details). 5196 /// This value will always be false on non-Windows platforms. 5197 /// 5198 int is_system_key; 5199 5200 /// 5201 /// The character generated by the keystroke. 5202 /// 5203 alias char16_t = ushort; 5204 char16_t character; 5205 5206 /// 5207 /// Same as |character| but unmodified by any concurrently-held modifiers 5208 /// (except shift). This is useful for working out shortcut keys. 5209 /// 5210 char16_t unmodified_character; 5211 5212 /// 5213 /// True if the focus is currently on an editable field on the page. This is 5214 /// useful for determining if standard key events should be intercepted. 5215 /// 5216 int focus_on_editable_field; 5217 } 5218 5219 5220 5221 /// 5222 /// Focus sources. 5223 /// 5224 enum cef_focus_source_t 5225 { 5226 /// 5227 /// The source is explicit navigation via the API (LoadURL(), etc). 5228 /// 5229 FOCUS_SOURCE_NAVIGATION = 0, 5230 /// 5231 /// The source is a system-generated focus event. 5232 /// 5233 FOCUS_SOURCE_SYSTEM = 1 5234 } 5235 5236 alias FOCUS_SOURCE_NAVIGATION = cef_focus_source_t.FOCUS_SOURCE_NAVIGATION; 5237 alias FOCUS_SOURCE_SYSTEM = cef_focus_source_t.FOCUS_SOURCE_SYSTEM; 5238 5239 /// 5240 /// Navigation types. 5241 /// 5242 enum cef_navigation_type_t 5243 { 5244 NAVIGATION_LINK_CLICKED = 0, 5245 NAVIGATION_FORM_SUBMITTED = 1, 5246 NAVIGATION_BACK_FORWARD = 2, 5247 NAVIGATION_RELOAD = 3, 5248 NAVIGATION_FORM_RESUBMITTED = 4, 5249 NAVIGATION_OTHER = 5 5250 } 5251 5252 alias NAVIGATION_LINK_CLICKED = cef_navigation_type_t.NAVIGATION_LINK_CLICKED; 5253 alias NAVIGATION_FORM_SUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_SUBMITTED; 5254 alias NAVIGATION_BACK_FORWARD = cef_navigation_type_t.NAVIGATION_BACK_FORWARD; 5255 alias NAVIGATION_RELOAD = cef_navigation_type_t.NAVIGATION_RELOAD; 5256 alias NAVIGATION_FORM_RESUBMITTED = cef_navigation_type_t.NAVIGATION_FORM_RESUBMITTED; 5257 alias NAVIGATION_OTHER = cef_navigation_type_t.NAVIGATION_OTHER; 5258 5259 /// 5260 /// Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and 5261 /// UTF16 (LE and BE) by default. All other types must be translated to UTF8 5262 /// before being passed to the parser. If a BOM is detected and the correct 5263 /// decoder is available then that decoder will be used automatically. 5264 /// 5265 enum cef_xml_encoding_type_t 5266 { 5267 XML_ENCODING_NONE = 0, 5268 XML_ENCODING_UTF8 = 1, 5269 XML_ENCODING_UTF16LE = 2, 5270 XML_ENCODING_UTF16BE = 3, 5271 XML_ENCODING_ASCII = 4 5272 } 5273 5274 alias XML_ENCODING_NONE = cef_xml_encoding_type_t.XML_ENCODING_NONE; 5275 alias XML_ENCODING_UTF8 = cef_xml_encoding_type_t.XML_ENCODING_UTF8; 5276 alias XML_ENCODING_UTF16LE = cef_xml_encoding_type_t.XML_ENCODING_UTF16LE; 5277 alias XML_ENCODING_UTF16BE = cef_xml_encoding_type_t.XML_ENCODING_UTF16BE; 5278 alias XML_ENCODING_ASCII = cef_xml_encoding_type_t.XML_ENCODING_ASCII; 5279 5280 /// 5281 /// XML node types. 5282 /// 5283 enum cef_xml_node_type_t 5284 { 5285 XML_NODE_UNSUPPORTED = 0, 5286 XML_NODE_PROCESSING_INSTRUCTION = 1, 5287 XML_NODE_DOCUMENT_TYPE = 2, 5288 XML_NODE_ELEMENT_START = 3, 5289 XML_NODE_ELEMENT_END = 4, 5290 XML_NODE_ATTRIBUTE = 5, 5291 XML_NODE_TEXT = 6, 5292 XML_NODE_CDATA = 7, 5293 XML_NODE_ENTITY_REFERENCE = 8, 5294 XML_NODE_WHITESPACE = 9, 5295 XML_NODE_COMMENT = 10 5296 } 5297 5298 alias XML_NODE_UNSUPPORTED = cef_xml_node_type_t.XML_NODE_UNSUPPORTED; 5299 alias XML_NODE_PROCESSING_INSTRUCTION = cef_xml_node_type_t.XML_NODE_PROCESSING_INSTRUCTION; 5300 alias XML_NODE_DOCUMENT_TYPE = cef_xml_node_type_t.XML_NODE_DOCUMENT_TYPE; 5301 alias XML_NODE_ELEMENT_START = cef_xml_node_type_t.XML_NODE_ELEMENT_START; 5302 alias XML_NODE_ELEMENT_END = cef_xml_node_type_t.XML_NODE_ELEMENT_END; 5303 alias XML_NODE_ATTRIBUTE = cef_xml_node_type_t.XML_NODE_ATTRIBUTE; 5304 alias XML_NODE_TEXT = cef_xml_node_type_t.XML_NODE_TEXT; 5305 alias XML_NODE_CDATA = cef_xml_node_type_t.XML_NODE_CDATA; 5306 alias XML_NODE_ENTITY_REFERENCE = cef_xml_node_type_t.XML_NODE_ENTITY_REFERENCE; 5307 alias XML_NODE_WHITESPACE = cef_xml_node_type_t.XML_NODE_WHITESPACE; 5308 alias XML_NODE_COMMENT = cef_xml_node_type_t.XML_NODE_COMMENT; 5309 5310 /// 5311 /// Popup window features. 5312 /// 5313 struct cef_popup_features_t 5314 { 5315 int x; 5316 int xSet; 5317 int y; 5318 int ySet; 5319 int width; 5320 int widthSet; 5321 int height; 5322 int heightSet; 5323 5324 /// True (1) if browser interface elements should be hidden. 5325 int isPopup; 5326 } 5327 5328 5329 5330 /// 5331 /// DOM document types. 5332 /// 5333 enum cef_dom_document_type_t 5334 { 5335 DOM_DOCUMENT_TYPE_UNKNOWN = 0, 5336 DOM_DOCUMENT_TYPE_HTML = 1, 5337 DOM_DOCUMENT_TYPE_XHTML = 2, 5338 DOM_DOCUMENT_TYPE_PLUGIN = 3 5339 } 5340 5341 alias DOM_DOCUMENT_TYPE_UNKNOWN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_UNKNOWN; 5342 alias DOM_DOCUMENT_TYPE_HTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_HTML; 5343 alias DOM_DOCUMENT_TYPE_XHTML = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_XHTML; 5344 alias DOM_DOCUMENT_TYPE_PLUGIN = cef_dom_document_type_t.DOM_DOCUMENT_TYPE_PLUGIN; 5345 5346 /// 5347 /// DOM event category flags. 5348 /// 5349 enum cef_dom_event_category_t 5350 { 5351 DOM_EVENT_CATEGORY_UNKNOWN = 0x0, 5352 DOM_EVENT_CATEGORY_UI = 0x1, 5353 DOM_EVENT_CATEGORY_MOUSE = 0x2, 5354 DOM_EVENT_CATEGORY_MUTATION = 0x4, 5355 DOM_EVENT_CATEGORY_KEYBOARD = 0x8, 5356 DOM_EVENT_CATEGORY_TEXT = 0x10, 5357 DOM_EVENT_CATEGORY_COMPOSITION = 0x20, 5358 DOM_EVENT_CATEGORY_DRAG = 0x40, 5359 DOM_EVENT_CATEGORY_CLIPBOARD = 0x80, 5360 DOM_EVENT_CATEGORY_MESSAGE = 0x100, 5361 DOM_EVENT_CATEGORY_WHEEL = 0x200, 5362 DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400, 5363 DOM_EVENT_CATEGORY_OVERFLOW = 0x800, 5364 DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000, 5365 DOM_EVENT_CATEGORY_POPSTATE = 0x2000, 5366 DOM_EVENT_CATEGORY_PROGRESS = 0x4000, 5367 DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000 5368 } 5369 5370 alias DOM_EVENT_CATEGORY_UNKNOWN = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UNKNOWN; 5371 alias DOM_EVENT_CATEGORY_UI = cef_dom_event_category_t.DOM_EVENT_CATEGORY_UI; 5372 alias DOM_EVENT_CATEGORY_MOUSE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MOUSE; 5373 alias DOM_EVENT_CATEGORY_MUTATION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MUTATION; 5374 alias DOM_EVENT_CATEGORY_KEYBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_KEYBOARD; 5375 alias DOM_EVENT_CATEGORY_TEXT = cef_dom_event_category_t.DOM_EVENT_CATEGORY_TEXT; 5376 alias DOM_EVENT_CATEGORY_COMPOSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_COMPOSITION; 5377 alias DOM_EVENT_CATEGORY_DRAG = cef_dom_event_category_t.DOM_EVENT_CATEGORY_DRAG; 5378 alias DOM_EVENT_CATEGORY_CLIPBOARD = cef_dom_event_category_t.DOM_EVENT_CATEGORY_CLIPBOARD; 5379 alias DOM_EVENT_CATEGORY_MESSAGE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_MESSAGE; 5380 alias DOM_EVENT_CATEGORY_WHEEL = cef_dom_event_category_t.DOM_EVENT_CATEGORY_WHEEL; 5381 alias DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = cef_dom_event_category_t.DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED; 5382 alias DOM_EVENT_CATEGORY_OVERFLOW = cef_dom_event_category_t.DOM_EVENT_CATEGORY_OVERFLOW; 5383 alias DOM_EVENT_CATEGORY_PAGE_TRANSITION = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PAGE_TRANSITION; 5384 alias DOM_EVENT_CATEGORY_POPSTATE = cef_dom_event_category_t.DOM_EVENT_CATEGORY_POPSTATE; 5385 alias DOM_EVENT_CATEGORY_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_PROGRESS; 5386 alias DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = cef_dom_event_category_t.DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS; 5387 5388 /// 5389 /// DOM event processing phases. 5390 /// 5391 enum cef_dom_event_phase_t 5392 { 5393 DOM_EVENT_PHASE_UNKNOWN = 0, 5394 DOM_EVENT_PHASE_CAPTURING = 1, 5395 DOM_EVENT_PHASE_AT_TARGET = 2, 5396 DOM_EVENT_PHASE_BUBBLING = 3 5397 } 5398 5399 alias DOM_EVENT_PHASE_UNKNOWN = cef_dom_event_phase_t.DOM_EVENT_PHASE_UNKNOWN; 5400 alias DOM_EVENT_PHASE_CAPTURING = cef_dom_event_phase_t.DOM_EVENT_PHASE_CAPTURING; 5401 alias DOM_EVENT_PHASE_AT_TARGET = cef_dom_event_phase_t.DOM_EVENT_PHASE_AT_TARGET; 5402 alias DOM_EVENT_PHASE_BUBBLING = cef_dom_event_phase_t.DOM_EVENT_PHASE_BUBBLING; 5403 5404 /// 5405 /// DOM node types. 5406 /// 5407 enum cef_dom_node_type_t 5408 { 5409 DOM_NODE_TYPE_UNSUPPORTED = 0, 5410 DOM_NODE_TYPE_ELEMENT = 1, 5411 DOM_NODE_TYPE_ATTRIBUTE = 2, 5412 DOM_NODE_TYPE_TEXT = 3, 5413 DOM_NODE_TYPE_CDATA_SECTION = 4, 5414 DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = 5, 5415 DOM_NODE_TYPE_COMMENT = 6, 5416 DOM_NODE_TYPE_DOCUMENT = 7, 5417 DOM_NODE_TYPE_DOCUMENT_TYPE = 8, 5418 DOM_NODE_TYPE_DOCUMENT_FRAGMENT = 9 5419 } 5420 5421 alias DOM_NODE_TYPE_UNSUPPORTED = cef_dom_node_type_t.DOM_NODE_TYPE_UNSUPPORTED; 5422 alias DOM_NODE_TYPE_ELEMENT = cef_dom_node_type_t.DOM_NODE_TYPE_ELEMENT; 5423 alias DOM_NODE_TYPE_ATTRIBUTE = cef_dom_node_type_t.DOM_NODE_TYPE_ATTRIBUTE; 5424 alias DOM_NODE_TYPE_TEXT = cef_dom_node_type_t.DOM_NODE_TYPE_TEXT; 5425 alias DOM_NODE_TYPE_CDATA_SECTION = cef_dom_node_type_t.DOM_NODE_TYPE_CDATA_SECTION; 5426 alias DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS = cef_dom_node_type_t.DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS; 5427 alias DOM_NODE_TYPE_COMMENT = cef_dom_node_type_t.DOM_NODE_TYPE_COMMENT; 5428 alias DOM_NODE_TYPE_DOCUMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT; 5429 alias DOM_NODE_TYPE_DOCUMENT_TYPE = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_TYPE; 5430 alias DOM_NODE_TYPE_DOCUMENT_FRAGMENT = cef_dom_node_type_t.DOM_NODE_TYPE_DOCUMENT_FRAGMENT; 5431 5432 /// 5433 /// DOM form control types. Should be kept in sync with Chromium's 5434 /// blink::mojom::FormControlType type. 5435 /// 5436 enum cef_dom_form_control_type_t 5437 { 5438 DOM_FORM_CONTROL_TYPE_UNSUPPORTED = 0, 5439 DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = 1, 5440 DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = 2, 5441 DOM_FORM_CONTROL_TYPE_BUTTON_RESET = 3, 5442 DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST = 4, 5443 DOM_FORM_CONTROL_TYPE_FIELDSET = 5, 5444 DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = 6, 5445 DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = 7, 5446 DOM_FORM_CONTROL_TYPE_INPUT_COLOR = 8, 5447 DOM_FORM_CONTROL_TYPE_INPUT_DATE = 9, 5448 DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = 10, 5449 DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = 11, 5450 DOM_FORM_CONTROL_TYPE_INPUT_FILE = 12, 5451 DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = 13, 5452 DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = 14, 5453 DOM_FORM_CONTROL_TYPE_INPUT_MONTH = 15, 5454 DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = 16, 5455 DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = 17, 5456 DOM_FORM_CONTROL_TYPE_INPUT_RADIO = 18, 5457 DOM_FORM_CONTROL_TYPE_INPUT_RANGE = 19, 5458 DOM_FORM_CONTROL_TYPE_INPUT_RESET = 20, 5459 DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = 21, 5460 DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = 22, 5461 DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = 23, 5462 DOM_FORM_CONTROL_TYPE_INPUT_TEXT = 24, 5463 DOM_FORM_CONTROL_TYPE_INPUT_TIME = 25, 5464 DOM_FORM_CONTROL_TYPE_INPUT_URL = 26, 5465 DOM_FORM_CONTROL_TYPE_INPUT_WEEK = 27, 5466 DOM_FORM_CONTROL_TYPE_OUTPUT = 28, 5467 DOM_FORM_CONTROL_TYPE_SELECT_ONE = 29, 5468 DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = 30, 5469 DOM_FORM_CONTROL_TYPE_SELECT_LIST = 31, 5470 DOM_FORM_CONTROL_TYPE_TEXT_AREA = 32 5471 } 5472 5473 alias DOM_FORM_CONTROL_TYPE_UNSUPPORTED = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_UNSUPPORTED; 5474 alias DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON; 5475 alias DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT; 5476 alias DOM_FORM_CONTROL_TYPE_BUTTON_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_RESET; 5477 alias DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST; 5478 alias DOM_FORM_CONTROL_TYPE_FIELDSET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_FIELDSET; 5479 alias DOM_FORM_CONTROL_TYPE_INPUT_BUTTON = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_BUTTON; 5480 alias DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX; 5481 alias DOM_FORM_CONTROL_TYPE_INPUT_COLOR = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_COLOR; 5482 alias DOM_FORM_CONTROL_TYPE_INPUT_DATE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATE; 5483 alias DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL; 5484 alias DOM_FORM_CONTROL_TYPE_INPUT_EMAIL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_EMAIL; 5485 alias DOM_FORM_CONTROL_TYPE_INPUT_FILE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_FILE; 5486 alias DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN; 5487 alias DOM_FORM_CONTROL_TYPE_INPUT_IMAGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_IMAGE; 5488 alias DOM_FORM_CONTROL_TYPE_INPUT_MONTH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_MONTH; 5489 alias DOM_FORM_CONTROL_TYPE_INPUT_NUMBER = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_NUMBER; 5490 alias DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD; 5491 alias DOM_FORM_CONTROL_TYPE_INPUT_RADIO = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RADIO; 5492 alias DOM_FORM_CONTROL_TYPE_INPUT_RANGE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RANGE; 5493 alias DOM_FORM_CONTROL_TYPE_INPUT_RESET = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_RESET; 5494 alias DOM_FORM_CONTROL_TYPE_INPUT_SEARCH = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SEARCH; 5495 alias DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT; 5496 alias DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE; 5497 alias DOM_FORM_CONTROL_TYPE_INPUT_TEXT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TEXT; 5498 alias DOM_FORM_CONTROL_TYPE_INPUT_TIME = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_TIME; 5499 alias DOM_FORM_CONTROL_TYPE_INPUT_URL = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_URL; 5500 alias DOM_FORM_CONTROL_TYPE_INPUT_WEEK = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_INPUT_WEEK; 5501 alias DOM_FORM_CONTROL_TYPE_OUTPUT = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_OUTPUT; 5502 alias DOM_FORM_CONTROL_TYPE_SELECT_ONE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_ONE; 5503 alias DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE; 5504 alias DOM_FORM_CONTROL_TYPE_SELECT_LIST = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_SELECT_LIST; 5505 alias DOM_FORM_CONTROL_TYPE_TEXT_AREA = cef_dom_form_control_type_t.DOM_FORM_CONTROL_TYPE_TEXT_AREA; 5506 5507 /// 5508 /// Supported file dialog modes. 5509 /// 5510 enum cef_file_dialog_mode_t 5511 { 5512 /// 5513 /// Requires that the file exists before allowing the user to pick it. 5514 /// 5515 FILE_DIALOG_OPEN = 0, 5516 5517 /// 5518 /// Like Open, but allows picking multiple files to open. 5519 /// 5520 FILE_DIALOG_OPEN_MULTIPLE = 1, 5521 5522 /// 5523 /// Like Open, but selects a folder to open. 5524 /// 5525 FILE_DIALOG_OPEN_FOLDER = 2, 5526 5527 /// 5528 /// Allows picking a nonexistent file, and prompts to overwrite if the file 5529 /// already exists. 5530 /// 5531 FILE_DIALOG_SAVE = 3 5532 } 5533 5534 alias FILE_DIALOG_OPEN = cef_file_dialog_mode_t.FILE_DIALOG_OPEN; 5535 alias FILE_DIALOG_OPEN_MULTIPLE = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_MULTIPLE; 5536 alias FILE_DIALOG_OPEN_FOLDER = cef_file_dialog_mode_t.FILE_DIALOG_OPEN_FOLDER; 5537 alias FILE_DIALOG_SAVE = cef_file_dialog_mode_t.FILE_DIALOG_SAVE; 5538 5539 /// 5540 /// Print job color mode values. 5541 /// 5542 enum cef_color_model_t 5543 { 5544 COLOR_MODEL_UNKNOWN = 0, 5545 COLOR_MODEL_GRAY = 1, 5546 COLOR_MODEL_COLOR = 2, 5547 COLOR_MODEL_CMYK = 3, 5548 COLOR_MODEL_CMY = 4, 5549 COLOR_MODEL_KCMY = 5, 5550 COLOR_MODEL_CMY_K = 6, // CMY_K represents CMY+K. 5551 COLOR_MODEL_BLACK = 7, 5552 COLOR_MODEL_GRAYSCALE = 8, 5553 COLOR_MODEL_RGB = 9, 5554 COLOR_MODEL_RGB16 = 10, 5555 COLOR_MODEL_RGBA = 11, 5556 COLOR_MODEL_COLORMODE_COLOR = 12, // Used in samsung printer ppds. 5557 COLOR_MODEL_COLORMODE_MONOCHROME = 13, // Used in samsung printer ppds. 5558 COLOR_MODEL_HP_COLOR_COLOR = 14, // Used in HP color printer ppds. 5559 COLOR_MODEL_HP_COLOR_BLACK = 15, // Used in HP color printer ppds. 5560 COLOR_MODEL_PRINTOUTMODE_NORMAL = 16, // Used in foomatic ppds. 5561 COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = 17, // Used in foomatic ppds. 5562 COLOR_MODEL_PROCESSCOLORMODEL_CMYK = 18, // Used in canon printer ppds. 5563 COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = 19, // Used in canon printer ppds. 5564 COLOR_MODEL_PROCESSCOLORMODEL_RGB = 20 // Used in canon printer ppds 5565 } 5566 5567 alias COLOR_MODEL_UNKNOWN = cef_color_model_t.COLOR_MODEL_UNKNOWN; 5568 alias COLOR_MODEL_GRAY = cef_color_model_t.COLOR_MODEL_GRAY; 5569 alias COLOR_MODEL_COLOR = cef_color_model_t.COLOR_MODEL_COLOR; 5570 alias COLOR_MODEL_CMYK = cef_color_model_t.COLOR_MODEL_CMYK; 5571 alias COLOR_MODEL_CMY = cef_color_model_t.COLOR_MODEL_CMY; 5572 alias COLOR_MODEL_KCMY = cef_color_model_t.COLOR_MODEL_KCMY; 5573 alias COLOR_MODEL_CMY_K = cef_color_model_t.COLOR_MODEL_CMY_K; 5574 alias COLOR_MODEL_BLACK = cef_color_model_t.COLOR_MODEL_BLACK; 5575 alias COLOR_MODEL_GRAYSCALE = cef_color_model_t.COLOR_MODEL_GRAYSCALE; 5576 alias COLOR_MODEL_RGB = cef_color_model_t.COLOR_MODEL_RGB; 5577 alias COLOR_MODEL_RGB16 = cef_color_model_t.COLOR_MODEL_RGB16; 5578 alias COLOR_MODEL_RGBA = cef_color_model_t.COLOR_MODEL_RGBA; 5579 alias COLOR_MODEL_COLORMODE_COLOR = cef_color_model_t.COLOR_MODEL_COLORMODE_COLOR; 5580 alias COLOR_MODEL_COLORMODE_MONOCHROME = cef_color_model_t.COLOR_MODEL_COLORMODE_MONOCHROME; 5581 alias COLOR_MODEL_HP_COLOR_COLOR = cef_color_model_t.COLOR_MODEL_HP_COLOR_COLOR; 5582 alias COLOR_MODEL_HP_COLOR_BLACK = cef_color_model_t.COLOR_MODEL_HP_COLOR_BLACK; 5583 alias COLOR_MODEL_PRINTOUTMODE_NORMAL = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL; 5584 alias COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY = cef_color_model_t.COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY; 5585 alias COLOR_MODEL_PROCESSCOLORMODEL_CMYK = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_CMYK; 5586 alias COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE; 5587 alias COLOR_MODEL_PROCESSCOLORMODEL_RGB = cef_color_model_t.COLOR_MODEL_PROCESSCOLORMODEL_RGB; 5588 5589 /// 5590 /// Print job duplex mode values. 5591 /// 5592 enum cef_duplex_mode_t 5593 { 5594 DUPLEX_MODE_UNKNOWN = -1, 5595 DUPLEX_MODE_SIMPLEX = 0, 5596 DUPLEX_MODE_LONG_EDGE = 1, 5597 DUPLEX_MODE_SHORT_EDGE = 2 5598 } 5599 5600 alias DUPLEX_MODE_UNKNOWN = cef_duplex_mode_t.DUPLEX_MODE_UNKNOWN; 5601 alias DUPLEX_MODE_SIMPLEX = cef_duplex_mode_t.DUPLEX_MODE_SIMPLEX; 5602 alias DUPLEX_MODE_LONG_EDGE = cef_duplex_mode_t.DUPLEX_MODE_LONG_EDGE; 5603 alias DUPLEX_MODE_SHORT_EDGE = cef_duplex_mode_t.DUPLEX_MODE_SHORT_EDGE; 5604 5605 /// 5606 /// Cursor type values. 5607 /// 5608 enum cef_cursor_type_t 5609 { 5610 CT_POINTER = 0, 5611 CT_CROSS = 1, 5612 CT_HAND = 2, 5613 CT_IBEAM = 3, 5614 CT_WAIT = 4, 5615 CT_HELP = 5, 5616 CT_EASTRESIZE = 6, 5617 CT_NORTHRESIZE = 7, 5618 CT_NORTHEASTRESIZE = 8, 5619 CT_NORTHWESTRESIZE = 9, 5620 CT_SOUTHRESIZE = 10, 5621 CT_SOUTHEASTRESIZE = 11, 5622 CT_SOUTHWESTRESIZE = 12, 5623 CT_WESTRESIZE = 13, 5624 CT_NORTHSOUTHRESIZE = 14, 5625 CT_EASTWESTRESIZE = 15, 5626 CT_NORTHEASTSOUTHWESTRESIZE = 16, 5627 CT_NORTHWESTSOUTHEASTRESIZE = 17, 5628 CT_COLUMNRESIZE = 18, 5629 CT_ROWRESIZE = 19, 5630 CT_MIDDLEPANNING = 20, 5631 CT_EASTPANNING = 21, 5632 CT_NORTHPANNING = 22, 5633 CT_NORTHEASTPANNING = 23, 5634 CT_NORTHWESTPANNING = 24, 5635 CT_SOUTHPANNING = 25, 5636 CT_SOUTHEASTPANNING = 26, 5637 CT_SOUTHWESTPANNING = 27, 5638 CT_WESTPANNING = 28, 5639 CT_MOVE = 29, 5640 CT_VERTICALTEXT = 30, 5641 CT_CELL = 31, 5642 CT_CONTEXTMENU = 32, 5643 CT_ALIAS = 33, 5644 CT_PROGRESS = 34, 5645 CT_NODROP = 35, 5646 CT_COPY = 36, 5647 CT_NONE = 37, 5648 CT_NOTALLOWED = 38, 5649 CT_ZOOMIN = 39, 5650 CT_ZOOMOUT = 40, 5651 CT_GRAB = 41, 5652 CT_GRABBING = 42, 5653 CT_MIDDLE_PANNING_VERTICAL = 43, 5654 CT_MIDDLE_PANNING_HORIZONTAL = 44, 5655 CT_CUSTOM = 45, 5656 CT_DND_NONE = 46, 5657 CT_DND_MOVE = 47, 5658 CT_DND_COPY = 48, 5659 CT_DND_LINK = 49 5660 } 5661 5662 alias CT_POINTER = cef_cursor_type_t.CT_POINTER; 5663 alias CT_CROSS = cef_cursor_type_t.CT_CROSS; 5664 alias CT_HAND = cef_cursor_type_t.CT_HAND; 5665 alias CT_IBEAM = cef_cursor_type_t.CT_IBEAM; 5666 alias CT_WAIT = cef_cursor_type_t.CT_WAIT; 5667 alias CT_HELP = cef_cursor_type_t.CT_HELP; 5668 alias CT_EASTRESIZE = cef_cursor_type_t.CT_EASTRESIZE; 5669 alias CT_NORTHRESIZE = cef_cursor_type_t.CT_NORTHRESIZE; 5670 alias CT_NORTHEASTRESIZE = cef_cursor_type_t.CT_NORTHEASTRESIZE; 5671 alias CT_NORTHWESTRESIZE = cef_cursor_type_t.CT_NORTHWESTRESIZE; 5672 alias CT_SOUTHRESIZE = cef_cursor_type_t.CT_SOUTHRESIZE; 5673 alias CT_SOUTHEASTRESIZE = cef_cursor_type_t.CT_SOUTHEASTRESIZE; 5674 alias CT_SOUTHWESTRESIZE = cef_cursor_type_t.CT_SOUTHWESTRESIZE; 5675 alias CT_WESTRESIZE = cef_cursor_type_t.CT_WESTRESIZE; 5676 alias CT_NORTHSOUTHRESIZE = cef_cursor_type_t.CT_NORTHSOUTHRESIZE; 5677 alias CT_EASTWESTRESIZE = cef_cursor_type_t.CT_EASTWESTRESIZE; 5678 alias CT_NORTHEASTSOUTHWESTRESIZE = cef_cursor_type_t.CT_NORTHEASTSOUTHWESTRESIZE; 5679 alias CT_NORTHWESTSOUTHEASTRESIZE = cef_cursor_type_t.CT_NORTHWESTSOUTHEASTRESIZE; 5680 alias CT_COLUMNRESIZE = cef_cursor_type_t.CT_COLUMNRESIZE; 5681 alias CT_ROWRESIZE = cef_cursor_type_t.CT_ROWRESIZE; 5682 alias CT_MIDDLEPANNING = cef_cursor_type_t.CT_MIDDLEPANNING; 5683 alias CT_EASTPANNING = cef_cursor_type_t.CT_EASTPANNING; 5684 alias CT_NORTHPANNING = cef_cursor_type_t.CT_NORTHPANNING; 5685 alias CT_NORTHEASTPANNING = cef_cursor_type_t.CT_NORTHEASTPANNING; 5686 alias CT_NORTHWESTPANNING = cef_cursor_type_t.CT_NORTHWESTPANNING; 5687 alias CT_SOUTHPANNING = cef_cursor_type_t.CT_SOUTHPANNING; 5688 alias CT_SOUTHEASTPANNING = cef_cursor_type_t.CT_SOUTHEASTPANNING; 5689 alias CT_SOUTHWESTPANNING = cef_cursor_type_t.CT_SOUTHWESTPANNING; 5690 alias CT_WESTPANNING = cef_cursor_type_t.CT_WESTPANNING; 5691 alias CT_MOVE = cef_cursor_type_t.CT_MOVE; 5692 alias CT_VERTICALTEXT = cef_cursor_type_t.CT_VERTICALTEXT; 5693 alias CT_CELL = cef_cursor_type_t.CT_CELL; 5694 alias CT_CONTEXTMENU = cef_cursor_type_t.CT_CONTEXTMENU; 5695 alias CT_ALIAS = cef_cursor_type_t.CT_ALIAS; 5696 alias CT_PROGRESS = cef_cursor_type_t.CT_PROGRESS; 5697 alias CT_NODROP = cef_cursor_type_t.CT_NODROP; 5698 alias CT_COPY = cef_cursor_type_t.CT_COPY; 5699 alias CT_NONE = cef_cursor_type_t.CT_NONE; 5700 alias CT_NOTALLOWED = cef_cursor_type_t.CT_NOTALLOWED; 5701 alias CT_ZOOMIN = cef_cursor_type_t.CT_ZOOMIN; 5702 alias CT_ZOOMOUT = cef_cursor_type_t.CT_ZOOMOUT; 5703 alias CT_GRAB = cef_cursor_type_t.CT_GRAB; 5704 alias CT_GRABBING = cef_cursor_type_t.CT_GRABBING; 5705 alias CT_MIDDLE_PANNING_VERTICAL = cef_cursor_type_t.CT_MIDDLE_PANNING_VERTICAL; 5706 alias CT_MIDDLE_PANNING_HORIZONTAL = cef_cursor_type_t.CT_MIDDLE_PANNING_HORIZONTAL; 5707 alias CT_CUSTOM = cef_cursor_type_t.CT_CUSTOM; 5708 alias CT_DND_NONE = cef_cursor_type_t.CT_DND_NONE; 5709 alias CT_DND_MOVE = cef_cursor_type_t.CT_DND_MOVE; 5710 alias CT_DND_COPY = cef_cursor_type_t.CT_DND_COPY; 5711 alias CT_DND_LINK = cef_cursor_type_t.CT_DND_LINK; 5712 5713 /// 5714 /// Structure representing cursor information. |buffer| will be 5715 /// |size.width|*|size.height|*4 bytes in size and represents a BGRA image with 5716 /// an upper-left origin. 5717 /// 5718 struct cef_cursor_info_t 5719 { 5720 g 5721 cef_point_t hotspot; 5722 float image_scale_factor; 5723 void* buffer; 5724 g 5725 cef_size_t size; 5726 } 5727 5728 5729 5730 /// 5731 /// URI unescape rules passed to CefURIDecode(). 5732 /// 5733 enum cef_uri_unescape_rule_t 5734 { 5735 /// 5736 /// Don't unescape anything at all. 5737 /// 5738 UU_NONE = 0, 5739 5740 /// 5741 /// Don't unescape anything special, but all normal unescaping will happen. 5742 /// This is a placeholder and can't be combined with other flags (since it's 5743 /// just the absence of them). All other unescape rules imply "normal" in 5744 /// addition to their special meaning. Things like escaped letters, digits, 5745 /// and most symbols will get unescaped with this mode. 5746 /// 5747 UU_NORMAL = 1 << 0, 5748 5749 /// 5750 /// Convert %20 to spaces. In some places where we're showing URLs, we may 5751 /// want this. In places where the URL may be copied and pasted out, then 5752 /// you wouldn't want this since it might not be interpreted in one piece 5753 /// by other applications. 5754 /// 5755 UU_SPACES = 1 << 1, 5756 5757 /// 5758 /// Unescapes '/' and '\\'. If these characters were unescaped, the resulting 5759 /// URL won't be the same as the source one. Moreover, they are dangerous to 5760 /// unescape in strings that will be used as file paths or names. This value 5761 /// should only be used when slashes don't have special meaning, like data 5762 /// URLs. 5763 /// 5764 UU_PATH_SEPARATORS = 1 << 2, 5765 5766 /// 5767 /// Unescapes various characters that will change the meaning of URLs, 5768 /// including '%', '+', '&', '#'. Does not unescape path separators. 5769 /// If these characters were unescaped, the resulting URL won't be the same 5770 /// as the source one. This flag is used when generating final output like 5771 /// filenames for URLs where we won't be interpreting as a URL and want to do 5772 /// as much unescaping as possible. 5773 /// 5774 UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3, 5775 5776 /// 5777 /// URL queries use "+" for space. This flag controls that replacement. 5778 /// 5779 UU_REPLACE_PLUS_WITH_SPACE = 1 << 4 5780 } 5781 5782 alias UU_NONE = cef_uri_unescape_rule_t.UU_NONE; 5783 alias UU_NORMAL = cef_uri_unescape_rule_t.UU_NORMAL; 5784 alias UU_SPACES = cef_uri_unescape_rule_t.UU_SPACES; 5785 alias UU_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_PATH_SEPARATORS; 5786 alias UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = cef_uri_unescape_rule_t.UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS; 5787 alias UU_REPLACE_PLUS_WITH_SPACE = cef_uri_unescape_rule_t.UU_REPLACE_PLUS_WITH_SPACE; 5788 5789 /// 5790 /// Options that can be passed to CefParseJSON. 5791 /// 5792 enum cef_json_parser_options_t 5793 { 5794 /// 5795 /// Parses the input strictly according to RFC 4627. See comments in 5796 /// Chromium's base/json/json_reader.h file for known limitations/ 5797 /// deviations from the RFC. 5798 /// 5799 JSON_PARSER_RFC = 0, 5800 5801 /// 5802 /// Allows commas to exist after the last element in structures. 5803 /// 5804 JSON_PARSER_ALLOW_TRAILING_COMMAS = 1 << 0 5805 } 5806 5807 alias JSON_PARSER_RFC = cef_json_parser_options_t.JSON_PARSER_RFC; 5808 alias JSON_PARSER_ALLOW_TRAILING_COMMAS = cef_json_parser_options_t.JSON_PARSER_ALLOW_TRAILING_COMMAS; 5809 5810 /// 5811 /// Options that can be passed to CefWriteJSON. 5812 /// 5813 enum cef_json_writer_options_t 5814 { 5815 /// 5816 /// Default behavior. 5817 /// 5818 JSON_WRITER_DEFAULT = 0, 5819 5820 /// 5821 /// This option instructs the writer that if a Binary value is encountered, 5822 /// the value (and key if within a dictionary) will be omitted from the 5823 /// output, and success will be returned. Otherwise, if a binary value is 5824 /// encountered, failure will be returned. 5825 /// 5826 JSON_WRITER_OMIT_BINARY_VALUES = 1 << 0, 5827 5828 /// 5829 /// This option instructs the writer to write doubles that have no fractional 5830 /// part as a normal integer (i.e., without using exponential notation 5831 /// or appending a '.0') as long as the value is within the range of a 5832 /// 64-bit int. 5833 /// 5834 JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = 1 << 1, 5835 5836 /// 5837 /// Return a slightly nicer formatted json string (pads with whitespace to 5838 /// help with readability). 5839 /// 5840 JSON_WRITER_PRETTY_PRINT = 1 << 2 5841 } 5842 5843 alias JSON_WRITER_DEFAULT = cef_json_writer_options_t.JSON_WRITER_DEFAULT; 5844 alias JSON_WRITER_OMIT_BINARY_VALUES = cef_json_writer_options_t.JSON_WRITER_OMIT_BINARY_VALUES; 5845 alias JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION = cef_json_writer_options_t.JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION; 5846 alias JSON_WRITER_PRETTY_PRINT = cef_json_writer_options_t.JSON_WRITER_PRETTY_PRINT; 5847 5848 /// 5849 /// Margin type for PDF printing. 5850 /// 5851 enum cef_pdf_print_margin_type_t 5852 { 5853 /// 5854 /// Default margins of 1cm (~0.4 inches). 5855 /// 5856 PDF_PRINT_MARGIN_DEFAULT = 0, 5857 5858 /// 5859 /// No margins. 5860 /// 5861 PDF_PRINT_MARGIN_NONE = 1, 5862 5863 /// 5864 /// Custom margins using the |margin_*| values from cef_pdf_print_settings_t. 5865 /// 5866 PDF_PRINT_MARGIN_CUSTOM = 2 5867 } 5868 5869 alias PDF_PRINT_MARGIN_DEFAULT = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_DEFAULT; 5870 alias PDF_PRINT_MARGIN_NONE = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_NONE; 5871 alias PDF_PRINT_MARGIN_CUSTOM = cef_pdf_print_margin_type_t.PDF_PRINT_MARGIN_CUSTOM; 5872 5873 /// 5874 /// Structure representing PDF print settings. These values match the parameters 5875 /// supported by the DevTools Page.printToPDF function. See 5876 /// https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF 5877 /// 5878 struct cef_pdf_print_settings_t 5879 { 5880 /// 5881 /// Set to true (1) for landscape mode or false (0) for portrait mode. 5882 /// 5883 int landscape; 5884 5885 /// 5886 /// Set to true (1) to print background graphics. 5887 /// 5888 int print_background; 5889 5890 /// 5891 /// The percentage to scale the PDF by before printing (e.g. .5 is 50%). 5892 /// If this value is less than or equal to zero the default value of 1.0 5893 /// will be used. 5894 /// 5895 double scale; 5896 5897 /// 5898 /// Output paper size in inches. If either of these values is less than or 5899 /// equal to zero then the default paper size (letter, 8.5 x 11 inches) will 5900 /// be used. 5901 /// 5902 double paper_width; 5903 double paper_height; 5904 5905 /// 5906 /// Set to true (1) to prefer page size as defined by css. Defaults to false 5907 /// (0), in which case the content will be scaled to fit the paper size. 5908 /// 5909 int prefer_css_page_size; 5910 5911 /// 5912 /// Margin type. 5913 /// 5914 cef_pdf_print_margin_type_t margin_type; 5915 5916 /// 5917 /// Margins in inches. Only used if |margin_type| is set to 5918 /// PDF_PRINT_MARGIN_CUSTOM. 5919 /// 5920 double margin_top; 5921 double margin_right; 5922 double margin_bottom; 5923 double margin_left; 5924 5925 /// 5926 /// Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed 5927 /// in the document order, not in the order specified, and no more than once. 5928 /// Defaults to empty string, which implies the entire document is printed. 5929 /// The page numbers are quietly capped to actual page count of the document, 5930 /// and ranges beyond the end of the document are ignored. If this results in 5931 /// no pages to print, an error is reported. It is an error to specify a range 5932 /// with start greater than end. 5933 /// 5934 cef_string_t page_ranges; 5935 5936 /// 5937 /// Set to true (1) to display the header and/or footer. Modify 5938 /// |header_template| and/or |footer_template| to customize the display. 5939 /// 5940 int display_header_footer; 5941 5942 /// 5943 /// HTML template for the print header. Only displayed if 5944 /// |display_header_footer| is true (1). Should be valid HTML markup with 5945 /// the following classes used to inject printing values into them: 5946 /// 5947 /// - date: formatted print date 5948 /// - title: document title 5949 /// - url: document location 5950 /// - pageNumber: current page number 5951 /// - totalPages: total pages in the document 5952 /// 5953 /// For example, "<span class=title></span>" would generate a span containing 5954 /// the title. 5955 /// 5956 cef_string_t header_template; 5957 5958 /// 5959 /// HTML template for the print footer. Only displayed if 5960 /// |display_header_footer| is true (1). Uses the same format as 5961 /// |header_template|. 5962 /// 5963 cef_string_t footer_template; 5964 5965 /// 5966 /// Set to true (1) to generate tagged (accessible) PDF. 5967 /// 5968 int generate_tagged_pdf; 5969 } 5970 5971 5972 5973 /// 5974 /// Supported UI scale factors for the platform. SCALE_FACTOR_NONE is used for 5975 /// density independent resources such as string, html/js files or an image that 5976 /// can be used for any scale factors (such as wallpapers). 5977 /// 5978 enum cef_scale_factor_t 5979 { 5980 SCALE_FACTOR_NONE = 0, 5981 SCALE_FACTOR_100P = 1, 5982 SCALE_FACTOR_125P = 2, 5983 SCALE_FACTOR_133P = 3, 5984 SCALE_FACTOR_140P = 4, 5985 SCALE_FACTOR_150P = 5, 5986 SCALE_FACTOR_180P = 6, 5987 SCALE_FACTOR_200P = 7, 5988 SCALE_FACTOR_250P = 8, 5989 SCALE_FACTOR_300P = 9 5990 } 5991 5992 alias SCALE_FACTOR_NONE = cef_scale_factor_t.SCALE_FACTOR_NONE; 5993 alias SCALE_FACTOR_100P = cef_scale_factor_t.SCALE_FACTOR_100P; 5994 alias SCALE_FACTOR_125P = cef_scale_factor_t.SCALE_FACTOR_125P; 5995 alias SCALE_FACTOR_133P = cef_scale_factor_t.SCALE_FACTOR_133P; 5996 alias SCALE_FACTOR_140P = cef_scale_factor_t.SCALE_FACTOR_140P; 5997 alias SCALE_FACTOR_150P = cef_scale_factor_t.SCALE_FACTOR_150P; 5998 alias SCALE_FACTOR_180P = cef_scale_factor_t.SCALE_FACTOR_180P; 5999 alias SCALE_FACTOR_200P = cef_scale_factor_t.SCALE_FACTOR_200P; 6000 alias SCALE_FACTOR_250P = cef_scale_factor_t.SCALE_FACTOR_250P; 6001 alias SCALE_FACTOR_300P = cef_scale_factor_t.SCALE_FACTOR_300P; 6002 6003 /// 6004 /// Policy for how the Referrer HTTP header value will be sent during 6005 /// navigation. If the `--no-referrers` command-line flag is specified then the 6006 /// policy value will be ignored and the Referrer value will never be sent. Must 6007 /// be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium. 6008 /// 6009 enum cef_referrer_policy_t 6010 { 6011 /// 6012 /// Clear the referrer header if the header value is HTTPS but the request 6013 /// destination is HTTP. This is the default behavior. 6014 /// 6015 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0, 6016 REFERRER_POLICY_DEFAULT = REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, 6017 6018 /// 6019 /// A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: 6020 /// If the request destination is HTTP, an HTTPS referrer will be cleared. If 6021 /// the request's destination is cross-origin with the referrer (but does not 6022 /// downgrade), the referrer's granularity will be stripped down to an origin 6023 /// rather than a full URL. Same-origin requests will send the full referrer. 6024 /// 6025 REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1, 6026 6027 /// 6028 /// Strip the referrer down to an origin when the origin of the referrer is 6029 /// different from the destination's origin. 6030 /// 6031 REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2, 6032 6033 /// 6034 /// Never change the referrer. 6035 /// 6036 REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3, 6037 6038 /// 6039 /// Strip the referrer down to the origin regardless of the redirect location. 6040 /// 6041 REFERRER_POLICY_ORIGIN = 4, 6042 6043 /// 6044 /// Clear the referrer when the request's referrer is cross-origin with the 6045 /// request's destination. 6046 /// 6047 REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5, 6048 6049 /// 6050 /// Strip the referrer down to the origin, but clear it entirely if the 6051 /// referrer value is HTTPS and the destination is HTTP. 6052 /// 6053 REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6, 6054 6055 /// 6056 /// Always clear the referrer regardless of the request destination. 6057 /// 6058 REFERRER_POLICY_NO_REFERRER = 7, 6059 6060 /// Always the last value in this enumeration. 6061 REFERRER_POLICY_LAST_VALUE = REFERRER_POLICY_NO_REFERRER 6062 } 6063 6064 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; 6065 alias REFERRER_POLICY_DEFAULT = cef_referrer_policy_t.REFERRER_POLICY_DEFAULT; 6066 alias REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN; 6067 alias REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN; 6068 alias REFERRER_POLICY_NEVER_CLEAR_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NEVER_CLEAR_REFERRER; 6069 alias REFERRER_POLICY_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_ORIGIN; 6070 alias REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = cef_referrer_policy_t.REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN; 6071 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; 6072 alias REFERRER_POLICY_NO_REFERRER = cef_referrer_policy_t.REFERRER_POLICY_NO_REFERRER; 6073 alias REFERRER_POLICY_LAST_VALUE = cef_referrer_policy_t.REFERRER_POLICY_LAST_VALUE; 6074 6075 /// 6076 /// Return values for CefResponseFilter::Filter(). 6077 /// 6078 enum cef_response_filter_status_t 6079 { 6080 /// 6081 /// Some or all of the pre-filter data was read successfully but more data is 6082 /// needed in order to continue filtering (filtered output is pending). 6083 /// 6084 RESPONSE_FILTER_NEED_MORE_DATA = 0, 6085 6086 /// 6087 /// Some or all of the pre-filter data was read successfully and all available 6088 /// filtered output has been written. 6089 /// 6090 RESPONSE_FILTER_DONE = 1, 6091 6092 /// 6093 /// An error occurred during filtering. 6094 /// 6095 RESPONSE_FILTER_ERROR = 2 6096 } 6097 6098 alias RESPONSE_FILTER_NEED_MORE_DATA = cef_response_filter_status_t.RESPONSE_FILTER_NEED_MORE_DATA; 6099 alias RESPONSE_FILTER_DONE = cef_response_filter_status_t.RESPONSE_FILTER_DONE; 6100 alias RESPONSE_FILTER_ERROR = cef_response_filter_status_t.RESPONSE_FILTER_ERROR; 6101 6102 /// 6103 /// Describes how to interpret the components of a pixel. 6104 /// 6105 enum cef_color_type_t 6106 { 6107 /// 6108 /// RGBA with 8 bits per pixel (32bits total). 6109 /// 6110 CEF_COLOR_TYPE_RGBA_8888 = 0, 6111 6112 /// 6113 /// BGRA with 8 bits per pixel (32bits total). 6114 /// 6115 CEF_COLOR_TYPE_BGRA_8888 = 1 6116 } 6117 6118 alias CEF_COLOR_TYPE_RGBA_8888 = cef_color_type_t.CEF_COLOR_TYPE_RGBA_8888; 6119 alias CEF_COLOR_TYPE_BGRA_8888 = cef_color_type_t.CEF_COLOR_TYPE_BGRA_8888; 6120 6121 /// 6122 /// Describes how to interpret the alpha component of a pixel. 6123 /// 6124 enum cef_alpha_type_t 6125 { 6126 /// 6127 /// No transparency. The alpha component is ignored. 6128 /// 6129 CEF_ALPHA_TYPE_OPAQUE = 0, 6130 6131 /// 6132 /// Transparency with pre-multiplied alpha component. 6133 /// 6134 CEF_ALPHA_TYPE_PREMULTIPLIED = 1, 6135 6136 /// 6137 /// Transparency with post-multiplied alpha component. 6138 /// 6139 CEF_ALPHA_TYPE_POSTMULTIPLIED = 2 6140 } 6141 6142 alias CEF_ALPHA_TYPE_OPAQUE = cef_alpha_type_t.CEF_ALPHA_TYPE_OPAQUE; 6143 alias CEF_ALPHA_TYPE_PREMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_PREMULTIPLIED; 6144 alias CEF_ALPHA_TYPE_POSTMULTIPLIED = cef_alpha_type_t.CEF_ALPHA_TYPE_POSTMULTIPLIED; 6145 6146 /// 6147 /// Text style types. Should be kepy in sync with gfx::TextStyle. 6148 /// 6149 enum cef_text_style_t 6150 { 6151 CEF_TEXT_STYLE_BOLD = 0, 6152 CEF_TEXT_STYLE_ITALIC = 1, 6153 CEF_TEXT_STYLE_STRIKE = 2, 6154 CEF_TEXT_STYLE_DIAGONAL_STRIKE = 3, 6155 CEF_TEXT_STYLE_UNDERLINE = 4 6156 } 6157 6158 alias CEF_TEXT_STYLE_BOLD = cef_text_style_t.CEF_TEXT_STYLE_BOLD; 6159 alias CEF_TEXT_STYLE_ITALIC = cef_text_style_t.CEF_TEXT_STYLE_ITALIC; 6160 alias CEF_TEXT_STYLE_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_STRIKE; 6161 alias CEF_TEXT_STYLE_DIAGONAL_STRIKE = cef_text_style_t.CEF_TEXT_STYLE_DIAGONAL_STRIKE; 6162 alias CEF_TEXT_STYLE_UNDERLINE = cef_text_style_t.CEF_TEXT_STYLE_UNDERLINE; 6163 6164 /// 6165 /// Specifies where along the main axis the CefBoxLayout child views should be 6166 /// laid out. 6167 /// 6168 enum cef_main_axis_alignment_t 6169 { 6170 /// 6171 /// Child views will be left-aligned. 6172 /// 6173 CEF_MAIN_AXIS_ALIGNMENT_START = 0, 6174 6175 /// 6176 /// Child views will be center-aligned. 6177 /// 6178 CEF_MAIN_AXIS_ALIGNMENT_CENTER = 1, 6179 6180 /// 6181 /// Child views will be right-aligned. 6182 /// 6183 CEF_MAIN_AXIS_ALIGNMENT_END = 2 6184 } 6185 6186 alias CEF_MAIN_AXIS_ALIGNMENT_START = cef_main_axis_alignment_t.CEF_MAIN_AXIS_ALIGNMENT_START; 6187 alias CEF_MAIN_AXIS_ALIGNMENT_CENTER = cef_main_axis_alignment_t.CEF_MAIN_AXIS_ALIGNMENT_CENTER; 6188 alias CEF_MAIN_AXIS_ALIGNMENT_END = cef_main_axis_alignment_t.CEF_MAIN_AXIS_ALIGNMENT_END; 6189 6190 /// 6191 /// Specifies where along the cross axis the CefBoxLayout child views should be 6192 /// laid out. 6193 /// 6194 enum cef_cross_axis_alignment_t 6195 { 6196 /// 6197 /// Child views will be stretched to fit. 6198 /// 6199 CEF_CROSS_AXIS_ALIGNMENT_STRETCH = 0, 6200 6201 /// 6202 /// Child views will be left-aligned. 6203 /// 6204 CEF_CROSS_AXIS_ALIGNMENT_START = 1, 6205 6206 /// 6207 /// Child views will be center-aligned. 6208 /// 6209 CEF_CROSS_AXIS_ALIGNMENT_CENTER = 2, 6210 6211 /// 6212 /// Child views will be right-aligned. 6213 /// 6214 CEF_CROSS_AXIS_ALIGNMENT_END = 3 6215 } 6216 6217 alias CEF_CROSS_AXIS_ALIGNMENT_STRETCH = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_STRETCH; 6218 alias CEF_CROSS_AXIS_ALIGNMENT_START = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_START; 6219 alias CEF_CROSS_AXIS_ALIGNMENT_CENTER = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_CENTER; 6220 alias CEF_CROSS_AXIS_ALIGNMENT_END = cef_cross_axis_alignment_t.CEF_CROSS_AXIS_ALIGNMENT_END; 6221 6222 /// 6223 /// Settings used when initializing a CefBoxLayout. 6224 /// 6225 struct cef_box_layout_settings_t 6226 { 6227 /// 6228 /// If true (1) the layout will be horizontal, otherwise the layout will be 6229 /// vertical. 6230 /// 6231 int horizontal; 6232 6233 /// 6234 /// Adds additional horizontal space between the child view area and the host 6235 /// view border. 6236 /// 6237 int inside_border_horizontal_spacing; 6238 6239 /// 6240 /// Adds additional vertical space between the child view area and the host 6241 /// view border. 6242 /// 6243 int inside_border_vertical_spacing; 6244 6245 /// 6246 /// Adds additional space around the child view area. 6247 /// 6248 g 6249 cef_insets_t inside_border_insets; 6250 6251 /// 6252 /// Adds additional space between child views. 6253 /// 6254 int between_child_spacing; 6255 6256 /// 6257 /// Specifies where along the main axis the child views should be laid out. 6258 /// 6259 cef_main_axis_alignment_t main_axis_alignment; 6260 6261 /// 6262 /// Specifies where along the cross axis the child views should be laid out. 6263 /// 6264 cef_cross_axis_alignment_t cross_axis_alignment; 6265 6266 /// 6267 /// Minimum cross axis size. 6268 /// 6269 int minimum_cross_axis_size; 6270 6271 /// 6272 /// Default flex for views when none is specified via CefBoxLayout methods. 6273 /// Using the preferred size as the basis, free space along the main axis is 6274 /// distributed to views in the ratio of their flex weights. Similarly, if the 6275 /// views will overflow the parent, space is subtracted in these ratios. A 6276 /// flex of 0 means this view is not resized. Flex values must not be 6277 /// negative. 6278 /// 6279 int default_flex; 6280 } 6281 6282 6283 6284 /// 6285 /// Specifies the button display state. 6286 /// 6287 enum cef_button_state_t 6288 { 6289 CEF_BUTTON_STATE_NORMAL = 0, 6290 CEF_BUTTON_STATE_HOVERED = 1, 6291 CEF_BUTTON_STATE_PRESSED = 2, 6292 CEF_BUTTON_STATE_DISABLED = 3 6293 } 6294 6295 alias CEF_BUTTON_STATE_NORMAL = cef_button_state_t.CEF_BUTTON_STATE_NORMAL; 6296 alias CEF_BUTTON_STATE_HOVERED = cef_button_state_t.CEF_BUTTON_STATE_HOVERED; 6297 alias CEF_BUTTON_STATE_PRESSED = cef_button_state_t.CEF_BUTTON_STATE_PRESSED; 6298 alias CEF_BUTTON_STATE_DISABLED = cef_button_state_t.CEF_BUTTON_STATE_DISABLED; 6299 6300 /// 6301 /// Specifies the horizontal text alignment mode. 6302 /// 6303 enum cef_horizontal_alignment_t 6304 { 6305 /// 6306 /// Align the text's left edge with that of its display area. 6307 /// 6308 CEF_HORIZONTAL_ALIGNMENT_LEFT = 0, 6309 6310 /// 6311 /// Align the text's center with that of its display area. 6312 /// 6313 CEF_HORIZONTAL_ALIGNMENT_CENTER = 1, 6314 6315 /// 6316 /// Align the text's right edge with that of its display area. 6317 /// 6318 CEF_HORIZONTAL_ALIGNMENT_RIGHT = 2 6319 } 6320 6321 alias CEF_HORIZONTAL_ALIGNMENT_LEFT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_LEFT; 6322 alias CEF_HORIZONTAL_ALIGNMENT_CENTER = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_CENTER; 6323 alias CEF_HORIZONTAL_ALIGNMENT_RIGHT = cef_horizontal_alignment_t.CEF_HORIZONTAL_ALIGNMENT_RIGHT; 6324 6325 /// 6326 /// Specifies how a menu will be anchored for non-RTL languages. The opposite 6327 /// position will be used for RTL languages. 6328 /// 6329 enum cef_menu_anchor_position_t 6330 { 6331 CEF_MENU_ANCHOR_TOPLEFT = 0, 6332 CEF_MENU_ANCHOR_TOPRIGHT = 1, 6333 CEF_MENU_ANCHOR_BOTTOMCENTER = 2 6334 } 6335 6336 alias CEF_MENU_ANCHOR_TOPLEFT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPLEFT; 6337 alias CEF_MENU_ANCHOR_TOPRIGHT = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_TOPRIGHT; 6338 alias CEF_MENU_ANCHOR_BOTTOMCENTER = cef_menu_anchor_position_t.CEF_MENU_ANCHOR_BOTTOMCENTER; 6339 6340 /// 6341 /// Supported color types for menu items. 6342 /// 6343 enum cef_menu_color_type_t 6344 { 6345 CEF_MENU_COLOR_TEXT = 0, 6346 CEF_MENU_COLOR_TEXT_HOVERED = 1, 6347 CEF_MENU_COLOR_TEXT_ACCELERATOR = 2, 6348 CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = 3, 6349 CEF_MENU_COLOR_BACKGROUND = 4, 6350 CEF_MENU_COLOR_BACKGROUND_HOVERED = 5, 6351 CEF_MENU_COLOR_COUNT = 6 6352 } 6353 6354 alias CEF_MENU_COLOR_TEXT = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT; 6355 alias CEF_MENU_COLOR_TEXT_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_HOVERED; 6356 alias CEF_MENU_COLOR_TEXT_ACCELERATOR = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR; 6357 alias CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_TEXT_ACCELERATOR_HOVERED; 6358 alias CEF_MENU_COLOR_BACKGROUND = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND; 6359 alias CEF_MENU_COLOR_BACKGROUND_HOVERED = cef_menu_color_type_t.CEF_MENU_COLOR_BACKGROUND_HOVERED; 6360 alias CEF_MENU_COLOR_COUNT = cef_menu_color_type_t.CEF_MENU_COLOR_COUNT; 6361 6362 /// Supported SSL version values. See net/ssl/ssl_connection_status_flags.h 6363 /// for more information. 6364 enum cef_ssl_version_t 6365 { 6366 SSL_CONNECTION_VERSION_UNKNOWN = 0, // Unknown SSL version. 6367 SSL_CONNECTION_VERSION_SSL2 = 1, 6368 SSL_CONNECTION_VERSION_SSL3 = 2, 6369 SSL_CONNECTION_VERSION_TLS1 = 3, 6370 SSL_CONNECTION_VERSION_TLS1_1 = 4, 6371 SSL_CONNECTION_VERSION_TLS1_2 = 5, 6372 SSL_CONNECTION_VERSION_TLS1_3 = 6, 6373 SSL_CONNECTION_VERSION_QUIC = 7 6374 } 6375 6376 alias SSL_CONNECTION_VERSION_UNKNOWN = cef_ssl_version_t.SSL_CONNECTION_VERSION_UNKNOWN; 6377 alias SSL_CONNECTION_VERSION_SSL2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL2; 6378 alias SSL_CONNECTION_VERSION_SSL3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_SSL3; 6379 alias SSL_CONNECTION_VERSION_TLS1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1; 6380 alias SSL_CONNECTION_VERSION_TLS1_1 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_1; 6381 alias SSL_CONNECTION_VERSION_TLS1_2 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_2; 6382 alias SSL_CONNECTION_VERSION_TLS1_3 = cef_ssl_version_t.SSL_CONNECTION_VERSION_TLS1_3; 6383 alias SSL_CONNECTION_VERSION_QUIC = cef_ssl_version_t.SSL_CONNECTION_VERSION_QUIC; 6384 6385 /// Supported SSL content status flags. See content/public/common/ssl_status.h 6386 /// for more information. 6387 enum cef_ssl_content_status_t 6388 { 6389 SSL_CONTENT_NORMAL_CONTENT = 0, 6390 SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = 1 << 0, 6391 SSL_CONTENT_RAN_INSECURE_CONTENT = 1 << 1 6392 } 6393 6394 alias SSL_CONTENT_NORMAL_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_NORMAL_CONTENT; 6395 alias SSL_CONTENT_DISPLAYED_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_DISPLAYED_INSECURE_CONTENT; 6396 alias SSL_CONTENT_RAN_INSECURE_CONTENT = cef_ssl_content_status_t.SSL_CONTENT_RAN_INSECURE_CONTENT; 6397 6398 // 6399 /// Configuration options for registering a custom scheme. 6400 /// These values are used when calling AddCustomScheme. 6401 // 6402 enum cef_scheme_options_t 6403 { 6404 CEF_SCHEME_OPTION_NONE = 0, 6405 6406 /// 6407 /// If CEF_SCHEME_OPTION_STANDARD is set the scheme will be treated as a 6408 /// standard scheme. Standard schemes are subject to URL canonicalization and 6409 /// parsing rules as defined in the Common Internet Scheme Syntax RFC 1738 6410 /// Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt 6411 // 6412 /// In particular, the syntax for standard scheme URLs must be of the form: 6413 /// <pre> 6414 /// [scheme]://[username]:[password]@[host]:[port]/[url-path] 6415 /// </pre> Standard scheme URLs must have a host component that is a fully 6416 /// qualified domain name as defined in Section 3.5 of RFC 1034 [13] and 6417 /// Section 2.1 of RFC 1123. These URLs will be canonicalized to 6418 /// "scheme://host/path" in the simplest case and 6419 /// "scheme://username:password@host:port/path" in the most explicit case. For 6420 /// example, "scheme:host/path" and "scheme:///host/path" will both be 6421 /// canonicalized to "scheme://host/path". The origin of a standard scheme URL 6422 /// is the combination of scheme, host and port (i.e., "scheme://host:port" in 6423 /// the most explicit case). 6424 // 6425 /// For non-standard scheme URLs only the "scheme:" component is parsed and 6426 /// canonicalized. The remainder of the URL will be passed to the handler as- 6427 /// is. For example, "scheme:///some%20text" will remain the same. 6428 /// Non-standard scheme URLs cannot be used as a target for form submission. 6429 /// 6430 CEF_SCHEME_OPTION_STANDARD = 1 << 0, 6431 6432 /// 6433 /// If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same 6434 /// security rules as those applied to "file" URLs. Normal pages cannot link 6435 /// to or access local URLs. Also, by default, local URLs can only perform 6436 /// XMLHttpRequest calls to the same URL (origin + path) that originated the 6437 /// request. To allow XMLHttpRequest calls from a local URL to other URLs with 6438 /// the same origin set the CefSettings.file_access_from_file_urls_allowed 6439 /// value to true (1). To allow XMLHttpRequest calls from a local URL to all 6440 /// origins set the CefSettings.universal_access_from_file_urls_allowed value 6441 /// to true (1). 6442 /// 6443 CEF_SCHEME_OPTION_LOCAL = 1 << 1, 6444 6445 /// 6446 /// If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be 6447 /// displayed from other content hosted with the same scheme. For example, 6448 /// pages in other origins cannot create iframes or hyperlinks to URLs with 6449 /// the scheme. For schemes that must be accessible from other schemes don't 6450 /// set this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS 6451 /// "Access-Control-Allow-Origin" headers to further restrict access. 6452 /// 6453 CEF_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2, 6454 6455 /// 6456 /// If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the 6457 /// same security rules as those applied to "https" URLs. For example, loading 6458 /// this scheme from other secure schemes will not trigger mixed content 6459 /// warnings. 6460 /// 6461 CEF_SCHEME_OPTION_SECURE = 1 << 3, 6462 6463 /// 6464 /// If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS 6465 /// requests. This value should be set in most cases where 6466 /// CEF_SCHEME_OPTION_STANDARD is set. 6467 /// 6468 CEF_SCHEME_OPTION_CORS_ENABLED = 1 << 4, 6469 6470 /// 6471 /// If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content- 6472 /// Security-Policy (CSP) checks. This value should not be set in most cases 6473 /// where CEF_SCHEME_OPTION_STANDARD is set. 6474 /// 6475 CEF_SCHEME_OPTION_CSP_BYPASSING = 1 << 5, 6476 6477 /// 6478 /// If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API 6479 /// requests. 6480 /// 6481 CEF_SCHEME_OPTION_FETCH_ENABLED = 1 << 6 6482 } 6483 6484 alias CEF_SCHEME_OPTION_NONE = cef_scheme_options_t.CEF_SCHEME_OPTION_NONE; 6485 alias CEF_SCHEME_OPTION_STANDARD = cef_scheme_options_t.CEF_SCHEME_OPTION_STANDARD; 6486 alias CEF_SCHEME_OPTION_LOCAL = cef_scheme_options_t.CEF_SCHEME_OPTION_LOCAL; 6487 alias CEF_SCHEME_OPTION_DISPLAY_ISOLATED = cef_scheme_options_t.CEF_SCHEME_OPTION_DISPLAY_ISOLATED; 6488 alias CEF_SCHEME_OPTION_SECURE = cef_scheme_options_t.CEF_SCHEME_OPTION_SECURE; 6489 alias CEF_SCHEME_OPTION_CORS_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_CORS_ENABLED; 6490 alias CEF_SCHEME_OPTION_CSP_BYPASSING = cef_scheme_options_t.CEF_SCHEME_OPTION_CSP_BYPASSING; 6491 alias CEF_SCHEME_OPTION_FETCH_ENABLED = cef_scheme_options_t.CEF_SCHEME_OPTION_FETCH_ENABLED; 6492 6493 /// 6494 /// Structure representing a range. 6495 /// 6496 struct cef_range_t 6497 { 6498 uint from; 6499 uint to; 6500 } 6501 6502 6503 6504 /// 6505 /// Composition underline style. 6506 /// 6507 enum cef_composition_underline_style_t 6508 { 6509 CEF_CUS_SOLID = 0, 6510 CEF_CUS_DOT = 1, 6511 CEF_CUS_DASH = 2, 6512 CEF_CUS_NONE = 3 6513 } 6514 6515 alias CEF_CUS_SOLID = cef_composition_underline_style_t.CEF_CUS_SOLID; 6516 alias CEF_CUS_DOT = cef_composition_underline_style_t.CEF_CUS_DOT; 6517 alias CEF_CUS_DASH = cef_composition_underline_style_t.CEF_CUS_DASH; 6518 alias CEF_CUS_NONE = cef_composition_underline_style_t.CEF_CUS_NONE; 6519 6520 /// 6521 /// Structure representing IME composition underline information. This is a thin 6522 /// wrapper around Blink's WebCompositionUnderline class and should be kept in 6523 /// sync with that. 6524 /// 6525 struct cef_composition_underline_t 6526 { 6527 /// 6528 /// Underline character range. 6529 /// 6530 cef_range_t range; 6531 6532 /// 6533 /// Text color. 6534 /// 6535 cef_color_t color; 6536 6537 /// 6538 /// Background color. 6539 /// 6540 cef_color_t background_color; 6541 6542 /// 6543 /// Set to true (1) for thick underline. 6544 /// 6545 int thick; 6546 6547 /// 6548 /// Style. 6549 /// 6550 cef_composition_underline_style_t style; 6551 } 6552 6553 6554 6555 /// 6556 /// Enumerates the various representations of the ordering of audio channels. 6557 /// Must be kept synchronized with media::ChannelLayout from Chromium. 6558 /// See media\base\channel_layout.h 6559 /// 6560 enum cef_channel_layout_t 6561 { 6562 CEF_CHANNEL_LAYOUT_NONE = 0, 6563 CEF_CHANNEL_LAYOUT_UNSUPPORTED = 1, 6564 6565 /// Front C 6566 CEF_CHANNEL_LAYOUT_MONO = 2, 6567 6568 /// Front L, Front R 6569 CEF_CHANNEL_LAYOUT_STEREO = 3, 6570 6571 /// Front L, Front R, Back C 6572 CEF_CHANNEL_LAYOUT_2_1 = 4, 6573 6574 /// Front L, Front R, Front C 6575 CEF_CHANNEL_LAYOUT_SURROUND = 5, 6576 6577 /// Front L, Front R, Front C, Back C 6578 CEF_CHANNEL_LAYOUT_4_0 = 6, 6579 6580 /// Front L, Front R, Side L, Side R 6581 CEF_CHANNEL_LAYOUT_2_2 = 7, 6582 6583 /// Front L, Front R, Back L, Back R 6584 CEF_CHANNEL_LAYOUT_QUAD = 8, 6585 6586 /// Front L, Front R, Front C, Side L, Side R 6587 CEF_CHANNEL_LAYOUT_5_0 = 9, 6588 6589 /// Front L, Front R, Front C, LFE, Side L, Side R 6590 CEF_CHANNEL_LAYOUT_5_1 = 10, 6591 6592 /// Front L, Front R, Front C, Back L, Back R 6593 CEF_CHANNEL_LAYOUT_5_0_BACK = 11, 6594 6595 /// Front L, Front R, Front C, LFE, Back L, Back R 6596 CEF_CHANNEL_LAYOUT_5_1_BACK = 12, 6597 6598 /// Front L, Front R, Front C, Side L, Side R, Back L, Back R 6599 CEF_CHANNEL_LAYOUT_7_0 = 13, 6600 6601 /// Front L, Front R, Front C, LFE, Side L, Side R, Back L, Back R 6602 CEF_CHANNEL_LAYOUT_7_1 = 14, 6603 6604 /// Front L, Front R, Front C, LFE, Side L, Side R, Front LofC, Front RofC 6605 CEF_CHANNEL_LAYOUT_7_1_WIDE = 15, 6606 6607 /// Stereo L, Stereo R 6608 CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = 16, 6609 6610 /// Stereo L, Stereo R, LFE 6611 CEF_CHANNEL_LAYOUT_2POINT1 = 17, 6612 6613 /// Stereo L, Stereo R, Front C, LFE 6614 CEF_CHANNEL_LAYOUT_3_1 = 18, 6615 6616 /// Stereo L, Stereo R, Front C, Rear C, LFE 6617 CEF_CHANNEL_LAYOUT_4_1 = 19, 6618 6619 /// Stereo L, Stereo R, Front C, Side L, Side R, Back C 6620 CEF_CHANNEL_LAYOUT_6_0 = 20, 6621 6622 /// Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC 6623 CEF_CHANNEL_LAYOUT_6_0_FRONT = 21, 6624 6625 /// Stereo L, Stereo R, Front C, Rear L, Rear R, Rear C 6626 CEF_CHANNEL_LAYOUT_HEXAGONAL = 22, 6627 6628 /// Stereo L, Stereo R, Front C, LFE, Side L, Side R, Rear Center 6629 CEF_CHANNEL_LAYOUT_6_1 = 23, 6630 6631 /// Stereo L, Stereo R, Front C, LFE, Back L, Back R, Rear Center 6632 CEF_CHANNEL_LAYOUT_6_1_BACK = 24, 6633 6634 /// Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC, LFE 6635 CEF_CHANNEL_LAYOUT_6_1_FRONT = 25, 6636 6637 /// Front L, Front R, Front C, Side L, Side R, Front LofC, Front RofC 6638 CEF_CHANNEL_LAYOUT_7_0_FRONT = 26, 6639 6640 /// Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC 6641 CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = 27, 6642 6643 /// Front L, Front R, Front C, Side L, Side R, Rear L, Back R, Back C. 6644 CEF_CHANNEL_LAYOUT_OCTAGONAL = 28, 6645 6646 /// Channels are not explicitly mapped to speakers. 6647 CEF_CHANNEL_LAYOUT_DISCRETE = 29, 6648 6649 /// Front L, Front R, Front C. Front C contains the keyboard mic audio. This 6650 /// layout is only intended for input for WebRTC. The Front C channel 6651 /// is stripped away in the WebRTC audio input pipeline and never seen outside 6652 /// of that. 6653 CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30, 6654 6655 /// Front L, Front R, Side L, Side R, LFE 6656 CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31, 6657 6658 /// Actual channel layout is specified in the bitstream and the actual channel 6659 /// count is unknown at Chromium media pipeline level (useful for audio 6660 /// pass-through mode). 6661 CEF_CHANNEL_LAYOUT_BITSTREAM = 32, 6662 6663 /// Front L, Front R, Front C, LFE, Side L, Side R, 6664 /// Front Height L, Front Height R, Rear Height L, Rear Height R 6665 /// Will be represented as six channels (5.1) due to eight channel limit 6666 /// kMaxConcurrentChannels 6667 CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = 33, 6668 6669 /// Max value, must always equal the largest entry ever logged. 6670 CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX 6671 } 6672 6673 alias CEF_CHANNEL_LAYOUT_NONE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_NONE; 6674 alias CEF_CHANNEL_LAYOUT_UNSUPPORTED = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_UNSUPPORTED; 6675 alias CEF_CHANNEL_LAYOUT_MONO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_MONO; 6676 alias CEF_CHANNEL_LAYOUT_STEREO = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO; 6677 alias CEF_CHANNEL_LAYOUT_2_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_1; 6678 alias CEF_CHANNEL_LAYOUT_SURROUND = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_SURROUND; 6679 alias CEF_CHANNEL_LAYOUT_4_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_0; 6680 alias CEF_CHANNEL_LAYOUT_2_2 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2_2; 6681 alias CEF_CHANNEL_LAYOUT_QUAD = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_QUAD; 6682 alias CEF_CHANNEL_LAYOUT_5_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0; 6683 alias CEF_CHANNEL_LAYOUT_5_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1; 6684 alias CEF_CHANNEL_LAYOUT_5_0_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_0_BACK; 6685 alias CEF_CHANNEL_LAYOUT_5_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_BACK; 6686 alias CEF_CHANNEL_LAYOUT_7_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0; 6687 alias CEF_CHANNEL_LAYOUT_7_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1; 6688 alias CEF_CHANNEL_LAYOUT_7_1_WIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE; 6689 alias CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX; 6690 alias CEF_CHANNEL_LAYOUT_2POINT1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_2POINT1; 6691 alias CEF_CHANNEL_LAYOUT_3_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_3_1; 6692 alias CEF_CHANNEL_LAYOUT_4_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1; 6693 alias CEF_CHANNEL_LAYOUT_6_0 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0; 6694 alias CEF_CHANNEL_LAYOUT_6_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_0_FRONT; 6695 alias CEF_CHANNEL_LAYOUT_HEXAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_HEXAGONAL; 6696 alias CEF_CHANNEL_LAYOUT_6_1 = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1; 6697 alias CEF_CHANNEL_LAYOUT_6_1_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_BACK; 6698 alias CEF_CHANNEL_LAYOUT_6_1_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_6_1_FRONT; 6699 alias CEF_CHANNEL_LAYOUT_7_0_FRONT = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_0_FRONT; 6700 alias CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK; 6701 alias CEF_CHANNEL_LAYOUT_OCTAGONAL = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_OCTAGONAL; 6702 alias CEF_CHANNEL_LAYOUT_DISCRETE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_DISCRETE; 6703 alias CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC; 6704 alias CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE; 6705 alias CEF_CHANNEL_LAYOUT_BITSTREAM = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_BITSTREAM; 6706 alias CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX; 6707 alias CEF_CHANNEL_LAYOUT_MAX = cef_channel_layout_t.CEF_CHANNEL_LAYOUT_MAX; 6708 6709 /// 6710 /// Structure representing the audio parameters for setting up the audio 6711 /// handler. 6712 /// 6713 struct cef_audio_parameters_t 6714 { 6715 /// 6716 /// Layout of the audio channels 6717 /// 6718 cef_channel_layout_t channel_layout; 6719 6720 /// 6721 /// Sample rate 6722 // 6723 int sample_rate; 6724 6725 /// 6726 /// Number of frames per buffer 6727 /// 6728 int frames_per_buffer; 6729 } 6730 6731 6732 6733 /// 6734 /// Result codes for CefMediaRouter::CreateRoute. Should be kept in sync with 6735 /// Chromium's media_router::mojom::RouteRequestResultCode type. 6736 /// 6737 enum cef_media_route_create_result_t 6738 { 6739 CEF_MRCR_UNKNOWN_ERROR = 0, 6740 CEF_MRCR_OK = 1, 6741 CEF_MRCR_TIMED_OUT = 2, 6742 CEF_MRCR_ROUTE_NOT_FOUND = 3, 6743 CEF_MRCR_SINK_NOT_FOUND = 4, 6744 CEF_MRCR_INVALID_ORIGIN = 5, 6745 CEF_MRCR_NO_SUPPORTED_PROVIDER = 7, 6746 CEF_MRCR_CANCELLED = 8, 6747 CEF_MRCR_ROUTE_ALREADY_EXISTS = 9, 6748 CEF_MRCR_ROUTE_ALREADY_TERMINATED = 11 6749 } 6750 6751 alias CEF_MRCR_UNKNOWN_ERROR = cef_media_route_create_result_t.CEF_MRCR_UNKNOWN_ERROR; 6752 alias CEF_MRCR_OK = cef_media_route_create_result_t.CEF_MRCR_OK; 6753 alias CEF_MRCR_TIMED_OUT = cef_media_route_create_result_t.CEF_MRCR_TIMED_OUT; 6754 alias CEF_MRCR_ROUTE_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_ROUTE_NOT_FOUND; 6755 alias CEF_MRCR_SINK_NOT_FOUND = cef_media_route_create_result_t.CEF_MRCR_SINK_NOT_FOUND; 6756 alias CEF_MRCR_INVALID_ORIGIN = cef_media_route_create_result_t.CEF_MRCR_INVALID_ORIGIN; 6757 alias CEF_MRCR_NO_SUPPORTED_PROVIDER = cef_media_route_create_result_t.CEF_MRCR_NO_SUPPORTED_PROVIDER; 6758 alias CEF_MRCR_CANCELLED = cef_media_route_create_result_t.CEF_MRCR_CANCELLED; 6759 alias CEF_MRCR_ROUTE_ALREADY_EXISTS = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_EXISTS; 6760 alias CEF_MRCR_ROUTE_ALREADY_TERMINATED = cef_media_route_create_result_t.CEF_MRCR_ROUTE_ALREADY_TERMINATED; 6761 6762 /// 6763 /// Connection state for a MediaRoute object. 6764 /// 6765 enum cef_media_route_connection_state_t 6766 { 6767 CEF_MRCS_UNKNOWN = 0, 6768 CEF_MRCS_CONNECTING = 1, 6769 CEF_MRCS_CONNECTED = 2, 6770 CEF_MRCS_CLOSED = 3, 6771 CEF_MRCS_TERMINATED = 4 6772 } 6773 6774 alias CEF_MRCS_UNKNOWN = cef_media_route_connection_state_t.CEF_MRCS_UNKNOWN; 6775 alias CEF_MRCS_CONNECTING = cef_media_route_connection_state_t.CEF_MRCS_CONNECTING; 6776 alias CEF_MRCS_CONNECTED = cef_media_route_connection_state_t.CEF_MRCS_CONNECTED; 6777 alias CEF_MRCS_CLOSED = cef_media_route_connection_state_t.CEF_MRCS_CLOSED; 6778 alias CEF_MRCS_TERMINATED = cef_media_route_connection_state_t.CEF_MRCS_TERMINATED; 6779 6780 /// 6781 /// Icon types for a MediaSink object. Should be kept in sync with Chromium's 6782 /// media_router::SinkIconType type. 6783 /// 6784 enum cef_media_sink_icon_type_t 6785 { 6786 CEF_MSIT_CAST = 0, 6787 CEF_MSIT_CAST_AUDIO_GROUP = 1, 6788 CEF_MSIT_CAST_AUDIO = 2, 6789 CEF_MSIT_MEETING = 3, 6790 CEF_MSIT_HANGOUT = 4, 6791 CEF_MSIT_EDUCATION = 5, 6792 CEF_MSIT_WIRED_DISPLAY = 6, 6793 CEF_MSIT_GENERIC = 7, 6794 6795 CEF_MSIT_TOTAL_COUNT = 8 // The total number of values. 6796 } 6797 6798 alias CEF_MSIT_CAST = cef_media_sink_icon_type_t.CEF_MSIT_CAST; 6799 alias CEF_MSIT_CAST_AUDIO_GROUP = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO_GROUP; 6800 alias CEF_MSIT_CAST_AUDIO = cef_media_sink_icon_type_t.CEF_MSIT_CAST_AUDIO; 6801 alias CEF_MSIT_MEETING = cef_media_sink_icon_type_t.CEF_MSIT_MEETING; 6802 alias CEF_MSIT_HANGOUT = cef_media_sink_icon_type_t.CEF_MSIT_HANGOUT; 6803 alias CEF_MSIT_EDUCATION = cef_media_sink_icon_type_t.CEF_MSIT_EDUCATION; 6804 alias CEF_MSIT_WIRED_DISPLAY = cef_media_sink_icon_type_t.CEF_MSIT_WIRED_DISPLAY; 6805 alias CEF_MSIT_GENERIC = cef_media_sink_icon_type_t.CEF_MSIT_GENERIC; 6806 alias CEF_MSIT_TOTAL_COUNT = cef_media_sink_icon_type_t.CEF_MSIT_TOTAL_COUNT; 6807 6808 /// 6809 /// Device information for a MediaSink object. 6810 /// 6811 struct cef_media_sink_device_info_t 6812 { 6813 cef_string_t ip_address; 6814 int port; 6815 cef_string_t model_name; 6816 } 6817 6818 6819 6820 /// 6821 /// Represents commands available to TextField. 6822 /// 6823 enum cef_text_field_commands_t 6824 { 6825 CEF_TFC_CUT = 1, 6826 CEF_TFC_COPY = 2, 6827 CEF_TFC_PASTE = 3, 6828 CEF_TFC_UNDO = 4, 6829 CEF_TFC_DELETE = 5, 6830 CEF_TFC_SELECT_ALL = 6 6831 } 6832 6833 alias CEF_TFC_CUT = cef_text_field_commands_t.CEF_TFC_CUT; 6834 alias CEF_TFC_COPY = cef_text_field_commands_t.CEF_TFC_COPY; 6835 alias CEF_TFC_PASTE = cef_text_field_commands_t.CEF_TFC_PASTE; 6836 alias CEF_TFC_UNDO = cef_text_field_commands_t.CEF_TFC_UNDO; 6837 alias CEF_TFC_DELETE = cef_text_field_commands_t.CEF_TFC_DELETE; 6838 alias CEF_TFC_SELECT_ALL = cef_text_field_commands_t.CEF_TFC_SELECT_ALL; 6839 6840 /// 6841 /// Chrome toolbar types. 6842 /// 6843 enum cef_chrome_toolbar_type_t 6844 { 6845 CEF_CTT_NONE = 1, 6846 CEF_CTT_NORMAL = 2, 6847 CEF_CTT_LOCATION = 3 6848 } 6849 6850 alias CEF_CTT_NONE = cef_chrome_toolbar_type_t.CEF_CTT_NONE; 6851 alias CEF_CTT_NORMAL = cef_chrome_toolbar_type_t.CEF_CTT_NORMAL; 6852 alias CEF_CTT_LOCATION = cef_chrome_toolbar_type_t.CEF_CTT_LOCATION; 6853 6854 /// 6855 /// Chrome page action icon types. Should be kept in sync with Chromium's 6856 /// PageActionIconType type. 6857 /// 6858 enum cef_chrome_page_action_icon_type_t 6859 { 6860 CEF_CPAIT_BOOKMARK_STAR = 0, 6861 CEF_CPAIT_CLICK_TO_CALL = 1, 6862 CEF_CPAIT_COOKIE_CONTROLS = 2, 6863 CEF_CPAIT_FILE_SYSTEM_ACCESS = 3, 6864 CEF_CPAIT_FIND = 4, 6865 CEF_CPAIT_HIGH_EFFICIENCY = 5, 6866 CEF_CPAIT_INTENT_PICKER = 6, 6867 CEF_CPAIT_LOCAL_CARD_MIGRATION = 7, 6868 CEF_CPAIT_MANAGE_PASSWORDS = 8, 6869 CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = 9, 6870 CEF_CPAIT_PRICE_TRACKING = 10, 6871 CEF_CPAIT_PWA_INSTALL = 11, 6872 CEF_CPAIT_QR_CODE_GENERATOR = 12, 6873 CEF_CPAIT_READER_MODE = 13, 6874 CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = 14, 6875 CEF_CPAIT_SAVE_CARD = 15, 6876 CEF_CPAIT_SEND_TAB_TO_SELF = 16, 6877 CEF_CPAIT_SHARING_HUB = 17, 6878 CEF_CPAIT_SIDE_SEARCH = 18, 6879 CEF_CPAIT_SMS_REMOTE_FETCHER = 19, 6880 CEF_CPAIT_TRANSLATE = 20, 6881 CEF_CPAIT_VIRTUAL_CARD_ENROLL = 21, 6882 CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK = 22, 6883 CEF_CPAIT_ZOOM = 23, 6884 CEF_CPAIT_SAVE_IBAN = 24, 6885 CEF_CPAIT_MANDATORY_REAUTH = 25, 6886 CEF_CPAIT_PRICE_INSIGHTS = 26, 6887 CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRICE_INSIGHTS 6888 } 6889 6890 alias CEF_CPAIT_BOOKMARK_STAR = cef_chrome_page_action_icon_type_t.CEF_CPAIT_BOOKMARK_STAR; 6891 alias CEF_CPAIT_CLICK_TO_CALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_CLICK_TO_CALL; 6892 alias CEF_CPAIT_COOKIE_CONTROLS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_COOKIE_CONTROLS; 6893 alias CEF_CPAIT_FILE_SYSTEM_ACCESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FILE_SYSTEM_ACCESS; 6894 alias CEF_CPAIT_FIND = cef_chrome_page_action_icon_type_t.CEF_CPAIT_FIND; 6895 alias CEF_CPAIT_HIGH_EFFICIENCY = cef_chrome_page_action_icon_type_t.CEF_CPAIT_HIGH_EFFICIENCY; 6896 alias CEF_CPAIT_INTENT_PICKER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_INTENT_PICKER; 6897 alias CEF_CPAIT_LOCAL_CARD_MIGRATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_LOCAL_CARD_MIGRATION; 6898 alias CEF_CPAIT_MANAGE_PASSWORDS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANAGE_PASSWORDS; 6899 alias CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION; 6900 alias CEF_CPAIT_PRICE_TRACKING = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_TRACKING; 6901 alias CEF_CPAIT_PWA_INSTALL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PWA_INSTALL; 6902 alias CEF_CPAIT_QR_CODE_GENERATOR = cef_chrome_page_action_icon_type_t.CEF_CPAIT_QR_CODE_GENERATOR; 6903 alias CEF_CPAIT_READER_MODE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_READER_MODE; 6904 alias CEF_CPAIT_SAVE_AUTOFILL_ADDRESS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_AUTOFILL_ADDRESS; 6905 alias CEF_CPAIT_SAVE_CARD = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_CARD; 6906 alias CEF_CPAIT_SEND_TAB_TO_SELF = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SEND_TAB_TO_SELF; 6907 alias CEF_CPAIT_SHARING_HUB = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SHARING_HUB; 6908 alias CEF_CPAIT_SIDE_SEARCH = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SIDE_SEARCH; 6909 alias CEF_CPAIT_SMS_REMOTE_FETCHER = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SMS_REMOTE_FETCHER; 6910 alias CEF_CPAIT_TRANSLATE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_TRANSLATE; 6911 alias CEF_CPAIT_VIRTUAL_CARD_ENROLL = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_ENROLL; 6912 alias CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK = cef_chrome_page_action_icon_type_t.CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK; 6913 alias CEF_CPAIT_ZOOM = cef_chrome_page_action_icon_type_t.CEF_CPAIT_ZOOM; 6914 alias CEF_CPAIT_SAVE_IBAN = cef_chrome_page_action_icon_type_t.CEF_CPAIT_SAVE_IBAN; 6915 alias CEF_CPAIT_MANDATORY_REAUTH = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MANDATORY_REAUTH; 6916 alias CEF_CPAIT_PRICE_INSIGHTS = cef_chrome_page_action_icon_type_t.CEF_CPAIT_PRICE_INSIGHTS; 6917 alias CEF_CPAIT_MAX_VALUE = cef_chrome_page_action_icon_type_t.CEF_CPAIT_MAX_VALUE; 6918 6919 /// 6920 /// Chrome toolbar button types. Should be kept in sync with CEF's internal 6921 /// ToolbarButtonType type. 6922 /// 6923 enum cef_chrome_toolbar_button_type_t 6924 { 6925 CEF_CTBT_CAST = 0, 6926 CEF_CTBT_DOWNLOAD = 1, 6927 CEF_CTBT_SEND_TAB_TO_SELF = 2, 6928 CEF_CTBT_SIDE_PANEL = 3, 6929 CEF_CTBT_MAX_VALUE = CEF_CTBT_SIDE_PANEL 6930 } 6931 6932 alias CEF_CTBT_CAST = cef_chrome_toolbar_button_type_t.CEF_CTBT_CAST; 6933 alias CEF_CTBT_DOWNLOAD = cef_chrome_toolbar_button_type_t.CEF_CTBT_DOWNLOAD; 6934 alias CEF_CTBT_SEND_TAB_TO_SELF = cef_chrome_toolbar_button_type_t.CEF_CTBT_SEND_TAB_TO_SELF; 6935 alias CEF_CTBT_SIDE_PANEL = cef_chrome_toolbar_button_type_t.CEF_CTBT_SIDE_PANEL; 6936 alias CEF_CTBT_MAX_VALUE = cef_chrome_toolbar_button_type_t.CEF_CTBT_MAX_VALUE; 6937 6938 /// 6939 /// Docking modes supported by CefWindow::AddOverlay. 6940 /// 6941 enum cef_docking_mode_t 6942 { 6943 CEF_DOCKING_MODE_TOP_LEFT = 1, 6944 CEF_DOCKING_MODE_TOP_RIGHT = 2, 6945 CEF_DOCKING_MODE_BOTTOM_LEFT = 3, 6946 CEF_DOCKING_MODE_BOTTOM_RIGHT = 4, 6947 CEF_DOCKING_MODE_CUSTOM = 5 6948 } 6949 6950 alias CEF_DOCKING_MODE_TOP_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_LEFT; 6951 alias CEF_DOCKING_MODE_TOP_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_TOP_RIGHT; 6952 alias CEF_DOCKING_MODE_BOTTOM_LEFT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_LEFT; 6953 alias CEF_DOCKING_MODE_BOTTOM_RIGHT = cef_docking_mode_t.CEF_DOCKING_MODE_BOTTOM_RIGHT; 6954 alias CEF_DOCKING_MODE_CUSTOM = cef_docking_mode_t.CEF_DOCKING_MODE_CUSTOM; 6955 6956 /// 6957 /// Show states supported by CefWindowDelegate::GetInitialShowState. 6958 /// 6959 enum cef_show_state_t 6960 { 6961 CEF_SHOW_STATE_NORMAL = 1, 6962 CEF_SHOW_STATE_MINIMIZED = 2, 6963 CEF_SHOW_STATE_MAXIMIZED = 3, 6964 CEF_SHOW_STATE_FULLSCREEN = 4 6965 } 6966 6967 alias CEF_SHOW_STATE_NORMAL = cef_show_state_t.CEF_SHOW_STATE_NORMAL; 6968 alias CEF_SHOW_STATE_MINIMIZED = cef_show_state_t.CEF_SHOW_STATE_MINIMIZED; 6969 alias CEF_SHOW_STATE_MAXIMIZED = cef_show_state_t.CEF_SHOW_STATE_MAXIMIZED; 6970 alias CEF_SHOW_STATE_FULLSCREEN = cef_show_state_t.CEF_SHOW_STATE_FULLSCREEN; 6971 6972 /// 6973 /// Values indicating what state of the touch handle is set. 6974 /// 6975 enum cef_touch_handle_state_flags_t 6976 { 6977 CEF_THS_FLAG_NONE = 0, 6978 CEF_THS_FLAG_ENABLED = 1 << 0, 6979 CEF_THS_FLAG_ORIENTATION = 1 << 1, 6980 CEF_THS_FLAG_ORIGIN = 1 << 2, 6981 CEF_THS_FLAG_ALPHA = 1 << 3 6982 } 6983 6984 alias CEF_THS_FLAG_NONE = cef_touch_handle_state_flags_t.CEF_THS_FLAG_NONE; 6985 alias CEF_THS_FLAG_ENABLED = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ENABLED; 6986 alias CEF_THS_FLAG_ORIENTATION = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIENTATION; 6987 alias CEF_THS_FLAG_ORIGIN = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ORIGIN; 6988 alias CEF_THS_FLAG_ALPHA = cef_touch_handle_state_flags_t.CEF_THS_FLAG_ALPHA; 6989 6990 struct cef_touch_handle_state_t 6991 { 6992 /// 6993 /// Touch handle id. Increments for each new touch handle. 6994 /// 6995 int touch_handle_id; 6996 6997 /// 6998 /// Combination of cef_touch_handle_state_flags_t values indicating what state 6999 /// is set. 7000 /// 7001 uint flags; 7002 7003 /// 7004 /// Enabled state. Only set if |flags| contains CEF_THS_FLAG_ENABLED. 7005 /// 7006 int enabled; 7007 7008 /// 7009 /// Orientation state. Only set if |flags| contains CEF_THS_FLAG_ORIENTATION. 7010 /// 7011 cef_horizontal_alignment_t orientation; 7012 int mirror_vertical; 7013 int mirror_horizontal; 7014 7015 /// 7016 /// Origin state. Only set if |flags| contains CEF_THS_FLAG_ORIGIN. 7017 /// 7018 cef_point_t origin; 7019 7020 /// 7021 /// Alpha state. Only set if |flags| contains CEF_THS_FLAG_ALPHA. 7022 /// 7023 float alpha; 7024 } 7025 7026 7027 7028 /// 7029 /// Media access permissions used by OnRequestMediaAccessPermission. 7030 /// 7031 enum cef_media_access_permission_types_t 7032 { 7033 /// 7034 /// No permission. 7035 /// 7036 CEF_MEDIA_PERMISSION_NONE = 0, 7037 7038 /// 7039 /// Device audio capture permission. 7040 /// 7041 CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = 1 << 0, 7042 7043 /// 7044 /// Device video capture permission. 7045 /// 7046 CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = 1 << 1, 7047 7048 /// 7049 /// Desktop audio capture permission. 7050 /// 7051 CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = 1 << 2, 7052 7053 /// 7054 /// Desktop video capture permission. 7055 /// 7056 CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = 1 << 3 7057 } 7058 7059 alias CEF_MEDIA_PERMISSION_NONE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_NONE; 7060 alias CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE; 7061 alias CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE; 7062 alias CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_AUDIO_CAPTURE; 7063 alias CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE = cef_media_access_permission_types_t.CEF_MEDIA_PERMISSION_DESKTOP_VIDEO_CAPTURE; 7064 7065 /// 7066 /// Permission types used with OnShowPermissionPrompt. Some types are 7067 /// platform-specific or only supported with the Chrome runtime. Should be kept 7068 /// in sync with Chromium's permissions::RequestType type. 7069 /// 7070 enum cef_permission_request_types_t 7071 { 7072 CEF_PERMISSION_TYPE_NONE = 0, 7073 CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS = 1 << 0, 7074 CEF_PERMISSION_TYPE_AR_SESSION = 1 << 1, 7075 CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 2, 7076 CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 3, 7077 CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 4, 7078 CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 5, 7079 CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 6, 7080 CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 7, 7081 CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8, 7082 CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 9, 7083 CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 10, 7084 CEF_PERMISSION_TYPE_MIDI = 1 << 11, 7085 CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 12, 7086 CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 13, 7087 CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 14, 7088 CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 15, 7089 CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 16, 7090 CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 17, 7091 CEF_PERMISSION_TYPE_VR_SESSION = 1 << 18, 7092 CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 19 7093 } 7094 7095 alias CEF_PERMISSION_TYPE_NONE = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NONE; 7096 alias CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS; 7097 alias CEF_PERMISSION_TYPE_AR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_AR_SESSION; 7098 alias CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM; 7099 alias CEF_PERMISSION_TYPE_CAMERA_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CAMERA_STREAM; 7100 alias CEF_PERMISSION_TYPE_CLIPBOARD = cef_permission_request_types_t.CEF_PERMISSION_TYPE_CLIPBOARD; 7101 alias CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS; 7102 alias CEF_PERMISSION_TYPE_DISK_QUOTA = cef_permission_request_types_t.CEF_PERMISSION_TYPE_DISK_QUOTA; 7103 alias CEF_PERMISSION_TYPE_LOCAL_FONTS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_LOCAL_FONTS; 7104 alias CEF_PERMISSION_TYPE_GEOLOCATION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_GEOLOCATION; 7105 alias CEF_PERMISSION_TYPE_IDLE_DETECTION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_IDLE_DETECTION; 7106 alias CEF_PERMISSION_TYPE_MIC_STREAM = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIC_STREAM; 7107 alias CEF_PERMISSION_TYPE_MIDI = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIDI; 7108 alias CEF_PERMISSION_TYPE_MIDI_SYSEX = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MIDI_SYSEX; 7109 alias CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS; 7110 alias CEF_PERMISSION_TYPE_NOTIFICATIONS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_NOTIFICATIONS; 7111 alias CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER; 7112 alias CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = cef_permission_request_types_t.CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER; 7113 alias CEF_PERMISSION_TYPE_STORAGE_ACCESS = cef_permission_request_types_t.CEF_PERMISSION_TYPE_STORAGE_ACCESS; 7114 alias CEF_PERMISSION_TYPE_VR_SESSION = cef_permission_request_types_t.CEF_PERMISSION_TYPE_VR_SESSION; 7115 alias CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = cef_permission_request_types_t.CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT; 7116 7117 /// 7118 /// Permission request results. 7119 /// 7120 enum cef_permission_request_result_t 7121 { 7122 /// 7123 /// Accept the permission request as an explicit user action. 7124 /// 7125 CEF_PERMISSION_RESULT_ACCEPT = 0, 7126 7127 /// 7128 /// Deny the permission request as an explicit user action. 7129 /// 7130 CEF_PERMISSION_RESULT_DENY = 1, 7131 7132 /// 7133 /// Dismiss the permission request as an explicit user action. 7134 /// 7135 CEF_PERMISSION_RESULT_DISMISS = 2, 7136 7137 /// 7138 /// Ignore the permission request. If the prompt remains unhandled (e.g. 7139 /// OnShowPermissionPrompt returns false and there is no default permissions 7140 /// UI) then any related promises may remain unresolved. 7141 /// 7142 CEF_PERMISSION_RESULT_IGNORE = 3 7143 } 7144 7145 alias CEF_PERMISSION_RESULT_ACCEPT = cef_permission_request_result_t.CEF_PERMISSION_RESULT_ACCEPT; 7146 alias CEF_PERMISSION_RESULT_DENY = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DENY; 7147 alias CEF_PERMISSION_RESULT_DISMISS = cef_permission_request_result_t.CEF_PERMISSION_RESULT_DISMISS; 7148 alias CEF_PERMISSION_RESULT_IGNORE = cef_permission_request_result_t.CEF_PERMISSION_RESULT_IGNORE; 7149 7150 /// 7151 /// Certificate types supported by CefTestServer::CreateAndStart. The matching 7152 /// certificate file must exist in the "net/data/ssl/certificates" directory. 7153 /// See CefSetDataDirectoryForTests() for related configuration. 7154 /// 7155 enum cef_test_cert_type_t 7156 { 7157 /// Valid certificate using the IP (127.0.0.1). Loads the "ok_cert.pem" file. 7158 CEF_TEST_CERT_OK_IP = 0, 7159 7160 /// Valid certificate using the domain ("localhost"). Loads the 7161 /// "localhost_cert.pem" file. 7162 CEF_TEST_CERT_OK_DOMAIN = 1, 7163 7164 /// Expired certificate. Loads the "expired_cert.pem" file. 7165 CEF_TEST_CERT_EXPIRED = 2 7166 } 7167 7168 alias CEF_TEST_CERT_OK_IP = cef_test_cert_type_t.CEF_TEST_CERT_OK_IP; 7169 alias CEF_TEST_CERT_OK_DOMAIN = cef_test_cert_type_t.CEF_TEST_CERT_OK_DOMAIN; 7170 alias CEF_TEST_CERT_EXPIRED = cef_test_cert_type_t.CEF_TEST_CERT_EXPIRED; 7171 7172 /// 7173 /// Preferences type passed to 7174 /// CefBrowserProcessHandler::OnRegisterCustomPreferences. 7175 /// 7176 enum cef_preferences_type_t 7177 { 7178 /// Global preferences registered a single time at application startup. 7179 CEF_PREFERENCES_TYPE_GLOBAL = 0, 7180 7181 /// Request context preferences registered each time a new CefRequestContext 7182 /// is created. 7183 CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = 1 7184 } 7185 7186 alias CEF_PREFERENCES_TYPE_GLOBAL = cef_preferences_type_t.CEF_PREFERENCES_TYPE_GLOBAL; 7187 alias CEF_PREFERENCES_TYPE_REQUEST_CONTEXT = cef_preferences_type_t.CEF_PREFERENCES_TYPE_REQUEST_CONTEXT; 7188 7189 /// 7190 /// Download interrupt reasons. Should be kept in sync with 7191 /// Chromium's download::DownloadInterruptReason type. 7192 /// 7193 enum cef_download_interrupt_reason_t 7194 { 7195 CEF_DOWNLOAD_INTERRUPT_REASON_NONE = 0, 7196 7197 /// Generic file operation failure. 7198 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = 1, 7199 7200 /// The file cannot be accessed due to security restrictions. 7201 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = 2, 7202 7203 /// There is not enough room on the drive. 7204 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = 3, 7205 7206 /// The directory or file name is too long. 7207 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = 5, 7208 7209 /// The file is too large for the file system to handle. 7210 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = 6, 7211 7212 /// The file contains a virus. 7213 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = 7, 7214 7215 /// The file was in use. Too many files are opened at once. We have run out of 7216 /// memory. 7217 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = 10, 7218 7219 /// The file was blocked due to local policy. 7220 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = 11, 7221 7222 /// An attempt to check the safety of the download failed due to unexpected 7223 /// reasons. See http://crbug.com/153212. 7224 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = 12, 7225 7226 /// An attempt was made to seek past the end of a file in opening 7227 /// a file (as part of resuming a previously interrupted download). 7228 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = 13, 7229 7230 /// The partial file didn't match the expected hash. 7231 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = 14, 7232 7233 /// The source and the target of the download were the same. 7234 CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = 15, 7235 7236 // Network errors. 7237 7238 /// Generic network failure. 7239 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = 20, 7240 7241 /// The network operation timed out. 7242 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = 21, 7243 7244 /// The network connection has been lost. 7245 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = 22, 7246 7247 /// The server has gone down. 7248 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = 23, 7249 7250 /// The network request was invalid. This may be due to the original URL or a 7251 /// redirected URL: 7252 /// - Having an unsupported scheme. 7253 /// - Being an invalid URL. 7254 /// - Being disallowed by policy. 7255 CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = 24, 7256 7257 // Server responses. 7258 7259 /// The server indicates that the operation has failed (generic). 7260 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = 30, 7261 7262 /// The server does not support range requests. 7263 /// Internal use only: must restart from the beginning. 7264 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = 31, 7265 7266 /// The server does not have the requested data. 7267 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = 33, 7268 7269 /// Server didn't authorize access to resource. 7270 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = 34, 7271 7272 /// Server certificate problem. 7273 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = 35, 7274 7275 /// Server access forbidden. 7276 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = 36, 7277 7278 /// Unexpected server response. This might indicate that the responding server 7279 /// may not be the intended server. 7280 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = 37, 7281 7282 /// The server sent fewer bytes than the content-length header. It may 7283 /// indicate that the connection was closed prematurely, or the Content-Length 7284 /// header was invalid. The download is only interrupted if strong validators 7285 /// are present. Otherwise, it is treated as finished. 7286 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = 38, 7287 7288 /// An unexpected cross-origin redirect happened. 7289 CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = 39, 7290 7291 // User input. 7292 7293 /// The user canceled the download. 7294 CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = 40, 7295 7296 /// The user shut down the browser. 7297 /// Internal use only: resume pending downloads if possible. 7298 CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = 41, 7299 7300 // Crash. 7301 7302 /// The browser crashed. 7303 /// Internal use only: resume pending downloads if possible. 7304 CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = 50 7305 } 7306 7307 alias CEF_DOWNLOAD_INTERRUPT_REASON_NONE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NONE; 7308 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED; 7309 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED; 7310 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE; 7311 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG; 7312 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE; 7313 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_VIRUS_INFECTED; 7314 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR; 7315 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED; 7316 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED; 7317 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT; 7318 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH; 7319 alias CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE; 7320 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED; 7321 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT; 7322 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED; 7323 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN; 7324 alias CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST; 7325 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED; 7326 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE; 7327 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT; 7328 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED; 7329 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM; 7330 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN; 7331 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE; 7332 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH; 7333 alias CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT; 7334 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED; 7335 alias CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN; 7336 alias CEF_DOWNLOAD_INTERRUPT_REASON_CRASH = cef_download_interrupt_reason_t.CEF_DOWNLOAD_INTERRUPT_REASON_CRASH; 7337 7338 /// 7339 /// Specifies the gesture commands. 7340 /// 7341 enum cef_gesture_command_t 7342 { 7343 CEF_GESTURE_COMMAND_BACK = 0, 7344 CEF_GESTURE_COMMAND_FORWARD = 1 7345 } 7346 7347 alias CEF_GESTURE_COMMAND_BACK = cef_gesture_command_t.CEF_GESTURE_COMMAND_BACK; 7348 alias CEF_GESTURE_COMMAND_FORWARD = cef_gesture_command_t.CEF_GESTURE_COMMAND_FORWARD; 7349 7350 /// 7351 /// Specifies the zoom commands supported by CefBrowserHost::Zoom. 7352 /// 7353 enum cef_zoom_command_t 7354 { 7355 CEF_ZOOM_COMMAND_OUT = 0, 7356 CEF_ZOOM_COMMAND_RESET = 1, 7357 CEF_ZOOM_COMMAND_IN = 2 7358 } 7359 7360 alias CEF_ZOOM_COMMAND_OUT = cef_zoom_command_t.CEF_ZOOM_COMMAND_OUT; 7361 alias CEF_ZOOM_COMMAND_RESET = cef_zoom_command_t.CEF_ZOOM_COMMAND_RESET; 7362 alias CEF_ZOOM_COMMAND_IN = cef_zoom_command_t.CEF_ZOOM_COMMAND_IN; 7363 7364 // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_ 7365 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 7366 // 7367 // Redistribution and use in source and binary forms, with or without 7368 // modification, are permitted provided that the following conditions are 7369 // met: 7370 // 7371 // * Redistributions of source code must retain the above copyright 7372 // notice, this list of conditions and the following disclaimer. 7373 // * Redistributions in binary form must reproduce the above 7374 // copyright notice, this list of conditions and the following disclaimer 7375 // in the documentation and/or other materials provided with the 7376 // distribution. 7377 // * Neither the name of Google Inc. nor the name Chromium Embedded 7378 // Framework nor the names of its contributors may be used to endorse 7379 // or promote products derived from this software without specific prior 7380 // written permission. 7381 // 7382 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7383 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7384 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7385 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7386 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7387 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7388 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7389 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7390 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7391 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7392 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7393 // 7394 // --------------------------------------------------------------------------- 7395 // 7396 // This file was generated by the CEF translator tool and should not edited 7397 // by hand. See the translator.README.txt file in the tools directory for 7398 // more information. 7399 // 7400 // $hash=0ac3c8ca887778a840c65108d56038d4d776e073$ 7401 // 7402 7403 extern (C): 7404 7405 /// 7406 /// Implement this structure to receive accessibility notification when 7407 /// accessibility events have been registered. The functions of this structure 7408 /// will be called on the UI thread. 7409 /// 7410 struct cef_accessibility_handler_t 7411 { 7412 /// 7413 /// Base structure. 7414 /// 7415 7416 /// 7417 /// Called after renderer process sends accessibility tree changes to the 7418 /// browser process. 7419 /// 7420 7421 /// 7422 /// Called after renderer process sends accessibility location changes to the 7423 /// browser process. 7424 /// 7425 7426 // CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_ 7427 g 7428 cef_base_ref_counted_t base; 7429 extern(System) void function ( 7430 cef_accessibility_handler_t* self, 7431 cef_value_t* value) nothrow on_accessibility_tree_change; 7432 extern(System) void function ( 7433 cef_accessibility_handler_t* self, 7434 cef_value_t* value) nothrow on_accessibility_location_change; 7435 } 7436 7437 7438 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 7439 // 7440 // Redistribution and use in source and binary forms, with or without 7441 // modification, are permitted provided that the following conditions are 7442 // met: 7443 // 7444 // * Redistributions of source code must retain the above copyright 7445 // notice, this list of conditions and the following disclaimer. 7446 // * Redistributions in binary form must reproduce the above 7447 // copyright notice, this list of conditions and the following disclaimer 7448 // in the documentation and/or other materials provided with the 7449 // distribution. 7450 // * Neither the name of Google Inc. nor the name Chromium Embedded 7451 // Framework nor the names of its contributors may be used to endorse 7452 // or promote products derived from this software without specific prior 7453 // written permission. 7454 // 7455 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7456 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7457 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7458 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7459 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7460 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7461 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7462 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7463 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7464 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7465 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7466 // 7467 // --------------------------------------------------------------------------- 7468 // 7469 // This file was generated by the CEF translator tool and should not edited 7470 // by hand. See the translator.README.txt file in the tools directory for 7471 // more information. 7472 // 7473 // $hash=9b523fbf312a8a0cb1c743a3c8aca7bc9cc22bbc$ 7474 // 7475 7476 extern (C): 7477 7478 /// 7479 /// Implement this structure to provide handler implementations. Methods will be 7480 /// called by the process and/or thread indicated. 7481 /// 7482 struct cef_app_t 7483 { 7484 /// 7485 /// Base structure. 7486 /// 7487 7488 /// 7489 /// Provides an opportunity to view and/or modify command-line arguments 7490 /// before processing by CEF and Chromium. The |process_type| value will be 7491 /// NULL for the browser process. Do not keep a reference to the 7492 /// cef_command_line_t object passed to this function. The 7493 /// cef_settings_t.command_line_args_disabled value can be used to start with 7494 /// an NULL command-line object. Any values specified in CefSettings that 7495 g 7496 cef_base_ref_counted_t base; 7497 /// equate to command-line arguments will be set before this function is 7498 /// called. Be cautious when using this function to modify command-line 7499 /// arguments for non-browser processes as this may result in undefined 7500 /// behavior including crashes. 7501 /// 7502 extern(System) void function ( 7503 cef_app_t* self, 7504 const(cef_string_t)* process_type, 7505 cef_command_line_t* command_line) nothrow on_before_command_line_processing; 7506 7507 /// 7508 /// Provides an opportunity to register custom schemes. Do not keep a 7509 /// reference to the |registrar| object. This function is called on the main 7510 /// thread for each process and the registered schemes should be the same 7511 /// across all processes. 7512 /// 7513 extern(System) void function ( 7514 cef_app_t* self, 7515 cef_scheme_registrar_t* registrar) nothrow on_register_custom_schemes; 7516 7517 /// 7518 /// Return the handler for resource bundle events. If 7519 /// cef_settings_t.pack_loading_disabled is true (1) a handler must be 7520 /// returned. If no handler is returned resources will be loaded from pack 7521 /// files. This function is called by the browser and render processes on 7522 /// multiple threads. 7523 /// 7524 extern(System) cef_resource_bundle_handler_t* function ( 7525 cef_app_t* self) nothrow get_resource_bundle_handler; 7526 7527 /// 7528 /// Return the handler for functionality specific to the browser process. This 7529 /// function is called on multiple threads in the browser process. 7530 /// 7531 extern(System) cef_browser_process_handler_t* function ( 7532 cef_app_t* self) nothrow get_browser_process_handler; 7533 7534 /// 7535 /// Return the handler for functionality specific to the render process. This 7536 /// function is called on the render process main thread. 7537 /// 7538 extern(System) cef_render_process_handler_t* function ( 7539 cef_app_t* self) nothrow get_render_process_handler; 7540 } 7541 7542 7543 7544 /// 7545 /// This function should be called from the application entry point function to 7546 /// execute a secondary process. It can be used to run secondary processes from 7547 /// the browser client executable (default behavior) or from a separate 7548 /// executable specified by the cef_settings_t.browser_subprocess_path value. If 7549 /// called for the browser process (identified by no "type" command-line value) 7550 /// it will return immediately with a value of -1. If called for a recognized 7551 /// secondary process it will block until the process should exit and then 7552 /// return the process exit code. The |application| parameter may be NULL. The 7553 /// |windows_sandbox_info| parameter is only used on Windows and may be NULL 7554 /// (see cef_sandbox_win.h for details). 7555 /// 7556 int cef_execute_process ( 7557 const(cef_main_args_t)* args, 7558 cef_app_t* application, 7559 void* windows_sandbox_info); 7560 7561 /// 7562 /// This function should be called on the main application thread to initialize 7563 /// the CEF browser process. The |application| parameter may be NULL. A return 7564 /// value of true (1) indicates that it succeeded and false (0) indicates that 7565 /// it failed. The |windows_sandbox_info| parameter is only used on Windows and 7566 /// may be NULL (see cef_sandbox_win.h for details). 7567 /// 7568 int cef_initialize ( 7569 const(cef_main_args_t)* args, 7570 const(cef_settings_t)* settings, 7571 cef_app_t* application, 7572 void* windows_sandbox_info); 7573 7574 /// 7575 /// This function should be called on the main application thread to shut down 7576 /// the CEF browser process before the application exits. 7577 /// 7578 void cef_shutdown (); 7579 7580 /// 7581 /// Perform a single iteration of CEF message loop processing. This function is 7582 /// provided for cases where the CEF message loop must be integrated into an 7583 /// existing application message loop. Use of this function is not recommended 7584 /// for most users; use either the cef_run_message_loop() function or 7585 /// cef_settings_t.multi_threaded_message_loop if possible. When using this 7586 /// function care must be taken to balance performance against excessive CPU 7587 /// usage. It is recommended to enable the cef_settings_t.external_message_pump 7588 /// option when using this function so that 7589 /// cef_browser_process_handler_t::on_schedule_message_pump_work() callbacks can 7590 /// facilitate the scheduling process. This function should only be called on 7591 /// the main application thread and only if cef_initialize() is called with a 7592 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function 7593 /// will not block. 7594 /// 7595 void cef_do_message_loop_work (); 7596 7597 /// 7598 /// Run the CEF message loop. Use this function instead of an application- 7599 /// provided message loop to get the best balance between performance and CPU 7600 /// usage. This function should only be called on the main application thread 7601 /// and only if cef_initialize() is called with a 7602 /// cef_settings_t.multi_threaded_message_loop value of false (0). This function 7603 /// will block until a quit message is received by the system. 7604 /// 7605 void cef_run_message_loop (); 7606 7607 /// 7608 /// Quit the CEF message loop that was started by calling 7609 /// cef_run_message_loop(). This function should only be called on the main 7610 /// application thread and only if cef_run_message_loop() was used. 7611 /// 7612 void cef_quit_message_loop (); 7613 7614 // CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ 7615 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 7616 // 7617 // Redistribution and use in source and binary forms, with or without 7618 // modification, are permitted provided that the following conditions are 7619 // met: 7620 // 7621 // * Redistributions of source code must retain the above copyright 7622 // notice, this list of conditions and the following disclaimer. 7623 // * Redistributions in binary form must reproduce the above 7624 // copyright notice, this list of conditions and the following disclaimer 7625 // in the documentation and/or other materials provided with the 7626 // distribution. 7627 // * Neither the name of Google Inc. nor the name Chromium Embedded 7628 // Framework nor the names of its contributors may be used to endorse 7629 // or promote products derived from this software without specific prior 7630 // written permission. 7631 // 7632 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7633 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7634 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7635 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7636 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7637 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7638 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7639 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7640 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7641 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7642 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7643 // 7644 // --------------------------------------------------------------------------- 7645 // 7646 // This file was generated by the CEF translator tool and should not edited 7647 // by hand. See the translator.README.txt file in the tools directory for 7648 // more information. 7649 // 7650 // $hash=932c3ecb22fd26322d96d0e01459122aadafd302$ 7651 // 7652 7653 extern (C): 7654 7655 /// 7656 /// Implement this structure to handle audio events. 7657 /// 7658 struct cef_audio_handler_t 7659 { 7660 /// 7661 /// Base structure. 7662 /// 7663 7664 /// 7665 /// Called on the UI thread to allow configuration of audio stream parameters. 7666 /// Return true (1) to proceed with audio stream capture, or false (0) to 7667 /// cancel it. All members of |params| can optionally be configured here, but 7668 /// they are also pre-filled with some sensible defaults. 7669 /// 7670 7671 /// 7672 /// Called on a browser audio capture thread when the browser starts streaming 7673 /// audio. OnAudioStreamStopped will always be called after 7674 /// OnAudioStreamStarted; both functions may be called multiple times for the 7675 g 7676 cef_base_ref_counted_t base; 7677 extern(System) int function ( 7678 cef_audio_handler_t* self, 7679 cef_browser_t* browser, 7680 cef_audio_parameters_t* params) nothrow get_audio_parameters; 7681 /// same browser. |params| contains the audio parameters like sample rate and 7682 /// channel layout. |channels| is the number of channels. 7683 /// 7684 extern(System) void function ( 7685 cef_audio_handler_t* self, 7686 cef_browser_t* browser, 7687 const(cef_audio_parameters_t)* params, 7688 int channels) nothrow on_audio_stream_started; 7689 7690 /// 7691 /// Called on the audio stream thread when a PCM packet is received for the 7692 /// stream. |data| is an array representing the raw PCM data as a floating 7693 /// point type, i.e. 4-byte value(s). |frames| is the number of frames in the 7694 /// PCM packet. |pts| is the presentation timestamp (in milliseconds since the 7695 /// Unix Epoch) and represents the time at which the decompressed packet 7696 /// should be presented to the user. Based on |frames| and the 7697 /// |channel_layout| value passed to OnAudioStreamStarted you can calculate 7698 /// the size of the |data| array in bytes. 7699 /// 7700 extern(System) void function ( 7701 cef_audio_handler_t* self, 7702 cef_browser_t* browser, 7703 const(float*)* data, 7704 int frames, 7705 long pts) nothrow on_audio_stream_packet; 7706 7707 /// 7708 /// Called on the UI thread when the stream has stopped. OnAudioSteamStopped 7709 /// will always be called after OnAudioStreamStarted; both functions may be 7710 /// called multiple times for the same stream. 7711 /// 7712 extern(System) void function ( 7713 cef_audio_handler_t* self, 7714 cef_browser_t* browser) nothrow on_audio_stream_stopped; 7715 7716 /// 7717 /// Called on the UI or audio stream thread when an error occurred. During the 7718 /// stream creation phase this callback will be called on the UI thread while 7719 /// in the capturing phase it will be called on the audio stream thread. The 7720 /// stream will be stopped immediately. 7721 /// 7722 extern(System) void function ( 7723 cef_audio_handler_t* self, 7724 cef_browser_t* browser, 7725 const(cef_string_t)* message) nothrow on_audio_stream_error; 7726 } 7727 7728 7729 7730 // CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_ 7731 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 7732 // 7733 // Redistribution and use in source and binary forms, with or without 7734 // modification, are permitted provided that the following conditions are 7735 // met: 7736 // 7737 // * Redistributions of source code must retain the above copyright 7738 // notice, this list of conditions and the following disclaimer. 7739 // * Redistributions in binary form must reproduce the above 7740 // copyright notice, this list of conditions and the following disclaimer 7741 // in the documentation and/or other materials provided with the 7742 // distribution. 7743 // * Neither the name of Google Inc. nor the name Chromium Embedded 7744 // Framework nor the names of its contributors may be used to endorse 7745 // or promote products derived from this software without specific prior 7746 // written permission. 7747 // 7748 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7749 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7750 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7751 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7752 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7753 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7754 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7755 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7756 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7757 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7758 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7759 // 7760 // --------------------------------------------------------------------------- 7761 // 7762 // This file was generated by the CEF translator tool and should not edited 7763 // by hand. See the translator.README.txt file in the tools directory for 7764 // more information. 7765 // 7766 // $hash=4b9c31ef9a23f899c6d8cd3da49934a41f1bd231$ 7767 // 7768 7769 extern (C): 7770 7771 /// 7772 /// Callback structure used for asynchronous continuation of authentication 7773 /// requests. 7774 /// 7775 struct cef_auth_callback_t 7776 { 7777 /// 7778 /// Base structure. 7779 /// 7780 7781 /// 7782 /// Continue the authentication request. 7783 /// 7784 7785 /// 7786 /// Cancel the authentication request. 7787 /// 7788 7789 // CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ 7790 g 7791 cef_base_ref_counted_t base; 7792 extern(System) void function ( 7793 cef_auth_callback_t* self, 7794 const(cef_string_t)* username, 7795 const(cef_string_t)* password) nothrow cont; 7796 extern(System) void function (cef_auth_callback_t* self) nothrow cancel; 7797 } 7798 7799 7800 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. 7801 // 7802 // Redistribution and use in source and binary forms, with or without 7803 // modification, are permitted provided that the following conditions are 7804 // met: 7805 // 7806 // * Redistributions of source code must retain the above copyright 7807 // notice, this list of conditions and the following disclaimer. 7808 // * Redistributions in binary form must reproduce the above 7809 // copyright notice, this list of conditions and the following disclaimer 7810 // in the documentation and/or other materials provided with the 7811 // distribution. 7812 // * Neither the name of Google Inc. nor the name Chromium Embedded 7813 // Framework nor the names of its contributors may be used to endorse 7814 // or promote products derived from this software without specific prior 7815 // written permission. 7816 // 7817 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7818 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7819 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7820 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7821 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7822 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7823 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7824 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7825 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7826 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7827 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7828 7829 import core.stdc.config; 7830 7831 extern (C): 7832 7833 /// 7834 // All ref-counted framework structures must include this structure first. 7835 /// 7836 struct cef_base_ref_counted_t 7837 { 7838 /// 7839 // Size of the data structure. 7840 /// 7841 7842 /// 7843 // Called to increment the reference count for the object. Should be called 7844 // for every new copy of a pointer to a given object. 7845 /// 7846 7847 /// 7848 // Called to decrement the reference count for the object. If the reference 7849 alias size_t = c_ulong; 7850 size_t size; 7851 extern(System) void function (cef_base_ref_counted_t* self) nothrow add_ref; 7852 // count falls to 0 the object should self-delete. Returns true (1) if the 7853 // resulting reference count is 0. 7854 /// 7855 extern(System) int function (cef_base_ref_counted_t* self) nothrow release; 7856 7857 /// 7858 // Returns true (1) if the current reference count is 1. 7859 /// 7860 extern(System) int function (cef_base_ref_counted_t* self) nothrow has_one_ref; 7861 7862 /// 7863 // Returns true (1) if the current reference count is at least 1. 7864 /// 7865 extern(System) int function (cef_base_ref_counted_t* self) nothrow has_at_least_one_ref; 7866 } 7867 7868 7869 7870 /// 7871 // All scoped framework structures must include this structure first. 7872 /// 7873 struct cef_base_scoped_t 7874 { 7875 /// 7876 // Size of the data structure. 7877 /// 7878 size_t size; 7879 7880 /// 7881 // Called to delete this object. May be NULL if the object is not owned. 7882 /// 7883 extern(System) void function (cef_base_scoped_t* self) nothrow del; 7884 } 7885 7886 7887 7888 // Check that the structure |s|, which is defined with a size_t member at the 7889 // top, is large enough to contain the specified member |f|. 7890 7891 7892 7893 7894 // CEF_INCLUDE_CAPI_CEF_BASE_CAPI_H_ 7895 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 7896 // 7897 // Redistribution and use in source and binary forms, with or without 7898 // modification, are permitted provided that the following conditions are 7899 // met: 7900 // 7901 // * Redistributions of source code must retain the above copyright 7902 // notice, this list of conditions and the following disclaimer. 7903 // * Redistributions in binary form must reproduce the above 7904 // copyright notice, this list of conditions and the following disclaimer 7905 // in the documentation and/or other materials provided with the 7906 // distribution. 7907 // * Neither the name of Google Inc. nor the name Chromium Embedded 7908 // Framework nor the names of its contributors may be used to endorse 7909 // or promote products derived from this software without specific prior 7910 // written permission. 7911 // 7912 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 7913 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 7914 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 7915 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 7916 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 7917 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 7918 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 7919 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 7920 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 7921 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7922 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7923 // 7924 // --------------------------------------------------------------------------- 7925 // 7926 // This file was generated by the CEF translator tool and should not edited 7927 // by hand. See the translator.README.txt file in the tools directory for 7928 // more information. 7929 // 7930 // $hash=13ba2d807f2c1ac3adfc65f2bdb269baecba57ec$ 7931 // 7932 7933 import core.stdc.config; 7934 7935 extern (C): 7936 7937 7938 7939 /// 7940 /// Structure used to represent a browser. When used in the browser process the 7941 /// functions of this structure may be called on any thread unless otherwise 7942 /// indicated in the comments. When used in the render process the functions of 7943 /// this structure may only be called on the main thread. 7944 /// 7945 struct cef_browser_t 7946 { 7947 /// 7948 /// Base structure. 7949 /// 7950 7951 /// 7952 /// True if this object is currently valid. This will return false (0) after 7953 /// cef_life_span_handler_t::OnBeforeClose is called. 7954 g 7955 cef_base_ref_counted_t base; 7956 /// 7957 extern(System) int function (cef_browser_t* self) nothrow is_valid; 7958 7959 /// 7960 /// Returns the browser host object. This function can only be called in the 7961 /// browser process. 7962 /// 7963 extern(System) cef_browser_host_t* function (cef_browser_t* self) nothrow get_host; 7964 7965 /// 7966 /// Returns true (1) if the browser can navigate backwards. 7967 /// 7968 extern(System) int function (cef_browser_t* self) nothrow can_go_back; 7969 7970 /// 7971 /// Navigate backwards. 7972 /// 7973 extern(System) void function (cef_browser_t* self) nothrow go_back; 7974 7975 /// 7976 /// Returns true (1) if the browser can navigate forwards. 7977 /// 7978 extern(System) int function (cef_browser_t* self) nothrow can_go_forward; 7979 7980 /// 7981 /// Navigate forwards. 7982 /// 7983 extern(System) void function (cef_browser_t* self) nothrow go_forward; 7984 7985 /// 7986 /// Returns true (1) if the browser is currently loading. 7987 /// 7988 extern(System) int function (cef_browser_t* self) nothrow is_loading; 7989 7990 /// 7991 /// Reload the current page. 7992 /// 7993 extern(System) void function (cef_browser_t* self) nothrow reload; 7994 7995 /// 7996 /// Reload the current page ignoring any cached data. 7997 /// 7998 extern(System) void function (cef_browser_t* self) nothrow reload_ignore_cache; 7999 8000 /// 8001 /// Stop loading the page. 8002 /// 8003 extern(System) void function (cef_browser_t* self) nothrow stop_load; 8004 8005 /// 8006 /// Returns the globally unique identifier for this browser. This value is 8007 /// also used as the tabId for extension APIs. 8008 /// 8009 extern(System) int function (cef_browser_t* self) nothrow get_identifier; 8010 8011 /// 8012 /// Returns true (1) if this object is pointing to the same handle as |that| 8013 /// object. 8014 /// 8015 extern(System) int function (cef_browser_t* self, cef_browser_t* that) nothrow is_same; 8016 8017 /// 8018 /// Returns true (1) if the browser is a popup. 8019 /// 8020 extern(System) int function (cef_browser_t* self) nothrow is_popup; 8021 8022 /// 8023 /// Returns true (1) if a document has been loaded in the browser. 8024 /// 8025 extern(System) int function (cef_browser_t* self) nothrow has_document; 8026 8027 /// 8028 /// Returns the main (top-level) frame for the browser. In the browser process 8029 /// this will return a valid object until after 8030 /// cef_life_span_handler_t::OnBeforeClose is called. In the renderer process 8031 /// this will return NULL if the main frame is hosted in a different renderer 8032 /// process (e.g. for cross-origin sub-frames). The main frame object will 8033 /// change during cross-origin navigation or re-navigation after renderer 8034 /// process termination (due to crashes, etc). 8035 /// 8036 extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_main_frame; 8037 8038 /// 8039 /// Returns the focused frame for the browser. 8040 /// 8041 extern(System) cef_frame_t* function (cef_browser_t* self) nothrow get_focused_frame; 8042 8043 /// 8044 /// Returns the frame with the specified identifier, or NULL if not found. 8045 /// 8046 extern(System) cef_frame_t* function ( 8047 cef_browser_t* self, 8048 long identifier) nothrow get_frame_byident; 8049 8050 /// 8051 /// Returns the frame with the specified name, or NULL if not found. 8052 /// 8053 extern(System) cef_frame_t* function ( 8054 cef_browser_t* self, 8055 const(cef_string_t)* name) nothrow get_frame; 8056 8057 /// 8058 /// Returns the number of frames that currently exist. 8059 /// 8060 extern(System) size_t function (cef_browser_t* self) nothrow get_frame_count; 8061 8062 /// 8063 /// Returns the identifiers of all existing frames. 8064 /// 8065 extern(System) void function ( 8066 cef_browser_t* self, 8067 size_t* identifiersCount, 8068 long* identifiers) nothrow get_frame_identifiers; 8069 8070 /// 8071 /// Returns the names of all existing frames. 8072 /// 8073 extern(System) void function ( 8074 cef_browser_t* self, 8075 cef_string_list_t names) nothrow get_frame_names; 8076 } 8077 8078 8079 8080 /// 8081 /// Callback structure for cef_browser_host_t::RunFileDialog. The functions of 8082 /// this structure will be called on the browser process UI thread. 8083 /// 8084 struct cef_run_file_dialog_callback_t 8085 { 8086 /// 8087 /// Base structure. 8088 /// 8089 cef_base_ref_counted_t base; 8090 8091 /// 8092 /// Called asynchronously after the file dialog is dismissed. |file_paths| 8093 /// will be a single value or a list of values depending on the dialog mode. 8094 /// If the selection was cancelled |file_paths| will be NULL. 8095 /// 8096 extern(System) void function ( 8097 cef_run_file_dialog_callback_t* self, 8098 cef_string_list_t file_paths) nothrow on_file_dialog_dismissed; 8099 } 8100 8101 8102 8103 /// 8104 /// Callback structure for cef_browser_host_t::GetNavigationEntries. The 8105 /// functions of this structure will be called on the browser process UI thread. 8106 /// 8107 struct cef_navigation_entry_visitor_t 8108 { 8109 /// 8110 /// Base structure. 8111 /// 8112 cef_base_ref_counted_t base; 8113 8114 /// 8115 /// Method that will be executed. Do not keep a reference to |entry| outside 8116 /// of this callback. Return true (1) to continue visiting entries or false 8117 /// (0) to stop. |current| is true (1) if this entry is the currently loaded 8118 /// navigation entry. |index| is the 0-based index of this entry and |total| 8119 /// is the total number of entries. 8120 /// 8121 extern(System) int function ( 8122 cef_navigation_entry_visitor_t* self, 8123 cef_navigation_entry_t* entry, 8124 int current, 8125 int index, 8126 int total) nothrow visit; 8127 } 8128 8129 8130 8131 /// 8132 /// Callback structure for cef_browser_host_t::PrintToPDF. The functions of this 8133 /// structure will be called on the browser process UI thread. 8134 /// 8135 struct cef_pdf_print_callback_t 8136 { 8137 /// 8138 /// Base structure. 8139 /// 8140 cef_base_ref_counted_t base; 8141 8142 /// 8143 /// Method that will be executed when the PDF printing has completed. |path| 8144 /// is the output path. |ok| will be true (1) if the printing completed 8145 /// successfully or false (0) otherwise. 8146 /// 8147 extern(System) void function ( 8148 cef_pdf_print_callback_t* self, 8149 const(cef_string_t)* path, 8150 int ok) nothrow on_pdf_print_finished; 8151 } 8152 8153 8154 8155 /// 8156 /// Callback structure for cef_browser_host_t::DownloadImage. The functions of 8157 /// this structure will be called on the browser process UI thread. 8158 /// 8159 struct cef_download_image_callback_t 8160 { 8161 /// 8162 /// Base structure. 8163 /// 8164 cef_base_ref_counted_t base; 8165 8166 /// 8167 /// Method that will be executed when the image download has completed. 8168 /// |image_url| is the URL that was downloaded and |http_status_code| is the 8169 /// resulting HTTP status code. |image| is the resulting image, possibly at 8170 /// multiple scale factors, or NULL if the download failed. 8171 /// 8172 extern(System) void function ( 8173 cef_download_image_callback_t* self, 8174 const(cef_string_t)* image_url, 8175 int http_status_code, 8176 cef_image_t* image) nothrow on_download_image_finished; 8177 } 8178 8179 8180 8181 /// 8182 /// Structure used to represent the browser process aspects of a browser. The 8183 /// functions of this structure can only be called in the browser process. They 8184 /// may be called on any thread in that process unless otherwise indicated in 8185 /// the comments. 8186 /// 8187 struct cef_browser_host_t 8188 { 8189 /// 8190 /// Base structure. 8191 /// 8192 cef_base_ref_counted_t base; 8193 8194 /// 8195 /// Returns the hosted browser object. 8196 /// 8197 extern(System) cef_browser_t* function (cef_browser_host_t* self) nothrow get_browser; 8198 8199 /// 8200 /// Request that the browser close. The JavaScript 'onbeforeunload' event will 8201 /// be fired. If |force_close| is false (0) the event handler, if any, will be 8202 /// allowed to prompt the user and the user can optionally cancel the close. 8203 /// If |force_close| is true (1) the prompt will not be displayed and the 8204 /// close will proceed. Results in a call to 8205 /// cef_life_span_handler_t::do_close() if the event handler allows the close 8206 /// or if |force_close| is true (1). See cef_life_span_handler_t::do_close() 8207 /// documentation for additional usage information. 8208 /// 8209 extern(System) void function (cef_browser_host_t* self, int force_close) nothrow close_browser; 8210 8211 /// 8212 /// Helper for closing a browser. Call this function from the top-level window 8213 /// close handler (if any). Internally this calls CloseBrowser(false (0)) if 8214 /// the close has not yet been initiated. This function returns false (0) 8215 /// while the close is pending and true (1) after the close has completed. See 8216 /// close_browser() and cef_life_span_handler_t::do_close() documentation for 8217 /// additional usage information. This function must be called on the browser 8218 /// process UI thread. 8219 /// 8220 extern(System) int function (cef_browser_host_t* self) nothrow try_close_browser; 8221 8222 /// 8223 /// Set whether the browser is focused. 8224 /// 8225 extern(System) void function (cef_browser_host_t* self, int focus) nothrow set_focus; 8226 8227 /// 8228 /// Retrieve the window handle (if any) for this browser. If this browser is 8229 /// wrapped in a cef_browser_view_t this function should be called on the 8230 /// browser process UI thread and it will return the handle for the top-level 8231 /// native window. 8232 /// 8233 extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_window_handle; 8234 8235 /// 8236 /// Retrieve the window handle (if any) of the browser that opened this 8237 /// browser. Will return NULL for non-popup browsers or if this browser is 8238 /// wrapped in a cef_browser_view_t. This function can be used in combination 8239 /// with custom handling of modal windows. 8240 /// 8241 extern(System) c_ulong function (cef_browser_host_t* self) nothrow get_opener_window_handle; 8242 8243 /// 8244 /// Returns true (1) if this browser is wrapped in a cef_browser_view_t. 8245 /// 8246 extern(System) int function (cef_browser_host_t* self) nothrow has_view; 8247 8248 /// 8249 /// Returns the client for this browser. 8250 /// 8251 extern(System) cef_client_t* function (cef_browser_host_t* self) nothrow get_client; 8252 8253 /// 8254 /// Returns the request context for this browser. 8255 /// 8256 extern(System) cef_request_context_t* function ( 8257 cef_browser_host_t* self) nothrow get_request_context; 8258 8259 /// 8260 /// Returns true (1) if this browser can execute the specified zoom command. 8261 /// This function can only be called on the UI thread. 8262 /// 8263 extern(System) int function ( 8264 cef_browser_host_t* self, 8265 cef_zoom_command_t command) nothrow can_zoom; 8266 8267 /// 8268 /// Execute a zoom command in this browser. If called on the UI thread the 8269 /// change will be applied immediately. Otherwise, the change will be applied 8270 /// asynchronously on the UI thread. 8271 /// 8272 extern(System) void function (cef_browser_host_t* self, cef_zoom_command_t command) nothrow zoom; 8273 8274 /// 8275 /// Get the default zoom level. This value will be 0.0 by default but can be 8276 /// configured with the Chrome runtime. This function can only be called on 8277 /// the UI thread. 8278 /// 8279 extern(System) double function (cef_browser_host_t* self) nothrow get_default_zoom_level; 8280 8281 /// 8282 /// Get the current zoom level. This function can only be called on the UI 8283 /// thread. 8284 /// 8285 extern(System) double function (cef_browser_host_t* self) nothrow get_zoom_level; 8286 8287 /// 8288 /// Change the zoom level to the specified value. Specify 0.0 to reset the 8289 /// zoom level to the default. If called on the UI thread the change will be 8290 /// applied immediately. Otherwise, the change will be applied asynchronously 8291 /// on the UI thread. 8292 /// 8293 extern(System) void function (cef_browser_host_t* self, double zoomLevel) nothrow set_zoom_level; 8294 8295 /// 8296 /// Call to run a file chooser dialog. Only a single file chooser dialog may 8297 /// be pending at any given time. |mode| represents the type of dialog to 8298 /// display. |title| to the title to be used for the dialog and may be NULL to 8299 /// show the default title ("Open" or "Save" depending on the mode). 8300 /// |default_file_path| is the path with optional directory and/or file name 8301 /// component that will be initially selected in the dialog. |accept_filters| 8302 /// are used to restrict the selectable file types and may any combination of 8303 /// (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"), (b) 8304 /// individual file extensions (e.g. ".txt" or ".png"), or (c) combined 8305 /// description and file extension delimited using "|" and ";" (e.g. "Image 8306 /// Types|.png;.gif;.jpg"). |callback| will be executed after the dialog is 8307 /// dismissed or immediately if another dialog is already pending. The dialog 8308 /// will be initiated asynchronously on the UI thread. 8309 /// 8310 extern(System) void function ( 8311 cef_browser_host_t* self, 8312 cef_file_dialog_mode_t mode, 8313 const(cef_string_t)* title, 8314 const(cef_string_t)* default_file_path, 8315 cef_string_list_t accept_filters, 8316 cef_run_file_dialog_callback_t* callback) nothrow run_file_dialog; 8317 8318 /// 8319 /// Download the file at |url| using cef_download_handler_t. 8320 /// 8321 extern(System) void function ( 8322 cef_browser_host_t* self, 8323 const(cef_string_t)* url) nothrow start_download; 8324 8325 /// 8326 /// Download |image_url| and execute |callback| on completion with the images 8327 /// received from the renderer. If |is_favicon| is true (1) then cookies are 8328 /// not sent and not accepted during download. Images with density independent 8329 /// pixel (DIP) sizes larger than |max_image_size| are filtered out from the 8330 /// image results. Versions of the image at different scale factors may be 8331 /// downloaded up to the maximum scale factor supported by the system. If 8332 /// there are no image results <= |max_image_size| then the smallest image is 8333 /// resized to |max_image_size| and is the only result. A |max_image_size| of 8334 /// 0 means unlimited. If |bypass_cache| is true (1) then |image_url| is 8335 /// requested from the server even if it is present in the browser cache. 8336 /// 8337 extern(System) void function ( 8338 cef_browser_host_t* self, 8339 const(cef_string_t)* image_url, 8340 int is_favicon, 8341 uint max_image_size, 8342 int bypass_cache, 8343 cef_download_image_callback_t* callback) nothrow download_image; 8344 8345 /// 8346 /// Print the current browser contents. 8347 /// 8348 extern(System) void function (cef_browser_host_t* self) nothrow print; 8349 8350 /// 8351 /// Print the current browser contents to the PDF file specified by |path| and 8352 /// execute |callback| on completion. The caller is responsible for deleting 8353 /// |path| when done. For PDF printing to work on Linux you must implement the 8354 /// cef_print_handler_t::GetPdfPaperSize function. 8355 /// 8356 extern(System) void function ( 8357 cef_browser_host_t* self, 8358 const(cef_string_t)* path, 8359 const(cef_pdf_print_settings_t)* settings, 8360 cef_pdf_print_callback_t* callback) nothrow print_to_pdf; 8361 8362 /// 8363 /// Search for |searchText|. |forward| indicates whether to search forward or 8364 /// backward within the page. |matchCase| indicates whether the search should 8365 /// be case-sensitive. |findNext| indicates whether this is the first request 8366 /// or a follow-up. The search will be restarted if |searchText| or 8367 /// |matchCase| change. The search will be stopped if |searchText| is NULL. 8368 /// The cef_find_handler_t instance, if any, returned via 8369 /// cef_client_t::GetFindHandler will be called to report find results. 8370 /// 8371 extern(System) void function ( 8372 cef_browser_host_t* self, 8373 const(cef_string_t)* searchText, 8374 int forward, 8375 int matchCase, 8376 int findNext) nothrow find; 8377 8378 /// 8379 /// Cancel all searches that are currently going on. 8380 /// 8381 extern(System) void function (cef_browser_host_t* self, int clearSelection) nothrow stop_finding; 8382 8383 /// 8384 /// Open developer tools (DevTools) in its own browser. The DevTools browser 8385 /// will remain associated with this browser. If the DevTools browser is 8386 /// already open then it will be focused, in which case the |windowInfo|, 8387 /// |client| and |settings| parameters will be ignored. If 8388 /// |inspect_element_at| is non-NULL then the element at the specified (x,y) 8389 /// location will be inspected. The |windowInfo| parameter will be ignored if 8390 /// this browser is wrapped in a cef_browser_view_t. 8391 /// 8392 extern(System) void function ( 8393 cef_browser_host_t* self, 8394 const(cef_window_info_t)* windowInfo, 8395 cef_client_t* client, 8396 const(cef_browser_settings_t)* settings, 8397 const(cef_point_t)* inspect_element_at) nothrow show_dev_tools; 8398 8399 /// 8400 /// Explicitly close the associated DevTools browser, if any. 8401 /// 8402 extern(System) void function (cef_browser_host_t* self) nothrow close_dev_tools; 8403 8404 /// 8405 /// Returns true (1) if this browser currently has an associated DevTools 8406 /// browser. Must be called on the browser process UI thread. 8407 /// 8408 extern(System) int function (cef_browser_host_t* self) nothrow has_dev_tools; 8409 8410 /// 8411 /// Send a function call message over the DevTools protocol. |message| must be 8412 /// a UTF8-encoded JSON dictionary that contains "id" (int), "function" 8413 /// (string) and "params" (dictionary, optional) values. See the DevTools 8414 /// protocol documentation at https://chromedevtools.github.io/devtools- 8415 /// protocol/ for details of supported functions and the expected "params" 8416 /// dictionary contents. |message| will be copied if necessary. This function 8417 /// will return true (1) if called on the UI thread and the message was 8418 /// successfully submitted for validation, otherwise false (0). Validation 8419 /// will be applied asynchronously and any messages that fail due to 8420 /// formatting errors or missing parameters may be discarded without 8421 /// notification. Prefer ExecuteDevToolsMethod if a more structured approach 8422 /// to message formatting is desired. 8423 /// 8424 /// Every valid function call will result in an asynchronous function result 8425 /// or error message that references the sent message "id". Event messages are 8426 /// received while notifications are enabled (for example, between function 8427 /// calls for "Page.enable" and "Page.disable"). All received messages will be 8428 /// delivered to the observer(s) registered with AddDevToolsMessageObserver. 8429 /// See cef_dev_tools_message_observer_t::OnDevToolsMessage documentation for 8430 /// details of received message contents. 8431 /// 8432 /// Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and 8433 /// AddDevToolsMessageObserver functions does not require an active DevTools 8434 /// front-end or remote-debugging session. Other active DevTools sessions will 8435 /// continue to function independently. However, any modification of global 8436 /// browser state by one session may not be reflected in the UI of other 8437 /// sessions. 8438 /// 8439 /// Communication with the DevTools front-end (when displayed) can be logged 8440 /// for development purposes by passing the `--devtools-protocol-log- 8441 /// file=<path>` command-line flag. 8442 /// 8443 extern(System) int function ( 8444 cef_browser_host_t* self, 8445 const(void)* message, 8446 size_t message_size) nothrow send_dev_tools_message; 8447 8448 /// 8449 /// Execute a function call over the DevTools protocol. This is a more 8450 /// structured version of SendDevToolsMessage. |message_id| is an incremental 8451 /// number that uniquely identifies the message (pass 0 to have the next 8452 /// number assigned automatically based on previous values). |function| is the 8453 /// function name. |params| are the function parameters, which may be NULL. 8454 /// See the DevTools protocol documentation (linked above) for details of 8455 /// supported functions and the expected |params| dictionary contents. This 8456 /// function will return the assigned message ID if called on the UI thread 8457 /// and the message was successfully submitted for validation, otherwise 0. 8458 /// See the SendDevToolsMessage documentation for additional usage 8459 /// information. 8460 /// 8461 extern(System) int function ( 8462 cef_browser_host_t* self, 8463 int message_id, 8464 const(cef_string_t)* method, 8465 cef_dictionary_value_t* params) nothrow execute_dev_tools_method; 8466 8467 /// 8468 /// Add an observer for DevTools protocol messages (function results and 8469 /// events). The observer will remain registered until the returned 8470 /// Registration object is destroyed. See the SendDevToolsMessage 8471 /// documentation for additional usage information. 8472 /// 8473 extern(System) cef_registration_t* function ( 8474 cef_browser_host_t* self, 8475 cef_dev_tools_message_observer_t* observer) nothrow add_dev_tools_message_observer; 8476 8477 /// 8478 /// Retrieve a snapshot of current navigation entries as values sent to the 8479 /// specified visitor. If |current_only| is true (1) only the current 8480 /// navigation entry will be sent, otherwise all navigation entries will be 8481 /// sent. 8482 /// 8483 extern(System) void function ( 8484 cef_browser_host_t* self, 8485 cef_navigation_entry_visitor_t* visitor, 8486 int current_only) nothrow get_navigation_entries; 8487 8488 /// 8489 /// If a misspelled word is currently selected in an editable node calling 8490 /// this function will replace it with the specified |word|. 8491 /// 8492 extern(System) void function ( 8493 cef_browser_host_t* self, 8494 const(cef_string_t)* word) nothrow replace_misspelling; 8495 8496 /// 8497 /// Add the specified |word| to the spelling dictionary. 8498 /// 8499 extern(System) void function ( 8500 cef_browser_host_t* self, 8501 const(cef_string_t)* word) nothrow add_word_to_dictionary; 8502 8503 /// 8504 /// Returns true (1) if window rendering is disabled. 8505 /// 8506 extern(System) int function (cef_browser_host_t* self) nothrow is_window_rendering_disabled; 8507 8508 /// 8509 /// Notify the browser that the widget has been resized. The browser will 8510 /// first call cef_render_handler_t::GetViewRect to get the new size and then 8511 /// call cef_render_handler_t::OnPaint asynchronously with the updated 8512 /// regions. This function is only used when window rendering is disabled. 8513 /// 8514 extern(System) void function (cef_browser_host_t* self) nothrow was_resized; 8515 8516 /// 8517 /// Notify the browser that it has been hidden or shown. Layouting and 8518 /// cef_render_handler_t::OnPaint notification will stop when the browser is 8519 /// hidden. This function is only used when window rendering is disabled. 8520 /// 8521 extern(System) void function (cef_browser_host_t* self, int hidden) nothrow was_hidden; 8522 8523 /// 8524 /// Send a notification to the browser that the screen info has changed. The 8525 /// browser will then call cef_render_handler_t::GetScreenInfo to update the 8526 /// screen information with the new values. This simulates moving the webview 8527 /// window from one display to another, or changing the properties of the 8528 /// current display. This function is only used when window rendering is 8529 /// disabled. 8530 /// 8531 extern(System) void function (cef_browser_host_t* self) nothrow notify_screen_info_changed; 8532 8533 /// 8534 /// Invalidate the view. The browser will call cef_render_handler_t::OnPaint 8535 /// asynchronously. This function is only used when window rendering is 8536 /// disabled. 8537 /// 8538 extern(System) void function ( 8539 cef_browser_host_t* self, 8540 cef_paint_element_type_t type) nothrow invalidate; 8541 8542 /// 8543 /// Issue a BeginFrame request to Chromium. Only valid when 8544 /// cef_window_tInfo::external_begin_frame_enabled is set to true (1). 8545 /// 8546 extern(System) void function (cef_browser_host_t* self) nothrow send_external_begin_frame; 8547 8548 /// 8549 /// Send a key event to the browser. 8550 /// 8551 extern(System) void function ( 8552 cef_browser_host_t* self, 8553 const(cef_key_event_t)* event) nothrow send_key_event; 8554 8555 /// 8556 /// Send a mouse click event to the browser. The |x| and |y| coordinates are 8557 /// relative to the upper-left corner of the view. 8558 /// 8559 extern(System) void function ( 8560 cef_browser_host_t* self, 8561 const(cef_mouse_event_t)* event, 8562 cef_mouse_button_type_t type, 8563 int mouseUp, 8564 int clickCount) nothrow send_mouse_click_event; 8565 8566 /// 8567 /// Send a mouse move event to the browser. The |x| and |y| coordinates are 8568 /// relative to the upper-left corner of the view. 8569 /// 8570 extern(System) void function ( 8571 cef_browser_host_t* self, 8572 const(cef_mouse_event_t)* event, 8573 int mouseLeave) nothrow send_mouse_move_event; 8574 8575 /// 8576 /// Send a mouse wheel event to the browser. The |x| and |y| coordinates are 8577 /// relative to the upper-left corner of the view. The |deltaX| and |deltaY| 8578 /// values represent the movement delta in the X and Y directions 8579 /// respectively. In order to scroll inside select popups with window 8580 /// rendering disabled cef_render_handler_t::GetScreenPoint should be 8581 /// implemented properly. 8582 /// 8583 extern(System) void function ( 8584 cef_browser_host_t* self, 8585 const(cef_mouse_event_t)* event, 8586 int deltaX, 8587 int deltaY) nothrow send_mouse_wheel_event; 8588 8589 /// 8590 /// Send a touch event to the browser for a windowless browser. 8591 /// 8592 extern(System) void function ( 8593 cef_browser_host_t* self, 8594 const(cef_touch_event_t)* event) nothrow send_touch_event; 8595 8596 /// 8597 /// Send a capture lost event to the browser. 8598 /// 8599 extern(System) void function (cef_browser_host_t* self) nothrow send_capture_lost_event; 8600 8601 /// 8602 /// Notify the browser that the window hosting it is about to be moved or 8603 /// resized. This function is only used on Windows and Linux. 8604 /// 8605 extern(System) void function (cef_browser_host_t* self) nothrow notify_move_or_resize_started; 8606 8607 /// 8608 /// Returns the maximum rate in frames per second (fps) that 8609 /// cef_render_handler_t::OnPaint will be called for a windowless browser. The 8610 /// actual fps may be lower if the browser cannot generate frames at the 8611 /// requested rate. The minimum value is 1 and the maximum value is 60 8612 /// (default 30). This function can only be called on the UI thread. 8613 /// 8614 extern(System) int function (cef_browser_host_t* self) nothrow get_windowless_frame_rate; 8615 8616 /// 8617 /// Set the maximum rate in frames per second (fps) that 8618 /// cef_render_handler_t:: OnPaint will be called for a windowless browser. 8619 /// The actual fps may be lower if the browser cannot generate frames at the 8620 /// requested rate. The minimum value is 1 and the maximum value is 60 8621 /// (default 30). Can also be set at browser creation via 8622 /// cef_browser_tSettings.windowless_frame_rate. 8623 /// 8624 extern(System) void function ( 8625 cef_browser_host_t* self, 8626 int frame_rate) nothrow set_windowless_frame_rate; 8627 8628 /// 8629 /// Begins a new composition or updates the existing composition. Blink has a 8630 /// special node (a composition node) that allows the input function to change 8631 /// text without affecting other DOM nodes. |text| is the optional text that 8632 /// will be inserted into the composition node. |underlines| is an optional 8633 /// set of ranges that will be underlined in the resulting text. 8634 /// |replacement_range| is an optional range of the existing text that will be 8635 /// replaced. |selection_range| is an optional range of the resulting text 8636 /// that will be selected after insertion or replacement. The 8637 /// |replacement_range| value is only used on OS X. 8638 /// 8639 /// This function may be called multiple times as the composition changes. 8640 /// When the client is done making changes the composition should either be 8641 /// canceled or completed. To cancel the composition call 8642 /// ImeCancelComposition. To complete the composition call either 8643 /// ImeCommitText or ImeFinishComposingText. Completion is usually signaled 8644 /// when: 8645 /// 8646 /// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR 8647 /// flag (on Windows), or; 8648 /// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or; 8649 /// 3. insertText of NSTextInput is called (on Mac). 8650 /// 8651 /// This function is only used when window rendering is disabled. 8652 /// 8653 extern(System) void function ( 8654 cef_browser_host_t* self, 8655 const(cef_string_t)* text, 8656 size_t underlinesCount, 8657 const(cef_composition_underline_t)* underlines, 8658 const(cef_range_t)* replacement_range, 8659 const(cef_range_t)* selection_range) nothrow ime_set_composition; 8660 8661 /// 8662 /// Completes the existing composition by optionally inserting the specified 8663 /// |text| into the composition node. |replacement_range| is an optional range 8664 /// of the existing text that will be replaced. |relative_cursor_pos| is where 8665 /// the cursor will be positioned relative to the current cursor position. See 8666 /// comments on ImeSetComposition for usage. The |replacement_range| and 8667 /// |relative_cursor_pos| values are only used on OS X. This function is only 8668 /// used when window rendering is disabled. 8669 /// 8670 extern(System) void function ( 8671 cef_browser_host_t* self, 8672 const(cef_string_t)* text, 8673 const(cef_range_t)* replacement_range, 8674 int relative_cursor_pos) nothrow ime_commit_text; 8675 8676 /// 8677 /// Completes the existing composition by applying the current composition 8678 /// node contents. If |keep_selection| is false (0) the current selection, if 8679 /// any, will be discarded. See comments on ImeSetComposition for usage. This 8680 /// function is only used when window rendering is disabled. 8681 /// 8682 extern(System) void function ( 8683 cef_browser_host_t* self, 8684 int keep_selection) nothrow ime_finish_composing_text; 8685 8686 /// 8687 /// Cancels the existing composition and discards the composition node 8688 /// contents without applying them. See comments on ImeSetComposition for 8689 /// usage. This function is only used when window rendering is disabled. 8690 /// 8691 extern(System) void function (cef_browser_host_t* self) nothrow ime_cancel_composition; 8692 8693 /// 8694 /// Call this function when the user drags the mouse into the web view (before 8695 /// calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data| 8696 /// should not contain file contents as this type of data is not allowed to be 8697 /// dragged into the web view. File contents can be removed using 8698 /// cef_drag_data_t::ResetFileContents (for example, if |drag_data| comes from 8699 /// cef_render_handler_t::StartDragging). This function is only used when 8700 /// window rendering is disabled. 8701 /// 8702 extern(System) void function ( 8703 cef_browser_host_t* self, 8704 cef_drag_data_t* drag_data, 8705 const(cef_mouse_event_t)* event, 8706 cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_enter; 8707 8708 /// 8709 /// Call this function each time the mouse is moved across the web view during 8710 /// a drag operation (after calling DragTargetDragEnter and before calling 8711 /// DragTargetDragLeave/DragTargetDrop). This function is only used when 8712 /// window rendering is disabled. 8713 /// 8714 extern(System) void function ( 8715 cef_browser_host_t* self, 8716 const(cef_mouse_event_t)* event, 8717 cef_drag_operations_mask_t allowed_ops) nothrow drag_target_drag_over; 8718 8719 /// 8720 /// Call this function when the user drags the mouse out of the web view 8721 /// (after calling DragTargetDragEnter). This function is only used when 8722 /// window rendering is disabled. 8723 /// 8724 extern(System) void function (cef_browser_host_t* self) nothrow drag_target_drag_leave; 8725 8726 /// 8727 /// Call this function when the user completes the drag operation by dropping 8728 /// the object onto the web view (after calling DragTargetDragEnter). The 8729 /// object being dropped is |drag_data|, given as an argument to the previous 8730 /// DragTargetDragEnter call. This function is only used when window rendering 8731 /// is disabled. 8732 /// 8733 extern(System) void function ( 8734 cef_browser_host_t* self, 8735 const(cef_mouse_event_t)* event) nothrow drag_target_drop; 8736 8737 /// 8738 /// Call this function when the drag operation started by a 8739 /// cef_render_handler_t::StartDragging call has ended either in a drop or by 8740 /// being cancelled. |x| and |y| are mouse coordinates relative to the upper- 8741 /// left corner of the view. If the web view is both the drag source and the 8742 /// drag target then all DragTarget* functions should be called before 8743 /// DragSource* mthods. This function is only used when window rendering is 8744 /// disabled. 8745 /// 8746 extern(System) void function ( 8747 cef_browser_host_t* self, 8748 int x, 8749 int y, 8750 cef_drag_operations_mask_t op) nothrow drag_source_ended_at; 8751 8752 /// 8753 /// Call this function when the drag operation started by a 8754 /// cef_render_handler_t::StartDragging call has completed. This function may 8755 /// be called immediately without first calling DragSourceEndedAt to cancel a 8756 /// drag operation. If the web view is both the drag source and the drag 8757 /// target then all DragTarget* functions should be called before DragSource* 8758 /// mthods. This function is only used when window rendering is disabled. 8759 /// 8760 extern(System) void function (cef_browser_host_t* self) nothrow drag_source_system_drag_ended; 8761 8762 /// 8763 /// Returns the current visible navigation entry for this browser. This 8764 /// function can only be called on the UI thread. 8765 /// 8766 extern(System) cef_navigation_entry_t* function ( 8767 cef_browser_host_t* self) nothrow get_visible_navigation_entry; 8768 8769 /// 8770 /// Set accessibility state for all frames. |accessibility_state| may be 8771 /// default, enabled or disabled. If |accessibility_state| is STATE_DEFAULT 8772 /// then accessibility will be disabled by default and the state may be 8773 /// further controlled with the "force-renderer-accessibility" and "disable- 8774 /// renderer-accessibility" command-line switches. If |accessibility_state| is 8775 /// STATE_ENABLED then accessibility will be enabled. If |accessibility_state| 8776 /// is STATE_DISABLED then accessibility will be completely disabled. 8777 /// 8778 /// For windowed browsers accessibility will be enabled in Complete mode 8779 /// (which corresponds to kAccessibilityModeComplete in Chromium). In this 8780 /// mode all platform accessibility objects will be created and managed by 8781 /// Chromium's internal implementation. The client needs only to detect the 8782 /// screen reader and call this function appropriately. For example, on macOS 8783 /// the client can handle the @"AXEnhancedUserStructure" accessibility 8784 /// attribute to detect VoiceOver state changes and on Windows the client can 8785 /// handle WM_GETOBJECT with OBJID_CLIENT to detect accessibility readers. 8786 /// 8787 /// For windowless browsers accessibility will be enabled in TreeOnly mode 8788 /// (which corresponds to kAccessibilityModeWebContentsOnly in Chromium). In 8789 /// this mode renderer accessibility is enabled, the full tree is computed, 8790 /// and events are passed to CefAccessibiltyHandler, but platform 8791 /// accessibility objects are not created. The client may implement platform 8792 /// accessibility objects using CefAccessibiltyHandler callbacks if desired. 8793 /// 8794 extern(System) void function ( 8795 cef_browser_host_t* self, 8796 cef_state_t accessibility_state) nothrow set_accessibility_state; 8797 8798 /// 8799 /// Enable notifications of auto resize via 8800 /// cef_display_handler_t::OnAutoResize. Notifications are disabled by 8801 /// default. |min_size| and |max_size| define the range of allowed sizes. 8802 /// 8803 extern(System) void function ( 8804 cef_browser_host_t* self, 8805 int enabled, 8806 const(cef_size_t)* min_size, 8807 const(cef_size_t)* max_size) nothrow set_auto_resize_enabled; 8808 8809 /// 8810 /// Returns the extension hosted in this browser or NULL if no extension is 8811 /// hosted. See cef_request_context_t::LoadExtension for details. 8812 /// 8813 extern(System) cef_extension_t* function (cef_browser_host_t* self) nothrow get_extension; 8814 8815 /// 8816 /// Returns true (1) if this browser is hosting an extension background 8817 /// script. Background hosts do not have a window and are not displayable. See 8818 /// cef_request_context_t::LoadExtension for details. 8819 /// 8820 extern(System) int function (cef_browser_host_t* self) nothrow is_background_host; 8821 8822 /// 8823 /// Set whether the browser's audio is muted. 8824 /// 8825 extern(System) void function (cef_browser_host_t* self, int mute) nothrow set_audio_muted; 8826 8827 /// 8828 /// Returns true (1) if the browser's audio is muted. This function can only 8829 /// be called on the UI thread. 8830 /// 8831 extern(System) int function (cef_browser_host_t* self) nothrow is_audio_muted; 8832 8833 /// 8834 /// Returns true (1) if the renderer is currently in browser fullscreen. This 8835 /// differs from window fullscreen in that browser fullscreen is entered using 8836 /// the JavaScript Fullscreen API and modifies CSS attributes such as the 8837 /// ::backdrop pseudo-element and :fullscreen pseudo-structure. This function 8838 /// can only be called on the UI thread. 8839 /// 8840 extern(System) int function (cef_browser_host_t* self) nothrow is_fullscreen; 8841 8842 /// 8843 /// Requests the renderer to exit browser fullscreen. In most cases exiting 8844 /// window fullscreen should also exit browser fullscreen. With the Alloy 8845 /// runtime this function should be called in response to a user action such 8846 /// as clicking the green traffic light button on MacOS 8847 /// (cef_window_delegate_t::OnWindowFullscreenTransition callback) or pressing 8848 /// the "ESC" key (cef_keyboard_handler_t::OnPreKeyEvent callback). With the 8849 /// Chrome runtime these standard exit actions are handled internally but 8850 /// new/additional user actions can use this function. Set |will_cause_resize| 8851 /// to true (1) if exiting browser fullscreen will cause a view resize. 8852 /// 8853 extern(System) void function ( 8854 cef_browser_host_t* self, 8855 int will_cause_resize) nothrow exit_fullscreen; 8856 } 8857 8858 8859 8860 /// 8861 /// Create a new browser using the window parameters specified by |windowInfo|. 8862 /// All values will be copied internally and the actual window (if any) will be 8863 /// created on the UI thread. If |request_context| is NULL the global request 8864 /// context will be used. This function can be called on any browser process 8865 /// thread and will not block. The optional |extra_info| parameter provides an 8866 /// opportunity to specify extra information specific to the created browser 8867 /// that will be passed to cef_render_process_handler_t::on_browser_created() in 8868 /// the render process. 8869 /// 8870 int cef_browser_host_create_browser ( 8871 const(cef_window_info_t)* windowInfo, 8872 cef_client_t* client, 8873 const(cef_string_t)* url, 8874 const(cef_browser_settings_t)* settings, 8875 cef_dictionary_value_t* extra_info, 8876 cef_request_context_t* request_context); 8877 8878 /// 8879 /// Create a new browser using the window parameters specified by |windowInfo|. 8880 /// If |request_context| is NULL the global request context will be used. This 8881 /// function can only be called on the browser process UI thread. The optional 8882 /// |extra_info| parameter provides an opportunity to specify extra information 8883 /// specific to the created browser that will be passed to 8884 /// cef_render_process_handler_t::on_browser_created() in the render process. 8885 /// 8886 cef_browser_t* cef_browser_host_create_browser_sync ( 8887 const(cef_window_info_t)* windowInfo, 8888 cef_client_t* client, 8889 const(cef_string_t)* url, 8890 const(cef_browser_settings_t)* settings, 8891 cef_dictionary_value_t* extra_info, 8892 cef_request_context_t* request_context); 8893 8894 // CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ 8895 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 8896 // 8897 // Redistribution and use in source and binary forms, with or without 8898 // modification, are permitted provided that the following conditions are 8899 // met: 8900 // 8901 // * Redistributions of source code must retain the above copyright 8902 // notice, this list of conditions and the following disclaimer. 8903 // * Redistributions in binary form must reproduce the above 8904 // copyright notice, this list of conditions and the following disclaimer 8905 // in the documentation and/or other materials provided with the 8906 // distribution. 8907 // * Neither the name of Google Inc. nor the name Chromium Embedded 8908 // Framework nor the names of its contributors may be used to endorse 8909 // or promote products derived from this software without specific prior 8910 // written permission. 8911 // 8912 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8913 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 8914 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 8915 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 8916 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 8917 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 8918 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 8919 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 8920 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 8921 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8922 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8923 // 8924 // --------------------------------------------------------------------------- 8925 // 8926 // This file was generated by the CEF translator tool and should not edited 8927 // by hand. See the translator.README.txt file in the tools directory for 8928 // more information. 8929 // 8930 // $hash=a146316e075450f0a6f37cb45d14e15e0ac7be08$ 8931 // 8932 8933 extern (C): 8934 8935 /// 8936 /// Structure used to implement browser process callbacks. The functions of this 8937 /// structure will be called on the browser process main thread unless otherwise 8938 /// indicated. 8939 /// 8940 struct cef_browser_process_handler_t 8941 { 8942 /// 8943 /// Base structure. 8944 /// 8945 8946 /// 8947 /// Provides an opportunity to register custom preferences prior to global and 8948 /// request context initialization. 8949 /// 8950 /// If |type| is CEF_PREFERENCES_TYPE_GLOBAL the registered preferences can be 8951 /// accessed via cef_preference_manager_t::GetGlobalPreferences after 8952 /// OnContextInitialized is called. Global preferences are registered a single 8953 /// time at application startup. See related cef_settings_t.cache_path and 8954 g 8955 cef_base_ref_counted_t base; 8956 /// cef_settings_t.persist_user_preferences configuration. 8957 /// 8958 /// If |type| is CEF_PREFERENCES_TYPE_REQUEST_CONTEXT the preferences can be 8959 /// accessed via the cef_request_context_t after 8960 /// cef_request_context_handler_t::OnRequestContextInitialized is called. 8961 /// Request context preferences are registered each time a new 8962 /// cef_request_context_t is created. It is intended but not required that all 8963 /// request contexts have the same registered preferences. See related 8964 /// cef_request_context_settings_t.cache_path and 8965 /// cef_request_context_settings_t.persist_user_preferences configuration. 8966 /// 8967 /// Do not keep a reference to the |registrar| object. This function is called 8968 /// on the browser process UI thread. 8969 /// 8970 extern(System) void function ( 8971 cef_browser_process_handler_t* self, 8972 cef_preferences_type_t type, 8973 cef_preference_registrar_t* registrar) nothrow on_register_custom_preferences; 8974 8975 /// 8976 /// Called on the browser process UI thread immediately after the CEF context 8977 /// has been initialized. 8978 /// 8979 extern(System) void function ( 8980 cef_browser_process_handler_t* self) nothrow on_context_initialized; 8981 8982 /// 8983 /// Called before a child process is launched. Will be called on the browser 8984 /// process UI thread when launching a render process and on the browser 8985 /// process IO thread when launching a GPU process. Provides an opportunity to 8986 /// modify the child process command line. Do not keep a reference to 8987 /// |command_line| outside of this function. 8988 /// 8989 extern(System) void function ( 8990 cef_browser_process_handler_t* self, 8991 cef_command_line_t* command_line) nothrow on_before_child_process_launch; 8992 8993 /// 8994 /// Called from any thread when work has been scheduled for the browser 8995 /// process main (UI) thread. This callback is used in combination with 8996 /// cef_settings_t.external_message_pump and cef_do_message_loop_work() in 8997 /// cases where the CEF message loop must be integrated into an existing 8998 /// application message loop (see additional comments and warnings on 8999 /// CefDoMessageLoopWork). This callback should schedule a 9000 /// cef_do_message_loop_work() call to happen on the main (UI) thread. 9001 /// |delay_ms| is the requested delay in milliseconds. If |delay_ms| is <= 0 9002 /// then the call should happen reasonably soon. If |delay_ms| is > 0 then the 9003 /// call should be scheduled to happen after the specified delay and any 9004 /// currently pending scheduled call should be cancelled. 9005 /// 9006 extern(System) void function ( 9007 cef_browser_process_handler_t* self, 9008 long delay_ms) nothrow on_schedule_message_pump_work; 9009 9010 /// 9011 /// Return the default client for use with a newly created browser window. If 9012 /// null is returned the browser will be unmanaged (no callbacks will be 9013 /// executed for that browser) and application shutdown will be blocked until 9014 /// the browser window is closed manually. This function is currently only 9015 /// used with the chrome runtime. 9016 /// 9017 extern(System) cef_client_t* function ( 9018 cef_browser_process_handler_t* self) nothrow get_default_client; 9019 } 9020 9021 9022 9023 // CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ 9024 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 9025 // 9026 // Redistribution and use in source and binary forms, with or without 9027 // modification, are permitted provided that the following conditions are 9028 // met: 9029 // 9030 // * Redistributions of source code must retain the above copyright 9031 // notice, this list of conditions and the following disclaimer. 9032 // * Redistributions in binary form must reproduce the above 9033 // copyright notice, this list of conditions and the following disclaimer 9034 // in the documentation and/or other materials provided with the 9035 // distribution. 9036 // * Neither the name of Google Inc. nor the name Chromium Embedded 9037 // Framework nor the names of its contributors may be used to endorse 9038 // or promote products derived from this software without specific prior 9039 // written permission. 9040 // 9041 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9042 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9043 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9044 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9045 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9046 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9047 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9048 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9049 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9050 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9051 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9052 // 9053 // --------------------------------------------------------------------------- 9054 // 9055 // This file was generated by the CEF translator tool and should not edited 9056 // by hand. See the translator.README.txt file in the tools directory for 9057 // more information. 9058 // 9059 // $hash=4fd98ff68ecb42677c3344b75e26d4787161b0d2$ 9060 // 9061 9062 extern (C): 9063 9064 /// 9065 /// Generic callback structure used for asynchronous continuation. 9066 /// 9067 struct cef_callback_t 9068 { 9069 /// 9070 /// Base structure. 9071 /// 9072 9073 /// 9074 /// Continue processing. 9075 /// 9076 9077 /// 9078 /// Cancel processing. 9079 /// 9080 9081 /// 9082 /// Generic callback structure used for asynchronous completion. 9083 /// 9084 9085 /// 9086 /// Base structure. 9087 /// 9088 9089 /// 9090 /// Method that will be called once the task is complete. 9091 /// 9092 9093 // CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 9094 g 9095 cef_base_ref_counted_t base; 9096 extern(System) void function (cef_callback_t* self) nothrow cont; 9097 extern(System) void function (cef_callback_t* self) nothrow cancel; 9098 } 9099 9100 9101 9102 struct cef_completion_callback_t 9103 { 9104 cef_base_ref_counted_t base; 9105 extern(System) void function (cef_completion_callback_t* self) nothrow on_complete; 9106 } 9107 9108 9109 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 9110 // 9111 // Redistribution and use in source and binary forms, with or without 9112 // modification, are permitted provided that the following conditions are 9113 // met: 9114 // 9115 // * Redistributions of source code must retain the above copyright 9116 // notice, this list of conditions and the following disclaimer. 9117 // * Redistributions in binary form must reproduce the above 9118 // copyright notice, this list of conditions and the following disclaimer 9119 // in the documentation and/or other materials provided with the 9120 // distribution. 9121 // * Neither the name of Google Inc. nor the name Chromium Embedded 9122 // Framework nor the names of its contributors may be used to endorse 9123 // or promote products derived from this software without specific prior 9124 // written permission. 9125 // 9126 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9127 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9128 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9129 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9130 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9131 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9132 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9133 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9134 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9135 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9136 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9137 // 9138 // --------------------------------------------------------------------------- 9139 // 9140 // This file was generated by the CEF translator tool and should not edited 9141 // by hand. See the translator.README.txt file in the tools directory for 9142 // more information. 9143 // 9144 // $hash=eb9dcb574252483dfab12834af93ba14138d4089$ 9145 // 9146 9147 extern (C): 9148 9149 /// 9150 /// Implement this structure to provide handler implementations. 9151 /// 9152 struct cef_client_t 9153 { 9154 /// 9155 /// Base structure. 9156 /// 9157 g 9158 cef_base_ref_counted_t base; /// 9159 /// Return the handler for audio rendering events. 9160 /// 9161 extern(System) cef_audio_handler_t* function (cef_client_t* self) nothrow get_audio_handler; 9162 9163 /// 9164 /// Return the handler for commands. If no handler is provided the default 9165 /// implementation will be used. 9166 /// 9167 extern(System) cef_command_handler_t* function (cef_client_t* self) nothrow get_command_handler; 9168 9169 /// 9170 /// Return the handler for context menus. If no handler is provided the 9171 /// default implementation will be used. 9172 /// 9173 extern(System) cef_context_menu_handler_t* function ( 9174 cef_client_t* self) nothrow get_context_menu_handler; 9175 9176 /// 9177 /// Return the handler for dialogs. If no handler is provided the default 9178 /// implementation will be used. 9179 /// 9180 extern(System) cef_dialog_handler_t* function (cef_client_t* self) nothrow get_dialog_handler; 9181 9182 /// 9183 /// Return the handler for browser display state events. 9184 /// 9185 extern(System) cef_display_handler_t* function (cef_client_t* self) nothrow get_display_handler; 9186 9187 /// 9188 /// Return the handler for download events. If no handler is returned 9189 /// downloads will not be allowed. 9190 /// 9191 extern(System) cef_download_handler_t* function ( 9192 cef_client_t* self) nothrow get_download_handler; 9193 9194 /// 9195 /// Return the handler for drag events. 9196 /// 9197 extern(System) cef_drag_handler_t* function (cef_client_t* self) nothrow get_drag_handler; 9198 9199 /// 9200 /// Return the handler for find result events. 9201 /// 9202 extern(System) cef_find_handler_t* function (cef_client_t* self) nothrow get_find_handler; 9203 9204 /// 9205 /// Return the handler for focus events. 9206 /// 9207 extern(System) cef_focus_handler_t* function (cef_client_t* self) nothrow get_focus_handler; 9208 9209 /// 9210 /// Return the handler for events related to cef_frame_t lifespan. This 9211 /// function will be called once during cef_browser_t creation and the result 9212 /// will be cached for performance reasons. 9213 /// 9214 extern(System) cef_frame_handler_t* function (cef_client_t* self) nothrow get_frame_handler; 9215 9216 /// 9217 /// Return the handler for permission requests. 9218 /// 9219 extern(System) cef_permission_handler_t* function ( 9220 cef_client_t* self) nothrow get_permission_handler; 9221 9222 /// 9223 /// Return the handler for JavaScript dialogs. If no handler is provided the 9224 /// default implementation will be used. 9225 /// 9226 extern(System) cef_jsdialog_handler_t* function ( 9227 cef_client_t* self) nothrow get_jsdialog_handler; 9228 9229 /// 9230 /// Return the handler for keyboard events. 9231 /// 9232 extern(System) cef_keyboard_handler_t* function ( 9233 cef_client_t* self) nothrow get_keyboard_handler; 9234 9235 /// 9236 /// Return the handler for browser life span events. 9237 /// 9238 extern(System) cef_life_span_handler_t* function ( 9239 cef_client_t* self) nothrow get_life_span_handler; 9240 9241 /// 9242 /// Return the handler for browser load status events. 9243 /// 9244 extern(System) cef_load_handler_t* function (cef_client_t* self) nothrow get_load_handler; 9245 9246 /// 9247 /// Return the handler for printing on Linux. If a print handler is not 9248 /// provided then printing will not be supported on the Linux platform. 9249 /// 9250 extern(System) cef_print_handler_t* function (cef_client_t* self) nothrow get_print_handler; 9251 9252 /// 9253 /// Return the handler for off-screen rendering events. 9254 /// 9255 extern(System) cef_render_handler_t* function (cef_client_t* self) nothrow get_render_handler; 9256 9257 /// 9258 /// Return the handler for browser request events. 9259 /// 9260 extern(System) cef_request_handler_t* function (cef_client_t* self) nothrow get_request_handler; 9261 9262 /// 9263 /// Called when a new message is received from a different process. Return 9264 /// true (1) if the message was handled or false (0) otherwise. It is safe to 9265 /// keep a reference to |message| outside of this callback. 9266 /// 9267 extern(System) int function ( 9268 cef_client_t* self, 9269 cef_browser_t* browser, 9270 cef_frame_t* frame, 9271 cef_process_id_t source_process, 9272 cef_process_message_t* message) nothrow on_process_message_received; 9273 } 9274 9275 9276 9277 // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 9278 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 9279 // 9280 // Redistribution and use in source and binary forms, with or without 9281 // modification, are permitted provided that the following conditions are 9282 // met: 9283 // 9284 // * Redistributions of source code must retain the above copyright 9285 // notice, this list of conditions and the following disclaimer. 9286 // * Redistributions in binary form must reproduce the above 9287 // copyright notice, this list of conditions and the following disclaimer 9288 // in the documentation and/or other materials provided with the 9289 // distribution. 9290 // * Neither the name of Google Inc. nor the name Chromium Embedded 9291 // Framework nor the names of its contributors may be used to endorse 9292 // or promote products derived from this software without specific prior 9293 // written permission. 9294 // 9295 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9296 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9297 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9298 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9299 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9300 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9301 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9302 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9303 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9304 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9305 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9306 // 9307 // --------------------------------------------------------------------------- 9308 // 9309 // This file was generated by the CEF translator tool and should not edited 9310 // by hand. See the translator.README.txt file in the tools directory for 9311 // more information. 9312 // 9313 // $hash=0cbb756a64d2aca1075480b5188b36cae533864d$ 9314 // 9315 9316 extern (C): 9317 9318 /// 9319 /// Implement this structure to handle events related to commands. The functions 9320 /// of this structure will be called on the UI thread. 9321 /// 9322 struct cef_command_handler_t 9323 { 9324 /// 9325 /// Base structure. 9326 /// 9327 9328 /// 9329 /// Called to execute a Chrome command triggered via menu selection or 9330 /// keyboard shortcut. Values for |command_id| can be found in the 9331 /// cef_command_ids.h file. |disposition| provides information about the 9332 /// intended command target. Return true (1) if the command was handled or 9333 /// false (0) for the default implementation. For context menu commands this 9334 /// will be called after cef_context_menu_handler_t::OnContextMenuCommand. 9335 /// Only used with the Chrome runtime. 9336 /// 9337 g 9338 cef_base_ref_counted_t base; 9339 extern(System) int function ( 9340 cef_command_handler_t* self, 9341 cef_browser_t* browser, 9342 int command_id, 9343 cef_window_open_disposition_t disposition) nothrow on_chrome_command; 9344 /// 9345 /// Called to check if a Chrome app menu item should be visible. Values for 9346 /// |command_id| can be found in the cef_command_ids.h file. Only called for 9347 /// menu items that would be visible by default. Only used with the Chrome 9348 /// runtime. 9349 /// 9350 extern(System) int function ( 9351 cef_command_handler_t* self, 9352 cef_browser_t* browser, 9353 int command_id) nothrow is_chrome_app_menu_item_visible; 9354 9355 /// 9356 /// Called to check if a Chrome app menu item should be enabled. Values for 9357 /// |command_id| can be found in the cef_command_ids.h file. Only called for 9358 /// menu items that would be enabled by default. Only used with the Chrome 9359 /// runtime. 9360 /// 9361 extern(System) int function ( 9362 cef_command_handler_t* self, 9363 cef_browser_t* browser, 9364 int command_id) nothrow is_chrome_app_menu_item_enabled; 9365 9366 /// 9367 /// Called during browser creation to check if a Chrome page action icon 9368 /// should be visible. Only called for icons that would be visible by default. 9369 /// Only used with the Chrome runtime. 9370 /// 9371 extern(System) int function ( 9372 cef_command_handler_t* self, 9373 cef_chrome_page_action_icon_type_t icon_type) nothrow is_chrome_page_action_icon_visible; 9374 9375 /// 9376 /// Called during browser creation to check if a Chrome toolbar button should 9377 /// be visible. Only called for buttons that would be visible by default. Only 9378 /// used with the Chrome runtime. 9379 /// 9380 extern(System) int function ( 9381 cef_command_handler_t* self, 9382 cef_chrome_toolbar_button_type_t button_type) nothrow is_chrome_toolbar_button_visible; 9383 } 9384 9385 9386 9387 // CEF_INCLUDE_CAPI_CEF_COMMAND_HANDLER_CAPI_H_ 9388 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 9389 // 9390 // Redistribution and use in source and binary forms, with or without 9391 // modification, are permitted provided that the following conditions are 9392 // met: 9393 // 9394 // * Redistributions of source code must retain the above copyright 9395 // notice, this list of conditions and the following disclaimer. 9396 // * Redistributions in binary form must reproduce the above 9397 // copyright notice, this list of conditions and the following disclaimer 9398 // in the documentation and/or other materials provided with the 9399 // distribution. 9400 // * Neither the name of Google Inc. nor the name Chromium Embedded 9401 // Framework nor the names of its contributors may be used to endorse 9402 // or promote products derived from this software without specific prior 9403 // written permission. 9404 // 9405 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9406 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9407 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9408 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9409 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9410 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9411 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9412 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9413 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9414 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9415 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9416 // 9417 // --------------------------------------------------------------------------- 9418 // 9419 // This file was generated by the CEF translator tool and should not edited 9420 // by hand. See the translator.README.txt file in the tools directory for 9421 // more information. 9422 // 9423 // $hash=ac8fd3a7da20cff1fe2f20a75b045bf27c0312f2$ 9424 // 9425 9426 extern (C): 9427 9428 /// 9429 /// Structure used to create and/or parse command line arguments. Arguments with 9430 /// "--", "-" and, on Windows, "/" prefixes are considered switches. Switches 9431 /// will always precede any arguments without switch prefixes. Switches can 9432 /// optionally have a value specified using the "=" delimiter (e.g. 9433 /// "-switch=value"). An argument of "--" will terminate switch parsing with all 9434 /// subsequent tokens, regardless of prefix, being interpreted as non-switch 9435 /// arguments. Switch names should be lowercase ASCII and will be converted to 9436 /// such if necessary. Switch values will retain the original case and UTF8 9437 /// encoding. This structure can be used before cef_initialize() is called. 9438 /// 9439 struct cef_command_line_t 9440 { 9441 /// 9442 /// Base structure. 9443 /// 9444 9445 /// 9446 /// Returns true (1) if this object is valid. Do not call any other functions 9447 /// if this function returns false (0). 9448 g 9449 cef_base_ref_counted_t base; 9450 /// 9451 extern(System) int function (cef_command_line_t* self) nothrow is_valid; 9452 9453 /// 9454 /// Returns true (1) if the values of this object are read-only. Some APIs may 9455 /// expose read-only objects. 9456 /// 9457 extern(System) int function (cef_command_line_t* self) nothrow is_read_only; 9458 9459 /// 9460 /// Returns a writable copy of this object. 9461 /// 9462 extern(System) cef_command_line_t* function (cef_command_line_t* self) nothrow copy; 9463 9464 /// 9465 /// Initialize the command line with the specified |argc| and |argv| values. 9466 /// The first argument must be the name of the program. This function is only 9467 /// supported on non-Windows platforms. 9468 /// 9469 extern(System) void function ( 9470 cef_command_line_t* self, 9471 int argc, 9472 const(char*)* argv) nothrow init_from_argv; 9473 9474 /// 9475 /// Initialize the command line with the string returned by calling 9476 /// GetCommandLineW(). This function is only supported on Windows. 9477 /// 9478 extern(System) void function ( 9479 cef_command_line_t* self, 9480 const(cef_string_t)* command_line) nothrow init_from_string; 9481 9482 /// 9483 /// Reset the command-line switches and arguments but leave the program 9484 /// component unchanged. 9485 /// 9486 extern(System) void function (cef_command_line_t* self) nothrow reset; 9487 9488 /// 9489 /// Retrieve the original command line string as a vector of strings. The argv 9490 /// array: `{ program, [(--|-|/)switch[=value]]*, [--], [argument]* }` 9491 /// 9492 extern(System) void function (cef_command_line_t* self, cef_string_list_t argv) nothrow get_argv; 9493 9494 /// 9495 /// Constructs and returns the represented command line string. Use this 9496 /// function cautiously because quoting behavior is unclear. 9497 /// 9498 // The resulting string must be freed by calling cef_string_userfree_free(). 9499 extern(System) cef_string_userfree_t function ( 9500 cef_command_line_t* self) nothrow get_command_line_string; 9501 9502 /// 9503 /// Get the program part of the command line string (the first item). 9504 /// 9505 // The resulting string must be freed by calling cef_string_userfree_free(). 9506 extern(System) cef_string_userfree_t function (cef_command_line_t* self) nothrow get_program; 9507 9508 /// 9509 /// Set the program part of the command line string (the first item). 9510 /// 9511 extern(System) void function ( 9512 cef_command_line_t* self, 9513 const(cef_string_t)* program) nothrow set_program; 9514 9515 /// 9516 /// Returns true (1) if the command line has switches. 9517 /// 9518 extern(System) int function (cef_command_line_t* self) nothrow has_switches; 9519 9520 /// 9521 /// Returns true (1) if the command line contains the given switch. 9522 /// 9523 extern(System) int function ( 9524 cef_command_line_t* self, 9525 const(cef_string_t)* name) nothrow has_switch; 9526 9527 /// 9528 /// Returns the value associated with the given switch. If the switch has no 9529 /// value or isn't present this function returns the NULL string. 9530 /// 9531 // The resulting string must be freed by calling cef_string_userfree_free(). 9532 extern(System) cef_string_userfree_t function ( 9533 cef_command_line_t* self, 9534 const(cef_string_t)* name) nothrow get_switch_value; 9535 9536 /// 9537 /// Returns the map of switch names and values. If a switch has no value an 9538 /// NULL string is returned. 9539 /// 9540 extern(System) void function ( 9541 cef_command_line_t* self, 9542 cef_string_map_t switches) nothrow get_switches; 9543 9544 /// 9545 /// Add a switch to the end of the command line. 9546 /// 9547 extern(System) void function ( 9548 cef_command_line_t* self, 9549 const(cef_string_t)* name) nothrow append_switch; 9550 9551 /// 9552 /// Add a switch with the specified value to the end of the command line. If 9553 /// the switch has no value pass an NULL value string. 9554 /// 9555 extern(System) void function ( 9556 cef_command_line_t* self, 9557 const(cef_string_t)* name, 9558 const(cef_string_t)* value) nothrow append_switch_with_value; 9559 9560 /// 9561 /// True if there are remaining command line arguments. 9562 /// 9563 extern(System) int function (cef_command_line_t* self) nothrow has_arguments; 9564 9565 /// 9566 /// Get the remaining command line arguments. 9567 /// 9568 extern(System) void function ( 9569 cef_command_line_t* self, 9570 cef_string_list_t arguments) nothrow get_arguments; 9571 9572 /// 9573 /// Add an argument to the end of the command line. 9574 /// 9575 extern(System) void function ( 9576 cef_command_line_t* self, 9577 const(cef_string_t)* argument) nothrow append_argument; 9578 9579 /// 9580 /// Insert a command before the current command. Common for debuggers, like 9581 /// "valgrind" or "gdb --args". 9582 /// 9583 extern(System) void function ( 9584 cef_command_line_t* self, 9585 const(cef_string_t)* wrapper) nothrow prepend_wrapper; 9586 } 9587 9588 9589 9590 /// 9591 /// Create a new cef_command_line_t instance. 9592 /// 9593 cef_command_line_t* cef_command_line_create (); 9594 9595 /// 9596 /// Returns the singleton global cef_command_line_t object. The returned object 9597 /// will be read-only. 9598 /// 9599 cef_command_line_t* cef_command_line_get_global (); 9600 9601 // CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ 9602 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 9603 // 9604 // Redistribution and use in source and binary forms, with or without 9605 // modification, are permitted provided that the following conditions are 9606 // met: 9607 // 9608 // * Redistributions of source code must retain the above copyright 9609 // notice, this list of conditions and the following disclaimer. 9610 // * Redistributions in binary form must reproduce the above 9611 // copyright notice, this list of conditions and the following disclaimer 9612 // in the documentation and/or other materials provided with the 9613 // distribution. 9614 // * Neither the name of Google Inc. nor the name Chromium Embedded 9615 // Framework nor the names of its contributors may be used to endorse 9616 // or promote products derived from this software without specific prior 9617 // written permission. 9618 // 9619 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9620 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9621 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9622 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9623 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9624 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9625 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9626 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9627 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9628 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9629 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9630 // 9631 // --------------------------------------------------------------------------- 9632 // 9633 // This file was generated by the CEF translator tool and should not edited 9634 // by hand. See the translator.README.txt file in the tools directory for 9635 // more information. 9636 // 9637 // $hash=c82f41d81f5afa5ed6995693e012c13d2a609f88$ 9638 // 9639 9640 extern (C): 9641 9642 /// 9643 /// Callback structure used for continuation of custom context menu display. 9644 /// 9645 struct cef_run_context_menu_callback_t 9646 { 9647 /// 9648 /// Base structure. 9649 /// 9650 9651 /// 9652 /// Complete context menu display by selecting the specified |command_id| and 9653 /// |event_flags|. 9654 /// 9655 9656 /// 9657 /// Cancel context menu display. 9658 /// 9659 9660 /// 9661 /// Callback structure used for continuation of custom quick menu display. 9662 g 9663 cef_base_ref_counted_t base; 9664 extern(System) void function ( 9665 cef_run_context_menu_callback_t* self, 9666 int command_id, 9667 cef_event_flags_t event_flags) nothrow cont; 9668 extern(System) void function (cef_run_context_menu_callback_t* self) nothrow cancel; 9669 } 9670 9671 9672 /// 9673 struct cef_run_quick_menu_callback_t 9674 { 9675 /// 9676 /// Base structure. 9677 /// 9678 cef_base_ref_counted_t base; 9679 9680 /// 9681 /// Complete quick menu display by selecting the specified |command_id| and 9682 /// |event_flags|. 9683 /// 9684 extern(System) void function ( 9685 cef_run_quick_menu_callback_t* self, 9686 int command_id, 9687 cef_event_flags_t event_flags) nothrow cont; 9688 9689 /// 9690 /// Cancel quick menu display. 9691 /// 9692 extern(System) void function (cef_run_quick_menu_callback_t* self) nothrow cancel; 9693 } 9694 9695 9696 9697 /// 9698 /// Implement this structure to handle context menu events. The functions of 9699 /// this structure will be called on the UI thread. 9700 /// 9701 struct cef_context_menu_handler_t 9702 { 9703 /// 9704 /// Base structure. 9705 /// 9706 cef_base_ref_counted_t base; 9707 9708 /// 9709 /// Called before a context menu is displayed. |params| provides information 9710 /// about the context menu state. |model| initially contains the default 9711 /// context menu. The |model| can be cleared to show no context menu or 9712 /// modified to show a custom menu. Do not keep references to |params| or 9713 /// |model| outside of this callback. 9714 /// 9715 extern(System) void function ( 9716 cef_context_menu_handler_t* self, 9717 cef_browser_t* browser, 9718 cef_frame_t* frame, 9719 cef_context_menu_params_t* params, 9720 cef_menu_model_t* model) nothrow on_before_context_menu; 9721 9722 /// 9723 /// Called to allow custom display of the context menu. |params| provides 9724 /// information about the context menu state. |model| contains the context 9725 /// menu model resulting from OnBeforeContextMenu. For custom display return 9726 /// true (1) and execute |callback| either synchronously or asynchronously 9727 /// with the selected command ID. For default display return false (0). Do not 9728 /// keep references to |params| or |model| outside of this callback. 9729 /// 9730 extern(System) int function ( 9731 cef_context_menu_handler_t* self, 9732 cef_browser_t* browser, 9733 cef_frame_t* frame, 9734 cef_context_menu_params_t* params, 9735 cef_menu_model_t* model, 9736 cef_run_context_menu_callback_t* callback) nothrow run_context_menu; 9737 9738 /// 9739 /// Called to execute a command selected from the context menu. Return true 9740 /// (1) if the command was handled or false (0) for the default 9741 /// implementation. See cef_menu_id_t for the command ids that have default 9742 /// implementations. All user-defined command ids should be between 9743 /// MENU_ID_USER_FIRST and MENU_ID_USER_LAST. |params| will have the same 9744 /// values as what was passed to on_before_context_menu(). Do not keep a 9745 /// reference to |params| outside of this callback. 9746 /// 9747 extern(System) int function ( 9748 cef_context_menu_handler_t* self, 9749 cef_browser_t* browser, 9750 cef_frame_t* frame, 9751 cef_context_menu_params_t* params, 9752 int command_id, 9753 cef_event_flags_t event_flags) nothrow on_context_menu_command; 9754 9755 /// 9756 /// Called when the context menu is dismissed irregardless of whether the menu 9757 /// was canceled or a command was selected. 9758 /// 9759 extern(System) void function ( 9760 cef_context_menu_handler_t* self, 9761 cef_browser_t* browser, 9762 cef_frame_t* frame) nothrow on_context_menu_dismissed; 9763 9764 /// 9765 /// Called to allow custom display of the quick menu for a windowless browser. 9766 /// |location| is the top left corner of the selected region. |size| is the 9767 /// size of the selected region. |edit_state_flags| is a combination of flags 9768 /// that represent the state of the quick menu. Return true (1) if the menu 9769 /// will be handled and execute |callback| either synchronously or 9770 /// asynchronously with the selected command ID. Return false (0) to cancel 9771 /// the menu. 9772 /// 9773 extern(System) int function ( 9774 cef_context_menu_handler_t* self, 9775 cef_browser_t* browser, 9776 cef_frame_t* frame, 9777 const(cef_point_t)* location, 9778 const(cef_size_t)* size, 9779 cef_quick_menu_edit_state_flags_t edit_state_flags, 9780 cef_run_quick_menu_callback_t* callback) nothrow run_quick_menu; 9781 9782 /// 9783 /// Called to execute a command selected from the quick menu for a windowless 9784 /// browser. Return true (1) if the command was handled or false (0) for the 9785 /// default implementation. See cef_menu_id_t for command IDs that have 9786 /// default implementations. 9787 /// 9788 extern(System) int function ( 9789 cef_context_menu_handler_t* self, 9790 cef_browser_t* browser, 9791 cef_frame_t* frame, 9792 int command_id, 9793 cef_event_flags_t event_flags) nothrow on_quick_menu_command; 9794 9795 /// 9796 /// Called when the quick menu for a windowless browser is dismissed 9797 /// irregardless of whether the menu was canceled or a command was selected. 9798 /// 9799 extern(System) void function ( 9800 cef_context_menu_handler_t* self, 9801 cef_browser_t* browser, 9802 cef_frame_t* frame) nothrow on_quick_menu_dismissed; 9803 } 9804 9805 9806 9807 /// 9808 /// Provides information about the context menu state. The functions of this 9809 /// structure can only be accessed on browser process the UI thread. 9810 /// 9811 struct cef_context_menu_params_t 9812 { 9813 /// 9814 /// Base structure. 9815 /// 9816 cef_base_ref_counted_t base; 9817 9818 /// 9819 /// Returns the X coordinate of the mouse where the context menu was invoked. 9820 /// Coords are relative to the associated RenderView's origin. 9821 /// 9822 extern(System) int function (cef_context_menu_params_t* self) nothrow get_xcoord; 9823 9824 /// 9825 /// Returns the Y coordinate of the mouse where the context menu was invoked. 9826 /// Coords are relative to the associated RenderView's origin. 9827 /// 9828 extern(System) int function (cef_context_menu_params_t* self) nothrow get_ycoord; 9829 9830 /// 9831 /// Returns flags representing the type of node that the context menu was 9832 /// invoked on. 9833 /// 9834 extern(System) cef_context_menu_type_flags_t function ( 9835 cef_context_menu_params_t* self) nothrow get_type_flags; 9836 9837 /// 9838 /// Returns the URL of the link, if any, that encloses the node that the 9839 /// context menu was invoked on. 9840 /// 9841 // The resulting string must be freed by calling cef_string_userfree_free(). 9842 extern(System) cef_string_userfree_t function ( 9843 cef_context_menu_params_t* self) nothrow get_link_url; 9844 9845 /// 9846 /// Returns the link URL, if any, to be used ONLY for "copy link address". We 9847 /// don't validate this field in the frontend process. 9848 /// 9849 // The resulting string must be freed by calling cef_string_userfree_free(). 9850 extern(System) cef_string_userfree_t function ( 9851 cef_context_menu_params_t* self) nothrow get_unfiltered_link_url; 9852 9853 /// 9854 /// Returns the source URL, if any, for the element that the context menu was 9855 /// invoked on. Example of elements with source URLs are img, audio, and 9856 /// video. 9857 /// 9858 // The resulting string must be freed by calling cef_string_userfree_free(). 9859 extern(System) cef_string_userfree_t function ( 9860 cef_context_menu_params_t* self) nothrow get_source_url; 9861 9862 /// 9863 /// Returns true (1) if the context menu was invoked on an image which has 9864 /// non-NULL contents. 9865 /// 9866 extern(System) int function (cef_context_menu_params_t* self) nothrow has_image_contents; 9867 9868 /// 9869 /// Returns the title text or the alt text if the context menu was invoked on 9870 /// an image. 9871 /// 9872 // The resulting string must be freed by calling cef_string_userfree_free(). 9873 extern(System) cef_string_userfree_t function ( 9874 cef_context_menu_params_t* self) nothrow get_title_text; 9875 9876 /// 9877 /// Returns the URL of the top level page that the context menu was invoked 9878 /// on. 9879 /// 9880 // The resulting string must be freed by calling cef_string_userfree_free(). 9881 extern(System) cef_string_userfree_t function ( 9882 cef_context_menu_params_t* self) nothrow get_page_url; 9883 9884 /// 9885 /// Returns the URL of the subframe that the context menu was invoked on. 9886 /// 9887 // The resulting string must be freed by calling cef_string_userfree_free(). 9888 extern(System) cef_string_userfree_t function ( 9889 cef_context_menu_params_t* self) nothrow get_frame_url; 9890 9891 /// 9892 /// Returns the character encoding of the subframe that the context menu was 9893 /// invoked on. 9894 /// 9895 // The resulting string must be freed by calling cef_string_userfree_free(). 9896 extern(System) cef_string_userfree_t function ( 9897 cef_context_menu_params_t* self) nothrow get_frame_charset; 9898 9899 /// 9900 /// Returns the type of context node that the context menu was invoked on. 9901 /// 9902 extern(System) cef_context_menu_media_type_t function ( 9903 cef_context_menu_params_t* self) nothrow get_media_type; 9904 9905 /// 9906 /// Returns flags representing the actions supported by the media element, if 9907 /// any, that the context menu was invoked on. 9908 /// 9909 extern(System) cef_context_menu_media_state_flags_t function ( 9910 cef_context_menu_params_t* self) nothrow get_media_state_flags; 9911 9912 /// 9913 /// Returns the text of the selection, if any, that the context menu was 9914 /// invoked on. 9915 /// 9916 // The resulting string must be freed by calling cef_string_userfree_free(). 9917 extern(System) cef_string_userfree_t function ( 9918 cef_context_menu_params_t* self) nothrow get_selection_text; 9919 9920 /// 9921 /// Returns the text of the misspelled word, if any, that the context menu was 9922 /// invoked on. 9923 /// 9924 // The resulting string must be freed by calling cef_string_userfree_free(). 9925 extern(System) cef_string_userfree_t function ( 9926 cef_context_menu_params_t* self) nothrow get_misspelled_word; 9927 9928 /// 9929 /// Returns true (1) if suggestions exist, false (0) otherwise. Fills in 9930 /// |suggestions| from the spell check service for the misspelled word if 9931 /// there is one. 9932 /// 9933 extern(System) int function ( 9934 cef_context_menu_params_t* self, 9935 cef_string_list_t suggestions) nothrow get_dictionary_suggestions; 9936 9937 /// 9938 /// Returns true (1) if the context menu was invoked on an editable node. 9939 /// 9940 extern(System) int function (cef_context_menu_params_t* self) nothrow is_editable; 9941 9942 /// 9943 /// Returns true (1) if the context menu was invoked on an editable node where 9944 /// spell-check is enabled. 9945 /// 9946 extern(System) int function (cef_context_menu_params_t* self) nothrow is_spell_check_enabled; 9947 9948 /// 9949 /// Returns flags representing the actions supported by the editable node, if 9950 /// any, that the context menu was invoked on. 9951 /// 9952 extern(System) cef_context_menu_edit_state_flags_t function ( 9953 cef_context_menu_params_t* self) nothrow get_edit_state_flags; 9954 9955 /// 9956 /// Returns true (1) if the context menu contains items specified by the 9957 /// renderer process. 9958 /// 9959 extern(System) int function (cef_context_menu_params_t* self) nothrow is_custom_menu; 9960 } 9961 9962 9963 9964 // CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ 9965 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 9966 // 9967 // Redistribution and use in source and binary forms, with or without 9968 // modification, are permitted provided that the following conditions are 9969 // met: 9970 // 9971 // * Redistributions of source code must retain the above copyright 9972 // notice, this list of conditions and the following disclaimer. 9973 // * Redistributions in binary form must reproduce the above 9974 // copyright notice, this list of conditions and the following disclaimer 9975 // in the documentation and/or other materials provided with the 9976 // distribution. 9977 // * Neither the name of Google Inc. nor the name Chromium Embedded 9978 // Framework nor the names of its contributors may be used to endorse 9979 // or promote products derived from this software without specific prior 9980 // written permission. 9981 // 9982 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 9983 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9984 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 9985 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 9986 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 9987 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 9988 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 9989 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 9990 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 9991 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9992 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9993 // 9994 // --------------------------------------------------------------------------- 9995 // 9996 // This file was generated by the CEF translator tool and should not edited 9997 // by hand. See the translator.README.txt file in the tools directory for 9998 // more information. 9999 // 10000 // $hash=598c6f530b2e2553197d8c6a72ad9e2bf72b5443$ 10001 // 10002 10003 extern (C): 10004 10005 /// 10006 /// Structure used for managing cookies. The functions of this structure may be 10007 /// called on any thread unless otherwise indicated. 10008 /// 10009 struct cef_cookie_manager_t 10010 { 10011 /// 10012 /// Base structure. 10013 /// 10014 10015 /// 10016 /// Visit all cookies on the UI thread. The returned cookies are ordered by 10017 /// longest path, then by earliest creation date. Returns false (0) if cookies 10018 /// cannot be accessed. 10019 /// 10020 10021 /// 10022 /// Visit a subset of cookies on the UI thread. The results are filtered by 10023 /// the given url scheme, host, domain and path. If |includeHttpOnly| is true 10024 /// (1) HTTP-only cookies will also be included in the results. The returned 10025 g 10026 cef_base_ref_counted_t base; 10027 extern(System) int function ( 10028 cef_cookie_manager_t* self, 10029 cef_cookie_visitor_t* visitor) nothrow visit_all_cookies; 10030 /// cookies are ordered by longest path, then by earliest creation date. 10031 /// Returns false (0) if cookies cannot be accessed. 10032 /// 10033 extern(System) int function ( 10034 cef_cookie_manager_t* self, 10035 const(cef_string_t)* url, 10036 int includeHttpOnly, 10037 cef_cookie_visitor_t* visitor) nothrow visit_url_cookies; 10038 10039 /// 10040 /// Sets a cookie given a valid URL and explicit user-provided cookie 10041 /// attributes. This function expects each attribute to be well-formed. It 10042 /// will check for disallowed characters (e.g. the ';' character is disallowed 10043 /// within the cookie value attribute) and fail without setting the cookie if 10044 /// such characters are found. If |callback| is non-NULL it will be executed 10045 /// asnychronously on the UI thread after the cookie has been set. Returns 10046 /// false (0) if an invalid URL is specified or if cookies cannot be accessed. 10047 /// 10048 extern(System) int function ( 10049 cef_cookie_manager_t* self, 10050 const(cef_string_t)* url, 10051 const(cef_cookie_t)* cookie, 10052 cef_set_cookie_callback_t* callback) nothrow set_cookie; 10053 10054 /// 10055 /// Delete all cookies that match the specified parameters. If both |url| and 10056 /// |cookie_name| values are specified all host and domain cookies matching 10057 /// both will be deleted. If only |url| is specified all host cookies (but not 10058 /// domain cookies) irrespective of path will be deleted. If |url| is NULL all 10059 /// cookies for all hosts and domains will be deleted. If |callback| is non- 10060 /// NULL it will be executed asnychronously on the UI thread after the cookies 10061 /// have been deleted. Returns false (0) if a non-NULL invalid URL is 10062 /// specified or if cookies cannot be accessed. Cookies can alternately be 10063 /// deleted using the Visit*Cookies() functions. 10064 /// 10065 extern(System) int function ( 10066 cef_cookie_manager_t* self, 10067 const(cef_string_t)* url, 10068 const(cef_string_t)* cookie_name, 10069 cef_delete_cookies_callback_t* callback) nothrow delete_cookies; 10070 10071 /// 10072 /// Flush the backing store (if any) to disk. If |callback| is non-NULL it 10073 /// will be executed asnychronously on the UI thread after the flush is 10074 /// complete. Returns false (0) if cookies cannot be accessed. 10075 /// 10076 extern(System) int function ( 10077 cef_cookie_manager_t* self, 10078 cef_completion_callback_t* callback) nothrow flush_store; 10079 } 10080 10081 10082 10083 /// 10084 /// Returns the global cookie manager. By default data will be stored at 10085 /// cef_settings_t.cache_path if specified or in memory otherwise. If |callback| 10086 /// is non-NULL it will be executed asnychronously on the UI thread after the 10087 /// manager's storage has been initialized. Using this function is equivalent to 10088 /// calling cef_request_context_t::cef_request_context_get_global_context()->Get 10089 /// DefaultCookieManager(). 10090 /// 10091 cef_cookie_manager_t* cef_cookie_manager_get_global_manager ( 10092 cef_completion_callback_t* callback); 10093 10094 /// 10095 /// Structure to implement for visiting cookie values. The functions of this 10096 /// structure will always be called on the UI thread. 10097 /// 10098 struct cef_cookie_visitor_t 10099 { 10100 /// 10101 /// Base structure. 10102 /// 10103 cef_base_ref_counted_t base; 10104 10105 /// 10106 /// Method that will be called once for each cookie. |count| is the 0-based 10107 /// index for the current cookie. |total| is the total number of cookies. Set 10108 /// |deleteCookie| to true (1) to delete the cookie currently being visited. 10109 /// Return false (0) to stop visiting cookies. This function may never be 10110 /// called if no cookies are found. 10111 /// 10112 extern(System) int function ( 10113 cef_cookie_visitor_t* self, 10114 const(cef_cookie_t)* cookie, 10115 int count, 10116 int total, 10117 int* deleteCookie) nothrow visit; 10118 } 10119 10120 10121 10122 /// 10123 /// Structure to implement to be notified of asynchronous completion via 10124 /// cef_cookie_manager_t::set_cookie(). 10125 /// 10126 struct cef_set_cookie_callback_t 10127 { 10128 /// 10129 /// Base structure. 10130 /// 10131 cef_base_ref_counted_t base; 10132 10133 /// 10134 /// Method that will be called upon completion. |success| will be true (1) if 10135 /// the cookie was set successfully. 10136 /// 10137 extern(System) void function (cef_set_cookie_callback_t* self, int success) nothrow on_complete; 10138 } 10139 10140 10141 10142 /// 10143 /// Structure to implement to be notified of asynchronous completion via 10144 /// cef_cookie_manager_t::delete_cookies(). 10145 /// 10146 struct cef_delete_cookies_callback_t 10147 { 10148 /// 10149 /// Base structure. 10150 /// 10151 cef_base_ref_counted_t base; 10152 10153 /// 10154 /// Method that will be called upon completion. |num_deleted| will be the 10155 /// number of cookies that were deleted. 10156 /// 10157 extern(System) void function ( 10158 cef_delete_cookies_callback_t* self, 10159 int num_deleted) nothrow on_complete; 10160 } 10161 10162 10163 10164 // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ 10165 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 10166 // 10167 // Redistribution and use in source and binary forms, with or without 10168 // modification, are permitted provided that the following conditions are 10169 // met: 10170 // 10171 // * Redistributions of source code must retain the above copyright 10172 // notice, this list of conditions and the following disclaimer. 10173 // * Redistributions in binary form must reproduce the above 10174 // copyright notice, this list of conditions and the following disclaimer 10175 // in the documentation and/or other materials provided with the 10176 // distribution. 10177 // * Neither the name of Google Inc. nor the name Chromium Embedded 10178 // Framework nor the names of its contributors may be used to endorse 10179 // or promote products derived from this software without specific prior 10180 // written permission. 10181 // 10182 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10183 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10184 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10185 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10186 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10187 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10188 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10189 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10190 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10191 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10192 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10193 // 10194 // --------------------------------------------------------------------------- 10195 // 10196 // This file was generated by the CEF translator tool and should not edited 10197 // by hand. See the translator.README.txt file in the tools directory for 10198 // more information. 10199 // 10200 // $hash=22cfd717df9032a01214d9abfe3e0e51949b3319$ 10201 // 10202 10203 extern (C): 10204 10205 /// 10206 /// Crash reporting is configured using an INI-style config file named 10207 /// "crash_reporter.cfg". On Windows and Linux this file must be placed next to 10208 /// the main application executable. On macOS this file must be placed in the 10209 /// top-level app bundle Resources directory (e.g. 10210 /// "<appname>.app/Contents/Resources"). File contents are as follows: 10211 /// 10212 /// <pre> 10213 /// # Comments start with a hash character and must be on their own line. 10214 /// 10215 /// [Config] 10216 /// ProductName=<Value of the "prod" crash key; defaults to "cef"> 10217 /// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version> 10218 /// AppName=<Windows only; App-specific folder name component for storing crash 10219 /// information; default to "CEF"> 10220 /// ExternalHandler=<Windows only; Name of the external handler exe to use 10221 /// instead of re-launching the main exe; default to empty> 10222 /// BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes 10223 /// should be forwarded to the system crash 10224 /// reporter; default to false> 10225 /// ServerURL=<crash server URL; default to empty> 10226 /// RateLimitEnabled=<True if uploads should be rate limited; default to true> 10227 /// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled; 10228 /// default to 5> 10229 /// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value 10230 /// will cause older reports to be deleted; default to 20> 10231 /// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted; 10232 /// default to 5> 10233 /// 10234 /// [CrashKeys] 10235 /// my_key1=<small|medium|large> 10236 /// my_key2=<small|medium|large> 10237 /// </pre> 10238 /// 10239 /// <b>Config section:</b> 10240 /// 10241 /// If "ProductName" and/or "ProductVersion" are set then the specified values 10242 /// will be included in the crash dump metadata. On macOS if these values are 10243 /// set to NULL then they will be retrieved from the Info.plist file using the 10244 /// "CFBundleName" and "CFBundleShortVersionString" keys respectively. 10245 /// 10246 /// If "AppName" is set on Windows then crash report information (metrics, 10247 /// database and dumps) will be stored locally on disk under the 10248 /// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other 10249 /// platforms the cef_settings_t.root_cache_path value will be used. 10250 /// 10251 /// If "ExternalHandler" is set on Windows then the specified exe will be 10252 /// launched as the crashpad-handler instead of re-launching the main process 10253 /// exe. The value can be an absolute path or a path relative to the main exe 10254 /// directory. On Linux the cef_settings_t.browser_subprocess_path value will be 10255 /// used. On macOS the existing subprocess app bundle will be used. 10256 /// 10257 /// If "BrowserCrashForwardingEnabled" is set to true (1) on macOS then browser 10258 /// process crashes will be forwarded to the system crash reporter. This results 10259 /// in the crash UI dialog being displayed to the user and crash reports being 10260 /// logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports 10261 /// from non-browser processes and Debug builds is always disabled. 10262 /// 10263 /// If "ServerURL" is set then crashes will be uploaded as a multi-part POST 10264 /// request to the specified URL. Otherwise, reports will only be stored locally 10265 /// on disk. 10266 /// 10267 /// If "RateLimitEnabled" is set to true (1) then crash report uploads will be 10268 /// rate limited as follows: 10269 /// 1. If "MaxUploadsPerDay" is set to a positive value then at most the 10270 /// specified number of crashes will be uploaded in each 24 hour period. 10271 /// 2. If crash upload fails due to a network or server error then an 10272 /// incremental backoff delay up to a maximum of 24 hours will be applied 10273 /// for retries. 10274 /// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the 10275 /// "MaxUploadsPerDay" value will be reduced to 1 until the client is 10276 /// restarted. This helps to avoid an upload flood when the network or 10277 /// server error is resolved. 10278 /// Rate limiting is not supported on Linux. 10279 /// 10280 /// If "MaxDatabaseSizeInMb" is set to a positive value then crash report 10281 /// storage on disk will be limited to that size in megabytes. For example, on 10282 /// Windows each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20 10283 /// equates to about 34 crash reports stored on disk. Not supported on Linux. 10284 /// 10285 /// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports 10286 /// older than the specified age in days will be deleted. Not supported on 10287 /// Linux. 10288 /// 10289 /// <b>CrashKeys section:</b> 10290 /// 10291 /// A maximum of 26 crash keys of each size can be specified for use by the 10292 /// application. Crash key values will be truncated based on the specified size 10293 /// (small = 64 bytes, medium = 256 bytes, large = 1024 bytes). The value of 10294 /// crash keys can be set from any thread or process using the 10295 /// CefSetCrashKeyValue function. These key/value pairs will be sent to the 10296 /// crash server along with the crash dump file. 10297 /// 10298 int cef_crash_reporting_enabled (); 10299 10300 /// 10301 /// Sets or clears a specific key-value pair from the crash metadata. 10302 /// 10303 void cef_set_crash_key_value ( 10304 const(cef_string_t)* key, 10305 const(cef_string_t)* value); 10306 10307 // CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_ 10308 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 10309 // 10310 // Redistribution and use in source and binary forms, with or without 10311 // modification, are permitted provided that the following conditions are 10312 // met: 10313 // 10314 // * Redistributions of source code must retain the above copyright 10315 // notice, this list of conditions and the following disclaimer. 10316 // * Redistributions in binary form must reproduce the above 10317 // copyright notice, this list of conditions and the following disclaimer 10318 // in the documentation and/or other materials provided with the 10319 // distribution. 10320 // * Neither the name of Google Inc. nor the name Chromium Embedded 10321 // Framework nor the names of its contributors may be used to endorse 10322 // or promote products derived from this software without specific prior 10323 // written permission. 10324 // 10325 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10326 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10327 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10328 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10329 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10330 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10331 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10332 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10333 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10334 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10335 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10336 // 10337 // --------------------------------------------------------------------------- 10338 // 10339 // This file was generated by the CEF translator tool and should not edited 10340 // by hand. See the translator.README.txt file in the tools directory for 10341 // more information. 10342 // 10343 // $hash=777485120b9a9df0f890579ee698d33f273819c5$ 10344 // 10345 10346 extern (C): 10347 10348 10349 10350 /// 10351 /// Callback structure for cef_browser_host_t::AddDevToolsMessageObserver. The 10352 /// functions of this structure will be called on the browser process UI thread. 10353 /// 10354 struct cef_dev_tools_message_observer_t 10355 { 10356 /// 10357 /// Base structure. 10358 /// 10359 10360 /// 10361 /// Method that will be called on receipt of a DevTools protocol message. 10362 /// |browser| is the originating browser instance. |message| is a UTF8-encoded 10363 /// JSON dictionary representing either a function result or an event. 10364 /// |message| is only valid for the scope of this callback and should be 10365 /// copied if necessary. Return true (1) if the message was handled or false 10366 /// (0) if the message should be further processed and passed to the 10367 /// OnDevToolsMethodResult or OnDevToolsEvent functions as appropriate. 10368 /// 10369 /// Method result dictionaries include an "id" (int) value that identifies the 10370 g 10371 cef_base_ref_counted_t base; 10372 /// orginating function call sent from 10373 /// cef_browser_host_t::SendDevToolsMessage, and optionally either a "result" 10374 /// (dictionary) or "error" (dictionary) value. The "error" dictionary will 10375 /// contain "code" (int) and "message" (string) values. Event dictionaries 10376 /// include a "function" (string) value and optionally a "params" (dictionary) 10377 /// value. See the DevTools protocol documentation at 10378 /// https://chromedevtools.github.io/devtools-protocol/ for details of 10379 /// supported function calls and the expected "result" or "params" dictionary 10380 /// contents. JSON dictionaries can be parsed using the CefParseJSON function 10381 /// if desired, however be aware of performance considerations when parsing 10382 /// large messages (some of which may exceed 1MB in size). 10383 /// 10384 extern(System) int function ( 10385 cef_dev_tools_message_observer_t* self, 10386 cef_browser_t* browser, 10387 const(void)* message, 10388 size_t message_size) nothrow on_dev_tools_message; 10389 10390 /// 10391 /// Method that will be called after attempted execution of a DevTools 10392 /// protocol function. |browser| is the originating browser instance. 10393 /// |message_id| is the "id" value that identifies the originating function 10394 /// call message. If the function succeeded |success| will be true (1) and 10395 /// |result| will be the UTF8-encoded JSON "result" dictionary value (which 10396 /// may be NULL). If the function failed |success| will be false (0) and 10397 /// |result| will be the UTF8-encoded JSON "error" dictionary value. |result| 10398 /// is only valid for the scope of this callback and should be copied if 10399 /// necessary. See the OnDevToolsMessage documentation for additional details 10400 /// on |result| contents. 10401 /// 10402 extern(System) void function ( 10403 cef_dev_tools_message_observer_t* self, 10404 cef_browser_t* browser, 10405 int message_id, 10406 int success, 10407 const(void)* result, 10408 size_t result_size) nothrow on_dev_tools_method_result; 10409 10410 /// 10411 /// Method that will be called on receipt of a DevTools protocol event. 10412 /// |browser| is the originating browser instance. |function| is the 10413 /// "function" value. |params| is the UTF8-encoded JSON "params" dictionary 10414 /// value (which may be NULL). |params| is only valid for the scope of this 10415 /// callback and should be copied if necessary. See the OnDevToolsMessage 10416 /// documentation for additional details on |params| contents. 10417 /// 10418 extern(System) void function ( 10419 cef_dev_tools_message_observer_t* self, 10420 cef_browser_t* browser, 10421 const(cef_string_t)* method, 10422 const(void)* params, 10423 size_t params_size) nothrow on_dev_tools_event; 10424 10425 /// 10426 /// Method that will be called when the DevTools agent has attached. |browser| 10427 /// is the originating browser instance. This will generally occur in response 10428 /// to the first message sent while the agent is detached. 10429 /// 10430 extern(System) void function ( 10431 cef_dev_tools_message_observer_t* self, 10432 cef_browser_t* browser) nothrow on_dev_tools_agent_attached; 10433 10434 /// 10435 /// Method that will be called when the DevTools agent has detached. |browser| 10436 /// is the originating browser instance. Any function results that were 10437 /// pending before the agent became detached will not be delivered, and any 10438 /// active event subscriptions will be canceled. 10439 /// 10440 extern(System) void function ( 10441 cef_dev_tools_message_observer_t* self, 10442 cef_browser_t* browser) nothrow on_dev_tools_agent_detached; 10443 } 10444 10445 10446 10447 // CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_ 10448 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 10449 // 10450 // Redistribution and use in source and binary forms, with or without 10451 // modification, are permitted provided that the following conditions are 10452 // met: 10453 // 10454 // * Redistributions of source code must retain the above copyright 10455 // notice, this list of conditions and the following disclaimer. 10456 // * Redistributions in binary form must reproduce the above 10457 // copyright notice, this list of conditions and the following disclaimer 10458 // in the documentation and/or other materials provided with the 10459 // distribution. 10460 // * Neither the name of Google Inc. nor the name Chromium Embedded 10461 // Framework nor the names of its contributors may be used to endorse 10462 // or promote products derived from this software without specific prior 10463 // written permission. 10464 // 10465 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10466 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10467 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10468 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10469 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10470 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10471 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10472 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10473 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10474 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10475 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10476 // 10477 // --------------------------------------------------------------------------- 10478 // 10479 // This file was generated by the CEF translator tool and should not edited 10480 // by hand. See the translator.README.txt file in the tools directory for 10481 // more information. 10482 // 10483 // $hash=69545645f079f4593d9cbb6d8a36535c209245f7$ 10484 // 10485 10486 extern (C): 10487 10488 /// 10489 /// Callback structure for asynchronous continuation of file dialog requests. 10490 /// 10491 struct cef_file_dialog_callback_t 10492 { 10493 /// 10494 /// Base structure. 10495 /// 10496 10497 /// 10498 /// Continue the file selection. |file_paths| should be a single value or a 10499 /// list of values depending on the dialog mode. An NULL |file_paths| value is 10500 /// treated the same as calling cancel(). 10501 /// 10502 10503 /// 10504 /// Cancel the file selection. 10505 /// 10506 10507 /// 10508 /// Implement this structure to handle dialog events. The functions of this 10509 /// structure will be called on the browser process UI thread. 10510 /// 10511 g 10512 cef_base_ref_counted_t base; 10513 extern(System) void function ( 10514 cef_file_dialog_callback_t* self, 10515 cef_string_list_t file_paths) nothrow cont; 10516 extern(System) void function (cef_file_dialog_callback_t* self) nothrow cancel; 10517 } 10518 10519 10520 10521 struct cef_dialog_handler_t 10522 { 10523 /// 10524 /// Base structure. 10525 /// 10526 cef_base_ref_counted_t base; 10527 10528 /// 10529 /// Called to run a file chooser dialog. |mode| represents the type of dialog 10530 /// to display. |title| to the title to be used for the dialog and may be NULL 10531 /// to show the default title ("Open" or "Save" depending on the mode). 10532 /// |default_file_path| is the path with optional directory and/or file name 10533 /// component that should be initially selected in the dialog. 10534 /// |accept_filters| are used to restrict the selectable file types and may 10535 /// any combination of (a) valid lower-cased MIME types (e.g. "text/*" or 10536 /// "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c) 10537 /// combined description and file extension delimited using "|" and ";" (e.g. 10538 /// "Image Types|.png;.gif;.jpg"). To display a custom dialog return true (1) 10539 /// and execute |callback| either inline or at a later time. To display the 10540 /// default dialog return false (0). 10541 /// 10542 extern(System) int function ( 10543 cef_dialog_handler_t* self, 10544 cef_browser_t* browser, 10545 cef_file_dialog_mode_t mode, 10546 const(cef_string_t)* title, 10547 const(cef_string_t)* default_file_path, 10548 cef_string_list_t accept_filters, 10549 cef_file_dialog_callback_t* callback) nothrow on_file_dialog; 10550 } 10551 10552 10553 10554 // CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ 10555 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 10556 // 10557 // Redistribution and use in source and binary forms, with or without 10558 // modification, are permitted provided that the following conditions are 10559 // met: 10560 // 10561 // * Redistributions of source code must retain the above copyright 10562 // notice, this list of conditions and the following disclaimer. 10563 // * Redistributions in binary form must reproduce the above 10564 // copyright notice, this list of conditions and the following disclaimer 10565 // in the documentation and/or other materials provided with the 10566 // distribution. 10567 // * Neither the name of Google Inc. nor the name Chromium Embedded 10568 // Framework nor the names of its contributors may be used to endorse 10569 // or promote products derived from this software without specific prior 10570 // written permission. 10571 // 10572 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10573 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10574 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10575 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10576 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10577 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10578 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10579 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10580 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10581 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10582 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10583 // 10584 // --------------------------------------------------------------------------- 10585 // 10586 // This file was generated by the CEF translator tool and should not edited 10587 // by hand. See the translator.README.txt file in the tools directory for 10588 // more information. 10589 // 10590 // $hash=5374127458a7cac3ee9b4d2b4ad8a6f5ca81ec52$ 10591 // 10592 10593 import core.stdc.config; 10594 10595 extern (C): 10596 10597 /// 10598 /// Implement this structure to handle events related to browser display state. 10599 /// The functions of this structure will be called on the UI thread. 10600 /// 10601 struct cef_display_handler_t 10602 { 10603 /// 10604 /// Base structure. 10605 /// 10606 10607 /// 10608 /// Called when a frame's address has changed. 10609 /// 10610 10611 /// 10612 /// Called when the page title changes. 10613 /// 10614 g 10615 cef_base_ref_counted_t base; 10616 extern(System) void function ( 10617 cef_display_handler_t* self, 10618 cef_browser_t* browser, 10619 cef_frame_t* frame, 10620 const(cef_string_t)* url) nothrow on_address_change; 10621 extern(System) void function ( 10622 cef_display_handler_t* self, 10623 cef_browser_t* browser, 10624 const(cef_string_t)* title) nothrow on_title_change; 10625 /// 10626 /// Called when the page icon changes. 10627 /// 10628 extern(System) void function ( 10629 cef_display_handler_t* self, 10630 cef_browser_t* browser, 10631 cef_string_list_t icon_urls) nothrow on_favicon_urlchange; 10632 10633 /// 10634 /// Called when web content in the page has toggled fullscreen mode. If 10635 /// |fullscreen| is true (1) the content will automatically be sized to fill 10636 /// the browser content area. If |fullscreen| is false (0) the content will 10637 /// automatically return to its original size and position. With the Alloy 10638 /// runtime the client is responsible for triggering the fullscreen transition 10639 /// (for example, by calling cef_window_t::SetFullscreen when using Views). 10640 /// With the Chrome runtime the fullscreen transition will be triggered 10641 /// automatically. The cef_window_delegate_t::OnWindowFullscreenTransition 10642 /// function will be called during the fullscreen transition for notification 10643 /// purposes. 10644 /// 10645 extern(System) void function ( 10646 cef_display_handler_t* self, 10647 cef_browser_t* browser, 10648 int fullscreen) nothrow on_fullscreen_mode_change; 10649 10650 /// 10651 /// Called when the browser is about to display a tooltip. |text| contains the 10652 /// text that will be displayed in the tooltip. To handle the display of the 10653 /// tooltip yourself return true (1). Otherwise, you can optionally modify 10654 /// |text| and then return false (0) to allow the browser to display the 10655 /// tooltip. When window rendering is disabled the application is responsible 10656 /// for drawing tooltips and the return value is ignored. 10657 /// 10658 extern(System) int function ( 10659 cef_display_handler_t* self, 10660 cef_browser_t* browser, 10661 cef_string_t* text) nothrow on_tooltip; 10662 10663 /// 10664 /// Called when the browser receives a status message. |value| contains the 10665 /// text that will be displayed in the status message. 10666 /// 10667 extern(System) void function ( 10668 cef_display_handler_t* self, 10669 cef_browser_t* browser, 10670 const(cef_string_t)* value) nothrow on_status_message; 10671 10672 /// 10673 /// Called to display a console message. Return true (1) to stop the message 10674 /// from being output to the console. 10675 /// 10676 extern(System) int function ( 10677 cef_display_handler_t* self, 10678 cef_browser_t* browser, 10679 cef_log_severity_t level, 10680 const(cef_string_t)* message, 10681 const(cef_string_t)* source, 10682 int line) nothrow on_console_message; 10683 10684 /// 10685 /// Called when auto-resize is enabled via 10686 /// cef_browser_host_t::SetAutoResizeEnabled and the contents have auto- 10687 /// resized. |new_size| will be the desired size in view coordinates. Return 10688 /// true (1) if the resize was handled or false (0) for default handling. 10689 /// 10690 extern(System) int function ( 10691 cef_display_handler_t* self, 10692 cef_browser_t* browser, 10693 const(cef_size_t)* new_size) nothrow on_auto_resize; 10694 10695 /// 10696 /// Called when the overall page loading progress has changed. |progress| 10697 /// ranges from 0.0 to 1.0. 10698 /// 10699 extern(System) void function ( 10700 cef_display_handler_t* self, 10701 cef_browser_t* browser, 10702 double progress) nothrow on_loading_progress_change; 10703 10704 /// 10705 /// Called when the browser's cursor has changed. If |type| is CT_CUSTOM then 10706 /// |custom_cursor_info| will be populated with the custom cursor information. 10707 /// Return true (1) if the cursor change was handled or false (0) for default 10708 /// handling. 10709 /// 10710 extern(System) int function ( 10711 cef_display_handler_t* self, 10712 cef_browser_t* browser, 10713 c_ulong cursor, 10714 cef_cursor_type_t type, 10715 const(cef_cursor_info_t)* custom_cursor_info) nothrow on_cursor_change; 10716 10717 /// 10718 /// Called when the browser's access to an audio and/or video source has 10719 /// changed. 10720 /// 10721 extern(System) void function ( 10722 cef_display_handler_t* self, 10723 cef_browser_t* browser, 10724 int has_video_access, 10725 int has_audio_access) nothrow on_media_access_change; 10726 } 10727 10728 10729 10730 // CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ 10731 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 10732 // 10733 // Redistribution and use in source and binary forms, with or without 10734 // modification, are permitted provided that the following conditions are 10735 // met: 10736 // 10737 // * Redistributions of source code must retain the above copyright 10738 // notice, this list of conditions and the following disclaimer. 10739 // * Redistributions in binary form must reproduce the above 10740 // copyright notice, this list of conditions and the following disclaimer 10741 // in the documentation and/or other materials provided with the 10742 // distribution. 10743 // * Neither the name of Google Inc. nor the name Chromium Embedded 10744 // Framework nor the names of its contributors may be used to endorse 10745 // or promote products derived from this software without specific prior 10746 // written permission. 10747 // 10748 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10749 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10750 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10751 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 10752 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 10753 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 10754 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 10755 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 10756 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 10757 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10758 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10759 // 10760 // --------------------------------------------------------------------------- 10761 // 10762 // This file was generated by the CEF translator tool and should not edited 10763 // by hand. See the translator.README.txt file in the tools directory for 10764 // more information. 10765 // 10766 // $hash=f18407bec715e682d5745aeb155a0113473723dd$ 10767 // 10768 10769 extern (C): 10770 10771 /// 10772 /// Structure to implement for visiting the DOM. The functions of this structure 10773 /// will be called on the render process main thread. 10774 /// 10775 struct cef_domvisitor_t 10776 { 10777 /// 10778 /// Base structure. 10779 /// 10780 10781 /// 10782 /// Method executed for visiting the DOM. The document object passed to this 10783 /// function represents a snapshot of the DOM at the time this function is 10784 /// executed. DOM objects are only valid for the scope of this function. Do 10785 /// not keep references to or attempt to access any DOM objects outside the 10786 /// scope of this function. 10787 /// 10788 10789 /// 10790 /// Structure used to represent a DOM document. The functions of this structure 10791 /// should only be called on the render process main thread thread. 10792 g 10793 cef_base_ref_counted_t base; 10794 extern(System) void function ( 10795 cef_domvisitor_t* self, 10796 cef_domdocument_t* document) nothrow visit; 10797 } 10798 10799 10800 /// 10801 struct cef_domdocument_t 10802 { 10803 /// 10804 /// Base structure. 10805 /// 10806 cef_base_ref_counted_t base; 10807 10808 /// 10809 /// Returns the document type. 10810 /// 10811 extern(System) cef_dom_document_type_t function (cef_domdocument_t* self) nothrow get_type; 10812 10813 /// 10814 /// Returns the root document node. 10815 /// 10816 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_document; 10817 10818 /// 10819 /// Returns the BODY node of an HTML document. 10820 /// 10821 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_body; 10822 10823 /// 10824 /// Returns the HEAD node of an HTML document. 10825 /// 10826 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_head; 10827 10828 /// 10829 /// Returns the title of an HTML document. 10830 /// 10831 // The resulting string must be freed by calling cef_string_userfree_free(). 10832 extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_title; 10833 10834 /// 10835 /// Returns the document element with the specified ID value. 10836 /// 10837 extern(System) cef_domnode_t* function ( 10838 cef_domdocument_t* self, 10839 const(cef_string_t)* id) nothrow get_element_by_id; 10840 10841 /// 10842 /// Returns the node that currently has keyboard focus. 10843 /// 10844 extern(System) cef_domnode_t* function (cef_domdocument_t* self) nothrow get_focused_node; 10845 10846 /// 10847 /// Returns true (1) if a portion of the document is selected. 10848 /// 10849 extern(System) int function (cef_domdocument_t* self) nothrow has_selection; 10850 10851 /// 10852 /// Returns the selection offset within the start node. 10853 /// 10854 extern(System) int function (cef_domdocument_t* self) nothrow get_selection_start_offset; 10855 10856 /// 10857 /// Returns the selection offset within the end node. 10858 /// 10859 extern(System) int function (cef_domdocument_t* self) nothrow get_selection_end_offset; 10860 10861 /// 10862 /// Returns the contents of this selection as markup. 10863 /// 10864 // The resulting string must be freed by calling cef_string_userfree_free(). 10865 extern(System) cef_string_userfree_t function ( 10866 cef_domdocument_t* self) nothrow get_selection_as_markup; 10867 10868 /// 10869 /// Returns the contents of this selection as text. 10870 /// 10871 // The resulting string must be freed by calling cef_string_userfree_free(). 10872 extern(System) cef_string_userfree_t function ( 10873 cef_domdocument_t* self) nothrow get_selection_as_text; 10874 10875 /// 10876 /// Returns the base URL for the document. 10877 /// 10878 // The resulting string must be freed by calling cef_string_userfree_free(). 10879 extern(System) cef_string_userfree_t function (cef_domdocument_t* self) nothrow get_base_url; 10880 10881 /// 10882 /// Returns a complete URL based on the document base URL and the specified 10883 /// partial URL. 10884 /// 10885 // The resulting string must be freed by calling cef_string_userfree_free(). 10886 extern(System) cef_string_userfree_t function ( 10887 cef_domdocument_t* self, 10888 const(cef_string_t)* partialURL) nothrow get_complete_url; 10889 } 10890 10891 10892 10893 /// 10894 /// Structure used to represent a DOM node. The functions of this structure 10895 /// should only be called on the render process main thread. 10896 /// 10897 struct cef_domnode_t 10898 { 10899 /// 10900 /// Base structure. 10901 /// 10902 cef_base_ref_counted_t base; 10903 10904 /// 10905 /// Returns the type for this node. 10906 /// 10907 extern(System) cef_dom_node_type_t function (cef_domnode_t* self) nothrow get_type; 10908 10909 /// 10910 /// Returns true (1) if this is a text node. 10911 /// 10912 extern(System) int function (cef_domnode_t* self) nothrow is_text; 10913 10914 /// 10915 /// Returns true (1) if this is an element node. 10916 /// 10917 extern(System) int function (cef_domnode_t* self) nothrow is_element; 10918 10919 /// 10920 /// Returns true (1) if this is an editable node. 10921 /// 10922 extern(System) int function (cef_domnode_t* self) nothrow is_editable; 10923 10924 /// 10925 /// Returns true (1) if this is a form control element node. 10926 /// 10927 extern(System) int function (cef_domnode_t* self) nothrow is_form_control_element; 10928 10929 /// 10930 /// Returns the type of this form control element node. 10931 /// 10932 extern(System) cef_dom_form_control_type_t function ( 10933 cef_domnode_t* self) nothrow get_form_control_element_type; 10934 10935 /// 10936 /// Returns true (1) if this object is pointing to the same handle as |that| 10937 /// object. 10938 /// 10939 extern(System) int function (cef_domnode_t* self, cef_domnode_t* that) nothrow is_same; 10940 10941 /// 10942 /// Returns the name of this node. 10943 /// 10944 // The resulting string must be freed by calling cef_string_userfree_free(). 10945 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_name; 10946 10947 /// 10948 /// Returns the value of this node. 10949 /// 10950 // The resulting string must be freed by calling cef_string_userfree_free(). 10951 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_value; 10952 10953 /// 10954 /// Set the value of this node. Returns true (1) on success. 10955 /// 10956 extern(System) int function (cef_domnode_t* self, const(cef_string_t)* value) nothrow set_value; 10957 10958 /// 10959 /// Returns the contents of this node as markup. 10960 /// 10961 // The resulting string must be freed by calling cef_string_userfree_free(). 10962 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_as_markup; 10963 10964 /// 10965 /// Returns the document associated with this node. 10966 /// 10967 extern(System) cef_domdocument_t* function (cef_domnode_t* self) nothrow get_document; 10968 10969 /// 10970 /// Returns the parent node. 10971 /// 10972 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_parent; 10973 10974 /// 10975 /// Returns the previous sibling node. 10976 /// 10977 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_previous_sibling; 10978 10979 /// 10980 /// Returns the next sibling node. 10981 /// 10982 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_next_sibling; 10983 10984 /// 10985 /// Returns true (1) if this node has child nodes. 10986 /// 10987 extern(System) int function (cef_domnode_t* self) nothrow has_children; 10988 10989 /// 10990 /// Return the first child node. 10991 /// 10992 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_first_child; 10993 10994 /// 10995 /// Returns the last child node. 10996 /// 10997 extern(System) cef_domnode_t* function (cef_domnode_t* self) nothrow get_last_child; 10998 10999 /// 11000 /// Returns the tag name of this element. 11001 /// 11002 // The resulting string must be freed by calling cef_string_userfree_free(). 11003 extern(System) cef_string_userfree_t function (cef_domnode_t* self) nothrow get_element_tag_name; 11004 11005 /// 11006 /// Returns true (1) if this element has attributes. 11007 /// 11008 extern(System) int function (cef_domnode_t* self) nothrow has_element_attributes; 11009 11010 /// 11011 /// Returns true (1) if this element has an attribute named |attrName|. 11012 /// 11013 extern(System) int function ( 11014 cef_domnode_t* self, 11015 const(cef_string_t)* attrName) nothrow has_element_attribute; 11016 11017 /// 11018 /// Returns the element attribute named |attrName|. 11019 /// 11020 // The resulting string must be freed by calling cef_string_userfree_free(). 11021 extern(System) cef_string_userfree_t function ( 11022 cef_domnode_t* self, 11023 const(cef_string_t)* attrName) nothrow get_element_attribute; 11024 11025 /// 11026 /// Returns a map of all element attributes. 11027 /// 11028 extern(System) void function ( 11029 cef_domnode_t* self, 11030 cef_string_map_t attrMap) nothrow get_element_attributes; 11031 11032 /// 11033 /// Set the value for the element attribute named |attrName|. Returns true (1) 11034 /// on success. 11035 /// 11036 extern(System) int function ( 11037 cef_domnode_t* self, 11038 const(cef_string_t)* attrName, 11039 const(cef_string_t)* value) nothrow set_element_attribute; 11040 11041 /// 11042 /// Returns the inner text of the element. 11043 /// 11044 // The resulting string must be freed by calling cef_string_userfree_free(). 11045 extern(System) cef_string_userfree_t function ( 11046 cef_domnode_t* self) nothrow get_element_inner_text; 11047 11048 /// 11049 /// Returns the bounds of the element in device pixels. Use 11050 /// "window.devicePixelRatio" to convert to/from CSS pixels. 11051 /// 11052 extern(System) cef_rect_t function (cef_domnode_t* self) nothrow get_element_bounds; 11053 } 11054 11055 11056 11057 // CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_ 11058 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 11059 // 11060 // Redistribution and use in source and binary forms, with or without 11061 // modification, are permitted provided that the following conditions are 11062 // met: 11063 // 11064 // * Redistributions of source code must retain the above copyright 11065 // notice, this list of conditions and the following disclaimer. 11066 // * Redistributions in binary form must reproduce the above 11067 // copyright notice, this list of conditions and the following disclaimer 11068 // in the documentation and/or other materials provided with the 11069 // distribution. 11070 // * Neither the name of Google Inc. nor the name Chromium Embedded 11071 // Framework nor the names of its contributors may be used to endorse 11072 // or promote products derived from this software without specific prior 11073 // written permission. 11074 // 11075 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11076 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11077 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11078 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11079 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11080 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11081 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11082 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11083 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11084 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11085 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11086 // 11087 // --------------------------------------------------------------------------- 11088 // 11089 // This file was generated by the CEF translator tool and should not edited 11090 // by hand. See the translator.README.txt file in the tools directory for 11091 // more information. 11092 // 11093 // $hash=f1f6a110a7ce15611a7062b3d7fe8b5c630f2980$ 11094 // 11095 11096 extern (C): 11097 11098 /// 11099 /// Callback structure used to asynchronously continue a download. 11100 /// 11101 struct cef_before_download_callback_t 11102 { 11103 /// 11104 /// Base structure. 11105 /// 11106 11107 /// 11108 /// Call to continue the download. Set |download_path| to the full file path 11109 /// for the download including the file name or leave blank to use the 11110 /// suggested name and the default temp directory. Set |show_dialog| to true 11111 /// (1) if you do wish to show the default "Save As" dialog. 11112 /// 11113 11114 /// 11115 /// Callback structure used to asynchronously cancel a download. 11116 /// 11117 g 11118 cef_base_ref_counted_t base; 11119 extern(System) void function ( 11120 cef_before_download_callback_t* self, 11121 const(cef_string_t)* download_path, 11122 int show_dialog) nothrow cont; 11123 } 11124 11125 11126 11127 struct cef_download_item_callback_t 11128 { 11129 /// 11130 /// Base structure. 11131 /// 11132 cef_base_ref_counted_t base; 11133 11134 /// 11135 /// Call to cancel the download. 11136 /// 11137 extern(System) void function (cef_download_item_callback_t* self) nothrow cancel; 11138 11139 /// 11140 /// Call to pause the download. 11141 /// 11142 extern(System) void function (cef_download_item_callback_t* self) nothrow pause; 11143 11144 /// 11145 /// Call to resume the download. 11146 /// 11147 extern(System) void function (cef_download_item_callback_t* self) nothrow resume; 11148 } 11149 11150 11151 11152 /// 11153 /// Structure used to handle file downloads. The functions of this structure 11154 /// will called on the browser process UI thread. 11155 /// 11156 struct cef_download_handler_t 11157 { 11158 /// 11159 /// Base structure. 11160 /// 11161 cef_base_ref_counted_t base; 11162 11163 /// 11164 /// Called before a download begins in response to a user-initiated action 11165 /// (e.g. alt + link click or link click that returns a `Content-Disposition: 11166 /// attachment` response from the server). |url| is the target download URL 11167 /// and |request_function| is the target function (GET, POST, etc) nothrow. Return 11168 /// true (1) to proceed with the download or false (0) to cancel the download. 11169 /// 11170 extern(System) int function ( 11171 cef_download_handler_t* self, 11172 cef_browser_t* browser, 11173 const(cef_string_t)* url, 11174 const(cef_string_t)* request_method) nothrow can_download; 11175 11176 /// 11177 /// Called before a download begins. |suggested_name| is the suggested name 11178 /// for the download file. By default the download will be canceled. Execute 11179 /// |callback| either asynchronously or in this function to continue the 11180 /// download if desired. Do not keep a reference to |download_item| outside of 11181 /// this function. 11182 /// 11183 extern(System) void function ( 11184 cef_download_handler_t* self, 11185 cef_browser_t* browser, 11186 cef_download_item_t* download_item, 11187 const(cef_string_t)* suggested_name, 11188 cef_before_download_callback_t* callback) nothrow on_before_download; 11189 11190 /// 11191 /// Called when a download's status or progress information has been updated. 11192 /// This may be called multiple times before and after on_before_download(). 11193 /// Execute |callback| either asynchronously or in this function to cancel the 11194 /// download if desired. Do not keep a reference to |download_item| outside of 11195 /// this function. 11196 /// 11197 extern(System) void function ( 11198 cef_download_handler_t* self, 11199 cef_browser_t* browser, 11200 cef_download_item_t* download_item, 11201 cef_download_item_callback_t* callback) nothrow on_download_updated; 11202 } 11203 11204 11205 11206 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ 11207 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 11208 // 11209 // Redistribution and use in source and binary forms, with or without 11210 // modification, are permitted provided that the following conditions are 11211 // met: 11212 // 11213 // * Redistributions of source code must retain the above copyright 11214 // notice, this list of conditions and the following disclaimer. 11215 // * Redistributions in binary form must reproduce the above 11216 // copyright notice, this list of conditions and the following disclaimer 11217 // in the documentation and/or other materials provided with the 11218 // distribution. 11219 // * Neither the name of Google Inc. nor the name Chromium Embedded 11220 // Framework nor the names of its contributors may be used to endorse 11221 // or promote products derived from this software without specific prior 11222 // written permission. 11223 // 11224 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11225 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11226 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11227 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11228 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11229 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11230 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11231 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11232 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11233 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11234 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11235 // 11236 // --------------------------------------------------------------------------- 11237 // 11238 // This file was generated by the CEF translator tool and should not edited 11239 // by hand. See the translator.README.txt file in the tools directory for 11240 // more information. 11241 // 11242 // $hash=c4ecfde5d6791400c4b3fd466e7d3676d51cf8d8$ 11243 // 11244 11245 extern (C): 11246 11247 /// 11248 /// Structure used to represent a download item. 11249 /// 11250 struct cef_download_item_t 11251 { 11252 /// 11253 /// Base structure. 11254 /// 11255 11256 /// 11257 /// Returns true (1) if this object is valid. Do not call any other functions 11258 /// if this function returns false (0). 11259 /// 11260 11261 /// 11262 /// Returns true (1) if the download is in progress. 11263 /// 11264 11265 /// 11266 /// Returns true (1) if the download is complete. 11267 /// 11268 11269 /// 11270 /// Returns true (1) if the download has been canceled. 11271 /// 11272 11273 /// 11274 /// Returns true (1) if the download has been interrupted. 11275 /// 11276 g 11277 cef_base_ref_counted_t base; 11278 extern(System) int function (cef_download_item_t* self) nothrow is_valid; 11279 extern(System) int function (cef_download_item_t* self) nothrow is_in_progress; 11280 extern(System) int function (cef_download_item_t* self) nothrow is_complete; 11281 extern(System) int function (cef_download_item_t* self) nothrow is_canceled; 11282 extern(System) int function (cef_download_item_t* self) nothrow is_interrupted; 11283 11284 /// 11285 /// Returns the most recent interrupt reason. 11286 /// 11287 extern(System) cef_download_interrupt_reason_t function ( 11288 cef_download_item_t* self) nothrow get_interrupt_reason; 11289 11290 /// 11291 /// Returns a simple speed estimate in bytes/s. 11292 /// 11293 extern(System) long function (cef_download_item_t* self) nothrow get_current_speed; 11294 11295 /// 11296 /// Returns the rough percent complete or -1 if the receive total size is 11297 /// unknown. 11298 /// 11299 extern(System) int function (cef_download_item_t* self) nothrow get_percent_complete; 11300 11301 /// 11302 /// Returns the total number of bytes. 11303 /// 11304 extern(System) long function (cef_download_item_t* self) nothrow get_total_bytes; 11305 11306 /// 11307 /// Returns the number of received bytes. 11308 /// 11309 extern(System) long function (cef_download_item_t* self) nothrow get_received_bytes; 11310 11311 /// 11312 /// Returns the time that the download started. 11313 /// 11314 extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_start_time; 11315 11316 /// 11317 /// Returns the time that the download ended. 11318 /// 11319 extern(System) cef_basetime_t function (cef_download_item_t* self) nothrow get_end_time; 11320 11321 /// 11322 /// Returns the full path to the downloaded or downloading file. 11323 /// 11324 // The resulting string must be freed by calling cef_string_userfree_free(). 11325 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_full_path; 11326 11327 /// 11328 /// Returns the unique identifier for this download. 11329 /// 11330 extern(System) uint function (cef_download_item_t* self) nothrow get_id; 11331 11332 /// 11333 /// Returns the URL. 11334 /// 11335 // The resulting string must be freed by calling cef_string_userfree_free(). 11336 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_url; 11337 11338 /// 11339 /// Returns the original URL before any redirections. 11340 /// 11341 // The resulting string must be freed by calling cef_string_userfree_free(). 11342 extern(System) cef_string_userfree_t function ( 11343 cef_download_item_t* self) nothrow get_original_url; 11344 11345 /// 11346 /// Returns the suggested file name. 11347 /// 11348 // The resulting string must be freed by calling cef_string_userfree_free(). 11349 extern(System) cef_string_userfree_t function ( 11350 cef_download_item_t* self) nothrow get_suggested_file_name; 11351 11352 /// 11353 /// Returns the content disposition. 11354 /// 11355 // The resulting string must be freed by calling cef_string_userfree_free(). 11356 extern(System) cef_string_userfree_t function ( 11357 cef_download_item_t* self) nothrow get_content_disposition; 11358 11359 /// 11360 /// Returns the mime type. 11361 /// 11362 // The resulting string must be freed by calling cef_string_userfree_free(). 11363 extern(System) cef_string_userfree_t function (cef_download_item_t* self) nothrow get_mime_type; 11364 } 11365 11366 11367 11368 // CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ 11369 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 11370 // 11371 // Redistribution and use in source and binary forms, with or without 11372 // modification, are permitted provided that the following conditions are 11373 // met: 11374 // 11375 // * Redistributions of source code must retain the above copyright 11376 // notice, this list of conditions and the following disclaimer. 11377 // * Redistributions in binary form must reproduce the above 11378 // copyright notice, this list of conditions and the following disclaimer 11379 // in the documentation and/or other materials provided with the 11380 // distribution. 11381 // * Neither the name of Google Inc. nor the name Chromium Embedded 11382 // Framework nor the names of its contributors may be used to endorse 11383 // or promote products derived from this software without specific prior 11384 // written permission. 11385 // 11386 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11387 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11388 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11389 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11390 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11391 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11392 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11393 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11394 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11395 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11396 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11397 // 11398 // --------------------------------------------------------------------------- 11399 // 11400 // This file was generated by the CEF translator tool and should not edited 11401 // by hand. See the translator.README.txt file in the tools directory for 11402 // more information. 11403 // 11404 // $hash=8d00465ba004758f464cdb8b1fbd02cd26323ace$ 11405 // 11406 11407 extern (C): 11408 11409 /// 11410 /// Structure used to represent drag data. The functions of this structure may 11411 /// be called on any thread. 11412 /// 11413 struct cef_drag_data_t 11414 { 11415 /// 11416 /// Base structure. 11417 /// 11418 11419 /// 11420 /// Returns a copy of the current object. 11421 /// 11422 11423 /// 11424 /// Returns true (1) if this object is read-only. 11425 /// 11426 11427 /// 11428 /// Returns true (1) if the drag data is a link. 11429 /// 11430 11431 /// 11432 /// Returns true (1) if the drag data is a text or html fragment. 11433 /// 11434 11435 /// 11436 /// Returns true (1) if the drag data is a file. 11437 /// 11438 g 11439 cef_base_ref_counted_t base; 11440 extern(System) cef_drag_data_t* function (cef_drag_data_t* self) nothrow clone; 11441 extern(System) int function (cef_drag_data_t* self) nothrow is_read_only; 11442 extern(System) int function (cef_drag_data_t* self) nothrow is_link; 11443 extern(System) int function (cef_drag_data_t* self) nothrow is_fragment; 11444 extern(System) int function (cef_drag_data_t* self) nothrow is_file; 11445 11446 /// 11447 /// Return the link URL that is being dragged. 11448 /// 11449 // The resulting string must be freed by calling cef_string_userfree_free(). 11450 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_url; 11451 11452 /// 11453 /// Return the title associated with the link being dragged. 11454 /// 11455 // The resulting string must be freed by calling cef_string_userfree_free(). 11456 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_title; 11457 11458 /// 11459 /// Return the metadata, if any, associated with the link being dragged. 11460 /// 11461 // The resulting string must be freed by calling cef_string_userfree_free(). 11462 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_link_metadata; 11463 11464 /// 11465 /// Return the plain text fragment that is being dragged. 11466 /// 11467 // The resulting string must be freed by calling cef_string_userfree_free(). 11468 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_text; 11469 11470 /// 11471 /// Return the text/html fragment that is being dragged. 11472 /// 11473 // The resulting string must be freed by calling cef_string_userfree_free(). 11474 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_fragment_html; 11475 11476 /// 11477 /// Return the base URL that the fragment came from. This value is used for 11478 /// resolving relative URLs and may be NULL. 11479 /// 11480 // The resulting string must be freed by calling cef_string_userfree_free(). 11481 extern(System) cef_string_userfree_t function ( 11482 cef_drag_data_t* self) nothrow get_fragment_base_url; 11483 11484 /// 11485 /// Return the name of the file being dragged out of the browser window. 11486 /// 11487 // The resulting string must be freed by calling cef_string_userfree_free(). 11488 extern(System) cef_string_userfree_t function (cef_drag_data_t* self) nothrow get_file_name; 11489 11490 /// 11491 /// Write the contents of the file being dragged out of the web view into 11492 /// |writer|. Returns the number of bytes sent to |writer|. If |writer| is 11493 /// NULL this function will return the size of the file contents in bytes. 11494 /// Call get_file_name() to get a suggested name for the file. 11495 /// 11496 extern(System) size_t function ( 11497 cef_drag_data_t* self, 11498 cef_stream_writer_t* writer) nothrow get_file_contents; 11499 11500 /// 11501 /// Retrieve the list of file names that are being dragged into the browser 11502 /// window. 11503 /// 11504 extern(System) int function ( 11505 cef_drag_data_t* self, 11506 cef_string_list_t names) nothrow get_file_names; 11507 11508 /// 11509 /// Retrieve the list of file paths that are being dragged into the browser 11510 /// window. 11511 /// 11512 extern(System) int function ( 11513 cef_drag_data_t* self, 11514 cef_string_list_t paths) nothrow get_file_paths; 11515 11516 /// 11517 /// Set the link URL that is being dragged. 11518 /// 11519 extern(System) void function ( 11520 cef_drag_data_t* self, 11521 const(cef_string_t)* url) nothrow set_link_url; 11522 11523 /// 11524 /// Set the title associated with the link being dragged. 11525 /// 11526 extern(System) void function ( 11527 cef_drag_data_t* self, 11528 const(cef_string_t)* title) nothrow set_link_title; 11529 11530 /// 11531 /// Set the metadata associated with the link being dragged. 11532 /// 11533 extern(System) void function ( 11534 cef_drag_data_t* self, 11535 const(cef_string_t)* data) nothrow set_link_metadata; 11536 11537 /// 11538 /// Set the plain text fragment that is being dragged. 11539 /// 11540 extern(System) void function ( 11541 cef_drag_data_t* self, 11542 const(cef_string_t)* text) nothrow set_fragment_text; 11543 11544 /// 11545 /// Set the text/html fragment that is being dragged. 11546 /// 11547 extern(System) void function ( 11548 cef_drag_data_t* self, 11549 const(cef_string_t)* html) nothrow set_fragment_html; 11550 11551 /// 11552 /// Set the base URL that the fragment came from. 11553 /// 11554 extern(System) void function ( 11555 cef_drag_data_t* self, 11556 const(cef_string_t)* base_url) nothrow set_fragment_base_url; 11557 11558 /// 11559 /// Reset the file contents. You should do this before calling 11560 /// cef_browser_host_t::DragTargetDragEnter as the web view does not allow us 11561 /// to drag in this kind of data. 11562 /// 11563 extern(System) void function (cef_drag_data_t* self) nothrow reset_file_contents; 11564 11565 /// 11566 /// Add a file that is being dragged into the webview. 11567 /// 11568 extern(System) void function ( 11569 cef_drag_data_t* self, 11570 const(cef_string_t)* path, 11571 const(cef_string_t)* display_name) nothrow add_file; 11572 11573 /// 11574 /// Clear list of filenames. 11575 /// 11576 extern(System) void function (cef_drag_data_t* self) nothrow clear_filenames; 11577 11578 /// 11579 /// Get the image representation of drag data. May return NULL if no image 11580 /// representation is available. 11581 /// 11582 extern(System) cef_image_t* function (cef_drag_data_t* self) nothrow get_image; 11583 11584 /// 11585 /// Get the image hotspot (drag start location relative to image dimensions). 11586 /// 11587 extern(System) cef_point_t function (cef_drag_data_t* self) nothrow get_image_hotspot; 11588 11589 /// 11590 /// Returns true (1) if an image representation of drag data is available. 11591 /// 11592 extern(System) int function (cef_drag_data_t* self) nothrow has_image; 11593 } 11594 11595 11596 11597 /// 11598 /// Create a new cef_drag_data_t object. 11599 /// 11600 cef_drag_data_t* cef_drag_data_create (); 11601 11602 // CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_ 11603 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 11604 // 11605 // Redistribution and use in source and binary forms, with or without 11606 // modification, are permitted provided that the following conditions are 11607 // met: 11608 // 11609 // * Redistributions of source code must retain the above copyright 11610 // notice, this list of conditions and the following disclaimer. 11611 // * Redistributions in binary form must reproduce the above 11612 // copyright notice, this list of conditions and the following disclaimer 11613 // in the documentation and/or other materials provided with the 11614 // distribution. 11615 // * Neither the name of Google Inc. nor the name Chromium Embedded 11616 // Framework nor the names of its contributors may be used to endorse 11617 // or promote products derived from this software without specific prior 11618 // written permission. 11619 // 11620 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11621 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11622 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11623 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11624 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11625 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11626 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11627 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11628 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11629 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11630 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11631 // 11632 // --------------------------------------------------------------------------- 11633 // 11634 // This file was generated by the CEF translator tool and should not edited 11635 // by hand. See the translator.README.txt file in the tools directory for 11636 // more information. 11637 // 11638 // $hash=ad16b0f4320d7b363efb152a65e3ce142882b9d9$ 11639 // 11640 11641 extern (C): 11642 11643 /// 11644 /// Implement this structure to handle events related to dragging. The functions 11645 /// of this structure will be called on the UI thread. 11646 /// 11647 struct cef_drag_handler_t 11648 { 11649 /// 11650 /// Base structure. 11651 /// 11652 11653 /// 11654 /// Called when an external drag event enters the browser window. |dragData| 11655 /// contains the drag event data and |mask| represents the type of drag 11656 /// operation. Return false (0) for default drag handling behavior or true (1) 11657 /// to cancel the drag event. 11658 /// 11659 g 11660 cef_base_ref_counted_t base; 11661 extern(System) int function ( 11662 cef_drag_handler_t* self, 11663 cef_browser_t* browser, 11664 cef_drag_data_t* dragData, 11665 cef_drag_operations_mask_t mask) nothrow on_drag_enter; 11666 /// 11667 /// Called whenever draggable regions for the browser window change. These can 11668 /// be specified using the '-webkit-app-region: drag/no-drag' CSS-property. If 11669 /// draggable regions are never defined in a document this function will also 11670 /// never be called. If the last draggable region is removed from a document 11671 /// this function will be called with an NULL vector. 11672 /// 11673 extern(System) void function ( 11674 cef_drag_handler_t* self, 11675 cef_browser_t* browser, 11676 cef_frame_t* frame, 11677 size_t regionsCount, 11678 const(cef_draggable_region_t)* regions) nothrow on_draggable_regions_changed; 11679 } 11680 11681 11682 11683 // CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ 11684 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 11685 // 11686 // Redistribution and use in source and binary forms, with or without 11687 // modification, are permitted provided that the following conditions are 11688 // met: 11689 // 11690 // * Redistributions of source code must retain the above copyright 11691 // notice, this list of conditions and the following disclaimer. 11692 // * Redistributions in binary form must reproduce the above 11693 // copyright notice, this list of conditions and the following disclaimer 11694 // in the documentation and/or other materials provided with the 11695 // distribution. 11696 // * Neither the name of Google Inc. nor the name Chromium Embedded 11697 // Framework nor the names of its contributors may be used to endorse 11698 // or promote products derived from this software without specific prior 11699 // written permission. 11700 // 11701 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11702 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11703 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11704 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11705 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11706 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11707 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11708 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11709 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11710 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11711 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11712 // 11713 // --------------------------------------------------------------------------- 11714 // 11715 // This file was generated by the CEF translator tool and should not edited 11716 // by hand. See the translator.README.txt file in the tools directory for 11717 // more information. 11718 // 11719 // $hash=c81a74622b987483e5fcd2c508aec5c13e12389b$ 11720 // 11721 11722 extern (C): 11723 11724 11725 11726 11727 /// 11728 /// Object representing an extension. Methods may be called on any thread unless 11729 /// otherwise indicated. 11730 /// 11731 struct cef_extension_t 11732 { 11733 /// 11734 /// Base structure. 11735 /// 11736 11737 /// 11738 /// Returns the unique extension identifier. This is calculated based on the 11739 /// extension public key, if available, or on the extension path. See 11740 /// https://developer.chrome.com/extensions/manifest/key for details. 11741 /// 11742 // The resulting string must be freed by calling cef_string_userfree_free(). 11743 11744 /// 11745 /// Returns the absolute path to the extension directory on disk. This value 11746 /// will be prefixed with PK_DIR_RESOURCES if a relative path was passed to 11747 /// cef_request_context_t::LoadExtension. 11748 g 11749 cef_base_ref_counted_t base; 11750 extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_identifier; 11751 /// 11752 // The resulting string must be freed by calling cef_string_userfree_free(). 11753 extern(System) cef_string_userfree_t function (cef_extension_t* self) nothrow get_path; 11754 11755 /// 11756 /// Returns the extension manifest contents as a cef_dictionary_value_t 11757 /// object. See https://developer.chrome.com/extensions/manifest for details. 11758 /// 11759 extern(System) cef_dictionary_value_t* function (cef_extension_t* self) nothrow get_manifest; 11760 11761 /// 11762 /// Returns true (1) if this object is the same extension as |that| object. 11763 /// Extensions are considered the same if identifier, path and loader context 11764 /// match. 11765 /// 11766 extern(System) int function (cef_extension_t* self, cef_extension_t* that) nothrow is_same; 11767 11768 /// 11769 /// Returns the handler for this extension. Will return NULL for internal 11770 /// extensions or if no handler was passed to 11771 /// cef_request_context_t::LoadExtension. 11772 /// 11773 extern(System) cef_extension_handler_t* function (cef_extension_t* self) nothrow get_handler; 11774 11775 /// 11776 /// Returns the request context that loaded this extension. Will return NULL 11777 /// for internal extensions or if the extension has been unloaded. See the 11778 /// cef_request_context_t::LoadExtension documentation for more information 11779 /// about loader contexts. Must be called on the browser process UI thread. 11780 /// 11781 extern(System) cef_request_context_t* function ( 11782 cef_extension_t* self) nothrow get_loader_context; 11783 11784 /// 11785 /// Returns true (1) if this extension is currently loaded. Must be called on 11786 /// the browser process UI thread. 11787 /// 11788 extern(System) int function (cef_extension_t* self) nothrow is_loaded; 11789 11790 /// 11791 /// Unload this extension if it is not an internal extension and is currently 11792 /// loaded. Will result in a call to 11793 /// cef_extension_handler_t::OnExtensionUnloaded on success. 11794 /// 11795 extern(System) void function (cef_extension_t* self) nothrow unload; 11796 } 11797 11798 11799 11800 // CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_ 11801 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 11802 // 11803 // Redistribution and use in source and binary forms, with or without 11804 // modification, are permitted provided that the following conditions are 11805 // met: 11806 // 11807 // * Redistributions of source code must retain the above copyright 11808 // notice, this list of conditions and the following disclaimer. 11809 // * Redistributions in binary form must reproduce the above 11810 // copyright notice, this list of conditions and the following disclaimer 11811 // in the documentation and/or other materials provided with the 11812 // distribution. 11813 // * Neither the name of Google Inc. nor the name Chromium Embedded 11814 // Framework nor the names of its contributors may be used to endorse 11815 // or promote products derived from this software without specific prior 11816 // written permission. 11817 // 11818 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 11819 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 11820 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 11821 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11822 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 11823 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 11824 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 11825 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 11826 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 11827 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11828 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11829 // 11830 // --------------------------------------------------------------------------- 11831 // 11832 // This file was generated by the CEF translator tool and should not edited 11833 // by hand. See the translator.README.txt file in the tools directory for 11834 // more information. 11835 // 11836 // $hash=ad6d3845b150f22b88a71dafa601ef01c9579824$ 11837 // 11838 11839 extern (C): 11840 11841 11842 11843 /// 11844 /// Callback structure used for asynchronous continuation of 11845 /// cef_extension_handler_t::GetExtensionResource. 11846 /// 11847 struct cef_get_extension_resource_callback_t 11848 { 11849 /// 11850 /// Base structure. 11851 /// 11852 11853 /// 11854 /// Continue the request. Read the resource contents from |stream|. 11855 /// 11856 11857 /// 11858 /// Cancel the request. 11859 /// 11860 11861 /// 11862 /// Implement this structure to handle events related to browser extensions. The 11863 /// functions of this structure will be called on the UI thread. See 11864 g 11865 cef_base_ref_counted_t base; 11866 extern(System) void function ( 11867 cef_get_extension_resource_callback_t* self, 11868 cef_stream_reader_t* stream) nothrow cont; 11869 extern(System) void function (cef_get_extension_resource_callback_t* self) nothrow cancel; 11870 } 11871 11872 11873 /// cef_request_context_t::LoadExtension for information about extension 11874 /// loading. 11875 /// 11876 struct cef_extension_handler_t 11877 { 11878 /// 11879 /// Base structure. 11880 /// 11881 cef_base_ref_counted_t base; 11882 11883 /// 11884 /// Called if the cef_request_context_t::LoadExtension request fails. |result| 11885 /// will be the error code. 11886 /// 11887 extern(System) void function ( 11888 cef_extension_handler_t* self, 11889 cef_errorcode_t result) nothrow on_extension_load_failed; 11890 11891 /// 11892 /// Called if the cef_request_context_t::LoadExtension request succeeds. 11893 /// |extension| is the loaded extension. 11894 /// 11895 extern(System) void function ( 11896 cef_extension_handler_t* self, 11897 cef_extension_t* extension) nothrow on_extension_loaded; 11898 11899 /// 11900 /// Called after the cef_extension_t::Unload request has completed. 11901 /// 11902 extern(System) void function ( 11903 cef_extension_handler_t* self, 11904 cef_extension_t* extension) nothrow on_extension_unloaded; 11905 11906 /// 11907 /// Called when an extension needs a browser to host a background script 11908 /// specified via the "background" manifest key. The browser will have no 11909 /// visible window and cannot be displayed. |extension| is the extension that 11910 /// is loading the background script. |url| is an internally generated 11911 /// reference to an HTML page that will be used to load the background script 11912 /// via a "<script>" src attribute. To allow creation of the browser 11913 /// optionally modify |client| and |settings| and return false (0). To cancel 11914 /// creation of the browser (and consequently cancel load of the background 11915 /// script) return true (1). Successful creation will be indicated by a call 11916 /// to cef_life_span_handler_t::OnAfterCreated, and 11917 /// cef_browser_host_t::IsBackgroundHost will return true (1) for the 11918 /// resulting browser. See https://developer.chrome.com/extensions/event_pages 11919 /// for more information about extension background script usage. 11920 /// 11921 extern(System) int function ( 11922 cef_extension_handler_t* self, 11923 cef_extension_t* extension, 11924 const(cef_string_t)* url, 11925 cef_client_t** client, 11926 cef_browser_settings_t* settings) nothrow on_before_background_browser; 11927 11928 /// 11929 /// Called when an extension API (e.g. chrome.tabs.create) requests creation 11930 /// of a new browser. |extension| and |browser| are the source of the API 11931 /// call. |active_browser| may optionally be specified via the windowId 11932 /// property or returned via the get_active_browser() callback and provides 11933 /// the default |client| and |settings| values for the new browser. |index| is 11934 /// the position value optionally specified via the index property. |url| is 11935 /// the URL that will be loaded in the browser. |active| is true (1) if the 11936 /// new browser should be active when opened. To allow creation of the 11937 /// browser optionally modify |windowInfo|, |client| and |settings| and return 11938 /// false (0). To cancel creation of the browser return true (1). Successful 11939 /// creation will be indicated by a call to 11940 /// cef_life_span_handler_t::OnAfterCreated. Any modifications to |windowInfo| 11941 /// will be ignored if |active_browser| is wrapped in a cef_browser_view_t. 11942 /// 11943 extern(System) int function ( 11944 cef_extension_handler_t* self, 11945 cef_extension_t* extension, 11946 cef_browser_t* browser, 11947 cef_browser_t* active_browser, 11948 int index, 11949 const(cef_string_t)* url, 11950 int active, 11951 cef_window_info_t* windowInfo, 11952 cef_client_t** client, 11953 cef_browser_settings_t* settings) nothrow on_before_browser; 11954 11955 /// 11956 /// Called when no tabId is specified to an extension API call that accepts a 11957 /// tabId parameter (e.g. chrome.tabs.*). |extension| and |browser| are the 11958 /// source of the API call. Return the browser that will be acted on by the 11959 /// API call or return NULL to act on |browser|. The returned browser must 11960 /// share the same cef_request_context_t as |browser|. Incognito browsers 11961 /// should not be considered unless the source extension has incognito access 11962 /// enabled, in which case |include_incognito| will be true (1). 11963 /// 11964 extern(System) cef_browser_t* function ( 11965 cef_extension_handler_t* self, 11966 cef_extension_t* extension, 11967 cef_browser_t* browser, 11968 int include_incognito) nothrow get_active_browser; 11969 11970 /// 11971 /// Called when the tabId associated with |target_browser| is specified to an 11972 /// extension API call that accepts a tabId parameter (e.g. chrome.tabs.*). 11973 /// |extension| and |browser| are the source of the API call. Return true (1) 11974 /// to allow access of false (0) to deny access. Access to incognito browsers 11975 /// should not be allowed unless the source extension has incognito access 11976 /// enabled, in which case |include_incognito| will be true (1). 11977 /// 11978 extern(System) int function ( 11979 cef_extension_handler_t* self, 11980 cef_extension_t* extension, 11981 cef_browser_t* browser, 11982 int include_incognito, 11983 cef_browser_t* target_browser) nothrow can_access_browser; 11984 11985 /// 11986 /// Called to retrieve an extension resource that would normally be loaded 11987 /// from disk (e.g. if a file parameter is specified to 11988 /// chrome.tabs.executeScript). |extension| and |browser| are the source of 11989 /// the resource request. |file| is the requested relative file path. To 11990 /// handle the resource request return true (1) and execute |callback| either 11991 /// synchronously or asynchronously. For the default behavior which reads the 11992 /// resource from the extension directory on disk return false (0). 11993 /// Localization substitutions will not be applied to resources handled via 11994 /// this function. 11995 /// 11996 extern(System) int function ( 11997 cef_extension_handler_t* self, 11998 cef_extension_t* extension, 11999 cef_browser_t* browser, 12000 const(cef_string_t)* file, 12001 cef_get_extension_resource_callback_t* callback) nothrow get_extension_resource; 12002 } 12003 12004 12005 12006 // CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_ 12007 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12008 // 12009 // Redistribution and use in source and binary forms, with or without 12010 // modification, are permitted provided that the following conditions are 12011 // met: 12012 // 12013 // * Redistributions of source code must retain the above copyright 12014 // notice, this list of conditions and the following disclaimer. 12015 // * Redistributions in binary form must reproduce the above 12016 // copyright notice, this list of conditions and the following disclaimer 12017 // in the documentation and/or other materials provided with the 12018 // distribution. 12019 // * Neither the name of Google Inc. nor the name Chromium Embedded 12020 // Framework nor the names of its contributors may be used to endorse 12021 // or promote products derived from this software without specific prior 12022 // written permission. 12023 // 12024 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12025 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12026 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12027 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12028 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12029 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12030 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12031 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12032 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12033 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12034 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12035 // 12036 // --------------------------------------------------------------------------- 12037 // 12038 // This file was generated by the CEF translator tool and should not edited 12039 // by hand. See the translator.README.txt file in the tools directory for 12040 // more information. 12041 // 12042 // $hash=4e0e0abcb72327998df950e618b147b196e76b60$ 12043 // 12044 12045 extern (C): 12046 12047 /// 12048 /// Creates a directory and all parent directories if they don't already exist. 12049 /// Returns true (1) on successful creation or if the directory already exists. 12050 /// The directory is only readable by the current user. Calling this function on 12051 /// the browser process UI or IO threads is not allowed. 12052 /// 12053 int cef_create_directory (const(cef_string_t)* full_path); 12054 12055 /// 12056 /// Get the temporary directory provided by the system. 12057 /// 12058 /// WARNING: In general, you should use the temp directory variants below 12059 /// instead of this function. Those variants will ensure that the proper 12060 /// permissions are set so that other users on the system can't edit them while 12061 /// they're open (which could lead to security issues). 12062 /// 12063 int cef_get_temp_directory (cef_string_t* temp_dir); 12064 12065 /// 12066 /// Creates a new directory. On Windows if |prefix| is provided the new 12067 /// directory name is in the format of "prefixyyyy". Returns true (1) on success 12068 /// and sets |new_temp_path| to the full path of the directory that was created. 12069 /// The directory is only readable by the current user. Calling this function on 12070 /// the browser process UI or IO threads is not allowed. 12071 /// 12072 int cef_create_new_temp_directory ( 12073 const(cef_string_t)* prefix, 12074 cef_string_t* new_temp_path); 12075 12076 /// 12077 /// Creates a directory within another directory. Extra characters will be 12078 /// appended to |prefix| to ensure that the new directory does not have the same 12079 /// name as an existing directory. Returns true (1) on success and sets 12080 /// |new_dir| to the full path of the directory that was created. The directory 12081 /// is only readable by the current user. Calling this function on the browser 12082 /// process UI or IO threads is not allowed. 12083 /// 12084 int cef_create_temp_directory_in_directory ( 12085 const(cef_string_t)* base_dir, 12086 const(cef_string_t)* prefix, 12087 cef_string_t* new_dir); 12088 12089 /// 12090 /// Returns true (1) if the given path exists and is a directory. Calling this 12091 /// function on the browser process UI or IO threads is not allowed. 12092 /// 12093 int cef_directory_exists (const(cef_string_t)* path); 12094 12095 /// 12096 /// Deletes the given path whether it's a file or a directory. If |path| is a 12097 /// directory all contents will be deleted. If |recursive| is true (1) any sub- 12098 /// directories and their contents will also be deleted (equivalent to executing 12099 /// "rm -rf", so use with caution). On POSIX environments if |path| is a 12100 /// symbolic link then only the symlink will be deleted. Returns true (1) on 12101 /// successful deletion or if |path| does not exist. Calling this function on 12102 /// the browser process UI or IO threads is not allowed. 12103 /// 12104 int cef_delete_file (const(cef_string_t)* path, int recursive); 12105 12106 /// 12107 /// Writes the contents of |src_dir| into a zip archive at |dest_file|. If 12108 /// |include_hidden_files| is true (1) files starting with "." will be included. 12109 /// Returns true (1) on success. Calling this function on the browser process 12110 /// UI or IO threads is not allowed. 12111 /// 12112 int cef_zip_directory ( 12113 const(cef_string_t)* src_dir, 12114 const(cef_string_t)* dest_file, 12115 int include_hidden_files); 12116 12117 /// 12118 /// Loads the existing "Certificate Revocation Lists" file that is managed by 12119 /// Google Chrome. This file can generally be found in Chrome's User Data 12120 /// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on 12121 /// Windows) and is updated periodically by Chrome's component updater service. 12122 /// Must be called in the browser process after the context has been 12123 /// initialized. See https://dev.chromium.org/Home/chromium-security/crlsets for 12124 /// background. 12125 /// 12126 void cef_load_crlsets_file (const(cef_string_t)* path); 12127 12128 // CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_ 12129 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12130 // 12131 // Redistribution and use in source and binary forms, with or without 12132 // modification, are permitted provided that the following conditions are 12133 // met: 12134 // 12135 // * Redistributions of source code must retain the above copyright 12136 // notice, this list of conditions and the following disclaimer. 12137 // * Redistributions in binary form must reproduce the above 12138 // copyright notice, this list of conditions and the following disclaimer 12139 // in the documentation and/or other materials provided with the 12140 // distribution. 12141 // * Neither the name of Google Inc. nor the name Chromium Embedded 12142 // Framework nor the names of its contributors may be used to endorse 12143 // or promote products derived from this software without specific prior 12144 // written permission. 12145 // 12146 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12147 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12148 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12149 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12150 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12151 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12152 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12153 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12154 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12155 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12156 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12157 // 12158 // --------------------------------------------------------------------------- 12159 // 12160 // This file was generated by the CEF translator tool and should not edited 12161 // by hand. See the translator.README.txt file in the tools directory for 12162 // more information. 12163 // 12164 // $hash=8149c82dd6671d676ee62cb6749bf30b32a5832c$ 12165 // 12166 12167 extern (C): 12168 12169 /// 12170 /// Implement this structure to handle events related to find results. The 12171 /// functions of this structure will be called on the UI thread. 12172 /// 12173 struct cef_find_handler_t 12174 { 12175 /// 12176 /// Base structure. 12177 /// 12178 12179 /// 12180 /// Called to report find results returned by cef_browser_host_t::find(). 12181 /// |identifer| is a unique incremental identifier for the currently active 12182 /// search, |count| is the number of matches currently identified, 12183 /// |selectionRect| is the location of where the match was found (in window 12184 /// coordinates), |activeMatchOrdinal| is the current position in the search 12185 /// results, and |finalUpdate| is true (1) if this is the last find 12186 /// notification. 12187 /// 12188 g 12189 cef_base_ref_counted_t base; 12190 extern(System) void function ( 12191 cef_find_handler_t* self, 12192 cef_browser_t* browser, 12193 int identifier, 12194 int count, 12195 const(cef_rect_t)* selectionRect, 12196 int activeMatchOrdinal, 12197 int finalUpdate) nothrow on_find_result; 12198 } 12199 12200 12201 12202 // CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_ 12203 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12204 // 12205 // Redistribution and use in source and binary forms, with or without 12206 // modification, are permitted provided that the following conditions are 12207 // met: 12208 // 12209 // * Redistributions of source code must retain the above copyright 12210 // notice, this list of conditions and the following disclaimer. 12211 // * Redistributions in binary form must reproduce the above 12212 // copyright notice, this list of conditions and the following disclaimer 12213 // in the documentation and/or other materials provided with the 12214 // distribution. 12215 // * Neither the name of Google Inc. nor the name Chromium Embedded 12216 // Framework nor the names of its contributors may be used to endorse 12217 // or promote products derived from this software without specific prior 12218 // written permission. 12219 // 12220 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12221 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12222 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12223 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12224 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12225 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12226 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12227 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12228 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12229 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12230 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12231 // 12232 // --------------------------------------------------------------------------- 12233 // 12234 // This file was generated by the CEF translator tool and should not edited 12235 // by hand. See the translator.README.txt file in the tools directory for 12236 // more information. 12237 // 12238 // $hash=53ec33c8937c735f646f9e0a14a416218e32887c$ 12239 // 12240 12241 extern (C): 12242 12243 /// 12244 /// Implement this structure to handle events related to focus. The functions of 12245 /// this structure will be called on the UI thread. 12246 /// 12247 struct cef_focus_handler_t 12248 { 12249 /// 12250 /// Base structure. 12251 /// 12252 12253 /// 12254 /// Called when the browser component is about to loose focus. For instance, 12255 /// if focus was on the last HTML element and the user pressed the TAB key. 12256 /// |next| will be true (1) if the browser is giving focus to the next 12257 /// component and false (0) if the browser is giving focus to the previous 12258 /// component. 12259 /// 12260 12261 /// 12262 /// Called when the browser component is requesting focus. |source| indicates 12263 g 12264 cef_base_ref_counted_t base; 12265 extern(System) void function ( 12266 cef_focus_handler_t* self, 12267 cef_browser_t* browser, 12268 int next) nothrow on_take_focus; 12269 /// where the focus request is originating from. Return false (0) to allow the 12270 /// focus to be set or true (1) to cancel setting the focus. 12271 /// 12272 extern(System) int function ( 12273 cef_focus_handler_t* self, 12274 cef_browser_t* browser, 12275 cef_focus_source_t source) nothrow on_set_focus; 12276 12277 /// 12278 /// Called when the browser component has received focus. 12279 /// 12280 extern(System) void function ( 12281 cef_focus_handler_t* self, 12282 cef_browser_t* browser) nothrow on_got_focus; 12283 } 12284 12285 12286 12287 // CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ 12288 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12289 // 12290 // Redistribution and use in source and binary forms, with or without 12291 // modification, are permitted provided that the following conditions are 12292 // met: 12293 // 12294 // * Redistributions of source code must retain the above copyright 12295 // notice, this list of conditions and the following disclaimer. 12296 // * Redistributions in binary form must reproduce the above 12297 // copyright notice, this list of conditions and the following disclaimer 12298 // in the documentation and/or other materials provided with the 12299 // distribution. 12300 // * Neither the name of Google Inc. nor the name Chromium Embedded 12301 // Framework nor the names of its contributors may be used to endorse 12302 // or promote products derived from this software without specific prior 12303 // written permission. 12304 // 12305 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12306 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12307 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12308 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12309 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12310 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12311 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12312 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12313 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12314 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12315 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12316 // 12317 // --------------------------------------------------------------------------- 12318 // 12319 // This file was generated by the CEF translator tool and should not edited 12320 // by hand. See the translator.README.txt file in the tools directory for 12321 // more information. 12322 // 12323 // $hash=1ad87e4addc2f05497671bc59dc7fd315e0603f3$ 12324 // 12325 12326 extern (C): 12327 12328 12329 12330 12331 12332 12333 /// 12334 /// Structure used to represent a frame in the browser window. When used in the 12335 /// browser process the functions of this structure may be called on any thread 12336 /// unless otherwise indicated in the comments. When used in the render process 12337 /// the functions of this structure may only be called on the main thread. 12338 /// 12339 struct cef_frame_t 12340 { 12341 /// 12342 /// Base structure. 12343 /// 12344 12345 /// 12346 /// True if this object is currently attached to a valid frame. 12347 /// 12348 12349 /// 12350 /// Execute undo in this frame. 12351 g 12352 cef_base_ref_counted_t base; 12353 extern(System) int function (cef_frame_t* self) nothrow is_valid; 12354 /// 12355 extern(System) void function (cef_frame_t* self) nothrow undo; 12356 12357 /// 12358 /// Execute redo in this frame. 12359 /// 12360 extern(System) void function (cef_frame_t* self) nothrow redo; 12361 12362 /// 12363 /// Execute cut in this frame. 12364 /// 12365 extern(System) void function (cef_frame_t* self) nothrow cut; 12366 12367 /// 12368 /// Execute copy in this frame. 12369 /// 12370 extern(System) void function (cef_frame_t* self) nothrow copy; 12371 12372 /// 12373 /// Execute paste in this frame. 12374 /// 12375 extern(System) void function (cef_frame_t* self) nothrow paste; 12376 12377 /// 12378 /// Execute delete in this frame. 12379 /// 12380 extern(System) void function (cef_frame_t* self) nothrow del; 12381 12382 /// 12383 /// Execute select all in this frame. 12384 /// 12385 extern(System) void function (cef_frame_t* self) nothrow select_all; 12386 12387 /// 12388 /// Save this frame's HTML source to a temporary file and open it in the 12389 /// default text viewing application. This function can only be called from 12390 /// the browser process. 12391 /// 12392 extern(System) void function (cef_frame_t* self) nothrow view_source; 12393 12394 /// 12395 /// Retrieve this frame's HTML source as a string sent to the specified 12396 /// visitor. 12397 /// 12398 extern(System) void function ( 12399 cef_frame_t* self, 12400 cef_string_visitor_t* visitor) nothrow get_source; 12401 12402 /// 12403 /// Retrieve this frame's display text as a string sent to the specified 12404 /// visitor. 12405 /// 12406 extern(System) void function ( 12407 cef_frame_t* self, 12408 cef_string_visitor_t* visitor) nothrow get_text; 12409 12410 /// 12411 /// Load the request represented by the |request| object. 12412 /// 12413 /// WARNING: This function will fail with "bad IPC message" reason 12414 /// INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request 12415 /// origin using some other mechanism (LoadURL, link click, etc). 12416 /// 12417 extern(System) void function (cef_frame_t* self, cef_request_t* request) nothrow load_request; 12418 12419 /// 12420 /// Load the specified |url|. 12421 /// 12422 extern(System) void function (cef_frame_t* self, const(cef_string_t)* url) nothrow load_url; 12423 12424 /// 12425 /// Execute a string of JavaScript code in this frame. The |script_url| 12426 /// parameter is the URL where the script in question can be found, if any. 12427 /// The renderer may request this URL to show the developer the source of the 12428 /// error. The |start_line| parameter is the base line number to use for 12429 /// error reporting. 12430 /// 12431 extern(System) void function ( 12432 cef_frame_t* self, 12433 const(cef_string_t)* code, 12434 const(cef_string_t)* script_url, 12435 int start_line) nothrow execute_java_script; 12436 12437 /// 12438 /// Returns true (1) if this is the main (top-level) frame. 12439 /// 12440 extern(System) int function (cef_frame_t* self) nothrow is_main; 12441 12442 /// 12443 /// Returns true (1) if this is the focused frame. 12444 /// 12445 extern(System) int function (cef_frame_t* self) nothrow is_focused; 12446 12447 /// 12448 /// Returns the name for this frame. If the frame has an assigned name (for 12449 /// example, set via the iframe "name" attribute) then that value will be 12450 /// returned. Otherwise a unique name will be constructed based on the frame 12451 /// parent hierarchy. The main (top-level) frame will always have an NULL name 12452 /// value. 12453 /// 12454 // The resulting string must be freed by calling cef_string_userfree_free(). 12455 extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_name; 12456 12457 /// 12458 /// Returns the globally unique identifier for this frame or < 0 if the 12459 /// underlying frame does not yet exist. 12460 /// 12461 extern(System) long function (cef_frame_t* self) nothrow get_identifier; 12462 12463 /// 12464 /// Returns the parent of this frame or NULL if this is the main (top-level) 12465 /// frame. 12466 /// 12467 extern(System) cef_frame_t* function (cef_frame_t* self) nothrow get_parent; 12468 12469 /// 12470 /// Returns the URL currently loaded in this frame. 12471 /// 12472 // The resulting string must be freed by calling cef_string_userfree_free(). 12473 extern(System) cef_string_userfree_t function (cef_frame_t* self) nothrow get_url; 12474 12475 /// 12476 /// Returns the browser that this frame belongs to. 12477 /// 12478 extern(System) cef_browser_t* function (cef_frame_t* self) nothrow get_browser; 12479 12480 /// 12481 /// Get the V8 context associated with the frame. This function can only be 12482 /// called from the render process. 12483 /// 12484 extern(System) cef_v8context_t* function (cef_frame_t* self) nothrow get_v8context; 12485 12486 /// 12487 /// Visit the DOM document. This function can only be called from the render 12488 /// process. 12489 /// 12490 extern(System) void function (cef_frame_t* self, cef_domvisitor_t* visitor) nothrow visit_dom; 12491 12492 /// 12493 /// Create a new URL request that will be treated as originating from this 12494 /// frame and the associated browser. Use cef_urlrequest_t::Create instead if 12495 /// you do not want the request to have this association, in which case it may 12496 /// be handled differently (see documentation on that function). A request 12497 /// created with this function may only originate from the browser process, 12498 /// and will behave as follows: 12499 /// - It may be intercepted by the client via CefResourceRequestHandler or 12500 /// CefSchemeHandlerFactory. 12501 /// - POST data may only contain a single element of type PDE_TYPE_FILE or 12502 /// PDE_TYPE_BYTES. 12503 /// 12504 /// The |request| object will be marked as read-only after calling this 12505 /// function. 12506 /// 12507 extern(System) cef_urlrequest_t* function ( 12508 cef_frame_t* self, 12509 cef_request_t* request, 12510 cef_urlrequest_client_t* client) nothrow create_urlrequest; 12511 12512 /// 12513 /// Send a message to the specified |target_process|. Ownership of the message 12514 /// contents will be transferred and the |message| reference will be 12515 /// invalidated. Message delivery is not guaranteed in all cases (for example, 12516 /// if the browser is closing, navigating, or if the target process crashes). 12517 /// Send an ACK message back from the target process if confirmation is 12518 /// required. 12519 /// 12520 extern(System) void function ( 12521 cef_frame_t* self, 12522 cef_process_id_t target_process, 12523 cef_process_message_t* message) nothrow send_process_message; 12524 } 12525 12526 12527 12528 // CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ 12529 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12530 // 12531 // Redistribution and use in source and binary forms, with or without 12532 // modification, are permitted provided that the following conditions are 12533 // met: 12534 // 12535 // * Redistributions of source code must retain the above copyright 12536 // notice, this list of conditions and the following disclaimer. 12537 // * Redistributions in binary form must reproduce the above 12538 // copyright notice, this list of conditions and the following disclaimer 12539 // in the documentation and/or other materials provided with the 12540 // distribution. 12541 // * Neither the name of Google Inc. nor the name Chromium Embedded 12542 // Framework nor the names of its contributors may be used to endorse 12543 // or promote products derived from this software without specific prior 12544 // written permission. 12545 // 12546 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12547 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12548 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12549 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12550 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12551 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12552 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12553 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12554 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12555 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12556 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12557 // 12558 // --------------------------------------------------------------------------- 12559 // 12560 // This file was generated by the CEF translator tool and should not edited 12561 // by hand. See the translator.README.txt file in the tools directory for 12562 // more information. 12563 // 12564 // $hash=4cdadeb6439415d60ec32249c3a0b6457dd586f7$ 12565 // 12566 12567 extern (C): 12568 12569 /// 12570 /// Implement this structure to handle events related to cef_frame_t life span. 12571 /// The order of callbacks is: 12572 /// 12573 /// (1) During initial cef_browser_host_t creation and navigation of the main 12574 /// frame: - cef_frame_handler_t::OnFrameCreated => The initial main frame 12575 /// object has been 12576 /// created. Any commands will be queued until the frame is attached. 12577 /// - cef_frame_handler_t::OnMainFrameChanged => The initial main frame object 12578 /// has 12579 /// been assigned to the browser. 12580 /// - cef_life_span_handler_t::OnAfterCreated => The browser is now valid and 12581 /// can be 12582 /// used. 12583 /// - cef_frame_handler_t::OnFrameAttached => The initial main frame object is 12584 /// now 12585 /// connected to its peer in the renderer process. Commands can be routed. 12586 /// 12587 /// (2) During further cef_browser_host_t navigation/loading of the main frame 12588 /// and/or sub-frames: 12589 /// - cef_frame_handler_t::OnFrameCreated => A new main frame or sub-frame 12590 /// object 12591 /// has been created. Any commands will be queued until the frame is attached. 12592 /// - cef_frame_handler_t::OnFrameAttached => A new main frame or sub-frame 12593 /// object 12594 /// is now connected to its peer in the renderer process. Commands can be 12595 /// routed. 12596 /// - cef_frame_handler_t::OnFrameDetached => An existing main frame or sub- 12597 /// frame 12598 /// object has lost its connection to the renderer process. If multiple 12599 /// objects are detached at the same time then notifications will be sent for 12600 /// any sub-frame objects before the main frame object. Commands can no longer 12601 /// be routed and will be discarded. 12602 /// - cef_frame_handler_t::OnMainFrameChanged => A new main frame object has 12603 /// been 12604 /// assigned to the browser. This will only occur with cross-origin navigation 12605 /// or re-navigation after renderer process termination (due to crashes, etc). 12606 /// 12607 /// (3) During final cef_browser_host_t destruction of the main frame: - 12608 /// cef_frame_handler_t::OnFrameDetached => Any sub-frame objects have lost 12609 /// their 12610 /// connection to the renderer process. Commands can no longer be routed and 12611 /// will be discarded. 12612 /// - cef_life_span_handler_t::OnBeforeClose => The browser has been destroyed. 12613 /// - cef_frame_handler_t::OnFrameDetached => The main frame object have lost 12614 /// its 12615 /// connection to the renderer process. Notifications will be sent for any 12616 /// sub-frame objects before the main frame object. Commands can no longer be 12617 /// routed and will be discarded. 12618 /// - cef_frame_handler_t::OnMainFrameChanged => The final main frame object has 12619 /// been removed from the browser. 12620 /// 12621 /// Cross-origin navigation and/or loading receives special handling. 12622 /// 12623 /// When the main frame navigates to a different origin the OnMainFrameChanged 12624 /// callback (2) will be executed with the old and new main frame objects. 12625 /// 12626 /// When a new sub-frame is loaded in, or an existing sub-frame is navigated to, 12627 /// a different origin from the parent frame, a temporary sub-frame object will 12628 /// first be created in the parent's renderer process. That temporary sub-frame 12629 /// will then be discarded after the real cross-origin sub-frame is created in 12630 /// the new/target renderer process. The client will receive cross-origin 12631 /// navigation callbacks (2) for the transition from the temporary sub-frame to 12632 /// the real sub-frame. The temporary sub-frame will not recieve or execute 12633 /// commands during this transitional period (any sent commands will be 12634 /// discarded). 12635 /// 12636 /// When a new popup browser is created in a different origin from the parent 12637 /// browser, a temporary main frame object for the popup will first be created 12638 /// in the parent's renderer process. That temporary main frame will then be 12639 /// discarded after the real cross-origin main frame is created in the 12640 /// new/target renderer process. The client will recieve creation and initial 12641 /// navigation callbacks (1) for the temporary main frame, followed by cross- 12642 /// origin navigation callbacks (2) for the transition from the temporary main 12643 /// frame to the real main frame. The temporary main frame may receive and 12644 /// execute commands during this transitional period (any sent commands may be 12645 /// executed, but the behavior is potentially undesirable since they execute in 12646 /// the parent browser's renderer process and not the new/target renderer 12647 /// process). 12648 /// 12649 /// Callbacks will not be executed for placeholders that may be created during 12650 /// pre-commit navigation for sub-frames that do not yet exist in the renderer 12651 /// process. Placeholders will have cef_frame_t::get_identifier() == -4. 12652 /// 12653 /// The functions of this structure will be called on the UI thread unless 12654 /// otherwise indicated. 12655 /// 12656 struct cef_frame_handler_t 12657 { 12658 /// 12659 /// Base structure. 12660 /// 12661 g 12662 cef_base_ref_counted_t base; 12663 12664 /// 12665 /// Called when a new frame is created. This will be the first notification 12666 /// that references |frame|. Any commands that require transport to the 12667 /// associated renderer process (LoadRequest, SendProcessMessage, GetSource, 12668 /// etc.) will be queued until OnFrameAttached is called for |frame|. 12669 /// 12670 extern(System) void function ( 12671 cef_frame_handler_t* self, 12672 cef_browser_t* browser, 12673 cef_frame_t* frame) nothrow on_frame_created; 12674 12675 /// 12676 /// Called when a frame can begin routing commands to/from the associated 12677 /// renderer process. |reattached| will be true (1) if the frame was re- 12678 /// attached after exiting the BackForwardCache. Any commands that were queued 12679 /// have now been dispatched. 12680 /// 12681 extern(System) void function ( 12682 cef_frame_handler_t* self, 12683 cef_browser_t* browser, 12684 cef_frame_t* frame, 12685 int reattached) nothrow on_frame_attached; 12686 12687 /// 12688 /// Called when a frame loses its connection to the renderer process and will 12689 /// be destroyed. Any pending or future commands will be discarded and 12690 /// cef_frame_t::is_valid() will now return false (0) for |frame|. If called 12691 /// after cef_life_span_handler_t::on_before_close() during browser 12692 /// destruction then cef_browser_t::is_valid() will return false (0) for 12693 /// |browser|. 12694 /// 12695 extern(System) void function ( 12696 cef_frame_handler_t* self, 12697 cef_browser_t* browser, 12698 cef_frame_t* frame) nothrow on_frame_detached; 12699 12700 /// 12701 /// Called when the main frame changes due to (a) initial browser creation, 12702 /// (b) final browser destruction, (c) cross-origin navigation or (d) re- 12703 /// navigation after renderer process termination (due to crashes, etc). 12704 /// |old_frame| will be NULL and |new_frame| will be non-NULL when a main 12705 /// frame is assigned to |browser| for the first time. |old_frame| will be 12706 /// non-NULL and |new_frame| will be NULL and when a main frame is removed 12707 /// from |browser| for the last time. Both |old_frame| and |new_frame| will be 12708 /// non-NULL for cross-origin navigations or re-navigation after renderer 12709 /// process termination. This function will be called after on_frame_created() 12710 /// for |new_frame| and/or after on_frame_detached() for |old_frame|. If 12711 /// called after cef_life_span_handler_t::on_before_close() during browser 12712 /// destruction then cef_browser_t::is_valid() will return false (0) for 12713 /// |browser|. 12714 /// 12715 extern(System) void function ( 12716 cef_frame_handler_t* self, 12717 cef_browser_t* browser, 12718 cef_frame_t* old_frame, 12719 cef_frame_t* new_frame) nothrow on_main_frame_changed; 12720 } 12721 12722 12723 12724 // CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_ 12725 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12726 // 12727 // Redistribution and use in source and binary forms, with or without 12728 // modification, are permitted provided that the following conditions are 12729 // met: 12730 // 12731 // * Redistributions of source code must retain the above copyright 12732 // notice, this list of conditions and the following disclaimer. 12733 // * Redistributions in binary form must reproduce the above 12734 // copyright notice, this list of conditions and the following disclaimer 12735 // in the documentation and/or other materials provided with the 12736 // distribution. 12737 // * Neither the name of Google Inc. nor the name Chromium Embedded 12738 // Framework nor the names of its contributors may be used to endorse 12739 // or promote products derived from this software without specific prior 12740 // written permission. 12741 // 12742 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12743 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12744 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12745 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12746 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12747 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12748 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12749 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12750 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12751 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12752 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12753 // 12754 // --------------------------------------------------------------------------- 12755 // 12756 // This file was generated by the CEF translator tool and should not edited 12757 // by hand. See the translator.README.txt file in the tools directory for 12758 // more information. 12759 // 12760 // $hash=c564ee1f32a0ef05fe49fc779af5bc0b0e1b36d6$ 12761 // 12762 12763 extern (C): 12764 12765 /// 12766 /// Returns true (1) if the application text direction is right-to-left. 12767 /// 12768 int cef_is_rtl (); 12769 12770 // CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_ 12771 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12772 // 12773 // Redistribution and use in source and binary forms, with or without 12774 // modification, are permitted provided that the following conditions are 12775 // met: 12776 // 12777 // * Redistributions of source code must retain the above copyright 12778 // notice, this list of conditions and the following disclaimer. 12779 // * Redistributions in binary form must reproduce the above 12780 // copyright notice, this list of conditions and the following disclaimer 12781 // in the documentation and/or other materials provided with the 12782 // distribution. 12783 // * Neither the name of Google Inc. nor the name Chromium Embedded 12784 // Framework nor the names of its contributors may be used to endorse 12785 // or promote products derived from this software without specific prior 12786 // written permission. 12787 // 12788 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12789 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12790 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12791 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12792 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12793 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12794 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12795 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12796 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12797 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12798 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12799 // 12800 // --------------------------------------------------------------------------- 12801 // 12802 // This file was generated by the CEF translator tool and should not edited 12803 // by hand. See the translator.README.txt file in the tools directory for 12804 // more information. 12805 // 12806 // $hash=99c94b208f9b184985220493bba4ea08e6786046$ 12807 // 12808 12809 extern (C): 12810 12811 /// 12812 /// Container for a single image represented at different scale factors. All 12813 /// image representations should be the same size in density independent pixel 12814 /// (DIP) units. For example, if the image at scale factor 1.0 is 100x100 pixels 12815 /// then the image at scale factor 2.0 should be 200x200 pixels -- both images 12816 /// will display with a DIP size of 100x100 units. The functions of this 12817 /// structure can be called on any browser process thread. 12818 /// 12819 struct cef_image_t 12820 { 12821 /// 12822 /// Base structure. 12823 /// 12824 12825 /// 12826 /// Returns true (1) if this Image is NULL. 12827 /// 12828 12829 /// 12830 /// Returns true (1) if this Image and |that| Image share the same underlying 12831 /// storage. Will also return true (1) if both images are NULL. 12832 /// 12833 g 12834 cef_base_ref_counted_t base; 12835 extern(System) int function (cef_image_t* self) nothrow is_empty; 12836 extern(System) int function (cef_image_t* self, cef_image_t* that) nothrow is_same; 12837 /// 12838 /// Add a bitmap image representation for |scale_factor|. Only 32-bit 12839 /// RGBA/BGRA formats are supported. |pixel_width| and |pixel_height| are the 12840 /// bitmap representation size in pixel coordinates. |pixel_data| is the array 12841 /// of pixel data and should be |pixel_width| x |pixel_height| x 4 bytes in 12842 /// size. |color_type| and |alpha_type| values specify the pixel format. 12843 /// 12844 extern(System) int function ( 12845 cef_image_t* self, 12846 float scale_factor, 12847 int pixel_width, 12848 int pixel_height, 12849 cef_color_type_t color_type, 12850 cef_alpha_type_t alpha_type, 12851 const(void)* pixel_data, 12852 size_t pixel_data_size) nothrow add_bitmap; 12853 12854 /// 12855 /// Add a PNG image representation for |scale_factor|. |png_data| is the image 12856 /// data of size |png_data_size|. Any alpha transparency in the PNG data will 12857 /// be maintained. 12858 /// 12859 extern(System) int function ( 12860 cef_image_t* self, 12861 float scale_factor, 12862 const(void)* png_data, 12863 size_t png_data_size) nothrow add_png; 12864 12865 /// 12866 /// Create a JPEG image representation for |scale_factor|. |jpeg_data| is the 12867 /// image data of size |jpeg_data_size|. The JPEG format does not support 12868 /// transparency so the alpha byte will be set to 0xFF for all pixels. 12869 /// 12870 extern(System) int function ( 12871 cef_image_t* self, 12872 float scale_factor, 12873 const(void)* jpeg_data, 12874 size_t jpeg_data_size) nothrow add_jpeg; 12875 12876 /// 12877 /// Returns the image width in density independent pixel (DIP) units. 12878 /// 12879 extern(System) size_t function (cef_image_t* self) nothrow get_width; 12880 12881 /// 12882 /// Returns the image height in density independent pixel (DIP) units. 12883 /// 12884 extern(System) size_t function (cef_image_t* self) nothrow get_height; 12885 12886 /// 12887 /// Returns true (1) if this image contains a representation for 12888 /// |scale_factor|. 12889 /// 12890 extern(System) int function (cef_image_t* self, float scale_factor) nothrow has_representation; 12891 12892 /// 12893 /// Removes the representation for |scale_factor|. Returns true (1) on 12894 /// success. 12895 /// 12896 extern(System) int function ( 12897 cef_image_t* self, 12898 float scale_factor) nothrow remove_representation; 12899 12900 /// 12901 /// Returns information for the representation that most closely matches 12902 /// |scale_factor|. |actual_scale_factor| is the actual scale factor for the 12903 /// representation. |pixel_width| and |pixel_height| are the representation 12904 /// size in pixel coordinates. Returns true (1) on success. 12905 /// 12906 extern(System) int function ( 12907 cef_image_t* self, 12908 float scale_factor, 12909 float* actual_scale_factor, 12910 int* pixel_width, 12911 int* pixel_height) nothrow get_representation_info; 12912 12913 /// 12914 /// Returns the bitmap representation that most closely matches 12915 /// |scale_factor|. Only 32-bit RGBA/BGRA formats are supported. |color_type| 12916 /// and |alpha_type| values specify the desired output pixel format. 12917 /// |pixel_width| and |pixel_height| are the output representation size in 12918 /// pixel coordinates. Returns a cef_binary_value_t containing the pixel data 12919 /// on success or NULL on failure. 12920 /// 12921 extern(System) cef_binary_value_t* function ( 12922 cef_image_t* self, 12923 float scale_factor, 12924 cef_color_type_t color_type, 12925 cef_alpha_type_t alpha_type, 12926 int* pixel_width, 12927 int* pixel_height) nothrow get_as_bitmap; 12928 12929 /// 12930 /// Returns the PNG representation that most closely matches |scale_factor|. 12931 /// If |with_transparency| is true (1) any alpha transparency in the image 12932 /// will be represented in the resulting PNG data. |pixel_width| and 12933 /// |pixel_height| are the output representation size in pixel coordinates. 12934 /// Returns a cef_binary_value_t containing the PNG image data on success or 12935 /// NULL on failure. 12936 /// 12937 extern(System) cef_binary_value_t* function ( 12938 cef_image_t* self, 12939 float scale_factor, 12940 int with_transparency, 12941 int* pixel_width, 12942 int* pixel_height) nothrow get_as_png; 12943 12944 /// 12945 /// Returns the JPEG representation that most closely matches |scale_factor|. 12946 /// |quality| determines the compression level with 0 == lowest and 100 == 12947 /// highest. The JPEG format does not support alpha transparency and the alpha 12948 /// channel, if any, will be discarded. |pixel_width| and |pixel_height| are 12949 /// the output representation size in pixel coordinates. Returns a 12950 /// cef_binary_value_t containing the JPEG image data on success or NULL on 12951 /// failure. 12952 /// 12953 extern(System) cef_binary_value_t* function ( 12954 cef_image_t* self, 12955 float scale_factor, 12956 int quality, 12957 int* pixel_width, 12958 int* pixel_height) nothrow get_as_jpeg; 12959 } 12960 12961 12962 12963 /// 12964 /// Create a new cef_image_t. It will initially be NULL. Use the Add*() 12965 /// functions to add representations at different scale factors. 12966 /// 12967 cef_image_t* cef_image_create (); 12968 12969 // CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_ 12970 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 12971 // 12972 // Redistribution and use in source and binary forms, with or without 12973 // modification, are permitted provided that the following conditions are 12974 // met: 12975 // 12976 // * Redistributions of source code must retain the above copyright 12977 // notice, this list of conditions and the following disclaimer. 12978 // * Redistributions in binary form must reproduce the above 12979 // copyright notice, this list of conditions and the following disclaimer 12980 // in the documentation and/or other materials provided with the 12981 // distribution. 12982 // * Neither the name of Google Inc. nor the name Chromium Embedded 12983 // Framework nor the names of its contributors may be used to endorse 12984 // or promote products derived from this software without specific prior 12985 // written permission. 12986 // 12987 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 12988 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 12989 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12990 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 12991 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12992 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 12993 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 12994 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 12995 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 12996 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12997 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12998 // 12999 // --------------------------------------------------------------------------- 13000 // 13001 // This file was generated by the CEF translator tool and should not edited 13002 // by hand. See the translator.README.txt file in the tools directory for 13003 // more information. 13004 // 13005 // $hash=e9fb0354243611f3a4de508923a4e01dab42f82d$ 13006 // 13007 13008 extern (C): 13009 13010 /// 13011 /// Callback structure used for asynchronous continuation of JavaScript dialog 13012 /// requests. 13013 /// 13014 struct cef_jsdialog_callback_t 13015 { 13016 /// 13017 /// Base structure. 13018 /// 13019 13020 /// 13021 /// Continue the JS dialog request. Set |success| to true (1) if the OK button 13022 /// was pressed. The |user_input| value should be specified for prompt 13023 /// dialogs. 13024 /// 13025 13026 /// 13027 /// Implement this structure to handle events related to JavaScript dialogs. The 13028 /// functions of this structure will be called on the UI thread. 13029 /// 13030 13031 /// 13032 /// Base structure. 13033 /// 13034 13035 /// 13036 /// Called to run a JavaScript dialog. If |origin_url| is non-NULL it can be 13037 g 13038 cef_base_ref_counted_t base; 13039 extern(System) void function ( 13040 cef_jsdialog_callback_t* self, 13041 int success, 13042 const(cef_string_t)* user_input) nothrow cont; 13043 } 13044 13045 13046 13047 struct cef_jsdialog_handler_t 13048 { 13049 cef_base_ref_counted_t base; 13050 /// passed to the CefFormatUrlForSecurityDisplay function to retrieve a secure 13051 /// and user-friendly display string. The |default_prompt_text| value will be 13052 /// specified for prompt dialogs only. Set |suppress_message| to true (1) and 13053 /// return false (0) to suppress the message (suppressing messages is 13054 /// preferable to immediately executing the callback as this is used to detect 13055 /// presumably malicious behavior like spamming alert messages in 13056 /// onbeforeunload). Set |suppress_message| to false (0) and return false (0) 13057 /// to use the default implementation (the default implementation will show 13058 /// one modal dialog at a time and suppress any additional dialog requests 13059 /// until the displayed dialog is dismissed). Return true (1) if the 13060 /// application will use a custom dialog or if the callback has been executed 13061 /// immediately. Custom dialogs may be either modal or modeless. If a custom 13062 /// dialog is used the application must execute |callback| once the custom 13063 /// dialog is dismissed. 13064 /// 13065 extern(System) int function ( 13066 cef_jsdialog_handler_t* self, 13067 cef_browser_t* browser, 13068 const(cef_string_t)* origin_url, 13069 cef_jsdialog_type_t dialog_type, 13070 const(cef_string_t)* message_text, 13071 const(cef_string_t)* default_prompt_text, 13072 cef_jsdialog_callback_t* callback, 13073 int* suppress_message) nothrow on_jsdialog; 13074 13075 /// 13076 /// Called to run a dialog asking the user if they want to leave a page. 13077 /// Return false (0) to use the default dialog implementation. Return true (1) 13078 /// if the application will use a custom dialog or if the callback has been 13079 /// executed immediately. Custom dialogs may be either modal or modeless. If a 13080 /// custom dialog is used the application must execute |callback| once the 13081 /// custom dialog is dismissed. 13082 /// 13083 extern(System) int function ( 13084 cef_jsdialog_handler_t* self, 13085 cef_browser_t* browser, 13086 const(cef_string_t)* message_text, 13087 int is_reload, 13088 cef_jsdialog_callback_t* callback) nothrow on_before_unload_dialog; 13089 13090 /// 13091 /// Called to cancel any pending dialogs and reset any saved dialog state. 13092 /// Will be called due to events like page navigation irregardless of whether 13093 /// any dialogs are currently pending. 13094 /// 13095 extern(System) void function ( 13096 cef_jsdialog_handler_t* self, 13097 cef_browser_t* browser) nothrow on_reset_dialog_state; 13098 13099 /// 13100 /// Called when the dialog is closed. 13101 /// 13102 extern(System) void function ( 13103 cef_jsdialog_handler_t* self, 13104 cef_browser_t* browser) nothrow on_dialog_closed; 13105 } 13106 13107 13108 13109 // CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ 13110 // Copyright (c) 2023 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=10fb708c5f550403205a976924abf1886bf3dfa7$ 13146 // 13147 13148 extern (C): 13149 13150 /// 13151 /// Implement this structure to handle events related to keyboard input. The 13152 /// functions of this structure will be called on the UI thread. 13153 /// 13154 struct cef_keyboard_handler_t 13155 { 13156 /// 13157 /// Base structure. 13158 /// 13159 13160 /// 13161 /// Called before a keyboard event is sent to the renderer. |event| contains 13162 /// information about the keyboard event. |os_event| is the operating system 13163 /// event message, if any. Return true (1) if the event was handled or false 13164 /// (0) otherwise. If the event will be handled in on_key_event() as a 13165 /// keyboard shortcut set |is_keyboard_shortcut| to true (1) and return false 13166 /// (0). 13167 /// 13168 g 13169 cef_base_ref_counted_t base; 13170 extern(System) int function ( 13171 cef_keyboard_handler_t* self, 13172 cef_browser_t* browser, 13173 const(cef_key_event_t)* event, 13174 XEvent* os_event, 13175 int* is_keyboard_shortcut) nothrow on_pre_key_event; 13176 /// 13177 /// Called after the renderer and JavaScript in the page has had a chance to 13178 /// handle the event. |event| contains information about the keyboard event. 13179 /// |os_event| is the operating system event message, if any. Return true (1) 13180 /// if the keyboard event was handled or false (0) otherwise. 13181 /// 13182 extern(System) int function ( 13183 cef_keyboard_handler_t* self, 13184 cef_browser_t* browser, 13185 const(cef_key_event_t)* event, 13186 XEvent* os_event) nothrow on_key_event; 13187 } 13188 13189 13190 13191 // CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ 13192 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 13193 // 13194 // Redistribution and use in source and binary forms, with or without 13195 // modification, are permitted provided that the following conditions are 13196 // met: 13197 // 13198 // * Redistributions of source code must retain the above copyright 13199 // notice, this list of conditions and the following disclaimer. 13200 // * Redistributions in binary form must reproduce the above 13201 // copyright notice, this list of conditions and the following disclaimer 13202 // in the documentation and/or other materials provided with the 13203 // distribution. 13204 // * Neither the name of Google Inc. nor the name Chromium Embedded 13205 // Framework nor the names of its contributors may be used to endorse 13206 // or promote products derived from this software without specific prior 13207 // written permission. 13208 // 13209 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13210 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13211 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13212 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13213 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13214 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13215 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13216 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13217 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13218 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13219 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13220 // 13221 // --------------------------------------------------------------------------- 13222 // 13223 // This file was generated by the CEF translator tool and should not edited 13224 // by hand. See the translator.README.txt file in the tools directory for 13225 // more information. 13226 // 13227 // $hash=1c807597b96889f44a1e5199e860e8db4948b473$ 13228 // 13229 13230 extern (C): 13231 13232 13233 13234 /// 13235 /// Implement this structure to handle events related to browser life span. The 13236 /// functions of this structure will be called on the UI thread unless otherwise 13237 /// indicated. 13238 /// 13239 struct cef_life_span_handler_t 13240 { 13241 /// 13242 /// Base structure. 13243 /// 13244 13245 /// 13246 /// Called on the UI thread before a new popup browser is created. The 13247 /// |browser| and |frame| values represent the source of the popup request. 13248 /// The |target_url| and |target_frame_name| values indicate where the popup 13249 /// browser should navigate and may be NULL if not specified with the request. 13250 /// The |target_disposition| value indicates where the user intended to open 13251 /// the popup (e.g. current tab, new tab, etc). The |user_gesture| value will 13252 /// be true (1) if the popup was opened via explicit user gesture (e.g. 13253 g 13254 cef_base_ref_counted_t base; 13255 /// clicking a link) or false (0) if the popup opened automatically (e.g. via 13256 /// the DomContentLoaded event). The |popupFeatures| structure contains 13257 /// additional information about the requested popup window. To allow creation 13258 /// of the popup browser optionally modify |windowInfo|, |client|, |settings| 13259 /// and |no_javascript_access| and return false (0). To cancel creation of the 13260 /// popup browser return true (1). The |client| and |settings| values will 13261 /// default to the source browser's values. If the |no_javascript_access| 13262 /// value is set to false (0) the new browser will not be scriptable and may 13263 /// not be hosted in the same renderer process as the source browser. Any 13264 /// modifications to |windowInfo| will be ignored if the parent browser is 13265 /// wrapped in a cef_browser_view_t. Popup browser creation will be canceled 13266 /// if the parent browser is destroyed before the popup browser creation 13267 /// completes (indicated by a call to OnAfterCreated for the popup browser). 13268 /// The |extra_info| parameter provides an opportunity to specify extra 13269 /// information specific to the created popup browser that will be passed to 13270 /// cef_render_process_handler_t::on_browser_created() in the render process. 13271 /// 13272 extern(System) int function ( 13273 cef_life_span_handler_t* self, 13274 cef_browser_t* browser, 13275 cef_frame_t* frame, 13276 const(cef_string_t)* target_url, 13277 const(cef_string_t)* target_frame_name, 13278 cef_window_open_disposition_t target_disposition, 13279 int user_gesture, 13280 const(cef_popup_features_t)* popupFeatures, 13281 cef_window_info_t* windowInfo, 13282 cef_client_t** client, 13283 cef_browser_settings_t* settings, 13284 cef_dictionary_value_t** extra_info, 13285 int* no_javascript_access) nothrow on_before_popup; 13286 13287 /// 13288 /// Called after a new browser is created. It is now safe to begin performing 13289 /// actions with |browser|. cef_frame_handler_t callbacks related to initial 13290 /// main frame creation will arrive before this callback. See 13291 /// cef_frame_handler_t documentation for additional usage information. 13292 /// 13293 extern(System) void function ( 13294 cef_life_span_handler_t* self, 13295 cef_browser_t* browser) nothrow on_after_created; 13296 13297 /// 13298 /// Called when a browser has recieved a request to close. This may result 13299 /// directly from a call to cef_browser_host_t::*close_browser() or indirectly 13300 /// if the browser is parented to a top-level window created by CEF and the 13301 /// user attempts to close that window (by clicking the 'X', for example). The 13302 /// do_close() function will be called after the JavaScript 'onunload' event 13303 /// has been fired. 13304 /// 13305 /// An application should handle top-level owner window close notifications by 13306 /// calling cef_browser_host_t::try_close_browser() or 13307 /// cef_browser_host_t::CloseBrowser(false (0)) instead of allowing the window 13308 /// to close immediately (see the examples below). This gives CEF an 13309 /// opportunity to process the 'onbeforeunload' event and optionally cancel 13310 /// the close before do_close() is called. 13311 /// 13312 /// When windowed rendering is enabled CEF will internally create a window or 13313 /// view to host the browser. In that case returning false (0) from do_close() 13314 /// will send the standard close notification to the browser's top-level owner 13315 /// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on 13316 /// Linux or cef_window_delegate_t::can_close() callback from Views). If the 13317 /// browser's host window/view has already been destroyed (via view hierarchy 13318 /// tear-down, for example) then do_close() will not be called for that 13319 /// browser since is no longer possible to cancel the close. 13320 /// 13321 /// When windowed rendering is disabled returning false (0) from do_close() 13322 /// will cause the browser object to be destroyed immediately. 13323 /// 13324 /// If the browser's top-level owner window requires a non-standard close 13325 /// notification then send that notification from do_close() and return true 13326 /// (1). 13327 /// 13328 /// The cef_life_span_handler_t::on_before_close() function will be called 13329 /// after do_close() (if do_close() is called) and immediately before the 13330 /// browser object is destroyed. The application should only exit after 13331 /// on_before_close() has been called for all existing browsers. 13332 /// 13333 /// The below examples describe what should happen during window close when 13334 /// the browser is parented to an application-provided top-level window. 13335 /// 13336 /// Example 1: Using cef_browser_host_t::try_close_browser(). This is 13337 /// recommended for clients using standard close handling and windows created 13338 /// on the browser process UI thread. 1. User clicks the window close button 13339 /// which sends a close notification 13340 /// to the application's top-level window. 13341 /// 2. Application's top-level window receives the close notification and 13342 /// calls TryCloseBrowser() (which internally calls CloseBrowser(false)). 13343 /// TryCloseBrowser() returns false so the client cancels the window 13344 /// close. 13345 /// 3. JavaScript 'onbeforeunload' handler executes and shows the close 13346 /// confirmation dialog (which can be overridden via 13347 /// CefJSDialogHandler::OnBeforeUnloadDialog()). 13348 /// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 13349 /// 6. CEF sends a close notification to the application's top-level window 13350 /// (because DoClose() returned false by default). 13351 /// 7. Application's top-level window receives the close notification and 13352 /// calls TryCloseBrowser(). TryCloseBrowser() returns true so the client 13353 /// allows the window close. 13354 /// 8. Application's top-level window is destroyed. 9. Application's 13355 /// on_before_close() handler is called and the browser object 13356 /// is destroyed. 13357 /// 10. Application exits by calling cef_quit_message_loop() if no other 13358 /// browsers 13359 /// exist. 13360 /// 13361 /// Example 2: Using cef_browser_host_t::CloseBrowser(false (0)) and 13362 /// implementing the do_close() callback. This is recommended for clients 13363 /// using non-standard close handling or windows that were not created on the 13364 /// browser process UI thread. 1. User clicks the window close button which 13365 /// sends a close notification 13366 /// to the application's top-level window. 13367 /// 2. Application's top-level window receives the close notification and: 13368 /// A. Calls CefBrowserHost::CloseBrowser(false). 13369 /// B. Cancels the window close. 13370 /// 3. JavaScript 'onbeforeunload' handler executes and shows the close 13371 /// confirmation dialog (which can be overridden via 13372 /// CefJSDialogHandler::OnBeforeUnloadDialog()). 13373 /// 4. User approves the close. 5. JavaScript 'onunload' handler executes. 13374 /// 6. Application's do_close() handler is called. Application will: 13375 /// A. Set a flag to indicate that the next close attempt will be allowed. 13376 /// B. Return false. 13377 /// 7. CEF sends an close notification to the application's top-level window. 13378 /// 8. Application's top-level window receives the close notification and 13379 /// allows the window to close based on the flag from #6B. 13380 /// 9. Application's top-level window is destroyed. 10. Application's 13381 /// on_before_close() handler is called and the browser object 13382 /// is destroyed. 13383 /// 11. Application exits by calling cef_quit_message_loop() if no other 13384 /// browsers 13385 /// exist. 13386 /// 13387 extern(System) int function ( 13388 cef_life_span_handler_t* self, 13389 cef_browser_t* browser) nothrow do_close; 13390 13391 /// 13392 /// Called just before a browser is destroyed. Release all references to the 13393 /// browser object and do not attempt to execute any functions on the browser 13394 /// object (other than IsValid, GetIdentifier or IsSame) after this callback 13395 /// returns. cef_frame_handler_t callbacks related to final main frame 13396 /// destruction will arrive after this callback and cef_browser_t::IsValid 13397 /// will return false (0) at that time. Any in-progress network requests 13398 /// associated with |browser| will be aborted when the browser is destroyed, 13399 /// and cef_resource_request_handler_t callbacks related to those requests may 13400 /// still arrive on the IO thread after this callback. See cef_frame_handler_t 13401 /// and do_close() documentation for additional usage information. 13402 /// 13403 extern(System) void function ( 13404 cef_life_span_handler_t* self, 13405 cef_browser_t* browser) nothrow on_before_close; 13406 } 13407 13408 13409 13410 // CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_ 13411 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 13412 // 13413 // Redistribution and use in source and binary forms, with or without 13414 // modification, are permitted provided that the following conditions are 13415 // met: 13416 // 13417 // * Redistributions of source code must retain the above copyright 13418 // notice, this list of conditions and the following disclaimer. 13419 // * Redistributions in binary form must reproduce the above 13420 // copyright notice, this list of conditions and the following disclaimer 13421 // in the documentation and/or other materials provided with the 13422 // distribution. 13423 // * Neither the name of Google Inc. nor the name Chromium Embedded 13424 // Framework nor the names of its contributors may be used to endorse 13425 // or promote products derived from this software without specific prior 13426 // written permission. 13427 // 13428 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13429 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13430 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13431 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13432 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13433 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13434 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13435 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13436 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13437 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13438 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13439 // 13440 // --------------------------------------------------------------------------- 13441 // 13442 // This file was generated by the CEF translator tool and should not edited 13443 // by hand. See the translator.README.txt file in the tools directory for 13444 // more information. 13445 // 13446 // $hash=1ee684174554f7d1cf8899992705d072c1c56ae7$ 13447 // 13448 13449 extern (C): 13450 13451 /// 13452 /// Implement this structure to handle events related to browser load status. 13453 /// The functions of this structure will be called on the browser process UI 13454 /// thread or render process main thread (TID_RENDERER). 13455 /// 13456 struct cef_load_handler_t 13457 { 13458 /// 13459 /// Base structure. 13460 /// 13461 13462 /// 13463 /// Called when the loading state has changed. This callback will be executed 13464 /// twice -- once when loading is initiated either programmatically or by user 13465 /// action, and once when loading is terminated due to completion, 13466 /// cancellation of failure. It will be called before any calls to OnLoadStart 13467 /// and after all calls to OnLoadError and/or OnLoadEnd. 13468 /// 13469 g 13470 cef_base_ref_counted_t base; 13471 extern(System) void function ( 13472 cef_load_handler_t* self, 13473 cef_browser_t* browser, 13474 int isLoading, 13475 int canGoBack, 13476 int canGoForward) nothrow on_loading_state_change; 13477 /// 13478 /// Called after a navigation has been committed and before the browser begins 13479 /// loading contents in the frame. The |frame| value will never be NULL -- 13480 /// call the is_main() function to check if this frame is the main frame. 13481 /// |transition_type| provides information about the source of the navigation 13482 /// and an accurate value is only available in the browser process. Multiple 13483 /// frames may be loading at the same time. Sub-frames may start or continue 13484 /// loading after the main frame load has ended. This function will not be 13485 /// called for same page navigations (fragments, history state, etc.) or for 13486 /// navigations that fail or are canceled before commit. For notification of 13487 /// overall browser load status use OnLoadingStateChange instead. 13488 /// 13489 extern(System) void function ( 13490 cef_load_handler_t* self, 13491 cef_browser_t* browser, 13492 cef_frame_t* frame, 13493 cef_transition_type_t transition_type) nothrow on_load_start; 13494 13495 /// 13496 /// Called when the browser is done loading a frame. The |frame| value will 13497 /// never be NULL -- call the is_main() function to check if this frame is the 13498 /// main frame. Multiple frames may be loading at the same time. Sub-frames 13499 /// may start or continue loading after the main frame load has ended. This 13500 /// function will not be called for same page navigations (fragments, history 13501 /// state, etc.) or for navigations that fail or are canceled before commit. 13502 /// For notification of overall browser load status use OnLoadingStateChange 13503 /// instead. 13504 /// 13505 extern(System) void function ( 13506 cef_load_handler_t* self, 13507 cef_browser_t* browser, 13508 cef_frame_t* frame, 13509 int httpStatusCode) nothrow on_load_end; 13510 13511 /// 13512 /// Called when a navigation fails or is canceled. This function may be called 13513 /// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if 13514 /// after commit. |errorCode| is the error code number, |errorText| is the 13515 /// error text and |failedUrl| is the URL that failed to load. See 13516 /// net\base\net_error_list.h for complete descriptions of the error codes. 13517 /// 13518 extern(System) void function ( 13519 cef_load_handler_t* self, 13520 cef_browser_t* browser, 13521 cef_frame_t* frame, 13522 cef_errorcode_t errorCode, 13523 const(cef_string_t)* errorText, 13524 const(cef_string_t)* failedUrl) nothrow on_load_error; 13525 } 13526 13527 13528 13529 // CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ 13530 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 13531 // 13532 // Redistribution and use in source and binary forms, with or without 13533 // modification, are permitted provided that the following conditions are 13534 // met: 13535 // 13536 // * Redistributions of source code must retain the above copyright 13537 // notice, this list of conditions and the following disclaimer. 13538 // * Redistributions in binary form must reproduce the above 13539 // copyright notice, this list of conditions and the following disclaimer 13540 // in the documentation and/or other materials provided with the 13541 // distribution. 13542 // * Neither the name of Google Inc. nor the name Chromium Embedded 13543 // Framework nor the names of its contributors may be used to endorse 13544 // or promote products derived from this software without specific prior 13545 // written permission. 13546 // 13547 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13548 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13549 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13550 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13551 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13552 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13553 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13554 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13555 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13556 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13557 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13558 // 13559 // --------------------------------------------------------------------------- 13560 // 13561 // This file was generated by the CEF translator tool and should not edited 13562 // by hand. See the translator.README.txt file in the tools directory for 13563 // more information. 13564 // 13565 // $hash=de4a9b856c6951231f446991a9b1efb89096ad3b$ 13566 // 13567 13568 extern (C): 13569 13570 /// 13571 /// Supports discovery of and communication with media devices on the local 13572 /// network via the Cast and DIAL protocols. The functions of this structure may 13573 /// be called on any browser process thread unless otherwise indicated. 13574 /// 13575 struct cef_media_router_t 13576 { 13577 /// 13578 /// Base structure. 13579 /// 13580 13581 /// 13582 /// Add an observer for MediaRouter events. The observer will remain 13583 /// registered until the returned Registration object is destroyed. 13584 /// 13585 g 13586 cef_base_ref_counted_t base; 13587 extern(System) cef_registration_t* function ( 13588 cef_media_router_t* self, 13589 cef_media_observer_t* observer) nothrow add_observer; /// 13590 /// Returns a MediaSource object for the specified media source URN. Supported 13591 /// URN schemes include "cast:" and "dial:", and will be already known by the 13592 /// client application (e.g. "cast:<appId>?clientId=<clientId>"). 13593 /// 13594 extern(System) cef_media_source_t* function ( 13595 cef_media_router_t* self, 13596 const(cef_string_t)* urn) nothrow get_source; 13597 13598 /// 13599 /// Trigger an asynchronous call to cef_media_observer_t::OnSinks on all 13600 /// registered observers. 13601 /// 13602 extern(System) void function (cef_media_router_t* self) nothrow notify_current_sinks; 13603 13604 /// 13605 /// Create a new route between |source| and |sink|. Source and sink must be 13606 /// valid, compatible (as reported by cef_media_sink_t::IsCompatibleWith), and 13607 /// a route between them must not already exist. |callback| will be executed 13608 /// on success or failure. If route creation succeeds it will also trigger an 13609 /// asynchronous call to cef_media_observer_t::OnRoutes on all registered 13610 /// observers. 13611 /// 13612 extern(System) void function ( 13613 cef_media_router_t* self, 13614 cef_media_source_t* source, 13615 cef_media_sink_t* sink, 13616 cef_media_route_create_callback_t* callback) nothrow create_route; 13617 13618 /// 13619 /// Trigger an asynchronous call to cef_media_observer_t::OnRoutes on all 13620 /// registered observers. 13621 /// 13622 extern(System) void function (cef_media_router_t* self) nothrow notify_current_routes; 13623 } 13624 13625 13626 13627 /// 13628 /// Returns the MediaRouter object associated with the global request context. 13629 /// If |callback| is non-NULL it will be executed asnychronously on the UI 13630 /// thread after the manager's storage has been initialized. Equivalent to 13631 /// calling cef_request_context_t::cef_request_context_get_global_context()->get 13632 /// _media_router(). 13633 /// 13634 cef_media_router_t* cef_media_router_get_global ( 13635 cef_completion_callback_t* callback); 13636 13637 /// 13638 /// Implemented by the client to observe MediaRouter events and registered via 13639 /// cef_media_router_t::AddObserver. The functions of this structure will be 13640 /// called on the browser process UI thread. 13641 /// 13642 struct cef_media_observer_t 13643 { 13644 /// 13645 /// Base structure. 13646 /// 13647 cef_base_ref_counted_t base; 13648 13649 /// 13650 /// The list of available media sinks has changed or 13651 /// cef_media_router_t::NotifyCurrentSinks was called. 13652 /// 13653 extern(System) void function ( 13654 cef_media_observer_t* self, 13655 size_t sinksCount, 13656 cef_media_sink_t** sinks) nothrow on_sinks; 13657 13658 /// 13659 /// The list of available media routes has changed or 13660 /// cef_media_router_t::NotifyCurrentRoutes was called. 13661 /// 13662 extern(System) void function ( 13663 cef_media_observer_t* self, 13664 size_t routesCount, 13665 cef_media_route_t** routes) nothrow on_routes; 13666 13667 /// 13668 /// The connection state of |route| has changed. 13669 /// 13670 extern(System) void function ( 13671 cef_media_observer_t* self, 13672 cef_media_route_t* route, 13673 cef_media_route_connection_state_t state) nothrow on_route_state_changed; 13674 13675 /// 13676 /// A message was recieved over |route|. |message| is only valid for the scope 13677 /// of this callback and should be copied if necessary. 13678 /// 13679 extern(System) void function ( 13680 cef_media_observer_t* self, 13681 cef_media_route_t* route, 13682 const(void)* message, 13683 size_t message_size) nothrow on_route_message_received; 13684 } 13685 13686 13687 13688 /// 13689 /// Represents the route between a media source and sink. Instances of this 13690 /// object are created via cef_media_router_t::CreateRoute and retrieved via 13691 /// cef_media_observer_t::OnRoutes. Contains the status and metadata of a 13692 /// routing operation. The functions of this structure may be called on any 13693 /// browser process thread unless otherwise indicated. 13694 /// 13695 struct cef_media_route_t 13696 { 13697 /// 13698 /// Base structure. 13699 /// 13700 cef_base_ref_counted_t base; 13701 13702 /// 13703 /// Returns the ID for this route. 13704 /// 13705 // The resulting string must be freed by calling cef_string_userfree_free(). 13706 extern(System) cef_string_userfree_t function (cef_media_route_t* self) nothrow get_id; 13707 13708 /// 13709 /// Returns the source associated with this route. 13710 /// 13711 extern(System) cef_media_source_t* function (cef_media_route_t* self) nothrow get_source; 13712 13713 /// 13714 /// Returns the sink associated with this route. 13715 /// 13716 extern(System) cef_media_sink_t* function (cef_media_route_t* self) nothrow get_sink; 13717 13718 /// 13719 /// Send a message over this route. |message| will be copied if necessary. 13720 /// 13721 extern(System) void function ( 13722 cef_media_route_t* self, 13723 const(void)* message, 13724 size_t message_size) nothrow send_route_message; 13725 13726 /// 13727 /// Terminate this route. Will result in an asynchronous call to 13728 /// cef_media_observer_t::OnRoutes on all registered observers. 13729 /// 13730 extern(System) void function (cef_media_route_t* self) nothrow terminate; 13731 } 13732 13733 13734 13735 /// 13736 /// Callback structure for cef_media_router_t::CreateRoute. The functions of 13737 /// this structure will be called on the browser process UI thread. 13738 /// 13739 struct cef_media_route_create_callback_t 13740 { 13741 /// 13742 /// Base structure. 13743 /// 13744 cef_base_ref_counted_t base; 13745 13746 /// 13747 /// Method that will be executed when the route creation has finished. 13748 /// |result| will be CEF_MRCR_OK if the route creation succeeded. |error| will 13749 /// be a description of the error if the route creation failed. |route| is the 13750 /// resulting route, or NULL if the route creation failed. 13751 /// 13752 extern(System) void function ( 13753 cef_media_route_create_callback_t* self, 13754 cef_media_route_create_result_t result, 13755 const(cef_string_t)* error, 13756 cef_media_route_t* route) nothrow on_media_route_create_finished; 13757 } 13758 13759 13760 13761 /// 13762 /// Represents a sink to which media can be routed. Instances of this object are 13763 /// retrieved via cef_media_observer_t::OnSinks. The functions of this structure 13764 /// may be called on any browser process thread unless otherwise indicated. 13765 /// 13766 struct cef_media_sink_t 13767 { 13768 /// 13769 /// Base structure. 13770 /// 13771 cef_base_ref_counted_t base; 13772 13773 /// 13774 /// Returns the ID for this sink. 13775 /// 13776 // The resulting string must be freed by calling cef_string_userfree_free(). 13777 extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_id; 13778 13779 /// 13780 /// Returns the name of this sink. 13781 /// 13782 // The resulting string must be freed by calling cef_string_userfree_free(). 13783 extern(System) cef_string_userfree_t function (cef_media_sink_t* self) nothrow get_name; 13784 13785 /// 13786 /// Returns the icon type for this sink. 13787 /// 13788 extern(System) cef_media_sink_icon_type_t function ( 13789 cef_media_sink_t* self) nothrow get_icon_type; 13790 13791 /// 13792 /// Asynchronously retrieves device info. 13793 /// 13794 extern(System) void function ( 13795 cef_media_sink_t* self, 13796 cef_media_sink_device_info_callback_t* callback) nothrow get_device_info; 13797 13798 /// 13799 /// Returns true (1) if this sink accepts content via Cast. 13800 /// 13801 extern(System) int function (cef_media_sink_t* self) nothrow is_cast_sink; 13802 13803 /// 13804 /// Returns true (1) if this sink accepts content via DIAL. 13805 /// 13806 extern(System) int function (cef_media_sink_t* self) nothrow is_dial_sink; 13807 13808 /// 13809 /// Returns true (1) if this sink is compatible with |source|. 13810 /// 13811 extern(System) int function ( 13812 cef_media_sink_t* self, 13813 cef_media_source_t* source) nothrow is_compatible_with; 13814 } 13815 13816 13817 13818 /// 13819 /// Callback structure for cef_media_sink_t::GetDeviceInfo. The functions of 13820 /// this structure will be called on the browser process UI thread. 13821 /// 13822 struct cef_media_sink_device_info_callback_t 13823 { 13824 /// 13825 /// Base structure. 13826 /// 13827 cef_base_ref_counted_t base; 13828 13829 /// 13830 /// Method that will be executed asyncronously once device information has 13831 /// been retrieved. 13832 /// 13833 extern(System) void function ( 13834 cef_media_sink_device_info_callback_t* self, 13835 const(cef_media_sink_device_info_t)* device_info) nothrow on_media_sink_device_info; 13836 } 13837 13838 13839 13840 /// 13841 /// Represents a source from which media can be routed. Instances of this object 13842 /// are retrieved via cef_media_router_t::GetSource. The functions of this 13843 /// structure may be called on any browser process thread unless otherwise 13844 /// indicated. 13845 /// 13846 struct cef_media_source_t 13847 { 13848 /// 13849 /// Base structure. 13850 /// 13851 cef_base_ref_counted_t base; 13852 13853 /// 13854 /// Returns the ID (media source URN or URL) for this source. 13855 /// 13856 // The resulting string must be freed by calling cef_string_userfree_free(). 13857 extern(System) cef_string_userfree_t function (cef_media_source_t* self) nothrow get_id; 13858 13859 /// 13860 /// Returns true (1) if this source outputs its content via Cast. 13861 /// 13862 extern(System) int function (cef_media_source_t* self) nothrow is_cast_source; 13863 13864 /// 13865 /// Returns true (1) if this source outputs its content via DIAL. 13866 /// 13867 extern(System) int function (cef_media_source_t* self) nothrow is_dial_source; 13868 } 13869 13870 13871 13872 // CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_ 13873 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 13874 // 13875 // Redistribution and use in source and binary forms, with or without 13876 // modification, are permitted provided that the following conditions are 13877 // met: 13878 // 13879 // * Redistributions of source code must retain the above copyright 13880 // notice, this list of conditions and the following disclaimer. 13881 // * Redistributions in binary form must reproduce the above 13882 // copyright notice, this list of conditions and the following disclaimer 13883 // in the documentation and/or other materials provided with the 13884 // distribution. 13885 // * Neither the name of Google Inc. nor the name Chromium Embedded 13886 // Framework nor the names of its contributors may be used to endorse 13887 // or promote products derived from this software without specific prior 13888 // written permission. 13889 // 13890 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13891 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 13892 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13893 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 13894 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 13895 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13896 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 13897 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 13898 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 13899 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 13900 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13901 // 13902 // --------------------------------------------------------------------------- 13903 // 13904 // This file was generated by the CEF translator tool and should not edited 13905 // by hand. See the translator.README.txt file in the tools directory for 13906 // more information. 13907 // 13908 // $hash=d70b78b8108bb08b4f53b2627ed4ebfdffece7c1$ 13909 // 13910 13911 extern (C): 13912 13913 /// 13914 /// Supports creation and modification of menus. See cef_menu_id_t for the 13915 /// command ids that have default implementations. All user-defined command ids 13916 /// should be between MENU_ID_USER_FIRST and MENU_ID_USER_LAST. The functions of 13917 /// this structure can only be accessed on the browser process the UI thread. 13918 /// 13919 struct cef_menu_model_t 13920 { 13921 /// 13922 /// Base structure. 13923 /// 13924 13925 /// 13926 /// Returns true (1) if this menu is a submenu. 13927 /// 13928 13929 /// 13930 /// Clears the menu. Returns true (1) on success. 13931 /// 13932 13933 /// 13934 /// Returns the number of items in this menu. 13935 /// 13936 13937 /// 13938 /// Add a separator to the menu. Returns true (1) on success. 13939 g 13940 cef_base_ref_counted_t base; 13941 extern(System) int function (cef_menu_model_t* self) nothrow is_sub_menu; 13942 extern(System) int function (cef_menu_model_t* self) nothrow clear; 13943 extern(System) size_t function (cef_menu_model_t* self) nothrow get_count; 13944 /// 13945 extern(System) int function (cef_menu_model_t* self) nothrow add_separator; 13946 13947 /// 13948 /// Add an item to the menu. Returns true (1) on success. 13949 /// 13950 extern(System) int function ( 13951 cef_menu_model_t* self, 13952 int command_id, 13953 const(cef_string_t)* label) nothrow add_item; 13954 13955 /// 13956 /// Add a check item to the menu. Returns true (1) on success. 13957 /// 13958 extern(System) int function ( 13959 cef_menu_model_t* self, 13960 int command_id, 13961 const(cef_string_t)* label) nothrow add_check_item; 13962 13963 /// 13964 /// Add a radio item to the menu. Only a single item with the specified 13965 /// |group_id| can be checked at a time. Returns true (1) on success. 13966 /// 13967 extern(System) int function ( 13968 cef_menu_model_t* self, 13969 int command_id, 13970 const(cef_string_t)* label, 13971 int group_id) nothrow add_radio_item; 13972 13973 /// 13974 /// Add a sub-menu to the menu. The new sub-menu is returned. 13975 /// 13976 extern(System) cef_menu_model_t* function ( 13977 cef_menu_model_t* self, 13978 int command_id, 13979 const(cef_string_t)* label) nothrow add_sub_menu; 13980 13981 /// 13982 /// Insert a separator in the menu at the specified |index|. Returns true (1) 13983 /// on success. 13984 /// 13985 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow insert_separator_at; 13986 13987 /// 13988 /// Insert an item in the menu at the specified |index|. Returns true (1) on 13989 /// success. 13990 /// 13991 extern(System) int function ( 13992 cef_menu_model_t* self, 13993 size_t index, 13994 int command_id, 13995 const(cef_string_t)* label) nothrow insert_item_at; 13996 13997 /// 13998 /// Insert a check item in the menu at the specified |index|. Returns true (1) 13999 /// on success. 14000 /// 14001 extern(System) int function ( 14002 cef_menu_model_t* self, 14003 size_t index, 14004 int command_id, 14005 const(cef_string_t)* label) nothrow insert_check_item_at; 14006 14007 /// 14008 /// Insert a radio item in the menu at the specified |index|. Only a single 14009 /// item with the specified |group_id| can be checked at a time. Returns true 14010 /// (1) on success. 14011 /// 14012 extern(System) int function ( 14013 cef_menu_model_t* self, 14014 size_t index, 14015 int command_id, 14016 const(cef_string_t)* label, 14017 int group_id) nothrow insert_radio_item_at; 14018 14019 /// 14020 /// Insert a sub-menu in the menu at the specified |index|. The new sub-menu 14021 /// is returned. 14022 /// 14023 extern(System) cef_menu_model_t* function ( 14024 cef_menu_model_t* self, 14025 size_t index, 14026 int command_id, 14027 const(cef_string_t)* label) nothrow insert_sub_menu_at; 14028 14029 /// 14030 /// Removes the item with the specified |command_id|. Returns true (1) on 14031 /// success. 14032 /// 14033 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove; 14034 14035 /// 14036 /// Removes the item at the specified |index|. Returns true (1) on success. 14037 /// 14038 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_at; 14039 14040 /// 14041 /// Returns the index associated with the specified |command_id| or -1 if not 14042 /// found due to the command id not existing in the menu. 14043 /// 14044 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_index_of; 14045 14046 /// 14047 /// Returns the command id at the specified |index| or -1 if not found due to 14048 /// invalid range or the index being a separator. 14049 /// 14050 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_command_id_at; 14051 14052 /// 14053 /// Sets the command id at the specified |index|. Returns true (1) on success. 14054 /// 14055 extern(System) int function ( 14056 cef_menu_model_t* self, 14057 size_t index, 14058 int command_id) nothrow set_command_id_at; 14059 14060 /// 14061 /// Returns the label for the specified |command_id| or NULL if not found. 14062 /// 14063 // The resulting string must be freed by calling cef_string_userfree_free(). 14064 extern(System) cef_string_userfree_t function ( 14065 cef_menu_model_t* self, 14066 int command_id) nothrow get_label; 14067 14068 /// 14069 /// Returns the label at the specified |index| or NULL if not found due to 14070 /// invalid range or the index being a separator. 14071 /// 14072 // The resulting string must be freed by calling cef_string_userfree_free(). 14073 extern(System) cef_string_userfree_t function ( 14074 cef_menu_model_t* self, 14075 size_t index) nothrow get_label_at; 14076 14077 /// 14078 /// Sets the label for the specified |command_id|. Returns true (1) on 14079 /// success. 14080 /// 14081 extern(System) int function ( 14082 cef_menu_model_t* self, 14083 int command_id, 14084 const(cef_string_t)* label) nothrow set_label; 14085 14086 /// 14087 /// Set the label at the specified |index|. Returns true (1) on success. 14088 /// 14089 extern(System) int function ( 14090 cef_menu_model_t* self, 14091 size_t index, 14092 const(cef_string_t)* label) nothrow set_label_at; 14093 14094 /// 14095 /// Returns the item type for the specified |command_id|. 14096 /// 14097 extern(System) cef_menu_item_type_t function ( 14098 cef_menu_model_t* self, 14099 int command_id) nothrow get_type; 14100 14101 /// 14102 /// Returns the item type at the specified |index|. 14103 /// 14104 extern(System) cef_menu_item_type_t function ( 14105 cef_menu_model_t* self, 14106 size_t index) nothrow get_type_at; 14107 14108 /// 14109 /// Returns the group id for the specified |command_id| or -1 if invalid. 14110 /// 14111 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow get_group_id; 14112 14113 /// 14114 /// Returns the group id at the specified |index| or -1 if invalid. 14115 /// 14116 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow get_group_id_at; 14117 14118 /// 14119 /// Sets the group id for the specified |command_id|. Returns true (1) on 14120 /// success. 14121 /// 14122 extern(System) int function ( 14123 cef_menu_model_t* self, 14124 int command_id, 14125 int group_id) nothrow set_group_id; 14126 14127 /// 14128 /// Sets the group id at the specified |index|. Returns true (1) on success. 14129 /// 14130 extern(System) int function ( 14131 cef_menu_model_t* self, 14132 size_t index, 14133 int group_id) nothrow set_group_id_at; 14134 14135 /// 14136 /// Returns the submenu for the specified |command_id| or NULL if invalid. 14137 /// 14138 extern(System) cef_menu_model_t* function ( 14139 cef_menu_model_t* self, 14140 int command_id) nothrow get_sub_menu; 14141 14142 /// 14143 /// Returns the submenu at the specified |index| or NULL if invalid. 14144 /// 14145 extern(System) cef_menu_model_t* function ( 14146 cef_menu_model_t* self, 14147 size_t index) nothrow get_sub_menu_at; 14148 14149 /// 14150 /// Returns true (1) if the specified |command_id| is visible. 14151 /// 14152 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_visible; 14153 14154 /// 14155 /// Returns true (1) if the specified |index| is visible. 14156 /// 14157 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_visible_at; 14158 14159 /// 14160 /// Change the visibility of the specified |command_id|. Returns true (1) on 14161 /// success. 14162 /// 14163 extern(System) int function ( 14164 cef_menu_model_t* self, 14165 int command_id, 14166 int visible) nothrow set_visible; 14167 14168 /// 14169 /// Change the visibility at the specified |index|. Returns true (1) on 14170 /// success. 14171 /// 14172 extern(System) int function ( 14173 cef_menu_model_t* self, 14174 size_t index, 14175 int visible) nothrow set_visible_at; 14176 14177 /// 14178 /// Returns true (1) if the specified |command_id| is enabled. 14179 /// 14180 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_enabled; 14181 14182 /// 14183 /// Returns true (1) if the specified |index| is enabled. 14184 /// 14185 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_enabled_at; 14186 14187 /// 14188 /// Change the enabled status of the specified |command_id|. Returns true (1) 14189 /// on success. 14190 /// 14191 extern(System) int function ( 14192 cef_menu_model_t* self, 14193 int command_id, 14194 int enabled) nothrow set_enabled; 14195 14196 /// 14197 /// Change the enabled status at the specified |index|. Returns true (1) on 14198 /// success. 14199 /// 14200 extern(System) int function ( 14201 cef_menu_model_t* self, 14202 size_t index, 14203 int enabled) nothrow set_enabled_at; 14204 14205 /// 14206 /// Returns true (1) if the specified |command_id| is checked. Only applies to 14207 /// check and radio items. 14208 /// 14209 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow is_checked; 14210 14211 /// 14212 /// Returns true (1) if the specified |index| is checked. Only applies to 14213 /// check and radio items. 14214 /// 14215 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow is_checked_at; 14216 14217 /// 14218 /// Check the specified |command_id|. Only applies to check and radio items. 14219 /// Returns true (1) on success. 14220 /// 14221 extern(System) int function ( 14222 cef_menu_model_t* self, 14223 int command_id, 14224 int checked) nothrow set_checked; 14225 14226 /// 14227 /// Check the specified |index|. Only applies to check and radio items. 14228 /// Returns true (1) on success. 14229 /// 14230 extern(System) int function ( 14231 cef_menu_model_t* self, 14232 size_t index, 14233 int checked) nothrow set_checked_at; 14234 14235 /// 14236 /// Returns true (1) if the specified |command_id| has a keyboard accelerator 14237 /// assigned. 14238 /// 14239 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow has_accelerator; 14240 14241 /// 14242 /// Returns true (1) if the specified |index| has a keyboard accelerator 14243 /// assigned. 14244 /// 14245 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow has_accelerator_at; 14246 14247 /// 14248 /// Set the keyboard accelerator for the specified |command_id|. |key_code| 14249 /// can be any virtual key or character value. Returns true (1) on success. 14250 /// 14251 extern(System) int function ( 14252 cef_menu_model_t* self, 14253 int command_id, 14254 int key_code, 14255 int shift_pressed, 14256 int ctrl_pressed, 14257 int alt_pressed) nothrow set_accelerator; 14258 14259 /// 14260 /// Set the keyboard accelerator at the specified |index|. |key_code| can be 14261 /// any virtual key or character value. Returns true (1) on success. 14262 /// 14263 extern(System) int function ( 14264 cef_menu_model_t* self, 14265 size_t index, 14266 int key_code, 14267 int shift_pressed, 14268 int ctrl_pressed, 14269 int alt_pressed) nothrow set_accelerator_at; 14270 14271 /// 14272 /// Remove the keyboard accelerator for the specified |command_id|. Returns 14273 /// true (1) on success. 14274 /// 14275 extern(System) int function (cef_menu_model_t* self, int command_id) nothrow remove_accelerator; 14276 14277 /// 14278 /// Remove the keyboard accelerator at the specified |index|. Returns true (1) 14279 /// on success. 14280 /// 14281 extern(System) int function (cef_menu_model_t* self, size_t index) nothrow remove_accelerator_at; 14282 14283 /// 14284 /// Retrieves the keyboard accelerator for the specified |command_id|. Returns 14285 /// true (1) on success. 14286 /// 14287 extern(System) int function ( 14288 cef_menu_model_t* self, 14289 int command_id, 14290 int* key_code, 14291 int* shift_pressed, 14292 int* ctrl_pressed, 14293 int* alt_pressed) nothrow get_accelerator; 14294 14295 /// 14296 /// Retrieves the keyboard accelerator for the specified |index|. Returns true 14297 /// (1) on success. 14298 /// 14299 extern(System) int function ( 14300 cef_menu_model_t* self, 14301 size_t index, 14302 int* key_code, 14303 int* shift_pressed, 14304 int* ctrl_pressed, 14305 int* alt_pressed) nothrow get_accelerator_at; 14306 14307 /// 14308 /// Set the explicit color for |command_id| and |color_type| to |color|. 14309 /// Specify a |color| value of 0 to remove the explicit color. If no explicit 14310 /// color or default color is set for |color_type| then the system color will 14311 /// be used. Returns true (1) on success. 14312 /// 14313 extern(System) int function ( 14314 cef_menu_model_t* self, 14315 int command_id, 14316 cef_menu_color_type_t color_type, 14317 cef_color_t color) nothrow set_color; 14318 14319 /// 14320 /// Set the explicit color for |command_id| and |index| to |color|. Specify a 14321 /// |color| value of 0 to remove the explicit color. Specify an |index| value 14322 /// of -1 to set the default color for items that do not have an explicit 14323 /// color set. If no explicit color or default color is set for |color_type| 14324 /// then the system color will be used. Returns true (1) on success. 14325 /// 14326 extern(System) int function ( 14327 cef_menu_model_t* self, 14328 int index, 14329 cef_menu_color_type_t color_type, 14330 cef_color_t color) nothrow set_color_at; 14331 14332 /// 14333 /// Returns in |color| the color that was explicitly set for |command_id| and 14334 /// |color_type|. If a color was not set then 0 will be returned in |color|. 14335 /// Returns true (1) on success. 14336 /// 14337 extern(System) int function ( 14338 cef_menu_model_t* self, 14339 int command_id, 14340 cef_menu_color_type_t color_type, 14341 cef_color_t* color) nothrow get_color; 14342 14343 /// 14344 /// Returns in |color| the color that was explicitly set for |command_id| and 14345 /// |color_type|. Specify an |index| value of -1 to return the default color 14346 /// in |color|. If a color was not set then 0 will be returned in |color|. 14347 /// Returns true (1) on success. 14348 /// 14349 extern(System) int function ( 14350 cef_menu_model_t* self, 14351 int index, 14352 cef_menu_color_type_t color_type, 14353 cef_color_t* color) nothrow get_color_at; 14354 14355 /// 14356 /// Sets the font list for the specified |command_id|. If |font_list| is NULL 14357 /// the system font will be used. Returns true (1) on success. The format is 14358 /// "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a 14359 /// comma-separated list of font family names, - STYLES is an optional space- 14360 /// separated list of style names 14361 /// (case-sensitive "Bold" and "Italic" are supported), and 14362 /// - SIZE is an integer font size in pixels with the suffix "px". 14363 /// 14364 /// Here are examples of valid font description strings: - "Arial, Helvetica, 14365 /// Bold Italic 14px" - "Arial, 14px" 14366 /// 14367 extern(System) int function ( 14368 cef_menu_model_t* self, 14369 int command_id, 14370 const(cef_string_t)* font_list) nothrow set_font_list; 14371 14372 /// 14373 /// Sets the font list for the specified |index|. Specify an |index| value of 14374 /// -1 to set the default font. If |font_list| is NULL the system font will be 14375 /// used. Returns true (1) on success. The format is 14376 /// "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a 14377 /// comma-separated list of font family names, - STYLES is an optional space- 14378 /// separated list of style names 14379 /// (case-sensitive "Bold" and "Italic" are supported), and 14380 /// - SIZE is an integer font size in pixels with the suffix "px". 14381 /// 14382 /// Here are examples of valid font description strings: - "Arial, Helvetica, 14383 /// Bold Italic 14px" - "Arial, 14px" 14384 /// 14385 extern(System) int function ( 14386 cef_menu_model_t* self, 14387 int index, 14388 const(cef_string_t)* font_list) nothrow set_font_list_at; 14389 } 14390 14391 14392 14393 /// 14394 /// Create a new MenuModel with the specified |delegate|. 14395 /// 14396 cef_menu_model_t* cef_menu_model_create (cef_menu_model_delegate_t* delegate_); 14397 14398 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ 14399 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 14400 // 14401 // Redistribution and use in source and binary forms, with or without 14402 // modification, are permitted provided that the following conditions are 14403 // met: 14404 // 14405 // * Redistributions of source code must retain the above copyright 14406 // notice, this list of conditions and the following disclaimer. 14407 // * Redistributions in binary form must reproduce the above 14408 // copyright notice, this list of conditions and the following disclaimer 14409 // in the documentation and/or other materials provided with the 14410 // distribution. 14411 // * Neither the name of Google Inc. nor the name Chromium Embedded 14412 // Framework nor the names of its contributors may be used to endorse 14413 // or promote products derived from this software without specific prior 14414 // written permission. 14415 // 14416 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14417 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14418 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14419 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14420 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14421 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14422 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14423 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14424 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14425 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14426 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14427 // 14428 // --------------------------------------------------------------------------- 14429 // 14430 // This file was generated by the CEF translator tool and should not edited 14431 // by hand. See the translator.README.txt file in the tools directory for 14432 // more information. 14433 // 14434 // $hash=933a90dfb7b94a3aba7f2944e4540662dc8c79d7$ 14435 // 14436 14437 extern (C): 14438 14439 14440 14441 /// 14442 /// Implement this structure to handle menu model events. The functions of this 14443 /// structure will be called on the browser process UI thread unless otherwise 14444 /// indicated. 14445 /// 14446 struct cef_menu_model_delegate_t 14447 { 14448 /// 14449 /// Base structure. 14450 /// 14451 14452 /// 14453 /// Perform the action associated with the specified |command_id| and optional 14454 /// |event_flags|. 14455 /// 14456 14457 /// 14458 /// Called when the user moves the mouse outside the menu and over the owning 14459 /// window. 14460 /// 14461 g 14462 cef_base_ref_counted_t base; 14463 extern(System) void function ( 14464 cef_menu_model_delegate_t* self, 14465 cef_menu_model_t* menu_model, 14466 int command_id, 14467 cef_event_flags_t event_flags) nothrow execute_command; 14468 extern(System) void function ( 14469 cef_menu_model_delegate_t* self, 14470 cef_menu_model_t* menu_model, 14471 const(cef_point_t)* screen_point) nothrow mouse_outside_menu; 14472 14473 /// 14474 /// Called on unhandled open submenu keyboard commands. |is_rtl| will be true 14475 /// (1) if the menu is displaying a right-to-left language. 14476 /// 14477 extern(System) void function ( 14478 cef_menu_model_delegate_t* self, 14479 cef_menu_model_t* menu_model, 14480 int is_rtl) nothrow unhandled_open_submenu; 14481 14482 /// 14483 /// Called on unhandled close submenu keyboard commands. |is_rtl| will be true 14484 /// (1) if the menu is displaying a right-to-left language. 14485 /// 14486 extern(System) void function ( 14487 cef_menu_model_delegate_t* self, 14488 cef_menu_model_t* menu_model, 14489 int is_rtl) nothrow unhandled_close_submenu; 14490 14491 /// 14492 /// The menu is about to show. 14493 /// 14494 extern(System) void function ( 14495 cef_menu_model_delegate_t* self, 14496 cef_menu_model_t* menu_model) nothrow menu_will_show; 14497 14498 /// 14499 /// The menu has closed. 14500 /// 14501 extern(System) void function ( 14502 cef_menu_model_delegate_t* self, 14503 cef_menu_model_t* menu_model) nothrow menu_closed; 14504 14505 /// 14506 /// Optionally modify a menu item label. Return true (1) if |label| was 14507 /// modified. 14508 /// 14509 extern(System) int function ( 14510 cef_menu_model_delegate_t* self, 14511 cef_menu_model_t* menu_model, 14512 cef_string_t* label) nothrow format_label; 14513 } 14514 14515 14516 14517 // CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_ 14518 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 14519 // 14520 // Redistribution and use in source and binary forms, with or without 14521 // modification, are permitted provided that the following conditions are 14522 // met: 14523 // 14524 // * Redistributions of source code must retain the above copyright 14525 // notice, this list of conditions and the following disclaimer. 14526 // * Redistributions in binary form must reproduce the above 14527 // copyright notice, this list of conditions and the following disclaimer 14528 // in the documentation and/or other materials provided with the 14529 // distribution. 14530 // * Neither the name of Google Inc. nor the name Chromium Embedded 14531 // Framework nor the names of its contributors may be used to endorse 14532 // or promote products derived from this software without specific prior 14533 // written permission. 14534 // 14535 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14536 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14537 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14538 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14539 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14540 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14541 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14542 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14543 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14544 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14545 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14546 // 14547 // --------------------------------------------------------------------------- 14548 // 14549 // This file was generated by the CEF translator tool and should not edited 14550 // by hand. See the translator.README.txt file in the tools directory for 14551 // more information. 14552 // 14553 // $hash=d33771c31b7b0964aa2ccf1c2bc2ca1226194977$ 14554 // 14555 14556 extern (C): 14557 14558 /// 14559 /// Structure used to represent an entry in navigation history. 14560 /// 14561 struct cef_navigation_entry_t 14562 { 14563 /// 14564 /// Base structure. 14565 /// 14566 14567 /// 14568 /// Returns true (1) if this object is valid. Do not call any other functions 14569 /// if this function returns false (0). 14570 /// 14571 14572 /// 14573 /// Returns the actual URL of the page. For some pages this may be data: URL 14574 /// or similar. Use get_display_url() to return a display-friendly version. 14575 /// 14576 // The resulting string must be freed by calling cef_string_userfree_free(). 14577 14578 /// 14579 /// Returns a display-friendly version of the URL. 14580 /// 14581 // The resulting string must be freed by calling cef_string_userfree_free(). 14582 g 14583 cef_base_ref_counted_t base; 14584 extern(System) int function (cef_navigation_entry_t* self) nothrow is_valid; 14585 extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_url; 14586 extern(System) cef_string_userfree_t function ( 14587 cef_navigation_entry_t* self) nothrow get_display_url; 14588 14589 /// 14590 /// Returns the original URL that was entered by the user before any 14591 /// redirects. 14592 /// 14593 // The resulting string must be freed by calling cef_string_userfree_free(). 14594 extern(System) cef_string_userfree_t function ( 14595 cef_navigation_entry_t* self) nothrow get_original_url; 14596 14597 /// 14598 /// Returns the title set by the page. This value may be NULL. 14599 /// 14600 // The resulting string must be freed by calling cef_string_userfree_free(). 14601 extern(System) cef_string_userfree_t function (cef_navigation_entry_t* self) nothrow get_title; 14602 14603 /// 14604 /// Returns the transition type which indicates what the user did to move to 14605 /// this page from the previous page. 14606 /// 14607 extern(System) cef_transition_type_t function ( 14608 cef_navigation_entry_t* self) nothrow get_transition_type; 14609 14610 /// 14611 /// Returns true (1) if this navigation includes post data. 14612 /// 14613 extern(System) int function (cef_navigation_entry_t* self) nothrow has_post_data; 14614 14615 /// 14616 /// Returns the time for the last known successful navigation completion. A 14617 /// navigation may be completed more than once if the page is reloaded. May be 14618 /// 0 if the navigation has not yet completed. 14619 /// 14620 extern(System) cef_basetime_t function ( 14621 cef_navigation_entry_t* self) nothrow get_completion_time; 14622 14623 /// 14624 /// Returns the HTTP status code for the last known successful navigation 14625 /// response. May be 0 if the response has not yet been received or if the 14626 /// navigation has not yet completed. 14627 /// 14628 extern(System) int function (cef_navigation_entry_t* self) nothrow get_http_status_code; 14629 14630 /// 14631 /// Returns the SSL information for this navigation entry. 14632 /// 14633 extern(System) cef_sslstatus_t* function (cef_navigation_entry_t* self) nothrow get_sslstatus; 14634 } 14635 14636 14637 14638 // CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_ 14639 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 14640 // 14641 // Redistribution and use in source and binary forms, with or without 14642 // modification, are permitted provided that the following conditions are 14643 // met: 14644 // 14645 // * Redistributions of source code must retain the above copyright 14646 // notice, this list of conditions and the following disclaimer. 14647 // * Redistributions in binary form must reproduce the above 14648 // copyright notice, this list of conditions and the following disclaimer 14649 // in the documentation and/or other materials provided with the 14650 // distribution. 14651 // * Neither the name of Google Inc. nor the name Chromium Embedded 14652 // Framework nor the names of its contributors may be used to endorse 14653 // or promote products derived from this software without specific prior 14654 // written permission. 14655 // 14656 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14657 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14658 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14659 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14660 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14661 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14662 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14663 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14664 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14665 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14666 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14667 // 14668 // --------------------------------------------------------------------------- 14669 // 14670 // This file was generated by the CEF translator tool and should not edited 14671 // by hand. See the translator.README.txt file in the tools directory for 14672 // more information. 14673 // 14674 // $hash=9330c709713a10c1e6b55278428e65c07f4c9dfb$ 14675 // 14676 14677 extern (C): 14678 14679 /// 14680 /// Add an entry to the cross-origin access whitelist. 14681 /// 14682 /// The same-origin policy restricts how scripts hosted from different origins 14683 /// (scheme + domain + port) can communicate. By default, scripts can only 14684 /// access resources with the same origin. Scripts hosted on the HTTP and HTTPS 14685 /// schemes (but no other schemes) can use the "Access-Control-Allow-Origin" 14686 /// header to allow cross-origin requests. For example, 14687 /// https://source.example.com can make XMLHttpRequest requests on 14688 /// http://target.example.com if the http://target.example.com request returns 14689 /// an "Access-Control-Allow-Origin: https://source.example.com" response 14690 /// header. 14691 /// 14692 /// Scripts in separate frames or iframes and hosted from the same protocol and 14693 /// domain suffix can execute cross-origin JavaScript if both pages set the 14694 /// document.domain value to the same domain suffix. For example, 14695 /// scheme://foo.example.com and scheme://bar.example.com can communicate using 14696 /// JavaScript if both domains set document.domain="example.com". 14697 /// 14698 /// This function is used to allow access to origins that would otherwise 14699 /// violate the same-origin policy. Scripts hosted underneath the fully 14700 /// qualified |source_origin| URL (like http://www.example.com) will be allowed 14701 /// access to all resources hosted on the specified |target_protocol| and 14702 /// |target_domain|. If |target_domain| is non-NULL and 14703 /// |allow_target_subdomains| is false (0) only exact domain matches will be 14704 /// allowed. If |target_domain| contains a top- level domain component (like 14705 /// "example.com") and |allow_target_subdomains| is true (1) sub-domain matches 14706 /// will be allowed. If |target_domain| is NULL and |allow_target_subdomains| if 14707 /// true (1) all domains and IP addresses will be allowed. 14708 /// 14709 /// This function cannot be used to bypass the restrictions on local or display 14710 /// isolated schemes. See the comments on CefRegisterCustomScheme for more 14711 /// information. 14712 /// 14713 /// This function may be called on any thread. Returns false (0) if 14714 /// |source_origin| is invalid or the whitelist cannot be accessed. 14715 /// 14716 int cef_add_cross_origin_whitelist_entry ( 14717 const(cef_string_t)* source_origin, 14718 const(cef_string_t)* target_protocol, 14719 const(cef_string_t)* target_domain, 14720 int allow_target_subdomains); 14721 14722 /// 14723 /// Remove an entry from the cross-origin access whitelist. Returns false (0) if 14724 /// |source_origin| is invalid or the whitelist cannot be accessed. 14725 /// 14726 int cef_remove_cross_origin_whitelist_entry ( 14727 const(cef_string_t)* source_origin, 14728 const(cef_string_t)* target_protocol, 14729 const(cef_string_t)* target_domain, 14730 int allow_target_subdomains); 14731 14732 /// 14733 /// Remove all entries from the cross-origin access whitelist. Returns false (0) 14734 /// if the whitelist cannot be accessed. 14735 /// 14736 int cef_clear_cross_origin_whitelist (); 14737 14738 // CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_ 14739 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 14740 // 14741 // Redistribution and use in source and binary forms, with or without 14742 // modification, are permitted provided that the following conditions are 14743 // met: 14744 // 14745 // * Redistributions of source code must retain the above copyright 14746 // notice, this list of conditions and the following disclaimer. 14747 // * Redistributions in binary form must reproduce the above 14748 // copyright notice, this list of conditions and the following disclaimer 14749 // in the documentation and/or other materials provided with the 14750 // distribution. 14751 // * Neither the name of Google Inc. nor the name Chromium Embedded 14752 // Framework nor the names of its contributors may be used to endorse 14753 // or promote products derived from this software without specific prior 14754 // written permission. 14755 // 14756 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14757 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14758 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14759 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14760 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14761 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14762 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14763 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14764 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14765 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14766 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14767 // 14768 // --------------------------------------------------------------------------- 14769 // 14770 // This file was generated by the CEF translator tool and should not edited 14771 // by hand. See the translator.README.txt file in the tools directory for 14772 // more information. 14773 // 14774 // $hash=5d6dad4bfaeef0117d068b6e67a8da7490fe7c2d$ 14775 // 14776 14777 extern (C): 14778 14779 /// 14780 /// Combines specified |base_url| and |relative_url| into |resolved_url|. 14781 /// Returns false (0) if one of the URLs is NULL or invalid. 14782 /// 14783 int cef_resolve_url ( 14784 const(cef_string_t)* base_url, 14785 const(cef_string_t)* relative_url, 14786 cef_string_t* resolved_url); 14787 14788 /// 14789 /// Parse the specified |url| into its component parts. Returns false (0) if the 14790 /// URL is NULL or invalid. 14791 /// 14792 int cef_parse_url (const(cef_string_t)* url, cef_urlparts_t* parts); 14793 14794 /// 14795 /// Creates a URL from the specified |parts|, which must contain a non-NULL spec 14796 /// or a non-NULL host and path (at a minimum), but not both. Returns false (0) 14797 /// if |parts| isn't initialized as described. 14798 /// 14799 int cef_create_url (const(cef_urlparts_t)* parts, cef_string_t* url); 14800 14801 /// 14802 /// This is a convenience function for formatting a URL in a concise and human- 14803 /// friendly way to help users make security-related decisions (or in other 14804 /// circumstances when people need to distinguish sites, origins, or otherwise- 14805 /// simplified URLs from each other). Internationalized domain names (IDN) may 14806 /// be presented in Unicode if the conversion is considered safe. The returned 14807 /// value will (a) omit the path for standard schemes, excepting file and 14808 /// filesystem, and (b) omit the port if it is the default for the scheme. Do 14809 /// not use this for URLs which will be parsed or sent to other applications. 14810 /// 14811 // The resulting string must be freed by calling cef_string_userfree_free(). 14812 cef_string_userfree_t cef_format_url_for_security_display ( 14813 const(cef_string_t)* origin_url); 14814 14815 /// 14816 /// Returns the mime type for the specified file extension or an NULL string if 14817 /// unknown. 14818 /// 14819 // The resulting string must be freed by calling cef_string_userfree_free(). 14820 cef_string_userfree_t cef_get_mime_type (const(cef_string_t)* extension); 14821 14822 /// 14823 /// Get the extensions associated with the given mime type. This should be 14824 /// passed in lower case. There could be multiple extensions for a given mime 14825 /// type, like "html,htm" for "text/html", or "txt,text,html,..." for "text/*". 14826 /// Any existing elements in the provided vector will not be erased. 14827 /// 14828 void cef_get_extensions_for_mime_type ( 14829 const(cef_string_t)* mime_type, 14830 cef_string_list_t extensions); 14831 14832 /// 14833 /// Encodes |data| as a base64 string. 14834 /// 14835 // The resulting string must be freed by calling cef_string_userfree_free(). 14836 cef_string_userfree_t cef_base64encode (const(void)* data, size_t data_size); 14837 14838 /// 14839 /// Decodes the base64 encoded string |data|. The returned value will be NULL if 14840 /// the decoding fails. 14841 /// 14842 14843 cef_binary_value_t* cef_base64decode (const(cef_string_t)* data); 14844 14845 /// 14846 /// Escapes characters in |text| which are unsuitable for use as a query 14847 /// parameter value. Everything except alphanumerics and -_.!~*'() will be 14848 /// converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The 14849 /// result is basically the same as encodeURIComponent in Javacript. 14850 /// 14851 // The resulting string must be freed by calling cef_string_userfree_free(). 14852 cef_string_userfree_t cef_uriencode (const(cef_string_t)* text, int use_plus); 14853 14854 /// 14855 /// Unescapes |text| and returns the result. Unescaping consists of looking for 14856 /// the exact pattern "%XX" where each X is a hex digit and converting to the 14857 /// character with the numerical value of those digits (e.g. "i%20=%203%3b" 14858 /// unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will 14859 /// attempt to interpret the initial decoded result as UTF-8. If the result is 14860 /// convertable into UTF-8 it will be returned as converted. Otherwise the 14861 /// initial decoded result will be returned. The |unescape_rule| parameter 14862 /// supports further customization the decoding process. 14863 /// 14864 // The resulting string must be freed by calling cef_string_userfree_free(). 14865 cef_string_userfree_t cef_uridecode ( 14866 const(cef_string_t)* text, 14867 int convert_to_utf8, 14868 cef_uri_unescape_rule_t unescape_rule); 14869 14870 /// 14871 /// Parses the specified |json_string| and returns a dictionary or list 14872 /// representation. If JSON parsing fails this function returns NULL. 14873 /// 14874 14875 cef_value_t* cef_parse_json ( 14876 const(cef_string_t)* json_string, 14877 cef_json_parser_options_t options); 14878 14879 /// 14880 /// Parses the specified UTF8-encoded |json| buffer of size |json_size| and 14881 /// returns a dictionary or list representation. If JSON parsing fails this 14882 /// function returns NULL. 14883 /// 14884 cef_value_t* cef_parse_json_buffer ( 14885 const(void)* json, 14886 size_t json_size, 14887 cef_json_parser_options_t options); 14888 14889 /// 14890 /// Parses the specified |json_string| and returns a dictionary or list 14891 /// representation. If JSON parsing fails this function returns NULL and 14892 /// populates |error_msg_out| with a formatted error message. 14893 /// 14894 cef_value_t* cef_parse_jsonand_return_error ( 14895 const(cef_string_t)* json_string, 14896 cef_json_parser_options_t options, 14897 cef_string_t* error_msg_out); 14898 14899 /// 14900 /// Generates a JSON string from the specified root |node| which should be a 14901 /// dictionary or list value. Returns an NULL string on failure. This function 14902 /// requires exclusive access to |node| including any underlying data. 14903 /// 14904 // The resulting string must be freed by calling cef_string_userfree_free(). 14905 cef_string_userfree_t cef_write_json ( 14906 cef_value_t* node, 14907 cef_json_writer_options_t options); 14908 14909 // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_ 14910 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 14911 // 14912 // Redistribution and use in source and binary forms, with or without 14913 // modification, are permitted provided that the following conditions are 14914 // met: 14915 // 14916 // * Redistributions of source code must retain the above copyright 14917 // notice, this list of conditions and the following disclaimer. 14918 // * Redistributions in binary form must reproduce the above 14919 // copyright notice, this list of conditions and the following disclaimer 14920 // in the documentation and/or other materials provided with the 14921 // distribution. 14922 // * Neither the name of Google Inc. nor the name Chromium Embedded 14923 // Framework nor the names of its contributors may be used to endorse 14924 // or promote products derived from this software without specific prior 14925 // written permission. 14926 // 14927 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14928 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14929 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14930 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14931 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14932 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14933 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14934 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14935 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14936 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14937 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14938 // 14939 // --------------------------------------------------------------------------- 14940 // 14941 // This file was generated by the CEF translator tool and should not edited 14942 // by hand. See the translator.README.txt file in the tools directory for 14943 // more information. 14944 // 14945 // $hash=70b306534b9cb8334c9ea260feacfd8f2f503292$ 14946 // 14947 14948 extern (C): 14949 14950 /// 14951 /// Retrieve the path associated with the specified |key|. Returns true (1) on 14952 /// success. Can be called on any thread in the browser process. 14953 /// 14954 int cef_get_path (cef_path_key_t key, cef_string_t* path); 14955 14956 // CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 14957 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 14958 // 14959 // Redistribution and use in source and binary forms, with or without 14960 // modification, are permitted provided that the following conditions are 14961 // met: 14962 // 14963 // * Redistributions of source code must retain the above copyright 14964 // notice, this list of conditions and the following disclaimer. 14965 // * Redistributions in binary form must reproduce the above 14966 // copyright notice, this list of conditions and the following disclaimer 14967 // in the documentation and/or other materials provided with the 14968 // distribution. 14969 // * Neither the name of Google Inc. nor the name Chromium Embedded 14970 // Framework nor the names of its contributors may be used to endorse 14971 // or promote products derived from this software without specific prior 14972 // written permission. 14973 // 14974 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14975 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 14976 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 14977 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 14978 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 14979 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 14980 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14981 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 14982 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 14983 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14984 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14985 // 14986 // --------------------------------------------------------------------------- 14987 // 14988 // This file was generated by the CEF translator tool and should not edited 14989 // by hand. See the translator.README.txt file in the tools directory for 14990 // more information. 14991 // 14992 // $hash=012d76416d19b590f29c013c44ceec1674593022$ 14993 // 14994 14995 extern (C): 14996 14997 /// 14998 /// Callback structure used for asynchronous continuation of media access 14999 /// permission requests. 15000 /// 15001 struct cef_media_access_callback_t 15002 { 15003 /// 15004 /// Base structure. 15005 /// 15006 15007 /// 15008 /// Call to allow or deny media access. If this callback was initiated in 15009 /// response to a getUserMedia (indicated by 15010 /// CEF_MEDIA_PERMISSION_DEVICE_AUDIO_CAPTURE and/or 15011 /// CEF_MEDIA_PERMISSION_DEVICE_VIDEO_CAPTURE being set) then 15012 /// |allowed_permissions| must match |required_permissions| passed to 15013 /// OnRequestMediaAccessPermission. 15014 /// 15015 15016 /// 15017 /// Cancel the media access request. 15018 /// 15019 g 15020 cef_base_ref_counted_t base; 15021 extern(System) void function ( 15022 cef_media_access_callback_t* self, 15023 uint allowed_permissions) nothrow cont; 15024 extern(System) void function (cef_media_access_callback_t* self) nothrow cancel; 15025 } 15026 15027 /// 15028 /// Callback structure used for asynchronous continuation of permission prompts. 15029 /// 15030 struct cef_permission_prompt_callback_t 15031 { 15032 /// 15033 /// Base structure. 15034 /// 15035 cef_base_ref_counted_t base; 15036 15037 /// 15038 /// Complete the permissions request with the specified |result|. 15039 /// 15040 extern(System) void function ( 15041 cef_permission_prompt_callback_t* self, 15042 cef_permission_request_result_t result) nothrow cont; 15043 } 15044 15045 15046 15047 /// 15048 /// Implement this structure to handle events related to permission requests. 15049 /// The functions of this structure will be called on the browser process UI 15050 /// thread. 15051 /// 15052 struct cef_permission_handler_t 15053 { 15054 /// 15055 /// Base structure. 15056 /// 15057 cef_base_ref_counted_t base; 15058 15059 /// 15060 /// Called when a page requests permission to access media. 15061 /// |requesting_origin| is the URL origin requesting permission. 15062 /// |requested_permissions| is a combination of values from 15063 /// cef_media_access_permission_types_t that represent the requested 15064 /// permissions. Return true (1) and call cef_media_access_callback_t 15065 /// functions either in this function or at a later time to continue or cancel 15066 /// the request. Return false (0) to proceed with default handling. With the 15067 /// Chrome runtime, default handling will display the permission request UI. 15068 /// With the Alloy runtime, default handling will deny the request. This 15069 /// function will not be called if the "--enable-media-stream" command-line 15070 /// switch is used to grant all permissions. 15071 /// 15072 extern(System) int function ( 15073 cef_permission_handler_t* self, 15074 cef_browser_t* browser, 15075 cef_frame_t* frame, 15076 const(cef_string_t)* requesting_origin, 15077 uint requested_permissions, 15078 cef_media_access_callback_t* callback) nothrow on_request_media_access_permission; 15079 15080 /// 15081 /// Called when a page should show a permission prompt. |prompt_id| uniquely 15082 /// identifies the prompt. |requesting_origin| is the URL origin requesting 15083 /// permission. |requested_permissions| is a combination of values from 15084 /// cef_permission_request_types_t that represent the requested permissions. 15085 /// Return true (1) and call cef_permission_prompt_callback_t::Continue either 15086 /// in this function or at a later time to continue or cancel the request. 15087 /// Return false (0) to proceed with default handling. With the Chrome 15088 /// runtime, default handling will display the permission prompt UI. With the 15089 /// Alloy runtime, default handling is CEF_PERMISSION_RESULT_IGNORE. 15090 /// 15091 extern(System) int function ( 15092 cef_permission_handler_t* self, 15093 cef_browser_t* browser, 15094 ulong prompt_id, 15095 const(cef_string_t)* requesting_origin, 15096 uint requested_permissions, 15097 cef_permission_prompt_callback_t* callback) nothrow on_show_permission_prompt; 15098 15099 /// 15100 /// Called when a permission prompt handled via OnShowPermissionPrompt is 15101 /// dismissed. |prompt_id| will match the value that was passed to 15102 /// OnShowPermissionPrompt. |result| will be the value passed to 15103 /// cef_permission_prompt_callback_t::Continue or CEF_PERMISSION_RESULT_IGNORE 15104 /// if the dialog was dismissed for other reasons such as navigation, browser 15105 /// closure, etc. This function will not be called if OnShowPermissionPrompt 15106 /// returned false (0) for |prompt_id|. 15107 /// 15108 extern(System) void function ( 15109 cef_permission_handler_t* self, 15110 cef_browser_t* browser, 15111 ulong prompt_id, 15112 cef_permission_request_result_t result) nothrow on_dismiss_permission_prompt; 15113 } 15114 15115 15116 15117 // CEF_INCLUDE_CAPI_CEF_PERMISSION_HANDLER_CAPI_H_ 15118 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 15119 // 15120 // Redistribution and use in source and binary forms, with or without 15121 // modification, are permitted provided that the following conditions are 15122 // met: 15123 // 15124 // * Redistributions of source code must retain the above copyright 15125 // notice, this list of conditions and the following disclaimer. 15126 // * Redistributions in binary form must reproduce the above 15127 // copyright notice, this list of conditions and the following disclaimer 15128 // in the documentation and/or other materials provided with the 15129 // distribution. 15130 // * Neither the name of Google Inc. nor the name Chromium Embedded 15131 // Framework nor the names of its contributors may be used to endorse 15132 // or promote products derived from this software without specific prior 15133 // written permission. 15134 // 15135 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15136 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15137 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15138 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15139 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15140 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15141 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15142 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15143 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15144 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15145 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15146 // 15147 // --------------------------------------------------------------------------- 15148 // 15149 // This file was generated by the CEF translator tool and should not edited 15150 // by hand. See the translator.README.txt file in the tools directory for 15151 // more information. 15152 // 15153 // $hash=922659242ea25c52d02884a7cc5918d086cbfaca$ 15154 // 15155 15156 extern (C): 15157 15158 /// 15159 /// Structure that manages custom preference registrations. 15160 /// 15161 struct cef_preference_registrar_t 15162 { 15163 /// 15164 /// Base structure. 15165 /// 15166 15167 /// 15168 /// Register a preference with the specified |name| and |default_value|. To 15169 /// avoid conflicts with built-in preferences the |name| value should contain 15170 /// an application-specific prefix followed by a period (e.g. "myapp.value"). 15171 /// The contents of |default_value| will be copied. The data type for the 15172 /// preference will be inferred from |default_value|'s type and cannot be 15173 /// changed after registration. Returns true (1) on success. Returns false (0) 15174 /// if |name| is already registered or if |default_value| has an invalid type. 15175 /// This function must be called from within the scope of the 15176 /// cef_browser_process_handler_t::OnRegisterCustomPreferences callback. 15177 /// 15178 15179 /// 15180 /// Manage access to preferences. Many built-in preferences are registered by 15181 /// Chromium. Custom preferences can be registered in 15182 g 15183 cef_base_scoped_t base; 15184 extern(System) int function ( 15185 cef_preference_registrar_t* self, 15186 const(cef_string_t)* name, 15187 cef_value_t* default_value) nothrow add_preference; 15188 } 15189 15190 15191 /// cef_browser_process_handler_t::OnRegisterCustomPreferences. 15192 /// 15193 struct cef_preference_manager_t 15194 { 15195 /// 15196 /// Base structure. 15197 /// 15198 g 15199 cef_base_ref_counted_t base; 15200 15201 /// 15202 /// Returns true (1) if a preference with the specified |name| exists. This 15203 /// function must be called on the browser process UI thread. 15204 /// 15205 extern(System) int function ( 15206 cef_preference_manager_t* self, 15207 const(cef_string_t)* name) nothrow has_preference; 15208 15209 /// 15210 /// Returns the value for the preference with the specified |name|. Returns 15211 /// NULL if the preference does not exist. The returned object contains a copy 15212 /// of the underlying preference value and modifications to the returned 15213 /// object will not modify the underlying preference value. This function must 15214 /// be called on the browser process UI thread. 15215 /// 15216 extern(System) cef_value_t* function ( 15217 cef_preference_manager_t* self, 15218 const(cef_string_t)* name) nothrow get_preference; 15219 15220 /// 15221 /// Returns all preferences as a dictionary. If |include_defaults| is true (1) 15222 /// then preferences currently at their default value will be included. The 15223 /// returned object contains a copy of the underlying preference values and 15224 /// modifications to the returned object will not modify the underlying 15225 /// preference values. This function must be called on the browser process UI 15226 /// thread. 15227 /// 15228 extern(System) cef_dictionary_value_t* function ( 15229 cef_preference_manager_t* self, 15230 int include_defaults) nothrow get_all_preferences; 15231 15232 /// 15233 /// Returns true (1) if the preference with the specified |name| can be 15234 /// modified using SetPreference. As one example preferences set via the 15235 /// command-line usually cannot be modified. This function must be called on 15236 /// the browser process UI thread. 15237 /// 15238 extern(System) int function ( 15239 cef_preference_manager_t* self, 15240 const(cef_string_t)* name) nothrow can_set_preference; 15241 15242 /// 15243 /// Set the |value| associated with preference |name|. Returns true (1) if the 15244 /// value is set successfully and false (0) otherwise. If |value| is NULL the 15245 /// preference will be restored to its default value. If setting the 15246 /// preference fails then |error| will be populated with a detailed 15247 /// description of the problem. This function must be called on the browser 15248 /// process UI thread. 15249 /// 15250 extern(System) int function ( 15251 cef_preference_manager_t* self, 15252 const(cef_string_t)* name, 15253 cef_value_t* value, 15254 cef_string_t* error) nothrow set_preference; 15255 } 15256 15257 15258 15259 /// 15260 /// Returns the global preference manager object. 15261 /// 15262 cef_preference_manager_t* cef_preference_manager_get_global (); 15263 15264 // CEF_INCLUDE_CAPI_CEF_PREFERENCE_CAPI_H_ 15265 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 15266 // 15267 // Redistribution and use in source and binary forms, with or without 15268 // modification, are permitted provided that the following conditions are 15269 // met: 15270 // 15271 // * Redistributions of source code must retain the above copyright 15272 // notice, this list of conditions and the following disclaimer. 15273 // * Redistributions in binary form must reproduce the above 15274 // copyright notice, this list of conditions and the following disclaimer 15275 // in the documentation and/or other materials provided with the 15276 // distribution. 15277 // * Neither the name of Google Inc. nor the name Chromium Embedded 15278 // Framework nor the names of its contributors may be used to endorse 15279 // or promote products derived from this software without specific prior 15280 // written permission. 15281 // 15282 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15283 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15284 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15285 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15286 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15287 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15288 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15289 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15290 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15291 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15292 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15293 // 15294 // --------------------------------------------------------------------------- 15295 // 15296 // This file was generated by the CEF translator tool and should not edited 15297 // by hand. See the translator.README.txt file in the tools directory for 15298 // more information. 15299 // 15300 // $hash=d09937fb047debd9da39c4072a434659b3c5682c$ 15301 // 15302 15303 extern (C): 15304 15305 /// 15306 /// Callback structure for asynchronous continuation of print dialog requests. 15307 /// 15308 struct cef_print_dialog_callback_t 15309 { 15310 /// 15311 /// Base structure. 15312 /// 15313 15314 /// 15315 /// Continue printing with the specified |settings|. 15316 /// 15317 15318 /// 15319 /// Cancel the printing. 15320 /// 15321 15322 /// 15323 /// Callback structure for asynchronous continuation of print job requests. 15324 /// 15325 15326 /// 15327 /// Base structure. 15328 /// 15329 15330 /// 15331 /// Indicate completion of the print job. 15332 /// 15333 g 15334 cef_base_ref_counted_t base; 15335 extern(System) void function ( 15336 cef_print_dialog_callback_t* self, 15337 cef_print_settings_t* settings) nothrow cont; 15338 extern(System) void function (cef_print_dialog_callback_t* self) nothrow cancel; 15339 } 15340 15341 15342 15343 struct cef_print_job_callback_t 15344 { 15345 cef_base_ref_counted_t base; 15346 extern(System) void function (cef_print_job_callback_t* self) nothrow cont; 15347 } 15348 15349 15350 15351 /// 15352 /// Implement this structure to handle printing on Linux. Each browser will have 15353 /// only one print job in progress at a time. The functions of this structure 15354 /// will be called on the browser process UI thread. 15355 /// 15356 struct cef_print_handler_t 15357 { 15358 /// 15359 /// Base structure. 15360 /// 15361 cef_base_ref_counted_t base; 15362 15363 /// 15364 /// Called when printing has started for the specified |browser|. This 15365 /// function will be called before the other OnPrint*() functions and 15366 /// irrespective of how printing was initiated (e.g. 15367 /// cef_browser_host_t::print(), JavaScript window.print() or PDF extension 15368 /// print button). 15369 /// 15370 extern(System) void function ( 15371 cef_print_handler_t* self, 15372 cef_browser_t* browser) nothrow on_print_start; 15373 15374 /// 15375 /// Synchronize |settings| with client state. If |get_defaults| is true (1) 15376 /// then populate |settings| with the default print settings. Do not keep a 15377 /// reference to |settings| outside of this callback. 15378 /// 15379 extern(System) void function ( 15380 cef_print_handler_t* self, 15381 cef_browser_t* browser, 15382 cef_print_settings_t* settings, 15383 int get_defaults) nothrow on_print_settings; 15384 15385 /// 15386 /// Show the print dialog. Execute |callback| once the dialog is dismissed. 15387 /// Return true (1) if the dialog will be displayed or false (0) to cancel the 15388 /// printing immediately. 15389 /// 15390 extern(System) int function ( 15391 cef_print_handler_t* self, 15392 cef_browser_t* browser, 15393 int has_selection, 15394 cef_print_dialog_callback_t* callback) nothrow on_print_dialog; 15395 15396 /// 15397 /// Send the print job to the printer. Execute |callback| once the job is 15398 /// completed. Return true (1) if the job will proceed or false (0) to cancel 15399 /// the job immediately. 15400 /// 15401 extern(System) int function ( 15402 cef_print_handler_t* self, 15403 cef_browser_t* browser, 15404 const(cef_string_t)* document_name, 15405 const(cef_string_t)* pdf_file_path, 15406 cef_print_job_callback_t* callback) nothrow on_print_job; 15407 15408 /// 15409 /// Reset client state related to printing. 15410 /// 15411 extern(System) void function ( 15412 cef_print_handler_t* self, 15413 cef_browser_t* browser) nothrow on_print_reset; 15414 15415 /// 15416 /// Return the PDF paper size in device units. Used in combination with 15417 /// cef_browser_host_t::print_to_pdf(). 15418 /// 15419 extern(System) cef_size_t function ( 15420 cef_print_handler_t* self, 15421 cef_browser_t* browser, 15422 int device_units_per_inch) nothrow get_pdf_paper_size; 15423 } 15424 15425 15426 15427 // CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_ 15428 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 15429 // 15430 // Redistribution and use in source and binary forms, with or without 15431 // modification, are permitted provided that the following conditions are 15432 // met: 15433 // 15434 // * Redistributions of source code must retain the above copyright 15435 // notice, this list of conditions and the following disclaimer. 15436 // * Redistributions in binary form must reproduce the above 15437 // copyright notice, this list of conditions and the following disclaimer 15438 // in the documentation and/or other materials provided with the 15439 // distribution. 15440 // * Neither the name of Google Inc. nor the name Chromium Embedded 15441 // Framework nor the names of its contributors may be used to endorse 15442 // or promote products derived from this software without specific prior 15443 // written permission. 15444 // 15445 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15446 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15447 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15448 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15449 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15450 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15451 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15452 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15453 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15454 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15455 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15456 // 15457 // --------------------------------------------------------------------------- 15458 // 15459 // This file was generated by the CEF translator tool and should not edited 15460 // by hand. See the translator.README.txt file in the tools directory for 15461 // more information. 15462 // 15463 // $hash=46508464579e797d4684f4a7facdb39f9bdb312b$ 15464 // 15465 15466 extern (C): 15467 15468 /// 15469 /// Structure representing print settings. 15470 /// 15471 struct cef_print_settings_t 15472 { 15473 /// 15474 /// Base structure. 15475 /// 15476 15477 /// 15478 /// Returns true (1) if this object is valid. Do not call any other functions 15479 /// if this function returns false (0). 15480 /// 15481 15482 /// 15483 /// Returns true (1) if the values of this object are read-only. Some APIs may 15484 /// expose read-only objects. 15485 /// 15486 15487 /// 15488 /// Set the page orientation. 15489 /// 15490 15491 /// 15492 /// Returns true (1) if the orientation is landscape. 15493 /// 15494 15495 /// 15496 /// Set the printer printable area in device units. Some platforms already 15497 g 15498 cef_base_ref_counted_t base; 15499 extern(System) int function (cef_print_settings_t* self) nothrow is_valid; 15500 extern(System) int function (cef_print_settings_t* self) nothrow is_read_only; 15501 extern(System) void function (cef_print_settings_t* self, int landscape) nothrow set_orientation; 15502 extern(System) int function (cef_print_settings_t* self) nothrow is_landscape; 15503 /// provide flipped area. Set |landscape_needs_flip| to false (0) on those 15504 /// platforms to avoid double flipping. 15505 /// 15506 extern(System) void function ( 15507 cef_print_settings_t* self, 15508 const(cef_size_t)* physical_size_device_units, 15509 const(cef_rect_t)* printable_area_device_units, 15510 int landscape_needs_flip) nothrow set_printer_printable_area; 15511 15512 /// 15513 /// Set the device name. 15514 /// 15515 extern(System) void function ( 15516 cef_print_settings_t* self, 15517 const(cef_string_t)* name) nothrow set_device_name; 15518 15519 /// 15520 /// Get the device name. 15521 /// 15522 // The resulting string must be freed by calling cef_string_userfree_free(). 15523 extern(System) cef_string_userfree_t function ( 15524 cef_print_settings_t* self) nothrow get_device_name; 15525 15526 /// 15527 /// Set the DPI (dots per inch). 15528 /// 15529 extern(System) void function (cef_print_settings_t* self, int dpi) nothrow set_dpi; 15530 15531 /// 15532 /// Get the DPI (dots per inch). 15533 /// 15534 extern(System) int function (cef_print_settings_t* self) nothrow get_dpi; 15535 15536 /// 15537 /// Set the page ranges. 15538 /// 15539 extern(System) void function ( 15540 cef_print_settings_t* self, 15541 size_t rangesCount, 15542 const(cef_range_t)* ranges) nothrow set_page_ranges; 15543 15544 /// 15545 /// Returns the number of page ranges that currently exist. 15546 /// 15547 extern(System) size_t function (cef_print_settings_t* self) nothrow get_page_ranges_count; 15548 15549 /// 15550 /// Retrieve the page ranges. 15551 /// 15552 extern(System) void function ( 15553 cef_print_settings_t* self, 15554 size_t* rangesCount, 15555 cef_range_t* ranges) nothrow get_page_ranges; 15556 15557 /// 15558 /// Set whether only the selection will be printed. 15559 /// 15560 extern(System) void function ( 15561 cef_print_settings_t* self, 15562 int selection_only) nothrow set_selection_only; 15563 15564 /// 15565 /// Returns true (1) if only the selection will be printed. 15566 /// 15567 extern(System) int function (cef_print_settings_t* self) nothrow is_selection_only; 15568 15569 /// 15570 /// Set whether pages will be collated. 15571 /// 15572 extern(System) void function (cef_print_settings_t* self, int collate) nothrow set_collate; 15573 15574 /// 15575 /// Returns true (1) if pages will be collated. 15576 /// 15577 extern(System) int function (cef_print_settings_t* self) nothrow will_collate; 15578 15579 /// 15580 /// Set the color model. 15581 /// 15582 extern(System) void function ( 15583 cef_print_settings_t* self, 15584 cef_color_model_t model) nothrow set_color_model; 15585 15586 /// 15587 /// Get the color model. 15588 /// 15589 extern(System) cef_color_model_t function (cef_print_settings_t* self) nothrow get_color_model; 15590 15591 /// 15592 /// Set the number of copies. 15593 /// 15594 extern(System) void function (cef_print_settings_t* self, int copies) nothrow set_copies; 15595 15596 /// 15597 /// Get the number of copies. 15598 /// 15599 extern(System) int function (cef_print_settings_t* self) nothrow get_copies; 15600 15601 /// 15602 /// Set the duplex mode. 15603 /// 15604 extern(System) void function ( 15605 cef_print_settings_t* self, 15606 cef_duplex_mode_t mode) nothrow set_duplex_mode; 15607 15608 /// 15609 /// Get the duplex mode. 15610 /// 15611 extern(System) cef_duplex_mode_t function (cef_print_settings_t* self) nothrow get_duplex_mode; 15612 } 15613 15614 15615 15616 /// 15617 /// Create a new cef_print_settings_t object. 15618 /// 15619 cef_print_settings_t* cef_print_settings_create (); 15620 15621 // CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_ 15622 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 15623 // 15624 // Redistribution and use in source and binary forms, with or without 15625 // modification, are permitted provided that the following conditions are 15626 // met: 15627 // 15628 // * Redistributions of source code must retain the above copyright 15629 // notice, this list of conditions and the following disclaimer. 15630 // * Redistributions in binary form must reproduce the above 15631 // copyright notice, this list of conditions and the following disclaimer 15632 // in the documentation and/or other materials provided with the 15633 // distribution. 15634 // * Neither the name of Google Inc. nor the name Chromium Embedded 15635 // Framework nor the names of its contributors may be used to endorse 15636 // or promote products derived from this software without specific prior 15637 // written permission. 15638 // 15639 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15640 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15641 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15642 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15643 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15644 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15645 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15646 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15647 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15648 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15649 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15650 // 15651 // --------------------------------------------------------------------------- 15652 // 15653 // This file was generated by the CEF translator tool and should not edited 15654 // by hand. See the translator.README.txt file in the tools directory for 15655 // more information. 15656 // 15657 // $hash=e20a8d6a5803dae5ba156adde40c8b964899b176$ 15658 // 15659 15660 extern (C): 15661 15662 /// 15663 /// Structure representing a message. Can be used on any process and thread. 15664 /// 15665 struct cef_process_message_t 15666 { 15667 /// 15668 /// Base structure. 15669 /// 15670 15671 /// 15672 /// Returns true (1) if this object is valid. Do not call any other functions 15673 /// if this function returns false (0). 15674 /// 15675 15676 /// 15677 /// Returns true (1) if the values of this object are read-only. Some APIs may 15678 /// expose read-only objects. 15679 /// 15680 15681 /// 15682 /// Returns a writable copy of this object. Returns nullptr when message 15683 /// contains a shared memory region. 15684 /// 15685 g 15686 cef_base_ref_counted_t base; 15687 extern(System) int function (cef_process_message_t* self) nothrow is_valid; 15688 extern(System) int function (cef_process_message_t* self) nothrow is_read_only; 15689 extern(System) cef_process_message_t* function (cef_process_message_t* self) nothrow copy; 15690 15691 /// 15692 /// Returns the message name. 15693 /// 15694 // The resulting string must be freed by calling cef_string_userfree_free(). 15695 extern(System) cef_string_userfree_t function (cef_process_message_t* self) nothrow get_name; 15696 15697 /// 15698 /// Returns the list of arguments. Returns nullptr when message contains a 15699 /// shared memory region. 15700 /// 15701 extern(System) cef_list_value_t* function ( 15702 cef_process_message_t* self) nothrow get_argument_list; 15703 15704 /// 15705 /// Returns the shared memory region. Returns nullptr when message contains an 15706 /// argument list. 15707 /// 15708 extern(System) cef_shared_memory_region_t* function ( 15709 cef_process_message_t* self) nothrow get_shared_memory_region; 15710 } 15711 15712 15713 15714 /// 15715 /// Create a new cef_process_message_t object with the specified name. 15716 /// 15717 cef_process_message_t* cef_process_message_create (const(cef_string_t)* name); 15718 15719 // CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ 15720 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 15721 // 15722 // Redistribution and use in source and binary forms, with or without 15723 // modification, are permitted provided that the following conditions are 15724 // met: 15725 // 15726 // * Redistributions of source code must retain the above copyright 15727 // notice, this list of conditions and the following disclaimer. 15728 // * Redistributions in binary form must reproduce the above 15729 // copyright notice, this list of conditions and the following disclaimer 15730 // in the documentation and/or other materials provided with the 15731 // distribution. 15732 // * Neither the name of Google Inc. nor the name Chromium Embedded 15733 // Framework nor the names of its contributors may be used to endorse 15734 // or promote products derived from this software without specific prior 15735 // written permission. 15736 // 15737 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15738 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15739 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15740 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15741 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15742 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15743 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15744 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15745 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15746 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15747 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15748 // 15749 // --------------------------------------------------------------------------- 15750 // 15751 // This file was generated by the CEF translator tool and should not edited 15752 // by hand. See the translator.README.txt file in the tools directory for 15753 // more information. 15754 // 15755 // $hash=88c42c5f216798304b07bfe985296014cf65996c$ 15756 // 15757 15758 extern (C): 15759 15760 /// 15761 /// Launches the process specified via |command_line|. Returns true (1) upon 15762 /// success. Must be called on the browser process TID_PROCESS_LAUNCHER thread. 15763 /// 15764 /// Unix-specific notes: - All file descriptors open in the parent process will 15765 /// be closed in the 15766 /// child process except for stdin, stdout, and stderr. 15767 /// - If the first argument on the command line does not contain a slash, 15768 /// PATH will be searched. (See man execvp.) 15769 /// 15770 int cef_launch_process (cef_command_line_t* command_line); 15771 15772 // CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 15773 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 15774 // 15775 // Redistribution and use in source and binary forms, with or without 15776 // modification, are permitted provided that the following conditions are 15777 // met: 15778 // 15779 // * Redistributions of source code must retain the above copyright 15780 // notice, this list of conditions and the following disclaimer. 15781 // * Redistributions in binary form must reproduce the above 15782 // copyright notice, this list of conditions and the following disclaimer 15783 // in the documentation and/or other materials provided with the 15784 // distribution. 15785 // * Neither the name of Google Inc. nor the name Chromium Embedded 15786 // Framework nor the names of its contributors may be used to endorse 15787 // or promote products derived from this software without specific prior 15788 // written permission. 15789 // 15790 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15791 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15792 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15793 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15794 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15795 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15796 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15797 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15798 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15799 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15800 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15801 // 15802 // --------------------------------------------------------------------------- 15803 // 15804 // This file was generated by the CEF translator tool and should not edited 15805 // by hand. See the translator.README.txt file in the tools directory for 15806 // more information. 15807 // 15808 // $hash=b1b38a3171dd3626029e70e75b482dfa3531215b$ 15809 // 15810 15811 extern (C): 15812 15813 /// 15814 /// Generic callback structure used for managing the lifespan of a registration. 15815 /// 15816 struct cef_registration_t 15817 { 15818 /// 15819 /// Base structure. 15820 /// 15821 15822 // CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_ 15823 g 15824 cef_base_ref_counted_t base; 15825 } 15826 15827 15828 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 15829 // 15830 // Redistribution and use in source and binary forms, with or without 15831 // modification, are permitted provided that the following conditions are 15832 // met: 15833 // 15834 // * Redistributions of source code must retain the above copyright 15835 // notice, this list of conditions and the following disclaimer. 15836 // * Redistributions in binary form must reproduce the above 15837 // copyright notice, this list of conditions and the following disclaimer 15838 // in the documentation and/or other materials provided with the 15839 // distribution. 15840 // * Neither the name of Google Inc. nor the name Chromium Embedded 15841 // Framework nor the names of its contributors may be used to endorse 15842 // or promote products derived from this software without specific prior 15843 // written permission. 15844 // 15845 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15846 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15847 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 15848 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 15849 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 15850 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 15851 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 15852 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15853 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15854 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15855 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15856 // 15857 // --------------------------------------------------------------------------- 15858 // 15859 // This file was generated by the CEF translator tool and should not edited 15860 // by hand. See the translator.README.txt file in the tools directory for 15861 // more information. 15862 // 15863 // $hash=32d8176f39b05487bae048990b2dee3212ae3b78$ 15864 // 15865 15866 extern (C): 15867 15868 /// 15869 /// Implement this structure to handle events when window rendering is disabled. 15870 /// The functions of this structure will be called on the UI thread. 15871 /// 15872 struct cef_render_handler_t 15873 { 15874 /// 15875 /// Base structure. 15876 /// 15877 15878 /// 15879 /// Return the handler for accessibility notifications. If no handler is 15880 /// provided the default implementation will be used. 15881 /// 15882 15883 /// 15884 /// Called to retrieve the root window rectangle in screen DIP coordinates. 15885 /// Return true (1) if the rectangle was provided. If this function returns 15886 /// false (0) the rectangle from GetViewRect will be used. 15887 g 15888 cef_base_ref_counted_t base; 15889 extern(System) cef_accessibility_handler_t* function ( 15890 cef_render_handler_t* self) nothrow get_accessibility_handler; 15891 /// 15892 extern(System) int function ( 15893 cef_render_handler_t* self, 15894 cef_browser_t* browser, 15895 cef_rect_t* rect) nothrow get_root_screen_rect; 15896 15897 /// 15898 /// Called to retrieve the view rectangle in screen DIP coordinates. This 15899 /// function must always provide a non-NULL rectangle. 15900 /// 15901 extern(System) void function ( 15902 cef_render_handler_t* self, 15903 cef_browser_t* browser, 15904 cef_rect_t* rect) nothrow get_view_rect; 15905 15906 /// 15907 /// Called to retrieve the translation from view DIP coordinates to screen 15908 /// coordinates. Windows/Linux should provide screen device (pixel) 15909 /// coordinates and MacOS should provide screen DIP coordinates. Return true 15910 /// (1) if the requested coordinates were provided. 15911 /// 15912 extern(System) int function ( 15913 cef_render_handler_t* self, 15914 cef_browser_t* browser, 15915 int viewX, 15916 int viewY, 15917 int* screenX, 15918 int* screenY) nothrow get_screen_point; 15919 15920 /// 15921 /// Called to allow the client to fill in the CefScreenInfo object with 15922 /// appropriate values. Return true (1) if the |screen_info| structure has 15923 /// been modified. 15924 /// 15925 /// If the screen info rectangle is left NULL the rectangle from GetViewRect 15926 /// will be used. If the rectangle is still NULL or invalid popups may not be 15927 /// drawn correctly. 15928 /// 15929 extern(System) int function ( 15930 cef_render_handler_t* self, 15931 cef_browser_t* browser, 15932 cef_screen_info_t* screen_info) nothrow get_screen_info; 15933 15934 /// 15935 /// Called when the browser wants to show or hide the popup widget. The popup 15936 /// should be shown if |show| is true (1) and hidden if |show| is false (0). 15937 /// 15938 extern(System) void function ( 15939 cef_render_handler_t* self, 15940 cef_browser_t* browser, 15941 int show) nothrow on_popup_show; 15942 15943 /// 15944 /// Called when the browser wants to move or resize the popup widget. |rect| 15945 /// contains the new location and size in view coordinates. 15946 /// 15947 extern(System) void function ( 15948 cef_render_handler_t* self, 15949 cef_browser_t* browser, 15950 const(cef_rect_t)* rect) nothrow on_popup_size; 15951 15952 /// 15953 /// Called when an element should be painted. Pixel values passed to this 15954 /// function are scaled relative to view coordinates based on the value of 15955 /// CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type| 15956 /// indicates whether the element is the view or the popup widget. |buffer| 15957 /// contains the pixel data for the whole image. |dirtyRects| contains the set 15958 /// of rectangles in pixel coordinates that need to be repainted. |buffer| 15959 /// will be |width|*|height|*4 bytes in size and represents a BGRA image with 15960 /// an upper-left origin. This function is only called when 15961 /// cef_window_tInfo::shared_texture_enabled is set to false (0). 15962 /// 15963 extern(System) void function ( 15964 cef_render_handler_t* self, 15965 cef_browser_t* browser, 15966 cef_paint_element_type_t type, 15967 size_t dirtyRectsCount, 15968 const(cef_rect_t)* dirtyRects, 15969 const(void)* buffer, 15970 int width, 15971 int height) nothrow on_paint; 15972 15973 /// 15974 /// Called when an element has been rendered to the shared texture handle. 15975 /// |type| indicates whether the element is the view or the popup widget. 15976 /// |dirtyRects| contains the set of rectangles in pixel coordinates that need 15977 /// to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that 15978 /// can be accessed via ID3D11Device using the OpenSharedResource function. 15979 /// This function is only called when cef_window_tInfo::shared_texture_enabled 15980 /// is set to true (1), and is currently only supported on Windows. 15981 /// 15982 extern(System) void function ( 15983 cef_render_handler_t* self, 15984 cef_browser_t* browser, 15985 cef_paint_element_type_t type, 15986 size_t dirtyRectsCount, 15987 const(cef_rect_t)* dirtyRects, 15988 void* shared_handle) nothrow on_accelerated_paint; 15989 15990 /// 15991 /// Called to retrieve the size of the touch handle for the specified 15992 /// |orientation|. 15993 /// 15994 extern(System) void function ( 15995 cef_render_handler_t* self, 15996 cef_browser_t* browser, 15997 cef_horizontal_alignment_t orientation, 15998 cef_size_t* size) nothrow get_touch_handle_size; 15999 16000 /// 16001 /// Called when touch handle state is updated. The client is responsible for 16002 /// rendering the touch handles. 16003 /// 16004 extern(System) void function ( 16005 cef_render_handler_t* self, 16006 cef_browser_t* browser, 16007 const(cef_touch_handle_state_t)* state) nothrow on_touch_handle_state_changed; 16008 16009 /// 16010 /// Called when the user starts dragging content in the web view. Contextual 16011 /// information about the dragged content is supplied by |drag_data|. (|x|, 16012 /// |y|) is the drag start location in screen coordinates. OS APIs that run a 16013 /// system message loop may be used within the StartDragging call. 16014 /// 16015 /// Return false (0) to abort the drag operation. Don't call any of 16016 /// cef_browser_host_t::DragSource*Ended* functions after returning false (0). 16017 /// 16018 /// Return true (1) to handle the drag operation. Call 16019 /// cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either 16020 /// synchronously or asynchronously to inform the web view that the drag 16021 /// operation has ended. 16022 /// 16023 extern(System) int function ( 16024 cef_render_handler_t* self, 16025 cef_browser_t* browser, 16026 cef_drag_data_t* drag_data, 16027 cef_drag_operations_mask_t allowed_ops, 16028 int x, 16029 int y) nothrow start_dragging; 16030 16031 /// 16032 /// Called when the web view wants to update the mouse cursor during a drag & 16033 /// drop operation. |operation| describes the allowed operation (none, move, 16034 /// copy, link). 16035 /// 16036 extern(System) void function ( 16037 cef_render_handler_t* self, 16038 cef_browser_t* browser, 16039 cef_drag_operations_mask_t operation) nothrow update_drag_cursor; 16040 16041 /// 16042 /// Called when the scroll offset has changed. 16043 /// 16044 extern(System) void function ( 16045 cef_render_handler_t* self, 16046 cef_browser_t* browser, 16047 double x, 16048 double y) nothrow on_scroll_offset_changed; 16049 16050 /// 16051 /// Called when the IME composition range has changed. |selected_range| is the 16052 /// range of characters that have been selected. |character_bounds| is the 16053 /// bounds of each character in view coordinates. 16054 /// 16055 extern(System) void function ( 16056 cef_render_handler_t* self, 16057 cef_browser_t* browser, 16058 const(cef_range_t)* selected_range, 16059 size_t character_boundsCount, 16060 const(cef_rect_t)* character_bounds) nothrow on_ime_composition_range_changed; 16061 16062 /// 16063 /// Called when text selection has changed for the specified |browser|. 16064 /// |selected_text| is the currently selected text and |selected_range| is the 16065 /// character range. 16066 /// 16067 extern(System) void function ( 16068 cef_render_handler_t* self, 16069 cef_browser_t* browser, 16070 const(cef_string_t)* selected_text, 16071 const(cef_range_t)* selected_range) nothrow on_text_selection_changed; 16072 16073 /// 16074 /// Called when an on-screen keyboard should be shown or hidden for the 16075 /// specified |browser|. |input_mode| specifies what kind of keyboard should 16076 /// be opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing 16077 /// keyboard for this browser should be hidden. 16078 /// 16079 extern(System) void function ( 16080 cef_render_handler_t* self, 16081 cef_browser_t* browser, 16082 cef_text_input_mode_t input_mode) nothrow on_virtual_keyboard_requested; 16083 } 16084 16085 16086 16087 // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ 16088 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 16089 // 16090 // Redistribution and use in source and binary forms, with or without 16091 // modification, are permitted provided that the following conditions are 16092 // met: 16093 // 16094 // * Redistributions of source code must retain the above copyright 16095 // notice, this list of conditions and the following disclaimer. 16096 // * Redistributions in binary form must reproduce the above 16097 // copyright notice, this list of conditions and the following disclaimer 16098 // in the documentation and/or other materials provided with the 16099 // distribution. 16100 // * Neither the name of Google Inc. nor the name Chromium Embedded 16101 // Framework nor the names of its contributors may be used to endorse 16102 // or promote products derived from this software without specific prior 16103 // written permission. 16104 // 16105 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16106 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16107 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16108 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16109 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16110 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16111 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16112 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16113 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16114 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16115 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16116 // 16117 // --------------------------------------------------------------------------- 16118 // 16119 // This file was generated by the CEF translator tool and should not edited 16120 // by hand. See the translator.README.txt file in the tools directory for 16121 // more information. 16122 // 16123 // $hash=d807c7566ce3085243e9e7ea279fee7241acfc5f$ 16124 // 16125 16126 extern (C): 16127 16128 /// 16129 /// Structure used to implement render process callbacks. The functions of this 16130 /// structure will be called on the render process main thread (TID_RENDERER) 16131 /// unless otherwise indicated. 16132 /// 16133 struct cef_render_process_handler_t 16134 { 16135 /// 16136 /// Base structure. 16137 /// 16138 16139 /// 16140 /// Called after WebKit has been initialized. 16141 /// 16142 16143 /// 16144 /// Called after a browser has been created. When browsing cross-origin a new 16145 /// browser will be created before the old browser with the same identifier is 16146 g 16147 cef_base_ref_counted_t base; 16148 extern(System) void function (cef_render_process_handler_t* self) nothrow on_web_kit_initialized; 16149 /// destroyed. |extra_info| is an optional read-only value originating from 16150 /// cef_browser_host_t::cef_browser_host_create_browser(), 16151 /// cef_browser_host_t::cef_browser_host_create_browser_sync(), 16152 /// cef_life_span_handler_t::on_before_popup() or 16153 /// cef_browser_view_t::cef_browser_view_create(). 16154 /// 16155 extern(System) void function ( 16156 cef_render_process_handler_t* self, 16157 cef_browser_t* browser, 16158 cef_dictionary_value_t* extra_info) nothrow on_browser_created; 16159 16160 /// 16161 /// Called before a browser is destroyed. 16162 /// 16163 extern(System) void function ( 16164 cef_render_process_handler_t* self, 16165 cef_browser_t* browser) nothrow on_browser_destroyed; 16166 16167 /// 16168 /// Return the handler for browser load status events. 16169 /// 16170 extern(System) cef_load_handler_t* function ( 16171 cef_render_process_handler_t* self) nothrow get_load_handler; 16172 16173 /// 16174 /// Called immediately after the V8 context for a frame has been created. To 16175 /// retrieve the JavaScript 'window' object use the 16176 /// cef_v8context_t::get_global() function. V8 handles can only be accessed 16177 /// from the thread on which they are created. A task runner for posting tasks 16178 /// on the associated thread can be retrieved via the 16179 /// cef_v8context_t::get_task_runner() function. 16180 /// 16181 extern(System) void function ( 16182 cef_render_process_handler_t* self, 16183 cef_browser_t* browser, 16184 cef_frame_t* frame, 16185 cef_v8context_t* context) nothrow on_context_created; 16186 16187 /// 16188 /// Called immediately before the V8 context for a frame is released. No 16189 /// references to the context should be kept after this function is called. 16190 /// 16191 extern(System) void function ( 16192 cef_render_process_handler_t* self, 16193 cef_browser_t* browser, 16194 cef_frame_t* frame, 16195 cef_v8context_t* context) nothrow on_context_released; 16196 16197 /// 16198 /// Called for global uncaught exceptions in a frame. Execution of this 16199 /// callback is disabled by default. To enable set 16200 /// cef_settings_t.uncaught_exception_stack_size > 0. 16201 /// 16202 extern(System) void function ( 16203 cef_render_process_handler_t* self, 16204 cef_browser_t* browser, 16205 cef_frame_t* frame, 16206 cef_v8context_t* context, 16207 cef_v8exception_t* exception, 16208 cef_v8stack_trace_t* stackTrace) nothrow on_uncaught_exception; 16209 16210 /// 16211 /// Called when a new node in the the browser gets focus. The |node| value may 16212 /// be NULL if no specific node has gained focus. The node object passed to 16213 /// this function represents a snapshot of the DOM at the time this function 16214 /// is executed. DOM objects are only valid for the scope of this function. Do 16215 /// not keep references to or attempt to access any DOM objects outside the 16216 /// scope of this function. 16217 /// 16218 extern(System) void function ( 16219 cef_render_process_handler_t* self, 16220 cef_browser_t* browser, 16221 cef_frame_t* frame, 16222 cef_domnode_t* node) nothrow on_focused_node_changed; 16223 16224 /// 16225 /// Called when a new message is received from a different process. Return 16226 /// true (1) if the message was handled or false (0) otherwise. It is safe to 16227 /// keep a reference to |message| outside of this callback. 16228 /// 16229 extern(System) int function ( 16230 cef_render_process_handler_t* self, 16231 cef_browser_t* browser, 16232 cef_frame_t* frame, 16233 cef_process_id_t source_process, 16234 cef_process_message_t* message) nothrow on_process_message_received; 16235 } 16236 16237 16238 16239 // CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ 16240 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 16241 // 16242 // Redistribution and use in source and binary forms, with or without 16243 // modification, are permitted provided that the following conditions are 16244 // met: 16245 // 16246 // * Redistributions of source code must retain the above copyright 16247 // notice, this list of conditions and the following disclaimer. 16248 // * Redistributions in binary form must reproduce the above 16249 // copyright notice, this list of conditions and the following disclaimer 16250 // in the documentation and/or other materials provided with the 16251 // distribution. 16252 // * Neither the name of Google Inc. nor the name Chromium Embedded 16253 // Framework nor the names of its contributors may be used to endorse 16254 // or promote products derived from this software without specific prior 16255 // written permission. 16256 // 16257 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16258 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16259 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16260 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16261 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16262 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16263 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16264 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16265 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16266 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16267 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16268 // 16269 // --------------------------------------------------------------------------- 16270 // 16271 // This file was generated by the CEF translator tool and should not edited 16272 // by hand. See the translator.README.txt file in the tools directory for 16273 // more information. 16274 // 16275 // $hash=241f8b8ba0a4555f8ad8ed1d60345ae83d4d62f4$ 16276 // 16277 16278 extern (C): 16279 16280 /// 16281 /// Structure used to represent a web request. The functions of this structure 16282 /// may be called on any thread. 16283 /// 16284 struct cef_request_t 16285 { 16286 /// 16287 /// Base structure. 16288 /// 16289 16290 /// 16291 /// Returns true (1) if this object is read-only. 16292 /// 16293 16294 /// 16295 /// Get the fully qualified URL. 16296 /// 16297 // The resulting string must be freed by calling cef_string_userfree_free(). 16298 16299 /// 16300 /// Set the fully qualified URL. 16301 /// 16302 16303 /// 16304 /// Get the request function type. The value will default to POST if post data 16305 /// is provided and GET otherwise. 16306 /// 16307 // The resulting string must be freed by calling cef_string_userfree_free(). 16308 g 16309 cef_base_ref_counted_t base; 16310 extern(System) int function (cef_request_t* self) nothrow is_read_only; 16311 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_url; 16312 extern(System) void function (cef_request_t* self, const(cef_string_t)* url) nothrow set_url; 16313 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_method; 16314 16315 /// 16316 /// Set the request function type. 16317 /// 16318 extern(System) void function ( 16319 cef_request_t* self, 16320 const(cef_string_t)* method) nothrow set_method; 16321 16322 /// 16323 /// Set the referrer URL and policy. If non-NULL the referrer URL must be 16324 /// fully qualified with an HTTP or HTTPS scheme component. Any username, 16325 /// password or ref component will be removed. 16326 /// 16327 extern(System) void function ( 16328 cef_request_t* self, 16329 const(cef_string_t)* referrer_url, 16330 cef_referrer_policy_t policy) nothrow set_referrer; 16331 16332 /// 16333 /// Get the referrer URL. 16334 /// 16335 // The resulting string must be freed by calling cef_string_userfree_free(). 16336 extern(System) cef_string_userfree_t function (cef_request_t* self) nothrow get_referrer_url; 16337 16338 /// 16339 /// Get the referrer policy. 16340 /// 16341 extern(System) cef_referrer_policy_t function (cef_request_t* self) nothrow get_referrer_policy; 16342 16343 /// 16344 /// Get the post data. 16345 /// 16346 extern(System) cef_post_data_t* function (cef_request_t* self) nothrow get_post_data; 16347 16348 /// 16349 /// Set the post data. 16350 /// 16351 extern(System) void function ( 16352 cef_request_t* self, 16353 cef_post_data_t* postData) nothrow set_post_data; 16354 16355 /// 16356 /// Get the header values. Will not include the Referer value if any. 16357 /// 16358 extern(System) void function ( 16359 cef_request_t* self, 16360 cef_string_multimap_t headerMap) nothrow get_header_map; 16361 16362 /// 16363 /// Set the header values. If a Referer value exists in the header map it will 16364 /// be removed and ignored. 16365 /// 16366 extern(System) void function ( 16367 cef_request_t* self, 16368 cef_string_multimap_t headerMap) nothrow set_header_map; 16369 16370 /// 16371 /// Returns the first header value for |name| or an NULL string if not found. 16372 /// Will not return the Referer value if any. Use GetHeaderMap instead if 16373 /// |name| might have multiple values. 16374 /// 16375 // The resulting string must be freed by calling cef_string_userfree_free(). 16376 extern(System) cef_string_userfree_t function ( 16377 cef_request_t* self, 16378 const(cef_string_t)* name) nothrow get_header_by_name; 16379 16380 /// 16381 /// Set the header |name| to |value|. If |overwrite| is true (1) any existing 16382 /// values will be replaced with the new value. If |overwrite| is false (0) 16383 /// any existing values will not be overwritten. The Referer value cannot be 16384 /// set using this function. 16385 /// 16386 extern(System) void function ( 16387 cef_request_t* self, 16388 const(cef_string_t)* name, 16389 const(cef_string_t)* value, 16390 int overwrite) nothrow set_header_by_name; 16391 16392 /// 16393 /// Set all values at one time. 16394 /// 16395 extern(System) void function ( 16396 cef_request_t* self, 16397 const(cef_string_t)* url, 16398 const(cef_string_t)* method, 16399 cef_post_data_t* postData, 16400 cef_string_multimap_t headerMap) nothrow set; 16401 16402 /// 16403 /// Get the flags used in combination with cef_urlrequest_t. See 16404 /// cef_urlrequest_flags_t for supported values. 16405 /// 16406 extern(System) int function (cef_request_t* self) nothrow get_flags; 16407 16408 /// 16409 /// Set the flags used in combination with cef_urlrequest_t. See 16410 /// cef_urlrequest_flags_t for supported values. 16411 /// 16412 extern(System) void function (cef_request_t* self, int flags) nothrow set_flags; 16413 16414 /// 16415 /// Get the URL to the first party for cookies used in combination with 16416 /// cef_urlrequest_t. 16417 /// 16418 // The resulting string must be freed by calling cef_string_userfree_free(). 16419 extern(System) cef_string_userfree_t function ( 16420 cef_request_t* self) nothrow get_first_party_for_cookies; 16421 16422 /// 16423 /// Set the URL to the first party for cookies used in combination with 16424 /// cef_urlrequest_t. 16425 /// 16426 extern(System) void function ( 16427 cef_request_t* self, 16428 const(cef_string_t)* url) nothrow set_first_party_for_cookies; 16429 16430 /// 16431 /// Get the resource type for this request. Only available in the browser 16432 /// process. 16433 /// 16434 extern(System) cef_resource_type_t function (cef_request_t* self) nothrow get_resource_type; 16435 16436 /// 16437 /// Get the transition type for this request. Only available in the browser 16438 /// process and only applies to requests that represent a main frame or sub- 16439 /// frame navigation. 16440 /// 16441 extern(System) cef_transition_type_t function (cef_request_t* self) nothrow get_transition_type; 16442 16443 /// 16444 /// Returns the globally unique identifier for this request or 0 if not 16445 /// specified. Can be used by cef_resource_request_handler_t implementations 16446 /// in the browser process to track a single request across multiple 16447 /// callbacks. 16448 /// 16449 extern(System) ulong function (cef_request_t* self) nothrow get_identifier; 16450 } 16451 16452 16453 16454 /// 16455 /// Create a new cef_request_t object. 16456 /// 16457 cef_request_t* cef_request_create (); 16458 16459 /// 16460 /// Structure used to represent post data for a web request. The functions of 16461 /// this structure may be called on any thread. 16462 /// 16463 struct cef_post_data_t 16464 { 16465 /// 16466 /// Base structure. 16467 /// 16468 cef_base_ref_counted_t base; 16469 16470 /// 16471 /// Returns true (1) if this object is read-only. 16472 /// 16473 extern(System) int function (cef_post_data_t* self) nothrow is_read_only; 16474 16475 /// 16476 /// Returns true (1) if the underlying POST data includes elements that are 16477 /// not represented by this cef_post_data_t object (for example, multi-part 16478 /// file upload data). Modifying cef_post_data_t objects with excluded 16479 /// elements may result in the request failing. 16480 /// 16481 extern(System) int function (cef_post_data_t* self) nothrow has_excluded_elements; 16482 16483 /// 16484 /// Returns the number of existing post data elements. 16485 /// 16486 extern(System) size_t function (cef_post_data_t* self) nothrow get_element_count; 16487 16488 /// 16489 /// Retrieve the post data elements. 16490 /// 16491 extern(System) void function ( 16492 cef_post_data_t* self, 16493 size_t* elementsCount, 16494 cef_post_data_element_t** elements) nothrow get_elements; 16495 16496 /// 16497 /// Remove the specified post data element. Returns true (1) if the removal 16498 /// succeeds. 16499 /// 16500 extern(System) int function ( 16501 cef_post_data_t* self, 16502 cef_post_data_element_t* element) nothrow remove_element; 16503 16504 /// 16505 /// Add the specified post data element. Returns true (1) if the add 16506 /// succeeds. 16507 /// 16508 extern(System) int function ( 16509 cef_post_data_t* self, 16510 cef_post_data_element_t* element) nothrow add_element; 16511 16512 /// 16513 /// Remove all existing post data elements. 16514 /// 16515 extern(System) void function (cef_post_data_t* self) nothrow remove_elements; 16516 } 16517 16518 16519 16520 /// 16521 /// Create a new cef_post_data_t object. 16522 /// 16523 cef_post_data_t* cef_post_data_create (); 16524 16525 /// 16526 /// Structure used to represent a single element in the request post data. The 16527 /// functions of this structure may be called on any thread. 16528 /// 16529 struct cef_post_data_element_t 16530 { 16531 /// 16532 /// Base structure. 16533 /// 16534 cef_base_ref_counted_t base; 16535 16536 /// 16537 /// Returns true (1) if this object is read-only. 16538 /// 16539 extern(System) int function (cef_post_data_element_t* self) nothrow is_read_only; 16540 16541 /// 16542 /// Remove all contents from the post data element. 16543 /// 16544 extern(System) void function (cef_post_data_element_t* self) nothrow set_to_empty; 16545 16546 /// 16547 /// The post data element will represent a file. 16548 /// 16549 extern(System) void function ( 16550 cef_post_data_element_t* self, 16551 const(cef_string_t)* fileName) nothrow set_to_file; 16552 16553 /// 16554 /// The post data element will represent bytes. The bytes passed in will be 16555 /// copied. 16556 /// 16557 extern(System) void function ( 16558 cef_post_data_element_t* self, 16559 size_t size, 16560 const(void)* bytes) nothrow set_to_bytes; 16561 16562 /// 16563 /// Return the type of this post data element. 16564 /// 16565 extern(System) cef_postdataelement_type_t function ( 16566 cef_post_data_element_t* self) nothrow get_type; 16567 16568 /// 16569 /// Return the file name. 16570 /// 16571 // The resulting string must be freed by calling cef_string_userfree_free(). 16572 extern(System) cef_string_userfree_t function (cef_post_data_element_t* self) nothrow get_file; 16573 16574 /// 16575 /// Return the number of bytes. 16576 /// 16577 extern(System) size_t function (cef_post_data_element_t* self) nothrow get_bytes_count; 16578 16579 /// 16580 /// Read up to |size| bytes into |bytes| and return the number of bytes 16581 /// actually read. 16582 /// 16583 extern(System) size_t function ( 16584 cef_post_data_element_t* self, 16585 size_t size, 16586 void* bytes) nothrow get_bytes; 16587 } 16588 16589 16590 16591 /// 16592 /// Create a new cef_post_data_element_t object. 16593 /// 16594 cef_post_data_element_t* cef_post_data_element_create (); 16595 16596 // CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_ 16597 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 16598 // 16599 // Redistribution and use in source and binary forms, with or without 16600 // modification, are permitted provided that the following conditions are 16601 // met: 16602 // 16603 // * Redistributions of source code must retain the above copyright 16604 // notice, this list of conditions and the following disclaimer. 16605 // * Redistributions in binary form must reproduce the above 16606 // copyright notice, this list of conditions and the following disclaimer 16607 // in the documentation and/or other materials provided with the 16608 // distribution. 16609 // * Neither the name of Google Inc. nor the name Chromium Embedded 16610 // Framework nor the names of its contributors may be used to endorse 16611 // or promote products derived from this software without specific prior 16612 // written permission. 16613 // 16614 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16615 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16616 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 16617 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 16618 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 16619 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 16620 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 16621 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 16622 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16623 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16624 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16625 // 16626 // --------------------------------------------------------------------------- 16627 // 16628 // This file was generated by the CEF translator tool and should not edited 16629 // by hand. See the translator.README.txt file in the tools directory for 16630 // more information. 16631 // 16632 // $hash=1c3c3dfb4bde6cd45278c6a80fbc53f624017c44$ 16633 // 16634 16635 extern (C): 16636 16637 16638 16639 16640 /// 16641 /// Callback structure for cef_request_context_t::ResolveHost. 16642 /// 16643 struct cef_resolve_callback_t 16644 { 16645 /// 16646 /// Base structure. 16647 /// 16648 16649 /// 16650 /// Called on the UI thread after the ResolveHost request has completed. 16651 /// |result| will be the result code. |resolved_ips| will be the list of 16652 /// resolved IP addresses or NULL if the resolution failed. 16653 /// 16654 g 16655 cef_base_ref_counted_t base; 16656 extern(System) void function ( 16657 cef_resolve_callback_t* self, 16658 cef_errorcode_t result, 16659 cef_string_list_t resolved_ips) nothrow on_resolve_completed; 16660 } 16661 16662 /// 16663 /// A request context provides request handling for a set of related browser or 16664 /// URL request objects. A request context can be specified when creating a new 16665 /// browser via the cef_browser_host_t static factory functions or when creating 16666 /// a new URL request via the cef_urlrequest_t static factory functions. Browser 16667 /// objects with different request contexts will never be hosted in the same 16668 /// render process. Browser objects with the same request context may or may not 16669 /// be hosted in the same render process depending on the process model. Browser 16670 /// objects created indirectly via the JavaScript window.open function or 16671 /// targeted links will share the same render process and the same request 16672 /// context as the source browser. When running in single-process mode there is 16673 /// only a single render process (the main process) and so all browsers created 16674 /// in single-process mode will share the same request context. This will be the 16675 /// first request context passed into a cef_browser_host_t static factory 16676 /// function and all other request context objects will be ignored. 16677 /// 16678 struct cef_request_context_t 16679 { 16680 /// 16681 /// Base structure. 16682 /// 16683 16684 /// 16685 /// Returns true (1) if this object is pointing to the same context as |that| 16686 /// object. 16687 /// 16688 16689 /// 16690 /// Returns true (1) if this object is sharing the same storage as |that| 16691 /// object. 16692 /// 16693 16694 /// 16695 /// Returns true (1) if this object is the global context. The global context 16696 /// is used by default when creating a browser or URL request with a NULL 16697 /// context argument. 16698 /// 16699 16700 /// 16701 /// Returns the handler for this context if any. 16702 /// 16703 16704 /// 16705 /// Returns the cache path for this object. If NULL an "incognito mode" in- 16706 /// memory cache is being used. 16707 /// 16708 // The resulting string must be freed by calling cef_string_userfree_free(). 16709 16710 /// 16711 /// Returns the cookie manager for this object. If |callback| is non-NULL it 16712 /// will be executed asnychronously on the UI thread after the manager's 16713 /// storage has been initialized. 16714 /// 16715 16716 /// 16717 /// Register a scheme handler factory for the specified |scheme_name| and 16718 /// optional |domain_name|. An NULL |domain_name| value for a standard scheme 16719 g 16720 cef_preference_manager_t base; 16721 extern(System) int function ( 16722 cef_request_context_t* self, 16723 cef_request_context_t* other) nothrow is_same; 16724 extern(System) int function ( 16725 cef_request_context_t* self, 16726 cef_request_context_t* other) nothrow is_sharing_with; 16727 extern(System) int function (cef_request_context_t* self) nothrow is_global; 16728 extern(System) cef_request_context_handler_t* function ( 16729 cef_request_context_t* self) nothrow get_handler; 16730 extern(System) cef_string_userfree_t function ( 16731 cef_request_context_t* self) nothrow get_cache_path; 16732 extern(System) cef_cookie_manager_t* function ( 16733 cef_request_context_t* self, 16734 cef_completion_callback_t* callback) nothrow get_cookie_manager; 16735 /// will cause the factory to match all domain names. The |domain_name| value 16736 /// will be ignored for non-standard schemes. If |scheme_name| is a built-in 16737 /// scheme and no handler is returned by |factory| then the built-in scheme 16738 /// handler factory will be called. If |scheme_name| is a custom scheme then 16739 /// you must also implement the cef_app_t::on_register_custom_schemes() 16740 /// function in all processes. This function may be called multiple times to 16741 /// change or remove the factory that matches the specified |scheme_name| and 16742 /// optional |domain_name|. Returns false (0) if an error occurs. This 16743 /// function may be called on any thread in the browser process. 16744 /// 16745 extern(System) int function ( 16746 cef_request_context_t* self, 16747 const(cef_string_t)* scheme_name, 16748 const(cef_string_t)* domain_name, 16749 cef_scheme_handler_factory_t* factory) nothrow register_scheme_handler_factory; 16750 16751 /// 16752 /// Clear all registered scheme handler factories. Returns false (0) on error. 16753 /// This function may be called on any thread in the browser process. 16754 /// 16755 extern(System) int function (cef_request_context_t* self) nothrow clear_scheme_handler_factories; 16756 16757 /// 16758 /// Clears all certificate exceptions that were added as part of handling 16759 /// cef_request_handler_t::on_certificate_error(). If you call this it is 16760 /// recommended that you also call close_all_connections() or you risk not 16761 /// being prompted again for server certificates if you reconnect quickly. If 16762 /// |callback| is non-NULL it will be executed on the UI thread after 16763 /// completion. 16764 /// 16765 extern(System) void function ( 16766 cef_request_context_t* self, 16767 cef_completion_callback_t* callback) nothrow clear_certificate_exceptions; 16768 16769 /// 16770 /// Clears all HTTP authentication credentials that were added as part of 16771 /// handling GetAuthCredentials. If |callback| is non-NULL it will be executed 16772 /// on the UI thread after completion. 16773 /// 16774 extern(System) void function ( 16775 cef_request_context_t* self, 16776 cef_completion_callback_t* callback) nothrow clear_http_auth_credentials; 16777 16778 /// 16779 /// Clears all active and idle connections that Chromium currently has. This 16780 /// is only recommended if you have released all other CEF objects but don't 16781 /// yet want to call cef_shutdown(). If |callback| is non-NULL it will be 16782 /// executed on the UI thread after completion. 16783 /// 16784 extern(System) void function ( 16785 cef_request_context_t* self, 16786 cef_completion_callback_t* callback) nothrow close_all_connections; 16787 16788 /// 16789 /// Attempts to resolve |origin| to a list of associated IP addresses. 16790 /// |callback| will be executed on the UI thread after completion. 16791 /// 16792 extern(System) void function ( 16793 cef_request_context_t* self, 16794 const(cef_string_t)* origin, 16795 cef_resolve_callback_t* callback) nothrow resolve_host; 16796 16797 /// 16798 /// Load an extension. 16799 /// 16800 /// If extension resources will be read from disk using the default load 16801 /// implementation then |root_directory| should be the absolute path to the 16802 /// extension resources directory and |manifest| should be NULL. If extension 16803 /// resources will be provided by the client (e.g. via cef_request_handler_t 16804 /// and/or cef_extension_handler_t) then |root_directory| should be a path 16805 /// component unique to the extension (if not absolute this will be internally 16806 /// prefixed with the PK_DIR_RESOURCES path) and |manifest| should contain the 16807 /// contents that would otherwise be read from the "manifest.json" file on 16808 /// disk. 16809 /// 16810 /// The loaded extension will be accessible in all contexts sharing the same 16811 /// storage (HasExtension returns true (1)). However, only the context on 16812 /// which this function was called is considered the loader (DidLoadExtension 16813 /// returns true (1)) and only the loader will receive 16814 /// cef_request_context_handler_t callbacks for the extension. 16815 /// 16816 /// cef_extension_handler_t::OnExtensionLoaded will be called on load success 16817 /// or cef_extension_handler_t::OnExtensionLoadFailed will be called on load 16818 /// failure. 16819 /// 16820 /// If the extension specifies a background script via the "background" 16821 /// manifest key then cef_extension_handler_t::OnBeforeBackgroundBrowser will 16822 /// be called to create the background browser. See that function for 16823 /// additional information about background scripts. 16824 /// 16825 /// For visible extension views the client application should evaluate the 16826 /// manifest to determine the correct extension URL to load and then pass that 16827 /// URL to the cef_browser_host_t::CreateBrowser* function after the extension 16828 /// has loaded. For example, the client can look for the "browser_action" 16829 /// manifest key as documented at 16830 /// https://developer.chrome.com/extensions/browserAction. Extension URLs take 16831 /// the form "chrome-extension://<extension_id>/<path>". 16832 /// 16833 /// Browsers that host extensions differ from normal browsers as follows: 16834 /// - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit 16835 /// chrome://extensions-support for the list of extension APIs currently 16836 /// supported by CEF. 16837 /// - Main frame navigation to non-extension content is blocked. 16838 /// - Pinch-zooming is disabled. 16839 /// - CefBrowserHost::GetExtension returns the hosted extension. 16840 /// - CefBrowserHost::IsBackgroundHost returns true for background hosts. 16841 /// 16842 /// See https://developer.chrome.com/extensions for extension implementation 16843 /// and usage documentation. 16844 /// 16845 extern(System) void function ( 16846 cef_request_context_t* self, 16847 const(cef_string_t)* root_directory, 16848 cef_dictionary_value_t* manifest, 16849 cef_extension_handler_t* handler) nothrow load_extension; 16850 16851 /// 16852 /// Returns true (1) if this context was used to load the extension identified 16853 /// by |extension_id|. Other contexts sharing the same storage will also have 16854 /// access to the extension (see HasExtension). This function must be called 16855 /// on the browser process UI thread. 16856 /// 16857 extern(System) int function ( 16858 cef_request_context_t* self, 16859 const(cef_string_t)* extension_id) nothrow did_load_extension; 16860 16861 /// 16862 /// Returns true (1) if this context has access to the extension identified by 16863 /// |extension_id|. This may not be the context that was used to load the 16864 /// extension (see DidLoadExtension). This function must be called on the 16865 /// browser process UI thread. 16866 /// 16867 extern(System) int function ( 16868 cef_request_context_t* self, 16869 const(cef_string_t)* extension_id) nothrow has_extension; 16870 16871 /// 16872 /// Retrieve the list of all extensions that this context has access to (see 16873 /// HasExtension). |extension_ids| will be populated with the list of 16874 /// extension ID values. Returns true (1) on success. This function must be 16875 /// called on the browser process UI thread. 16876 /// 16877 extern(System) int function ( 16878 cef_request_context_t* self, 16879 cef_string_list_t extension_ids) nothrow get_extensions; 16880 16881 /// 16882 /// Returns the extension matching |extension_id| or NULL if no matching 16883 /// extension is accessible in this context (see HasExtension). This function 16884 /// must be called on the browser process UI thread. 16885 /// 16886 extern(System) cef_extension_t* function ( 16887 cef_request_context_t* self, 16888 const(cef_string_t)* extension_id) nothrow get_extension; 16889 16890 /// 16891 /// Returns the MediaRouter object associated with this context. If 16892 /// |callback| is non-NULL it will be executed asnychronously on the UI thread 16893 /// after the manager's context has been initialized. 16894 /// 16895 extern(System) cef_media_router_t* function ( 16896 cef_request_context_t* self, 16897 cef_completion_callback_t* callback) nothrow get_media_router; 16898 16899 /// 16900 /// Returns the current value for |content_type| that applies for the 16901 /// specified URLs. If both URLs are NULL the default value will be returned. 16902 /// Returns nullptr if no value is configured. Must be called on the browser 16903 /// process UI thread. 16904 /// 16905 extern(System) cef_value_t* function ( 16906 cef_request_context_t* self, 16907 const(cef_string_t)* requesting_url, 16908 const(cef_string_t)* top_level_url, 16909 cef_content_setting_types_t content_type) nothrow get_website_setting; 16910 16911 /// 16912 /// Sets the current value for |content_type| for the specified URLs in the 16913 /// default scope. If both URLs are NULL, and the context is not incognito, 16914 /// the default value will be set. Pass nullptr for |value| to remove the 16915 /// default value for this content type. 16916 /// 16917 /// WARNING: Incorrect usage of this function may cause instability or 16918 /// security issues in Chromium. Make sure that you first understand the 16919 /// potential impact of any changes to |content_type| by reviewing the related 16920 /// source code in Chromium. For example, if you plan to modify 16921 /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of 16922 /// ContentSettingsType::POPUPS in Chromium: 16923 /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS 16924 /// 16925 extern(System) void function ( 16926 cef_request_context_t* self, 16927 const(cef_string_t)* requesting_url, 16928 const(cef_string_t)* top_level_url, 16929 cef_content_setting_types_t content_type, 16930 cef_value_t* value) nothrow set_website_setting; 16931 16932 /// 16933 /// Returns the current value for |content_type| that applies for the 16934 /// specified URLs. If both URLs are NULL the default value will be returned. 16935 /// Returns CEF_CONTENT_SETTING_VALUE_DEFAULT if no value is configured. Must 16936 /// be called on the browser process UI thread. 16937 /// 16938 extern(System) cef_content_setting_values_t function ( 16939 cef_request_context_t* self, 16940 const(cef_string_t)* requesting_url, 16941 const(cef_string_t)* top_level_url, 16942 cef_content_setting_types_t content_type) nothrow get_content_setting; 16943 16944 /// 16945 /// Sets the current value for |content_type| for the specified URLs in the 16946 /// default scope. If both URLs are NULL, and the context is not incognito, 16947 /// the default value will be set. Pass CEF_CONTENT_SETTING_VALUE_DEFAULT for 16948 /// |value| to use the default value for this content type. 16949 /// 16950 /// WARNING: Incorrect usage of this function may cause instability or 16951 /// security issues in Chromium. Make sure that you first understand the 16952 /// potential impact of any changes to |content_type| by reviewing the related 16953 /// source code in Chromium. For example, if you plan to modify 16954 /// CEF_CONTENT_SETTING_TYPE_POPUPS, first review and understand the usage of 16955 /// ContentSettingsType::POPUPS in Chromium: 16956 /// https://source.chromium.org/search?q=ContentSettingsType::POPUPS 16957 /// 16958 extern(System) void function ( 16959 cef_request_context_t* self, 16960 const(cef_string_t)* requesting_url, 16961 const(cef_string_t)* top_level_url, 16962 cef_content_setting_types_t content_type, 16963 cef_content_setting_values_t value) nothrow set_content_setting; 16964 } 16965 16966 16967 16968 /// 16969 /// Returns the global context object. 16970 /// 16971 cef_request_context_t* cef_request_context_get_global_context (); 16972 16973 /// 16974 /// Creates a new context object with the specified |settings| and optional 16975 /// |handler|. 16976 /// 16977 cef_request_context_t* cef_request_context_create_context ( 16978 const(cef_request_context_settings_t)* settings, 16979 cef_request_context_handler_t* handler); 16980 16981 /// 16982 /// Creates a new context object that shares storage with |other| and uses an 16983 /// optional |handler|. 16984 /// 16985 cef_request_context_t* cef_create_context_shared ( 16986 cef_request_context_t* other, 16987 cef_request_context_handler_t* handler); 16988 16989 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ 16990 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 16991 // 16992 // Redistribution and use in source and binary forms, with or without 16993 // modification, are permitted provided that the following conditions are 16994 // met: 16995 // 16996 // * Redistributions of source code must retain the above copyright 16997 // notice, this list of conditions and the following disclaimer. 16998 // * Redistributions in binary form must reproduce the above 16999 // copyright notice, this list of conditions and the following disclaimer 17000 // in the documentation and/or other materials provided with the 17001 // distribution. 17002 // * Neither the name of Google Inc. nor the name Chromium Embedded 17003 // Framework nor the names of its contributors may be used to endorse 17004 // or promote products derived from this software without specific prior 17005 // written permission. 17006 // 17007 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17008 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17009 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17010 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17011 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17012 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17013 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17014 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17015 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17016 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17017 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17018 // 17019 // --------------------------------------------------------------------------- 17020 // 17021 // This file was generated by the CEF translator tool and should not edited 17022 // by hand. See the translator.README.txt file in the tools directory for 17023 // more information. 17024 // 17025 // $hash=b0b532a12106d960adc446b980affeee12b93ae3$ 17026 // 17027 17028 extern (C): 17029 17030 /// 17031 /// Implement this structure to provide handler implementations. The handler 17032 /// instance will not be released until all objects related to the context have 17033 /// been destroyed. 17034 /// 17035 struct cef_request_context_handler_t 17036 { 17037 /// 17038 /// Base structure. 17039 /// 17040 17041 /// 17042 /// Called on the browser process UI thread immediately after the request 17043 /// context has been initialized. 17044 /// 17045 17046 /// 17047 /// Called on the browser process IO thread before a resource request is 17048 g 17049 cef_base_ref_counted_t base; 17050 extern(System) void function ( 17051 cef_request_context_handler_t* self, 17052 cef_request_context_t* request_context) nothrow on_request_context_initialized; 17053 /// initiated. The |browser| and |frame| values represent the source of the 17054 /// request, and may be NULL for requests originating from service workers or 17055 /// cef_urlrequest_t. |request| represents the request contents and cannot be 17056 /// modified in this callback. |is_navigation| will be true (1) if the 17057 /// resource request is a navigation. |is_download| will be true (1) if the 17058 /// resource request is a download. |request_initiator| is the origin (scheme 17059 /// + domain) of the page that initiated the request. Set 17060 /// |disable_default_handling| to true (1) to disable default handling of the 17061 /// request, in which case it will need to be handled via 17062 /// cef_resource_request_handler_t::GetResourceHandler or it will be canceled. 17063 /// To allow the resource load to proceed with default handling return NULL. 17064 /// To specify a handler for the resource return a 17065 /// cef_resource_request_handler_t object. This function will not be called if 17066 /// the client associated with |browser| returns a non-NULL value from 17067 /// cef_request_handler_t::GetResourceRequestHandler for the same request 17068 /// (identified by cef_request_t::GetIdentifier). 17069 /// 17070 extern(System) cef_resource_request_handler_t* function ( 17071 cef_request_context_handler_t* self, 17072 cef_browser_t* browser, 17073 cef_frame_t* frame, 17074 cef_request_t* request, 17075 int is_navigation, 17076 int is_download, 17077 const(cef_string_t)* request_initiator, 17078 int* disable_default_handling) nothrow get_resource_request_handler; 17079 } 17080 17081 17082 17083 // CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_ 17084 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 17085 // 17086 // Redistribution and use in source and binary forms, with or without 17087 // modification, are permitted provided that the following conditions are 17088 // met: 17089 // 17090 // * Redistributions of source code must retain the above copyright 17091 // notice, this list of conditions and the following disclaimer. 17092 // * Redistributions in binary form must reproduce the above 17093 // copyright notice, this list of conditions and the following disclaimer 17094 // in the documentation and/or other materials provided with the 17095 // distribution. 17096 // * Neither the name of Google Inc. nor the name Chromium Embedded 17097 // Framework nor the names of its contributors may be used to endorse 17098 // or promote products derived from this software without specific prior 17099 // written permission. 17100 // 17101 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17102 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17103 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17104 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17105 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17106 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17107 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17108 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17109 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17110 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17111 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17112 // 17113 // --------------------------------------------------------------------------- 17114 // 17115 // This file was generated by the CEF translator tool and should not edited 17116 // by hand. See the translator.README.txt file in the tools directory for 17117 // more information. 17118 // 17119 // $hash=092d897e223273a940ed623547d82645f764519c$ 17120 // 17121 17122 extern (C): 17123 17124 /// 17125 /// Callback structure used to select a client certificate for authentication. 17126 /// 17127 struct cef_select_client_certificate_callback_t 17128 { 17129 /// 17130 /// Base structure. 17131 /// 17132 17133 /// 17134 /// Chooses the specified certificate for client certificate authentication. 17135 /// NULL value means that no client certificate should be used. 17136 /// 17137 g 17138 cef_base_ref_counted_t base; 17139 extern(System) void function ( 17140 cef_select_client_certificate_callback_t* self, 17141 cef_x509certificate_t* cert) nothrow select; 17142 } 17143 17144 17145 /// 17146 /// Implement this structure to handle events related to browser requests. The 17147 /// functions of this structure will be called on the thread indicated. 17148 /// 17149 struct cef_request_handler_t 17150 { 17151 /// 17152 /// Base structure. 17153 /// 17154 cef_base_ref_counted_t base; 17155 17156 /// 17157 /// Called on the UI thread before browser navigation. Return true (1) to 17158 /// cancel the navigation or false (0) to allow the navigation to proceed. The 17159 /// |request| object cannot be modified in this callback. 17160 /// cef_load_handler_t::OnLoadingStateChange will be called twice in all 17161 /// cases. If the navigation is allowed cef_load_handler_t::OnLoadStart and 17162 /// cef_load_handler_t::OnLoadEnd will be called. If the navigation is 17163 /// canceled cef_load_handler_t::OnLoadError will be called with an 17164 /// |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true 17165 /// (1) if the browser navigated via explicit user gesture (e.g. clicking a 17166 /// link) or false (0) if it navigated automatically (e.g. via the 17167 /// DomContentLoaded event). 17168 /// 17169 extern(System) int function ( 17170 cef_request_handler_t* self, 17171 cef_browser_t* browser, 17172 cef_frame_t* frame, 17173 cef_request_t* request, 17174 int user_gesture, 17175 int is_redirect) nothrow on_before_browse; 17176 17177 /// 17178 /// Called on the UI thread before OnBeforeBrowse in certain limited cases 17179 /// where navigating a new or different browser might be desirable. This 17180 /// includes user-initiated navigation that might open in a special way (e.g. 17181 /// links clicked via middle-click or ctrl + left-click) and certain types of 17182 /// cross-origin navigation initiated from the renderer process (e.g. 17183 /// navigating the top-level frame to/from a file URL). The |browser| and 17184 /// |frame| values represent the source of the navigation. The 17185 /// |target_disposition| value indicates where the user intended to navigate 17186 /// the browser based on standard Chromium behaviors (e.g. current tab, new 17187 /// tab, etc). The |user_gesture| value will be true (1) if the browser 17188 /// navigated via explicit user gesture (e.g. clicking a link) or false (0) if 17189 /// it navigated automatically (e.g. via the DomContentLoaded event). Return 17190 /// true (1) to cancel the navigation or false (0) to allow the navigation to 17191 /// proceed in the source browser's top-level frame. 17192 /// 17193 extern(System) int function ( 17194 cef_request_handler_t* self, 17195 cef_browser_t* browser, 17196 cef_frame_t* frame, 17197 const(cef_string_t)* target_url, 17198 cef_window_open_disposition_t target_disposition, 17199 int user_gesture) nothrow on_open_urlfrom_tab; 17200 17201 /// 17202 /// Called on the browser process IO thread before a resource request is 17203 /// initiated. The |browser| and |frame| values represent the source of the 17204 /// request. |request| represents the request contents and cannot be modified 17205 /// in this callback. |is_navigation| will be true (1) if the resource request 17206 /// is a navigation. |is_download| will be true (1) if the resource request is 17207 /// a download. |request_initiator| is the origin (scheme + domain) of the 17208 /// page that initiated the request. Set |disable_default_handling| to true 17209 /// (1) to disable default handling of the request, in which case it will need 17210 /// to be handled via cef_resource_request_handler_t::GetResourceHandler or it 17211 /// will be canceled. To allow the resource load to proceed with default 17212 /// handling return NULL. To specify a handler for the resource return a 17213 /// cef_resource_request_handler_t object. If this callback returns NULL the 17214 /// same function will be called on the associated 17215 /// cef_request_context_handler_t, if any. 17216 /// 17217 extern(System) cef_resource_request_handler_t* function ( 17218 cef_request_handler_t* self, 17219 cef_browser_t* browser, 17220 cef_frame_t* frame, 17221 cef_request_t* request, 17222 int is_navigation, 17223 int is_download, 17224 const(cef_string_t)* request_initiator, 17225 int* disable_default_handling) nothrow get_resource_request_handler; 17226 17227 /// 17228 /// Called on the IO thread when the browser needs credentials from the user. 17229 /// |origin_url| is the origin making this authentication request. |isProxy| 17230 /// indicates whether the host is a proxy server. |host| contains the hostname 17231 /// and |port| contains the port number. |realm| is the realm of the challenge 17232 /// and may be NULL. |scheme| is the authentication scheme used, such as 17233 /// "basic" or "digest", and will be NULL if the source of the request is an 17234 /// FTP server. Return true (1) to continue the request and call 17235 /// cef_auth_callback_t::cont() either in this function or at a later time 17236 /// when the authentication information is available. Return false (0) to 17237 /// cancel the request immediately. 17238 /// 17239 extern(System) int function ( 17240 cef_request_handler_t* self, 17241 cef_browser_t* browser, 17242 const(cef_string_t)* origin_url, 17243 int isProxy, 17244 const(cef_string_t)* host, 17245 int port, 17246 const(cef_string_t)* realm, 17247 const(cef_string_t)* scheme, 17248 cef_auth_callback_t* callback) nothrow get_auth_credentials; 17249 17250 /// 17251 /// Called on the UI thread to handle requests for URLs with an invalid SSL 17252 /// certificate. Return true (1) and call cef_callback_t functions either in 17253 /// this function or at a later time to continue or cancel the request. Return 17254 /// false (0) to cancel the request immediately. If 17255 /// cef_settings_t.ignore_certificate_errors is set all invalid certificates 17256 /// will be accepted without calling this function. 17257 /// 17258 extern(System) int function ( 17259 cef_request_handler_t* self, 17260 cef_browser_t* browser, 17261 cef_errorcode_t cert_error, 17262 const(cef_string_t)* request_url, 17263 cef_sslinfo_t* ssl_info, 17264 cef_callback_t* callback) nothrow on_certificate_error; 17265 17266 /// 17267 /// Called on the UI thread when a client certificate is being requested for 17268 /// authentication. Return false (0) to use the default behavior and 17269 /// automatically select the first certificate available. Return true (1) and 17270 /// call cef_select_client_certificate_callback_t::Select either in this 17271 /// function or at a later time to select a certificate. Do not call Select or 17272 /// call it with NULL to continue without using any certificate. |isProxy| 17273 /// indicates whether the host is an HTTPS proxy or the origin server. |host| 17274 /// and |port| contains the hostname and port of the SSL server. 17275 /// |certificates| is the list of certificates to choose from; this list has 17276 /// already been pruned by Chromium so that it only contains certificates from 17277 /// issuers that the server trusts. 17278 /// 17279 extern(System) int function ( 17280 cef_request_handler_t* self, 17281 cef_browser_t* browser, 17282 int isProxy, 17283 const(cef_string_t)* host, 17284 int port, 17285 size_t certificatesCount, 17286 cef_x509certificate_t** certificates, 17287 cef_select_client_certificate_callback_t* callback) nothrow on_select_client_certificate; 17288 17289 /// 17290 /// Called on the browser process UI thread when the render view associated 17291 /// with |browser| is ready to receive/handle IPC messages in the render 17292 /// process. 17293 /// 17294 extern(System) void function ( 17295 cef_request_handler_t* self, 17296 cef_browser_t* browser) nothrow on_render_view_ready; 17297 17298 /// 17299 /// Called on the browser process UI thread when the render process terminates 17300 /// unexpectedly. |status| indicates how the process terminated. 17301 /// 17302 extern(System) void function ( 17303 cef_request_handler_t* self, 17304 cef_browser_t* browser, 17305 cef_termination_status_t status) nothrow on_render_process_terminated; 17306 17307 /// 17308 /// Called on the browser process UI thread when the window.document object of 17309 /// the main frame has been created. 17310 /// 17311 extern(System) void function ( 17312 cef_request_handler_t* self, 17313 cef_browser_t* browser) nothrow on_document_available_in_main_frame; 17314 } 17315 17316 17317 17318 // CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ 17319 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 17320 // 17321 // Redistribution and use in source and binary forms, with or without 17322 // modification, are permitted provided that the following conditions are 17323 // met: 17324 // 17325 // * Redistributions of source code must retain the above copyright 17326 // notice, this list of conditions and the following disclaimer. 17327 // * Redistributions in binary form must reproduce the above 17328 // copyright notice, this list of conditions and the following disclaimer 17329 // in the documentation and/or other materials provided with the 17330 // distribution. 17331 // * Neither the name of Google Inc. nor the name Chromium Embedded 17332 // Framework nor the names of its contributors may be used to endorse 17333 // or promote products derived from this software without specific prior 17334 // written permission. 17335 // 17336 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17337 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17338 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17339 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17340 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17341 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17342 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17343 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17344 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17345 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17346 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17347 // 17348 // --------------------------------------------------------------------------- 17349 // 17350 // This file was generated by the CEF translator tool and should not edited 17351 // by hand. See the translator.README.txt file in the tools directory for 17352 // more information. 17353 // 17354 // $hash=e8e8dd2730a47aad9414f7bfc2e6ad96aba2c875$ 17355 // 17356 17357 extern (C): 17358 17359 /// 17360 /// Structure used for retrieving resources from the resource bundle (*.pak) 17361 /// files loaded by CEF during startup or via the cef_resource_bundle_handler_t 17362 /// returned from cef_app_t::GetResourceBundleHandler. See CefSettings for 17363 /// additional options related to resource bundle loading. The functions of this 17364 /// structure may be called on any thread unless otherwise indicated. 17365 /// 17366 struct cef_resource_bundle_t 17367 { 17368 /// 17369 /// Base structure. 17370 /// 17371 17372 /// 17373 /// Returns the localized string for the specified |string_id| or an NULL 17374 /// string if the value is not found. Include cef_pack_strings.h for a listing 17375 /// of valid string ID values. 17376 /// 17377 // The resulting string must be freed by calling cef_string_userfree_free(). 17378 g 17379 cef_base_ref_counted_t base; 17380 extern(System) cef_string_userfree_t function ( 17381 cef_resource_bundle_t* self, 17382 int string_id) nothrow get_localized_string; 17383 /// 17384 /// Returns a cef_binary_value_t containing the decompressed contents of the 17385 /// specified scale independent |resource_id| or NULL if not found. Include 17386 /// cef_pack_resources.h for a listing of valid resource ID values. 17387 /// 17388 extern(System) cef_binary_value_t* function ( 17389 cef_resource_bundle_t* self, 17390 int resource_id) nothrow get_data_resource; 17391 17392 /// 17393 /// Returns a cef_binary_value_t containing the decompressed contents of the 17394 /// specified |resource_id| nearest the scale factor |scale_factor| or NULL if 17395 /// not found. Use a |scale_factor| value of SCALE_FACTOR_NONE for scale 17396 /// independent resources or call GetDataResource instead.Include 17397 /// cef_pack_resources.h for a listing of valid resource ID values. 17398 /// 17399 extern(System) cef_binary_value_t* function ( 17400 cef_resource_bundle_t* self, 17401 int resource_id, 17402 cef_scale_factor_t scale_factor) nothrow get_data_resource_for_scale; 17403 } 17404 17405 17406 17407 /// 17408 /// Returns the global resource bundle instance. 17409 /// 17410 cef_resource_bundle_t* cef_resource_bundle_get_global (); 17411 17412 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_ 17413 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 17414 // 17415 // Redistribution and use in source and binary forms, with or without 17416 // modification, are permitted provided that the following conditions are 17417 // met: 17418 // 17419 // * Redistributions of source code must retain the above copyright 17420 // notice, this list of conditions and the following disclaimer. 17421 // * Redistributions in binary form must reproduce the above 17422 // copyright notice, this list of conditions and the following disclaimer 17423 // in the documentation and/or other materials provided with the 17424 // distribution. 17425 // * Neither the name of Google Inc. nor the name Chromium Embedded 17426 // Framework nor the names of its contributors may be used to endorse 17427 // or promote products derived from this software without specific prior 17428 // written permission. 17429 // 17430 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17431 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17432 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17433 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17434 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17435 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17436 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17437 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17438 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17439 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17440 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17441 // 17442 // --------------------------------------------------------------------------- 17443 // 17444 // This file was generated by the CEF translator tool and should not edited 17445 // by hand. See the translator.README.txt file in the tools directory for 17446 // more information. 17447 // 17448 // $hash=00023b2ec108ae6e4bd282d16e82032cdc99d548$ 17449 // 17450 17451 extern (C): 17452 17453 /// 17454 /// Structure used to implement a custom resource bundle structure. See 17455 /// CefSettings for additional options related to resource bundle loading. The 17456 /// functions of this structure may be called on multiple threads. 17457 /// 17458 struct cef_resource_bundle_handler_t 17459 { 17460 /// 17461 /// Base structure. 17462 /// 17463 17464 /// 17465 /// Called to retrieve a localized translation for the specified |string_id|. 17466 /// To provide the translation set |string| to the translation string and 17467 /// return true (1). To use the default translation return false (0). Include 17468 /// cef_pack_strings.h for a listing of valid string ID values. 17469 /// 17470 17471 /// 17472 /// Called to retrieve data for the specified scale independent |resource_id|. 17473 g 17474 cef_base_ref_counted_t base; 17475 extern(System) int function ( 17476 cef_resource_bundle_handler_t* self, 17477 int string_id, 17478 cef_string_t* string) nothrow get_localized_string; 17479 /// To provide the resource data set |data| and |data_size| to the data 17480 /// pointer and size respectively and return true (1). To use the default 17481 /// resource data return false (0). The resource data will not be copied and 17482 /// must remain resident in memory. Include cef_pack_resources.h for a listing 17483 /// of valid resource ID values. 17484 /// 17485 extern(System) int function ( 17486 cef_resource_bundle_handler_t* self, 17487 int resource_id, 17488 void** data, 17489 size_t* data_size) nothrow get_data_resource; 17490 17491 /// 17492 /// Called to retrieve data for the specified |resource_id| nearest the scale 17493 /// factor |scale_factor|. To provide the resource data set |data| and 17494 /// |data_size| to the data pointer and size respectively and return true (1). 17495 /// To use the default resource data return false (0). The resource data will 17496 /// not be copied and must remain resident in memory. Include 17497 /// cef_pack_resources.h for a listing of valid resource ID values. 17498 /// 17499 extern(System) int function ( 17500 cef_resource_bundle_handler_t* self, 17501 int resource_id, 17502 cef_scale_factor_t scale_factor, 17503 void** data, 17504 size_t* data_size) nothrow get_data_resource_for_scale; 17505 } 17506 17507 17508 17509 // CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_ 17510 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 17511 // 17512 // Redistribution and use in source and binary forms, with or without 17513 // modification, are permitted provided that the following conditions are 17514 // met: 17515 // 17516 // * Redistributions of source code must retain the above copyright 17517 // notice, this list of conditions and the following disclaimer. 17518 // * Redistributions in binary form must reproduce the above 17519 // copyright notice, this list of conditions and the following disclaimer 17520 // in the documentation and/or other materials provided with the 17521 // distribution. 17522 // * Neither the name of Google Inc. nor the name Chromium Embedded 17523 // Framework nor the names of its contributors may be used to endorse 17524 // or promote products derived from this software without specific prior 17525 // written permission. 17526 // 17527 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17528 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17529 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17530 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17531 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17532 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17533 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17534 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17535 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17536 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17537 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17538 // 17539 // --------------------------------------------------------------------------- 17540 // 17541 // This file was generated by the CEF translator tool and should not edited 17542 // by hand. See the translator.README.txt file in the tools directory for 17543 // more information. 17544 // 17545 // $hash=ca5c224b373452158904b0f859f126f36c927f93$ 17546 // 17547 17548 extern (C): 17549 17550 /// 17551 /// Callback for asynchronous continuation of cef_resource_handler_t::skip(). 17552 /// 17553 struct cef_resource_skip_callback_t 17554 { 17555 /// 17556 /// Base structure. 17557 /// 17558 17559 /// 17560 /// Callback for asynchronous continuation of skip(). If |bytes_skipped| > 0 17561 /// then either skip() will be called again until the requested number of 17562 /// bytes have been skipped or the request will proceed. If |bytes_skipped| <= 17563 /// 0 the request will fail with ERR_REQUEST_RANGE_NOT_SATISFIABLE. 17564 /// 17565 17566 /// 17567 /// Callback for asynchronous continuation of cef_resource_handler_t::read(). 17568 g 17569 cef_base_ref_counted_t base; 17570 extern(System) void function ( 17571 cef_resource_skip_callback_t* self, 17572 long bytes_skipped) nothrow cont; 17573 } 17574 17575 17576 /// 17577 struct cef_resource_read_callback_t 17578 { 17579 /// 17580 /// Base structure. 17581 /// 17582 cef_base_ref_counted_t base; 17583 17584 /// 17585 /// Callback for asynchronous continuation of read(). If |bytes_read| == 0 the 17586 /// response will be considered complete. If |bytes_read| > 0 then read() will 17587 /// be called again until the request is complete (based on either the result 17588 /// or the expected content length). If |bytes_read| < 0 then the request will 17589 /// fail and the |bytes_read| value will be treated as the error code. 17590 /// 17591 extern(System) void function (cef_resource_read_callback_t* self, int bytes_read) nothrow cont; 17592 } 17593 17594 17595 17596 /// 17597 /// Structure used to implement a custom request handler structure. The 17598 /// functions of this structure will be called on the IO thread unless otherwise 17599 /// indicated. 17600 /// 17601 struct cef_resource_handler_t 17602 { 17603 /// 17604 /// Base structure. 17605 /// 17606 cef_base_ref_counted_t base; 17607 17608 /// 17609 /// Open the response stream. To handle the request immediately set 17610 /// |handle_request| to true (1) and return true (1). To decide at a later 17611 /// time set |handle_request| to false (0), return true (1), and execute 17612 /// |callback| to continue or cancel the request. To cancel the request 17613 /// immediately set |handle_request| to true (1) and return false (0). This 17614 /// function will be called in sequence but not from a dedicated thread. For 17615 /// backwards compatibility set |handle_request| to false (0) and return false 17616 /// (0) and the ProcessRequest function will be called. 17617 /// 17618 extern(System) int function ( 17619 cef_resource_handler_t* self, 17620 cef_request_t* request, 17621 int* handle_request, 17622 cef_callback_t* callback) nothrow open; 17623 17624 /// 17625 /// Begin processing the request. To handle the request return true (1) and 17626 /// call cef_callback_t::cont() once the response header information is 17627 /// available (cef_callback_t::cont() can also be called from inside this 17628 /// function if header information is available immediately). To cancel the 17629 /// request return false (0). 17630 /// 17631 /// WARNING: This function is deprecated. Use Open instead. 17632 /// 17633 extern(System) int function ( 17634 cef_resource_handler_t* self, 17635 cef_request_t* request, 17636 cef_callback_t* callback) nothrow process_request; 17637 17638 /// 17639 /// Retrieve response header information. If the response length is not known 17640 /// set |response_length| to -1 and read_response() will be called until it 17641 /// returns false (0). If the response length is known set |response_length| 17642 /// to a positive value and read_response() will be called until it returns 17643 /// false (0) or the specified number of bytes have been read. Use the 17644 /// |response| object to set the mime type, http status code and other 17645 /// optional header values. To redirect the request to a new URL set 17646 /// |redirectUrl| to the new URL. |redirectUrl| can be either a relative or 17647 /// fully qualified URL. It is also possible to set |response| to a redirect 17648 /// http status code and pass the new URL via a Location header. Likewise with 17649 /// |redirectUrl| it is valid to set a relative or fully qualified URL as the 17650 /// Location header value. If an error occured while setting up the request 17651 /// you can call set_error() on |response| to indicate the error condition. 17652 /// 17653 extern(System) void function ( 17654 cef_resource_handler_t* self, 17655 cef_response_t* response, 17656 long* response_length, 17657 cef_string_t* redirectUrl) nothrow get_response_headers; 17658 17659 /// 17660 /// Skip response data when requested by a Range header. Skip over and discard 17661 /// |bytes_to_skip| bytes of response data. If data is available immediately 17662 /// set |bytes_skipped| to the number of bytes skipped and return true (1). To 17663 /// read the data at a later time set |bytes_skipped| to 0, return true (1) 17664 /// and execute |callback| when the data is available. To indicate failure set 17665 /// |bytes_skipped| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This 17666 /// function will be called in sequence but not from a dedicated thread. 17667 /// 17668 extern(System) int function ( 17669 cef_resource_handler_t* self, 17670 long bytes_to_skip, 17671 long* bytes_skipped, 17672 cef_resource_skip_callback_t* callback) nothrow skip; 17673 17674 /// 17675 /// Read response data. If data is available immediately copy up to 17676 /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of 17677 /// bytes copied, and return true (1). To read the data at a later time keep a 17678 /// pointer to |data_out|, set |bytes_read| to 0, return true (1) and execute 17679 /// |callback| when the data is available (|data_out| will remain valid until 17680 /// the callback is executed). To indicate response completion set 17681 /// |bytes_read| to 0 and return false (0). To indicate failure set 17682 /// |bytes_read| to < 0 (e.g. -2 for ERR_FAILED) and return false (0). This 17683 /// function will be called in sequence but not from a dedicated thread. For 17684 /// backwards compatibility set |bytes_read| to -1 and return false (0) and 17685 /// the ReadResponse function will be called. 17686 /// 17687 extern(System) int function ( 17688 cef_resource_handler_t* self, 17689 void* data_out, 17690 int bytes_to_read, 17691 int* bytes_read, 17692 cef_resource_read_callback_t* callback) nothrow read; 17693 17694 /// 17695 /// Read response data. If data is available immediately copy up to 17696 /// |bytes_to_read| bytes into |data_out|, set |bytes_read| to the number of 17697 /// bytes copied, and return true (1). To read the data at a later time set 17698 /// |bytes_read| to 0, return true (1) and call cef_callback_t::cont() when 17699 /// the data is available. To indicate response completion return false (0). 17700 /// 17701 /// WARNING: This function is deprecated. Use Skip and Read instead. 17702 /// 17703 extern(System) int function ( 17704 cef_resource_handler_t* self, 17705 void* data_out, 17706 int bytes_to_read, 17707 int* bytes_read, 17708 cef_callback_t* callback) nothrow read_response; 17709 17710 /// 17711 /// Request processing has been canceled. 17712 /// 17713 extern(System) void function (cef_resource_handler_t* self) nothrow cancel; 17714 } 17715 17716 17717 17718 // CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ 17719 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 17720 // 17721 // Redistribution and use in source and binary forms, with or without 17722 // modification, are permitted provided that the following conditions are 17723 // met: 17724 // 17725 // * Redistributions of source code must retain the above copyright 17726 // notice, this list of conditions and the following disclaimer. 17727 // * Redistributions in binary form must reproduce the above 17728 // copyright notice, this list of conditions and the following disclaimer 17729 // in the documentation and/or other materials provided with the 17730 // distribution. 17731 // * Neither the name of Google Inc. nor the name Chromium Embedded 17732 // Framework nor the names of its contributors may be used to endorse 17733 // or promote products derived from this software without specific prior 17734 // written permission. 17735 // 17736 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17737 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17738 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17739 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17740 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17741 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17742 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17743 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17744 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17745 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17746 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17747 // 17748 // --------------------------------------------------------------------------- 17749 // 17750 // This file was generated by the CEF translator tool and should not edited 17751 // by hand. See the translator.README.txt file in the tools directory for 17752 // more information. 17753 // 17754 // $hash=757155e6dbceef47938fd562f7f5f48a609ce288$ 17755 // 17756 17757 extern (C): 17758 17759 /// 17760 /// Implement this structure to handle events related to browser requests. The 17761 /// functions of this structure will be called on the IO thread unless otherwise 17762 /// indicated. 17763 /// 17764 struct cef_resource_request_handler_t 17765 { 17766 /// 17767 /// Base structure. 17768 /// 17769 17770 /// 17771 /// Called on the IO thread before a resource request is loaded. The |browser| 17772 /// and |frame| values represent the source of the request, and may be NULL 17773 /// for requests originating from service workers or cef_urlrequest_t. To 17774 g 17775 cef_base_ref_counted_t base; 17776 /// optionally filter cookies for the request return a 17777 /// cef_cookie_access_filter_t object. The |request| object cannot not be 17778 /// modified in this callback. 17779 /// 17780 extern(System) cef_cookie_access_filter_t* function ( 17781 cef_resource_request_handler_t* self, 17782 cef_browser_t* browser, 17783 cef_frame_t* frame, 17784 cef_request_t* request) nothrow get_cookie_access_filter; 17785 17786 /// 17787 /// Called on the IO thread before a resource request is loaded. The |browser| 17788 /// and |frame| values represent the source of the request, and may be NULL 17789 /// for requests originating from service workers or cef_urlrequest_t. To 17790 /// redirect or change the resource load optionally modify |request|. 17791 /// Modification of the request URL will be treated as a redirect. Return 17792 /// RV_CONTINUE to continue the request immediately. Return RV_CONTINUE_ASYNC 17793 /// and call cef_callback_t functions at a later time to continue or cancel 17794 /// the request asynchronously. Return RV_CANCEL to cancel the request 17795 /// immediately. 17796 /// 17797 extern(System) cef_return_value_t function ( 17798 cef_resource_request_handler_t* self, 17799 cef_browser_t* browser, 17800 cef_frame_t* frame, 17801 cef_request_t* request, 17802 cef_callback_t* callback) nothrow on_before_resource_load; 17803 17804 /// 17805 /// Called on the IO thread before a resource is loaded. The |browser| and 17806 /// |frame| values represent the source of the request, and may be NULL for 17807 /// requests originating from service workers or cef_urlrequest_t. To allow 17808 /// the resource to load using the default network loader return NULL. To 17809 /// specify a handler for the resource return a cef_resource_handler_t object. 17810 /// The |request| object cannot not be modified in this callback. 17811 /// 17812 extern(System) cef_resource_handler_t* function ( 17813 cef_resource_request_handler_t* self, 17814 cef_browser_t* browser, 17815 cef_frame_t* frame, 17816 cef_request_t* request) nothrow get_resource_handler; 17817 17818 /// 17819 /// Called on the IO thread when a resource load is redirected. The |browser| 17820 /// and |frame| values represent the source of the request, and may be NULL 17821 /// for requests originating from service workers or cef_urlrequest_t. The 17822 /// |request| parameter will contain the old URL and other request-related 17823 /// information. The |response| parameter will contain the response that 17824 /// resulted in the redirect. The |new_url| parameter will contain the new URL 17825 /// and can be changed if desired. The |request| and |response| objects cannot 17826 /// be modified in this callback. 17827 /// 17828 extern(System) void function ( 17829 cef_resource_request_handler_t* self, 17830 cef_browser_t* browser, 17831 cef_frame_t* frame, 17832 cef_request_t* request, 17833 cef_response_t* response, 17834 cef_string_t* new_url) nothrow on_resource_redirect; 17835 17836 /// 17837 /// Called on the IO thread when a resource response is received. The 17838 /// |browser| and |frame| values represent the source of the request, and may 17839 /// be NULL for requests originating from service workers or cef_urlrequest_t. 17840 /// To allow the resource load to proceed without modification return false 17841 /// (0). To redirect or retry the resource load optionally modify |request| 17842 /// and return true (1). Modification of the request URL will be treated as a 17843 /// redirect. Requests handled using the default network loader cannot be 17844 /// redirected in this callback. The |response| object cannot be modified in 17845 /// this callback. 17846 /// 17847 /// WARNING: Redirecting using this function is deprecated. Use 17848 /// OnBeforeResourceLoad or GetResourceHandler to perform redirects. 17849 /// 17850 extern(System) int function ( 17851 cef_resource_request_handler_t* self, 17852 cef_browser_t* browser, 17853 cef_frame_t* frame, 17854 cef_request_t* request, 17855 cef_response_t* response) nothrow on_resource_response; 17856 17857 /// 17858 /// Called on the IO thread to optionally filter resource response content. 17859 /// The |browser| and |frame| values represent the source of the request, and 17860 /// may be NULL for requests originating from service workers or 17861 /// cef_urlrequest_t. |request| and |response| represent the request and 17862 /// response respectively and cannot be modified in this callback. 17863 /// 17864 extern(System) cef_response_filter_t* function ( 17865 cef_resource_request_handler_t* self, 17866 cef_browser_t* browser, 17867 cef_frame_t* frame, 17868 cef_request_t* request, 17869 cef_response_t* response) nothrow get_resource_response_filter; 17870 17871 /// 17872 /// Called on the IO thread when a resource load has completed. The |browser| 17873 /// and |frame| values represent the source of the request, and may be NULL 17874 /// for requests originating from service workers or cef_urlrequest_t. 17875 /// |request| and |response| represent the request and response respectively 17876 /// and cannot be modified in this callback. |status| indicates the load 17877 /// completion status. |received_content_length| is the number of response 17878 /// bytes actually read. This function will be called for all requests, 17879 /// including requests that are aborted due to CEF shutdown or destruction of 17880 /// the associated browser. In cases where the associated browser is destroyed 17881 /// this callback may arrive after the cef_life_span_handler_t::OnBeforeClose 17882 /// callback for that browser. The cef_frame_t::IsValid function can be used 17883 /// to test for this situation, and care should be taken not to call |browser| 17884 /// or |frame| functions that modify state (like LoadURL, SendProcessMessage, 17885 /// etc.) if the frame is invalid. 17886 /// 17887 extern(System) void function ( 17888 cef_resource_request_handler_t* self, 17889 cef_browser_t* browser, 17890 cef_frame_t* frame, 17891 cef_request_t* request, 17892 cef_response_t* response, 17893 cef_urlrequest_status_t status, 17894 long received_content_length) nothrow on_resource_load_complete; 17895 17896 /// 17897 /// Called on the IO thread to handle requests for URLs with an unknown 17898 /// protocol component. The |browser| and |frame| values represent the source 17899 /// of the request, and may be NULL for requests originating from service 17900 /// workers or cef_urlrequest_t. |request| cannot be modified in this 17901 /// callback. Set |allow_os_execution| to true (1) to attempt execution via 17902 /// the registered OS protocol handler, if any. SECURITY WARNING: YOU SHOULD 17903 /// USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR OTHER URL 17904 /// ANALYSIS BEFORE ALLOWING OS EXECUTION. 17905 /// 17906 extern(System) void function ( 17907 cef_resource_request_handler_t* self, 17908 cef_browser_t* browser, 17909 cef_frame_t* frame, 17910 cef_request_t* request, 17911 int* allow_os_execution) nothrow on_protocol_execution; 17912 } 17913 17914 17915 17916 /// 17917 /// Implement this structure to filter cookies that may be sent or received from 17918 /// resource requests. The functions of this structure will be called on the IO 17919 /// thread unless otherwise indicated. 17920 /// 17921 struct cef_cookie_access_filter_t 17922 { 17923 /// 17924 /// Base structure. 17925 /// 17926 cef_base_ref_counted_t base; 17927 17928 /// 17929 /// Called on the IO thread before a resource request is sent. The |browser| 17930 /// and |frame| values represent the source of the request, and may be NULL 17931 /// for requests originating from service workers or cef_urlrequest_t. 17932 /// |request| cannot be modified in this callback. Return true (1) if the 17933 /// specified cookie can be sent with the request or false (0) otherwise. 17934 /// 17935 extern(System) int function ( 17936 cef_cookie_access_filter_t* self, 17937 cef_browser_t* browser, 17938 cef_frame_t* frame, 17939 cef_request_t* request, 17940 const(cef_cookie_t)* cookie) nothrow can_send_cookie; 17941 17942 /// 17943 /// Called on the IO thread after a resource response is received. The 17944 /// |browser| and |frame| values represent the source of the request, and may 17945 /// be NULL for requests originating from service workers or cef_urlrequest_t. 17946 /// |request| cannot be modified in this callback. Return true (1) if the 17947 /// specified cookie returned with the response can be saved or false (0) 17948 /// otherwise. 17949 /// 17950 extern(System) int function ( 17951 cef_cookie_access_filter_t* self, 17952 cef_browser_t* browser, 17953 cef_frame_t* frame, 17954 cef_request_t* request, 17955 cef_response_t* response, 17956 const(cef_cookie_t)* cookie) nothrow can_save_cookie; 17957 } 17958 17959 17960 17961 // CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_ 17962 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 17963 // 17964 // Redistribution and use in source and binary forms, with or without 17965 // modification, are permitted provided that the following conditions are 17966 // met: 17967 // 17968 // * Redistributions of source code must retain the above copyright 17969 // notice, this list of conditions and the following disclaimer. 17970 // * Redistributions in binary form must reproduce the above 17971 // copyright notice, this list of conditions and the following disclaimer 17972 // in the documentation and/or other materials provided with the 17973 // distribution. 17974 // * Neither the name of Google Inc. nor the name Chromium Embedded 17975 // Framework nor the names of its contributors may be used to endorse 17976 // or promote products derived from this software without specific prior 17977 // written permission. 17978 // 17979 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17980 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17981 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17982 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 17983 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 17984 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 17985 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 17986 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 17987 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 17988 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17989 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17990 // 17991 // --------------------------------------------------------------------------- 17992 // 17993 // This file was generated by the CEF translator tool and should not edited 17994 // by hand. See the translator.README.txt file in the tools directory for 17995 // more information. 17996 // 17997 // $hash=7fbcd399c08dc39e33a7d0400a49f2e3a551bd02$ 17998 // 17999 18000 extern (C): 18001 18002 /// 18003 /// Structure used to represent a web response. The functions of this structure 18004 /// may be called on any thread. 18005 /// 18006 struct cef_response_t 18007 { 18008 /// 18009 /// Base structure. 18010 /// 18011 18012 /// 18013 /// Returns true (1) if this object is read-only. 18014 /// 18015 18016 /// 18017 /// Get the response error code. Returns ERR_NONE if there was no error. 18018 /// 18019 18020 /// 18021 /// Set the response error code. This can be used by custom scheme handlers to 18022 /// return errors during initial request processing. 18023 /// 18024 18025 /// 18026 /// Get the response status code. 18027 /// 18028 18029 /// 18030 /// Set the response status code. 18031 g 18032 cef_base_ref_counted_t base; 18033 extern(System) int function (cef_response_t* self) nothrow is_read_only; 18034 extern(System) cef_errorcode_t function (cef_response_t* self) nothrow get_error; 18035 extern(System) void function (cef_response_t* self, cef_errorcode_t error) nothrow set_error; 18036 extern(System) int function (cef_response_t* self) nothrow get_status; 18037 /// 18038 extern(System) void function (cef_response_t* self, int status) nothrow set_status; 18039 18040 /// 18041 /// Get the response status text. 18042 /// 18043 // The resulting string must be freed by calling cef_string_userfree_free(). 18044 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_status_text; 18045 18046 /// 18047 /// Set the response status text. 18048 /// 18049 extern(System) void function ( 18050 cef_response_t* self, 18051 const(cef_string_t)* statusText) nothrow set_status_text; 18052 18053 /// 18054 /// Get the response mime type. 18055 /// 18056 // The resulting string must be freed by calling cef_string_userfree_free(). 18057 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_mime_type; 18058 18059 /// 18060 /// Set the response mime type. 18061 /// 18062 extern(System) void function ( 18063 cef_response_t* self, 18064 const(cef_string_t)* mimeType) nothrow set_mime_type; 18065 18066 /// 18067 /// Get the response charset. 18068 /// 18069 // The resulting string must be freed by calling cef_string_userfree_free(). 18070 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_charset; 18071 18072 /// 18073 /// Set the response charset. 18074 /// 18075 extern(System) void function ( 18076 cef_response_t* self, 18077 const(cef_string_t)* charset) nothrow set_charset; 18078 18079 /// 18080 /// Get the value for the specified response header field. 18081 /// 18082 // The resulting string must be freed by calling cef_string_userfree_free(). 18083 extern(System) cef_string_userfree_t function ( 18084 cef_response_t* self, 18085 const(cef_string_t)* name) nothrow get_header_by_name; 18086 18087 /// 18088 /// Set the header |name| to |value|. If |overwrite| is true (1) any existing 18089 /// values will be replaced with the new value. If |overwrite| is false (0) 18090 /// any existing values will not be overwritten. 18091 /// 18092 extern(System) void function ( 18093 cef_response_t* self, 18094 const(cef_string_t)* name, 18095 const(cef_string_t)* value, 18096 int overwrite) nothrow set_header_by_name; 18097 18098 /// 18099 /// Get all response header fields. 18100 /// 18101 extern(System) void function ( 18102 cef_response_t* self, 18103 cef_string_multimap_t headerMap) nothrow get_header_map; 18104 18105 /// 18106 /// Set all response header fields. 18107 /// 18108 extern(System) void function ( 18109 cef_response_t* self, 18110 cef_string_multimap_t headerMap) nothrow set_header_map; 18111 18112 /// 18113 /// Get the resolved URL after redirects or changed as a result of HSTS. 18114 /// 18115 // The resulting string must be freed by calling cef_string_userfree_free(). 18116 extern(System) cef_string_userfree_t function (cef_response_t* self) nothrow get_url; 18117 18118 /// 18119 /// Set the resolved URL after redirects or changed as a result of HSTS. 18120 /// 18121 extern(System) void function (cef_response_t* self, const(cef_string_t)* url) nothrow set_url; 18122 } 18123 18124 18125 18126 /// 18127 /// Create a new cef_response_t object. 18128 /// 18129 cef_response_t* cef_response_create (); 18130 18131 // CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ 18132 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 18133 // 18134 // Redistribution and use in source and binary forms, with or without 18135 // modification, are permitted provided that the following conditions are 18136 // met: 18137 // 18138 // * Redistributions of source code must retain the above copyright 18139 // notice, this list of conditions and the following disclaimer. 18140 // * Redistributions in binary form must reproduce the above 18141 // copyright notice, this list of conditions and the following disclaimer 18142 // in the documentation and/or other materials provided with the 18143 // distribution. 18144 // * Neither the name of Google Inc. nor the name Chromium Embedded 18145 // Framework nor the names of its contributors may be used to endorse 18146 // or promote products derived from this software without specific prior 18147 // written permission. 18148 // 18149 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18150 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18151 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18152 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18153 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18154 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18155 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18156 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18157 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18158 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18159 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18160 // 18161 // --------------------------------------------------------------------------- 18162 // 18163 // This file was generated by the CEF translator tool and should not edited 18164 // by hand. See the translator.README.txt file in the tools directory for 18165 // more information. 18166 // 18167 // $hash=2c9b14a86ee6777e4834eadcfc95802f2dedb11a$ 18168 // 18169 18170 extern (C): 18171 18172 /// 18173 /// Implement this structure to filter resource response content. The functions 18174 /// of this structure will be called on the browser process IO thread. 18175 /// 18176 struct cef_response_filter_t 18177 { 18178 /// 18179 /// Base structure. 18180 /// 18181 18182 /// 18183 /// Initialize the response filter. Will only be called a single time. The 18184 /// filter will not be installed if this function returns false (0). 18185 /// 18186 18187 /// 18188 /// Called to filter a chunk of data. Expected usage is as follows: 18189 /// 18190 /// 1. Read input data from |data_in| and set |data_in_read| to the number of 18191 /// bytes that were read up to a maximum of |data_in_size|. |data_in| will 18192 /// be NULL if |data_in_size| is zero. 18193 /// 2. Write filtered output data to |data_out| and set |data_out_written| to 18194 /// the number of bytes that were written up to a maximum of 18195 g 18196 cef_base_ref_counted_t base; 18197 extern(System) int function (cef_response_filter_t* self) nothrow init_filter; 18198 /// |data_out_size|. If no output data was written then all data must be 18199 /// read from |data_in| (user must set |data_in_read| = |data_in_size|). 18200 /// 3. Return RESPONSE_FILTER_DONE if all output data was written or 18201 /// RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending. 18202 /// 18203 /// This function will be called repeatedly until the input buffer has been 18204 /// fully read (user sets |data_in_read| = |data_in_size|) and there is no 18205 /// more input data to filter (the resource response is complete). This 18206 /// function may then be called an additional time with an NULL input buffer 18207 /// if the user filled the output buffer (set |data_out_written| = 18208 /// |data_out_size|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate 18209 /// that output data is still pending. 18210 /// 18211 /// Calls to this function will stop when one of the following conditions is 18212 /// met: 18213 /// 18214 /// 1. There is no more input data to filter (the resource response is 18215 /// complete) and the user sets |data_out_written| = 0 or returns 18216 /// RESPONSE_FILTER_DONE to indicate that all data has been written, or; 18217 /// 2. The user returns RESPONSE_FILTER_ERROR to indicate an error. 18218 /// 18219 /// Do not keep a reference to the buffers passed to this function. 18220 /// 18221 extern(System) cef_response_filter_status_t function ( 18222 cef_response_filter_t* self, 18223 void* data_in, 18224 size_t data_in_size, 18225 size_t* data_in_read, 18226 void* data_out, 18227 size_t data_out_size, 18228 size_t* data_out_written) nothrow filter; 18229 } 18230 18231 18232 18233 // CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_ 18234 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 18235 // 18236 // Redistribution and use in source and binary forms, with or without 18237 // modification, are permitted provided that the following conditions are 18238 // met: 18239 // 18240 // * Redistributions of source code must retain the above copyright 18241 // notice, this list of conditions and the following disclaimer. 18242 // * Redistributions in binary form must reproduce the above 18243 // copyright notice, this list of conditions and the following disclaimer 18244 // in the documentation and/or other materials provided with the 18245 // distribution. 18246 // * Neither the name of Google Inc. nor the name Chromium Embedded 18247 // Framework nor the names of its contributors may be used to endorse 18248 // or promote products derived from this software without specific prior 18249 // written permission. 18250 // 18251 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18252 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18253 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18254 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18255 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18256 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18257 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18258 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18259 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18260 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18261 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18262 // 18263 // --------------------------------------------------------------------------- 18264 // 18265 // This file was generated by the CEF translator tool and should not edited 18266 // by hand. See the translator.README.txt file in the tools directory for 18267 // more information. 18268 // 18269 // $hash=6b6a7f754abc9ee5d6f775ba9eee802d3244faf5$ 18270 // 18271 18272 extern (C): 18273 18274 /// 18275 /// Structure that manages custom scheme registrations. 18276 /// 18277 struct cef_scheme_registrar_t 18278 { 18279 /// 18280 /// Base structure. 18281 /// 18282 18283 /// 18284 /// Register a custom scheme. This function should not be called for the 18285 /// built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes. 18286 /// 18287 /// See cef_scheme_options_t for possible values for |options|. 18288 /// 18289 /// This function may be called on any thread. It should only be called once 18290 /// per unique |scheme_name| value. If |scheme_name| is already registered or 18291 /// if an error occurs this function will return false (0). 18292 /// 18293 18294 /// 18295 /// Structure that creates cef_resource_handler_t instances for handling scheme 18296 /// requests. The functions of this structure will always be called on the IO 18297 g 18298 cef_base_scoped_t base; 18299 extern(System) int function ( 18300 cef_scheme_registrar_t* self, 18301 const(cef_string_t)* scheme_name, 18302 int options) nothrow add_custom_scheme; 18303 } 18304 18305 18306 /// thread. 18307 /// 18308 struct cef_scheme_handler_factory_t 18309 { 18310 /// 18311 /// Base structure. 18312 /// 18313 g 18314 cef_base_ref_counted_t base; 18315 18316 /// 18317 /// Return a new resource handler instance to handle the request or an NULL 18318 /// reference to allow default handling of the request. |browser| and |frame| 18319 /// will be the browser window and frame respectively that originated the 18320 /// request or NULL if the request did not originate from a browser window 18321 /// (for example, if the request came from cef_urlrequest_t). The |request| 18322 /// object passed to this function cannot be modified. 18323 /// 18324 extern(System) cef_resource_handler_t* function ( 18325 cef_scheme_handler_factory_t* self, 18326 cef_browser_t* browser, 18327 cef_frame_t* frame, 18328 const(cef_string_t)* scheme_name, 18329 cef_request_t* request) nothrow create; 18330 } 18331 18332 18333 18334 /// 18335 /// Register a scheme handler factory with the global request context. An NULL 18336 /// |domain_name| value for a standard scheme will cause the factory to match 18337 /// all domain names. The |domain_name| value will be ignored for non-standard 18338 /// schemes. If |scheme_name| is a built-in scheme and no handler is returned by 18339 /// |factory| then the built-in scheme handler factory will be called. If 18340 /// |scheme_name| is a custom scheme then you must also implement the 18341 /// cef_app_t::on_register_custom_schemes() function in all processes. This 18342 /// function may be called multiple times to change or remove the factory that 18343 /// matches the specified |scheme_name| and optional |domain_name|. Returns 18344 /// false (0) if an error occurs. This function may be called on any thread in 18345 /// the browser process. Using this function is equivalent to calling cef_reques 18346 /// t_context_t::cef_request_context_get_global_context()->register_scheme_handl 18347 /// er_factory(). 18348 /// 18349 int cef_register_scheme_handler_factory ( 18350 const(cef_string_t)* scheme_name, 18351 const(cef_string_t)* domain_name, 18352 cef_scheme_handler_factory_t* factory); 18353 18354 /// 18355 /// Clear all scheme handler factories registered with the global request 18356 /// context. Returns false (0) on error. This function may be called on any 18357 /// thread in the browser process. Using this function is equivalent to calling 18358 /// cef_request_context_t::cef_request_context_get_global_context()->clear_schem 18359 /// e_handler_factories(). 18360 /// 18361 int cef_clear_scheme_handler_factories (); 18362 18363 // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ 18364 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 18365 // 18366 // Redistribution and use in source and binary forms, with or without 18367 // modification, are permitted provided that the following conditions are 18368 // met: 18369 // 18370 // * Redistributions of source code must retain the above copyright 18371 // notice, this list of conditions and the following disclaimer. 18372 // * Redistributions in binary form must reproduce the above 18373 // copyright notice, this list of conditions and the following disclaimer 18374 // in the documentation and/or other materials provided with the 18375 // distribution. 18376 // * Neither the name of Google Inc. nor the name Chromium Embedded 18377 // Framework nor the names of its contributors may be used to endorse 18378 // or promote products derived from this software without specific prior 18379 // written permission. 18380 // 18381 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18382 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18383 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18384 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18385 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18386 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18387 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18388 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18389 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18390 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18391 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18392 // 18393 // --------------------------------------------------------------------------- 18394 // 18395 // This file was generated by the CEF translator tool and should not edited 18396 // by hand. See the translator.README.txt file in the tools directory for 18397 // more information. 18398 // 18399 // $hash=d0563a0850f6118c850ab01c553142d2e890703e$ 18400 // 18401 18402 extern (C): 18403 18404 /// 18405 /// Structure representing a server that supports HTTP and WebSocket requests. 18406 /// Server capacity is limited and is intended to handle only a small number of 18407 /// simultaneous connections (e.g. for communicating between applications on 18408 /// localhost). The functions of this structure are safe to call from any thread 18409 /// in the brower process unless otherwise indicated. 18410 /// 18411 struct cef_server_t 18412 { 18413 /// 18414 /// Base structure. 18415 /// 18416 18417 /// 18418 /// Returns the task runner for the dedicated server thread. 18419 /// 18420 18421 /// 18422 /// Stop the server and shut down the dedicated server thread. See 18423 /// cef_server_handler_t::OnServerCreated documentation for a description of 18424 g 18425 cef_base_ref_counted_t base; 18426 extern(System) cef_task_runner_t* function (cef_server_t* self) nothrow get_task_runner; 18427 /// server lifespan. 18428 /// 18429 extern(System) void function (cef_server_t* self) nothrow shutdown; 18430 18431 /// 18432 /// Returns true (1) if the server is currently running and accepting incoming 18433 /// connections. See cef_server_handler_t::OnServerCreated documentation for a 18434 /// description of server lifespan. This function must be called on the 18435 /// dedicated server thread. 18436 /// 18437 extern(System) int function (cef_server_t* self) nothrow is_running; 18438 18439 /// 18440 /// Returns the server address including the port number. 18441 /// 18442 // The resulting string must be freed by calling cef_string_userfree_free(). 18443 extern(System) cef_string_userfree_t function (cef_server_t* self) nothrow get_address; 18444 18445 /// 18446 /// Returns true (1) if the server currently has a connection. This function 18447 /// must be called on the dedicated server thread. 18448 /// 18449 extern(System) int function (cef_server_t* self) nothrow has_connection; 18450 18451 /// 18452 /// Returns true (1) if |connection_id| represents a valid connection. This 18453 /// function must be called on the dedicated server thread. 18454 /// 18455 extern(System) int function (cef_server_t* self, int connection_id) nothrow is_valid_connection; 18456 18457 /// 18458 /// Send an HTTP 200 "OK" response to the connection identified by 18459 /// |connection_id|. |content_type| is the response content type (e.g. 18460 /// "text/html"), |data| is the response content, and |data_size| is the size 18461 /// of |data| in bytes. The contents of |data| will be copied. The connection 18462 /// will be closed automatically after the response is sent. 18463 /// 18464 extern(System) void function ( 18465 cef_server_t* self, 18466 int connection_id, 18467 const(cef_string_t)* content_type, 18468 const(void)* data, 18469 size_t data_size) nothrow send_http200response; 18470 18471 /// 18472 /// Send an HTTP 404 "Not Found" response to the connection identified by 18473 /// |connection_id|. The connection will be closed automatically after the 18474 /// response is sent. 18475 /// 18476 extern(System) void function ( 18477 cef_server_t* self, 18478 int connection_id) nothrow send_http404response; 18479 18480 /// 18481 /// Send an HTTP 500 "Internal Server Error" response to the connection 18482 /// identified by |connection_id|. |error_message| is the associated error 18483 /// message. The connection will be closed automatically after the response is 18484 /// sent. 18485 /// 18486 extern(System) void function ( 18487 cef_server_t* self, 18488 int connection_id, 18489 const(cef_string_t)* error_message) nothrow send_http500response; 18490 18491 /// 18492 /// Send a custom HTTP response to the connection identified by 18493 /// |connection_id|. |response_code| is the HTTP response code sent in the 18494 /// status line (e.g. 200), |content_type| is the response content type sent 18495 /// as the "Content-Type" header (e.g. "text/html"), |content_length| is the 18496 /// expected content length, and |extra_headers| is the map of extra response 18497 /// headers. If |content_length| is >= 0 then the "Content-Length" header will 18498 /// be sent. If |content_length| is 0 then no content is expected and the 18499 /// connection will be closed automatically after the response is sent. If 18500 /// |content_length| is < 0 then no "Content-Length" header will be sent and 18501 /// the client will continue reading until the connection is closed. Use the 18502 /// SendRawData function to send the content, if applicable, and call 18503 /// CloseConnection after all content has been sent. 18504 /// 18505 extern(System) void function ( 18506 cef_server_t* self, 18507 int connection_id, 18508 int response_code, 18509 const(cef_string_t)* content_type, 18510 long content_length, 18511 cef_string_multimap_t extra_headers) nothrow send_http_response; 18512 18513 /// 18514 /// Send raw data directly to the connection identified by |connection_id|. 18515 /// |data| is the raw data and |data_size| is the size of |data| in bytes. The 18516 /// contents of |data| will be copied. No validation of |data| is performed 18517 /// internally so the client should be careful to send the amount indicated by 18518 /// the "Content-Length" header, if specified. See SendHttpResponse 18519 /// documentation for intended usage. 18520 /// 18521 extern(System) void function ( 18522 cef_server_t* self, 18523 int connection_id, 18524 const(void)* data, 18525 size_t data_size) nothrow send_raw_data; 18526 18527 /// 18528 /// Close the connection identified by |connection_id|. See SendHttpResponse 18529 /// documentation for intended usage. 18530 /// 18531 extern(System) void function (cef_server_t* self, int connection_id) nothrow close_connection; 18532 18533 /// 18534 /// Send a WebSocket message to the connection identified by |connection_id|. 18535 /// |data| is the response content and |data_size| is the size of |data| in 18536 /// bytes. The contents of |data| will be copied. See 18537 /// cef_server_handler_t::OnWebSocketRequest documentation for intended usage. 18538 /// 18539 extern(System) void function ( 18540 cef_server_t* self, 18541 int connection_id, 18542 const(void)* data, 18543 size_t data_size) nothrow send_web_socket_message; 18544 } 18545 18546 18547 18548 /// 18549 /// Create a new server that binds to |address| and |port|. |address| must be a 18550 /// valid IPv4 or IPv6 address (e.g. 127.0.0.1 or ::1) and |port| must be a port 18551 /// number outside of the reserved range (e.g. between 1025 and 65535 on most 18552 /// platforms). |backlog| is the maximum number of pending connections. A new 18553 /// thread will be created for each CreateServer call (the "dedicated server 18554 /// thread"). It is therefore recommended to use a different 18555 /// cef_server_handler_t instance for each CreateServer call to avoid thread 18556 /// safety issues in the cef_server_handler_t implementation. The 18557 /// cef_server_handler_t::OnServerCreated function will be called on the 18558 /// dedicated server thread to report success or failure. See 18559 /// cef_server_handler_t::OnServerCreated documentation for a description of 18560 /// server lifespan. 18561 /// 18562 void cef_server_create ( 18563 const(cef_string_t)* address, 18564 ushort port, 18565 int backlog, 18566 cef_server_handler_t* handler); 18567 18568 /// 18569 /// Implement this structure to handle HTTP server requests. A new thread will 18570 /// be created for each cef_server_t::CreateServer call (the "dedicated server 18571 /// thread"), and the functions of this structure will be called on that thread. 18572 /// It is therefore recommended to use a different cef_server_handler_t instance 18573 /// for each cef_server_t::CreateServer call to avoid thread safety issues in 18574 /// the cef_server_handler_t implementation. 18575 /// 18576 struct cef_server_handler_t 18577 { 18578 /// 18579 /// Base structure. 18580 /// 18581 cef_base_ref_counted_t base; 18582 18583 /// 18584 /// Called when |server| is created. If the server was started successfully 18585 /// then cef_server_t::IsRunning will return true (1). The server will 18586 /// continue running until cef_server_t::Shutdown is called, after which time 18587 /// OnServerDestroyed will be called. If the server failed to start then 18588 /// OnServerDestroyed will be called immediately after this function returns. 18589 /// 18590 extern(System) void function ( 18591 cef_server_handler_t* self, 18592 cef_server_t* server) nothrow on_server_created; 18593 18594 /// 18595 /// Called when |server| is destroyed. The server thread will be stopped after 18596 /// this function returns. The client should release any references to 18597 /// |server| when this function is called. See OnServerCreated documentation 18598 /// for a description of server lifespan. 18599 /// 18600 extern(System) void function ( 18601 cef_server_handler_t* self, 18602 cef_server_t* server) nothrow on_server_destroyed; 18603 18604 /// 18605 /// Called when a client connects to |server|. |connection_id| uniquely 18606 /// identifies the connection. Each call to this function will have a matching 18607 /// call to OnClientDisconnected. 18608 /// 18609 extern(System) void function ( 18610 cef_server_handler_t* self, 18611 cef_server_t* server, 18612 int connection_id) nothrow on_client_connected; 18613 18614 /// 18615 /// Called when a client disconnects from |server|. |connection_id| uniquely 18616 /// identifies the connection. The client should release any data associated 18617 /// with |connection_id| when this function is called and |connection_id| 18618 /// should no longer be passed to cef_server_t functions. Disconnects can 18619 /// originate from either the client or the server. For example, the server 18620 /// will disconnect automatically after a cef_server_t::SendHttpXXXResponse 18621 /// function is called. 18622 /// 18623 extern(System) void function ( 18624 cef_server_handler_t* self, 18625 cef_server_t* server, 18626 int connection_id) nothrow on_client_disconnected; 18627 18628 /// 18629 /// Called when |server| receives an HTTP request. |connection_id| uniquely 18630 /// identifies the connection, |client_address| is the requesting IPv4 or IPv6 18631 /// client address including port number, and |request| contains the request 18632 /// contents (URL, function, headers and optional POST data). Call 18633 /// cef_server_t functions either synchronously or asynchronusly to send a 18634 /// response. 18635 /// 18636 extern(System) void function ( 18637 cef_server_handler_t* self, 18638 cef_server_t* server, 18639 int connection_id, 18640 const(cef_string_t)* client_address, 18641 cef_request_t* request) nothrow on_http_request; 18642 18643 /// 18644 /// Called when |server| receives a WebSocket request. |connection_id| 18645 /// uniquely identifies the connection, |client_address| is the requesting 18646 /// IPv4 or IPv6 client address including port number, and |request| contains 18647 /// the request contents (URL, function, headers and optional POST data). 18648 /// Execute |callback| either synchronously or asynchronously to accept or 18649 /// decline the WebSocket connection. If the request is accepted then 18650 /// OnWebSocketConnected will be called after the WebSocket has connected and 18651 /// incoming messages will be delivered to the OnWebSocketMessage callback. If 18652 /// the request is declined then the client will be disconnected and 18653 /// OnClientDisconnected will be called. Call the 18654 /// cef_server_t::SendWebSocketMessage function after receiving the 18655 /// OnWebSocketConnected callback to respond with WebSocket messages. 18656 /// 18657 extern(System) void function ( 18658 cef_server_handler_t* self, 18659 cef_server_t* server, 18660 int connection_id, 18661 const(cef_string_t)* client_address, 18662 cef_request_t* request, 18663 cef_callback_t* callback) nothrow on_web_socket_request; 18664 18665 /// 18666 /// Called after the client has accepted the WebSocket connection for |server| 18667 /// and |connection_id| via the OnWebSocketRequest callback. See 18668 /// OnWebSocketRequest documentation for intended usage. 18669 /// 18670 extern(System) void function ( 18671 cef_server_handler_t* self, 18672 cef_server_t* server, 18673 int connection_id) nothrow on_web_socket_connected; 18674 18675 /// 18676 /// Called when |server| receives an WebSocket message. |connection_id| 18677 /// uniquely identifies the connection, |data| is the message content and 18678 /// |data_size| is the size of |data| in bytes. Do not keep a reference to 18679 /// |data| outside of this function. See OnWebSocketRequest documentation for 18680 /// intended usage. 18681 /// 18682 extern(System) void function ( 18683 cef_server_handler_t* self, 18684 cef_server_t* server, 18685 int connection_id, 18686 const(void)* data, 18687 size_t data_size) nothrow on_web_socket_message; 18688 } 18689 18690 18691 18692 // CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_ 18693 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 18694 // 18695 // Redistribution and use in source and binary forms, with or without 18696 // modification, are permitted provided that the following conditions are 18697 // met: 18698 // 18699 // * Redistributions of source code must retain the above copyright 18700 // notice, this list of conditions and the following disclaimer. 18701 // * Redistributions in binary form must reproduce the above 18702 // copyright notice, this list of conditions and the following disclaimer 18703 // in the documentation and/or other materials provided with the 18704 // distribution. 18705 // * Neither the name of Google Inc. nor the name Chromium Embedded 18706 // Framework nor the names of its contributors may be used to endorse 18707 // or promote products derived from this software without specific prior 18708 // written permission. 18709 // 18710 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18711 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18712 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18713 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18714 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18715 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18716 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18717 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18718 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18719 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18720 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18721 // 18722 // --------------------------------------------------------------------------- 18723 // 18724 // This file was generated by the CEF translator tool and should not edited 18725 // by hand. See the translator.README.txt file in the tools directory for 18726 // more information. 18727 // 18728 // $hash=dfa2f2d57339e05592d7ee5f4c4c54dd0932cd94$ 18729 // 18730 18731 extern (C): 18732 18733 /// 18734 /// Structure that wraps platform-dependent share memory region mapping. 18735 /// 18736 struct cef_shared_memory_region_t 18737 { 18738 /// 18739 /// Base structure. 18740 /// 18741 18742 /// 18743 /// Returns true (1) if the mapping is valid. 18744 /// 18745 18746 /// 18747 /// Returns the size of the mapping in bytes. Returns 0 for invalid instances. 18748 /// 18749 18750 /// 18751 /// Returns the pointer to the memory. Returns nullptr for invalid instances. 18752 /// The returned pointer is only valid for the life span of this object. 18753 /// 18754 18755 // CEF_INCLUDE_CAPI_CEF_SHARED_MEMORY_REGION_CAPI_H_ 18756 g 18757 cef_base_ref_counted_t base; 18758 extern(System) int function (cef_shared_memory_region_t* self) nothrow is_valid; 18759 extern(System) size_t function (cef_shared_memory_region_t* self) nothrow size; 18760 extern(System) void* function (cef_shared_memory_region_t* self) nothrow memory; 18761 } 18762 18763 18764 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 18765 // 18766 // Redistribution and use in source and binary forms, with or without 18767 // modification, are permitted provided that the following conditions are 18768 // met: 18769 // 18770 // * Redistributions of source code must retain the above copyright 18771 // notice, this list of conditions and the following disclaimer. 18772 // * Redistributions in binary form must reproduce the above 18773 // copyright notice, this list of conditions and the following disclaimer 18774 // in the documentation and/or other materials provided with the 18775 // distribution. 18776 // * Neither the name of Google Inc. nor the name Chromium Embedded 18777 // Framework nor the names of its contributors may be used to endorse 18778 // or promote products derived from this software without specific prior 18779 // written permission. 18780 // 18781 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18782 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18783 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18784 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18785 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18786 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18787 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18788 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18789 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18790 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18791 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18792 // 18793 // --------------------------------------------------------------------------- 18794 // 18795 // This file was generated by the CEF translator tool and should not edited 18796 // by hand. See the translator.README.txt file in the tools directory for 18797 // more information. 18798 // 18799 // $hash=1a2d8806256d04362f181350db2835850cb3e0ae$ 18800 // 18801 18802 extern (C): 18803 18804 /// 18805 /// Structure that builds a cef_process_message_t containing a shared memory 18806 /// region. This structure is not thread-safe but may be used exclusively on a 18807 /// different thread from the one which constructed it. 18808 /// 18809 struct cef_shared_process_message_builder_t 18810 { 18811 /// 18812 /// Base structure. 18813 /// 18814 18815 /// 18816 /// Returns true (1) if the builder is valid. 18817 /// 18818 18819 /// 18820 /// Returns the size of the shared memory region in bytes. Returns 0 for 18821 /// invalid instances. 18822 /// 18823 18824 /// 18825 /// Returns the pointer to the writable memory. Returns nullptr for invalid 18826 /// instances. The returned pointer is only valid for the life span of this 18827 g 18828 cef_base_ref_counted_t base; 18829 extern(System) int function (cef_shared_process_message_builder_t* self) nothrow is_valid; 18830 extern(System) size_t function (cef_shared_process_message_builder_t* self) nothrow size; 18831 /// object. 18832 /// 18833 extern(System) void* function (cef_shared_process_message_builder_t* self) nothrow memory; 18834 18835 /// 18836 /// Creates a new cef_process_message_t from the data provided to the builder. 18837 /// Returns nullptr for invalid instances. Invalidates the builder instance. 18838 /// 18839 extern(System) cef_process_message_t* function ( 18840 cef_shared_process_message_builder_t* self) nothrow build; 18841 } 18842 18843 18844 18845 /// 18846 /// Creates a new cef_shared_process_message_builder_t with the specified |name| 18847 /// and shared memory region of specified |byte_size|. 18848 /// 18849 cef_shared_process_message_builder_t* cef_shared_process_message_builder_create ( 18850 const(cef_string_t)* name, 18851 size_t byte_size); 18852 18853 // CEF_INCLUDE_CAPI_CEF_SHARED_PROCESS_MESSAGE_BUILDER_CAPI_H_ 18854 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 18855 // 18856 // Redistribution and use in source and binary forms, with or without 18857 // modification, are permitted provided that the following conditions are 18858 // met: 18859 // 18860 // * Redistributions of source code must retain the above copyright 18861 // notice, this list of conditions and the following disclaimer. 18862 // * Redistributions in binary form must reproduce the above 18863 // copyright notice, this list of conditions and the following disclaimer 18864 // in the documentation and/or other materials provided with the 18865 // distribution. 18866 // * Neither the name of Google Inc. nor the name Chromium Embedded 18867 // Framework nor the names of its contributors may be used to endorse 18868 // or promote products derived from this software without specific prior 18869 // written permission. 18870 // 18871 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18872 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18873 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18874 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18875 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18876 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18877 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18878 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18879 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18880 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18881 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18882 // 18883 // --------------------------------------------------------------------------- 18884 // 18885 // This file was generated by the CEF translator tool and should not edited 18886 // by hand. See the translator.README.txt file in the tools directory for 18887 // more information. 18888 // 18889 // $hash=99dff3042ea437ecf5771eff9b3cab4c22190534$ 18890 // 18891 18892 extern (C): 18893 18894 /// 18895 /// Structure representing SSL information. 18896 /// 18897 struct cef_sslinfo_t 18898 { 18899 /// 18900 /// Base structure. 18901 /// 18902 18903 /// 18904 /// Returns a bitmask containing any and all problems verifying the server 18905 /// certificate. 18906 /// 18907 18908 /// 18909 /// Returns the X.509 certificate. 18910 /// 18911 18912 /// 18913 /// Returns true (1) if the certificate status represents an error. 18914 /// 18915 18916 // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_ 18917 g 18918 cef_base_ref_counted_t base; 18919 extern(System) cef_cert_status_t function (cef_sslinfo_t* self) nothrow get_cert_status; 18920 extern(System) cef_x509certificate_t* function ( 18921 cef_sslinfo_t* self) nothrow get_x509certificate; 18922 } 18923 18924 18925 int cef_is_cert_status_error (cef_cert_status_t status); 18926 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 18927 // 18928 // Redistribution and use in source and binary forms, with or without 18929 // modification, are permitted provided that the following conditions are 18930 // met: 18931 // 18932 // * Redistributions of source code must retain the above copyright 18933 // notice, this list of conditions and the following disclaimer. 18934 // * Redistributions in binary form must reproduce the above 18935 // copyright notice, this list of conditions and the following disclaimer 18936 // in the documentation and/or other materials provided with the 18937 // distribution. 18938 // * Neither the name of Google Inc. nor the name Chromium Embedded 18939 // Framework nor the names of its contributors may be used to endorse 18940 // or promote products derived from this software without specific prior 18941 // written permission. 18942 // 18943 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18944 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18945 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18946 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18947 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 18948 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 18949 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18950 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 18951 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18952 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 18953 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18954 // 18955 // --------------------------------------------------------------------------- 18956 // 18957 // This file was generated by the CEF translator tool and should not edited 18958 // by hand. See the translator.README.txt file in the tools directory for 18959 // more information. 18960 // 18961 // $hash=034a68aa4901cde95e12a7900cfc65753fbde345$ 18962 // 18963 18964 extern (C): 18965 18966 /// 18967 /// Structure representing the SSL information for a navigation entry. 18968 /// 18969 struct cef_sslstatus_t 18970 { 18971 /// 18972 /// Base structure. 18973 /// 18974 18975 /// 18976 /// Returns true (1) if the status is related to a secure SSL/TLS connection. 18977 /// 18978 18979 /// 18980 /// Returns a bitmask containing any and all problems verifying the server 18981 /// certificate. 18982 /// 18983 18984 /// 18985 /// Returns the SSL version used for the SSL connection. 18986 /// 18987 18988 /// 18989 /// Returns a bitmask containing the page security content status. 18990 /// 18991 g 18992 cef_base_ref_counted_t base; 18993 extern(System) int function (cef_sslstatus_t* self) nothrow is_secure_connection; 18994 extern(System) cef_cert_status_t function (cef_sslstatus_t* self) nothrow get_cert_status; 18995 extern(System) cef_ssl_version_t function (cef_sslstatus_t* self) nothrow get_sslversion; 18996 extern(System) cef_ssl_content_status_t function ( 18997 cef_sslstatus_t* self) nothrow get_content_status; 18998 18999 /// 19000 /// Returns the X.509 certificate. 19001 /// 19002 extern(System) cef_x509certificate_t* function ( 19003 cef_sslstatus_t* self) nothrow get_x509certificate; 19004 } 19005 19006 19007 19008 // CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_ 19009 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 19010 // 19011 // Redistribution and use in source and binary forms, with or without 19012 // modification, are permitted provided that the following conditions are 19013 // met: 19014 // 19015 // * Redistributions of source code must retain the above copyright 19016 // notice, this list of conditions and the following disclaimer. 19017 // * Redistributions in binary form must reproduce the above 19018 // copyright notice, this list of conditions and the following disclaimer 19019 // in the documentation and/or other materials provided with the 19020 // distribution. 19021 // * Neither the name of Google Inc. nor the name Chromium Embedded 19022 // Framework nor the names of its contributors may be used to endorse 19023 // or promote products derived from this software without specific prior 19024 // written permission. 19025 // 19026 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19027 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19028 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19029 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19030 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19031 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19032 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19033 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19034 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19035 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19036 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19037 // 19038 // --------------------------------------------------------------------------- 19039 // 19040 // This file was generated by the CEF translator tool and should not edited 19041 // by hand. See the translator.README.txt file in the tools directory for 19042 // more information. 19043 // 19044 // $hash=5632e62f83aac60e62db9d7f308563fed3285c65$ 19045 // 19046 19047 extern (C): 19048 19049 /// 19050 /// Structure the client can implement to provide a custom stream reader. The 19051 /// functions of this structure may be called on any thread. 19052 /// 19053 struct cef_read_handler_t 19054 { 19055 /// 19056 /// Base structure. 19057 /// 19058 19059 /// 19060 /// Read raw binary data. 19061 /// 19062 19063 /// 19064 /// Seek to the specified offset position. |whence| may be any one of 19065 /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on 19066 /// failure. 19067 /// 19068 19069 /// 19070 /// Return the current offset position. 19071 /// 19072 19073 /// 19074 g 19075 cef_base_ref_counted_t base; 19076 extern(System) size_t function ( 19077 cef_read_handler_t* self, 19078 void* ptr, 19079 size_t size, 19080 size_t n) nothrow read; 19081 extern(System) int function (cef_read_handler_t* self, long offset, int whence) nothrow seek; 19082 extern(System) long function (cef_read_handler_t* self) nothrow tell; 19083 /// Return non-zero if at end of file. 19084 /// 19085 extern(System) int function (cef_read_handler_t* self) nothrow eof; 19086 19087 /// 19088 /// Return true (1) if this handler performs work like accessing the file 19089 /// system which may block. Used as a hint for determining the thread to 19090 /// access the handler from. 19091 /// 19092 extern(System) int function (cef_read_handler_t* self) nothrow may_block; 19093 } 19094 19095 19096 19097 /// 19098 /// Structure used to read data from a stream. The functions of this structure 19099 /// may be called on any thread. 19100 /// 19101 struct cef_stream_reader_t 19102 { 19103 /// 19104 /// Base structure. 19105 /// 19106 cef_base_ref_counted_t base; 19107 19108 /// 19109 /// Read raw binary data. 19110 /// 19111 extern(System) size_t function ( 19112 cef_stream_reader_t* self, 19113 void* ptr, 19114 size_t size, 19115 size_t n) nothrow read; 19116 19117 /// 19118 /// Seek to the specified offset position. |whence| may be any one of 19119 /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on 19120 /// failure. 19121 /// 19122 extern(System) int function (cef_stream_reader_t* self, long offset, int whence) nothrow seek; 19123 19124 /// 19125 /// Return the current offset position. 19126 /// 19127 extern(System) long function (cef_stream_reader_t* self) nothrow tell; 19128 19129 /// 19130 /// Return non-zero if at end of file. 19131 /// 19132 extern(System) int function (cef_stream_reader_t* self) nothrow eof; 19133 19134 /// 19135 /// Returns true (1) if this reader performs work like accessing the file 19136 /// system which may block. Used as a hint for determining the thread to 19137 /// access the reader from. 19138 /// 19139 extern(System) int function (cef_stream_reader_t* self) nothrow may_block; 19140 } 19141 19142 19143 19144 /// 19145 /// Create a new cef_stream_reader_t object from a file. 19146 /// 19147 cef_stream_reader_t* cef_stream_reader_create_for_file ( 19148 const(cef_string_t)* fileName); 19149 19150 /// 19151 /// Create a new cef_stream_reader_t object from data. 19152 /// 19153 cef_stream_reader_t* cef_stream_reader_create_for_data ( 19154 void* data, 19155 size_t size); 19156 19157 /// 19158 /// Create a new cef_stream_reader_t object from a custom handler. 19159 /// 19160 cef_stream_reader_t* cef_stream_reader_create_for_handler ( 19161 cef_read_handler_t* handler); 19162 19163 /// 19164 /// Structure the client can implement to provide a custom stream writer. The 19165 /// functions of this structure may be called on any thread. 19166 /// 19167 struct cef_write_handler_t 19168 { 19169 /// 19170 /// Base structure. 19171 /// 19172 cef_base_ref_counted_t base; 19173 19174 /// 19175 /// Write raw binary data. 19176 /// 19177 extern(System) size_t function ( 19178 cef_write_handler_t* self, 19179 const(void)* ptr, 19180 size_t size, 19181 size_t n) nothrow write; 19182 19183 /// 19184 /// Seek to the specified offset position. |whence| may be any one of 19185 /// SEEK_CUR, SEEK_END or SEEK_SET. Return zero on success and non-zero on 19186 /// failure. 19187 /// 19188 extern(System) int function (cef_write_handler_t* self, long offset, int whence) nothrow seek; 19189 19190 /// 19191 /// Return the current offset position. 19192 /// 19193 extern(System) long function (cef_write_handler_t* self) nothrow tell; 19194 19195 /// 19196 /// Flush the stream. 19197 /// 19198 extern(System) int function (cef_write_handler_t* self) nothrow flush; 19199 19200 /// 19201 /// Return true (1) if this handler performs work like accessing the file 19202 /// system which may block. Used as a hint for determining the thread to 19203 /// access the handler from. 19204 /// 19205 extern(System) int function (cef_write_handler_t* self) nothrow may_block; 19206 } 19207 19208 19209 19210 /// 19211 /// Structure used to write data to a stream. The functions of this structure 19212 /// may be called on any thread. 19213 /// 19214 struct cef_stream_writer_t 19215 { 19216 /// 19217 /// Base structure. 19218 /// 19219 cef_base_ref_counted_t base; 19220 19221 /// 19222 /// Write raw binary data. 19223 /// 19224 extern(System) size_t function ( 19225 cef_stream_writer_t* self, 19226 const(void)* ptr, 19227 size_t size, 19228 size_t n) nothrow write; 19229 19230 /// 19231 /// Seek to the specified offset position. |whence| may be any one of 19232 /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on 19233 /// failure. 19234 /// 19235 extern(System) int function (cef_stream_writer_t* self, long offset, int whence) nothrow seek; 19236 19237 /// 19238 /// Return the current offset position. 19239 /// 19240 extern(System) long function (cef_stream_writer_t* self) nothrow tell; 19241 19242 /// 19243 /// Flush the stream. 19244 /// 19245 extern(System) int function (cef_stream_writer_t* self) nothrow flush; 19246 19247 /// 19248 /// Returns true (1) if this writer performs work like accessing the file 19249 /// system which may block. Used as a hint for determining the thread to 19250 /// access the writer from. 19251 /// 19252 extern(System) int function (cef_stream_writer_t* self) nothrow may_block; 19253 } 19254 19255 19256 19257 /// 19258 /// Create a new cef_stream_writer_t object for a file. 19259 /// 19260 cef_stream_writer_t* cef_stream_writer_create_for_file ( 19261 const(cef_string_t)* fileName); 19262 19263 /// 19264 /// Create a new cef_stream_writer_t object for a custom handler. 19265 /// 19266 cef_stream_writer_t* cef_stream_writer_create_for_handler ( 19267 cef_write_handler_t* handler); 19268 19269 // CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_ 19270 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 19271 // 19272 // Redistribution and use in source and binary forms, with or without 19273 // modification, are permitted provided that the following conditions are 19274 // met: 19275 // 19276 // * Redistributions of source code must retain the above copyright 19277 // notice, this list of conditions and the following disclaimer. 19278 // * Redistributions in binary form must reproduce the above 19279 // copyright notice, this list of conditions and the following disclaimer 19280 // in the documentation and/or other materials provided with the 19281 // distribution. 19282 // * Neither the name of Google Inc. nor the name Chromium Embedded 19283 // Framework nor the names of its contributors may be used to endorse 19284 // or promote products derived from this software without specific prior 19285 // written permission. 19286 // 19287 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19288 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19289 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19290 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19291 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19292 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19293 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19294 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19295 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19296 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19297 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19298 // 19299 // --------------------------------------------------------------------------- 19300 // 19301 // This file was generated by the CEF translator tool and should not edited 19302 // by hand. See the translator.README.txt file in the tools directory for 19303 // more information. 19304 // 19305 // $hash=6a22e5144c0254acb09656e6e41eedd05f2dd7e7$ 19306 // 19307 19308 extern (C): 19309 19310 /// 19311 /// Implement this structure to receive string values asynchronously. 19312 /// 19313 struct cef_string_visitor_t 19314 { 19315 /// 19316 /// Base structure. 19317 /// 19318 19319 /// 19320 /// Method that will be executed. 19321 /// 19322 19323 // CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 19324 g 19325 cef_base_ref_counted_t base; 19326 extern(System) void function ( 19327 cef_string_visitor_t* self, 19328 const(cef_string_t)* string) nothrow visit; 19329 } 19330 19331 19332 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 19333 // 19334 // Redistribution and use in source and binary forms, with or without 19335 // modification, are permitted provided that the following conditions are 19336 // met: 19337 // 19338 // * Redistributions of source code must retain the above copyright 19339 // notice, this list of conditions and the following disclaimer. 19340 // * Redistributions in binary form must reproduce the above 19341 // copyright notice, this list of conditions and the following disclaimer 19342 // in the documentation and/or other materials provided with the 19343 // distribution. 19344 // * Neither the name of Google Inc. nor the name Chromium Embedded 19345 // Framework nor the names of its contributors may be used to endorse 19346 // or promote products derived from this software without specific prior 19347 // written permission. 19348 // 19349 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19350 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19351 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19352 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19353 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19354 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19355 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19356 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19357 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19358 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19359 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19360 // 19361 // --------------------------------------------------------------------------- 19362 // 19363 // This file was generated by the CEF translator tool and should not edited 19364 // by hand. See the translator.README.txt file in the tools directory for 19365 // more information. 19366 // 19367 // $hash=fc609ce5aa3bc51e5cef1f9174dbfc5cff0a0689$ 19368 // 19369 19370 extern (C): 19371 19372 /// 19373 /// Implement this structure for asynchronous task execution. If the task is 19374 /// posted successfully and if the associated message loop is still running then 19375 /// the execute() function will be called on the target thread. If the task 19376 /// fails to post then the task object may be destroyed on the source thread 19377 /// instead of the target thread. For this reason be cautious when performing 19378 /// work in the task object destructor. 19379 /// 19380 struct cef_task_t 19381 { 19382 /// 19383 /// Base structure. 19384 /// 19385 19386 /// 19387 /// Method that will be executed on the target thread. 19388 /// 19389 19390 /// 19391 /// Structure that asynchronously executes tasks on the associated thread. It is 19392 /// safe to call the functions of this structure on any thread. 19393 /// 19394 /// CEF maintains multiple internal threads that are used for handling different 19395 /// types of tasks in different processes. The cef_thread_id_t definitions in 19396 g 19397 cef_base_ref_counted_t base; 19398 extern(System) void function (cef_task_t* self) nothrow execute; 19399 } 19400 19401 19402 /// cef_types.h list the common CEF threads. Task runners are also available for 19403 /// other CEF threads as appropriate (for example, V8 WebWorker threads). 19404 /// 19405 struct cef_task_runner_t 19406 { 19407 /// 19408 /// Base structure. 19409 /// 19410 cef_base_ref_counted_t base; 19411 19412 /// 19413 /// Returns true (1) if this object is pointing to the same task runner as 19414 /// |that| object. 19415 /// 19416 extern(System) int function (cef_task_runner_t* self, cef_task_runner_t* that) nothrow is_same; 19417 19418 /// 19419 /// Returns true (1) if this task runner belongs to the current thread. 19420 /// 19421 extern(System) int function (cef_task_runner_t* self) nothrow belongs_to_current_thread; 19422 19423 /// 19424 /// Returns true (1) if this task runner is for the specified CEF thread. 19425 /// 19426 extern(System) int function ( 19427 cef_task_runner_t* self, 19428 cef_thread_id_t threadId) nothrow belongs_to_thread; 19429 19430 /// 19431 /// Post a task for execution on the thread associated with this task runner. 19432 /// Execution will occur asynchronously. 19433 /// 19434 extern(System) int function (cef_task_runner_t* self, cef_task_t* task) nothrow post_task; 19435 19436 /// 19437 /// Post a task for delayed execution on the thread associated with this task 19438 /// runner. Execution will occur asynchronously. Delayed tasks are not 19439 /// supported on V8 WebWorker threads and will be executed without the 19440 /// specified delay. 19441 /// 19442 extern(System) int function ( 19443 cef_task_runner_t* self, 19444 cef_task_t* task, 19445 long delay_ms) nothrow post_delayed_task; 19446 } 19447 19448 19449 19450 /// 19451 /// Returns the task runner for the current thread. Only CEF threads will have 19452 /// task runners. An NULL reference will be returned if this function is called 19453 /// on an invalid thread. 19454 /// 19455 cef_task_runner_t* cef_task_runner_get_for_current_thread (); 19456 19457 /// 19458 /// Returns the task runner for the specified CEF thread. 19459 /// 19460 cef_task_runner_t* cef_task_runner_get_for_thread (cef_thread_id_t threadId); 19461 19462 /// 19463 /// Returns true (1) if called on the specified thread. Equivalent to using 19464 /// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread(). 19465 /// 19466 int cef_currently_on (cef_thread_id_t threadId); 19467 19468 /// 19469 /// Post a task for execution on the specified thread. Equivalent to using 19470 /// cef_task_runner_t::GetForThread(threadId)->PostTask(task). 19471 /// 19472 int cef_post_task (cef_thread_id_t threadId, cef_task_t* task); 19473 19474 /// 19475 /// Post a task for delayed execution on the specified thread. Equivalent to 19476 /// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task, 19477 /// delay_ms). 19478 /// 19479 int cef_post_delayed_task ( 19480 cef_thread_id_t threadId, 19481 cef_task_t* task, 19482 long delay_ms); 19483 19484 // CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ 19485 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 19486 // 19487 // Redistribution and use in source and binary forms, with or without 19488 // modification, are permitted provided that the following conditions are 19489 // met: 19490 // 19491 // * Redistributions of source code must retain the above copyright 19492 // notice, this list of conditions and the following disclaimer. 19493 // * Redistributions in binary form must reproduce the above 19494 // copyright notice, this list of conditions and the following disclaimer 19495 // in the documentation and/or other materials provided with the 19496 // distribution. 19497 // * Neither the name of Google Inc. nor the name Chromium Embedded 19498 // Framework nor the names of its contributors may be used to endorse 19499 // or promote products derived from this software without specific prior 19500 // written permission. 19501 // 19502 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19503 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19504 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19505 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19506 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19507 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19508 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19509 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19510 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19511 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19512 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19513 // 19514 // --------------------------------------------------------------------------- 19515 // 19516 // This file was generated by the CEF translator tool and should not edited 19517 // by hand. See the translator.README.txt file in the tools directory for 19518 // more information. 19519 // 19520 // $hash=b111114b291d3b91c526e6b3da5741959469ec4a$ 19521 // 19522 19523 extern (C): 19524 19525 /// 19526 /// A simple thread abstraction that establishes a message loop on a new thread. 19527 /// The consumer uses cef_task_runner_t to execute code on the thread's message 19528 /// loop. The thread is terminated when the cef_thread_t object is destroyed or 19529 /// stop() is called. All pending tasks queued on the thread's message loop will 19530 /// run to completion before the thread is terminated. cef_thread_create() can 19531 /// be called on any valid CEF thread in either the browser or render process. 19532 /// This structure should only be used for tasks that require a dedicated 19533 /// thread. In most cases you can post tasks to an existing CEF thread instead 19534 /// of creating a new one; see cef_task.h for details. 19535 /// 19536 struct cef_thread_t 19537 { 19538 /// 19539 /// Base structure. 19540 /// 19541 19542 /// 19543 /// Returns the cef_task_runner_t that will execute code on this thread's 19544 g 19545 cef_base_ref_counted_t base; 19546 /// message loop. This function is safe to call from any thread. 19547 /// 19548 extern(System) cef_task_runner_t* function (cef_thread_t* self) nothrow get_task_runner; 19549 19550 /// 19551 /// Returns the platform thread ID. It will return the same value after stop() 19552 /// is called. This function is safe to call from any thread. 19553 /// 19554 extern(System) cef_platform_thread_id_t function ( 19555 cef_thread_t* self) nothrow get_platform_thread_id; 19556 19557 /// 19558 /// Stop and join the thread. This function must be called from the same 19559 /// thread that called cef_thread_create(). Do not call this function if 19560 /// cef_thread_create() was called with a |stoppable| value of false (0). 19561 /// 19562 extern(System) void function (cef_thread_t* self) nothrow stop; 19563 19564 /// 19565 /// Returns true (1) if the thread is currently running. This function must be 19566 /// called from the same thread that called cef_thread_create(). 19567 /// 19568 extern(System) int function (cef_thread_t* self) nothrow is_running; 19569 } 19570 19571 19572 19573 /// 19574 /// Create and start a new thread. This function does not block waiting for the 19575 /// thread to run initialization. |display_name| is the name that will be used 19576 /// to identify the thread. |priority| is the thread execution priority. 19577 /// |message_loop_type| indicates the set of asynchronous events that the thread 19578 /// can process. If |stoppable| is true (1) the thread will stopped and joined 19579 /// on destruction or when stop() is called; otherwise, the thread cannot be 19580 /// stopped and will be leaked on shutdown. On Windows the |com_init_mode| value 19581 /// specifies how COM will be initialized for the thread. If |com_init_mode| is 19582 /// set to COM_INIT_MODE_STA then |message_loop_type| must be set to ML_TYPE_UI. 19583 /// 19584 cef_thread_t* cef_thread_create ( 19585 const(cef_string_t)* display_name, 19586 cef_thread_priority_t priority, 19587 cef_message_loop_type_t message_loop_type, 19588 int stoppable, 19589 cef_com_init_mode_t com_init_mode); 19590 19591 // CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_ 19592 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 19593 // 19594 // Redistribution and use in source and binary forms, with or without 19595 // modification, are permitted provided that the following conditions are 19596 // met: 19597 // 19598 // * Redistributions of source code must retain the above copyright 19599 // notice, this list of conditions and the following disclaimer. 19600 // * Redistributions in binary form must reproduce the above 19601 // copyright notice, this list of conditions and the following disclaimer 19602 // in the documentation and/or other materials provided with the 19603 // distribution. 19604 // * Neither the name of Google Inc. nor the name Chromium Embedded 19605 // Framework nor the names of its contributors may be used to endorse 19606 // or promote products derived from this software without specific prior 19607 // written permission. 19608 // 19609 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19610 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19611 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19612 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19613 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19614 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19615 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19616 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19617 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19618 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19619 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19620 // 19621 // --------------------------------------------------------------------------- 19622 // 19623 // This file was generated by the CEF translator tool and should not edited 19624 // by hand. See the translator.README.txt file in the tools directory for 19625 // more information. 19626 // 19627 // $hash=28e2d2d86dffdfdad0f275a444656a0638b44d0e$ 19628 // 19629 19630 extern (C): 19631 19632 /// 19633 /// Implement this structure to receive notification when tracing has completed. 19634 /// The functions of this structure will be called on the browser process UI 19635 /// thread. 19636 /// 19637 struct cef_end_tracing_callback_t 19638 { 19639 /// 19640 /// Base structure. 19641 /// 19642 19643 /// 19644 /// Called after all processes have sent their trace data. |tracing_file| is 19645 /// the path at which tracing data was written. The client is responsible for 19646 /// deleting |tracing_file|. 19647 /// 19648 19649 /// 19650 /// Start tracing events on all processes. Tracing is initialized asynchronously 19651 /// and |callback| will be executed on the UI thread after initialization is 19652 /// complete. 19653 /// 19654 /// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is 19655 g 19656 cef_base_ref_counted_t base; 19657 extern(System) void function ( 19658 cef_end_tracing_callback_t* self, 19659 const(cef_string_t)* tracing_file) nothrow on_end_tracing_complete; 19660 } 19661 19662 /// pending, CefBeginTracing will fail and return false (0). 19663 /// 19664 /// |categories| is a comma-delimited list of category wildcards. A category can 19665 /// have an optional '-' prefix to make it an excluded category. Having both 19666 /// included and excluded categories in the same list is not supported. 19667 /// 19668 /// Examples: - "test_MyTest*" - "test_MyTest*,test_OtherStuff" - 19669 /// "-excluded_category1,-excluded_category2" 19670 /// 19671 /// This function must be called on the browser process UI thread. 19672 /// 19673 int cef_begin_tracing ( 19674 const(cef_string_t)* categories, 19675 cef_completion_callback_t* callback); 19676 19677 /// 19678 /// Stop tracing events on all processes. 19679 /// 19680 /// This function will fail and return false (0) if a previous call to 19681 /// CefEndTracingAsync is already pending or if CefBeginTracing was not called. 19682 /// 19683 /// |tracing_file| is the path at which tracing data will be written and 19684 /// |callback| is the callback that will be executed once all processes have 19685 /// sent their trace data. If |tracing_file| is NULL a new temporary file path 19686 /// will be used. If |callback| is NULL no trace data will be written. 19687 /// 19688 /// This function must be called on the browser process UI thread. 19689 /// 19690 int cef_end_tracing ( 19691 const(cef_string_t)* tracing_file, 19692 cef_end_tracing_callback_t* callback); 19693 19694 /// 19695 /// Returns the current system trace time or, if none is defined, the current 19696 /// high-res time. Can be used by clients to synchronize with the time 19697 /// information in trace events. 19698 /// 19699 long cef_now_from_system_trace_time (); 19700 19701 // CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ 19702 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 19703 // 19704 // Redistribution and use in source and binary forms, with or without 19705 // modification, are permitted provided that the following conditions are 19706 // met: 19707 // 19708 // * Redistributions of source code must retain the above copyright 19709 // notice, this list of conditions and the following disclaimer. 19710 // * Redistributions in binary form must reproduce the above 19711 // copyright notice, this list of conditions and the following disclaimer 19712 // in the documentation and/or other materials provided with the 19713 // distribution. 19714 // * Neither the name of Google Inc. nor the name Chromium Embedded 19715 // Framework nor the names of its contributors may be used to endorse 19716 // or promote products derived from this software without specific prior 19717 // written permission. 19718 // 19719 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19720 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19721 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19722 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19723 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19724 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19725 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19726 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19727 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19728 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19729 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19730 // 19731 // --------------------------------------------------------------------------- 19732 // 19733 // This file was generated by the CEF translator tool and should not edited 19734 // by hand. See the translator.README.txt file in the tools directory for 19735 // more information. 19736 // 19737 // $hash=b038ad859f1dad2d8ba63589da118898350b309c$ 19738 // 19739 19740 extern (C): 19741 19742 /// 19743 /// Structure used to make a URL request. URL requests are not associated with a 19744 /// browser instance so no cef_client_t callbacks will be executed. URL requests 19745 /// can be created on any valid CEF thread in either the browser or render 19746 /// process. Once created the functions of the URL request object must be 19747 /// accessed on the same thread that created it. 19748 /// 19749 struct cef_urlrequest_t 19750 { 19751 /// 19752 /// Base structure. 19753 /// 19754 19755 /// 19756 /// Returns the request object used to create this URL request. The returned 19757 /// object is read-only and should not be modified. 19758 /// 19759 g 19760 cef_base_ref_counted_t base; 19761 extern(System) cef_request_t* function (cef_urlrequest_t* self) nothrow get_request; 19762 /// 19763 /// Returns the client. 19764 /// 19765 extern(System) cef_urlrequest_client_t* function (cef_urlrequest_t* self) nothrow get_client; 19766 19767 /// 19768 /// Returns the request status. 19769 /// 19770 extern(System) cef_urlrequest_status_t function ( 19771 cef_urlrequest_t* self) nothrow get_request_status; 19772 19773 /// 19774 /// Returns the request error if status is UR_CANCELED or UR_FAILED, or 0 19775 /// otherwise. 19776 /// 19777 extern(System) cef_errorcode_t function (cef_urlrequest_t* self) nothrow get_request_error; 19778 19779 /// 19780 /// Returns the response, or NULL if no response information is available. 19781 /// Response information will only be available after the upload has 19782 /// completed. The returned object is read-only and should not be modified. 19783 /// 19784 extern(System) cef_response_t* function (cef_urlrequest_t* self) nothrow get_response; 19785 19786 /// 19787 /// Returns true (1) if the response body was served from the cache. This 19788 /// includes responses for which revalidation was required. 19789 /// 19790 extern(System) int function (cef_urlrequest_t* self) nothrow response_was_cached; 19791 19792 /// 19793 /// Cancel the request. 19794 /// 19795 extern(System) void function (cef_urlrequest_t* self) nothrow cancel; 19796 } 19797 19798 19799 19800 /// 19801 /// Create a new URL request that is not associated with a specific browser or 19802 /// frame. Use cef_frame_t::CreateURLRequest instead if you want the request to 19803 /// have this association, in which case it may be handled differently (see 19804 /// documentation on that function). A request created with this function may 19805 /// only originate from the browser process, and will behave as follows: 19806 /// - It may be intercepted by the client via CefResourceRequestHandler or 19807 /// CefSchemeHandlerFactory. 19808 /// - POST data may only contain only a single element of type PDE_TYPE_FILE 19809 /// or PDE_TYPE_BYTES. 19810 /// - If |request_context| is empty the global request context will be used. 19811 /// 19812 /// The |request| object will be marked as read-only after calling this 19813 /// function. 19814 /// 19815 cef_urlrequest_t* cef_urlrequest_create ( 19816 cef_request_t* request, 19817 cef_urlrequest_client_t* client, 19818 cef_request_context_t* request_context); 19819 19820 /// 19821 /// Structure that should be implemented by the cef_urlrequest_t client. The 19822 /// functions of this structure will be called on the same thread that created 19823 /// the request unless otherwise documented. 19824 /// 19825 struct cef_urlrequest_client_t 19826 { 19827 /// 19828 /// Base structure. 19829 /// 19830 cef_base_ref_counted_t base; 19831 19832 /// 19833 /// Notifies the client that the request has completed. Use the 19834 /// cef_urlrequest_t::GetRequestStatus function to determine if the request 19835 /// was successful or not. 19836 /// 19837 extern(System) void function ( 19838 cef_urlrequest_client_t* self, 19839 cef_urlrequest_t* request) nothrow on_request_complete; 19840 19841 /// 19842 /// Notifies the client of upload progress. |current| denotes the number of 19843 /// bytes sent so far and |total| is the total size of uploading data (or -1 19844 /// if chunked upload is enabled). This function will only be called if the 19845 /// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request. 19846 /// 19847 extern(System) void function ( 19848 cef_urlrequest_client_t* self, 19849 cef_urlrequest_t* request, 19850 long current, 19851 long total) nothrow on_upload_progress; 19852 19853 /// 19854 /// Notifies the client of download progress. |current| denotes the number of 19855 /// bytes received up to the call and |total| is the expected total size of 19856 /// the response (or -1 if not determined). 19857 /// 19858 extern(System) void function ( 19859 cef_urlrequest_client_t* self, 19860 cef_urlrequest_t* request, 19861 long current, 19862 long total) nothrow on_download_progress; 19863 19864 /// 19865 /// Called when some part of the response is read. |data| contains the current 19866 /// bytes received since the last call. This function will not be called if 19867 /// the UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. 19868 /// 19869 extern(System) void function ( 19870 cef_urlrequest_client_t* self, 19871 cef_urlrequest_t* request, 19872 const(void)* data, 19873 size_t data_length) nothrow on_download_data; 19874 19875 /// 19876 /// Called on the IO thread when the browser needs credentials from the user. 19877 /// |isProxy| indicates whether the host is a proxy server. |host| contains 19878 /// the hostname and |port| contains the port number. Return true (1) to 19879 /// continue the request and call cef_auth_callback_t::cont() when the 19880 /// authentication information is available. If the request has an associated 19881 /// browser/frame then returning false (0) will result in a call to 19882 /// GetAuthCredentials on the cef_request_handler_t associated with that 19883 /// browser, if any. Otherwise, returning false (0) will cancel the request 19884 /// immediately. This function will only be called for requests initiated from 19885 /// the browser process. 19886 /// 19887 extern(System) int function ( 19888 cef_urlrequest_client_t* self, 19889 int isProxy, 19890 const(cef_string_t)* host, 19891 int port, 19892 const(cef_string_t)* realm, 19893 const(cef_string_t)* scheme, 19894 cef_auth_callback_t* callback) nothrow get_auth_credentials; 19895 } 19896 19897 19898 19899 // CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ 19900 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 19901 // 19902 // Redistribution and use in source and binary forms, with or without 19903 // modification, are permitted provided that the following conditions are 19904 // met: 19905 // 19906 // * Redistributions of source code must retain the above copyright 19907 // notice, this list of conditions and the following disclaimer. 19908 // * Redistributions in binary form must reproduce the above 19909 // copyright notice, this list of conditions and the following disclaimer 19910 // in the documentation and/or other materials provided with the 19911 // distribution. 19912 // * Neither the name of Google Inc. nor the name Chromium Embedded 19913 // Framework nor the names of its contributors may be used to endorse 19914 // or promote products derived from this software without specific prior 19915 // written permission. 19916 // 19917 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19918 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19919 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19920 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19921 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19922 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19923 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19924 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19925 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 19926 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19927 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19928 // 19929 // --------------------------------------------------------------------------- 19930 // 19931 // This file was generated by the CEF translator tool and should not edited 19932 // by hand. See the translator.README.txt file in the tools directory for 19933 // more information. 19934 // 19935 // $hash=865ca5bff4a0867d0c25cb41bd2aa808cf3fddbd$ 19936 // 19937 19938 extern (C): 19939 19940 /// 19941 /// Structure representing a V8 context handle. V8 handles can only be accessed 19942 /// from the thread on which they are created. Valid threads for creating a V8 19943 /// handle include the render process main thread (TID_RENDERER) and WebWorker 19944 /// threads. A task runner for posting tasks on the associated thread can be 19945 /// retrieved via the cef_v8context_t::get_task_runner() function. 19946 /// 19947 struct cef_v8context_t 19948 { 19949 /// 19950 /// Base structure. 19951 /// 19952 19953 /// 19954 /// Returns the task runner associated with this context. V8 handles can only 19955 /// be accessed from the thread on which they are created. This function can 19956 /// be called on any render process thread. 19957 g 19958 cef_base_ref_counted_t base; 19959 /// 19960 extern(System) cef_task_runner_t* function (cef_v8context_t* self) nothrow get_task_runner; 19961 19962 /// 19963 /// Returns true (1) if the underlying handle is valid and it can be accessed 19964 /// on the current thread. Do not call any other functions if this function 19965 /// returns false (0). 19966 /// 19967 extern(System) int function (cef_v8context_t* self) nothrow is_valid; 19968 19969 /// 19970 /// Returns the browser for this context. This function will return an NULL 19971 /// reference for WebWorker contexts. 19972 /// 19973 extern(System) cef_browser_t* function (cef_v8context_t* self) nothrow get_browser; 19974 19975 /// 19976 /// Returns the frame for this context. This function will return an NULL 19977 /// reference for WebWorker contexts. 19978 /// 19979 extern(System) cef_frame_t* function (cef_v8context_t* self) nothrow get_frame; 19980 19981 /// 19982 /// Returns the global object for this context. The context must be entered 19983 /// before calling this function. 19984 /// 19985 extern(System) cef_v8value_t* function (cef_v8context_t* self) nothrow get_global; 19986 19987 /// 19988 /// Enter this context. A context must be explicitly entered before creating a 19989 /// V8 Object, Array, Function or Date asynchronously. exit() must be called 19990 /// the same number of times as enter() before releasing this context. V8 19991 /// objects belong to the context in which they are created. Returns true (1) 19992 /// if the scope was entered successfully. 19993 /// 19994 extern(System) int function (cef_v8context_t* self) nothrow enter; 19995 19996 /// 19997 /// Exit this context. Call this function only after calling enter(). Returns 19998 /// true (1) if the scope was exited successfully. 19999 /// 20000 extern(System) int function (cef_v8context_t* self) nothrow exit; 20001 20002 /// 20003 /// Returns true (1) if this object is pointing to the same handle as |that| 20004 /// object. 20005 /// 20006 extern(System) int function (cef_v8context_t* self, cef_v8context_t* that) nothrow is_same; 20007 20008 /// 20009 /// Execute a string of JavaScript code in this V8 context. The |script_url| 20010 /// parameter is the URL where the script in question can be found, if any. 20011 /// The |start_line| parameter is the base line number to use for error 20012 /// reporting. On success |retval| will be set to the return value, if any, 20013 /// and the function will return true (1). On failure |exception| will be set 20014 /// to the exception, if any, and the function will return false (0). 20015 /// 20016 extern(System) int function ( 20017 cef_v8context_t* self, 20018 const(cef_string_t)* code, 20019 const(cef_string_t)* script_url, 20020 int start_line, 20021 cef_v8value_t** retval, 20022 cef_v8exception_t** exception) nothrow eval; 20023 } 20024 20025 20026 20027 /// 20028 /// Returns the current (top) context object in the V8 context stack. 20029 /// 20030 cef_v8context_t* cef_v8context_get_current_context (); 20031 20032 /// 20033 /// Returns the entered (bottom) context object in the V8 context stack. 20034 /// 20035 cef_v8context_t* cef_v8context_get_entered_context (); 20036 20037 /// 20038 /// Returns true (1) if V8 is currently inside a context. 20039 /// 20040 int cef_v8context_in_context (); 20041 20042 /// 20043 /// Structure that should be implemented to handle V8 function calls. The 20044 /// functions of this structure will be called on the thread associated with the 20045 /// V8 function. 20046 /// 20047 struct cef_v8handler_t 20048 { 20049 /// 20050 /// Base structure. 20051 /// 20052 cef_base_ref_counted_t base; 20053 20054 /// 20055 /// Handle execution of the function identified by |name|. |object| is the 20056 /// receiver ('this' object) of the function. |arguments| is the list of 20057 /// arguments passed to the function. If execution succeeds set |retval| to 20058 /// the function return value. If execution fails set |exception| to the 20059 /// exception that will be thrown. Return true (1) if execution was handled. 20060 /// 20061 extern(System) int function ( 20062 cef_v8handler_t* self, 20063 const(cef_string_t)* name, 20064 cef_v8value_t* object, 20065 size_t argumentsCount, 20066 cef_v8value_t** arguments, 20067 cef_v8value_t** retval, 20068 cef_string_t* exception) nothrow execute; 20069 } 20070 20071 20072 20073 /// 20074 /// Structure that should be implemented to handle V8 accessor calls. Accessor 20075 /// identifiers are registered by calling cef_v8value_t::set_value(). The 20076 /// functions of this structure will be called on the thread associated with the 20077 /// V8 accessor. 20078 /// 20079 struct cef_v8accessor_t 20080 { 20081 /// 20082 /// Base structure. 20083 /// 20084 cef_base_ref_counted_t base; 20085 20086 /// 20087 /// Handle retrieval the accessor value identified by |name|. |object| is the 20088 /// receiver ('this' object) of the accessor. If retrieval succeeds set 20089 /// |retval| to the return value. If retrieval fails set |exception| to the 20090 /// exception that will be thrown. Return true (1) if accessor retrieval was 20091 /// handled. 20092 /// 20093 extern(System) int function ( 20094 cef_v8accessor_t* self, 20095 const(cef_string_t)* name, 20096 cef_v8value_t* object, 20097 cef_v8value_t** retval, 20098 cef_string_t* exception) nothrow get; 20099 20100 /// 20101 /// Handle assignment of the accessor value identified by |name|. |object| is 20102 /// the receiver ('this' object) of the accessor. |value| is the new value 20103 /// being assigned to the accessor. If assignment fails set |exception| to the 20104 /// exception that will be thrown. Return true (1) if accessor assignment was 20105 /// handled. 20106 /// 20107 extern(System) int function ( 20108 cef_v8accessor_t* self, 20109 const(cef_string_t)* name, 20110 cef_v8value_t* object, 20111 cef_v8value_t* value, 20112 cef_string_t* exception) nothrow set; 20113 } 20114 20115 20116 20117 /// 20118 /// Structure that should be implemented to handle V8 interceptor calls. The 20119 /// functions of this structure will be called on the thread associated with the 20120 /// V8 interceptor. Interceptor's named property handlers (with first argument 20121 /// of type CefString) are called when object is indexed by string. Indexed 20122 /// property handlers (with first argument of type int) are called when object 20123 /// is indexed by integer. 20124 /// 20125 struct cef_v8interceptor_t 20126 { 20127 /// 20128 /// Base structure. 20129 /// 20130 cef_base_ref_counted_t base; 20131 20132 /// 20133 /// Handle retrieval of the interceptor value identified by |name|. |object| 20134 /// is the receiver ('this' object) of the interceptor. If retrieval succeeds, 20135 /// set |retval| to the return value. If the requested value does not exist, 20136 /// don't set either |retval| or |exception|. If retrieval fails, set 20137 /// |exception| to the exception that will be thrown. If the property has an 20138 /// associated accessor, it will be called only if you don't set |retval|. 20139 /// Return true (1) if interceptor retrieval was handled, false (0) otherwise. 20140 /// 20141 extern(System) int function ( 20142 cef_v8interceptor_t* self, 20143 const(cef_string_t)* name, 20144 cef_v8value_t* object, 20145 cef_v8value_t** retval, 20146 cef_string_t* exception) nothrow get_byname; 20147 20148 /// 20149 /// Handle retrieval of the interceptor value identified by |index|. |object| 20150 /// is the receiver ('this' object) of the interceptor. If retrieval succeeds, 20151 /// set |retval| to the return value. If the requested value does not exist, 20152 /// don't set either |retval| or |exception|. If retrieval fails, set 20153 /// |exception| to the exception that will be thrown. Return true (1) if 20154 /// interceptor retrieval was handled, false (0) otherwise. 20155 /// 20156 extern(System) int function ( 20157 cef_v8interceptor_t* self, 20158 int index, 20159 cef_v8value_t* object, 20160 cef_v8value_t** retval, 20161 cef_string_t* exception) nothrow get_byindex; 20162 20163 /// 20164 /// Handle assignment of the interceptor value identified by |name|. |object| 20165 /// is the receiver ('this' object) of the interceptor. |value| is the new 20166 /// value being assigned to the interceptor. If assignment fails, set 20167 /// |exception| to the exception that will be thrown. This setter will always 20168 /// be called, even when the property has an associated accessor. Return true 20169 /// (1) if interceptor assignment was handled, false (0) otherwise. 20170 /// 20171 extern(System) int function ( 20172 cef_v8interceptor_t* self, 20173 const(cef_string_t)* name, 20174 cef_v8value_t* object, 20175 cef_v8value_t* value, 20176 cef_string_t* exception) nothrow set_byname; 20177 20178 /// 20179 /// Handle assignment of the interceptor value identified by |index|. |object| 20180 /// is the receiver ('this' object) of the interceptor. |value| is the new 20181 /// value being assigned to the interceptor. If assignment fails, set 20182 /// |exception| to the exception that will be thrown. Return true (1) if 20183 /// interceptor assignment was handled, false (0) otherwise. 20184 /// 20185 extern(System) int function ( 20186 cef_v8interceptor_t* self, 20187 int index, 20188 cef_v8value_t* object, 20189 cef_v8value_t* value, 20190 cef_string_t* exception) nothrow set_byindex; 20191 } 20192 20193 20194 20195 /// 20196 /// Structure representing a V8 exception. The functions of this structure may 20197 /// be called on any render process thread. 20198 /// 20199 struct cef_v8exception_t 20200 { 20201 /// 20202 /// Base structure. 20203 /// 20204 cef_base_ref_counted_t base; 20205 20206 /// 20207 /// Returns the exception message. 20208 /// 20209 // The resulting string must be freed by calling cef_string_userfree_free(). 20210 extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_message; 20211 20212 /// 20213 /// Returns the line of source code that the exception occurred within. 20214 /// 20215 // The resulting string must be freed by calling cef_string_userfree_free(). 20216 extern(System) cef_string_userfree_t function (cef_v8exception_t* self) nothrow get_source_line; 20217 20218 /// 20219 /// Returns the resource name for the script from where the function causing 20220 /// the error originates. 20221 /// 20222 // The resulting string must be freed by calling cef_string_userfree_free(). 20223 extern(System) cef_string_userfree_t function ( 20224 cef_v8exception_t* self) nothrow get_script_resource_name; 20225 20226 /// 20227 /// Returns the 1-based number of the line where the error occurred or 0 if 20228 /// the line number is unknown. 20229 /// 20230 extern(System) int function (cef_v8exception_t* self) nothrow get_line_number; 20231 20232 /// 20233 /// Returns the index within the script of the first character where the error 20234 /// occurred. 20235 /// 20236 extern(System) int function (cef_v8exception_t* self) nothrow get_start_position; 20237 20238 /// 20239 /// Returns the index within the script of the last character where the error 20240 /// occurred. 20241 /// 20242 extern(System) int function (cef_v8exception_t* self) nothrow get_end_position; 20243 20244 /// 20245 /// Returns the index within the line of the first character where the error 20246 /// occurred. 20247 /// 20248 extern(System) int function (cef_v8exception_t* self) nothrow get_start_column; 20249 20250 /// 20251 /// Returns the index within the line of the last character where the error 20252 /// occurred. 20253 /// 20254 extern(System) int function (cef_v8exception_t* self) nothrow get_end_column; 20255 } 20256 20257 20258 20259 /// 20260 /// Callback structure that is passed to cef_v8value_t::CreateArrayBuffer. 20261 /// 20262 struct cef_v8array_buffer_release_callback_t 20263 { 20264 /// 20265 /// Base structure. 20266 /// 20267 cef_base_ref_counted_t base; 20268 20269 /// 20270 /// Called to release |buffer| when the ArrayBuffer JS object is garbage 20271 /// collected. |buffer| is the value that was passed to CreateArrayBuffer 20272 /// along with this object. 20273 /// 20274 extern(System) void function ( 20275 cef_v8array_buffer_release_callback_t* self, 20276 void* buffer) nothrow release_buffer; 20277 } 20278 20279 20280 20281 /// 20282 /// Structure representing a V8 value handle. V8 handles can only be accessed 20283 /// from the thread on which they are created. Valid threads for creating a V8 20284 /// handle include the render process main thread (TID_RENDERER) and WebWorker 20285 /// threads. A task runner for posting tasks on the associated thread can be 20286 /// retrieved via the cef_v8context_t::get_task_runner() function. 20287 /// 20288 struct cef_v8value_t 20289 { 20290 /// 20291 /// Base structure. 20292 /// 20293 cef_base_ref_counted_t base; 20294 20295 /// 20296 /// Returns true (1) if the underlying handle is valid and it can be accessed 20297 /// on the current thread. Do not call any other functions if this function 20298 /// returns false (0). 20299 /// 20300 extern(System) int function (cef_v8value_t* self) nothrow is_valid; 20301 20302 /// 20303 /// True if the value type is undefined. 20304 /// 20305 extern(System) int function (cef_v8value_t* self) nothrow is_undefined; 20306 20307 /// 20308 /// True if the value type is null. 20309 /// 20310 extern(System) int function (cef_v8value_t* self) nothrow is_null; 20311 20312 /// 20313 /// True if the value type is bool. 20314 /// 20315 extern(System) int function (cef_v8value_t* self) nothrow is_bool; 20316 20317 /// 20318 /// True if the value type is int. 20319 /// 20320 extern(System) int function (cef_v8value_t* self) nothrow is_int; 20321 20322 /// 20323 /// True if the value type is unsigned int. 20324 /// 20325 extern(System) int function (cef_v8value_t* self) nothrow is_uint; 20326 20327 /// 20328 /// True if the value type is double. 20329 /// 20330 extern(System) int function (cef_v8value_t* self) nothrow is_double; 20331 20332 /// 20333 /// True if the value type is Date. 20334 /// 20335 extern(System) int function (cef_v8value_t* self) nothrow is_date; 20336 20337 /// 20338 /// True if the value type is string. 20339 /// 20340 extern(System) int function (cef_v8value_t* self) nothrow is_string; 20341 20342 /// 20343 /// True if the value type is object. 20344 /// 20345 extern(System) int function (cef_v8value_t* self) nothrow is_object; 20346 20347 /// 20348 /// True if the value type is array. 20349 /// 20350 extern(System) int function (cef_v8value_t* self) nothrow is_array; 20351 20352 /// 20353 /// True if the value type is an ArrayBuffer. 20354 /// 20355 extern(System) int function (cef_v8value_t* self) nothrow is_array_buffer; 20356 20357 /// 20358 /// True if the value type is function. 20359 /// 20360 extern(System) int function (cef_v8value_t* self) nothrow is_function; 20361 20362 /// 20363 /// True if the value type is a Promise. 20364 /// 20365 extern(System) int function (cef_v8value_t* self) nothrow is_promise; 20366 20367 /// 20368 /// Returns true (1) if this object is pointing to the same handle as |that| 20369 /// object. 20370 /// 20371 extern(System) int function (cef_v8value_t* self, cef_v8value_t* that) nothrow is_same; 20372 20373 /// 20374 /// Return a bool value. 20375 /// 20376 extern(System) int function (cef_v8value_t* self) nothrow get_bool_value; 20377 20378 /// 20379 /// Return an int value. 20380 /// 20381 extern(System) int function (cef_v8value_t* self) nothrow get_int_value; 20382 20383 /// 20384 /// Return an unsigned int value. 20385 /// 20386 extern(System) uint function (cef_v8value_t* self) nothrow get_uint_value; 20387 20388 /// 20389 /// Return a double value. 20390 /// 20391 extern(System) double function (cef_v8value_t* self) nothrow get_double_value; 20392 20393 /// 20394 /// Return a Date value. 20395 /// 20396 extern(System) cef_basetime_t function (cef_v8value_t* self) nothrow get_date_value; 20397 20398 /// 20399 /// Return a string value. 20400 /// 20401 // The resulting string must be freed by calling cef_string_userfree_free(). 20402 extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_string_value; 20403 20404 /// 20405 /// Returns true (1) if this is a user created object. 20406 /// 20407 extern(System) int function (cef_v8value_t* self) nothrow is_user_created; 20408 20409 /// 20410 /// Returns true (1) if the last function call resulted in an exception. This 20411 /// attribute exists only in the scope of the current CEF value object. 20412 /// 20413 extern(System) int function (cef_v8value_t* self) nothrow has_exception; 20414 20415 /// 20416 /// Returns the exception resulting from the last function call. This 20417 /// attribute exists only in the scope of the current CEF value object. 20418 /// 20419 extern(System) cef_v8exception_t* function (cef_v8value_t* self) nothrow get_exception; 20420 20421 /// 20422 /// Clears the last exception and returns true (1) on success. 20423 /// 20424 extern(System) int function (cef_v8value_t* self) nothrow clear_exception; 20425 20426 /// 20427 /// Returns true (1) if this object will re-throw future exceptions. This 20428 /// attribute exists only in the scope of the current CEF value object. 20429 /// 20430 extern(System) int function (cef_v8value_t* self) nothrow will_rethrow_exceptions; 20431 20432 /// 20433 /// Set whether this object will re-throw future exceptions. By default 20434 /// exceptions are not re-thrown. If a exception is re-thrown the current 20435 /// context should not be accessed again until after the exception has been 20436 /// caught and not re-thrown. Returns true (1) on success. This attribute 20437 /// exists only in the scope of the current CEF value object. 20438 /// 20439 extern(System) int function (cef_v8value_t* self, int rethrow) nothrow set_rethrow_exceptions; 20440 20441 /// 20442 /// Returns true (1) if the object has a value with the specified identifier. 20443 /// 20444 extern(System) int function ( 20445 cef_v8value_t* self, 20446 const(cef_string_t)* key) nothrow has_value_bykey; 20447 20448 /// 20449 /// Returns true (1) if the object has a value with the specified identifier. 20450 /// 20451 extern(System) int function (cef_v8value_t* self, int index) nothrow has_value_byindex; 20452 20453 /// 20454 /// Deletes the value with the specified identifier and returns true (1) on 20455 /// success. Returns false (0) if this function is called incorrectly or an 20456 /// exception is thrown. For read-only and don't-delete values this function 20457 /// will return true (1) even though deletion failed. 20458 /// 20459 extern(System) int function ( 20460 cef_v8value_t* self, 20461 const(cef_string_t)* key) nothrow delete_value_bykey; 20462 20463 /// 20464 /// Deletes the value with the specified identifier and returns true (1) on 20465 /// success. Returns false (0) if this function is called incorrectly, 20466 /// deletion fails or an exception is thrown. For read-only and don't-delete 20467 /// values this function will return true (1) even though deletion failed. 20468 /// 20469 extern(System) int function (cef_v8value_t* self, int index) nothrow delete_value_byindex; 20470 20471 /// 20472 /// Returns the value with the specified identifier on success. Returns NULL 20473 /// if this function is called incorrectly or an exception is thrown. 20474 /// 20475 extern(System) cef_v8value_t* function ( 20476 cef_v8value_t* self, 20477 const(cef_string_t)* key) nothrow get_value_bykey; 20478 20479 /// 20480 /// Returns the value with the specified identifier on success. Returns NULL 20481 /// if this function is called incorrectly or an exception is thrown. 20482 /// 20483 extern(System) cef_v8value_t* function ( 20484 cef_v8value_t* self, 20485 int index) nothrow get_value_byindex; 20486 20487 /// 20488 /// Associates a value with the specified identifier and returns true (1) on 20489 /// success. Returns false (0) if this function is called incorrectly or an 20490 /// exception is thrown. For read-only values this function will return true 20491 /// (1) even though assignment failed. 20492 /// 20493 extern(System) int function ( 20494 cef_v8value_t* self, 20495 const(cef_string_t)* key, 20496 cef_v8value_t* value, 20497 cef_v8_propertyattribute_t attribute) nothrow set_value_bykey; 20498 20499 /// 20500 /// Associates a value with the specified identifier and returns true (1) on 20501 /// success. Returns false (0) if this function is called incorrectly or an 20502 /// exception is thrown. For read-only values this function will return true 20503 /// (1) even though assignment failed. 20504 /// 20505 extern(System) int function ( 20506 cef_v8value_t* self, 20507 int index, 20508 cef_v8value_t* value) nothrow set_value_byindex; 20509 20510 /// 20511 /// Registers an identifier and returns true (1) on success. Access to the 20512 /// identifier will be forwarded to the cef_v8accessor_t instance passed to 20513 /// cef_v8value_t::cef_v8value_create_object(). Returns false (0) if this 20514 /// function is called incorrectly or an exception is thrown. For read-only 20515 /// values this function will return true (1) even though assignment failed. 20516 /// 20517 extern(System) int function ( 20518 cef_v8value_t* self, 20519 const(cef_string_t)* key, 20520 cef_v8_accesscontrol_t settings, 20521 cef_v8_propertyattribute_t attribute) nothrow set_value_byaccessor; 20522 20523 /// 20524 /// Read the keys for the object's values into the specified vector. Integer- 20525 /// based keys will also be returned as strings. 20526 /// 20527 extern(System) int function (cef_v8value_t* self, cef_string_list_t keys) nothrow get_keys; 20528 20529 /// 20530 /// Sets the user data for this object and returns true (1) on success. 20531 /// Returns false (0) if this function is called incorrectly. This function 20532 /// can only be called on user created objects. 20533 /// 20534 extern(System) int function ( 20535 cef_v8value_t* self, 20536 cef_base_ref_counted_t* user_data) nothrow set_user_data; 20537 20538 /// 20539 /// Returns the user data, if any, assigned to this object. 20540 /// 20541 extern(System) cef_base_ref_counted_t* function (cef_v8value_t* self) nothrow get_user_data; 20542 20543 /// 20544 /// Returns the amount of externally allocated memory registered for the 20545 /// object. 20546 /// 20547 extern(System) int function (cef_v8value_t* self) nothrow get_externally_allocated_memory; 20548 20549 /// 20550 /// Adjusts the amount of registered external memory for the object. Used to 20551 /// give V8 an indication of the amount of externally allocated memory that is 20552 /// kept alive by JavaScript objects. V8 uses this information to decide when 20553 /// to perform global garbage collection. Each cef_v8value_t tracks the amount 20554 /// of external memory associated with it and automatically decreases the 20555 /// global total by the appropriate amount on its destruction. 20556 /// |change_in_bytes| specifies the number of bytes to adjust by. This 20557 /// function returns the number of bytes associated with the object after the 20558 /// adjustment. This function can only be called on user created objects. 20559 /// 20560 extern(System) int function ( 20561 cef_v8value_t* self, 20562 int change_in_bytes) nothrow adjust_externally_allocated_memory; 20563 20564 /// 20565 /// Returns the number of elements in the array. 20566 /// 20567 extern(System) int function (cef_v8value_t* self) nothrow get_array_length; 20568 20569 /// 20570 /// Returns the ReleaseCallback object associated with the ArrayBuffer or NULL 20571 /// if the ArrayBuffer was not created with CreateArrayBuffer. 20572 /// 20573 extern(System) cef_v8array_buffer_release_callback_t* function ( 20574 cef_v8value_t* self) nothrow get_array_buffer_release_callback; 20575 20576 /// 20577 /// Prevent the ArrayBuffer from using it's memory block by setting the length 20578 /// to zero. This operation cannot be undone. If the ArrayBuffer was created 20579 /// with CreateArrayBuffer then 20580 /// cef_v8array_buffer_release_callback_t::ReleaseBuffer will be called to 20581 /// release the underlying buffer. 20582 /// 20583 extern(System) int function (cef_v8value_t* self) nothrow neuter_array_buffer; 20584 20585 /// 20586 /// Returns the length (in bytes) of the ArrayBuffer. 20587 /// 20588 extern(System) size_t function (cef_v8value_t* self) nothrow get_array_buffer_byte_length; 20589 20590 /// 20591 /// Returns a pointer to the beginning of the memory block for this 20592 /// ArrayBuffer backing store. The returned pointer is valid as long as the 20593 /// cef_v8value_t is alive. 20594 /// 20595 extern(System) void* function (cef_v8value_t* self) nothrow get_array_buffer_data; 20596 20597 /// 20598 /// Returns the function name. 20599 /// 20600 // The resulting string must be freed by calling cef_string_userfree_free(). 20601 extern(System) cef_string_userfree_t function (cef_v8value_t* self) nothrow get_function_name; 20602 20603 /// 20604 /// Returns the function handler or NULL if not a CEF-created function. 20605 /// 20606 extern(System) cef_v8handler_t* function (cef_v8value_t* self) nothrow get_function_handler; 20607 20608 /// 20609 /// Execute the function using the current V8 context. This function should 20610 /// only be called from within the scope of a cef_v8handler_t or 20611 /// cef_v8accessor_t callback, or in combination with calling enter() and 20612 /// exit() on a stored cef_v8context_t reference. |object| is the receiver 20613 /// ('this' object) of the function. If |object| is NULL the current context's 20614 /// global object will be used. |arguments| is the list of arguments that will 20615 /// be passed to the function. Returns the function return value on success. 20616 /// Returns NULL if this function is called incorrectly or an exception is 20617 /// thrown. 20618 /// 20619 extern(System) cef_v8value_t* function ( 20620 cef_v8value_t* self, 20621 cef_v8value_t* object, 20622 size_t argumentsCount, 20623 cef_v8value_t** arguments) nothrow execute_function; 20624 20625 /// 20626 /// Execute the function using the specified V8 context. |object| is the 20627 /// receiver ('this' object) of the function. If |object| is NULL the 20628 /// specified context's global object will be used. |arguments| is the list of 20629 /// arguments that will be passed to the function. Returns the function return 20630 /// value on success. Returns NULL if this function is called incorrectly or 20631 /// an exception is thrown. 20632 /// 20633 extern(System) cef_v8value_t* function ( 20634 cef_v8value_t* self, 20635 cef_v8context_t* context, 20636 cef_v8value_t* object, 20637 size_t argumentsCount, 20638 cef_v8value_t** arguments) nothrow execute_function_with_context; 20639 20640 /// 20641 /// Resolve the Promise using the current V8 context. This function should 20642 /// only be called from within the scope of a cef_v8handler_t or 20643 /// cef_v8accessor_t callback, or in combination with calling enter() and 20644 /// exit() on a stored cef_v8context_t reference. |arg| is the argument passed 20645 /// to the resolved promise. Returns true (1) on success. Returns false (0) if 20646 /// this function is called incorrectly or an exception is thrown. 20647 /// 20648 extern(System) int function (cef_v8value_t* self, cef_v8value_t* arg) nothrow resolve_promise; 20649 20650 /// 20651 /// Reject the Promise using the current V8 context. This function should only 20652 /// be called from within the scope of a cef_v8handler_t or cef_v8accessor_t 20653 /// callback, or in combination with calling enter() and exit() on a stored 20654 /// cef_v8context_t reference. Returns true (1) on success. Returns false (0) 20655 /// if this function is called incorrectly or an exception is thrown. 20656 /// 20657 extern(System) int function ( 20658 cef_v8value_t* self, 20659 const(cef_string_t)* errorMsg) nothrow reject_promise; 20660 } 20661 20662 20663 20664 /// 20665 /// Create a new cef_v8value_t object of type undefined. 20666 /// 20667 cef_v8value_t* cef_v8value_create_undefined (); 20668 20669 /// 20670 /// Create a new cef_v8value_t object of type null. 20671 /// 20672 cef_v8value_t* cef_v8value_create_null (); 20673 20674 /// 20675 /// Create a new cef_v8value_t object of type bool. 20676 /// 20677 cef_v8value_t* cef_v8value_create_bool (int value); 20678 20679 /// 20680 /// Create a new cef_v8value_t object of type int. 20681 /// 20682 cef_v8value_t* cef_v8value_create_int (int value); 20683 20684 /// 20685 /// Create a new cef_v8value_t object of type unsigned int. 20686 /// 20687 cef_v8value_t* cef_v8value_create_uint (uint value); 20688 20689 /// 20690 /// Create a new cef_v8value_t object of type double. 20691 /// 20692 cef_v8value_t* cef_v8value_create_double (double value); 20693 20694 /// 20695 /// Create a new cef_v8value_t object of type Date. This function should only be 20696 /// called from within the scope of a cef_render_process_handler_t, 20697 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling 20698 /// enter() and exit() on a stored cef_v8context_t reference. 20699 /// 20700 cef_v8value_t* cef_v8value_create_date (cef_basetime_t date); 20701 20702 /// 20703 /// Create a new cef_v8value_t object of type string. 20704 /// 20705 cef_v8value_t* cef_v8value_create_string (const(cef_string_t)* value); 20706 20707 /// 20708 /// Create a new cef_v8value_t object of type object with optional accessor 20709 /// and/or interceptor. This function should only be called from within the 20710 /// scope of a cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t 20711 /// callback, or in combination with calling enter() and exit() on a stored 20712 /// cef_v8context_t reference. 20713 /// 20714 cef_v8value_t* cef_v8value_create_object ( 20715 cef_v8accessor_t* accessor, 20716 cef_v8interceptor_t* interceptor); 20717 20718 /// 20719 /// Create a new cef_v8value_t object of type array with the specified |length|. 20720 /// If |length| is negative the returned array will have length 0. This function 20721 /// should only be called from within the scope of a 20722 /// cef_render_process_handler_t, cef_v8handler_t or cef_v8accessor_t callback, 20723 /// or in combination with calling enter() and exit() on a stored 20724 /// cef_v8context_t reference. 20725 /// 20726 cef_v8value_t* cef_v8value_create_array (int length); 20727 20728 /// 20729 /// Create a new cef_v8value_t object of type ArrayBuffer which wraps the 20730 /// provided |buffer| of size |length| bytes. The ArrayBuffer is externalized, 20731 /// meaning that it does not own |buffer|. The caller is responsible for freeing 20732 /// |buffer| when requested via a call to 20733 /// cef_v8array_buffer_release_callback_t::ReleaseBuffer. This function should 20734 /// only be called from within the scope of a cef_render_process_handler_t, 20735 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling 20736 /// enter() and exit() on a stored cef_v8context_t reference. 20737 /// 20738 cef_v8value_t* cef_v8value_create_array_buffer ( 20739 void* buffer, 20740 size_t length, 20741 cef_v8array_buffer_release_callback_t* release_callback); 20742 20743 /// 20744 /// Create a new cef_v8value_t object of type function. This function should 20745 /// only be called from within the scope of a cef_render_process_handler_t, 20746 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling 20747 /// enter() and exit() on a stored cef_v8context_t reference. 20748 /// 20749 extern(System) cef_v8value_t* cef_v8value_create_function ( 20750 const(cef_string_t)* name, 20751 cef_v8handler_t* handler) nothrow; 20752 20753 /// 20754 /// Create a new cef_v8value_t object of type Promise. This function should only 20755 /// be called from within the scope of a cef_render_process_handler_t, 20756 /// cef_v8handler_t or cef_v8accessor_t callback, or in combination with calling 20757 /// enter() and exit() on a stored cef_v8context_t reference. 20758 /// 20759 cef_v8value_t* cef_v8value_create_promise (); 20760 20761 /// 20762 /// Structure representing a V8 stack trace handle. V8 handles can only be 20763 /// accessed from the thread on which they are created. Valid threads for 20764 /// creating a V8 handle include the render process main thread (TID_RENDERER) 20765 /// and WebWorker threads. A task runner for posting tasks on the associated 20766 /// thread can be retrieved via the cef_v8context_t::get_task_runner() function. 20767 /// 20768 struct cef_v8stack_trace_t 20769 { 20770 /// 20771 /// Base structure. 20772 /// 20773 cef_base_ref_counted_t base; 20774 20775 /// 20776 /// Returns true (1) if the underlying handle is valid and it can be accessed 20777 /// on the current thread. Do not call any other functions if this function 20778 /// returns false (0). 20779 /// 20780 extern(System) int function (cef_v8stack_trace_t* self) nothrow is_valid; 20781 20782 /// 20783 /// Returns the number of stack frames. 20784 /// 20785 extern(System) int function (cef_v8stack_trace_t* self) nothrow get_frame_count; 20786 20787 /// 20788 /// Returns the stack frame at the specified 0-based index. 20789 /// 20790 extern(System) cef_v8stack_frame_t* function ( 20791 cef_v8stack_trace_t* self, 20792 int index) nothrow get_frame; 20793 } 20794 20795 20796 20797 /// 20798 /// Returns the stack trace for the currently active context. |frame_limit| is 20799 /// the maximum number of frames that will be captured. 20800 /// 20801 cef_v8stack_trace_t* cef_v8stack_trace_get_current (int frame_limit); 20802 20803 /// 20804 /// Structure representing a V8 stack frame handle. V8 handles can only be 20805 /// accessed from the thread on which they are created. Valid threads for 20806 /// creating a V8 handle include the render process main thread (TID_RENDERER) 20807 /// and WebWorker threads. A task runner for posting tasks on the associated 20808 /// thread can be retrieved via the cef_v8context_t::get_task_runner() function. 20809 /// 20810 struct cef_v8stack_frame_t 20811 { 20812 /// 20813 /// Base structure. 20814 /// 20815 cef_base_ref_counted_t base; 20816 20817 /// 20818 /// Returns true (1) if the underlying handle is valid and it can be accessed 20819 /// on the current thread. Do not call any other functions if this function 20820 /// returns false (0). 20821 /// 20822 extern(System) int function (cef_v8stack_frame_t* self) nothrow is_valid; 20823 20824 /// 20825 /// Returns the name of the resource script that contains the function. 20826 /// 20827 // The resulting string must be freed by calling cef_string_userfree_free(). 20828 extern(System) cef_string_userfree_t function ( 20829 cef_v8stack_frame_t* self) nothrow get_script_name; 20830 20831 /// 20832 /// Returns the name of the resource script that contains the function or the 20833 /// sourceURL value if the script name is undefined and its source ends with a 20834 /// "//@ sourceURL=..." string. 20835 /// 20836 // The resulting string must be freed by calling cef_string_userfree_free(). 20837 extern(System) cef_string_userfree_t function ( 20838 cef_v8stack_frame_t* self) nothrow get_script_name_or_source_url; 20839 20840 /// 20841 /// Returns the name of the function. 20842 /// 20843 // The resulting string must be freed by calling cef_string_userfree_free(). 20844 extern(System) cef_string_userfree_t function ( 20845 cef_v8stack_frame_t* self) nothrow get_function_name; 20846 20847 /// 20848 /// Returns the 1-based line number for the function call or 0 if unknown. 20849 /// 20850 extern(System) int function (cef_v8stack_frame_t* self) nothrow get_line_number; 20851 20852 /// 20853 /// Returns the 1-based column offset on the line for the function call or 0 20854 /// if unknown. 20855 /// 20856 extern(System) int function (cef_v8stack_frame_t* self) nothrow get_column; 20857 20858 /// 20859 /// Returns true (1) if the function was compiled using eval(). 20860 /// 20861 extern(System) int function (cef_v8stack_frame_t* self) nothrow is_eval; 20862 20863 /// 20864 /// Returns true (1) if the function was called as a constructor via "new". 20865 /// 20866 extern(System) int function (cef_v8stack_frame_t* self) nothrow is_constructor; 20867 } 20868 20869 20870 20871 /// 20872 /// Register a new V8 extension with the specified JavaScript extension code and 20873 /// handler. Functions implemented by the handler are prototyped using the 20874 /// keyword 'native'. The calling of a native function is restricted to the 20875 /// scope in which the prototype of the native function is defined. This 20876 /// function may only be called on the render process main thread. 20877 /// 20878 /// Example JavaScript extension code: <pre> 20879 /// // create the 'example' global object if it doesn't already exist. 20880 /// if (!example) 20881 /// example = {}; 20882 /// // create the 'example.test' global object if it doesn't already exist. 20883 /// if (!example.test) 20884 /// example.test = {}; 20885 /// (function() { 20886 /// // Define the function 'example.test.myfunction'. 20887 /// example.test.myfunction = function() { 20888 /// // Call CefV8Handler::Execute() with the function name 'MyFunction' 20889 /// // and no arguments. 20890 /// native function MyFunction(); 20891 /// return MyFunction(); 20892 /// }; 20893 /// // Define the getter function for parameter 'example.test.myparam'. 20894 /// example.test.__defineGetter__('myparam', function() { 20895 /// // Call CefV8Handler::Execute() with the function name 'GetMyParam' 20896 /// // and no arguments. 20897 /// native function GetMyParam(); 20898 /// return GetMyParam(); 20899 /// }); 20900 /// // Define the setter function for parameter 'example.test.myparam'. 20901 /// example.test.__defineSetter__('myparam', function(b) { 20902 /// // Call CefV8Handler::Execute() with the function name 'SetMyParam' 20903 /// // and a single argument. 20904 /// native function SetMyParam(); 20905 /// if(b) SetMyParam(b); 20906 /// }); 20907 /// 20908 /// // Extension definitions can also contain normal JavaScript variables 20909 /// // and functions. 20910 /// var myint = 0; 20911 /// example.test.increment = function() { 20912 /// myint += 1; 20913 /// return myint; 20914 /// }; 20915 /// })(); 20916 /// </pre> 20917 /// 20918 /// Example usage in the page: <pre> 20919 /// // Call the function. 20920 /// example.test.myfunction(); 20921 /// // Set the parameter. 20922 /// example.test.myparam = value; 20923 /// // Get the parameter. 20924 /// value = example.test.myparam; 20925 /// // Call another function. 20926 /// example.test.increment(); 20927 /// </pre> 20928 /// 20929 int cef_register_extension ( 20930 const(cef_string_t)* extension_name, 20931 const(cef_string_t)* javascript_code, 20932 cef_v8handler_t* handler); 20933 20934 // CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ 20935 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 20936 // 20937 // Redistribution and use in source and binary forms, with or without 20938 // modification, are permitted provided that the following conditions are 20939 // met: 20940 // 20941 // * Redistributions of source code must retain the above copyright 20942 // notice, this list of conditions and the following disclaimer. 20943 // * Redistributions in binary form must reproduce the above 20944 // copyright notice, this list of conditions and the following disclaimer 20945 // in the documentation and/or other materials provided with the 20946 // distribution. 20947 // * Neither the name of Google Inc. nor the name Chromium Embedded 20948 // Framework nor the names of its contributors may be used to endorse 20949 // or promote products derived from this software without specific prior 20950 // written permission. 20951 // 20952 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20953 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20954 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20955 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20956 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20957 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20958 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20959 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20960 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20961 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 20962 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20963 // 20964 // --------------------------------------------------------------------------- 20965 // 20966 // This file was generated by the CEF translator tool and should not edited 20967 // by hand. See the translator.README.txt file in the tools directory for 20968 // more information. 20969 // 20970 // $hash=7b8fee9d4a0530782ed62f5741820708f110e24e$ 20971 // 20972 20973 extern (C): 20974 20975 /// 20976 /// Structure that wraps other data value types. Complex types (binary, 20977 /// dictionary and list) will be referenced but not owned by this object. Can be 20978 /// used on any process and thread. 20979 /// 20980 struct cef_value_t 20981 { 20982 /// 20983 /// Base structure. 20984 /// 20985 20986 /// 20987 /// Returns true (1) if the underlying data is valid. This will always be true 20988 /// (1) for simple types. For complex types (binary, dictionary and list) the 20989 /// underlying data may become invalid if owned by another object (e.g. list 20990 /// or dictionary) and that other object is then modified or destroyed. This 20991 /// value object can be re-used by calling Set*() even if the underlying data 20992 /// is invalid. 20993 /// 20994 20995 /// 20996 /// Returns true (1) if the underlying data is owned by another object. 20997 g 20998 cef_base_ref_counted_t base; 20999 extern(System) int function (cef_value_t* self) nothrow is_valid; 21000 /// 21001 extern(System) int function (cef_value_t* self) nothrow is_owned; 21002 21003 /// 21004 /// Returns true (1) if the underlying data is read-only. Some APIs may expose 21005 /// read-only objects. 21006 /// 21007 extern(System) int function (cef_value_t* self) nothrow is_read_only; 21008 21009 /// 21010 /// Returns true (1) if this object and |that| object have the same underlying 21011 /// data. If true (1) modifications to this object will also affect |that| 21012 /// object and vice-versa. 21013 /// 21014 extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_same; 21015 21016 /// 21017 /// Returns true (1) if this object and |that| object have an equivalent 21018 /// underlying value but are not necessarily the same object. 21019 /// 21020 extern(System) int function (cef_value_t* self, cef_value_t* that) nothrow is_equal; 21021 21022 /// 21023 /// Returns a copy of this object. The underlying data will also be copied. 21024 /// 21025 extern(System) cef_value_t* function (cef_value_t* self) nothrow copy; 21026 21027 /// 21028 /// Returns the underlying value type. 21029 /// 21030 extern(System) cef_value_type_t function (cef_value_t* self) nothrow get_type; 21031 21032 /// 21033 /// Returns the underlying value as type bool. 21034 /// 21035 extern(System) int function (cef_value_t* self) nothrow get_bool; 21036 21037 /// 21038 /// Returns the underlying value as type int. 21039 /// 21040 extern(System) int function (cef_value_t* self) nothrow get_int; 21041 21042 /// 21043 /// Returns the underlying value as type double. 21044 /// 21045 extern(System) double function (cef_value_t* self) nothrow get_double; 21046 21047 /// 21048 /// Returns the underlying value as type string. 21049 /// 21050 // The resulting string must be freed by calling cef_string_userfree_free(). 21051 extern(System) cef_string_userfree_t function (cef_value_t* self) nothrow get_string; 21052 21053 /// 21054 /// Returns the underlying value as type binary. The returned reference may 21055 /// become invalid if the value is owned by another object or if ownership is 21056 /// transferred to another object in the future. To maintain a reference to 21057 /// the value after assigning ownership to a dictionary or list pass this 21058 /// object to the set_value() function instead of passing the returned 21059 /// reference to set_binary(). 21060 /// 21061 extern(System) cef_binary_value_t* function (cef_value_t* self) nothrow get_binary; 21062 21063 /// 21064 /// Returns the underlying value as type dictionary. The returned reference 21065 /// may become invalid if the value is owned by another object or if ownership 21066 /// is transferred to another object in the future. To maintain a reference to 21067 /// the value after assigning ownership to a dictionary or list pass this 21068 /// object to the set_value() function instead of passing the returned 21069 /// reference to set_dictionary(). 21070 /// 21071 extern(System) cef_dictionary_value_t* function (cef_value_t* self) nothrow get_dictionary; 21072 21073 /// 21074 /// Returns the underlying value as type list. The returned reference may 21075 /// become invalid if the value is owned by another object or if ownership is 21076 /// transferred to another object in the future. To maintain a reference to 21077 /// the value after assigning ownership to a dictionary or list pass this 21078 /// object to the set_value() function instead of passing the returned 21079 /// reference to set_list(). 21080 /// 21081 extern(System) cef_list_value_t* function (cef_value_t* self) nothrow get_list; 21082 21083 /// 21084 /// Sets the underlying value as type null. Returns true (1) if the value was 21085 /// set successfully. 21086 /// 21087 extern(System) int function (cef_value_t* self) nothrow set_null; 21088 21089 /// 21090 /// Sets the underlying value as type bool. Returns true (1) if the value was 21091 /// set successfully. 21092 /// 21093 extern(System) int function (cef_value_t* self, int value) nothrow set_bool; 21094 21095 /// 21096 /// Sets the underlying value as type int. Returns true (1) if the value was 21097 /// set successfully. 21098 /// 21099 extern(System) int function (cef_value_t* self, int value) nothrow set_int; 21100 21101 /// 21102 /// Sets the underlying value as type double. Returns true (1) if the value 21103 /// was set successfully. 21104 /// 21105 extern(System) int function (cef_value_t* self, double value) nothrow set_double; 21106 21107 /// 21108 /// Sets the underlying value as type string. Returns true (1) if the value 21109 /// was set successfully. 21110 /// 21111 extern(System) int function (cef_value_t* self, const(cef_string_t)* value) nothrow set_string; 21112 21113 /// 21114 /// Sets the underlying value as type binary. Returns true (1) if the value 21115 /// was set successfully. This object keeps a reference to |value| and 21116 /// ownership of the underlying data remains unchanged. 21117 /// 21118 extern(System) int function (cef_value_t* self, cef_binary_value_t* value) nothrow set_binary; 21119 21120 /// 21121 /// Sets the underlying value as type dict. Returns true (1) if the value was 21122 /// set successfully. This object keeps a reference to |value| and ownership 21123 /// of the underlying data remains unchanged. 21124 /// 21125 extern(System) int function ( 21126 cef_value_t* self, 21127 cef_dictionary_value_t* value) nothrow set_dictionary; 21128 21129 /// 21130 /// Sets the underlying value as type list. Returns true (1) if the value was 21131 /// set successfully. This object keeps a reference to |value| and ownership 21132 /// of the underlying data remains unchanged. 21133 /// 21134 extern(System) int function (cef_value_t* self, cef_list_value_t* value) nothrow set_list; 21135 } 21136 21137 21138 21139 /// 21140 /// Creates a new object. 21141 /// 21142 cef_value_t* cef_value_create (); 21143 21144 /// 21145 /// Structure representing a binary value. Can be used on any process and 21146 /// thread. 21147 /// 21148 struct cef_binary_value_t 21149 { 21150 /// 21151 /// Base structure. 21152 /// 21153 cef_base_ref_counted_t base; 21154 21155 /// 21156 /// Returns true (1) if this object is valid. This object may become invalid 21157 /// if the underlying data is owned by another object (e.g. list or 21158 /// dictionary) and that other object is then modified or destroyed. Do not 21159 /// call any other functions if this function returns false (0). 21160 /// 21161 extern(System) int function (cef_binary_value_t* self) nothrow is_valid; 21162 21163 /// 21164 /// Returns true (1) if this object is currently owned by another object. 21165 /// 21166 extern(System) int function (cef_binary_value_t* self) nothrow is_owned; 21167 21168 /// 21169 /// Returns true (1) if this object and |that| object have the same underlying 21170 /// data. 21171 /// 21172 extern(System) int function ( 21173 cef_binary_value_t* self, 21174 cef_binary_value_t* that) nothrow is_same; 21175 21176 /// 21177 /// Returns true (1) if this object and |that| object have an equivalent 21178 /// underlying value but are not necessarily the same object. 21179 /// 21180 extern(System) int function ( 21181 cef_binary_value_t* self, 21182 cef_binary_value_t* that) nothrow is_equal; 21183 21184 /// 21185 /// Returns a copy of this object. The data in this object will also be 21186 /// copied. 21187 /// 21188 extern(System) cef_binary_value_t* function (cef_binary_value_t* self) nothrow copy; 21189 21190 /// 21191 /// Returns a pointer to the beginning of the memory block. The returned 21192 /// pointer is valid as long as the cef_binary_value_t is alive. 21193 /// 21194 extern(System) const(void)* function (cef_binary_value_t* self) nothrow get_raw_data; 21195 21196 /// 21197 /// Returns the data size. 21198 /// 21199 extern(System) size_t function (cef_binary_value_t* self) nothrow get_size; 21200 21201 /// 21202 /// Read up to |buffer_size| number of bytes into |buffer|. Reading begins at 21203 /// the specified byte |data_offset|. Returns the number of bytes read. 21204 /// 21205 extern(System) size_t function ( 21206 cef_binary_value_t* self, 21207 void* buffer, 21208 size_t buffer_size, 21209 size_t data_offset) nothrow get_data; 21210 } 21211 21212 21213 21214 /// 21215 /// Creates a new object that is not owned by any other object. The specified 21216 /// |data| will be copied. 21217 /// 21218 cef_binary_value_t* cef_binary_value_create ( 21219 const(void)* data, 21220 size_t data_size); 21221 21222 /// 21223 /// Structure representing a dictionary value. Can be used on any process and 21224 /// thread. 21225 /// 21226 struct cef_dictionary_value_t 21227 { 21228 /// 21229 /// Base structure. 21230 /// 21231 cef_base_ref_counted_t base; 21232 21233 /// 21234 /// Returns true (1) if this object is valid. This object may become invalid 21235 /// if the underlying data is owned by another object (e.g. list or 21236 /// dictionary) and that other object is then modified or destroyed. Do not 21237 /// call any other functions if this function returns false (0). 21238 /// 21239 extern(System) int function (cef_dictionary_value_t* self) nothrow is_valid; 21240 21241 /// 21242 /// Returns true (1) if this object is currently owned by another object. 21243 /// 21244 extern(System) int function (cef_dictionary_value_t* self) nothrow is_owned; 21245 21246 /// 21247 /// Returns true (1) if the values of this object are read-only. Some APIs may 21248 /// expose read-only objects. 21249 /// 21250 extern(System) int function (cef_dictionary_value_t* self) nothrow is_read_only; 21251 21252 /// 21253 /// Returns true (1) if this object and |that| object have the same underlying 21254 /// data. If true (1) modifications to this object will also affect |that| 21255 /// object and vice-versa. 21256 /// 21257 extern(System) int function ( 21258 cef_dictionary_value_t* self, 21259 cef_dictionary_value_t* that) nothrow is_same; 21260 21261 /// 21262 /// Returns true (1) if this object and |that| object have an equivalent 21263 /// underlying value but are not necessarily the same object. 21264 /// 21265 extern(System) int function ( 21266 cef_dictionary_value_t* self, 21267 cef_dictionary_value_t* that) nothrow is_equal; 21268 21269 /// 21270 /// Returns a writable copy of this object. If |exclude_NULL_children| is true 21271 /// (1) any NULL dictionaries or lists will be excluded from the copy. 21272 /// 21273 extern(System) cef_dictionary_value_t* function ( 21274 cef_dictionary_value_t* self, 21275 int exclude_empty_children) nothrow copy; 21276 21277 /// 21278 /// Returns the number of values. 21279 /// 21280 extern(System) size_t function (cef_dictionary_value_t* self) nothrow get_size; 21281 21282 /// 21283 /// Removes all values. Returns true (1) on success. 21284 /// 21285 extern(System) int function (cef_dictionary_value_t* self) nothrow clear; 21286 21287 /// 21288 /// Returns true (1) if the current dictionary has a value for the given key. 21289 /// 21290 extern(System) int function ( 21291 cef_dictionary_value_t* self, 21292 const(cef_string_t)* key) nothrow has_key; 21293 21294 /// 21295 /// Reads all keys for this dictionary into the specified vector. 21296 /// 21297 extern(System) int function ( 21298 cef_dictionary_value_t* self, 21299 cef_string_list_t keys) nothrow get_keys; 21300 21301 /// 21302 /// Removes the value at the specified key. Returns true (1) is the value was 21303 /// removed successfully. 21304 /// 21305 extern(System) int function ( 21306 cef_dictionary_value_t* self, 21307 const(cef_string_t)* key) nothrow remove; 21308 21309 /// 21310 /// Returns the value type for the specified key. 21311 /// 21312 extern(System) cef_value_type_t function ( 21313 cef_dictionary_value_t* self, 21314 const(cef_string_t)* key) nothrow get_type; 21315 21316 /// 21317 /// Returns the value at the specified key. For simple types the returned 21318 /// value will copy existing data and modifications to the value will not 21319 /// modify this object. For complex types (binary, dictionary and list) the 21320 /// returned value will reference existing data and modifications to the value 21321 /// will modify this object. 21322 /// 21323 extern(System) cef_value_t* function ( 21324 cef_dictionary_value_t* self, 21325 const(cef_string_t)* key) nothrow get_value; 21326 21327 /// 21328 /// Returns the value at the specified key as type bool. 21329 /// 21330 extern(System) int function ( 21331 cef_dictionary_value_t* self, 21332 const(cef_string_t)* key) nothrow get_bool; 21333 21334 /// 21335 /// Returns the value at the specified key as type int. 21336 /// 21337 extern(System) int function ( 21338 cef_dictionary_value_t* self, 21339 const(cef_string_t)* key) nothrow get_int; 21340 21341 /// 21342 /// Returns the value at the specified key as type double. 21343 /// 21344 extern(System) double function ( 21345 cef_dictionary_value_t* self, 21346 const(cef_string_t)* key) nothrow get_double; 21347 21348 /// 21349 /// Returns the value at the specified key as type string. 21350 /// 21351 // The resulting string must be freed by calling cef_string_userfree_free(). 21352 extern(System) cef_string_userfree_t function ( 21353 cef_dictionary_value_t* self, 21354 const(cef_string_t)* key) nothrow get_string; 21355 21356 /// 21357 /// Returns the value at the specified key as type binary. The returned value 21358 /// will reference existing data. 21359 /// 21360 extern(System) cef_binary_value_t* function ( 21361 cef_dictionary_value_t* self, 21362 const(cef_string_t)* key) nothrow get_binary; 21363 21364 /// 21365 /// Returns the value at the specified key as type dictionary. The returned 21366 /// value will reference existing data and modifications to the value will 21367 /// modify this object. 21368 /// 21369 extern(System) cef_dictionary_value_t* function ( 21370 cef_dictionary_value_t* self, 21371 const(cef_string_t)* key) nothrow get_dictionary; 21372 21373 /// 21374 /// Returns the value at the specified key as type list. The returned value 21375 /// will reference existing data and modifications to the value will modify 21376 /// this object. 21377 /// 21378 extern(System) cef_list_value_t* function ( 21379 cef_dictionary_value_t* self, 21380 const(cef_string_t)* key) nothrow get_list; 21381 21382 /// 21383 /// Sets the value at the specified key. Returns true (1) if the value was set 21384 /// successfully. If |value| represents simple data then the underlying data 21385 /// will be copied and modifications to |value| will not modify this object. 21386 /// If |value| represents complex data (binary, dictionary or list) then the 21387 /// underlying data will be referenced and modifications to |value| will 21388 /// modify this object. 21389 /// 21390 extern(System) int function ( 21391 cef_dictionary_value_t* self, 21392 const(cef_string_t)* key, 21393 cef_value_t* value) nothrow set_value; 21394 21395 /// 21396 /// Sets the value at the specified key as type null. Returns true (1) if the 21397 /// value was set successfully. 21398 /// 21399 extern(System) int function ( 21400 cef_dictionary_value_t* self, 21401 const(cef_string_t)* key) nothrow set_null; 21402 21403 /// 21404 /// Sets the value at the specified key as type bool. Returns true (1) if the 21405 /// value was set successfully. 21406 /// 21407 extern(System) int function ( 21408 cef_dictionary_value_t* self, 21409 const(cef_string_t)* key, 21410 int value) nothrow set_bool; 21411 21412 /// 21413 /// Sets the value at the specified key as type int. Returns true (1) if the 21414 /// value was set successfully. 21415 /// 21416 extern(System) int function ( 21417 cef_dictionary_value_t* self, 21418 const(cef_string_t)* key, 21419 int value) nothrow set_int; 21420 21421 /// 21422 /// Sets the value at the specified key as type double. Returns true (1) if 21423 /// the value was set successfully. 21424 /// 21425 extern(System) int function ( 21426 cef_dictionary_value_t* self, 21427 const(cef_string_t)* key, 21428 double value) nothrow set_double; 21429 21430 /// 21431 /// Sets the value at the specified key as type string. Returns true (1) if 21432 /// the value was set successfully. 21433 /// 21434 extern(System) int function ( 21435 cef_dictionary_value_t* self, 21436 const(cef_string_t)* key, 21437 const(cef_string_t)* value) nothrow set_string; 21438 21439 /// 21440 /// Sets the value at the specified key as type binary. Returns true (1) if 21441 /// the value was set successfully. If |value| is currently owned by another 21442 /// object then the value will be copied and the |value| reference will not 21443 /// change. Otherwise, ownership will be transferred to this object and the 21444 /// |value| reference will be invalidated. 21445 /// 21446 extern(System) int function ( 21447 cef_dictionary_value_t* self, 21448 const(cef_string_t)* key, 21449 cef_binary_value_t* value) nothrow set_binary; 21450 21451 /// 21452 /// Sets the value at the specified key as type dict. Returns true (1) if the 21453 /// value was set successfully. If |value| is currently owned by another 21454 /// object then the value will be copied and the |value| reference will not 21455 /// change. Otherwise, ownership will be transferred to this object and the 21456 /// |value| reference will be invalidated. 21457 /// 21458 extern(System) int function ( 21459 cef_dictionary_value_t* self, 21460 const(cef_string_t)* key, 21461 cef_dictionary_value_t* value) nothrow set_dictionary; 21462 21463 /// 21464 /// Sets the value at the specified key as type list. Returns true (1) if the 21465 /// value was set successfully. If |value| is currently owned by another 21466 /// object then the value will be copied and the |value| reference will not 21467 /// change. Otherwise, ownership will be transferred to this object and the 21468 /// |value| reference will be invalidated. 21469 /// 21470 extern(System) int function ( 21471 cef_dictionary_value_t* self, 21472 const(cef_string_t)* key, 21473 cef_list_value_t* value) nothrow set_list; 21474 } 21475 21476 21477 21478 /// 21479 /// Creates a new object that is not owned by any other object. 21480 /// 21481 cef_dictionary_value_t* cef_dictionary_value_create (); 21482 21483 /// 21484 /// Structure representing a list value. Can be used on any process and thread. 21485 /// 21486 struct cef_list_value_t 21487 { 21488 /// 21489 /// Base structure. 21490 /// 21491 cef_base_ref_counted_t base; 21492 21493 /// 21494 /// Returns true (1) if this object is valid. This object may become invalid 21495 /// if the underlying data is owned by another object (e.g. list or 21496 /// dictionary) and that other object is then modified or destroyed. Do not 21497 /// call any other functions if this function returns false (0). 21498 /// 21499 extern(System) int function (cef_list_value_t* self) nothrow is_valid; 21500 21501 /// 21502 /// Returns true (1) if this object is currently owned by another object. 21503 /// 21504 extern(System) int function (cef_list_value_t* self) nothrow is_owned; 21505 21506 /// 21507 /// Returns true (1) if the values of this object are read-only. Some APIs may 21508 /// expose read-only objects. 21509 /// 21510 extern(System) int function (cef_list_value_t* self) nothrow is_read_only; 21511 21512 /// 21513 /// Returns true (1) if this object and |that| object have the same underlying 21514 /// data. If true (1) modifications to this object will also affect |that| 21515 /// object and vice-versa. 21516 /// 21517 extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_same; 21518 21519 /// 21520 /// Returns true (1) if this object and |that| object have an equivalent 21521 /// underlying value but are not necessarily the same object. 21522 /// 21523 extern(System) int function (cef_list_value_t* self, cef_list_value_t* that) nothrow is_equal; 21524 21525 /// 21526 /// Returns a writable copy of this object. 21527 /// 21528 extern(System) cef_list_value_t* function (cef_list_value_t* self) nothrow copy; 21529 21530 /// 21531 /// Sets the number of values. If the number of values is expanded all new 21532 /// value slots will default to type null. Returns true (1) on success. 21533 /// 21534 extern(System) int function (cef_list_value_t* self, size_t size) nothrow set_size; 21535 21536 /// 21537 /// Returns the number of values. 21538 /// 21539 extern(System) size_t function (cef_list_value_t* self) nothrow get_size; 21540 21541 /// 21542 /// Removes all values. Returns true (1) on success. 21543 /// 21544 extern(System) int function (cef_list_value_t* self) nothrow clear; 21545 21546 /// 21547 /// Removes the value at the specified index. 21548 /// 21549 extern(System) int function (cef_list_value_t* self, size_t index) nothrow remove; 21550 21551 /// 21552 /// Returns the value type at the specified index. 21553 /// 21554 extern(System) cef_value_type_t function (cef_list_value_t* self, size_t index) nothrow get_type; 21555 21556 /// 21557 /// Returns the value at the specified index. For simple types the returned 21558 /// value will copy existing data and modifications to the value will not 21559 /// modify this object. For complex types (binary, dictionary and list) the 21560 /// returned value will reference existing data and modifications to the value 21561 /// will modify this object. 21562 /// 21563 extern(System) cef_value_t* function (cef_list_value_t* self, size_t index) nothrow get_value; 21564 21565 /// 21566 /// Returns the value at the specified index as type bool. 21567 /// 21568 extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_bool; 21569 21570 /// 21571 /// Returns the value at the specified index as type int. 21572 /// 21573 extern(System) int function (cef_list_value_t* self, size_t index) nothrow get_int; 21574 21575 /// 21576 /// Returns the value at the specified index as type double. 21577 /// 21578 extern(System) double function (cef_list_value_t* self, size_t index) nothrow get_double; 21579 21580 /// 21581 /// Returns the value at the specified index as type string. 21582 /// 21583 // The resulting string must be freed by calling cef_string_userfree_free(). 21584 extern(System) cef_string_userfree_t function ( 21585 cef_list_value_t* self, 21586 size_t index) nothrow get_string; 21587 21588 /// 21589 /// Returns the value at the specified index as type binary. The returned 21590 /// value will reference existing data. 21591 /// 21592 extern(System) cef_binary_value_t* function ( 21593 cef_list_value_t* self, 21594 size_t index) nothrow get_binary; 21595 21596 /// 21597 /// Returns the value at the specified index as type dictionary. The returned 21598 /// value will reference existing data and modifications to the value will 21599 /// modify this object. 21600 /// 21601 extern(System) cef_dictionary_value_t* function ( 21602 cef_list_value_t* self, 21603 size_t index) nothrow get_dictionary; 21604 21605 /// 21606 /// Returns the value at the specified index as type list. The returned value 21607 /// will reference existing data and modifications to the value will modify 21608 /// this object. 21609 /// 21610 extern(System) cef_list_value_t* function ( 21611 cef_list_value_t* self, 21612 size_t index) nothrow get_list; 21613 21614 /// 21615 /// Sets the value at the specified index. Returns true (1) if the value was 21616 /// set successfully. If |value| represents simple data then the underlying 21617 /// data will be copied and modifications to |value| will not modify this 21618 /// object. If |value| represents complex data (binary, dictionary or list) 21619 /// then the underlying data will be referenced and modifications to |value| 21620 /// will modify this object. 21621 /// 21622 extern(System) int function ( 21623 cef_list_value_t* self, 21624 size_t index, 21625 cef_value_t* value) nothrow set_value; 21626 21627 /// 21628 /// Sets the value at the specified index as type null. Returns true (1) if 21629 /// the value was set successfully. 21630 /// 21631 extern(System) int function (cef_list_value_t* self, size_t index) nothrow set_null; 21632 21633 /// 21634 /// Sets the value at the specified index as type bool. Returns true (1) if 21635 /// the value was set successfully. 21636 /// 21637 extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_bool; 21638 21639 /// 21640 /// Sets the value at the specified index as type int. Returns true (1) if the 21641 /// value was set successfully. 21642 /// 21643 extern(System) int function (cef_list_value_t* self, size_t index, int value) nothrow set_int; 21644 21645 /// 21646 /// Sets the value at the specified index as type double. Returns true (1) if 21647 /// the value was set successfully. 21648 /// 21649 extern(System) int function ( 21650 cef_list_value_t* self, 21651 size_t index, 21652 double value) nothrow set_double; 21653 21654 /// 21655 /// Sets the value at the specified index as type string. Returns true (1) if 21656 /// the value was set successfully. 21657 /// 21658 extern(System) int function ( 21659 cef_list_value_t* self, 21660 size_t index, 21661 const(cef_string_t)* value) nothrow set_string; 21662 21663 /// 21664 /// Sets the value at the specified index as type binary. Returns true (1) if 21665 /// the value was set successfully. If |value| is currently owned by another 21666 /// object then the value will be copied and the |value| reference will not 21667 /// change. Otherwise, ownership will be transferred to this object and the 21668 /// |value| reference will be invalidated. 21669 /// 21670 extern(System) int function ( 21671 cef_list_value_t* self, 21672 size_t index, 21673 cef_binary_value_t* value) nothrow set_binary; 21674 21675 /// 21676 /// Sets the value at the specified index as type dict. Returns true (1) if 21677 /// the value was set successfully. If |value| is currently owned by another 21678 /// object then the value will be copied and the |value| reference will not 21679 /// change. Otherwise, ownership will be transferred to this object and the 21680 /// |value| reference will be invalidated. 21681 /// 21682 extern(System) int function ( 21683 cef_list_value_t* self, 21684 size_t index, 21685 cef_dictionary_value_t* value) nothrow set_dictionary; 21686 21687 /// 21688 /// Sets the value at the specified index as type list. Returns true (1) if 21689 /// the value was set successfully. If |value| is currently owned by another 21690 /// object then the value will be copied and the |value| reference will not 21691 /// change. Otherwise, ownership will be transferred to this object and the 21692 /// |value| reference will be invalidated. 21693 /// 21694 extern(System) int function ( 21695 cef_list_value_t* self, 21696 size_t index, 21697 cef_list_value_t* value) nothrow set_list; 21698 } 21699 21700 21701 21702 /// 21703 /// Creates a new object that is not owned by any other object. 21704 /// 21705 cef_list_value_t* cef_list_value_create (); 21706 21707 // CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ 21708 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 21709 // 21710 // Redistribution and use in source and binary forms, with or without 21711 // modification, are permitted provided that the following conditions are 21712 // met: 21713 // 21714 // * Redistributions of source code must retain the above copyright 21715 // notice, this list of conditions and the following disclaimer. 21716 // * Redistributions in binary form must reproduce the above 21717 // copyright notice, this list of conditions and the following disclaimer 21718 // in the documentation and/or other materials provided with the 21719 // distribution. 21720 // * Neither the name of Google Inc. nor the name Chromium Embedded 21721 // Framework nor the names of its contributors may be used to endorse 21722 // or promote products derived from this software without specific prior 21723 // written permission. 21724 // 21725 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21726 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21727 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21728 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21729 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21730 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21731 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21732 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21733 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21734 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 21735 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21736 // 21737 // --------------------------------------------------------------------------- 21738 // 21739 // This file was generated by the CEF translator tool and should not edited 21740 // by hand. See the translator.README.txt file in the tools directory for 21741 // more information. 21742 // 21743 // $hash=be3741396459ccf1337f319965ba1dc509142536$ 21744 // 21745 21746 extern (C): 21747 21748 /// 21749 /// WaitableEvent is a thread synchronization tool that allows one thread to 21750 /// wait for another thread to finish some work. This is equivalent to using a 21751 /// Lock+ConditionVariable to protect a simple boolean value. However, using 21752 /// WaitableEvent in conjunction with a Lock to wait for a more complex state 21753 /// change (e.g., for an item to be added to a queue) is not recommended. In 21754 /// that case consider using a ConditionVariable instead of a WaitableEvent. It 21755 /// is safe to create and/or signal a WaitableEvent from any thread. Blocking on 21756 /// a WaitableEvent by calling the *wait() functions is not allowed on the 21757 /// browser process UI or IO threads. 21758 /// 21759 struct cef_waitable_event_t 21760 { 21761 /// 21762 /// Base structure. 21763 /// 21764 21765 /// 21766 /// Put the event in the un-signaled state. 21767 /// 21768 g 21769 cef_base_ref_counted_t base; 21770 extern(System) void function (cef_waitable_event_t* self) nothrow reset; 21771 /// 21772 /// Put the event in the signaled state. This causes any thread blocked on 21773 /// Wait to be woken up. 21774 /// 21775 extern(System) void function (cef_waitable_event_t* self) nothrow signal; 21776 21777 /// 21778 /// Returns true (1) if the event is in the signaled state, else false (0). If 21779 /// the event was created with |automatic_reset| set to true (1) then calling 21780 /// this function will also cause a reset. 21781 /// 21782 extern(System) int function (cef_waitable_event_t* self) nothrow is_signaled; 21783 21784 /// 21785 /// Wait indefinitely for the event to be signaled. This function will not 21786 /// return until after the call to signal() has completed. This function 21787 /// cannot be called on the browser process UI or IO threads. 21788 /// 21789 extern(System) void function (cef_waitable_event_t* self) nothrow wait; 21790 21791 /// 21792 /// Wait up to |max_ms| milliseconds for the event to be signaled. Returns 21793 /// true (1) if the event was signaled. A return value of false (0) does not 21794 /// necessarily mean that |max_ms| was exceeded. This function will not return 21795 /// until after the call to signal() has completed. This function cannot be 21796 /// called on the browser process UI or IO threads. 21797 /// 21798 extern(System) int function (cef_waitable_event_t* self, long max_ms) nothrow timed_wait; 21799 } 21800 21801 21802 21803 /// 21804 /// Create a new waitable event. If |automatic_reset| is true (1) then the event 21805 /// state is automatically reset to un-signaled after a single waiting thread 21806 /// has been released; otherwise, the state remains signaled until reset() is 21807 /// called manually. If |initially_signaled| is true (1) then the event will 21808 /// start in the signaled state. 21809 /// 21810 cef_waitable_event_t* cef_waitable_event_create ( 21811 int automatic_reset, 21812 int initially_signaled); 21813 21814 // CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_ 21815 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 21816 // 21817 // Redistribution and use in source and binary forms, with or without 21818 // modification, are permitted provided that the following conditions are 21819 // met: 21820 // 21821 // * Redistributions of source code must retain the above copyright 21822 // notice, this list of conditions and the following disclaimer. 21823 // * Redistributions in binary form must reproduce the above 21824 // copyright notice, this list of conditions and the following disclaimer 21825 // in the documentation and/or other materials provided with the 21826 // distribution. 21827 // * Neither the name of Google Inc. nor the name Chromium Embedded 21828 // Framework nor the names of its contributors may be used to endorse 21829 // or promote products derived from this software without specific prior 21830 // written permission. 21831 // 21832 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21833 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21834 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21835 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21836 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21837 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21838 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21839 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21840 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21841 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 21842 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21843 // 21844 // --------------------------------------------------------------------------- 21845 // 21846 // This file was generated by the CEF translator tool and should not edited 21847 // by hand. See the translator.README.txt file in the tools directory for 21848 // more information. 21849 // 21850 // $hash=a4b62b20f30552fef5d522bdd00ebf9a8f12464c$ 21851 // 21852 21853 extern (C): 21854 21855 /// 21856 /// Structure representing the issuer or subject field of an X.509 certificate. 21857 /// 21858 struct cef_x509cert_principal_t 21859 { 21860 /// 21861 /// Base structure. 21862 /// 21863 21864 /// 21865 /// Returns a name that can be used to represent the issuer. It tries in this 21866 /// order: Common Name (CN), Organization Name (O) and Organizational Unit 21867 /// Name (OU) and returns the first non-NULL one found. 21868 /// 21869 // The resulting string must be freed by calling cef_string_userfree_free(). 21870 21871 /// 21872 /// Returns the common name. 21873 /// 21874 // The resulting string must be freed by calling cef_string_userfree_free(). 21875 21876 /// 21877 /// Returns the locality name. 21878 g 21879 cef_base_ref_counted_t base; 21880 extern(System) cef_string_userfree_t function ( 21881 cef_x509cert_principal_t* self) nothrow get_display_name; 21882 extern(System) cef_string_userfree_t function ( 21883 cef_x509cert_principal_t* self) nothrow get_common_name; /// 21884 // The resulting string must be freed by calling cef_string_userfree_free(). 21885 extern(System) cef_string_userfree_t function ( 21886 cef_x509cert_principal_t* self) nothrow get_locality_name; 21887 21888 /// 21889 /// Returns the state or province name. 21890 /// 21891 // The resulting string must be freed by calling cef_string_userfree_free(). 21892 extern(System) cef_string_userfree_t function ( 21893 cef_x509cert_principal_t* self) nothrow get_state_or_province_name; 21894 21895 /// 21896 /// Returns the country name. 21897 /// 21898 // The resulting string must be freed by calling cef_string_userfree_free(). 21899 extern(System) cef_string_userfree_t function ( 21900 cef_x509cert_principal_t* self) nothrow get_country_name; 21901 21902 /// 21903 /// Retrieve the list of organization names. 21904 /// 21905 extern(System) void function ( 21906 cef_x509cert_principal_t* self, 21907 cef_string_list_t names) nothrow get_organization_names; 21908 21909 /// 21910 /// Retrieve the list of organization unit names. 21911 /// 21912 extern(System) void function ( 21913 cef_x509cert_principal_t* self, 21914 cef_string_list_t names) nothrow get_organization_unit_names; 21915 } 21916 21917 21918 21919 /// 21920 /// Structure representing a X.509 certificate. 21921 /// 21922 struct cef_x509certificate_t 21923 { 21924 /// 21925 /// Base structure. 21926 /// 21927 cef_base_ref_counted_t base; 21928 21929 /// 21930 /// Returns the subject of the X.509 certificate. For HTTPS server 21931 /// certificates this represents the web server. The common name of the 21932 /// subject should match the host name of the web server. 21933 /// 21934 extern(System) cef_x509cert_principal_t* function ( 21935 cef_x509certificate_t* self) nothrow get_subject; 21936 21937 /// 21938 /// Returns the issuer of the X.509 certificate. 21939 /// 21940 extern(System) cef_x509cert_principal_t* function ( 21941 cef_x509certificate_t* self) nothrow get_issuer; 21942 21943 /// 21944 /// Returns the DER encoded serial number for the X.509 certificate. The value 21945 /// possibly includes a leading 00 byte. 21946 /// 21947 extern(System) cef_binary_value_t* function ( 21948 cef_x509certificate_t* self) nothrow get_serial_number; 21949 21950 /// 21951 /// Returns the date before which the X.509 certificate is invalid. 21952 /// CefBaseTime.GetTimeT() will return 0 if no date was specified. 21953 /// 21954 extern(System) cef_basetime_t function (cef_x509certificate_t* self) nothrow get_valid_start; 21955 21956 /// 21957 /// Returns the date after which the X.509 certificate is invalid. 21958 /// CefBaseTime.GetTimeT() will return 0 if no date was specified. 21959 /// 21960 extern(System) cef_basetime_t function (cef_x509certificate_t* self) nothrow get_valid_expiry; 21961 21962 /// 21963 /// Returns the DER encoded data for the X.509 certificate. 21964 /// 21965 extern(System) cef_binary_value_t* function ( 21966 cef_x509certificate_t* self) nothrow get_derencoded; 21967 21968 /// 21969 /// Returns the PEM encoded data for the X.509 certificate. 21970 /// 21971 extern(System) cef_binary_value_t* function ( 21972 cef_x509certificate_t* self) nothrow get_pemencoded; 21973 21974 /// 21975 /// Returns the number of certificates in the issuer chain. If 0, the 21976 /// certificate is self-signed. 21977 /// 21978 extern(System) size_t function (cef_x509certificate_t* self) nothrow get_issuer_chain_size; 21979 21980 /// 21981 /// Returns the DER encoded data for the certificate issuer chain. If we 21982 /// failed to encode a certificate in the chain it is still present in the 21983 /// array but is an NULL string. 21984 /// 21985 extern(System) void function ( 21986 cef_x509certificate_t* self, 21987 size_t* chainCount, 21988 cef_binary_value_t** chain) nothrow get_derencoded_issuer_chain; 21989 21990 /// 21991 /// Returns the PEM encoded data for the certificate issuer chain. If we 21992 /// failed to encode a certificate in the chain it is still present in the 21993 /// array but is an NULL string. 21994 /// 21995 extern(System) void function ( 21996 cef_x509certificate_t* self, 21997 size_t* chainCount, 21998 cef_binary_value_t** chain) nothrow get_pemencoded_issuer_chain; 21999 } 22000 22001 22002 22003 // CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_ 22004 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 22005 // 22006 // Redistribution and use in source and binary forms, with or without 22007 // modification, are permitted provided that the following conditions are 22008 // met: 22009 // 22010 // * Redistributions of source code must retain the above copyright 22011 // notice, this list of conditions and the following disclaimer. 22012 // * Redistributions in binary form must reproduce the above 22013 // copyright notice, this list of conditions and the following disclaimer 22014 // in the documentation and/or other materials provided with the 22015 // distribution. 22016 // * Neither the name of Google Inc. nor the name Chromium Embedded 22017 // Framework nor the names of its contributors may be used to endorse 22018 // or promote products derived from this software without specific prior 22019 // written permission. 22020 // 22021 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22022 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22023 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22024 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22025 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22026 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22027 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22028 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22029 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22030 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22031 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22032 // 22033 // --------------------------------------------------------------------------- 22034 // 22035 // This file was generated by the CEF translator tool and should not edited 22036 // by hand. See the translator.README.txt file in the tools directory for 22037 // more information. 22038 // 22039 // $hash=366f872b03f7c25ef56677cc427a317bb529ad9c$ 22040 // 22041 22042 extern (C): 22043 22044 /// 22045 /// Structure that supports the reading of XML data via the libxml streaming 22046 /// API. The functions of this structure should only be called on the thread 22047 /// that creates the object. 22048 /// 22049 struct cef_xml_reader_t 22050 { 22051 /// 22052 /// Base structure. 22053 /// 22054 22055 /// 22056 /// Moves the cursor to the next node in the document. This function must be 22057 /// called at least once to set the current cursor position. Returns true (1) 22058 /// if the cursor position was set successfully. 22059 /// 22060 22061 /// 22062 /// Close the document. This should be called directly to ensure that cleanup 22063 /// occurs on the correct thread. 22064 /// 22065 22066 /// 22067 /// Returns true (1) if an error has been reported by the XML parser. 22068 /// 22069 g 22070 cef_base_ref_counted_t base; 22071 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_node; 22072 extern(System) int function (cef_xml_reader_t* self) nothrow close; 22073 extern(System) int function (cef_xml_reader_t* self) nothrow has_error; 22074 22075 /// 22076 /// Returns the error string. 22077 /// 22078 // The resulting string must be freed by calling cef_string_userfree_free(). 22079 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_error; 22080 22081 /// 22082 /// Returns the node type. 22083 /// 22084 extern(System) cef_xml_node_type_t function (cef_xml_reader_t* self) nothrow get_type; 22085 22086 /// 22087 /// Returns the node depth. Depth starts at 0 for the root node. 22088 /// 22089 extern(System) int function (cef_xml_reader_t* self) nothrow get_depth; 22090 22091 /// 22092 /// Returns the local name. See http://www.w3.org/TR/REC-xml-names/#NT- 22093 /// LocalPart for additional details. 22094 /// 22095 // The resulting string must be freed by calling cef_string_userfree_free(). 22096 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_local_name; 22097 22098 /// 22099 /// Returns the namespace prefix. See http://www.w3.org/TR/REC-xml-names/ for 22100 /// additional details. 22101 /// 22102 // The resulting string must be freed by calling cef_string_userfree_free(). 22103 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_prefix; 22104 22105 /// 22106 /// Returns the qualified name, equal to (Prefix:)LocalName. See 22107 /// http://www.w3.org/TR/REC-xml-names/#ns-qualnames for additional details. 22108 /// 22109 // The resulting string must be freed by calling cef_string_userfree_free(). 22110 extern(System) cef_string_userfree_t function ( 22111 cef_xml_reader_t* self) nothrow get_qualified_name; 22112 22113 /// 22114 /// Returns the URI defining the namespace associated with the node. See 22115 /// http://www.w3.org/TR/REC-xml-names/ for additional details. 22116 /// 22117 // The resulting string must be freed by calling cef_string_userfree_free(). 22118 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_namespace_uri; 22119 22120 /// 22121 /// Returns the base URI of the node. See http://www.w3.org/TR/xmlbase/ for 22122 /// additional details. 22123 /// 22124 // The resulting string must be freed by calling cef_string_userfree_free(). 22125 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_base_uri; 22126 22127 /// 22128 /// Returns the xml:lang scope within which the node resides. See 22129 /// http://www.w3.org/TR/REC-xml/#sec-lang-tag for additional details. 22130 /// 22131 // The resulting string must be freed by calling cef_string_userfree_free(). 22132 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_xml_lang; 22133 22134 /// 22135 /// Returns true (1) if the node represents an NULL element. "<a/>" is 22136 /// considered NULL but "<a></a>" is not. 22137 /// 22138 extern(System) int function (cef_xml_reader_t* self) nothrow is_empty_element; 22139 22140 /// 22141 /// Returns true (1) if the node has a text value. 22142 /// 22143 extern(System) int function (cef_xml_reader_t* self) nothrow has_value; 22144 22145 /// 22146 /// Returns the text value. 22147 /// 22148 // The resulting string must be freed by calling cef_string_userfree_free(). 22149 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_value; 22150 22151 /// 22152 /// Returns true (1) if the node has attributes. 22153 /// 22154 extern(System) int function (cef_xml_reader_t* self) nothrow has_attributes; 22155 22156 /// 22157 /// Returns the number of attributes. 22158 /// 22159 extern(System) size_t function (cef_xml_reader_t* self) nothrow get_attribute_count; 22160 22161 /// 22162 /// Returns the value of the attribute at the specified 0-based index. 22163 /// 22164 // The resulting string must be freed by calling cef_string_userfree_free(). 22165 extern(System) cef_string_userfree_t function ( 22166 cef_xml_reader_t* self, 22167 int index) nothrow get_attribute_byindex; 22168 22169 /// 22170 /// Returns the value of the attribute with the specified qualified name. 22171 /// 22172 // The resulting string must be freed by calling cef_string_userfree_free(). 22173 extern(System) cef_string_userfree_t function ( 22174 cef_xml_reader_t* self, 22175 const(cef_string_t)* qualifiedName) nothrow get_attribute_byqname; 22176 22177 /// 22178 /// Returns the value of the attribute with the specified local name and 22179 /// namespace URI. 22180 /// 22181 // The resulting string must be freed by calling cef_string_userfree_free(). 22182 extern(System) cef_string_userfree_t function ( 22183 cef_xml_reader_t* self, 22184 const(cef_string_t)* localName, 22185 const(cef_string_t)* namespaceURI) nothrow get_attribute_bylname; 22186 22187 /// 22188 /// Returns an XML representation of the current node's children. 22189 /// 22190 // The resulting string must be freed by calling cef_string_userfree_free(). 22191 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_inner_xml; 22192 22193 /// 22194 /// Returns an XML representation of the current node including its children. 22195 /// 22196 // The resulting string must be freed by calling cef_string_userfree_free(). 22197 extern(System) cef_string_userfree_t function (cef_xml_reader_t* self) nothrow get_outer_xml; 22198 22199 /// 22200 /// Returns the line number for the current node. 22201 /// 22202 extern(System) int function (cef_xml_reader_t* self) nothrow get_line_number; 22203 22204 /// 22205 /// Moves the cursor to the attribute at the specified 0-based index. Returns 22206 /// true (1) if the cursor position was set successfully. 22207 /// 22208 extern(System) int function ( 22209 cef_xml_reader_t* self, 22210 int index) nothrow move_to_attribute_byindex; 22211 22212 /// 22213 /// Moves the cursor to the attribute with the specified qualified name. 22214 /// Returns true (1) if the cursor position was set successfully. 22215 /// 22216 extern(System) int function ( 22217 cef_xml_reader_t* self, 22218 const(cef_string_t)* qualifiedName) nothrow move_to_attribute_byqname; 22219 22220 /// 22221 /// Moves the cursor to the attribute with the specified local name and 22222 /// namespace URI. Returns true (1) if the cursor position was set 22223 /// successfully. 22224 /// 22225 extern(System) int function ( 22226 cef_xml_reader_t* self, 22227 const(cef_string_t)* localName, 22228 const(cef_string_t)* namespaceURI) nothrow move_to_attribute_bylname; 22229 22230 /// 22231 /// Moves the cursor to the first attribute in the current element. Returns 22232 /// true (1) if the cursor position was set successfully. 22233 /// 22234 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_first_attribute; 22235 22236 /// 22237 /// Moves the cursor to the next attribute in the current element. Returns 22238 /// true (1) if the cursor position was set successfully. 22239 /// 22240 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_next_attribute; 22241 22242 /// 22243 /// Moves the cursor back to the carrying element. Returns true (1) if the 22244 /// cursor position was set successfully. 22245 /// 22246 extern(System) int function (cef_xml_reader_t* self) nothrow move_to_carrying_element; 22247 } 22248 22249 22250 22251 /// 22252 /// Create a new cef_xml_reader_t object. The returned object's functions can 22253 /// only be called from the thread that created the object. 22254 /// 22255 cef_xml_reader_t* cef_xml_reader_create ( 22256 cef_stream_reader_t* stream, 22257 cef_xml_encoding_type_t encodingType, 22258 const(cef_string_t)* URI); 22259 22260 // CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_ 22261 // Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 22262 // 22263 // Redistribution and use in source and binary forms, with or without 22264 // modification, are permitted provided that the following conditions are 22265 // met: 22266 // 22267 // * Redistributions of source code must retain the above copyright 22268 // notice, this list of conditions and the following disclaimer. 22269 // * Redistributions in binary form must reproduce the above 22270 // copyright notice, this list of conditions and the following disclaimer 22271 // in the documentation and/or other materials provided with the 22272 // distribution. 22273 // * Neither the name of Google Inc. nor the name Chromium Embedded 22274 // Framework nor the names of its contributors may be used to endorse 22275 // or promote products derived from this software without specific prior 22276 // written permission. 22277 // 22278 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22279 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22280 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22281 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22282 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22283 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22284 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22285 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22286 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22287 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22288 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22289 // 22290 // --------------------------------------------------------------------------- 22291 // 22292 // This file was generated by the CEF translator tool and should not edited 22293 // by hand. See the translator.README.txt file in the tools directory for 22294 // more information. 22295 // 22296 // $hash=d082d724164cb0b1da12d49b080c599934f08b9d$ 22297 // 22298 22299 extern (C): 22300 22301 /// 22302 /// Structure that supports the reading of zip archives via the zlib unzip API. 22303 /// The functions of this structure should only be called on the thread that 22304 /// creates the object. 22305 /// 22306 struct cef_zip_reader_t 22307 { 22308 /// 22309 /// Base structure. 22310 /// 22311 22312 /// 22313 /// Moves the cursor to the first file in the archive. Returns true (1) if the 22314 /// cursor position was set successfully. 22315 /// 22316 22317 /// 22318 /// Moves the cursor to the next file in the archive. Returns true (1) if the 22319 /// cursor position was set successfully. 22320 /// 22321 22322 /// 22323 /// Moves the cursor to the specified file in the archive. If |caseSensitive| 22324 /// is true (1) then the search will be case sensitive. Returns true (1) if 22325 g 22326 cef_base_ref_counted_t base; 22327 extern(System) int function (cef_zip_reader_t* self) nothrow move_to_first_file; 22328 extern(System) int function (cef_zip_reader_t* self) nothrow move_to_next_file; 22329 /// the cursor position was set successfully. 22330 /// 22331 extern(System) int function ( 22332 cef_zip_reader_t* self, 22333 const(cef_string_t)* fileName, 22334 int caseSensitive) nothrow move_to_file; 22335 22336 /// 22337 /// Closes the archive. This should be called directly to ensure that cleanup 22338 /// occurs on the correct thread. 22339 /// 22340 extern(System) int function (cef_zip_reader_t* self) nothrow close; 22341 22342 /// 22343 /// Returns the name of the file. 22344 /// 22345 // The resulting string must be freed by calling cef_string_userfree_free(). 22346 extern(System) cef_string_userfree_t function (cef_zip_reader_t* self) nothrow get_file_name; 22347 22348 /// 22349 /// Returns the uncompressed size of the file. 22350 /// 22351 extern(System) long function (cef_zip_reader_t* self) nothrow get_file_size; 22352 22353 /// 22354 /// Returns the last modified timestamp for the file. 22355 /// 22356 extern(System) cef_basetime_t function (cef_zip_reader_t* self) nothrow get_file_last_modified; 22357 22358 /// 22359 /// Opens the file for reading of uncompressed data. A read password may 22360 /// optionally be specified. 22361 /// 22362 extern(System) int function ( 22363 cef_zip_reader_t* self, 22364 const(cef_string_t)* password) nothrow open_file; 22365 22366 /// 22367 /// Closes the file. 22368 /// 22369 extern(System) int function (cef_zip_reader_t* self) nothrow close_file; 22370 22371 /// 22372 /// Read uncompressed file contents into the specified buffer. Returns < 0 if 22373 /// an error occurred, 0 if at the end of file, or the number of bytes read. 22374 /// 22375 extern(System) int function ( 22376 cef_zip_reader_t* self, 22377 void* buffer, 22378 size_t bufferSize) nothrow read_file; 22379 22380 /// 22381 /// Returns the current offset in the uncompressed file contents. 22382 /// 22383 extern(System) long function (cef_zip_reader_t* self) nothrow tell; 22384 22385 /// 22386 /// Returns true (1) if at end of the file contents. 22387 /// 22388 extern(System) int function (cef_zip_reader_t* self) nothrow eof; 22389 } 22390 22391 22392 22393 /// 22394 /// Create a new cef_zip_reader_t object. The returned object's functions can 22395 /// only be called from the thread that created the object. 22396 /// 22397 cef_zip_reader_t* cef_zip_reader_create (cef_stream_reader_t* stream); 22398 22399 // CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_ 22400 } 22401 22402 } 22403 22404 22405 version(Windows) { 22406 22407 /* ************************************ */ 22408 22409 // File generated by idl2d from 22410 // C:\Users\me\source\repos\webviewtest\packages\Microsoft.Web.WebView2.1.0.664.37\WebView2.idl 22411 //module webview2; 22412 22413 public import core.sys.windows.windows; 22414 public import core.sys.windows.unknwn; 22415 public import core.sys.windows.oaidl; 22416 public import core.sys.windows.objidl; 22417 22418 alias EventRegistrationToken = long; 22419 22420 // Copyright (C) Microsoft Corporation. All rights reserved. 22421 // Use of this source code is governed by a BSD-style license that can be 22422 // found in the LICENSE file. 22423 22424 /+ 22425 Copyright (C) Microsoft Corporation. All rights reserved. 22426 22427 Redistribution and use in source and binary forms, with or without 22428 modification, are permitted provided that the following conditions are 22429 met: 22430 22431 * Redistributions of source code must retain the above copyright 22432 notice, this list of conditions and the following disclaimer. 22433 * Redistributions in binary form must reproduce the above 22434 copyright notice, this list of conditions and the following disclaimer 22435 in the documentation and/or other materials provided with the 22436 distribution. 22437 * The name of Microsoft Corporation, or the names of its contributors 22438 may not be used to endorse or promote products derived from this 22439 software without specific prior written permission. 22440 22441 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22442 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22443 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22444 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22445 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22446 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22447 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22448 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22449 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22450 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22451 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22452 +/ 22453 22454 // # API Review 22455 // All APIs need API review. List API review documents here with the URI to the 22456 // doc and the change ID of the IDL when the document was created. 22457 // API documents: 22458 // * 916246ec [WebView2 API Specification](https://aka.ms/WebView2APISpecification) 22459 // 22460 // # Style 22461 // Follow the [Win32 API Design Guidelines](https://aka.ms/Win32APIDesignGuidelines) 22462 // while editing this file. For any style rules unspecified follow the Anaheim 22463 // style. Specifically, follow Anaheim indenting and line limit style rules in 22464 // this file. 22465 // 22466 // # Documentation 22467 // Please ensure that any new API includes complete documentation in its 22468 // JavaDoc comments in this file and sample usage in the Sample App. 22469 // Comments intended for public API documentation should start with 3 slashes. 22470 // The first sentence is the brief the brief description of the API and 22471 // shouldn't include the name of the API. Use markdown to style your public API 22472 // documentation. 22473 // 22474 // # WebView and JavaScript capitalization 22475 // camel case | webViewExample | javaScriptExample 22476 // Pascal case | WebViewExample | JavaScriptExample 22477 // Upper case | WEBVIEW_EXAMPLE | JAVASCRIPT_EXAMPLE 22478 // 22479 // That said, in API names use the term 'script' rather than 'JavaScript'. 22480 // Script is shorter and there is only one supported scripting language on the 22481 // web so the specificity of JavaScript is unnecessary. 22482 // 22483 // # URI (not URL) 22484 // We use Uri in parameter names and type names 22485 // throughout. URIs identify resources while URLs (a subset of URIs) also 22486 // locates resources. This difference is not generally well understood. Because 22487 // all URLs are URIs we can ignore the conversation of trying to explain the 22488 // difference between the two and still be technically accurate by always using 22489 // the term URI. Additionally, whether a URI is locatable depends on the context 22490 // since end developers can at runtime specify custom URI scheme resolvers. 22491 // 22492 // # Event pattern 22493 // Events have a method to add and to remove event handlers: 22494 // ``` 22495 // HRESULT add_{EventName}( 22496 // ICoreWebView2{EventName}EventHandler* eventHandler, 22497 // EventRegistrationToken* token); 22498 // 22499 // HRESULT remove_{EventName}(EventRegistrationToken token); 22500 // ``` 22501 // Add takes an event handler delegate interface with a single Invoke method. 22502 // ``` 22503 // ICoreWebView2{EventName}EventHandler::Invoke( 22504 // {SenderType}* sender, 22505 // ICoreWebView2{EventHandler}EventArgs* args); 22506 // ``` 22507 // The Invoke method has two parameters. The first is the sender, the object 22508 // which is firing the event. The second is the EventArgs type. It doesn't take 22509 // the event arg parameters directly so we can version interfaces correctly. 22510 // If the event has no properties on its event args type, then the Invoke method 22511 // should take IUnknown* as its event args parameter so it is possible to add 22512 // event args interfaces in the future without requiring a new event. For events 22513 // with no sender (a static event), the Invoke method has only the event args 22514 // parameter. 22515 // 22516 // # Deferrable event pattern 22517 // Generally, events should be deferrable when their event args have settable 22518 // properties. In order for the caller to use asynchronous methods to produce 22519 // the value for those settable properties we must allow the caller to defer 22520 // the WebView reading those properties until asynchronously later. A deferrable 22521 // event should have the following method on its event args interface: 22522 // `HRESULT GetDeferral([out, retval] ICoreWebView2Deferral** deferral);` 22523 // If called, the event is deferred and calling Complete on the 22524 // ICoreWebView2Deferral ends the deferral. 22525 // 22526 // # Asynchronous method pattern 22527 // Async methods take a final parameter that is the completed handler: 22528 // `{MethodName}(..., ICoreWebView2{MethodName}CompletedHandler* handler)` 22529 // The handler has a single Invoke method: 22530 // `ICoreWebView2{MethodName}CompletedHandler::Invoke( 22531 // HRESULT errorCode, {AsyncReturnType});` 22532 // 22533 // # Property pattern 22534 // For properties with getters in IDL you have 22535 // `[propget] HRESULT {PropertyName}([out, retval] {PropertyType}*)` 22536 // And for properties which also have setters in IDL you have 22537 // `[propput] HRESULT {PropertyName}([in] {PropertyType});` 22538 // 22539 // # Versioning 22540 // The loader DLL may be older or newer than the client DLL. We have to deal 22541 // with compatibility across several dimensions: 22542 // * There's the DLL export contract between the loader DLL and the client 22543 // DLL as well as the interfaces defined in this IDL that are built into both 22544 // the app code and the client DLL. 22545 // * There are two kinds of versioned changes we need to be able to make: 22546 // compatible changes and breaking changes. In both cases we need to make the 22547 // change in a safe manner. For compatible that means everything continues to 22548 // work unchanged despite the loader and client being different versions. For 22549 // breaking changes this means the host app is unable to create a 22550 // WebView using the different version browser and receives an associated 22551 // error message (doesn't crash). 22552 // * We also need to consider when the loader and host app is using a newer 22553 // version than the browser and when the loader and host app is using an 22554 // older version than the browser. 22555 // 22556 // ## Scenario 1: Older SDK in host app, Newer browser, Compatible change 22557 // In order to be compatible the newer client DLL must still support the older 22558 // client DLL exports. Similarly for the interfaces - they must all be exactly 22559 // the same with no modified IIDs, no reordered methods, no modified method 22560 // parameters and so on. The client DLL may have more DLL exports and more interfaces 22561 // but no changes to the older shipped DLL export or interfaces. 22562 // App code doesn't need to do anything special in this case. 22563 // 22564 // ## Scenario 2: Older SDK in host app, Newer browser, Breaking change 22565 // For breaking changes in the DLL export, the client DLL must change the DLL 22566 // export name. The old loader will attempt to use the old client DLL export. 22567 // When the loader finds the export missing it will fail. 22568 // For breaking changes in the interface, we must change the IID of the modified 22569 // interface. Additionally the loader DLL must validate that the returned object 22570 // supports the IID it expects and fail otherwise. 22571 // The app code must ensure that WebView objects succeed in their QueryInterface 22572 // calls. Basically the app code must have error handling for objects failing 22573 // QueryInterface and for the initial creation failing in order to handle 22574 // breaking changes gracefully. 22575 // 22576 // ## Scenario 3: Newer SDK in host app, Older browser, Compatible change 22577 // In order to be compatible, the newer loader DLL must fallback to calling the 22578 // older client DLL exports if the client DLL doesn't have the most recent DLL 22579 // exports. 22580 // For interface versioning the loader DLL shouldn't be impacted. 22581 // The app code must not assume an object supports all newer versioned 22582 // interfaces. Ideally it checks the success of QueryInterface for newer 22583 // interfaces and if not supported turns off associated app features or 22584 // otherwise fails gracefully. 22585 // 22586 // ## Scenario 4: Newer SDK in host app, Older browser, Breaking change 22587 // For breaking changes in the DLL export, a new export name will be used after 22588 // a breaking change and the loader DLL will just not check for pre-breaking 22589 // change exports from the client DLL. If the client DLL doesn't have the 22590 // correct exports, then the loader returns failure to the caller. 22591 // For breaking changes in the interface, the IIDs of broken interfaces will 22592 // have been modified. The loader will validate that the 22593 // object returned supports the correct base interface IID and return failure to 22594 // the caller otherwise. 22595 // The app code must allow for QueryInterface calls to fail if the object 22596 // doesn't support the newer IIDs. 22597 // 22598 // ## Actions 22599 // * DLL export compatible changes: Create a new DLL export with a new name. 22600 // Ideally implement the existing DLL export as a call into the new DLL 22601 // export to reduce upkeep burden. 22602 // * DLL export breaking changes: Give the modified DLL export a new name and 22603 // remove all older DLL exports. 22604 // * Interface compatible changes: Don't modify shipped interfaces. Add a new 22605 // interface with an incremented version number suffix 22606 // (ICoreWebView2_3) or feature group name suffix 22607 // (ICoreWebView2WithNavigationHistory). 22608 // * Interface breaking changes: After modifying a shipped interface, give it 22609 // a new IID. 22610 // * Loader: When finding the client DLL export it must check its known range 22611 // of compatible exports in order from newest to oldest and use the newest 22612 // one found. It must not attempt to use an older export from before a 22613 // breaking change. Before returning objects to the caller, the loader must 22614 // validate that the object actually implements the expected interface. 22615 // * App code: Check for error from the DLL export methods as they can fail if 22616 // the loader is used with an old browser from before a breaking change or 22617 // with a newer browser that is after a breaking change. 22618 // Check for errors when calling QueryInterface on a WebView object. The 22619 // QueryInterface call may fail with E_NOINTERFACE if the object is from an 22620 // older browser version that doesn't support the newer interface or if 22621 // using a newer browser version that had a breaking change on that 22622 // interface. 22623 22624 /+[uuid(26d34152-879f-4065-bea2-3daa2cfadfb8), version(1.0)]+/ 22625 /+ library WebView2 +/ 22626 22627 // Interface forward declarations 22628 /+ interface ICoreWebView2AcceleratorKeyPressedEventArgs; +/ 22629 /+ interface ICoreWebView2AcceleratorKeyPressedEventHandler; +/ 22630 /+ interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler; +/ 22631 /+ interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler; +/ 22632 /+ interface ICoreWebView2CapturePreviewCompletedHandler; +/ 22633 /+ interface ICoreWebView2; +/ 22634 /+ interface ICoreWebView2Controller; +/ 22635 /+ interface ICoreWebView2ContentLoadingEventArgs; +/ 22636 /+ interface ICoreWebView2ContentLoadingEventHandler; +/ 22637 /+ interface ICoreWebView2DocumentTitleChangedEventHandler; +/ 22638 /+ interface ICoreWebView2ContainsFullScreenElementChangedEventHandler; +/ 22639 /+ interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler; +/ 22640 /+ interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler; +/ 22641 /+ interface ICoreWebView2Deferral; +/ 22642 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs; +/ 22643 /+ interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler; +/ 22644 /+ interface ICoreWebView2DevToolsProtocolEventReceiver; +/ 22645 /+ interface ICoreWebView2Environment; +/ 22646 /+ interface ICoreWebView2EnvironmentOptions; +/ 22647 /+ interface ICoreWebView2ExecuteScriptCompletedHandler; +/ 22648 /+ interface ICoreWebView2FocusChangedEventHandler; +/ 22649 /+ interface ICoreWebView2HistoryChangedEventHandler; +/ 22650 /+ interface ICoreWebView2HttpHeadersCollectionIterator; +/ 22651 /+ interface ICoreWebView2HttpRequestHeaders; +/ 22652 /+ interface ICoreWebView2HttpResponseHeaders; +/ 22653 /+ interface ICoreWebView2MoveFocusRequestedEventArgs; +/ 22654 /+ interface ICoreWebView2MoveFocusRequestedEventHandler; +/ 22655 /+ interface ICoreWebView2NavigationCompletedEventArgs; +/ 22656 /+ interface ICoreWebView2NavigationCompletedEventHandler; +/ 22657 /+ interface ICoreWebView2NavigationStartingEventArgs; +/ 22658 /+ interface ICoreWebView2NavigationStartingEventHandler; +/ 22659 /+ interface ICoreWebView2NewBrowserVersionAvailableEventHandler; +/ 22660 /+ interface ICoreWebView2NewWindowRequestedEventArgs; +/ 22661 /+ interface ICoreWebView2NewWindowRequestedEventHandler; +/ 22662 /+ interface ICoreWebView2PermissionRequestedEventArgs; +/ 22663 /+ interface ICoreWebView2PermissionRequestedEventHandler; +/ 22664 /+ interface ICoreWebView2ProcessFailedEventArgs; +/ 22665 /+ interface ICoreWebView2ProcessFailedEventHandler; +/ 22666 /+ interface ICoreWebView2ScriptDialogOpeningEventArgs; +/ 22667 /+ interface ICoreWebView2ScriptDialogOpeningEventHandler; +/ 22668 /+ interface ICoreWebView2Settings; +/ 22669 /+ interface ICoreWebView2SourceChangedEventArgs; +/ 22670 /+ interface ICoreWebView2SourceChangedEventHandler; +/ 22671 /+ interface ICoreWebView2WebMessageReceivedEventArgs; +/ 22672 /+ interface ICoreWebView2WebMessageReceivedEventHandler; +/ 22673 /+ interface ICoreWebView2WebResourceRequest; +/ 22674 /+ interface ICoreWebView2WebResourceRequestedEventArgs; +/ 22675 /+ interface ICoreWebView2WebResourceRequestedEventHandler; +/ 22676 /+ interface ICoreWebView2WebResourceResponse; +/ 22677 /+ interface ICoreWebView2WindowCloseRequestedEventHandler; +/ 22678 /+ interface ICoreWebView2WindowFeatures; +/ 22679 /+ interface ICoreWebView2ZoomFactorChangedEventHandler; +/ 22680 22681 // Enums and structs 22682 /// Image format used by the ICoreWebView2::CapturePreview method. 22683 /+[v1_enum]+/ 22684 enum /+ COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT+/ 22685 { 22686 /// PNG image format. 22687 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG, 22688 /// JPEG image format. 22689 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG, 22690 } 22691 alias int COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT; 22692 22693 /// Kind of JavaScript dialog used in the 22694 /// ICoreWebView2ScriptDialogOpeningEventHandler interface. 22695 /+[v1_enum]+/ 22696 enum /+ COREWEBVIEW2_SCRIPT_DIALOG_KIND+/ 22697 { 22698 /// A dialog invoked via the window.alert JavaScript function. 22699 COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT, 22700 /// A dialog invoked via the window.confirm JavaScript function. 22701 COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM, 22702 /// A dialog invoked via the window.prompt JavaScript function. 22703 COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT, 22704 /// A dialog invoked via the beforeunload JavaScript event. 22705 COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD, 22706 } 22707 alias int COREWEBVIEW2_SCRIPT_DIALOG_KIND; 22708 22709 /// Kind of process failure used in the ICoreWebView2ProcessFailedEventHandler 22710 /// interface. 22711 /+[v1_enum]+/ 22712 enum /+ COREWEBVIEW2_PROCESS_FAILED_KIND+/ 22713 { 22714 /// Indicates the browser process terminated unexpectedly. 22715 /// The WebView automatically goes into the Closed state. 22716 /// The app has to recreate a new WebView to recover from this failure. 22717 COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED, 22718 22719 /// Indicates the render process terminated unexpectedly. 22720 /// A new render process will be created automatically and navigated to an 22721 /// error page. 22722 /// The app can use Reload to try to recover from this failure. 22723 COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED, 22724 22725 /// Indicates the render process becomes unresponsive. 22726 // Note that this does not seem to work right now. 22727 // Does not fire for simple long running script case, the only related test 22728 // SitePerProcessBrowserTest::NoCommitTimeoutForInvisibleWebContents is 22729 // disabled. 22730 COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE, 22731 } 22732 alias int COREWEBVIEW2_PROCESS_FAILED_KIND; 22733 22734 /// The type of a permission request. 22735 /+[v1_enum]+/ 22736 enum /+ COREWEBVIEW2_PERMISSION_KIND+/ 22737 { 22738 /// Unknown permission. 22739 COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION, 22740 22741 /// Permission to capture audio. 22742 COREWEBVIEW2_PERMISSION_KIND_MICROPHONE, 22743 22744 /// Permission to capture video. 22745 COREWEBVIEW2_PERMISSION_KIND_CAMERA, 22746 22747 /// Permission to access geolocation. 22748 COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION, 22749 22750 /// Permission to send web notifications. 22751 /// This permission request is currently auto rejected and 22752 /// no event is fired for it. 22753 COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS, 22754 22755 /// Permission to access generic sensor. 22756 /// Generic Sensor covering ambient-light-sensor, accelerometer, gyroscope 22757 /// and magnetometer. 22758 COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS, 22759 22760 /// Permission to read system clipboard without a user gesture. 22761 COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ, 22762 } 22763 alias int COREWEBVIEW2_PERMISSION_KIND; 22764 22765 /// Response to a permission request. 22766 /+[v1_enum]+/ 22767 enum /+ COREWEBVIEW2_PERMISSION_STATE+/ 22768 { 22769 /// Use default browser behavior, which normally prompt users for decision. 22770 COREWEBVIEW2_PERMISSION_STATE_DEFAULT, 22771 22772 /// Grant the permission request. 22773 COREWEBVIEW2_PERMISSION_STATE_ALLOW, 22774 22775 /// Deny the permission request. 22776 COREWEBVIEW2_PERMISSION_STATE_DENY, 22777 } 22778 alias int COREWEBVIEW2_PERMISSION_STATE; 22779 22780 /// Error status values for web navigations. 22781 /+[v1_enum]+/ 22782 enum /+ COREWEBVIEW2_WEB_ERROR_STATUS+/ 22783 { 22784 /// An unknown error occurred. 22785 COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN, 22786 22787 /// The SSL certificate common name does not match the web address. 22788 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT, 22789 22790 /// The SSL certificate has expired. 22791 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED, 22792 22793 /// The SSL client certificate contains errors. 22794 COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS, 22795 22796 /// The SSL certificate has been revoked. 22797 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED, 22798 22799 /// The SSL certificate is invalid -- this could mean the certificate did not 22800 /// match the public key pins for the host name, the certificate is signed by 22801 /// an untrusted authority or using a weak sign algorithm, the certificate 22802 /// claimed DNS names violate name constraints, the certificate contains a 22803 /// weak key, the certificate's validity period is too long, lack of 22804 /// revocation information or revocation mechanism, non-unique host name, lack 22805 /// of certificate transparency information, or the certificate is chained to 22806 /// a [legacy Symantec 22807 /// root](https://security.googleblog.com/2018/03/distrust-of-symantec-pki-immediate.html). 22808 COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID, 22809 22810 /// The host is unreachable. 22811 COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE, 22812 22813 /// The connection has timed out. 22814 COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT, 22815 22816 /// The server returned an invalid or unrecognized response. 22817 COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE, 22818 22819 /// The connection was aborted. 22820 COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED, 22821 22822 /// The connection was reset. 22823 COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET, 22824 22825 /// The Internet connection has been lost. 22826 COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED, 22827 22828 /// Cannot connect to destination. 22829 COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT, 22830 22831 /// Could not resolve provided host name. 22832 COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED, 22833 22834 /// The operation was canceled. 22835 COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED, 22836 22837 /// The request redirect failed. 22838 COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED, 22839 22840 /// An unexpected error occurred. 22841 COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR, 22842 } 22843 alias int COREWEBVIEW2_WEB_ERROR_STATUS; 22844 22845 /// Enum for web resource request contexts. 22846 /+[v1_enum]+/ 22847 enum /+ COREWEBVIEW2_WEB_RESOURCE_CONTEXT+/ 22848 { 22849 /// All resources 22850 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL, 22851 /// Document resources 22852 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT, 22853 /// CSS resources 22854 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET, 22855 /// Image resources 22856 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE, 22857 /// Other media resources such as videos 22858 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA, 22859 /// Font resources 22860 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT, 22861 /// Script resources 22862 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT, 22863 /// XML HTTP requests 22864 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST, 22865 /// Fetch API communication 22866 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH, 22867 /// TextTrack resources 22868 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK, 22869 /// EventSource API communication 22870 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE, 22871 /// WebSocket API communication 22872 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET, 22873 /// Web App Manifests 22874 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST, 22875 /// Signed HTTP Exchanges 22876 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE, 22877 /// Ping requests 22878 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING, 22879 /// CSP Violation Reports 22880 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT, 22881 /// Other resources 22882 COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER 22883 } 22884 alias int COREWEBVIEW2_WEB_RESOURCE_CONTEXT; 22885 22886 /// Reason for moving focus. 22887 /+[v1_enum]+/ 22888 enum /+ COREWEBVIEW2_MOVE_FOCUS_REASON+/ 22889 { 22890 /// Code setting focus into WebView. 22891 COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC, 22892 22893 /// Moving focus due to Tab traversal forward. 22894 COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT, 22895 22896 /// Moving focus due to Tab traversal backward. 22897 COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS, 22898 } 22899 alias int COREWEBVIEW2_MOVE_FOCUS_REASON; 22900 22901 /// The type of key event that triggered an AcceleratorKeyPressed event. 22902 /+[v1_enum]+/ 22903 enum /+ COREWEBVIEW2_KEY_EVENT_KIND+/ 22904 { 22905 /// Correspond to window message WM_KEYDOWN. 22906 COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN, 22907 22908 /// Correspond to window message WM_KEYUP. 22909 COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP, 22910 22911 /// Correspond to window message WM_SYSKEYDOWN. 22912 COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN, 22913 22914 /// Correspond to window message WM_SYSKEYUP. 22915 COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP, 22916 } 22917 alias int COREWEBVIEW2_KEY_EVENT_KIND; 22918 22919 /// A structure representing the information packed into the LPARAM given 22920 /// to a Win32 key event. See the documentation for WM_KEYDOWN for details 22921 /// at https://docs.microsoft.com/windows/win32/inputdev/wm-keydown 22922 struct COREWEBVIEW2_PHYSICAL_KEY_STATUS 22923 { 22924 /// The repeat count for the current message. 22925 UINT32 RepeatCount; 22926 /// The scan code. 22927 UINT32 ScanCode; 22928 /// Indicates whether the key is an extended key. 22929 BOOL IsExtendedKey; 22930 /// The context code. 22931 BOOL IsMenuKeyDown; 22932 /// The previous key state. 22933 BOOL WasKeyDown; 22934 /// The transition state. 22935 BOOL IsKeyReleased; 22936 } 22937 // End of enums and structs 22938 22939 /// WebView2 enables you to host web content using the 22940 /// latest Edge web browser technology. 22941 /// 22942 /// ## Navigation events 22943 /// The normal sequence of navigation events is NavigationStarting, 22944 /// SourceChanged, ContentLoading and then NavigationCompleted. 22945 /// The following events describe the state of WebView during each navigation: 22946 /// NavigationStarting: WebView is starting to navigate and the navigation will 22947 /// result in a network request. The host can disallow the request at this time. 22948 /// SourceChanged: The source of WebView is changed to a new URL. This may also 22949 /// be due to a navigation that doesn't cause a network request such as a fragment 22950 /// navigation. 22951 /// HistoryChanged: WebView's history has been updated as a result of 22952 /// the navigation. 22953 /// ContentLoading: WebView has started loading new content. 22954 /// NavigationCompleted: WebView has completed loading content on the new page. 22955 /// Developers can track navigations to each new document by the navigation ID. 22956 /// WebView's navigation ID changes every time there is a successful navigation 22957 /// to a new document. 22958 /// 22959 /// 22960 /// \dot 22961 /// digraph NavigationEvents { 22962 /// node [fontname=Roboto, shape=rectangle] 22963 /// edge [fontname=Roboto] 22964 /// 22965 /// NewDocument -> NavigationStarting; 22966 /// NavigationStarting -> SourceChanged -> ContentLoading [label="New Document"]; 22967 /// ContentLoading -> HistoryChanged; 22968 /// SameDocument -> SourceChanged; 22969 /// SourceChanged -> HistoryChanged [label="Same Document"]; 22970 /// HistoryChanged -> NavigationCompleted; 22971 /// NavigationStarting -> NavigationStarting [label="Redirect"]; 22972 /// NavigationStarting -> NavigationCompleted [label="Failure"]; 22973 /// } 22974 /// \enddot 22975 /// 22976 /// Note that this is for navigation events with the same NavigationId event 22977 /// arg. Navigations events with different NavigationId event args may overlap. 22978 /// For instance, if you start a navigation wait for its NavigationStarting 22979 /// event and then start another navigation you'll see the NavigationStarting 22980 /// for the first navigate followed by the NavigationStarting of the second 22981 /// navigate, followed by the NavigationCompleted for the first navigation and 22982 /// then all the rest of the appropriate navigation events for the second 22983 /// navigation. 22984 /// In error cases there may or may not be a ContentLoading event depending 22985 /// on whether the navigation is continued to an error page. 22986 /// In case of an HTTP redirect, there will be multiple NavigationStarting 22987 /// events in a row, with ones following the first will have their IsRedirect 22988 /// flag set, however navigation ID remains the same. Same document navigations 22989 /// do not result in NavigationStarting event and also do not increment the 22990 /// navigation ID. 22991 /// 22992 /// To monitor or cancel navigations inside subframes in the WebView, use 22993 /// FrameNavigationStarting. 22994 /// 22995 /// ## Process model 22996 /// WebView2 uses the same process model as the Edge web 22997 /// browser. There is one Edge browser process per specified user data directory 22998 /// in a user session that will serve any WebView2 calling 22999 /// process that specifies that user data directory. This means one Edge browser 23000 /// process may be serving multiple calling processes and one calling 23001 /// process may be using multiple Edge browser processes. 23002 /// 23003 /// \dot 23004 /// digraph ProcessModelNClientsNServers { 23005 /// node [fontname=Roboto, shape=rectangle]; 23006 /// edge [fontname=Roboto]; 23007 /// 23008 /// Host1 [label="Calling\nprocess 1"]; 23009 /// Host2 [label="Calling\nprocess 2"]; 23010 /// Browser1 [label="Edge processes\ngroup 1"]; 23011 /// Browser2 [label="Edge processes\ngroup 2"]; 23012 /// 23013 /// Host1 -> Browser1; 23014 /// Host1 -> Browser2; 23015 /// Host2 -> Browser2; 23016 /// } 23017 /// \enddot 23018 /// 23019 /// Associated with each browser process there will be some number of 23020 /// render processes. 23021 /// These are created as 23022 /// necessary to service potentially multiple frames in different WebViews. The 23023 /// number of render processes varies based on the site isolation browser 23024 /// feature and the number of distinct disconnected origins rendered in 23025 /// associated WebViews. 23026 /// 23027 /// \dot 23028 /// digraph ProcessModelClientServer { 23029 /// node [fontname=Roboto, shape=rectangle]; 23030 /// edge [fontname=Roboto]; 23031 /// graph [fontname=Roboto]; 23032 /// 23033 /// Host [label="Calling process"]; 23034 /// subgraph cluster_0 { 23035 /// labeljust = "l"; 23036 /// label = "Edge processes group"; 23037 /// Browser [label="Edge browser\nprocess"]; 23038 /// Render1 [label="Edge render\nprocess 1"]; 23039 /// Render2 [label="Edge render\nprocess 2"]; 23040 /// RenderN [label="Edge render\nprocess N"]; 23041 /// GPU [label="Edge GPU\nprocess"]; 23042 /// } 23043 /// 23044 /// Host -> Browser; 23045 /// Browser -> Render1; 23046 /// Browser -> Render2; 23047 /// Browser -> RenderN; 23048 /// Browser -> GPU; 23049 /// } 23050 /// \enddot 23051 /// 23052 /// You can react to crashes and hangs in these browser and render processes 23053 /// using the ProcessFailure event. 23054 /// 23055 /// You can safely shutdown associated browser and render processes using the 23056 /// Close method. 23057 /// 23058 /// ## Threading model 23059 /// The WebView2 must be created on a UI thread. Specifically a 23060 /// thread with a message pump. All callbacks will occur on that thread and 23061 /// calls into the WebView must be done on that thread. It is not safe to use 23062 /// the WebView from another thread. 23063 /// 23064 /// Callbacks including event handlers and completion handlers execute serially. 23065 /// That is, if you have an event handler running and begin a message loop no 23066 /// other event handlers or completion callbacks will begin executing 23067 /// reentrantly. 23068 /// 23069 /// ## Security 23070 /// Always check the Source property of the WebView before using ExecuteScript, 23071 /// PostWebMessageAsJson, PostWebMessageAsString, or any other method to send 23072 /// information into the WebView. The WebView may have navigated to another page 23073 /// via the end user interacting with the page or script in the page causing 23074 /// navigation. Similarly, be very careful with 23075 /// AddScriptToExecuteOnDocumentCreated. All future navigations will run this 23076 /// script and if it provides access to information intended only for a certain 23077 /// origin, any HTML document may have access. 23078 /// 23079 /// When examining the result of an ExecuteScript method call, a 23080 /// WebMessageReceived event, always check the Source of the sender, or any 23081 /// other mechanism of receiving information from an HTML document in a WebView 23082 /// validate the URI of the HTML document is what you expect. 23083 /// 23084 /// When constructing a message to send into a WebView, prefer using 23085 /// PostWebMessageAsJson and construct the JSON string parameter using a JSON 23086 /// library. This will prevent accidentally encoding information into a JSON string 23087 /// or script, and ensure no attacker controlled input can 23088 /// modify the rest of the JSON message or run arbitrary script. 23089 /// 23090 /// ## String types 23091 /// String out parameters are LPWSTR null terminated strings. The callee 23092 /// allocates the string using CoTaskMemAlloc. Ownership is transferred to the 23093 /// caller and it is up to the caller to free the memory using CoTaskMemFree. 23094 /// 23095 /// String in parameters are LPCWSTR null terminated strings. The caller ensures 23096 /// the string is valid for the duration of the synchronous function call. 23097 /// If the callee needs to retain that value to some point after the function 23098 /// call completes, the callee must allocate its own copy of the string value. 23099 /// 23100 /// ## URI and JSON parsing 23101 /// Various methods provide or accept URIs and JSON as strings. Please use your 23102 /// own preferred library for parsing and generating these strings. 23103 /// 23104 /// If WinRT is available for your app you can use `Windows.Data.Json.JsonObject` 23105 /// and `IJsonObjectStatics` to parse or produce JSON strings or `Windows.Foundation.Uri` 23106 /// and `IUriRuntimeClassFactory` to parse and produce URIs. Both of these work 23107 /// in Win32 apps. 23108 /// 23109 /// If you use IUri and CreateUri to parse URIs you may want to use the 23110 /// following URI creation flags to have CreateUri behavior more closely match 23111 /// the URI parsing in the WebView: 23112 /// `Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME | Uri_CREATE_NO_DECODE_EXTRA_INFO` 23113 /// 23114 /// ## Debugging 23115 /// Open DevTools with the normal shortcuts: `F12` or `Ctrl+Shift+I`. 23116 /// You can use the `--auto-open-devtools-for-tabs` command argument switch to 23117 /// have the DevTools window open immediately when first creating a WebView. See 23118 /// CreateCoreWebView2Controller documentation for how to provide additional command 23119 /// line arguments to the browser process. 23120 /// Check out the LoaderOverride registry key in the CreateCoreWebView2Controller 23121 /// documentation. 23122 /// 23123 /// ## Versioning 23124 /// After you've used a particular version of the SDK to build your app, your 23125 /// app may end up running with an older or newer version of installed browser 23126 /// binaries. Until version 1.0.0.0 of WebView2 there may be breaking changes 23127 /// during updates that will prevent your SDK from working with different 23128 /// versions of installed browser binaries. After version 1.0.0.0 different 23129 /// versions of the SDK can work with different versions of the installed 23130 /// browser by following these best practices: 23131 /// 23132 /// To account for breaking changes to the API be sure to check for failure when 23133 /// calling the DLL export CreateCoreWebView2Environment and when 23134 /// calling QueryInterface on any CoreWebView2 object. A return value of 23135 /// E_NOINTERFACE can indicate the SDK is not compatible with the Edge 23136 /// browser binaries. 23137 /// 23138 /// Checking for failure from QueryInterface will also account for cases where 23139 /// the SDK is newer than the version of the Edge browser and your app attempts 23140 /// to use an interface of which the Edge browser is unaware. 23141 /// 23142 /// When an interface is unavailable, you can consider disabling the associated 23143 /// feature if possible, or otherwise informing the end user they need to update 23144 /// their browser. 23145 const GUID IID_ICoreWebView2 = ICoreWebView2.iid; 23146 23147 interface ICoreWebView2 : IUnknown 23148 { 23149 static const GUID iid = { 0x76eceacb,0x0462,0x4d94,[ 0xac,0x83,0x42,0x3a,0x67,0x93,0x77,0x5e ] }; 23150 extern(Windows): 23151 /// The ICoreWebView2Settings object contains various modifiable settings for 23152 /// the running WebView. 23153 /+[ propget]+/ 23154 HRESULT get_Settings(/+[out, retval]+/ ICoreWebView2Settings * settings); 23155 23156 /// The URI of the current top level document. This value potentially 23157 /// changes as a part of the SourceChanged event firing for some cases 23158 /// such as navigating to a different site or fragment navigations. It will 23159 /// remain the same for other types of navigations such as page reloads or 23160 /// history.pushState with the same URL as the current page. 23161 /// 23162 /// \snippet ControlComponent.cpp SourceChanged 23163 /+[ propget]+/ 23164 HRESULT get_Source(/+[out, retval]+/ LPWSTR* uri); 23165 23166 /// Cause a navigation of the top level document to the specified URI. See 23167 /// the navigation events for more information. Note that this starts a 23168 /// navigation and the corresponding NavigationStarting event will fire 23169 /// sometime after this Navigate call completes. 23170 /// 23171 /// \snippet ControlComponent.cpp Navigate 23172 HRESULT Navigate(in LPCWSTR uri); 23173 23174 /// Initiates a navigation to htmlContent as source HTML of a new 23175 /// document. The htmlContent parameter may not be larger than 2 MB 23176 /// in total size. The origin of the new page will be about:blank. 23177 /// 23178 /// \snippet SettingsComponent.cpp NavigateToString 23179 HRESULT NavigateToString(in LPCWSTR htmlContent); 23180 23181 /// Add an event handler for the NavigationStarting event. 23182 /// NavigationStarting fires when the WebView main frame is 23183 /// requesting permission to navigate to a different URI. This will fire for 23184 /// redirects as well. 23185 /// 23186 /// Corresponding navigations can be blocked until the event handler returns. 23187 /// 23188 /// \snippet SettingsComponent.cpp NavigationStarting 23189 HRESULT add_NavigationStarting( 23190 /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler, 23191 /+[out]+/ EventRegistrationToken* token); 23192 /// Remove an event handler previously added with add_NavigationStarting. 23193 HRESULT remove_NavigationStarting( 23194 in EventRegistrationToken token); 23195 23196 /// Add an event handler for the ContentLoading event. 23197 /// ContentLoading fires before any content is loaded, including scripts added 23198 /// with AddScriptToExecuteOnDocumentCreated. 23199 /// ContentLoading will not fire if a same page navigation occurs 23200 /// (such as through fragment navigations or history.pushState navigations). 23201 /// This follows the NavigationStarting and SourceChanged events and 23202 /// precedes the HistoryChanged and NavigationCompleted events. 23203 HRESULT add_ContentLoading( 23204 /+[in]+/ ICoreWebView2ContentLoadingEventHandler eventHandler, 23205 /+[out]+/ EventRegistrationToken* token); 23206 /// Remove an event handler previously added with add_ContentLoading. 23207 HRESULT remove_ContentLoading( 23208 in EventRegistrationToken token); 23209 23210 /// Add an event handler for the SourceChanged event. 23211 /// SourceChanged fires when the Source property changes. 23212 /// SourceChanged fires for navigating to a different site or fragment 23213 /// navigations. 23214 /// It will not fire for other types of navigations such as page reloads or 23215 /// history.pushState with the same URL as the current page. 23216 /// SourceChanged fires before ContentLoading for navigation to a new document. 23217 /// 23218 /// \snippet ControlComponent.cpp SourceChanged 23219 HRESULT add_SourceChanged( 23220 /+[in]+/ ICoreWebView2SourceChangedEventHandler eventHandler, 23221 /+[out]+/ EventRegistrationToken* token); 23222 /// Remove an event handler previously added with add_SourceChanged. 23223 HRESULT remove_SourceChanged( 23224 in EventRegistrationToken token); 23225 23226 /// Add an event handler for the HistoryChanged event. 23227 /// HistoryChanged listens to the change of navigation history for the top 23228 /// level document. Use HistoryChanged to check if CanGoBack/CanGoForward 23229 /// value has changed. HistoryChanged also fires for using GoBack/GoForward. 23230 /// HistoryChanged fires after SourceChanged and ContentLoading. 23231 /// 23232 /// \snippet ControlComponent.cpp HistoryChanged 23233 HRESULT add_HistoryChanged( 23234 /+[in]+/ ICoreWebView2HistoryChangedEventHandler eventHandler, 23235 /+[out]+/ EventRegistrationToken* token); 23236 /// Remove an event handler previously added with add_HistoryChanged. 23237 HRESULT remove_HistoryChanged( 23238 in EventRegistrationToken token); 23239 23240 /// Add an event handler for the NavigationCompleted event. 23241 /// NavigationCompleted fires when the WebView has completely loaded 23242 /// (body.onload has fired) or loading stopped with error. 23243 /// 23244 /// \snippet ControlComponent.cpp NavigationCompleted 23245 HRESULT add_NavigationCompleted( 23246 /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler, 23247 /+[out]+/ EventRegistrationToken* token); 23248 /// Remove an event handler previously added with add_NavigationCompleted. 23249 HRESULT remove_NavigationCompleted( 23250 in EventRegistrationToken token); 23251 23252 /// Add an event handler for the FrameNavigationStarting event. 23253 /// FrameNavigationStarting fires when a child frame in the WebView 23254 /// requests permission to navigate to a different URI. This will fire for 23255 /// redirects as well. 23256 /// 23257 /// Corresponding navigations can be blocked until the event handler returns. 23258 /// 23259 /// \snippet SettingsComponent.cpp FrameNavigationStarting 23260 HRESULT add_FrameNavigationStarting( 23261 /+[in]+/ ICoreWebView2NavigationStartingEventHandler eventHandler, 23262 /+[out]+/ EventRegistrationToken* token); 23263 /// Remove an event handler previously added with add_FrameNavigationStarting. 23264 HRESULT remove_FrameNavigationStarting( 23265 in EventRegistrationToken token); 23266 23267 /// Add an event handler for the FrameNavigationCompleted event. 23268 /// FrameNavigationCompleted fires when a child frame has completely 23269 /// loaded (body.onload has fired) or loading stopped with error. 23270 /// 23271 /// \snippet ControlComponent.cpp FrameNavigationCompleted 23272 HRESULT add_FrameNavigationCompleted( 23273 /+[in]+/ ICoreWebView2NavigationCompletedEventHandler eventHandler, 23274 /+[out]+/ EventRegistrationToken* token); 23275 /// Remove an event handler previously added with add_FrameNavigationCompleted. 23276 HRESULT remove_FrameNavigationCompleted( 23277 in EventRegistrationToken token); 23278 23279 /// Add an event handler for the ScriptDialogOpening event. 23280 /// ScriptDialogOpening fires when a JavaScript dialog (alert, confirm, 23281 /// prompt, or beforeunload) will show for the webview. This event only fires 23282 /// if the ICoreWebView2Settings::AreDefaultScriptDialogsEnabled property is 23283 /// set to false. The ScriptDialogOpening event can be used to suppress 23284 /// dialogs or replace default dialogs with custom dialogs. 23285 /// 23286 /// If a deferral is not taken on the event args, the subsequent scripts can be 23287 /// blocked until the event handler returns. If a deferral is taken, then the 23288 /// scripts are blocked until the deferral is completed. 23289 /// 23290 /// \snippet SettingsComponent.cpp ScriptDialogOpening 23291 HRESULT add_ScriptDialogOpening( 23292 /+[in]+/ ICoreWebView2ScriptDialogOpeningEventHandler eventHandler, 23293 /+[out]+/ EventRegistrationToken* token); 23294 /// Remove an event handler previously added with add_ScriptDialogOpening. 23295 HRESULT remove_ScriptDialogOpening( 23296 in EventRegistrationToken token); 23297 23298 /// Add an event handler for the PermissionRequested event. 23299 /// PermissionRequested fires when content in a WebView requests permission to 23300 /// access some privileged resources. 23301 /// 23302 /// If a deferral is not taken on the event args, the subsequent scripts can 23303 /// be blocked until the event handler returns. If a deferral is taken, then 23304 /// the scripts are blocked until the deferral is completed. 23305 /// 23306 /// \snippet SettingsComponent.cpp PermissionRequested 23307 HRESULT add_PermissionRequested( 23308 /+[in]+/ ICoreWebView2PermissionRequestedEventHandler eventHandler, 23309 /+[out]+/ EventRegistrationToken* token); 23310 /// Remove an event handler previously added with add_PermissionRequested. 23311 HRESULT remove_PermissionRequested( 23312 in EventRegistrationToken token); 23313 23314 /// Add an event handler for the ProcessFailed event. 23315 /// ProcessFailed fires when a WebView process is terminated unexpectedly or 23316 /// becomes unresponsive. 23317 /// 23318 /// \snippet ProcessComponent.cpp ProcessFailed 23319 HRESULT add_ProcessFailed( 23320 /+[in]+/ ICoreWebView2ProcessFailedEventHandler eventHandler, 23321 /+[out]+/ EventRegistrationToken* token); 23322 /// Remove an event handler previously added with add_ProcessFailed. 23323 HRESULT remove_ProcessFailed( 23324 in EventRegistrationToken token); 23325 23326 /// Add the provided JavaScript to a list of scripts that should be executed 23327 /// after the global object has been created, but before the HTML document has 23328 /// been parsed and before any other script included by the HTML document is 23329 /// executed. This method injects a script that runs on all top-level document 23330 /// and child frame page navigations. 23331 /// This method runs asynchronously, and you must wait for the completion 23332 /// handler to finish before the injected script is ready to run. When this 23333 /// method completes, the handler's `Invoke` method is called with the `id` of 23334 /// the injected script. `id` is a string. To remove the injected script, use 23335 /// `RemoveScriptToExecuteOnDocumentCreated`. 23336 /// 23337 /// Note that if an HTML document has sandboxing of some kind via 23338 /// [sandbox](https://developer.mozilla.org/docs/Web/HTML/Element/iframe#attr-sandbox) 23339 /// properties or the [Content-Security-Policy HTTP 23340 /// header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy) 23341 /// this will affect the script run here. So, for example, if the 23342 /// 'allow-modals' keyword is not set then calls to the `alert` function will 23343 /// be ignored. 23344 /// 23345 /// \snippet ScriptComponent.cpp AddScriptToExecuteOnDocumentCreated 23346 HRESULT AddScriptToExecuteOnDocumentCreated( 23347 in LPCWSTR javaScript, 23348 /+[in]+/ ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler handler); 23349 23350 /// Remove the corresponding JavaScript added using `AddScriptToExecuteOnDocumentCreated` 23351 /// with the specified script id. 23352 HRESULT RemoveScriptToExecuteOnDocumentCreated(in LPCWSTR id); 23353 23354 /// Execute JavaScript code from the javascript parameter in the 23355 /// current top level document rendered in the WebView. This will execute 23356 /// asynchronously and when complete, if a handler is provided in the 23357 /// ExecuteScriptCompletedHandler parameter, its Invoke method will be 23358 /// called with the result of evaluating the provided JavaScript. The result 23359 /// value is a JSON encoded string. 23360 /// If the result is undefined, contains a reference cycle, or otherwise 23361 /// cannot be encoded into JSON, the JSON null value will be returned as the 23362 /// string 'null'. Note that a function that has no explicit return value 23363 /// returns undefined. 23364 /// If the executed script throws an unhandled exception, then the result is 23365 /// also 'null'. 23366 /// This method is applied asynchronously. If the method is called after 23367 /// NavigationStarting event during a navigation, the script will be executed 23368 /// in the new document when loading it, around the time ContentLoading is 23369 /// fired. ExecuteScript will work even if 23370 /// ICoreWebView2Settings::IsScriptEnabled is set to FALSE. 23371 /// 23372 /// \snippet ScriptComponent.cpp ExecuteScript 23373 HRESULT ExecuteScript( 23374 in LPCWSTR javaScript, 23375 /+[in]+/ ICoreWebView2ExecuteScriptCompletedHandler handler); 23376 23377 /// Capture an image of what WebView is displaying. Specify the 23378 /// format of the image with the imageFormat parameter. 23379 /// The resulting image binary data is written to the provided imageStream 23380 /// parameter. When CapturePreview finishes writing to the stream, the Invoke 23381 /// method on the provided handler parameter is called. 23382 /// 23383 /// \snippet FileComponent.cpp CapturePreview 23384 HRESULT CapturePreview( 23385 in COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT imageFormat, 23386 in IStream* imageStream, 23387 /+[in]+/ ICoreWebView2CapturePreviewCompletedHandler handler); 23388 23389 /// Reload the current page. This is similar to navigating to the URI of 23390 /// current top level document including all navigation events firing and 23391 /// respecting any entries in the HTTP cache. But, the back/forward history 23392 /// will not be modified. 23393 HRESULT Reload(); 23394 23395 /// Post the specified webMessage to the top level document in this WebView. 23396 /// The top level document's window.chrome.webview's message event fires. 23397 /// JavaScript in that document may subscribe and unsubscribe to the event 23398 /// via the following: 23399 /// 23400 /// ``` 23401 /// window.chrome.webview.addEventListener('message', handler) 23402 /// window.chrome.webview.removeEventListener('message', handler) 23403 /// ``` 23404 /// 23405 /// The event args is an instance of `MessageEvent`. 23406 /// The ICoreWebView2Settings::IsWebMessageEnabled setting must be true or 23407 /// this method will fail with E_INVALIDARG. 23408 /// The event arg's data property is the webMessage string parameter parsed 23409 /// as a JSON string into a JavaScript object. 23410 /// The event arg's source property is a reference to the 23411 /// `window.chrome.webview` object. 23412 /// See add_WebMessageReceived for information on sending messages from the 23413 /// HTML document in the WebView to the host. 23414 /// This message is sent asynchronously. If a navigation occurs before the 23415 /// message is posted to the page, then the message will not be sent. 23416 /// 23417 /// \snippet ScenarioWebMessage.cpp WebMessageReceived 23418 HRESULT PostWebMessageAsJson(in LPCWSTR webMessageAsJson); 23419 23420 /// This is a helper for posting a message that is a simple string 23421 /// rather than a JSON string representation of a JavaScript object. This 23422 /// behaves in exactly the same manner as PostWebMessageAsJson but the 23423 /// `window.chrome.webview` message event arg's data property will be a string 23424 /// with the same value as webMessageAsString. Use this instead of 23425 /// PostWebMessageAsJson if you want to communicate via simple strings rather 23426 /// than JSON objects. 23427 HRESULT PostWebMessageAsString(in LPCWSTR webMessageAsString); 23428 23429 /// Add an event handler for the WebMessageReceived event. 23430 /// WebMessageReceived fires when the 23431 /// ICoreWebView2Settings::IsWebMessageEnabled setting is set and the top 23432 /// level document of the WebView calls `window.chrome.webview.postMessage`. 23433 /// The postMessage function is `void postMessage(object)` where 23434 /// object is any object supported by JSON conversion. 23435 /// 23436 /// \snippet ScenarioWebMessage.html chromeWebView 23437 /// 23438 /// When postMessage is called, the handler's Invoke method will be called 23439 /// with the postMessage's object parameter converted to a JSON string. 23440 /// 23441 /// \snippet ScenarioWebMessage.cpp WebMessageReceived 23442 HRESULT add_WebMessageReceived( 23443 /+[in]+/ ICoreWebView2WebMessageReceivedEventHandler handler, 23444 /+[out]+/ EventRegistrationToken* token); 23445 /// Remove an event handler previously added with add_WebMessageReceived. 23446 HRESULT remove_WebMessageReceived( 23447 in EventRegistrationToken token); 23448 23449 /// Call an asynchronous DevToolsProtocol method. See the 23450 /// [DevTools Protocol Viewer](https://aka.ms/DevToolsProtocolDocs) 23451 /// for a list and description of available methods. 23452 /// The methodName parameter is the full name of the method in the format 23453 /// `{domain}.{method}`. 23454 /// The parametersAsJson parameter is a JSON formatted string containing 23455 /// the parameters for the corresponding method. 23456 /// The handler's Invoke method will be called when the method asynchronously 23457 /// completes. Invoke will be called with the method's return object as a 23458 /// JSON string. 23459 /// 23460 /// \snippet ScriptComponent.cpp CallDevToolsProtocolMethod 23461 HRESULT CallDevToolsProtocolMethod( 23462 in LPCWSTR methodName, 23463 in LPCWSTR parametersAsJson, 23464 /+[in]+/ ICoreWebView2CallDevToolsProtocolMethodCompletedHandler handler); 23465 23466 /// The process id of the browser process that hosts the WebView. 23467 /+[ propget]+/ 23468 HRESULT get_BrowserProcessId(/+[out, retval]+/ UINT32* value); 23469 23470 /// Returns true if the WebView can navigate to a previous page in the 23471 /// navigation history. 23472 /// The HistoryChanged event will fire if CanGoBack changes value. 23473 /+[ propget]+/ 23474 HRESULT get_CanGoBack(/+[out, retval]+/ BOOL* canGoBack); 23475 /// Returns true if the WebView can navigate to a next page in the navigation 23476 /// history. 23477 /// The HistoryChanged event will fire if CanGoForward changes value. 23478 /+[ propget]+/ 23479 HRESULT get_CanGoForward(/+[out, retval]+/ BOOL* canGoForward); 23480 /// Navigates the WebView to the previous page in the navigation history. 23481 HRESULT GoBack(); 23482 /// Navigates the WebView to the next page in the navigation history. 23483 HRESULT GoForward(); 23484 23485 /// Get a DevTools Protocol event receiver that allows you to subscribe to 23486 /// a DevTools Protocol event. 23487 /// The eventName parameter is the full name of the event in the format 23488 /// `{domain}.{event}`. 23489 /// See the [DevTools Protocol Viewer](https://aka.ms/DevToolsProtocolDocs) 23490 /// for a list of DevTools Protocol events description, and event args. 23491 /// 23492 /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived 23493 HRESULT GetDevToolsProtocolEventReceiver( 23494 in LPCWSTR eventName, 23495 /+[out, retval]+/ ICoreWebView2DevToolsProtocolEventReceiver * receiver); 23496 23497 /// Stop all navigations and pending resource fetches. Does not stop 23498 /// scripts. 23499 HRESULT Stop(); 23500 23501 /// Add an event handler for the NewWindowRequested event. 23502 /// NewWindowRequested fires when content inside the WebView requests to open 23503 /// a new window, such as through window.open. The app can pass a target 23504 /// WebView that will be considered the opened window. 23505 /// 23506 /// Scripts resulted in the new window requested can be blocked until the 23507 /// event handler returns if a deferral is not taken on the event args. If a 23508 /// deferral is taken, then scripts are blocked until the deferral is 23509 /// completed. 23510 /// 23511 /// \snippet AppWindow.cpp NewWindowRequested 23512 HRESULT add_NewWindowRequested( 23513 /+[in]+/ ICoreWebView2NewWindowRequestedEventHandler eventHandler, 23514 /+[out]+/ EventRegistrationToken* token); 23515 /// Remove an event handler previously added with add_NewWindowRequested. 23516 HRESULT remove_NewWindowRequested( 23517 in EventRegistrationToken token); 23518 23519 /// Add an event handler for the DocumentTitleChanged event. 23520 /// DocumentTitleChanged fires when the DocumentTitle property of the WebView 23521 /// changes and may fire before or after the NavigationCompleted event. 23522 /// 23523 /// \snippet FileComponent.cpp DocumentTitleChanged 23524 HRESULT add_DocumentTitleChanged( 23525 /+[in]+/ ICoreWebView2DocumentTitleChangedEventHandler eventHandler, 23526 /+[out]+/ EventRegistrationToken* token); 23527 /// Remove an event handler previously added with add_DocumentTitleChanged. 23528 HRESULT remove_DocumentTitleChanged( 23529 in EventRegistrationToken token); 23530 23531 /// The title for the current top level document. 23532 /// If the document has no explicit title or is otherwise empty, 23533 /// a default that may or may not match the URI of the document will be used. 23534 /+[ propget]+/ 23535 HRESULT get_DocumentTitle(/+[out, retval]+/ LPWSTR* title); 23536 23537 /// Add the provided host object to script running in the WebView with the 23538 /// specified name. 23539 /// Host objects are exposed as host object proxies via 23540 /// `window.chrome.webview.hostObjects.<name>`. 23541 /// Host object proxies are promises and will resolve to an object 23542 /// representing the host object. 23543 /// The promise is rejected if the app has not added an object with the name. 23544 /// When JavaScript code access a property or method of the object, a promise 23545 /// is return, which will resolve to the value returned from the host for the 23546 /// property or method, or rejected in case of error such as there is no such 23547 /// property or method on the object or parameters are invalid. 23548 /// For example, when the application code does the following: 23549 /// 23550 /// ``` 23551 /// VARIANT object; 23552 /// object.vt = VT_DISPATCH; 23553 /// object.pdispVal = appObject; 23554 /// webview->AddHostObjectToScript(L"host_object", &host); 23555 /// ``` 23556 /// 23557 /// JavaScript code in the WebView will be able to access appObject as 23558 /// following and then access attributes and methods of appObject: 23559 /// 23560 /// ``` 23561 /// let app_object = await window.chrome.webview.hostObjects.host_object; 23562 /// let attr1 = await app_object.attr1; 23563 /// let result = await app_object.method1(parameters); 23564 /// ``` 23565 /// 23566 /// Note that while simple types, IDispatch and array are supported, generic 23567 /// IUnknown, VT_DECIMAL, or VT_RECORD variant is not supported. 23568 /// Remote JavaScript objects like callback functions are represented as 23569 /// an VT_DISPATCH VARIANT with the object implementing IDispatch. The 23570 /// JavaScript callback method may be invoked using DISPID_VALUE for the 23571 /// DISPID. 23572 /// Nested arrays are supported up to a depth of 3. 23573 /// Arrays of by reference types are not supported. 23574 /// VT_EMPTY and VT_NULL are mapped into JavaScript as null. In JavaScript 23575 /// null and undefined are mapped to VT_EMPTY. 23576 /// 23577 /// Additionally, all host objects are exposed as 23578 /// `window.chrome.webview.hostObjects.sync.<name>`. Here the host 23579 /// objects are exposed as synchronous host object proxies. These are not 23580 /// promises and calls to functions or property access synchronously block 23581 /// running script waiting to communicate cross process for the host code to 23582 /// run. Accordingly this can result in reliability issues and it is 23583 /// recommended that you use the promise based asynchronous 23584 /// `window.chrome.webview.hostObjects.<name>` API described above. 23585 /// 23586 /// Synchronous host object proxies and asynchronous host object proxies 23587 /// can both proxy the same host object. Remote changes made by one proxy 23588 /// will be reflected in any other proxy of that same host object whether 23589 /// the other proxies and synchronous or asynchronous. 23590 /// 23591 /// While JavaScript is blocked on a synchronous call to native code, that 23592 /// native code is unable to call back to JavaScript. Attempts to do so will 23593 /// fail with HRESULT_FROM_WIN32(ERROR_POSSIBLE_DEADLOCK). 23594 /// 23595 /// Host object proxies are JavaScript Proxy objects that intercept all 23596 /// property get, property set, and method invocations. Properties or methods 23597 /// that are a part of the Function or Object prototype are run locally. 23598 /// Additionally any property or method in the array 23599 /// `chrome.webview.hostObjects.options.forceLocalProperties` will also be 23600 /// run locally. This defaults to including optional methods that have 23601 /// meaning in JavaScript like `toJSON` and `Symbol.toPrimitive`. You can add 23602 /// more to this array as required. 23603 /// 23604 /// There's a method `chrome.webview.hostObjects.cleanupSome` that will best 23605 /// effort garbage collect host object proxies. 23606 /// 23607 /// Host object proxies additionally have the following methods which run 23608 /// locally: 23609 /// * applyHostFunction, getHostProperty, setHostProperty: Perform a 23610 /// method invocation, property get, or property set on the host object. 23611 /// You can use these to explicitly force a method or property to run 23612 /// remotely if there is a conflicting local method or property. For 23613 /// instance, `proxy.toString()` will run the local toString method on the 23614 /// proxy object. But ``proxy.applyHostFunction('toString')`` runs 23615 /// `toString` on the host proxied object instead. 23616 /// * getLocalProperty, setLocalProperty: Perform property get, or property 23617 /// set locally. You can use these methods to force getting or setting a 23618 /// property on the host object proxy itself rather than on the host 23619 /// object it represents. For instance, `proxy.unknownProperty` will get the 23620 /// property named `unknownProperty` from the host proxied object. But 23621 /// ``proxy.getLocalProperty('unknownProperty')`` will get the value of the property 23622 /// `unknownProperty` on the proxy object itself. 23623 /// * sync: Asynchronous host object proxies expose a sync method which 23624 /// returns a promise for a synchronous host object proxy for the same 23625 /// host object. For example, 23626 /// `chrome.webview.hostObjects.sample.methodCall()` returns an 23627 /// asynchronous host object proxy. You can use the `sync` method to 23628 /// obtain a synchronous host object proxy instead: 23629 /// `const syncProxy = await chrome.webview.hostObjects.sample.methodCall().sync()` 23630 /// * async: Synchronous host object proxies expose an async method which 23631 /// blocks and returns an asynchronous host object proxy for the same 23632 /// host object. For example, `chrome.webview.hostObjects.sync.sample.methodCall()` returns a 23633 /// synchronous host object proxy. Calling the `async` method on this blocks 23634 /// and then returns an asynchronous host object proxy for the same host object: 23635 /// `const asyncProxy = chrome.webview.hostObjects.sync.sample.methodCall().async()` 23636 /// * then: Asynchronous host object proxies have a then method. This 23637 /// allows them to be awaitable. `then` will return a promise that resolves 23638 /// with a representation of the host object. If the proxy represents a 23639 /// JavaScript literal then a copy of that is returned locally. If 23640 /// the proxy represents a function then a non-awaitable proxy is returned. 23641 /// If the proxy represents a JavaScript object with a mix of literal 23642 /// properties and function properties, then the a copy of the object is 23643 /// returned with some properties as host object proxies. 23644 /// 23645 /// All other property and method invocations (other than the above Remote 23646 /// object proxy methods, forceLocalProperties list, and properties on 23647 /// Function and Object prototypes) are run remotely. Asynchronous host 23648 /// object proxies return a promise representing asynchronous completion of 23649 /// remotely invoking the method, or getting the property. 23650 /// The promise resolves after the remote operations complete and 23651 /// the promises resolve to the resulting value of the operation. 23652 /// Synchronous host object proxies work similarly but block JavaScript 23653 /// execution and wait for the remote operation to complete. 23654 /// 23655 /// Setting a property on an asynchronous host object proxy works slightly 23656 /// differently. The set returns immediately and the return value is the value 23657 /// that will be set. This is a requirement of the JavaScript Proxy object. 23658 /// If you need to asynchronously wait for the property set to complete, use 23659 /// the setHostProperty method which returns a promise as described above. 23660 /// Synchronous object property set property synchronously blocks until the 23661 /// property is set. 23662 /// 23663 /// For example, suppose you have a COM object with the following interface 23664 /// 23665 /// \snippet HostObjectSample.idl AddHostObjectInterface 23666 /// 23667 /// We can add an instance of this interface into our JavaScript with 23668 /// `AddHostObjectToScript`. In this case we name it `sample`: 23669 /// 23670 /// \snippet ScenarioAddHostObject.cpp AddHostObjectToScript 23671 /// 23672 /// Then in the HTML document we can use this COM object via `chrome.webview.hostObjects.sample`: 23673 /// 23674 /// \snippet ScenarioAddHostObject.html HostObjectUsage 23675 /// Exposing host objects to script has security risk. Please follow 23676 /// [best practices](https://docs.microsoft.com/microsoft-edge/webview2/concepts/security). 23677 HRESULT AddHostObjectToScript(in LPCWSTR name, in VARIANT* object); 23678 23679 /// Remove the host object specified by the name so that it is no longer 23680 /// accessible from JavaScript code in the WebView. 23681 /// While new access attempts will be denied, if the object is already 23682 /// obtained by JavaScript code in the WebView, the JavaScript code will 23683 /// continue to have access to that object. 23684 /// Calling this method for a name that is already removed or never added will 23685 /// fail. 23686 HRESULT RemoveHostObjectFromScript(in LPCWSTR name); 23687 23688 /// Opens the DevTools window for the current document in the WebView. 23689 /// Does nothing if called when the DevTools window is already open. 23690 HRESULT OpenDevToolsWindow(); 23691 23692 /// Add an event handler for the ContainsFullScreenElementChanged event. 23693 /// ContainsFullScreenElementChanged fires when the ContainsFullScreenElement 23694 /// property changes. This means that an HTML element inside the WebView is 23695 /// entering fullscreen to the size of the WebView or leaving fullscreen. This 23696 /// event is useful when, for example, a video element requests to go 23697 /// fullscreen. The listener of ContainsFullScreenElementChanged can then 23698 /// resize the WebView in response. 23699 /// 23700 /// \snippet AppWindow.cpp ContainsFullScreenElementChanged 23701 HRESULT add_ContainsFullScreenElementChanged( 23702 /+[in]+/ ICoreWebView2ContainsFullScreenElementChangedEventHandler eventHandler, 23703 /+[out]+/ EventRegistrationToken* token); 23704 /// Remove an event handler previously added with 23705 /// add_ContainsFullScreenElementChanged. 23706 HRESULT remove_ContainsFullScreenElementChanged( 23707 in EventRegistrationToken token); 23708 23709 /// Indicates if the WebView contains a fullscreen HTML element. 23710 /+[ propget]+/ 23711 HRESULT get_ContainsFullScreenElement( 23712 /+[out, retval]+/ BOOL* containsFullScreenElement); 23713 23714 /// Add an event handler for the WebResourceRequested event. 23715 /// WebResourceRequested fires when the WebView is performing a URL request to 23716 /// a matching URL and resource context filter that was added with 23717 /// AddWebResourceRequestedFilter. At least one filter must be added for the 23718 /// event to fire. 23719 /// 23720 /// The web resource requested can be blocked until the event handler returns 23721 /// if a deferral is not taken on the event args. If a deferral is taken, then 23722 /// the web resource requested is blocked until the deferral is completed. 23723 /// 23724 /// \snippet SettingsComponent.cpp WebResourceRequested 23725 HRESULT add_WebResourceRequested( 23726 /+[in]+/ ICoreWebView2WebResourceRequestedEventHandler eventHandler, 23727 /+[out]+/ EventRegistrationToken* token); 23728 /// Remove an event handler previously added with add_WebResourceRequested. 23729 HRESULT remove_WebResourceRequested( 23730 in EventRegistrationToken token); 23731 23732 /// Adds a URI and resource context filter to the WebResourceRequested event. 23733 /// The URI parameter can be a wildcard string ('*': zero or more, '?': 23734 /// exactly one). nullptr is equivalent to L"". 23735 /// See COREWEBVIEW2_WEB_RESOURCE_CONTEXT enum for description of resource 23736 /// context filters. 23737 HRESULT AddWebResourceRequestedFilter( 23738 in LPCWSTR uri, 23739 in COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); 23740 /// Removes a matching WebResource filter that was previously added for the 23741 /// WebResourceRequested event. If the same filter was added multiple times, 23742 /// then it will need to be removed as many times as it was added for the 23743 /// removal to be effective. Returns E_INVALIDARG for a filter that was never 23744 /// added. 23745 HRESULT RemoveWebResourceRequestedFilter( 23746 in LPCWSTR uri, 23747 in COREWEBVIEW2_WEB_RESOURCE_CONTEXT resourceContext); 23748 23749 /// Add an event handler for the WindowCloseRequested event. 23750 /// WindowCloseRequested fires when content inside the WebView requested to 23751 /// close the window, such as after window.close is called. The app should 23752 /// close the WebView and related app window if that makes sense to the app. 23753 /// 23754 /// \snippet AppWindow.cpp WindowCloseRequested 23755 HRESULT add_WindowCloseRequested( 23756 /+[in]+/ ICoreWebView2WindowCloseRequestedEventHandler eventHandler, 23757 /+[out]+/ EventRegistrationToken* token); 23758 /// Remove an event handler previously added with add_WindowCloseRequested. 23759 HRESULT remove_WindowCloseRequested( 23760 in EventRegistrationToken token); 23761 } 23762 23763 /// This interface is the owner of the CoreWebView2 object, and provides support 23764 /// for resizing, showing and hiding, focusing, and other functionality related 23765 /// to windowing and composition. The CoreWebView2Controller owns the CoreWebView2, 23766 /// and if all references to the CoreWebView2Controller go away, the WebView will 23767 /// be closed. 23768 const GUID IID_ICoreWebView2Controller = ICoreWebView2Controller.iid; 23769 23770 interface ICoreWebView2Controller : IUnknown 23771 { 23772 static const GUID iid = { 0x4d00c0d1,0x9434,0x4eb6,[ 0x80,0x78,0x86,0x97,0xa5,0x60,0x33,0x4f ] }; 23773 extern(Windows): 23774 /// The IsVisible property determines whether to show or hide the WebView. 23775 /// If IsVisible is set to false, the WebView will be transparent and will 23776 /// not be rendered. However, this will not affect the window containing 23777 /// the WebView (the HWND parameter that was passed to CreateCoreWebView2Controller). 23778 /// If you want that window to disappear too, call ShowWindow on it directly 23779 /// in addition to modifying the IsVisible property. 23780 /// WebView as a child window won't get window messages when the top window 23781 /// is minimized or restored. For performance reason, developer should set 23782 /// IsVisible property of the WebView to false when the app window is 23783 /// minimized and back to true when app window is restored. App window can do 23784 /// this by handling SC_MINIMIZE and SC_RESTORE command upon receiving 23785 /// WM_SYSCOMMAND message. 23786 /// 23787 /// \snippet ViewComponent.cpp ToggleIsVisible 23788 /+[ propget]+/ 23789 HRESULT get_IsVisible(/+[out, retval]+/ BOOL* isVisible); 23790 /// Set the IsVisible property. 23791 /// 23792 /// \snippet ViewComponent.cpp ToggleIsVisibleOnMinimize 23793 /+[ propput]+/ 23794 HRESULT put_IsVisible(in BOOL isVisible); 23795 23796 /// The WebView bounds. 23797 /// Bounds are relative to the parent HWND. The app has two ways it can 23798 /// position a WebView: 23799 /// 1. Create a child HWND that is the WebView parent HWND. Position this 23800 /// window where the WebView should be. In this case, use (0, 0) for the 23801 /// WebView's Bound's top left corner (the offset). 23802 /// 2. Use the app's top most window as the WebView parent HWND. Set the 23803 /// WebView's Bound's top left corner so that the WebView is positioned 23804 /// correctly in the app. 23805 /// The Bound's values are in the host's coordinate space. 23806 /+[ propget]+/ 23807 HRESULT get_Bounds(/+[out, retval]+/ RECT* bounds); 23808 /// Set the Bounds property. 23809 /// 23810 /// \snippet ViewComponent.cpp ResizeWebView 23811 /+[ propput]+/ 23812 HRESULT put_Bounds(in RECT bounds); 23813 23814 /// The zoom factor for the WebView. 23815 /// Note that changing zoom factor could cause `window.innerWidth/innerHeight` 23816 /// and page layout to change. 23817 /// A zoom factor that is applied by the host by calling ZoomFactor 23818 /// becomes the new default zoom for the WebView. This zoom factor applies 23819 /// across navigations and is the zoom factor WebView is returned to when the 23820 /// user presses ctrl+0. When the zoom factor is changed by the user 23821 /// (resulting in the app receiving ZoomFactorChanged), that zoom applies 23822 /// only for the current page. Any user applied zoom is only for the current 23823 /// page and is reset on a navigation. 23824 /// Specifying a zoomFactor less than or equal to 0 is not allowed. 23825 /// WebView also has an internal supported zoom factor range. When a specified 23826 /// zoom factor is out of that range, it will be normalized to be within the 23827 /// range, and a ZoomFactorChanged event will be fired for the real 23828 /// applied zoom factor. When this range normalization happens, the 23829 /// ZoomFactor property will report the zoom factor specified during the 23830 /// previous modification of the ZoomFactor property until the 23831 /// ZoomFactorChanged event is received after WebView applies the normalized 23832 /// zoom factor. 23833 /+[ propget]+/ 23834 HRESULT get_ZoomFactor(/+[out, retval]+/ double* zoomFactor); 23835 /// Set the ZoomFactor property. 23836 /+[ propput]+/ 23837 HRESULT put_ZoomFactor(in double zoomFactor); 23838 23839 /// Add an event handler for the ZoomFactorChanged event. 23840 /// ZoomFactorChanged fires when the ZoomFactor property of the WebView changes. 23841 /// The event could fire because the caller modified the ZoomFactor property, 23842 /// or due to the user manually modifying the zoom. When it is modified by the 23843 /// caller via the ZoomFactor property, the internal zoom factor is updated 23844 /// immediately and there will be no ZoomFactorChanged event. 23845 /// WebView associates the last used zoom factor for each site. Therefore, it 23846 /// is possible for the zoom factor to change when navigating to a different 23847 /// page. When the zoom factor changes due to this, the ZoomFactorChanged 23848 /// event fires right after the ContentLoading event. 23849 /// 23850 /// \snippet ViewComponent.cpp ZoomFactorChanged 23851 HRESULT add_ZoomFactorChanged( 23852 /+[in]+/ ICoreWebView2ZoomFactorChangedEventHandler eventHandler, 23853 /+[out]+/ EventRegistrationToken* token); 23854 /// Remove an event handler previously added with add_ZoomFactorChanged. 23855 HRESULT remove_ZoomFactorChanged( 23856 in EventRegistrationToken token); 23857 23858 /// Update Bounds and ZoomFactor properties at the same time. This operation 23859 /// is atomic from the host's perspective. After returning from this function, 23860 /// the Bounds and ZoomFactor properties will have both been updated if the 23861 /// function is successful, or neither will be updated if the function fails. 23862 /// If Bounds and ZoomFactor are both updated by the same scale (i.e. Bounds 23863 /// and ZoomFactor are both doubled), then the page will not see a change in 23864 /// window.innerWidth/innerHeight and the WebView will render the content at 23865 /// the new size and zoom without intermediate renderings. 23866 /// This function can also be used to update just one of ZoomFactor or Bounds 23867 /// by passing in the new value for one and the current value for the other. 23868 /// 23869 /// \snippet ViewComponent.cpp SetBoundsAndZoomFactor 23870 HRESULT SetBoundsAndZoomFactor(in RECT bounds, in double zoomFactor); 23871 23872 /// Move focus into WebView. WebView will get focus and focus will be set to 23873 /// correspondent element in the page hosted in the WebView. 23874 /// For Programmatic reason, focus is set to previously focused element or 23875 /// the default element if there is no previously focused element. 23876 /// For Next reason, focus is set to the first element. 23877 /// For Previous reason, focus is set to the last element. 23878 /// WebView can also got focus through user interaction like clicking into 23879 /// WebView or Tab into it. 23880 /// For tabbing, the app can call MoveFocus with Next or Previous to align 23881 /// with tab and shift+tab respectively when it decides the WebView is the 23882 /// next tabbable element. Or, the app can call IsDialogMessage as part of 23883 /// its message loop to allow the platform to auto handle tabbing. The 23884 /// platform will rotate through all windows with WS_TABSTOP. When the 23885 /// WebView gets focus from IsDialogMessage, it will internally put the focus 23886 /// on the first or last element for tab and shift+tab respectively. 23887 /// 23888 /// \snippet App.cpp MoveFocus0 23889 /// 23890 /// \snippet ControlComponent.cpp MoveFocus1 23891 /// 23892 /// \snippet ControlComponent.cpp MoveFocus2 23893 HRESULT MoveFocus(in COREWEBVIEW2_MOVE_FOCUS_REASON reason); 23894 23895 /// Add an event handler for the MoveFocusRequested event. 23896 /// MoveFocusRequested fires when user tries to tab out of the WebView. 23897 /// The WebView's focus has not changed when this event is fired. 23898 /// 23899 /// \snippet ControlComponent.cpp MoveFocusRequested 23900 HRESULT add_MoveFocusRequested( 23901 /+[in]+/ ICoreWebView2MoveFocusRequestedEventHandler eventHandler, 23902 /+[out]+/ EventRegistrationToken* token); 23903 /// Remove an event handler previously added with add_MoveFocusRequested. 23904 HRESULT remove_MoveFocusRequested( 23905 in EventRegistrationToken token); 23906 23907 /// Add an event handler for the GotFocus event. 23908 /// GotFocus fires when WebView got focus. 23909 HRESULT add_GotFocus( 23910 /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler, 23911 /+[out]+/ EventRegistrationToken* token); 23912 /// Remove an event handler previously added with add_GotFocus. 23913 HRESULT remove_GotFocus( 23914 in EventRegistrationToken token); 23915 23916 /// Add an event handler for the LostFocus event. 23917 /// LostFocus fires when WebView lost focus. 23918 /// In the case where MoveFocusRequested event is fired, the focus is still 23919 /// on WebView when MoveFocusRequested event fires. LostFocus only fires 23920 /// afterwards when app's code or default action of MoveFocusRequested event 23921 /// set focus away from WebView. 23922 HRESULT add_LostFocus( 23923 /+[in]+/ ICoreWebView2FocusChangedEventHandler eventHandler, 23924 /+[out]+/ EventRegistrationToken* token); 23925 /// Remove an event handler previously added with add_LostFocus. 23926 HRESULT remove_LostFocus( 23927 in EventRegistrationToken token); 23928 23929 /// Add an event handler for the AcceleratorKeyPressed event. 23930 /// AcceleratorKeyPressed fires when an accelerator key or key combo is 23931 /// pressed or released while the WebView is focused. A key is considered an 23932 /// accelerator if either: 23933 /// 1. Ctrl or Alt is currently being held, or 23934 /// 2. the pressed key does not map to a character. 23935 /// A few specific keys are never considered accelerators, such as Shift. 23936 /// The Escape key is always considered an accelerator. 23937 /// 23938 /// Autorepeated key events caused by holding the key down will also fire this 23939 /// event. You can filter these out by checking the event args' 23940 /// KeyEventLParam or PhysicalKeyStatus. 23941 /// 23942 /// In windowed mode, this event handler is called synchronously. Until you 23943 /// call Handled() on the event args or the event handler returns, the browser 23944 /// process will be blocked and outgoing cross-process COM calls will fail 23945 /// with RPC_E_CANTCALLOUT_ININPUTSYNCCALL. All CoreWebView2 API methods will 23946 /// work, however. 23947 /// 23948 /// In windowless mode, the event handler is called asynchronously. Further 23949 /// input will not reach the browser until the event handler returns or 23950 /// Handled() is called, but the browser process itself will not be blocked, 23951 /// and outgoing COM calls will work normally. 23952 /// 23953 /// It is recommended to call Handled(TRUE) as early as you can know that you want 23954 /// to handle the accelerator key. 23955 /// 23956 /// \snippet ControlComponent.cpp AcceleratorKeyPressed 23957 HRESULT add_AcceleratorKeyPressed( 23958 /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventHandler eventHandler, 23959 /+[out]+/ EventRegistrationToken* token); 23960 /// Remove an event handler previously added with add_AcceleratorKeyPressed. 23961 HRESULT remove_AcceleratorKeyPressed( 23962 in EventRegistrationToken token); 23963 23964 /// The parent window provided by the app that this WebView is using to 23965 /// render content. This API initially returns the window passed into 23966 /// CreateCoreWebView2Controller. 23967 /+[ propget]+/ 23968 HRESULT get_ParentWindow(/+[out, retval]+/ HWND* parentWindow); 23969 23970 /// Set the parent window for the WebView. This will cause the WebView to 23971 /// reparent its window to the newly provided window. 23972 /+[ propput]+/ 23973 HRESULT put_ParentWindow(in HWND parentWindow); 23974 23975 /// This is a notification separate from Bounds that tells WebView its 23976 /// parent (or any ancestor) HWND moved. This is needed for accessibility and 23977 /// certain dialogs in WebView to work correctly. 23978 /// \snippet ViewComponent.cpp NotifyParentWindowPositionChanged 23979 HRESULT NotifyParentWindowPositionChanged(); 23980 23981 /// Closes the WebView and cleans up the underlying browser instance. 23982 /// Cleaning up the browser instance will release the resources powering the WebView. 23983 /// The browser instance will be shut down if there are no other WebViews using it. 23984 /// 23985 /// After calling Close, all method calls will fail and event handlers 23986 /// will stop firing. Specifically, the WebView will release its references 23987 /// to its event handlers when Close is called. 23988 /// 23989 /// Close is implicitly called when the CoreWebView2Controller loses its final 23990 /// reference and is destructed. But it is best practice to explicitly call 23991 /// Close to avoid any accidental cycle of references between the WebView 23992 /// and the app code. Specifically, if you capture a reference to the WebView 23993 /// in an event handler you will create a reference cycle between the WebView 23994 /// and the event handler. Calling Close will break this cycle by releasing 23995 /// all event handlers. But to avoid this situation it is best practice both 23996 /// to explicitly call Close on the WebView and to not capture a reference to 23997 /// the WebView to ensure the WebView can be cleaned up correctly. 23998 /// 23999 /// \snippet AppWindow.cpp Close 24000 HRESULT Close(); 24001 24002 /// Gets the CoreWebView2 associated with this CoreWebView2Controller. 24003 /+[ propget]+/ 24004 HRESULT get_CoreWebView2(/+[out, retval]+/ ICoreWebView2 * coreWebView2); 24005 } 24006 24007 /// This interface is used to complete deferrals on event args that 24008 /// support getting deferrals via their GetDeferral method. 24009 const GUID IID_ICoreWebView2Deferral = ICoreWebView2Deferral.iid; 24010 24011 interface ICoreWebView2Deferral : IUnknown 24012 { 24013 static const GUID iid = { 0xc10e7f7b,0xb585,0x46f0,[ 0xa6,0x23,0x8b,0xef,0xbf,0x3e,0x4e,0xe0 ] }; 24014 extern(Windows): 24015 /// Completes the associated deferred event. Complete should only be 24016 /// called once for each deferral taken. 24017 HRESULT Complete(); 24018 } 24019 24020 /// Defines properties that enable, disable, or modify WebView 24021 /// features. Setting changes made after NavigationStarting event will not 24022 /// apply until the next top level navigation. 24023 const GUID IID_ICoreWebView2Settings = ICoreWebView2Settings.iid; 24024 24025 interface ICoreWebView2Settings : IUnknown 24026 { 24027 static const GUID iid = { 0xe562e4f0,0xd7fa,0x43ac,[ 0x8d,0x71,0xc0,0x51,0x50,0x49,0x9f,0x00 ] }; 24028 extern(Windows): 24029 /// Controls if JavaScript execution is enabled in all future 24030 /// navigations in the WebView. This only affects scripts in the document; 24031 /// scripts injected with ExecuteScript will run even if script is disabled. 24032 /// It is true by default. 24033 /// 24034 /// \snippet SettingsComponent.cpp IsScriptEnabled 24035 /+[ propget]+/ 24036 HRESULT get_IsScriptEnabled( 24037 /+[out, retval]+/ BOOL* isScriptEnabled); 24038 /// Set the IsScriptEnabled property. 24039 /+[ propput]+/ 24040 HRESULT put_IsScriptEnabled(in BOOL isScriptEnabled); 24041 24042 /// The IsWebMessageEnabled property is used when loading a new 24043 /// HTML document. If set to true, communication from the host to the 24044 /// WebView's top level HTML document is allowed via PostWebMessageAsJson, 24045 /// PostWebMessageAsString, and window.chrome.webview's message event 24046 /// (see PostWebMessageAsJson documentation for details). 24047 /// Communication from the WebView's top level HTML document to the host is 24048 /// allowed via window.chrome.webview's postMessage function and 24049 /// add_WebMessageReceived method (see add_WebMessageReceived documentation 24050 /// for details). 24051 /// If set to false, then communication is disallowed. 24052 /// PostWebMessageAsJson and PostWebMessageAsString will 24053 /// fail with E_ACCESSDENIED and window.chrome.webview.postMessage will fail 24054 /// by throwing an instance of an Error object. 24055 /// It is true by default. 24056 /// 24057 /// \snippet ScenarioWebMessage.cpp IsWebMessageEnabled 24058 /+[ propget]+/ 24059 HRESULT get_IsWebMessageEnabled( 24060 /+[out, retval]+/ BOOL* isWebMessageEnabled); 24061 /// Set the IsWebMessageEnabled property. 24062 /+[ propput]+/ 24063 HRESULT put_IsWebMessageEnabled(in BOOL isWebMessageEnabled); 24064 24065 /// AreDefaultScriptDialogsEnabled is used when loading a new HTML document. 24066 /// If set to false, then WebView won't render the default JavaScript dialog 24067 /// box (Specifically those shown by the JavaScript alert, confirm, prompt 24068 /// functions and beforeunload event). Instead, if an event handler is set via 24069 /// add_ScriptDialogOpening, WebView will send an event that will contain all 24070 /// of the information for the dialog and allow the host app to show its own 24071 /// custom UI. It is true by default. 24072 /+[ propget]+/ 24073 HRESULT get_AreDefaultScriptDialogsEnabled( 24074 /+[out, retval]+/ BOOL* areDefaultScriptDialogsEnabled); 24075 /// Set the AreDefaultScriptDialogsEnabled property. 24076 /+[ propput]+/ 24077 HRESULT put_AreDefaultScriptDialogsEnabled( 24078 in BOOL areDefaultScriptDialogsEnabled); 24079 24080 /// IsStatusBarEnabled controls whether the status bar will be displayed. The 24081 /// status bar is usually displayed in the lower left of the WebView and shows 24082 /// things such as the URI of a link when the user hovers over it and other 24083 /// information. It is true by default. 24084 /+[ propget]+/ 24085 HRESULT get_IsStatusBarEnabled(/+[out, retval]+/ BOOL* isStatusBarEnabled); 24086 /// Set the IsStatusBarEnabled property. 24087 /+[ propput]+/ 24088 HRESULT put_IsStatusBarEnabled(in BOOL isStatusBarEnabled); 24089 24090 /// AreDevToolsEnabled controls whether the user is able to use the context 24091 /// menu or keyboard shortcuts to open the DevTools window. 24092 /// It is true by default. 24093 /+[ propget]+/ 24094 HRESULT get_AreDevToolsEnabled(/+[out, retval]+/ BOOL* areDevToolsEnabled); 24095 /// Set the AreDevToolsEnabled property. 24096 /+[ propput]+/ 24097 HRESULT put_AreDevToolsEnabled(in BOOL areDevToolsEnabled); 24098 24099 /// The AreDefaultContextMenusEnabled property is used to prevent 24100 /// default context menus from being shown to user in WebView. 24101 /// It is true by default. 24102 /// 24103 /// \snippet SettingsComponent.cpp DisableContextMenu 24104 /+[ propget]+/ 24105 HRESULT get_AreDefaultContextMenusEnabled(/+[out, retval]+/ BOOL* enabled); 24106 /// Set the AreDefaultContextMenusEnabled property. 24107 /+[ propput]+/ 24108 HRESULT put_AreDefaultContextMenusEnabled(in BOOL enabled); 24109 24110 /// The AreHostObjectsAllowed property is used to control whether 24111 /// host objects are accessible from the page in WebView. 24112 /// It is true by default. 24113 /// 24114 /// \snippet SettingsComponent.cpp HostObjectsAccess 24115 /+[ propget]+/ 24116 HRESULT get_AreHostObjectsAllowed(/+[out, retval]+/ BOOL* allowed); 24117 /// Set the AreHostObjectsAllowed property. 24118 /+[ propput]+/ 24119 HRESULT put_AreHostObjectsAllowed(in BOOL allowed); 24120 24121 /// The IsZoomControlEnabled property is used to prevent the user from 24122 /// impacting the zoom of the WebView. It is true by default. 24123 /// When disabled, user will not be able to zoom using ctrl+/- or 24124 /// ctrl+mouse wheel, but the zoom can be set via ZoomFactor API. 24125 /// 24126 /// \snippet SettingsComponent.cpp DisableZoomControl 24127 /+[ propget]+/ 24128 HRESULT get_IsZoomControlEnabled(/+[out, retval]+/ BOOL* enabled); 24129 /// Set the IsZoomControlEnabled property. 24130 /+[ propput]+/ 24131 HRESULT put_IsZoomControlEnabled(in BOOL enabled); 24132 24133 /// The IsBuiltInErrorPageEnabled property is used to disable built in error 24134 /// page for navigation failure and render process failure. It is true by 24135 /// default. 24136 /// When disabled, blank page will be shown when related error happens. 24137 /// 24138 /// \snippet SettingsComponent.cpp BuiltInErrorPageEnabled 24139 /+[ propget]+/ 24140 HRESULT get_IsBuiltInErrorPageEnabled(/+[out, retval]+/ BOOL* enabled); 24141 /// Set the IsBuiltInErrorPageEnabled property. 24142 /+[ propput]+/ 24143 HRESULT put_IsBuiltInErrorPageEnabled(in BOOL enabled); 24144 } 24145 24146 /// Event args for the ProcessFailed event. 24147 const GUID IID_ICoreWebView2ProcessFailedEventArgs = ICoreWebView2ProcessFailedEventArgs.iid; 24148 24149 interface ICoreWebView2ProcessFailedEventArgs : IUnknown 24150 { 24151 static const GUID iid = { 0x8155a9a4,0x1474,0x4a86,[ 0x8c,0xae,0x15,0x1b,0x0f,0xa6,0xb8,0xca ] }; 24152 extern(Windows): 24153 /// The kind of process failure that has occurred. 24154 /+[ propget]+/ 24155 HRESULT get_ProcessFailedKind( 24156 /+[out, retval]+/ COREWEBVIEW2_PROCESS_FAILED_KIND* processFailedKind); 24157 } 24158 24159 /// The caller implements this interface to receive ProcessFailed events. 24160 const GUID IID_ICoreWebView2ProcessFailedEventHandler = ICoreWebView2ProcessFailedEventHandler.iid; 24161 24162 interface ICoreWebView2ProcessFailedEventHandler : IUnknown 24163 { 24164 static const GUID iid = { 0x79e0aea4,0x990b,0x42d9,[ 0xaa,0x1d,0x0f,0xcc,0x2e,0x5b,0xc7,0xf1 ] }; 24165 extern(Windows): 24166 /// Called to provide the implementer with the event args for the 24167 /// corresponding event. 24168 HRESULT Invoke( 24169 /+[in]+/ ICoreWebView2 sender, 24170 /+[in]+/ ICoreWebView2ProcessFailedEventArgs args); 24171 } 24172 24173 /// The caller implements this interface to receive ZoomFactorChanged 24174 /// events. Use the ICoreWebView2Controller.ZoomFactor property to get the 24175 /// modified zoom factor. 24176 const GUID IID_ICoreWebView2ZoomFactorChangedEventHandler = ICoreWebView2ZoomFactorChangedEventHandler.iid; 24177 24178 interface ICoreWebView2ZoomFactorChangedEventHandler : IUnknown 24179 { 24180 static const GUID iid = { 0xb52d71d6,0xc4df,0x4543,[ 0xa9,0x0c,0x64,0xa3,0xe6,0x0f,0x38,0xcb ] }; 24181 extern(Windows): 24182 /// Called to provide the implementer with the event args for the 24183 /// corresponding event. There are no event args and the args 24184 /// parameter will be null. 24185 HRESULT Invoke(/+[in]+/ ICoreWebView2Controller sender, /+[in]+/ IUnknown args); 24186 } 24187 24188 /// Iterator for a collection of HTTP headers. See ICoreWebView2HttpRequestHeaders 24189 /// and ICoreWebView2HttpResponseHeaders. 24190 /// 24191 /// \snippet ScenarioWebViewEventMonitor.cpp HttpRequestHeaderIterator 24192 const GUID IID_ICoreWebView2HttpHeadersCollectionIterator = ICoreWebView2HttpHeadersCollectionIterator.iid; 24193 24194 interface ICoreWebView2HttpHeadersCollectionIterator : IUnknown 24195 { 24196 static const GUID iid = { 0x0702fc30,0xf43b,0x47bb,[ 0xab,0x52,0xa4,0x2c,0xb5,0x52,0xad,0x9f ] }; 24197 extern(Windows): 24198 /// Get the name and value of the current HTTP header of the iterator. This 24199 /// method will fail if the last call to MoveNext set hasNext to FALSE. 24200 HRESULT GetCurrentHeader(/+[out]+/ LPWSTR* name, 24201 /+[out]+/ LPWSTR* value); 24202 24203 /// True when the iterator hasn't run out of headers. If the collection over 24204 /// which the iterator is iterating is empty or if the iterator has gone past 24205 /// the end of the collection then this is false. 24206 /+[ propget]+/ 24207 HRESULT get_HasCurrentHeader(/+[out, retval]+/ BOOL* hasCurrent); 24208 24209 /// Move the iterator to the next HTTP header in the collection. The hasNext 24210 /// parameter will be set to FALSE if there are no more HTTP headers. After 24211 /// this occurs the GetCurrentHeader method will fail if called. 24212 HRESULT MoveNext(/+[out, retval]+/ BOOL* hasNext); 24213 } 24214 24215 /// HTTP request headers. Used to inspect the HTTP request on 24216 /// WebResourceRequested event and NavigationStarting event. 24217 /// Note, you can modify the HTTP request headers from a WebResourceRequested event, 24218 /// but not from a NavigationStarting event. 24219 const GUID IID_ICoreWebView2HttpRequestHeaders = ICoreWebView2HttpRequestHeaders.iid; 24220 24221 interface ICoreWebView2HttpRequestHeaders : IUnknown 24222 { 24223 static const GUID iid = { 0xe86cac0e,0x5523,0x465c,[ 0xb5,0x36,0x8f,0xb9,0xfc,0x8c,0x8c,0x60 ] }; 24224 extern(Windows): 24225 /// Gets the header value matching the name. 24226 HRESULT GetHeader(in LPCWSTR name, 24227 /+[out, retval]+/ LPWSTR* value); 24228 /// Gets the header value matching the name via an iterator. 24229 HRESULT GetHeaders(in LPCWSTR name, 24230 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 24231 /// Checks whether the headers contain an entry matching the header name. 24232 HRESULT Contains(in LPCWSTR name, 24233 /+[out, retval]+/ BOOL* contains); 24234 /// Adds or updates header that matches the name. 24235 HRESULT SetHeader(in LPCWSTR name, in LPCWSTR value); 24236 /// Removes header that matches the name. 24237 HRESULT RemoveHeader(in LPCWSTR name); 24238 /// Gets an iterator over the collection of request headers. 24239 HRESULT GetIterator( 24240 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 24241 } 24242 24243 /// HTTP response headers. Used to construct a WebResourceResponse for the 24244 /// WebResourceRequested event. 24245 const GUID IID_ICoreWebView2HttpResponseHeaders = ICoreWebView2HttpResponseHeaders.iid; 24246 24247 interface ICoreWebView2HttpResponseHeaders : IUnknown 24248 { 24249 static const GUID iid = { 0x03c5ff5a,0x9b45,0x4a88,[ 0x88,0x1c,0x89,0xa9,0xf3,0x28,0x61,0x9c ] }; 24250 extern(Windows): 24251 /// Appends header line with name and value. 24252 HRESULT AppendHeader(in LPCWSTR name, in LPCWSTR value); 24253 /// Checks whether the headers contain entries matching the header name. 24254 HRESULT Contains(in LPCWSTR name, 24255 /+[out, retval]+/ BOOL* contains); 24256 /// Gets the first header value in the collection matching the name. 24257 HRESULT GetHeader(in LPCWSTR name, 24258 /+[out, retval]+/ LPWSTR* value); 24259 /// Gets the header values matching the name. 24260 HRESULT GetHeaders(in LPCWSTR name, 24261 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 24262 /// Gets an iterator over the collection of entire response headers. 24263 HRESULT GetIterator( 24264 /+[out, retval]+/ ICoreWebView2HttpHeadersCollectionIterator * iterator); 24265 } 24266 24267 /// An HTTP request used with the WebResourceRequested event. 24268 const GUID IID_ICoreWebView2WebResourceRequest = ICoreWebView2WebResourceRequest.iid; 24269 24270 interface ICoreWebView2WebResourceRequest : IUnknown 24271 { 24272 static const GUID iid = { 0x97055cd4,0x512c,0x4264,[ 0x8b,0x5f,0xe3,0xf4,0x46,0xce,0xa6,0xa5 ] }; 24273 extern(Windows): 24274 /// The request URI. 24275 /+[ propget]+/ 24276 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 24277 /// Set the Uri property. 24278 /+[ propput]+/ 24279 HRESULT put_Uri(in LPCWSTR uri); 24280 24281 /// The HTTP request method. 24282 /+[ propget]+/ 24283 HRESULT get_Method(/+[out, retval]+/ LPWSTR* method); 24284 /// Set the Method property. 24285 /+[ propput]+/ 24286 HRESULT put_Method(in LPCWSTR method); 24287 24288 /// The HTTP request message body as stream. POST data would be here. 24289 /// If a stream is set, which will override the message body, the stream must 24290 /// have all the content data available by the time this 24291 /// response's WebResourceRequested event deferral is completed. Stream 24292 /// should be agile or be created from a background STA to prevent performance 24293 /// impact to the UI thread. Null means no content data. IStream semantics 24294 /// apply (return S_OK to Read calls until all data is exhausted). 24295 /+[ propget]+/ 24296 HRESULT get_Content(/+[out, retval]+/ IStream** content); 24297 /// Set the Content property. 24298 /+[ propput]+/ 24299 HRESULT put_Content(in IStream* content); 24300 24301 /// The mutable HTTP request headers 24302 /+[ propget]+/ 24303 HRESULT get_Headers(/+[out, retval]+/ ICoreWebView2HttpRequestHeaders * headers); 24304 } 24305 24306 /// An HTTP response used with the WebResourceRequested event. 24307 const GUID IID_ICoreWebView2WebResourceResponse = ICoreWebView2WebResourceResponse.iid; 24308 24309 interface ICoreWebView2WebResourceResponse : IUnknown 24310 { 24311 static const GUID iid = { 0xaafcc94f,0xfa27,0x48fd,[ 0x97,0xdf,0x83,0x0e,0xf7,0x5a,0xae,0xc9 ] }; 24312 extern(Windows): 24313 /// HTTP response content as stream. Stream must have all the 24314 /// content data available by the time this response's WebResourceRequested 24315 /// event deferral is completed. Stream should be agile or be created from 24316 /// a background thread to prevent performance impact to the UI thread. 24317 /// Null means no content data. IStream semantics 24318 /// apply (return S_OK to Read calls until all data is exhausted). 24319 /+[ propget]+/ 24320 HRESULT get_Content(/+[out, retval]+/ IStream** content); 24321 /// Set the Content property. 24322 /+[ propput]+/ 24323 HRESULT put_Content(in IStream* content); 24324 24325 /// Overridden HTTP response headers. 24326 /+[ propget]+/ 24327 HRESULT get_Headers(/+[out, retval]+/ ICoreWebView2HttpResponseHeaders * headers); 24328 24329 /// The HTTP response status code. 24330 /+[ propget]+/ 24331 HRESULT get_StatusCode(/+[out, retval]+/ int* statusCode); 24332 /// Set the StatusCode property. 24333 /+[ propput]+/ 24334 HRESULT put_StatusCode(in int statusCode); 24335 24336 /// The HTTP response reason phrase. 24337 /+[ propget]+/ 24338 HRESULT get_ReasonPhrase(/+[out, retval]+/ LPWSTR* reasonPhrase); 24339 /// Set the ReasonPhrase property. 24340 /+[ propput]+/ 24341 HRESULT put_ReasonPhrase(in LPCWSTR reasonPhrase); 24342 } 24343 24344 /// Event args for the NavigationStarting event. 24345 const GUID IID_ICoreWebView2NavigationStartingEventArgs = ICoreWebView2NavigationStartingEventArgs.iid; 24346 24347 interface ICoreWebView2NavigationStartingEventArgs : IUnknown 24348 { 24349 static const GUID iid = { 0x5b495469,0xe119,0x438a,[ 0x9b,0x18,0x76,0x04,0xf2,0x5f,0x2e,0x49 ] }; 24350 extern(Windows): 24351 /// The uri of the requested navigation. 24352 /+[ propget]+/ 24353 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 24354 24355 /// True when the navigation was initiated through a user gesture as opposed 24356 /// to programmatic navigation. 24357 /+[ propget]+/ 24358 HRESULT get_IsUserInitiated(/+[out, retval]+/ BOOL* isUserInitiated); 24359 24360 /// True when the navigation is redirected. 24361 /+[ propget]+/ 24362 HRESULT get_IsRedirected(/+[out, retval]+/ BOOL* isRedirected); 24363 24364 /// The HTTP request headers for the navigation. 24365 /// Note, you cannot modify the HTTP request headers in a NavigationStarting event. 24366 /+[ propget]+/ 24367 HRESULT get_RequestHeaders(/+[out, retval]+/ ICoreWebView2HttpRequestHeaders * requestHeaders); 24368 24369 /// The host may set this flag to cancel the navigation. 24370 /// If set, it will be as if the navigation never happened and the current 24371 /// page's content will be intact. For performance reasons, GET HTTP requests 24372 /// may happen, while the host is responding. This means cookies can be set 24373 /// and used part of a request for the navigation. 24374 /// Cancellation for navigation to about:blank or frame navigation to srcdoc 24375 /// is not supported. Such attempts will be ignored. 24376 /+[ propget]+/ 24377 HRESULT get_Cancel(/+[out, retval]+/ BOOL* cancel); 24378 /// Set the Cancel property. 24379 /+[ propput]+/ 24380 HRESULT put_Cancel(in BOOL cancel); 24381 24382 /// The ID of the navigation. 24383 /+[ propget]+/ 24384 HRESULT get_NavigationId(/+[out, retval]+/ UINT64* navigationId); 24385 } 24386 24387 /// The caller implements this interface to receive the NavigationStarting 24388 /// event. 24389 const GUID IID_ICoreWebView2NavigationStartingEventHandler = ICoreWebView2NavigationStartingEventHandler.iid; 24390 24391 interface ICoreWebView2NavigationStartingEventHandler : IUnknown 24392 { 24393 static const GUID iid = { 0x9adbe429,0xf36d,0x432b,[ 0x9d,0xdc,0xf8,0x88,0x1f,0xbd,0x76,0xe3 ] }; 24394 extern(Windows): 24395 /// Called to provide the implementer with the event args for the 24396 /// corresponding event. 24397 HRESULT Invoke( 24398 /+[in]+/ ICoreWebView2 sender, 24399 /+[in]+/ ICoreWebView2NavigationStartingEventArgs args); 24400 } 24401 24402 /// Event args for the ContentLoading event. 24403 const GUID IID_ICoreWebView2ContentLoadingEventArgs = ICoreWebView2ContentLoadingEventArgs.iid; 24404 24405 interface ICoreWebView2ContentLoadingEventArgs : IUnknown 24406 { 24407 static const GUID iid = { 0x0c8a1275,0x9b6b,0x4901,[ 0x87,0xad,0x70,0xdf,0x25,0xba,0xfa,0x6e ] }; 24408 extern(Windows): 24409 /// True if the loaded content is an error page. 24410 /+[ propget]+/ 24411 HRESULT get_IsErrorPage(/+[out, retval]+/ BOOL* isErrorPage); 24412 24413 /// The ID of the navigation. 24414 /+[ propget]+/ 24415 HRESULT get_NavigationId(/+[out, retval]+/ UINT64* navigationId); 24416 } 24417 24418 /// The caller implements this interface to receive the ContentLoading event. 24419 const GUID IID_ICoreWebView2ContentLoadingEventHandler = ICoreWebView2ContentLoadingEventHandler.iid; 24420 24421 interface ICoreWebView2ContentLoadingEventHandler : IUnknown 24422 { 24423 static const GUID iid = { 0x364471e7,0xf2be,0x4910,[ 0xbd,0xba,0xd7,0x20,0x77,0xd5,0x1c,0x4b ] }; 24424 extern(Windows): 24425 /// Called to provide the implementer with the event args for the 24426 /// corresponding event. 24427 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2ContentLoadingEventArgs args); 24428 } 24429 24430 /// Event args for the SourceChanged event. 24431 const GUID IID_ICoreWebView2SourceChangedEventArgs = ICoreWebView2SourceChangedEventArgs.iid; 24432 24433 interface ICoreWebView2SourceChangedEventArgs : IUnknown 24434 { 24435 static const GUID iid = { 0x31e0e545,0x1dba,0x4266,[ 0x89,0x14,0xf6,0x38,0x48,0xa1,0xf7,0xd7 ] }; 24436 extern(Windows): 24437 /// True if the page being navigated to is a new document. 24438 /+[ propget]+/ 24439 HRESULT get_IsNewDocument(/+[out, retval]+/ BOOL* isNewDocument); 24440 } 24441 24442 /// The caller implements this interface to receive the SourceChanged event. 24443 const GUID IID_ICoreWebView2SourceChangedEventHandler = ICoreWebView2SourceChangedEventHandler.iid; 24444 24445 interface ICoreWebView2SourceChangedEventHandler : IUnknown 24446 { 24447 static const GUID iid = { 0x3c067f9f,0x5388,0x4772,[ 0x8b,0x48,0x79,0xf7,0xef,0x1a,0xb3,0x7c ] }; 24448 extern(Windows): 24449 /// Called to provide the implementer with the event args for the 24450 /// corresponding event. 24451 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ ICoreWebView2SourceChangedEventArgs args); 24452 } 24453 24454 /// The caller implements this interface to receive the HistoryChanged event. 24455 const GUID IID_ICoreWebView2HistoryChangedEventHandler = ICoreWebView2HistoryChangedEventHandler.iid; 24456 24457 interface ICoreWebView2HistoryChangedEventHandler : IUnknown 24458 { 24459 static const GUID iid = { 0xc79a420c,0xefd9,0x4058,[ 0x92,0x95,0x3e,0x8b,0x4b,0xca,0xb6,0x45 ] }; 24460 extern(Windows): 24461 /// There are no event args and the args parameter will be null. 24462 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 24463 } 24464 24465 /// Event args for the ScriptDialogOpening event. 24466 const GUID IID_ICoreWebView2ScriptDialogOpeningEventArgs = ICoreWebView2ScriptDialogOpeningEventArgs.iid; 24467 24468 interface ICoreWebView2ScriptDialogOpeningEventArgs : IUnknown 24469 { 24470 static const GUID iid = { 0x7390bb70,0xabe0,0x4843,[ 0x95,0x29,0xf1,0x43,0xb3,0x1b,0x03,0xd6 ] }; 24471 extern(Windows): 24472 /// The URI of the page that requested the dialog box. 24473 /+[ propget]+/ 24474 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 24475 24476 /// The kind of JavaScript dialog box. Accept, confirm, prompt, or 24477 /// beforeunload. 24478 /+[ propget]+/ 24479 HRESULT get_Kind(/+[out, retval]+/ COREWEBVIEW2_SCRIPT_DIALOG_KIND* kind); 24480 24481 /// The message of the dialog box. From JavaScript this is the first parameter 24482 /// passed to alert, confirm, and prompt and is empty for beforeunload. 24483 /+[ propget]+/ 24484 HRESULT get_Message(/+[out, retval]+/ LPWSTR* message); 24485 24486 /// The host may call this to respond with OK to confirm, prompt, and 24487 /// beforeunload dialogs or not call this method to indicate cancel. From 24488 /// JavaScript, this means that the confirm and beforeunload function returns 24489 /// true if Accept is called. And for the prompt function it returns the value 24490 /// of ResultText if Accept is called and returns false otherwise. 24491 HRESULT Accept(); 24492 24493 /// The second parameter passed to the JavaScript prompt dialog. This is the 24494 /// default value to use for the result of the prompt JavaScript function. 24495 /+[ propget]+/ 24496 HRESULT get_DefaultText(/+[out, retval]+/ LPWSTR* defaultText); 24497 24498 /// The return value from the JavaScript prompt function if Accept is called. 24499 /// This is ignored for dialog kinds other than prompt. If Accept is not 24500 /// called this value is ignored and false is returned from prompt. 24501 /+[ propget]+/ 24502 HRESULT get_ResultText(/+[out, retval]+/ LPWSTR* resultText); 24503 /// Set the ResultText property. 24504 /+[ propput]+/ 24505 HRESULT put_ResultText(in LPCWSTR resultText); 24506 24507 /// GetDeferral can be called to return an ICoreWebView2Deferral object. 24508 /// You can use this to complete the event at a later time. 24509 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 24510 } 24511 24512 /// The caller implements this interface to receive the ScriptDialogOpening 24513 /// event. 24514 const GUID IID_ICoreWebView2ScriptDialogOpeningEventHandler = ICoreWebView2ScriptDialogOpeningEventHandler.iid; 24515 24516 interface ICoreWebView2ScriptDialogOpeningEventHandler : IUnknown 24517 { 24518 static const GUID iid = { 0xef381bf9,0xafa8,0x4e37,[ 0x91,0xc4,0x8a,0xc4,0x85,0x24,0xbd,0xfb ] }; 24519 extern(Windows): 24520 /// Called to provide the implementer with the event args for the 24521 /// corresponding event. 24522 HRESULT Invoke( 24523 /+[in]+/ ICoreWebView2 sender, 24524 /+[in]+/ ICoreWebView2ScriptDialogOpeningEventArgs args); 24525 } 24526 24527 /// Event args for the NavigationCompleted event. 24528 const GUID IID_ICoreWebView2NavigationCompletedEventArgs = ICoreWebView2NavigationCompletedEventArgs.iid; 24529 24530 interface ICoreWebView2NavigationCompletedEventArgs : IUnknown 24531 { 24532 static const GUID iid = { 0x30d68b7d,0x20d9,0x4752,[ 0xa9,0xca,0xec,0x84,0x48,0xfb,0xb5,0xc1 ] }; 24533 extern(Windows): 24534 /// True when the navigation is successful. This 24535 /// is false for a navigation that ended up in an error page (failures due to 24536 /// no network, DNS lookup failure, HTTP server responds with 4xx), but could 24537 /// also be false for additional scenarios such as window.stop() called on 24538 /// navigated page. 24539 /+[ propget]+/ 24540 HRESULT get_IsSuccess(/+[out, retval]+/ BOOL* isSuccess); 24541 24542 /// The error code if the navigation failed. 24543 /+[ propget]+/ 24544 HRESULT get_WebErrorStatus(/+[out, retval]+/ COREWEBVIEW2_WEB_ERROR_STATUS* 24545 webErrorStatus); 24546 24547 /// The ID of the navigation. 24548 /+[ propget]+/ 24549 HRESULT get_NavigationId(/+[out, retval]+/ UINT64* navigationId); 24550 } 24551 24552 /// The caller implements this interface to receive the NavigationCompleted 24553 /// event. 24554 const GUID IID_ICoreWebView2NavigationCompletedEventHandler = ICoreWebView2NavigationCompletedEventHandler.iid; 24555 24556 interface ICoreWebView2NavigationCompletedEventHandler : IUnknown 24557 { 24558 static const GUID iid = { 0xd33a35bf,0x1c49,0x4f98,[ 0x93,0xab,0x00,0x6e,0x05,0x33,0xfe,0x1c ] }; 24559 extern(Windows): 24560 /// Called to provide the implementer with the event args for the 24561 /// corresponding event. 24562 HRESULT Invoke( 24563 /+[in]+/ ICoreWebView2 sender, 24564 /+[in]+/ ICoreWebView2NavigationCompletedEventArgs args); 24565 } 24566 24567 /// Event args for the PermissionRequested event. 24568 const GUID IID_ICoreWebView2PermissionRequestedEventArgs = ICoreWebView2PermissionRequestedEventArgs.iid; 24569 24570 interface ICoreWebView2PermissionRequestedEventArgs : IUnknown 24571 { 24572 static const GUID iid = { 0x973ae2ef,0xff18,0x4894,[ 0x8f,0xb2,0x3c,0x75,0x8f,0x04,0x68,0x10 ] }; 24573 extern(Windows): 24574 /// The origin of the web content that requests the permission. 24575 /+[ propget]+/ 24576 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 24577 24578 /// The type of the permission that is requested. 24579 /+[ propget]+/ 24580 HRESULT get_PermissionKind(/+[out, retval]+/ COREWEBVIEW2_PERMISSION_KIND* permissionKind); 24581 24582 /// True when the permission request was initiated through a user gesture. 24583 /// Note that being initiated through a user gesture doesn't mean that user 24584 /// intended to access the associated resource. 24585 /+[ propget]+/ 24586 HRESULT get_IsUserInitiated(/+[out, retval]+/ BOOL* isUserInitiated); 24587 24588 /// The status of a permission request, i.e. whether the request is granted. 24589 /// Default value is COREWEBVIEW2_PERMISSION_STATE_DEFAULT. 24590 /+[ propget]+/ 24591 HRESULT get_State(/+[out, retval]+/ COREWEBVIEW2_PERMISSION_STATE* state); 24592 /// Set the State property. 24593 /+[ propput]+/ 24594 HRESULT put_State(in COREWEBVIEW2_PERMISSION_STATE state); 24595 24596 /// GetDeferral can be called to return an ICoreWebView2Deferral object. 24597 /// Developer can use the deferral object to make the permission decision 24598 /// at a later time. 24599 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 24600 } 24601 24602 /// The caller implements this interface to receive the PermissionRequested 24603 /// event. 24604 const GUID IID_ICoreWebView2PermissionRequestedEventHandler = ICoreWebView2PermissionRequestedEventHandler.iid; 24605 24606 interface ICoreWebView2PermissionRequestedEventHandler : IUnknown 24607 { 24608 static const GUID iid = { 0x15e1c6a3,0xc72a,0x4df3,[ 0x91,0xd7,0xd0,0x97,0xfb,0xec,0x6b,0xfd ] }; 24609 extern(Windows): 24610 /// Called to provide the implementer with the event args for the 24611 /// corresponding event. 24612 HRESULT Invoke( 24613 /+[in]+/ ICoreWebView2 sender, 24614 /+[in]+/ ICoreWebView2PermissionRequestedEventArgs args); 24615 } 24616 24617 /// The caller implements this interface to receive the result of the 24618 /// AddScriptToExecuteOnDocumentCreated method. 24619 const GUID IID_ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler = ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler.iid; 24620 24621 interface ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler : IUnknown 24622 { 24623 static const GUID iid = { 0xb99369f3,0x9b11,0x47b5,[ 0xbc,0x6f,0x8e,0x78,0x95,0xfc,0xea,0x17 ] }; 24624 extern(Windows): 24625 /// Called to provide the implementer with the completion status and result 24626 /// of the corresponding asynchronous method call. 24627 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR id); 24628 } 24629 24630 /// The caller implements this interface to receive the result of the 24631 /// ExecuteScript method. 24632 const GUID IID_ICoreWebView2ExecuteScriptCompletedHandler = ICoreWebView2ExecuteScriptCompletedHandler.iid; 24633 24634 interface ICoreWebView2ExecuteScriptCompletedHandler : IUnknown 24635 { 24636 static const GUID iid = { 0x49511172,0xcc67,0x4bca,[ 0x99,0x23,0x13,0x71,0x12,0xf4,0xc4,0xcc ] }; 24637 extern(Windows): 24638 /// Called to provide the implementer with the completion status and result 24639 /// of the corresponding asynchronous method call. 24640 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR resultObjectAsJson); 24641 } 24642 24643 /// Event args for the WebResourceRequested event. 24644 const GUID IID_ICoreWebView2WebResourceRequestedEventArgs = ICoreWebView2WebResourceRequestedEventArgs.iid; 24645 24646 interface ICoreWebView2WebResourceRequestedEventArgs : IUnknown 24647 { 24648 static const GUID iid = { 0x453e667f,0x12c7,0x49d4,[ 0xbe,0x6d,0xdd,0xbe,0x79,0x56,0xf5,0x7a ] }; 24649 extern(Windows): 24650 /// The Web resource request. The request object may be missing some headers 24651 /// that are added by network stack later on. 24652 /+[ propget]+/ 24653 HRESULT get_Request(/+[out, retval]+/ ICoreWebView2WebResourceRequest * request); 24654 24655 /// A placeholder for the web resource response object. If this object is set, the 24656 /// web resource request will be completed with this response. 24657 /+[ propget]+/ 24658 HRESULT get_Response(/+[out, retval]+/ ICoreWebView2WebResourceResponse * response); 24659 /// Set the Response property. An empty Web resource response object can be 24660 /// created with CreateWebResourceResponse and then modified to construct the response. 24661 /+[ propput]+/ 24662 HRESULT put_Response(/+[in]+/ ICoreWebView2WebResourceResponse response); 24663 24664 /// Obtain an ICoreWebView2Deferral object and put the event into a deferred state. 24665 /// You can use the ICoreWebView2Deferral object to complete the request at a 24666 /// later time. 24667 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 24668 24669 /// The web resource request context. 24670 /+[ propget]+/ 24671 HRESULT get_ResourceContext(/+[out, retval]+/ COREWEBVIEW2_WEB_RESOURCE_CONTEXT* context); 24672 } 24673 24674 /// Fires when a URL request (through network, file etc.) is made in the webview 24675 /// for a Web resource matching resource context filter and URL specified in 24676 /// AddWebResourceRequestedFilter. 24677 /// The host can view and modify the request or provide a response in a similar 24678 /// pattern to HTTP, in which case the request immediately completed. 24679 /// This may not contain any request headers that are added by the network 24680 /// stack, such as Authorization headers. 24681 const GUID IID_ICoreWebView2WebResourceRequestedEventHandler = ICoreWebView2WebResourceRequestedEventHandler.iid; 24682 24683 interface ICoreWebView2WebResourceRequestedEventHandler : IUnknown 24684 { 24685 static const GUID iid = { 0xab00b74c,0x15f1,0x4646,[ 0x80,0xe8,0xe7,0x63,0x41,0xd2,0x5d,0x71 ] }; 24686 extern(Windows): 24687 /// Called to provide the implementer with the event args for the 24688 /// corresponding event. 24689 HRESULT Invoke( 24690 /+[in]+/ ICoreWebView2 sender, 24691 /+[in]+/ ICoreWebView2WebResourceRequestedEventArgs args); 24692 } 24693 24694 /// The caller implements this method to receive the result of the 24695 /// CapturePreview method. The result is written to the stream provided in 24696 /// the CapturePreview method call. 24697 const GUID IID_ICoreWebView2CapturePreviewCompletedHandler = ICoreWebView2CapturePreviewCompletedHandler.iid; 24698 24699 interface ICoreWebView2CapturePreviewCompletedHandler : IUnknown 24700 { 24701 static const GUID iid = { 0x697e05e9,0x3d8f,0x45fa,[ 0x96,0xf4,0x8f,0xfe,0x1e,0xde,0xda,0xf5 ] }; 24702 extern(Windows): 24703 /// Called to provide the implementer with the completion status 24704 /// of the corresponding asynchronous method call. 24705 HRESULT Invoke(in HRESULT errorCode); 24706 } 24707 24708 /// The caller implements this method to receive the GotFocus and LostFocus 24709 /// events. There are no event args for this event. 24710 const GUID IID_ICoreWebView2FocusChangedEventHandler = ICoreWebView2FocusChangedEventHandler.iid; 24711 24712 interface ICoreWebView2FocusChangedEventHandler : IUnknown 24713 { 24714 static const GUID iid = { 0x05ea24bd,0x6452,0x4926,[ 0x90,0x14,0x4b,0x82,0xb4,0x98,0x13,0x5d ] }; 24715 extern(Windows): 24716 /// Called to provide the implementer with the event args for the 24717 /// corresponding event. There are no event args and the args 24718 /// parameter will be null. 24719 HRESULT Invoke( 24720 /+[in]+/ ICoreWebView2Controller sender, 24721 /+[in]+/ IUnknown args); 24722 } 24723 24724 /// Event args for the MoveFocusRequested event. 24725 const GUID IID_ICoreWebView2MoveFocusRequestedEventArgs = ICoreWebView2MoveFocusRequestedEventArgs.iid; 24726 24727 interface ICoreWebView2MoveFocusRequestedEventArgs : IUnknown 24728 { 24729 static const GUID iid = { 0x2d6aa13b,0x3839,0x4a15,[ 0x92,0xfc,0xd8,0x8b,0x3c,0x0d,0x9c,0x9d ] }; 24730 extern(Windows): 24731 /// The reason for WebView to fire the MoveFocus Requested event. 24732 /+[ propget]+/ 24733 HRESULT get_Reason(/+[out, retval]+/ COREWEBVIEW2_MOVE_FOCUS_REASON* reason); 24734 24735 /// Indicate whether the event has been handled by the app. 24736 /// If the app has moved the focus to its desired location, it should set 24737 /// Handled property to TRUE. 24738 /// When Handled property is false after the event handler returns, default 24739 /// action will be taken. The default action is to try to find the next tab 24740 /// stop child window in the app and try to move focus to that window. If 24741 /// there is no other such window to move focus to, focus will be cycled 24742 /// within the WebView's web content. 24743 /+[ propget]+/ 24744 HRESULT get_Handled(/+[out, retval]+/ BOOL* value); 24745 /// Set the Handled property. 24746 /+[ propput]+/ 24747 HRESULT put_Handled(in BOOL value); 24748 } 24749 24750 /// The caller implements this method to receive the MoveFocusRequested event. 24751 const GUID IID_ICoreWebView2MoveFocusRequestedEventHandler = ICoreWebView2MoveFocusRequestedEventHandler.iid; 24752 24753 interface ICoreWebView2MoveFocusRequestedEventHandler : IUnknown 24754 { 24755 static const GUID iid = { 0x69035451,0x6dc7,0x4cb8,[ 0x9b,0xce,0xb2,0xbd,0x70,0xad,0x28,0x9f ] }; 24756 extern(Windows): 24757 /// Called to provide the implementer with the event args for the 24758 /// corresponding event. 24759 HRESULT Invoke( 24760 /+[in]+/ ICoreWebView2Controller sender, 24761 /+[in]+/ ICoreWebView2MoveFocusRequestedEventArgs args); 24762 } 24763 24764 /// Event args for the WebMessageReceived event. 24765 const GUID IID_ICoreWebView2WebMessageReceivedEventArgs = ICoreWebView2WebMessageReceivedEventArgs.iid; 24766 24767 interface ICoreWebView2WebMessageReceivedEventArgs : IUnknown 24768 { 24769 static const GUID iid = { 0x0f99a40c,0xe962,0x4207,[ 0x9e,0x92,0xe3,0xd5,0x42,0xef,0xf8,0x49 ] }; 24770 extern(Windows): 24771 /// The URI of the document that sent this web message. 24772 /+[ propget]+/ 24773 HRESULT get_Source(/+[out, retval]+/ LPWSTR* source); 24774 24775 /// The message posted from the WebView content to the host converted to a 24776 /// JSON string. Use this to communicate via JavaScript objects. 24777 /// 24778 /// For example the following postMessage calls result in the 24779 /// following WebMessageAsJson values: 24780 /// 24781 /// ``` 24782 /// postMessage({'a': 'b'}) L"{\"a\": \"b\"}" 24783 /// postMessage(1.2) L"1.2" 24784 /// postMessage('example') L"\"example\"" 24785 /// ``` 24786 /+[ propget]+/ 24787 HRESULT get_WebMessageAsJson(/+[out, retval]+/ LPWSTR* webMessageAsJson); 24788 24789 /// If the message posted from the WebView content to the host is a 24790 /// string type, this method will return the value of that string. If the 24791 /// message posted is some other kind of JavaScript type this method will fail 24792 /// with E_INVALIDARG. Use this to communicate via simple strings. 24793 /// 24794 /// For example the following postMessage calls result in the 24795 /// following WebMessageAsString values: 24796 /// 24797 /// ``` 24798 /// postMessage({'a': 'b'}) E_INVALIDARG 24799 /// postMessage(1.2) E_INVALIDARG 24800 /// postMessage('example') L"example" 24801 /// ``` 24802 HRESULT TryGetWebMessageAsString(/+[out, retval]+/ LPWSTR* webMessageAsString); 24803 } 24804 24805 /// The caller implements this interface to receive the WebMessageReceived 24806 /// event. 24807 const GUID IID_ICoreWebView2WebMessageReceivedEventHandler = ICoreWebView2WebMessageReceivedEventHandler.iid; 24808 24809 interface ICoreWebView2WebMessageReceivedEventHandler : IUnknown 24810 { 24811 static const GUID iid = { 0x57213f19,0x00e6,0x49fa,[ 0x8e,0x07,0x89,0x8e,0xa0,0x1e,0xcb,0xd2 ] }; 24812 extern(Windows): 24813 /// Called to provide the implementer with the event args for the 24814 /// corresponding event. 24815 HRESULT Invoke( 24816 /+[in]+/ ICoreWebView2 sender, 24817 /+[in]+/ ICoreWebView2WebMessageReceivedEventArgs args); 24818 } 24819 24820 /// Event args for the DevToolsProtocolEventReceived event. 24821 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventArgs = ICoreWebView2DevToolsProtocolEventReceivedEventArgs.iid; 24822 24823 interface ICoreWebView2DevToolsProtocolEventReceivedEventArgs : IUnknown 24824 { 24825 static const GUID iid = { 0x653c2959,0xbb3a,0x4377,[ 0x86,0x32,0xb5,0x8a,0xda,0x4e,0x66,0xc4 ] }; 24826 extern(Windows): 24827 /// The parameter object of the corresponding DevToolsProtocol event 24828 /// represented as a JSON string. 24829 /+[ propget]+/ 24830 HRESULT get_ParameterObjectAsJson(/+[out, retval]+/ LPWSTR* 24831 parameterObjectAsJson); 24832 } 24833 24834 /// The caller implements this interface to receive 24835 /// DevToolsProtocolEventReceived events from the WebView. 24836 const GUID IID_ICoreWebView2DevToolsProtocolEventReceivedEventHandler = ICoreWebView2DevToolsProtocolEventReceivedEventHandler.iid; 24837 24838 interface ICoreWebView2DevToolsProtocolEventReceivedEventHandler : IUnknown 24839 { 24840 static const GUID iid = { 0xe2fda4be,0x5456,0x406c,[ 0xa2,0x61,0x3d,0x45,0x21,0x38,0x36,0x2c ] }; 24841 extern(Windows): 24842 /// Called to provide the implementer with the event args for the 24843 /// corresponding event. 24844 HRESULT Invoke( 24845 /+[in]+/ ICoreWebView2 sender, 24846 /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventArgs args); 24847 } 24848 24849 /// The caller implements this interface to receive CallDevToolsProtocolMethod 24850 /// completion results. 24851 const GUID IID_ICoreWebView2CallDevToolsProtocolMethodCompletedHandler = ICoreWebView2CallDevToolsProtocolMethodCompletedHandler.iid; 24852 24853 interface ICoreWebView2CallDevToolsProtocolMethodCompletedHandler : IUnknown 24854 { 24855 static const GUID iid = { 0x5c4889f0,0x5ef6,0x4c5a,[ 0x95,0x2c,0xd8,0xf1,0xb9,0x2d,0x05,0x74 ] }; 24856 extern(Windows): 24857 /// Called to provide the implementer with the completion status and result 24858 /// of the corresponding asynchronous method call. 24859 HRESULT Invoke(in HRESULT errorCode, in LPCWSTR returnObjectAsJson); 24860 } 24861 24862 /// The caller implements this interface to receive the CoreWebView2Controller created 24863 /// via CreateCoreWebView2Controller. 24864 const GUID IID_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler = ICoreWebView2CreateCoreWebView2ControllerCompletedHandler.iid; 24865 24866 interface ICoreWebView2CreateCoreWebView2ControllerCompletedHandler : IUnknown 24867 { 24868 static const GUID iid = { 0x6c4819f3,0xc9b7,0x4260,[ 0x81,0x27,0xc9,0xf5,0xbd,0xe7,0xf6,0x8c ] }; 24869 extern(Windows): 24870 /// Called to provide the implementer with the completion status and result 24871 /// of the corresponding asynchronous method call. 24872 HRESULT Invoke(HRESULT errorCode, ICoreWebView2Controller createdController); 24873 } 24874 24875 /// Event args for the NewWindowRequested event. The event is fired when content 24876 /// inside webview requested to a open a new window (through window.open() and so on.) 24877 const GUID IID_ICoreWebView2NewWindowRequestedEventArgs = ICoreWebView2NewWindowRequestedEventArgs.iid; 24878 24879 interface ICoreWebView2NewWindowRequestedEventArgs : IUnknown 24880 { 24881 static const GUID iid = { 0x34acb11c,0xfc37,0x4418,[ 0x91,0x32,0xf9,0xc2,0x1d,0x1e,0xaf,0xb9 ] }; 24882 extern(Windows): 24883 /// The target uri of the NewWindowRequest. 24884 /+[ propget]+/ 24885 HRESULT get_Uri(/+[out, retval]+/ LPWSTR* uri); 24886 24887 /// Sets a WebView as a result of the NewWindowRequest. The target 24888 /// WebView should not be navigated. If the NewWindow is set, its top level 24889 /// window will return as the opened WindowProxy. 24890 /+[ propput]+/ 24891 HRESULT put_NewWindow(/+[in]+/ ICoreWebView2 newWindow); 24892 /// Gets the new window. 24893 /+[ propget]+/ 24894 HRESULT get_NewWindow(/+[out, retval]+/ ICoreWebView2 * newWindow); 24895 24896 /// Sets whether the NewWindowRequestedEvent is handled by host. If this is false 24897 /// and no NewWindow is set, the WebView will open a popup 24898 /// window and it will be returned as opened WindowProxy. 24899 /// If set to true and no NewWindow is set for a window.open call, the opened 24900 /// WindowProxy will be for an dummy window object and no window will load. 24901 /// Default is false. 24902 /+[ propput]+/ 24903 HRESULT put_Handled(in BOOL handled); 24904 /// Gets whether the NewWindowRequestedEvent is handled by host. 24905 /+[ propget]+/ 24906 HRESULT get_Handled(/+[out, retval]+/ BOOL* handled); 24907 24908 /// IsUserInitiated is true when the new window request was initiated through 24909 /// a user gesture such as clicking an anchor tag with target. The Edge 24910 /// popup blocker is disabled for WebView so the app can use this flag to 24911 /// block non-user initiated popups. 24912 /+[ propget]+/ 24913 HRESULT get_IsUserInitiated(/+[out, retval]+/ BOOL* isUserInitiated); 24914 24915 /// Obtain an ICoreWebView2Deferral object and put the event into a deferred state. 24916 /// You can use the ICoreWebView2Deferral object to complete the window open 24917 /// request at a later time. 24918 /// While this event is deferred the opener window will be returned a WindowProxy 24919 /// to an unnavigated window, which will navigate when the deferral is complete. 24920 HRESULT GetDeferral(/+[out, retval]+/ ICoreWebView2Deferral * deferral); 24921 24922 /// Window features specified by the window.open call. 24923 /// These features can be considered for positioning and sizing of 24924 /// new webview windows. 24925 /+[ propget]+/ 24926 HRESULT get_WindowFeatures(/+[out, retval]+/ ICoreWebView2WindowFeatures * value); 24927 } 24928 24929 /// Window features for a WebView popup window. These fields match the 24930 /// 'windowFeatures' passed to window.open as specified in 24931 /// https://developer.mozilla.org/en-US/docs/Web/API/Window/open#Window_features 24932 /// There is no requirement for you to respect these values. If your app doesn't 24933 /// have corresponding UI features, for example no toolbar, or if all webviews 24934 /// are opened in tabs and so cannot have distinct size or positions, then your 24935 /// app cannot respect these values. You may want to respect values but perhaps 24936 /// only some can apply to your app's UI. Accordingly, it is fine to respect 24937 /// all, some, or none of these properties as appropriate based on your app. 24938 /// For all numeric properties, if the value when passed to window.open is 24939 /// outside the range of an unsigned 32bit int, the value will be mod of the max 24940 /// of unsigned 32bit integer. If the value cannot be parsed as an integer it 24941 /// will be considered 0. If the value is a floating point value, it will be 24942 /// rounded down to an integer. 24943 const GUID IID_ICoreWebView2WindowFeatures = ICoreWebView2WindowFeatures.iid; 24944 24945 interface ICoreWebView2WindowFeatures : IUnknown 24946 { 24947 static const GUID iid = { 0x5eaf559f,0xb46e,0x4397,[ 0x88,0x60,0xe4,0x22,0xf2,0x87,0xff,0x1e ] }; 24948 extern(Windows): 24949 /// True if the Left and Top properties were specified. False if at least one 24950 /// was not specified. 24951 /+[ propget]+/ 24952 HRESULT get_HasPosition(/+[out, retval]+/ BOOL* value); 24953 /// True if the Width and Height properties were specified. False if at least 24954 /// one was not specified. 24955 /+[ propget]+/ 24956 HRESULT get_HasSize(/+[out, retval]+/ BOOL* value); 24957 /// The left position of the window. This will fail if HasPosition is false. 24958 /+[ propget]+/ 24959 HRESULT get_Left(/+[out, retval]+/ UINT32* value); 24960 /// The top position of the window. This will fail if HasPosition is false. 24961 /+[ propget]+/ 24962 HRESULT get_Top(/+[out, retval]+/ UINT32* value); 24963 /// The height of the window. This will fail if HasSize is false. 24964 /+[ propget]+/ 24965 HRESULT get_Height(/+[out, retval]+/ UINT32* value); 24966 /// The width of the window. This will fail if HasSize is false. 24967 /+[ propget]+/ 24968 HRESULT get_Width(/+[out, retval]+/ UINT32* value); 24969 /// Whether or not to display the menu bar. 24970 /+[ propget]+/ 24971 HRESULT get_ShouldDisplayMenuBar(/+[out, retval]+/ BOOL* value); 24972 /// Whether or not to display a status bar. 24973 /+[ propget]+/ 24974 HRESULT get_ShouldDisplayStatus(/+[out, retval]+/ BOOL* value); 24975 /// Whether or not to display a toolbar. 24976 /+[ propget]+/ 24977 HRESULT get_ShouldDisplayToolbar(/+[out, retval]+/ BOOL* value); 24978 /// Whether or not to display scroll bars. 24979 /+[ propget]+/ 24980 HRESULT get_ShouldDisplayScrollBars(/+[out, retval]+/ BOOL* value); 24981 } 24982 24983 /// The caller implements this interface to receive NewWindowRequested 24984 /// events. 24985 const GUID IID_ICoreWebView2NewWindowRequestedEventHandler = ICoreWebView2NewWindowRequestedEventHandler.iid; 24986 24987 interface ICoreWebView2NewWindowRequestedEventHandler : IUnknown 24988 { 24989 static const GUID iid = { 0xd4c185fe,0xc81c,0x4989,[ 0x97,0xaf,0x2d,0x3f,0xa7,0xab,0x56,0x51 ] }; 24990 extern(Windows): 24991 /// Called to provide the implementer with the event args for the 24992 /// corresponding event. 24993 HRESULT Invoke( 24994 /+[in]+/ ICoreWebView2 sender, 24995 /+[in]+/ ICoreWebView2NewWindowRequestedEventArgs args); 24996 } 24997 24998 /// The caller implements this interface to receive DocumentTitleChanged 24999 /// events. Use the DocumentTitle property to get the modified 25000 /// title. 25001 const GUID IID_ICoreWebView2DocumentTitleChangedEventHandler = ICoreWebView2DocumentTitleChangedEventHandler.iid; 25002 25003 interface ICoreWebView2DocumentTitleChangedEventHandler : IUnknown 25004 { 25005 static const GUID iid = { 0xf5f2b923,0x953e,0x4042,[ 0x9f,0x95,0xf3,0xa1,0x18,0xe1,0xaf,0xd4 ] }; 25006 extern(Windows): 25007 /// Called to provide the implementer with the event args for the 25008 /// corresponding event. There are no event args and the args 25009 /// parameter will be null. 25010 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 25011 } 25012 25013 /// Event args for the AcceleratorKeyPressed event. 25014 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventArgs = ICoreWebView2AcceleratorKeyPressedEventArgs.iid; 25015 25016 interface ICoreWebView2AcceleratorKeyPressedEventArgs : IUnknown 25017 { 25018 static const GUID iid = { 0x9f760f8a,0xfb79,0x42be,[ 0x99,0x90,0x7b,0x56,0x90,0x0f,0xa9,0xc7 ] }; 25019 extern(Windows): 25020 /// The key event type that caused the event to be fired. 25021 /+[ propget]+/ 25022 HRESULT get_KeyEventKind(/+[out, retval]+/ COREWEBVIEW2_KEY_EVENT_KIND* keyEventKind); 25023 /// The Win32 virtual key code of the key that was pressed or released. 25024 /// This will be one of the Win32 virtual key constants such as VK_RETURN or 25025 /// an (uppercase) ASCII value such as 'A'. You can check whether Ctrl or Alt 25026 /// are pressed by calling GetKeyState(VK_CONTROL) or GetKeyState(VK_MENU). 25027 /+[ propget]+/ 25028 HRESULT get_VirtualKey(/+[out, retval]+/ UINT* virtualKey); 25029 /// The LPARAM value that accompanied the window message. See the 25030 /// documentation for the WM_KEYDOWN and WM_KEYUP messages. 25031 /+[ propget]+/ 25032 HRESULT get_KeyEventLParam(/+[out, retval]+/ INT* lParam); 25033 /// A structure representing the information passed in the LPARAM of the 25034 /// window message. 25035 /+[ propget]+/ 25036 HRESULT get_PhysicalKeyStatus( 25037 /+[out, retval]+/ COREWEBVIEW2_PHYSICAL_KEY_STATUS* physicalKeyStatus); 25038 /// During AcceleratorKeyPressedEvent handler invocation the WebView is blocked 25039 /// waiting for the decision of if the accelerator will be handled by the host 25040 /// or not. If the Handled property is set to TRUE then this will 25041 /// prevent the WebView from performing the default action for this 25042 /// accelerator key. Otherwise the WebView will perform the default action for 25043 /// the accelerator key. 25044 /+[ propget]+/ 25045 HRESULT get_Handled(/+[out, retval]+/ BOOL* handled); 25046 /// Sets the Handled property. 25047 /+[ propput]+/ 25048 HRESULT put_Handled(in BOOL handled); 25049 } 25050 25051 /// The caller implements this interface to receive the AcceleratorKeyPressed 25052 /// event. 25053 const GUID IID_ICoreWebView2AcceleratorKeyPressedEventHandler = ICoreWebView2AcceleratorKeyPressedEventHandler.iid; 25054 25055 interface ICoreWebView2AcceleratorKeyPressedEventHandler : IUnknown 25056 { 25057 static const GUID iid = { 0xb29c7e28,0xfa79,0x41a8,[ 0x8e,0x44,0x65,0x81,0x1c,0x76,0xdc,0xb2 ] }; 25058 extern(Windows): 25059 /// Called to provide the implementer with the event args for the 25060 /// corresponding event. 25061 HRESULT Invoke( 25062 /+[in]+/ ICoreWebView2Controller sender, 25063 /+[in]+/ ICoreWebView2AcceleratorKeyPressedEventArgs args); 25064 } 25065 25066 /// The caller implements this interface to receive NewBrowserVersionAvailable events. 25067 const GUID IID_ICoreWebView2NewBrowserVersionAvailableEventHandler = ICoreWebView2NewBrowserVersionAvailableEventHandler.iid; 25068 25069 interface ICoreWebView2NewBrowserVersionAvailableEventHandler : IUnknown 25070 { 25071 static const GUID iid = { 0xf9a2976e,0xd34e,0x44fc,[ 0xad,0xee,0x81,0xb6,0xb5,0x7c,0xa9,0x14 ] }; 25072 extern(Windows): 25073 /// Called to provide the implementer with the event args for the 25074 /// corresponding event. 25075 HRESULT Invoke(/+[in]+/ ICoreWebView2Environment webviewEnvironment, 25076 /+[in]+/ IUnknown args); 25077 } 25078 25079 /// The caller implements this method to receive the 25080 /// ContainsFullScreenElementChanged events. There are no event args for this 25081 /// event. 25082 const GUID IID_ICoreWebView2ContainsFullScreenElementChangedEventHandler = ICoreWebView2ContainsFullScreenElementChangedEventHandler.iid; 25083 25084 interface ICoreWebView2ContainsFullScreenElementChangedEventHandler : IUnknown 25085 { 25086 static const GUID iid = { 0xe45d98b1,0xafef,0x45be,[ 0x8b,0xaf,0x6c,0x77,0x28,0x86,0x7f,0x73 ] }; 25087 extern(Windows): 25088 /// Called to provide the implementer with the event args for the 25089 /// corresponding event. There are no event args and the args 25090 /// parameter will be null. 25091 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 25092 } 25093 25094 /// The caller implements this interface to receive NewWindowRequested 25095 /// events. 25096 const GUID IID_ICoreWebView2WindowCloseRequestedEventHandler = ICoreWebView2WindowCloseRequestedEventHandler.iid; 25097 25098 interface ICoreWebView2WindowCloseRequestedEventHandler : IUnknown 25099 { 25100 static const GUID iid = { 0x5c19e9e0,0x092f,0x486b,[ 0xaf,0xfa,0xca,0x82,0x31,0x91,0x30,0x39 ] }; 25101 extern(Windows): 25102 /// Called to provide the implementer with the event args for the 25103 /// corresponding event. There are no event args and the args 25104 /// parameter will be null. 25105 HRESULT Invoke(/+[in]+/ ICoreWebView2 sender, /+[in]+/ IUnknown args); 25106 } 25107 25108 /// This represents the WebView2 Environment. WebViews created from an 25109 /// environment run on the browser process specified with environment parameters 25110 /// and objects created from an environment should be used in the same environment. 25111 /// Using it in different environments are not guaranteed to be compatible and may fail. 25112 const GUID IID_ICoreWebView2Environment = ICoreWebView2Environment.iid; 25113 25114 interface ICoreWebView2Environment : IUnknown 25115 { 25116 static const GUID iid = { 0xb96d755e,0x0319,0x4e92,[ 0xa2,0x96,0x23,0x43,0x6f,0x46,0xa1,0xfc ] }; 25117 extern(Windows): 25118 /// Asynchronously create a new WebView. 25119 /// 25120 /// parentWindow is the HWND in which the WebView should be displayed and 25121 /// from which receive input. The WebView will add a child window to the 25122 /// provided window during WebView creation. Z-order and other things impacted 25123 /// by sibling window order will be affected accordingly. 25124 /// 25125 /// It is recommended that the application set Application User Model ID for 25126 /// the process or the application window. If none is set, during WebView 25127 /// creation a generated Application User Model ID is set to root window of 25128 /// parentWindow. 25129 /// \snippet AppWindow.cpp CreateCoreWebView2Controller 25130 /// 25131 /// It is recommended that the application handles restart manager messages 25132 /// so that it can be restarted gracefully in the case when the app is using 25133 /// Edge for WebView from a certain installation and that installation is being 25134 /// uninstalled. For example, if a user installs Edge from Dev channel and 25135 /// opts to use Edge from that channel for testing the app, and then uninstalls 25136 /// Edge from that channel without closing the app, the app will be restarted 25137 /// to allow uninstallation of the dev channel to succeed. 25138 /// \snippet AppWindow.cpp RestartManager 25139 /// 25140 /// When the application retries CreateCoreWebView2Controller upon failure, it is 25141 /// recommended that the application restarts from creating a new WebView2 25142 /// Environment. If an Edge update happens, the version associated with a WebView2 25143 /// Environment could have been removed and causing the object to no longer work. 25144 /// Creating a new WebView2 Environment will work as it uses the latest version. 25145 /// 25146 /// WebView creation will fail if there is already a running instance using the same 25147 /// user data folder, and the Environment objects have different EnvironmentOptions. 25148 /// For example, if there is already a WebView created with one language, trying to 25149 /// create a WebView with a different language using the same user data folder will 25150 /// fail. 25151 HRESULT CreateCoreWebView2Controller( 25152 HWND parentWindow, 25153 ICoreWebView2CreateCoreWebView2ControllerCompletedHandler handler); 25154 25155 /// Create a new web resource response object. The headers is the 25156 /// raw response header string delimited by newline. It's also possible to 25157 /// create this object with null headers string and then use the 25158 /// ICoreWebView2HttpResponseHeaders to construct the headers line by line. 25159 /// For information on other parameters see ICoreWebView2WebResourceResponse. 25160 /// 25161 /// \snippet SettingsComponent.cpp WebResourceRequested 25162 HRESULT CreateWebResourceResponse( 25163 in IStream* content, 25164 in int statusCode, 25165 in LPCWSTR reasonPhrase, 25166 in LPCWSTR headers, 25167 /+[out, retval]+/ ICoreWebView2WebResourceResponse * response); 25168 25169 /// The browser version info of the current ICoreWebView2Environment, 25170 /// including channel name if it is not the stable channel. 25171 /// This matches the format of the 25172 /// GetAvailableCoreWebView2BrowserVersionString API. 25173 /// Channel names are 'beta', 'dev', and 'canary'. 25174 /// 25175 /// \snippet AppWindow.cpp GetBrowserVersionString 25176 /+[ propget]+/ 25177 HRESULT get_BrowserVersionString(/+[out, retval]+/ LPWSTR* versionInfo); 25178 25179 /// Add an event handler for the NewBrowserVersionAvailable event. 25180 /// NewBrowserVersionAvailable fires when a newer version of the 25181 /// Edge browser is installed and available for use via WebView2. 25182 /// To use the newer version of the browser you must create a new 25183 /// environment and WebView. 25184 /// This event will only be fired for new version from the same Edge channel 25185 /// that the code is running from. When not running with installed Edge, 25186 /// no event will be fired. 25187 /// 25188 /// Because a user data folder can only be used by one browser process at 25189 /// a time, if you want to use the same user data folder in the WebViews 25190 /// using the new version of the browser, 25191 /// you must close the environment and WebViews that are using the older 25192 /// version of the browser first. Or simply prompt the user to restart the 25193 /// app. 25194 /// 25195 /// \snippet AppWindow.cpp NewBrowserVersionAvailable 25196 /// 25197 HRESULT add_NewBrowserVersionAvailable( 25198 /+[in]+/ ICoreWebView2NewBrowserVersionAvailableEventHandler eventHandler, 25199 /+[out]+/ EventRegistrationToken* token); 25200 25201 /// Remove an event handler previously added with add_NewBrowserVersionAvailable. 25202 HRESULT remove_NewBrowserVersionAvailable( 25203 in EventRegistrationToken token); 25204 } 25205 25206 /// Options used to create WebView2 Environment. 25207 /// 25208 /// \snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions 25209 /// 25210 const GUID IID_ICoreWebView2EnvironmentOptions = ICoreWebView2EnvironmentOptions.iid; 25211 25212 interface ICoreWebView2EnvironmentOptions : IUnknown 25213 { 25214 static const GUID iid = { 0x2fde08a8,0x1e9a,0x4766,[ 0x8c,0x05,0x95,0xa9,0xce,0xb9,0xd1,0xc5 ] }; 25215 extern(Windows): 25216 /// AdditionalBrowserArguments can be specified to change the behavior of the 25217 /// WebView. These will be passed to the browser process as part of 25218 /// the command line. See 25219 /// [Run Chromium with Flags](https://aka.ms/RunChromiumWithFlags) 25220 /// for more information about command line switches to browser 25221 /// process. If the app is launched with a command line switch 25222 /// `--edge-webview-switches=xxx` the value of that switch (xxx in 25223 /// the above example) will also be appended to the browser 25224 /// process command line. Certain switches like `--user-data-dir` are 25225 /// internal and important to WebView. Those switches will be 25226 /// ignored even if specified. If the same switches are specified 25227 /// multiple times, the last one wins. There is no attempt to 25228 /// merge the different values of the same switch, except for disabled 25229 /// and enabled features. The features specified by `--enable-features` 25230 /// and `--disable-features` will be merged with simple logic: the features 25231 /// will be the union of the specified features and built-in features, and if 25232 /// a feature is disabled, it will be removed from the enabled features list. 25233 /// App process's command line `--edge-webview-switches` value are processed 25234 /// after the additionalBrowserArguments parameter is processed. Certain 25235 /// features are disabled internally and can't be enabled. 25236 /// If parsing failed for the specified switches, they will be 25237 /// ignored. Default is to run browser process with no extra flags. 25238 /+[ propget]+/ 25239 HRESULT get_AdditionalBrowserArguments(/+[out, retval]+/ LPWSTR* value); 25240 /// Set the AdditionalBrowserArguments property. 25241 /+[ propput]+/ 25242 HRESULT put_AdditionalBrowserArguments(in LPCWSTR value); 25243 25244 /// The default language that WebView will run with. It applies to browser UIs 25245 /// like context menu and dialogs. It also applies to the accept-languages 25246 /// HTTP header that WebView sends to web sites. 25247 /// It is in the format of `language[-country]` where `language` is the 2 letter 25248 /// code from ISO 639 and `country` is the 2 letter code from ISO 3166. 25249 /+[ propget]+/ 25250 HRESULT get_Language(/+[out, retval]+/ LPWSTR* value); 25251 /// Set the Language property. 25252 /+[ propput]+/ 25253 HRESULT put_Language(in LPCWSTR value); 25254 25255 /// The version of the Edge WebView2 Runtime binaries required to be 25256 /// compatible with the calling application. This defaults to the Edge 25257 /// WebView2 Runtime version 25258 /// that corresponds with the version of the SDK the application is using. 25259 /// The format of this value is the same as the format of the 25260 /// BrowserVersionString property and other BrowserVersion values. 25261 /// Only the version part of the BrowserVersion value is respected. The 25262 /// channel suffix, if it exists, is ignored. 25263 /// The version of the Edge WebView2 Runtime binaries actually used may be 25264 /// different from the specified TargetCompatibleBrowserVersion. They are only 25265 /// guaranteed to be compatible. You can check the actual version on the 25266 /// BrowserVersionString property on the ICoreWebView2Environment. 25267 /+[ propget]+/ 25268 HRESULT get_TargetCompatibleBrowserVersion(/+[out, retval]+/ LPWSTR* value); 25269 /// Set the TargetCompatibleBrowserVersion property. 25270 /+[ propput]+/ 25271 HRESULT put_TargetCompatibleBrowserVersion(in LPCWSTR value); 25272 25273 /// The AllowSingleSignOnUsingOSPrimaryAccount property is used to enable 25274 /// single sign on with Azure Active Directory (AAD) resources inside WebView 25275 /// using the logged in Windows account and single sign on with web sites using 25276 /// Microsoft account associated with the login in Windows account. 25277 /// Default is disabled. 25278 /// Universal Windows Platform apps must also declare enterpriseCloudSSO 25279 /// [restricted capability](https://docs.microsoft.com/windows/uwp/packaging/app-capability-declarations#restricted-capabilities) 25280 /// for the single sign on to work. 25281 /+[ propget]+/ 25282 HRESULT get_AllowSingleSignOnUsingOSPrimaryAccount(/+[out, retval]+/ BOOL* allow); 25283 /// Set the AllowSingleSignOnUsingOSPrimaryAccount property. 25284 /+[ propput]+/ 25285 HRESULT put_AllowSingleSignOnUsingOSPrimaryAccount(in BOOL allow); 25286 } 25287 25288 /// The caller implements this interface to receive the WebView2Environment created 25289 /// via CreateCoreWebView2Environment. 25290 const GUID IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler.iid; 25291 25292 interface ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler : IUnknown 25293 { 25294 static const GUID iid = { 0x4e8a3389,0xc9d8,0x4bd2,[ 0xb6,0xb5,0x12,0x4f,0xee,0x6c,0xc1,0x4d ] }; 25295 extern(Windows): 25296 /// Called to provide the implementer with the completion status and result 25297 /// of the corresponding asynchronous method call. 25298 HRESULT Invoke(HRESULT errorCode, ICoreWebView2Environment createdEnvironment); 25299 } 25300 25301 /// A Receiver is created for a particular DevTools Protocol event and allows 25302 /// you to subscribe and unsubscribe from that event. 25303 /// Obtained from the WebView object via GetDevToolsProtocolEventReceiver. 25304 const GUID IID_ICoreWebView2DevToolsProtocolEventReceiver = ICoreWebView2DevToolsProtocolEventReceiver.iid; 25305 25306 interface ICoreWebView2DevToolsProtocolEventReceiver : IUnknown 25307 { 25308 static const GUID iid = { 0xb32ca51a,0x8371,0x45e9,[ 0x93,0x17,0xaf,0x02,0x1d,0x08,0x03,0x67 ] }; 25309 extern(Windows): 25310 /// Subscribe to a DevToolsProtocol event. 25311 /// The handler's Invoke method will be called whenever the corresponding 25312 /// DevToolsProtocol event fires. Invoke will be called with 25313 /// an event args object containing the DevTools Protocol event's parameter 25314 /// object as a JSON string. 25315 /// 25316 /// \snippet ScriptComponent.cpp DevToolsProtocolEventReceived 25317 HRESULT add_DevToolsProtocolEventReceived( 25318 /+[in]+/ ICoreWebView2DevToolsProtocolEventReceivedEventHandler handler, 25319 /+[out]+/ EventRegistrationToken* token); 25320 /// Remove an event handler previously added with 25321 /// add_DevToolsProtocolEventReceived. 25322 HRESULT remove_DevToolsProtocolEventReceived( 25323 in EventRegistrationToken token); 25324 } 25325 25326 /// DLL export to create a WebView2 environment with a custom version of Edge, 25327 /// user data directory and/or additional options. 25328 /// 25329 /// The WebView2 environment and all other WebView2 objects are single threaded 25330 /// and have dependencies on Windows components that require COM to be 25331 /// initialized for a single-threaded apartment. The application is expected to 25332 /// call CoInitializeEx before calling CreateCoreWebView2EnvironmentWithOptions. 25333 /// 25334 /// ``` 25335 /// CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 25336 /// ``` 25337 /// 25338 /// If CoInitializeEx was not called or has been previously called with 25339 /// COINIT_MULTITHREADED, CreateCoreWebView2EnvironmentWithOptions will fail 25340 /// with one of the following errors. 25341 /// 25342 /// ``` 25343 /// CO_E_NOTINITIALIZED (if CoInitializeEx was not called) 25344 /// RPC_E_CHANGED_MODE (if CoInitializeEx was previously called with 25345 /// COINIT_MULTITHREADED) 25346 /// ``` 25347 /// 25348 /// Use `browserExecutableFolder` to specify whether WebView2 controls use a 25349 /// fixed or installed version of the WebView2 Runtime that exists on a client 25350 /// machine. To use a fixed version of the WebView2 Runtime, pass the relative 25351 /// path of the folder that contains the fixed version of the WebView2 Runtime 25352 /// to `browserExecutableFolder`. To create WebView2 controls that use the 25353 /// installed version of the WebView2 Runtime that exists on client machines, 25354 /// pass a null or empty string to `browserExecutableFolder`. In this scenario, 25355 /// the API tries to find a compatible version of the WebView2 Runtime that is 25356 /// installed on the client machine (first at the machine level, and then per 25357 /// user) using the selected channel preference. The path of fixed version of 25358 /// the WebView2 Runtime should not contain `\Edge\Application\`. When such a 25359 /// path is used, the API will fail with ERROR_NOT_SUPPORTED. 25360 /// 25361 /// The default channel search order is the WebView2 Runtime, Beta, Dev, and 25362 /// Canary. 25363 /// When there is an override WEBVIEW2_RELEASE_CHANNEL_PREFERENCE environment 25364 /// variable or applicable releaseChannelPreference registry value 25365 /// with the value of 1, the channel search order is reversed. 25366 /// 25367 /// userDataFolder can be 25368 /// specified to change the default user data folder location for 25369 /// WebView2. The path can be an absolute file path or a relative file path 25370 /// that is interpreted as relative to the current process's executable. 25371 /// Otherwise, for UWP apps, the default user data folder will be 25372 /// the app data folder for the package; for non-UWP apps, 25373 /// the default user data folder `{Executable File Name}.WebView2` 25374 /// will be created in the same directory next to the app executable. 25375 /// WebView2 creation can fail if the executable is running in a directory 25376 /// that the process doesn't have permission to create a new folder in. 25377 /// The app is responsible to clean up its user data folder 25378 /// when it is done. 25379 /// 25380 /// Note that as a browser process might be shared among WebViews, 25381 /// WebView creation will fail with HRESULT_FROM_WIN32(ERROR_INVALID_STATE) if 25382 /// the specified options does not match the options of the WebViews that are 25383 /// currently running in the shared browser process. 25384 /// 25385 /// environmentCreatedHandler is the handler result to the async operation 25386 /// which will contain the WebView2Environment that got created. 25387 /// 25388 /// The browserExecutableFolder, userDataFolder and additionalBrowserArguments 25389 /// of the environmentOptions may be overridden by 25390 /// values either specified in environment variables or in the registry. 25391 /// 25392 /// When creating a WebView2Environment the following environment variables 25393 /// are checked: 25394 /// 25395 /// ``` 25396 /// WEBVIEW2_BROWSER_EXECUTABLE_FOLDER 25397 /// WEBVIEW2_USER_DATA_FOLDER 25398 /// WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS 25399 /// WEBVIEW2_RELEASE_CHANNEL_PREFERENCE 25400 /// ``` 25401 /// 25402 /// If an override environment variable is found then we use the 25403 /// browserExecutableFolder and userDataFolder values as replacements for the 25404 /// corresponding values in CreateCoreWebView2EnvironmentWithOptions parameters. 25405 /// If additionalBrowserArguments specified in environment variable or in the 25406 /// registry, it will be appended to the correspinding values in 25407 /// CreateCoreWebView2EnvironmentWithOptions parameters. 25408 /// 25409 /// While not strictly overrides, there exists additional environment variables 25410 /// that can be set: 25411 /// 25412 /// ``` 25413 /// WEBVIEW2_WAIT_FOR_SCRIPT_DEBUGGER 25414 /// ``` 25415 /// 25416 /// When found with a non-empty value, this indicates that the WebView is being 25417 /// launched under a script debugger. In this case, the WebView will issue a 25418 /// `Page.waitForDebugger` CDP command that will cause script execution inside the 25419 /// WebView to pause on launch, until a debugger issues a corresponding 25420 /// `Runtime.runIfWaitingForDebugger` CDP command to resume execution. 25421 /// Note: There is no registry key equivalent of this environment variable. 25422 /// 25423 /// ``` 25424 /// WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER 25425 /// ``` 25426 /// 25427 /// When found with a non-empty value, this indicates that the WebView is being 25428 /// launched under a script debugger that also supports host applications that 25429 /// use multiple WebViews. The value is used as the identifier for a named pipe 25430 /// that will be opened and written to when a new WebView is created by the host 25431 /// application. The payload will match that of the remote-debugging-port JSON 25432 /// target and can be used by the external debugger to attach to a specific 25433 /// WebView instance. 25434 /// The format of the pipe created by the debugger should be: 25435 /// `\\.\pipe\WebView2\Debugger\{app_name}\{pipe_name}` 25436 /// where: 25437 /// 25438 /// - `{app_name}` is the host application exe filename, e.g. WebView2Example.exe 25439 /// - `{pipe_name}` is the value set for WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER. 25440 /// 25441 /// To enable debugging of the targets identified by the JSON you will also need 25442 /// to set the WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS environment variable to 25443 /// send `--remote-debugging-port={port_num}` 25444 /// where: 25445 /// 25446 /// - `{port_num}` is the port on which the CDP server will bind. 25447 /// 25448 /// Be aware that setting both the WEBVIEW2_PIPE_FOR_SCRIPT_DEBUGGER and 25449 /// WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS environment variables will cause the 25450 /// WebViews hosted in your application and their contents to be exposed to 25451 /// 3rd party applications such as debuggers. 25452 /// 25453 /// Note: There is no registry key equivalent of this environment variable. 25454 /// 25455 /// If none of those environment variables exist, then the registry is examined next. 25456 /// The following registry values are checked: 25457 /// 25458 /// ``` 25459 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder 25460 /// "{AppId}"="" 25461 /// 25462 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\ReleaseChannelPreference 25463 /// "{AppId}"="" 25464 /// 25465 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments 25466 /// "{AppId}"="" 25467 /// 25468 /// [{Root}]\Software\Policies\Microsoft\Edge\WebView2\UserDataFolder 25469 /// "{AppId}"="" 25470 /// ``` 25471 /// 25472 /// browserExecutableFolder and releaseChannelPreference can be configured using 25473 /// group policy under Administrative Templates > Microsoft Edge WebView2. 25474 /// The old registry location will be deprecated soon: 25475 /// 25476 /// ``` 25477 /// [{Root}\Software\Policies\Microsoft\EmbeddedBrowserWebView\LoaderOverride\{AppId}] 25478 /// "ReleaseChannelPreference"=dword:00000000 25479 /// "BrowserExecutableFolder"="" 25480 /// "UserDataFolder"="" 25481 /// "AdditionalBrowserArguments"="" 25482 /// ``` 25483 /// 25484 /// In the unlikely scenario where some instances of WebView are open during 25485 /// a browser update we could end up blocking the deletion of old Edge browsers. 25486 /// To avoid running out of disk space a new WebView creation will fail 25487 /// with the next error if it detects that there are many old versions present. 25488 /// 25489 /// ``` 25490 /// ERROR_DISK_FULL 25491 /// ``` 25492 /// 25493 /// The default maximum number of Edge versions allowed is 20. 25494 /// 25495 /// The maximum number of old Edge versions allowed can be overwritten with the value 25496 /// of the following environment variable. 25497 /// 25498 /// ``` 25499 /// WEBVIEW2_MAX_INSTANCES 25500 /// ``` 25501 /// 25502 /// If the Webview depends on an installed Edge and it is uninstalled 25503 /// any subsequent creation will fail with the next error 25504 /// 25505 /// ``` 25506 /// ERROR_PRODUCT_UNINSTALLED 25507 /// ``` 25508 /// 25509 /// First we check with Root as HKLM and then HKCU. 25510 /// AppId is first set to the Application User Model ID of the caller's process, 25511 /// then if there's no corresponding registry key the AppId is set to the 25512 /// executable name of the caller's process, or if that isn't a registry key 25513 /// then '*'. If an override registry key is found, then we use the 25514 /// browserExecutableFolder and userDataFolder registry values as replacements 25515 /// and append additionalBrowserArguments registry values for the corresponding 25516 /// values in CreateCoreWebView2EnvironmentWithOptions parameters. 25517 extern(Windows) HRESULT CreateCoreWebView2EnvironmentWithOptions(PCWSTR browserExecutableFolder, PCWSTR userDataFolder, ICoreWebView2EnvironmentOptions environmentOptions, ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler); 25518 25519 /// Creates an evergreen WebView2 Environment using the installed Edge version. 25520 /// This is equivalent to calling CreateCoreWebView2EnvironmentWithOptions with 25521 /// nullptr for browserExecutableFolder, userDataFolder, 25522 /// additionalBrowserArguments. See CreateCoreWebView2EnvironmentWithOptions for 25523 /// more details. 25524 extern(Windows) HRESULT CreateCoreWebView2Environment(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler environmentCreatedHandler); 25525 25526 /// Get the browser version info including channel name if it is not the stable channel 25527 /// or the Embedded Edge. 25528 /// Channel names are beta, dev, and canary. 25529 /// If an override exists for the browserExecutableFolder or the channel preference, 25530 /// the override will be used. 25531 /// If there isn't an override, then the parameter passed to 25532 /// GetAvailableCoreWebView2BrowserVersionString is used. 25533 extern(Windows) HRESULT GetAvailableCoreWebView2BrowserVersionString(PCWSTR browserExecutableFolder, LPWSTR* versionInfo); 25534 25535 /// This method is for anyone want to compare version correctly to determine 25536 /// which version is newer, older or same. It can be used to determine whether 25537 /// to use webview2 or certain feature base on version. 25538 /// Sets the value of result to -1, 0 or 1 if version1 is less than, equal or 25539 /// greater than version2 respectively. 25540 /// Returns E_INVALIDARG if it fails to parse any of the version strings or any 25541 /// input parameter is null. 25542 /// Input can directly use the versionInfo obtained from 25543 /// GetAvailableCoreWebView2BrowserVersionString, channel info will be ignored. 25544 extern(Windows) HRESULT CompareBrowserVersions(PCWSTR version1, PCWSTR version2, int* result); 25545 25546 }